{"version":3,"sources":["./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js","./node_modules/rxjs/_esm5/internal/util/isPromise.js","./node_modules/rxjs/_esm5/internal/observable/from.js","./node_modules/rxjs/_esm5/internal/scheduled/scheduled.js","./node_modules/rxjs/_esm5/internal/util/isInteropObservable.js","./node_modules/rxjs/_esm5/internal/scheduled/scheduleObservable.js","./node_modules/rxjs/_esm5/internal/scheduled/schedulePromise.js","./node_modules/rxjs/_esm5/internal/util/isIterable.js","./node_modules/rxjs/_esm5/internal/scheduled/scheduleIterable.js","./node_modules/rxjs/_esm5/internal/BehaviorSubject.js","./node_modules/rxjs/_esm5/internal/util/isFunction.js","./node_modules/@angular/animations/__ivy_ngcc__/fesm5/animations.js","./node_modules/rxjs/_esm5/internal/operators/finalize.js","./node_modules/rxjs/_esm5/internal/util/isArrayLike.js","./node_modules/rxjs/_esm5/internal/operators/map.js","./node_modules/rxjs/_esm5/internal/Observer.js","./node_modules/rxjs/_esm5/internal/Observable.js","./node_modules/rxjs/_esm5/internal/util/toSubscriber.js","./node_modules/rxjs/_esm5/internal/util/canReportError.js","./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js","./node_modules/rxjs/_esm5/internal/operators/catchError.js","./node_modules/rxjs/_esm5/internal/util/hostReportError.js","./node_modules/rxjs/_esm5/internal/util/EmptyError.js","./node_modules/rxjs/_esm5/internal/observable/combineLatest.js","./node_modules/rxjs/_esm5/internal/observable/defer.js","./node_modules/rxjs/_esm5/internal/operators/concatAll.js","./node_modules/rxjs/_esm5/internal/operators/takeLast.js","./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js","./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js","./node_modules/rxjs/_esm5/internal/operators/last.js","./node_modules/rxjs/_esm5/internal/operators/first.js","./node_modules/rxjs/_esm5/internal/operators/every.js","./node_modules/rxjs/_esm5/internal/operators/switchMap.js","./node_modules/rxjs/_esm5/internal/observable/concat.js","./node_modules/rxjs/_esm5/internal/operators/scan.js","./node_modules/@angular/router/__ivy_ngcc__/fesm5/router.js","./node_modules/rxjs/_esm5/internal/operators/startWith.js","./node_modules/rxjs/_esm5/internal/operators/reduce.js","./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm5/platform-browser.js","./node_modules/@angular/animations/__ivy_ngcc__/fesm5/browser.js","./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm5/animations.js","./node_modules/rxjs/_esm5/internal/symbol/iterator.js","./node_modules/rxjs/_esm5/internal/observable/of.js","./node_modules/rxjs/_esm5/internal/Subscriber.js","./node_modules/rxjs/_esm5/internal/util/subscribeTo.js","./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js","./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js","./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js","./node_modules/rxjs/_esm5/internal/observable/empty.js","./node_modules/rxjs/_esm5/internal/observable/fromArray.js","./node_modules/rxjs/_esm5/internal/scheduled/scheduleArray.js","./node_modules/rxjs/_esm5/internal/SubjectSubscription.js","./node_modules/rxjs/_esm5/internal/Subject.js","./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js","./node_modules/rxjs/_esm5/internal/OuterSubscriber.js","./node_modules/rxjs/_esm5/internal/util/isObject.js","./node_modules/rxjs/_esm5/internal/operators/concatMap.js","./node_modules/rxjs/_esm5/internal/observable/forkJoin.js","./node_modules/@angular/forms/__ivy_ngcc__/fesm5/forms.js","./node_modules/rxjs/_esm5/internal/operators/refCount.js","./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js","./node_modules/rxjs/_esm5/internal/operators/share.js","./node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js","./node_modules/rxjs/_esm5/internal/observable/merge.js","./node_modules/rxjs/_esm5/internal/operators/multicast.js","./node_modules/@angular/common/__ivy_ngcc__/fesm5/common.js","./node_modules/rxjs/_esm5/internal/operators/filter.js","./node_modules/rxjs/_esm5/internal/operators/mergeAll.js","./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js","./node_modules/canvas-confetti/dist/confetti.module.mjs","./node_modules/@angular/common/__ivy_ngcc__/fesm5/http.js","./node_modules/rxjs/_esm5/internal/config.js","./node_modules/rxjs/_esm5/internal/util/isArray.js","./node_modules/rxjs/_esm5/internal/util/identity.js","./node_modules/tslib/tslib.es6.js","./node_modules/rxjs/_esm5/internal/util/isScheduler.js","./node_modules/js-cookie/src/js.cookie.js","./node_modules/rxjs/_esm5/internal/operators/mergeMap.js","./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js","./node_modules/rxjs/_esm5/internal/Subscription.js","./node_modules/rxjs/_esm5/internal/InnerSubscriber.js","./node_modules/rxjs/_esm5/internal/operators/take.js","./node_modules/rxjs/_esm5/internal/util/noop.js","./node_modules/rxjs/_esm5/internal/operators/tap.js","./node_modules/rxjs/_esm5/internal/symbol/observable.js","./node_modules/rxjs/_esm5/internal/util/pipe.js","./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js"],"names":["subscribeToArray","array","subscriber","i","len","length","closed","next","complete","isPromise","value","subscribe","then","from","input","scheduler","isInteropObservable","Observable","sub","Subscription","add","schedule","observable","error","err","scheduleObservable","schedulePromise","isArrayLike","scheduleArray","isIterable","Error","iterator","return","done","result","this","scheduleIterable","TypeError","scheduled","subscribeTo","BehaviorSubject","_super","_value","_this","call","Object","defineProperty","prototype","get","getValue","enumerable","configurable","_subscribe","subscription","hasError","thrownError","isFunction","x","AnimationBuilder","AnimationFactory","AUTO_STYLE","trigger","name","definitions","type","options","animate","timings","styles","sequence","steps","style","tokens","offset","state","transition","stateChangeExpr","expr","animation","scheduleMicroTask","cb","Promise","resolve","NoopAnimationPlayer","duration","delay","_onDoneFns","_onStartFns","_onDestroyFns","_started","_destroyed","_finished","parentPlayer","totalTime","_onFinish","forEach","fn","onStart","push","onDone","onDestroy","hasStarted","init","play","_onStart","triggerMicrotask","pause","restart","finish","destroy","reset","setPosition","position","getPosition","triggerCallback","phaseName","methods","AnimationGroupPlayer","_players","players","doneCount","destroyCount","startCount","total","player","_onDestroy","reduce","time","Math","max","p","timeAtPosition","min","beforeDestroy","ɵPRE_STYLE","finalize","callback","source","lift","FinallyOperator","FinallySubscriber","destination","map","project","thisArg","MapOperator","MapSubscriber","count","_next","empty","useDeprecatedSynchronousErrorHandling","_isScalar","operator","observerOrNext","sink","nextOrObserver","Subscriber","rxSubscriber","toSubscriber","config","syncErrorThrowable","_trySubscribe","syncErrorThrown","syncErrorValue","observer","isStopped","canReportError","console","warn","promiseCtor","getPromiseCtor","reject","unsubscribe","pipe","operations","_i","arguments","toPromise","create","ObjectUnsubscribedError","ObjectUnsubscribedErrorImpl","message","catchError","selector","CatchOperator","caught","CatchSubscriber","err2","_unsubscribeAndRecycle","innerSubscriber","undefined","innerSubscription","hostReportError","setTimeout","EmptyError","EmptyErrorImpl","NONE","combineLatest","observables","resultSelector","isScheduler","pop","isArray","fromArray","CombineLatestOperator","CombineLatestSubscriber","active","values","_complete","toRespond","subscribeToResult","notifyComplete","unused","notifyNext","outerValue","innerValue","outerIndex","innerIndex","innerSub","_tryResultSelector","slice","apply","OuterSubscriber","defer","observableFactory","concatAll","mergeAll","takeLast","TakeLastOperator","ArgumentOutOfRangeError","TakeLastSubscriber","ring","Array","idx","throwIfEmpty","errorFactory","defaultErrorFactory","ThrowIfEmptyOperator","ThrowIfEmptySubscriber","hasValue","e","defaultIfEmpty","defaultValue","DefaultIfEmptyOperator","DefaultIfEmptySubscriber","isEmpty","last","predicate","hasDefaultValue","filter","v","identity","first","take","EveryOperator","EverySubscriber","index","everyValueMatch","switchMap","a","b","ii","SwitchMapOperator","SwitchMapSubscriber","_innerSub","InnerSubscriber","_unsubscribe","remove","concat","of","scan","accumulator","seed","hasSeed","ScanOperator","ScanSubscriber","_seed","set","_tryNext","RouterEvent","id","url","NavigationStart","navigationTrigger","restoredState","toString","NavigationEnd","urlAfterRedirects","NavigationCancel","reason","NavigationError","RoutesRecognized","GuardsCheckStart","GuardsCheckEnd","shouldActivate","ResolveStart","ResolveEnd","RouteConfigLoadStart","route","path","RouteConfigLoadEnd","ChildActivationStart","snapshot","routeConfig","ChildActivationEnd","ActivationStart","ActivationEnd","Scroll","routerEvent","anchor","ɵEmptyOutletComponent","ɵfac","t","ɵcmp","selectors","decls","vars","template","rf","ctx","directives","encapsulation","ParamsAsMap","params","has","hasOwnProperty","getAll","keys","convertToParamMap","navigationCancelingError","defaultUrlMatcher","segments","segmentGroup","parts","split","pathMatch","hasChildren","posParams","part","segment","startsWith","substring","consumed","LoadedRouterConfig","routes","module","validateConfig","parentPath","validateNode","getFullPath","fullPath","component","children","loadChildren","outlet","redirectTo","matcher","charAt","currentRoute","standardizeConfig","r","c","shallowEqual","key","k1","k2","equalArraysOrString","every","aItem","indexOf","flatten","arr","prop","wrapIntoObservable","containsTree","container","containee","exact","equalQueryParams","queryParams","equalSegmentGroups","equalPath","numberOfChildren","root","containsQueryParams","containsSegmentGroup","containsSegmentGroupHelper","containeePaths","current","UrlTree","fragment","_queryParamMap","DEFAULT_SERIALIZER","serialize","UrlSegmentGroup","parent","k","serializePaths","UrlSegment","parameters","_parameterMap","serializePath","as","bs","mapChildrenIntoArray","res","child","childOutlet","UrlSerializer","DefaultUrlSerializer","parse","UrlParser","parseRootSegment","parseQueryParams","parseFragment","tree","strParams","serializeSegment","primary","children_1","join","encodeUriQuery","encodeURI","encodeUriString","s","encodeURIComponent","replace","encodeUriSegment","decode","decodeURIComponent","decodeQuery","SEGMENT_RE","matchSegments","str","match","QUERY_PARAM_RE","QUERY_PARAM_VALUE_RE","remaining","consumeOptional","peekStartsWith","parseChildren","parseQueryParam","parseSegment","capture","parseParens","parseMatrixParams","parseParam","valueMatch","matchQueryParams","matchUrlQueryParamValue","decodedKey","decodedVal","currentVal","allowPrimary","outletName","substr","Tree","_root","pathFromRoot","n","findNode","firstChild","siblings","findPath","cc","node","e_1","_a","_b","_c","node_1","e_1_1","e_2","unshift","e_2_1","TreeNode","nodeChildrenAsMap","RouterState","setRouterState","createEmptyState","urlTree","rootComponent","activated","ActivatedRouteSnapshot","createEmptyStateSnapshot","emptyUrl","emptyParams","emptyData","emptyQueryParams","ActivatedRoute","data","futureSnapshot","_futureSnapshot","_routerState","_paramMap","inheritedParamsDataResolve","paramsInheritanceStrategy","inheritingStartingFrom","parent_1","curr","_resolvedData","flattenInherited","urlSegment","lastPathIndex","_urlSegment","_lastPathIndex","_resolve","RouterStateSnapshot","serializeNode","advanceActivatedRoute","currentSnapshot","nextSnapshot","shallowEqualArrays","equalParamsAndUrlSegments","isMatrixParams","command","outlets","segmentPath","oldSegmentGroup","newSegmentGroup","qp","replaceSegment","oldSegment","newSegment","Navigation","isAbsolute","numberOfDoubleDots","commands","cmdWithOutlet","find","toRoot","Position","processChildren","getPath","updateSegmentGroup","startIndex","updateSegmentGroupChildren","m","currentCommandIndex","currentPathIndex","noMatch","pathIndex","commandIndex","compare","prefixedWith","slicedCommands","g","createNewSegmentGroup","outlets_2","getOutlets","paths","createNewSegmentChildren","stringify","ActivateRoutes","routeReuseStrategy","futureState","currState","forwardEvent","activate","parentContexts","futureRoot","currRoot","deactivateChildRoutes","activateChildRoutes","futureNode","currNode","contexts","futureChild","childOutletName","deactivateRoutes","childName","deactivateRouteAndItsChildren","parentContext","future","context","getContext","shouldDetach","detachAndStoreRouteSubtree","deactivateRouteAndOutlet","componentRef","detach","onOutletDeactivated","store","contexts_1","deactivate","activateRoutes","getOrCreateContext","shouldAttach","stored","retrieve","onOutletReAttached","attachRef","attach","advanceActivatedRouteNodeAndItsChildren","_loadedConfig","parentLoadedConfig","cmpFactoryResolver","componentFactoryResolver","resolver","activateWith","isUrlTree","NoMatch","AbsoluteRedirect","obs","absoluteRedirect","newTree","namedOutletsRedirect","ApplyRedirects","moduleInjector","configLoader","urlSerializer","allowRedirects","ngModule","expandSegmentGroup","rootSegmentGroup","createUrlTree","noMatchError","rootCandidate","expandChildren","expandSegment","obj","waitHead","waitTail","mapped","waitForMap","expandSegmentAgainstRoute","_","noLeftoversInUrl","getOutlet","matchSegmentAgainstRoute","expandSegmentAgainstRouteUsingRedirect","expandWildCardWithParamsAgainstRouteUsingRedirect","expandRegularSegmentAgainstRouteUsingRedirect","applyRedirectCommands","lineralizeSegments","mergeMap","newSegments","group","consumedSegments","lastChild","positionalParamSegments","matched","rawSegmentGroup","load","injector","cfg","rawSlicedSegments","getChildConfig","routerConfig","childModule","childConfig","slicedSegments","some","isEmptyPathRedirect","containsEmptyPathRedirectsWithNamedOutlets","mergeTrivialChildren","primarySegmentGroup","e_3","routes_2","routes_2_1","e_3_1","createChildrenForEmptySegments","containsEmptyPathRedirects","routes_1","routes_1_1","addEmptySegmentsToChildrenIfNeeded","cs","canLoad","injectionToken","guardVal","guard","isCanLoad","runCanLoadGuard","shouldLoad","canLoadFails","applyRedirectCreatreUrlTree","newRoot","createSegmentGroup","createQueryParams","redirectToParams","actualParams","sourceName","updatedSegments","createSegments","redirectToSegments","actualSegments","findPosParam","findOrReturn","redirectToUrlSegment","pos","actualSegments_1","actualSegments_1_1","splice","CanActivate","CanDeactivate","getToken","token","getClosestLoadedConfig","getChildRouteGuards","futurePath","checks","canDeactivateChecks","canActivateChecks","prevChildren","shouldRun","mode","shouldRunGuardsAndResolvers","runGuardsAndResolvers","getRouteGuards","isActivated","INITIAL_VALUE","Symbol","prioritizedGuardValue","o","startWith","acc","list","isPending","innerAcc","val","item","fireActivationStart","fireChildActivationStart","runCanActivate","futureRSS","futureARS","canActivate","canActivateObservables","isCanActivate","runCanActivateChild","canActivateChildGuardsMapped","reverse","canActivateChild","guards","getCanActivateChild","d","guardsMapped","isCanActivateChild","NoMatch$1","Recognizer","rootComponentType","relativeLinkResolution","recognize","split$1","processSegmentGroup","freeze","rootNode","routeState","inheritParamsAndData","routeNode","processSegment","names","routeWithSameOutletName","nodes","sort","localeCompare","sortActivatedRouteSnapshots","config_1","config_1_1","processSegmentAgainstRoute","rawSegment","getData","getSourceSegmentGroup","getPathIndexShift","getResolve","match$1","_sourceSegment","_segmentIndexShift","emptyPathMatch","getOutlet$1","containsEmptyPathMatchesWithNamedOutlets","s_1","primarySegment","createChildrenForEmptyPaths","containsEmptyPathMatches","s_2","addEmptyPathsToChildrenIfNeeded","getResolver","switchTap","nextResult","RouteReuseStrategy","DefaultRouteReuseStrategy","detachedTree","shouldReuseRoute","ROUTES","RouterConfigLoader","loader","compiler","onLoadStartListener","onLoadEndListener","parentInjector","loadModuleFactory","factory","compileModuleAsync","UrlHandlingStrategy","DefaultUrlHandlingStrategy","shouldProcessUrl","extract","merge","newUrlPart","wholeUrl","defaultErrorHandler","defaultMalformedUriErrorHandler","defaultRouterHook","runExtras","Router","rootContexts","location","lastSuccessfulNavigation","currentNavigation","navigationId","isNgZoneEnabled","events","Subject","errorHandler","malformedUriErrorHandler","navigated","lastSuccessfulId","hooks","beforePreactivation","afterPreactivation","urlHandlingStrategy","onSameUrlNavigation","urlUpdateStrategy","ngZone","resetConfig","currentUrlTree","rawUrlTree","browserUrlTree","triggerEvent","routerState","transitions","currentRawUrl","extractedUrl","rawUrl","extras","promise","targetSnapshot","currentRouterState","targetRouterState","guardsResult","navigations","setupNavigations","processNavigations","eventsSubject","completed","errored","tap","initialUrl","previousNavigation","urlTransition","serializeUrl","applyRedirects","finalUrl","serializer","recognize$1","skipLocationChange","setBrowserUrl","replaceUrl","routesRecognized","navStart","appliedUrlTree","guardsStart","currRSS","check","currARS","canDeactivate","canDeactivateObservables","isCanDeactivate","runCanDeactivate","runCanDeactivateChecks","concatMap","runCanActivateChecks","checkGuards","evt","guardsEnd","resetUrlToCurrentUrlTree","navCancel","resolveStart","key_1","resolveNode","resolvedData","runResolve","__","resolveEnd","prevState","createNode","createOrReuseChildren","detachedRouteHandle","setFutureSnapshotsOfActivatedRoutes","redirecting","resetStateAndUrl","mergedTree","scheduleNavigation","navError","ee","resetRootComponentType","getTransition","setTransition","initialNavigation","setUpLocationChangeListener","navigateByUrl","locationSubscription","change","parseUrl","getCurrentNavigation","event","ngOnDestroy","dispose","navigationExtras","relativeTo","preserveQueryParams","queryParamsHandling","preserveFragment","f","q","removeEmptyProps","nav","cmd","cmdIdx","outlets_1","urlPart","partIndex","computeNavigation","startingPosition","modifier","ci","dd","createPositionApplyingDoubleDots","findStartingPosition","isInAngularZone","navigate","validateCommands","isActive","priorPromise","lastNavigation","rej","catch","isCurrentPathEqualTo","replaceState","go","storedState","storedUrl","ɵdir","OutletContext","ChildrenOutletContexts","Map","onChildOutletCreated","onChildOutletDestroyed","RouterOutlet","changeDetector","_activatedRoute","activateEvents","deactivateEvents","ngOnInit","instance","cmp","ref","activatedRoute","insert","hostView","emit","resolveComponentFactory","childContexts","OutletInjector","createComponent","markForCheck","outputs","exportAs","notFoundValue","PreloadingStrategy","PreloadAllModules","preload","NoPreloading","RouterPreloader","router","moduleLoader","preloadingStrategy","setUpPreloading","processRoutes","preloadConfig","ɵprov","RouterScroller","viewportScroller","lastId","lastSource","restoredId","scrollPositionRestoration","anchorScrolling","setHistoryScrollRestoration","routerEventsSubscription","createScrollEvents","scrollEventsSubscription","consumeScrollEvents","getScrollPosition","scheduleScrollEvent","scrollToPosition","scrollToAnchor","ROUTER_CONFIGURATION","ROUTER_FORROOT_GUARD","ROUTER_PROVIDERS","provide","useClass","useFactory","opts","enableTracing","dom_1","logGroup","constructor","log","logGroupEnd","deps","useValue","routerNgProbeToken","RouterModule","RouterModule_1","forRoot","providers","provideRoutes","provideForRootGuard","provideLocationStrategy","createRouterScroller","useExisting","multi","getAppInitializer","ROUTER_INITIALIZER","getBootstrapListener","forChild","ɵmod","ɵinj","scrollOffset","setOffset","platformLocationStrategy","baseHref","useHash","RouterInitializer","initNavigation","resultOfPreactivationDone","appInitializer","isLegacyDisabled","isLegacyEnabled","bootstrapListener","bootstrappedComponentRef","preloader","routerScroller","components","componentTypes","bind","urlParsingNode","BrowserDomAdapter","makeCurrent","getProperty","el","window","groupEnd","onAndCancel","listener","addEventListener","removeEventListener","dispatchEvent","parentNode","removeChild","createElement","tagName","doc","getDefaultDocument","createHtmlDocument","document","implementation","createHTMLDocument","isElementNode","nodeType","Node","ELEMENT_NODE","isShadowRoot","DocumentFragment","getGlobalEventTarget","target","body","getHistory","history","getLocation","getBaseHref","href","baseElement","querySelector","getAttribute","setAttribute","pathname","resetBaseElement","getUserAgent","navigator","userAgent","performanceNow","performance","now","Date","getTime","supportsCookies","getCookie","cookie","GenericBrowserDomAdapter","supportsDOMEvents","TRANSITION_ID","SERVER_TRANSITION_PROVIDERS","transitionId","donePromise","dom","querySelectorAll","BrowserGetTestability","addToWindow","registry","elem","findInAncestors","testability","findTestabilityInTree","getAllTestabilities","getAllRootElements","testabilities","didWork","decrement","didWork_","whenStable","getTestability","host","parentElement","EVENT_MANAGER_PLUGINS","EventManager","plugins","_zone","_eventNameToPlugin","manager","_plugins","element","eventName","handler","_findPluginFor","addGlobalEventListener","getZone","plugin","plugin_1","supports","EventManagerPlugin","_doc","SharedStylesHost","_stylesSet","Set","addStyles","additions","onStylesAdded","getAllStyles","DomSharedStylesHost","_hostNodes","_styleNodes","head","_addStylesToHost","styleEl","textContent","appendChild","addHost","hostNode","removeHost","delete","styleNode","NAMESPACE_URIS","COMPONENT_REGEX","flattenStyles","compId","decoratePreventDefault","eventHandler","preventDefault","returnValue","DomRendererFactory2","eventManager","sharedStylesHost","appId","rendererByCompId","defaultRenderer","DefaultDomRenderer2","createRenderer","Emulated","renderer","EmulatedEncapsulationDomRenderer2","applyToHost","Native","ShadowDom","ShadowDomRenderer","begin","end","namespace","createElementNS","createComment","createText","createTextNode","newChild","insertBefore","refChild","oldChild","selectRootElement","selectorOrNode","preserveContent","nextSibling","namespaceUri","setAttributeNS","removeAttribute","removeAttributeNS","addClass","classList","removeClass","setStyle","flags","DashCase","setProperty","Important","removeStyle","removeProperty","setValue","nodeValue","listen","contentAttr","hostAttr","componentShortId","shimHostAttribute","hostEl","shadowRoot","attachShadow","createShadowRoot","nodeOrShadowRoot","DomEventsPlugin","MODIFIER_KEYS","_keyMap","_chromeNumKeyPadMap","MODIFIER_KEY_GETTERS","altKey","ctrlKey","metaKey","shiftKey","KeyEventsPlugin","KeyEventsPlugin_1","parseEventName","parsedEvent","outsideHandler","eventCallback","runOutsideAngular","toLowerCase","domEventName","shift","_normalizeKey","fullKey","modifierName","getEventFullKey","keyIdentifier","String","fromCharCode","parseInt","getEventKey","modifierGetter","zone","runGuarded","keyName","DomSanitizer","DomSanitizerImpl","providedIn","domSanitizerImplFactory","sanitize","HTML","STYLE","SCRIPT","URL","RESOURCE_URL","bypassSecurityTrustHtml","bypassSecurityTrustStyle","bypassSecurityTrustScript","bypassSecurityTrustUrl","bypassSecurityTrustResourceUrl","INTERNAL_BROWSER_PLATFORM_PROVIDERS","platformBrowser","BROWSER_MODULE_PROVIDERS","BrowserModule","parentModule","BrowserModule_1","withServerTransition","imports","createMeta","Meta","_dom","addTag","tag","forceCreation","_getOrCreateElement","addTags","tags","getTag","attrSelector","getTags","updateTag","_parseSelector","meta","_setMetaElementAttributes","removeTag","removeTagElement","_containsAttributes","getElementsByTagName","attr","createTitle","Title","getTitle","title","setTitle","newTitle","isNode","process","optimizeGroupPlayer","normalizeKeyframes","driver","normalizer","keyframes","preStyles","postStyles","errors","normalizedKeyframes","previousOffset","previousKeyframe","kf","isSameOffset","normalizedKeyframe","normalizedProp","normalizedValue","normalizePropertyName","normalizeStyleValue","listenOnPlayer","copyAnimationEvent","makeAnimationEvent","triggerName","fromState","toState","disabled","getOrSetAsInMap","parseTimelineCommand","separatorPos","_contains","elm1","elm2","_matches","_query","_isNode","Element","contains","matches","proto","fn_1","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","results","elm","_CACHED_BODY","_IS_WEBKIT","validateStyleProperty","containsVendorPrefix","toUpperCase","matchesElement","containsElement","invokeQuery","hypenatePropsObject","object","newObj","newProp","NoopAnimationDriver","query","computeStyle","easing","previousPlayers","scrubberAccessRequested","AnimationDriver","NOOP","resolveTimingValue","_convertTimeValueToMS","parseFloat","unit","resolveTiming","allowNegativeValues","exp","delayMatch","easingVal","containsErrors","parseTimeExpression","copyObj","copyStyles","readPrototype","getStyleAttributeString","writeStyleAttribute","styleAttrValue","getPropertyValue","setStyles","formerStyles","camelProp","dashCaseToCamelCase","eraseStyles","normalizeAnimationEntry","PARAM_REGEX","RegExp","SUBSTITUTION_EXPR_START","extractStyleParams","exec","lastIndex","interpolateParams","original","varName","localVal","iteratorToArray","DASH_CASE_REGEXP","allowPreviousPlayerStylesMerge","balancePreviousStylesIntoKeyframes","previousStyles","previousStyleProps","startingKeyframe_1","missingStyleProps_1","_loop_1","visitDslNode","visitor","visitTrigger","visitState","visitTransition","visitSequence","visitGroup","visitAnimate","visitKeyframes","visitStyle","visitReference","visitAnimateChild","visitAnimateRef","visitQuery","visitStagger","getComputedStyle","TRUE_BOOLEAN_VALUES","FALSE_BOOLEAN_VALUES","makeLambdaFromStates","lhs","rhs","LHS_MATCH_BOOLEAN","RHS_MATCH_BOOLEAN","lhsMatch","rhsMatch","SELF_TOKEN_REGEX","buildAnimationAst","metadata","build","AnimationAstBuilderVisitor","_driver","AnimationAstBuilderContext","_resetContextStyleTimingState","currentQuerySelector","collectedStyles","currentTime","queryCount","depCount","states","def","stateDef_1","name_1","styleAst","astParams","containsDynamicStyles","missingSubs_1","params_1","isObject","stylesObj_1","size","missingSubsArr","transitionValue","expressions","matchers","eventStr","alias","parseAnimationAlias","separator","parseInnerTransitionStr","normalizeAnimationOptions","furthestTime","step","innerAst","timingAst","makeTimingAst","strValue","ast","dynamic","constructTimingAst","currentAnimateTimings","styleMetadata","styleMetadata_1","newStyleData","_styleAst","isEmptyStep","_makeStyleAst","_validateStyleAst","styleTuple","collectedEasing","styleData","styleMap","endTime","startTime","tuple","collectedEntry","updateCollectedStyle","totalKeyframesWithOffsets","offsets","offsetsOutOfOrder","keyframesOutOfRange","offsetVal","consumeOffset","generatedOffset","limit","animateDuration","durationUpToThisFrame","parentSelector","currentQuery","hasAmpersand","NG_TRIGGER_SELECTOR","normalizeSelector","includeSelf","optional","originalSelector","currentTransition","createTimelineInstruction","preStyleProps","postStyleProps","subTimeline","ElementInstructionMap","_map","consume","instructions","append","existingInstructions","clear","ENTER_TOKEN_REGEX","LEAVE_TOKEN_REGEX","buildAnimationTimelines","rootElement","enterClassName","leaveClassName","startingStyles","finalStyles","subInstructions","AnimationTimelineBuilderVisitor","buildKeyframes","currentTimeline","timelines","timeline","containsAnimation","tl","allowOnlyTimelineStyles","elementInstructions","innerContext","createSubContext","_visitSubInstructions","transformIntoNewTimeline","previousNode","instruction","instructionTimings","appendInstructionToTimeline","updateOptions","subContextCount","snapshotCurrentStyles","DEFAULT_NOOP_PREVIOUS_NODE","delayNextStep","applyStylesToKeyframe","innerTimelines","mergeTimelineCollectedStyles","_visitTiming","incrementTime","getCurrentStyleProperties","forwardFrame","applyEmptyStep","innerTimeline","forwardTime","elms","currentQueryTotal","sameElementTimeline","currentQueryIndex","abs","maxTime","currentStaggerTime","startingTime","AnimationTimelineContext","_enterClassName","_leaveClassName","initialTimeline","skipIfExists","newOptions","optionsToUpdate","newParams","paramsToUpdate_1","_copyOptions","oldParams_1","newTime","fork","updatedTimings","builder","stretchStartingKeyframe","elements","TimelineBuilder","_elementTimelineStylesLookup","_previousKeyframe","_currentKeyframe","_keyframes","_styleSummary","_pendingStyles","_backFill","_currentEmptyStepKeyframe","_localTimelineStyles","_globalTimelineStyles","_loadKeyframe","hasPreStyleStep","_updateStyle","allStyles","allProperties","props","getFinalKeyframe","properties","details0","details1","finalKeyframes","keyframe","finalKeyframe","preProps","postProps","kf0","kf1","SubTimelineBuilder","_stretchStartingKeyframe","newKeyframes","startingGap","newFirstKeyframe","oldFirstKeyframe","roundOffset","decimalPoints","mult","pow","round","AnimationStyleNormalizer","WebAnimationsStyleNormalizer","propertyName","userProvidedProperty","normalizedProperty","strVal","trim","DIMENSIONAL_PROP_MAP","valAndSuffixMatch","createTransitionInstruction","isRemovalTransition","fromStyles","toStyles","queriedElements","EMPTY_OBJECT","AnimationTransitionFactory","_triggerName","_stateStyles","currentState","nextState","matchFns","oneOrMoreTransitionsMatch","buildStyles","stateName","backupStateStyler","stateStyler","backupStyles","currentOptions","nextOptions","skipAstBuild","transitionAnimationParams","currentStateStyles","nextAnimationParams","nextStateStyles","preStyleMap","postStyleMap","isRemoval","animationOptions","queriedElementsList","AnimationStateStyles","defaultParams","combinedParams","styleObj_1","AnimationTrigger","transitionFactories","balanceProperties","fallbackTransition","matchTransition","matchStyles","key1","key2","EMPTY_INSTRUCTION_MAP","TimelineAnimationEngine","bodyNode","_normalizer","_animations","_playersById","register","_buildPlayer","autoStylesMap","inst","_getPlayer","baseEvent","args","EMPTY_PLAYER_ARRAY","NULL_REMOVAL_STATE","namespaceId","setForRemoval","setForMove","hasAnimation","removedBeforeQueried","NULL_REMOVED_QUERIED_STATE","StateValue","isObj","absorbOptions","DEFAULT_STATE_VALUE","AnimationTransitionNamespace","hostElement","_engine","_triggers","_queue","_elementListeners","_hostClassName","phase","listeners","triggersWithStates","statesByElement","NG_TRIGGER_CLASSNAME","afterFlush","_getTrigger","defaultToFallback","playersOnElement","playersByElement","queued","isFallbackTransition","totalQueuedPlayers","index_1","objEquals","fromStyles_1","toStyles_1","reportError","deregister","stateMap","entry","clearElementCache","elementPlayers","_signalRemovalForInnerTriggers","namespaces","fetchNamespacesByElement","ns","triggerLeaveAnimation","afterFlushAnimationsDone","destroyAfterComplete","triggerStates","players_1","markElementAsRemoved","processLeaveNode","prepareLeaveAnimationListeners","visitedTriggers_1","removeNode","engine","childElementCount","containsPotentialParentTransition","totalAnimations","currentPlayers","playersByQueriedElement","removalFlag","destroyInnerAnimations","_onRemovalComplete","insertNode","drainQueuedTransitions","microtaskId","destroyed","markedForDestroy","d0","d1","elementContainsData","containsData","TransitionAnimationEngine","newHostElements","disabledNodes","_namespaceLookup","_namespaceList","_flushFns","_whenQuietFns","namespacesByHostElement","collectedEnterElements","collectedLeaveElements","onRemovalComplete","createNamespace","_balanceNamespaceList","collectEnterElement","found","registerTrigger","_fetchNamespace","elementStates","nsId","details","markElementAsDisabled","isHostElement","hostNS","_buildInstruction","subTimelines","skipBuildAst","containerElement","destroyActiveAnimationsForElement","finishActiveQueriedAnimationOnElement","whenRenderingDone","flush","cleanupFns","_flushAnimations","quietFns_1","skippedPlayers","skippedPlayersMap","queuedInstructions","allPreStyleElements","allPostStyleElements","disabledElementsSet","nodesThatAreDisabled","i_1","allTriggerElements","enterNodeMap","buildRootMap","enterNodeMapIds","className","allLeaveNodes","mergedLeaveNodes","leaveNodesWithoutAnimations","i_2","leaveNodeMapIds","leaveNodeMap","allPlayers","erroneousTransitions","i_3","nodeIsOrphaned","stringMap","setVal_1","setVal","errors_1","allPreviousPlayersMap","animationElementMap","_beforeAnimationBuild","_getPreviousPlayers","prevPlayer","replaceNodes","replacePostStylesAsPre","postStylesMap","cloakAndComputeStyles","preStylesMap","post","pre","rootPlayers","subPlayers","NO_PARENT_ANIMATION_ELEMENT_DETECTED","overrideTotalTime","parentWithAnimation_1","parentsToAdd","detectedParent","innerPlayer","_buildAnimation","setRealPlayer","parentPlayers","playersForElement","syncPlayerEvents","i_4","queriedPlayerResults","queriedInnerElements","j","queriedPlayers","activePlayers","removeNodesAfterAnimationDone","isQueriedElement","toStateValue","queriedElementPlayers","isRemovalAnimation_1","targetNameSpaceId","targetTriggerName","timelineInstruction","this_1","realPlayer","getRealPlayer","allQueriedPlayers","allConsumedElements","allSubElements","allNewPlayers","finalPlayers","_flattenGroupPlayersRecur","wrappedPlayer","currentValues","deleteOrUnsetInMap","TransitionAnimationPlayer","_player","_containsRealPlayer","_queuedCallbacks","_queueEvent","cloakElement","oldValue","display","valuesMap","elementPropsMap","defaultStyle","cloakVals","failedElements","roots","rootMap","nodeSet","localRootMap","getRoot","classes","postEntry","preEntry","AnimationEngine","_triggerCache","_transitionEngine","_timelineEngine","componentId","cacheKey","buildTrigger","onInsert","onRemove","disableAnimations","disable","property","eventPhase","packageNonAnimatableStyles","startStyles","endStyles","filterNonAnimatableStyles","SpecialCasedStyles","_element","_startStyles","_endStyles","_state","initialStyles","initialStylesByElement","_initialStyles","start","WeakMap","isNonAnimatableStyle","ElementAnimationStyleHandler","_name","_duration","_delay","_easing","_fillMode","_onDoneFn","_startTime","_position","_eventFn","_handleCallback","anim","getAnimationStyle","char","countChars","setAnimationStyle","addRemoveAnimationEvent","playPauseAnimation","resume","findIndexForAnimation","timestamp","_ngTestManualTimestamp","elapsedTime","toFixed","animationName","findMatchingTokenIndex","status","searchToken","doRemove","CssKeyframesPlayer","_finalStyles","_specialStyles","_buildStyler","_styler","_flushStartFns","_flushDoneFns","finished_1","DirectStylePlayer","_startingStyles","__initialized","_styles","CssKeyframesDriver","_count","_head","_warningIssued","buildKeyframeElement","keyframeStr","tab","kfElm","innerHTML","_notifyFaultyScrubber","previousCssKeyframePlayers","flatKeyframes","flattenKeyframesIntoStyles","specialStyles","WebAnimationsPlayer","_initialized","_preparePlayerBeforeStart","domPlayer","_triggerWebAnimation","_finalKeyframe","_resetDomPlayerState","cancel","WebAnimationsDriver","_isNativeImpl","test","getElementAnimateFn","_cssKeyframesDriver","overrideWebAnimationsSupport","supported","playerOptions","fill","previousWebAnimationPlayers","BrowserAnimationBuilder","rootRenderer","_nextAnimationId","_renderer","None","issueAnimationCommand","BrowserAnimationFactory","_id","RendererAnimationPlayer","_command","_listen","AnimationRendererFactory","delegate","_currentId","_microtaskId","_animationCallbacksBuffer","_rendererCache","_cdRecurDepth","BaseAnimationRenderer","_scheduleCountTask","scheduleListenerCallback","run","destroyNode","AnimationRenderer","dotIndex","resolveElementFromTarget","InjectableAnimationEngine","ANIMATION_MODULE_TYPE","SHARED_ANIMATION_PROVIDERS","BROWSER_ANIMATIONS_PROVIDERS","BrowserAnimationsModule","getSymbolIterator","destinationOrNext","SafeSubscriber","_error","_parentOrParents","_parentSubscriber","_context","__tryOrSetError","__tryOrUnsub","wrappedComplete","iterable","EMPTY","emptyScheduled","SubjectSubscription","subject","observers","subscriberIndex","SubjectSubscriber","copy","asObservable","AnonymousSubject","random","notifyError","forkJoinInternal","sources","emitted","NG_VALUE_ACCESSOR","CHECKBOX_VALUE_ACCESSOR","CheckboxControlValueAccessor","_elementRef","onChange","onTouched","writeValue","nativeElement","registerOnChange","registerOnTouched","setDisabledState","isDisabled","hostBindings","$event","checked","features","DEFAULT_VALUE_ACCESSOR","COMPOSITION_BUFFER_MODE","DefaultValueAccessor","_compositionMode","_composing","_handleInput","_compositionStart","_compositionEnd","unimplemented","NgControl","_parent","valueAccessor","_rawValidators","_rawAsyncValidators","AbstractControlDirective","control","valid","invalid","pending","enabled","pristine","dirty","touched","untouched","statusChanges","valueChanges","errorCode","getError","NgControlStatus","cd","hostVars","ngClassUntouched","ngClassTouched","ngClassPristine","ngClassDirty","ngClassValid","ngClassInvalid","ngClassPending","AbstractControlStatus","_cd","isEmptyInputValue","NG_VALIDATORS","NG_ASYNC_VALIDATORS","EMAIL_REGEXP","Validators","isNaN","required","requiredTrue","email","minLength","maxLength","pattern","regexStr","regex","nullValidator","compose","validators","presentValidators","isPresent","_mergeErrors","_executeValidators","composeAsync","first_1","getPrototypeOf","resultSelector_1","forkJoin","_executeAsyncValidators","toObservable","arrayOfErrors","normalizeValidator","validator","validate","normalizeAsyncValidator","NUMBER_VALUE_ACCESSOR","NumberValueAccessor","RADIO_VALUE_ACCESSOR","RadioControlRegistry","_accessors","accessor","select","_isSameGroup","fireUncheck","controlPair","_control","RadioControlValueAccessor","_registry","_injector","_checkName","_fn","formControlName","_throwNameError","inputs","RANGE_VALUE_ACCESSOR","RangeValueAccessor","FormErrorExamples","ReactiveErrors","controlParentException","ngModelGroupException","missingFormException","groupParentException","arrayParentException","disabledAttrWarning","ngModelWarning","directiveName","SELECT_VALUE_ACCESSOR","SelectControlValueAccessor","_optionMap","_idCounter","_compareWith","JSON","_getOptionId","valueString","_buildValueString","_getOptionValue","_registerOption","_extractId","compareWith","SELECT_MULTIPLE_VALUE_ACCESSOR","SelectMultipleControlValueAccessor","optionSelectedStateSetter","ids_1","opt","_setSelected","selected","selectedOptions","_extractId$1","updateControl","dir","_pendingDirty","markAsDirty","_pendingValue","emitModelToViewChange","viewToModelUpdate","_pendingChange","_throwError","messageEnd","composeValidators","composeAsyncValidators","BUILTIN_ACCESSORS","coerceToValidator","validatorOrOpts","isOptionsObj","coerceToAsyncValidator","asyncValidator","origAsyncValidator","asyncValidators","AbstractControl","_onCollectionChange","_onDisabledChange","_updateOn","updateOn","setValidators","newValidator","setAsyncValidators","clearValidators","clearAsyncValidators","markAsTouched","onlySelf","markAllAsTouched","_forEachChild","markAsUntouched","_pendingTouched","_updateTouched","markAsPristine","_updatePristine","markAsPending","emitEvent","skipPristineCheck","_parentMarkedDirty","_updateValue","_updateAncestors","changeFn","enable","updateValueAndValidity","setParent","_setInitialStatus","_cancelExistingSubscription","_runValidator","_calculateStatus","_runAsyncValidator","_updateTreeValidity","ctrl","_allControlsDisabled","_asyncValidationSubscription","setErrors","_updateControlsErrors","delimiter","controlToFind","controls","at","_find","_initObservables","_anyControlsHaveStatus","_anyControls","_anyControlsDirty","_anyControlsTouched","_isBoxedValue","formState","_registerOnCollectionChange","_setUpdateStrategy","FormControl","_onChange","_applyFormState","emitViewToModelChange","patchValue","condition","_clearChangeFns","registerOnDisabledChange","_syncPendingControls","FormGroup","_setUpControls","registerControl","addControl","removeControl","setControl","controlName","_checkAllValuesPresent","_throwIfControlMissing","getRawValue","_reduceChildren","subtreeUpdated","updated","_reduceValue","initValue","FormArray","_registerControl","removeAt","newValue","NG_MODEL_WITH_FORM_CONTROL_WARNING","formControlBinding$1","FormControlDirective","valueAccessors","_ngModelWarningConfig","update","_ngModelWarningSent","defaultAccessor","builtinAccessor","customAccessor","selectValueAccessor","FormControlDirective_1","ngOnChanges","changes","warningConfig","_isControlChanged","form","setUpViewChangePipeline","emitModelEvent","setUpModelChangePipeline","setUpBlurPipeline","registerOnValidatorChange","viewModel","isFirstChange","currentValue","isPropertyUpdated","_ngModelWarningSentOnce","model","ɵInternalFormsSharedModule","FormBuilder","controlsConfig","_reduceControls","isAbstractControlOptions","_createControl","controlConfig","FormsModule","ReactiveFormsModule","ReactiveFormsModule_1","withConfig","warnOnNgModelWithFormControl","refCount","RefCountOperator","connectable","_refCount","refCounter","connection","connect","RefCountSubscriber","sharedConnection","_connection","ConnectableObservable","subjectFactory","_isComplete","getSubject","_subject","connectableObservableDescriptor","connectableProto","writable","ConnectableSubscriber","shareSubjectFactory","noSideEffects","PARAMETERS","makeParamDecorator","parentClass","metaCtor","propName","makeMetadataCtor","ParamDecoratorFactory","annotationInstance","ParamDecorator","annotation","cls","unusedKey","ngMetadataName","annotationCls","Inject","Optional","Self","SkipSelf","InjectFlags","getClosureSafeProperty","objWithPropertyToExtract","fillProperties","ɵɵdefineInjectable","ɵɵdefineInjector","getInjectableDef","getOwnDefinition","NG_PROV_DEF","NG_INJECTABLE_DEF","getInjectorDef","NG_INJ_DEF","NG_INJECTOR_DEF","NG_PROV_DEF_FALLBACK","ɵprovFallback","ngInjectableDef","ngInjectorDef","overriddenName","newLineIndex","concatStringsWithSpace","before","after","__forward_ref__","forwardRef","forwardRefFn","resolveForwardRef","isForwardRef","_injectImplementation","__globalThis","globalThis","__window","__self","self","WorkerGlobalScope","__global","global","_global","NG_COMP_DEF","NG_DIR_DEF","NG_PIPE_DEF","ɵpipe","NG_MOD_DEF","NG_LOC_ID_DEF","ɵloc","NG_FACTORY_DEF","NG_ELEMENT_ID","__NG_ELEMENT_ID__","InjectionToken","_desc","INJECTOR","THROW_IF_NOT_FOUND","NEW_LINE","USE_VALUE","_currentInjector","setCurrentInjector","former","setInjectImplementation","impl","previous","injectInjectorOnly","Default","injectRootLimpMode","ɵɵinject","injectableDef","injectArgs","types","arg","NullInjector","NgModuleRef","deepForEach","addToArray","removeFromArray","keyValueArraySet","keyValueArray","keyValueArrayIndexOf","value1","value2","arrayInsert2","keyValueArrayGet","middle","_arrayIndexOfSorted","ChangeDetectionStrategy","ViewEncapsulation$1","ViewEncapsulation","EMPTY_OBJ","EMPTY_ARRAY","_renderCompCount","ɵɵdefineComponent","componentDefinition","typePrototype","declaredInputs","providersResolver","consts","ngContentSelectors","hostAttrs","contentQueries","onChanges","onInit","doCheck","ngDoCheck","afterContentInit","ngAfterContentInit","afterContentChecked","ngAfterContentChecked","afterViewInit","ngAfterViewInit","afterViewChecked","ngAfterViewChecked","onPush","changeDetection","OnPush","directiveDefs","pipeDefs","viewQuery","setInput","schemas","tView","directiveTypes","feature","pipeTypes","pipes","invertObject","extractDirectiveDef","extractPipeDef","getComponentDef","getDirectiveDef","getPipeDef","autoRegisterModuleById","ɵɵdefineNgModule","bootstrap","declarations","exports","transitiveCompileScopes","ɵɵsetNgModuleScope","scope","ngModuleDef","getNgModuleDef","secondary","newLookup","minifiedKey","publicName","declaredName","ɵɵdefineDirective","ɵɵdefinePipe","pipeDef","pure","getFactoryDef","throwNotFound","isLView","isLContainer","isContentQueryHost","tNode","isComponentHost","isDirectiveHost","isComponentDef","isRootView","DOCUMENT","setDocument","getDocument","isProceduralRenderer","domRendererFactory3","rendererType","unwrapRNode","getNativeByIndex","lView","getNativeByTNode","getTNode","view","getComponentLViewByIndex","nodeIndex","slotValue","readPatchedLView","readPatchedData","isCreationMode","viewAttachedToChangeDetector","getConstant","resetPreOrderHookFlags","updateTransplantedViewCount","lContainer","amount","viewOrContainer","instructionState","lFrame","createLFrame","bindingsEnabled","checkNoChangesMode","getBindingsEnabled","getLView","getTView","ɵɵrestoreView","viewToRestore","contextLView","getPreviousOrParentTNode","previousOrParentTNode","setPreviousOrParentTNode","isParent","getIsParent","setIsNotParent","getCheckNoChangesMode","setCheckNoChangesMode","getBindingRoot","bindingRootIndex","bindingStartIndex","getBindingIndex","bindingIndex","nextBindingIndex","incrementBindingIndex","setBindingRootForHostBindings","currentDirectiveIndex","setCurrentDirectiveIndex","getCurrentQueryIndex","setCurrentQueryIndex","enterDI","newView","newLFrame","allocLFrame","enterView","currentLFrame","childLFrame","selectedIndex","elementDepthCount","currentNamespace","currentSanitizer","leaveViewLight","oldLFrame","leaveDI","leaveView","getSelectedIndex","setSelectedIndex","getSelectedTNode","registerPostOrderHooks","directiveStart","directiveEnd","directiveDef","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","executeCheckHooks","callHooks","executeInitAndCheckHooks","initPhase","incrementInitPhaseFlags","currentView","currentNodeIndex","nodeIndexLimit","lastNodeIndexFound","callHook","isInitHook","hook","directive","NodeInjectorFactory","isViewProvider","injectImplementation","resolving","canSeeViewProviders","injectImpl","setUpAttributes","native","attrs","isProc","namespaceURI","attrName","attrVal","isAnimationProp","isNameOnlyAttributeMarker","marker","charCodeAt","mergeHostAttrs","dst","src","srcMarker","mergeHostAttribute","markerInsertPosition","dstValue","hasParentInjector","parentLocation","getParentInjectorIndex","getParentInjectorViewOffset","getParentInjectorView","startView","viewOffset","parentView","renderStringify","stringifyForError","defaultScheduler","requestAnimationFrame","ɵɵresolveWindow","ownerDocument","defaultView","maybeUnwrapFn","Function","includeViewProviders","setIncludeViewProviders","nextNgElementId","getOrCreateNodeInjectorForNode","existingInjectorIndex","getInjectorIndex","firstCreatePass","injectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","parentIndex","parentLView","parentData","footer","hostTNode","diPublicInInjector","bloomBit","BLOOM_SIZE","mask","b6","b5","tData","bloomAdd","getOrCreateInjectable","bloomHash","tokenId","bloomHashBitOrFactory","NodeInjector","previousTView","hostTElementNode","Host","shouldSearchParent","bloomHasToken","searchTokensOnInjector","NOT_FOUND","previousInjectImplementation","currentTView","injectableIdx","locateDirectiveOrProvider","getNodeInjectable","canAccessViewProviders","isHostSpecialCase","nodeProviderIndexes","providerIndexes","tInjectables","injectablesStart","directivesStart","cptViewProvidersCount","endIndex","providerTokenOrDef","dirDef","previousIncludeViewProviders","directiveIndex","preOrderHooks","preOrderCheckHooks","registerPreOrderHooks","injectorView","isFirstHostTNode","_tNode","_lView","ɵɵgetInheritedFactory","ɵɵgetFactoryOf","typeAny","injectorDef","getDebugContext","getOriginalError","defaultErrorLogger","ErrorHandler","_console","handleError","originalError","_findOriginalError","_findContext","errorLogger","getErrorLogger","SafeValueImpl","changingThisBreaksApplicationSecurity","SafeHtmlImpl","getTypeName","SafeStyleImpl","SafeScriptImpl","SafeUrlImpl","SafeResourceUrlImpl","unwrapSafeValue","allowSanitizationBypassAndThrow","actualType","getSanitizationBypassType","bypassSanitizationTrustHtml","trustedHtml","bypassSanitizationTrustStyle","trustedStyle","bypassSanitizationTrustScript","trustedScript","bypassSanitizationTrustUrl","trustedUrl","bypassSanitizationTrustResourceUrl","trustedResourceUrl","_devMode","_runModeLocked","isDevMode","enableProdMode","InertBodyHelper","defaultDoc","inertDocument","inertBodyElement","inertHtml","getInertBodyElement","DOMParser","isDOMParserAvailable","getInertBodyElement_DOMParser","getInertBodyElement_InertDocument","getInertBodyElement_XHR","html","xhr","XMLHttpRequest","responseType","open","send","response","parseFromString","templateEl","inertBody","documentMode","stripCustomNsAttrs","elAttrs","attributes","childNode","SAFE_URL_PATTERN","DATA_URL_PATTERN","_sanitizeUrl","tagSet","sets","sets_1","sets_1_1","inertBodyHelper","VOID_ELEMENTS","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","OPTIONAL_END_TAG_ELEMENTS","VALID_ELEMENTS","URI_ATTRS","SRCSET_ATTRS","VALID_ATTRS","SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS","SanitizingHtmlSerializer","sanitizedSomething","buf","sanitizeChildren","traverseContent","startElement","TEXT_NODE","chars","endElement","checkClobberedElement","srcset","nodeName","elAttr","lower","encodeEntities","nextNode","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","_sanitizeHtml","unsafeHtmlInput","unsafeHtml","mXSSAttempts","parsedHtml","sanitizer","safeHtml","getTemplateContent","isTemplateElement","content","SecurityContext","SAFE_STYLE_VALUE","URL_RE","_sanitizeStyle","urlMatch","outsideSingle","outsideDouble","hasBalancedQuotes","ɵɵsanitizeHtml","getSanitizer","ɵɵsanitizeUrl","unsafeUrl","attachPatchData","throwMultipleComponentError","throwMixedMultiProviderError","classIndexOf","classToSearch","startingIndex","foundIndex","length_1","isCssClassMatching","cssClassToMatch","isProjectionMode","isInlineTemplate","hasTagAndTypeMatch","currentSelector","isNodeMatchingSelector","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","isPositive","selectorAttrValue","attrIndexInNode","findAttrIndexInNode","nodeAttrValue","compareAgainstClassName","bindingsMode","maybeAttrName","matchTemplateAttribute","isNodeMatchingSelectorList","maybeWrapInNotSelector","isNegativeMode","chunk","stringifyCSSSelector","currentChunk","valueOrMarker","attrValue","NO_CHANGE","getLViewParent","getFirstLContainer","getNearestLContainer","getNextLContainer","ɵɵadvance","delta","selectIndexInternal","toTStylingRange","prev","getTStylingRangePrev","tStylingRange","setTStylingRangePrevDuplicate","getTStylingRangeNext","setTStylingRangeNext","setTStylingRangeNextDuplicate","refreshContentQueries","directiveDefIdx","elementCreate","createLView","tHostNode","rendererFactory","getOrCreateTNode","adjustedIndex","createTNode","createTNodeAtIndex","renderView","executeViewQueryFn","templateFn","executeTemplate","staticContentQueries","staticViewQueries","hostLView","renderComponent","renderChildComponents","incompleteFirstPass","refreshView","hooksInitPhaseCompleted","movedViews","movedLView","markTransplantedViewsForRefresh","embeddedLView","embeddedTView","refreshEmbeddedViews","expandoInstructions","expandoStartIndex","setHostBindingsByExecutingExpandoInstructions","refreshComponent","refreshChildComponents","firstUpdatePass","renderComponentOrTemplate","normalExecutionPath","creationModeIsActive","prevSelectedIndex","executeContentQueries","createDirectivesInstances","initialInputs","isComponent","addComponentLogic","setInputsFromAttrs","instantiateAllDirectives","expando","elementIndex","dirIndex","invokeHostBindingsInCreationMode","invokeDirectivesHostBindings","saveResolvedLocalsInData","viewData","localRefExtractor","localNames","localIndex","getOrCreateTComponentView","createTView","viewIndex","initialViewLength","createViewBlueprint","queries","cleanup","directiveRegistry","pipeRegistry","tParent","directiveStylingLast","propertyBindings","mergedAttrs","tViews","projectionNext","projection","stylesWithoutHost","residualStyles","classesWithoutHost","residualClasses","classBindings","styleBindings","generatePropertyAliases","inputAliasMap","propStore","internalName","elementPropertyInternal","nativeOnly","dataValue","inputData","setInputsForProperty","childComponentLView","markDirtyIfOnPush","resolveDirectives","localRefs","hasDirectives","markAsComponentHost","findDirectiveDefMatches","exportsMap","totalDirectiveHostVars","initTNodeFlags","generateExpandoInstructionBlock","preOrderHooksFound","preOrderCheckHooksFound","baseResolveDirective","saveNameToExportMap","addHostBindingsToExpandoInstructions","defs","tNodeAttrs","inputsFromAttrs","inputsStore","outputsStore","directiveInputs","generateInitialInputs","initializeInputAndOutputAliases","growHostVarsSpace","cacheMatchingLocalNames","directiveCount","providerCount","numberOfDirectives","directiveFactory","nodeInjectorFactory","componentView","addToViewTree","initialInputData","privateName","inputsToStore","createLContainer","hostNative","componentHostIdx","refreshContainsDirtyView","componentTView","syncViewWithBlueprint","lViewOrLContainer","markViewDirty","detectChangesInternal","detectChangesInRootView","rootContext","tickRootContext","viewQueryFn","CLEAN_PROMISE","getLCleanup","getTViewCleanup","textBindingInternal","getLContainer","embeddedView","getContainerRenderParent","tViewNode","nativeParentNode","applyToElementOrContainer","action","lNodeToHandle","beforeNode","rNode","nativeAppendChild","nativeInsertBefore","nativeParent","nativeRemoveChild","nativeRemoveNode","renderParent","applyView","applyContainer","addRemoveViewFromContainer","insertMode","detachMovedView","declarationContainer","declarationViewIndex","detachView","removeIndex","indexInContainer","viewToDetach","declarationLContainer","removedLView","lQueries","destroyLView","rootView","cleanUpView","firstView","getParentState","destroyViewTree","toCall","executeOnDestroys","tCleanup","lCleanup","idxOrTargetGetter","useCaptureOrSubIdx","removeListeners","nativeAppendOrInsertBefore","childEl","childTNode","parentTNode","getRenderParent","anchorNode","getBeforeNodeForView","getNativeAnchorNode","viewIndexInContainer","nextViewIndex","firstTNodeOfView","getFirstNativeNode","tNodeType","elIcuContainerChild","rNodeOrLContainer","componentHost","firstProjectedTNode","applyNodes","isProjection","rawSlotValue","applyProjectionRecursive","tProjectionNode","componentLView","nodeToProjectOrRNodes","writeDirectStyle","cssText","writeDirectClass","R3ElementRef","R3TemplateRef","R3ViewContainerRef","ViewRef","_cdRefInjectingView","_appRef","_viewContainerRef","collectNativeNodes","lNode","lViewInAContainer","lViewFirstChildTNode","nodesInSlot","cleanupFn","reattach","detectChanges","checkNoChanges","checkNoChangesInternal","attachToViewContainerRef","vcRef","detachFromAppRef","attachToAppRef","appRef","RootViewRef","_view","checkNoChangesInRootView","createElementRef","ElementRefToken","ElementRef","createTemplateRef","TemplateRefToken","TemplateRef","_declarationView","_declarationTContainer","elementRef","createEmbeddedView","declarationViewLQueries","createContainerRef","ViewContainerRefToken","ViewContainerRef","_lContainer","_hostTNode","_hostView","startTNode","getParentInjectorTNode","templateRef","viewRef","componentFactory","projectableNodes","ngModuleRef","contextInjector","allocateContainerIfNeeded","prevIdx","prevLContainer","prevVCRef","adjustedIdx","_adjustIndex","containerLength","trackMovedView","insertView","move","newIndex","viewRefsArr","detachedView","removeView","commentNode","nativeNextSibling","injectChangeDetectorRef","isPipe","createViewRef","ChangeDetectorRef","SWITCH_CHANGE_DETECTOR_REF_FACTORY","INJECTOR_SCOPE","NOT_YET","CIRCULAR","EMPTY_ARRAY$2","NULL_INJECTOR","getNullInjector","createInjectorWithoutInjectorInstances","defType","additionalProviders","R3Injector","records","injectorDefTypes","dedupStack","provider","processProvider","processInjectorType","makeRecord","record","assertNotDestroyed","service","previousInjector","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","injectorErrorName","tokenPath","text","formatError","catchInjectorError","_resolveInjectorDefTypes","defOrWrappedDef","parents","isDuplicate","importTypesWithProviders_1","imported","ngModule_1","defProviders","injectorType_1","ngModuleType","isTypeProvider","isValueProvider","providerToFactory","providerToRecord","existing","multiRecord_1","throwCyclicDependencyError","paramLength","newArray","inheritedInjectableDef","typeName","getInheritedInjectableDef","getUndecoratedInjectableFactory","unwrappedProvider","isExistingProvider","classRef_1","ngModuleDetail","throwInvalidProviderError","hasDeps","INJECTOR_IMPL","createInjector","Injector","NULL","ANALYZE_FOR_ENTRY_COMPONENTS","componentResourceResolutionQueue","componentDefPendingResolution","unwrapResponse","computeStaticStyling","writeToHost","_symbolIterator","Symbol_1","getOwnPropertyNames","looseIdentical","WrappedValue","wrapped","wrap","unwrap","isWrapped","isListLikeIterable$1","isJsObject$1","updateBinding","bindingUpdated","is","bindingUpdated2","exp1","exp2","different","bindingUpdated3","exp3","ɵɵattribute","elementAttributeInternal","interpolation1","prefix","v0","suffix","interpolation2","i0","v1","ɵɵtemplate","attrsIndex","localRefsIndex","tViewConsts","embeddedTViewNode","templateFirstCreatePass","comment","ɵɵreference","ɵɵdirectiveInject","ɵɵinjectAttribute","attrNameToInject","attrsLength","injectAttributeImpl","ɵɵinvalidFactory","ɵɵproperty","setDirectiveInputsWhichShadowsStyling","isClassBased","ɵɵelementStart","elementStart","elementStartFirstCreatePass","ɵɵelementEnd","elementEnd","hasClassInput","hasStyleInput","ɵɵelement","ɵɵelementContainerStart","elementContainerStartFirstCreatePass","ɵɵelementContainerEnd","ɵɵelementContainer","ɵɵgetCurrentView","isObservable","ɵɵlistener","listenerFn","useCapture","eventTargetResolver","isTNodeDirectiveHost","processOutputs","resolved","lCleanupIndex","existingListener","tNodeIdx","cleanupEventName","listenerIdxInLCleanup","findExistingListener","__ngLastListenerFn__","__ngNextListenerFn__","wrapListener","propsLength","listenerInternal","executeListenerWithErrorHandling","wrapWithPreventDefault","wrapListenerIn_markDirtyAndPreventDefault","nextListenerFn","ɵɵnextContext","level","nestingLevel","walkUpViews","nextContextImpl","ɵɵpropertyInterpolate","ɵɵpropertyInterpolate1","interpolatedValue","ɵɵpropertyInterpolate2","ɵɵpropertyInterpolate3","i1","v2","interpolation3","EMPTY_ARRAY$3","markDuplicates","tStylingKey","isPrevDir","isClassBinding","tStylingAtIndex","isMap","cursor","foundDuplicate","tStyleRangeAtCursor","isStylingMatch","tStylingKeyCursor","parserState","textEnd","keyEnd","valueEnd","getLastParsedKey","parseClassNameNext","consumeClassToken","consumeWhitespace","ɵɵclassProp","suffixOrSanitizer","stylingFirstUpdatePass","styleSanitizer","updateStyling","normalizeAndApplySuffixOrSanitizer","checkStylingProperty","ɵɵclassMap","stringParser","hasStylingInputShadow","isInHostBindings","staticPrefix","oldKeyValueArray","newKeyValueArray","oldIndex","oldKey","newKey","setKey","updateStylingMap","styleKeyValueArray","unwrappedValue","toStylingKeyValueArray","checkStylingMap","classStringParser","resetParserState","parseClassName","isHostBindings","stylingKey","hostDirectiveDef","getCurrentDirectiveDef","residual","collectStylingFromTAttrs","collectStylingFromDirectives","templateStylingKey","bindings","getTemplateHeadTStylingKey","setTemplateHeadTStylingKey","collectResidual","wrapInStaticStylingKey","tStylingKeyWithStatic","isHostBinding","tBindings","tmplHead","tmplTail","isKeyDuplicateOfStatic","markDuplicateOfResidualStyling","insertTStylingBinding","currentDirective","desiredMarker","currentMarker","tRange","isStylingValuePresent","findStylingValue","getTStylingRangePrevDuplicate","isProcedural","applyStyling","isPrevDirection","rawKey","containsStatics","isStylingMap","valueAtLViewIndex","ɵɵtext","textNative","ɵɵtextInterpolate","ɵɵtextInterpolate1","interpolated","ɵɵtextInterpolate2","ɵɵhostProperty","LifecycleHooksFeature","rootTView","ɵɵInheritDefinitionFeature","definition","superType","shouldInheritFields","inheritanceChain","superDef","writeableDef","maybeUnwrapEmpty","superHostBindings","inheritHostBindings","superViewQuery","superContentQueries","inheritViewQuery","inheritContentQueries","defData","ngInherit","mergeHostAttrsAcrossInheritance","prevViewQuery","prevContentQueries","prevHostBindings","SimpleChange","previousValue","firstChange","ɵɵNgOnChangesFeature","ngOnChangesSetInput","simpleChangesStore","getSimpleChangesStore","setSimpleChangesStore","previousChange","resolveProvider$1","lInjectablesBlueprint","providerFactory","beginIndex","existingFactoryIndex","registerDestroyHooksIfSupported","existingProvidersFactoryIndex","existingViewProvidersFactoryIndex","doesViewProvidersFactoryExist","factoryFn","componentProviders","multiFactoryAdd","multiFactory","multiViewProvidersFactoryResolver","multiProvidersFactoryResolver","contextIndex","indexInFactory","providerIsTypeProvider","existingCallbacksIndex","isComponentProvider","lData","multiResolve","factories","componentCount","multiProviders","ɵɵProvidersFeature","viewProviders","processProvidersFn","_NullComponentFactoryResolver","noComponentFactoryError","ComponentFactoryResolver","SWITCH_ELEMENT_REF_FACTORY","RendererFactory2","RendererStyleFlags2","Renderer2","SWITCH_RENDERER2_FACTORY","nodeAtIndex","getOrCreateRenderer2","Sanitizer","Version","full","major","minor","patch","VERSION","DefaultIterableDifferFactory","trackByFn","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","_trackByFn","forEachItem","forEachOperation","nextIt","nextRemove","addRemoveOffset","moveOffsets","currentIndex","getPreviousIndex","adjPreviousIndex","_nextRemoved","previousIndex","localMovePreviousIndex","localCurrentIndex","forEachPreviousItem","_nextPrevious","forEachAddedItem","_nextAdded","forEachMovedItem","_nextMoved","forEachRemovedItem","forEachIdentityChange","_nextIdentityChange","diff","collection","_reset","itemTrackBy","mayBeDirty","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","iterateListLike$1","_truncate","isDirty","nextRecord","previousRecord","_prev","_remove","_moveAfter","_reinsertAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","_addToRemovals","_unlink","prevRecord","_prevRemoved","_insertAfter","_DuplicateMap","put","toIndex","_prevDup","_nextDup","_DuplicateItemRecordList","_tail","atOrAfterIndex","duplicates","recordList","moveOffset","DefaultKeyValueDifferFactory","DefaultKeyValueDiffer","_records","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","forEachChangedItem","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","record_1","KeyValueChangeRecord_","_addToAdditions","_addToChanges","IterableDiffers","copied","extend","KeyValueDiffers","kv","keyValDiff","defaultIterableDiffers","defaultKeyValueDiffers","SWITCH_TEMPLATE_REF_FACTORY","SWITCH_VIEW_CONTAINER_REF_FACTORY","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","ComponentFactoryResolver$1","componentDef","ComponentFactory$1","toRefArray","nonMinified","templateName","SCHEDULER","ComponentFactory","componentType","isBoundToModule","rootSelectorOrNode","tElementNode","rootViewInjector","createChainedInjector","hostRenderer","elementName","hostRNode","elementOrSelector","rElement","locateHostElement","getNamespace$1","rootFlags","isIsolated","clean","playerHandler","rootLView","viewRenderer","createRootComponentView","extractAttrsAndClassesFromSelector","nodesforSlot","hostFeatures","rootTNode","instantiateRootComponent","createRootComponent","ComponentRef$1","ComponentRef","_rootLView","destroyCbs","changeDetectorRef","u","localeEn","floor","LOCALE_DATA","registerLocaleData","localeId","extraData","LocaleDataIndex","LocaleId","ExtraData","findLocaleData","locale","normalizedLocale","normalizeLocale","getLocaleData","parentLocale","getLocaleCurrencyCode","CurrencyCode","getLocalePluralCase","PluralCase","ng","common","locales","setLocaleId","actual","msg","expected","comparison","throwError","modules","NgModuleRef$1","_bootstrapComponents","ngLocaleIdDef","_r3Injector","injectFlags","NgModuleFactory$1","NgModuleFactory","moduleType","registerNgModuleType","incoming","assertSameOrNotExisting","ɵɵpureFunction1","slotOffset","pureFn","pureFunction1Internal","getPureFunctionReturnValue","returnValueIndex","lastReturnValue","bindingRoot","ɵɵpipe","pipeName","getPipeDef$1","pipeFactory","pipeInstance","ɵɵpipeBind1","unwrapValue$1","isPure","transform","ɵɵpipeBind2","pureFunction2Internal","ɵɵpipeBind3","v3","pureFunction3Internal","EventEmitter","isAsync","__isAsync","generatorOrNext","schedulerFn","errorFn","completeFn","symbolIterator","_results","QueryList","symbol","toArray","resultsTree","notifyOnChanges","setDirty","LQuery_","queryList","clone","LQueries_","tQueries","noOfInheritedQueries","viewLQueries","tQuery","getByIndex","indexInDeclarationView","dirtyQueriesWithMatches","getTQuery","TQueryMetadata_","descendants","isStatic","read","TQueries_","queriesForTemplateRef","childQueryIndex","tqueryClone","track","tquery","TQuery_","crossesNgTemplate","_appliesToNextNode","_declarationNodeIndex","isApplyingToNode","matchTNode","addMatch","declarationNodeIdx","matchTNodeWithReadOption","getIdxOfMatchingSelector","typePredicate","nodeMatchIdx","directiveOrProviderIdx","matchIdx","createResultForNode","matchingIdx","createResultByTNodeType","createSpecialToken","materializeViewResults","queryIndex","lQuery","tViewData","tQueryMatches","matchedNodeIdx","ɵɵqueryRefresh","collectQueryResults","lViewResults","embeddedLViews","ɵɵstaticViewQuery","descend","createTQuery","createLQuery","viewQueryInternal","ɵɵcontentQuery","tViewContentQueries","saveContentQueryAndDirectiveIndex","contentQueryInternal","ɵɵloadQuery","storeCleanupWithContext","ɵɵtemplateRefExtractor","ɵɵinjectPipeChangeDetectorRef","APP_INITIALIZER","ApplicationInitStatus","appInits","initialized","runInitializers","asyncInitPromises","initResult","all","APP_ID","APP_ID_RANDOM_PROVIDER","_randomChar","PLATFORM_INITIALIZER","PLATFORM_ID","APP_BOOTSTRAP_LISTENER","Console","LOCALE_ID$1","DEFAULT_CURRENCY_CODE","ModuleWithComponentFactories","ngModuleFactory","componentFactories","Compiler_compileModuleSync__POST_R3__","Compiler_compileModuleSync","Compiler_compileModuleAsync","Compiler_compileModuleAndAllComponentsSync__POST_R3__","declaration","Compiler_compileModuleAndAllComponentsSync","Compiler_compileModuleAndAllComponentsAsync","Compiler","compileModuleSync","compileModuleAndAllComponentsSync","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","getModuleId","COMPILER_OPTIONS","Zone","NgZone","maybeDelayChangeDetection","enableLongStackTrace","shouldCoalesceEventChangeDetection","hasPendingMacrotasks","hasPendingMicrotasks","isStable","onUnstable","onMicrotaskEmpty","onStable","onError","assertZonePatched","_nesting","_outer","_inner","lastRequestAnimationFrameId","nativeRequestAnimationFrame","nativeCancelAnimationFrame","unpatchedRequestAnimationFrame","__symbol__","unpatchedCancelAnimationFrame","getNativeRequestAnimationFrame","updateMicroTaskStatus","checkStable","delayChangeDetectionForEvents","onInvokeTask","task","applyThis","applyArgs","onEnter","invokeTask","onLeave","onInvoke","invoke","onHasTask","hasTaskState","hasTask","_hasPendingMicrotasks","microTask","macroTask","onHandleError","assertInAngularZone","assertNotInAngularZone","runTask","scheduleEventTask","EMPTY_PAYLOAD","noop$1","cancelTask","NoopNgZone","Testability","_ngZone","_pendingCount","_isZoneStable","_didWork","_callbacks","taskTrackingZone","_watchAngularEvents","_runCallbacksIfReady","increasePendingRequestCount","decreasePendingRequestCount","clearTimeout","timeoutId","doneCb","pending_1","getPendingTasks","updateCb","macroTasks","creationLocation","addCallback","timeout","getPendingRequestCount","findProviders","using","exactMatch","TestabilityRegistry","_applications","_testabilityGetter","registerApplication","unregisterApplication","unregisterAllApplications","setTestabilityGetter","getter","_platform","_NoopGetTestability","compileNgModuleFactory","compilerOptions","moduleFactory","compilerProviders","globalNg","ɵcompilerFacade","getCompilerFacade","resourceLoader","ResourceLoader","resourceResolver","componentResolved","urlMap","cachedResourceResolve","resp","promises","templateUrl","styleUrls","styleOffset","styleUrl","fullyResolved","componentDefResolved","resolveComponentResources","ALLOW_MULTIPLE_PLATFORMS","NgProbeToken","createPlatformFactory","parentPlatformFactory","desc","extraProviders","platform","getPlatform","injectedProviders","PlatformRef","inits","createPlatform","requiredToken","assertPlatform","_modules","_destroyListeners","bootstrapModuleFactory","ngZoneOption","ngZoneEventCoalescing","ngZoneInjector","moduleRef","exceptionHandler","initStatus","_moduleDoBootstrap","_callAndReportToErrorHandler","bootstrapModule","optionsReducer","ngDoBootstrap","objs","ApplicationRef","_exceptionHandler","_componentFactoryResolver","_initStatus","_bootstrapListeners","_views","_runningTick","_enforceNoNewChanges","_stable","tick","isCurrentlyStable","stableSub","unstableSub","concurrent","Number","POSITIVE_INFINITY","subjectOrSubjectFactory","componentOrFactory","compRef","_unloadComponent","_loadComponent","_d","_e","_f","attachView","NgModuleFactoryLoader","SystemJsNgModuleLoaderConfig","DEFAULT_CONFIG","factoryPathPrefix","factoryPathSuffix","SystemJsNgModuleLoader","_compiler","_config","loadAndCompile","exportName","checkNotEmpty","loadFactory","factoryClassSuffix","modulePath","getDebugNodeR2","_nativeNode","platformCore","APPLICATION_MODULE_PROVIDERS","queue","$localize","ApplicationModule","_DOM","getDOM","setRootDomAdapter","adapter","DomAdapter","PlatformLocation","useBrowserPlatformLocation","BrowserPlatformLocation","LOCATION_INITIALIZED","_init","_history","getBaseHrefFromDOM","onPopState","onHashChange","protocol","hostname","port","newPath","search","hash","pushState","supportsState","forward","back","getState","createBrowserPlatformLocation","joinWithSlash","slashes","endsWith","stripTrailingSlash","pathEndIdx","normalizeQueryParams","LocationStrategy","platformLocation","PathLocationStrategy","origin","APP_BASE_HREF","_platformLocation","_baseHref","prepareExternalUrl","internal","includeHash","externalUrl","HashLocationStrategy","Location","platformStrategy","_urlChangeListeners","_platformStrategy","browserBaseHref","_stripIndexHtml","ev","Location_1","normalize","_stripBaseHref","_notifyUrlChangeListeners","onUrlChange","onNext","onThrow","onReturn","createLocation","Plural","FormStyle","TranslationWidth","FormatWidth","NumberSymbol","getLocaleDateFormat","width","getLastDefinedValue","DateFormat","getLocaleTimeFormat","TimeFormat","getLocaleDateTimeFormat","DateTimeFormat","getLocaleNumberSymbol","NumberSymbols","CurrencyDecimal","Decimal","CurrencyGroup","Group","checkFullData","extractTime","hours","minutes","ISO8601_DATE_REGEX","NAMED_FORMATS","DATE_FORMATS_SPLIT","ZoneWidth","DateType","TranslationType","formatDateTime","opt_values","padNumber","num","digits","minusSign","negWrap","neg","strNum","dateGetter","date","FullYear","getFullYear","Month","getMonth","getDate","Hours","getHours","Minutes","getMinutes","Seconds","getSeconds","FractionalSeconds","getMilliseconds","Day","getDay","getDatePart","localeMinus","MinusSign","dateStrGetter","extended","Format","Months","formStyle","months","MonthsFormat","MonthsStandalone","getLocaleMonthNames","Days","days","DaysFormat","DaysStandalone","getLocaleDayNames","DayPeriods","currentHours_1","currentMinutes_1","result_1","rules","rule","getLocaleExtraDayPeriodRules","dayPeriods_1","dayPeriods","getLocaleExtraDayPeriods","hoursTo","amPm","DayPeriodsFormat","DayPeriodsStandalone","getLocaleDayPeriods","Eras","getLocaleEraNames","getDateTranslation","timeZoneGetter","ceil","Short","ShortGMT","Long","Extended","weekGetter","monthBased","datetime","year","firstDayOfYear","nbDaysBefore1stDayOfMonth","today","firstThurs","THURSDAY","DATE_FORMATS","timezoneToOffset","timezone","fallback","requestedTimezoneOffset","isDate","valueOf","NgLocalization","NgLocaleLocalization","getPluralCategory","Zero","One","Two","Few","Many","parseCookieValue","cookieStr","eqIndex","cookieValue","NgClass","_iterableDiffers","_keyValueDiffers","_ngEl","_iterableDiffer","_keyValueDiffer","_initialClasses","_rawClass","_removeClasses","_applyClasses","iterableChanges","_applyIterableChanges","keyValueChanges","_applyKeyValueChanges","_toggleClass","rawClassVal","klass","ngClass","NgForOfContext","$implicit","ngForOf","even","NgForOf","_viewContainer","_template","_differs","_ngForOf","_ngForOfDirty","_differ","ngForTrackBy","_applyChanges","insertTuples","adjustedPreviousIndex","RecordViewTuple","_perViewChange","ilen","ngTemplateContextGuard","ngForTemplate","NgIf","NgIfContext","_thenTemplateRef","_elseTemplateRef","_thenViewRef","_elseViewRef","ngIf","_updateView","assertTemplate","ngIfThen","ngIfElse","SwitchView","_templateRef","_created","enforceState","created","NgSwitch","_defaultUsed","_caseCount","_lastCaseCheckIndex","_lastCasesMatched","_ngSwitch","_updateDefaultCases","_addCase","_addDefault","_defaultViews","_matchCase","useDefault","ngSwitch","NgSwitchCase","viewContainer","ngSwitchCase","NgStyle","_ngStyle","_setStyle","nameAndUnit","ngStyle","invalidPipeArgumentError","ObservableStrategy","createSubscription","async","updateLatestValue","_promiseStrategy","PromiseStrategy","_observableStrategy","AsyncPipe","_ref","_latestValue","_latestReturnedValue","_subscription","_obj","_strategy","AsyncPipe_1","_dispose","_selectStrategy","_updateLatestValue","DatePipe","DatePipe_1","format","parsedNb","tzHour","tzMin","dateSetter","setUTCFullYear","setFullYear","timeSetter","setUTCHours","setHours","h","ms","isoStringToDate","toDate","getNamedFormat","getLocaleId","formatValue","Medium","Full","shortTime","shortDate","mediumTime","mediumDate","longTime","longDate","fullTime","fullDate","dateTimezoneOffset","getTimezoneOffset","setMinutes","addDateMinutes","convertTimezoneToLocal","dateFormatter","formatter","Abbreviated","Wide","Narrow","Standalone","getDateFormatter","formatDate","SlicePipe","SlicePipe_1","CommonModule","PLATFORM_BROWSER_ID","ViewportScroller","BrowserViewportScroller","supportScrollRestoration","scrollX","scrollY","scrollTo","CSS","escape","elSelectedById","scrollToElement","elSelectedByName","scrollRestoration","history_1","rect","getBoundingClientRect","left","pageXOffset","top","pageYOffset","FilterOperator","FilterSubscriber","ArgumentOutOfRangeErrorImpl","main","isWorker","workerSize","canUseWorker","Worker","Blob","OffscreenCanvas","HTMLCanvasElement","transferControlToOffscreen","createObjectURL","noop","func","ModulePromise","Prom","frame","TIME","frames","lastFrameTime","worker","prom","resolves","raf","cancelAnimationFrame","onFrame","timer","getWorker","code","execute","postMessage","canvas","offscreen","fire","workerDone","decorate","defaults","particleCount","angle","spread","startVelocity","decay","gravity","ticks","y","shapes","zIndex","colors","disableForReducedMotion","scalar","convert","toDecimal","setCanvasWindowSize","documentElement","clientWidth","height","clientHeight","setCanvasRectSize","confettiCannon","globalOpts","animationObj","isLibCanvas","allowResize","globalDisableForReducedMotion","Boolean","resizer","__confetti_initialized","preferLessMotion","matchMedia","pointerEvents","getCanvas","onResize","resize","radAngle","radSpread","getOrigin","temp","fettis","startX","startY","color","shape","PI","wobble","velocity","angle2D","tiltAngle","totalTicks","tiltSin","tiltCos","wobbleX","wobbleY","ovalScalar","addFettis","animationFrame","animatingFettis","clearRect","fetti","cos","sin","progress","x1","y1","x2","y2","fillStyle","beginPath","ellipse","radiusX","radiusY","rotation","startAngle","endAngle","antiClockwise","save","translate","rotate","scale","arc","restore","moveTo","lineTo","closePath","updateFetti","fireLocal","useWorker","HttpHandler","HttpBackend","HttpHeaders","headers","normalizedNames","lazyUpdate","lazyInit","line","maybeSetNormalizedName","op","lcName","copyFrom","applyUpdate","other","base","toDelete_1","HttpUrlEncodingCodec","encodeKey","standardEncoding","encodeValue","decodeKey","decodeValue","HttpParams","rawParams","codec","updates","cloneFrom","encoder","fromString","fromObject","param","eqIdx","eKey","base_1","isArrayBuffer","ArrayBuffer","isBlob","isFormData","FormData","HttpRequest","method","third","fourth","reportProgress","withCredentials","mightHaveBody","urlWithParams","qIdx","serializeBody","detectContentTypeHeader","setHeaders","setParams","HttpEventType","HttpResponseBase","defaultStatus","defaultStatusText","statusText","ok","HttpHeaderResponse","ResponseHeader","HttpResponse","Response","HttpErrorResponse","addBody","observe","HttpClient","request","req","events$","handle","res$","jsonp","callbackParam","HttpInterceptorHandler","interceptor","intercept","HTTP_INTERCEPTORS","NoopInterceptor","nextRequestId","JsonpCallbackContext","JsonpClientBackend","callbackMap","nextCallback","finished","cancelled","onLoad","Sent","JsonpInterceptor","XSSI_PREFIX","XhrFactory","BrowserXhr","HttpXhrBackend","xhrFactory","setRequestHeader","detectedType","reqBody","headerResponse","partialFromXhr","getAllResponseHeaders","responseURL","getResponseHeader","getResponseUrl","responseText","originalBody","sentHeaders","onDownProgress","progressEvent","DownloadProgress","loaded","lengthComputable","partialText","onUpProgress","UploadProgress","upload","abort","XSRF_COOKIE_NAME","XSRF_HEADER_NAME","HttpXsrfTokenExtractor","HttpXsrfCookieExtractor","cookieName","lastCookieString","lastToken","parseCount","cookieString","HttpXsrfInterceptor","tokenService","headerName","lcUrl","HttpInterceptingHandler","backend","chain","interceptors","reduceRight","jsonpCallbackContext","HttpClientXsrfModule","HttpClientXsrfModule_1","withOptions","HttpClientModule","HttpClientJsonpModule","_enable_super_gross_mode_that_will_cause_bad_things","extendStatics","setPrototypeOf","__proto__","__extends","__assign","assign","__awaiter","_arguments","P","generator","fulfilled","rejected","__generator","label","sent","trys","ops","verb","__values","__read","ar","__spread","converter","api","expires","toUTCString","write","stringifiedAttributes","attributeName","json","jar","cookies","getJSON","withConverter","MergeMapOperator","MergeMapSubscriber","hasCompleted","buffer","ish","UnsubscriptionError","UnsubscriptionErrorImpl","_subscriptions","flattenUnsubscriptionErrors","teardown","tmp","subscriptions","subscriptionIndex","errs","TakeOperator","TakeSubscriber","DoOperator","TapSubscriber","_tapNext","_tapError","_tapComplete","fns","pipeFromArray","outerSubscriber"],"mappings":"6FAAA,kCACO,IAAIA,EAAmB,SAAUC,GACpC,OAAO,SAAUC,GACb,IAAK,IAAIC,EAAI,EAAGC,EAAMH,EAAMI,OAAQF,EAAIC,IAAQF,EAAWI,OAAQH,IAC/DD,EAAWK,KAAKN,EAAME,IAE1BD,EAAWM,c,oCCLZ,SAASC,EAAUC,GACtB,QAASA,GAAoC,mBAApBA,EAAMC,WAAkD,mBAAfD,EAAME,KAF5E,mC,0KCIO,SAASC,EAAKC,EAAOC,GACxB,OAAKA,ECIF,SAAmBD,EAAOC,GAC7B,GAAa,MAATD,EAAe,CACf,GCTD,SAA6BA,GAChC,OAAOA,GAA6C,mBAA7BA,EAAM,KDQrBE,CAAoBF,GACpB,OERL,SAA4BA,EAAOC,GACtC,OAAO,IAAIE,EAAA,GAAW,SAAUf,GAC5B,IAAIgB,EAAM,IAAIC,EAAA,EASd,OARAD,EAAIE,IAAIL,EAAUM,UAAS,WACvB,IAAIC,EAAaR,EAAM,OACvBI,EAAIE,IAAIE,EAAWX,UAAU,CACzBJ,KAAM,SAAUG,GAASQ,EAAIE,IAAIL,EAAUM,UAAS,WAAc,OAAOnB,EAAWK,KAAKG,QACzFa,MAAO,SAAUC,GAAON,EAAIE,IAAIL,EAAUM,UAAS,WAAc,OAAOnB,EAAWqB,MAAMC,QACzFhB,SAAU,WAAcU,EAAIE,IAAIL,EAAUM,UAAS,WAAc,OAAOnB,EAAWM,uB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AAcD,GAC1B,OAAmB,IAAfA,EAAI3lJ,OACG,IAEQ,IAAf2lJ,EAAI3lJ,OACG2lJ,EAAI,GAER,SAAellJ,GAClB,OAAOklJ,EAAIl+I,QAAO,SAAU2uF,EAAMzwF,GAAM,OAAOA,EAAGywF,KAAU31F,M,kCCjBpE,0EAIO,SAASoM,EAAkBg5I,EAAiBhkJ,EAAQoL,EAAYE,EAAY3B,GAI/E,QAHwB,IAApBA,IACAA,EAAkB,IAAI,IAAgBq6I,EAAiB54I,EAAYE,KAEnE3B,EAAgBvL,OAGpB,OAAI4B,aAAkB,IACXA,EAAOvB,UAAUkL,GAErB,YAAY3J,EAAZ,CAAoB2J","file":"vendor.151799a8cf442f9c629e.js","sourcesContent":["/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var subscribeToArray = function (array) {\n return function (subscriber) {\n for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n };\n};\n//# sourceMappingURL=subscribeToArray.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isPromise(value) {\n return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';\n}\n//# sourceMappingURL=isPromise.js.map\n","/** PURE_IMPORTS_START _Observable,_util_subscribeTo,_scheduled_scheduled PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { subscribeTo } from '../util/subscribeTo';\nimport { scheduled } from '../scheduled/scheduled';\nexport function from(input, scheduler) {\n if (!scheduler) {\n if (input instanceof Observable) {\n return input;\n }\n return new Observable(subscribeTo(input));\n }\n else {\n return scheduled(input, scheduler);\n }\n}\n//# sourceMappingURL=from.js.map\n","/** PURE_IMPORTS_START _scheduleObservable,_schedulePromise,_scheduleArray,_scheduleIterable,_util_isInteropObservable,_util_isPromise,_util_isArrayLike,_util_isIterable PURE_IMPORTS_END */\nimport { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n else if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n else if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n else if (isIterable(input) || typeof input === 'string') {\n return scheduleIterable(input, scheduler);\n }\n }\n throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n}\n//# sourceMappingURL=scheduled.js.map\n","/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function isInteropObservable(input) {\n return input && typeof input[Symbol_observable] === 'function';\n}\n//# sourceMappingURL=isInteropObservable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function scheduleObservable(input, scheduler) {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n sub.add(scheduler.schedule(function () {\n var observable = input[Symbol_observable]();\n sub.add(observable.subscribe({\n next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },\n error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },\n complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },\n }));\n }));\n return sub;\n });\n}\n//# sourceMappingURL=scheduleObservable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function schedulePromise(input, scheduler) {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n sub.add(scheduler.schedule(function () {\n return input.then(function (value) {\n sub.add(scheduler.schedule(function () {\n subscriber.next(value);\n sub.add(scheduler.schedule(function () { return subscriber.complete(); }));\n }));\n }, function (err) {\n sub.add(scheduler.schedule(function () { return subscriber.error(err); }));\n });\n }));\n return sub;\n });\n}\n//# sourceMappingURL=schedulePromise.js.map\n","/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function isIterable(input) {\n return input && typeof input[Symbol_iterator] === 'function';\n}\n//# sourceMappingURL=isIterable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function scheduleIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n var iterator;\n sub.add(function () {\n if (iterator && typeof iterator.return === 'function') {\n iterator.return();\n }\n });\n sub.add(scheduler.schedule(function () {\n iterator = input[Symbol_iterator]();\n sub.add(scheduler.schedule(function () {\n if (subscriber.closed) {\n return;\n }\n var value;\n var done;\n try {\n var result = iterator.next();\n value = result.value;\n done = result.done;\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n this.schedule();\n }\n }));\n }));\n return sub;\n });\n}\n//# sourceMappingURL=scheduleIterable.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from './Subject';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nvar BehaviorSubject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(BehaviorSubject, _super);\n function BehaviorSubject(_value) {\n var _this = _super.call(this) || this;\n _this._value = _value;\n return _this;\n }\n Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n get: function () {\n return this.getValue();\n },\n enumerable: true,\n configurable: true\n });\n BehaviorSubject.prototype._subscribe = function (subscriber) {\n var subscription = _super.prototype._subscribe.call(this, subscriber);\n if (subscription && !subscription.closed) {\n subscriber.next(this._value);\n }\n return subscription;\n };\n BehaviorSubject.prototype.getValue = function () {\n if (this.hasError) {\n throw this.thrownError;\n }\n else if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else {\n return this._value;\n }\n };\n BehaviorSubject.prototype.next = function (value) {\n _super.prototype.next.call(this, this._value = value);\n };\n return BehaviorSubject;\n}(Subject));\nexport { BehaviorSubject };\n//# sourceMappingURL=BehaviorSubject.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n//# sourceMappingURL=isFunction.js.map\n","/**\n * @license Angular v9.1.11\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * An injectable service that produces an animation sequence programmatically within an\n * Angular component or directive.\n * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`.\n *\n * @usageNotes\n *\n * To use this service, add it to your component or directive as a dependency.\n * The service is instantiated along with your component.\n *\n * Apps do not typically need to create their own animation players, but if you\n * do need to, follow these steps:\n *\n * 1. Use the `build()` method to create a programmatic animation using the\n * `animate()` function. The method returns an `AnimationFactory` instance.\n *\n * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element.\n *\n * 3. Use the player object to control the animation programmatically.\n *\n * For example:\n *\n * ```ts\n * // import the service from BrowserAnimationsModule\n * import {AnimationBuilder} from '@angular/animations';\n * // require the service as a dependency\n * class MyCmp {\n * constructor(private _builder: AnimationBuilder) {}\n *\n * makeAnimation(element: any) {\n * // first define a reusable animation\n * const myAnimation = this._builder.build([\n * style({ width: 0 }),\n * animate(1000, style({ width: '100px' }))\n * ]);\n *\n * // use the returned factory object to create a player\n * const player = myAnimation.create(element);\n *\n * player.play();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nvar AnimationBuilder = /** @class */ (function () {\n function AnimationBuilder() {\n }\n return AnimationBuilder;\n}());\n/**\n * A factory object returned from the `AnimationBuilder`.`build()` method.\n *\n * @publicApi\n */\nvar AnimationFactory = /** @class */ (function () {\n function AnimationFactory() {\n }\n return AnimationFactory;\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 * Specifies automatic styling.\n *\n * @publicApi\n */\nvar AUTO_STYLE = '*';\n/**\n * Creates a named animation trigger, containing a list of `state()`\n * and `transition()` entries to be evaluated when the expression\n * bound to the trigger changes.\n *\n * @param name An identifying string.\n * @param definitions An animation definition object, containing an array of `state()`\n * and `transition()` declarations.\n *\n * @return An object that encapsulates the trigger data.\n *\n * @usageNotes\n * Define an animation trigger in the `animations` section of `@Component` metadata.\n * In the template, reference the trigger by name and bind it to a trigger expression that\n * evaluates to a defined animation state, using the following format:\n *\n * `[@triggerName]=\"expression\"`\n *\n * Animation trigger bindings convert all values to strings, and then match the\n * previous and current values against any linked transitions.\n * Booleans can be specified as `1` or `true` and `0` or `false`.\n *\n * ### Usage Example\n *\n * The following example creates an animation trigger reference based on the provided\n * name value.\n * The provided animation value is expected to be an array consisting of state and\n * transition declarations.\n *\n * ```typescript\n * @Component({\n * selector: \"my-component\",\n * templateUrl: \"my-component-tpl.html\",\n * animations: [\n * trigger(\"myAnimationTrigger\", [\n * state(...),\n * state(...),\n * transition(...),\n * transition(...)\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component makes use of the defined trigger\n * by binding to an element within its template code.\n *\n * ```html\n * \n *
...
\n * ```\n *\n * ### Using an inline function\n * The `transition` animation method also supports reading an inline function which can decide\n * if its associated animation should be run.\n *\n * ```typescript\n * // this method is run each time the `myAnimationTrigger` trigger value changes.\n * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key:\n string]: any}): boolean {\n * // notice that `element` and `params` are also available here\n * return toState == 'yes-please-animate';\n * }\n *\n * @Component({\n * selector: 'my-component',\n * templateUrl: 'my-component-tpl.html',\n * animations: [\n * trigger('myAnimationTrigger', [\n * transition(myInlineMatcherFn, [\n * // the animation sequence code\n * ]),\n * ])\n * ]\n * })\n * class MyComponent {\n * myStatusExp = \"yes-please-animate\";\n * }\n * ```\n *\n * ### Disabling Animations\n * When true, the special animation control binding `@.disabled` binding prevents\n * all animations from rendering.\n * Place the `@.disabled` binding on an element to disable\n * animations on the element itself, as well as any inner animation triggers\n * within the element.\n *\n * The following example shows how to use this feature:\n *\n * ```typescript\n * @Component({\n * selector: 'my-component',\n * template: `\n *
\n *
\n *
\n * `,\n * animations: [\n * trigger(\"childAnimation\", [\n * // ...\n * ])\n * ]\n * })\n * class MyComponent {\n * isDisabled = true;\n * exp = '...';\n * }\n * ```\n *\n * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating,\n * along with any inner animations.\n *\n * ### Disable animations application-wide\n * When an area of the template is set to have animations disabled,\n * **all** inner components have their animations disabled as well.\n * This means that you can disable all animations for an app\n * by placing a host binding set on `@.disabled` on the topmost Angular component.\n *\n * ```typescript\n * import {Component, HostBinding} from '@angular/core';\n *\n * @Component({\n * selector: 'app-component',\n * templateUrl: 'app.component.html',\n * })\n * class AppComponent {\n * @HostBinding('@.disabled')\n * public animationsDisabled = true;\n * }\n * ```\n *\n * ### Overriding disablement of inner animations\n * Despite inner animations being disabled, a parent animation can `query()`\n * for inner elements located in disabled areas of the template and still animate\n * them if needed. This is also the case for when a sub animation is\n * queried by a parent and then later animated using `animateChild()`.\n *\n * ### Detecting when an animation is disabled\n * If a region of the DOM (or the entire application) has its animations disabled, the animation\n * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides\n * an instance of an `AnimationEvent`. If animations are disabled,\n * the `.disabled` flag on the event is true.\n *\n * @publicApi\n */\nfunction trigger(name, definitions) {\n return { type: 7 /* Trigger */, name: name, definitions: definitions, options: {} };\n}\n/**\n * Defines an animation step that combines styling information with timing information.\n *\n * @param timings Sets `AnimateTimings` for the parent animation.\n * A string in the format \"duration [delay] [easing]\".\n * - Duration and delay are expressed as a number and optional time unit,\n * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n * The default unit is milliseconds.\n * - The easing value controls how the animation accelerates and decelerates\n * during its runtime. Value is one of `ease`, `ease-in`, `ease-out`,\n * `ease-in-out`, or a `cubic-bezier()` function call.\n * If not supplied, no easing is applied.\n *\n * For example, the string \"1s 100ms ease-out\" specifies a duration of\n * 1000 milliseconds, and delay of 100 ms, and the \"ease-out\" easing style,\n * which decelerates near the end of the duration.\n * @param styles Sets AnimationStyles for the parent animation.\n * A function call to either `style()` or `keyframes()`\n * that returns a collection of CSS style entries to be applied to the parent animation.\n * When null, uses the styles from the destination state.\n * This is useful when describing an animation step that will complete an animation;\n * see \"Animating to the final state\" in `transitions()`.\n * @returns An object that encapsulates the animation step.\n *\n * @usageNotes\n * Call within an animation `sequence()`, `{@link animations/group group()}`, or\n * `transition()` call to specify an animation step\n * that applies given style data to the parent animation for a given amount of time.\n *\n * ### Syntax Examples\n * **Timing examples**\n *\n * The following examples show various `timings` specifications.\n * - `animate(500)` : Duration is 500 milliseconds.\n * - `animate(\"1s\")` : Duration is 1000 milliseconds.\n * - `animate(\"100ms 0.5s\")` : Duration is 100 milliseconds, delay is 500 milliseconds.\n * - `animate(\"5s ease-in\")` : Duration is 5000 milliseconds, easing in.\n * - `animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\")` : Duration is 5000 milliseconds, delay is 10\n * milliseconds, easing according to a bezier curve.\n *\n * **Style examples**\n *\n * The following example calls `style()` to set a single CSS style.\n * ```typescript\n * animate(500, style({ background: \"red\" }))\n * ```\n * The following example calls `keyframes()` to set a CSS style\n * to different values for successive keyframes.\n * ```typescript\n * animate(500, keyframes(\n * [\n * style({ background: \"blue\" })),\n * style({ background: \"red\" }))\n * ])\n * ```\n *\n * @publicApi\n */\nfunction animate(timings, styles) {\n if (styles === void 0) { styles = null; }\n return { type: 4 /* Animate */, styles: styles, timings: timings };\n}\n/**\n * @description Defines a list of animation steps to be run in parallel.\n *\n * @param steps An array of animation step objects.\n * - When steps are defined by `style()` or `animate()`\n * function calls, each call within the group is executed instantly.\n * - To specify offset styles to be applied at a later time, define steps with\n * `keyframes()`, or use `animate()` calls with a delay value.\n * For example:\n *\n * ```typescript\n * group([\n * animate(\"1s\", style({ background: \"black\" })),\n * animate(\"2s\", style({ color: \"white\" }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the group data.\n *\n * @usageNotes\n * Grouped animations are useful when a series of styles must be\n * animated at different starting times and closed off at different ending times.\n *\n * When called within a `sequence()` or a\n * `transition()` call, does not continue to the next\n * instruction until all of the inner animation steps have completed.\n *\n * @publicApi\n */\nfunction group(steps, options) {\n if (options === void 0) { options = null; }\n return { type: 3 /* Group */, steps: steps, options: options };\n}\n/**\n * Defines a list of animation steps to be run sequentially, one by one.\n *\n * @param steps An array of animation step objects.\n * - Steps defined by `style()` calls apply the styling data immediately.\n * - Steps defined by `animate()` calls apply the styling data over time\n * as specified by the timing data.\n *\n * ```typescript\n * sequence([\n * style({ opacity: 0 }),\n * animate(\"1s\", style({ opacity: 1 }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the sequence data.\n *\n * @usageNotes\n * When you pass an array of steps to a\n * `transition()` call, the steps run sequentially by default.\n * Compare this to the `{@link animations/group group()}` call, which runs animation steps in\n *parallel.\n *\n * When a sequence is used within a `{@link animations/group group()}` or a `transition()` call,\n * execution continues to the next instruction only after each of the inner animation\n * steps have completed.\n *\n * @publicApi\n **/\nfunction sequence(steps, options) {\n if (options === void 0) { options = null; }\n return { type: 2 /* Sequence */, steps: steps, options: options };\n}\n/**\n * Declares a key/value object containing CSS properties/styles that\n * can then be used for an animation `state`, within an animation `sequence`,\n * or as styling data for calls to `animate()` and `keyframes()`.\n *\n * @param tokens A set of CSS styles or HTML styles associated with an animation state.\n * The value can be any of the following:\n * - A key-value style pair associating a CSS property with a value.\n * - An array of key-value style pairs.\n * - An asterisk (*), to use auto-styling, where styles are derived from the element\n * being animated and applied to the animation when it starts.\n *\n * Auto-styling can be used to define a state that depends on layout or other\n * environmental factors.\n *\n * @return An object that encapsulates the style data.\n *\n * @usageNotes\n * The following examples create animation styles that collect a set of\n * CSS property values:\n *\n * ```typescript\n * // string values for CSS properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical pixel values\n * style({ width: 100, height: 0 })\n * ```\n *\n * The following example uses auto-styling to allow a component to animate from\n * a height of 0 up to the height of the parent element:\n *\n * ```\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * @publicApi\n **/\nfunction style(tokens) {\n return { type: 6 /* Style */, styles: tokens, offset: null };\n}\n/**\n * Declares an animation state within a trigger attached to an element.\n *\n * @param name One or more names for the defined state in a comma-separated string.\n * The following reserved state names can be supplied to define a style for specific use\n * cases:\n *\n * - `void` You can associate styles with this name to be used when\n * the element is detached from the application. For example, when an `ngIf` evaluates\n * to false, the state of the associated element is void.\n * - `*` (asterisk) Indicates the default state. You can associate styles with this name\n * to be used as the fallback when the state that is being animated is not declared\n * within the trigger.\n *\n * @param styles A set of CSS styles associated with this state, created using the\n * `style()` function.\n * This set of styles persists on the element once the state has been reached.\n * @param options Parameters that can be passed to the state when it is invoked.\n * 0 or more key-value pairs.\n * @return An object that encapsulates the new state data.\n *\n * @usageNotes\n * Use the `trigger()` function to register states to an animation trigger.\n * Use the `transition()` function to animate between states.\n * When a state is active within a component, its associated styles persist on the element,\n * even when the animation ends.\n *\n * @publicApi\n **/\nfunction state(name, styles, options) {\n return { type: 0 /* State */, name: name, styles: styles, options: options };\n}\n/**\n * Defines a set of animation styles, associating each style with an optional `offset` value.\n *\n * @param steps A set of animation styles with optional offset data.\n * The optional `offset` value for a style specifies a percentage of the total animation\n * time at which that style is applied.\n * @returns An object that encapsulates the keyframes data.\n *\n * @usageNotes\n * Use with the `animate()` call. Instead of applying animations\n * from the current state\n * to the destination state, keyframes describe how each style entry is applied and at what point\n * within the animation arc.\n * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp).\n *\n * ### Usage\n *\n * In the following example, the offset values describe\n * when each `backgroundColor` value is applied. The color is red at the start, and changes to\n * blue when 20% of the total time has elapsed.\n *\n * ```typescript\n * // the provided offset values\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\", offset: 0 }),\n * style({ backgroundColor: \"blue\", offset: 0.2 }),\n * style({ backgroundColor: \"orange\", offset: 0.3 }),\n * style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * If there are no `offset` values specified in the style entries, the offsets\n * are calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n * style({ backgroundColor: \"red\" }) // offset = 0\n * style({ backgroundColor: \"blue\" }) // offset = 0.33\n * style({ backgroundColor: \"orange\" }) // offset = 0.66\n * style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n *```\n\n * @publicApi\n */\nfunction keyframes(steps) {\n return { type: 5 /* Keyframes */, steps: steps };\n}\n/**\n * Declares an animation transition as a sequence of animation steps to run when a given\n * condition is satisfied. The condition is a Boolean expression or function that compares\n * the previous and current animation states, and returns true if this transition should occur.\n * When the state criteria of a defined transition are met, the associated animation is\n * triggered.\n *\n * @param stateChangeExpr A Boolean expression or function that compares the previous and current\n * animation states, and returns true if this transition should occur. Note that \"true\" and \"false\"\n * match 1 and 0, respectively. An expression is evaluated each time a state change occurs in the\n * animation trigger element.\n * The animation steps run when the expression evaluates to true.\n *\n * - A state-change string takes the form \"state1 => state2\", where each side is a defined animation\n * state, or an asterix (*) to refer to a dynamic start or end state.\n * - The expression string can contain multiple comma-separated statements;\n * for example \"state1 => state2, state3 => state4\".\n * - Special values `:enter` and `:leave` initiate a transition on the entry and exit states,\n * equivalent to \"void => *\" and \"* => void\".\n * - Special values `:increment` and `:decrement` initiate a transition when a numeric value has\n * increased or decreased in value.\n * - A function is executed each time a state change occurs in the animation trigger element.\n * The animation steps run when the function returns true.\n *\n * @param steps One or more animation objects, as returned by the `animate()` or\n * `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the animation,\n * and additional developer-defined parameters. Provided values for additional parameters are used\n * as defaults, and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the transition data.\n *\n * @usageNotes\n * The template associated with a component binds an animation trigger to an element.\n *\n * ```HTML\n * \n *
...
\n * ```\n *\n * All transitions are defined within an animation trigger,\n * along with named states that the transitions change to and from.\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n * // define states\n * state(\"on\", style({ background: \"green\" })),\n * state(\"off\", style({ background: \"grey\" })),\n * ...]\n * ```\n *\n * Note that when you call the `sequence()` function within a `{@link animations/group group()}`\n * or a `transition()` call, execution does not continue to the next instruction\n * until each of the inner animation steps have completed.\n *\n * ### Syntax examples\n *\n * The following examples define transitions between the two defined states (and default states),\n * using various options:\n *\n * ```typescript\n * // Transition occurs when the state value\n * // bound to \"myAnimationTrigger\" changes from \"on\" to \"off\"\n * transition(\"on => off\", animate(500))\n * // Run the same animation for both directions\n * transition(\"on <=> off\", animate(500))\n * // Define multiple state-change pairs separated by commas\n * transition(\"on => off, off => void\", animate(500))\n * ```\n *\n * ### Special values for state-change expressions\n *\n * - Catch-all state change for when an element is inserted into the page and the\n * destination state is unknown:\n *\n * ```typescript\n * transition(\"void => *\", [\n * style({ opacity: 0 }),\n * animate(500)\n * ])\n * ```\n *\n * - Capture a state change between any states:\n *\n * `transition(\"* => *\", animate(\"1s 0s\"))`\n *\n * - Entry and exit transitions:\n *\n * ```typescript\n * transition(\":enter\", [\n * style({ opacity: 0 }),\n * animate(500, style({ opacity: 1 }))\n * ]),\n * transition(\":leave\", [\n * animate(500, style({ opacity: 0 }))\n * ])\n * ```\n *\n * - Use `:increment` and `:decrement` to initiate transitions:\n *\n * ```typescript\n * transition(\":increment\", group([\n * query(':enter', [\n * style({ left: '100%' }),\n * animate('0.5s ease-out', style('*'))\n * ]),\n * query(':leave', [\n * animate('0.5s ease-out', style({ left: '-100%' }))\n * ])\n * ]))\n *\n * transition(\":decrement\", group([\n * query(':enter', [\n * style({ left: '100%' }),\n * animate('0.5s ease-out', style('*'))\n * ]),\n * query(':leave', [\n * animate('0.5s ease-out', style({ left: '-100%' }))\n * ])\n * ]))\n * ```\n *\n * ### State-change functions\n *\n * Here is an example of a `fromState` specified as a state-change function that invokes an\n * animation when true:\n *\n * ```typescript\n * transition((fromState, toState) =>\n * {\n * return fromState == \"off\" && toState == \"on\";\n * },\n * animate(\"1s 0s\"))\n * ```\n *\n * ### Animating to the final state\n *\n * If the final step in a transition is a call to `animate()` that uses a timing value\n * with no style data, that step is automatically considered the final animation arc,\n * for the element to reach the final state. Angular automatically adds or removes\n * CSS styles to ensure that the element is in the correct final state.\n *\n * The following example defines a transition that starts by hiding the element,\n * then makes sure that it animates properly to whatever state is currently active for trigger:\n *\n * ```typescript\n * transition(\"void => *\", [\n * style({ opacity: 0 }),\n * animate(500)\n * ])\n * ```\n * ### Boolean value matching\n * If a trigger binding value is a Boolean, it can be matched using a transition expression\n * that compares true and false or 1 and 0. For example:\n *\n * ```\n * // in the template\n *
...
\n * // in the component metadata\n * trigger('openClose', [\n * state('true', style({ height: '*' })),\n * state('false', style({ height: '0px' })),\n * transition('false <=> true', animate(500))\n * ])\n * ```\n *\n * @publicApi\n **/\nfunction transition(stateChangeExpr, steps, options) {\n if (options === void 0) { options = null; }\n return { type: 1 /* Transition */, expr: stateChangeExpr, animation: steps, options: options };\n}\n/**\n * Produces a reusable animation that can be invoked in another animation or sequence,\n * by calling the `useAnimation()` function.\n *\n * @param steps One or more animation objects, as returned by the `animate()`\n * or `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional developer-defined parameters.\n * Provided values for additional parameters are used as defaults,\n * and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the animation data.\n *\n * @usageNotes\n * The following example defines a reusable animation, providing some default parameter\n * values.\n *\n * ```typescript\n * var fadeAnimation = animation([\n * style({ opacity: '{{ start }}' }),\n * animate('{{ time }}',\n * style({ opacity: '{{ end }}'}))\n * ],\n * { params: { time: '1000ms', start: 0, end: 1 }});\n * ```\n *\n * The following invokes the defined animation with a call to `useAnimation()`,\n * passing in override parameter values.\n *\n * ```js\n * useAnimation(fadeAnimation, {\n * params: {\n * time: '2s',\n * start: 1,\n * end: 0\n * }\n * })\n * ```\n *\n * If any of the passed-in parameter values are missing from this call,\n * the default values are used. If one or more parameter values are missing before a step is\n * animated, `useAnimation()` throws an error.\n *\n * @publicApi\n */\nfunction animation(steps, options) {\n if (options === void 0) { options = null; }\n return { type: 8 /* Reference */, animation: steps, options: options };\n}\n/**\n * Executes a queried inner animation element within an animation sequence.\n *\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional override values for developer-defined parameters.\n * @return An object that encapsulates the child animation data.\n *\n * @usageNotes\n * Each time an animation is triggered in Angular, the parent animation\n * has priority and any child animations are blocked. In order\n * for a child animation to run, the parent animation must query each of the elements\n * containing child animations, and run them using this function.\n *\n * Note that this feature is designed to be used with `query()` and it will only work\n * with animations that are assigned using the Angular animation library. CSS keyframes\n * and transitions are not handled by this API.\n *\n * @publicApi\n */\nfunction animateChild(options) {\n if (options === void 0) { options = null; }\n return { type: 9 /* AnimateChild */, options: options };\n}\n/**\n * Starts a reusable animation that is created using the `animation()` function.\n *\n * @param animation The reusable animation to start.\n * @param options An options object that can contain a delay value for the start of\n * the animation, and additional override values for developer-defined parameters.\n * @return An object that contains the animation parameters.\n *\n * @publicApi\n */\nfunction useAnimation(animation, options) {\n if (options === void 0) { options = null; }\n return { type: 10 /* AnimateRef */, animation: animation, options: options };\n}\n/**\n * Finds one or more inner elements within the current element that is\n * being animated within a sequence. Use with `animate()`.\n *\n * @param selector The element to query, or a set of elements that contain Angular-specific\n * characteristics, specified with one or more of the following tokens.\n * - `query(\":enter\")` or `query(\":leave\")` : Query for newly inserted/removed elements.\n * - `query(\":animating\")` : Query all currently animating elements.\n * - `query(\"@triggerName\")` : Query elements that contain an animation trigger.\n * - `query(\"@*\")` : Query all elements that contain an animation triggers.\n * - `query(\":self\")` : Include the current element into the animation sequence.\n *\n * @param animation One or more animation steps to apply to the queried element or elements.\n * An array is treated as an animation sequence.\n * @param options An options object. Use the 'limit' field to limit the total number of\n * items to collect.\n * @return An object that encapsulates the query data.\n *\n * @usageNotes\n * Tokens can be merged into a combined query selector string. For example:\n *\n * ```typescript\n * query(':self, .record:enter, .record:leave, @subTrigger', [...])\n * ```\n *\n * The `query()` function collects multiple elements and works internally by using\n * `element.querySelectorAll`. Use the `limit` field of an options object to limit\n * the total number of items to be collected. For example:\n *\n * ```js\n * query('div', [\n * animate(...),\n * animate(...)\n * ], { limit: 1 })\n * ```\n *\n * By default, throws an error when zero items are found. Set the\n * `optional` flag to ignore this error. For example:\n *\n * ```js\n * query('.some-element-that-may-not-be-there', [\n * animate(...),\n * animate(...)\n * ], { optional: true })\n * ```\n *\n * ### Usage Example\n *\n * The following example queries for inner elements and animates them\n * individually using `animate()`.\n *\n * ```typescript\n * @Component({\n * selector: 'inner',\n * template: `\n *
\n *

Title

\n *
\n * Blah blah blah\n *
\n *
\n * `,\n * animations: [\n * trigger('queryAnimation', [\n * transition('* => goAnimate', [\n * // hide the inner elements\n * query('h1', style({ opacity: 0 })),\n * query('.content', style({ opacity: 0 })),\n *\n * // animate the inner elements in, one by one\n * query('h1', animate(1000, style({ opacity: 1 }))),\n * query('.content', animate(1000, style({ opacity: 1 }))),\n * ])\n * ])\n * ]\n * })\n * class Cmp {\n * exp = '';\n *\n * goAnimate() {\n * this.exp = 'goAnimate';\n * }\n * }\n * ```\n *\n * @publicApi\n */\nfunction query(selector, animation, options) {\n if (options === void 0) { options = null; }\n return { type: 11 /* Query */, selector: selector, animation: animation, options: options };\n}\n/**\n * Use within an animation `query()` call to issue a timing gap after\n * each queried item is animated.\n *\n * @param timings A delay value.\n * @param animation One ore more animation steps.\n * @returns An object that encapsulates the stagger data.\n *\n * @usageNotes\n * In the following example, a container element wraps a list of items stamped out\n * by an `ngFor`. The container element contains an animation trigger that will later be set\n * to query for each of the inner items.\n *\n * Each time items are added, the opacity fade-in animation runs,\n * and each removed item is faded out.\n * When either of these animations occur, the stagger effect is\n * applied after each item's animation is started.\n *\n * ```html\n * \n * \n *
\n *
\n *
\n * {{ item }}\n *
\n *
\n * ```\n *\n * Here is the component code:\n *\n * ```typescript\n * import {trigger, transition, style, animate, query, stagger} from '@angular/animations';\n * @Component({\n * templateUrl: 'list.component.html',\n * animations: [\n * trigger('listAnimation', [\n * ...\n * ])\n * ]\n * })\n * class ListComponent {\n * items = [];\n *\n * showItems() {\n * this.items = [0,1,2,3,4];\n * }\n *\n * hideItems() {\n * this.items = [];\n * }\n *\n * toggle() {\n * this.items.length ? this.hideItems() : this.showItems();\n * }\n * }\n * ```\n *\n * Here is the animation trigger code:\n *\n * ```typescript\n * trigger('listAnimation', [\n * transition('* => *', [ // each time the binding value changes\n * query(':leave', [\n * stagger(100, [\n * animate('0.5s', style({ opacity: 0 }))\n * ])\n * ]),\n * query(':enter', [\n * style({ opacity: 0 }),\n * stagger(100, [\n * animate('0.5s', style({ opacity: 1 }))\n * ])\n * ])\n * ])\n * ])\n * ```\n *\n * @publicApi\n */\nfunction stagger(timings, animation) {\n return { type: 12 /* Stagger */, timings: timings, animation: animation };\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 */\nfunction scheduleMicroTask(cb) {\n Promise.resolve(null).then(cb);\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 empty programmatic controller for reusable animations.\n * Used internally when animations are disabled, to avoid\n * checking for the null case when an animation player is expected.\n *\n * @see `animate()`\n * @see `AnimationPlayer`\n * @see `GroupPlayer`\n *\n * @publicApi\n */\nvar NoopAnimationPlayer = /** @class */ (function () {\n function NoopAnimationPlayer(duration, delay) {\n if (duration === void 0) { duration = 0; }\n if (delay === void 0) { delay = 0; }\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._started = false;\n this._destroyed = false;\n this._finished = false;\n this.parentPlayer = null;\n this.totalTime = duration + delay;\n }\n NoopAnimationPlayer.prototype._onFinish = function () {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(function (fn) { return fn(); });\n this._onDoneFns = [];\n }\n };\n NoopAnimationPlayer.prototype.onStart = function (fn) {\n this._onStartFns.push(fn);\n };\n NoopAnimationPlayer.prototype.onDone = function (fn) {\n this._onDoneFns.push(fn);\n };\n NoopAnimationPlayer.prototype.onDestroy = function (fn) {\n this._onDestroyFns.push(fn);\n };\n NoopAnimationPlayer.prototype.hasStarted = function () {\n return this._started;\n };\n NoopAnimationPlayer.prototype.init = function () { };\n NoopAnimationPlayer.prototype.play = function () {\n if (!this.hasStarted()) {\n this._onStart();\n this.triggerMicrotask();\n }\n this._started = true;\n };\n /** @internal */\n NoopAnimationPlayer.prototype.triggerMicrotask = function () {\n var _this = this;\n scheduleMicroTask(function () { return _this._onFinish(); });\n };\n NoopAnimationPlayer.prototype._onStart = function () {\n this._onStartFns.forEach(function (fn) { return fn(); });\n this._onStartFns = [];\n };\n NoopAnimationPlayer.prototype.pause = function () { };\n NoopAnimationPlayer.prototype.restart = function () { };\n NoopAnimationPlayer.prototype.finish = function () {\n this._onFinish();\n };\n NoopAnimationPlayer.prototype.destroy = function () {\n if (!this._destroyed) {\n this._destroyed = true;\n if (!this.hasStarted()) {\n this._onStart();\n }\n this.finish();\n this._onDestroyFns.forEach(function (fn) { return fn(); });\n this._onDestroyFns = [];\n }\n };\n NoopAnimationPlayer.prototype.reset = function () { };\n NoopAnimationPlayer.prototype.setPosition = function (position) { };\n NoopAnimationPlayer.prototype.getPosition = function () {\n return 0;\n };\n /** @internal */\n NoopAnimationPlayer.prototype.triggerCallback = function (phaseName) {\n var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(function (fn) { return fn(); });\n methods.length = 0;\n };\n return NoopAnimationPlayer;\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 programmatic controller for a group of reusable animations.\n * Used internally to control animations.\n *\n * @see `AnimationPlayer`\n * @see `{@link animations/group group()}`\n *\n */\nvar AnimationGroupPlayer = /** @class */ (function () {\n function AnimationGroupPlayer(_players) {\n var _this = this;\n this._onDoneFns = [];\n this._onStartFns = [];\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n this._onDestroyFns = [];\n this.parentPlayer = null;\n this.totalTime = 0;\n this.players = _players;\n var doneCount = 0;\n var destroyCount = 0;\n var startCount = 0;\n var total = this.players.length;\n if (total == 0) {\n scheduleMicroTask(function () { return _this._onFinish(); });\n }\n else {\n this.players.forEach(function (player) {\n player.onDone(function () {\n if (++doneCount == total) {\n _this._onFinish();\n }\n });\n player.onDestroy(function () {\n if (++destroyCount == total) {\n _this._onDestroy();\n }\n });\n player.onStart(function () {\n if (++startCount == total) {\n _this._onStart();\n }\n });\n });\n }\n this.totalTime = this.players.reduce(function (time, player) { return Math.max(time, player.totalTime); }, 0);\n }\n AnimationGroupPlayer.prototype._onFinish = function () {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(function (fn) { return fn(); });\n this._onDoneFns = [];\n }\n };\n AnimationGroupPlayer.prototype.init = function () {\n this.players.forEach(function (player) { return player.init(); });\n };\n AnimationGroupPlayer.prototype.onStart = function (fn) {\n this._onStartFns.push(fn);\n };\n AnimationGroupPlayer.prototype._onStart = function () {\n if (!this.hasStarted()) {\n this._started = true;\n this._onStartFns.forEach(function (fn) { return fn(); });\n this._onStartFns = [];\n }\n };\n AnimationGroupPlayer.prototype.onDone = function (fn) {\n this._onDoneFns.push(fn);\n };\n AnimationGroupPlayer.prototype.onDestroy = function (fn) {\n this._onDestroyFns.push(fn);\n };\n AnimationGroupPlayer.prototype.hasStarted = function () {\n return this._started;\n };\n AnimationGroupPlayer.prototype.play = function () {\n if (!this.parentPlayer) {\n this.init();\n }\n this._onStart();\n this.players.forEach(function (player) { return player.play(); });\n };\n AnimationGroupPlayer.prototype.pause = function () {\n this.players.forEach(function (player) { return player.pause(); });\n };\n AnimationGroupPlayer.prototype.restart = function () {\n this.players.forEach(function (player) { return player.restart(); });\n };\n AnimationGroupPlayer.prototype.finish = function () {\n this._onFinish();\n this.players.forEach(function (player) { return player.finish(); });\n };\n AnimationGroupPlayer.prototype.destroy = function () {\n this._onDestroy();\n };\n AnimationGroupPlayer.prototype._onDestroy = function () {\n if (!this._destroyed) {\n this._destroyed = true;\n this._onFinish();\n this.players.forEach(function (player) { return player.destroy(); });\n this._onDestroyFns.forEach(function (fn) { return fn(); });\n this._onDestroyFns = [];\n }\n };\n AnimationGroupPlayer.prototype.reset = function () {\n this.players.forEach(function (player) { return player.reset(); });\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n };\n AnimationGroupPlayer.prototype.setPosition = function (p) {\n var timeAtPosition = p * this.totalTime;\n this.players.forEach(function (player) {\n var position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n player.setPosition(position);\n });\n };\n AnimationGroupPlayer.prototype.getPosition = function () {\n var min = 0;\n this.players.forEach(function (player) {\n var p = player.getPosition();\n min = Math.min(p, min);\n });\n return min;\n };\n AnimationGroupPlayer.prototype.beforeDestroy = function () {\n this.players.forEach(function (player) {\n if (player.beforeDestroy) {\n player.beforeDestroy();\n }\n });\n };\n /** @internal */\n AnimationGroupPlayer.prototype.triggerCallback = function (phaseName) {\n var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(function (fn) { return fn(); });\n methods.length = 0;\n };\n return AnimationGroupPlayer;\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 */\nvar ɵPRE_STYLE = '!';\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/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AUTO_STYLE, AnimationBuilder, AnimationFactory, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, AnimationGroupPlayer as ɵAnimationGroupPlayer, ɵPRE_STYLE };\n\n//# sourceMappingURL=animations.js.map","/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nexport function finalize(callback) {\n return function (source) { return source.lift(new FinallyOperator(callback)); };\n}\nvar FinallyOperator = /*@__PURE__*/ (function () {\n function FinallyOperator(callback) {\n this.callback = callback;\n }\n FinallyOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n };\n return FinallyOperator;\n}());\nvar FinallySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(FinallySubscriber, _super);\n function FinallySubscriber(destination, callback) {\n var _this = _super.call(this, destination) || this;\n _this.add(new Subscription(callback));\n return _this;\n }\n return FinallySubscriber;\n}(Subscriber));\n//# sourceMappingURL=finalize.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function map(project, thisArg) {\n return function mapOperation(source) {\n if (typeof project !== 'function') {\n throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');\n }\n return source.lift(new MapOperator(project, thisArg));\n };\n}\nvar MapOperator = /*@__PURE__*/ (function () {\n function MapOperator(project, thisArg) {\n this.project = project;\n this.thisArg = thisArg;\n }\n MapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));\n };\n return MapOperator;\n}());\nexport { MapOperator };\nvar MapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MapSubscriber, _super);\n function MapSubscriber(destination, project, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.count = 0;\n _this.thisArg = thisArg || _this;\n return _this;\n }\n MapSubscriber.prototype._next = function (value) {\n var result;\n try {\n result = this.project.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return MapSubscriber;\n}(Subscriber));\n//# sourceMappingURL=map.js.map\n","/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nexport var empty = {\n closed: true,\n next: function (value) { },\n error: function (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n else {\n hostReportError(err);\n }\n },\n complete: function () { }\n};\n//# sourceMappingURL=Observer.js.map\n","/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */\nimport { canReportError } from './util/canReportError';\nimport { toSubscriber } from './util/toSubscriber';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nvar Observable = /*@__PURE__*/ (function () {\n function Observable(subscribe) {\n this._isScalar = false;\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var operator = this.operator;\n var sink = toSubscriber(observerOrNext, error, complete);\n if (operator) {\n sink.add(operator.call(sink, this.source));\n }\n else {\n sink.add(this.source || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?\n this._subscribe(sink) :\n this._trySubscribe(sink));\n }\n if (config.useDeprecatedSynchronousErrorHandling) {\n if (sink.syncErrorThrowable) {\n sink.syncErrorThrowable = false;\n if (sink.syncErrorThrown) {\n throw sink.syncErrorValue;\n }\n }\n }\n return sink;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n sink.syncErrorThrown = true;\n sink.syncErrorValue = err;\n }\n if (canReportError(sink)) {\n sink.error(err);\n }\n else {\n console.warn(err);\n }\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscription;\n subscription = _this.subscribe(function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n if (subscription) {\n subscription.unsubscribe();\n }\n }\n }, reject, resolve);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var source = this.source;\n return source && source.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n if (operations.length === 0) {\n return this;\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n if (!promiseCtor) {\n promiseCtor = config.Promise || Promise;\n }\n if (!promiseCtor) {\n throw new Error('no Promise impl found');\n }\n return promiseCtor;\n}\n//# sourceMappingURL=Observable.js.map\n","/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */\nimport { Subscriber } from '../Subscriber';\nimport { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';\nimport { empty as emptyObserver } from '../Observer';\nexport function toSubscriber(nextOrObserver, error, complete) {\n if (nextOrObserver) {\n if (nextOrObserver instanceof Subscriber) {\n return nextOrObserver;\n }\n if (nextOrObserver[rxSubscriberSymbol]) {\n return nextOrObserver[rxSubscriberSymbol]();\n }\n }\n if (!nextOrObserver && !error && !complete) {\n return new Subscriber(emptyObserver);\n }\n return new Subscriber(nextOrObserver, error, complete);\n}\n//# sourceMappingURL=toSubscriber.js.map\n","/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */\nimport { Subscriber } from '../Subscriber';\nexport function canReportError(observer) {\n while (observer) {\n var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;\n if (closed_1 || isStopped) {\n return false;\n }\n else if (destination && destination instanceof Subscriber) {\n observer = destination;\n }\n else {\n observer = null;\n }\n }\n return true;\n}\n//# sourceMappingURL=canReportError.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar ObjectUnsubscribedErrorImpl = /*@__PURE__*/ (function () {\n function ObjectUnsubscribedErrorImpl() {\n Error.call(this);\n this.message = 'object unsubscribed';\n this.name = 'ObjectUnsubscribedError';\n return this;\n }\n ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n return ObjectUnsubscribedErrorImpl;\n})();\nexport var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;\n//# sourceMappingURL=ObjectUnsubscribedError.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function catchError(selector) {\n return function catchErrorOperatorFunction(source) {\n var operator = new CatchOperator(selector);\n var caught = source.lift(operator);\n return (operator.caught = caught);\n };\n}\nvar CatchOperator = /*@__PURE__*/ (function () {\n function CatchOperator(selector) {\n this.selector = selector;\n }\n CatchOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));\n };\n return CatchOperator;\n}());\nvar CatchSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(CatchSubscriber, _super);\n function CatchSubscriber(destination, selector, caught) {\n var _this = _super.call(this, destination) || this;\n _this.selector = selector;\n _this.caught = caught;\n return _this;\n }\n CatchSubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var result = void 0;\n try {\n result = this.selector(err, this.caught);\n }\n catch (err2) {\n _super.prototype.error.call(this, err2);\n return;\n }\n this._unsubscribeAndRecycle();\n var innerSubscriber = new InnerSubscriber(this, undefined, undefined);\n this.add(innerSubscriber);\n var innerSubscription = subscribeToResult(this, result, undefined, undefined, innerSubscriber);\n if (innerSubscription !== innerSubscriber) {\n this.add(innerSubscription);\n }\n }\n };\n return CatchSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=catchError.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function hostReportError(err) {\n setTimeout(function () { throw err; }, 0);\n}\n//# sourceMappingURL=hostReportError.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar EmptyErrorImpl = /*@__PURE__*/ (function () {\n function EmptyErrorImpl() {\n Error.call(this);\n this.message = 'no elements in sequence';\n this.name = 'EmptyError';\n return this;\n }\n EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n return EmptyErrorImpl;\n})();\nexport var EmptyError = EmptyErrorImpl;\n//# sourceMappingURL=EmptyError.js.map\n","/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { isScheduler } from '../util/isScheduler';\nimport { isArray } from '../util/isArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { fromArray } from './fromArray';\nvar NONE = {};\nexport function combineLatest() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var resultSelector = null;\n var scheduler = null;\n if (isScheduler(observables[observables.length - 1])) {\n scheduler = observables.pop();\n }\n if (typeof observables[observables.length - 1] === 'function') {\n resultSelector = observables.pop();\n }\n if (observables.length === 1 && isArray(observables[0])) {\n observables = observables[0];\n }\n return fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector));\n}\nvar CombineLatestOperator = /*@__PURE__*/ (function () {\n function CombineLatestOperator(resultSelector) {\n this.resultSelector = resultSelector;\n }\n CombineLatestOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));\n };\n return CombineLatestOperator;\n}());\nexport { CombineLatestOperator };\nvar CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(CombineLatestSubscriber, _super);\n function CombineLatestSubscriber(destination, resultSelector) {\n var _this = _super.call(this, destination) || this;\n _this.resultSelector = resultSelector;\n _this.active = 0;\n _this.values = [];\n _this.observables = [];\n return _this;\n }\n CombineLatestSubscriber.prototype._next = function (observable) {\n this.values.push(NONE);\n this.observables.push(observable);\n };\n CombineLatestSubscriber.prototype._complete = function () {\n var observables = this.observables;\n var len = observables.length;\n if (len === 0) {\n this.destination.complete();\n }\n else {\n this.active = len;\n this.toRespond = len;\n for (var i = 0; i < len; i++) {\n var observable = observables[i];\n this.add(subscribeToResult(this, observable, observable, i));\n }\n }\n };\n CombineLatestSubscriber.prototype.notifyComplete = function (unused) {\n if ((this.active -= 1) === 0) {\n this.destination.complete();\n }\n };\n CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var values = this.values;\n var oldVal = values[outerIndex];\n var toRespond = !this.toRespond\n ? 0\n : oldVal === NONE ? --this.toRespond : this.toRespond;\n values[outerIndex] = innerValue;\n if (toRespond === 0) {\n if (this.resultSelector) {\n this._tryResultSelector(values);\n }\n else {\n this.destination.next(values.slice());\n }\n }\n };\n CombineLatestSubscriber.prototype._tryResultSelector = function (values) {\n var result;\n try {\n result = this.resultSelector.apply(this, values);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return CombineLatestSubscriber;\n}(OuterSubscriber));\nexport { CombineLatestSubscriber };\n//# sourceMappingURL=combineLatest.js.map\n","/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { from } from './from';\nimport { empty } from './empty';\nexport function defer(observableFactory) {\n return new Observable(function (subscriber) {\n var input;\n try {\n input = observableFactory();\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n var source = input ? from(input) : empty();\n return source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=defer.js.map\n","/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */\nimport { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function takeLast(count) {\n return function takeLastOperatorFunction(source) {\n if (count === 0) {\n return empty();\n }\n else {\n return source.lift(new TakeLastOperator(count));\n }\n };\n}\nvar TakeLastOperator = /*@__PURE__*/ (function () {\n function TakeLastOperator(total) {\n this.total = total;\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n TakeLastOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TakeLastSubscriber(subscriber, this.total));\n };\n return TakeLastOperator;\n}());\nvar TakeLastSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TakeLastSubscriber, _super);\n function TakeLastSubscriber(destination, total) {\n var _this = _super.call(this, destination) || this;\n _this.total = total;\n _this.ring = new Array();\n _this.count = 0;\n return _this;\n }\n TakeLastSubscriber.prototype._next = function (value) {\n var ring = this.ring;\n var total = this.total;\n var count = this.count++;\n if (ring.length < total) {\n ring.push(value);\n }\n else {\n var index = count % total;\n ring[index] = value;\n }\n };\n TakeLastSubscriber.prototype._complete = function () {\n var destination = this.destination;\n var count = this.count;\n if (count > 0) {\n var total = this.count >= this.total ? this.total : this.count;\n var ring = this.ring;\n for (var i = 0; i < total; i++) {\n var idx = (count++) % total;\n destination.next(ring[idx]);\n }\n }\n destination.complete();\n };\n return TakeLastSubscriber;\n}(Subscriber));\n//# sourceMappingURL=takeLast.js.map\n","/** PURE_IMPORTS_START tslib,_util_EmptyError,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { EmptyError } from '../util/EmptyError';\nimport { Subscriber } from '../Subscriber';\nexport function throwIfEmpty(errorFactory) {\n if (errorFactory === void 0) {\n errorFactory = defaultErrorFactory;\n }\n return function (source) {\n return source.lift(new ThrowIfEmptyOperator(errorFactory));\n };\n}\nvar ThrowIfEmptyOperator = /*@__PURE__*/ (function () {\n function ThrowIfEmptyOperator(errorFactory) {\n this.errorFactory = errorFactory;\n }\n ThrowIfEmptyOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));\n };\n return ThrowIfEmptyOperator;\n}());\nvar ThrowIfEmptySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ThrowIfEmptySubscriber, _super);\n function ThrowIfEmptySubscriber(destination, errorFactory) {\n var _this = _super.call(this, destination) || this;\n _this.errorFactory = errorFactory;\n _this.hasValue = false;\n return _this;\n }\n ThrowIfEmptySubscriber.prototype._next = function (value) {\n this.hasValue = true;\n this.destination.next(value);\n };\n ThrowIfEmptySubscriber.prototype._complete = function () {\n if (!this.hasValue) {\n var err = void 0;\n try {\n err = this.errorFactory();\n }\n catch (e) {\n err = e;\n }\n this.destination.error(err);\n }\n else {\n return this.destination.complete();\n }\n };\n return ThrowIfEmptySubscriber;\n}(Subscriber));\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function defaultIfEmpty(defaultValue) {\n if (defaultValue === void 0) {\n defaultValue = null;\n }\n return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };\n}\nvar DefaultIfEmptyOperator = /*@__PURE__*/ (function () {\n function DefaultIfEmptyOperator(defaultValue) {\n this.defaultValue = defaultValue;\n }\n DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));\n };\n return DefaultIfEmptyOperator;\n}());\nvar DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DefaultIfEmptySubscriber, _super);\n function DefaultIfEmptySubscriber(destination, defaultValue) {\n var _this = _super.call(this, destination) || this;\n _this.defaultValue = defaultValue;\n _this.isEmpty = true;\n return _this;\n }\n DefaultIfEmptySubscriber.prototype._next = function (value) {\n this.isEmpty = false;\n this.destination.next(value);\n };\n DefaultIfEmptySubscriber.prototype._complete = function () {\n if (this.isEmpty) {\n this.destination.next(this.defaultValue);\n }\n this.destination.complete();\n };\n return DefaultIfEmptySubscriber;\n}(Subscriber));\n//# sourceMappingURL=defaultIfEmpty.js.map\n","/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */\nimport { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) { return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); };\n}\n//# sourceMappingURL=last.js.map\n","/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */\nimport { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) { return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); };\n}\n//# sourceMappingURL=first.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function every(predicate, thisArg) {\n return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };\n}\nvar EveryOperator = /*@__PURE__*/ (function () {\n function EveryOperator(predicate, thisArg, source) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n this.source = source;\n }\n EveryOperator.prototype.call = function (observer, source) {\n return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));\n };\n return EveryOperator;\n}());\nvar EverySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(EverySubscriber, _super);\n function EverySubscriber(destination, predicate, thisArg, source) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.thisArg = thisArg;\n _this.source = source;\n _this.index = 0;\n _this.thisArg = thisArg || _this;\n return _this;\n }\n EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {\n this.destination.next(everyValueMatch);\n this.destination.complete();\n };\n EverySubscriber.prototype._next = function (value) {\n var result = false;\n try {\n result = this.predicate.call(this.thisArg, value, this.index++, this.source);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (!result) {\n this.notifyComplete(false);\n }\n };\n EverySubscriber.prototype._complete = function () {\n this.notifyComplete(true);\n };\n return EverySubscriber;\n}(Subscriber));\n//# sourceMappingURL=every.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { map } from './map';\nimport { from } from '../observable/from';\nexport function switchMap(project, resultSelector) {\n if (typeof resultSelector === 'function') {\n return function (source) { return source.pipe(switchMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };\n }\n return function (source) { return source.lift(new SwitchMapOperator(project)); };\n}\nvar SwitchMapOperator = /*@__PURE__*/ (function () {\n function SwitchMapOperator(project) {\n this.project = project;\n }\n SwitchMapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n };\n return SwitchMapOperator;\n}());\nvar SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SwitchMapSubscriber, _super);\n function SwitchMapSubscriber(destination, project) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.index = 0;\n return _this;\n }\n SwitchMapSubscriber.prototype._next = function (value) {\n var result;\n var index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (error) {\n this.destination.error(error);\n return;\n }\n this._innerSub(result, value, index);\n };\n SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {\n var innerSubscription = this.innerSubscription;\n if (innerSubscription) {\n innerSubscription.unsubscribe();\n }\n var innerSubscriber = new InnerSubscriber(this, value, index);\n var destination = this.destination;\n destination.add(innerSubscriber);\n this.innerSubscription = subscribeToResult(this, result, undefined, undefined, innerSubscriber);\n if (this.innerSubscription !== innerSubscriber) {\n destination.add(this.innerSubscription);\n }\n };\n SwitchMapSubscriber.prototype._complete = function () {\n var innerSubscription = this.innerSubscription;\n if (!innerSubscription || innerSubscription.closed) {\n _super.prototype._complete.call(this);\n }\n this.unsubscribe();\n };\n SwitchMapSubscriber.prototype._unsubscribe = function () {\n this.innerSubscription = null;\n };\n SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {\n var destination = this.destination;\n destination.remove(innerSub);\n this.innerSubscription = null;\n if (this.isStopped) {\n _super.prototype._complete.call(this);\n }\n };\n SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n return SwitchMapSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=switchMap.js.map\n","/** PURE_IMPORTS_START _of,_operators_concatAll PURE_IMPORTS_END */\nimport { of } from './of';\nimport { concatAll } from '../operators/concatAll';\nexport function concat() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n return concatAll()(of.apply(void 0, observables));\n}\n//# sourceMappingURL=concat.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function scan(accumulator, seed) {\n var hasSeed = false;\n if (arguments.length >= 2) {\n hasSeed = true;\n }\n return function scanOperatorFunction(source) {\n return source.lift(new ScanOperator(accumulator, seed, hasSeed));\n };\n}\nvar ScanOperator = /*@__PURE__*/ (function () {\n function ScanOperator(accumulator, seed, hasSeed) {\n if (hasSeed === void 0) {\n hasSeed = false;\n }\n this.accumulator = accumulator;\n this.seed = seed;\n this.hasSeed = hasSeed;\n }\n ScanOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));\n };\n return ScanOperator;\n}());\nvar ScanSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ScanSubscriber, _super);\n function ScanSubscriber(destination, accumulator, _seed, hasSeed) {\n var _this = _super.call(this, destination) || this;\n _this.accumulator = accumulator;\n _this._seed = _seed;\n _this.hasSeed = hasSeed;\n _this.index = 0;\n return _this;\n }\n Object.defineProperty(ScanSubscriber.prototype, \"seed\", {\n get: function () {\n return this._seed;\n },\n set: function (value) {\n this.hasSeed = true;\n this._seed = value;\n },\n enumerable: true,\n configurable: true\n });\n ScanSubscriber.prototype._next = function (value) {\n if (!this.hasSeed) {\n this.seed = value;\n this.destination.next(value);\n }\n else {\n return this._tryNext(value);\n }\n };\n ScanSubscriber.prototype._tryNext = function (value) {\n var index = this.index++;\n var result;\n try {\n result = this.accumulator(this.seed, value, index);\n }\n catch (err) {\n this.destination.error(err);\n }\n this.seed = result;\n this.destination.next(result);\n };\n return ScanSubscriber;\n}(Subscriber));\n//# sourceMappingURL=scan.js.map\n","/**\n * @license Angular v9.1.11\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { __extends, __decorate, __assign, __values, __spread, __metadata, __param } from 'tslib';\nimport { LocationStrategy, Location, PlatformLocation, APP_BASE_HREF, ViewportScroller, HashLocationStrategy, PathLocationStrategy, ɵgetDOM, LOCATION_INITIALIZED } from '@angular/common';\nimport { Component, ɵisObservable, ɵisPromise, NgModuleRef, InjectionToken, NgModuleFactory, ɵConsole, NgZone, isDevMode, Input, HostListener, Directive, Attribute, Renderer2, ElementRef, HostBinding, ContentChildren, QueryList, Optional, EventEmitter, Output, ViewContainerRef, ComponentFactoryResolver, ChangeDetectorRef, Injectable, NgModuleFactoryLoader, Compiler, Injector, SystemJsNgModuleLoader, NgProbeToken, ANALYZE_FOR_ENTRY_COMPONENTS, SkipSelf, Inject, APP_INITIALIZER, APP_BOOTSTRAP_LISTENER, NgModule, ApplicationRef, Version } from '@angular/core';\nimport { of, from, BehaviorSubject, Observable, EmptyError, combineLatest, defer, Subject, EMPTY } from 'rxjs';\nimport { map, concatAll, last as last$1, catchError, first, mergeMap, every, switchMap, take, startWith, scan, filter, concatMap, reduce, tap, finalize, mergeAll } from 'rxjs/operators';\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 for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * @usageNotes\n *\n * ```ts\n * class MyService {\n * constructor(public router: Router, logger: Logger) {\n * router.events.pipe(\n * filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n * ).subscribe((e: RouterEvent) => {\n * logger.log(e.id, e.url);\n * });\n * }\n * }\n * ```\n *\n * @see `Event`\n * @publicApi\n */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/common';\nvar RouterEvent = /** @class */ (function () {\n function RouterEvent(\n /** A unique ID that the router assigns to every router navigation. */\n id, \n /** The URL that is the destination for this navigation. */\n url) {\n this.id = id;\n this.url = url;\n }\n return RouterEvent;\n}());\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nvar NavigationStart = /** @class */ (function (_super) {\n __extends(NavigationStart, _super);\n function NavigationStart(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n navigationTrigger, \n /** @docsNotRequired */\n restoredState) {\n if (navigationTrigger === void 0) { navigationTrigger = 'imperative'; }\n if (restoredState === void 0) { restoredState = null; }\n var _this = _super.call(this, id, url) || this;\n _this.navigationTrigger = navigationTrigger;\n _this.restoredState = restoredState;\n return _this;\n }\n /** @docsNotRequired */\n NavigationStart.prototype.toString = function () {\n return \"NavigationStart(id: \" + this.id + \", url: '\" + this.url + \"')\";\n };\n return NavigationStart;\n}(RouterEvent));\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @publicApi\n */\nvar NavigationEnd = /** @class */ (function (_super) {\n __extends(NavigationEnd, _super);\n function NavigationEnd(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n return _this;\n }\n /** @docsNotRequired */\n NavigationEnd.prototype.toString = function () {\n return \"NavigationEnd(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"')\";\n };\n return NavigationEnd;\n}(RouterEvent));\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n *\n * This can happen when a [route guard](guide/router#milestone-5-route-guards)\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @publicApi\n */\nvar NavigationCancel = /** @class */ (function (_super) {\n __extends(NavigationCancel, _super);\n function NavigationCancel(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n reason) {\n var _this = _super.call(this, id, url) || this;\n _this.reason = reason;\n return _this;\n }\n /** @docsNotRequired */\n NavigationCancel.prototype.toString = function () {\n return \"NavigationCancel(id: \" + this.id + \", url: '\" + this.url + \"')\";\n };\n return NavigationCancel;\n}(RouterEvent));\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @publicApi\n */\nvar NavigationError = /** @class */ (function (_super) {\n __extends(NavigationError, _super);\n function NavigationError(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n error) {\n var _this = _super.call(this, id, url) || this;\n _this.error = error;\n return _this;\n }\n /** @docsNotRequired */\n NavigationError.prototype.toString = function () {\n return \"NavigationError(id: \" + this.id + \", url: '\" + this.url + \"', error: \" + this.error + \")\";\n };\n return NavigationError;\n}(RouterEvent));\n/**\n *An event triggered when routes are recognized.\n *\n * @publicApi\n */\nvar RoutesRecognized = /** @class */ (function (_super) {\n __extends(RoutesRecognized, _super);\n function RoutesRecognized(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n /** @docsNotRequired */\n RoutesRecognized.prototype.toString = function () {\n return \"RoutesRecognized(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return RoutesRecognized;\n}(RouterEvent));\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @publicApi\n */\nvar GuardsCheckStart = /** @class */ (function (_super) {\n __extends(GuardsCheckStart, _super);\n function GuardsCheckStart(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n GuardsCheckStart.prototype.toString = function () {\n return \"GuardsCheckStart(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return GuardsCheckStart;\n}(RouterEvent));\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @publicApi\n */\nvar GuardsCheckEnd = /** @class */ (function (_super) {\n __extends(GuardsCheckEnd, _super);\n function GuardsCheckEnd(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state, \n /** @docsNotRequired */\n shouldActivate) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n _this.shouldActivate = shouldActivate;\n return _this;\n }\n GuardsCheckEnd.prototype.toString = function () {\n return \"GuardsCheckEnd(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \", shouldActivate: \" + this.shouldActivate + \")\";\n };\n return GuardsCheckEnd;\n}(RouterEvent));\n/**\n * An event triggered at the the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @publicApi\n */\nvar ResolveStart = /** @class */ (function (_super) {\n __extends(ResolveStart, _super);\n function ResolveStart(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n ResolveStart.prototype.toString = function () {\n return \"ResolveStart(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return ResolveStart;\n}(RouterEvent));\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nvar ResolveEnd = /** @class */ (function (_super) {\n __extends(ResolveEnd, _super);\n function ResolveEnd(\n /** @docsNotRequired */\n id, \n /** @docsNotRequired */\n url, \n /** @docsNotRequired */\n urlAfterRedirects, \n /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n ResolveEnd.prototype.toString = function () {\n return \"ResolveEnd(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return ResolveEnd;\n}(RouterEvent));\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @publicApi\n */\nvar RouteConfigLoadStart = /** @class */ (function () {\n function RouteConfigLoadStart(\n /** @docsNotRequired */\n route) {\n this.route = route;\n }\n RouteConfigLoadStart.prototype.toString = function () {\n return \"RouteConfigLoadStart(path: \" + this.route.path + \")\";\n };\n return RouteConfigLoadStart;\n}());\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @publicApi\n */\nvar RouteConfigLoadEnd = /** @class */ (function () {\n function RouteConfigLoadEnd(\n /** @docsNotRequired */\n route) {\n this.route = route;\n }\n RouteConfigLoadEnd.prototype.toString = function () {\n return \"RouteConfigLoadEnd(path: \" + this.route.path + \")\";\n };\n return RouteConfigLoadEnd;\n}());\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nvar ChildActivationStart = /** @class */ (function () {\n function ChildActivationStart(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ChildActivationStart.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ChildActivationStart(path: '\" + path + \"')\";\n };\n return ChildActivationStart;\n}());\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart` *\n * @publicApi\n */\nvar ChildActivationEnd = /** @class */ (function () {\n function ChildActivationEnd(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ChildActivationEnd.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ChildActivationEnd(path: '\" + path + \"')\";\n };\n return ChildActivationEnd;\n}());\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nvar ActivationStart = /** @class */ (function () {\n function ActivationStart(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ActivationStart.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ActivationStart(path: '\" + path + \"')\";\n };\n return ActivationStart;\n}());\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nvar ActivationEnd = /** @class */ (function () {\n function ActivationEnd(\n /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ActivationEnd.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ActivationEnd(path: '\" + path + \"')\";\n };\n return ActivationEnd;\n}());\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nvar Scroll = /** @class */ (function () {\n function Scroll(\n /** @docsNotRequired */\n routerEvent, \n /** @docsNotRequired */\n position, \n /** @docsNotRequired */\n anchor) {\n this.routerEvent = routerEvent;\n this.position = position;\n this.anchor = anchor;\n }\n Scroll.prototype.toString = function () {\n var pos = this.position ? this.position[0] + \", \" + this.position[1] : null;\n return \"Scroll(anchor: '\" + this.anchor + \"', position: '\" + pos + \"')\";\n };\n return Scroll;\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 component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\nvar ɵEmptyOutletComponent = /** @class */ (function () {\n function ɵEmptyOutletComponent() {\n }\nɵEmptyOutletComponent.ɵfac = function ɵEmptyOutletComponent_Factory(t) { return new (t || ɵEmptyOutletComponent)(); };\nɵEmptyOutletComponent.ɵcmp = ɵngcc0.ɵɵdefineComponent({ type: ɵEmptyOutletComponent, selectors: [[\"ng-component\"]], decls: 1, vars: 0, template: function ɵEmptyOutletComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"router-outlet\");\n } }, directives: function () { return [RouterOutlet]; }, encapsulation: 2 });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(ɵEmptyOutletComponent, [{\n type: Component,\n args: [{ template: \"\" }]\n }], function () { return []; }, null); })();\n return ɵEmptyOutletComponent;\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 primary routing outlet.\n *\n * @publicApi\n */\nvar PRIMARY_OUTLET = 'primary';\nvar ParamsAsMap = /** @class */ (function () {\n function ParamsAsMap(params) {\n this.params = params || {};\n }\n ParamsAsMap.prototype.has = function (name) {\n return this.params.hasOwnProperty(name);\n };\n ParamsAsMap.prototype.get = function (name) {\n if (this.has(name)) {\n var v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n return null;\n };\n ParamsAsMap.prototype.getAll = function (name) {\n if (this.has(name)) {\n var v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n return [];\n };\n Object.defineProperty(ParamsAsMap.prototype, \"keys\", {\n get: function () {\n return Object.keys(this.params);\n },\n enumerable: true,\n configurable: true\n });\n return ParamsAsMap;\n}());\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nfunction convertToParamMap(params) {\n return new ParamsAsMap(params);\n}\nvar NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\nfunction navigationCancelingError(message) {\n var error = Error('NavigationCancelingError: ' + message);\n error[NAVIGATION_CANCELING_ERROR] = true;\n return error;\n}\nfunction isNavigationCancelingError(error) {\n return error && error[NAVIGATION_CANCELING_ERROR];\n}\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nfunction defaultUrlMatcher(segments, segmentGroup, route) {\n var parts = route.path.split('/');\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n if (route.pathMatch === 'full' &&\n (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n var posParams = {};\n // Check each config part against the actual URL\n for (var index = 0; index < parts.length; index++) {\n var part = parts[index];\n var segment = segments[index];\n var isParameter = part.startsWith(':');\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n }\n else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n return { consumed: segments.slice(0, parts.length), posParams: posParams };\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 */\nvar LoadedRouterConfig = /** @class */ (function () {\n function LoadedRouterConfig(routes, module) {\n this.routes = routes;\n this.module = module;\n }\n return LoadedRouterConfig;\n}());\nfunction validateConfig(config, parentPath) {\n if (parentPath === void 0) { parentPath = ''; }\n // forEach doesn't iterate undefined values\n for (var i = 0; i < config.length; i++) {\n var route = config[i];\n var fullPath = getFullPath(parentPath, route);\n validateNode(route, fullPath);\n }\n}\nfunction validateNode(route, fullPath) {\n if (!route) {\n throw new Error(\"\\n Invalid configuration of route '\" + fullPath + \"': Encountered undefined route.\\n The reason might be an extra comma.\\n\\n Example:\\n const routes: Routes = [\\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\\n { path: 'dashboard', component: DashboardComponent },, << two commas\\n { path: 'detail/:id', component: HeroDetailComponent }\\n ];\\n \");\n }\n if (Array.isArray(route)) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': Array cannot be specified\");\n }\n if (!route.component && !route.children && !route.loadChildren &&\n (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': a componentless route without children or loadChildren cannot have a named outlet set\");\n }\n if (route.redirectTo && route.children) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': redirectTo and children cannot be used together\");\n }\n if (route.redirectTo && route.loadChildren) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': redirectTo and loadChildren cannot be used together\");\n }\n if (route.children && route.loadChildren) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': children and loadChildren cannot be used together\");\n }\n if (route.redirectTo && route.component) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': redirectTo and component cannot be used together\");\n }\n if (route.path && route.matcher) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': path and matcher cannot be used together\");\n }\n if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"'. One of the following must be provided: component, redirectTo, children or loadChildren\");\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': routes must have either a path or a matcher specified\");\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': path cannot start with a slash\");\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n var exp = \"The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.\";\n throw new Error(\"Invalid configuration of route '{path: \\\"\" + fullPath + \"\\\", redirectTo: \\\"\" + route.redirectTo + \"\\\"}': please provide 'pathMatch'. \" + exp);\n }\n if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': pathMatch can only be set to 'prefix' or 'full'\");\n }\n if (route.children) {\n validateConfig(route.children, fullPath);\n }\n}\nfunction getFullPath(parentPath, currentRoute) {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n }\n else if (parentPath && !currentRoute.path) {\n return parentPath + \"/\";\n }\n else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n }\n else {\n return parentPath + \"/\" + currentRoute.path;\n }\n}\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nfunction standardizeConfig(r) {\n var children = r.children && r.children.map(standardizeConfig);\n var c = children ? __assign(__assign({}, r), { children: children }) : __assign({}, r);\n if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n c.component = ɵEmptyOutletComponent;\n }\n return c;\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 */\nfunction shallowEqualArrays(a, b) {\n if (a.length !== b.length)\n return false;\n for (var i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i]))\n return false;\n }\n return true;\n}\nfunction shallowEqual(a, b) {\n // Casting Object.keys return values to include `undefined` as there are some cases\n // in IE 11 where this can happen. Cannot provide a test because the behavior only\n // exists in certain circumstances in IE 11, therefore doing this cast ensures the\n // logic is correct for when this edge case is hit.\n var k1 = Object.keys(a);\n var k2 = Object.keys(b);\n if (!k1 || !k2 || k1.length != k2.length) {\n return false;\n }\n var key;\n for (var i = 0; i < k1.length; i++) {\n key = k1[i];\n if (!equalArraysOrString(a[key], b[key])) {\n return false;\n }\n }\n return true;\n}\n/**\n * Test equality for arrays of strings or a string.\n */\nfunction equalArraysOrString(a, b) {\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length != b.length)\n return false;\n return a.every(function (aItem) { return b.indexOf(aItem) > -1; });\n }\n else {\n return a === b;\n }\n}\n/**\n * Flattens single-level nested arrays.\n */\nfunction flatten(arr) {\n return Array.prototype.concat.apply([], arr);\n}\n/**\n * Return the last element of an array.\n */\nfunction last(a) {\n return a.length > 0 ? a[a.length - 1] : null;\n}\n/**\n * Verifys all booleans in an array are `true`.\n */\nfunction and(bools) {\n return !bools.some(function (v) { return !v; });\n}\nfunction forEach(map, callback) {\n for (var prop in map) {\n if (map.hasOwnProperty(prop)) {\n callback(map[prop], prop);\n }\n }\n}\nfunction waitForMap(obj, fn) {\n if (Object.keys(obj).length === 0) {\n return of({});\n }\n var waitHead = [];\n var waitTail = [];\n var res = {};\n forEach(obj, function (a, k) {\n var mapped = fn(k, a).pipe(map(function (r) { return res[k] = r; }));\n if (k === PRIMARY_OUTLET) {\n waitHead.push(mapped);\n }\n else {\n waitTail.push(mapped);\n }\n });\n // Closure compiler has problem with using spread operator here. So we use \"Array.concat\".\n // Note that we also need to cast the new promise because TypeScript cannot infer the type\n // when calling the \"of\" function through \"Function.apply\"\n return of.apply(null, waitHead.concat(waitTail))\n .pipe(concatAll(), last$1(), map(function () { return res; }));\n}\nfunction wrapIntoObservable(value) {\n if (ɵisObservable(value)) {\n return value;\n }\n if (ɵisPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return from(Promise.resolve(value));\n }\n return of(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 */\nfunction createEmptyUrlTree() {\n return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\nfunction containsTree(container, containee, exact) {\n if (exact) {\n return equalQueryParams(container.queryParams, containee.queryParams) &&\n equalSegmentGroups(container.root, containee.root);\n }\n return containsQueryParams(container.queryParams, containee.queryParams) &&\n containsSegmentGroup(container.root, containee.root);\n}\nfunction equalQueryParams(container, containee) {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n}\nfunction equalSegmentGroups(container, containee) {\n if (!equalPath(container.segments, containee.segments))\n return false;\n if (container.numberOfChildren !== containee.numberOfChildren)\n return false;\n for (var c in containee.children) {\n if (!container.children[c])\n return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c]))\n return false;\n }\n return true;\n}\nfunction containsQueryParams(container, containee) {\n // TODO: This does not handle array params correctly.\n return Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every(function (key) { return equalArraysOrString(container[key], containee[key]); });\n}\nfunction containsSegmentGroup(container, containee) {\n return containsSegmentGroupHelper(container, containee, containee.segments);\n}\nfunction containsSegmentGroupHelper(container, containee, containeePaths) {\n if (container.segments.length > containeePaths.length) {\n var current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths))\n return false;\n if (containee.hasChildren())\n return false;\n return true;\n }\n else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths))\n return false;\n for (var c in containee.children) {\n if (!container.children[c])\n return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c]))\n return false;\n }\n return true;\n }\n else {\n var current = containeePaths.slice(0, container.segments.length);\n var next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current))\n return false;\n if (!container.children[PRIMARY_OUTLET])\n return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n }\n}\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nvar UrlTree = /** @class */ (function () {\n /** @internal */\n function UrlTree(\n /** The root segment group of the URL tree */\n root, \n /** The query params of the URL */\n queryParams, \n /** The fragment of the URL */\n fragment) {\n this.root = root;\n this.queryParams = queryParams;\n this.fragment = fragment;\n }\n Object.defineProperty(UrlTree.prototype, \"queryParamMap\", {\n get: function () {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n UrlTree.prototype.toString = function () {\n return DEFAULT_SERIALIZER.serialize(this);\n };\n return UrlTree;\n}());\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nvar UrlSegmentGroup = /** @class */ (function () {\n function UrlSegmentGroup(\n /** The URL segments of this group. See `UrlSegment` for more information */\n segments, \n /** The list of children of this group */\n children) {\n var _this = this;\n this.segments = segments;\n this.children = children;\n /** The parent node in the url tree */\n this.parent = null;\n forEach(children, function (v, k) { return v.parent = _this; });\n }\n /** Whether the segment has child segments */\n UrlSegmentGroup.prototype.hasChildren = function () {\n return this.numberOfChildren > 0;\n };\n Object.defineProperty(UrlSegmentGroup.prototype, \"numberOfChildren\", {\n /** Number of child segments */\n get: function () {\n return Object.keys(this.children).length;\n },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n UrlSegmentGroup.prototype.toString = function () {\n return serializePaths(this);\n };\n return UrlSegmentGroup;\n}());\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\nvar UrlSegment = /** @class */ (function () {\n function UrlSegment(\n /** The path part of a URL segment */\n path, \n /** The matrix parameters associated with a segment */\n parameters) {\n this.path = path;\n this.parameters = parameters;\n }\n Object.defineProperty(UrlSegment.prototype, \"parameterMap\", {\n get: function () {\n if (!this._parameterMap) {\n this._parameterMap = convertToParamMap(this.parameters);\n }\n return this._parameterMap;\n },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n UrlSegment.prototype.toString = function () {\n return serializePath(this);\n };\n return UrlSegment;\n}());\nfunction equalSegments(as, bs) {\n return equalPath(as, bs) && as.every(function (a, i) { return shallowEqual(a.parameters, bs[i].parameters); });\n}\nfunction equalPath(as, bs) {\n if (as.length !== bs.length)\n return false;\n return as.every(function (a, i) { return a.path === bs[i].path; });\n}\nfunction mapChildrenIntoArray(segment, fn) {\n var res = [];\n forEach(segment.children, function (child, childOutlet) {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n forEach(segment.children, function (child, childOutlet) {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n}\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nvar UrlSerializer = /** @class */ (function () {\n function UrlSerializer() {\n }\n return UrlSerializer;\n}());\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nvar DefaultUrlSerializer = /** @class */ (function () {\n function DefaultUrlSerializer() {\n }\n /** Parses a url into a `UrlTree` */\n DefaultUrlSerializer.prototype.parse = function (url) {\n var p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n };\n /** Converts a `UrlTree` into a url */\n DefaultUrlSerializer.prototype.serialize = function (tree) {\n var segment = \"/\" + serializeSegment(tree.root, true);\n var query = serializeQueryParams(tree.queryParams);\n var fragment = typeof tree.fragment === \"string\" ? \"#\" + encodeUriFragment(tree.fragment) : '';\n return \"\" + segment + query + fragment;\n };\n return DefaultUrlSerializer;\n}());\nvar DEFAULT_SERIALIZER = new DefaultUrlSerializer();\nfunction serializePaths(segment) {\n return segment.segments.map(function (p) { return serializePath(p); }).join('/');\n}\nfunction serializeSegment(segment, root) {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n if (root) {\n var primary = segment.children[PRIMARY_OUTLET] ?\n serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n '';\n var children_1 = [];\n forEach(segment.children, function (v, k) {\n if (k !== PRIMARY_OUTLET) {\n children_1.push(k + \":\" + serializeSegment(v, false));\n }\n });\n return children_1.length > 0 ? primary + \"(\" + children_1.join('//') + \")\" : primary;\n }\n else {\n var children = mapChildrenIntoArray(segment, function (v, k) {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n return [k + \":\" + serializeSegment(v, false)];\n });\n return serializePaths(segment) + \"/(\" + children.join('//') + \")\";\n }\n}\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\n}\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriQuery(s) {\n return encodeUriString(s).replace(/%3B/gi, ';');\n}\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriFragment(s) {\n return encodeURI(s);\n}\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriSegment(s) {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\nfunction decode(s) {\n return decodeURIComponent(s);\n}\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nfunction decodeQuery(s) {\n return decode(s.replace(/\\+/g, '%20'));\n}\nfunction serializePath(path) {\n return \"\" + encodeUriSegment(path.path) + serializeMatrixParams(path.parameters);\n}\nfunction serializeMatrixParams(params) {\n return Object.keys(params)\n .map(function (key) { return \";\" + encodeUriSegment(key) + \"=\" + encodeUriSegment(params[key]); })\n .join('');\n}\nfunction serializeQueryParams(params) {\n var strParams = Object.keys(params).map(function (name) {\n var value = params[name];\n return Array.isArray(value) ?\n value.map(function (v) { return encodeUriQuery(name) + \"=\" + encodeUriQuery(v); }).join('&') :\n encodeUriQuery(name) + \"=\" + encodeUriQuery(value);\n });\n return strParams.length ? \"?\" + strParams.join('&') : '';\n}\nvar SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str) {\n var match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\nvar QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str) {\n var match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\nvar QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str) {\n var match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\nvar UrlParser = /** @class */ (function () {\n function UrlParser(url) {\n this.url = url;\n this.remaining = url;\n }\n UrlParser.prototype.parseRootSegment = function () {\n this.consumeOptional('/');\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n };\n UrlParser.prototype.parseQueryParams = function () {\n var params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n };\n UrlParser.prototype.parseFragment = function () {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n };\n UrlParser.prototype.parseChildren = function () {\n if (this.remaining === '') {\n return {};\n }\n this.consumeOptional('/');\n var segments = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n var children = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n var res = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n return res;\n };\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n UrlParser.prototype.parseSegment = function () {\n var path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new Error(\"Empty path url segment cannot have parameters: '\" + this.remaining + \"'.\");\n }\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n };\n UrlParser.prototype.parseMatrixParams = function () {\n var params = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n };\n UrlParser.prototype.parseParam = function (params) {\n var key = matchSegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n var value = '';\n if (this.consumeOptional('=')) {\n var valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n params[decode(key)] = decode(value);\n };\n // Parse a single query parameter `name[=value]`\n UrlParser.prototype.parseQueryParam = function (params) {\n var key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n var value = '';\n if (this.consumeOptional('=')) {\n var valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n var decodedKey = decodeQuery(key);\n var decodedVal = decodeQuery(value);\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n var currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n }\n else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n };\n // parse `(a/b//outlet_name:c/d)`\n UrlParser.prototype.parseParens = function (allowPrimary) {\n var segments = {};\n this.capture('(');\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n var path = matchSegments(this.remaining);\n var next = this.remaining[path.length];\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new Error(\"Cannot parse url '\" + this.url + \"'\");\n }\n var outletName = undefined;\n if (path.indexOf(':') > -1) {\n outletName = path.substr(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n }\n else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n var children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n return segments;\n };\n UrlParser.prototype.peekStartsWith = function (str) {\n return this.remaining.startsWith(str);\n };\n // Consumes the prefix when it is present and returns whether it has been consumed\n UrlParser.prototype.consumeOptional = function (str) {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n };\n UrlParser.prototype.capture = function (str) {\n if (!this.consumeOptional(str)) {\n throw new Error(\"Expected \\\"\" + str + \"\\\".\");\n }\n };\n return UrlParser;\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 */\nvar Tree = /** @class */ (function () {\n function Tree(root) {\n this._root = root;\n }\n Object.defineProperty(Tree.prototype, \"root\", {\n get: function () {\n return this._root.value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @internal\n */\n Tree.prototype.parent = function (t) {\n var p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n };\n /**\n * @internal\n */\n Tree.prototype.children = function (t) {\n var n = findNode(t, this._root);\n return n ? n.children.map(function (t) { return t.value; }) : [];\n };\n /**\n * @internal\n */\n Tree.prototype.firstChild = function (t) {\n var n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n };\n /**\n * @internal\n */\n Tree.prototype.siblings = function (t) {\n var p = findPath(t, this._root);\n if (p.length < 2)\n return [];\n var c = p[p.length - 2].children.map(function (c) { return c.value; });\n return c.filter(function (cc) { return cc !== t; });\n };\n /**\n * @internal\n */\n Tree.prototype.pathFromRoot = function (t) {\n return findPath(t, this._root).map(function (s) { return s.value; });\n };\n return Tree;\n}());\n// DFS for the node matching the value\nfunction findNode(value, node) {\n var e_1, _a;\n if (value === node.value)\n return node;\n try {\n for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var node_1 = findNode(value, child);\n if (node_1)\n return node_1;\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 null;\n}\n// Return the path to the node with the given value using DFS\nfunction findPath(value, node) {\n var e_2, _a;\n if (value === node.value)\n return [node];\n try {\n for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\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 [];\n}\nvar TreeNode = /** @class */ (function () {\n function TreeNode(value, children) {\n this.value = value;\n this.children = children;\n }\n TreeNode.prototype.toString = function () {\n return \"TreeNode(\" + this.value + \")\";\n };\n return TreeNode;\n}());\n// Return the list of T indexed by outlet name\nfunction nodeChildrenAsMap(node) {\n var map = {};\n if (node) {\n node.children.forEach(function (child) { return map[child.value.outlet] = child; });\n }\n return map;\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 the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n *\n * @publicApi\n */\nvar RouterState = /** @class */ (function (_super) {\n __extends(RouterState, _super);\n /** @internal */\n function RouterState(root, \n /** The current snapshot of the router state */\n snapshot) {\n var _this = _super.call(this, root) || this;\n _this.snapshot = snapshot;\n setRouterState(_this, root);\n return _this;\n }\n RouterState.prototype.toString = function () {\n return this.snapshot.toString();\n };\n return RouterState;\n}(Tree));\nfunction createEmptyState(urlTree, rootComponent) {\n var snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n var emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n var emptyParams = new BehaviorSubject({});\n var emptyData = new BehaviorSubject({});\n var emptyQueryParams = new BehaviorSubject({});\n var fragment = new BehaviorSubject('');\n var activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode(activated, []), snapshot);\n}\nfunction createEmptyStateSnapshot(urlTree, rootComponent) {\n var emptyParams = {};\n var emptyData = {};\n var emptyQueryParams = {};\n var fragment = '';\n var activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, urlTree.root, -1, {});\n return new RouterStateSnapshot('', new TreeNode(activated, []));\n}\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n * header=\"activated-route.component.ts\"}\n *\n * @publicApi\n */\nvar ActivatedRoute = /** @class */ (function () {\n /** @internal */\n function ActivatedRoute(\n /** An observable of the URL segments matched by this route. */\n url, \n /** An observable of the matrix parameters scoped to this route. */\n params, \n /** An observable of the query parameters shared by all the routes. */\n queryParams, \n /** An observable of the URL fragment shared by all the routes. */\n fragment, \n /** An observable of the static and resolved data of this route. */\n data, \n /** The outlet name of the route, a constant. */\n outlet, \n /** The component of the route, a constant. */\n // TODO(vsavkin): remove |string\n component, futureSnapshot) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n this._futureSnapshot = futureSnapshot;\n }\n Object.defineProperty(ActivatedRoute.prototype, \"routeConfig\", {\n /** The configuration used to match this route. */\n get: function () {\n return this._futureSnapshot.routeConfig;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"root\", {\n /** The root of the router state. */\n get: function () {\n return this._routerState.root;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"parent\", {\n /** The parent of this route in the router state tree. */\n get: function () {\n return this._routerState.parent(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"firstChild\", {\n /** The first child of this route in the router state tree. */\n get: function () {\n return this._routerState.firstChild(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"children\", {\n /** The children of this route in the router state tree. */\n get: function () {\n return this._routerState.children(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"pathFromRoot\", {\n /** The path from the root of the router state tree to this route. */\n get: function () {\n return this._routerState.pathFromRoot(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"paramMap\", {\n /**\n * An Observable that contains a map of the required and optional parameters\n * specific to the route.\n * The map supports retrieving single and multiple values from the same parameter.\n */\n get: function () {\n if (!this._paramMap) {\n this._paramMap = this.params.pipe(map(function (p) { return convertToParamMap(p); }));\n }\n return this._paramMap;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"queryParamMap\", {\n /**\n * An Observable that contains a map of the query parameters available to all routes.\n * The map supports retrieving single and multiple values from the query parameter.\n */\n get: function () {\n if (!this._queryParamMap) {\n this._queryParamMap =\n this.queryParams.pipe(map(function (p) { return convertToParamMap(p); }));\n }\n return this._queryParamMap;\n },\n enumerable: true,\n configurable: true\n });\n ActivatedRoute.prototype.toString = function () {\n return this.snapshot ? this.snapshot.toString() : \"Future(\" + this._futureSnapshot + \")\";\n };\n return ActivatedRoute;\n}());\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nfunction inheritedParamsDataResolve(route, paramsInheritanceStrategy) {\n if (paramsInheritanceStrategy === void 0) { paramsInheritanceStrategy = 'emptyOnly'; }\n var pathFromRoot = route.pathFromRoot;\n var inheritingStartingFrom = 0;\n if (paramsInheritanceStrategy !== 'always') {\n inheritingStartingFrom = pathFromRoot.length - 1;\n while (inheritingStartingFrom >= 1) {\n var current = pathFromRoot[inheritingStartingFrom];\n var parent_1 = pathFromRoot[inheritingStartingFrom - 1];\n // current route is an empty path => inherits its parent's params and data\n if (current.routeConfig && current.routeConfig.path === '') {\n inheritingStartingFrom--;\n // parent is componentless => current route should inherit its params and data\n }\n else if (!parent_1.component) {\n inheritingStartingFrom--;\n }\n else {\n break;\n }\n }\n }\n return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n/** @internal */\nfunction flattenInherited(pathFromRoot) {\n return pathFromRoot.reduce(function (res, curr) {\n var params = __assign(__assign({}, res.params), curr.params);\n var data = __assign(__assign({}, res.data), curr.data);\n var resolve = __assign(__assign({}, res.resolve), curr._resolvedData);\n return { params: params, data: data, resolve: resolve };\n }, { params: {}, data: {}, resolve: {} });\n}\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\nvar ActivatedRouteSnapshot = /** @class */ (function () {\n /** @internal */\n function ActivatedRouteSnapshot(\n /** The URL segments matched by this route */\n url, \n /** The matrix parameters scoped to this route */\n params, \n /** The query parameters shared by all the routes */\n queryParams, \n /** The URL fragment shared by all the routes */\n fragment, \n /** The static and resolved data of this route */\n data, \n /** The outlet name of the route */\n outlet, \n /** The component of the route */\n component, routeConfig, urlSegment, lastPathIndex, resolve) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n this.routeConfig = routeConfig;\n this._urlSegment = urlSegment;\n this._lastPathIndex = lastPathIndex;\n this._resolve = resolve;\n }\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"root\", {\n /** The root of the router state */\n get: function () {\n return this._routerState.root;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"parent\", {\n /** The parent of this route in the router state tree */\n get: function () {\n return this._routerState.parent(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"firstChild\", {\n /** The first child of this route in the router state tree */\n get: function () {\n return this._routerState.firstChild(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"children\", {\n /** The children of this route in the router state tree */\n get: function () {\n return this._routerState.children(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"pathFromRoot\", {\n /** The path from the root of the router state tree to this route */\n get: function () {\n return this._routerState.pathFromRoot(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"paramMap\", {\n get: function () {\n if (!this._paramMap) {\n this._paramMap = convertToParamMap(this.params);\n }\n return this._paramMap;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"queryParamMap\", {\n get: function () {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n },\n enumerable: true,\n configurable: true\n });\n ActivatedRouteSnapshot.prototype.toString = function () {\n var url = this.url.map(function (segment) { return segment.toString(); }).join('/');\n var matched = this.routeConfig ? this.routeConfig.path : '';\n return \"Route(url:'\" + url + \"', path:'\" + matched + \"')\";\n };\n return ActivatedRouteSnapshot;\n}());\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\nvar RouterStateSnapshot = /** @class */ (function (_super) {\n __extends(RouterStateSnapshot, _super);\n /** @internal */\n function RouterStateSnapshot(\n /** The url from which this snapshot was created */\n url, root) {\n var _this = _super.call(this, root) || this;\n _this.url = url;\n setRouterState(_this, root);\n return _this;\n }\n RouterStateSnapshot.prototype.toString = function () {\n return serializeNode(this._root);\n };\n return RouterStateSnapshot;\n}(Tree));\nfunction setRouterState(state, node) {\n node.value._routerState = state;\n node.children.forEach(function (c) { return setRouterState(state, c); });\n}\nfunction serializeNode(node) {\n var c = node.children.length > 0 ? \" { \" + node.children.map(serializeNode).join(', ') + \" } \" : '';\n return \"\" + node.value + c;\n}\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nfunction advanceActivatedRoute(route) {\n if (route.snapshot) {\n var currentSnapshot = route.snapshot;\n var nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n route.queryParams.next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n route.fragment.next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n route.params.next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n route.url.next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n route.data.next(nextSnapshot.data);\n }\n }\n else {\n route.snapshot = route._futureSnapshot;\n // this is for resolved data\n route.data.next(route._futureSnapshot.data);\n }\n}\nfunction equalParamsAndUrlSegments(a, b) {\n var equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n var parentsMismatch = !a.parent !== !b.parent;\n return equalUrlParams && !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));\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 */\nfunction createRouterState(routeReuseStrategy, curr, prevState) {\n var root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\nfunction createNode(routeReuseStrategy, curr, prevState) {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n var value = prevState.value;\n value._futureSnapshot = curr.value;\n var children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode(value, children);\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n }\n else {\n var detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle) {\n var tree = detachedRouteHandle.route;\n setFutureSnapshotsOfActivatedRoutes(curr, tree);\n return tree;\n }\n else {\n var value = createActivatedRoute(curr.value);\n var children = curr.children.map(function (c) { return createNode(routeReuseStrategy, c); });\n return new TreeNode(value, children);\n }\n }\n}\nfunction setFutureSnapshotsOfActivatedRoutes(curr, result) {\n if (curr.value.routeConfig !== result.value.routeConfig) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n }\n if (curr.children.length !== result.children.length) {\n throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n }\n result.value._futureSnapshot = curr.value;\n for (var i = 0; i < curr.children.length; ++i) {\n setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n }\n}\nfunction createOrReuseChildren(routeReuseStrategy, curr, prevState) {\n return curr.children.map(function (child) {\n var e_1, _a;\n try {\n for (var _b = __values(prevState.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var p = _c.value;\n if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {\n return createNode(routeReuseStrategy, child, p);\n }\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 createNode(routeReuseStrategy, child);\n });\n}\nfunction createActivatedRoute(c) {\n return new ActivatedRoute(new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams), new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\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 */\nfunction createUrlTree(route, urlTree, commands, queryParams, fragment) {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n }\n var nav = computeNavigation(commands);\n if (nav.toRoot()) {\n return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n }\n var startingPosition = findStartingPosition(nav, urlTree, route);\n var segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\nfunction isMatrixParams(command) {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\nfunction tree(oldSegmentGroup, newSegmentGroup, urlTree, queryParams, fragment) {\n var qp = {};\n if (queryParams) {\n forEach(queryParams, function (value, name) {\n qp[name] = Array.isArray(value) ? value.map(function (v) { return \"\" + v; }) : \"\" + value;\n });\n }\n if (urlTree.root === oldSegmentGroup) {\n return new UrlTree(newSegmentGroup, qp, fragment);\n }\n return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\nfunction replaceSegment(current, oldSegment, newSegment) {\n var children = {};\n forEach(current.children, function (c, outletName) {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n }\n else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\nvar Navigation = /** @class */ (function () {\n function Navigation(isAbsolute, numberOfDoubleDots, commands) {\n this.isAbsolute = isAbsolute;\n this.numberOfDoubleDots = numberOfDoubleDots;\n this.commands = commands;\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new Error('Root segment cannot have matrix parameters');\n }\n var cmdWithOutlet = commands.find(function (c) { return typeof c === 'object' && c != null && c.outlets; });\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new Error('{outlets:{}} has to be the last command');\n }\n }\n Navigation.prototype.toRoot = function () {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n };\n return Navigation;\n}());\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands) {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n var numberOfDoubleDots = 0;\n var isAbsolute = false;\n var res = commands.reduce(function (res, cmd, cmdIdx) {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n var outlets_1 = {};\n forEach(cmd.outlets, function (commands, name) {\n outlets_1[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return __spread(res, [{ outlets: outlets_1 }]);\n }\n if (cmd.segmentPath) {\n return __spread(res, [cmd.segmentPath]);\n }\n }\n if (!(typeof cmd === 'string')) {\n return __spread(res, [cmd]);\n }\n if (cmdIdx === 0) {\n cmd.split('/').forEach(function (urlPart, partIndex) {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n }\n else if (partIndex == 0 && urlPart === '') { // '/a'\n isAbsolute = true;\n }\n else if (urlPart === '..') { // '../a'\n numberOfDoubleDots++;\n }\n else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n return res;\n }\n return __spread(res, [cmd]);\n }, []);\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\nvar Position = /** @class */ (function () {\n function Position(segmentGroup, processChildren, index) {\n this.segmentGroup = segmentGroup;\n this.processChildren = processChildren;\n this.index = index;\n }\n return Position;\n}());\nfunction findStartingPosition(nav, tree, route) {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n if (route.snapshot._lastPathIndex === -1) {\n return new Position(route.snapshot._urlSegment, true, 0);\n }\n var modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n var index = route.snapshot._lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\nfunction createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {\n var g = group;\n var ci = index;\n var dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent;\n if (!g) {\n throw new Error('Invalid number of \\'../\\'');\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n}\nfunction getPath(command) {\n if (typeof command === 'object' && command != null && command.outlets) {\n return command.outlets[PRIMARY_OUTLET];\n }\n return \"\" + command;\n}\nfunction getOutlets(commands) {\n var _a, _b;\n if (!(typeof commands[0] === 'object'))\n return _a = {}, _a[PRIMARY_OUTLET] = commands, _a;\n if (commands[0].outlets === undefined)\n return _b = {}, _b[PRIMARY_OUTLET] = commands, _b;\n return commands[0].outlets;\n}\nfunction updateSegmentGroup(segmentGroup, startIndex, commands) {\n if (!segmentGroup) {\n segmentGroup = new UrlSegmentGroup([], {});\n }\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n var m = prefixedWith(segmentGroup, startIndex, commands);\n var slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n var g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] =\n new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n }\n else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n }\n else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n }\n else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\nfunction updateSegmentGroupChildren(segmentGroup, startIndex, commands) {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n }\n else {\n var outlets_2 = getOutlets(commands);\n var children_1 = {};\n forEach(outlets_2, function (commands, outlet) {\n if (commands !== null) {\n children_1[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n forEach(segmentGroup.children, function (child, childOutlet) {\n if (outlets_2[childOutlet] === undefined) {\n children_1[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children_1);\n }\n}\nfunction prefixedWith(segmentGroup, startIndex, commands) {\n var currentCommandIndex = 0;\n var currentPathIndex = startIndex;\n var noMatch = { match: false, pathIndex: 0, commandIndex: 0 };\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length)\n return noMatch;\n var path = segmentGroup.segments[currentPathIndex];\n var curr = getPath(commands[currentCommandIndex]);\n var next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n if (currentPathIndex > 0 && curr === undefined)\n break;\n if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n if (!compare(curr, next, path))\n return noMatch;\n currentCommandIndex += 2;\n }\n else {\n if (!compare(curr, {}, path))\n return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n return { match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex };\n}\nfunction createNewSegmentGroup(segmentGroup, startIndex, commands) {\n var paths = segmentGroup.segments.slice(0, startIndex);\n var i = 0;\n while (i < commands.length) {\n if (typeof commands[i] === 'object' && commands[i].outlets !== undefined) {\n var children = createNewSegmentChildren(commands[i].outlets);\n return new UrlSegmentGroup(paths, children);\n }\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n var p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, commands[0]));\n i++;\n continue;\n }\n var curr = getPath(commands[i]);\n var next = (i < commands.length - 1) ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n }\n else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\nfunction createNewSegmentChildren(outlets) {\n var children = {};\n forEach(outlets, function (commands, outlet) {\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\nfunction stringify(params) {\n var res = {};\n forEach(params, function (v, k) { return res[k] = \"\" + v; });\n return res;\n}\nfunction compare(path, params, segment) {\n return path == segment.path && shallowEqual(params, segment.parameters);\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 */\nvar activateRoutes = function (rootContexts, routeReuseStrategy, forwardEvent) {\n return map(function (t) {\n new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent)\n .activate(rootContexts);\n return t;\n });\n};\nvar ActivateRoutes = /** @class */ (function () {\n function ActivateRoutes(routeReuseStrategy, futureState, currState, forwardEvent) {\n this.routeReuseStrategy = routeReuseStrategy;\n this.futureState = futureState;\n this.currState = currState;\n this.forwardEvent = forwardEvent;\n }\n ActivateRoutes.prototype.activate = function (parentContexts) {\n var futureRoot = this.futureState._root;\n var currRoot = this.currState ? this.currState._root : null;\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n };\n // De-activate the child route that are not re-used for the future state\n ActivateRoutes.prototype.deactivateChildRoutes = function (futureNode, currNode, contexts) {\n var _this = this;\n var children = nodeChildrenAsMap(currNode);\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(function (futureChild) {\n var childOutletName = futureChild.value.outlet;\n _this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n // De-activate the routes that will not be re-used\n forEach(children, function (v, childName) {\n _this.deactivateRouteAndItsChildren(v, contexts);\n });\n };\n ActivateRoutes.prototype.deactivateRoutes = function (futureNode, currNode, parentContext) {\n var future = futureNode.value;\n var curr = currNode ? currNode.value : null;\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n var context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n }\n else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n };\n ActivateRoutes.prototype.deactivateRouteAndItsChildren = function (route, parentContexts) {\n if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n }\n else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n };\n ActivateRoutes.prototype.detachAndStoreRouteSubtree = function (route, parentContexts) {\n var context = parentContexts.getContext(route.value.outlet);\n if (context && context.outlet) {\n var componentRef = context.outlet.detach();\n var contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, { componentRef: componentRef, route: route, contexts: contexts });\n }\n };\n ActivateRoutes.prototype.deactivateRouteAndOutlet = function (route, parentContexts) {\n var _this = this;\n var context = parentContexts.getContext(route.value.outlet);\n if (context) {\n var children = nodeChildrenAsMap(route);\n var contexts_1 = route.value.component ? context.children : parentContexts;\n forEach(children, function (v, k) { return _this.deactivateRouteAndItsChildren(v, contexts_1); });\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n }\n };\n ActivateRoutes.prototype.activateChildRoutes = function (futureNode, currNode, contexts) {\n var _this = this;\n var children = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(function (c) {\n _this.activateRoutes(c, children[c.value.outlet], contexts);\n _this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n };\n ActivateRoutes.prototype.activateRoutes = function (futureNode, currNode, parentContexts) {\n var future = futureNode.value;\n var curr = currNode ? currNode.value : null;\n advanceActivatedRoute(future);\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n var context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n }\n else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n var context = parentContexts.getOrCreateContext(future.outlet);\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n var stored = this.routeReuseStrategy.retrieve(future.snapshot);\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRouteNodeAndItsChildren(stored.route);\n }\n else {\n var config = parentLoadedConfig(future.snapshot);\n var cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n context.attachRef = null;\n context.route = future;\n context.resolver = cmpFactoryResolver;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, cmpFactoryResolver);\n }\n this.activateChildRoutes(futureNode, null, context.children);\n }\n }\n else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n };\n return ActivateRoutes;\n}());\nfunction advanceActivatedRouteNodeAndItsChildren(node) {\n advanceActivatedRoute(node.value);\n node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\nfunction parentLoadedConfig(snapshot) {\n for (var s = snapshot.parent; s; s = s.parent) {\n var route = s.routeConfig;\n if (route && route._loadedConfig)\n return route._loadedConfig;\n if (route && route.component)\n return null;\n }\n return 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 * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\nfunction isFunction(v) {\n return typeof v === 'function';\n}\nfunction isBoolean(v) {\n return typeof v === 'boolean';\n}\nfunction isUrlTree(v) {\n return v instanceof UrlTree;\n}\nfunction isCanLoad(guard) {\n return guard && isFunction(guard.canLoad);\n}\nfunction isCanActivate(guard) {\n return guard && isFunction(guard.canActivate);\n}\nfunction isCanActivateChild(guard) {\n return guard && isFunction(guard.canActivateChild);\n}\nfunction isCanDeactivate(guard) {\n return guard && isFunction(guard.canDeactivate);\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 */\nvar NoMatch = /** @class */ (function () {\n function NoMatch(segmentGroup) {\n this.segmentGroup = segmentGroup || null;\n }\n return NoMatch;\n}());\nvar AbsoluteRedirect = /** @class */ (function () {\n function AbsoluteRedirect(urlTree) {\n this.urlTree = urlTree;\n }\n return AbsoluteRedirect;\n}());\nfunction noMatch(segmentGroup) {\n return new Observable(function (obs) { return obs.error(new NoMatch(segmentGroup)); });\n}\nfunction absoluteRedirect(newTree) {\n return new Observable(function (obs) { return obs.error(new AbsoluteRedirect(newTree)); });\n}\nfunction namedOutletsRedirect(redirectTo) {\n return new Observable(function (obs) { return obs.error(new Error(\"Only absolute redirects can have named outlets. redirectTo: '\" + redirectTo + \"'\")); });\n}\nfunction canLoadFails(route) {\n return new Observable(function (obs) { return obs.error(navigationCancelingError(\"Cannot load children because the guard of the route \\\"path: '\" + route.path + \"'\\\" returned false\")); });\n}\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nfunction applyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {\n return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\nvar ApplyRedirects = /** @class */ (function () {\n function ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {\n this.configLoader = configLoader;\n this.urlSerializer = urlSerializer;\n this.urlTree = urlTree;\n this.config = config;\n this.allowRedirects = true;\n this.ngModule = moduleInjector.get(NgModuleRef);\n }\n ApplyRedirects.prototype.apply = function () {\n var _this = this;\n var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);\n var urlTrees$ = expanded$.pipe(map(function (rootSegmentGroup) { return _this.createUrlTree(rootSegmentGroup, _this.urlTree.queryParams, _this.urlTree.fragment); }));\n return urlTrees$.pipe(catchError(function (e) {\n if (e instanceof AbsoluteRedirect) {\n // after an absolute redirect we do not apply any more redirects!\n _this.allowRedirects = false;\n // we need to run matching, so we can fetch all lazy-loaded modules\n return _this.match(e.urlTree);\n }\n if (e instanceof NoMatch) {\n throw _this.noMatchError(e);\n }\n throw e;\n }));\n };\n ApplyRedirects.prototype.match = function (tree) {\n var _this = this;\n var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n var mapped$ = expanded$.pipe(map(function (rootSegmentGroup) {\n return _this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment);\n }));\n return mapped$.pipe(catchError(function (e) {\n if (e instanceof NoMatch) {\n throw _this.noMatchError(e);\n }\n throw e;\n }));\n };\n ApplyRedirects.prototype.noMatchError = function (e) {\n return new Error(\"Cannot match any routes. URL Segment: '\" + e.segmentGroup + \"'\");\n };\n ApplyRedirects.prototype.createUrlTree = function (rootCandidate, queryParams, fragment) {\n var _a;\n var root = rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], (_a = {}, _a[PRIMARY_OUTLET] = rootCandidate, _a)) :\n rootCandidate;\n return new UrlTree(root, queryParams, fragment);\n };\n ApplyRedirects.prototype.expandSegmentGroup = function (ngModule, routes, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(ngModule, routes, segmentGroup)\n .pipe(map(function (children) { return new UrlSegmentGroup([], children); }));\n }\n return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n };\n // Recursively expand segment groups for all the child outlets\n ApplyRedirects.prototype.expandChildren = function (ngModule, routes, segmentGroup) {\n var _this = this;\n return waitForMap(segmentGroup.children, function (childOutlet, child) { return _this.expandSegmentGroup(ngModule, routes, child, childOutlet); });\n };\n ApplyRedirects.prototype.expandSegment = function (ngModule, segmentGroup, routes, segments, outlet, allowRedirects) {\n var _this = this;\n return of.apply(void 0, __spread(routes)).pipe(map(function (r) {\n var expanded$ = _this.expandSegmentAgainstRoute(ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(catchError(function (e) {\n if (e instanceof NoMatch) {\n // TODO(i): this return type doesn't match the declared Observable -\n // talk to Jason\n return of(null);\n }\n throw e;\n }));\n }), concatAll(), first(function (s) { return !!s; }), catchError(function (e, _) {\n if (e instanceof EmptyError || e.name === 'EmptyError') {\n if (_this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of(new UrlSegmentGroup([], {}));\n }\n throw new NoMatch(segmentGroup);\n }\n throw e;\n }));\n };\n ApplyRedirects.prototype.noLeftoversInUrl = function (segmentGroup, segments, outlet) {\n return segments.length === 0 && !segmentGroup.children[outlet];\n };\n ApplyRedirects.prototype.expandSegmentAgainstRoute = function (ngModule, segmentGroup, routes, route, paths, outlet, allowRedirects) {\n if (getOutlet(route) !== outlet) {\n return noMatch(segmentGroup);\n }\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);\n }\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, paths, outlet);\n }\n return noMatch(segmentGroup);\n };\n ApplyRedirects.prototype.expandSegmentAgainstRouteUsingRedirect = function (ngModule, segmentGroup, routes, route, segments, outlet) {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet);\n }\n return this.expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet);\n };\n ApplyRedirects.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect = function (ngModule, routes, route, outlet) {\n var _this = this;\n var newTree = this.applyRedirectCommands([], route.redirectTo, {});\n if (route.redirectTo.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n return this.lineralizeSegments(route, newTree).pipe(mergeMap(function (newSegments) {\n var group = new UrlSegmentGroup(newSegments, {});\n return _this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n }));\n };\n ApplyRedirects.prototype.expandRegularSegmentAgainstRouteUsingRedirect = function (ngModule, segmentGroup, routes, route, segments, outlet) {\n var _this = this;\n var _a = match(segmentGroup, route, segments), matched = _a.matched, consumedSegments = _a.consumedSegments, lastChild = _a.lastChild, positionalParamSegments = _a.positionalParamSegments;\n if (!matched)\n return noMatch(segmentGroup);\n var newTree = this.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments);\n if (route.redirectTo.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n return this.lineralizeSegments(route, newTree).pipe(mergeMap(function (newSegments) {\n return _this.expandSegment(ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet, false);\n }));\n };\n ApplyRedirects.prototype.matchSegmentAgainstRoute = function (ngModule, rawSegmentGroup, route, segments) {\n var _this = this;\n if (route.path === '**') {\n if (route.loadChildren) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map(function (cfg) {\n route._loadedConfig = cfg;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n return of(new UrlSegmentGroup(segments, {}));\n }\n var _a = match(rawSegmentGroup, route, segments), matched = _a.matched, consumedSegments = _a.consumedSegments, lastChild = _a.lastChild;\n if (!matched)\n return noMatch(rawSegmentGroup);\n var rawSlicedSegments = segments.slice(lastChild);\n var childConfig$ = this.getChildConfig(ngModule, route, segments);\n return childConfig$.pipe(mergeMap(function (routerConfig) {\n var childModule = routerConfig.module;\n var childConfig = routerConfig.routes;\n var _a = split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig), segmentGroup = _a.segmentGroup, slicedSegments = _a.slicedSegments;\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n var expanded$_1 = _this.expandChildren(childModule, childConfig, segmentGroup);\n return expanded$_1.pipe(map(function (children) { return new UrlSegmentGroup(consumedSegments, children); }));\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of(new UrlSegmentGroup(consumedSegments, {}));\n }\n var expanded$ = _this.expandSegment(childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);\n return expanded$.pipe(map(function (cs) {\n return new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children);\n }));\n }));\n };\n ApplyRedirects.prototype.getChildConfig = function (ngModule, route, segments) {\n var _this = this;\n if (route.children) {\n // The children belong to the same module\n return of(new LoadedRouterConfig(route.children, ngModule));\n }\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedConfig !== undefined) {\n return of(route._loadedConfig);\n }\n return runCanLoadGuard(ngModule.injector, route, segments)\n .pipe(mergeMap(function (shouldLoad) {\n if (shouldLoad) {\n return _this.configLoader.load(ngModule.injector, route)\n .pipe(map(function (cfg) {\n route._loadedConfig = cfg;\n return cfg;\n }));\n }\n return canLoadFails(route);\n }));\n }\n return of(new LoadedRouterConfig([], ngModule));\n };\n ApplyRedirects.prototype.lineralizeSegments = function (route, urlTree) {\n var res = [];\n var c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of(res);\n }\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(route.redirectTo);\n }\n c = c.children[PRIMARY_OUTLET];\n }\n };\n ApplyRedirects.prototype.applyRedirectCommands = function (segments, redirectTo, posParams) {\n return this.applyRedirectCreatreUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n };\n ApplyRedirects.prototype.applyRedirectCreatreUrlTree = function (redirectTo, urlTree, segments, posParams) {\n var newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);\n };\n ApplyRedirects.prototype.createQueryParams = function (redirectToParams, actualParams) {\n var res = {};\n forEach(redirectToParams, function (v, k) {\n var copySourceValue = typeof v === 'string' && v.startsWith(':');\n if (copySourceValue) {\n var sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n }\n else {\n res[k] = v;\n }\n });\n return res;\n };\n ApplyRedirects.prototype.createSegmentGroup = function (redirectTo, group, segments, posParams) {\n var _this = this;\n var updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n var children = {};\n forEach(group.children, function (child, name) {\n children[name] = _this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n return new UrlSegmentGroup(updatedSegments, children);\n };\n ApplyRedirects.prototype.createSegments = function (redirectTo, redirectToSegments, actualSegments, posParams) {\n var _this = this;\n return redirectToSegments.map(function (s) { return s.path.startsWith(':') ? _this.findPosParam(redirectTo, s, posParams) :\n _this.findOrReturn(s, actualSegments); });\n };\n ApplyRedirects.prototype.findPosParam = function (redirectTo, redirectToUrlSegment, posParams) {\n var pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new Error(\"Cannot redirect to '\" + redirectTo + \"'. Cannot find '\" + redirectToUrlSegment.path + \"'.\");\n return pos;\n };\n ApplyRedirects.prototype.findOrReturn = function (redirectToUrlSegment, actualSegments) {\n var e_1, _a;\n var idx = 0;\n try {\n for (var actualSegments_1 = __values(actualSegments), actualSegments_1_1 = actualSegments_1.next(); !actualSegments_1_1.done; actualSegments_1_1 = actualSegments_1.next()) {\n var s = actualSegments_1_1.value;\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (actualSegments_1_1 && !actualSegments_1_1.done && (_a = actualSegments_1.return)) _a.call(actualSegments_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return redirectToUrlSegment;\n };\n return ApplyRedirects;\n}());\nfunction runCanLoadGuard(moduleInjector, route, segments) {\n var canLoad = route.canLoad;\n if (!canLoad || canLoad.length === 0)\n return of(true);\n var obs = from(canLoad).pipe(map(function (injectionToken) {\n var guard = moduleInjector.get(injectionToken);\n var guardVal;\n if (isCanLoad(guard)) {\n guardVal = guard.canLoad(route, segments);\n }\n else if (isFunction(guard)) {\n guardVal = guard(route, segments);\n }\n else {\n throw new Error('Invalid CanLoad guard');\n }\n return wrapIntoObservable(guardVal);\n }));\n return obs.pipe(concatAll(), every(function (result) { return result === true; }));\n}\nfunction match(segmentGroup, route, segments) {\n if (route.path === '') {\n if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {\n return { matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {} };\n }\n return { matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {} };\n }\n var matcher = route.matcher || defaultUrlMatcher;\n var res = matcher(segments, segmentGroup, route);\n if (!res) {\n return {\n matched: false,\n consumedSegments: [],\n lastChild: 0,\n positionalParamSegments: {},\n };\n }\n return {\n matched: true,\n consumedSegments: res.consumed,\n lastChild: res.consumed.length,\n positionalParamSegments: res.posParams,\n };\n}\nfunction split(segmentGroup, consumedSegments, slicedSegments, config) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n var s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptySegments(config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n return { segmentGroup: mergeTrivialChildren(s), slicedSegments: [] };\n }\n if (slicedSegments.length === 0 &&\n containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {\n var s = new UrlSegmentGroup(segmentGroup.segments, addEmptySegmentsToChildrenIfNeeded(segmentGroup, slicedSegments, config, segmentGroup.children));\n return { segmentGroup: mergeTrivialChildren(s), slicedSegments: slicedSegments };\n }\n return { segmentGroup: segmentGroup, slicedSegments: slicedSegments };\n}\nfunction mergeTrivialChildren(s) {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n var c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n return s;\n}\nfunction addEmptySegmentsToChildrenIfNeeded(segmentGroup, slicedSegments, routes, children) {\n var e_2, _a;\n var res = {};\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var r = routes_1_1.value;\n if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return __assign(__assign({}, children), res);\n}\nfunction createChildrenForEmptySegments(routes, primarySegmentGroup) {\n var e_3, _a;\n var res = {};\n res[PRIMARY_OUTLET] = primarySegmentGroup;\n try {\n for (var routes_2 = __values(routes), routes_2_1 = routes_2.next(); !routes_2_1.done; routes_2_1 = routes_2.next()) {\n var r = routes_2_1.value;\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (routes_2_1 && !routes_2_1.done && (_a = routes_2.return)) _a.call(routes_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return res;\n}\nfunction containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, segments, routes) {\n return routes.some(function (r) { return isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET; });\n}\nfunction containsEmptyPathRedirects(segmentGroup, segments, routes) {\n return routes.some(function (r) { return isEmptyPathRedirect(segmentGroup, segments, r); });\n}\nfunction isEmptyPathRedirect(segmentGroup, segments, r) {\n if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n return r.path === '' && r.redirectTo !== undefined;\n}\nfunction getOutlet(route) {\n return route.outlet || PRIMARY_OUTLET;\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 */\nfunction applyRedirects$1(moduleInjector, configLoader, urlSerializer, config) {\n return function (source) {\n return source.pipe(switchMap(function (t) { return applyRedirects(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n .pipe(map(function (urlAfterRedirects) { return (__assign(__assign({}, t), { urlAfterRedirects: urlAfterRedirects })); })); }));\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 */\nvar CanActivate = /** @class */ (function () {\n function CanActivate(path) {\n this.path = path;\n this.route = this.path[this.path.length - 1];\n }\n return CanActivate;\n}());\nvar CanDeactivate = /** @class */ (function () {\n function CanDeactivate(component, route) {\n this.component = component;\n this.route = route;\n }\n return CanDeactivate;\n}());\nfunction getAllRouteGuards(future, curr, parentContexts) {\n var futureRoot = future._root;\n var currRoot = curr ? curr._root : null;\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\nfunction getCanActivateChild(p) {\n var canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0)\n return null;\n return { node: p, guards: canActivateChild };\n}\nfunction getToken(token, snapshot, moduleInjector) {\n var config = getClosestLoadedConfig(snapshot);\n var injector = config ? config.module.injector : moduleInjector;\n return injector.get(token);\n}\nfunction getClosestLoadedConfig(snapshot) {\n if (!snapshot)\n return null;\n for (var s = snapshot.parent; s; s = s.parent) {\n var route = s.routeConfig;\n if (route && route._loadedConfig)\n return route._loadedConfig;\n }\n return null;\n}\nfunction getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks) {\n if (checks === void 0) { checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }; }\n var prevChildren = nodeChildrenAsMap(currNode);\n // Process the children of the future route\n futureNode.children.forEach(function (c) {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n // Process any children left from the current route (not active for the future route)\n forEach(prevChildren, function (v, k) {\n return deactivateRouteAndItsChildren(v, contexts.getContext(k), checks);\n });\n return checks;\n}\nfunction getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks) {\n if (checks === void 0) { checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n }; }\n var future = futureNode.value;\n var curr = currNode ? currNode.value : null;\n var context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n var shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n }\n else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n }\n else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n if (shouldRun) {\n var component = context && context.outlet && context.outlet.component || null;\n checks.canDeactivateChecks.push(new CanDeactivate(component, curr));\n }\n }\n else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n }\n else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n return checks;\n}\nfunction shouldRunGuardsAndResolvers(curr, future, mode) {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n case 'always':\n return true;\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n}\nfunction deactivateRouteAndItsChildren(route, context, checks) {\n var children = nodeChildrenAsMap(route);\n var r = route.value;\n forEach(children, function (node, childName) {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n }\n else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n }\n else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n }\n else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\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 */\nvar INITIAL_VALUE = Symbol('INITIAL_VALUE');\nfunction prioritizedGuardValue() {\n return switchMap(function (obs) {\n return combineLatest.apply(void 0, __spread(obs.map(function (o) { return o.pipe(take(1), startWith(INITIAL_VALUE)); }))).pipe(scan(function (acc, list) {\n var isPending = false;\n return list.reduce(function (innerAcc, val, i) {\n if (innerAcc !== INITIAL_VALUE)\n return innerAcc;\n // Toggle pending flag if any values haven't been set yet\n if (val === INITIAL_VALUE)\n isPending = true;\n // Any other return values are only valid if we haven't yet hit a pending\n // call. This guarantees that in the case of a guard at the bottom of the\n // tree that returns a redirect, we will wait for the higher priority\n // guard at the top to finish before performing the redirect.\n if (!isPending) {\n // Early return when we hit a `false` value as that should always\n // cancel navigation\n if (val === false)\n return val;\n if (i === list.length - 1 || isUrlTree(val)) {\n return val;\n }\n }\n return innerAcc;\n }, acc);\n }, INITIAL_VALUE), filter(function (item) { return item !== INITIAL_VALUE; }), map(function (item) { return isUrlTree(item) ? item : item === true; }), //\n take(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 */\nfunction checkGuards(moduleInjector, forwardEvent) {\n return function (source) {\n return source.pipe(mergeMap(function (t) {\n var targetSnapshot = t.targetSnapshot, currentSnapshot = t.currentSnapshot, _a = t.guards, canActivateChecks = _a.canActivateChecks, canDeactivateChecks = _a.canDeactivateChecks;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return of(__assign(__assign({}, t), { guardsResult: true }));\n }\n return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, moduleInjector)\n .pipe(mergeMap(function (canDeactivate) {\n return canDeactivate && isBoolean(canDeactivate) ?\n runCanActivateChecks(targetSnapshot, canActivateChecks, moduleInjector, forwardEvent) :\n of(canDeactivate);\n }), map(function (guardsResult) { return (__assign(__assign({}, t), { guardsResult: guardsResult })); }));\n }));\n };\n}\nfunction runCanDeactivateChecks(checks, futureRSS, currRSS, moduleInjector) {\n return from(checks).pipe(mergeMap(function (check) {\n return runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector);\n }), first(function (result) {\n return result !== true;\n }, true));\n}\nfunction runCanActivateChecks(futureSnapshot, checks, moduleInjector, forwardEvent) {\n return from(checks).pipe(concatMap(function (check) {\n return from([\n fireChildActivationStart(check.route.parent, forwardEvent),\n fireActivationStart(check.route, forwardEvent),\n runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n runCanActivate(futureSnapshot, check.route, moduleInjector)\n ])\n .pipe(concatAll(), first(function (result) {\n return result !== true;\n }, true));\n }), first(function (result) {\n return result !== true;\n }, true));\n}\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return of(true);\n}\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return of(true);\n}\nfunction runCanActivate(futureRSS, futureARS, moduleInjector) {\n var canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0)\n return of(true);\n var canActivateObservables = canActivate.map(function (c) {\n return defer(function () {\n var guard = getToken(c, futureARS, moduleInjector);\n var observable;\n if (isCanActivate(guard)) {\n observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n }\n else if (isFunction(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n }\n else {\n throw new Error('Invalid CanActivate guard');\n }\n return observable.pipe(first());\n });\n });\n return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanActivateChild(futureRSS, path, moduleInjector) {\n var futureARS = path[path.length - 1];\n var canActivateChildGuards = path.slice(0, path.length - 1)\n .reverse()\n .map(function (p) { return getCanActivateChild(p); })\n .filter(function (_) { return _ !== null; });\n var canActivateChildGuardsMapped = canActivateChildGuards.map(function (d) {\n return defer(function () {\n var guardsMapped = d.guards.map(function (c) {\n var guard = getToken(c, d.node, moduleInjector);\n var observable;\n if (isCanActivateChild(guard)) {\n observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n }\n else if (isFunction(guard)) {\n observable = wrapIntoObservable(guard(futureARS, futureRSS));\n }\n else {\n throw new Error('Invalid CanActivateChild guard');\n }\n return observable.pipe(first());\n });\n return of(guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\nfunction runCanDeactivate(component, currARS, currRSS, futureRSS, moduleInjector) {\n var canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0)\n return of(true);\n var canDeactivateObservables = canDeactivate.map(function (c) {\n var guard = getToken(c, currARS, moduleInjector);\n var observable;\n if (isCanDeactivate(guard)) {\n observable = wrapIntoObservable(guard.canDeactivate(component, currARS, currRSS, futureRSS));\n }\n else if (isFunction(guard)) {\n observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n }\n else {\n throw new Error('Invalid CanDeactivate guard');\n }\n return observable.pipe(first());\n });\n return of(canDeactivateObservables).pipe(prioritizedGuardValue());\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 */\nvar NoMatch$1 = /** @class */ (function () {\n function NoMatch() {\n }\n return NoMatch;\n}());\nfunction recognize(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) {\n if (paramsInheritanceStrategy === void 0) { paramsInheritanceStrategy = 'emptyOnly'; }\n if (relativeLinkResolution === void 0) { relativeLinkResolution = 'legacy'; }\n return new Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution)\n .recognize();\n}\nvar Recognizer = /** @class */ (function () {\n function Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy, relativeLinkResolution) {\n this.rootComponentType = rootComponentType;\n this.config = config;\n this.urlTree = urlTree;\n this.url = url;\n this.paramsInheritanceStrategy = paramsInheritanceStrategy;\n this.relativeLinkResolution = relativeLinkResolution;\n }\n Recognizer.prototype.recognize = function () {\n try {\n var rootSegmentGroup = split$1(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;\n var children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n var root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n var rootNode = new TreeNode(root, children);\n var routeState = new RouterStateSnapshot(this.url, rootNode);\n this.inheritParamsAndData(routeState._root);\n return of(routeState);\n }\n catch (e) {\n return new Observable(function (obs) { return obs.error(e); });\n }\n };\n Recognizer.prototype.inheritParamsAndData = function (routeNode) {\n var _this = this;\n var route = routeNode.value;\n var i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n route.params = Object.freeze(i.params);\n route.data = Object.freeze(i.data);\n routeNode.children.forEach(function (n) { return _this.inheritParamsAndData(n); });\n };\n Recognizer.prototype.processSegmentGroup = function (config, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(config, segmentGroup);\n }\n return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n };\n Recognizer.prototype.processChildren = function (config, segmentGroup) {\n var _this = this;\n var children = mapChildrenIntoArray(segmentGroup, function (child, childOutlet) { return _this.processSegmentGroup(config, child, childOutlet); });\n checkOutletNameUniqueness(children);\n sortActivatedRouteSnapshots(children);\n return children;\n };\n Recognizer.prototype.processSegment = function (config, segmentGroup, segments, outlet) {\n var e_1, _a;\n try {\n for (var config_1 = __values(config), config_1_1 = config_1.next(); !config_1_1.done; config_1_1 = config_1.next()) {\n var r = config_1_1.value;\n try {\n return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n }\n catch (e) {\n if (!(e instanceof NoMatch$1))\n throw e;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (config_1_1 && !config_1_1.done && (_a = config_1.return)) _a.call(config_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return [];\n }\n throw new NoMatch$1();\n };\n Recognizer.prototype.noLeftoversInUrl = function (segmentGroup, segments, outlet) {\n return segments.length === 0 && !segmentGroup.children[outlet];\n };\n Recognizer.prototype.processSegmentAgainstRoute = function (route, rawSegment, segments, outlet) {\n if (route.redirectTo)\n throw new NoMatch$1();\n if ((route.outlet || PRIMARY_OUTLET) !== outlet)\n throw new NoMatch$1();\n var snapshot;\n var consumedSegments = [];\n var rawSlicedSegments = [];\n if (route.path === '**') {\n var params = segments.length > 0 ? last(segments).parameters : {};\n snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), outlet, route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n }\n else {\n var result = match$1(rawSegment, route, segments);\n consumedSegments = result.consumedSegments;\n rawSlicedSegments = segments.slice(result.lastChild);\n snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(__assign({}, this.urlTree.queryParams)), this.urlTree.fragment, getData(route), outlet, route.component, route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n }\n var childConfig = getChildConfig(route);\n var _a = split$1(rawSegment, consumedSegments, rawSlicedSegments, childConfig, this.relativeLinkResolution), segmentGroup = _a.segmentGroup, slicedSegments = _a.slicedSegments;\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n var children_1 = this.processChildren(childConfig, segmentGroup);\n return [new TreeNode(snapshot, children_1)];\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return [new TreeNode(snapshot, [])];\n }\n var children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);\n return [new TreeNode(snapshot, children)];\n };\n return Recognizer;\n}());\nfunction sortActivatedRouteSnapshots(nodes) {\n nodes.sort(function (a, b) {\n if (a.value.outlet === PRIMARY_OUTLET)\n return -1;\n if (b.value.outlet === PRIMARY_OUTLET)\n return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\nfunction getChildConfig(route) {\n if (route.children) {\n return route.children;\n }\n if (route.loadChildren) {\n return route._loadedConfig.routes;\n }\n return [];\n}\nfunction match$1(segmentGroup, route, segments) {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n throw new NoMatch$1();\n }\n return { consumedSegments: [], lastChild: 0, parameters: {} };\n }\n var matcher = route.matcher || defaultUrlMatcher;\n var res = matcher(segments, segmentGroup, route);\n if (!res)\n throw new NoMatch$1();\n var posParams = {};\n forEach(res.posParams, function (v, k) {\n posParams[k] = v.path;\n });\n var parameters = res.consumed.length > 0 ? __assign(__assign({}, posParams), res.consumed[res.consumed.length - 1].parameters) :\n posParams;\n return { consumedSegments: res.consumed, lastChild: res.consumed.length, parameters: parameters };\n}\nfunction checkOutletNameUniqueness(nodes) {\n var names = {};\n nodes.forEach(function (n) {\n var routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n var p = routeWithSameOutletName.url.map(function (s) { return s.toString(); }).join('/');\n var c = n.value.url.map(function (s) { return s.toString(); }).join('/');\n throw new Error(\"Two segments cannot have the same outlet name: '\" + p + \"' and '\" + c + \"'.\");\n }\n names[n.value.outlet] = n.value;\n });\n}\nfunction getSourceSegmentGroup(segmentGroup) {\n var s = segmentGroup;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n }\n return s;\n}\nfunction getPathIndexShift(segmentGroup) {\n var s = segmentGroup;\n var res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n while (s._sourceSegment) {\n s = s._sourceSegment;\n res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n }\n return res - 1;\n}\nfunction split$1(segmentGroup, consumedSegments, slicedSegments, config, relativeLinkResolution) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n var s_1 = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(segmentGroup, consumedSegments, config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n s_1._sourceSegment = segmentGroup;\n s_1._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s_1, slicedSegments: [] };\n }\n if (slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n var s_2 = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children, relativeLinkResolution));\n s_2._sourceSegment = segmentGroup;\n s_2._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s_2, slicedSegments: slicedSegments };\n }\n var s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s, slicedSegments: slicedSegments };\n}\nfunction addEmptyPathsToChildrenIfNeeded(segmentGroup, consumedSegments, slicedSegments, routes, children, relativeLinkResolution) {\n var e_2, _a;\n var res = {};\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var r = routes_1_1.value;\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet$1(r)]) {\n var s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n if (relativeLinkResolution === 'legacy') {\n s._segmentIndexShift = segmentGroup.segments.length;\n }\n else {\n s._segmentIndexShift = consumedSegments.length;\n }\n res[getOutlet$1(r)] = s;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return __assign(__assign({}, children), res);\n}\nfunction createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) {\n var e_3, _a;\n var res = {};\n res[PRIMARY_OUTLET] = primarySegment;\n primarySegment._sourceSegment = segmentGroup;\n primarySegment._segmentIndexShift = consumedSegments.length;\n try {\n for (var routes_2 = __values(routes), routes_2_1 = routes_2.next(); !routes_2_1.done; routes_2_1 = routes_2.next()) {\n var r = routes_2_1.value;\n if (r.path === '' && getOutlet$1(r) !== PRIMARY_OUTLET) {\n var s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet$1(r)] = s;\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (routes_2_1 && !routes_2_1.done && (_a = routes_2.return)) _a.call(routes_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return res;\n}\nfunction containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {\n return routes.some(function (r) { return emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet$1(r) !== PRIMARY_OUTLET; });\n}\nfunction containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {\n return routes.some(function (r) { return emptyPathMatch(segmentGroup, slicedSegments, r); });\n}\nfunction emptyPathMatch(segmentGroup, slicedSegments, r) {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n return r.path === '' && r.redirectTo === undefined;\n}\nfunction getOutlet$1(route) {\n return route.outlet || PRIMARY_OUTLET;\n}\nfunction getData(route) {\n return route.data || {};\n}\nfunction getResolve(route) {\n return route.resolve || {};\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 */\nfunction recognize$1(rootComponentType, config, serializer, paramsInheritanceStrategy, relativeLinkResolution) {\n return function (source) {\n return source.pipe(mergeMap(function (t) { return recognize(rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects), paramsInheritanceStrategy, relativeLinkResolution)\n .pipe(map(function (targetSnapshot) { return (__assign(__assign({}, t), { targetSnapshot: targetSnapshot })); })); }));\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 */\nfunction resolveData(paramsInheritanceStrategy, moduleInjector) {\n return function (source) {\n return source.pipe(mergeMap(function (t) {\n var targetSnapshot = t.targetSnapshot, canActivateChecks = t.guards.canActivateChecks;\n if (!canActivateChecks.length) {\n return of(t);\n }\n return from(canActivateChecks)\n .pipe(concatMap(function (check) { return runResolve(check.route, targetSnapshot, paramsInheritanceStrategy, moduleInjector); }), reduce(function (_, __) { return _; }), map(function (_) { return t; }));\n }));\n };\n}\nfunction runResolve(futureARS, futureRSS, paramsInheritanceStrategy, moduleInjector) {\n var resolve = futureARS._resolve;\n return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n .pipe(map(function (resolvedData) {\n futureARS._resolvedData = resolvedData;\n futureARS.data = __assign(__assign({}, futureARS.data), inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve);\n return null;\n }));\n}\nfunction resolveNode(resolve, futureARS, futureRSS, moduleInjector) {\n var keys = Object.keys(resolve);\n if (keys.length === 0) {\n return of({});\n }\n if (keys.length === 1) {\n var key_1 = keys[0];\n return getResolver(resolve[key_1], futureARS, futureRSS, moduleInjector)\n .pipe(map(function (value) {\n var _a;\n return _a = {}, _a[key_1] = value, _a;\n }));\n }\n var data = {};\n var runningResolvers$ = from(keys).pipe(mergeMap(function (key) {\n return getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n .pipe(map(function (value) {\n data[key] = value;\n return value;\n }));\n }));\n return runningResolvers$.pipe(last$1(), map(function () { return data; }));\n}\nfunction getResolver(injectionToken, futureARS, futureRSS, moduleInjector) {\n var resolver = getToken(injectionToken, futureARS, moduleInjector);\n return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n wrapIntoObservable(resolver(futureARS, futureRSS));\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 * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nfunction switchTap(next) {\n return function (source) {\n return source.pipe(switchMap(function (v) {\n var nextResult = next(v);\n if (nextResult) {\n return from(nextResult).pipe(map(function () { return v; }));\n }\n return from([v]);\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 * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nvar RouteReuseStrategy = /** @class */ (function () {\n function RouteReuseStrategy() {\n }\n return RouteReuseStrategy;\n}());\n/**\n * Does not detach any subtrees. Reuses routes as long as their route config is the same.\n */\nvar DefaultRouteReuseStrategy = /** @class */ (function () {\n function DefaultRouteReuseStrategy() {\n }\n DefaultRouteReuseStrategy.prototype.shouldDetach = function (route) {\n return false;\n };\n DefaultRouteReuseStrategy.prototype.store = function (route, detachedTree) { };\n DefaultRouteReuseStrategy.prototype.shouldAttach = function (route) {\n return false;\n };\n DefaultRouteReuseStrategy.prototype.retrieve = function (route) {\n return null;\n };\n DefaultRouteReuseStrategy.prototype.shouldReuseRoute = function (future, curr) {\n return future.routeConfig === curr.routeConfig;\n };\n return DefaultRouteReuseStrategy;\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 [DI token](guide/glossary/#di-token) for a router configuration.\n * @see `ROUTES`\n * @publicApi\n */\nvar ROUTES = new InjectionToken('ROUTES');\nvar RouterConfigLoader = /** @class */ (function () {\n function RouterConfigLoader(loader, compiler, onLoadStartListener, onLoadEndListener) {\n this.loader = loader;\n this.compiler = compiler;\n this.onLoadStartListener = onLoadStartListener;\n this.onLoadEndListener = onLoadEndListener;\n }\n RouterConfigLoader.prototype.load = function (parentInjector, route) {\n var _this = this;\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n var moduleFactory$ = this.loadModuleFactory(route.loadChildren);\n return moduleFactory$.pipe(map(function (factory) {\n if (_this.onLoadEndListener) {\n _this.onLoadEndListener(route);\n }\n var module = factory.create(parentInjector);\n return new LoadedRouterConfig(flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);\n }));\n };\n RouterConfigLoader.prototype.loadModuleFactory = function (loadChildren) {\n var _this = this;\n if (typeof loadChildren === 'string') {\n return from(this.loader.load(loadChildren));\n }\n else {\n return wrapIntoObservable(loadChildren()).pipe(mergeMap(function (t) {\n if (t instanceof NgModuleFactory) {\n return of(t);\n }\n else {\n return from(_this.compiler.compileModuleAsync(t));\n }\n }));\n }\n };\n return RouterConfigLoader;\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 * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nvar UrlHandlingStrategy = /** @class */ (function () {\n function UrlHandlingStrategy() {\n }\n return UrlHandlingStrategy;\n}());\n/**\n * @publicApi\n */\nvar DefaultUrlHandlingStrategy = /** @class */ (function () {\n function DefaultUrlHandlingStrategy() {\n }\n DefaultUrlHandlingStrategy.prototype.shouldProcessUrl = function (url) {\n return true;\n };\n DefaultUrlHandlingStrategy.prototype.extract = function (url) {\n return url;\n };\n DefaultUrlHandlingStrategy.prototype.merge = function (newUrlPart, wholeUrl) {\n return newUrlPart;\n };\n return DefaultUrlHandlingStrategy;\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 */\nfunction defaultErrorHandler(error) {\n throw error;\n}\nfunction defaultMalformedUriErrorHandler(error, urlSerializer, url) {\n return urlSerializer.parse('/');\n}\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot, runExtras) {\n return of(null);\n}\n/**\n * @description\n *\n * A service that provides navigation and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nvar Router = /** @class */ (function () {\n /**\n * Creates the router service.\n */\n // TODO: vsavkin make internal after the final is out.\n function Router(rootComponentType, urlSerializer, rootContexts, location, injector, loader, compiler, config) {\n var _this = this;\n this.rootComponentType = rootComponentType;\n this.urlSerializer = urlSerializer;\n this.rootContexts = rootContexts;\n this.location = location;\n this.config = config;\n this.lastSuccessfulNavigation = null;\n this.currentNavigation = null;\n this.navigationId = 0;\n this.isNgZoneEnabled = false;\n /**\n * An event stream for routing events in this NgModule.\n */\n this.events = new Subject();\n /**\n * A handler for navigation errors in this NgModule.\n */\n this.errorHandler = defaultErrorHandler;\n /**\n * A handler for errors thrown by `Router.parseUrl(url)`\n * when `url` contains an invalid character.\n * The most common case is a `%` sign\n * that's not encoded and is not part of a percent encoded sequence.\n */\n this.malformedUriErrorHandler = defaultMalformedUriErrorHandler;\n /**\n * True if at least one navigation event has occurred,\n * false otherwise.\n */\n this.navigated = false;\n this.lastSuccessfulId = -1;\n /**\n * Hooks that enable you to pause navigation,\n * either before or after the preactivation phase.\n * Used by `RouterModule`.\n *\n * @internal\n */\n this.hooks = { beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook };\n /**\n * A strategy for extracting and merging URLs.\n * Used for AngularJS to Angular migrations.\n */\n this.urlHandlingStrategy = new DefaultUrlHandlingStrategy();\n /**\n * A strategy for re-using routes.\n */\n this.routeReuseStrategy = new DefaultRouteReuseStrategy();\n /**\n * How to handle a navigation request to the current URL. One of:\n * - `'ignore'` : The router ignores the request.\n * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\n */\n this.onSameUrlNavigation = 'ignore';\n /**\n * How to merge parameters, data, and resolved data from parent to child\n * routes. One of:\n *\n * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n * for path-less or component-less routes.\n * - `'always'` : Inherit parent parameters, data, and resolved data\n * for all child routes.\n */\n this.paramsInheritanceStrategy = 'emptyOnly';\n /**\n * Determines when the router updates the browser URL.\n * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n * Set to `'eager'` to update the browser URL at the beginning of navigation.\n * You can choose to update early so that, if navigation fails,\n * you can show an error message with the URL that failed.\n */\n this.urlUpdateStrategy = 'deferred';\n /**\n * Enables a bug fix that corrects relative link resolution in components with empty paths.\n * @see `RouterModule`\n */\n this.relativeLinkResolution = 'legacy';\n var onLoadStart = function (r) { return _this.triggerEvent(new RouteConfigLoadStart(r)); };\n var onLoadEnd = function (r) { return _this.triggerEvent(new RouteConfigLoadEnd(r)); };\n this.ngModule = injector.get(NgModuleRef);\n this.console = injector.get(ɵConsole);\n var ngZone = injector.get(NgZone);\n this.isNgZoneEnabled = ngZone instanceof NgZone;\n this.resetConfig(config);\n this.currentUrlTree = createEmptyUrlTree();\n this.rawUrlTree = this.currentUrlTree;\n this.browserUrlTree = this.currentUrlTree;\n this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n this.transitions = new BehaviorSubject({\n id: 0,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n rawUrl: this.currentUrlTree,\n extras: {},\n resolve: null,\n reject: null,\n promise: Promise.resolve(true),\n source: 'imperative',\n restoredState: null,\n currentSnapshot: this.routerState.snapshot,\n targetSnapshot: null,\n currentRouterState: this.routerState,\n targetRouterState: null,\n guards: { canActivateChecks: [], canDeactivateChecks: [] },\n guardsResult: null,\n });\n this.navigations = this.setupNavigations(this.transitions);\n this.processNavigations();\n }\n Router.prototype.setupNavigations = function (transitions) {\n var _this = this;\n var eventsSubject = this.events;\n return transitions.pipe(filter(function (t) { return t.id !== 0; }), \n // Extract URL\n map(function (t) {\n return (__assign(__assign({}, t), { extractedUrl: _this.urlHandlingStrategy.extract(t.rawUrl) }));\n }), \n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap(function (t) {\n var completed = false;\n var errored = false;\n return of(t).pipe(\n // Store the Navigation object\n tap(function (t) {\n _this.currentNavigation = {\n id: t.id,\n initialUrl: t.currentRawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: _this.lastSuccessfulNavigation ? __assign(__assign({}, _this.lastSuccessfulNavigation), { previousNavigation: null }) :\n null\n };\n }), switchMap(function (t) {\n var urlTransition = !_this.navigated ||\n t.extractedUrl.toString() !== _this.browserUrlTree.toString();\n var processCurrentUrl = (_this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n _this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n if (processCurrentUrl) {\n return of(t).pipe(\n // Fire NavigationStart event\n switchMap(function (t) {\n var transition = _this.transitions.getValue();\n eventsSubject.next(new NavigationStart(t.id, _this.serializeUrl(t.extractedUrl), t.source, t.restoredState));\n if (transition !== _this.transitions.getValue()) {\n return EMPTY;\n }\n return [t];\n }), \n // This delay is required to match old behavior that forced navigation\n // to always be async\n switchMap(function (t) { return Promise.resolve(t); }), \n // ApplyRedirects\n applyRedirects$1(_this.ngModule.injector, _this.configLoader, _this.urlSerializer, _this.config), \n // Update the currentNavigation\n tap(function (t) {\n _this.currentNavigation = __assign(__assign({}, _this.currentNavigation), { finalUrl: t.urlAfterRedirects });\n }), \n // Recognize\n recognize$1(_this.rootComponentType, _this.config, function (url) { return _this.serializeUrl(url); }, _this.paramsInheritanceStrategy, _this.relativeLinkResolution), \n // Update URL if in `eager` update mode\n tap(function (t) {\n if (_this.urlUpdateStrategy === 'eager') {\n if (!t.extras.skipLocationChange) {\n _this.setBrowserUrl(t.urlAfterRedirects, !!t.extras.replaceUrl, t.id, t.extras.state);\n }\n _this.browserUrlTree = t.urlAfterRedirects;\n }\n }), \n // Fire RoutesRecognized\n tap(function (t) {\n var routesRecognized = new RoutesRecognized(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n eventsSubject.next(routesRecognized);\n }));\n }\n else {\n var processPreviousUrl = urlTransition && _this.rawUrlTree &&\n _this.urlHandlingStrategy.shouldProcessUrl(_this.rawUrlTree);\n /* When the current URL shouldn't be processed, but the previous one was,\n * we handle this \"error condition\" by navigating to the previously\n * successful URL, but leaving the URL intact.*/\n if (processPreviousUrl) {\n var id = t.id, extractedUrl = t.extractedUrl, source = t.source, restoredState = t.restoredState, extras = t.extras;\n var navStart = new NavigationStart(id, _this.serializeUrl(extractedUrl), source, restoredState);\n eventsSubject.next(navStart);\n var targetSnapshot = createEmptyState(extractedUrl, _this.rootComponentType).snapshot;\n return of(__assign(__assign({}, t), { targetSnapshot: targetSnapshot, urlAfterRedirects: extractedUrl, extras: __assign(__assign({}, extras), { skipLocationChange: false, replaceUrl: false }) }));\n }\n else {\n /* When neither the current or previous URL can be processed, do nothing\n * other than update router's internal reference to the current \"settled\"\n * URL. This way the next navigation will be coming from the current URL\n * in the browser.\n */\n _this.rawUrlTree = t.rawUrl;\n _this.browserUrlTree = t.urlAfterRedirects;\n t.resolve(null);\n return EMPTY;\n }\n }\n }), \n // Before Preactivation\n switchTap(function (t) {\n var targetSnapshot = t.targetSnapshot, navigationId = t.id, appliedUrlTree = t.extractedUrl, rawUrlTree = t.rawUrl, _a = t.extras, skipLocationChange = _a.skipLocationChange, replaceUrl = _a.replaceUrl;\n return _this.hooks.beforePreactivation(targetSnapshot, {\n navigationId: navigationId,\n appliedUrlTree: appliedUrlTree,\n rawUrlTree: rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }), \n // --- GUARDS ---\n tap(function (t) {\n var guardsStart = new GuardsCheckStart(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n _this.triggerEvent(guardsStart);\n }), map(function (t) { return (__assign(__assign({}, t), { guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, _this.rootContexts) })); }), checkGuards(_this.ngModule.injector, function (evt) { return _this.triggerEvent(evt); }), tap(function (t) {\n if (isUrlTree(t.guardsResult)) {\n var error = navigationCancelingError(\"Redirecting to \\\"\" + _this.serializeUrl(t.guardsResult) + \"\\\"\");\n error.url = t.guardsResult;\n throw error;\n }\n }), tap(function (t) {\n var guardsEnd = new GuardsCheckEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);\n _this.triggerEvent(guardsEnd);\n }), filter(function (t) {\n if (!t.guardsResult) {\n _this.resetUrlToCurrentUrlTree();\n var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), '');\n eventsSubject.next(navCancel);\n t.resolve(false);\n return false;\n }\n return true;\n }), \n // --- RESOLVE ---\n switchTap(function (t) {\n if (t.guards.canActivateChecks.length) {\n return of(t).pipe(tap(function (t) {\n var resolveStart = new ResolveStart(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n _this.triggerEvent(resolveStart);\n }), resolveData(_this.paramsInheritanceStrategy, _this.ngModule.injector), //\n tap(function (t) {\n var resolveEnd = new ResolveEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot);\n _this.triggerEvent(resolveEnd);\n }));\n }\n return undefined;\n }), \n // --- AFTER PREACTIVATION ---\n switchTap(function (t) {\n var targetSnapshot = t.targetSnapshot, navigationId = t.id, appliedUrlTree = t.extractedUrl, rawUrlTree = t.rawUrl, _a = t.extras, skipLocationChange = _a.skipLocationChange, replaceUrl = _a.replaceUrl;\n return _this.hooks.afterPreactivation(targetSnapshot, {\n navigationId: navigationId,\n appliedUrlTree: appliedUrlTree,\n rawUrlTree: rawUrlTree,\n skipLocationChange: !!skipLocationChange,\n replaceUrl: !!replaceUrl,\n });\n }), map(function (t) {\n var targetRouterState = createRouterState(_this.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);\n return (__assign(__assign({}, t), { targetRouterState: targetRouterState }));\n }), \n /* Once here, we are about to activate syncronously. The assumption is this\n will succeed, and user code may read from the Router service. Therefore\n before activation, we need to update router properties storing the current\n URL and the RouterState, as well as updated the browser URL. All this should\n happen *before* activating. */\n tap(function (t) {\n _this.currentUrlTree = t.urlAfterRedirects;\n _this.rawUrlTree =\n _this.urlHandlingStrategy.merge(_this.currentUrlTree, t.rawUrl);\n _this.routerState = t.targetRouterState;\n if (_this.urlUpdateStrategy === 'deferred') {\n if (!t.extras.skipLocationChange) {\n _this.setBrowserUrl(_this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);\n }\n _this.browserUrlTree = t.urlAfterRedirects;\n }\n }), activateRoutes(_this.rootContexts, _this.routeReuseStrategy, function (evt) { return _this.triggerEvent(evt); }), tap({\n next: function () {\n completed = true;\n },\n complete: function () {\n completed = true;\n }\n }), finalize(function () {\n /* When the navigation stream finishes either through error or success, we\n * set the `completed` or `errored` flag. However, there are some situations\n * where we could get here without either of those being set. For instance, a\n * redirect during NavigationStart. Therefore, this is a catch-all to make\n * sure the NavigationCancel\n * event is fired when a navigation gets cancelled but not caught by other\n * means. */\n if (!completed && !errored) {\n // Must reset to current URL tree here to ensure history.state is set. On a\n // fresh page load, if a new navigation comes in before a successful\n // navigation completes, there will be nothing in\n // history.state.navigationId. This can cause sync problems with AngularJS\n // sync code which looks for a value here in order to determine whether or\n // not to handle a given popstate event or to leave it to the Angualr\n // router.\n _this.resetUrlToCurrentUrlTree();\n var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), \"Navigation ID \" + t.id + \" is not equal to the current navigation id \" + _this.navigationId);\n eventsSubject.next(navCancel);\n t.resolve(false);\n }\n // currentNavigation should always be reset to null here. If navigation was\n // successful, lastSuccessfulTransition will have already been set. Therefore\n // we can safely set currentNavigation to null here.\n _this.currentNavigation = null;\n }), catchError(function (e) {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a\n * cancellation rather than an error. */\n if (isNavigationCancelingError(e)) {\n var redirecting = isUrlTree(e.url);\n if (!redirecting) {\n // Set property only if we're not redirecting. If we landed on a page and\n // redirect to `/` route, the new navigation is going to see the `/`\n // isn't a change from the default currentUrlTree and won't navigate.\n // This is only applicable with initial navigation, so setting\n // `navigated` only when not redirecting resolves this scenario.\n _this.navigated = true;\n _this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n }\n var navCancel = new NavigationCancel(t.id, _this.serializeUrl(t.extractedUrl), e.message);\n eventsSubject.next(navCancel);\n // When redirecting, we need to delay resolving the navigation\n // promise and push it to the redirect navigation\n if (!redirecting) {\n t.resolve(false);\n }\n else {\n // setTimeout is required so this navigation finishes with\n // the return EMPTY below. If it isn't allowed to finish\n // processing, there can be multiple navigations to the same\n // URL.\n setTimeout(function () {\n var mergedTree = _this.urlHandlingStrategy.merge(e.url, _this.rawUrlTree);\n var extras = {\n skipLocationChange: t.extras.skipLocationChange,\n replaceUrl: _this.urlUpdateStrategy === 'eager'\n };\n return _this.scheduleNavigation(mergedTree, 'imperative', null, extras, { resolve: t.resolve, reject: t.reject, promise: t.promise });\n }, 0);\n }\n /* All other errors should reset to the router's internal URL reference to\n * the pre-error state. */\n }\n else {\n _this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n var navError = new NavigationError(t.id, _this.serializeUrl(t.extractedUrl), e);\n eventsSubject.next(navError);\n try {\n t.resolve(_this.errorHandler(e));\n }\n catch (ee) {\n t.reject(ee);\n }\n }\n return EMPTY;\n }));\n // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n }));\n };\n /**\n * @internal\n * TODO: this should be removed once the constructor of the router made internal\n */\n Router.prototype.resetRootComponentType = function (rootComponentType) {\n this.rootComponentType = rootComponentType;\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = this.rootComponentType;\n };\n Router.prototype.getTransition = function () {\n var transition = this.transitions.value;\n // This value needs to be set. Other values such as extractedUrl are set on initial navigation\n // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not\n // processing the previous URL.\n transition.urlAfterRedirects = this.browserUrlTree;\n return transition;\n };\n Router.prototype.setTransition = function (t) {\n this.transitions.next(__assign(__assign({}, this.getTransition()), t));\n };\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n Router.prototype.initialNavigation = function () {\n this.setUpLocationChangeListener();\n if (this.navigationId === 0) {\n this.navigateByUrl(this.location.path(true), { replaceUrl: true });\n }\n };\n /**\n * Sets up the location change listener.\n */\n Router.prototype.setUpLocationChangeListener = function () {\n var _this = this;\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n if (!this.locationSubscription) {\n this.locationSubscription = this.location.subscribe(function (change) {\n var rawUrlTree = _this.parseUrl(change['url']);\n var source = change['type'] === 'popstate' ? 'popstate' : 'hashchange';\n // Navigations coming from Angular router have a navigationId state property. When this\n // exists, restore the state.\n var state = change.state && change.state.navigationId ? change.state : null;\n setTimeout(function () {\n _this.scheduleNavigation(rawUrlTree, source, state, { replaceUrl: true });\n }, 0);\n });\n }\n };\n Object.defineProperty(Router.prototype, \"url\", {\n /** The current URL. */\n get: function () {\n return this.serializeUrl(this.currentUrlTree);\n },\n enumerable: true,\n configurable: true\n });\n /** The current Navigation object if one exists */\n Router.prototype.getCurrentNavigation = function () {\n return this.currentNavigation;\n };\n /** @internal */\n Router.prototype.triggerEvent = function (event) {\n this.events.next(event);\n };\n /**\n * Resets the configuration used for navigation and generating links.\n *\n * @param config The route array for the new configuration.\n *\n * @usageNotes\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n Router.prototype.resetConfig = function (config) {\n validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n };\n /** @docsNotRequired */\n Router.prototype.ngOnDestroy = function () {\n this.dispose();\n };\n /** Disposes of the router. */\n Router.prototype.dispose = function () {\n if (this.locationSubscription) {\n this.locationSubscription.unsubscribe();\n this.locationSubscription = null;\n }\n };\n /**\n * Applies an array of commands to the current URL tree and creates a new URL tree.\n *\n * When given an activated route, applies the given commands starting from the route.\n * Otherwise, applies the given command starting from the root.\n *\n * @param commands An array of commands to apply.\n * @param navigationExtras Options that control the navigation strategy. This function\n * only utilizes properties in `NavigationExtras` that would change the provided URL.\n * @returns The new URL tree.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it,\n * // you can do the following:\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n * ```\n */\n Router.prototype.createUrlTree = function (commands, navigationExtras) {\n if (navigationExtras === void 0) { navigationExtras = {}; }\n var relativeTo = navigationExtras.relativeTo, queryParams = navigationExtras.queryParams, fragment = navigationExtras.fragment, preserveQueryParams = navigationExtras.preserveQueryParams, queryParamsHandling = navigationExtras.queryParamsHandling, preserveFragment = navigationExtras.preserveFragment;\n if (isDevMode() && preserveQueryParams && console && console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n var a = relativeTo || this.routerState.root;\n var f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n var q = null;\n if (queryParamsHandling) {\n switch (queryParamsHandling) {\n case 'merge':\n q = __assign(__assign({}, this.currentUrlTree.queryParams), queryParams);\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n }\n else {\n q = preserveQueryParams ? this.currentUrlTree.queryParams : queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n return createUrlTree(a, this.currentUrlTree, commands, q, f);\n };\n /**\n * Navigate based on the provided URL, which must be absolute.\n *\n * @param url An absolute URL. The function does not apply any delta to the current URL.\n * @param extras An object containing properties that modify the navigation strategy.\n * The function ignores any properties in the `NavigationExtras` that would change the\n * provided URL.\n *\n * @returns A Promise that resolves to 'true' when navigation succeeds,\n * to 'false' when navigation fails, or is rejected on error.\n *\n * @usageNotes\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n */\n Router.prototype.navigateByUrl = function (url, extras) {\n if (extras === void 0) { extras = { skipLocationChange: false }; }\n if (isDevMode() && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n this.console.warn(\"Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?\");\n }\n var urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n var mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n };\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * @usageNotes\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * The first parameter of `navigate()` is a delta to be applied to the current URL\n * or the one provided in the `relativeTo` property of the second parameter (the\n * `NavigationExtras`).\n *\n * In order to affect this browser's `history.state` entry, the `state`\n * parameter can be passed. This must be an object because the router\n * will add the `navigationId` property to this object before creating\n * the new history item.\n */\n Router.prototype.navigate = function (commands, extras) {\n if (extras === void 0) { extras = { skipLocationChange: false }; }\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n };\n /** Serializes a `UrlTree` into a string */\n Router.prototype.serializeUrl = function (url) {\n return this.urlSerializer.serialize(url);\n };\n /** Parses a string into a `UrlTree` */\n Router.prototype.parseUrl = function (url) {\n var urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n };\n /** Returns whether the url is activated */\n Router.prototype.isActive = function (url, exact) {\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, exact);\n }\n var urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, exact);\n };\n Router.prototype.removeEmptyProps = function (params) {\n return Object.keys(params).reduce(function (result, key) {\n var value = params[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n };\n Router.prototype.processNavigations = function () {\n var _this = this;\n this.navigations.subscribe(function (t) {\n _this.navigated = true;\n _this.lastSuccessfulId = t.id;\n _this.events\n .next(new NavigationEnd(t.id, _this.serializeUrl(t.extractedUrl), _this.serializeUrl(_this.currentUrlTree)));\n _this.lastSuccessfulNavigation = _this.currentNavigation;\n _this.currentNavigation = null;\n t.resolve(true);\n }, function (e) {\n _this.console.warn(\"Unhandled Navigation Error: \");\n });\n };\n Router.prototype.scheduleNavigation = function (rawUrl, source, restoredState, extras, priorPromise) {\n var lastNavigation = this.getTransition();\n // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),\n // and that navigation results in 'replaceState' that leads to the same URL,\n // we should skip those.\n if (lastNavigation && source !== 'imperative' && lastNavigation.source === 'imperative' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a popstate was emitted first.\n if (lastNavigation && source == 'hashchange' && lastNavigation.source === 'popstate' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a hashchange was emitted first.\n if (lastNavigation && source == 'popstate' && lastNavigation.source === 'hashchange' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n var resolve;\n var reject;\n var promise;\n if (priorPromise) {\n resolve = priorPromise.resolve;\n reject = priorPromise.reject;\n promise = priorPromise.promise;\n }\n else {\n promise = new Promise(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n }\n var id = ++this.navigationId;\n this.setTransition({\n id: id,\n source: source,\n restoredState: restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.rawUrlTree,\n rawUrl: rawUrl,\n extras: extras,\n resolve: resolve,\n reject: reject,\n promise: promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch(function (e) {\n return Promise.reject(e);\n });\n };\n Router.prototype.setBrowserUrl = function (url, replaceUrl, id, state) {\n var path = this.urlSerializer.serialize(url);\n state = state || {};\n if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {\n // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.\n this.location.replaceState(path, '', __assign(__assign({}, state), { navigationId: id }));\n }\n else {\n this.location.go(path, '', __assign(__assign({}, state), { navigationId: id }));\n }\n };\n Router.prototype.resetStateAndUrl = function (storedState, storedUrl, rawUrl) {\n this.routerState = storedState;\n this.currentUrlTree = storedUrl;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);\n this.resetUrlToCurrentUrlTree();\n };\n Router.prototype.resetUrlToCurrentUrlTree = function () {\n this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', { navigationId: this.lastSuccessfulId });\n };\nRouter.ɵfac = function Router_Factory(t) { ɵngcc0.ɵɵinvalidFactory(); };\nRouter.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: Router });\n\n return Router;\n}());\nfunction validateCommands(commands) {\n for (var i = 0; i < commands.length; i++) {\n var cmd = commands[i];\n if (cmd == null) {\n throw new Error(\"The requested path contains \" + cmd + \" segment at index \" + i);\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 * @description\n *\n * Lets you link to specific routes in your app.\n *\n * Consider the following route configuration:\n * `[{ path: 'user/:name', component: UserCmp }]`.\n * When linking to this `user/:name` route, you use the `RouterLink` directive.\n *\n * If the link is static, you can use the directive as follows:\n * `link to user component`\n *\n * If you use dynamic values to generate the link, you can pass an array of path\n * segments, followed by the params for each segment.\n *\n * For instance `['/team', teamId, 'user', userName, {details: true}]`\n * means that we want to generate a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one\n * (e.g., `['/team/11/user', userName, {details: true}]`).\n *\n * The first segment name can be prepended with `/`, `./`, or `../`:\n * * If the first segment begins with `/`, the router will look up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router will\n * instead look in the children of the current activated route.\n * * And if the first segment begins with `../`, the router will go up one level.\n *\n * You can set query params and fragment as follows:\n *\n * ```\n * \n * link to user component\n * \n * ```\n * RouterLink will use these to generate this link: `/user/bob#education?debug=true`.\n *\n * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the\n * directive to preserve the current query params and fragment:\n *\n * ```\n * \n * link to user component\n * \n * ```\n *\n * You can tell the directive how to handle queryParams. Available options are:\n * - `'merge'`: merge the queryParams into the current queryParams\n * - `'preserve'`: preserve the current queryParams\n * - default/`''`: use the queryParams only\n *\n * Same options for {@link NavigationExtras#queryParamsHandling\n * NavigationExtras#queryParamsHandling}.\n *\n * ```\n * \n * link to user component\n * \n * ```\n *\n * You can provide a `state` value to be persisted to the browser's History.state\n * property (See https://developer.mozilla.org/en-US/docs/Web/API/History#Properties). It's\n * used as follows:\n *\n * ```\n * \n * link to user component\n * \n * ```\n *\n * And later the value can be read from the router through `router.getCurrentNavigation`.\n * For example, to capture the `tracingId` above during the `NavigationStart` event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * The router link directive always treats the provided input as a delta to the current url.\n *\n * For instance, if the current url is `/user/(box//aux:team)`.\n *\n * Then the following link `Jim` will generate the link\n * `/user/(jim//aux:team)`.\n *\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nvar RouterLink = /** @class */ (function () {\n function RouterLink(router, route, tabIndex, renderer, el) {\n this.router = router;\n this.route = route;\n this.commands = [];\n if (tabIndex == null) {\n renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n }\n }\n Object.defineProperty(RouterLink.prototype, \"routerLink\", {\n /**\n * @param commands An array of commands to pass to {@link Router#createUrlTree\n * Router#createUrlTree}.\n * - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n * - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n * - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n * @see {@link Router#createUrlTree Router#createUrlTree}\n */\n set: function (commands) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n }\n else {\n this.commands = [];\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterLink.prototype, \"preserveQueryParams\", {\n /**\n * @deprecated As of Angular v4.0 use `queryParamsHandling` instead.\n */\n set: function (value) {\n if (isDevMode() && console && console.warn) {\n console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n }\n this.preserve = value;\n },\n enumerable: true,\n configurable: true\n });\n RouterLink.prototype.onClick = function () {\n var extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n state: this.state,\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return true;\n };\n Object.defineProperty(RouterLink.prototype, \"urlTree\", {\n get: function () {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n },\n enumerable: true,\n configurable: true\n });\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], RouterLink.prototype, \"queryParams\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], RouterLink.prototype, \"fragment\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], RouterLink.prototype, \"queryParamsHandling\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLink.prototype, \"preserveFragment\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLink.prototype, \"skipLocationChange\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLink.prototype, \"replaceUrl\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], RouterLink.prototype, \"state\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RouterLink.prototype, \"routerLink\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n ], RouterLink.prototype, \"preserveQueryParams\", null);\n __decorate([\n HostListener('click'),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", Boolean)\n ], RouterLink.prototype, \"onClick\", null);\n RouterLink = __decorate([ __param(2, Attribute('tabindex')),\n __metadata(\"design:paramtypes\", [Router, ActivatedRoute, String, Renderer2, ElementRef])\n ], RouterLink);\nRouterLink.ɵfac = function RouterLink_Factory(t) { return new (t || RouterLink)(ɵngcc0.ɵɵdirectiveInject(Router), ɵngcc0.ɵɵdirectiveInject(ActivatedRoute), ɵngcc0.ɵɵinjectAttribute('tabindex'), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nRouterLink.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: RouterLink, selectors: [[\"\", \"routerLink\", \"\", 5, \"a\", 5, \"area\"]], hostBindings: function RouterLink_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"click\", function RouterLink_click_HostBindingHandler() { return ctx.onClick(); });\n } }, inputs: { routerLink: \"routerLink\", preserveQueryParams: \"preserveQueryParams\", queryParams: \"queryParams\", fragment: \"fragment\", queryParamsHandling: \"queryParamsHandling\", preserveFragment: \"preserveFragment\", skipLocationChange: \"skipLocationChange\", replaceUrl: \"replaceUrl\", state: \"state\" } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(RouterLink, [{\n type: Directive,\n args: [{ selector: ':not(a):not(area)[routerLink]' }]\n }], function () { return [{ type: Router }, { type: ActivatedRoute }, { type: String, decorators: [{\n type: Attribute,\n args: ['tabindex']\n }] }, { type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }]; }, { routerLink: [{\n type: Input\n }], preserveQueryParams: [{\n type: Input\n }], onClick: [{\n type: HostListener,\n args: ['click']\n }], queryParams: [{\n type: Input\n }], fragment: [{\n type: Input\n }], queryParamsHandling: [{\n type: Input\n }], preserveFragment: [{\n type: Input\n }], skipLocationChange: [{\n type: Input\n }], replaceUrl: [{\n type: Input\n }], state: [{\n type: Input\n }] }); })();\n return RouterLink;\n}());\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nvar RouterLinkWithHref = /** @class */ (function () {\n function RouterLinkWithHref(router, route, locationStrategy) {\n var _this = this;\n this.router = router;\n this.route = route;\n this.locationStrategy = locationStrategy;\n this.commands = [];\n this.subscription = router.events.subscribe(function (s) {\n if (s instanceof NavigationEnd) {\n _this.updateTargetUrlAndHref();\n }\n });\n }\n Object.defineProperty(RouterLinkWithHref.prototype, \"routerLink\", {\n /**\n * @param commands An array of commands to pass to {@link Router#createUrlTree\n * Router#createUrlTree}.\n * - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n * - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n * - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n * @see {@link Router#createUrlTree Router#createUrlTree}\n */\n set: function (commands) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n }\n else {\n this.commands = [];\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterLinkWithHref.prototype, \"preserveQueryParams\", {\n /**\n * @deprecated As of Angular v4.0 use `queryParamsHandling` instead.\n */\n set: function (value) {\n if (isDevMode() && console && console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n this.preserve = value;\n },\n enumerable: true,\n configurable: true\n });\n RouterLinkWithHref.prototype.ngOnChanges = function (changes) {\n this.updateTargetUrlAndHref();\n };\n RouterLinkWithHref.prototype.ngOnDestroy = function () {\n this.subscription.unsubscribe();\n };\n RouterLinkWithHref.prototype.onClick = function (button, ctrlKey, metaKey, shiftKey) {\n if (button !== 0 || ctrlKey || metaKey || shiftKey) {\n return true;\n }\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n var extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n state: this.state\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return false;\n };\n RouterLinkWithHref.prototype.updateTargetUrlAndHref = function () {\n this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n };\n Object.defineProperty(RouterLinkWithHref.prototype, \"urlTree\", {\n get: function () {\n return this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n preserveQueryParams: attrBoolValue(this.preserve),\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n },\n enumerable: true,\n configurable: true\n });\n __decorate([\n HostBinding('attr.target'), Input(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"target\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], RouterLinkWithHref.prototype, \"queryParams\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"fragment\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"queryParamsHandling\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLinkWithHref.prototype, \"preserveFragment\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLinkWithHref.prototype, \"skipLocationChange\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean)\n ], RouterLinkWithHref.prototype, \"replaceUrl\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], RouterLinkWithHref.prototype, \"state\", void 0);\n __decorate([\n HostBinding(),\n __metadata(\"design:type\", String)\n ], RouterLinkWithHref.prototype, \"href\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RouterLinkWithHref.prototype, \"routerLink\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n ], RouterLinkWithHref.prototype, \"preserveQueryParams\", null);\n __decorate([\n HostListener('click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey']),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Number, Boolean, Boolean, Boolean]),\n __metadata(\"design:returntype\", Boolean)\n ], RouterLinkWithHref.prototype, \"onClick\", null);\n RouterLinkWithHref = __decorate([ __metadata(\"design:paramtypes\", [Router, ActivatedRoute,\n LocationStrategy])\n ], RouterLinkWithHref);\nRouterLinkWithHref.ɵfac = function RouterLinkWithHref_Factory(t) { return new (t || RouterLinkWithHref)(ɵngcc0.ɵɵdirectiveInject(Router), ɵngcc0.ɵɵdirectiveInject(ActivatedRoute), ɵngcc0.ɵɵdirectiveInject(ɵngcc1.LocationStrategy)); };\nRouterLinkWithHref.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: RouterLinkWithHref, selectors: [[\"a\", \"routerLink\", \"\"], [\"area\", \"routerLink\", \"\"]], hostVars: 2, hostBindings: function RouterLinkWithHref_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"click\", function RouterLinkWithHref_click_HostBindingHandler($event) { return ctx.onClick($event.button, $event.ctrlKey, $event.metaKey, $event.shiftKey); });\n } if (rf & 2) {\n ɵngcc0.ɵɵhostProperty(\"href\", ctx.href, ɵngcc0.ɵɵsanitizeUrl);\n ɵngcc0.ɵɵattribute(\"target\", ctx.target);\n } }, inputs: { routerLink: \"routerLink\", preserveQueryParams: \"preserveQueryParams\", target: \"target\", queryParams: \"queryParams\", fragment: \"fragment\", queryParamsHandling: \"queryParamsHandling\", preserveFragment: \"preserveFragment\", skipLocationChange: \"skipLocationChange\", replaceUrl: \"replaceUrl\", state: \"state\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(RouterLinkWithHref, [{\n type: Directive,\n args: [{ selector: 'a[routerLink],area[routerLink]' }]\n }], function () { return [{ type: Router }, { type: ActivatedRoute }, { type: ɵngcc1.LocationStrategy }]; }, { routerLink: [{\n type: Input\n }], preserveQueryParams: [{\n type: Input\n }], onClick: [{\n type: HostListener,\n args: ['click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey']]\n }], href: [{\n type: HostBinding\n }], target: [{\n type: HostBinding,\n args: ['attr.target']\n }, {\n type: Input\n }], queryParams: [{\n type: Input\n }], fragment: [{\n type: Input\n }], queryParamsHandling: [{\n type: Input\n }], preserveFragment: [{\n type: Input\n }], skipLocationChange: [{\n type: Input\n }], replaceUrl: [{\n type: Input\n }], state: [{\n type: Input\n }] }); })();\n return RouterLinkWithHref;\n}());\nfunction attrBoolValue(s) {\n return s === '' || !!s;\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 * @description\n *\n * Lets you add a CSS class to an element when the link's route becomes active.\n *\n * This directive lets you add a CSS class to an element when the link's route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * Bob\n * ```\n *\n * When the url is either '/user' or '/user/bob', the active-link class will\n * be added to the `a` tag. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\n *\n * ```\n * Bob\n * Bob\n * ```\n *\n * You can configure RouterLinkActive by passing `exact: true`. This will add the classes\n * only when the url matches the link exactly.\n *\n * ```\n * Bob\n * ```\n *\n * You can assign the RouterLinkActive instance to a template variable and directly check\n * the `isActive` status.\n * ```\n * \n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * \n * ```\n *\n * Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.\n *\n * ```\n *
\n * Jim\n * Bob\n *
\n * ```\n *\n * This will set the active-link class on the div tag if the url is either '/user/jim' or\n * '/user/bob'.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nvar RouterLinkActive = /** @class */ (function () {\n function RouterLinkActive(router, element, renderer, link, linkWithHref) {\n var _this = this;\n this.router = router;\n this.element = element;\n this.renderer = renderer;\n this.link = link;\n this.linkWithHref = linkWithHref;\n this.classes = [];\n this.isActive = false;\n this.routerLinkActiveOptions = { exact: false };\n this.subscription = router.events.subscribe(function (s) {\n if (s instanceof NavigationEnd) {\n _this.update();\n }\n });\n }\n RouterLinkActive.prototype.ngAfterContentInit = function () {\n var _this = this;\n this.links.changes.subscribe(function (_) { return _this.update(); });\n this.linksWithHrefs.changes.subscribe(function (_) { return _this.update(); });\n this.update();\n };\n Object.defineProperty(RouterLinkActive.prototype, \"routerLinkActive\", {\n set: function (data) {\n var classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(function (c) { return !!c; });\n },\n enumerable: true,\n configurable: true\n });\n RouterLinkActive.prototype.ngOnChanges = function (changes) {\n this.update();\n };\n RouterLinkActive.prototype.ngOnDestroy = function () {\n this.subscription.unsubscribe();\n };\n RouterLinkActive.prototype.update = function () {\n var _this = this;\n if (!this.links || !this.linksWithHrefs || !this.router.navigated)\n return;\n Promise.resolve().then(function () {\n var hasActiveLinks = _this.hasActiveLinks();\n if (_this.isActive !== hasActiveLinks) {\n _this.isActive = hasActiveLinks;\n _this.classes.forEach(function (c) {\n if (hasActiveLinks) {\n _this.renderer.addClass(_this.element.nativeElement, c);\n }\n else {\n _this.renderer.removeClass(_this.element.nativeElement, c);\n }\n });\n }\n });\n };\n RouterLinkActive.prototype.isLinkActive = function (router) {\n var _this = this;\n return function (link) {\n return router.isActive(link.urlTree, _this.routerLinkActiveOptions.exact);\n };\n };\n RouterLinkActive.prototype.hasActiveLinks = function () {\n var isActiveCheckFn = this.isLinkActive(this.router);\n return this.link && isActiveCheckFn(this.link) ||\n this.linkWithHref && isActiveCheckFn(this.linkWithHref) ||\n this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);\n };\n __decorate([\n ContentChildren(RouterLink, { descendants: true }),\n __metadata(\"design:type\", QueryList)\n ], RouterLinkActive.prototype, \"links\", void 0);\n __decorate([\n ContentChildren(RouterLinkWithHref, { descendants: true }),\n __metadata(\"design:type\", QueryList)\n ], RouterLinkActive.prototype, \"linksWithHrefs\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], RouterLinkActive.prototype, \"routerLinkActiveOptions\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RouterLinkActive.prototype, \"routerLinkActive\", null);\n RouterLinkActive = __decorate([ __param(3, Optional()),\n __param(4, Optional()),\n __metadata(\"design:paramtypes\", [Router, ElementRef, Renderer2,\n RouterLink,\n RouterLinkWithHref])\n ], RouterLinkActive);\nRouterLinkActive.ɵfac = function RouterLinkActive_Factory(t) { return new (t || RouterLinkActive)(ɵngcc0.ɵɵdirectiveInject(Router), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(RouterLink, 8), ɵngcc0.ɵɵdirectiveInject(RouterLinkWithHref, 8)); };\nRouterLinkActive.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: RouterLinkActive, selectors: [[\"\", \"routerLinkActive\", \"\"]], contentQueries: function RouterLinkActive_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {\n ɵngcc0.ɵɵcontentQuery(dirIndex, RouterLink, true);\n ɵngcc0.ɵɵcontentQuery(dirIndex, RouterLinkWithHref, true);\n } if (rf & 2) {\n var _t;\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.links = _t);\n ɵngcc0.ɵɵqueryRefresh(_t = ɵngcc0.ɵɵloadQuery()) && (ctx.linksWithHrefs = _t);\n } }, inputs: { routerLinkActiveOptions: \"routerLinkActiveOptions\", routerLinkActive: \"routerLinkActive\" }, exportAs: [\"routerLinkActive\"], features: [ɵngcc0.ɵɵNgOnChangesFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(RouterLinkActive, [{\n type: Directive,\n args: [{\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive'\n }]\n }], function () { return [{ type: Router }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: RouterLink, decorators: [{\n type: Optional\n }] }, { type: RouterLinkWithHref, decorators: [{\n type: Optional\n }] }]; }, { routerLinkActiveOptions: [{\n type: Input\n }], routerLinkActive: [{\n type: Input\n }], links: [{\n type: ContentChildren,\n args: [RouterLink, { descendants: true }]\n }], linksWithHrefs: [{\n type: ContentChildren,\n args: [RouterLinkWithHref, { descendants: true }]\n }] }); })();\n return RouterLinkActive;\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 contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nvar OutletContext = /** @class */ (function () {\n function OutletContext() {\n this.outlet = null;\n this.route = null;\n this.resolver = null;\n this.children = new ChildrenOutletContexts();\n this.attachRef = null;\n }\n return OutletContext;\n}());\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nvar ChildrenOutletContexts = /** @class */ (function () {\n function ChildrenOutletContexts() {\n // contexts for child outlets, by name.\n this.contexts = new Map();\n }\n /** Called when a `RouterOutlet` directive is instantiated */\n ChildrenOutletContexts.prototype.onChildOutletCreated = function (childName, outlet) {\n var context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n };\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n ChildrenOutletContexts.prototype.onChildOutletDestroyed = function (childName) {\n var context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n }\n };\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n ChildrenOutletContexts.prototype.onOutletDeactivated = function () {\n var contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n };\n ChildrenOutletContexts.prototype.onOutletReAttached = function (contexts) {\n this.contexts = contexts;\n };\n ChildrenOutletContexts.prototype.getOrCreateContext = function (childName) {\n var context = this.getContext(childName);\n if (!context) {\n context = new OutletContext();\n this.contexts.set(childName, context);\n }\n return context;\n };\n ChildrenOutletContexts.prototype.getContext = function (childName) {\n return this.contexts.get(childName) || null;\n };\n return ChildrenOutletContexts;\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 * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * \n * \n * \n * ```\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * and a deactivate event when a component is destroyed.\n *\n * ```\n * \n * ```\n * @ngModule RouterModule\n *\n * @publicApi\n */\nvar RouterOutlet = /** @class */ (function () {\n function RouterOutlet(parentContexts, location, resolver, name, changeDetector) {\n this.parentContexts = parentContexts;\n this.location = location;\n this.resolver = resolver;\n this.changeDetector = changeDetector;\n this.activated = null;\n this._activatedRoute = null;\n this.activateEvents = new EventEmitter();\n this.deactivateEvents = new EventEmitter();\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, this);\n }\n RouterOutlet.prototype.ngOnDestroy = function () {\n this.parentContexts.onChildOutletDestroyed(this.name);\n };\n RouterOutlet.prototype.ngOnInit = function () {\n if (!this.activated) {\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n var context = this.parentContexts.getContext(this.name);\n if (context && context.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n }\n else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.resolver || null);\n }\n }\n }\n };\n Object.defineProperty(RouterOutlet.prototype, \"isActivated\", {\n get: function () {\n return !!this.activated;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterOutlet.prototype, \"component\", {\n get: function () {\n if (!this.activated)\n throw new Error('Outlet is not activated');\n return this.activated.instance;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterOutlet.prototype, \"activatedRoute\", {\n get: function () {\n if (!this.activated)\n throw new Error('Outlet is not activated');\n return this._activatedRoute;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterOutlet.prototype, \"activatedRouteData\", {\n get: function () {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n RouterOutlet.prototype.detach = function () {\n if (!this.activated)\n throw new Error('Outlet is not activated');\n this.location.detach();\n var cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n return cmp;\n };\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n RouterOutlet.prototype.attach = function (ref, activatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n };\n RouterOutlet.prototype.deactivate = function () {\n if (this.activated) {\n var c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n };\n RouterOutlet.prototype.activateWith = function (activatedRoute, resolver) {\n if (this.isActivated) {\n throw new Error('Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n var snapshot = activatedRoute._futureSnapshot;\n var component = snapshot.routeConfig.component;\n resolver = resolver || this.resolver;\n var factory = resolver.resolveComponentFactory(component);\n var childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n var injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n this.activated = this.location.createComponent(factory, this.location.length, injector);\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.activateEvents.emit(this.activated.instance);\n };\n __decorate([\n Output('activate'),\n __metadata(\"design:type\", Object)\n ], RouterOutlet.prototype, \"activateEvents\", void 0);\n __decorate([\n Output('deactivate'),\n __metadata(\"design:type\", Object)\n ], RouterOutlet.prototype, \"deactivateEvents\", void 0);\n RouterOutlet = __decorate([ __param(3, Attribute('name')),\n __metadata(\"design:paramtypes\", [ChildrenOutletContexts, ViewContainerRef,\n ComponentFactoryResolver, String, ChangeDetectorRef])\n ], RouterOutlet);\nRouterOutlet.ɵfac = function RouterOutlet_Factory(t) { return new (t || RouterOutlet)(ɵngcc0.ɵɵdirectiveInject(ChildrenOutletContexts), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ComponentFactoryResolver), ɵngcc0.ɵɵinjectAttribute('name'), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef)); };\nRouterOutlet.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: RouterOutlet, selectors: [[\"router-outlet\"]], outputs: { activateEvents: \"activate\", deactivateEvents: \"deactivate\" }, exportAs: [\"outlet\"] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(RouterOutlet, [{\n type: Directive,\n args: [{ selector: 'router-outlet', exportAs: 'outlet' }]\n }], function () { return [{ type: ChildrenOutletContexts }, { type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.ComponentFactoryResolver }, { type: String, decorators: [{\n type: Attribute,\n args: ['name']\n }] }, { type: ɵngcc0.ChangeDetectorRef }]; }, { activateEvents: [{\n type: Output,\n args: ['activate']\n }], deactivateEvents: [{\n type: Output,\n args: ['deactivate']\n }] }); })();\n return RouterOutlet;\n}());\nvar OutletInjector = /** @class */ (function () {\n function OutletInjector(route, childContexts, parent) {\n this.route = route;\n this.childContexts = childContexts;\n this.parent = parent;\n }\n OutletInjector.prototype.get = function (token, notFoundValue) {\n if (token === ActivatedRoute) {\n return this.route;\n }\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n return this.parent.get(token, notFoundValue);\n };\n return OutletInjector;\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 * Provides a preloading strategy.\n *\n * @publicApi\n */\nvar PreloadingStrategy = /** @class */ (function () {\n function PreloadingStrategy() {\n }\n return PreloadingStrategy;\n}());\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nvar PreloadAllModules = /** @class */ (function () {\n function PreloadAllModules() {\n }\n PreloadAllModules.prototype.preload = function (route, fn) {\n return fn().pipe(catchError(function () { return of(null); }));\n };\n return PreloadAllModules;\n}());\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nvar NoPreloading = /** @class */ (function () {\n function NoPreloading() {\n }\n NoPreloading.prototype.preload = function (route, fn) {\n return of(null);\n };\n return NoPreloading;\n}());\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\nvar RouterPreloader = /** @class */ (function () {\n function RouterPreloader(router, moduleLoader, compiler, injector, preloadingStrategy) {\n this.router = router;\n this.injector = injector;\n this.preloadingStrategy = preloadingStrategy;\n var onStartLoad = function (r) { return router.triggerEvent(new RouteConfigLoadStart(r)); };\n var onEndLoad = function (r) { return router.triggerEvent(new RouteConfigLoadEnd(r)); };\n this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n }\n RouterPreloader.prototype.setUpPreloading = function () {\n var _this = this;\n this.subscription =\n this.router.events\n .pipe(filter(function (e) { return e instanceof NavigationEnd; }), concatMap(function () { return _this.preload(); }))\n .subscribe(function () { });\n };\n RouterPreloader.prototype.preload = function () {\n var ngModule = this.injector.get(NgModuleRef);\n return this.processRoutes(ngModule, this.router.config);\n };\n // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n // should be refactored.\n RouterPreloader.prototype.ngOnDestroy = function () {\n this.subscription.unsubscribe();\n };\n RouterPreloader.prototype.processRoutes = function (ngModule, routes) {\n var e_1, _a;\n var res = [];\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var route = routes_1_1.value;\n // we already have the config loaded, just recurse\n if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n var childConfig = route._loadedConfig;\n res.push(this.processRoutes(childConfig.module, childConfig.routes));\n // no config loaded, fetch the config\n }\n else if (route.loadChildren && !route.canLoad) {\n res.push(this.preloadConfig(ngModule, route));\n // recurse into children\n }\n else if (route.children) {\n res.push(this.processRoutes(ngModule, route.children));\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return from(res).pipe(mergeAll(), map(function (_) { return void 0; }));\n };\n RouterPreloader.prototype.preloadConfig = function (ngModule, route) {\n var _this = this;\n return this.preloadingStrategy.preload(route, function () {\n var loaded$ = _this.loader.load(ngModule.injector, route);\n return loaded$.pipe(mergeMap(function (config) {\n route._loadedConfig = config;\n return _this.processRoutes(config.module, config.routes);\n }));\n });\n };\n RouterPreloader = __decorate([ __metadata(\"design:paramtypes\", [Router, NgModuleFactoryLoader, Compiler,\n Injector, PreloadingStrategy])\n ], RouterPreloader);\nRouterPreloader.ɵfac = function RouterPreloader_Factory(t) { return new (t || RouterPreloader)(ɵngcc0.ɵɵinject(Router), ɵngcc0.ɵɵinject(ɵngcc0.NgModuleFactoryLoader), ɵngcc0.ɵɵinject(ɵngcc0.Compiler), ɵngcc0.ɵɵinject(ɵngcc0.Injector), ɵngcc0.ɵɵinject(PreloadingStrategy)); };\nRouterPreloader.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: RouterPreloader, factory: function (t) { return RouterPreloader.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(RouterPreloader, [{\n type: Injectable\n }], function () { return [{ type: Router }, { type: ɵngcc0.NgModuleFactoryLoader }, { type: ɵngcc0.Compiler }, { type: ɵngcc0.Injector }, { type: PreloadingStrategy }]; }, null); })();\n return RouterPreloader;\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 */\nvar RouterScroller = /** @class */ (function () {\n function RouterScroller(router, \n /** @docsNotRequired */ viewportScroller, options) {\n if (options === void 0) { options = {}; }\n this.router = router;\n this.viewportScroller = viewportScroller;\n this.options = options;\n this.lastId = 0;\n this.lastSource = 'imperative';\n this.restoredId = 0;\n this.store = {};\n // Default both options to 'disabled'\n options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n options.anchorScrolling = options.anchorScrolling || 'disabled';\n }\n RouterScroller.prototype.init = function () {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n };\n RouterScroller.prototype.createScrollEvents = function () {\n var _this = this;\n return this.router.events.subscribe(function (e) {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n _this.store[_this.lastId] = _this.viewportScroller.getScrollPosition();\n _this.lastSource = e.navigationTrigger;\n _this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n }\n else if (e instanceof NavigationEnd) {\n _this.lastId = e.id;\n _this.scheduleScrollEvent(e, _this.router.parseUrl(e.urlAfterRedirects).fragment);\n }\n });\n };\n RouterScroller.prototype.consumeScrollEvents = function () {\n var _this = this;\n return this.router.events.subscribe(function (e) {\n if (!(e instanceof Scroll))\n return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (_this.options.scrollPositionRestoration === 'top') {\n _this.viewportScroller.scrollToPosition([0, 0]);\n }\n else if (_this.options.scrollPositionRestoration === 'enabled') {\n _this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n }\n else {\n if (e.anchor && _this.options.anchorScrolling === 'enabled') {\n _this.viewportScroller.scrollToAnchor(e.anchor);\n }\n else if (_this.options.scrollPositionRestoration !== 'disabled') {\n _this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n };\n RouterScroller.prototype.scheduleScrollEvent = function (routerEvent, anchor) {\n this.router.triggerEvent(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n };\n RouterScroller.prototype.ngOnDestroy = function () {\n if (this.routerEventsSubscription) {\n this.routerEventsSubscription.unsubscribe();\n }\n if (this.scrollEventsSubscription) {\n this.scrollEventsSubscription.unsubscribe();\n }\n };\nRouterScroller.ɵfac = function RouterScroller_Factory(t) { ɵngcc0.ɵɵinvalidFactory(); };\nRouterScroller.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: RouterScroller });\n\n return RouterScroller;\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 directives defined in the `RouterModule`.\n */\nvar ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, ɵEmptyOutletComponent];\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nvar ROUTER_CONFIGURATION = new InjectionToken('ROUTER_CONFIGURATION');\n/**\n * @docsNotRequired\n */\nvar ROUTER_FORROOT_GUARD = new InjectionToken('ROUTER_FORROOT_GUARD');\nvar ɵ0 = { enableTracing: false };\nvar ROUTER_PROVIDERS = [\n Location,\n { provide: UrlSerializer, useClass: DefaultUrlSerializer },\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n UrlSerializer, ChildrenOutletContexts, Location, Injector, NgModuleFactoryLoader, Compiler,\n ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n [RouteReuseStrategy, new Optional()]\n ]\n },\n ChildrenOutletContexts,\n { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },\n { provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader },\n RouterPreloader,\n NoPreloading,\n PreloadAllModules,\n { provide: ROUTER_CONFIGURATION, useValue: ɵ0 },\n];\nfunction routerNgProbeToken() {\n return new NgProbeToken('Router', Router);\n}\n/**\n * @usageNotes\n *\n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n *\n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n *\n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n * service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n * include the router service.\n *\n * When registered at the root, the module should be used as follows\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * For submodules and lazy loaded submodules the module should be used as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @description\n *\n * Adds router directives and providers.\n *\n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n *\n * The Angular router service solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n *\n * @see [Routing and Navigation](guide/router.html) for an\n * overview of how the router service should be used.\n *\n * @publicApi\n */\nvar RouterModule = /** @class */ (function () {\n // Note: We are injecting the Router so it gets created eagerly...\n function RouterModule(guard, router) {\n }\n RouterModule_1 = RouterModule;\n /**\n * Creates and configures a module with all the router providers and directives.\n * Optionally sets up an application listener to perform an initial navigation.\n *\n * @param routes An array of `Route` objects that define the navigation paths for the application.\n * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n * @return The new router module.\n */\n RouterModule.forRoot = function (routes, config) {\n return {\n ngModule: RouterModule_1,\n providers: [\n ROUTER_PROVIDERS,\n provideRoutes(routes),\n {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n },\n { provide: ROUTER_CONFIGURATION, useValue: config ? config : {} },\n {\n provide: LocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION]\n },\n {\n provide: RouterScroller,\n useFactory: createRouterScroller,\n deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n },\n {\n provide: PreloadingStrategy,\n useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n NoPreloading\n },\n { provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken },\n provideRouterInitializer(),\n ],\n };\n };\n /**\n * Creates a module with all the router directives and a provider registering routes.\n */\n RouterModule.forChild = function (routes) {\n return { ngModule: RouterModule_1, providers: [provideRoutes(routes)] };\n };\n var RouterModule_1;\n RouterModule = RouterModule_1 = __decorate([ __param(0, Optional()), __param(0, Inject(ROUTER_FORROOT_GUARD)), __param(1, Optional()),\n __metadata(\"design:paramtypes\", [Object, Router])\n ], RouterModule);\nRouterModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: RouterModule });\nRouterModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function RouterModule_Factory(t) { return new (t || RouterModule)(ɵngcc0.ɵɵinject(ROUTER_FORROOT_GUARD, 8), ɵngcc0.ɵɵinject(Router, 8)); } });\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(RouterModule, { declarations: [RouterOutlet,\n RouterLink,\n RouterLinkWithHref,\n RouterLinkActive,\n ɵEmptyOutletComponent], exports: [RouterOutlet,\n RouterLink,\n RouterLinkWithHref,\n RouterLinkActive,\n ɵEmptyOutletComponent] }); })();\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(RouterModule, [{\n type: NgModule,\n args: [{\n declarations: ROUTER_DIRECTIVES,\n exports: ROUTER_DIRECTIVES,\n entryComponents: [ɵEmptyOutletComponent]\n }]\n }], function () { return [{ type: Object, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [ROUTER_FORROOT_GUARD]\n }] }, { type: Router, decorators: [{\n type: Optional\n }] }]; }, null); })();\n return RouterModule;\n}());\nfunction createRouterScroller(router, viewportScroller, config) {\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(router, viewportScroller, config);\n}\nfunction provideLocationStrategy(platformLocationStrategy, baseHref, options) {\n if (options === void 0) { options = {}; }\n return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\nfunction provideForRootGuard(router) {\n if (router) {\n throw new Error(\"RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.\");\n }\n return 'guarded';\n}\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)],\n * providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nfunction provideRoutes(routes) {\n return [\n { provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes },\n { provide: ROUTES, multi: true, useValue: routes },\n ];\n}\nfunction setupRouter(urlSerializer, contexts, location, injector, loader, compiler, config, opts, urlHandlingStrategy, routeReuseStrategy) {\n if (opts === void 0) { opts = {}; }\n var router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n if (opts.errorHandler) {\n router.errorHandler = opts.errorHandler;\n }\n if (opts.malformedUriErrorHandler) {\n router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n }\n if (opts.enableTracing) {\n var dom_1 = ɵgetDOM();\n router.events.subscribe(function (e) {\n dom_1.logGroup(\"Router Event: \" + e.constructor.name);\n dom_1.log(e.toString());\n dom_1.log(e);\n dom_1.logGroupEnd();\n });\n }\n if (opts.onSameUrlNavigation) {\n router.onSameUrlNavigation = opts.onSameUrlNavigation;\n }\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n if (opts.urlUpdateStrategy) {\n router.urlUpdateStrategy = opts.urlUpdateStrategy;\n }\n if (opts.relativeLinkResolution) {\n router.relativeLinkResolution = opts.relativeLinkResolution;\n }\n return router;\n}\nfunction rootRoute(router) {\n return router.routerState.root;\n}\n/**\n * Router initialization requires two steps:\n *\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\n * a resolver or a guard executes asynchronously.\n *\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\n * `afterPreactivation` hook provided by the router.\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\nvar RouterInitializer = /** @class */ (function () {\n function RouterInitializer(injector) {\n this.injector = injector;\n this.initNavigation = false;\n this.resultOfPreactivationDone = new Subject();\n }\n RouterInitializer.prototype.appInitializer = function () {\n var _this = this;\n var p = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n return p.then(function () {\n var resolve = null;\n var res = new Promise(function (r) { return resolve = r; });\n var router = _this.injector.get(Router);\n var opts = _this.injector.get(ROUTER_CONFIGURATION);\n if (_this.isLegacyDisabled(opts) || _this.isLegacyEnabled(opts)) {\n resolve(true);\n }\n else if (opts.initialNavigation === 'disabled') {\n router.setUpLocationChangeListener();\n resolve(true);\n }\n else if (opts.initialNavigation === 'enabled') {\n router.hooks.afterPreactivation = function () {\n // only the initial navigation should be delayed\n if (!_this.initNavigation) {\n _this.initNavigation = true;\n resolve(true);\n return _this.resultOfPreactivationDone;\n // subsequent navigations should not be delayed\n }\n else {\n return of(null);\n }\n };\n router.initialNavigation();\n }\n else {\n throw new Error(\"Invalid initialNavigation options: '\" + opts.initialNavigation + \"'\");\n }\n return res;\n });\n };\n RouterInitializer.prototype.bootstrapListener = function (bootstrappedComponentRef) {\n var opts = this.injector.get(ROUTER_CONFIGURATION);\n var preloader = this.injector.get(RouterPreloader);\n var routerScroller = this.injector.get(RouterScroller);\n var router = this.injector.get(Router);\n var ref = this.injector.get(ApplicationRef);\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n if (this.isLegacyEnabled(opts)) {\n router.initialNavigation();\n }\n else if (this.isLegacyDisabled(opts)) {\n router.setUpLocationChangeListener();\n }\n preloader.setUpPreloading();\n routerScroller.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n this.resultOfPreactivationDone.next(null);\n this.resultOfPreactivationDone.complete();\n };\n RouterInitializer.prototype.isLegacyEnabled = function (opts) {\n return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n opts.initialNavigation === undefined;\n };\n RouterInitializer.prototype.isLegacyDisabled = function (opts) {\n return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n };\n RouterInitializer = __decorate([ __metadata(\"design:paramtypes\", [Injector])\n ], RouterInitializer);\nRouterInitializer.ɵfac = function RouterInitializer_Factory(t) { return new (t || RouterInitializer)(ɵngcc0.ɵɵinject(ɵngcc0.Injector)); };\nRouterInitializer.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: RouterInitializer, factory: function (t) { return RouterInitializer.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(RouterInitializer, [{\n type: Injectable\n }], function () { return [{ type: ɵngcc0.Injector }]; }, null); })();\n return RouterInitializer;\n}());\nfunction getAppInitializer(r) {\n return r.appInitializer.bind(r);\n}\nfunction getBootstrapListener(r) {\n return r.bootstrapListener.bind(r);\n}\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nvar ROUTER_INITIALIZER = new InjectionToken('Router Initializer');\nfunction provideRouterInitializer() {\n return [\n RouterInitializer,\n {\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: getAppInitializer,\n deps: [RouterInitializer]\n },\n { provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer] },\n { provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER },\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 * @publicApi\n */\nvar VERSION = new Version('9.1.11');\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\nexport { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultUrlSerializer, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, provideRoutes, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a, routerNgProbeToken as ɵangular_packages_router_router_b, createRouterScroller as ɵangular_packages_router_router_c, provideLocationStrategy as ɵangular_packages_router_router_d, provideForRootGuard as ɵangular_packages_router_router_e, setupRouter as ɵangular_packages_router_router_f, rootRoute as ɵangular_packages_router_router_g, RouterInitializer as ɵangular_packages_router_router_h, getAppInitializer as ɵangular_packages_router_router_i, getBootstrapListener as ɵangular_packages_router_router_j, provideRouterInitializer as ɵangular_packages_router_router_k, ɵEmptyOutletComponent as ɵangular_packages_router_router_l, Tree as ɵangular_packages_router_router_m, TreeNode as ɵangular_packages_router_router_n, RouterScroller as ɵangular_packages_router_router_o, flatten as ɵflatten };\n\n//# sourceMappingURL=router.js.map","/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */\nimport { concat } from '../observable/concat';\nimport { isScheduler } from '../util/isScheduler';\nexport function startWith() {\n var array = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n array[_i] = arguments[_i];\n }\n var scheduler = array[array.length - 1];\n if (isScheduler(scheduler)) {\n array.pop();\n return function (source) { return concat(array, source, scheduler); };\n }\n else {\n return function (source) { return concat(array, source); };\n }\n}\n//# sourceMappingURL=startWith.js.map\n","/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */\nimport { scan } from './scan';\nimport { takeLast } from './takeLast';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { pipe } from '../util/pipe';\nexport function reduce(accumulator, seed) {\n if (arguments.length >= 2) {\n return function reduceOperatorFunctionWithSeed(source) {\n return pipe(scan(accumulator, seed), takeLast(1), defaultIfEmpty(seed))(source);\n };\n }\n return function reduceOperatorFunction(source) {\n return pipe(scan(function (acc, value, index) { return accumulator(acc, value, index + 1); }), takeLast(1))(source);\n };\n}\n//# sourceMappingURL=reduce.js.map\n","/**\n * @license Angular v9.1.11\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { __extends, __assign, __decorate, __param, __metadata } from 'tslib';\nimport { ɵDomAdapter, ɵsetRootDomAdapter, ɵparseCookieValue, ɵgetDOM, DOCUMENT, ɵPLATFORM_BROWSER_ID, CommonModule } from '@angular/common';\nimport * as ɵngcc0 from '@angular/core';\nexport { ɵgetDOM } from '@angular/common';\nimport { ɵglobal, InjectionToken, ApplicationInitStatus, APP_INITIALIZER, Injector, setTestabilityGetter, ApplicationRef, NgZone, ɵgetDebugNodeR2, NgProbeToken, Optional, Injectable, Inject, ViewEncapsulation, APP_ID, RendererStyleFlags2, ɵConsole, NgModule, ɵɵdefineInjectable, ɵɵinject, forwardRef, SecurityContext, ɵallowSanitizationBypassAndThrow, ɵunwrapSafeValue, ɵgetSanitizationBypassType, ɵ_sanitizeUrl, ɵ_sanitizeStyle, ɵ_sanitizeHtml, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, INJECTOR, ErrorHandler, ɵsetDocument, PLATFORM_ID, PLATFORM_INITIALIZER, Sanitizer, createPlatformFactory, platformCore, ɵINJECTOR_SCOPE, RendererFactory2, Testability, ApplicationModule, SkipSelf, Version } from '@angular/core';\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 DOM operations in any browser environment.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nvar GenericBrowserDomAdapter = /** @class */ (function (_super) {\n __extends(GenericBrowserDomAdapter, _super);\n function GenericBrowserDomAdapter() {\n return _super.call(this) || this;\n }\n GenericBrowserDomAdapter.prototype.supportsDOMEvents = function () {\n return true;\n };\n return GenericBrowserDomAdapter;\n}(ɵDomAdapter));\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 */\nvar ɵ0 = function () {\n if (ɵglobal['Node']) {\n return ɵglobal['Node'].prototype.contains || function (node) {\n return !!(this.compareDocumentPosition(node) & 16);\n };\n }\n return undefined;\n};\nvar nodeContains = (ɵ0)();\n/**\n * A `DomAdapter` powered by full browser DOM APIs.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\n/* tslint:disable:requireParameterType no-console */\nvar BrowserDomAdapter = /** @class */ (function (_super) {\n __extends(BrowserDomAdapter, _super);\n function BrowserDomAdapter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n BrowserDomAdapter.makeCurrent = function () {\n ɵsetRootDomAdapter(new BrowserDomAdapter());\n };\n BrowserDomAdapter.prototype.getProperty = function (el, name) {\n return el[name];\n };\n BrowserDomAdapter.prototype.log = function (error) {\n if (window.console) {\n window.console.log && window.console.log(error);\n }\n };\n BrowserDomAdapter.prototype.logGroup = function (error) {\n if (window.console) {\n window.console.group && window.console.group(error);\n }\n };\n BrowserDomAdapter.prototype.logGroupEnd = function () {\n if (window.console) {\n window.console.groupEnd && window.console.groupEnd();\n }\n };\n BrowserDomAdapter.prototype.onAndCancel = function (el, evt, listener) {\n el.addEventListener(evt, listener, false);\n // Needed to follow Dart's subscription semantic, until fix of\n // https://code.google.com/p/dart/issues/detail?id=17406\n return function () {\n el.removeEventListener(evt, listener, false);\n };\n };\n BrowserDomAdapter.prototype.dispatchEvent = function (el, evt) {\n el.dispatchEvent(evt);\n };\n BrowserDomAdapter.prototype.remove = function (node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n return node;\n };\n BrowserDomAdapter.prototype.getValue = function (el) {\n return el.value;\n };\n BrowserDomAdapter.prototype.createElement = function (tagName, doc) {\n doc = doc || this.getDefaultDocument();\n return doc.createElement(tagName);\n };\n BrowserDomAdapter.prototype.createHtmlDocument = function () {\n return document.implementation.createHTMLDocument('fakeTitle');\n };\n BrowserDomAdapter.prototype.getDefaultDocument = function () {\n return document;\n };\n BrowserDomAdapter.prototype.isElementNode = function (node) {\n return node.nodeType === Node.ELEMENT_NODE;\n };\n BrowserDomAdapter.prototype.isShadowRoot = function (node) {\n return node instanceof DocumentFragment;\n };\n BrowserDomAdapter.prototype.getGlobalEventTarget = function (doc, target) {\n if (target === 'window') {\n return window;\n }\n if (target === 'document') {\n return doc;\n }\n if (target === 'body') {\n return doc.body;\n }\n return null;\n };\n BrowserDomAdapter.prototype.getHistory = function () {\n return window.history;\n };\n BrowserDomAdapter.prototype.getLocation = function () {\n return window.location;\n };\n BrowserDomAdapter.prototype.getBaseHref = function (doc) {\n var href = getBaseElementHref();\n return href == null ? null : relativePath(href);\n };\n BrowserDomAdapter.prototype.resetBaseElement = function () {\n baseElement = null;\n };\n BrowserDomAdapter.prototype.getUserAgent = function () {\n return window.navigator.userAgent;\n };\n BrowserDomAdapter.prototype.performanceNow = function () {\n // performance.now() is not available in all browsers, see\n // http://caniuse.com/#search=performance.now\n return window.performance && window.performance.now ? window.performance.now() :\n new Date().getTime();\n };\n BrowserDomAdapter.prototype.supportsCookies = function () {\n return true;\n };\n BrowserDomAdapter.prototype.getCookie = function (name) {\n return ɵparseCookieValue(document.cookie, name);\n };\n return BrowserDomAdapter;\n}(GenericBrowserDomAdapter));\nvar baseElement = null;\nfunction getBaseElementHref() {\n if (!baseElement) {\n baseElement = document.querySelector('base');\n if (!baseElement) {\n return null;\n }\n }\n return baseElement.getAttribute('href');\n}\n// based on urlUtils.js in AngularJS 1\nvar urlParsingNode;\nfunction relativePath(url) {\n if (!urlParsingNode) {\n urlParsingNode = document.createElement('a');\n }\n urlParsingNode.setAttribute('href', url);\n return (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname :\n '/' + urlParsingNode.pathname;\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 id that identifies a particular application being bootstrapped, that should\n * match across the client/server boundary.\n */\nvar TRANSITION_ID = new InjectionToken('TRANSITION_ID');\nfunction appInitializerFactory(transitionId, document, injector) {\n return function () {\n // Wait for all application initializers to be completed before removing the styles set by\n // the server.\n injector.get(ApplicationInitStatus).donePromise.then(function () {\n var dom = ɵgetDOM();\n var styles = Array.prototype.slice.apply(document.querySelectorAll(\"style[ng-transition]\"));\n styles.filter(function (el) { return el.getAttribute('ng-transition') === transitionId; })\n .forEach(function (el) { return dom.remove(el); });\n });\n };\n}\nvar SERVER_TRANSITION_PROVIDERS = [\n {\n provide: APP_INITIALIZER,\n useFactory: appInitializerFactory,\n deps: [TRANSITION_ID, DOCUMENT, Injector],\n multi: true\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 */\nvar BrowserGetTestability = /** @class */ (function () {\n function BrowserGetTestability() {\n }\n BrowserGetTestability.init = function () {\n setTestabilityGetter(new BrowserGetTestability());\n };\n BrowserGetTestability.prototype.addToWindow = function (registry) {\n ɵglobal['getAngularTestability'] = function (elem, findInAncestors) {\n if (findInAncestors === void 0) { findInAncestors = true; }\n var testability = registry.findTestabilityInTree(elem, findInAncestors);\n if (testability == null) {\n throw new Error('Could not find testability for element.');\n }\n return testability;\n };\n ɵglobal['getAllAngularTestabilities'] = function () { return registry.getAllTestabilities(); };\n ɵglobal['getAllAngularRootElements'] = function () { return registry.getAllRootElements(); };\n var whenAllStable = function (callback /** TODO #9100 */) {\n var testabilities = ɵglobal['getAllAngularTestabilities']();\n var count = testabilities.length;\n var didWork = false;\n var decrement = function (didWork_ /** TODO #9100 */) {\n didWork = didWork || didWork_;\n count--;\n if (count == 0) {\n callback(didWork);\n }\n };\n testabilities.forEach(function (testability /** TODO #9100 */) {\n testability.whenStable(decrement);\n });\n };\n if (!ɵglobal['frameworkStabilizers']) {\n ɵglobal['frameworkStabilizers'] = [];\n }\n ɵglobal['frameworkStabilizers'].push(whenAllStable);\n };\n BrowserGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {\n if (elem == null) {\n return null;\n }\n var t = registry.getTestability(elem);\n if (t != null) {\n return t;\n }\n else if (!findInAncestors) {\n return null;\n }\n if (ɵgetDOM().isShadowRoot(elem)) {\n return this.findTestabilityInTree(registry, elem.host, true);\n }\n return this.findTestabilityInTree(registry, elem.parentElement, true);\n };\n return BrowserGetTestability;\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 */\nvar CAMEL_CASE_REGEXP = /([A-Z])/g;\nvar DASH_CASE_REGEXP = /-([a-z])/g;\nfunction 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}\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_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].toUpperCase();\n });\n}\n/**\n * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if\n * `name` is `'probe'`.\n * @param name Name under which it will be exported. Keep in mind this will be a property of the\n * global `ng` object.\n * @param value The value to export.\n */\nfunction exportNgVar(name, value) {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for angularJS (via `goog.provide('ng....')`).\n var ng = ɵglobal['ng'] = ɵglobal['ng'] || {};\n ng[name] = 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 */\nvar ɵ0$1 = function () { return ({\n 'ApplicationRef': ApplicationRef,\n 'NgZone': NgZone,\n}); };\nvar CORE_TOKENS = (ɵ0$1)();\nvar INSPECT_GLOBAL_NAME = 'probe';\nvar CORE_TOKENS_GLOBAL_NAME = 'coreTokens';\n/**\n * Returns a {@link DebugElement} for the given native DOM element, or\n * null if the given native element does not have an Angular view associated\n * with it.\n */\nfunction inspectNativeElementR2(element) {\n return ɵgetDebugNodeR2(element);\n}\nfunction _createNgProbeR2(coreTokens) {\n exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElementR2);\n exportNgVar(CORE_TOKENS_GLOBAL_NAME, __assign(__assign({}, CORE_TOKENS), _ngProbeTokensToMap(coreTokens || [])));\n return function () { return inspectNativeElementR2; };\n}\nfunction _ngProbeTokensToMap(tokens) {\n return tokens.reduce(function (prev, t) { return (prev[t.name] = t.token, prev); }, {});\n}\n/**\n * In Ivy, we don't support NgProbe because we have our own set of testing utilities\n * with more robust functionality.\n *\n * We shouldn't bring in NgProbe because it prevents DebugNode and friends from\n * tree-shaking properly.\n */\nvar ELEMENT_PROBE_PROVIDERS__POST_R3__ = [];\n/**\n * Providers which support debugging Angular applications (e.g. via `ng.probe`).\n */\nvar ELEMENT_PROBE_PROVIDERS__PRE_R3__ = [\n {\n provide: APP_INITIALIZER,\n useFactory: _createNgProbeR2,\n deps: [\n [NgProbeToken, new Optional()],\n ],\n multi: true,\n },\n];\nvar ELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS__POST_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 * The injection token for the event-manager plug-in service.\n *\n * @publicApi\n */\nvar EVENT_MANAGER_PLUGINS = new InjectionToken('EventManagerPlugins');\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n *\n * @publicApi\n */\nvar EventManager = /** @class */ (function () {\n /**\n * Initializes an instance of the event-manager service.\n */\n function EventManager(plugins, _zone) {\n var _this = this;\n this._zone = _zone;\n this._eventNameToPlugin = new Map();\n plugins.forEach(function (p) { return p.manager = _this; });\n this._plugins = plugins.slice().reverse();\n }\n /**\n * Registers a handler for a specific element and event.\n *\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n */\n EventManager.prototype.addEventListener = function (element, eventName, handler) {\n var plugin = this._findPluginFor(eventName);\n return plugin.addEventListener(element, eventName, handler);\n };\n /**\n * Registers a global handler for an event in a target view.\n *\n * @param target A target for global event notifications. One of \"window\", \"document\", or \"body\".\n * @param eventName The name of the event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns A callback function that can be used to remove the handler.\n */\n EventManager.prototype.addGlobalEventListener = function (target, eventName, handler) {\n var plugin = this._findPluginFor(eventName);\n return plugin.addGlobalEventListener(target, eventName, handler);\n };\n /**\n * Retrieves the compilation zone in which event listeners are registered.\n */\n EventManager.prototype.getZone = function () {\n return this._zone;\n };\n /** @internal */\n EventManager.prototype._findPluginFor = function (eventName) {\n var plugin = this._eventNameToPlugin.get(eventName);\n if (plugin) {\n return plugin;\n }\n var plugins = this._plugins;\n for (var i = 0; i < plugins.length; i++) {\n var plugin_1 = plugins[i];\n if (plugin_1.supports(eventName)) {\n this._eventNameToPlugin.set(eventName, plugin_1);\n return plugin_1;\n }\n }\n throw new Error(\"No event manager plugin found for event \" + eventName);\n };\n EventManager = __decorate([ __param(0, Inject(EVENT_MANAGER_PLUGINS)),\n __metadata(\"design:paramtypes\", [Array, NgZone])\n ], EventManager);\nEventManager.ɵfac = function EventManager_Factory(t) { return new (t || EventManager)(ɵngcc0.ɵɵinject(EVENT_MANAGER_PLUGINS), ɵngcc0.ɵɵinject(ɵngcc0.NgZone)); };\nEventManager.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: EventManager, factory: function (t) { return EventManager.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(EventManager, [{\n type: Injectable\n }], function () { return [{ type: Array, decorators: [{\n type: Inject,\n args: [EVENT_MANAGER_PLUGINS]\n }] }, { type: ɵngcc0.NgZone }]; }, null); })();\n return EventManager;\n}());\nvar EventManagerPlugin = /** @class */ (function () {\n function EventManagerPlugin(_doc) {\n this._doc = _doc;\n }\n EventManagerPlugin.prototype.addGlobalEventListener = function (element, eventName, handler) {\n var target = ɵgetDOM().getGlobalEventTarget(this._doc, element);\n if (!target) {\n throw new Error(\"Unsupported event target \" + target + \" for event \" + eventName);\n }\n return this.addEventListener(target, eventName, handler);\n };\n return EventManagerPlugin;\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 */\nvar SharedStylesHost = /** @class */ (function () {\n function SharedStylesHost() {\n /** @internal */\n this._stylesSet = new Set();\n }\n SharedStylesHost.prototype.addStyles = function (styles) {\n var _this = this;\n var additions = new Set();\n styles.forEach(function (style) {\n if (!_this._stylesSet.has(style)) {\n _this._stylesSet.add(style);\n additions.add(style);\n }\n });\n this.onStylesAdded(additions);\n };\n SharedStylesHost.prototype.onStylesAdded = function (additions) { };\n SharedStylesHost.prototype.getAllStyles = function () {\n return Array.from(this._stylesSet);\n };\nSharedStylesHost.ɵfac = function SharedStylesHost_Factory(t) { return new (t || SharedStylesHost)(); };\nSharedStylesHost.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: SharedStylesHost, factory: function (t) { return SharedStylesHost.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(SharedStylesHost, [{\n type: Injectable\n }], function () { return []; }, null); })();\n return SharedStylesHost;\n}());\nvar DomSharedStylesHost = /** @class */ (function (_super) {\n __extends(DomSharedStylesHost, _super);\n function DomSharedStylesHost(_doc) {\n var _this = _super.call(this) || this;\n _this._doc = _doc;\n _this._hostNodes = new Set();\n _this._styleNodes = new Set();\n _this._hostNodes.add(_doc.head);\n return _this;\n }\n DomSharedStylesHost.prototype._addStylesToHost = function (styles, host) {\n var _this = this;\n styles.forEach(function (style) {\n var styleEl = _this._doc.createElement('style');\n styleEl.textContent = style;\n _this._styleNodes.add(host.appendChild(styleEl));\n });\n };\n DomSharedStylesHost.prototype.addHost = function (hostNode) {\n this._addStylesToHost(this._stylesSet, hostNode);\n this._hostNodes.add(hostNode);\n };\n DomSharedStylesHost.prototype.removeHost = function (hostNode) {\n this._hostNodes.delete(hostNode);\n };\n DomSharedStylesHost.prototype.onStylesAdded = function (additions) {\n var _this = this;\n this._hostNodes.forEach(function (hostNode) { return _this._addStylesToHost(additions, hostNode); });\n };\n DomSharedStylesHost.prototype.ngOnDestroy = function () {\n this._styleNodes.forEach(function (styleNode) { return ɵgetDOM().remove(styleNode); });\n };\n DomSharedStylesHost = __decorate([ __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], DomSharedStylesHost);\nDomSharedStylesHost.ɵfac = function DomSharedStylesHost_Factory(t) { return new (t || DomSharedStylesHost)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nDomSharedStylesHost.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: DomSharedStylesHost, factory: function (t) { return DomSharedStylesHost.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(DomSharedStylesHost, [{\n type: Injectable\n }], function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n return DomSharedStylesHost;\n}(SharedStylesHost));\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 */\nvar NAMESPACE_URIS = {\n 'svg': 'http://www.w3.org/2000/svg',\n 'xhtml': 'http://www.w3.org/1999/xhtml',\n 'xlink': 'http://www.w3.org/1999/xlink',\n 'xml': 'http://www.w3.org/XML/1998/namespace',\n 'xmlns': 'http://www.w3.org/2000/xmlns/',\n};\nvar COMPONENT_REGEX = /%COMP%/g;\nvar NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\nvar COMPONENT_VARIABLE = '%COMP%';\nvar HOST_ATTR = \"_nghost-\" + COMPONENT_VARIABLE;\nvar CONTENT_ATTR = \"_ngcontent-\" + COMPONENT_VARIABLE;\nfunction shimContentAttribute(componentShortId) {\n return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction shimHostAttribute(componentShortId) {\n return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction flattenStyles(compId, styles, target) {\n for (var i = 0; i < styles.length; i++) {\n var style = styles[i];\n if (Array.isArray(style)) {\n flattenStyles(compId, style, target);\n }\n else {\n style = style.replace(COMPONENT_REGEX, compId);\n target.push(style);\n }\n }\n return target;\n}\nfunction decoratePreventDefault(eventHandler) {\n // `DebugNode.triggerEventHandler` needs to know if the listener was created with\n // decoratePreventDefault or is a listener added outside the Angular context so it can handle the\n // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap\n // the listener (see below).\n return function (event) {\n // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node\n // can inspect the listener toString contents for the existence of this special token. Because\n // the token is a string literal, it is ensured to not be modified by compiled code.\n if (event === '__ngUnwrap__') {\n return eventHandler;\n }\n var allowDefaultBehavior = eventHandler(event);\n if (allowDefaultBehavior === false) {\n // TODO(tbosch): move preventDefault into event plugins...\n event.preventDefault();\n event.returnValue = false;\n }\n return undefined;\n };\n}\nvar DomRendererFactory2 = /** @class */ (function () {\n function DomRendererFactory2(eventManager, sharedStylesHost, appId) {\n this.eventManager = eventManager;\n this.sharedStylesHost = sharedStylesHost;\n this.appId = appId;\n this.rendererByCompId = new Map();\n this.defaultRenderer = new DefaultDomRenderer2(eventManager);\n }\n DomRendererFactory2.prototype.createRenderer = function (element, type) {\n if (!element || !type) {\n return this.defaultRenderer;\n }\n switch (type.encapsulation) {\n case ViewEncapsulation.Emulated: {\n var renderer = this.rendererByCompId.get(type.id);\n if (!renderer) {\n renderer = new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type, this.appId);\n this.rendererByCompId.set(type.id, renderer);\n }\n renderer.applyToHost(element);\n return renderer;\n }\n case ViewEncapsulation.Native:\n case ViewEncapsulation.ShadowDom:\n return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);\n default: {\n if (!this.rendererByCompId.has(type.id)) {\n var styles = flattenStyles(type.id, type.styles, []);\n this.sharedStylesHost.addStyles(styles);\n this.rendererByCompId.set(type.id, this.defaultRenderer);\n }\n return this.defaultRenderer;\n }\n }\n };\n DomRendererFactory2.prototype.begin = function () { };\n DomRendererFactory2.prototype.end = function () { };\n DomRendererFactory2 = __decorate([ __param(2, Inject(APP_ID)),\n __metadata(\"design:paramtypes\", [EventManager, DomSharedStylesHost, String])\n ], DomRendererFactory2);\nDomRendererFactory2.ɵfac = function DomRendererFactory2_Factory(t) { return new (t || DomRendererFactory2)(ɵngcc0.ɵɵinject(EventManager), ɵngcc0.ɵɵinject(DomSharedStylesHost), ɵngcc0.ɵɵinject(APP_ID)); };\nDomRendererFactory2.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: DomRendererFactory2, factory: function (t) { return DomRendererFactory2.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(DomRendererFactory2, [{\n type: Injectable\n }], function () { return [{ type: EventManager }, { type: DomSharedStylesHost }, { type: String, decorators: [{\n type: Inject,\n args: [APP_ID]\n }] }]; }, null); })();\n return DomRendererFactory2;\n}());\nvar DefaultDomRenderer2 = /** @class */ (function () {\n function DefaultDomRenderer2(eventManager) {\n this.eventManager = eventManager;\n this.data = Object.create(null);\n }\n DefaultDomRenderer2.prototype.destroy = function () { };\n DefaultDomRenderer2.prototype.createElement = function (name, namespace) {\n if (namespace) {\n // In cases where Ivy (not ViewEngine) is giving us the actual namespace, the look up by key\n // will result in undefined, so we just return the namespace here.\n return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n }\n return document.createElement(name);\n };\n DefaultDomRenderer2.prototype.createComment = function (value) {\n return document.createComment(value);\n };\n DefaultDomRenderer2.prototype.createText = function (value) {\n return document.createTextNode(value);\n };\n DefaultDomRenderer2.prototype.appendChild = function (parent, newChild) {\n parent.appendChild(newChild);\n };\n DefaultDomRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {\n if (parent) {\n parent.insertBefore(newChild, refChild);\n }\n };\n DefaultDomRenderer2.prototype.removeChild = function (parent, oldChild) {\n if (parent) {\n parent.removeChild(oldChild);\n }\n };\n DefaultDomRenderer2.prototype.selectRootElement = function (selectorOrNode, preserveContent) {\n var el = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :\n selectorOrNode;\n if (!el) {\n throw new Error(\"The selector \\\"\" + selectorOrNode + \"\\\" did not match any elements\");\n }\n if (!preserveContent) {\n el.textContent = '';\n }\n return el;\n };\n DefaultDomRenderer2.prototype.parentNode = function (node) {\n return node.parentNode;\n };\n DefaultDomRenderer2.prototype.nextSibling = function (node) {\n return node.nextSibling;\n };\n DefaultDomRenderer2.prototype.setAttribute = function (el, name, value, namespace) {\n if (namespace) {\n name = namespace + ':' + name;\n // TODO(FW-811): Ivy may cause issues here because it's passing around\n // full URIs for namespaces, therefore this lookup will fail.\n var namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.setAttributeNS(namespaceUri, name, value);\n }\n else {\n el.setAttribute(name, value);\n }\n }\n else {\n el.setAttribute(name, value);\n }\n };\n DefaultDomRenderer2.prototype.removeAttribute = function (el, name, namespace) {\n if (namespace) {\n // TODO(FW-811): Ivy may cause issues here because it's passing around\n // full URIs for namespaces, therefore this lookup will fail.\n var namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.removeAttributeNS(namespaceUri, name);\n }\n else {\n // TODO(FW-811): Since ivy is passing around full URIs for namespaces\n // this could result in properties like `http://www.w3.org/2000/svg:cx=\"123\"`,\n // which is wrong.\n el.removeAttribute(namespace + \":\" + name);\n }\n }\n else {\n el.removeAttribute(name);\n }\n };\n DefaultDomRenderer2.prototype.addClass = function (el, name) {\n el.classList.add(name);\n };\n DefaultDomRenderer2.prototype.removeClass = function (el, name) {\n el.classList.remove(name);\n };\n DefaultDomRenderer2.prototype.setStyle = function (el, style, value, flags) {\n if (flags & RendererStyleFlags2.DashCase) {\n el.style.setProperty(style, value, !!(flags & RendererStyleFlags2.Important) ? 'important' : '');\n }\n else {\n el.style[style] = value;\n }\n };\n DefaultDomRenderer2.prototype.removeStyle = function (el, style, flags) {\n if (flags & RendererStyleFlags2.DashCase) {\n el.style.removeProperty(style);\n }\n else {\n // IE requires '' instead of null\n // see https://github.com/angular/angular/issues/7916\n el.style[style] = '';\n }\n };\n DefaultDomRenderer2.prototype.setProperty = function (el, name, value) {\n NG_DEV_MODE && checkNoSyntheticProp(name, 'property');\n el[name] = value;\n };\n DefaultDomRenderer2.prototype.setValue = function (node, value) {\n node.nodeValue = value;\n };\n DefaultDomRenderer2.prototype.listen = function (target, event, callback) {\n NG_DEV_MODE && checkNoSyntheticProp(event, 'listener');\n if (typeof target === 'string') {\n return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));\n }\n return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));\n };\n return DefaultDomRenderer2;\n}());\nvar ɵ0$2 = function () { return '@'.charCodeAt(0); };\nvar AT_CHARCODE = (ɵ0$2)();\nfunction checkNoSyntheticProp(name, nameKind) {\n if (name.charCodeAt(0) === AT_CHARCODE) {\n throw new Error(\"Found the synthetic \" + nameKind + \" \" + name + \". Please include either \\\"BrowserAnimationsModule\\\" or \\\"NoopAnimationsModule\\\" in your application.\");\n }\n}\nvar EmulatedEncapsulationDomRenderer2 = /** @class */ (function (_super) {\n __extends(EmulatedEncapsulationDomRenderer2, _super);\n function EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, component, appId) {\n var _this = _super.call(this, eventManager) || this;\n _this.component = component;\n var styles = flattenStyles(appId + '-' + component.id, component.styles, []);\n sharedStylesHost.addStyles(styles);\n _this.contentAttr = shimContentAttribute(appId + '-' + component.id);\n _this.hostAttr = shimHostAttribute(appId + '-' + component.id);\n return _this;\n }\n EmulatedEncapsulationDomRenderer2.prototype.applyToHost = function (element) {\n _super.prototype.setAttribute.call(this, element, this.hostAttr, '');\n };\n EmulatedEncapsulationDomRenderer2.prototype.createElement = function (parent, name) {\n var el = _super.prototype.createElement.call(this, parent, name);\n _super.prototype.setAttribute.call(this, el, this.contentAttr, '');\n return el;\n };\n return EmulatedEncapsulationDomRenderer2;\n}(DefaultDomRenderer2));\nvar ShadowDomRenderer = /** @class */ (function (_super) {\n __extends(ShadowDomRenderer, _super);\n function ShadowDomRenderer(eventManager, sharedStylesHost, hostEl, component) {\n var _this = _super.call(this, eventManager) || this;\n _this.sharedStylesHost = sharedStylesHost;\n _this.hostEl = hostEl;\n _this.component = component;\n if (component.encapsulation === ViewEncapsulation.ShadowDom) {\n _this.shadowRoot = hostEl.attachShadow({ mode: 'open' });\n }\n else {\n _this.shadowRoot = hostEl.createShadowRoot();\n }\n _this.sharedStylesHost.addHost(_this.shadowRoot);\n var styles = flattenStyles(component.id, component.styles, []);\n for (var i = 0; i < styles.length; i++) {\n var styleEl = document.createElement('style');\n styleEl.textContent = styles[i];\n _this.shadowRoot.appendChild(styleEl);\n }\n return _this;\n }\n ShadowDomRenderer.prototype.nodeOrShadowRoot = function (node) {\n return node === this.hostEl ? this.shadowRoot : node;\n };\n ShadowDomRenderer.prototype.destroy = function () {\n this.sharedStylesHost.removeHost(this.shadowRoot);\n };\n ShadowDomRenderer.prototype.appendChild = function (parent, newChild) {\n return _super.prototype.appendChild.call(this, this.nodeOrShadowRoot(parent), newChild);\n };\n ShadowDomRenderer.prototype.insertBefore = function (parent, newChild, refChild) {\n return _super.prototype.insertBefore.call(this, this.nodeOrShadowRoot(parent), newChild, refChild);\n };\n ShadowDomRenderer.prototype.removeChild = function (parent, oldChild) {\n return _super.prototype.removeChild.call(this, this.nodeOrShadowRoot(parent), oldChild);\n };\n ShadowDomRenderer.prototype.parentNode = function (node) {\n return this.nodeOrShadowRoot(_super.prototype.parentNode.call(this, this.nodeOrShadowRoot(node)));\n };\n return ShadowDomRenderer;\n}(DefaultDomRenderer2));\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 */\nvar DomEventsPlugin = /** @class */ (function (_super) {\n __extends(DomEventsPlugin, _super);\n function DomEventsPlugin(doc) {\n return _super.call(this, doc) || this;\n }\n // This plugin should come last in the list of plugins, because it accepts all\n // events.\n DomEventsPlugin.prototype.supports = function (eventName) {\n return true;\n };\n DomEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {\n var _this = this;\n element.addEventListener(eventName, handler, false);\n return function () { return _this.removeEventListener(element, eventName, handler); };\n };\n DomEventsPlugin.prototype.removeEventListener = function (target, eventName, callback) {\n return target.removeEventListener(eventName, callback);\n };\n DomEventsPlugin = __decorate([ __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], DomEventsPlugin);\nDomEventsPlugin.ɵfac = function DomEventsPlugin_Factory(t) { return new (t || DomEventsPlugin)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nDomEventsPlugin.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: DomEventsPlugin, factory: function (t) { return DomEventsPlugin.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(DomEventsPlugin, [{\n type: Injectable\n }], function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n return DomEventsPlugin;\n}(EventManagerPlugin));\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 * Supported HammerJS recognizer event names.\n */\nvar EVENT_NAMES = {\n // pan\n 'pan': true,\n 'panstart': true,\n 'panmove': true,\n 'panend': true,\n 'pancancel': true,\n 'panleft': true,\n 'panright': true,\n 'panup': true,\n 'pandown': true,\n // pinch\n 'pinch': true,\n 'pinchstart': true,\n 'pinchmove': true,\n 'pinchend': true,\n 'pinchcancel': true,\n 'pinchin': true,\n 'pinchout': true,\n // press\n 'press': true,\n 'pressup': true,\n // rotate\n 'rotate': true,\n 'rotatestart': true,\n 'rotatemove': true,\n 'rotateend': true,\n 'rotatecancel': true,\n // swipe\n 'swipe': true,\n 'swipeleft': true,\n 'swiperight': true,\n 'swipeup': true,\n 'swipedown': true,\n // tap\n 'tap': true,\n};\n/**\n * DI token for providing [HammerJS](http://hammerjs.github.io/) support to Angular.\n * @see `HammerGestureConfig`\n *\n * @ngModule HammerModule\n * @publicApi\n */\nvar HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');\n/**\n * Injection token used to provide a {@link HammerLoader} to Angular.\n *\n * @publicApi\n */\nvar HAMMER_LOADER = new InjectionToken('HammerLoader');\n/**\n * An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)\n * for gesture recognition. Configures specific event recognition.\n * @publicApi\n */\nvar HammerGestureConfig = /** @class */ (function () {\n function HammerGestureConfig() {\n /**\n * A set of supported event names for gestures to be used in Angular.\n * Angular supports all built-in recognizers, as listed in\n * [HammerJS documentation](http://hammerjs.github.io/).\n */\n this.events = [];\n /**\n * Maps gesture event names to a set of configuration options\n * that specify overrides to the default values for specific properties.\n *\n * The key is a supported event name to be configured,\n * and the options object contains a set of properties, with override values\n * to be applied to the named recognizer event.\n * For example, to disable recognition of the rotate event, specify\n * `{\"rotate\": {\"enable\": false}}`.\n *\n * Properties that are not present take the HammerJS default values.\n * For information about which properties are supported for which events,\n * and their allowed and default values, see\n * [HammerJS documentation](http://hammerjs.github.io/).\n *\n */\n this.overrides = {};\n }\n /**\n * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)\n * and attaches it to a given HTML element.\n * @param element The element that will recognize gestures.\n * @returns A HammerJS event-manager object.\n */\n HammerGestureConfig.prototype.buildHammer = function (element) {\n var mc = new Hammer(element, this.options);\n mc.get('pinch').set({ enable: true });\n mc.get('rotate').set({ enable: true });\n for (var eventName in this.overrides) {\n mc.get(eventName).set(this.overrides[eventName]);\n }\n return mc;\n };\nHammerGestureConfig.ɵfac = function HammerGestureConfig_Factory(t) { return new (t || HammerGestureConfig)(); };\nHammerGestureConfig.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: HammerGestureConfig, factory: function (t) { return HammerGestureConfig.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(HammerGestureConfig, [{\n type: Injectable\n }], function () { return []; }, null); })();\n return HammerGestureConfig;\n}());\n/**\n * Event plugin that adds Hammer support to an application.\n *\n * @ngModule HammerModule\n */\nvar HammerGesturesPlugin = /** @class */ (function (_super) {\n __extends(HammerGesturesPlugin, _super);\n function HammerGesturesPlugin(doc, _config, console, loader) {\n var _this = _super.call(this, doc) || this;\n _this._config = _config;\n _this.console = console;\n _this.loader = loader;\n return _this;\n }\n HammerGesturesPlugin.prototype.supports = function (eventName) {\n if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {\n return false;\n }\n if (!window.Hammer && !this.loader) {\n this.console.warn(\"The \\\"\" + eventName + \"\\\" event cannot be bound because Hammer.JS is not \" +\n \"loaded and no custom loader has been specified.\");\n return false;\n }\n return true;\n };\n HammerGesturesPlugin.prototype.addEventListener = function (element, eventName, handler) {\n var _this = this;\n var zone = this.manager.getZone();\n eventName = eventName.toLowerCase();\n // If Hammer is not present but a loader is specified, we defer adding the event listener\n // until Hammer is loaded.\n if (!window.Hammer && this.loader) {\n // This `addEventListener` method returns a function to remove the added listener.\n // Until Hammer is loaded, the returned function needs to *cancel* the registration rather\n // than remove anything.\n var cancelRegistration_1 = false;\n var deregister_1 = function () {\n cancelRegistration_1 = true;\n };\n this.loader()\n .then(function () {\n // If Hammer isn't actually loaded when the custom loader resolves, give up.\n if (!window.Hammer) {\n _this.console.warn(\"The custom HAMMER_LOADER completed, but Hammer.JS is not present.\");\n deregister_1 = function () { };\n return;\n }\n if (!cancelRegistration_1) {\n // Now that Hammer is loaded and the listener is being loaded for real,\n // the deregistration function changes from canceling registration to removal.\n deregister_1 = _this.addEventListener(element, eventName, handler);\n }\n })\n .catch(function () {\n _this.console.warn(\"The \\\"\" + eventName + \"\\\" event cannot be bound because the custom \" +\n \"Hammer.JS loader failed.\");\n deregister_1 = function () { };\n });\n // Return a function that *executes* `deregister` (and not `deregister` itself) so that we\n // can change the behavior of `deregister` once the listener is added. Using a closure in\n // this way allows us to avoid any additional data structures to track listener removal.\n return function () {\n deregister_1();\n };\n }\n return zone.runOutsideAngular(function () {\n // Creating the manager bind events, must be done outside of angular\n var mc = _this._config.buildHammer(element);\n var callback = function (eventObj) {\n zone.runGuarded(function () {\n handler(eventObj);\n });\n };\n mc.on(eventName, callback);\n return function () {\n mc.off(eventName, callback);\n // destroy mc to prevent memory leak\n if (typeof mc.destroy === 'function') {\n mc.destroy();\n }\n };\n });\n };\n HammerGesturesPlugin.prototype.isCustomEvent = function (eventName) {\n return this._config.events.indexOf(eventName) > -1;\n };\n HammerGesturesPlugin = __decorate([ __param(0, Inject(DOCUMENT)),\n __param(1, Inject(HAMMER_GESTURE_CONFIG)),\n __param(3, Optional()), __param(3, Inject(HAMMER_LOADER)),\n __metadata(\"design:paramtypes\", [Object, HammerGestureConfig, ɵConsole, Object])\n ], HammerGesturesPlugin);\nHammerGesturesPlugin.ɵfac = function HammerGesturesPlugin_Factory(t) { return new (t || HammerGesturesPlugin)(ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(HAMMER_GESTURE_CONFIG), ɵngcc0.ɵɵinject(ɵngcc0.ɵConsole), ɵngcc0.ɵɵinject(HAMMER_LOADER, 8)); };\nHammerGesturesPlugin.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: HammerGesturesPlugin, factory: function (t) { return HammerGesturesPlugin.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(HammerGesturesPlugin, [{\n type: Injectable\n }], function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: HammerGestureConfig, decorators: [{\n type: Inject,\n args: [HAMMER_GESTURE_CONFIG]\n }] }, { type: ɵngcc0.ɵConsole }, { type: Object, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [HAMMER_LOADER]\n }] }]; }, null); })();\n return HammerGesturesPlugin;\n}(EventManagerPlugin));\n/**\n * In Ivy, support for Hammer gestures is optional, so applications must\n * import the `HammerModule` at root to turn on support. This means that\n * Hammer-specific code can be tree-shaken away if not needed.\n */\nvar HAMMER_PROVIDERS__POST_R3__ = [];\n/**\n * In View Engine, support for Hammer gestures is built-in by default.\n */\nvar HAMMER_PROVIDERS__PRE_R3__ = [\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: HammerGesturesPlugin,\n multi: true,\n deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, ɵConsole, [new Optional(), HAMMER_LOADER]]\n },\n { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },\n];\nvar HAMMER_PROVIDERS = HAMMER_PROVIDERS__POST_R3__;\n/**\n * Adds support for HammerJS.\n *\n * Import this module at the root of your application so that Angular can work with\n * HammerJS to detect gesture events.\n *\n * Note that applications still need to include the HammerJS script itself. This module\n * simply sets up the coordination layer between HammerJS and Angular's EventManager.\n *\n * @publicApi\n */\nvar HammerModule = /** @class */ (function () {\n function HammerModule() {\n }\nHammerModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: HammerModule });\nHammerModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function HammerModule_Factory(t) { return new (t || HammerModule)(); }, providers: HAMMER_PROVIDERS__PRE_R3__ });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(HammerModule, [{\n type: NgModule,\n args: [{ providers: HAMMER_PROVIDERS__PRE_R3__ }]\n }], function () { return []; }, null); })();\n return HammerModule;\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 supported modifiers for key events.\n */\nvar MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\nvar DOM_KEY_LOCATION_NUMPAD = 3;\n// Map to convert some key or keyIdentifier values to what will be returned by getEventKey\nvar _keyMap = {\n // The following values are here for cross-browser compatibility and to match the W3C standard\n // cf http://www.w3.org/TR/DOM-Level-3-Events-key/\n '\\b': 'Backspace',\n '\\t': 'Tab',\n '\\x7F': 'Delete',\n '\\x1B': 'Escape',\n 'Del': 'Delete',\n 'Esc': 'Escape',\n 'Left': 'ArrowLeft',\n 'Right': 'ArrowRight',\n 'Up': 'ArrowUp',\n 'Down': 'ArrowDown',\n 'Menu': 'ContextMenu',\n 'Scroll': 'ScrollLock',\n 'Win': 'OS'\n};\n// There is a bug in Chrome for numeric keypad keys:\n// https://code.google.com/p/chromium/issues/detail?id=155654\n// 1, 2, 3 ... are reported as A, B, C ...\nvar _chromeNumKeyPadMap = {\n 'A': '1',\n 'B': '2',\n 'C': '3',\n 'D': '4',\n 'E': '5',\n 'F': '6',\n 'G': '7',\n 'H': '8',\n 'I': '9',\n 'J': '*',\n 'K': '+',\n 'M': '-',\n 'N': '.',\n 'O': '/',\n '\\x60': '0',\n '\\x90': 'NumLock'\n};\nvar ɵ0$3 = function (event) { return event.altKey; }, ɵ1 = function (event) { return event.ctrlKey; }, ɵ2 = function (event) { return event.metaKey; }, ɵ3 = function (event) { return event.shiftKey; };\n/**\n * Retrieves modifiers from key-event objects.\n */\nvar MODIFIER_KEY_GETTERS = {\n 'alt': ɵ0$3,\n 'control': ɵ1,\n 'meta': ɵ2,\n 'shift': ɵ3\n};\n/**\n * @publicApi\n * A browser plug-in that provides support for handling of key events in Angular.\n */\nvar KeyEventsPlugin = /** @class */ (function (_super) {\n __extends(KeyEventsPlugin, _super);\n /**\n * Initializes an instance of the browser plug-in.\n * @param doc The document in which key events will be detected.\n */\n function KeyEventsPlugin(doc) {\n return _super.call(this, doc) || this;\n }\n KeyEventsPlugin_1 = KeyEventsPlugin;\n /**\n * Reports whether a named key event is supported.\n * @param eventName The event name to query.\n * @return True if the named key event is supported.\n */\n KeyEventsPlugin.prototype.supports = function (eventName) {\n return KeyEventsPlugin_1.parseEventName(eventName) != null;\n };\n /**\n * Registers a handler for a specific element and key event.\n * @param element The HTML element to receive event notifications.\n * @param eventName The name of the key event to listen for.\n * @param handler A function to call when the notification occurs. Receives the\n * event object as an argument.\n * @returns The key event that was registered.\n */\n KeyEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {\n var parsedEvent = KeyEventsPlugin_1.parseEventName(eventName);\n var outsideHandler = KeyEventsPlugin_1.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());\n return this.manager.getZone().runOutsideAngular(function () {\n return ɵgetDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);\n });\n };\n KeyEventsPlugin.parseEventName = function (eventName) {\n var parts = eventName.toLowerCase().split('.');\n var domEventName = parts.shift();\n if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n return null;\n }\n var key = KeyEventsPlugin_1._normalizeKey(parts.pop());\n var fullKey = '';\n MODIFIER_KEYS.forEach(function (modifierName) {\n var index = parts.indexOf(modifierName);\n if (index > -1) {\n parts.splice(index, 1);\n fullKey += modifierName + '.';\n }\n });\n fullKey += key;\n if (parts.length != 0 || key.length === 0) {\n // returning null instead of throwing to let another plugin process the event\n return null;\n }\n var result = {};\n result['domEventName'] = domEventName;\n result['fullKey'] = fullKey;\n return result;\n };\n KeyEventsPlugin.getEventFullKey = function (event) {\n var fullKey = '';\n var key = getEventKey(event);\n key = key.toLowerCase();\n if (key === ' ') {\n key = 'space'; // for readability\n }\n else if (key === '.') {\n key = 'dot'; // because '.' is used as a separator in event names\n }\n MODIFIER_KEYS.forEach(function (modifierName) {\n if (modifierName != key) {\n var modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n if (modifierGetter(event)) {\n fullKey += modifierName + '.';\n }\n }\n });\n fullKey += key;\n return fullKey;\n };\n /**\n * Configures a handler callback for a key event.\n * @param fullKey The event name that combines all simultaneous keystrokes.\n * @param handler The function that responds to the key event.\n * @param zone The zone in which the event occurred.\n * @returns A callback function.\n */\n KeyEventsPlugin.eventCallback = function (fullKey, handler, zone) {\n return function (event /** TODO #9100 */) {\n if (KeyEventsPlugin_1.getEventFullKey(event) === fullKey) {\n zone.runGuarded(function () { return handler(event); });\n }\n };\n };\n /** @internal */\n KeyEventsPlugin._normalizeKey = function (keyName) {\n // TODO: switch to a Map if the mapping grows too much\n switch (keyName) {\n case 'esc':\n return 'escape';\n default:\n return keyName;\n }\n };\n var KeyEventsPlugin_1;\n KeyEventsPlugin = KeyEventsPlugin_1 = __decorate([ __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], KeyEventsPlugin);\nKeyEventsPlugin.ɵfac = function KeyEventsPlugin_Factory(t) { return new (t || KeyEventsPlugin)(ɵngcc0.ɵɵinject(DOCUMENT)); };\nKeyEventsPlugin.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: KeyEventsPlugin, factory: function (t) { return KeyEventsPlugin.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(KeyEventsPlugin, [{\n type: Injectable\n }], function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n return KeyEventsPlugin;\n}(EventManagerPlugin));\nfunction getEventKey(event) {\n var key = event.key;\n if (key == null) {\n key = event.keyIdentifier;\n // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and\n // Safari cf\n // http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces\n if (key == null) {\n return 'Unidentified';\n }\n if (key.startsWith('U+')) {\n key = String.fromCharCode(parseInt(key.substring(2), 16));\n if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) {\n // There is a bug in Chrome for numeric keypad keys:\n // https://code.google.com/p/chromium/issues/detail?id=155654\n // 1, 2, 3 ... are reported as A, B, C ...\n key = _chromeNumKeyPadMap[key];\n }\n }\n }\n return _keyMap[key] || key;\n}\n\n/**\n * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing\n * values to be safe to use in the different DOM contexts.\n *\n * For example, when binding a URL in an `` hyperlink, `someValue` will be\n * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on\n * the website.\n *\n * In specific situations, it might be necessary to disable sanitization, for example if the\n * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.\n * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`\n * methods, and then binding to that value from the template.\n *\n * These situations should be very rare, and extraordinary care must be taken to avoid creating a\n * Cross Site Scripting (XSS) security bug!\n *\n * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as\n * close as possible to the source of the value, to make it easy to verify no security bug is\n * created by its use.\n *\n * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that\n * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous\n * code. The sanitizer leaves safe values intact.\n *\n * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in\n * sanitization for the value passed in. Carefully check and audit all values and code paths going\n * into this call. Make sure any user data is appropriately escaped for this security context.\n * For more detail, see the [Security Guide](http://g.co/ng/security).\n *\n * @publicApi\n */\nvar DomSanitizer = /** @class */ (function () {\n function DomSanitizer() {\n }\n DomSanitizer.ɵprov = ɵɵdefineInjectable({ factory: function DomSanitizer_Factory() { return ɵɵinject(DomSanitizerImpl); }, token: DomSanitizer, providedIn: \"root\" });\nDomSanitizer.ɵfac = function DomSanitizer_Factory(t) { return new (t || DomSanitizer)(); };\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(DomSanitizer, [{\n type: Injectable,\n args: [{ providedIn: 'root', useExisting: forwardRef(function () { return DomSanitizerImpl; }) }]\n }], function () { return []; }, null); })();\n return DomSanitizer;\n}());\nfunction domSanitizerImplFactory(injector) {\n return new DomSanitizerImpl(injector.get(DOCUMENT));\n}\nvar DomSanitizerImpl = /** @class */ (function (_super) {\n __extends(DomSanitizerImpl, _super);\n function DomSanitizerImpl(_doc) {\n var _this = _super.call(this) || this;\n _this._doc = _doc;\n return _this;\n }\n DomSanitizerImpl.prototype.sanitize = function (ctx, value) {\n if (value == null)\n return null;\n switch (ctx) {\n case SecurityContext.NONE:\n return value;\n case SecurityContext.HTML:\n if (ɵallowSanitizationBypassAndThrow(value, \"HTML\" /* Html */)) {\n return ɵunwrapSafeValue(value);\n }\n return ɵ_sanitizeHtml(this._doc, String(value));\n case SecurityContext.STYLE:\n if (ɵallowSanitizationBypassAndThrow(value, \"Style\" /* Style */)) {\n return ɵunwrapSafeValue(value);\n }\n return ɵ_sanitizeStyle(value);\n case SecurityContext.SCRIPT:\n if (ɵallowSanitizationBypassAndThrow(value, \"Script\" /* Script */)) {\n return ɵunwrapSafeValue(value);\n }\n throw new Error('unsafe value used in a script context');\n case SecurityContext.URL:\n var type = ɵgetSanitizationBypassType(value);\n if (ɵallowSanitizationBypassAndThrow(value, \"URL\" /* Url */)) {\n return ɵunwrapSafeValue(value);\n }\n return ɵ_sanitizeUrl(String(value));\n case SecurityContext.RESOURCE_URL:\n if (ɵallowSanitizationBypassAndThrow(value, \"ResourceURL\" /* ResourceUrl */)) {\n return ɵunwrapSafeValue(value);\n }\n throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');\n default:\n throw new Error(\"Unexpected SecurityContext \" + ctx + \" (see http://g.co/ng/security#xss)\");\n }\n };\n DomSanitizerImpl.prototype.bypassSecurityTrustHtml = function (value) {\n return ɵbypassSanitizationTrustHtml(value);\n };\n DomSanitizerImpl.prototype.bypassSecurityTrustStyle = function (value) {\n return ɵbypassSanitizationTrustStyle(value);\n };\n DomSanitizerImpl.prototype.bypassSecurityTrustScript = function (value) {\n return ɵbypassSanitizationTrustScript(value);\n };\n DomSanitizerImpl.prototype.bypassSecurityTrustUrl = function (value) {\n return ɵbypassSanitizationTrustUrl(value);\n };\n DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl = function (value) {\n return ɵbypassSanitizationTrustResourceUrl(value);\n };\n DomSanitizerImpl.ɵprov = ɵɵdefineInjectable({ factory: function DomSanitizerImpl_Factory() { return domSanitizerImplFactory(ɵɵinject(INJECTOR)); }, token: DomSanitizerImpl, providedIn: \"root\" });\n DomSanitizerImpl = __decorate([ __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], DomSanitizerImpl);\nDomSanitizerImpl.ɵfac = function DomSanitizerImpl_Factory(t) { return new (t || DomSanitizerImpl)(ɵngcc0.ɵɵinject(DOCUMENT)); };\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(DomSanitizerImpl, [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [Injector] }]\n }], function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n return DomSanitizerImpl;\n}(DomSanitizer));\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 */\nfunction initDomAdapter() {\n BrowserDomAdapter.makeCurrent();\n BrowserGetTestability.init();\n}\nfunction errorHandler() {\n return new ErrorHandler();\n}\nfunction _document() {\n // Tell ivy about the global document\n ɵsetDocument(document);\n return document;\n}\nvar ɵ0$4 = ɵPLATFORM_BROWSER_ID;\nvar INTERNAL_BROWSER_PLATFORM_PROVIDERS = [\n { provide: PLATFORM_ID, useValue: ɵ0$4 },\n { provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },\n { provide: DOCUMENT, useFactory: _document, deps: [] },\n];\nvar BROWSER_SANITIZATION_PROVIDERS__PRE_R3__ = [\n { provide: Sanitizer, useExisting: DomSanitizer },\n { provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [DOCUMENT] },\n];\nvar BROWSER_SANITIZATION_PROVIDERS__POST_R3__ = [];\n/**\n * @security Replacing built-in sanitization providers exposes the application to XSS risks.\n * Attacker-controlled data introduced by an unsanitized provider could expose your\n * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).\n * @publicApi\n */\nvar BROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS__POST_R3__;\n/**\n * @publicApi\n */\nvar platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\nvar BROWSER_MODULE_PROVIDERS = [\n BROWSER_SANITIZATION_PROVIDERS,\n { provide: ɵINJECTOR_SCOPE, useValue: 'root' },\n { provide: ErrorHandler, useFactory: errorHandler, deps: [] },\n {\n provide: EVENT_MANAGER_PLUGINS,\n useClass: DomEventsPlugin,\n multi: true,\n deps: [DOCUMENT, NgZone, PLATFORM_ID]\n },\n { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [DOCUMENT] },\n HAMMER_PROVIDERS,\n {\n provide: DomRendererFactory2,\n useClass: DomRendererFactory2,\n deps: [EventManager, DomSharedStylesHost, APP_ID]\n },\n { provide: RendererFactory2, useExisting: DomRendererFactory2 },\n { provide: SharedStylesHost, useExisting: DomSharedStylesHost },\n { provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [DOCUMENT] },\n { provide: Testability, useClass: Testability, deps: [NgZone] },\n { provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, NgZone] },\n ELEMENT_PROBE_PROVIDERS,\n];\n/**\n * Exports required infrastructure for all Angular apps.\n * Included by default in all Angular apps created with the CLI\n * `new` command.\n * Re-exports `CommonModule` and `ApplicationModule`, making their\n * exports and providers available to all apps.\n *\n * @publicApi\n */\nvar BrowserModule = /** @class */ (function () {\n function BrowserModule(parentModule) {\n if (parentModule) {\n throw new Error(\"BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.\");\n }\n }\n BrowserModule_1 = BrowserModule;\n /**\n * Configures a browser-based app to transition from a server-rendered app, if\n * one is present on the page.\n *\n * @param params An object containing an identifier for the app to transition.\n * The ID must match between the client and server versions of the app.\n * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.\n */\n BrowserModule.withServerTransition = function (params) {\n return {\n ngModule: BrowserModule_1,\n providers: [\n { provide: APP_ID, useValue: params.appId },\n { provide: TRANSITION_ID, useExisting: APP_ID },\n SERVER_TRANSITION_PROVIDERS,\n ],\n };\n };\n var BrowserModule_1;\n BrowserModule = BrowserModule_1 = __decorate([ __param(0, Optional()), __param(0, SkipSelf()), __param(0, Inject(BrowserModule_1)),\n __metadata(\"design:paramtypes\", [Object])\n ], BrowserModule);\nBrowserModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: BrowserModule });\nBrowserModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function BrowserModule_Factory(t) { return new (t || BrowserModule)(ɵngcc0.ɵɵinject(BrowserModule_1, 12)); }, providers: BROWSER_MODULE_PROVIDERS, imports: [CommonModule, ApplicationModule] });\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(BrowserModule, { exports: function () { return [CommonModule, ApplicationModule]; } }); })();\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(BrowserModule, [{\n type: NgModule,\n args: [{ providers: BROWSER_MODULE_PROVIDERS, exports: [CommonModule, ApplicationModule] }]\n }], function () { return [{ type: Object, decorators: [{\n type: Optional\n }, {\n type: SkipSelf\n }, {\n type: Inject,\n args: [BrowserModule_1]\n }] }]; }, null); })();\n return BrowserModule;\n}());\n\n/**\n * Factory to create Meta service.\n */\nfunction createMeta() {\n return new Meta(ɵɵinject(DOCUMENT));\n}\n/**\n * A service that can be used to get and add meta tags.\n *\n * @publicApi\n */\nvar Meta = /** @class */ (function () {\n function Meta(_doc) {\n this._doc = _doc;\n this._dom = ɵgetDOM();\n }\n Meta.prototype.addTag = function (tag, forceCreation) {\n if (forceCreation === void 0) { forceCreation = false; }\n if (!tag)\n return null;\n return this._getOrCreateElement(tag, forceCreation);\n };\n Meta.prototype.addTags = function (tags, forceCreation) {\n var _this = this;\n if (forceCreation === void 0) { forceCreation = false; }\n if (!tags)\n return [];\n return tags.reduce(function (result, tag) {\n if (tag) {\n result.push(_this._getOrCreateElement(tag, forceCreation));\n }\n return result;\n }, []);\n };\n Meta.prototype.getTag = function (attrSelector) {\n if (!attrSelector)\n return null;\n return this._doc.querySelector(\"meta[\" + attrSelector + \"]\") || null;\n };\n Meta.prototype.getTags = function (attrSelector) {\n if (!attrSelector)\n return [];\n var list /*NodeList*/ = this._doc.querySelectorAll(\"meta[\" + attrSelector + \"]\");\n return list ? [].slice.call(list) : [];\n };\n Meta.prototype.updateTag = function (tag, selector) {\n if (!tag)\n return null;\n selector = selector || this._parseSelector(tag);\n var meta = this.getTag(selector);\n if (meta) {\n return this._setMetaElementAttributes(tag, meta);\n }\n return this._getOrCreateElement(tag, true);\n };\n Meta.prototype.removeTag = function (attrSelector) {\n this.removeTagElement(this.getTag(attrSelector));\n };\n Meta.prototype.removeTagElement = function (meta) {\n if (meta) {\n this._dom.remove(meta);\n }\n };\n Meta.prototype._getOrCreateElement = function (meta, forceCreation) {\n if (forceCreation === void 0) { forceCreation = false; }\n if (!forceCreation) {\n var selector = this._parseSelector(meta);\n var elem = this.getTag(selector);\n // It's allowed to have multiple elements with the same name so it's not enough to\n // just check that element with the same name already present on the page. We also need to\n // check if element has tag attributes\n if (elem && this._containsAttributes(meta, elem))\n return elem;\n }\n var element = this._dom.createElement('meta');\n this._setMetaElementAttributes(meta, element);\n var head = this._doc.getElementsByTagName('head')[0];\n head.appendChild(element);\n return element;\n };\n Meta.prototype._setMetaElementAttributes = function (tag, el) {\n Object.keys(tag).forEach(function (prop) { return el.setAttribute(prop, tag[prop]); });\n return el;\n };\n Meta.prototype._parseSelector = function (tag) {\n var attr = tag.name ? 'name' : 'property';\n return attr + \"=\\\"\" + tag[attr] + \"\\\"\";\n };\n Meta.prototype._containsAttributes = function (tag, elem) {\n return Object.keys(tag).every(function (key) { return elem.getAttribute(key) === tag[key]; });\n };\n Meta.ɵprov = ɵɵdefineInjectable({ factory: createMeta, token: Meta, providedIn: \"root\" });\n Meta = __decorate([ __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], Meta);\nMeta.ɵfac = function Meta_Factory(t) { return new (t || Meta)(ɵngcc0.ɵɵinject(DOCUMENT)); };\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(Meta, [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: createMeta, deps: [] }]\n }], function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n return Meta;\n}());\n\n/**\n * Factory to create Title service.\n */\nfunction createTitle() {\n return new Title(ɵɵinject(DOCUMENT));\n}\n/**\n * A service that can be used to get and set the title of a current HTML document.\n *\n * Since an Angular application can't be bootstrapped on the entire HTML document (`` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `` tag). Instead, this service can be used to set and get the current\n * title value.\n *\n * @publicApi\n */\nvar Title = /** @class */ (function () {\n function Title(_doc) {\n this._doc = _doc;\n }\n /**\n * Get the title of the current HTML document.\n */\n Title.prototype.getTitle = function () {\n return this._doc.title;\n };\n /**\n * Set the title of the current HTML document.\n * @param newTitle\n */\n Title.prototype.setTitle = function (newTitle) {\n this._doc.title = newTitle || '';\n };\n Title.ɵprov = ɵɵdefineInjectable({ factory: createTitle, token: Title, providedIn: \"root\" });\n Title = __decorate([ __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], Title);\nTitle.ɵfac = function Title_Factory(t) { return new (t || Title)(ɵngcc0.ɵɵinject(DOCUMENT)); };\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(Title, [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: createTitle, deps: [] }]\n }], function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n return Title;\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 */\nvar win = typeof window !== 'undefined' && window || {};\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 */\nvar ChangeDetectionPerfRecord = /** @class */ (function () {\n function ChangeDetectionPerfRecord(msPerTick, numTicks) {\n this.msPerTick = msPerTick;\n this.numTicks = numTicks;\n }\n return ChangeDetectionPerfRecord;\n}());\n/**\n * Entry point for all Angular profiling-related debug tools. This object\n * corresponds to the `ng.profiler` in the dev console.\n */\nvar AngularProfiler = /** @class */ (function () {\n function AngularProfiler(ref) {\n this.appRef = ref.injector.get(ApplicationRef);\n }\n // tslint:disable:no-console\n /**\n * Exercises change detection in a loop and then prints the average amount of\n * time in milliseconds how long a single round of change detection takes for\n * the current state of the UI. It runs a minimum of 5 rounds for a minimum\n * of 500 milliseconds.\n *\n * Optionally, a user may pass a `config` parameter containing a map of\n * options. Supported options are:\n *\n * `record` (boolean) - causes the profiler to record a CPU profile while\n * it exercises the change detector. Example:\n *\n * ```\n * ng.profiler.timeChangeDetection({record: true})\n * ```\n */\n AngularProfiler.prototype.timeChangeDetection = function (config) {\n var record = config && config['record'];\n var profileName = 'Change Detection';\n // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened\n var isProfilerAvailable = win.console.profile != null;\n if (record && isProfilerAvailable) {\n win.console.profile(profileName);\n }\n var start = ɵgetDOM().performanceNow();\n var numTicks = 0;\n while (numTicks < 5 || (ɵgetDOM().performanceNow() - start) < 500) {\n this.appRef.tick();\n numTicks++;\n }\n var end = ɵgetDOM().performanceNow();\n if (record && isProfilerAvailable) {\n win.console.profileEnd(profileName);\n }\n var msPerTick = (end - start) / numTicks;\n win.console.log(\"ran \" + numTicks + \" change detection cycles\");\n win.console.log(msPerTick.toFixed(2) + \" ms per check\");\n return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n };\n return AngularProfiler;\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 */\nvar PROFILER_GLOBAL_NAME = 'profiler';\n/**\n * Enabled Angular debug tools that are accessible via your browser's\n * developer console.\n *\n * Usage:\n *\n * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)\n * 1. Type `ng.` (usually the console will show auto-complete suggestion)\n * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`\n * then hit Enter.\n *\n * @publicApi\n */\nfunction enableDebugTools(ref) {\n exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));\n return ref;\n}\n/**\n * Disables Angular tools.\n *\n * @publicApi\n */\nfunction disableDebugTools() {\n exportNgVar(PROFILER_GLOBAL_NAME, 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 */\nfunction escapeHtml(text) {\n var escapedText = {\n '&': '&a;',\n '\"': '&q;',\n '\\'': '&s;',\n '<': '&l;',\n '>': '&g;',\n };\n return text.replace(/[&\"'<>]/g, function (s) { return escapedText[s]; });\n}\nfunction unescapeHtml(text) {\n var unescapedText = {\n '&a;': '&',\n '&q;': '\"',\n '&s;': '\\'',\n '&l;': '<',\n '&g;': '>',\n };\n return text.replace(/&[^;]+;/g, function (s) { return unescapedText[s]; });\n}\n/**\n * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.\n *\n * Example:\n *\n * ```\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nfunction makeStateKey(key) {\n return key;\n}\n/**\n * A key value store that is transferred from the application on the server side to the application\n * on the client side.\n *\n * `TransferState` will be available as an injectable token. To use it import\n * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.\n *\n * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only\n * boolean, number, string, null and non-class objects will be serialized and deserialzied in a\n * non-lossy manner.\n *\n * @publicApi\n */\nvar TransferState = /** @class */ (function () {\n function TransferState() {\n this.store = {};\n this.onSerializeCallbacks = {};\n }\n TransferState_1 = TransferState;\n /** @internal */\n TransferState.init = function (initState) {\n var transferState = new TransferState_1();\n transferState.store = initState;\n return transferState;\n };\n /**\n * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n */\n TransferState.prototype.get = function (key, defaultValue) {\n return this.store[key] !== undefined ? this.store[key] : defaultValue;\n };\n /**\n * Set the value corresponding to a key.\n */\n TransferState.prototype.set = function (key, value) {\n this.store[key] = value;\n };\n /**\n * Remove a key from the store.\n */\n TransferState.prototype.remove = function (key) {\n delete this.store[key];\n };\n /**\n * Test whether a key exists in the store.\n */\n TransferState.prototype.hasKey = function (key) {\n return this.store.hasOwnProperty(key);\n };\n /**\n * Register a callback to provide the value for a key when `toJson` is called.\n */\n TransferState.prototype.onSerialize = function (key, callback) {\n this.onSerializeCallbacks[key] = callback;\n };\n /**\n * Serialize the current state of the store to JSON.\n */\n TransferState.prototype.toJson = function () {\n // Call the onSerialize callbacks and put those values into the store.\n for (var key in this.onSerializeCallbacks) {\n if (this.onSerializeCallbacks.hasOwnProperty(key)) {\n try {\n this.store[key] = this.onSerializeCallbacks[key]();\n }\n catch (e) {\n console.warn('Exception in onSerialize callback: ', e);\n }\n }\n }\n return JSON.stringify(this.store);\n };\n var TransferState_1;\nTransferState.ɵfac = function TransferState_Factory(t) { return new (t || TransferState)(); };\nTransferState.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: TransferState, factory: function (t) { return TransferState.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(TransferState, [{\n type: Injectable\n }], function () { return []; }, null); })();\n return TransferState;\n}());\nfunction initTransferState(doc, appId) {\n // Locate the script tag with the JSON data transferred from the server.\n // The id of the script tag is set to the Angular appId + 'state'.\n var script = doc.getElementById(appId + '-state');\n var initialState = {};\n if (script && script.textContent) {\n try {\n initialState = JSON.parse(unescapeHtml(script.textContent));\n }\n catch (e) {\n console.warn('Exception while restoring TransferState for app ' + appId, e);\n }\n }\n return TransferState.init(initialState);\n}\n/**\n * NgModule to install on the client side while using the `TransferState` to transfer state from\n * server to client.\n *\n * @publicApi\n */\nvar BrowserTransferStateModule = /** @class */ (function () {\n function BrowserTransferStateModule() {\n }\nBrowserTransferStateModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: BrowserTransferStateModule });\nBrowserTransferStateModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function BrowserTransferStateModule_Factory(t) { return new (t || BrowserTransferStateModule)(); }, providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT, APP_ID] }] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(BrowserTransferStateModule, [{\n type: NgModule,\n args: [{\n providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT, APP_ID] }]\n }]\n }], function () { return []; }, null); })();\n return BrowserTransferStateModule;\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 * Predicates for use with {@link DebugElement}'s query functions.\n *\n * @publicApi\n */\nvar By = /** @class */ (function () {\n function By() {\n }\n /**\n * Match all nodes.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n */\n By.all = function () {\n return function () { return true; };\n };\n /**\n * Match elements by the given CSS selector.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n */\n By.css = function (selector) {\n return function (debugElement) {\n return debugElement.nativeElement != null ?\n elementMatches(debugElement.nativeElement, selector) :\n false;\n };\n };\n /**\n * Match nodes that have the given directive present.\n *\n * @usageNotes\n * ### Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n */\n By.directive = function (type) {\n return function (debugNode) { return debugNode.providerTokens.indexOf(type) !== -1; };\n };\n return By;\n}());\nfunction elementMatches(n, selector) {\n if (ɵgetDOM().isElementNode(n)) {\n return n.matches && n.matches(selector) ||\n n.msMatchesSelector && n.msMatchesSelector(selector) ||\n n.webkitMatchesSelector && n.webkitMatchesSelector(selector);\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/**\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 */\nvar VERSION = new Version('9.1.11');\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\nexport { BrowserModule, BrowserTransferStateModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, Meta, Title, TransferState, VERSION, disableDebugTools, enableDebugTools, makeStateKey, platformBrowser, BROWSER_SANITIZATION_PROVIDERS as ɵBROWSER_SANITIZATION_PROVIDERS, BROWSER_SANITIZATION_PROVIDERS__POST_R3__ as ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserGetTestability as ɵBrowserGetTestability, DomEventsPlugin as ɵDomEventsPlugin, DomRendererFactory2 as ɵDomRendererFactory2, DomSanitizerImpl as ɵDomSanitizerImpl, DomSharedStylesHost as ɵDomSharedStylesHost, ELEMENT_PROBE_PROVIDERS as ɵELEMENT_PROBE_PROVIDERS, ELEMENT_PROBE_PROVIDERS__POST_R3__ as ɵELEMENT_PROBE_PROVIDERS__POST_R3__, HAMMER_PROVIDERS__POST_R3__ as ɵHAMMER_PROVIDERS__POST_R3__, HammerGesturesPlugin as ɵHammerGesturesPlugin, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, KeyEventsPlugin as ɵKeyEventsPlugin, NAMESPACE_URIS as ɵNAMESPACE_URIS, SharedStylesHost as ɵSharedStylesHost, TRANSITION_ID as ɵTRANSITION_ID, errorHandler as ɵangular_packages_platform_browser_platform_browser_a, _document as ɵangular_packages_platform_browser_platform_browser_b, BROWSER_MODULE_PROVIDERS as ɵangular_packages_platform_browser_platform_browser_c, createMeta as ɵangular_packages_platform_browser_platform_browser_d, createTitle as ɵangular_packages_platform_browser_platform_browser_e, initTransferState as ɵangular_packages_platform_browser_platform_browser_f, EventManagerPlugin as ɵangular_packages_platform_browser_platform_browser_g, HAMMER_PROVIDERS__PRE_R3__ as ɵangular_packages_platform_browser_platform_browser_h, HAMMER_PROVIDERS as ɵangular_packages_platform_browser_platform_browser_i, domSanitizerImplFactory as ɵangular_packages_platform_browser_platform_browser_j, appInitializerFactory as ɵangular_packages_platform_browser_platform_browser_k, SERVER_TRANSITION_PROVIDERS as ɵangular_packages_platform_browser_platform_browser_l, _createNgProbeR2 as ɵangular_packages_platform_browser_platform_browser_m, ELEMENT_PROBE_PROVIDERS__PRE_R3__ as ɵangular_packages_platform_browser_platform_browser_n, GenericBrowserDomAdapter as ɵangular_packages_platform_browser_platform_browser_o, escapeHtml as ɵescapeHtml, flattenStyles as ɵflattenStyles, initDomAdapter as ɵinitDomAdapter, shimContentAttribute as ɵshimContentAttribute, shimHostAttribute as ɵshimHostAttribute };\n\n//# sourceMappingURL=platform-browser.js.map","/**\n * @license Angular v9.1.11\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { __spread, __decorate, __read, __extends, __assign, __values } from 'tslib';\nimport { ɵAnimationGroupPlayer, NoopAnimationPlayer, AUTO_STYLE, ɵPRE_STYLE, sequence, style } from '@angular/animations';\nimport { Injectable } from '@angular/core';\n\nimport * as ɵngcc0 from '@angular/core';\nfunction isBrowser() {\n return (typeof window !== 'undefined' && typeof window.document !== 'undefined');\n}\nfunction isNode() {\n // Checking only for `process` isn't enough to identify whether or not we're in a Node\n // environment, because Webpack by default will polyfill the `process`. While we can discern\n // that Webpack polyfilled it by looking at `process.browser`, it's very Webpack-specific and\n // might not be future-proof. Instead we look at the stringified version of `process` which\n // is `[object process]` in Node and `[object Object]` when polyfilled.\n return typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n}\nfunction optimizeGroupPlayer(players) {\n switch (players.length) {\n case 0:\n return new NoopAnimationPlayer();\n case 1:\n return players[0];\n default:\n return new ɵAnimationGroupPlayer(players);\n }\n}\nfunction normalizeKeyframes(driver, normalizer, element, keyframes, preStyles, postStyles) {\n if (preStyles === void 0) { preStyles = {}; }\n if (postStyles === void 0) { postStyles = {}; }\n var errors = [];\n var normalizedKeyframes = [];\n var previousOffset = -1;\n var previousKeyframe = null;\n keyframes.forEach(function (kf) {\n var offset = kf['offset'];\n var isSameOffset = offset == previousOffset;\n var normalizedKeyframe = (isSameOffset && previousKeyframe) || {};\n Object.keys(kf).forEach(function (prop) {\n var normalizedProp = prop;\n var normalizedValue = kf[prop];\n if (prop !== 'offset') {\n normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);\n switch (normalizedValue) {\n case ɵPRE_STYLE:\n normalizedValue = preStyles[prop];\n break;\n case AUTO_STYLE:\n normalizedValue = postStyles[prop];\n break;\n default:\n normalizedValue =\n normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors);\n break;\n }\n }\n normalizedKeyframe[normalizedProp] = normalizedValue;\n });\n if (!isSameOffset) {\n normalizedKeyframes.push(normalizedKeyframe);\n }\n previousKeyframe = normalizedKeyframe;\n previousOffset = offset;\n });\n if (errors.length) {\n var LINE_START = '\\n - ';\n throw new Error(\"Unable to animate due to the following errors:\" + LINE_START + errors.join(LINE_START));\n }\n return normalizedKeyframes;\n}\nfunction listenOnPlayer(player, eventName, event, callback) {\n switch (eventName) {\n case 'start':\n player.onStart(function () { return callback(event && copyAnimationEvent(event, 'start', player)); });\n break;\n case 'done':\n player.onDone(function () { return callback(event && copyAnimationEvent(event, 'done', player)); });\n break;\n case 'destroy':\n player.onDestroy(function () { return callback(event && copyAnimationEvent(event, 'destroy', player)); });\n break;\n }\n}\nfunction copyAnimationEvent(e, phaseName, player) {\n var totalTime = player.totalTime;\n var disabled = player.disabled ? true : false;\n var event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime, disabled);\n var data = e['_data'];\n if (data != null) {\n event['_data'] = data;\n }\n return event;\n}\nfunction makeAnimationEvent(element, triggerName, fromState, toState, phaseName, totalTime, disabled) {\n if (phaseName === void 0) { phaseName = ''; }\n if (totalTime === void 0) { totalTime = 0; }\n return { element: element, triggerName: triggerName, fromState: fromState, toState: toState, phaseName: phaseName, totalTime: totalTime, disabled: !!disabled };\n}\nfunction getOrSetAsInMap(map, key, defaultValue) {\n var value;\n if (map instanceof Map) {\n value = map.get(key);\n if (!value) {\n map.set(key, value = defaultValue);\n }\n }\n else {\n value = map[key];\n if (!value) {\n value = map[key] = defaultValue;\n }\n }\n return value;\n}\nfunction parseTimelineCommand(command) {\n var separatorPos = command.indexOf(':');\n var id = command.substring(1, separatorPos);\n var action = command.substr(separatorPos + 1);\n return [id, action];\n}\nvar _contains = function (elm1, elm2) { return false; };\nvar ɵ0 = _contains;\nvar _matches = function (element, selector) {\n return false;\n};\nvar ɵ1 = _matches;\nvar _query = function (element, selector, multi) {\n return [];\n};\nvar ɵ2 = _query;\n// Define utility methods for browsers and platform-server(domino) where Element\n// and utility methods exist.\nvar _isNode = isNode();\nif (_isNode || typeof Element !== 'undefined') {\n // this is well supported in all browsers\n _contains = function (elm1, elm2) {\n return elm1.contains(elm2);\n };\n _matches = (function () {\n if (_isNode || Element.prototype.matches) {\n return function (element, selector) { return element.matches(selector); };\n }\n else {\n var proto = Element.prototype;\n var fn_1 = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector ||\n proto.oMatchesSelector || proto.webkitMatchesSelector;\n if (fn_1) {\n return function (element, selector) { return fn_1.apply(element, [selector]); };\n }\n else {\n return _matches;\n }\n }\n })();\n _query = function (element, selector, multi) {\n var results = [];\n if (multi) {\n results.push.apply(results, __spread(element.querySelectorAll(selector)));\n }\n else {\n var elm = element.querySelector(selector);\n if (elm) {\n results.push(elm);\n }\n }\n return results;\n };\n}\nfunction containsVendorPrefix(prop) {\n // Webkit is the only real popular vendor prefix nowadays\n // cc: http://shouldiprefix.com/\n return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit\n}\nvar _CACHED_BODY = null;\nvar _IS_WEBKIT = false;\nfunction validateStyleProperty(prop) {\n if (!_CACHED_BODY) {\n _CACHED_BODY = getBodyNode() || {};\n _IS_WEBKIT = _CACHED_BODY.style ? ('WebkitAppearance' in _CACHED_BODY.style) : false;\n }\n var result = true;\n if (_CACHED_BODY.style && !containsVendorPrefix(prop)) {\n result = prop in _CACHED_BODY.style;\n if (!result && _IS_WEBKIT) {\n var camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.substr(1);\n result = camelProp in _CACHED_BODY.style;\n }\n }\n return result;\n}\nfunction getBodyNode() {\n if (typeof document != 'undefined') {\n return document.body;\n }\n return null;\n}\nvar matchesElement = _matches;\nvar containsElement = _contains;\nvar invokeQuery = _query;\nfunction hypenatePropsObject(object) {\n var newObj = {};\n Object.keys(object).forEach(function (prop) {\n var newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');\n newObj[newProp] = object[prop];\n });\n return newObj;\n}\n\n/**\n * @publicApi\n */\nvar NoopAnimationDriver = /** @class */ (function () {\n function NoopAnimationDriver() {\n }\n NoopAnimationDriver.prototype.validateStyleProperty = function (prop) {\n return validateStyleProperty(prop);\n };\n NoopAnimationDriver.prototype.matchesElement = function (element, selector) {\n return matchesElement(element, selector);\n };\n NoopAnimationDriver.prototype.containsElement = function (elm1, elm2) {\n return containsElement(elm1, elm2);\n };\n NoopAnimationDriver.prototype.query = function (element, selector, multi) {\n return invokeQuery(element, selector, multi);\n };\n NoopAnimationDriver.prototype.computeStyle = function (element, prop, defaultValue) {\n return defaultValue || '';\n };\n NoopAnimationDriver.prototype.animate = function (element, keyframes, duration, delay, easing, previousPlayers, scrubberAccessRequested) {\n if (previousPlayers === void 0) { previousPlayers = []; }\n return new NoopAnimationPlayer(duration, delay);\n };\nNoopAnimationDriver.ɵfac = function NoopAnimationDriver_Factory(t) { return new (t || NoopAnimationDriver)(); };\nNoopAnimationDriver.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: NoopAnimationDriver, factory: function (t) { return NoopAnimationDriver.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NoopAnimationDriver, [{\n type: Injectable\n }], function () { return []; }, null); })();\n return NoopAnimationDriver;\n}());\n/**\n * @publicApi\n */\nvar AnimationDriver = /** @class */ (function () {\n function AnimationDriver() {\n }\n AnimationDriver.NOOP = new NoopAnimationDriver();\n return AnimationDriver;\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 */\nvar ONE_SECOND = 1000;\nvar SUBSTITUTION_EXPR_START = '{{';\nvar SUBSTITUTION_EXPR_END = '}}';\nvar ENTER_CLASSNAME = 'ng-enter';\nvar LEAVE_CLASSNAME = 'ng-leave';\nvar ENTER_SELECTOR = '.ng-enter';\nvar LEAVE_SELECTOR = '.ng-leave';\nvar NG_TRIGGER_CLASSNAME = 'ng-trigger';\nvar NG_TRIGGER_SELECTOR = '.ng-trigger';\nvar NG_ANIMATING_CLASSNAME = 'ng-animating';\nvar NG_ANIMATING_SELECTOR = '.ng-animating';\nfunction resolveTimingValue(value) {\n if (typeof value == 'number')\n return value;\n var matches = value.match(/^(-?[\\.\\d]+)(m?s)/);\n if (!matches || matches.length < 2)\n return 0;\n return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\nfunction _convertTimeValueToMS(value, unit) {\n switch (unit) {\n case 's':\n return value * ONE_SECOND;\n default: // ms or something else\n return value;\n }\n}\nfunction resolveTiming(timings, errors, allowNegativeValues) {\n return timings.hasOwnProperty('duration') ?\n timings :\n parseTimeExpression(timings, errors, allowNegativeValues);\n}\nfunction parseTimeExpression(exp, errors, allowNegativeValues) {\n var regex = /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\n var duration;\n var delay = 0;\n var easing = '';\n if (typeof exp === 'string') {\n var matches = exp.match(regex);\n if (matches === null) {\n errors.push(\"The provided timing value \\\"\" + exp + \"\\\" is invalid.\");\n return { duration: 0, delay: 0, easing: '' };\n }\n duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n var delayMatch = matches[3];\n if (delayMatch != null) {\n delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);\n }\n var easingVal = matches[5];\n if (easingVal) {\n easing = easingVal;\n }\n }\n else {\n duration = exp;\n }\n if (!allowNegativeValues) {\n var containsErrors = false;\n var startIndex = errors.length;\n if (duration < 0) {\n errors.push(\"Duration values below 0 are not allowed for this animation step.\");\n containsErrors = true;\n }\n if (delay < 0) {\n errors.push(\"Delay values below 0 are not allowed for this animation step.\");\n containsErrors = true;\n }\n if (containsErrors) {\n errors.splice(startIndex, 0, \"The provided timing value \\\"\" + exp + \"\\\" is invalid.\");\n }\n }\n return { duration: duration, delay: delay, easing: easing };\n}\nfunction copyObj(obj, destination) {\n if (destination === void 0) { destination = {}; }\n Object.keys(obj).forEach(function (prop) {\n destination[prop] = obj[prop];\n });\n return destination;\n}\nfunction normalizeStyles(styles) {\n var normalizedStyles = {};\n if (Array.isArray(styles)) {\n styles.forEach(function (data) { return copyStyles(data, false, normalizedStyles); });\n }\n else {\n copyStyles(styles, false, normalizedStyles);\n }\n return normalizedStyles;\n}\nfunction copyStyles(styles, readPrototype, destination) {\n if (destination === void 0) { destination = {}; }\n if (readPrototype) {\n // we make use of a for-in loop so that the\n // prototypically inherited properties are\n // revealed from the backFill map\n for (var prop in styles) {\n destination[prop] = styles[prop];\n }\n }\n else {\n copyObj(styles, destination);\n }\n return destination;\n}\nfunction getStyleAttributeString(element, key, value) {\n // Return the key-value pair string to be added to the style attribute for the\n // given CSS style key.\n if (value) {\n return key + ':' + value + ';';\n }\n else {\n return '';\n }\n}\nfunction writeStyleAttribute(element) {\n // Read the style property of the element and manually reflect it to the\n // style attribute. This is needed because Domino on platform-server doesn't\n // understand the full set of allowed CSS properties and doesn't reflect some\n // of them automatically.\n var styleAttrValue = '';\n for (var i = 0; i < element.style.length; i++) {\n var key = element.style.item(i);\n styleAttrValue += getStyleAttributeString(element, key, element.style.getPropertyValue(key));\n }\n for (var key in element.style) {\n // Skip internal Domino properties that don't need to be reflected.\n if (!element.style.hasOwnProperty(key) || key.startsWith('_')) {\n continue;\n }\n var dashKey = camelCaseToDashCase(key);\n styleAttrValue += getStyleAttributeString(element, dashKey, element.style[key]);\n }\n element.setAttribute('style', styleAttrValue);\n}\nfunction setStyles(element, styles, formerStyles) {\n if (element['style']) {\n Object.keys(styles).forEach(function (prop) {\n var camelProp = dashCaseToCamelCase(prop);\n if (formerStyles && !formerStyles.hasOwnProperty(prop)) {\n formerStyles[prop] = element.style[camelProp];\n }\n element.style[camelProp] = styles[prop];\n });\n // On the server set the 'style' attribute since it's not automatically reflected.\n if (isNode()) {\n writeStyleAttribute(element);\n }\n }\n}\nfunction eraseStyles(element, styles) {\n if (element['style']) {\n Object.keys(styles).forEach(function (prop) {\n var camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = '';\n });\n // On the server set the 'style' attribute since it's not automatically reflected.\n if (isNode()) {\n writeStyleAttribute(element);\n }\n }\n}\nfunction normalizeAnimationEntry(steps) {\n if (Array.isArray(steps)) {\n if (steps.length == 1)\n return steps[0];\n return sequence(steps);\n }\n return steps;\n}\nfunction validateStyleParams(value, options, errors) {\n var params = options.params || {};\n var matches = extractStyleParams(value);\n if (matches.length) {\n matches.forEach(function (varName) {\n if (!params.hasOwnProperty(varName)) {\n errors.push(\"Unable to resolve the local animation param \" + varName + \" in the given list of values\");\n }\n });\n }\n}\nvar PARAM_REGEX = new RegExp(SUBSTITUTION_EXPR_START + \"\\\\s*(.+?)\\\\s*\" + SUBSTITUTION_EXPR_END, 'g');\nfunction extractStyleParams(value) {\n var params = [];\n if (typeof value === 'string') {\n var match = void 0;\n while (match = PARAM_REGEX.exec(value)) {\n params.push(match[1]);\n }\n PARAM_REGEX.lastIndex = 0;\n }\n return params;\n}\nfunction interpolateParams(value, params, errors) {\n var original = value.toString();\n var str = original.replace(PARAM_REGEX, function (_, varName) {\n var localVal = params[varName];\n // this means that the value was never overridden by the data passed in by the user\n if (!params.hasOwnProperty(varName)) {\n errors.push(\"Please provide a value for the animation param \" + varName);\n localVal = '';\n }\n return localVal.toString();\n });\n // we do this to assert that numeric values stay as they are\n return str == original ? value : str;\n}\nfunction iteratorToArray(iterator) {\n var arr = [];\n var item = iterator.next();\n while (!item.done) {\n arr.push(item.value);\n item = iterator.next();\n }\n return arr;\n}\nfunction mergeAnimationOptions(source, destination) {\n if (source.params) {\n var p0_1 = source.params;\n if (!destination.params) {\n destination.params = {};\n }\n var p1_1 = destination.params;\n Object.keys(p0_1).forEach(function (param) {\n if (!p1_1.hasOwnProperty(param)) {\n p1_1[param] = p0_1[param];\n }\n });\n }\n return destination;\n}\nvar DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_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].toUpperCase();\n });\n}\nfunction camelCaseToDashCase(input) {\n return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\nfunction allowPreviousPlayerStylesMerge(duration, delay) {\n return duration === 0 || delay === 0;\n}\nfunction balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles) {\n var previousStyleProps = Object.keys(previousStyles);\n if (previousStyleProps.length && keyframes.length) {\n var startingKeyframe_1 = keyframes[0];\n var missingStyleProps_1 = [];\n previousStyleProps.forEach(function (prop) {\n if (!startingKeyframe_1.hasOwnProperty(prop)) {\n missingStyleProps_1.push(prop);\n }\n startingKeyframe_1[prop] = previousStyles[prop];\n });\n if (missingStyleProps_1.length) {\n var _loop_1 = function () {\n var kf = keyframes[i];\n missingStyleProps_1.forEach(function (prop) {\n kf[prop] = computeStyle(element, prop);\n });\n };\n // tslint:disable-next-line\n for (var i = 1; i < keyframes.length; i++) {\n _loop_1();\n }\n }\n }\n return keyframes;\n}\nfunction visitDslNode(visitor, node, context) {\n switch (node.type) {\n case 7 /* Trigger */:\n return visitor.visitTrigger(node, context);\n case 0 /* State */:\n return visitor.visitState(node, context);\n case 1 /* Transition */:\n return visitor.visitTransition(node, context);\n case 2 /* Sequence */:\n return visitor.visitSequence(node, context);\n case 3 /* Group */:\n return visitor.visitGroup(node, context);\n case 4 /* Animate */:\n return visitor.visitAnimate(node, context);\n case 5 /* Keyframes */:\n return visitor.visitKeyframes(node, context);\n case 6 /* Style */:\n return visitor.visitStyle(node, context);\n case 8 /* Reference */:\n return visitor.visitReference(node, context);\n case 9 /* AnimateChild */:\n return visitor.visitAnimateChild(node, context);\n case 10 /* AnimateRef */:\n return visitor.visitAnimateRef(node, context);\n case 11 /* Query */:\n return visitor.visitQuery(node, context);\n case 12 /* Stagger */:\n return visitor.visitStagger(node, context);\n default:\n throw new Error(\"Unable to resolve animation metadata node #\" + node.type);\n }\n}\nfunction computeStyle(element, prop) {\n return window.getComputedStyle(element)[prop];\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 */\nvar ANY_STATE = '*';\nfunction parseTransitionExpr(transitionValue, errors) {\n var expressions = [];\n if (typeof transitionValue == 'string') {\n transitionValue.split(/\\s*,\\s*/).forEach(function (str) { return parseInnerTransitionStr(str, expressions, errors); });\n }\n else {\n expressions.push(transitionValue);\n }\n return expressions;\n}\nfunction parseInnerTransitionStr(eventStr, expressions, errors) {\n if (eventStr[0] == ':') {\n var result = parseAnimationAlias(eventStr, errors);\n if (typeof result == 'function') {\n expressions.push(result);\n return;\n }\n eventStr = result;\n }\n var match = eventStr.match(/^(\\*|[-\\w]+)\\s*(<?[=-]>)\\s*(\\*|[-\\w]+)$/);\n if (match == null || match.length < 4) {\n errors.push(\"The provided transition expression \\\"\" + eventStr + \"\\\" is not supported\");\n return expressions;\n }\n var fromState = match[1];\n var separator = match[2];\n var toState = match[3];\n expressions.push(makeLambdaFromStates(fromState, toState));\n var isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE;\n if (separator[0] == '<' && !isFullAnyStateExpr) {\n expressions.push(makeLambdaFromStates(toState, fromState));\n }\n}\nfunction parseAnimationAlias(alias, errors) {\n switch (alias) {\n case ':enter':\n return 'void => *';\n case ':leave':\n return '* => void';\n case ':increment':\n return function (fromState, toState) { return parseFloat(toState) > parseFloat(fromState); };\n case ':decrement':\n return function (fromState, toState) { return parseFloat(toState) < parseFloat(fromState); };\n default:\n errors.push(\"The transition alias value \\\"\" + alias + \"\\\" is not supported\");\n return '* => *';\n }\n}\n// DO NOT REFACTOR ... keep the follow set instantiations\n// with the values intact (closure compiler for some reason\n// removes follow-up lines that add the values outside of\n// the constructor...\nvar TRUE_BOOLEAN_VALUES = new Set(['true', '1']);\nvar FALSE_BOOLEAN_VALUES = new Set(['false', '0']);\nfunction makeLambdaFromStates(lhs, rhs) {\n var LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);\n var RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);\n return function (fromState, toState) {\n var lhsMatch = lhs == ANY_STATE || lhs == fromState;\n var rhsMatch = rhs == ANY_STATE || rhs == toState;\n if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') {\n lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);\n }\n if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {\n rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs);\n }\n return lhsMatch && rhsMatch;\n };\n}\n\nvar SELF_TOKEN = ':self';\nvar SELF_TOKEN_REGEX = new RegExp(\"s*\" + SELF_TOKEN + \"s*,?\", 'g');\n/*\n * [Validation]\n * The visitor code below will traverse the animation AST generated by the animation verb functions\n * (the output is a tree of objects) and attempt to perform a series of validations on the data. The\n * following corner-cases will be validated:\n *\n * 1. Overlap of animations\n * Given that a CSS property cannot be animated in more than one place at the same time, it's\n * important that this behavior is detected and validated. The way in which this occurs is that\n * each time a style property is examined, a string-map containing the property will be updated with\n * the start and end times for when the property is used within an animation step.\n *\n * If there are two or more parallel animations that are currently running (these are invoked by the\n * group()) on the same element then the validator will throw an error. Since the start/end timing\n * values are collected for each property then if the current animation step is animating the same\n * property and its timing values fall anywhere into the window of time that the property is\n * currently being animated within then this is what causes an error.\n *\n * 2. Timing values\n * The validator will validate to see if a timing value of `duration delay easing` or\n * `durationNumber` is valid or not.\n *\n * (note that upon validation the code below will replace the timing data with an object containing\n * {duration,delay,easing}.\n *\n * 3. Offset Validation\n * Each of the style() calls are allowed to have an offset value when placed inside of keyframes().\n * Offsets within keyframes() are considered valid when:\n *\n * - No offsets are used at all\n * - Each style() entry contains an offset value\n * - Each offset is between 0 and 1\n * - Each offset is greater to or equal than the previous one\n *\n * Otherwise an error will be thrown.\n */\nfunction buildAnimationAst(driver, metadata, errors) {\n return new AnimationAstBuilderVisitor(driver).build(metadata, errors);\n}\nvar ROOT_SELECTOR = '';\nvar AnimationAstBuilderVisitor = /** @class */ (function () {\n function AnimationAstBuilderVisitor(_driver) {\n this._driver = _driver;\n }\n AnimationAstBuilderVisitor.prototype.build = function (metadata, errors) {\n var context = new AnimationAstBuilderContext(errors);\n this._resetContextStyleTimingState(context);\n return visitDslNode(this, normalizeAnimationEntry(metadata), context);\n };\n AnimationAstBuilderVisitor.prototype._resetContextStyleTimingState = function (context) {\n context.currentQuerySelector = ROOT_SELECTOR;\n context.collectedStyles = {};\n context.collectedStyles[ROOT_SELECTOR] = {};\n context.currentTime = 0;\n };\n AnimationAstBuilderVisitor.prototype.visitTrigger = function (metadata, context) {\n var _this = this;\n var queryCount = context.queryCount = 0;\n var depCount = context.depCount = 0;\n var states = [];\n var transitions = [];\n if (metadata.name.charAt(0) == '@') {\n context.errors.push('animation triggers cannot be prefixed with an `@` sign (e.g. trigger(\\'@foo\\', [...]))');\n }\n metadata.definitions.forEach(function (def) {\n _this._resetContextStyleTimingState(context);\n if (def.type == 0 /* State */) {\n var stateDef_1 = def;\n var name_1 = stateDef_1.name;\n name_1.toString().split(/\\s*,\\s*/).forEach(function (n) {\n stateDef_1.name = n;\n states.push(_this.visitState(stateDef_1, context));\n });\n stateDef_1.name = name_1;\n }\n else if (def.type == 1 /* Transition */) {\n var transition = _this.visitTransition(def, context);\n queryCount += transition.queryCount;\n depCount += transition.depCount;\n transitions.push(transition);\n }\n else {\n context.errors.push('only state() and transition() definitions can sit inside of a trigger()');\n }\n });\n return {\n type: 7 /* Trigger */,\n name: metadata.name,\n states: states,\n transitions: transitions,\n queryCount: queryCount,\n depCount: depCount,\n options: null\n };\n };\n AnimationAstBuilderVisitor.prototype.visitState = function (metadata, context) {\n var styleAst = this.visitStyle(metadata.styles, context);\n var astParams = (metadata.options && metadata.options.params) || null;\n if (styleAst.containsDynamicStyles) {\n var missingSubs_1 = new Set();\n var params_1 = astParams || {};\n styleAst.styles.forEach(function (value) {\n if (isObject(value)) {\n var stylesObj_1 = value;\n Object.keys(stylesObj_1).forEach(function (prop) {\n extractStyleParams(stylesObj_1[prop]).forEach(function (sub) {\n if (!params_1.hasOwnProperty(sub)) {\n missingSubs_1.add(sub);\n }\n });\n });\n }\n });\n if (missingSubs_1.size) {\n var missingSubsArr = iteratorToArray(missingSubs_1.values());\n context.errors.push(\"state(\\\"\" + metadata\n .name + \"\\\", ...) must define default values for all the following style substitutions: \" + missingSubsArr.join(', '));\n }\n }\n return {\n type: 0 /* State */,\n name: metadata.name,\n style: styleAst,\n options: astParams ? { params: astParams } : null\n };\n };\n AnimationAstBuilderVisitor.prototype.visitTransition = function (metadata, context) {\n context.queryCount = 0;\n context.depCount = 0;\n var animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n var matchers = parseTransitionExpr(metadata.expr, context.errors);\n return {\n type: 1 /* Transition */,\n matchers: matchers,\n animation: animation,\n queryCount: context.queryCount,\n depCount: context.depCount,\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitSequence = function (metadata, context) {\n var _this = this;\n return {\n type: 2 /* Sequence */,\n steps: metadata.steps.map(function (s) { return visitDslNode(_this, s, context); }),\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitGroup = function (metadata, context) {\n var _this = this;\n var currentTime = context.currentTime;\n var furthestTime = 0;\n var steps = metadata.steps.map(function (step) {\n context.currentTime = currentTime;\n var innerAst = visitDslNode(_this, step, context);\n furthestTime = Math.max(furthestTime, context.currentTime);\n return innerAst;\n });\n context.currentTime = furthestTime;\n return {\n type: 3 /* Group */,\n steps: steps,\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitAnimate = function (metadata, context) {\n var timingAst = constructTimingAst(metadata.timings, context.errors);\n context.currentAnimateTimings = timingAst;\n var styleAst;\n var styleMetadata = metadata.styles ? metadata.styles : style({});\n if (styleMetadata.type == 5 /* Keyframes */) {\n styleAst = this.visitKeyframes(styleMetadata, context);\n }\n else {\n var styleMetadata_1 = metadata.styles;\n var isEmpty = false;\n if (!styleMetadata_1) {\n isEmpty = true;\n var newStyleData = {};\n if (timingAst.easing) {\n newStyleData['easing'] = timingAst.easing;\n }\n styleMetadata_1 = style(newStyleData);\n }\n context.currentTime += timingAst.duration + timingAst.delay;\n var _styleAst = this.visitStyle(styleMetadata_1, context);\n _styleAst.isEmptyStep = isEmpty;\n styleAst = _styleAst;\n }\n context.currentAnimateTimings = null;\n return {\n type: 4 /* Animate */,\n timings: timingAst,\n style: styleAst,\n options: null\n };\n };\n AnimationAstBuilderVisitor.prototype.visitStyle = function (metadata, context) {\n var ast = this._makeStyleAst(metadata, context);\n this._validateStyleAst(ast, context);\n return ast;\n };\n AnimationAstBuilderVisitor.prototype._makeStyleAst = function (metadata, context) {\n var styles = [];\n if (Array.isArray(metadata.styles)) {\n metadata.styles.forEach(function (styleTuple) {\n if (typeof styleTuple == 'string') {\n if (styleTuple == AUTO_STYLE) {\n styles.push(styleTuple);\n }\n else {\n context.errors.push(\"The provided style string value \" + styleTuple + \" is not allowed.\");\n }\n }\n else {\n styles.push(styleTuple);\n }\n });\n }\n else {\n styles.push(metadata.styles);\n }\n var containsDynamicStyles = false;\n var collectedEasing = null;\n styles.forEach(function (styleData) {\n if (isObject(styleData)) {\n var styleMap = styleData;\n var easing = styleMap['easing'];\n if (easing) {\n collectedEasing = easing;\n delete styleMap['easing'];\n }\n if (!containsDynamicStyles) {\n for (var prop in styleMap) {\n var value = styleMap[prop];\n if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {\n containsDynamicStyles = true;\n break;\n }\n }\n }\n }\n });\n return {\n type: 6 /* Style */,\n styles: styles,\n easing: collectedEasing,\n offset: metadata.offset,\n containsDynamicStyles: containsDynamicStyles,\n options: null\n };\n };\n AnimationAstBuilderVisitor.prototype._validateStyleAst = function (ast, context) {\n var _this = this;\n var timings = context.currentAnimateTimings;\n var endTime = context.currentTime;\n var startTime = context.currentTime;\n if (timings && startTime > 0) {\n startTime -= timings.duration + timings.delay;\n }\n ast.styles.forEach(function (tuple) {\n if (typeof tuple == 'string')\n return;\n Object.keys(tuple).forEach(function (prop) {\n if (!_this._driver.validateStyleProperty(prop)) {\n context.errors.push(\"The provided animation property \\\"\" + prop + \"\\\" is not a supported CSS property for animations\");\n return;\n }\n var collectedStyles = context.collectedStyles[context.currentQuerySelector];\n var collectedEntry = collectedStyles[prop];\n var updateCollectedStyle = true;\n if (collectedEntry) {\n if (startTime != endTime && startTime >= collectedEntry.startTime &&\n endTime <= collectedEntry.endTime) {\n context.errors.push(\"The CSS property \\\"\" + prop + \"\\\" that exists between the times of \\\"\" + collectedEntry.startTime + \"ms\\\" and \\\"\" + collectedEntry\n .endTime + \"ms\\\" is also being animated in a parallel animation between the times of \\\"\" + startTime + \"ms\\\" and \\\"\" + endTime + \"ms\\\"\");\n updateCollectedStyle = false;\n }\n // we always choose the smaller start time value since we\n // want to have a record of the entire animation window where\n // the style property is being animated in between\n startTime = collectedEntry.startTime;\n }\n if (updateCollectedStyle) {\n collectedStyles[prop] = { startTime: startTime, endTime: endTime };\n }\n if (context.options) {\n validateStyleParams(tuple[prop], context.options, context.errors);\n }\n });\n });\n };\n AnimationAstBuilderVisitor.prototype.visitKeyframes = function (metadata, context) {\n var _this = this;\n var ast = { type: 5 /* Keyframes */, styles: [], options: null };\n if (!context.currentAnimateTimings) {\n context.errors.push(\"keyframes() must be placed inside of a call to animate()\");\n return ast;\n }\n var MAX_KEYFRAME_OFFSET = 1;\n var totalKeyframesWithOffsets = 0;\n var offsets = [];\n var offsetsOutOfOrder = false;\n var keyframesOutOfRange = false;\n var previousOffset = 0;\n var keyframes = metadata.steps.map(function (styles) {\n var style = _this._makeStyleAst(styles, context);\n var offsetVal = style.offset != null ? style.offset : consumeOffset(style.styles);\n var offset = 0;\n if (offsetVal != null) {\n totalKeyframesWithOffsets++;\n offset = style.offset = offsetVal;\n }\n keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1;\n offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset;\n previousOffset = offset;\n offsets.push(offset);\n return style;\n });\n if (keyframesOutOfRange) {\n context.errors.push(\"Please ensure that all keyframe offsets are between 0 and 1\");\n }\n if (offsetsOutOfOrder) {\n context.errors.push(\"Please ensure that all keyframe offsets are in order\");\n }\n var length = metadata.steps.length;\n var generatedOffset = 0;\n if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) {\n context.errors.push(\"Not all style() steps within the declared keyframes() contain offsets\");\n }\n else if (totalKeyframesWithOffsets == 0) {\n generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1);\n }\n var limit = length - 1;\n var currentTime = context.currentTime;\n var currentAnimateTimings = context.currentAnimateTimings;\n var animateDuration = currentAnimateTimings.duration;\n keyframes.forEach(function (kf, i) {\n var offset = generatedOffset > 0 ? (i == limit ? 1 : (generatedOffset * i)) : offsets[i];\n var durationUpToThisFrame = offset * animateDuration;\n context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame;\n currentAnimateTimings.duration = durationUpToThisFrame;\n _this._validateStyleAst(kf, context);\n kf.offset = offset;\n ast.styles.push(kf);\n });\n return ast;\n };\n AnimationAstBuilderVisitor.prototype.visitReference = function (metadata, context) {\n return {\n type: 8 /* Reference */,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitAnimateChild = function (metadata, context) {\n context.depCount++;\n return {\n type: 9 /* AnimateChild */,\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitAnimateRef = function (metadata, context) {\n return {\n type: 10 /* AnimateRef */,\n animation: this.visitReference(metadata.animation, context),\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitQuery = function (metadata, context) {\n var parentSelector = context.currentQuerySelector;\n var options = (metadata.options || {});\n context.queryCount++;\n context.currentQuery = metadata;\n var _a = __read(normalizeSelector(metadata.selector), 2), selector = _a[0], includeSelf = _a[1];\n context.currentQuerySelector =\n parentSelector.length ? (parentSelector + ' ' + selector) : selector;\n getOrSetAsInMap(context.collectedStyles, context.currentQuerySelector, {});\n var animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n context.currentQuery = null;\n context.currentQuerySelector = parentSelector;\n return {\n type: 11 /* Query */,\n selector: selector,\n limit: options.limit || 0,\n optional: !!options.optional,\n includeSelf: includeSelf,\n animation: animation,\n originalSelector: metadata.selector,\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitStagger = function (metadata, context) {\n if (!context.currentQuery) {\n context.errors.push(\"stagger() can only be used inside of query()\");\n }\n var timings = metadata.timings === 'full' ?\n { duration: 0, delay: 0, easing: 'full' } :\n resolveTiming(metadata.timings, context.errors, true);\n return {\n type: 12 /* Stagger */,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n timings: timings,\n options: null\n };\n };\n return AnimationAstBuilderVisitor;\n}());\nfunction normalizeSelector(selector) {\n var hasAmpersand = selector.split(/\\s*,\\s*/).find(function (token) { return token == SELF_TOKEN; }) ? true : false;\n if (hasAmpersand) {\n selector = selector.replace(SELF_TOKEN_REGEX, '');\n }\n // the :enter and :leave selectors are filled in at runtime during timeline building\n selector = selector.replace(/@\\*/g, NG_TRIGGER_SELECTOR)\n .replace(/@\\w+/g, function (match) { return NG_TRIGGER_SELECTOR + '-' + match.substr(1); })\n .replace(/:animating/g, NG_ANIMATING_SELECTOR);\n return [selector, hasAmpersand];\n}\nfunction normalizeParams(obj) {\n return obj ? copyObj(obj) : null;\n}\nvar AnimationAstBuilderContext = /** @class */ (function () {\n function AnimationAstBuilderContext(errors) {\n this.errors = errors;\n this.queryCount = 0;\n this.depCount = 0;\n this.currentTransition = null;\n this.currentQuery = null;\n this.currentQuerySelector = null;\n this.currentAnimateTimings = null;\n this.currentTime = 0;\n this.collectedStyles = {};\n this.options = null;\n }\n return AnimationAstBuilderContext;\n}());\nfunction consumeOffset(styles) {\n if (typeof styles == 'string')\n return null;\n var offset = null;\n if (Array.isArray(styles)) {\n styles.forEach(function (styleTuple) {\n if (isObject(styleTuple) && styleTuple.hasOwnProperty('offset')) {\n var obj = styleTuple;\n offset = parseFloat(obj['offset']);\n delete obj['offset'];\n }\n });\n }\n else if (isObject(styles) && styles.hasOwnProperty('offset')) {\n var obj = styles;\n offset = parseFloat(obj['offset']);\n delete obj['offset'];\n }\n return offset;\n}\nfunction isObject(value) {\n return !Array.isArray(value) && typeof value == 'object';\n}\nfunction constructTimingAst(value, errors) {\n var timings = null;\n if (value.hasOwnProperty('duration')) {\n timings = value;\n }\n else if (typeof value == 'number') {\n var duration = resolveTiming(value, errors).duration;\n return makeTimingAst(duration, 0, '');\n }\n var strValue = value;\n var isDynamic = strValue.split(/\\s+/).some(function (v) { return v.charAt(0) == '{' && v.charAt(1) == '{'; });\n if (isDynamic) {\n var ast = makeTimingAst(0, 0, '');\n ast.dynamic = true;\n ast.strValue = strValue;\n return ast;\n }\n timings = timings || resolveTiming(strValue, errors);\n return makeTimingAst(timings.duration, timings.delay, timings.easing);\n}\nfunction normalizeAnimationOptions(options) {\n if (options) {\n options = copyObj(options);\n if (options['params']) {\n options['params'] = normalizeParams(options['params']);\n }\n }\n else {\n options = {};\n }\n return options;\n}\nfunction makeTimingAst(duration, delay, easing) {\n return { duration: duration, delay: delay, easing: easing };\n}\n\nfunction createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing, subTimeline) {\n if (easing === void 0) { easing = null; }\n if (subTimeline === void 0) { subTimeline = false; }\n return {\n type: 1 /* TimelineAnimation */,\n element: element,\n keyframes: keyframes,\n preStyleProps: preStyleProps,\n postStyleProps: postStyleProps,\n duration: duration,\n delay: delay,\n totalTime: duration + delay,\n easing: easing,\n subTimeline: subTimeline\n };\n}\n\nvar ElementInstructionMap = /** @class */ (function () {\n function ElementInstructionMap() {\n this._map = new Map();\n }\n ElementInstructionMap.prototype.consume = function (element) {\n var instructions = this._map.get(element);\n if (instructions) {\n this._map.delete(element);\n }\n else {\n instructions = [];\n }\n return instructions;\n };\n ElementInstructionMap.prototype.append = function (element, instructions) {\n var existingInstructions = this._map.get(element);\n if (!existingInstructions) {\n this._map.set(element, existingInstructions = []);\n }\n existingInstructions.push.apply(existingInstructions, __spread(instructions));\n };\n ElementInstructionMap.prototype.has = function (element) {\n return this._map.has(element);\n };\n ElementInstructionMap.prototype.clear = function () {\n this._map.clear();\n };\n return ElementInstructionMap;\n}());\n\nvar ONE_FRAME_IN_MILLISECONDS = 1;\nvar ENTER_TOKEN = ':enter';\nvar ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');\nvar LEAVE_TOKEN = ':leave';\nvar LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');\n/*\n * The code within this file aims to generate web-animations-compatible keyframes from Angular's\n * animation DSL code.\n *\n * The code below will be converted from:\n *\n * ```\n * sequence([\n * style({ opacity: 0 }),\n * animate(1000, style({ opacity: 0 }))\n * ])\n * ```\n *\n * To:\n * ```\n * keyframes = [{ opacity: 0, offset: 0 }, { opacity: 1, offset: 1 }]\n * duration = 1000\n * delay = 0\n * easing = ''\n * ```\n *\n * For this operation to cover the combination of animation verbs (style, animate, group, etc...) a\n * combination of prototypical inheritance, AST traversal and merge-sort-like algorithms are used.\n *\n * [AST Traversal]\n * Each of the animation verbs, when executed, will return an string-map object representing what\n * type of action it is (style, animate, group, etc...) and the data associated with it. This means\n * that when functional composition mix of these functions is evaluated (like in the example above)\n * then it will end up producing a tree of objects representing the animation itself.\n *\n * When this animation object tree is processed by the visitor code below it will visit each of the\n * verb statements within the visitor. And during each visit it will build the context of the\n * animation keyframes by interacting with the `TimelineBuilder`.\n *\n * [TimelineBuilder]\n * This class is responsible for tracking the styles and building a series of keyframe objects for a\n * timeline between a start and end time. The builder starts off with an initial timeline and each\n * time the AST comes across a `group()`, `keyframes()` or a combination of the two wihtin a\n * `sequence()` then it will generate a sub timeline for each step as well as a new one after\n * they are complete.\n *\n * As the AST is traversed, the timing state on each of the timelines will be incremented. If a sub\n * timeline was created (based on one of the cases above) then the parent timeline will attempt to\n * merge the styles used within the sub timelines into itself (only with group() this will happen).\n * This happens with a merge operation (much like how the merge works in mergesort) and it will only\n * copy the most recently used styles from the sub timelines into the parent timeline. This ensures\n * that if the styles are used later on in another phase of the animation then they will be the most\n * up-to-date values.\n *\n * [How Missing Styles Are Updated]\n * Each timeline has a `backFill` property which is responsible for filling in new styles into\n * already processed keyframes if a new style shows up later within the animation sequence.\n *\n * ```\n * sequence([\n * style({ width: 0 }),\n * animate(1000, style({ width: 100 })),\n * animate(1000, style({ width: 200 })),\n * animate(1000, style({ width: 300 }))\n * animate(1000, style({ width: 400, height: 400 })) // notice how `height` doesn't exist anywhere\n * else\n * ])\n * ```\n *\n * What is happening here is that the `height` value is added later in the sequence, but is missing\n * from all previous animation steps. Therefore when a keyframe is created it would also be missing\n * from all previous keyframes up until where it is first used. For the timeline keyframe generation\n * to properly fill in the style it will place the previous value (the value from the parent\n * timeline) or a default value of `*` into the backFill object. Given that each of the keyframe\n * styles are objects that prototypically inhert from the backFill object, this means that if a\n * value is added into the backFill then it will automatically propagate any missing values to all\n * keyframes. Therefore the missing `height` value will be properly filled into the already\n * processed keyframes.\n *\n * When a sub-timeline is created it will have its own backFill property. This is done so that\n * styles present within the sub-timeline do not accidentally seep into the previous/future timeline\n * keyframes\n *\n * (For prototypically-inherited contents to be detected a `for(i in obj)` loop must be used.)\n *\n * [Validation]\n * The code in this file is not responsible for validation. That functionality happens with within\n * the `AnimationValidatorVisitor` code.\n */\nfunction buildAnimationTimelines(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors) {\n if (startingStyles === void 0) { startingStyles = {}; }\n if (finalStyles === void 0) { finalStyles = {}; }\n if (errors === void 0) { errors = []; }\n return new AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors);\n}\nvar AnimationTimelineBuilderVisitor = /** @class */ (function () {\n function AnimationTimelineBuilderVisitor() {\n }\n AnimationTimelineBuilderVisitor.prototype.buildKeyframes = function (driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors) {\n if (errors === void 0) { errors = []; }\n subInstructions = subInstructions || new ElementInstructionMap();\n var context = new AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []);\n context.options = options;\n context.currentTimeline.setStyles([startingStyles], null, context.errors, options);\n visitDslNode(this, ast, context);\n // this checks to see if an actual animation happened\n var timelines = context.timelines.filter(function (timeline) { return timeline.containsAnimation(); });\n if (timelines.length && Object.keys(finalStyles).length) {\n var tl = timelines[timelines.length - 1];\n if (!tl.allowOnlyTimelineStyles()) {\n tl.setStyles([finalStyles], null, context.errors, options);\n }\n }\n return timelines.length ? timelines.map(function (timeline) { return timeline.buildKeyframes(); }) :\n [createTimelineInstruction(rootElement, [], [], [], 0, 0, '', false)];\n };\n AnimationTimelineBuilderVisitor.prototype.visitTrigger = function (ast, context) {\n // these values are not visited in this AST\n };\n AnimationTimelineBuilderVisitor.prototype.visitState = function (ast, context) {\n // these values are not visited in this AST\n };\n AnimationTimelineBuilderVisitor.prototype.visitTransition = function (ast, context) {\n // these values are not visited in this AST\n };\n AnimationTimelineBuilderVisitor.prototype.visitAnimateChild = function (ast, context) {\n var elementInstructions = context.subInstructions.consume(context.element);\n if (elementInstructions) {\n var innerContext = context.createSubContext(ast.options);\n var startTime = context.currentTimeline.currentTime;\n var endTime = this._visitSubInstructions(elementInstructions, innerContext, innerContext.options);\n if (startTime != endTime) {\n // we do this on the upper context because we created a sub context for\n // the sub child animations\n context.transformIntoNewTimeline(endTime);\n }\n }\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype.visitAnimateRef = function (ast, context) {\n var innerContext = context.createSubContext(ast.options);\n innerContext.transformIntoNewTimeline();\n this.visitReference(ast.animation, innerContext);\n context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime);\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype._visitSubInstructions = function (instructions, context, options) {\n var startTime = context.currentTimeline.currentTime;\n var furthestTime = startTime;\n // this is a special-case for when a user wants to skip a sub\n // animation from being fired entirely.\n var duration = options.duration != null ? resolveTimingValue(options.duration) : null;\n var delay = options.delay != null ? resolveTimingValue(options.delay) : null;\n if (duration !== 0) {\n instructions.forEach(function (instruction) {\n var instructionTimings = context.appendInstructionToTimeline(instruction, duration, delay);\n furthestTime =\n Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay);\n });\n }\n return furthestTime;\n };\n AnimationTimelineBuilderVisitor.prototype.visitReference = function (ast, context) {\n context.updateOptions(ast.options, true);\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype.visitSequence = function (ast, context) {\n var _this = this;\n var subContextCount = context.subContextCount;\n var ctx = context;\n var options = ast.options;\n if (options && (options.params || options.delay)) {\n ctx = context.createSubContext(options);\n ctx.transformIntoNewTimeline();\n if (options.delay != null) {\n if (ctx.previousNode.type == 6 /* Style */) {\n ctx.currentTimeline.snapshotCurrentStyles();\n ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n var delay = resolveTimingValue(options.delay);\n ctx.delayNextStep(delay);\n }\n }\n if (ast.steps.length) {\n ast.steps.forEach(function (s) { return visitDslNode(_this, s, ctx); });\n // this is here just incase the inner steps only contain or end with a style() call\n ctx.currentTimeline.applyStylesToKeyframe();\n // this means that some animation function within the sequence\n // ended up creating a sub timeline (which means the current\n // timeline cannot overlap with the contents of the sequence)\n if (ctx.subContextCount > subContextCount) {\n ctx.transformIntoNewTimeline();\n }\n }\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype.visitGroup = function (ast, context) {\n var _this = this;\n var innerTimelines = [];\n var furthestTime = context.currentTimeline.currentTime;\n var delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;\n ast.steps.forEach(function (s) {\n var innerContext = context.createSubContext(ast.options);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n visitDslNode(_this, s, innerContext);\n furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);\n innerTimelines.push(innerContext.currentTimeline);\n });\n // this operation is run after the AST loop because otherwise\n // if the parent timeline's collected styles were updated then\n // it would pass in invalid data into the new-to-be forked items\n innerTimelines.forEach(function (timeline) { return context.currentTimeline.mergeTimelineCollectedStyles(timeline); });\n context.transformIntoNewTimeline(furthestTime);\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype._visitTiming = function (ast, context) {\n if (ast.dynamic) {\n var strValue = ast.strValue;\n var timingValue = context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;\n return resolveTiming(timingValue, context.errors);\n }\n else {\n return { duration: ast.duration, delay: ast.delay, easing: ast.easing };\n }\n };\n AnimationTimelineBuilderVisitor.prototype.visitAnimate = function (ast, context) {\n var timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);\n var timeline = context.currentTimeline;\n if (timings.delay) {\n context.incrementTime(timings.delay);\n timeline.snapshotCurrentStyles();\n }\n var style = ast.style;\n if (style.type == 5 /* Keyframes */) {\n this.visitKeyframes(style, context);\n }\n else {\n context.incrementTime(timings.duration);\n this.visitStyle(style, context);\n timeline.applyStylesToKeyframe();\n }\n context.currentAnimateTimings = null;\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype.visitStyle = function (ast, context) {\n var timeline = context.currentTimeline;\n var timings = context.currentAnimateTimings;\n // this is a special case for when a style() call\n // directly follows an animate() call (but not inside of an animate() call)\n if (!timings && timeline.getCurrentStyleProperties().length) {\n timeline.forwardFrame();\n }\n var easing = (timings && timings.easing) || ast.easing;\n if (ast.isEmptyStep) {\n timeline.applyEmptyStep(easing);\n }\n else {\n timeline.setStyles(ast.styles, easing, context.errors, context.options);\n }\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype.visitKeyframes = function (ast, context) {\n var currentAnimateTimings = context.currentAnimateTimings;\n var startTime = (context.currentTimeline).duration;\n var duration = currentAnimateTimings.duration;\n var innerContext = context.createSubContext();\n var innerTimeline = innerContext.currentTimeline;\n innerTimeline.easing = currentAnimateTimings.easing;\n ast.styles.forEach(function (step) {\n var offset = step.offset || 0;\n innerTimeline.forwardTime(offset * duration);\n innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options);\n innerTimeline.applyStylesToKeyframe();\n });\n // this will ensure that the parent timeline gets all the styles from\n // the child even if the new timeline below is not used\n context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline);\n // we do this because the window between this timeline and the sub timeline\n // should ensure that the styles within are exactly the same as they were before\n context.transformIntoNewTimeline(startTime + duration);\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype.visitQuery = function (ast, context) {\n var _this = this;\n // in the event that the first step before this is a style step we need\n // to ensure the styles are applied before the children are animated\n var startTime = context.currentTimeline.currentTime;\n var options = (ast.options || {});\n var delay = options.delay ? resolveTimingValue(options.delay) : 0;\n if (delay &&\n (context.previousNode.type === 6 /* Style */ ||\n (startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) {\n context.currentTimeline.snapshotCurrentStyles();\n context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n var furthestTime = startTime;\n var elms = context.invokeQuery(ast.selector, ast.originalSelector, ast.limit, ast.includeSelf, options.optional ? true : false, context.errors);\n context.currentQueryTotal = elms.length;\n var sameElementTimeline = null;\n elms.forEach(function (element, i) {\n context.currentQueryIndex = i;\n var innerContext = context.createSubContext(ast.options, element);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n if (element === context.element) {\n sameElementTimeline = innerContext.currentTimeline;\n }\n visitDslNode(_this, ast.animation, innerContext);\n // this is here just incase the inner steps only contain or end\n // with a style() call (which is here to signal that this is a preparatory\n // call to style an element before it is animated again)\n innerContext.currentTimeline.applyStylesToKeyframe();\n var endTime = innerContext.currentTimeline.currentTime;\n furthestTime = Math.max(furthestTime, endTime);\n });\n context.currentQueryIndex = 0;\n context.currentQueryTotal = 0;\n context.transformIntoNewTimeline(furthestTime);\n if (sameElementTimeline) {\n context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);\n context.currentTimeline.snapshotCurrentStyles();\n }\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype.visitStagger = function (ast, context) {\n var parentContext = context.parentContext;\n var tl = context.currentTimeline;\n var timings = ast.timings;\n var duration = Math.abs(timings.duration);\n var maxTime = duration * (context.currentQueryTotal - 1);\n var delay = duration * context.currentQueryIndex;\n var staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing;\n switch (staggerTransformer) {\n case 'reverse':\n delay = maxTime - delay;\n break;\n case 'full':\n delay = parentContext.currentStaggerTime;\n break;\n }\n var timeline = context.currentTimeline;\n if (delay) {\n timeline.delayNextStep(delay);\n }\n var startingTime = timeline.currentTime;\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n // time = duration + delay\n // the reason why this computation is so complex is because\n // the inner timeline may either have a delay value or a stretched\n // keyframe depending on if a subtimeline is not used or is used.\n parentContext.currentStaggerTime =\n (tl.currentTime - startingTime) + (tl.startTime - parentContext.currentTimeline.startTime);\n };\n return AnimationTimelineBuilderVisitor;\n}());\nvar DEFAULT_NOOP_PREVIOUS_NODE = {};\nvar AnimationTimelineContext = /** @class */ (function () {\n function AnimationTimelineContext(_driver, element, subInstructions, _enterClassName, _leaveClassName, errors, timelines, initialTimeline) {\n this._driver = _driver;\n this.element = element;\n this.subInstructions = subInstructions;\n this._enterClassName = _enterClassName;\n this._leaveClassName = _leaveClassName;\n this.errors = errors;\n this.timelines = timelines;\n this.parentContext = null;\n this.currentAnimateTimings = null;\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.subContextCount = 0;\n this.options = {};\n this.currentQueryIndex = 0;\n this.currentQueryTotal = 0;\n this.currentStaggerTime = 0;\n this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0);\n timelines.push(this.currentTimeline);\n }\n Object.defineProperty(AnimationTimelineContext.prototype, \"params\", {\n get: function () {\n return this.options.params;\n },\n enumerable: true,\n configurable: true\n });\n AnimationTimelineContext.prototype.updateOptions = function (options, skipIfExists) {\n var _this = this;\n if (!options)\n return;\n var newOptions = options;\n var optionsToUpdate = this.options;\n // NOTE: this will get patched up when other animation methods support duration overrides\n if (newOptions.duration != null) {\n optionsToUpdate.duration = resolveTimingValue(newOptions.duration);\n }\n if (newOptions.delay != null) {\n optionsToUpdate.delay = resolveTimingValue(newOptions.delay);\n }\n var newParams = newOptions.params;\n if (newParams) {\n var paramsToUpdate_1 = optionsToUpdate.params;\n if (!paramsToUpdate_1) {\n paramsToUpdate_1 = this.options.params = {};\n }\n Object.keys(newParams).forEach(function (name) {\n if (!skipIfExists || !paramsToUpdate_1.hasOwnProperty(name)) {\n paramsToUpdate_1[name] = interpolateParams(newParams[name], paramsToUpdate_1, _this.errors);\n }\n });\n }\n };\n AnimationTimelineContext.prototype._copyOptions = function () {\n var options = {};\n if (this.options) {\n var oldParams_1 = this.options.params;\n if (oldParams_1) {\n var params_1 = options['params'] = {};\n Object.keys(oldParams_1).forEach(function (name) {\n params_1[name] = oldParams_1[name];\n });\n }\n }\n return options;\n };\n AnimationTimelineContext.prototype.createSubContext = function (options, element, newTime) {\n if (options === void 0) { options = null; }\n var target = element || this.element;\n var context = new AnimationTimelineContext(this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName, this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0));\n context.previousNode = this.previousNode;\n context.currentAnimateTimings = this.currentAnimateTimings;\n context.options = this._copyOptions();\n context.updateOptions(options);\n context.currentQueryIndex = this.currentQueryIndex;\n context.currentQueryTotal = this.currentQueryTotal;\n context.parentContext = this;\n this.subContextCount++;\n return context;\n };\n AnimationTimelineContext.prototype.transformIntoNewTimeline = function (newTime) {\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.currentTimeline = this.currentTimeline.fork(this.element, newTime);\n this.timelines.push(this.currentTimeline);\n return this.currentTimeline;\n };\n AnimationTimelineContext.prototype.appendInstructionToTimeline = function (instruction, duration, delay) {\n var updatedTimings = {\n duration: duration != null ? duration : instruction.duration,\n delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,\n easing: ''\n };\n var builder = new SubTimelineBuilder(this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);\n this.timelines.push(builder);\n return updatedTimings;\n };\n AnimationTimelineContext.prototype.incrementTime = function (time) {\n this.currentTimeline.forwardTime(this.currentTimeline.duration + time);\n };\n AnimationTimelineContext.prototype.delayNextStep = function (delay) {\n // negative delays are not yet supported\n if (delay > 0) {\n this.currentTimeline.delayNextStep(delay);\n }\n };\n AnimationTimelineContext.prototype.invokeQuery = function (selector, originalSelector, limit, includeSelf, optional, errors) {\n var results = [];\n if (includeSelf) {\n results.push(this.element);\n }\n if (selector.length > 0) { // if :self is only used then the selector is empty\n selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);\n selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName);\n var multi = limit != 1;\n var elements = this._driver.query(this.element, selector, multi);\n if (limit !== 0) {\n elements = limit < 0 ? elements.slice(elements.length + limit, elements.length) :\n elements.slice(0, limit);\n }\n results.push.apply(results, __spread(elements));\n }\n if (!optional && results.length == 0) {\n errors.push(\"`query(\\\"\" + originalSelector + \"\\\")` returned zero elements. (Use `query(\\\"\" + originalSelector + \"\\\", { optional: true })` if you wish to allow this.)\");\n }\n return results;\n };\n return AnimationTimelineContext;\n}());\nvar TimelineBuilder = /** @class */ (function () {\n function TimelineBuilder(_driver, element, startTime, _elementTimelineStylesLookup) {\n this._driver = _driver;\n this.element = element;\n this.startTime = startTime;\n this._elementTimelineStylesLookup = _elementTimelineStylesLookup;\n this.duration = 0;\n this._previousKeyframe = {};\n this._currentKeyframe = {};\n this._keyframes = new Map();\n this._styleSummary = {};\n this._pendingStyles = {};\n this._backFill = {};\n this._currentEmptyStepKeyframe = null;\n if (!this._elementTimelineStylesLookup) {\n this._elementTimelineStylesLookup = new Map();\n }\n this._localTimelineStyles = Object.create(this._backFill, {});\n this._globalTimelineStyles = this._elementTimelineStylesLookup.get(element);\n if (!this._globalTimelineStyles) {\n this._globalTimelineStyles = this._localTimelineStyles;\n this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);\n }\n this._loadKeyframe();\n }\n TimelineBuilder.prototype.containsAnimation = function () {\n switch (this._keyframes.size) {\n case 0:\n return false;\n case 1:\n return this.getCurrentStyleProperties().length > 0;\n default:\n return true;\n }\n };\n TimelineBuilder.prototype.getCurrentStyleProperties = function () {\n return Object.keys(this._currentKeyframe);\n };\n Object.defineProperty(TimelineBuilder.prototype, \"currentTime\", {\n get: function () {\n return this.startTime + this.duration;\n },\n enumerable: true,\n configurable: true\n });\n TimelineBuilder.prototype.delayNextStep = function (delay) {\n // in the event that a style() step is placed right before a stagger()\n // and that style() step is the very first style() value in the animation\n // then we need to make a copy of the keyframe [0, copy, 1] so that the delay\n // properly applies the style() values to work with the stagger...\n var hasPreStyleStep = this._keyframes.size == 1 && Object.keys(this._pendingStyles).length;\n if (this.duration || hasPreStyleStep) {\n this.forwardTime(this.currentTime + delay);\n if (hasPreStyleStep) {\n this.snapshotCurrentStyles();\n }\n }\n else {\n this.startTime += delay;\n }\n };\n TimelineBuilder.prototype.fork = function (element, currentTime) {\n this.applyStylesToKeyframe();\n return new TimelineBuilder(this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup);\n };\n TimelineBuilder.prototype._loadKeyframe = function () {\n if (this._currentKeyframe) {\n this._previousKeyframe = this._currentKeyframe;\n }\n this._currentKeyframe = this._keyframes.get(this.duration);\n if (!this._currentKeyframe) {\n this._currentKeyframe = Object.create(this._backFill, {});\n this._keyframes.set(this.duration, this._currentKeyframe);\n }\n };\n TimelineBuilder.prototype.forwardFrame = function () {\n this.duration += ONE_FRAME_IN_MILLISECONDS;\n this._loadKeyframe();\n };\n TimelineBuilder.prototype.forwardTime = function (time) {\n this.applyStylesToKeyframe();\n this.duration = time;\n this._loadKeyframe();\n };\n TimelineBuilder.prototype._updateStyle = function (prop, value) {\n this._localTimelineStyles[prop] = value;\n this._globalTimelineStyles[prop] = value;\n this._styleSummary[prop] = { time: this.currentTime, value: value };\n };\n TimelineBuilder.prototype.allowOnlyTimelineStyles = function () {\n return this._currentEmptyStepKeyframe !== this._currentKeyframe;\n };\n TimelineBuilder.prototype.applyEmptyStep = function (easing) {\n var _this = this;\n if (easing) {\n this._previousKeyframe['easing'] = easing;\n }\n // special case for animate(duration):\n // all missing styles are filled with a `*` value then\n // if any destination styles are filled in later on the same\n // keyframe then they will override the overridden styles\n // We use `_globalTimelineStyles` here because there may be\n // styles in previous keyframes that are not present in this timeline\n Object.keys(this._globalTimelineStyles).forEach(function (prop) {\n _this._backFill[prop] = _this._globalTimelineStyles[prop] || AUTO_STYLE;\n _this._currentKeyframe[prop] = AUTO_STYLE;\n });\n this._currentEmptyStepKeyframe = this._currentKeyframe;\n };\n TimelineBuilder.prototype.setStyles = function (input, easing, errors, options) {\n var _this = this;\n if (easing) {\n this._previousKeyframe['easing'] = easing;\n }\n var params = (options && options.params) || {};\n var styles = flattenStyles(input, this._globalTimelineStyles);\n Object.keys(styles).forEach(function (prop) {\n var val = interpolateParams(styles[prop], params, errors);\n _this._pendingStyles[prop] = val;\n if (!_this._localTimelineStyles.hasOwnProperty(prop)) {\n _this._backFill[prop] = _this._globalTimelineStyles.hasOwnProperty(prop) ?\n _this._globalTimelineStyles[prop] :\n AUTO_STYLE;\n }\n _this._updateStyle(prop, val);\n });\n };\n TimelineBuilder.prototype.applyStylesToKeyframe = function () {\n var _this = this;\n var styles = this._pendingStyles;\n var props = Object.keys(styles);\n if (props.length == 0)\n return;\n this._pendingStyles = {};\n props.forEach(function (prop) {\n var val = styles[prop];\n _this._currentKeyframe[prop] = val;\n });\n Object.keys(this._localTimelineStyles).forEach(function (prop) {\n if (!_this._currentKeyframe.hasOwnProperty(prop)) {\n _this._currentKeyframe[prop] = _this._localTimelineStyles[prop];\n }\n });\n };\n TimelineBuilder.prototype.snapshotCurrentStyles = function () {\n var _this = this;\n Object.keys(this._localTimelineStyles).forEach(function (prop) {\n var val = _this._localTimelineStyles[prop];\n _this._pendingStyles[prop] = val;\n _this._updateStyle(prop, val);\n });\n };\n TimelineBuilder.prototype.getFinalKeyframe = function () {\n return this._keyframes.get(this.duration);\n };\n Object.defineProperty(TimelineBuilder.prototype, \"properties\", {\n get: function () {\n var properties = [];\n for (var prop in this._currentKeyframe) {\n properties.push(prop);\n }\n return properties;\n },\n enumerable: true,\n configurable: true\n });\n TimelineBuilder.prototype.mergeTimelineCollectedStyles = function (timeline) {\n var _this = this;\n Object.keys(timeline._styleSummary).forEach(function (prop) {\n var details0 = _this._styleSummary[prop];\n var details1 = timeline._styleSummary[prop];\n if (!details0 || details1.time > details0.time) {\n _this._updateStyle(prop, details1.value);\n }\n });\n };\n TimelineBuilder.prototype.buildKeyframes = function () {\n var _this = this;\n this.applyStylesToKeyframe();\n var preStyleProps = new Set();\n var postStyleProps = new Set();\n var isEmpty = this._keyframes.size === 1 && this.duration === 0;\n var finalKeyframes = [];\n this._keyframes.forEach(function (keyframe, time) {\n var finalKeyframe = copyStyles(keyframe, true);\n Object.keys(finalKeyframe).forEach(function (prop) {\n var value = finalKeyframe[prop];\n if (value == ɵPRE_STYLE) {\n preStyleProps.add(prop);\n }\n else if (value == AUTO_STYLE) {\n postStyleProps.add(prop);\n }\n });\n if (!isEmpty) {\n finalKeyframe['offset'] = time / _this.duration;\n }\n finalKeyframes.push(finalKeyframe);\n });\n var preProps = preStyleProps.size ? iteratorToArray(preStyleProps.values()) : [];\n var postProps = postStyleProps.size ? iteratorToArray(postStyleProps.values()) : [];\n // special case for a 0-second animation (which is designed just to place styles onscreen)\n if (isEmpty) {\n var kf0 = finalKeyframes[0];\n var kf1 = copyObj(kf0);\n kf0['offset'] = 0;\n kf1['offset'] = 1;\n finalKeyframes = [kf0, kf1];\n }\n return createTimelineInstruction(this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime, this.easing, false);\n };\n return TimelineBuilder;\n}());\nvar SubTimelineBuilder = /** @class */ (function (_super) {\n __extends(SubTimelineBuilder, _super);\n function SubTimelineBuilder(driver, element, keyframes, preStyleProps, postStyleProps, timings, _stretchStartingKeyframe) {\n if (_stretchStartingKeyframe === void 0) { _stretchStartingKeyframe = false; }\n var _this = _super.call(this, driver, element, timings.delay) || this;\n _this.element = element;\n _this.keyframes = keyframes;\n _this.preStyleProps = preStyleProps;\n _this.postStyleProps = postStyleProps;\n _this._stretchStartingKeyframe = _stretchStartingKeyframe;\n _this.timings = { duration: timings.duration, delay: timings.delay, easing: timings.easing };\n return _this;\n }\n SubTimelineBuilder.prototype.containsAnimation = function () {\n return this.keyframes.length > 1;\n };\n SubTimelineBuilder.prototype.buildKeyframes = function () {\n var keyframes = this.keyframes;\n var _a = this.timings, delay = _a.delay, duration = _a.duration, easing = _a.easing;\n if (this._stretchStartingKeyframe && delay) {\n var newKeyframes = [];\n var totalTime = duration + delay;\n var startingGap = delay / totalTime;\n // the original starting keyframe now starts once the delay is done\n var newFirstKeyframe = copyStyles(keyframes[0], false);\n newFirstKeyframe['offset'] = 0;\n newKeyframes.push(newFirstKeyframe);\n var oldFirstKeyframe = copyStyles(keyframes[0], false);\n oldFirstKeyframe['offset'] = roundOffset(startingGap);\n newKeyframes.push(oldFirstKeyframe);\n /*\n When the keyframe is stretched then it means that the delay before the animation\n starts is gone. Instead the first keyframe is placed at the start of the animation\n and it is then copied to where it starts when the original delay is over. This basically\n means nothing animates during that delay, but the styles are still renderered. For this\n to work the original offset values that exist in the original keyframes must be \"warped\"\n so that they can take the new keyframe + delay into account.\n \n delay=1000, duration=1000, keyframes = 0 .5 1\n \n turns into\n \n delay=0, duration=2000, keyframes = 0 .33 .66 1\n */\n // offsets between 1 ... n -1 are all warped by the keyframe stretch\n var limit = keyframes.length - 1;\n for (var i = 1; i <= limit; i++) {\n var kf = copyStyles(keyframes[i], false);\n var oldOffset = kf['offset'];\n var timeAtKeyframe = delay + oldOffset * duration;\n kf['offset'] = roundOffset(timeAtKeyframe / totalTime);\n newKeyframes.push(kf);\n }\n // the new starting keyframe should be added at the start\n duration = totalTime;\n delay = 0;\n easing = '';\n keyframes = newKeyframes;\n }\n return createTimelineInstruction(this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing, true);\n };\n return SubTimelineBuilder;\n}(TimelineBuilder));\nfunction roundOffset(offset, decimalPoints) {\n if (decimalPoints === void 0) { decimalPoints = 3; }\n var mult = Math.pow(10, decimalPoints - 1);\n return Math.round(offset * mult) / mult;\n}\nfunction flattenStyles(input, allStyles) {\n var styles = {};\n var allProperties;\n input.forEach(function (token) {\n if (token === '*') {\n allProperties = allProperties || Object.keys(allStyles);\n allProperties.forEach(function (prop) {\n styles[prop] = AUTO_STYLE;\n });\n }\n else {\n copyStyles(token, false, styles);\n }\n });\n return styles;\n}\n\nvar Animation = /** @class */ (function () {\n function Animation(_driver, input) {\n this._driver = _driver;\n var errors = [];\n var ast = buildAnimationAst(_driver, input, errors);\n if (errors.length) {\n var errorMessage = \"animation validation failed:\\n\" + errors.join('\\n');\n throw new Error(errorMessage);\n }\n this._animationAst = ast;\n }\n Animation.prototype.buildTimelines = function (element, startingStyles, destinationStyles, options, subInstructions) {\n var start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) :\n startingStyles;\n var dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) :\n destinationStyles;\n var errors = [];\n subInstructions = subInstructions || new ElementInstructionMap();\n var result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors);\n if (errors.length) {\n var errorMessage = \"animation building failed:\\n\" + errors.join('\\n');\n throw new Error(errorMessage);\n }\n return result;\n };\n return Animation;\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 */\nvar AnimationStyleNormalizer = /** @class */ (function () {\n function AnimationStyleNormalizer() {\n }\n return AnimationStyleNormalizer;\n}());\n/**\n * @publicApi\n */\nvar NoopAnimationStyleNormalizer = /** @class */ (function () {\n function NoopAnimationStyleNormalizer() {\n }\n NoopAnimationStyleNormalizer.prototype.normalizePropertyName = function (propertyName, errors) {\n return propertyName;\n };\n NoopAnimationStyleNormalizer.prototype.normalizeStyleValue = function (userProvidedProperty, normalizedProperty, value, errors) {\n return value;\n };\n return NoopAnimationStyleNormalizer;\n}());\n\nvar WebAnimationsStyleNormalizer = /** @class */ (function (_super) {\n __extends(WebAnimationsStyleNormalizer, _super);\n function WebAnimationsStyleNormalizer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n WebAnimationsStyleNormalizer.prototype.normalizePropertyName = function (propertyName, errors) {\n return dashCaseToCamelCase(propertyName);\n };\n WebAnimationsStyleNormalizer.prototype.normalizeStyleValue = function (userProvidedProperty, normalizedProperty, value, errors) {\n var unit = '';\n var strVal = value.toString().trim();\n if (DIMENSIONAL_PROP_MAP[normalizedProperty] && value !== 0 && value !== '0') {\n if (typeof value === 'number') {\n unit = 'px';\n }\n else {\n var valAndSuffixMatch = value.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n errors.push(\"Please provide a CSS unit value for \" + userProvidedProperty + \":\" + value);\n }\n }\n }\n return strVal + unit;\n };\n return WebAnimationsStyleNormalizer;\n}(AnimationStyleNormalizer));\nvar ɵ0$1 = function () { return makeBooleanMap('width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective'\n .split(',')); };\nvar DIMENSIONAL_PROP_MAP = (ɵ0$1)();\nfunction makeBooleanMap(keys) {\n var map = {};\n keys.forEach(function (key) { return map[key] = true; });\n return map;\n}\n\nfunction createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, totalTime, errors) {\n return {\n type: 0 /* TransitionAnimation */,\n element: element,\n triggerName: triggerName,\n isRemovalTransition: isRemovalTransition,\n fromState: fromState,\n fromStyles: fromStyles,\n toState: toState,\n toStyles: toStyles,\n timelines: timelines,\n queriedElements: queriedElements,\n preStyleProps: preStyleProps,\n postStyleProps: postStyleProps,\n totalTime: totalTime,\n errors: errors\n };\n}\n\nvar EMPTY_OBJECT = {};\nvar AnimationTransitionFactory = /** @class */ (function () {\n function AnimationTransitionFactory(_triggerName, ast, _stateStyles) {\n this._triggerName = _triggerName;\n this.ast = ast;\n this._stateStyles = _stateStyles;\n }\n AnimationTransitionFactory.prototype.match = function (currentState, nextState, element, params) {\n return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState, element, params);\n };\n AnimationTransitionFactory.prototype.buildStyles = function (stateName, params, errors) {\n var backupStateStyler = this._stateStyles['*'];\n var stateStyler = this._stateStyles[stateName];\n var backupStyles = backupStateStyler ? backupStateStyler.buildStyles(params, errors) : {};\n return stateStyler ? stateStyler.buildStyles(params, errors) : backupStyles;\n };\n AnimationTransitionFactory.prototype.build = function (driver, element, currentState, nextState, enterClassName, leaveClassName, currentOptions, nextOptions, subInstructions, skipAstBuild) {\n var errors = [];\n var transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT;\n var currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT;\n var currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors);\n var nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT;\n var nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors);\n var queriedElements = new Set();\n var preStyleMap = new Map();\n var postStyleMap = new Map();\n var isRemoval = nextState === 'void';\n var animationOptions = { params: __assign(__assign({}, transitionAnimationParams), nextAnimationParams) };\n var timelines = skipAstBuild ?\n [] :\n buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);\n var totalTime = 0;\n timelines.forEach(function (tl) {\n totalTime = Math.max(tl.duration + tl.delay, totalTime);\n });\n if (errors.length) {\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors);\n }\n timelines.forEach(function (tl) {\n var elm = tl.element;\n var preProps = getOrSetAsInMap(preStyleMap, elm, {});\n tl.preStyleProps.forEach(function (prop) { return preProps[prop] = true; });\n var postProps = getOrSetAsInMap(postStyleMap, elm, {});\n tl.postStyleProps.forEach(function (prop) { return postProps[prop] = true; });\n if (elm !== element) {\n queriedElements.add(elm);\n }\n });\n var queriedElementsList = iteratorToArray(queriedElements.values());\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, timelines, queriedElementsList, preStyleMap, postStyleMap, totalTime);\n };\n return AnimationTransitionFactory;\n}());\nfunction oneOrMoreTransitionsMatch(matchFns, currentState, nextState, element, params) {\n return matchFns.some(function (fn) { return fn(currentState, nextState, element, params); });\n}\nvar AnimationStateStyles = /** @class */ (function () {\n function AnimationStateStyles(styles, defaultParams) {\n this.styles = styles;\n this.defaultParams = defaultParams;\n }\n AnimationStateStyles.prototype.buildStyles = function (params, errors) {\n var finalStyles = {};\n var combinedParams = copyObj(this.defaultParams);\n Object.keys(params).forEach(function (key) {\n var value = params[key];\n if (value != null) {\n combinedParams[key] = value;\n }\n });\n this.styles.styles.forEach(function (value) {\n if (typeof value !== 'string') {\n var styleObj_1 = value;\n Object.keys(styleObj_1).forEach(function (prop) {\n var val = styleObj_1[prop];\n if (val.length > 1) {\n val = interpolateParams(val, combinedParams, errors);\n }\n finalStyles[prop] = val;\n });\n }\n });\n return finalStyles;\n };\n return AnimationStateStyles;\n}());\n\n/**\n * @publicApi\n */\nfunction buildTrigger(name, ast) {\n return new AnimationTrigger(name, ast);\n}\n/**\n * @publicApi\n */\nvar AnimationTrigger = /** @class */ (function () {\n function AnimationTrigger(name, ast) {\n var _this = this;\n this.name = name;\n this.ast = ast;\n this.transitionFactories = [];\n this.states = {};\n ast.states.forEach(function (ast) {\n var defaultParams = (ast.options && ast.options.params) || {};\n _this.states[ast.name] = new AnimationStateStyles(ast.style, defaultParams);\n });\n balanceProperties(this.states, 'true', '1');\n balanceProperties(this.states, 'false', '0');\n ast.transitions.forEach(function (ast) {\n _this.transitionFactories.push(new AnimationTransitionFactory(name, ast, _this.states));\n });\n this.fallbackTransition = createFallbackTransition(name, this.states);\n }\n Object.defineProperty(AnimationTrigger.prototype, \"containsQueries\", {\n get: function () {\n return this.ast.queryCount > 0;\n },\n enumerable: true,\n configurable: true\n });\n AnimationTrigger.prototype.matchTransition = function (currentState, nextState, element, params) {\n var entry = this.transitionFactories.find(function (f) { return f.match(currentState, nextState, element, params); });\n return entry || null;\n };\n AnimationTrigger.prototype.matchStyles = function (currentState, params, errors) {\n return this.fallbackTransition.buildStyles(currentState, params, errors);\n };\n return AnimationTrigger;\n}());\nfunction createFallbackTransition(triggerName, states) {\n var matchers = [function (fromState, toState) { return true; }];\n var animation = { type: 2 /* Sequence */, steps: [], options: null };\n var transition = {\n type: 1 /* Transition */,\n animation: animation,\n matchers: matchers,\n options: null,\n queryCount: 0,\n depCount: 0\n };\n return new AnimationTransitionFactory(triggerName, transition, states);\n}\nfunction balanceProperties(obj, key1, key2) {\n if (obj.hasOwnProperty(key1)) {\n if (!obj.hasOwnProperty(key2)) {\n obj[key2] = obj[key1];\n }\n }\n else if (obj.hasOwnProperty(key2)) {\n obj[key1] = obj[key2];\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 */\nvar EMPTY_INSTRUCTION_MAP = new ElementInstructionMap();\nvar TimelineAnimationEngine = /** @class */ (function () {\n function TimelineAnimationEngine(bodyNode, _driver, _normalizer) {\n this.bodyNode = bodyNode;\n this._driver = _driver;\n this._normalizer = _normalizer;\n this._animations = {};\n this._playersById = {};\n this.players = [];\n }\n TimelineAnimationEngine.prototype.register = function (id, metadata) {\n var errors = [];\n var ast = buildAnimationAst(this._driver, metadata, errors);\n if (errors.length) {\n throw new Error(\"Unable to build the animation due to the following errors: \" + errors.join('\\n'));\n }\n else {\n this._animations[id] = ast;\n }\n };\n TimelineAnimationEngine.prototype._buildPlayer = function (i, preStyles, postStyles) {\n var element = i.element;\n var keyframes = normalizeKeyframes(this._driver, this._normalizer, element, i.keyframes, preStyles, postStyles);\n return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, [], true);\n };\n TimelineAnimationEngine.prototype.create = function (id, element, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n var errors = [];\n var ast = this._animations[id];\n var instructions;\n var autoStylesMap = new Map();\n if (ast) {\n instructions = buildAnimationTimelines(this._driver, element, ast, ENTER_CLASSNAME, LEAVE_CLASSNAME, {}, {}, options, EMPTY_INSTRUCTION_MAP, errors);\n instructions.forEach(function (inst) {\n var styles = getOrSetAsInMap(autoStylesMap, inst.element, {});\n inst.postStyleProps.forEach(function (prop) { return styles[prop] = null; });\n });\n }\n else {\n errors.push('The requested animation doesn\\'t exist or has already been destroyed');\n instructions = [];\n }\n if (errors.length) {\n throw new Error(\"Unable to create the animation due to the following errors: \" + errors.join('\\n'));\n }\n autoStylesMap.forEach(function (styles, element) {\n Object.keys(styles).forEach(function (prop) {\n styles[prop] = _this._driver.computeStyle(element, prop, AUTO_STYLE);\n });\n });\n var players = instructions.map(function (i) {\n var styles = autoStylesMap.get(i.element);\n return _this._buildPlayer(i, {}, styles);\n });\n var player = optimizeGroupPlayer(players);\n this._playersById[id] = player;\n player.onDestroy(function () { return _this.destroy(id); });\n this.players.push(player);\n return player;\n };\n TimelineAnimationEngine.prototype.destroy = function (id) {\n var player = this._getPlayer(id);\n player.destroy();\n delete this._playersById[id];\n var index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n };\n TimelineAnimationEngine.prototype._getPlayer = function (id) {\n var player = this._playersById[id];\n if (!player) {\n throw new Error(\"Unable to find the timeline player referenced by \" + id);\n }\n return player;\n };\n TimelineAnimationEngine.prototype.listen = function (id, element, eventName, callback) {\n // triggerName, fromState, toState are all ignored for timeline animations\n var baseEvent = makeAnimationEvent(element, '', '', '');\n listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback);\n return function () { };\n };\n TimelineAnimationEngine.prototype.command = function (id, element, command, args) {\n if (command == 'register') {\n this.register(id, args[0]);\n return;\n }\n if (command == 'create') {\n var options = (args[0] || {});\n this.create(id, element, options);\n return;\n }\n var player = this._getPlayer(id);\n switch (command) {\n case 'play':\n player.play();\n break;\n case 'pause':\n player.pause();\n break;\n case 'reset':\n player.reset();\n break;\n case 'restart':\n player.restart();\n break;\n case 'finish':\n player.finish();\n break;\n case 'init':\n player.init();\n break;\n case 'setPosition':\n player.setPosition(parseFloat(args[0]));\n break;\n case 'destroy':\n this.destroy(id);\n break;\n }\n };\n return TimelineAnimationEngine;\n}());\n\nvar QUEUED_CLASSNAME = 'ng-animate-queued';\nvar QUEUED_SELECTOR = '.ng-animate-queued';\nvar DISABLED_CLASSNAME = 'ng-animate-disabled';\nvar DISABLED_SELECTOR = '.ng-animate-disabled';\nvar STAR_CLASSNAME = 'ng-star-inserted';\nvar STAR_SELECTOR = '.ng-star-inserted';\nvar EMPTY_PLAYER_ARRAY = [];\nvar NULL_REMOVAL_STATE = {\n namespaceId: '',\n setForRemoval: false,\n setForMove: false,\n hasAnimation: false,\n removedBeforeQueried: false\n};\nvar NULL_REMOVED_QUERIED_STATE = {\n namespaceId: '',\n setForMove: false,\n setForRemoval: false,\n hasAnimation: false,\n removedBeforeQueried: true\n};\nvar REMOVAL_FLAG = '__ng_removed';\nvar StateValue = /** @class */ (function () {\n function StateValue(input, namespaceId) {\n if (namespaceId === void 0) { namespaceId = ''; }\n this.namespaceId = namespaceId;\n var isObj = input && input.hasOwnProperty('value');\n var value = isObj ? input['value'] : input;\n this.value = normalizeTriggerValue(value);\n if (isObj) {\n var options = copyObj(input);\n delete options['value'];\n this.options = options;\n }\n else {\n this.options = {};\n }\n if (!this.options.params) {\n this.options.params = {};\n }\n }\n Object.defineProperty(StateValue.prototype, \"params\", {\n get: function () {\n return this.options.params;\n },\n enumerable: true,\n configurable: true\n });\n StateValue.prototype.absorbOptions = function (options) {\n var newParams = options.params;\n if (newParams) {\n var oldParams_1 = this.options.params;\n Object.keys(newParams).forEach(function (prop) {\n if (oldParams_1[prop] == null) {\n oldParams_1[prop] = newParams[prop];\n }\n });\n }\n };\n return StateValue;\n}());\nvar VOID_VALUE = 'void';\nvar DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE);\nvar AnimationTransitionNamespace = /** @class */ (function () {\n function AnimationTransitionNamespace(id, hostElement, _engine) {\n this.id = id;\n this.hostElement = hostElement;\n this._engine = _engine;\n this.players = [];\n this._triggers = {};\n this._queue = [];\n this._elementListeners = new Map();\n this._hostClassName = 'ng-tns-' + id;\n addClass(hostElement, this._hostClassName);\n }\n AnimationTransitionNamespace.prototype.listen = function (element, name, phase, callback) {\n var _this = this;\n if (!this._triggers.hasOwnProperty(name)) {\n throw new Error(\"Unable to listen on the animation trigger event \\\"\" + phase + \"\\\" because the animation trigger \\\"\" + name + \"\\\" doesn't exist!\");\n }\n if (phase == null || phase.length == 0) {\n throw new Error(\"Unable to listen on the animation trigger \\\"\" + name + \"\\\" because the provided event is undefined!\");\n }\n if (!isTriggerEventValid(phase)) {\n throw new Error(\"The provided animation trigger event \\\"\" + phase + \"\\\" for the animation trigger \\\"\" + name + \"\\\" is not supported!\");\n }\n var listeners = getOrSetAsInMap(this._elementListeners, element, []);\n var data = { name: name, phase: phase, callback: callback };\n listeners.push(data);\n var triggersWithStates = getOrSetAsInMap(this._engine.statesByElement, element, {});\n if (!triggersWithStates.hasOwnProperty(name)) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + name);\n triggersWithStates[name] = DEFAULT_STATE_VALUE;\n }\n return function () {\n // the event listener is removed AFTER the flush has occurred such\n // that leave animations callbacks can fire (otherwise if the node\n // is removed in between then the listeners would be deregistered)\n _this._engine.afterFlush(function () {\n var index = listeners.indexOf(data);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n if (!_this._triggers[name]) {\n delete triggersWithStates[name];\n }\n });\n };\n };\n AnimationTransitionNamespace.prototype.register = function (name, ast) {\n if (this._triggers[name]) {\n // throw\n return false;\n }\n else {\n this._triggers[name] = ast;\n return true;\n }\n };\n AnimationTransitionNamespace.prototype._getTrigger = function (name) {\n var trigger = this._triggers[name];\n if (!trigger) {\n throw new Error(\"The provided animation trigger \\\"\" + name + \"\\\" has not been registered!\");\n }\n return trigger;\n };\n AnimationTransitionNamespace.prototype.trigger = function (element, triggerName, value, defaultToFallback) {\n var _this = this;\n if (defaultToFallback === void 0) { defaultToFallback = true; }\n var trigger = this._getTrigger(triggerName);\n var player = new TransitionAnimationPlayer(this.id, triggerName, element);\n var triggersWithStates = this._engine.statesByElement.get(element);\n if (!triggersWithStates) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName);\n this._engine.statesByElement.set(element, triggersWithStates = {});\n }\n var fromState = triggersWithStates[triggerName];\n var toState = new StateValue(value, this.id);\n var isObj = value && value.hasOwnProperty('value');\n if (!isObj && fromState) {\n toState.absorbOptions(fromState.options);\n }\n triggersWithStates[triggerName] = toState;\n if (!fromState) {\n fromState = DEFAULT_STATE_VALUE;\n }\n var isRemoval = toState.value === VOID_VALUE;\n // normally this isn't reached by here, however, if an object expression\n // is passed in then it may be a new object each time. Comparing the value\n // is important since that will stay the same despite there being a new object.\n // The removal arc here is special cased because the same element is triggered\n // twice in the event that it contains animations on the outer/inner portions\n // of the host container\n if (!isRemoval && fromState.value === toState.value) {\n // this means that despite the value not changing, some inner params\n // have changed which means that the animation final styles need to be applied\n if (!objEquals(fromState.params, toState.params)) {\n var errors = [];\n var fromStyles_1 = trigger.matchStyles(fromState.value, fromState.params, errors);\n var toStyles_1 = trigger.matchStyles(toState.value, toState.params, errors);\n if (errors.length) {\n this._engine.reportError(errors);\n }\n else {\n this._engine.afterFlush(function () {\n eraseStyles(element, fromStyles_1);\n setStyles(element, toStyles_1);\n });\n }\n }\n return;\n }\n var playersOnElement = getOrSetAsInMap(this._engine.playersByElement, element, []);\n playersOnElement.forEach(function (player) {\n // only remove the player if it is queued on the EXACT same trigger/namespace\n // we only also deal with queued players here because if the animation has\n // started then we want to keep the player alive until the flush happens\n // (which is where the previousPlayers are passed into the new palyer)\n if (player.namespaceId == _this.id && player.triggerName == triggerName && player.queued) {\n player.destroy();\n }\n });\n var transition = trigger.matchTransition(fromState.value, toState.value, element, toState.params);\n var isFallbackTransition = false;\n if (!transition) {\n if (!defaultToFallback)\n return;\n transition = trigger.fallbackTransition;\n isFallbackTransition = true;\n }\n this._engine.totalQueuedPlayers++;\n this._queue.push({ element: element, triggerName: triggerName, transition: transition, fromState: fromState, toState: toState, player: player, isFallbackTransition: isFallbackTransition });\n if (!isFallbackTransition) {\n addClass(element, QUEUED_CLASSNAME);\n player.onStart(function () {\n removeClass(element, QUEUED_CLASSNAME);\n });\n }\n player.onDone(function () {\n var index = _this.players.indexOf(player);\n if (index >= 0) {\n _this.players.splice(index, 1);\n }\n var players = _this._engine.playersByElement.get(element);\n if (players) {\n var index_1 = players.indexOf(player);\n if (index_1 >= 0) {\n players.splice(index_1, 1);\n }\n }\n });\n this.players.push(player);\n playersOnElement.push(player);\n return player;\n };\n AnimationTransitionNamespace.prototype.deregister = function (name) {\n var _this = this;\n delete this._triggers[name];\n this._engine.statesByElement.forEach(function (stateMap, element) {\n delete stateMap[name];\n });\n this._elementListeners.forEach(function (listeners, element) {\n _this._elementListeners.set(element, listeners.filter(function (entry) {\n return entry.name != name;\n }));\n });\n };\n AnimationTransitionNamespace.prototype.clearElementCache = function (element) {\n this._engine.statesByElement.delete(element);\n this._elementListeners.delete(element);\n var elementPlayers = this._engine.playersByElement.get(element);\n if (elementPlayers) {\n elementPlayers.forEach(function (player) { return player.destroy(); });\n this._engine.playersByElement.delete(element);\n }\n };\n AnimationTransitionNamespace.prototype._signalRemovalForInnerTriggers = function (rootElement, context) {\n var _this = this;\n var elements = this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true);\n // emulate a leave animation for all inner nodes within this node.\n // If there are no animations found for any of the nodes then clear the cache\n // for the element.\n elements.forEach(function (elm) {\n // this means that an inner remove() operation has already kicked off\n // the animation on this element...\n if (elm[REMOVAL_FLAG])\n return;\n var namespaces = _this._engine.fetchNamespacesByElement(elm);\n if (namespaces.size) {\n namespaces.forEach(function (ns) { return ns.triggerLeaveAnimation(elm, context, false, true); });\n }\n else {\n _this.clearElementCache(elm);\n }\n });\n // If the child elements were removed along with the parent, their animations might not\n // have completed. Clear all the elements from the cache so we don't end up with a memory leak.\n this._engine.afterFlushAnimationsDone(function () { return elements.forEach(function (elm) { return _this.clearElementCache(elm); }); });\n };\n AnimationTransitionNamespace.prototype.triggerLeaveAnimation = function (element, context, destroyAfterComplete, defaultToFallback) {\n var _this = this;\n var triggerStates = this._engine.statesByElement.get(element);\n if (triggerStates) {\n var players_1 = [];\n Object.keys(triggerStates).forEach(function (triggerName) {\n // this check is here in the event that an element is removed\n // twice (both on the host level and the component level)\n if (_this._triggers[triggerName]) {\n var player = _this.trigger(element, triggerName, VOID_VALUE, defaultToFallback);\n if (player) {\n players_1.push(player);\n }\n }\n });\n if (players_1.length) {\n this._engine.markElementAsRemoved(this.id, element, true, context);\n if (destroyAfterComplete) {\n optimizeGroupPlayer(players_1).onDone(function () { return _this._engine.processLeaveNode(element); });\n }\n return true;\n }\n }\n return false;\n };\n AnimationTransitionNamespace.prototype.prepareLeaveAnimationListeners = function (element) {\n var _this = this;\n var listeners = this._elementListeners.get(element);\n if (listeners) {\n var visitedTriggers_1 = new Set();\n listeners.forEach(function (listener) {\n var triggerName = listener.name;\n if (visitedTriggers_1.has(triggerName))\n return;\n visitedTriggers_1.add(triggerName);\n var trigger = _this._triggers[triggerName];\n var transition = trigger.fallbackTransition;\n var elementStates = _this._engine.statesByElement.get(element);\n var fromState = elementStates[triggerName] || DEFAULT_STATE_VALUE;\n var toState = new StateValue(VOID_VALUE);\n var player = new TransitionAnimationPlayer(_this.id, triggerName, element);\n _this._engine.totalQueuedPlayers++;\n _this._queue.push({\n element: element,\n triggerName: triggerName,\n transition: transition,\n fromState: fromState,\n toState: toState,\n player: player,\n isFallbackTransition: true\n });\n });\n }\n };\n AnimationTransitionNamespace.prototype.removeNode = function (element, context) {\n var _this = this;\n var engine = this._engine;\n if (element.childElementCount) {\n this._signalRemovalForInnerTriggers(element, context);\n }\n // this means that a * => VOID animation was detected and kicked off\n if (this.triggerLeaveAnimation(element, context, true))\n return;\n // find the player that is animating and make sure that the\n // removal is delayed until that player has completed\n var containsPotentialParentTransition = false;\n if (engine.totalAnimations) {\n var currentPlayers = engine.players.length ? engine.playersByQueriedElement.get(element) : [];\n // when this `if statement` does not continue forward it means that\n // a previous animation query has selected the current element and\n // is animating it. In this situation want to continue forwards and\n // allow the element to be queued up for animation later.\n if (currentPlayers && currentPlayers.length) {\n containsPotentialParentTransition = true;\n }\n else {\n var parent_1 = element;\n while (parent_1 = parent_1.parentNode) {\n var triggers = engine.statesByElement.get(parent_1);\n if (triggers) {\n containsPotentialParentTransition = true;\n break;\n }\n }\n }\n }\n // at this stage we know that the element will either get removed\n // during flush or will be picked up by a parent query. Either way\n // we need to fire the listeners for this element when it DOES get\n // removed (once the query parent animation is done or after flush)\n this.prepareLeaveAnimationListeners(element);\n // whether or not a parent has an animation we need to delay the deferral of the leave\n // operation until we have more information (which we do after flush() has been called)\n if (containsPotentialParentTransition) {\n engine.markElementAsRemoved(this.id, element, false, context);\n }\n else {\n var removalFlag = element[REMOVAL_FLAG];\n if (!removalFlag || removalFlag === NULL_REMOVAL_STATE) {\n // we do this after the flush has occurred such\n // that the callbacks can be fired\n engine.afterFlush(function () { return _this.clearElementCache(element); });\n engine.destroyInnerAnimations(element);\n engine._onRemovalComplete(element, context);\n }\n }\n };\n AnimationTransitionNamespace.prototype.insertNode = function (element, parent) {\n addClass(element, this._hostClassName);\n };\n AnimationTransitionNamespace.prototype.drainQueuedTransitions = function (microtaskId) {\n var _this = this;\n var instructions = [];\n this._queue.forEach(function (entry) {\n var player = entry.player;\n if (player.destroyed)\n return;\n var element = entry.element;\n var listeners = _this._elementListeners.get(element);\n if (listeners) {\n listeners.forEach(function (listener) {\n if (listener.name == entry.triggerName) {\n var baseEvent = makeAnimationEvent(element, entry.triggerName, entry.fromState.value, entry.toState.value);\n baseEvent['_data'] = microtaskId;\n listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback);\n }\n });\n }\n if (player.markedForDestroy) {\n _this._engine.afterFlush(function () {\n // now we can destroy the element properly since the event listeners have\n // been bound to the player\n player.destroy();\n });\n }\n else {\n instructions.push(entry);\n }\n });\n this._queue = [];\n return instructions.sort(function (a, b) {\n // if depCount == 0 them move to front\n // otherwise if a contains b then move back\n var d0 = a.transition.ast.depCount;\n var d1 = b.transition.ast.depCount;\n if (d0 == 0 || d1 == 0) {\n return d0 - d1;\n }\n return _this._engine.driver.containsElement(a.element, b.element) ? 1 : -1;\n });\n };\n AnimationTransitionNamespace.prototype.destroy = function (context) {\n this.players.forEach(function (p) { return p.destroy(); });\n this._signalRemovalForInnerTriggers(this.hostElement, context);\n };\n AnimationTransitionNamespace.prototype.elementContainsData = function (element) {\n var containsData = false;\n if (this._elementListeners.has(element))\n containsData = true;\n containsData =\n (this._queue.find(function (entry) { return entry.element === element; }) ? true : false) || containsData;\n return containsData;\n };\n return AnimationTransitionNamespace;\n}());\nvar TransitionAnimationEngine = /** @class */ (function () {\n function TransitionAnimationEngine(bodyNode, driver, _normalizer) {\n this.bodyNode = bodyNode;\n this.driver = driver;\n this._normalizer = _normalizer;\n this.players = [];\n this.newHostElements = new Map();\n this.playersByElement = new Map();\n this.playersByQueriedElement = new Map();\n this.statesByElement = new Map();\n this.disabledNodes = new Set();\n this.totalAnimations = 0;\n this.totalQueuedPlayers = 0;\n this._namespaceLookup = {};\n this._namespaceList = [];\n this._flushFns = [];\n this._whenQuietFns = [];\n this.namespacesByHostElement = new Map();\n this.collectedEnterElements = [];\n this.collectedLeaveElements = [];\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = function (element, context) { };\n }\n /** @internal */\n TransitionAnimationEngine.prototype._onRemovalComplete = function (element, context) {\n this.onRemovalComplete(element, context);\n };\n Object.defineProperty(TransitionAnimationEngine.prototype, \"queuedPlayers\", {\n get: function () {\n var players = [];\n this._namespaceList.forEach(function (ns) {\n ns.players.forEach(function (player) {\n if (player.queued) {\n players.push(player);\n }\n });\n });\n return players;\n },\n enumerable: true,\n configurable: true\n });\n TransitionAnimationEngine.prototype.createNamespace = function (namespaceId, hostElement) {\n var ns = new AnimationTransitionNamespace(namespaceId, hostElement, this);\n if (hostElement.parentNode) {\n this._balanceNamespaceList(ns, hostElement);\n }\n else {\n // defer this later until flush during when the host element has\n // been inserted so that we know exactly where to place it in\n // the namespace list\n this.newHostElements.set(hostElement, ns);\n // given that this host element is apart of the animation code, it\n // may or may not be inserted by a parent node that is an of an\n // animation renderer type. If this happens then we can still have\n // access to this item when we query for :enter nodes. If the parent\n // is a renderer then the set data-structure will normalize the entry\n this.collectEnterElement(hostElement);\n }\n return this._namespaceLookup[namespaceId] = ns;\n };\n TransitionAnimationEngine.prototype._balanceNamespaceList = function (ns, hostElement) {\n var limit = this._namespaceList.length - 1;\n if (limit >= 0) {\n var found = false;\n for (var i = limit; i >= 0; i--) {\n var nextNamespace = this._namespaceList[i];\n if (this.driver.containsElement(nextNamespace.hostElement, hostElement)) {\n this._namespaceList.splice(i + 1, 0, ns);\n found = true;\n break;\n }\n }\n if (!found) {\n this._namespaceList.splice(0, 0, ns);\n }\n }\n else {\n this._namespaceList.push(ns);\n }\n this.namespacesByHostElement.set(hostElement, ns);\n return ns;\n };\n TransitionAnimationEngine.prototype.register = function (namespaceId, hostElement) {\n var ns = this._namespaceLookup[namespaceId];\n if (!ns) {\n ns = this.createNamespace(namespaceId, hostElement);\n }\n return ns;\n };\n TransitionAnimationEngine.prototype.registerTrigger = function (namespaceId, name, trigger) {\n var ns = this._namespaceLookup[namespaceId];\n if (ns && ns.register(name, trigger)) {\n this.totalAnimations++;\n }\n };\n TransitionAnimationEngine.prototype.destroy = function (namespaceId, context) {\n var _this = this;\n if (!namespaceId)\n return;\n var ns = this._fetchNamespace(namespaceId);\n this.afterFlush(function () {\n _this.namespacesByHostElement.delete(ns.hostElement);\n delete _this._namespaceLookup[namespaceId];\n var index = _this._namespaceList.indexOf(ns);\n if (index >= 0) {\n _this._namespaceList.splice(index, 1);\n }\n });\n this.afterFlushAnimationsDone(function () { return ns.destroy(context); });\n };\n TransitionAnimationEngine.prototype._fetchNamespace = function (id) {\n return this._namespaceLookup[id];\n };\n TransitionAnimationEngine.prototype.fetchNamespacesByElement = function (element) {\n // normally there should only be one namespace per element, however\n // if @triggers are placed on both the component element and then\n // its host element (within the component code) then there will be\n // two namespaces returned. We use a set here to simply the dedupe\n // of namespaces incase there are multiple triggers both the elm and host\n var namespaces = new Set();\n var elementStates = this.statesByElement.get(element);\n if (elementStates) {\n var keys = Object.keys(elementStates);\n for (var i = 0; i < keys.length; i++) {\n var nsId = elementStates[keys[i]].namespaceId;\n if (nsId) {\n var ns = this._fetchNamespace(nsId);\n if (ns) {\n namespaces.add(ns);\n }\n }\n }\n }\n return namespaces;\n };\n TransitionAnimationEngine.prototype.trigger = function (namespaceId, element, name, value) {\n if (isElementNode(element)) {\n var ns = this._fetchNamespace(namespaceId);\n if (ns) {\n ns.trigger(element, name, value);\n return true;\n }\n }\n return false;\n };\n TransitionAnimationEngine.prototype.insertNode = function (namespaceId, element, parent, insertBefore) {\n if (!isElementNode(element))\n return;\n // special case for when an element is removed and reinserted (move operation)\n // when this occurs we do not want to use the element for deletion later\n var details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n details.setForRemoval = false;\n details.setForMove = true;\n var index = this.collectedLeaveElements.indexOf(element);\n if (index >= 0) {\n this.collectedLeaveElements.splice(index, 1);\n }\n }\n // in the event that the namespaceId is blank then the caller\n // code does not contain any animation code in it, but it is\n // just being called so that the node is marked as being inserted\n if (namespaceId) {\n var ns = this._fetchNamespace(namespaceId);\n // This if-statement is a workaround for router issue #21947.\n // The router sometimes hits a race condition where while a route\n // is being instantiated a new navigation arrives, triggering leave\n // animation of DOM that has not been fully initialized, until this\n // is resolved, we need to handle the scenario when DOM is not in a\n // consistent state during the animation.\n if (ns) {\n ns.insertNode(element, parent);\n }\n }\n // only *directives and host elements are inserted before\n if (insertBefore) {\n this.collectEnterElement(element);\n }\n };\n TransitionAnimationEngine.prototype.collectEnterElement = function (element) {\n this.collectedEnterElements.push(element);\n };\n TransitionAnimationEngine.prototype.markElementAsDisabled = function (element, value) {\n if (value) {\n if (!this.disabledNodes.has(element)) {\n this.disabledNodes.add(element);\n addClass(element, DISABLED_CLASSNAME);\n }\n }\n else if (this.disabledNodes.has(element)) {\n this.disabledNodes.delete(element);\n removeClass(element, DISABLED_CLASSNAME);\n }\n };\n TransitionAnimationEngine.prototype.removeNode = function (namespaceId, element, isHostElement, context) {\n if (isElementNode(element)) {\n var ns = namespaceId ? this._fetchNamespace(namespaceId) : null;\n if (ns) {\n ns.removeNode(element, context);\n }\n else {\n this.markElementAsRemoved(namespaceId, element, false, context);\n }\n if (isHostElement) {\n var hostNS = this.namespacesByHostElement.get(element);\n if (hostNS && hostNS.id !== namespaceId) {\n hostNS.removeNode(element, context);\n }\n }\n }\n else {\n this._onRemovalComplete(element, context);\n }\n };\n TransitionAnimationEngine.prototype.markElementAsRemoved = function (namespaceId, element, hasAnimation, context) {\n this.collectedLeaveElements.push(element);\n element[REMOVAL_FLAG] =\n { namespaceId: namespaceId, setForRemoval: context, hasAnimation: hasAnimation, removedBeforeQueried: false };\n };\n TransitionAnimationEngine.prototype.listen = function (namespaceId, element, name, phase, callback) {\n if (isElementNode(element)) {\n return this._fetchNamespace(namespaceId).listen(element, name, phase, callback);\n }\n return function () { };\n };\n TransitionAnimationEngine.prototype._buildInstruction = function (entry, subTimelines, enterClassName, leaveClassName, skipBuildAst) {\n return entry.transition.build(this.driver, entry.element, entry.fromState.value, entry.toState.value, enterClassName, leaveClassName, entry.fromState.options, entry.toState.options, subTimelines, skipBuildAst);\n };\n TransitionAnimationEngine.prototype.destroyInnerAnimations = function (containerElement) {\n var _this = this;\n var elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true);\n elements.forEach(function (element) { return _this.destroyActiveAnimationsForElement(element); });\n if (this.playersByQueriedElement.size == 0)\n return;\n elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true);\n elements.forEach(function (element) { return _this.finishActiveQueriedAnimationOnElement(element); });\n };\n TransitionAnimationEngine.prototype.destroyActiveAnimationsForElement = function (element) {\n var players = this.playersByElement.get(element);\n if (players) {\n players.forEach(function (player) {\n // special case for when an element is set for destruction, but hasn't started.\n // in this situation we want to delay the destruction until the flush occurs\n // so that any event listeners attached to the player are triggered.\n if (player.queued) {\n player.markedForDestroy = true;\n }\n else {\n player.destroy();\n }\n });\n }\n };\n TransitionAnimationEngine.prototype.finishActiveQueriedAnimationOnElement = function (element) {\n var players = this.playersByQueriedElement.get(element);\n if (players) {\n players.forEach(function (player) { return player.finish(); });\n }\n };\n TransitionAnimationEngine.prototype.whenRenderingDone = function () {\n var _this = this;\n return new Promise(function (resolve) {\n if (_this.players.length) {\n return optimizeGroupPlayer(_this.players).onDone(function () { return resolve(); });\n }\n else {\n resolve();\n }\n });\n };\n TransitionAnimationEngine.prototype.processLeaveNode = function (element) {\n var _this = this;\n var details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n // this will prevent it from removing it twice\n element[REMOVAL_FLAG] = NULL_REMOVAL_STATE;\n if (details.namespaceId) {\n this.destroyInnerAnimations(element);\n var ns = this._fetchNamespace(details.namespaceId);\n if (ns) {\n ns.clearElementCache(element);\n }\n }\n this._onRemovalComplete(element, details.setForRemoval);\n }\n if (this.driver.matchesElement(element, DISABLED_SELECTOR)) {\n this.markElementAsDisabled(element, false);\n }\n this.driver.query(element, DISABLED_SELECTOR, true).forEach(function (node) {\n _this.markElementAsDisabled(node, false);\n });\n };\n TransitionAnimationEngine.prototype.flush = function (microtaskId) {\n var _this = this;\n if (microtaskId === void 0) { microtaskId = -1; }\n var players = [];\n if (this.newHostElements.size) {\n this.newHostElements.forEach(function (ns, element) { return _this._balanceNamespaceList(ns, element); });\n this.newHostElements.clear();\n }\n if (this.totalAnimations && this.collectedEnterElements.length) {\n for (var i = 0; i < this.collectedEnterElements.length; i++) {\n var elm = this.collectedEnterElements[i];\n addClass(elm, STAR_CLASSNAME);\n }\n }\n if (this._namespaceList.length &&\n (this.totalQueuedPlayers || this.collectedLeaveElements.length)) {\n var cleanupFns = [];\n try {\n players = this._flushAnimations(cleanupFns, microtaskId);\n }\n finally {\n for (var i = 0; i < cleanupFns.length; i++) {\n cleanupFns[i]();\n }\n }\n }\n else {\n for (var i = 0; i < this.collectedLeaveElements.length; i++) {\n var element = this.collectedLeaveElements[i];\n this.processLeaveNode(element);\n }\n }\n this.totalQueuedPlayers = 0;\n this.collectedEnterElements.length = 0;\n this.collectedLeaveElements.length = 0;\n this._flushFns.forEach(function (fn) { return fn(); });\n this._flushFns = [];\n if (this._whenQuietFns.length) {\n // we move these over to a variable so that\n // if any new callbacks are registered in another\n // flush they do not populate the existing set\n var quietFns_1 = this._whenQuietFns;\n this._whenQuietFns = [];\n if (players.length) {\n optimizeGroupPlayer(players).onDone(function () {\n quietFns_1.forEach(function (fn) { return fn(); });\n });\n }\n else {\n quietFns_1.forEach(function (fn) { return fn(); });\n }\n }\n };\n TransitionAnimationEngine.prototype.reportError = function (errors) {\n throw new Error(\"Unable to process animations due to the following failed trigger transitions\\n \" + errors.join('\\n'));\n };\n TransitionAnimationEngine.prototype._flushAnimations = function (cleanupFns, microtaskId) {\n var _this = this;\n var subTimelines = new ElementInstructionMap();\n var skippedPlayers = [];\n var skippedPlayersMap = new Map();\n var queuedInstructions = [];\n var queriedElements = new Map();\n var allPreStyleElements = new Map();\n var allPostStyleElements = new Map();\n var disabledElementsSet = new Set();\n this.disabledNodes.forEach(function (node) {\n disabledElementsSet.add(node);\n var nodesThatAreDisabled = _this.driver.query(node, QUEUED_SELECTOR, true);\n for (var i_1 = 0; i_1 < nodesThatAreDisabled.length; i_1++) {\n disabledElementsSet.add(nodesThatAreDisabled[i_1]);\n }\n });\n var bodyNode = this.bodyNode;\n var allTriggerElements = Array.from(this.statesByElement.keys());\n var enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements);\n // this must occur before the instructions are built below such that\n // the :enter queries match the elements (since the timeline queries\n // are fired during instruction building).\n var enterNodeMapIds = new Map();\n var i = 0;\n enterNodeMap.forEach(function (nodes, root) {\n var className = ENTER_CLASSNAME + i++;\n enterNodeMapIds.set(root, className);\n nodes.forEach(function (node) { return addClass(node, className); });\n });\n var allLeaveNodes = [];\n var mergedLeaveNodes = new Set();\n var leaveNodesWithoutAnimations = new Set();\n for (var i_2 = 0; i_2 < this.collectedLeaveElements.length; i_2++) {\n var element = this.collectedLeaveElements[i_2];\n var details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n allLeaveNodes.push(element);\n mergedLeaveNodes.add(element);\n if (details.hasAnimation) {\n this.driver.query(element, STAR_SELECTOR, true).forEach(function (elm) { return mergedLeaveNodes.add(elm); });\n }\n else {\n leaveNodesWithoutAnimations.add(element);\n }\n }\n }\n var leaveNodeMapIds = new Map();\n var leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes));\n leaveNodeMap.forEach(function (nodes, root) {\n var className = LEAVE_CLASSNAME + i++;\n leaveNodeMapIds.set(root, className);\n nodes.forEach(function (node) { return addClass(node, className); });\n });\n cleanupFns.push(function () {\n enterNodeMap.forEach(function (nodes, root) {\n var className = enterNodeMapIds.get(root);\n nodes.forEach(function (node) { return removeClass(node, className); });\n });\n leaveNodeMap.forEach(function (nodes, root) {\n var className = leaveNodeMapIds.get(root);\n nodes.forEach(function (node) { return removeClass(node, className); });\n });\n allLeaveNodes.forEach(function (element) {\n _this.processLeaveNode(element);\n });\n });\n var allPlayers = [];\n var erroneousTransitions = [];\n for (var i_3 = this._namespaceList.length - 1; i_3 >= 0; i_3--) {\n var ns = this._namespaceList[i_3];\n ns.drainQueuedTransitions(microtaskId).forEach(function (entry) {\n var player = entry.player;\n var element = entry.element;\n allPlayers.push(player);\n if (_this.collectedEnterElements.length) {\n var details = element[REMOVAL_FLAG];\n // move animations are currently not supported...\n if (details && details.setForMove) {\n player.destroy();\n return;\n }\n }\n var nodeIsOrphaned = !bodyNode || !_this.driver.containsElement(bodyNode, element);\n var leaveClassName = leaveNodeMapIds.get(element);\n var enterClassName = enterNodeMapIds.get(element);\n var instruction = _this._buildInstruction(entry, subTimelines, enterClassName, leaveClassName, nodeIsOrphaned);\n if (instruction.errors && instruction.errors.length) {\n erroneousTransitions.push(instruction);\n return;\n }\n // even though the element may not be apart of the DOM, it may\n // still be added at a later point (due to the mechanics of content\n // projection and/or dynamic component insertion) therefore it's\n // important we still style the element.\n if (nodeIsOrphaned) {\n player.onStart(function () { return eraseStyles(element, instruction.fromStyles); });\n player.onDestroy(function () { return setStyles(element, instruction.toStyles); });\n skippedPlayers.push(player);\n return;\n }\n // if a unmatched transition is queued to go then it SHOULD NOT render\n // an animation and cancel the previously running animations.\n if (entry.isFallbackTransition) {\n player.onStart(function () { return eraseStyles(element, instruction.fromStyles); });\n player.onDestroy(function () { return setStyles(element, instruction.toStyles); });\n skippedPlayers.push(player);\n return;\n }\n // this means that if a parent animation uses this animation as a sub trigger\n // then it will instruct the timeline builder to not add a player delay, but\n // instead stretch the first keyframe gap up until the animation starts. The\n // reason this is important is to prevent extra initialization styles from being\n // required by the user in the animation.\n instruction.timelines.forEach(function (tl) { return tl.stretchStartingKeyframe = true; });\n subTimelines.append(element, instruction.timelines);\n var tuple = { instruction: instruction, player: player, element: element };\n queuedInstructions.push(tuple);\n instruction.queriedElements.forEach(function (element) { return getOrSetAsInMap(queriedElements, element, []).push(player); });\n instruction.preStyleProps.forEach(function (stringMap, element) {\n var props = Object.keys(stringMap);\n if (props.length) {\n var setVal_1 = allPreStyleElements.get(element);\n if (!setVal_1) {\n allPreStyleElements.set(element, setVal_1 = new Set());\n }\n props.forEach(function (prop) { return setVal_1.add(prop); });\n }\n });\n instruction.postStyleProps.forEach(function (stringMap, element) {\n var props = Object.keys(stringMap);\n var setVal = allPostStyleElements.get(element);\n if (!setVal) {\n allPostStyleElements.set(element, setVal = new Set());\n }\n props.forEach(function (prop) { return setVal.add(prop); });\n });\n });\n }\n if (erroneousTransitions.length) {\n var errors_1 = [];\n erroneousTransitions.forEach(function (instruction) {\n errors_1.push(\"@\" + instruction.triggerName + \" has failed due to:\\n\");\n instruction.errors.forEach(function (error) { return errors_1.push(\"- \" + error + \"\\n\"); });\n });\n allPlayers.forEach(function (player) { return player.destroy(); });\n this.reportError(errors_1);\n }\n var allPreviousPlayersMap = new Map();\n // this map works to tell which element in the DOM tree is contained by\n // which animation. Further down below this map will get populated once\n // the players are built and in doing so it can efficiently figure out\n // if a sub player is skipped due to a parent player having priority.\n var animationElementMap = new Map();\n queuedInstructions.forEach(function (entry) {\n var element = entry.element;\n if (subTimelines.has(element)) {\n animationElementMap.set(element, element);\n _this._beforeAnimationBuild(entry.player.namespaceId, entry.instruction, allPreviousPlayersMap);\n }\n });\n skippedPlayers.forEach(function (player) {\n var element = player.element;\n var previousPlayers = _this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null);\n previousPlayers.forEach(function (prevPlayer) {\n getOrSetAsInMap(allPreviousPlayersMap, element, []).push(prevPlayer);\n prevPlayer.destroy();\n });\n });\n // this is a special case for nodes that will be removed (either by)\n // having their own leave animations or by being queried in a container\n // that will be removed once a parent animation is complete. The idea\n // here is that * styles must be identical to ! styles because of\n // backwards compatibility (* is also filled in by default in many places).\n // Otherwise * styles will return an empty value or auto since the element\n // that is being getComputedStyle'd will not be visible (since * = destination)\n var replaceNodes = allLeaveNodes.filter(function (node) {\n return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);\n });\n // POST STAGE: fill the * styles\n var postStylesMap = new Map();\n var allLeaveQueriedNodes = cloakAndComputeStyles(postStylesMap, this.driver, leaveNodesWithoutAnimations, allPostStyleElements, AUTO_STYLE);\n allLeaveQueriedNodes.forEach(function (node) {\n if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) {\n replaceNodes.push(node);\n }\n });\n // PRE STAGE: fill the ! styles\n var preStylesMap = new Map();\n enterNodeMap.forEach(function (nodes, root) {\n cloakAndComputeStyles(preStylesMap, _this.driver, new Set(nodes), allPreStyleElements, ɵPRE_STYLE);\n });\n replaceNodes.forEach(function (node) {\n var post = postStylesMap.get(node);\n var pre = preStylesMap.get(node);\n postStylesMap.set(node, __assign(__assign({}, post), pre));\n });\n var rootPlayers = [];\n var subPlayers = [];\n var NO_PARENT_ANIMATION_ELEMENT_DETECTED = {};\n queuedInstructions.forEach(function (entry) {\n var element = entry.element, player = entry.player, instruction = entry.instruction;\n // this means that it was never consumed by a parent animation which\n // means that it is independent and therefore should be set for animation\n if (subTimelines.has(element)) {\n if (disabledElementsSet.has(element)) {\n player.onDestroy(function () { return setStyles(element, instruction.toStyles); });\n player.disabled = true;\n player.overrideTotalTime(instruction.totalTime);\n skippedPlayers.push(player);\n return;\n }\n // this will flow up the DOM and query the map to figure out\n // if a parent animation has priority over it. In the situation\n // that a parent is detected then it will cancel the loop. If\n // nothing is detected, or it takes a few hops to find a parent,\n // then it will fill in the missing nodes and signal them as having\n // a detected parent (or a NO_PARENT value via a special constant).\n var parentWithAnimation_1 = NO_PARENT_ANIMATION_ELEMENT_DETECTED;\n if (animationElementMap.size > 1) {\n var elm = element;\n var parentsToAdd = [];\n while (elm = elm.parentNode) {\n var detectedParent = animationElementMap.get(elm);\n if (detectedParent) {\n parentWithAnimation_1 = detectedParent;\n break;\n }\n parentsToAdd.push(elm);\n }\n parentsToAdd.forEach(function (parent) { return animationElementMap.set(parent, parentWithAnimation_1); });\n }\n var innerPlayer = _this._buildAnimation(player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap);\n player.setRealPlayer(innerPlayer);\n if (parentWithAnimation_1 === NO_PARENT_ANIMATION_ELEMENT_DETECTED) {\n rootPlayers.push(player);\n }\n else {\n var parentPlayers = _this.playersByElement.get(parentWithAnimation_1);\n if (parentPlayers && parentPlayers.length) {\n player.parentPlayer = optimizeGroupPlayer(parentPlayers);\n }\n skippedPlayers.push(player);\n }\n }\n else {\n eraseStyles(element, instruction.fromStyles);\n player.onDestroy(function () { return setStyles(element, instruction.toStyles); });\n // there still might be a ancestor player animating this\n // element therefore we will still add it as a sub player\n // even if its animation may be disabled\n subPlayers.push(player);\n if (disabledElementsSet.has(element)) {\n skippedPlayers.push(player);\n }\n }\n });\n // find all of the sub players' corresponding inner animation player\n subPlayers.forEach(function (player) {\n // even if any players are not found for a sub animation then it\n // will still complete itself after the next tick since it's Noop\n var playersForElement = skippedPlayersMap.get(player.element);\n if (playersForElement && playersForElement.length) {\n var innerPlayer = optimizeGroupPlayer(playersForElement);\n player.setRealPlayer(innerPlayer);\n }\n });\n // the reason why we don't actually play the animation is\n // because all that a skipped player is designed to do is to\n // fire the start/done transition callback events\n skippedPlayers.forEach(function (player) {\n if (player.parentPlayer) {\n player.syncPlayerEvents(player.parentPlayer);\n }\n else {\n player.destroy();\n }\n });\n // run through all of the queued removals and see if they\n // were picked up by a query. If not then perform the removal\n // operation right away unless a parent animation is ongoing.\n for (var i_4 = 0; i_4 < allLeaveNodes.length; i_4++) {\n var element = allLeaveNodes[i_4];\n var details = element[REMOVAL_FLAG];\n removeClass(element, LEAVE_CLASSNAME);\n // this means the element has a removal animation that is being\n // taken care of and therefore the inner elements will hang around\n // until that animation is over (or the parent queried animation)\n if (details && details.hasAnimation)\n continue;\n var players = [];\n // if this element is queried or if it contains queried children\n // then we want for the element not to be removed from the page\n // until the queried animations have finished\n if (queriedElements.size) {\n var queriedPlayerResults = queriedElements.get(element);\n if (queriedPlayerResults && queriedPlayerResults.length) {\n players.push.apply(players, __spread(queriedPlayerResults));\n }\n var queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true);\n for (var j = 0; j < queriedInnerElements.length; j++) {\n var queriedPlayers = queriedElements.get(queriedInnerElements[j]);\n if (queriedPlayers && queriedPlayers.length) {\n players.push.apply(players, __spread(queriedPlayers));\n }\n }\n }\n var activePlayers = players.filter(function (p) { return !p.destroyed; });\n if (activePlayers.length) {\n removeNodesAfterAnimationDone(this, element, activePlayers);\n }\n else {\n this.processLeaveNode(element);\n }\n }\n // this is required so the cleanup method doesn't remove them\n allLeaveNodes.length = 0;\n rootPlayers.forEach(function (player) {\n _this.players.push(player);\n player.onDone(function () {\n player.destroy();\n var index = _this.players.indexOf(player);\n _this.players.splice(index, 1);\n });\n player.play();\n });\n return rootPlayers;\n };\n TransitionAnimationEngine.prototype.elementContainsData = function (namespaceId, element) {\n var containsData = false;\n var details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval)\n containsData = true;\n if (this.playersByElement.has(element))\n containsData = true;\n if (this.playersByQueriedElement.has(element))\n containsData = true;\n if (this.statesByElement.has(element))\n containsData = true;\n return this._fetchNamespace(namespaceId).elementContainsData(element) || containsData;\n };\n TransitionAnimationEngine.prototype.afterFlush = function (callback) {\n this._flushFns.push(callback);\n };\n TransitionAnimationEngine.prototype.afterFlushAnimationsDone = function (callback) {\n this._whenQuietFns.push(callback);\n };\n TransitionAnimationEngine.prototype._getPreviousPlayers = function (element, isQueriedElement, namespaceId, triggerName, toStateValue) {\n var players = [];\n if (isQueriedElement) {\n var queriedElementPlayers = this.playersByQueriedElement.get(element);\n if (queriedElementPlayers) {\n players = queriedElementPlayers;\n }\n }\n else {\n var elementPlayers = this.playersByElement.get(element);\n if (elementPlayers) {\n var isRemovalAnimation_1 = !toStateValue || toStateValue == VOID_VALUE;\n elementPlayers.forEach(function (player) {\n if (player.queued)\n return;\n if (!isRemovalAnimation_1 && player.triggerName != triggerName)\n return;\n players.push(player);\n });\n }\n }\n if (namespaceId || triggerName) {\n players = players.filter(function (player) {\n if (namespaceId && namespaceId != player.namespaceId)\n return false;\n if (triggerName && triggerName != player.triggerName)\n return false;\n return true;\n });\n }\n return players;\n };\n TransitionAnimationEngine.prototype._beforeAnimationBuild = function (namespaceId, instruction, allPreviousPlayersMap) {\n var e_1, _a;\n var triggerName = instruction.triggerName;\n var rootElement = instruction.element;\n // when a removal animation occurs, ALL previous players are collected\n // and destroyed (even if they are outside of the current namespace)\n var targetNameSpaceId = instruction.isRemovalTransition ? undefined : namespaceId;\n var targetTriggerName = instruction.isRemovalTransition ? undefined : triggerName;\n var _loop_1 = function (timelineInstruction) {\n var element = timelineInstruction.element;\n var isQueriedElement = element !== rootElement;\n var players = getOrSetAsInMap(allPreviousPlayersMap, element, []);\n var previousPlayers = this_1._getPreviousPlayers(element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState);\n previousPlayers.forEach(function (player) {\n var realPlayer = player.getRealPlayer();\n if (realPlayer.beforeDestroy) {\n realPlayer.beforeDestroy();\n }\n player.destroy();\n players.push(player);\n });\n };\n var this_1 = this;\n try {\n for (var _b = __values(instruction.timelines), _c = _b.next(); !_c.done; _c = _b.next()) {\n var timelineInstruction = _c.value;\n _loop_1(timelineInstruction);\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 // this needs to be done so that the PRE/POST styles can be\n // computed properly without interfering with the previous animation\n eraseStyles(rootElement, instruction.fromStyles);\n };\n TransitionAnimationEngine.prototype._buildAnimation = function (namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap) {\n var _this = this;\n var triggerName = instruction.triggerName;\n var rootElement = instruction.element;\n // we first run this so that the previous animation player\n // data can be passed into the successive animation players\n var allQueriedPlayers = [];\n var allConsumedElements = new Set();\n var allSubElements = new Set();\n var allNewPlayers = instruction.timelines.map(function (timelineInstruction) {\n var element = timelineInstruction.element;\n allConsumedElements.add(element);\n // FIXME (matsko): make sure to-be-removed animations are removed properly\n var details = element[REMOVAL_FLAG];\n if (details && details.removedBeforeQueried)\n return new NoopAnimationPlayer(timelineInstruction.duration, timelineInstruction.delay);\n var isQueriedElement = element !== rootElement;\n var previousPlayers = flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY)\n .map(function (p) { return p.getRealPlayer(); }))\n .filter(function (p) {\n // the `element` is not apart of the AnimationPlayer definition, but\n // Mock/WebAnimations\n // use the element within their implementation. This will be added in Angular5 to\n // AnimationPlayer\n var pp = p;\n return pp.element ? pp.element === element : false;\n });\n var preStyles = preStylesMap.get(element);\n var postStyles = postStylesMap.get(element);\n var keyframes = normalizeKeyframes(_this.driver, _this._normalizer, element, timelineInstruction.keyframes, preStyles, postStyles);\n var player = _this._buildPlayer(timelineInstruction, keyframes, previousPlayers);\n // this means that this particular player belongs to a sub trigger. It is\n // important that we match this player up with the corresponding (@trigger.listener)\n if (timelineInstruction.subTimeline && skippedPlayersMap) {\n allSubElements.add(element);\n }\n if (isQueriedElement) {\n var wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element);\n wrappedPlayer.setRealPlayer(player);\n allQueriedPlayers.push(wrappedPlayer);\n }\n return player;\n });\n allQueriedPlayers.forEach(function (player) {\n getOrSetAsInMap(_this.playersByQueriedElement, player.element, []).push(player);\n player.onDone(function () { return deleteOrUnsetInMap(_this.playersByQueriedElement, player.element, player); });\n });\n allConsumedElements.forEach(function (element) { return addClass(element, NG_ANIMATING_CLASSNAME); });\n var player = optimizeGroupPlayer(allNewPlayers);\n player.onDestroy(function () {\n allConsumedElements.forEach(function (element) { return removeClass(element, NG_ANIMATING_CLASSNAME); });\n setStyles(rootElement, instruction.toStyles);\n });\n // this basically makes all of the callbacks for sub element animations\n // be dependent on the upper players for when they finish\n allSubElements.forEach(function (element) {\n getOrSetAsInMap(skippedPlayersMap, element, []).push(player);\n });\n return player;\n };\n TransitionAnimationEngine.prototype._buildPlayer = function (instruction, keyframes, previousPlayers) {\n if (keyframes.length > 0) {\n return this.driver.animate(instruction.element, keyframes, instruction.duration, instruction.delay, instruction.easing, previousPlayers);\n }\n // special case for when an empty transition|definition is provided\n // ... there is no point in rendering an empty animation\n return new NoopAnimationPlayer(instruction.duration, instruction.delay);\n };\n return TransitionAnimationEngine;\n}());\nvar TransitionAnimationPlayer = /** @class */ (function () {\n function TransitionAnimationPlayer(namespaceId, triggerName, element) {\n this.namespaceId = namespaceId;\n this.triggerName = triggerName;\n this.element = element;\n this._player = new NoopAnimationPlayer();\n this._containsRealPlayer = false;\n this._queuedCallbacks = {};\n this.destroyed = false;\n this.markedForDestroy = false;\n this.disabled = false;\n this.queued = true;\n this.totalTime = 0;\n }\n TransitionAnimationPlayer.prototype.setRealPlayer = function (player) {\n var _this = this;\n if (this._containsRealPlayer)\n return;\n this._player = player;\n Object.keys(this._queuedCallbacks).forEach(function (phase) {\n _this._queuedCallbacks[phase].forEach(function (callback) { return listenOnPlayer(player, phase, undefined, callback); });\n });\n this._queuedCallbacks = {};\n this._containsRealPlayer = true;\n this.overrideTotalTime(player.totalTime);\n this.queued = false;\n };\n TransitionAnimationPlayer.prototype.getRealPlayer = function () {\n return this._player;\n };\n TransitionAnimationPlayer.prototype.overrideTotalTime = function (totalTime) {\n this.totalTime = totalTime;\n };\n TransitionAnimationPlayer.prototype.syncPlayerEvents = function (player) {\n var _this = this;\n var p = this._player;\n if (p.triggerCallback) {\n player.onStart(function () { return p.triggerCallback('start'); });\n }\n player.onDone(function () { return _this.finish(); });\n player.onDestroy(function () { return _this.destroy(); });\n };\n TransitionAnimationPlayer.prototype._queueEvent = function (name, callback) {\n getOrSetAsInMap(this._queuedCallbacks, name, []).push(callback);\n };\n TransitionAnimationPlayer.prototype.onDone = function (fn) {\n if (this.queued) {\n this._queueEvent('done', fn);\n }\n this._player.onDone(fn);\n };\n TransitionAnimationPlayer.prototype.onStart = function (fn) {\n if (this.queued) {\n this._queueEvent('start', fn);\n }\n this._player.onStart(fn);\n };\n TransitionAnimationPlayer.prototype.onDestroy = function (fn) {\n if (this.queued) {\n this._queueEvent('destroy', fn);\n }\n this._player.onDestroy(fn);\n };\n TransitionAnimationPlayer.prototype.init = function () {\n this._player.init();\n };\n TransitionAnimationPlayer.prototype.hasStarted = function () {\n return this.queued ? false : this._player.hasStarted();\n };\n TransitionAnimationPlayer.prototype.play = function () {\n !this.queued && this._player.play();\n };\n TransitionAnimationPlayer.prototype.pause = function () {\n !this.queued && this._player.pause();\n };\n TransitionAnimationPlayer.prototype.restart = function () {\n !this.queued && this._player.restart();\n };\n TransitionAnimationPlayer.prototype.finish = function () {\n this._player.finish();\n };\n TransitionAnimationPlayer.prototype.destroy = function () {\n this.destroyed = true;\n this._player.destroy();\n };\n TransitionAnimationPlayer.prototype.reset = function () {\n !this.queued && this._player.reset();\n };\n TransitionAnimationPlayer.prototype.setPosition = function (p) {\n if (!this.queued) {\n this._player.setPosition(p);\n }\n };\n TransitionAnimationPlayer.prototype.getPosition = function () {\n return this.queued ? 0 : this._player.getPosition();\n };\n /** @internal */\n TransitionAnimationPlayer.prototype.triggerCallback = function (phaseName) {\n var p = this._player;\n if (p.triggerCallback) {\n p.triggerCallback(phaseName);\n }\n };\n return TransitionAnimationPlayer;\n}());\nfunction deleteOrUnsetInMap(map, key, value) {\n var currentValues;\n if (map instanceof Map) {\n currentValues = map.get(key);\n if (currentValues) {\n if (currentValues.length) {\n var index = currentValues.indexOf(value);\n currentValues.splice(index, 1);\n }\n if (currentValues.length == 0) {\n map.delete(key);\n }\n }\n }\n else {\n currentValues = map[key];\n if (currentValues) {\n if (currentValues.length) {\n var index = currentValues.indexOf(value);\n currentValues.splice(index, 1);\n }\n if (currentValues.length == 0) {\n delete map[key];\n }\n }\n }\n return currentValues;\n}\nfunction normalizeTriggerValue(value) {\n // we use `!= null` here because it's the most simple\n // way to test against a \"falsy\" value without mixing\n // in empty strings or a zero value. DO NOT OPTIMIZE.\n return value != null ? value : null;\n}\nfunction isElementNode(node) {\n return node && node['nodeType'] === 1;\n}\nfunction isTriggerEventValid(eventName) {\n return eventName == 'start' || eventName == 'done';\n}\nfunction cloakElement(element, value) {\n var oldValue = element.style.display;\n element.style.display = value != null ? value : 'none';\n return oldValue;\n}\nfunction cloakAndComputeStyles(valuesMap, driver, elements, elementPropsMap, defaultStyle) {\n var cloakVals = [];\n elements.forEach(function (element) { return cloakVals.push(cloakElement(element)); });\n var failedElements = [];\n elementPropsMap.forEach(function (props, element) {\n var styles = {};\n props.forEach(function (prop) {\n var value = styles[prop] = driver.computeStyle(element, prop, defaultStyle);\n // there is no easy way to detect this because a sub element could be removed\n // by a parent animation element being detached.\n if (!value || value.length == 0) {\n element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;\n failedElements.push(element);\n }\n });\n valuesMap.set(element, styles);\n });\n // we use a index variable here since Set.forEach(a, i) does not return\n // an index value for the closure (but instead just the value)\n var i = 0;\n elements.forEach(function (element) { return cloakElement(element, cloakVals[i++]); });\n return failedElements;\n}\n/*\nSince the Angular renderer code will return a collection of inserted\nnodes in all areas of a DOM tree, it's up to this algorithm to figure\nout which nodes are roots for each animation @trigger.\n\nBy placing each inserted node into a Set and traversing upwards, it\nis possible to find the @trigger elements and well any direct *star\ninsertion nodes, if a @trigger root is found then the enter element\nis placed into the Map[@trigger] spot.\n */\nfunction buildRootMap(roots, nodes) {\n var rootMap = new Map();\n roots.forEach(function (root) { return rootMap.set(root, []); });\n if (nodes.length == 0)\n return rootMap;\n var NULL_NODE = 1;\n var nodeSet = new Set(nodes);\n var localRootMap = new Map();\n function getRoot(node) {\n if (!node)\n return NULL_NODE;\n var root = localRootMap.get(node);\n if (root)\n return root;\n var parent = node.parentNode;\n if (rootMap.has(parent)) { // ngIf inside @trigger\n root = parent;\n }\n else if (nodeSet.has(parent)) { // ngIf inside ngIf\n root = NULL_NODE;\n }\n else { // recurse upwards\n root = getRoot(parent);\n }\n localRootMap.set(node, root);\n return root;\n }\n nodes.forEach(function (node) {\n var root = getRoot(node);\n if (root !== NULL_NODE) {\n rootMap.get(root).push(node);\n }\n });\n return rootMap;\n}\nvar CLASSES_CACHE_KEY = '$$classes';\nfunction containsClass(element, className) {\n if (element.classList) {\n return element.classList.contains(className);\n }\n else {\n var classes = element[CLASSES_CACHE_KEY];\n return classes && classes[className];\n }\n}\nfunction addClass(element, className) {\n if (element.classList) {\n element.classList.add(className);\n }\n else {\n var classes = element[CLASSES_CACHE_KEY];\n if (!classes) {\n classes = element[CLASSES_CACHE_KEY] = {};\n }\n classes[className] = true;\n }\n}\nfunction removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n }\n else {\n var classes = element[CLASSES_CACHE_KEY];\n if (classes) {\n delete classes[className];\n }\n }\n}\nfunction removeNodesAfterAnimationDone(engine, element, players) {\n optimizeGroupPlayer(players).onDone(function () { return engine.processLeaveNode(element); });\n}\nfunction flattenGroupPlayers(players) {\n var finalPlayers = [];\n _flattenGroupPlayersRecur(players, finalPlayers);\n return finalPlayers;\n}\nfunction _flattenGroupPlayersRecur(players, finalPlayers) {\n for (var i = 0; i < players.length; i++) {\n var player = players[i];\n if (player instanceof ɵAnimationGroupPlayer) {\n _flattenGroupPlayersRecur(player.players, finalPlayers);\n }\n else {\n finalPlayers.push(player);\n }\n }\n}\nfunction objEquals(a, b) {\n var k1 = Object.keys(a);\n var k2 = Object.keys(b);\n if (k1.length != k2.length)\n return false;\n for (var i = 0; i < k1.length; i++) {\n var prop = k1[i];\n if (!b.hasOwnProperty(prop) || a[prop] !== b[prop])\n return false;\n }\n return true;\n}\nfunction replacePostStylesAsPre(element, allPreStyleElements, allPostStyleElements) {\n var postEntry = allPostStyleElements.get(element);\n if (!postEntry)\n return false;\n var preEntry = allPreStyleElements.get(element);\n if (preEntry) {\n postEntry.forEach(function (data) { return preEntry.add(data); });\n }\n else {\n allPreStyleElements.set(element, postEntry);\n }\n allPostStyleElements.delete(element);\n return true;\n}\n\nvar AnimationEngine = /** @class */ (function () {\n function AnimationEngine(bodyNode, _driver, normalizer) {\n var _this = this;\n this.bodyNode = bodyNode;\n this._driver = _driver;\n this._triggerCache = {};\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = function (element, context) { };\n this._transitionEngine = new TransitionAnimationEngine(bodyNode, _driver, normalizer);\n this._timelineEngine = new TimelineAnimationEngine(bodyNode, _driver, normalizer);\n this._transitionEngine.onRemovalComplete = function (element, context) {\n return _this.onRemovalComplete(element, context);\n };\n }\n AnimationEngine.prototype.registerTrigger = function (componentId, namespaceId, hostElement, name, metadata) {\n var cacheKey = componentId + '-' + name;\n var trigger = this._triggerCache[cacheKey];\n if (!trigger) {\n var errors = [];\n var ast = buildAnimationAst(this._driver, metadata, errors);\n if (errors.length) {\n throw new Error(\"The animation trigger \\\"\" + name + \"\\\" has failed to build due to the following errors:\\n - \" + errors.join('\\n - '));\n }\n trigger = buildTrigger(name, ast);\n this._triggerCache[cacheKey] = trigger;\n }\n this._transitionEngine.registerTrigger(namespaceId, name, trigger);\n };\n AnimationEngine.prototype.register = function (namespaceId, hostElement) {\n this._transitionEngine.register(namespaceId, hostElement);\n };\n AnimationEngine.prototype.destroy = function (namespaceId, context) {\n this._transitionEngine.destroy(namespaceId, context);\n };\n AnimationEngine.prototype.onInsert = function (namespaceId, element, parent, insertBefore) {\n this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);\n };\n AnimationEngine.prototype.onRemove = function (namespaceId, element, context, isHostElement) {\n this._transitionEngine.removeNode(namespaceId, element, isHostElement || false, context);\n };\n AnimationEngine.prototype.disableAnimations = function (element, disable) {\n this._transitionEngine.markElementAsDisabled(element, disable);\n };\n AnimationEngine.prototype.process = function (namespaceId, element, property, value) {\n if (property.charAt(0) == '@') {\n var _a = __read(parseTimelineCommand(property), 2), id = _a[0], action = _a[1];\n var args = value;\n this._timelineEngine.command(id, element, action, args);\n }\n else {\n this._transitionEngine.trigger(namespaceId, element, property, value);\n }\n };\n AnimationEngine.prototype.listen = function (namespaceId, element, eventName, eventPhase, callback) {\n // @@listen\n if (eventName.charAt(0) == '@') {\n var _a = __read(parseTimelineCommand(eventName), 2), id = _a[0], action = _a[1];\n return this._timelineEngine.listen(id, element, action, callback);\n }\n return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);\n };\n AnimationEngine.prototype.flush = function (microtaskId) {\n if (microtaskId === void 0) { microtaskId = -1; }\n this._transitionEngine.flush(microtaskId);\n };\n Object.defineProperty(AnimationEngine.prototype, \"players\", {\n get: function () {\n return this._transitionEngine.players\n .concat(this._timelineEngine.players);\n },\n enumerable: true,\n configurable: true\n });\n AnimationEngine.prototype.whenRenderingDone = function () {\n return this._transitionEngine.whenRenderingDone();\n };\n return AnimationEngine;\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 an instance of `SpecialCasedStyles` if and when any special (non animateable) styles are\n * detected.\n *\n * In CSS there exist properties that cannot be animated within a keyframe animation\n * (whether it be via CSS keyframes or web-animations) and the animation implementation\n * will ignore them. This function is designed to detect those special cased styles and\n * return a container that will be executed at the start and end of the animation.\n *\n * @returns an instance of `SpecialCasedStyles` if any special styles are detected otherwise `null`\n */\nfunction packageNonAnimatableStyles(element, styles) {\n var startStyles = null;\n var endStyles = null;\n if (Array.isArray(styles) && styles.length) {\n startStyles = filterNonAnimatableStyles(styles[0]);\n if (styles.length > 1) {\n endStyles = filterNonAnimatableStyles(styles[styles.length - 1]);\n }\n }\n else if (styles) {\n startStyles = filterNonAnimatableStyles(styles);\n }\n return (startStyles || endStyles) ? new SpecialCasedStyles(element, startStyles, endStyles) :\n null;\n}\n/**\n * Designed to be executed during a keyframe-based animation to apply any special-cased styles.\n *\n * When started (when the `start()` method is run) then the provided `startStyles`\n * will be applied. When finished (when the `finish()` method is called) the\n * `endStyles` will be applied as well any any starting styles. Finally when\n * `destroy()` is called then all styles will be removed.\n */\nvar SpecialCasedStyles = /** @class */ (function () {\n function SpecialCasedStyles(_element, _startStyles, _endStyles) {\n this._element = _element;\n this._startStyles = _startStyles;\n this._endStyles = _endStyles;\n this._state = 0 /* Pending */;\n var initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element);\n if (!initialStyles) {\n SpecialCasedStyles.initialStylesByElement.set(_element, initialStyles = {});\n }\n this._initialStyles = initialStyles;\n }\n SpecialCasedStyles.prototype.start = function () {\n if (this._state < 1 /* Started */) {\n if (this._startStyles) {\n setStyles(this._element, this._startStyles, this._initialStyles);\n }\n this._state = 1 /* Started */;\n }\n };\n SpecialCasedStyles.prototype.finish = function () {\n this.start();\n if (this._state < 2 /* Finished */) {\n setStyles(this._element, this._initialStyles);\n if (this._endStyles) {\n setStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n this._state = 1 /* Started */;\n }\n };\n SpecialCasedStyles.prototype.destroy = function () {\n this.finish();\n if (this._state < 3 /* Destroyed */) {\n SpecialCasedStyles.initialStylesByElement.delete(this._element);\n if (this._startStyles) {\n eraseStyles(this._element, this._startStyles);\n this._endStyles = null;\n }\n if (this._endStyles) {\n eraseStyles(this._element, this._endStyles);\n this._endStyles = null;\n }\n setStyles(this._element, this._initialStyles);\n this._state = 3 /* Destroyed */;\n }\n };\n SpecialCasedStyles.initialStylesByElement = new WeakMap();\n return SpecialCasedStyles;\n}());\nfunction filterNonAnimatableStyles(styles) {\n var result = null;\n var props = Object.keys(styles);\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n if (isNonAnimatableStyle(prop)) {\n result = result || {};\n result[prop] = styles[prop];\n }\n }\n return result;\n}\nfunction isNonAnimatableStyle(prop) {\n return prop === 'display' || prop === 'position';\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 */\nvar ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;\nvar ANIMATION_PROP = 'animation';\nvar ANIMATIONEND_EVENT = 'animationend';\nvar ONE_SECOND$1 = 1000;\nvar ElementAnimationStyleHandler = /** @class */ (function () {\n function ElementAnimationStyleHandler(_element, _name, _duration, _delay, _easing, _fillMode, _onDoneFn) {\n var _this = this;\n this._element = _element;\n this._name = _name;\n this._duration = _duration;\n this._delay = _delay;\n this._easing = _easing;\n this._fillMode = _fillMode;\n this._onDoneFn = _onDoneFn;\n this._finished = false;\n this._destroyed = false;\n this._startTime = 0;\n this._position = 0;\n this._eventFn = function (e) { return _this._handleCallback(e); };\n }\n ElementAnimationStyleHandler.prototype.apply = function () {\n applyKeyframeAnimation(this._element, this._duration + \"ms \" + this._easing + \" \" + this._delay + \"ms 1 normal \" + this._fillMode + \" \" + this._name);\n addRemoveAnimationEvent(this._element, this._eventFn, false);\n this._startTime = Date.now();\n };\n ElementAnimationStyleHandler.prototype.pause = function () {\n playPauseAnimation(this._element, this._name, 'paused');\n };\n ElementAnimationStyleHandler.prototype.resume = function () {\n playPauseAnimation(this._element, this._name, 'running');\n };\n ElementAnimationStyleHandler.prototype.setPosition = function (position) {\n var index = findIndexForAnimation(this._element, this._name);\n this._position = position * this._duration;\n setAnimationStyle(this._element, 'Delay', \"-\" + this._position + \"ms\", index);\n };\n ElementAnimationStyleHandler.prototype.getPosition = function () {\n return this._position;\n };\n ElementAnimationStyleHandler.prototype._handleCallback = function (event) {\n var timestamp = event._ngTestManualTimestamp || Date.now();\n var elapsedTime = parseFloat(event.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)) * ONE_SECOND$1;\n if (event.animationName == this._name &&\n Math.max(timestamp - this._startTime, 0) >= this._delay && elapsedTime >= this._duration) {\n this.finish();\n }\n };\n ElementAnimationStyleHandler.prototype.finish = function () {\n if (this._finished)\n return;\n this._finished = true;\n this._onDoneFn();\n addRemoveAnimationEvent(this._element, this._eventFn, true);\n };\n ElementAnimationStyleHandler.prototype.destroy = function () {\n if (this._destroyed)\n return;\n this._destroyed = true;\n this.finish();\n removeKeyframeAnimation(this._element, this._name);\n };\n return ElementAnimationStyleHandler;\n}());\nfunction playPauseAnimation(element, name, status) {\n var index = findIndexForAnimation(element, name);\n setAnimationStyle(element, 'PlayState', status, index);\n}\nfunction applyKeyframeAnimation(element, value) {\n var anim = getAnimationStyle(element, '').trim();\n var index = 0;\n if (anim.length) {\n index = countChars(anim, ',') + 1;\n value = anim + \", \" + value;\n }\n setAnimationStyle(element, '', value);\n return index;\n}\nfunction removeKeyframeAnimation(element, name) {\n var anim = getAnimationStyle(element, '');\n var tokens = anim.split(',');\n var index = findMatchingTokenIndex(tokens, name);\n if (index >= 0) {\n tokens.splice(index, 1);\n var newValue = tokens.join(',');\n setAnimationStyle(element, '', newValue);\n }\n}\nfunction findIndexForAnimation(element, value) {\n var anim = getAnimationStyle(element, '');\n if (anim.indexOf(',') > 0) {\n var tokens = anim.split(',');\n return findMatchingTokenIndex(tokens, value);\n }\n return findMatchingTokenIndex([anim], value);\n}\nfunction findMatchingTokenIndex(tokens, searchToken) {\n for (var i = 0; i < tokens.length; i++) {\n if (tokens[i].indexOf(searchToken) >= 0) {\n return i;\n }\n }\n return -1;\n}\nfunction addRemoveAnimationEvent(element, fn, doRemove) {\n doRemove ? element.removeEventListener(ANIMATIONEND_EVENT, fn) :\n element.addEventListener(ANIMATIONEND_EVENT, fn);\n}\nfunction setAnimationStyle(element, name, value, index) {\n var prop = ANIMATION_PROP + name;\n if (index != null) {\n var oldValue = element.style[prop];\n if (oldValue.length) {\n var tokens = oldValue.split(',');\n tokens[index] = value;\n value = tokens.join(',');\n }\n }\n element.style[prop] = value;\n}\nfunction getAnimationStyle(element, name) {\n return element.style[ANIMATION_PROP + name];\n}\nfunction countChars(value, char) {\n var count = 0;\n for (var i = 0; i < value.length; i++) {\n var c = value.charAt(i);\n if (c === char)\n count++;\n }\n return count;\n}\n\nvar DEFAULT_FILL_MODE = 'forwards';\nvar DEFAULT_EASING = 'linear';\nvar CssKeyframesPlayer = /** @class */ (function () {\n function CssKeyframesPlayer(element, keyframes, animationName, _duration, _delay, easing, _finalStyles, _specialStyles) {\n this.element = element;\n this.keyframes = keyframes;\n this.animationName = animationName;\n this._duration = _duration;\n this._delay = _delay;\n this._finalStyles = _finalStyles;\n this._specialStyles = _specialStyles;\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._started = false;\n this.currentSnapshot = {};\n this._state = 0;\n this.easing = easing || DEFAULT_EASING;\n this.totalTime = _duration + _delay;\n this._buildStyler();\n }\n CssKeyframesPlayer.prototype.onStart = function (fn) {\n this._onStartFns.push(fn);\n };\n CssKeyframesPlayer.prototype.onDone = function (fn) {\n this._onDoneFns.push(fn);\n };\n CssKeyframesPlayer.prototype.onDestroy = function (fn) {\n this._onDestroyFns.push(fn);\n };\n CssKeyframesPlayer.prototype.destroy = function () {\n this.init();\n if (this._state >= 4 /* DESTROYED */)\n return;\n this._state = 4 /* DESTROYED */;\n this._styler.destroy();\n this._flushStartFns();\n this._flushDoneFns();\n if (this._specialStyles) {\n this._specialStyles.destroy();\n }\n this._onDestroyFns.forEach(function (fn) { return fn(); });\n this._onDestroyFns = [];\n };\n CssKeyframesPlayer.prototype._flushDoneFns = function () {\n this._onDoneFns.forEach(function (fn) { return fn(); });\n this._onDoneFns = [];\n };\n CssKeyframesPlayer.prototype._flushStartFns = function () {\n this._onStartFns.forEach(function (fn) { return fn(); });\n this._onStartFns = [];\n };\n CssKeyframesPlayer.prototype.finish = function () {\n this.init();\n if (this._state >= 3 /* FINISHED */)\n return;\n this._state = 3 /* FINISHED */;\n this._styler.finish();\n this._flushStartFns();\n if (this._specialStyles) {\n this._specialStyles.finish();\n }\n this._flushDoneFns();\n };\n CssKeyframesPlayer.prototype.setPosition = function (value) {\n this._styler.setPosition(value);\n };\n CssKeyframesPlayer.prototype.getPosition = function () {\n return this._styler.getPosition();\n };\n CssKeyframesPlayer.prototype.hasStarted = function () {\n return this._state >= 2 /* STARTED */;\n };\n CssKeyframesPlayer.prototype.init = function () {\n if (this._state >= 1 /* INITIALIZED */)\n return;\n this._state = 1 /* INITIALIZED */;\n var elm = this.element;\n this._styler.apply();\n if (this._delay) {\n this._styler.pause();\n }\n };\n CssKeyframesPlayer.prototype.play = function () {\n this.init();\n if (!this.hasStarted()) {\n this._flushStartFns();\n this._state = 2 /* STARTED */;\n if (this._specialStyles) {\n this._specialStyles.start();\n }\n }\n this._styler.resume();\n };\n CssKeyframesPlayer.prototype.pause = function () {\n this.init();\n this._styler.pause();\n };\n CssKeyframesPlayer.prototype.restart = function () {\n this.reset();\n this.play();\n };\n CssKeyframesPlayer.prototype.reset = function () {\n this._styler.destroy();\n this._buildStyler();\n this._styler.apply();\n };\n CssKeyframesPlayer.prototype._buildStyler = function () {\n var _this = this;\n this._styler = new ElementAnimationStyleHandler(this.element, this.animationName, this._duration, this._delay, this.easing, DEFAULT_FILL_MODE, function () { return _this.finish(); });\n };\n /** @internal */\n CssKeyframesPlayer.prototype.triggerCallback = function (phaseName) {\n var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(function (fn) { return fn(); });\n methods.length = 0;\n };\n CssKeyframesPlayer.prototype.beforeDestroy = function () {\n var _this = this;\n this.init();\n var styles = {};\n if (this.hasStarted()) {\n var finished_1 = this._state >= 3 /* FINISHED */;\n Object.keys(this._finalStyles).forEach(function (prop) {\n if (prop != 'offset') {\n styles[prop] = finished_1 ? _this._finalStyles[prop] : computeStyle(_this.element, prop);\n }\n });\n }\n this.currentSnapshot = styles;\n };\n return CssKeyframesPlayer;\n}());\n\nvar DirectStylePlayer = /** @class */ (function (_super) {\n __extends(DirectStylePlayer, _super);\n function DirectStylePlayer(element, styles) {\n var _this = _super.call(this) || this;\n _this.element = element;\n _this._startingStyles = {};\n _this.__initialized = false;\n _this._styles = hypenatePropsObject(styles);\n return _this;\n }\n DirectStylePlayer.prototype.init = function () {\n var _this = this;\n if (this.__initialized || !this._startingStyles)\n return;\n this.__initialized = true;\n Object.keys(this._styles).forEach(function (prop) {\n _this._startingStyles[prop] = _this.element.style[prop];\n });\n _super.prototype.init.call(this);\n };\n DirectStylePlayer.prototype.play = function () {\n var _this = this;\n if (!this._startingStyles)\n return;\n this.init();\n Object.keys(this._styles)\n .forEach(function (prop) { return _this.element.style.setProperty(prop, _this._styles[prop]); });\n _super.prototype.play.call(this);\n };\n DirectStylePlayer.prototype.destroy = function () {\n var _this = this;\n if (!this._startingStyles)\n return;\n Object.keys(this._startingStyles).forEach(function (prop) {\n var value = _this._startingStyles[prop];\n if (value) {\n _this.element.style.setProperty(prop, value);\n }\n else {\n _this.element.style.removeProperty(prop);\n }\n });\n this._startingStyles = null;\n _super.prototype.destroy.call(this);\n };\n return DirectStylePlayer;\n}(NoopAnimationPlayer));\n\nvar KEYFRAMES_NAME_PREFIX = 'gen_css_kf_';\nvar TAB_SPACE = ' ';\nvar CssKeyframesDriver = /** @class */ (function () {\n function CssKeyframesDriver() {\n this._count = 0;\n this._head = document.querySelector('head');\n this._warningIssued = false;\n }\n CssKeyframesDriver.prototype.validateStyleProperty = function (prop) {\n return validateStyleProperty(prop);\n };\n CssKeyframesDriver.prototype.matchesElement = function (element, selector) {\n return matchesElement(element, selector);\n };\n CssKeyframesDriver.prototype.containsElement = function (elm1, elm2) {\n return containsElement(elm1, elm2);\n };\n CssKeyframesDriver.prototype.query = function (element, selector, multi) {\n return invokeQuery(element, selector, multi);\n };\n CssKeyframesDriver.prototype.computeStyle = function (element, prop, defaultValue) {\n return window.getComputedStyle(element)[prop];\n };\n CssKeyframesDriver.prototype.buildKeyframeElement = function (element, name, keyframes) {\n keyframes = keyframes.map(function (kf) { return hypenatePropsObject(kf); });\n var keyframeStr = \"@keyframes \" + name + \" {\\n\";\n var tab = '';\n keyframes.forEach(function (kf) {\n tab = TAB_SPACE;\n var offset = parseFloat(kf['offset']);\n keyframeStr += \"\" + tab + offset * 100 + \"% {\\n\";\n tab += TAB_SPACE;\n Object.keys(kf).forEach(function (prop) {\n var value = kf[prop];\n switch (prop) {\n case 'offset':\n return;\n case 'easing':\n if (value) {\n keyframeStr += tab + \"animation-timing-function: \" + value + \";\\n\";\n }\n return;\n default:\n keyframeStr += \"\" + tab + prop + \": \" + value + \";\\n\";\n return;\n }\n });\n keyframeStr += tab + \"}\\n\";\n });\n keyframeStr += \"}\\n\";\n var kfElm = document.createElement('style');\n kfElm.innerHTML = keyframeStr;\n return kfElm;\n };\n CssKeyframesDriver.prototype.animate = function (element, keyframes, duration, delay, easing, previousPlayers, scrubberAccessRequested) {\n if (previousPlayers === void 0) { previousPlayers = []; }\n if (scrubberAccessRequested) {\n this._notifyFaultyScrubber();\n }\n var previousCssKeyframePlayers = previousPlayers.filter(function (player) { return player instanceof CssKeyframesPlayer; });\n var previousStyles = {};\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousCssKeyframePlayers.forEach(function (player) {\n var styles = player.currentSnapshot;\n Object.keys(styles).forEach(function (prop) { return previousStyles[prop] = styles[prop]; });\n });\n }\n keyframes = balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles);\n var finalStyles = flattenKeyframesIntoStyles(keyframes);\n // if there is no animation then there is no point in applying\n // styles and waiting for an event to get fired. This causes lag.\n // It's better to just directly apply the styles to the element\n // via the direct styling animation player.\n if (duration == 0) {\n return new DirectStylePlayer(element, finalStyles);\n }\n var animationName = \"\" + KEYFRAMES_NAME_PREFIX + this._count++;\n var kfElm = this.buildKeyframeElement(element, animationName, keyframes);\n document.querySelector('head').appendChild(kfElm);\n var specialStyles = packageNonAnimatableStyles(element, keyframes);\n var player = new CssKeyframesPlayer(element, keyframes, animationName, duration, delay, easing, finalStyles, specialStyles);\n player.onDestroy(function () { return removeElement(kfElm); });\n return player;\n };\n CssKeyframesDriver.prototype._notifyFaultyScrubber = function () {\n if (!this._warningIssued) {\n console.warn('@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\\n', ' visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill.');\n this._warningIssued = true;\n }\n };\n return CssKeyframesDriver;\n}());\nfunction flattenKeyframesIntoStyles(keyframes) {\n var flatKeyframes = {};\n if (keyframes) {\n var kfs = Array.isArray(keyframes) ? keyframes : [keyframes];\n kfs.forEach(function (kf) {\n Object.keys(kf).forEach(function (prop) {\n if (prop == 'offset' || prop == 'easing')\n return;\n flatKeyframes[prop] = kf[prop];\n });\n });\n }\n return flatKeyframes;\n}\nfunction removeElement(node) {\n node.parentNode.removeChild(node);\n}\n\nvar WebAnimationsPlayer = /** @class */ (function () {\n function WebAnimationsPlayer(element, keyframes, options, _specialStyles) {\n this.element = element;\n this.keyframes = keyframes;\n this.options = options;\n this._specialStyles = _specialStyles;\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._initialized = false;\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n this.time = 0;\n this.parentPlayer = null;\n this.currentSnapshot = {};\n this._duration = options['duration'];\n this._delay = options['delay'] || 0;\n this.time = this._duration + this._delay;\n }\n WebAnimationsPlayer.prototype._onFinish = function () {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(function (fn) { return fn(); });\n this._onDoneFns = [];\n }\n };\n WebAnimationsPlayer.prototype.init = function () {\n this._buildPlayer();\n this._preparePlayerBeforeStart();\n };\n WebAnimationsPlayer.prototype._buildPlayer = function () {\n var _this = this;\n if (this._initialized)\n return;\n this._initialized = true;\n var keyframes = this.keyframes;\n this.domPlayer =\n this._triggerWebAnimation(this.element, keyframes, this.options);\n this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : {};\n this.domPlayer.addEventListener('finish', function () { return _this._onFinish(); });\n };\n WebAnimationsPlayer.prototype._preparePlayerBeforeStart = function () {\n // this is required so that the player doesn't start to animate right away\n if (this._delay) {\n this._resetDomPlayerState();\n }\n else {\n this.domPlayer.pause();\n }\n };\n /** @internal */\n WebAnimationsPlayer.prototype._triggerWebAnimation = function (element, keyframes, options) {\n // jscompiler doesn't seem to know animate is a native property because it's not fully\n // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929]\n return element['animate'](keyframes, options);\n };\n WebAnimationsPlayer.prototype.onStart = function (fn) {\n this._onStartFns.push(fn);\n };\n WebAnimationsPlayer.prototype.onDone = function (fn) {\n this._onDoneFns.push(fn);\n };\n WebAnimationsPlayer.prototype.onDestroy = function (fn) {\n this._onDestroyFns.push(fn);\n };\n WebAnimationsPlayer.prototype.play = function () {\n this._buildPlayer();\n if (!this.hasStarted()) {\n this._onStartFns.forEach(function (fn) { return fn(); });\n this._onStartFns = [];\n this._started = true;\n if (this._specialStyles) {\n this._specialStyles.start();\n }\n }\n this.domPlayer.play();\n };\n WebAnimationsPlayer.prototype.pause = function () {\n this.init();\n this.domPlayer.pause();\n };\n WebAnimationsPlayer.prototype.finish = function () {\n this.init();\n if (this._specialStyles) {\n this._specialStyles.finish();\n }\n this._onFinish();\n this.domPlayer.finish();\n };\n WebAnimationsPlayer.prototype.reset = function () {\n this._resetDomPlayerState();\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n };\n WebAnimationsPlayer.prototype._resetDomPlayerState = function () {\n if (this.domPlayer) {\n this.domPlayer.cancel();\n }\n };\n WebAnimationsPlayer.prototype.restart = function () {\n this.reset();\n this.play();\n };\n WebAnimationsPlayer.prototype.hasStarted = function () {\n return this._started;\n };\n WebAnimationsPlayer.prototype.destroy = function () {\n if (!this._destroyed) {\n this._destroyed = true;\n this._resetDomPlayerState();\n this._onFinish();\n if (this._specialStyles) {\n this._specialStyles.destroy();\n }\n this._onDestroyFns.forEach(function (fn) { return fn(); });\n this._onDestroyFns = [];\n }\n };\n WebAnimationsPlayer.prototype.setPosition = function (p) {\n this.domPlayer.currentTime = p * this.time;\n };\n WebAnimationsPlayer.prototype.getPosition = function () {\n return this.domPlayer.currentTime / this.time;\n };\n Object.defineProperty(WebAnimationsPlayer.prototype, \"totalTime\", {\n get: function () {\n return this._delay + this._duration;\n },\n enumerable: true,\n configurable: true\n });\n WebAnimationsPlayer.prototype.beforeDestroy = function () {\n var _this = this;\n var styles = {};\n if (this.hasStarted()) {\n Object.keys(this._finalKeyframe).forEach(function (prop) {\n if (prop != 'offset') {\n styles[prop] =\n _this._finished ? _this._finalKeyframe[prop] : computeStyle(_this.element, prop);\n }\n });\n }\n this.currentSnapshot = styles;\n };\n /** @internal */\n WebAnimationsPlayer.prototype.triggerCallback = function (phaseName) {\n var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(function (fn) { return fn(); });\n methods.length = 0;\n };\n return WebAnimationsPlayer;\n}());\n\nvar WebAnimationsDriver = /** @class */ (function () {\n function WebAnimationsDriver() {\n this._isNativeImpl = /\\{\\s*\\[native\\s+code\\]\\s*\\}/.test(getElementAnimateFn().toString());\n this._cssKeyframesDriver = new CssKeyframesDriver();\n }\n WebAnimationsDriver.prototype.validateStyleProperty = function (prop) {\n return validateStyleProperty(prop);\n };\n WebAnimationsDriver.prototype.matchesElement = function (element, selector) {\n return matchesElement(element, selector);\n };\n WebAnimationsDriver.prototype.containsElement = function (elm1, elm2) {\n return containsElement(elm1, elm2);\n };\n WebAnimationsDriver.prototype.query = function (element, selector, multi) {\n return invokeQuery(element, selector, multi);\n };\n WebAnimationsDriver.prototype.computeStyle = function (element, prop, defaultValue) {\n return window.getComputedStyle(element)[prop];\n };\n WebAnimationsDriver.prototype.overrideWebAnimationsSupport = function (supported) {\n this._isNativeImpl = supported;\n };\n WebAnimationsDriver.prototype.animate = function (element, keyframes, duration, delay, easing, previousPlayers, scrubberAccessRequested) {\n if (previousPlayers === void 0) { previousPlayers = []; }\n var useKeyframes = !scrubberAccessRequested && !this._isNativeImpl;\n if (useKeyframes) {\n return this._cssKeyframesDriver.animate(element, keyframes, duration, delay, easing, previousPlayers);\n }\n var fill = delay == 0 ? 'both' : 'forwards';\n var playerOptions = { duration: duration, delay: delay, fill: fill };\n // we check for this to avoid having a null|undefined value be present\n // for the easing (which results in an error for certain browsers #9752)\n if (easing) {\n playerOptions['easing'] = easing;\n }\n var previousStyles = {};\n var previousWebAnimationPlayers = previousPlayers.filter(function (player) { return player instanceof WebAnimationsPlayer; });\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousWebAnimationPlayers.forEach(function (player) {\n var styles = player.currentSnapshot;\n Object.keys(styles).forEach(function (prop) { return previousStyles[prop] = styles[prop]; });\n });\n }\n keyframes = keyframes.map(function (styles) { return copyStyles(styles, false); });\n keyframes = balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles);\n var specialStyles = packageNonAnimatableStyles(element, keyframes);\n return new WebAnimationsPlayer(element, keyframes, playerOptions, specialStyles);\n };\n return WebAnimationsDriver;\n}());\nfunction supportsWebAnimations() {\n return typeof getElementAnimateFn() === 'function';\n}\nfunction getElementAnimateFn() {\n return (isBrowser() && Element.prototype['animate']) || {};\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/**\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\nexport { AnimationDriver, Animation as ɵAnimation, AnimationEngine as ɵAnimationEngine, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, CssKeyframesDriver as ɵCssKeyframesDriver, CssKeyframesPlayer as ɵCssKeyframesPlayer, NoopAnimationDriver as ɵNoopAnimationDriver, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsDriver as ɵWebAnimationsDriver, WebAnimationsPlayer as ɵWebAnimationsPlayer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge, SpecialCasedStyles as ɵangular_packages_animations_browser_browser_a, containsElement as ɵcontainsElement, invokeQuery as ɵinvokeQuery, matchesElement as ɵmatchesElement, supportsWebAnimations as ɵsupportsWebAnimations, validateStyleProperty as ɵvalidateStyleProperty };\n\n//# sourceMappingURL=browser.js.map","/**\n * @license Angular v9.1.11\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { __extends, __decorate, __param, __metadata, __read, __spread } from 'tslib';\nimport { ViewEncapsulation, Injectable, Inject, RendererFactory2, NgZone, InjectionToken, NgModule } from '@angular/core';\nimport { ɵDomRendererFactory2, BrowserModule } from '@angular/platform-browser';\nimport { sequence, AnimationBuilder, AnimationFactory } from '@angular/animations';\nimport { ɵAnimationEngine, AnimationDriver, ɵAnimationStyleNormalizer, ɵsupportsWebAnimations, ɵWebAnimationsDriver, ɵCssKeyframesDriver, ɵWebAnimationsStyleNormalizer, ɵNoopAnimationDriver } from '@angular/animations/browser';\nimport { DOCUMENT } from '@angular/common';\n\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@angular/animations/browser';\nvar BrowserAnimationBuilder = /** @class */ (function (_super) {\n __extends(BrowserAnimationBuilder, _super);\n function BrowserAnimationBuilder(rootRenderer, doc) {\n var _this = _super.call(this) || this;\n _this._nextAnimationId = 0;\n var typeData = { id: '0', encapsulation: ViewEncapsulation.None, styles: [], data: { animation: [] } };\n _this._renderer = rootRenderer.createRenderer(doc.body, typeData);\n return _this;\n }\n BrowserAnimationBuilder.prototype.build = function (animation) {\n var id = this._nextAnimationId.toString();\n this._nextAnimationId++;\n var entry = Array.isArray(animation) ? sequence(animation) : animation;\n issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n return new BrowserAnimationFactory(id, this._renderer);\n };\n BrowserAnimationBuilder = __decorate([ __param(1, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [RendererFactory2, Object])\n ], BrowserAnimationBuilder);\nBrowserAnimationBuilder.ɵfac = function BrowserAnimationBuilder_Factory(t) { return new (t || BrowserAnimationBuilder)(ɵngcc0.ɵɵinject(ɵngcc0.RendererFactory2), ɵngcc0.ɵɵinject(DOCUMENT)); };\nBrowserAnimationBuilder.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: BrowserAnimationBuilder, factory: function (t) { return BrowserAnimationBuilder.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(BrowserAnimationBuilder, [{\n type: Injectable\n }], function () { return [{ type: ɵngcc0.RendererFactory2 }, { type: Object, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n return BrowserAnimationBuilder;\n}(AnimationBuilder));\nvar BrowserAnimationFactory = /** @class */ (function (_super) {\n __extends(BrowserAnimationFactory, _super);\n function BrowserAnimationFactory(_id, _renderer) {\n var _this = _super.call(this) || this;\n _this._id = _id;\n _this._renderer = _renderer;\n return _this;\n }\n BrowserAnimationFactory.prototype.create = function (element, options) {\n return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n };\n return BrowserAnimationFactory;\n}(AnimationFactory));\nvar RendererAnimationPlayer = /** @class */ (function () {\n function RendererAnimationPlayer(id, element, options, _renderer) {\n this.id = id;\n this.element = element;\n this._renderer = _renderer;\n this.parentPlayer = null;\n this._started = false;\n this.totalTime = 0;\n this._command('create', options);\n }\n RendererAnimationPlayer.prototype._listen = function (eventName, callback) {\n return this._renderer.listen(this.element, \"@@\" + this.id + \":\" + eventName, callback);\n };\n RendererAnimationPlayer.prototype._command = function (command) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n return issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n };\n RendererAnimationPlayer.prototype.onDone = function (fn) {\n this._listen('done', fn);\n };\n RendererAnimationPlayer.prototype.onStart = function (fn) {\n this._listen('start', fn);\n };\n RendererAnimationPlayer.prototype.onDestroy = function (fn) {\n this._listen('destroy', fn);\n };\n RendererAnimationPlayer.prototype.init = function () {\n this._command('init');\n };\n RendererAnimationPlayer.prototype.hasStarted = function () {\n return this._started;\n };\n RendererAnimationPlayer.prototype.play = function () {\n this._command('play');\n this._started = true;\n };\n RendererAnimationPlayer.prototype.pause = function () {\n this._command('pause');\n };\n RendererAnimationPlayer.prototype.restart = function () {\n this._command('restart');\n };\n RendererAnimationPlayer.prototype.finish = function () {\n this._command('finish');\n };\n RendererAnimationPlayer.prototype.destroy = function () {\n this._command('destroy');\n };\n RendererAnimationPlayer.prototype.reset = function () {\n this._command('reset');\n };\n RendererAnimationPlayer.prototype.setPosition = function (p) {\n this._command('setPosition', p);\n };\n RendererAnimationPlayer.prototype.getPosition = function () {\n return 0;\n };\n return RendererAnimationPlayer;\n}());\nfunction issueAnimationCommand(renderer, element, id, command, args) {\n return renderer.setProperty(element, \"@@\" + id + \":\" + command, args);\n}\n\nvar ANIMATION_PREFIX = '@';\nvar DISABLE_ANIMATIONS_FLAG = '@.disabled';\nvar AnimationRendererFactory = /** @class */ (function () {\n function AnimationRendererFactory(delegate, engine, _zone) {\n this.delegate = delegate;\n this.engine = engine;\n this._zone = _zone;\n this._currentId = 0;\n this._microtaskId = 1;\n this._animationCallbacksBuffer = [];\n this._rendererCache = new Map();\n this._cdRecurDepth = 0;\n this.promise = Promise.resolve(0);\n engine.onRemovalComplete = function (element, delegate) {\n // Note: if an component element has a leave animation, and the component\n // a host leave animation, the view engine will call `removeChild` for the parent\n // component renderer as well as for the child component renderer.\n // Therefore, we need to check if we already removed the element.\n if (delegate && delegate.parentNode(element)) {\n delegate.removeChild(element.parentNode, element);\n }\n };\n }\n AnimationRendererFactory.prototype.createRenderer = function (hostElement, type) {\n var _this = this;\n var EMPTY_NAMESPACE_ID = '';\n // cache the delegates to find out which cached delegate can\n // be used by which cached renderer\n var delegate = this.delegate.createRenderer(hostElement, type);\n if (!hostElement || !type || !type.data || !type.data['animation']) {\n var renderer = this._rendererCache.get(delegate);\n if (!renderer) {\n renderer = new BaseAnimationRenderer(EMPTY_NAMESPACE_ID, delegate, this.engine);\n // only cache this result when the base renderer is used\n this._rendererCache.set(delegate, renderer);\n }\n return renderer;\n }\n var componentId = type.id;\n var namespaceId = type.id + '-' + this._currentId;\n this._currentId++;\n this.engine.register(namespaceId, hostElement);\n var registerTrigger = function (trigger) {\n if (Array.isArray(trigger)) {\n trigger.forEach(registerTrigger);\n }\n else {\n _this.engine.registerTrigger(componentId, namespaceId, hostElement, trigger.name, trigger);\n }\n };\n var animationTriggers = type.data['animation'];\n animationTriggers.forEach(registerTrigger);\n return new AnimationRenderer(this, namespaceId, delegate, this.engine);\n };\n AnimationRendererFactory.prototype.begin = function () {\n this._cdRecurDepth++;\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n };\n AnimationRendererFactory.prototype._scheduleCountTask = function () {\n var _this = this;\n // always use promise to schedule microtask instead of use Zone\n this.promise.then(function () {\n _this._microtaskId++;\n });\n };\n /** @internal */\n AnimationRendererFactory.prototype.scheduleListenerCallback = function (count, fn, data) {\n var _this = this;\n if (count >= 0 && count < this._microtaskId) {\n this._zone.run(function () { return fn(data); });\n return;\n }\n if (this._animationCallbacksBuffer.length == 0) {\n Promise.resolve(null).then(function () {\n _this._zone.run(function () {\n _this._animationCallbacksBuffer.forEach(function (tuple) {\n var _a = __read(tuple, 2), fn = _a[0], data = _a[1];\n fn(data);\n });\n _this._animationCallbacksBuffer = [];\n });\n });\n }\n this._animationCallbacksBuffer.push([fn, data]);\n };\n AnimationRendererFactory.prototype.end = function () {\n var _this = this;\n this._cdRecurDepth--;\n // this is to prevent animations from running twice when an inner\n // component does CD when a parent component instead has inserted it\n if (this._cdRecurDepth == 0) {\n this._zone.runOutsideAngular(function () {\n _this._scheduleCountTask();\n _this.engine.flush(_this._microtaskId);\n });\n }\n if (this.delegate.end) {\n this.delegate.end();\n }\n };\n AnimationRendererFactory.prototype.whenRenderingDone = function () {\n return this.engine.whenRenderingDone();\n };\n AnimationRendererFactory = __decorate([ __metadata(\"design:paramtypes\", [RendererFactory2, ɵAnimationEngine, NgZone])\n ], AnimationRendererFactory);\nAnimationRendererFactory.ɵfac = function AnimationRendererFactory_Factory(t) { return new (t || AnimationRendererFactory)(ɵngcc0.ɵɵinject(ɵngcc0.RendererFactory2), ɵngcc0.ɵɵinject(ɵngcc1.ɵAnimationEngine), ɵngcc0.ɵɵinject(ɵngcc0.NgZone)); };\nAnimationRendererFactory.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: AnimationRendererFactory, factory: function (t) { return AnimationRendererFactory.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(AnimationRendererFactory, [{\n type: Injectable\n }], function () { return [{ type: ɵngcc0.RendererFactory2 }, { type: ɵngcc1.ɵAnimationEngine }, { type: ɵngcc0.NgZone }]; }, null); })();\n return AnimationRendererFactory;\n}());\nvar BaseAnimationRenderer = /** @class */ (function () {\n function BaseAnimationRenderer(namespaceId, delegate, engine) {\n this.namespaceId = namespaceId;\n this.delegate = delegate;\n this.engine = engine;\n this.destroyNode = this.delegate.destroyNode ? function (n) { return delegate.destroyNode(n); } : null;\n }\n Object.defineProperty(BaseAnimationRenderer.prototype, \"data\", {\n get: function () {\n return this.delegate.data;\n },\n enumerable: true,\n configurable: true\n });\n BaseAnimationRenderer.prototype.destroy = function () {\n this.engine.destroy(this.namespaceId, this.delegate);\n this.delegate.destroy();\n };\n BaseAnimationRenderer.prototype.createElement = function (name, namespace) {\n return this.delegate.createElement(name, namespace);\n };\n BaseAnimationRenderer.prototype.createComment = function (value) {\n return this.delegate.createComment(value);\n };\n BaseAnimationRenderer.prototype.createText = function (value) {\n return this.delegate.createText(value);\n };\n BaseAnimationRenderer.prototype.appendChild = function (parent, newChild) {\n this.delegate.appendChild(parent, newChild);\n this.engine.onInsert(this.namespaceId, newChild, parent, false);\n };\n BaseAnimationRenderer.prototype.insertBefore = function (parent, newChild, refChild) {\n this.delegate.insertBefore(parent, newChild, refChild);\n this.engine.onInsert(this.namespaceId, newChild, parent, true);\n };\n BaseAnimationRenderer.prototype.removeChild = function (parent, oldChild, isHostElement) {\n this.engine.onRemove(this.namespaceId, oldChild, this.delegate, isHostElement);\n };\n BaseAnimationRenderer.prototype.selectRootElement = function (selectorOrNode, preserveContent) {\n return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n };\n BaseAnimationRenderer.prototype.parentNode = function (node) {\n return this.delegate.parentNode(node);\n };\n BaseAnimationRenderer.prototype.nextSibling = function (node) {\n return this.delegate.nextSibling(node);\n };\n BaseAnimationRenderer.prototype.setAttribute = function (el, name, value, namespace) {\n this.delegate.setAttribute(el, name, value, namespace);\n };\n BaseAnimationRenderer.prototype.removeAttribute = function (el, name, namespace) {\n this.delegate.removeAttribute(el, name, namespace);\n };\n BaseAnimationRenderer.prototype.addClass = function (el, name) {\n this.delegate.addClass(el, name);\n };\n BaseAnimationRenderer.prototype.removeClass = function (el, name) {\n this.delegate.removeClass(el, name);\n };\n BaseAnimationRenderer.prototype.setStyle = function (el, style, value, flags) {\n this.delegate.setStyle(el, style, value, flags);\n };\n BaseAnimationRenderer.prototype.removeStyle = function (el, style, flags) {\n this.delegate.removeStyle(el, style, flags);\n };\n BaseAnimationRenderer.prototype.setProperty = function (el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) {\n this.disableAnimations(el, !!value);\n }\n else {\n this.delegate.setProperty(el, name, value);\n }\n };\n BaseAnimationRenderer.prototype.setValue = function (node, value) {\n this.delegate.setValue(node, value);\n };\n BaseAnimationRenderer.prototype.listen = function (target, eventName, callback) {\n return this.delegate.listen(target, eventName, callback);\n };\n BaseAnimationRenderer.prototype.disableAnimations = function (element, value) {\n this.engine.disableAnimations(element, value);\n };\n return BaseAnimationRenderer;\n}());\nvar AnimationRenderer = /** @class */ (function (_super) {\n __extends(AnimationRenderer, _super);\n function AnimationRenderer(factory, namespaceId, delegate, engine) {\n var _this = _super.call(this, namespaceId, delegate, engine) || this;\n _this.factory = factory;\n _this.namespaceId = namespaceId;\n return _this;\n }\n AnimationRenderer.prototype.setProperty = function (el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX) {\n if (name.charAt(1) == '.' && name == DISABLE_ANIMATIONS_FLAG) {\n value = value === undefined ? true : !!value;\n this.disableAnimations(el, value);\n }\n else {\n this.engine.process(this.namespaceId, el, name.substr(1), value);\n }\n }\n else {\n this.delegate.setProperty(el, name, value);\n }\n };\n AnimationRenderer.prototype.listen = function (target, eventName, callback) {\n var _a;\n var _this = this;\n if (eventName.charAt(0) == ANIMATION_PREFIX) {\n var element = resolveElementFromTarget(target);\n var name_1 = eventName.substr(1);\n var phase = '';\n // @listener.phase is for trigger animation callbacks\n // @@listener is for animation builder callbacks\n if (name_1.charAt(0) != ANIMATION_PREFIX) {\n _a = __read(parseTriggerCallbackName(name_1), 2), name_1 = _a[0], phase = _a[1];\n }\n return this.engine.listen(this.namespaceId, element, name_1, phase, function (event) {\n var countId = event['_data'] || -1;\n _this.factory.scheduleListenerCallback(countId, callback, event);\n });\n }\n return this.delegate.listen(target, eventName, callback);\n };\n return AnimationRenderer;\n}(BaseAnimationRenderer));\nfunction resolveElementFromTarget(target) {\n switch (target) {\n case 'body':\n return document.body;\n case 'document':\n return document;\n case 'window':\n return window;\n default:\n return target;\n }\n}\nfunction parseTriggerCallbackName(triggerName) {\n var dotIndex = triggerName.indexOf('.');\n var trigger = triggerName.substring(0, dotIndex);\n var phase = triggerName.substr(dotIndex + 1);\n return [trigger, phase];\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 */\nvar InjectableAnimationEngine = /** @class */ (function (_super) {\n __extends(InjectableAnimationEngine, _super);\n function InjectableAnimationEngine(doc, driver, normalizer) {\n return _super.call(this, doc.body, driver, normalizer) || this;\n }\n InjectableAnimationEngine = __decorate([ __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object, AnimationDriver, ɵAnimationStyleNormalizer])\n ], InjectableAnimationEngine);\nInjectableAnimationEngine.ɵfac = function InjectableAnimationEngine_Factory(t) { return new (t || InjectableAnimationEngine)(ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(ɵngcc1.AnimationDriver), ɵngcc0.ɵɵinject(ɵngcc1.ɵAnimationStyleNormalizer)); };\nInjectableAnimationEngine.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: InjectableAnimationEngine, factory: function (t) { return InjectableAnimationEngine.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(InjectableAnimationEngine, [{\n type: Injectable\n }], function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: ɵngcc1.AnimationDriver }, { type: ɵngcc1.ɵAnimationStyleNormalizer }]; }, null); })();\n return InjectableAnimationEngine;\n}(ɵAnimationEngine));\nfunction instantiateSupportedAnimationDriver() {\n return ɵsupportsWebAnimations() ? new ɵWebAnimationsDriver() : new ɵCssKeyframesDriver();\n}\nfunction instantiateDefaultStyleNormalizer() {\n return new ɵWebAnimationsStyleNormalizer();\n}\nfunction instantiateRendererFactory(renderer, engine, zone) {\n return new AnimationRendererFactory(renderer, engine, zone);\n}\n/**\n * @publicApi\n */\nvar ANIMATION_MODULE_TYPE = new InjectionToken('AnimationModuleType');\nvar SHARED_ANIMATION_PROVIDERS = [\n { provide: AnimationBuilder, useClass: BrowserAnimationBuilder },\n { provide: ɵAnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer },\n { provide: ɵAnimationEngine, useClass: InjectableAnimationEngine }, {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n deps: [ɵDomRendererFactory2, ɵAnimationEngine, NgZone]\n }\n];\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nvar BROWSER_ANIMATIONS_PROVIDERS = __spread([\n { provide: AnimationDriver, useFactory: instantiateSupportedAnimationDriver },\n { provide: ANIMATION_MODULE_TYPE, useValue: 'BrowserAnimations' }\n], SHARED_ANIMATION_PROVIDERS);\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nvar BROWSER_NOOP_ANIMATIONS_PROVIDERS = __spread([\n { provide: AnimationDriver, useClass: ɵNoopAnimationDriver },\n { provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations' }\n], SHARED_ANIMATION_PROVIDERS);\n\n/**\n * Exports `BrowserModule` with additional [dependency-injection providers](guide/glossary#provider)\n * for use with animations. See [Animations](guide/animations).\n * @publicApi\n */\nvar BrowserAnimationsModule = /** @class */ (function () {\n function BrowserAnimationsModule() {\n }\nBrowserAnimationsModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: BrowserAnimationsModule });\nBrowserAnimationsModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function BrowserAnimationsModule_Factory(t) { return new (t || BrowserAnimationsModule)(); }, providers: BROWSER_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(BrowserAnimationsModule, { exports: function () { return [BrowserModule]; } }); })();\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(BrowserAnimationsModule, [{\n type: NgModule,\n args: [{\n exports: [BrowserModule],\n providers: BROWSER_ANIMATIONS_PROVIDERS\n }]\n }], function () { return []; }, null); })();\n return BrowserAnimationsModule;\n}());\n/**\n * A null player that must be imported to allow disabling of animations.\n * @publicApi\n */\nvar NoopAnimationsModule = /** @class */ (function () {\n function NoopAnimationsModule() {\n }\nNoopAnimationsModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: NoopAnimationsModule });\nNoopAnimationsModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function NoopAnimationsModule_Factory(t) { return new (t || NoopAnimationsModule)(); }, providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS, imports: [BrowserModule] });\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(NoopAnimationsModule, { exports: function () { return [BrowserModule]; } }); })();\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NoopAnimationsModule, [{\n type: NgModule,\n args: [{\n exports: [BrowserModule],\n providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS\n }]\n }], function () { return []; }, null); })();\n return NoopAnimationsModule;\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/**\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\nexport { ANIMATION_MODULE_TYPE, BrowserAnimationsModule, NoopAnimationsModule, AnimationRenderer as ɵAnimationRenderer, AnimationRendererFactory as ɵAnimationRendererFactory, BrowserAnimationBuilder as ɵBrowserAnimationBuilder, BrowserAnimationFactory as ɵBrowserAnimationFactory, InjectableAnimationEngine as ɵInjectableAnimationEngine, instantiateSupportedAnimationDriver as ɵangular_packages_platform_browser_animations_animations_a, instantiateDefaultStyleNormalizer as ɵangular_packages_platform_browser_animations_animations_b, instantiateRendererFactory as ɵangular_packages_platform_browser_animations_animations_c, BROWSER_ANIMATIONS_PROVIDERS as ɵangular_packages_platform_browser_animations_animations_d, BROWSER_NOOP_ANIMATIONS_PROVIDERS as ɵangular_packages_platform_browser_animations_animations_e, BaseAnimationRenderer as ɵangular_packages_platform_browser_animations_animations_f };\n\n//# sourceMappingURL=animations.js.map","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport var iterator = /*@__PURE__*/ getSymbolIterator();\nexport var $$iterator = iterator;\n//# sourceMappingURL=iterator.js.map\n","/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */\nimport { isScheduler } from '../util/isScheduler';\nimport { fromArray } from './fromArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function of() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = args[args.length - 1];\n if (isScheduler(scheduler)) {\n args.pop();\n return scheduleArray(args, scheduler);\n }\n else {\n return fromArray(args);\n }\n}\n//# sourceMappingURL=of.js.map\n","/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { empty as emptyObserver } from './Observer';\nimport { Subscription } from './Subscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nvar Subscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Subscriber, _super);\n function Subscriber(destinationOrNext, error, complete) {\n var _this = _super.call(this) || this;\n _this.syncErrorValue = null;\n _this.syncErrorThrown = false;\n _this.syncErrorThrowable = false;\n _this.isStopped = false;\n switch (arguments.length) {\n case 0:\n _this.destination = emptyObserver;\n break;\n case 1:\n if (!destinationOrNext) {\n _this.destination = emptyObserver;\n break;\n }\n if (typeof destinationOrNext === 'object') {\n if (destinationOrNext instanceof Subscriber) {\n _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;\n _this.destination = destinationOrNext;\n destinationOrNext.add(_this);\n }\n else {\n _this.syncErrorThrowable = true;\n _this.destination = new SafeSubscriber(_this, destinationOrNext);\n }\n break;\n }\n default:\n _this.syncErrorThrowable = true;\n _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);\n break;\n }\n return _this;\n }\n Subscriber.prototype[rxSubscriberSymbol] = function () { return this; };\n Subscriber.create = function (next, error, complete) {\n var subscriber = new Subscriber(next, error, complete);\n subscriber.syncErrorThrowable = false;\n return subscriber;\n };\n Subscriber.prototype.next = function (value) {\n if (!this.isStopped) {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (!this.isStopped) {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (this.closed) {\n return;\n }\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n this.destination.error(err);\n this.unsubscribe();\n };\n Subscriber.prototype._complete = function () {\n this.destination.complete();\n this.unsubscribe();\n };\n Subscriber.prototype._unsubscribeAndRecycle = function () {\n var _parentOrParents = this._parentOrParents;\n this._parentOrParents = null;\n this.unsubscribe();\n this.closed = false;\n this.isStopped = false;\n this._parentOrParents = _parentOrParents;\n return this;\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar SafeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SafeSubscriber, _super);\n function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n _this._parentSubscriber = _parentSubscriber;\n var next;\n var context = _this;\n if (isFunction(observerOrNext)) {\n next = observerOrNext;\n }\n else if (observerOrNext) {\n next = observerOrNext.next;\n error = observerOrNext.error;\n complete = observerOrNext.complete;\n if (observerOrNext !== emptyObserver) {\n context = Object.create(observerOrNext);\n if (isFunction(context.unsubscribe)) {\n _this.add(context.unsubscribe.bind(context));\n }\n context.unsubscribe = _this.unsubscribe.bind(_this);\n }\n }\n _this._context = context;\n _this._next = next;\n _this._error = error;\n _this._complete = complete;\n return _this;\n }\n SafeSubscriber.prototype.next = function (value) {\n if (!this.isStopped && this._next) {\n var _parentSubscriber = this._parentSubscriber;\n if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(this._next, value);\n }\n else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var _parentSubscriber = this._parentSubscriber;\n var useDeprecatedSynchronousErrorHandling = config.useDeprecatedSynchronousErrorHandling;\n if (this._error) {\n if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(this._error, err);\n this.unsubscribe();\n }\n else {\n this.__tryOrSetError(_parentSubscriber, this._error, err);\n this.unsubscribe();\n }\n }\n else if (!_parentSubscriber.syncErrorThrowable) {\n this.unsubscribe();\n if (useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n hostReportError(err);\n }\n else {\n if (useDeprecatedSynchronousErrorHandling) {\n _parentSubscriber.syncErrorValue = err;\n _parentSubscriber.syncErrorThrown = true;\n }\n else {\n hostReportError(err);\n }\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.complete = function () {\n var _this = this;\n if (!this.isStopped) {\n var _parentSubscriber = this._parentSubscriber;\n if (this._complete) {\n var wrappedComplete = function () { return _this._complete.call(_this._context); };\n if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(wrappedComplete);\n this.unsubscribe();\n }\n else {\n this.__tryOrSetError(_parentSubscriber, wrappedComplete);\n this.unsubscribe();\n }\n }\n else {\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {\n try {\n fn.call(this._context, value);\n }\n catch (err) {\n this.unsubscribe();\n if (config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n else {\n hostReportError(err);\n }\n }\n };\n SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {\n if (!config.useDeprecatedSynchronousErrorHandling) {\n throw new Error('bad call');\n }\n try {\n fn.call(this._context, value);\n }\n catch (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n parent.syncErrorValue = err;\n parent.syncErrorThrown = true;\n return true;\n }\n else {\n hostReportError(err);\n return true;\n }\n }\n return false;\n };\n SafeSubscriber.prototype._unsubscribe = function () {\n var _parentSubscriber = this._parentSubscriber;\n this._context = null;\n this._parentSubscriber = null;\n _parentSubscriber.unsubscribe();\n };\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\n//# sourceMappingURL=Subscriber.js.map\n","/** PURE_IMPORTS_START _subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */\nimport { subscribeToArray } from './subscribeToArray';\nimport { subscribeToPromise } from './subscribeToPromise';\nimport { subscribeToIterable } from './subscribeToIterable';\nimport { subscribeToObservable } from './subscribeToObservable';\nimport { isArrayLike } from './isArrayLike';\nimport { isPromise } from './isPromise';\nimport { isObject } from './isObject';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport var subscribeTo = function (result) {\n if (!!result && typeof result[Symbol_observable] === 'function') {\n return subscribeToObservable(result);\n }\n else if (isArrayLike(result)) {\n return subscribeToArray(result);\n }\n else if (isPromise(result)) {\n return subscribeToPromise(result);\n }\n else if (!!result && typeof result[Symbol_iterator] === 'function') {\n return subscribeToIterable(result);\n }\n else {\n var value = isObject(result) ? 'an invalid object' : \"'\" + result + \"'\";\n var msg = \"You provided \" + value + \" where a stream was expected.\"\n + ' You can provide an Observable, Promise, Array, or Iterable.';\n throw new TypeError(msg);\n }\n};\n//# sourceMappingURL=subscribeTo.js.map\n","/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport var subscribeToObservable = function (obj) {\n return function (subscriber) {\n var obs = obj[Symbol_observable]();\n if (typeof obs.subscribe !== 'function') {\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n }\n else {\n return obs.subscribe(subscriber);\n }\n };\n};\n//# sourceMappingURL=subscribeToObservable.js.map\n","/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */\nimport { hostReportError } from './hostReportError';\nexport var subscribeToPromise = function (promise) {\n return function (subscriber) {\n promise.then(function (value) {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, function (err) { return subscriber.error(err); })\n .then(null, hostReportError);\n return subscriber;\n };\n};\n//# sourceMappingURL=subscribeToPromise.js.map\n","/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport var subscribeToIterable = function (iterable) {\n return function (subscriber) {\n var iterator = iterable[Symbol_iterator]();\n do {\n var item = iterator.next();\n if (item.done) {\n subscriber.complete();\n break;\n }\n subscriber.next(item.value);\n if (subscriber.closed) {\n break;\n }\n } while (true);\n if (typeof iterator.return === 'function') {\n subscriber.add(function () {\n if (iterator.return) {\n iterator.return();\n }\n });\n }\n return subscriber;\n };\n};\n//# sourceMappingURL=subscribeToIterable.js.map\n","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nexport var EMPTY = /*@__PURE__*/ new Observable(function (subscriber) { return subscriber.complete(); });\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });\n}\n//# sourceMappingURL=empty.js.map\n","/** PURE_IMPORTS_START _Observable,_util_subscribeToArray,_scheduled_scheduleArray PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { subscribeToArray } from '../util/subscribeToArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function fromArray(input, scheduler) {\n if (!scheduler) {\n return new Observable(subscribeToArray(input));\n }\n else {\n return scheduleArray(input, scheduler);\n }\n}\n//# sourceMappingURL=fromArray.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function scheduleArray(input, scheduler) {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n var i = 0;\n sub.add(scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n return;\n }\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n sub.add(this.schedule());\n }\n }));\n return sub;\n });\n}\n//# sourceMappingURL=scheduleArray.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from './Subscription';\nvar SubjectSubscription = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SubjectSubscription, _super);\n function SubjectSubscription(subject, subscriber) {\n var _this = _super.call(this) || this;\n _this.subject = subject;\n _this.subscriber = subscriber;\n _this.closed = false;\n return _this;\n }\n SubjectSubscription.prototype.unsubscribe = function () {\n if (this.closed) {\n return;\n }\n this.closed = true;\n var subject = this.subject;\n var observers = subject.observers;\n this.subject = null;\n if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {\n return;\n }\n var subscriberIndex = observers.indexOf(this.subscriber);\n if (subscriberIndex !== -1) {\n observers.splice(subscriberIndex, 1);\n }\n };\n return SubjectSubscription;\n}(Subscription));\nexport { SubjectSubscription };\n//# sourceMappingURL=SubjectSubscription.js.map\n","/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nvar SubjectSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SubjectSubscriber, _super);\n function SubjectSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n return _this;\n }\n return SubjectSubscriber;\n}(Subscriber));\nexport { SubjectSubscriber };\nvar Subject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.observers = [];\n _this.closed = false;\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype[rxSubscriberSymbol] = function () {\n return new SubjectSubscriber(this);\n };\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype.next = function (value) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n if (!this.isStopped) {\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].next(value);\n }\n }\n };\n Subject.prototype.error = function (err) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n this.hasError = true;\n this.thrownError = err;\n this.isStopped = true;\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].error(err);\n }\n this.observers.length = 0;\n };\n Subject.prototype.complete = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n this.isStopped = true;\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].complete();\n }\n this.observers.length = 0;\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = true;\n this.closed = true;\n this.observers = null;\n };\n Subject.prototype._trySubscribe = function (subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else {\n return _super.prototype._trySubscribe.call(this, subscriber);\n }\n };\n Subject.prototype._subscribe = function (subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else if (this.hasError) {\n subscriber.error(this.thrownError);\n return Subscription.EMPTY;\n }\n else if (this.isStopped) {\n subscriber.complete();\n return Subscription.EMPTY;\n }\n else {\n this.observers.push(subscriber);\n return new SubjectSubscription(this, subscriber);\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var destination = this.destination;\n if (destination && destination.next) {\n destination.next(value);\n }\n };\n AnonymousSubject.prototype.error = function (err) {\n var destination = this.destination;\n if (destination && destination.error) {\n this.destination.error(err);\n }\n };\n AnonymousSubject.prototype.complete = function () {\n var destination = this.destination;\n if (destination && destination.complete) {\n this.destination.complete();\n }\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var source = this.source;\n if (source) {\n return this.source.subscribe(subscriber);\n }\n else {\n return Subscription.EMPTY;\n }\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var rxSubscriber = /*@__PURE__*/ (function () {\n return typeof Symbol === 'function'\n ? /*@__PURE__*/ Symbol('rxSubscriber')\n : '@@rxSubscriber_' + /*@__PURE__*/ Math.random();\n})();\nexport var $$rxSubscriber = rxSubscriber;\n//# sourceMappingURL=rxSubscriber.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from './Subscriber';\nvar OuterSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(OuterSubscriber, _super);\n function OuterSubscriber() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n OuterSubscriber.prototype.notifyError = function (error, innerSub) {\n this.destination.error(error);\n };\n OuterSubscriber.prototype.notifyComplete = function (innerSub) {\n this.destination.complete();\n };\n return OuterSubscriber;\n}(Subscriber));\nexport { OuterSubscriber };\n//# sourceMappingURL=OuterSubscriber.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isObject(x) {\n return x !== null && typeof x === 'object';\n}\n//# sourceMappingURL=isObject.js.map\n","/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */\nimport { mergeMap } from './mergeMap';\nexport function concatMap(project, resultSelector) {\n return mergeMap(project, resultSelector, 1);\n}\n//# sourceMappingURL=concatMap.js.map\n","/** PURE_IMPORTS_START _Observable,_util_isArray,_operators_map,_util_isObject,_from PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { map } from '../operators/map';\nimport { isObject } from '../util/isObject';\nimport { from } from './from';\nexport function forkJoin() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n if (sources.length === 1) {\n var first_1 = sources[0];\n if (isArray(first_1)) {\n return forkJoinInternal(first_1, null);\n }\n if (isObject(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {\n var keys = Object.keys(first_1);\n return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);\n }\n }\n if (typeof sources[sources.length - 1] === 'function') {\n var resultSelector_1 = sources.pop();\n sources = (sources.length === 1 && isArray(sources[0])) ? sources[0] : sources;\n return forkJoinInternal(sources, null).pipe(map(function (args) { return resultSelector_1.apply(void 0, args); }));\n }\n return forkJoinInternal(sources, null);\n}\nfunction forkJoinInternal(sources, keys) {\n return new Observable(function (subscriber) {\n var len = sources.length;\n if (len === 0) {\n subscriber.complete();\n return;\n }\n var values = new Array(len);\n var completed = 0;\n var emitted = 0;\n var _loop_1 = function (i) {\n var source = from(sources[i]);\n var hasValue = false;\n subscriber.add(source.subscribe({\n next: function (value) {\n if (!hasValue) {\n hasValue = true;\n emitted++;\n }\n values[i] = value;\n },\n error: function (err) { return subscriber.error(err); },\n complete: function () {\n completed++;\n if (completed === len || !hasValue) {\n if (emitted === len) {\n subscriber.next(keys ?\n keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :\n values);\n }\n subscriber.complete();\n }\n }\n }));\n };\n for (var i = 0; i < len; i++) {\n _loop_1(i);\n }\n });\n}\n//# sourceMappingURL=forkJoin.js.map\n","/**\n * @license Angular v9.1.11\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { __decorate, __metadata, __param, __extends, __assign, __values, __spread } from 'tslib';\nimport { InjectionToken, forwardRef, Directive, Renderer2, ElementRef, Optional, Inject, Self, ɵisPromise, ɵisObservable, Injectable, Input, Injector, ɵlooseIdentical, Host, isDevMode, EventEmitter, SkipSelf, Output, NgModule, Version } from '@angular/core';\nimport { ɵgetDOM } from '@angular/common';\nimport { forkJoin, from } from 'rxjs';\nimport { map } from 'rxjs/operators';\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 provide a `ControlValueAccessor` for form controls.\n *\n * See `DefaultValueAccessor` for how to implement one.\n *\n * @publicApi\n */\nimport * as ɵngcc0 from '@angular/core';\nvar NG_VALUE_ACCESSOR = new InjectionToken('NgValueAccessor');\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 */\nvar CHECKBOX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return CheckboxControlValueAccessor; }),\n multi: true,\n};\n/**\n * @description\n * A `ControlValueAccessor` for writing a value and listening to changes on a checkbox input\n * element.\n *\n * @usageNotes\n *\n * ### Using a checkbox with a reactive form.\n *\n * The following example shows how to use a checkbox with a reactive form.\n *\n * ```ts\n * const rememberLoginControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"checkbox\" [formControl]=\"rememberLoginControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar CheckboxControlValueAccessor = /** @class */ (function () {\n function CheckboxControlValueAccessor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n /**\n * @description\n * The registered callback function called when a change event occurs on the input element.\n */\n this.onChange = function (_) { };\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n this.onTouched = function () { };\n }\n /**\n * Sets the \"checked\" property on the input element.\n *\n * @param value The checked value\n */\n CheckboxControlValueAccessor.prototype.writeValue = function (value) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'checked', value);\n };\n /**\n * @description\n * Registers a function called when the control value changes.\n *\n * @param fn The callback function\n */\n CheckboxControlValueAccessor.prototype.registerOnChange = function (fn) {\n this.onChange = fn;\n };\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n CheckboxControlValueAccessor.prototype.registerOnTouched = function (fn) {\n this.onTouched = fn;\n };\n /**\n * Sets the \"disabled\" property on the input element.\n *\n * @param isDisabled The disabled value\n */\n CheckboxControlValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n CheckboxControlValueAccessor = __decorate([ __metadata(\"design:paramtypes\", [Renderer2, ElementRef])\n ], CheckboxControlValueAccessor);\nCheckboxControlValueAccessor.ɵfac = function CheckboxControlValueAccessor_Factory(t) { return new (t || CheckboxControlValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nCheckboxControlValueAccessor.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: CheckboxControlValueAccessor, selectors: [[\"input\", \"type\", \"checkbox\", \"formControlName\", \"\"], [\"input\", \"type\", \"checkbox\", \"formControl\", \"\"], [\"input\", \"type\", \"checkbox\", \"ngModel\", \"\"]], hostBindings: function CheckboxControlValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"change\", function CheckboxControlValueAccessor_change_HostBindingHandler($event) { return ctx.onChange($event.target.checked); })(\"blur\", function CheckboxControlValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });\n } }, features: [ɵngcc0.ɵɵProvidersFeature([CHECKBOX_VALUE_ACCESSOR])] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(CheckboxControlValueAccessor, [{\n type: Directive,\n args: [{\n selector: 'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]',\n host: { '(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()' },\n providers: [CHECKBOX_VALUE_ACCESSOR]\n }]\n }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }]; }, null); })();\n return CheckboxControlValueAccessor;\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 */\nvar DEFAULT_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return DefaultValueAccessor; }),\n multi: true\n};\n/**\n * We must check whether the agent is Android because composition events\n * behave differently between iOS and Android.\n */\nfunction _isAndroid() {\n var userAgent = ɵgetDOM() ? ɵgetDOM().getUserAgent() : '';\n return /android (\\d+)/.test(userAgent.toLowerCase());\n}\n/**\n * @description\n * Provide this token to control if form directives buffer IME input until\n * the \"compositionend\" event occurs.\n * @publicApi\n */\nvar COMPOSITION_BUFFER_MODE = new InjectionToken('CompositionEventMode');\n/**\n * @description\n * The default `ControlValueAccessor` for writing a value and listening to changes on input\n * elements. The accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using the default value accessor\n *\n * The following example shows how to use an input element that activates the default value accessor\n * (in this case, a text field).\n *\n * ```ts\n * const firstNameControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"text\" [formControl]=\"firstNameControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar DefaultValueAccessor = /** @class */ (function () {\n function DefaultValueAccessor(_renderer, _elementRef, _compositionMode) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n this._compositionMode = _compositionMode;\n /**\n * @description\n * The registered callback function called when an input event occurs on the input element.\n */\n this.onChange = function (_) { };\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n this.onTouched = function () { };\n /** Whether the user is creating a composition string (IME events). */\n this._composing = false;\n if (this._compositionMode == null) {\n this._compositionMode = !_isAndroid();\n }\n }\n /**\n * Sets the \"value\" property on the input element.\n *\n * @param value The checked value\n */\n DefaultValueAccessor.prototype.writeValue = function (value) {\n var normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n };\n /**\n * @description\n * Registers a function called when the control value changes.\n *\n * @param fn The callback function\n */\n DefaultValueAccessor.prototype.registerOnChange = function (fn) {\n this.onChange = fn;\n };\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n DefaultValueAccessor.prototype.registerOnTouched = function (fn) {\n this.onTouched = fn;\n };\n /**\n * Sets the \"disabled\" property on the input element.\n *\n * @param isDisabled The disabled value\n */\n DefaultValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n /** @internal */\n DefaultValueAccessor.prototype._handleInput = function (value) {\n if (!this._compositionMode || (this._compositionMode && !this._composing)) {\n this.onChange(value);\n }\n };\n /** @internal */\n DefaultValueAccessor.prototype._compositionStart = function () {\n this._composing = true;\n };\n /** @internal */\n DefaultValueAccessor.prototype._compositionEnd = function (value) {\n this._composing = false;\n this._compositionMode && this.onChange(value);\n };\n DefaultValueAccessor = __decorate([ __param(2, Optional()), __param(2, Inject(COMPOSITION_BUFFER_MODE)),\n __metadata(\"design:paramtypes\", [Renderer2, ElementRef, Boolean])\n ], DefaultValueAccessor);\nDefaultValueAccessor.ɵfac = function DefaultValueAccessor_Factory(t) { return new (t || DefaultValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(COMPOSITION_BUFFER_MODE, 8)); };\nDefaultValueAccessor.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: DefaultValueAccessor, selectors: [[\"input\", \"formControlName\", \"\", 3, \"type\", \"checkbox\"], [\"textarea\", \"formControlName\", \"\"], [\"input\", \"formControl\", \"\", 3, \"type\", \"checkbox\"], [\"textarea\", \"formControl\", \"\"], [\"input\", \"ngModel\", \"\", 3, \"type\", \"checkbox\"], [\"textarea\", \"ngModel\", \"\"], [\"\", \"ngDefaultControl\", \"\"]], hostBindings: function DefaultValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"input\", function DefaultValueAccessor_input_HostBindingHandler($event) { return ctx._handleInput($event.target.value); })(\"blur\", function DefaultValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); })(\"compositionstart\", function DefaultValueAccessor_compositionstart_HostBindingHandler() { return ctx._compositionStart(); })(\"compositionend\", function DefaultValueAccessor_compositionend_HostBindingHandler($event) { return ctx._compositionEnd($event.target.value); });\n } }, features: [ɵngcc0.ɵɵProvidersFeature([DEFAULT_VALUE_ACCESSOR])] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(DefaultValueAccessor, [{\n type: Directive,\n args: [{\n selector: 'input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]',\n // TODO: vsavkin replace the above selector with the one below it once\n // https://github.com/angular/angular/issues/3011 is implemented\n // selector: '[ngModel],[formControl],[formControlName]',\n host: {\n '(input)': '$any(this)._handleInput($event.target.value)',\n '(blur)': 'onTouched()',\n '(compositionstart)': '$any(this)._compositionStart()',\n '(compositionend)': '$any(this)._compositionEnd($event.target.value)'\n },\n providers: [DEFAULT_VALUE_ACCESSOR]\n }]\n }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }, { type: Boolean, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [COMPOSITION_BUFFER_MODE]\n }] }]; }, null); })();\n return DefaultValueAccessor;\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 * Base class for control directives.\n *\n * This class is only used internally in the `ReactiveFormsModule` and the `FormsModule`.\n *\n * @publicApi\n */\nvar AbstractControlDirective = /** @class */ (function () {\n function AbstractControlDirective() {\n }\n Object.defineProperty(AbstractControlDirective.prototype, \"value\", {\n /**\n * @description\n * Reports the value of the control if it is present, otherwise null.\n */\n get: function () {\n return this.control ? this.control.value : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"valid\", {\n /**\n * @description\n * Reports whether the control is valid. A control is considered valid if no\n * validation errors exist with the current value.\n * If the control is not present, null is returned.\n */\n get: function () {\n return this.control ? this.control.valid : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"invalid\", {\n /**\n * @description\n * Reports whether the control is invalid, meaning that an error exists in the input value.\n * If the control is not present, null is returned.\n */\n get: function () {\n return this.control ? this.control.invalid : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"pending\", {\n /**\n * @description\n * Reports whether a control is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value. If the control is not present, null is\n * returned.\n */\n get: function () {\n return this.control ? this.control.pending : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"disabled\", {\n /**\n * @description\n * Reports whether the control is disabled, meaning that the control is disabled\n * in the UI and is exempt from validation checks and excluded from aggregate\n * values of ancestor controls. If the control is not present, null is returned.\n */\n get: function () {\n return this.control ? this.control.disabled : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"enabled\", {\n /**\n * @description\n * Reports whether the control is enabled, meaning that the control is included in ancestor\n * calculations of validity or value. If the control is not present, null is returned.\n */\n get: function () {\n return this.control ? this.control.enabled : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"errors\", {\n /**\n * @description\n * Reports the control's validation errors. If the control is not present, null is returned.\n */\n get: function () {\n return this.control ? this.control.errors : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"pristine\", {\n /**\n * @description\n * Reports whether the control is pristine, meaning that the user has not yet changed\n * the value in the UI. If the control is not present, null is returned.\n */\n get: function () {\n return this.control ? this.control.pristine : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"dirty\", {\n /**\n * @description\n * Reports whether the control is dirty, meaning that the user has changed\n * the value in the UI. If the control is not present, null is returned.\n */\n get: function () {\n return this.control ? this.control.dirty : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"touched\", {\n /**\n * @description\n * Reports whether the control is touched, meaning that the user has triggered\n * a `blur` event on it. If the control is not present, null is returned.\n */\n get: function () {\n return this.control ? this.control.touched : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"status\", {\n /**\n * @description\n * Reports the validation status of the control. Possible values include:\n * 'VALID', 'INVALID', 'DISABLED', and 'PENDING'.\n * If the control is not present, null is returned.\n */\n get: function () {\n return this.control ? this.control.status : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"untouched\", {\n /**\n * @description\n * Reports whether the control is untouched, meaning that the user has not yet triggered\n * a `blur` event on it. If the control is not present, null is returned.\n */\n get: function () {\n return this.control ? this.control.untouched : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"statusChanges\", {\n /**\n * @description\n * Returns a multicasting observable that emits a validation status whenever it is\n * calculated for the control. If the control is not present, null is returned.\n */\n get: function () {\n return this.control ? this.control.statusChanges : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"valueChanges\", {\n /**\n * @description\n * Returns a multicasting observable of value changes for the control that emits every time the\n * value of the control changes in the UI or programmatically.\n * If the control is not present, null is returned.\n */\n get: function () {\n return this.control ? this.control.valueChanges : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"path\", {\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get: function () {\n return null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @description\n * Resets the control with the provided value if the control is present.\n */\n AbstractControlDirective.prototype.reset = function (value) {\n if (value === void 0) { value = undefined; }\n if (this.control)\n this.control.reset(value);\n };\n /**\n * @description\n * Reports whether the control with the given path has the error specified.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * If no path is given, this method checks for the error on the current control.\n *\n * @returns whether the given error is present in the control at the given path.\n *\n * If the control is not present, false is returned.\n */\n AbstractControlDirective.prototype.hasError = function (errorCode, path) {\n return this.control ? this.control.hasError(errorCode, path) : false;\n };\n /**\n * @description\n * Reports error data for the control with the given path.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * @returns error data for that particular error. If the control or error is not present,\n * null is returned.\n */\n AbstractControlDirective.prototype.getError = function (errorCode, path) {\n return this.control ? this.control.getError(errorCode, path) : null;\n };\nAbstractControlDirective.ɵfac = function AbstractControlDirective_Factory(t) { return new (t || AbstractControlDirective)(); };\nAbstractControlDirective.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: AbstractControlDirective });\n\n return AbstractControlDirective;\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 * A base class for directives that contain multiple registered instances of `NgControl`.\n * Only used by the forms module.\n *\n * @publicApi\n */\nvar ControlContainer = /** @class */ (function (_super) {\n __extends(ControlContainer, _super);\n function ControlContainer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(ControlContainer.prototype, \"formDirective\", {\n /**\n * @description\n * The top-level form directive for the control.\n */\n get: function () {\n return null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ControlContainer.prototype, \"path\", {\n /**\n * @description\n * The path to this group.\n */\n get: function () {\n return null;\n },\n enumerable: true,\n configurable: true\n });\nControlContainer.ɵfac = function ControlContainer_Factory(t) { return ɵControlContainer_BaseFactory(t || ControlContainer); };\nControlContainer.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: ControlContainer, features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\nvar ɵControlContainer_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(ControlContainer);\n return ControlContainer;\n}(AbstractControlDirective));\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 */\nfunction unimplemented() {\n throw new Error('unimplemented');\n}\n/**\n * @description\n * A base class that all control `FormControl`-based directives extend. It binds a `FormControl`\n * object to a DOM element.\n *\n * @publicApi\n */\nvar NgControl = /** @class */ (function (_super) {\n __extends(NgControl, _super);\n function NgControl() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * @description\n * The parent form for the control.\n *\n * @internal\n */\n _this._parent = null;\n /**\n * @description\n * The name for the control\n */\n _this.name = null;\n /**\n * @description\n * The value accessor for the control\n */\n _this.valueAccessor = null;\n /**\n * @description\n * The uncomposed array of synchronous validators for the control\n *\n * @internal\n */\n _this._rawValidators = [];\n /**\n * @description\n * The uncomposed array of async validators for the control\n *\n * @internal\n */\n _this._rawAsyncValidators = [];\n return _this;\n }\n Object.defineProperty(NgControl.prototype, \"validator\", {\n /**\n * @description\n * The registered synchronous validator function for the control\n *\n * @throws An exception that this method is not implemented\n */\n get: function () {\n return unimplemented();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgControl.prototype, \"asyncValidator\", {\n /**\n * @description\n * The registered async validator function for the control\n *\n * @throws An exception that this method is not implemented\n */\n get: function () {\n return unimplemented();\n },\n enumerable: true,\n configurable: true\n });\n return NgControl;\n}(AbstractControlDirective));\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 */\nvar AbstractControlStatus = /** @class */ (function () {\n function AbstractControlStatus(cd) {\n this._cd = cd;\n }\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassUntouched\", {\n get: function () {\n return this._cd.control ? this._cd.control.untouched : false;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassTouched\", {\n get: function () {\n return this._cd.control ? this._cd.control.touched : false;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassPristine\", {\n get: function () {\n return this._cd.control ? this._cd.control.pristine : false;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassDirty\", {\n get: function () {\n return this._cd.control ? this._cd.control.dirty : false;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassValid\", {\n get: function () {\n return this._cd.control ? this._cd.control.valid : false;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassInvalid\", {\n get: function () {\n return this._cd.control ? this._cd.control.invalid : false;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassPending\", {\n get: function () {\n return this._cd.control ? this._cd.control.pending : false;\n },\n enumerable: true,\n configurable: true\n });\n return AbstractControlStatus;\n}());\nvar ngControlStatusHost = {\n '[class.ng-untouched]': 'ngClassUntouched',\n '[class.ng-touched]': 'ngClassTouched',\n '[class.ng-pristine]': 'ngClassPristine',\n '[class.ng-dirty]': 'ngClassDirty',\n '[class.ng-valid]': 'ngClassValid',\n '[class.ng-invalid]': 'ngClassInvalid',\n '[class.ng-pending]': 'ngClassPending',\n};\n/**\n * @description\n * Directive automatically applied to Angular form controls that sets CSS classes\n * based on control status.\n *\n * @usageNotes\n *\n * ### CSS classes applied\n *\n * The following classes are applied as the properties become true:\n *\n * * ng-valid\n * * ng-invalid\n * * ng-pending\n * * ng-pristine\n * * ng-dirty\n * * ng-untouched\n * * ng-touched\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar NgControlStatus = /** @class */ (function (_super) {\n __extends(NgControlStatus, _super);\n function NgControlStatus(cd) {\n return _super.call(this, cd) || this;\n }\n NgControlStatus = __decorate([ __param(0, Self()),\n __metadata(\"design:paramtypes\", [NgControl])\n ], NgControlStatus);\nNgControlStatus.ɵfac = function NgControlStatus_Factory(t) { return new (t || NgControlStatus)(ɵngcc0.ɵɵdirectiveInject(NgControl, 2)); };\nNgControlStatus.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgControlStatus, selectors: [[\"\", \"formControlName\", \"\"], [\"\", \"ngModel\", \"\"], [\"\", \"formControl\", \"\"]], hostVars: 14, hostBindings: function NgControlStatus_HostBindings(rf, ctx) { if (rf & 2) {\n ɵngcc0.ɵɵclassProp(\"ng-untouched\", ctx.ngClassUntouched)(\"ng-touched\", ctx.ngClassTouched)(\"ng-pristine\", ctx.ngClassPristine)(\"ng-dirty\", ctx.ngClassDirty)(\"ng-valid\", ctx.ngClassValid)(\"ng-invalid\", ctx.ngClassInvalid)(\"ng-pending\", ctx.ngClassPending);\n } }, features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgControlStatus, [{\n type: Directive,\n args: [{ selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost }]\n }], function () { return [{ type: NgControl, decorators: [{\n type: Self\n }] }]; }, null); })();\n return NgControlStatus;\n}(AbstractControlStatus));\n/**\n * @description\n * Directive automatically applied to Angular form groups that sets CSS classes\n * based on control status (valid/invalid/dirty/etc).\n *\n * @see `NgControlStatus`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar NgControlStatusGroup = /** @class */ (function (_super) {\n __extends(NgControlStatusGroup, _super);\n function NgControlStatusGroup(cd) {\n return _super.call(this, cd) || this;\n }\n NgControlStatusGroup = __decorate([ __param(0, Self()),\n __metadata(\"design:paramtypes\", [ControlContainer])\n ], NgControlStatusGroup);\nNgControlStatusGroup.ɵfac = function NgControlStatusGroup_Factory(t) { return new (t || NgControlStatusGroup)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 2)); };\nNgControlStatusGroup.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgControlStatusGroup, selectors: [[\"\", \"formGroupName\", \"\"], [\"\", \"formArrayName\", \"\"], [\"\", \"ngModelGroup\", \"\"], [\"\", \"formGroup\", \"\"], [\"form\", 3, \"ngNoForm\", \"\"], [\"\", \"ngForm\", \"\"]], hostVars: 14, hostBindings: function NgControlStatusGroup_HostBindings(rf, ctx) { if (rf & 2) {\n ɵngcc0.ɵɵclassProp(\"ng-untouched\", ctx.ngClassUntouched)(\"ng-touched\", ctx.ngClassTouched)(\"ng-pristine\", ctx.ngClassPristine)(\"ng-dirty\", ctx.ngClassDirty)(\"ng-valid\", ctx.ngClassValid)(\"ng-invalid\", ctx.ngClassInvalid)(\"ng-pending\", ctx.ngClassPending);\n } }, features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgControlStatusGroup, [{\n type: Directive,\n args: [{\n selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',\n host: ngControlStatusHost\n }]\n }], function () { return [{ type: ControlContainer, decorators: [{\n type: Self\n }] }]; }, null); })();\n return NgControlStatusGroup;\n}(AbstractControlStatus));\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 */\nfunction isEmptyInputValue(value) {\n // we don't check for string here so it also works with arrays\n return value == null || value.length === 0;\n}\n/**\n * @description\n * An `InjectionToken` for registering additional synchronous validators used with\n * `AbstractControl`s.\n *\n * @see `NG_ASYNC_VALIDATORS`\n *\n * @usageNotes\n *\n * ### Providing a custom validator\n *\n * The following example registers a custom validator directive. Adding the validator to the\n * existing collection of validators requires the `multi: true` option.\n *\n * ```typescript\n * @Directive({\n * selector: '[customValidator]',\n * providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n * validate(control: AbstractControl): ValidationErrors | null {\n * return { 'custom': true };\n * }\n * }\n * ```\n *\n * @publicApi\n */\nvar NG_VALIDATORS = new InjectionToken('NgValidators');\n/**\n * @description\n * An `InjectionToken` for registering additional asynchronous validators used with\n * `AbstractControl`s.\n *\n * @see `NG_VALIDATORS`\n *\n * @publicApi\n */\nvar NG_ASYNC_VALIDATORS = new InjectionToken('NgAsyncValidators');\n/**\n * A regular expression that matches valid e-mail addresses.\n *\n * At a high level, this regexp matches e-mail addresses of the format `local-part@tld`, where:\n * - `local-part` consists of one or more of the allowed characters (alphanumeric and some\n * punctuation symbols).\n * - `local-part` cannot begin or end with a period (`.`).\n * - `local-part` cannot be longer than 64 characters.\n * - `tld` consists of one or more `labels` separated by periods (`.`). For example `localhost` or\n * `foo.com`.\n * - A `label` consists of one or more of the allowed characters (alphanumeric, dashes (`-`) and\n * periods (`.`)).\n * - A `label` cannot begin or end with a dash (`-`) or a period (`.`).\n * - A `label` cannot be longer than 63 characters.\n * - The whole address cannot be longer than 254 characters.\n *\n * ## Implementation background\n *\n * This regexp was ported over from AngularJS (see there for git history):\n * https://github.com/angular/angular.js/blob/c133ef836/src/ng/directive/input.js#L27\n * It is based on the\n * [WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address). The main differences from the WHATWG version are:\n * - Disallow `local-part` to begin or end with a period (`.`).\n * - Disallow `local-part` length to exceed 64 characters.\n * - Disallow total address length to exceed 254 characters.\n *\n * See [this commit](https://github.com/angular/angular.js/commit/f3f5cf72e) for more details.\n */\nvar EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n/**\n * @description\n * Provides a set of built-in validators that can be used by form controls.\n *\n * A validator is a function that processes a `FormControl` or collection of\n * controls and returns an error map or null. A null map means that validation has passed.\n *\n * @see [Form Validation](/guide/form-validation)\n *\n * @publicApi\n */\nvar Validators = /** @class */ (function () {\n function Validators() {\n }\n /**\n * @description\n * Validator that requires the control's value to be greater than or equal to the provided number.\n * The validator exists only as a function and not as a directive.\n *\n * @usageNotes\n *\n * ### Validate against a minimum of 3\n *\n * ```typescript\n * const control = new FormControl(2, Validators.min(3));\n *\n * console.log(control.errors); // {min: {min: 3, actual: 2}}\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `min` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n Validators.min = function (min) {\n return function (control) {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(min)) {\n return null; // don't validate empty values to allow optional controls\n }\n var value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // minimum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-min\n return !isNaN(value) && value < min ? { 'min': { 'min': min, 'actual': control.value } } : null;\n };\n };\n /**\n * @description\n * Validator that requires the control's value to be less than or equal to the provided number.\n * The validator exists only as a function and not as a directive.\n *\n * @usageNotes\n *\n * ### Validate against a maximum of 15\n *\n * ```typescript\n * const control = new FormControl(16, Validators.max(15));\n *\n * console.log(control.errors); // {max: {max: 15, actual: 16}}\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `max` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n Validators.max = function (max) {\n return function (control) {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n return null; // don't validate empty values to allow optional controls\n }\n var value = parseFloat(control.value);\n // Controls with NaN values after parsing should be treated as not having a\n // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max\n return !isNaN(value) && value > max ? { 'max': { 'max': max, 'actual': control.value } } : null;\n };\n };\n /**\n * @description\n * Validator that requires the control have a non-empty value.\n *\n * @usageNotes\n *\n * ### Validate that the field is non-empty\n *\n * ```typescript\n * const control = new FormControl('', Validators.required);\n *\n * console.log(control.errors); // {required: true}\n * ```\n *\n * @returns An error map with the `required` property\n * if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n Validators.required = function (control) {\n return isEmptyInputValue(control.value) ? { 'required': true } : null;\n };\n /**\n * @description\n * Validator that requires the control's value be true. This validator is commonly\n * used for required checkboxes.\n *\n * @usageNotes\n *\n * ### Validate that the field value is true\n *\n * ```typescript\n * const control = new FormControl('', Validators.requiredTrue);\n *\n * console.log(control.errors); // {required: true}\n * ```\n *\n * @returns An error map that contains the `required` property\n * set to `true` if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n Validators.requiredTrue = function (control) {\n return control.value === true ? null : { 'required': true };\n };\n /**\n * @description\n * Validator that requires the control's value pass an email validation test.\n *\n * Tests the value using a [regular\n * expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)\n * pattern suitable for common usecases. The pattern is based on the definition of a valid email\n * address in the [WHATWG HTML\n * specification](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address).\n *\n * The differences from the WHATWG version include:\n * - Disallow `local-part` (the part before the `@` symbol) to begin or end with a period (`.`).\n * - Disallow `local-part` to be longer than 64 characters.\n * - Disallow the whole address to be longer than 254 characters.\n *\n * If this pattern does not satisfy your business needs, you can use `Validators.pattern()` to\n * validate the value against a different pattern.\n *\n * @usageNotes\n *\n * ### Validate that the field matches a valid email pattern\n *\n * ```typescript\n * const control = new FormControl('bad@', Validators.email);\n *\n * console.log(control.errors); // {email: true}\n * ```\n *\n * @returns An error map with the `email` property\n * if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n Validators.email = function (control) {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n return EMAIL_REGEXP.test(control.value) ? null : { 'email': true };\n };\n /**\n * @description\n * Validator that requires the length of the control's value to be greater than or equal\n * to the provided minimum length. This validator is also provided by default if you use the\n * the HTML5 `minlength` attribute. Note that the `minLength` validator is intended to be used\n * only for types that have a numeric `length` property, such as strings or arrays. The\n * `minLength` validator logic is also not invoked for values when their `length` property is 0\n * (for example in case of an empty string or an empty array), to support optional controls. You\n * can use the standard `required` validator if empty values should not be considered valid.\n *\n * @usageNotes\n *\n * ### Validate that the field has a minimum of 3 characters\n *\n * ```typescript\n * const control = new FormControl('ng', Validators.minLength(3));\n *\n * console.log(control.errors); // {minlength: {requiredLength: 3, actualLength: 2}}\n * ```\n *\n * ```html\n * <input minlength=\"5\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `minlength` if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n Validators.minLength = function (minLength) {\n return function (control) {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n var length = control.value ? control.value.length : 0;\n return length < minLength ?\n { 'minlength': { 'requiredLength': minLength, 'actualLength': length } } :\n null;\n };\n };\n /**\n * @description\n * Validator that requires the length of the control's value to be less than or equal\n * to the provided maximum length. This validator is also provided by default if you use the\n * the HTML5 `maxlength` attribute. Note that the `maxLength` validator is intended to be used\n * only for types that have a numeric `length` property, such as strings or arrays.\n *\n * @usageNotes\n *\n * ### Validate that the field has maximum of 5 characters\n *\n * ```typescript\n * const control = new FormControl('Angular', Validators.maxLength(5));\n *\n * console.log(control.errors); // {maxlength: {requiredLength: 5, actualLength: 7}}\n * ```\n *\n * ```html\n * <input maxlength=\"5\">\n * ```\n *\n * @returns A validator function that returns an error map with the\n * `maxlength` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n Validators.maxLength = function (maxLength) {\n return function (control) {\n var length = control.value ? control.value.length : 0;\n return length > maxLength ?\n { 'maxlength': { 'requiredLength': maxLength, 'actualLength': length } } :\n null;\n };\n };\n /**\n * @description\n * Validator that requires the control's value to match a regex pattern. This validator is also\n * provided by default if you use the HTML5 `pattern` attribute.\n *\n * @usageNotes\n *\n * ### Validate that the field only contains letters or spaces\n *\n * ```typescript\n * const control = new FormControl('1', Validators.pattern('[a-zA-Z ]*'));\n *\n * console.log(control.errors); // {pattern: {requiredPattern: '^[a-zA-Z ]*$', actualValue: '1'}}\n * ```\n *\n * ```html\n * <input pattern=\"[a-zA-Z ]*\">\n * ```\n *\n * @param pattern A regular expression to be used as is to test the values, or a string.\n * If a string is passed, the `^` character is prepended and the `$` character is\n * appended to the provided string (if not already present), and the resulting regular\n * expression is used to test the values.\n *\n * @returns A validator function that returns an error map with the\n * `pattern` property if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n Validators.pattern = function (pattern) {\n if (!pattern)\n return Validators.nullValidator;\n var regex;\n var regexStr;\n if (typeof pattern === 'string') {\n regexStr = '';\n if (pattern.charAt(0) !== '^')\n regexStr += '^';\n regexStr += pattern;\n if (pattern.charAt(pattern.length - 1) !== '$')\n regexStr += '$';\n regex = new RegExp(regexStr);\n }\n else {\n regexStr = pattern.toString();\n regex = pattern;\n }\n return function (control) {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n var value = control.value;\n return regex.test(value) ? null :\n { 'pattern': { 'requiredPattern': regexStr, 'actualValue': value } };\n };\n };\n /**\n * @description\n * Validator that performs no operation.\n *\n * @see `updateValueAndValidity()`\n *\n */\n Validators.nullValidator = function (control) {\n return null;\n };\n Validators.compose = function (validators) {\n if (!validators)\n return null;\n var presentValidators = validators.filter(isPresent);\n if (presentValidators.length == 0)\n return null;\n return function (control) {\n return _mergeErrors(_executeValidators(control, presentValidators));\n };\n };\n /**\n * @description\n * Compose multiple async validators into a single function that returns the union\n * of the individual error objects for the provided control.\n *\n * @returns A validator function that returns an error map with the\n * merged error objects of the async validators if the validation check fails, otherwise `null`.\n *\n * @see `updateValueAndValidity()`\n *\n */\n Validators.composeAsync = function (validators) {\n if (!validators)\n return null;\n var presentValidators = validators.filter(isPresent);\n if (presentValidators.length == 0)\n return null;\n return function (control) {\n var observables = _executeAsyncValidators(control, presentValidators).map(toObservable);\n return forkJoin(observables).pipe(map(_mergeErrors));\n };\n };\n return Validators;\n}());\nfunction isPresent(o) {\n return o != null;\n}\nfunction toObservable(r) {\n var obs = ɵisPromise(r) ? from(r) : r;\n if (!(ɵisObservable(obs))) {\n throw new Error(\"Expected validator to return Promise or Observable.\");\n }\n return obs;\n}\nfunction _executeValidators(control, validators) {\n return validators.map(function (v) { return v(control); });\n}\nfunction _executeAsyncValidators(control, validators) {\n return validators.map(function (v) { return v(control); });\n}\nfunction _mergeErrors(arrayOfErrors) {\n var res = {};\n // Not using Array.reduce here due to a Chrome 80 bug\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\n arrayOfErrors.forEach(function (errors) {\n res = errors != null ? __assign(__assign({}, res), errors) : res;\n });\n return Object.keys(res).length === 0 ? null : 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 */\nfunction normalizeValidator(validator) {\n if (validator.validate) {\n return function (c) { return validator.validate(c); };\n }\n else {\n return validator;\n }\n}\nfunction normalizeAsyncValidator(validator) {\n if (validator.validate) {\n return function (c) { return validator.validate(c); };\n }\n else {\n return validator;\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 */\nvar NUMBER_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return NumberValueAccessor; }),\n multi: true\n};\n/**\n * @description\n * The `ControlValueAccessor` for writing a number value and listening to number input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a number input with a reactive form.\n *\n * The following example shows how to use a number input with a reactive form.\n *\n * ```ts\n * const totalCountControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"number\" [formControl]=\"totalCountControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar NumberValueAccessor = /** @class */ (function () {\n function NumberValueAccessor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n /**\n * @description\n * The registered callback function called when a change or input event occurs on the input\n * element.\n */\n this.onChange = function (_) { };\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n this.onTouched = function () { };\n }\n /**\n * Sets the \"value\" property on the input element.\n *\n * @param value The checked value\n */\n NumberValueAccessor.prototype.writeValue = function (value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n var normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n };\n /**\n * @description\n * Registers a function called when the control value changes.\n *\n * @param fn The callback function\n */\n NumberValueAccessor.prototype.registerOnChange = function (fn) {\n this.onChange = function (value) {\n fn(value == '' ? null : parseFloat(value));\n };\n };\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n NumberValueAccessor.prototype.registerOnTouched = function (fn) {\n this.onTouched = fn;\n };\n /**\n * Sets the \"disabled\" property on the input element.\n *\n * @param isDisabled The disabled value\n */\n NumberValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n NumberValueAccessor = __decorate([ __metadata(\"design:paramtypes\", [Renderer2, ElementRef])\n ], NumberValueAccessor);\nNumberValueAccessor.ɵfac = function NumberValueAccessor_Factory(t) { return new (t || NumberValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nNumberValueAccessor.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NumberValueAccessor, selectors: [[\"input\", \"type\", \"number\", \"formControlName\", \"\"], [\"input\", \"type\", \"number\", \"formControl\", \"\"], [\"input\", \"type\", \"number\", \"ngModel\", \"\"]], hostBindings: function NumberValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"change\", function NumberValueAccessor_change_HostBindingHandler($event) { return ctx.onChange($event.target.value); })(\"input\", function NumberValueAccessor_input_HostBindingHandler($event) { return ctx.onChange($event.target.value); })(\"blur\", function NumberValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });\n } }, features: [ɵngcc0.ɵɵProvidersFeature([NUMBER_VALUE_ACCESSOR])] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NumberValueAccessor, [{\n type: Directive,\n args: [{\n selector: 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',\n host: {\n '(change)': 'onChange($event.target.value)',\n '(input)': 'onChange($event.target.value)',\n '(blur)': 'onTouched()'\n },\n providers: [NUMBER_VALUE_ACCESSOR]\n }]\n }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }]; }, null); })();\n return NumberValueAccessor;\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 */\nvar RADIO_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return RadioControlValueAccessor; }),\n multi: true\n};\n/**\n * @description\n * Class used by Angular to track radio buttons. For internal use only.\n */\nvar RadioControlRegistry = /** @class */ (function () {\n function RadioControlRegistry() {\n this._accessors = [];\n }\n /**\n * @description\n * Adds a control to the internal registry. For internal use only.\n */\n RadioControlRegistry.prototype.add = function (control, accessor) {\n this._accessors.push([control, accessor]);\n };\n /**\n * @description\n * Removes a control from the internal registry. For internal use only.\n */\n RadioControlRegistry.prototype.remove = function (accessor) {\n for (var i = this._accessors.length - 1; i >= 0; --i) {\n if (this._accessors[i][1] === accessor) {\n this._accessors.splice(i, 1);\n return;\n }\n }\n };\n /**\n * @description\n * Selects a radio button. For internal use only.\n */\n RadioControlRegistry.prototype.select = function (accessor) {\n var _this = this;\n this._accessors.forEach(function (c) {\n if (_this._isSameGroup(c, accessor) && c[1] !== accessor) {\n c[1].fireUncheck(accessor.value);\n }\n });\n };\n RadioControlRegistry.prototype._isSameGroup = function (controlPair, accessor) {\n if (!controlPair[0].control)\n return false;\n return controlPair[0]._parent === accessor._control._parent &&\n controlPair[1].name === accessor.name;\n };\nRadioControlRegistry.ɵfac = function RadioControlRegistry_Factory(t) { return new (t || RadioControlRegistry)(); };\nRadioControlRegistry.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: RadioControlRegistry, factory: function (t) { return RadioControlRegistry.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(RadioControlRegistry, [{\n type: Injectable\n }], function () { return []; }, null); })();\n return RadioControlRegistry;\n}());\n/**\n * @description\n * The `ControlValueAccessor` for writing radio control values and listening to radio control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using radio buttons with reactive form directives\n *\n * The follow example shows how to use radio buttons in a reactive form. When using radio buttons in\n * a reactive form, radio buttons in the same group should have the same `formControlName`.\n * Providing a `name` attribute is optional.\n *\n * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar RadioControlValueAccessor = /** @class */ (function () {\n function RadioControlValueAccessor(_renderer, _elementRef, _registry, _injector) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n this._registry = _registry;\n this._injector = _injector;\n /**\n * @description\n * The registered callback function called when a change event occurs on the input element.\n */\n this.onChange = function () { };\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n this.onTouched = function () { };\n }\n /**\n * @description\n * A lifecycle method called when the directive is initialized. For internal use only.\n */\n RadioControlValueAccessor.prototype.ngOnInit = function () {\n this._control = this._injector.get(NgControl);\n this._checkName();\n this._registry.add(this._control, this);\n };\n /**\n * @description\n * Lifecycle method called before the directive's instance is destroyed. For internal use only.\n */\n RadioControlValueAccessor.prototype.ngOnDestroy = function () {\n this._registry.remove(this);\n };\n /**\n * @description\n * Sets the \"checked\" property value on the radio input element.\n *\n * @param value The checked value\n */\n RadioControlValueAccessor.prototype.writeValue = function (value) {\n this._state = value === this.value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'checked', this._state);\n };\n /**\n * @description\n * Registers a function called when the control value changes.\n *\n * @param fn The callback function\n */\n RadioControlValueAccessor.prototype.registerOnChange = function (fn) {\n var _this = this;\n this._fn = fn;\n this.onChange = function () {\n fn(_this.value);\n _this._registry.select(_this);\n };\n };\n /**\n * Sets the \"value\" on the radio input element and unchecks it.\n *\n * @param value\n */\n RadioControlValueAccessor.prototype.fireUncheck = function (value) {\n this.writeValue(value);\n };\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n RadioControlValueAccessor.prototype.registerOnTouched = function (fn) {\n this.onTouched = fn;\n };\n /**\n * Sets the \"disabled\" property on the input element.\n *\n * @param isDisabled The disabled value\n */\n RadioControlValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n RadioControlValueAccessor.prototype._checkName = function () {\n if (this.name && this.formControlName && this.name !== this.formControlName) {\n this._throwNameError();\n }\n if (!this.name && this.formControlName)\n this.name = this.formControlName;\n };\n RadioControlValueAccessor.prototype._throwNameError = function () {\n throw new Error(\"\\n If you define both a name and a formControlName attribute on your radio button, their values\\n must match. Ex: <input type=\\\"radio\\\" formControlName=\\\"food\\\" name=\\\"food\\\">\\n \");\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], RadioControlValueAccessor.prototype, \"name\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], RadioControlValueAccessor.prototype, \"formControlName\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], RadioControlValueAccessor.prototype, \"value\", void 0);\n RadioControlValueAccessor = __decorate([ __metadata(\"design:paramtypes\", [Renderer2, ElementRef,\n RadioControlRegistry, Injector])\n ], RadioControlValueAccessor);\nRadioControlValueAccessor.ɵfac = function RadioControlValueAccessor_Factory(t) { return new (t || RadioControlValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(RadioControlRegistry), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Injector)); };\nRadioControlValueAccessor.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: RadioControlValueAccessor, selectors: [[\"input\", \"type\", \"radio\", \"formControlName\", \"\"], [\"input\", \"type\", \"radio\", \"formControl\", \"\"], [\"input\", \"type\", \"radio\", \"ngModel\", \"\"]], hostBindings: function RadioControlValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"change\", function RadioControlValueAccessor_change_HostBindingHandler() { return ctx.onChange(); })(\"blur\", function RadioControlValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });\n } }, inputs: { name: \"name\", formControlName: \"formControlName\", value: \"value\" }, features: [ɵngcc0.ɵɵProvidersFeature([RADIO_VALUE_ACCESSOR])] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(RadioControlValueAccessor, [{\n type: Directive,\n args: [{\n selector: 'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',\n host: { '(change)': 'onChange()', '(blur)': 'onTouched()' },\n providers: [RADIO_VALUE_ACCESSOR]\n }]\n }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }, { type: RadioControlRegistry }, { type: ɵngcc0.Injector }]; }, { name: [{\n type: Input\n }], formControlName: [{\n type: Input\n }], value: [{\n type: Input\n }] }); })();\n return RadioControlValueAccessor;\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 */\nvar RANGE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return RangeValueAccessor; }),\n multi: true\n};\n/**\n * @description\n * The `ControlValueAccessor` for writing a range value and listening to range input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a range input with a reactive form\n *\n * The following example shows how to use a range input with a reactive form.\n *\n * ```ts\n * const ageControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"range\" [formControl]=\"ageControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar RangeValueAccessor = /** @class */ (function () {\n function RangeValueAccessor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n /**\n * @description\n * The registered callback function called when a change or input event occurs on the input\n * element.\n */\n this.onChange = function (_) { };\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n this.onTouched = function () { };\n }\n /**\n * Sets the \"value\" property on the input element.\n *\n * @param value The checked value\n */\n RangeValueAccessor.prototype.writeValue = function (value) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', parseFloat(value));\n };\n /**\n * @description\n * Registers a function called when the control value changes.\n *\n * @param fn The callback function\n */\n RangeValueAccessor.prototype.registerOnChange = function (fn) {\n this.onChange = function (value) {\n fn(value == '' ? null : parseFloat(value));\n };\n };\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n RangeValueAccessor.prototype.registerOnTouched = function (fn) {\n this.onTouched = fn;\n };\n /**\n * Sets the \"disabled\" property on the range input element.\n *\n * @param isDisabled The disabled value\n */\n RangeValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n RangeValueAccessor = __decorate([ __metadata(\"design:paramtypes\", [Renderer2, ElementRef])\n ], RangeValueAccessor);\nRangeValueAccessor.ɵfac = function RangeValueAccessor_Factory(t) { return new (t || RangeValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nRangeValueAccessor.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: RangeValueAccessor, selectors: [[\"input\", \"type\", \"range\", \"formControlName\", \"\"], [\"input\", \"type\", \"range\", \"formControl\", \"\"], [\"input\", \"type\", \"range\", \"ngModel\", \"\"]], hostBindings: function RangeValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"change\", function RangeValueAccessor_change_HostBindingHandler($event) { return ctx.onChange($event.target.value); })(\"input\", function RangeValueAccessor_input_HostBindingHandler($event) { return ctx.onChange($event.target.value); })(\"blur\", function RangeValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });\n } }, features: [ɵngcc0.ɵɵProvidersFeature([RANGE_VALUE_ACCESSOR])] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(RangeValueAccessor, [{\n type: Directive,\n args: [{\n selector: 'input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]',\n host: {\n '(change)': 'onChange($event.target.value)',\n '(input)': 'onChange($event.target.value)',\n '(blur)': 'onTouched()'\n },\n providers: [RANGE_VALUE_ACCESSOR]\n }]\n }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }]; }, null); })();\n return RangeValueAccessor;\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 */\nvar FormErrorExamples = {\n formControlName: \"\\n <div [formGroup]=\\\"myGroup\\\">\\n <input formControlName=\\\"firstName\\\">\\n </div>\\n\\n In your class:\\n\\n this.myGroup = new FormGroup({\\n firstName: new FormControl()\\n });\",\n formGroupName: \"\\n <div [formGroup]=\\\"myGroup\\\">\\n <div formGroupName=\\\"person\\\">\\n <input formControlName=\\\"firstName\\\">\\n </div>\\n </div>\\n\\n In your class:\\n\\n this.myGroup = new FormGroup({\\n person: new FormGroup({ firstName: new FormControl() })\\n });\",\n formArrayName: \"\\n <div [formGroup]=\\\"myGroup\\\">\\n <div formArrayName=\\\"cities\\\">\\n <div *ngFor=\\\"let city of cityArray.controls; index as i\\\">\\n <input [formControlName]=\\\"i\\\">\\n </div>\\n </div>\\n </div>\\n\\n In your class:\\n\\n this.cityArray = new FormArray([new FormControl('SF')]);\\n this.myGroup = new FormGroup({\\n cities: this.cityArray\\n });\",\n ngModelGroup: \"\\n <form>\\n <div ngModelGroup=\\\"person\\\">\\n <input [(ngModel)]=\\\"person.name\\\" name=\\\"firstName\\\">\\n </div>\\n </form>\",\n ngModelWithFormGroup: \"\\n <div [formGroup]=\\\"myGroup\\\">\\n <input formControlName=\\\"firstName\\\">\\n <input [(ngModel)]=\\\"showMoreControls\\\" [ngModelOptions]=\\\"{standalone: true}\\\">\\n </div>\\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 */\nvar ReactiveErrors = /** @class */ (function () {\n function ReactiveErrors() {\n }\n ReactiveErrors.controlParentException = function () {\n throw new Error(\"formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\\n directive and pass it an existing FormGroup instance (you can create one in your class).\\n\\n Example:\\n\\n \" + FormErrorExamples.formControlName);\n };\n ReactiveErrors.ngModelGroupException = function () {\n throw new Error(\"formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\\n that also have a \\\"form\\\" prefix: formGroupName, formArrayName, or formGroup.\\n\\n Option 1: Update the parent to be formGroupName (reactive form strategy)\\n\\n \" + FormErrorExamples.formGroupName + \"\\n\\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\\n\\n \" + FormErrorExamples.ngModelGroup);\n };\n ReactiveErrors.missingFormException = function () {\n throw new Error(\"formGroup expects a FormGroup instance. Please pass one in.\\n\\n Example:\\n\\n \" + FormErrorExamples.formControlName);\n };\n ReactiveErrors.groupParentException = function () {\n throw new Error(\"formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\\n directive and pass it an existing FormGroup instance (you can create one in your class).\\n\\n Example:\\n\\n \" + FormErrorExamples.formGroupName);\n };\n ReactiveErrors.arrayParentException = function () {\n throw new Error(\"formArrayName must be used with a parent formGroup directive. You'll want to add a formGroup\\n directive and pass it an existing FormGroup instance (you can create one in your class).\\n\\n Example:\\n\\n \" + FormErrorExamples.formArrayName);\n };\n ReactiveErrors.disabledAttrWarning = function () {\n console.warn(\"\\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\\n you. We recommend using this approach to avoid 'changed after checked' errors.\\n \\n Example: \\n form = new FormGroup({\\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\\n last: new FormControl('Drew', Validators.required)\\n });\\n \");\n };\n ReactiveErrors.ngModelWarning = function (directiveName) {\n console.warn(\"\\n It looks like you're using ngModel on the same form field as \" + directiveName + \". \\n Support for using the ngModel input property and ngModelChange event with \\n reactive form directives has been deprecated in Angular v6 and will be removed \\n in Angular v7.\\n \\n For more information on this, see our API docs here:\\n https://angular.io/api/forms/\" + (directiveName === 'formControl' ? 'FormControlDirective' :\n 'FormControlName') + \"#use-with-ngmodel\\n \");\n };\n return ReactiveErrors;\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 */\nvar SELECT_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return SelectControlValueAccessor; }),\n multi: true\n};\nfunction _buildValueString(id, value) {\n if (id == null)\n return \"\" + value;\n if (value && typeof value === 'object')\n value = 'Object';\n return (id + \": \" + value).slice(0, 50);\n}\nfunction _extractId(valueString) {\n return valueString.split(':')[0];\n}\n/**\n * @description\n * The `ControlValueAccessor` for writing select control values and listening to select control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using select controls in a reactive form\n *\n * The following examples show how to use a select control in a reactive form.\n *\n * {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}\n *\n * ### Using select controls in a template-driven form\n *\n * To use a select in a template-driven form, simply add an `ngModel` and a `name`\n * attribute to the main `<select>` tag.\n *\n * {@example forms/ts/selectControl/select_control_example.ts region='Component'}\n *\n * ### Customizing option selection\n *\n * Angular uses object identity to select option. It's possible for the identities of items\n * to change while the data does not. This can happen, for example, if the items are produced\n * from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the\n * second response will produce objects with different identities.\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * `compareWith` takes a **function** which has two arguments: `option1` and `option2`.\n * If `compareWith` is given, Angular selects option by the return value of the function.\n *\n * ```ts\n * const selectedCountriesControl = new FormControl();\n * ```\n *\n * ```\n * <select [compareWith]=\"compareFn\" [formControl]=\"selectedCountriesControl\">\n * <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n * {{country.name}}\n * </option>\n * </select>\n *\n * compareFn(c1: Country, c2: Country): boolean {\n * return c1 && c2 ? c1.id === c2.id : c1 === c2;\n * }\n * ```\n *\n * **Note:** We listen to the 'change' event because 'input' events aren't fired\n * for selects in Firefox and IE:\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1024350\n * https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar SelectControlValueAccessor = /** @class */ (function () {\n function SelectControlValueAccessor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n /** @internal */\n this._optionMap = new Map();\n /** @internal */\n this._idCounter = 0;\n /**\n * @description\n * The registered callback function called when a change event occurs on the input element.\n */\n this.onChange = function (_) { };\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n this.onTouched = function () { };\n this._compareWith = ɵlooseIdentical;\n }\n Object.defineProperty(SelectControlValueAccessor.prototype, \"compareWith\", {\n /**\n * @description\n * Tracks the option comparison algorithm for tracking identities when\n * checking for changes.\n */\n set: function (fn) {\n if (typeof fn !== 'function') {\n throw new Error(\"compareWith must be a function, but received \" + JSON.stringify(fn));\n }\n this._compareWith = fn;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Sets the \"value\" property on the input element. The \"selectedIndex\"\n * property is also set if an ID is provided on the option element.\n *\n * @param value The checked value\n */\n SelectControlValueAccessor.prototype.writeValue = function (value) {\n this.value = value;\n var id = this._getOptionId(value);\n if (id == null) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'selectedIndex', -1);\n }\n var valueString = _buildValueString(id, value);\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', valueString);\n };\n /**\n * @description\n * Registers a function called when the control value changes.\n *\n * @param fn The callback function\n */\n SelectControlValueAccessor.prototype.registerOnChange = function (fn) {\n var _this = this;\n this.onChange = function (valueString) {\n _this.value = _this._getOptionValue(valueString);\n fn(_this.value);\n };\n };\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n SelectControlValueAccessor.prototype.registerOnTouched = function (fn) {\n this.onTouched = fn;\n };\n /**\n * Sets the \"disabled\" property on the select input element.\n *\n * @param isDisabled The disabled value\n */\n SelectControlValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n /** @internal */\n SelectControlValueAccessor.prototype._registerOption = function () {\n return (this._idCounter++).toString();\n };\n /** @internal */\n SelectControlValueAccessor.prototype._getOptionId = function (value) {\n var e_1, _a;\n try {\n for (var _b = __values(Array.from(this._optionMap.keys())), _c = _b.next(); !_c.done; _c = _b.next()) {\n var id = _c.value;\n if (this._compareWith(this._optionMap.get(id), value))\n return id;\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 null;\n };\n /** @internal */\n SelectControlValueAccessor.prototype._getOptionValue = function (valueString) {\n var id = _extractId(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Function])\n ], SelectControlValueAccessor.prototype, \"compareWith\", null);\n SelectControlValueAccessor = __decorate([ __metadata(\"design:paramtypes\", [Renderer2, ElementRef])\n ], SelectControlValueAccessor);\nSelectControlValueAccessor.ɵfac = function SelectControlValueAccessor_Factory(t) { return new (t || SelectControlValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nSelectControlValueAccessor.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: SelectControlValueAccessor, selectors: [[\"select\", \"formControlName\", \"\", 3, \"multiple\", \"\"], [\"select\", \"formControl\", \"\", 3, \"multiple\", \"\"], [\"select\", \"ngModel\", \"\", 3, \"multiple\", \"\"]], hostBindings: function SelectControlValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"change\", function SelectControlValueAccessor_change_HostBindingHandler($event) { return ctx.onChange($event.target.value); })(\"blur\", function SelectControlValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });\n } }, inputs: { compareWith: \"compareWith\" }, features: [ɵngcc0.ɵɵProvidersFeature([SELECT_VALUE_ACCESSOR])] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(SelectControlValueAccessor, [{\n type: Directive,\n args: [{\n selector: 'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]',\n host: { '(change)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },\n providers: [SELECT_VALUE_ACCESSOR]\n }]\n }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }]; }, { compareWith: [{\n type: Input\n }] }); })();\n return SelectControlValueAccessor;\n}());\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar NgSelectOption = /** @class */ (function () {\n function NgSelectOption(_element, _renderer, _select) {\n this._element = _element;\n this._renderer = _renderer;\n this._select = _select;\n if (this._select)\n this.id = this._select._registerOption();\n }\n Object.defineProperty(NgSelectOption.prototype, \"ngValue\", {\n /**\n * @description\n * Tracks the value bound to the option element. Unlike the value binding,\n * ngValue supports binding to objects.\n */\n set: function (value) {\n if (this._select == null)\n return;\n this._select._optionMap.set(this.id, value);\n this._setElementValue(_buildValueString(this.id, value));\n this._select.writeValue(this._select.value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgSelectOption.prototype, \"value\", {\n /**\n * @description\n * Tracks simple string values bound to the option element.\n * For objects, use the `ngValue` input binding.\n */\n set: function (value) {\n this._setElementValue(value);\n if (this._select)\n this._select.writeValue(this._select.value);\n },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n NgSelectOption.prototype._setElementValue = function (value) {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n };\n /**\n * @description\n * Lifecycle method called before the directive's instance is destroyed. For internal use only.\n */\n NgSelectOption.prototype.ngOnDestroy = function () {\n if (this._select) {\n this._select._optionMap.delete(this.id);\n this._select.writeValue(this._select.value);\n }\n };\n __decorate([\n Input('ngValue'),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgSelectOption.prototype, \"ngValue\", null);\n __decorate([\n Input('value'),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgSelectOption.prototype, \"value\", null);\n NgSelectOption = __decorate([ __param(2, Optional()), __param(2, Host()),\n __metadata(\"design:paramtypes\", [ElementRef, Renderer2,\n SelectControlValueAccessor])\n ], NgSelectOption);\nNgSelectOption.ɵfac = function NgSelectOption_Factory(t) { return new (t || NgSelectOption)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(SelectControlValueAccessor, 9)); };\nNgSelectOption.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgSelectOption, selectors: [[\"option\"]], inputs: { ngValue: \"ngValue\", value: \"value\" } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgSelectOption, [{\n type: Directive,\n args: [{ selector: 'option' }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: SelectControlValueAccessor, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; }, { ngValue: [{\n type: Input,\n args: ['ngValue']\n }], value: [{\n type: Input,\n args: ['value']\n }] }); })();\n return NgSelectOption;\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 */\nvar SELECT_MULTIPLE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return SelectMultipleControlValueAccessor; }),\n multi: true\n};\nfunction _buildValueString$1(id, value) {\n if (id == null)\n return \"\" + value;\n if (typeof value === 'string')\n value = \"'\" + value + \"'\";\n if (value && typeof value === 'object')\n value = 'Object';\n return (id + \": \" + value).slice(0, 50);\n}\nfunction _extractId$1(valueString) {\n return valueString.split(':')[0];\n}\n/** Mock interface for HTMLCollection */\nvar HTMLCollection = /** @class */ (function () {\n function HTMLCollection() {\n }\n return HTMLCollection;\n}());\n/**\n * @description\n * The `ControlValueAccessor` for writing multi-select control values and listening to multi-select\n * control changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @see `SelectControlValueAccessor`\n *\n * @usageNotes\n *\n * ### Using a multi-select control\n *\n * The follow example shows you how to use a multi-select control with a reactive form.\n *\n * ```ts\n * const countryControl = new FormControl();\n * ```\n *\n * ```\n * <select multiple name=\"countries\" [formControl]=\"countryControl\">\n * <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n * {{ country.name }}\n * </option>\n * </select>\n * ```\n *\n * ### Customizing option selection\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * See the `SelectControlValueAccessor` for usage.\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar SelectMultipleControlValueAccessor = /** @class */ (function () {\n function SelectMultipleControlValueAccessor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n /** @internal */\n this._optionMap = new Map();\n /** @internal */\n this._idCounter = 0;\n /**\n * @description\n * The registered callback function called when a change event occurs on the input element.\n */\n this.onChange = function (_) { };\n /**\n * @description\n * The registered callback function called when a blur event occurs on the input element.\n */\n this.onTouched = function () { };\n this._compareWith = ɵlooseIdentical;\n }\n Object.defineProperty(SelectMultipleControlValueAccessor.prototype, \"compareWith\", {\n /**\n * @description\n * Tracks the option comparison algorithm for tracking identities when\n * checking for changes.\n */\n set: function (fn) {\n if (typeof fn !== 'function') {\n throw new Error(\"compareWith must be a function, but received \" + JSON.stringify(fn));\n }\n this._compareWith = fn;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @description\n * Sets the \"value\" property on one or of more\n * of the select's options.\n *\n * @param value The value\n */\n SelectMultipleControlValueAccessor.prototype.writeValue = function (value) {\n var _this = this;\n this.value = value;\n var optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n var ids_1 = value.map(function (v) { return _this._getOptionId(v); });\n optionSelectedStateSetter = function (opt, o) {\n opt._setSelected(ids_1.indexOf(o.toString()) > -1);\n };\n }\n else {\n optionSelectedStateSetter = function (opt, o) {\n opt._setSelected(false);\n };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n };\n /**\n * @description\n * Registers a function called when the control value changes\n * and writes an array of the selected options.\n *\n * @param fn The callback function\n */\n SelectMultipleControlValueAccessor.prototype.registerOnChange = function (fn) {\n var _this = this;\n this.onChange = function (_) {\n var selected = [];\n if (_.hasOwnProperty('selectedOptions')) {\n var options = _.selectedOptions;\n for (var i = 0; i < options.length; i++) {\n var opt = options.item(i);\n var val = _this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n // Degrade on IE\n else {\n var options = _.options;\n for (var i = 0; i < options.length; i++) {\n var opt = options.item(i);\n if (opt.selected) {\n var val = _this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n }\n _this.value = selected;\n fn(selected);\n };\n };\n /**\n * @description\n * Registers a function called when the control is touched.\n *\n * @param fn The callback function\n */\n SelectMultipleControlValueAccessor.prototype.registerOnTouched = function (fn) {\n this.onTouched = fn;\n };\n /**\n * Sets the \"disabled\" property on the select input element.\n *\n * @param isDisabled The disabled value\n */\n SelectMultipleControlValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n /** @internal */\n SelectMultipleControlValueAccessor.prototype._registerOption = function (value) {\n var id = (this._idCounter++).toString();\n this._optionMap.set(id, value);\n return id;\n };\n /** @internal */\n SelectMultipleControlValueAccessor.prototype._getOptionId = function (value) {\n var e_1, _a;\n try {\n for (var _b = __values(Array.from(this._optionMap.keys())), _c = _b.next(); !_c.done; _c = _b.next()) {\n var id = _c.value;\n if (this._compareWith(this._optionMap.get(id)._value, value))\n return id;\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 null;\n };\n /** @internal */\n SelectMultipleControlValueAccessor.prototype._getOptionValue = function (valueString) {\n var id = _extractId$1(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Function])\n ], SelectMultipleControlValueAccessor.prototype, \"compareWith\", null);\n SelectMultipleControlValueAccessor = __decorate([ __metadata(\"design:paramtypes\", [Renderer2, ElementRef])\n ], SelectMultipleControlValueAccessor);\nSelectMultipleControlValueAccessor.ɵfac = function SelectMultipleControlValueAccessor_Factory(t) { return new (t || SelectMultipleControlValueAccessor)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef)); };\nSelectMultipleControlValueAccessor.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: SelectMultipleControlValueAccessor, selectors: [[\"select\", \"multiple\", \"\", \"formControlName\", \"\"], [\"select\", \"multiple\", \"\", \"formControl\", \"\"], [\"select\", \"multiple\", \"\", \"ngModel\", \"\"]], hostBindings: function SelectMultipleControlValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"change\", function SelectMultipleControlValueAccessor_change_HostBindingHandler($event) { return ctx.onChange($event.target); })(\"blur\", function SelectMultipleControlValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });\n } }, inputs: { compareWith: \"compareWith\" }, features: [ɵngcc0.ɵɵProvidersFeature([SELECT_MULTIPLE_VALUE_ACCESSOR])] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(SelectMultipleControlValueAccessor, [{\n type: Directive,\n args: [{\n selector: 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',\n host: { '(change)': 'onChange($event.target)', '(blur)': 'onTouched()' },\n providers: [SELECT_MULTIPLE_VALUE_ACCESSOR]\n }]\n }], function () { return [{ type: ɵngcc0.Renderer2 }, { type: ɵngcc0.ElementRef }]; }, { compareWith: [{\n type: Input\n }] }); })();\n return SelectMultipleControlValueAccessor;\n}());\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectMultipleControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar ɵNgSelectMultipleOption = /** @class */ (function () {\n function ɵNgSelectMultipleOption(_element, _renderer, _select) {\n this._element = _element;\n this._renderer = _renderer;\n this._select = _select;\n if (this._select) {\n this.id = this._select._registerOption(this);\n }\n }\n Object.defineProperty(ɵNgSelectMultipleOption.prototype, \"ngValue\", {\n /**\n * @description\n * Tracks the value bound to the option element. Unlike the value binding,\n * ngValue supports binding to objects.\n */\n set: function (value) {\n if (this._select == null)\n return;\n this._value = value;\n this._setElementValue(_buildValueString$1(this.id, value));\n this._select.writeValue(this._select.value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ɵNgSelectMultipleOption.prototype, \"value\", {\n /**\n * @description\n * Tracks simple string values bound to the option element.\n * For objects, use the `ngValue` input binding.\n */\n set: function (value) {\n if (this._select) {\n this._value = value;\n this._setElementValue(_buildValueString$1(this.id, value));\n this._select.writeValue(this._select.value);\n }\n else {\n this._setElementValue(value);\n }\n },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n ɵNgSelectMultipleOption.prototype._setElementValue = function (value) {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n };\n /** @internal */\n ɵNgSelectMultipleOption.prototype._setSelected = function (selected) {\n this._renderer.setProperty(this._element.nativeElement, 'selected', selected);\n };\n /**\n * @description\n * Lifecycle method called before the directive's instance is destroyed. For internal use only.\n */\n ɵNgSelectMultipleOption.prototype.ngOnDestroy = function () {\n if (this._select) {\n this._select._optionMap.delete(this.id);\n this._select.writeValue(this._select.value);\n }\n };\n __decorate([\n Input('ngValue'),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], ɵNgSelectMultipleOption.prototype, \"ngValue\", null);\n __decorate([\n Input('value'),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], ɵNgSelectMultipleOption.prototype, \"value\", null);\n ɵNgSelectMultipleOption = __decorate([ __param(2, Optional()), __param(2, Host()),\n __metadata(\"design:paramtypes\", [ElementRef, Renderer2,\n SelectMultipleControlValueAccessor])\n ], ɵNgSelectMultipleOption);\nɵNgSelectMultipleOption.ɵfac = function ɵNgSelectMultipleOption_Factory(t) { return new (t || ɵNgSelectMultipleOption)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(SelectMultipleControlValueAccessor, 9)); };\nɵNgSelectMultipleOption.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: ɵNgSelectMultipleOption, selectors: [[\"option\"]], inputs: { ngValue: \"ngValue\", value: \"value\" } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(ɵNgSelectMultipleOption, [{\n type: Directive,\n args: [{ selector: 'option' }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: SelectMultipleControlValueAccessor, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }]; }, { ngValue: [{\n type: Input,\n args: ['ngValue']\n }], value: [{\n type: Input,\n args: ['value']\n }] }); })();\n return ɵNgSelectMultipleOption;\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 */\nfunction controlPath(name, parent) {\n return __spread(parent.path, [name]);\n}\nfunction setUpControl(control, dir) {\n if (!control)\n _throwError(dir, 'Cannot find control with');\n if (!dir.valueAccessor)\n _throwError(dir, 'No value accessor for form control with');\n control.validator = Validators.compose([control.validator, dir.validator]);\n control.asyncValidator = Validators.composeAsync([control.asyncValidator, dir.asyncValidator]);\n dir.valueAccessor.writeValue(control.value);\n setUpViewChangePipeline(control, dir);\n setUpModelChangePipeline(control, dir);\n setUpBlurPipeline(control, dir);\n if (dir.valueAccessor.setDisabledState) {\n control.registerOnDisabledChange(function (isDisabled) {\n dir.valueAccessor.setDisabledState(isDisabled);\n });\n }\n // re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4\n dir._rawValidators.forEach(function (validator) {\n if (validator.registerOnValidatorChange)\n validator.registerOnValidatorChange(function () { return control.updateValueAndValidity(); });\n });\n dir._rawAsyncValidators.forEach(function (validator) {\n if (validator.registerOnValidatorChange)\n validator.registerOnValidatorChange(function () { return control.updateValueAndValidity(); });\n });\n}\nfunction cleanUpControl(control, dir) {\n dir.valueAccessor.registerOnChange(function () { return _noControlError(dir); });\n dir.valueAccessor.registerOnTouched(function () { return _noControlError(dir); });\n dir._rawValidators.forEach(function (validator) {\n if (validator.registerOnValidatorChange) {\n validator.registerOnValidatorChange(null);\n }\n });\n dir._rawAsyncValidators.forEach(function (validator) {\n if (validator.registerOnValidatorChange) {\n validator.registerOnValidatorChange(null);\n }\n });\n if (control)\n control._clearChangeFns();\n}\nfunction setUpViewChangePipeline(control, dir) {\n dir.valueAccessor.registerOnChange(function (newValue) {\n control._pendingValue = newValue;\n control._pendingChange = true;\n control._pendingDirty = true;\n if (control.updateOn === 'change')\n updateControl(control, dir);\n });\n}\nfunction setUpBlurPipeline(control, dir) {\n dir.valueAccessor.registerOnTouched(function () {\n control._pendingTouched = true;\n if (control.updateOn === 'blur' && control._pendingChange)\n updateControl(control, dir);\n if (control.updateOn !== 'submit')\n control.markAsTouched();\n });\n}\nfunction updateControl(control, dir) {\n if (control._pendingDirty)\n control.markAsDirty();\n control.setValue(control._pendingValue, { emitModelToViewChange: false });\n dir.viewToModelUpdate(control._pendingValue);\n control._pendingChange = false;\n}\nfunction setUpModelChangePipeline(control, dir) {\n control.registerOnChange(function (newValue, emitModelEvent) {\n // control -> view\n dir.valueAccessor.writeValue(newValue);\n // control -> ngModel\n if (emitModelEvent)\n dir.viewToModelUpdate(newValue);\n });\n}\nfunction setUpFormContainer(control, dir) {\n if (control == null)\n _throwError(dir, 'Cannot find control with');\n control.validator = Validators.compose([control.validator, dir.validator]);\n control.asyncValidator = Validators.composeAsync([control.asyncValidator, dir.asyncValidator]);\n}\nfunction _noControlError(dir) {\n return _throwError(dir, 'There is no FormControl instance attached to form control element with');\n}\nfunction _throwError(dir, message) {\n var messageEnd;\n if (dir.path.length > 1) {\n messageEnd = \"path: '\" + dir.path.join(' -> ') + \"'\";\n }\n else if (dir.path[0]) {\n messageEnd = \"name: '\" + dir.path + \"'\";\n }\n else {\n messageEnd = 'unspecified name attribute';\n }\n throw new Error(message + \" \" + messageEnd);\n}\nfunction composeValidators(validators) {\n return validators != null ? Validators.compose(validators.map(normalizeValidator)) : null;\n}\nfunction composeAsyncValidators(validators) {\n return validators != null ? Validators.composeAsync(validators.map(normalizeAsyncValidator)) :\n null;\n}\nfunction isPropertyUpdated(changes, viewModel) {\n if (!changes.hasOwnProperty('model'))\n return false;\n var change = changes['model'];\n if (change.isFirstChange())\n return true;\n return !ɵlooseIdentical(viewModel, change.currentValue);\n}\nvar BUILTIN_ACCESSORS = [\n CheckboxControlValueAccessor,\n RangeValueAccessor,\n NumberValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n];\nfunction isBuiltInAccessor(valueAccessor) {\n return BUILTIN_ACCESSORS.some(function (a) { return valueAccessor.constructor === a; });\n}\nfunction syncPendingControls(form, directives) {\n form._syncPendingControls();\n directives.forEach(function (dir) {\n var control = dir.control;\n if (control.updateOn === 'submit' && control._pendingChange) {\n dir.viewToModelUpdate(control._pendingValue);\n control._pendingChange = false;\n }\n });\n}\n// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented\nfunction selectValueAccessor(dir, valueAccessors) {\n if (!valueAccessors)\n return null;\n if (!Array.isArray(valueAccessors))\n _throwError(dir, 'Value accessor was not provided as an array for form control with');\n var defaultAccessor = undefined;\n var builtinAccessor = undefined;\n var customAccessor = undefined;\n valueAccessors.forEach(function (v) {\n if (v.constructor === DefaultValueAccessor) {\n defaultAccessor = v;\n }\n else if (isBuiltInAccessor(v)) {\n if (builtinAccessor)\n _throwError(dir, 'More than one built-in value accessor matches form control with');\n builtinAccessor = v;\n }\n else {\n if (customAccessor)\n _throwError(dir, 'More than one custom value accessor matches form control with');\n customAccessor = v;\n }\n });\n if (customAccessor)\n return customAccessor;\n if (builtinAccessor)\n return builtinAccessor;\n if (defaultAccessor)\n return defaultAccessor;\n _throwError(dir, 'No valid value accessor for form control with');\n return null;\n}\nfunction removeDir(list, el) {\n var index = list.indexOf(el);\n if (index > -1)\n list.splice(index, 1);\n}\n// TODO(kara): remove after deprecation period\nfunction _ngModelWarning(name, type, instance, warningConfig) {\n if (!isDevMode() || warningConfig === 'never')\n return;\n if (((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce) ||\n (warningConfig === 'always' && !instance._ngModelWarningSent)) {\n ReactiveErrors.ngModelWarning(name);\n type._ngModelWarningSentOnce = true;\n instance._ngModelWarningSent = true;\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 * Reports that a FormControl is valid, meaning that no errors exist in the input value.\n *\n * @see `status`\n */\nvar VALID = 'VALID';\n/**\n * Reports that a FormControl is invalid, meaning that an error exists in the input value.\n *\n * @see `status`\n */\nvar INVALID = 'INVALID';\n/**\n * Reports that a FormControl is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value.\n *\n * @see `markAsPending`\n * @see `status`\n */\nvar PENDING = 'PENDING';\n/**\n * Reports that a FormControl is disabled, meaning that the control is exempt from ancestor\n * calculations of validity or value.\n *\n * @see `markAsDisabled`\n * @see `status`\n */\nvar DISABLED = 'DISABLED';\nfunction _find(control, path, delimiter) {\n if (path == null)\n return null;\n if (!Array.isArray(path)) {\n path = path.split(delimiter);\n }\n if (Array.isArray(path) && path.length === 0)\n return null;\n // Not using Array.reduce here due to a Chrome 80 bug\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\n var controlToFind = control;\n path.forEach(function (name) {\n if (controlToFind instanceof FormGroup) {\n controlToFind = controlToFind.controls.hasOwnProperty(name) ?\n controlToFind.controls[name] :\n null;\n }\n else if (controlToFind instanceof FormArray) {\n controlToFind = controlToFind.at(name) || null;\n }\n else {\n controlToFind = null;\n }\n });\n return controlToFind;\n}\nfunction coerceToValidator(validatorOrOpts) {\n var validator = (isOptionsObj(validatorOrOpts) ? validatorOrOpts.validators :\n validatorOrOpts);\n return Array.isArray(validator) ? composeValidators(validator) : validator || null;\n}\nfunction coerceToAsyncValidator(asyncValidator, validatorOrOpts) {\n var origAsyncValidator = (isOptionsObj(validatorOrOpts) ? validatorOrOpts.asyncValidators :\n asyncValidator);\n return Array.isArray(origAsyncValidator) ? composeAsyncValidators(origAsyncValidator) :\n origAsyncValidator || null;\n}\nfunction isOptionsObj(validatorOrOpts) {\n return validatorOrOpts != null && !Array.isArray(validatorOrOpts) &&\n typeof validatorOrOpts === 'object';\n}\n/**\n * This is the base class for `FormControl`, `FormGroup`, and `FormArray`.\n *\n * It provides some of the shared behavior that all controls and groups of controls have, like\n * running validators, calculating status, and resetting state. It also defines the properties\n * that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be\n * instantiated directly.\n *\n * @see [Forms Guide](/guide/forms)\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n * @see [Dynamic Forms Guide](/guide/dynamic-form)\n *\n * @publicApi\n */\nvar AbstractControl = /** @class */ (function () {\n /**\n * Initialize the AbstractControl instance.\n *\n * @param validator The function that determines the synchronous validity of this control.\n * @param asyncValidator The function that determines the asynchronous validity of this\n * control.\n */\n function AbstractControl(validator, asyncValidator) {\n this.validator = validator;\n this.asyncValidator = asyncValidator;\n /** @internal */\n this._onCollectionChange = function () { };\n /**\n * A control is `pristine` if the user has not yet changed\n * the value in the UI.\n *\n * @returns True if the user has not yet changed the value in the UI; compare `dirty`.\n * Programmatic changes to a control's value do not mark it dirty.\n */\n this.pristine = true;\n /**\n * True if the control is marked as `touched`.\n *\n * A control is marked `touched` once the user has triggered\n * a `blur` event on it.\n */\n this.touched = false;\n /** @internal */\n this._onDisabledChange = [];\n }\n Object.defineProperty(AbstractControl.prototype, \"parent\", {\n /**\n * The parent control.\n */\n get: function () {\n return this._parent;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"valid\", {\n /**\n * A control is `valid` when its `status` is `VALID`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if the control has passed all of its validation tests,\n * false otherwise.\n */\n get: function () {\n return this.status === VALID;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"invalid\", {\n /**\n * A control is `invalid` when its `status` is `INVALID`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if this control has failed one or more of its validation checks,\n * false otherwise.\n */\n get: function () {\n return this.status === INVALID;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"pending\", {\n /**\n * A control is `pending` when its `status` is `PENDING`.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if this control is in the process of conducting a validation check,\n * false otherwise.\n */\n get: function () {\n return this.status == PENDING;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"disabled\", {\n /**\n * A control is `disabled` when its `status` is `DISABLED`.\n *\n * Disabled controls are exempt from validation checks and\n * are not included in the aggregate value of their ancestor\n * controls.\n *\n * @see {@link AbstractControl.status}\n *\n * @returns True if the control is disabled, false otherwise.\n */\n get: function () {\n return this.status === DISABLED;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"enabled\", {\n /**\n * A control is `enabled` as long as its `status` is not `DISABLED`.\n *\n * @returns True if the control has any status other than 'DISABLED',\n * false if the status is 'DISABLED'.\n *\n * @see {@link AbstractControl.status}\n *\n */\n get: function () {\n return this.status !== DISABLED;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"dirty\", {\n /**\n * A control is `dirty` if the user has changed the value\n * in the UI.\n *\n * @returns True if the user has changed the value of this control in the UI; compare `pristine`.\n * Programmatic changes to a control's value do not mark it dirty.\n */\n get: function () {\n return !this.pristine;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"untouched\", {\n /**\n * True if the control has not been marked as touched\n *\n * A control is `untouched` if the user has not yet triggered\n * a `blur` event on it.\n */\n get: function () {\n return !this.touched;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"updateOn\", {\n /**\n * Reports the update strategy of the `AbstractControl` (meaning\n * the event on which the control updates itself).\n * Possible values: `'change'` | `'blur'` | `'submit'`\n * Default value: `'change'`\n */\n get: function () {\n return this._updateOn ? this._updateOn : (this.parent ? this.parent.updateOn : 'change');\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Sets the synchronous validators that are active on this control. Calling\n * this overwrites any existing sync validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n */\n AbstractControl.prototype.setValidators = function (newValidator) {\n this.validator = coerceToValidator(newValidator);\n };\n /**\n * Sets the async validators that are active on this control. Calling this\n * overwrites any existing async validators.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n */\n AbstractControl.prototype.setAsyncValidators = function (newValidator) {\n this.asyncValidator = coerceToAsyncValidator(newValidator);\n };\n /**\n * Empties out the sync validator list.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n */\n AbstractControl.prototype.clearValidators = function () {\n this.validator = null;\n };\n /**\n * Empties out the async validator list.\n *\n * When you add or remove a validator at run time, you must call\n * `updateValueAndValidity()` for the new validation to take effect.\n *\n */\n AbstractControl.prototype.clearAsyncValidators = function () {\n this.asyncValidator = null;\n };\n /**\n * Marks the control as `touched`. A control is touched by focus and\n * blur events that do not change the value.\n *\n * @see `markAsUntouched()`\n * @see `markAsDirty()`\n * @see `markAsPristine()`\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n AbstractControl.prototype.markAsTouched = function (opts) {\n if (opts === void 0) { opts = {}; }\n this.touched = true;\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsTouched(opts);\n }\n };\n /**\n * Marks the control and all its descendant controls as `touched`.\n * @see `markAsTouched()`\n */\n AbstractControl.prototype.markAllAsTouched = function () {\n this.markAsTouched({ onlySelf: true });\n this._forEachChild(function (control) { return control.markAllAsTouched(); });\n };\n /**\n * Marks the control as `untouched`.\n *\n * If the control has any children, also marks all children as `untouched`\n * and recalculates the `touched` status of all parent controls.\n *\n * @see `markAsTouched()`\n * @see `markAsDirty()`\n * @see `markAsPristine()`\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after the marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n AbstractControl.prototype.markAsUntouched = function (opts) {\n if (opts === void 0) { opts = {}; }\n this.touched = false;\n this._pendingTouched = false;\n this._forEachChild(function (control) {\n control.markAsUntouched({ onlySelf: true });\n });\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts);\n }\n };\n /**\n * Marks the control as `dirty`. A control becomes dirty when\n * the control's value is changed through the UI; compare `markAsTouched`.\n *\n * @see `markAsTouched()`\n * @see `markAsUntouched()`\n * @see `markAsPristine()`\n *\n * @param opts Configuration options that determine how the control propagates changes\n * and emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n AbstractControl.prototype.markAsDirty = function (opts) {\n if (opts === void 0) { opts = {}; }\n this.pristine = false;\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsDirty(opts);\n }\n };\n /**\n * Marks the control as `pristine`.\n *\n * If the control has any children, marks all children as `pristine`,\n * and recalculates the `pristine` status of all parent\n * controls.\n *\n * @see `markAsTouched()`\n * @see `markAsUntouched()`\n * @see `markAsDirty()`\n *\n * @param opts Configuration options that determine how the control emits events after\n * marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n */\n AbstractControl.prototype.markAsPristine = function (opts) {\n if (opts === void 0) { opts = {}; }\n this.pristine = true;\n this._pendingDirty = false;\n this._forEachChild(function (control) {\n control.markAsPristine({ onlySelf: true });\n });\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts);\n }\n };\n /**\n * Marks the control as `pending`.\n *\n * A control is pending while the control performs async validation.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configuration options that determine how the control propagates changes and\n * emits events after marking is applied.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), the `statusChanges`\n * observable emits an event with the latest status the control is marked pending.\n * When false, no events are emitted.\n *\n */\n AbstractControl.prototype.markAsPending = function (opts) {\n if (opts === void 0) { opts = {}; }\n this.status = PENDING;\n if (opts.emitEvent !== false) {\n this.statusChanges.emit(this.status);\n }\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsPending(opts);\n }\n };\n /**\n * Disables the control. This means the control is exempt from validation checks and\n * excluded from the aggregate value of any parent. Its status is `DISABLED`.\n *\n * If the control has children, all children are also disabled.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configuration options that determine how the control propagates\n * changes and emits events after the control is disabled.\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is disabled.\n * When false, no events are emitted.\n */\n AbstractControl.prototype.disable = function (opts) {\n if (opts === void 0) { opts = {}; }\n // If parent has been marked artificially dirty we don't want to re-calculate the\n // parent's dirtiness based on the children.\n var skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n this.status = DISABLED;\n this.errors = null;\n this._forEachChild(function (control) {\n control.disable(__assign(__assign({}, opts), { onlySelf: true }));\n });\n this._updateValue();\n if (opts.emitEvent !== false) {\n this.valueChanges.emit(this.value);\n this.statusChanges.emit(this.status);\n }\n this._updateAncestors(__assign(__assign({}, opts), { skipPristineCheck: skipPristineCheck }));\n this._onDisabledChange.forEach(function (changeFn) { return changeFn(true); });\n };\n /**\n * Enables the control. This means the control is included in validation checks and\n * the aggregate value of its parent. Its status recalculates based on its value and\n * its validators.\n *\n * By default, if the control has children, all children are enabled.\n *\n * @see {@link AbstractControl.status}\n *\n * @param opts Configure options that control how the control propagates changes and\n * emits events when marked as untouched\n * * `onlySelf`: When true, mark only this control. When false or not supplied,\n * marks all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is enabled.\n * When false, no events are emitted.\n */\n AbstractControl.prototype.enable = function (opts) {\n if (opts === void 0) { opts = {}; }\n // If parent has been marked artificially dirty we don't want to re-calculate the\n // parent's dirtiness based on the children.\n var skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n this.status = VALID;\n this._forEachChild(function (control) {\n control.enable(__assign(__assign({}, opts), { onlySelf: true }));\n });\n this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n this._updateAncestors(__assign(__assign({}, opts), { skipPristineCheck: skipPristineCheck }));\n this._onDisabledChange.forEach(function (changeFn) { return changeFn(false); });\n };\n AbstractControl.prototype._updateAncestors = function (opts) {\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity(opts);\n if (!opts.skipPristineCheck) {\n this._parent._updatePristine();\n }\n this._parent._updateTouched();\n }\n };\n /**\n * @param parent Sets the parent of the control\n */\n AbstractControl.prototype.setParent = function (parent) {\n this._parent = parent;\n };\n /**\n * Recalculates the value and validation status of the control.\n *\n * By default, it also updates the value and validity of its ancestors.\n *\n * @param opts Configuration options determine how the control propagates changes and emits events\n * after updates and validity checks are applied.\n * * `onlySelf`: When true, only update this control. When false or not supplied,\n * update all direct ancestors. Default is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is updated.\n * When false, no events are emitted.\n */\n AbstractControl.prototype.updateValueAndValidity = function (opts) {\n if (opts === void 0) { opts = {}; }\n this._setInitialStatus();\n this._updateValue();\n if (this.enabled) {\n this._cancelExistingSubscription();\n this.errors = this._runValidator();\n this.status = this._calculateStatus();\n if (this.status === VALID || this.status === PENDING) {\n this._runAsyncValidator(opts.emitEvent);\n }\n }\n if (opts.emitEvent !== false) {\n this.valueChanges.emit(this.value);\n this.statusChanges.emit(this.status);\n }\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity(opts);\n }\n };\n /** @internal */\n AbstractControl.prototype._updateTreeValidity = function (opts) {\n if (opts === void 0) { opts = { emitEvent: true }; }\n this._forEachChild(function (ctrl) { return ctrl._updateTreeValidity(opts); });\n this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n };\n AbstractControl.prototype._setInitialStatus = function () {\n this.status = this._allControlsDisabled() ? DISABLED : VALID;\n };\n AbstractControl.prototype._runValidator = function () {\n return this.validator ? this.validator(this) : null;\n };\n AbstractControl.prototype._runAsyncValidator = function (emitEvent) {\n var _this = this;\n if (this.asyncValidator) {\n this.status = PENDING;\n var obs = toObservable(this.asyncValidator(this));\n this._asyncValidationSubscription =\n obs.subscribe(function (errors) { return _this.setErrors(errors, { emitEvent: emitEvent }); });\n }\n };\n AbstractControl.prototype._cancelExistingSubscription = function () {\n if (this._asyncValidationSubscription) {\n this._asyncValidationSubscription.unsubscribe();\n }\n };\n /**\n * Sets errors on a form control when running validations manually, rather than automatically.\n *\n * Calling `setErrors` also updates the validity of the parent control.\n *\n * @usageNotes\n *\n * ### Manually set the errors for a control\n *\n * ```\n * const login = new FormControl('someLogin');\n * login.setErrors({\n * notUnique: true\n * });\n *\n * expect(login.valid).toEqual(false);\n * expect(login.errors).toEqual({ notUnique: true });\n *\n * login.setValue('someOtherLogin');\n *\n * expect(login.valid).toEqual(true);\n * ```\n */\n AbstractControl.prototype.setErrors = function (errors, opts) {\n if (opts === void 0) { opts = {}; }\n this.errors = errors;\n this._updateControlsErrors(opts.emitEvent !== false);\n };\n /**\n * Retrieves a child control given the control's name or path.\n *\n * @param path A dot-delimited string or array of string/number values that define the path to the\n * control.\n *\n * @usageNotes\n * ### Retrieve a nested control\n *\n * For example, to get a `name` control nested within a `person` sub-group:\n *\n * * `this.form.get('person.name');`\n *\n * -OR-\n *\n * * `this.form.get(['person', 'name']);`\n */\n AbstractControl.prototype.get = function (path) {\n return _find(this, path, '.');\n };\n /**\n * @description\n * Reports error data for the control with the given path.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * @returns error data for that particular error. If the control or error is not present,\n * null is returned.\n */\n AbstractControl.prototype.getError = function (errorCode, path) {\n var control = path ? this.get(path) : this;\n return control && control.errors ? control.errors[errorCode] : null;\n };\n /**\n * @description\n * Reports whether the control with the given path has the error specified.\n *\n * @param errorCode The code of the error to check\n * @param path A list of control names that designates how to move from the current control\n * to the control that should be queried for errors.\n *\n * @usageNotes\n * For example, for the following `FormGroup`:\n *\n * ```\n * form = new FormGroup({\n * address: new FormGroup({ street: new FormControl() })\n * });\n * ```\n *\n * The path to the 'street' control from the root form would be 'address' -> 'street'.\n *\n * It can be provided to this method in one of two formats:\n *\n * 1. An array of string control names, e.g. `['address', 'street']`\n * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n *\n * If no path is given, this method checks for the error on the current control.\n *\n * @returns whether the given error is present in the control at the given path.\n *\n * If the control is not present, false is returned.\n */\n AbstractControl.prototype.hasError = function (errorCode, path) {\n return !!this.getError(errorCode, path);\n };\n Object.defineProperty(AbstractControl.prototype, \"root\", {\n /**\n * Retrieves the top-level ancestor of this control.\n */\n get: function () {\n var x = this;\n while (x._parent) {\n x = x._parent;\n }\n return x;\n },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n AbstractControl.prototype._updateControlsErrors = function (emitEvent) {\n this.status = this._calculateStatus();\n if (emitEvent) {\n this.statusChanges.emit(this.status);\n }\n if (this._parent) {\n this._parent._updateControlsErrors(emitEvent);\n }\n };\n /** @internal */\n AbstractControl.prototype._initObservables = function () {\n this.valueChanges = new EventEmitter();\n this.statusChanges = new EventEmitter();\n };\n AbstractControl.prototype._calculateStatus = function () {\n if (this._allControlsDisabled())\n return DISABLED;\n if (this.errors)\n return INVALID;\n if (this._anyControlsHaveStatus(PENDING))\n return PENDING;\n if (this._anyControlsHaveStatus(INVALID))\n return INVALID;\n return VALID;\n };\n /** @internal */\n AbstractControl.prototype._anyControlsHaveStatus = function (status) {\n return this._anyControls(function (control) { return control.status === status; });\n };\n /** @internal */\n AbstractControl.prototype._anyControlsDirty = function () {\n return this._anyControls(function (control) { return control.dirty; });\n };\n /** @internal */\n AbstractControl.prototype._anyControlsTouched = function () {\n return this._anyControls(function (control) { return control.touched; });\n };\n /** @internal */\n AbstractControl.prototype._updatePristine = function (opts) {\n if (opts === void 0) { opts = {}; }\n this.pristine = !this._anyControlsDirty();\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts);\n }\n };\n /** @internal */\n AbstractControl.prototype._updateTouched = function (opts) {\n if (opts === void 0) { opts = {}; }\n this.touched = this._anyControlsTouched();\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts);\n }\n };\n /** @internal */\n AbstractControl.prototype._isBoxedValue = function (formState) {\n return typeof formState === 'object' && formState !== null &&\n Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;\n };\n /** @internal */\n AbstractControl.prototype._registerOnCollectionChange = function (fn) {\n this._onCollectionChange = fn;\n };\n /** @internal */\n AbstractControl.prototype._setUpdateStrategy = function (opts) {\n if (isOptionsObj(opts) && opts.updateOn != null) {\n this._updateOn = opts.updateOn;\n }\n };\n /**\n * Check to see if parent has been marked artificially dirty.\n *\n * @internal\n */\n AbstractControl.prototype._parentMarkedDirty = function (onlySelf) {\n var parentDirty = this._parent && this._parent.dirty;\n return !onlySelf && parentDirty && !this._parent._anyControlsDirty();\n };\n return AbstractControl;\n}());\n/**\n * Tracks the value and validation status of an individual form control.\n *\n * This is one of the three fundamental building blocks of Angular forms, along with\n * `FormGroup` and `FormArray`. It extends the `AbstractControl` class that\n * implements most of the base functionality for accessing the value, validation status,\n * user interactions and events. See [usage examples below](#usage-notes).\n *\n * @see `AbstractControl`\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see [Usage Notes](#usage-notes)\n *\n * @usageNotes\n *\n * ### Initializing Form Controls\n *\n * Instantiate a `FormControl`, with an initial value.\n *\n * ```ts\n * const control = new FormControl('some value');\n * console.log(control.value); // 'some value'\n *```\n *\n * The following example initializes the control with a form state object. The `value`\n * and `disabled` keys are required in this case.\n *\n * ```ts\n * const control = new FormControl({ value: 'n/a', disabled: true });\n * console.log(control.value); // 'n/a'\n * console.log(control.status); // 'DISABLED'\n * ```\n *\n * The following example initializes the control with a sync validator.\n *\n * ```ts\n * const control = new FormControl('', Validators.required);\n * console.log(control.value); // ''\n * console.log(control.status); // 'INVALID'\n * ```\n *\n * The following example initializes the control using an options object.\n *\n * ```ts\n * const control = new FormControl('', {\n * validators: Validators.required,\n * asyncValidators: myAsyncValidator\n * });\n * ```\n *\n * ### Configure the control to update on a blur event\n *\n * Set the `updateOn` option to `'blur'` to update on the blur `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'blur' });\n * ```\n *\n * ### Configure the control to update on a submit event\n *\n * Set the `updateOn` option to `'submit'` to update on a submit `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'submit' });\n * ```\n *\n * ### Reset the control back to an initial value\n *\n * You reset to a specific form state by passing through a standalone\n * value or a form state object that contains both a value and a disabled state\n * (these are the only two properties that cannot be calculated).\n *\n * ```ts\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n *\n * control.reset('Drew');\n *\n * console.log(control.value); // 'Drew'\n * ```\n *\n * ### Reset the control back to an initial value and disabled\n *\n * ```\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n * console.log(control.status); // 'VALID'\n *\n * control.reset({ value: 'Drew', disabled: true });\n *\n * console.log(control.value); // 'Drew'\n * console.log(control.status); // 'DISABLED'\n * ```\n *\n * @publicApi\n */\nvar FormControl = /** @class */ (function (_super) {\n __extends(FormControl, _super);\n /**\n * Creates a new `FormControl` instance.\n *\n * @param formState Initializes the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n function FormControl(formState, validatorOrOpts, asyncValidator) {\n if (formState === void 0) { formState = null; }\n var _this = _super.call(this, coerceToValidator(validatorOrOpts), coerceToAsyncValidator(asyncValidator, validatorOrOpts)) || this;\n /** @internal */\n _this._onChange = [];\n _this._applyFormState(formState);\n _this._setUpdateStrategy(validatorOrOpts);\n _this.updateValueAndValidity({ onlySelf: true, emitEvent: false });\n _this._initObservables();\n return _this;\n }\n /**\n * Sets a new value for the form control.\n *\n * @param value The new value for the control.\n * @param options Configuration options that determine how the control propagates changes\n * and emits events when the value changes.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * * `emitModelToViewChange`: When true or not supplied (the default), each change triggers an\n * `onChange` event to\n * update the view.\n * * `emitViewToModelChange`: When true or not supplied (the default), each change triggers an\n * `ngModelChange`\n * event to update the model.\n *\n */\n FormControl.prototype.setValue = function (value, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n this.value = this._pendingValue = value;\n if (this._onChange.length && options.emitModelToViewChange !== false) {\n this._onChange.forEach(function (changeFn) { return changeFn(_this.value, options.emitViewToModelChange !== false); });\n }\n this.updateValueAndValidity(options);\n };\n /**\n * Patches the value of a control.\n *\n * This function is functionally the same as {@link FormControl#setValue setValue} at this level.\n * It exists for symmetry with {@link FormGroup#patchValue patchValue} on `FormGroups` and\n * `FormArrays`, where it does behave differently.\n *\n * @see `setValue` for options\n */\n FormControl.prototype.patchValue = function (value, options) {\n if (options === void 0) { options = {}; }\n this.setValue(value, options);\n };\n /**\n * Resets the form control, marking it `pristine` and `untouched`, and setting\n * the value to null.\n *\n * @param formState Resets the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param options Configuration options that determine how the control propagates changes\n * and emits events after the value changes.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n *\n */\n FormControl.prototype.reset = function (formState, options) {\n if (formState === void 0) { formState = null; }\n if (options === void 0) { options = {}; }\n this._applyFormState(formState);\n this.markAsPristine(options);\n this.markAsUntouched(options);\n this.setValue(this.value, options);\n this._pendingChange = false;\n };\n /**\n * @internal\n */\n FormControl.prototype._updateValue = function () { };\n /**\n * @internal\n */\n FormControl.prototype._anyControls = function (condition) {\n return false;\n };\n /**\n * @internal\n */\n FormControl.prototype._allControlsDisabled = function () {\n return this.disabled;\n };\n /**\n * Register a listener for change events.\n *\n * @param fn The method that is called when the value changes\n */\n FormControl.prototype.registerOnChange = function (fn) {\n this._onChange.push(fn);\n };\n /**\n * @internal\n */\n FormControl.prototype._clearChangeFns = function () {\n this._onChange = [];\n this._onDisabledChange = [];\n this._onCollectionChange = function () { };\n };\n /**\n * Register a listener for disabled events.\n *\n * @param fn The method that is called when the disabled status changes.\n */\n FormControl.prototype.registerOnDisabledChange = function (fn) {\n this._onDisabledChange.push(fn);\n };\n /**\n * @internal\n */\n FormControl.prototype._forEachChild = function (cb) { };\n /** @internal */\n FormControl.prototype._syncPendingControls = function () {\n if (this.updateOn === 'submit') {\n if (this._pendingDirty)\n this.markAsDirty();\n if (this._pendingTouched)\n this.markAsTouched();\n if (this._pendingChange) {\n this.setValue(this._pendingValue, { onlySelf: true, emitModelToViewChange: false });\n return true;\n }\n }\n return false;\n };\n FormControl.prototype._applyFormState = function (formState) {\n if (this._isBoxedValue(formState)) {\n this.value = this._pendingValue = formState.value;\n formState.disabled ? this.disable({ onlySelf: true, emitEvent: false }) :\n this.enable({ onlySelf: true, emitEvent: false });\n }\n else {\n this.value = this._pendingValue = formState;\n }\n };\n return FormControl;\n}(AbstractControl));\n/**\n * Tracks the value and validity state of a group of `FormControl` instances.\n *\n * A `FormGroup` aggregates the values of each child `FormControl` into one object,\n * with each control name as the key. It calculates its status by reducing the status values\n * of its children. For example, if one of the controls in a group is invalid, the entire\n * group becomes invalid.\n *\n * `FormGroup` is one of the three fundamental building blocks used to define forms in Angular,\n * along with `FormControl` and `FormArray`.\n *\n * When instantiating a `FormGroup`, pass in a collection of child controls as the first\n * argument. The key for each child registers the name for the control.\n *\n * @usageNotes\n *\n * ### Create a form group with 2 controls\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl('Nancy', Validators.minLength(2)),\n * last: new FormControl('Drew'),\n * });\n *\n * console.log(form.value); // {first: 'Nancy', last; 'Drew'}\n * console.log(form.status); // 'VALID'\n * ```\n *\n * ### Create a form group with a group-level validator\n *\n * You include group-level validators as the second arg, or group-level async\n * validators as the third arg. These come in handy when you want to perform validation\n * that considers the value of more than one child control.\n *\n * ```\n * const form = new FormGroup({\n * password: new FormControl('', Validators.minLength(2)),\n * passwordConfirm: new FormControl('', Validators.minLength(2)),\n * }, passwordMatchValidator);\n *\n *\n * function passwordMatchValidator(g: FormGroup) {\n * return g.get('password').value === g.get('passwordConfirm').value\n * ? null : {'mismatch': true};\n * }\n * ```\n *\n * Like `FormControl` instances, you choose to pass in\n * validators and async validators as part of an options object.\n *\n * ```\n * const form = new FormGroup({\n * password: new FormControl('')\n * passwordConfirm: new FormControl('')\n * }, { validators: passwordMatchValidator, asyncValidators: otherValidator });\n * ```\n *\n * ### Set the updateOn property for all controls in a form group\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * group level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const c = new FormGroup({\n * one: new FormControl()\n * }, { updateOn: 'blur' });\n * ```\n *\n * @publicApi\n */\nvar FormGroup = /** @class */ (function (_super) {\n __extends(FormGroup, _super);\n /**\n * Creates a new `FormGroup` instance.\n *\n * @param controls A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n function FormGroup(controls, validatorOrOpts, asyncValidator) {\n var _this = _super.call(this, coerceToValidator(validatorOrOpts), coerceToAsyncValidator(asyncValidator, validatorOrOpts)) || this;\n _this.controls = controls;\n _this._initObservables();\n _this._setUpdateStrategy(validatorOrOpts);\n _this._setUpControls();\n _this.updateValueAndValidity({ onlySelf: true, emitEvent: false });\n return _this;\n }\n /**\n * Registers a control with the group's list of controls.\n *\n * This method does not update the value or validity of the control.\n * Use {@link FormGroup#addControl addControl} instead.\n *\n * @param name The control name to register in the collection\n * @param control Provides the control for the given name\n */\n FormGroup.prototype.registerControl = function (name, control) {\n if (this.controls[name])\n return this.controls[name];\n this.controls[name] = control;\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n return control;\n };\n /**\n * Add a control to this group.\n *\n * This method also updates the value and validity of the control.\n *\n * @param name The control name to add to the collection\n * @param control Provides the control for the given name\n */\n FormGroup.prototype.addControl = function (name, control) {\n this.registerControl(name, control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n };\n /**\n * Remove a control from this group.\n *\n * @param name The control name to remove from the collection\n */\n FormGroup.prototype.removeControl = function (name) {\n if (this.controls[name])\n this.controls[name]._registerOnCollectionChange(function () { });\n delete (this.controls[name]);\n this.updateValueAndValidity();\n this._onCollectionChange();\n };\n /**\n * Replace an existing control.\n *\n * @param name The control name to replace in the collection\n * @param control Provides the control for the given name\n */\n FormGroup.prototype.setControl = function (name, control) {\n if (this.controls[name])\n this.controls[name]._registerOnCollectionChange(function () { });\n delete (this.controls[name]);\n if (control)\n this.registerControl(name, control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n };\n /**\n * Check whether there is an enabled control with the given name in the group.\n *\n * Reports false for disabled controls. If you'd like to check for existence in the group\n * only, use {@link AbstractControl#get get} instead.\n *\n * @param controlName The control name to check for existence in the collection\n *\n * @returns false for disabled controls, true otherwise.\n */\n FormGroup.prototype.contains = function (controlName) {\n return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;\n };\n /**\n * Sets the value of the `FormGroup`. It accepts an object that matches\n * the structure of the group, with control names as keys.\n *\n * @usageNotes\n * ### Set the complete value for the form group\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n *\n * console.log(form.value); // {first: null, last: null}\n *\n * form.setValue({first: 'Nancy', last: 'Drew'});\n * console.log(form.value); // {first: 'Nancy', last: 'Drew'}\n * ```\n *\n * @throws When strict checks fail, such as setting the value of a control\n * that doesn't exist or if you exclude a value of a control that does exist.\n *\n * @param value The new value for the control that matches the structure of the group.\n * @param options Configuration options that determine how the control propagates changes\n * and emits events after the value changes.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n */\n FormGroup.prototype.setValue = function (value, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n this._checkAllValuesPresent(value);\n Object.keys(value).forEach(function (name) {\n _this._throwIfControlMissing(name);\n _this.controls[name].setValue(value[name], { onlySelf: true, emitEvent: options.emitEvent });\n });\n this.updateValueAndValidity(options);\n };\n /**\n * Patches the value of the `FormGroup`. It accepts an object with control\n * names as keys, and does its best to match the values to the correct controls\n * in the group.\n *\n * It accepts both super-sets and sub-sets of the group without throwing an error.\n *\n * @usageNotes\n * ### Patch the value for a form group\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n * console.log(form.value); // {first: null, last: null}\n *\n * form.patchValue({first: 'Nancy'});\n * console.log(form.value); // {first: 'Nancy', last: null}\n * ```\n *\n * @param value The object that matches the structure of the group.\n * @param options Configuration options that determine how the control propagates changes and\n * emits events after the value is patched.\n * * `onlySelf`: When true, each change only affects this control and not its parent. Default is\n * true.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n FormGroup.prototype.patchValue = function (value, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n Object.keys(value).forEach(function (name) {\n if (_this.controls[name]) {\n _this.controls[name].patchValue(value[name], { onlySelf: true, emitEvent: options.emitEvent });\n }\n });\n this.updateValueAndValidity(options);\n };\n /**\n * Resets the `FormGroup`, marks all descendants are marked `pristine` and `untouched`, and\n * the value of all descendants to null.\n *\n * You reset to a specific form state by passing in a map of states\n * that matches the structure of your form, with control names as keys. The state\n * is a standalone value or a form state object with both a value and a disabled\n * status.\n *\n * @param value Resets the control with an initial value,\n * or an object that defines the initial value and disabled state.\n *\n * @param options Configuration options that determine how the control propagates changes\n * and emits events when the group is reset.\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n * false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n *\n * @usageNotes\n *\n * ### Reset the form group values\n *\n * ```ts\n * const form = new FormGroup({\n * first: new FormControl('first name'),\n * last: new FormControl('last name')\n * });\n *\n * console.log(form.value); // {first: 'first name', last: 'last name'}\n *\n * form.reset({ first: 'name', last: 'last name' });\n *\n * console.log(form.value); // {first: 'name', last: 'last name'}\n * ```\n *\n * ### Reset the form group values and disabled status\n *\n * ```\n * const form = new FormGroup({\n * first: new FormControl('first name'),\n * last: new FormControl('last name')\n * });\n *\n * form.reset({\n * first: {value: 'name', disabled: true},\n * last: 'last'\n * });\n *\n * console.log(this.form.value); // {first: 'name', last: 'last name'}\n * console.log(this.form.get('first').status); // 'DISABLED'\n * ```\n */\n FormGroup.prototype.reset = function (value, options) {\n if (value === void 0) { value = {}; }\n if (options === void 0) { options = {}; }\n this._forEachChild(function (control, name) {\n control.reset(value[name], { onlySelf: true, emitEvent: options.emitEvent });\n });\n this._updatePristine(options);\n this._updateTouched(options);\n this.updateValueAndValidity(options);\n };\n /**\n * The aggregate value of the `FormGroup`, including any disabled controls.\n *\n * Retrieves all values regardless of disabled status.\n * The `value` property is the best way to get the value of the group, because\n * it excludes disabled controls in the `FormGroup`.\n */\n FormGroup.prototype.getRawValue = function () {\n return this._reduceChildren({}, function (acc, control, name) {\n acc[name] = control instanceof FormControl ? control.value : control.getRawValue();\n return acc;\n });\n };\n /** @internal */\n FormGroup.prototype._syncPendingControls = function () {\n var subtreeUpdated = this._reduceChildren(false, function (updated, child) {\n return child._syncPendingControls() ? true : updated;\n });\n if (subtreeUpdated)\n this.updateValueAndValidity({ onlySelf: true });\n return subtreeUpdated;\n };\n /** @internal */\n FormGroup.prototype._throwIfControlMissing = function (name) {\n if (!Object.keys(this.controls).length) {\n throw new Error(\"\\n There are no form controls registered with this group yet. If you're using ngModel,\\n you may want to check next tick (e.g. use setTimeout).\\n \");\n }\n if (!this.controls[name]) {\n throw new Error(\"Cannot find form control with name: \" + name + \".\");\n }\n };\n /** @internal */\n FormGroup.prototype._forEachChild = function (cb) {\n var _this = this;\n Object.keys(this.controls).forEach(function (k) { return cb(_this.controls[k], k); });\n };\n /** @internal */\n FormGroup.prototype._setUpControls = function () {\n var _this = this;\n this._forEachChild(function (control) {\n control.setParent(_this);\n control._registerOnCollectionChange(_this._onCollectionChange);\n });\n };\n /** @internal */\n FormGroup.prototype._updateValue = function () {\n this.value = this._reduceValue();\n };\n /** @internal */\n FormGroup.prototype._anyControls = function (condition) {\n var _this = this;\n var res = false;\n this._forEachChild(function (control, name) {\n res = res || (_this.contains(name) && condition(control));\n });\n return res;\n };\n /** @internal */\n FormGroup.prototype._reduceValue = function () {\n var _this = this;\n return this._reduceChildren({}, function (acc, control, name) {\n if (control.enabled || _this.disabled) {\n acc[name] = control.value;\n }\n return acc;\n });\n };\n /** @internal */\n FormGroup.prototype._reduceChildren = function (initValue, fn) {\n var res = initValue;\n this._forEachChild(function (control, name) {\n res = fn(res, control, name);\n });\n return res;\n };\n /** @internal */\n FormGroup.prototype._allControlsDisabled = function () {\n var e_1, _a;\n try {\n for (var _b = __values(Object.keys(this.controls)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var controlName = _c.value;\n if (this.controls[controlName].enabled) {\n return false;\n }\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 Object.keys(this.controls).length > 0 || this.disabled;\n };\n /** @internal */\n FormGroup.prototype._checkAllValuesPresent = function (value) {\n this._forEachChild(function (control, name) {\n if (value[name] === undefined) {\n throw new Error(\"Must supply a value for form control with name: '\" + name + \"'.\");\n }\n });\n };\n return FormGroup;\n}(AbstractControl));\n/**\n * Tracks the value and validity state of an array of `FormControl`,\n * `FormGroup` or `FormArray` instances.\n *\n * A `FormArray` aggregates the values of each child `FormControl` into an array.\n * It calculates its status by reducing the status values of its children. For example, if one of\n * the controls in a `FormArray` is invalid, the entire array becomes invalid.\n *\n * `FormArray` is one of the three fundamental building blocks used to define forms in Angular,\n * along with `FormControl` and `FormGroup`.\n *\n * @usageNotes\n *\n * ### Create an array of form controls\n *\n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy', Validators.minLength(2)),\n * new FormControl('Drew'),\n * ]);\n *\n * console.log(arr.value); // ['Nancy', 'Drew']\n * console.log(arr.status); // 'VALID'\n * ```\n *\n * ### Create a form array with array-level validators\n *\n * You include array-level validators and async validators. These come in handy\n * when you want to perform validation that considers the value of more than one child\n * control.\n *\n * The two types of validators are passed in separately as the second and third arg\n * respectively, or together as part of an options object.\n *\n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy'),\n * new FormControl('Drew')\n * ], {validators: myValidator, asyncValidators: myAsyncValidator});\n * ```\n *\n * ### Set the updateOn property for all controls in a form array\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * array level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl()\n * ], {updateOn: 'blur'});\n * ```\n *\n * ### Adding or removing controls from a form array\n *\n * To change the controls in the array, use the `push`, `insert`, `removeAt` or `clear` methods\n * in `FormArray` itself. These methods ensure the controls are properly tracked in the\n * form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate\n * the `FormArray` directly, as that result in strange and unexpected behavior such\n * as broken change detection.\n *\n * @publicApi\n */\nvar FormArray = /** @class */ (function (_super) {\n __extends(FormArray, _super);\n /**\n * Creates a new `FormArray` instance.\n *\n * @param controls An array of child controls. Each child control is given an index\n * where it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains validation functions\n * and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator functions\n *\n */\n function FormArray(controls, validatorOrOpts, asyncValidator) {\n var _this = _super.call(this, coerceToValidator(validatorOrOpts), coerceToAsyncValidator(asyncValidator, validatorOrOpts)) || this;\n _this.controls = controls;\n _this._initObservables();\n _this._setUpdateStrategy(validatorOrOpts);\n _this._setUpControls();\n _this.updateValueAndValidity({ onlySelf: true, emitEvent: false });\n return _this;\n }\n /**\n * Get the `AbstractControl` at the given `index` in the array.\n *\n * @param index Index in the array to retrieve the control\n */\n FormArray.prototype.at = function (index) {\n return this.controls[index];\n };\n /**\n * Insert a new `AbstractControl` at the end of the array.\n *\n * @param control Form control to be inserted\n */\n FormArray.prototype.push = function (control) {\n this.controls.push(control);\n this._registerControl(control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n };\n /**\n * Insert a new `AbstractControl` at the given `index` in the array.\n *\n * @param index Index in the array to insert the control\n * @param control Form control to be inserted\n */\n FormArray.prototype.insert = function (index, control) {\n this.controls.splice(index, 0, control);\n this._registerControl(control);\n this.updateValueAndValidity();\n };\n /**\n * Remove the control at the given `index` in the array.\n *\n * @param index Index in the array to remove the control\n */\n FormArray.prototype.removeAt = function (index) {\n if (this.controls[index])\n this.controls[index]._registerOnCollectionChange(function () { });\n this.controls.splice(index, 1);\n this.updateValueAndValidity();\n };\n /**\n * Replace an existing control.\n *\n * @param index Index in the array to replace the control\n * @param control The `AbstractControl` control to replace the existing control\n */\n FormArray.prototype.setControl = function (index, control) {\n if (this.controls[index])\n this.controls[index]._registerOnCollectionChange(function () { });\n this.controls.splice(index, 1);\n if (control) {\n this.controls.splice(index, 0, control);\n this._registerControl(control);\n }\n this.updateValueAndValidity();\n this._onCollectionChange();\n };\n Object.defineProperty(FormArray.prototype, \"length\", {\n /**\n * Length of the control array.\n */\n get: function () {\n return this.controls.length;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Sets the value of the `FormArray`. It accepts an array that matches\n * the structure of the control.\n *\n * This method performs strict checks, and throws an error if you try\n * to set the value of a control that doesn't exist or if you exclude the\n * value of a control.\n *\n * @usageNotes\n * ### Set the values for the controls in the form array\n *\n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n *\n * arr.setValue(['Nancy', 'Drew']);\n * console.log(arr.value); // ['Nancy', 'Drew']\n * ```\n *\n * @param value Array of values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n FormArray.prototype.setValue = function (value, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n this._checkAllValuesPresent(value);\n value.forEach(function (newValue, index) {\n _this._throwIfControlMissing(index);\n _this.at(index).setValue(newValue, { onlySelf: true, emitEvent: options.emitEvent });\n });\n this.updateValueAndValidity(options);\n };\n /**\n * Patches the value of the `FormArray`. It accepts an array that matches the\n * structure of the control, and does its best to match the values to the correct\n * controls in the group.\n *\n * It accepts both super-sets and sub-sets of the array without throwing an error.\n *\n * @usageNotes\n * ### Patch the values for controls in a form array\n *\n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n *\n * arr.patchValue(['Nancy']);\n * console.log(arr.value); // ['Nancy', null]\n * ```\n *\n * @param value Array of latest values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control value is updated.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n FormArray.prototype.patchValue = function (value, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n value.forEach(function (newValue, index) {\n if (_this.at(index)) {\n _this.at(index).patchValue(newValue, { onlySelf: true, emitEvent: options.emitEvent });\n }\n });\n this.updateValueAndValidity(options);\n };\n /**\n * Resets the `FormArray` and all descendants are marked `pristine` and `untouched`, and the\n * value of all descendants to null or null maps.\n *\n * You reset to a specific form state by passing in an array of states\n * that matches the structure of the control. The state is a standalone value\n * or a form state object with both a value and a disabled status.\n *\n * @usageNotes\n * ### Reset the values in a form array\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * arr.reset(['name', 'last name']);\n *\n * console.log(this.arr.value); // ['name', 'last name']\n * ```\n *\n * ### Reset the values in a form array and the disabled status for the first control\n *\n * ```\n * this.arr.reset([\n * {value: 'name', disabled: true},\n * 'last'\n * ]);\n *\n * console.log(this.arr.value); // ['name', 'last name']\n * console.log(this.arr.get(0).status); // 'DISABLED'\n * ```\n *\n * @param value Array of values for the controls\n * @param options Configure options that determine how the control propagates changes and\n * emits events after the value changes\n *\n * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n * is false.\n * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n * `valueChanges`\n * observables emit events with the latest status and value when the control is reset.\n * When false, no events are emitted.\n * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n * updateValueAndValidity} method.\n */\n FormArray.prototype.reset = function (value, options) {\n if (value === void 0) { value = []; }\n if (options === void 0) { options = {}; }\n this._forEachChild(function (control, index) {\n control.reset(value[index], { onlySelf: true, emitEvent: options.emitEvent });\n });\n this._updatePristine(options);\n this._updateTouched(options);\n this.updateValueAndValidity(options);\n };\n /**\n * The aggregate value of the array, including any disabled controls.\n *\n * Reports all values regardless of disabled status.\n * For enabled controls only, the `value` property is the best way to get the value of the array.\n */\n FormArray.prototype.getRawValue = function () {\n return this.controls.map(function (control) {\n return control instanceof FormControl ? control.value : control.getRawValue();\n });\n };\n /**\n * Remove all controls in the `FormArray`.\n *\n * @usageNotes\n * ### Remove all elements from a FormArray\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.length); // 2\n *\n * arr.clear();\n * console.log(arr.length); // 0\n * ```\n *\n * It's a simpler and more efficient alternative to removing all elements one by one:\n *\n * ```ts\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n *\n * while (arr.length) {\n * arr.removeAt(0);\n * }\n * ```\n */\n FormArray.prototype.clear = function () {\n if (this.controls.length < 1)\n return;\n this._forEachChild(function (control) { return control._registerOnCollectionChange(function () { }); });\n this.controls.splice(0);\n this.updateValueAndValidity();\n };\n /** @internal */\n FormArray.prototype._syncPendingControls = function () {\n var subtreeUpdated = this.controls.reduce(function (updated, child) {\n return child._syncPendingControls() ? true : updated;\n }, false);\n if (subtreeUpdated)\n this.updateValueAndValidity({ onlySelf: true });\n return subtreeUpdated;\n };\n /** @internal */\n FormArray.prototype._throwIfControlMissing = function (index) {\n if (!this.controls.length) {\n throw new Error(\"\\n There are no form controls registered with this array yet. If you're using ngModel,\\n you may want to check next tick (e.g. use setTimeout).\\n \");\n }\n if (!this.at(index)) {\n throw new Error(\"Cannot find form control at index \" + index);\n }\n };\n /** @internal */\n FormArray.prototype._forEachChild = function (cb) {\n this.controls.forEach(function (control, index) {\n cb(control, index);\n });\n };\n /** @internal */\n FormArray.prototype._updateValue = function () {\n var _this = this;\n this.value =\n this.controls.filter(function (control) { return control.enabled || _this.disabled; })\n .map(function (control) { return control.value; });\n };\n /** @internal */\n FormArray.prototype._anyControls = function (condition) {\n return this.controls.some(function (control) { return control.enabled && condition(control); });\n };\n /** @internal */\n FormArray.prototype._setUpControls = function () {\n var _this = this;\n this._forEachChild(function (control) { return _this._registerControl(control); });\n };\n /** @internal */\n FormArray.prototype._checkAllValuesPresent = function (value) {\n this._forEachChild(function (control, i) {\n if (value[i] === undefined) {\n throw new Error(\"Must supply a value for form control at index: \" + i + \".\");\n }\n });\n };\n /** @internal */\n FormArray.prototype._allControlsDisabled = function () {\n var e_2, _a;\n try {\n for (var _b = __values(this.controls), _c = _b.next(); !_c.done; _c = _b.next()) {\n var control = _c.value;\n if (control.enabled)\n return false;\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 this.controls.length > 0 || this.disabled;\n };\n FormArray.prototype._registerControl = function (control) {\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n };\n return FormArray;\n}(AbstractControl));\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 */\nvar formDirectiveProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(function () { return NgForm; })\n};\nvar ɵ0 = function () { return Promise.resolve(null); };\nvar resolvedPromise = (ɵ0)();\n/**\n * @description\n * Creates a top-level `FormGroup` instance and binds it to a form\n * to track aggregate form value and validation status.\n *\n * As soon as you import the `FormsModule`, this directive becomes active by default on\n * all `<form>` tags. You don't need to add a special selector.\n *\n * You optionally export the directive into a local template variable using `ngForm` as the key\n * (ex: `#myForm=\"ngForm\"`). This is optional, but useful. Many properties from the underlying\n * `FormGroup` instance are duplicated on the directive itself, so a reference to it\n * gives you access to the aggregate value and validity status of the form, as well as\n * user interaction properties like `dirty` and `touched`.\n *\n * To register child controls with the form, use `NgModel` with a `name`\n * attribute. You may use `NgModelGroup` to create sub-groups within the form.\n *\n * If necessary, listen to the directive's `ngSubmit` event to be notified when the user has\n * triggered a form submission. The `ngSubmit` event emits the original form\n * submission event.\n *\n * In template driven forms, all `<form>` tags are automatically tagged as `NgForm`.\n * To import the `FormsModule` but skip its usage in some forms,\n * for example, to use native HTML5 validation, add the `ngNoForm` and the `<form>`\n * tags won't create an `NgForm` directive. In reactive forms, using `ngNoForm` is\n * unnecessary because the `<form>` tags are inert. In that case, you would\n * refrain from using the `formGroup` directive.\n *\n * @usageNotes\n *\n * ### Listening for form submission\n *\n * The following example shows how to capture the form values from the \"ngSubmit\" event.\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Setting the update options\n *\n * The following example shows you how to change the \"updateOn\" option from its default using\n * ngFormOptions.\n *\n * ```html\n * <form [ngFormOptions]=\"{updateOn: 'blur'}\">\n * <input name=\"one\" ngModel> <!-- this ngModel will update on blur -->\n * </form>\n * ```\n *\n * ### Native DOM validation UI\n *\n * In order to prevent the native DOM form validation UI from interfering with Angular's form\n * validation, Angular automatically adds the `novalidate` attribute on any `<form>` whenever\n * `FormModule` or `ReactiveFormModule` are imported into the application.\n * If you want to explicitly enable native DOM validation UI with Angular forms, you can add the\n * `ngNativeValidate` attribute to the `<form>` element:\n *\n * ```html\n * <form ngNativeValidate>\n * ...\n * </form>\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\nvar NgForm = /** @class */ (function (_super) {\n __extends(NgForm, _super);\n function NgForm(validators, asyncValidators) {\n var _this = _super.call(this) || this;\n /**\n * @description\n * Returns whether the form submission has been triggered.\n */\n _this.submitted = false;\n _this._directives = [];\n /**\n * @description\n * Event emitter for the \"ngSubmit\" event\n */\n _this.ngSubmit = new EventEmitter();\n _this.form =\n new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));\n return _this;\n }\n /**\n * @description\n * Lifecycle method called after the view is initialized. For internal use only.\n */\n NgForm.prototype.ngAfterViewInit = function () {\n this._setUpdateStrategy();\n };\n Object.defineProperty(NgForm.prototype, \"formDirective\", {\n /**\n * @description\n * The directive instance.\n */\n get: function () {\n return this;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForm.prototype, \"control\", {\n /**\n * @description\n * The internal `FormGroup` instance.\n */\n get: function () {\n return this.form;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForm.prototype, \"path\", {\n /**\n * @description\n * Returns an array representing the path to this group. Because this directive\n * always lives at the top level of a form, it is always an empty array.\n */\n get: function () {\n return [];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForm.prototype, \"controls\", {\n /**\n * @description\n * Returns a map of the controls in this group.\n */\n get: function () {\n return this.form.controls;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @description\n * Method that sets up the control directive in this group, re-calculates its value\n * and validity, and adds the instance to the internal list of directives.\n *\n * @param dir The `NgModel` directive instance.\n */\n NgForm.prototype.addControl = function (dir) {\n var _this = this;\n resolvedPromise.then(function () {\n var container = _this._findContainer(dir.path);\n dir.control =\n container.registerControl(dir.name, dir.control);\n setUpControl(dir.control, dir);\n dir.control.updateValueAndValidity({ emitEvent: false });\n _this._directives.push(dir);\n });\n };\n /**\n * @description\n * Retrieves the `FormControl` instance from the provided `NgModel` directive.\n *\n * @param dir The `NgModel` directive instance.\n */\n NgForm.prototype.getControl = function (dir) {\n return this.form.get(dir.path);\n };\n /**\n * @description\n * Removes the `NgModel` instance from the internal list of directives\n *\n * @param dir The `NgModel` directive instance.\n */\n NgForm.prototype.removeControl = function (dir) {\n var _this = this;\n resolvedPromise.then(function () {\n var container = _this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n removeDir(_this._directives, dir);\n });\n };\n /**\n * @description\n * Adds a new `NgModelGroup` directive instance to the form.\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n NgForm.prototype.addFormGroup = function (dir) {\n var _this = this;\n resolvedPromise.then(function () {\n var container = _this._findContainer(dir.path);\n var group = new FormGroup({});\n setUpFormContainer(group, dir);\n container.registerControl(dir.name, group);\n group.updateValueAndValidity({ emitEvent: false });\n });\n };\n /**\n * @description\n * Removes the `NgModelGroup` directive instance from the form.\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n NgForm.prototype.removeFormGroup = function (dir) {\n var _this = this;\n resolvedPromise.then(function () {\n var container = _this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n });\n };\n /**\n * @description\n * Retrieves the `FormGroup` for a provided `NgModelGroup` directive instance\n *\n * @param dir The `NgModelGroup` directive instance.\n */\n NgForm.prototype.getFormGroup = function (dir) {\n return this.form.get(dir.path);\n };\n /**\n * Sets the new value for the provided `NgControl` directive.\n *\n * @param dir The `NgControl` directive instance.\n * @param value The new value for the directive's control.\n */\n NgForm.prototype.updateModel = function (dir, value) {\n var _this = this;\n resolvedPromise.then(function () {\n var ctrl = _this.form.get(dir.path);\n ctrl.setValue(value);\n });\n };\n /**\n * @description\n * Sets the value for this `FormGroup`.\n *\n * @param value The new value\n */\n NgForm.prototype.setValue = function (value) {\n this.control.setValue(value);\n };\n /**\n * @description\n * Method called when the \"submit\" event is triggered on the form.\n * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n *\n * @param $event The \"submit\" event object\n */\n NgForm.prototype.onSubmit = function ($event) {\n this.submitted = true;\n syncPendingControls(this.form, this._directives);\n this.ngSubmit.emit($event);\n return false;\n };\n /**\n * @description\n * Method called when the \"reset\" event is triggered on the form.\n */\n NgForm.prototype.onReset = function () {\n this.resetForm();\n };\n /**\n * @description\n * Resets the form to an initial value and resets its submitted status.\n *\n * @param value The new value for the form.\n */\n NgForm.prototype.resetForm = function (value) {\n if (value === void 0) { value = undefined; }\n this.form.reset(value);\n this.submitted = false;\n };\n NgForm.prototype._setUpdateStrategy = function () {\n if (this.options && this.options.updateOn != null) {\n this.form._updateOn = this.options.updateOn;\n }\n };\n /** @internal */\n NgForm.prototype._findContainer = function (path) {\n path.pop();\n return path.length ? this.form.get(path) : this.form;\n };\n __decorate([\n Input('ngFormOptions'),\n __metadata(\"design:type\", Object)\n ], NgForm.prototype, \"options\", void 0);\n NgForm = __decorate([ __param(0, Optional()), __param(0, Self()), __param(0, Inject(NG_VALIDATORS)),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_ASYNC_VALIDATORS)),\n __metadata(\"design:paramtypes\", [Array, Array])\n ], NgForm);\nNgForm.ɵfac = function NgForm_Factory(t) { return new (t || NgForm)(ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10)); };\nNgForm.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgForm, selectors: [[\"form\", 3, \"ngNoForm\", \"\", 3, \"formGroup\", \"\"], [\"ng-form\"], [\"\", \"ngForm\", \"\"]], hostBindings: function NgForm_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"submit\", function NgForm_submit_HostBindingHandler($event) { return ctx.onSubmit($event); })(\"reset\", function NgForm_reset_HostBindingHandler() { return ctx.onReset(); });\n } }, inputs: { options: [\"ngFormOptions\", \"options\"] }, outputs: { ngSubmit: \"ngSubmit\" }, exportAs: [\"ngForm\"], features: [ɵngcc0.ɵɵProvidersFeature([formDirectiveProvider]), ɵngcc0.ɵɵInheritDefinitionFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgForm, [{\n type: Directive,\n args: [{\n selector: 'form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]',\n providers: [formDirectiveProvider],\n host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n outputs: ['ngSubmit'],\n exportAs: 'ngForm'\n }]\n }], function () { return [{ type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, { options: [{\n type: Input,\n args: ['ngFormOptions']\n }] }); })();\n return NgForm;\n}(ControlContainer));\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 * A base class for code shared between the `NgModelGroup` and `FormGroupName` directives.\n *\n * @publicApi\n */\nvar AbstractFormGroupDirective = /** @class */ (function (_super) {\n __extends(AbstractFormGroupDirective, _super);\n function AbstractFormGroupDirective() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @description\n * An internal callback method triggered on the instance after the inputs are set.\n * Registers the group with its parent group.\n */\n AbstractFormGroupDirective.prototype.ngOnInit = function () {\n this._checkParentType();\n this.formDirective.addFormGroup(this);\n };\n /**\n * @description\n * An internal callback method triggered before the instance is destroyed.\n * Removes the group from its parent group.\n */\n AbstractFormGroupDirective.prototype.ngOnDestroy = function () {\n if (this.formDirective) {\n this.formDirective.removeFormGroup(this);\n }\n };\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"control\", {\n /**\n * @description\n * The `FormGroup` bound to this directive.\n */\n get: function () {\n return this.formDirective.getFormGroup(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"path\", {\n /**\n * @description\n * The path to this group from the top-level directive.\n */\n get: function () {\n return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"formDirective\", {\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get: function () {\n return this._parent ? this._parent.formDirective : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"validator\", {\n /**\n * @description\n * The synchronous validators registered with this group.\n */\n get: function () {\n return composeValidators(this._validators);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"asyncValidator\", {\n /**\n * @description\n * The async validators registered with this group.\n */\n get: function () {\n return composeAsyncValidators(this._asyncValidators);\n },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n AbstractFormGroupDirective.prototype._checkParentType = function () { };\nAbstractFormGroupDirective.ɵfac = function AbstractFormGroupDirective_Factory(t) { return ɵAbstractFormGroupDirective_BaseFactory(t || AbstractFormGroupDirective); };\nAbstractFormGroupDirective.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: AbstractFormGroupDirective, features: [ɵngcc0.ɵɵInheritDefinitionFeature] });\nvar ɵAbstractFormGroupDirective_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(AbstractFormGroupDirective);\n return AbstractFormGroupDirective;\n}(ControlContainer));\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 */\nvar TemplateDrivenErrors = /** @class */ (function () {\n function TemplateDrivenErrors() {\n }\n TemplateDrivenErrors.modelParentException = function () {\n throw new Error(\"\\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\\n formGroup's partner directive \\\"formControlName\\\" instead. Example:\\n\\n \" + FormErrorExamples.formControlName + \"\\n\\n Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\\n\\n Example:\\n\\n \" + FormErrorExamples.ngModelWithFormGroup);\n };\n TemplateDrivenErrors.formGroupNameException = function () {\n throw new Error(\"\\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\\n\\n Option 1: Use formControlName instead of ngModel (reactive strategy):\\n\\n \" + FormErrorExamples.formGroupName + \"\\n\\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\\n\\n \" + FormErrorExamples.ngModelGroup);\n };\n TemplateDrivenErrors.missingNameException = function () {\n throw new Error(\"If ngModel is used within a form tag, either the name attribute must be set or the form\\n control must be defined as 'standalone' in ngModelOptions.\\n\\n Example 1: <input [(ngModel)]=\\\"person.firstName\\\" name=\\\"first\\\">\\n Example 2: <input [(ngModel)]=\\\"person.firstName\\\" [ngModelOptions]=\\\"{standalone: true}\\\">\");\n };\n TemplateDrivenErrors.modelGroupParentException = function () {\n throw new Error(\"\\n ngModelGroup cannot be used with a parent formGroup directive.\\n\\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\\n\\n \" + FormErrorExamples.formGroupName + \"\\n\\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\\n\\n \" + FormErrorExamples.ngModelGroup);\n };\n return TemplateDrivenErrors;\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 */\nvar modelGroupProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(function () { return NgModelGroup; })\n};\n/**\n * @description\n * Creates and binds a `FormGroup` instance to a DOM element.\n *\n * This directive can only be used as a child of `NgForm` (within `<form>` tags).\n *\n * Use this directive to validate a sub-group of your form separately from the\n * rest of your form, or if some values in your domain model make more sense\n * to consume together in a nested object.\n *\n * Provide a name for the sub-group and it will become the key\n * for the sub-group in the form's full value. If you need direct access, export the directive into\n * a local template variable using `ngModelGroup` (ex: `#myGroup=\"ngModelGroup\"`).\n *\n * @usageNotes\n *\n * ### Consuming controls in a grouping\n *\n * The following example shows you how to combine controls together in a sub-group\n * of the form.\n *\n * {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}\n *\n * @ngModule FormsModule\n * @publicApi\n */\nvar NgModelGroup = /** @class */ (function (_super) {\n __extends(NgModelGroup, _super);\n function NgModelGroup(parent, validators, asyncValidators) {\n var _this = _super.call(this) || this;\n _this._parent = parent;\n _this._validators = validators;\n _this._asyncValidators = asyncValidators;\n return _this;\n }\n NgModelGroup_1 = NgModelGroup;\n /** @internal */\n NgModelGroup.prototype._checkParentType = function () {\n if (!(this._parent instanceof NgModelGroup_1) && !(this._parent instanceof NgForm)) {\n TemplateDrivenErrors.modelGroupParentException();\n }\n };\n var NgModelGroup_1;\n __decorate([\n Input('ngModelGroup'),\n __metadata(\"design:type\", String)\n ], NgModelGroup.prototype, \"name\", void 0);\n NgModelGroup = NgModelGroup_1 = __decorate([ __param(0, Host()), __param(0, SkipSelf()),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_VALIDATORS)),\n __param(2, Optional()), __param(2, Self()), __param(2, Inject(NG_ASYNC_VALIDATORS)),\n __metadata(\"design:paramtypes\", [ControlContainer, Array, Array])\n ], NgModelGroup);\nNgModelGroup.ɵfac = function NgModelGroup_Factory(t) { return new (t || NgModelGroup)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 5), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10)); };\nNgModelGroup.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgModelGroup, selectors: [[\"\", \"ngModelGroup\", \"\"]], inputs: { name: [\"ngModelGroup\", \"name\"] }, exportAs: [\"ngModelGroup\"], features: [ɵngcc0.ɵɵProvidersFeature([modelGroupProvider]), ɵngcc0.ɵɵInheritDefinitionFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgModelGroup, [{\n type: Directive,\n args: [{ selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup' }]\n }], function () { return [{ type: ControlContainer, decorators: [{\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, { name: [{\n type: Input,\n args: ['ngModelGroup']\n }] }); })();\n return NgModelGroup;\n}(AbstractFormGroupDirective));\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 */\nvar formControlBinding = {\n provide: NgControl,\n useExisting: forwardRef(function () { return NgModel; })\n};\nvar ɵ0$1 = function () { return Promise.resolve(null); };\n/**\n * `ngModel` forces an additional change detection run when its inputs change:\n * E.g.:\n * ```\n * <div>{{myModel.valid}}</div>\n * <input [(ngModel)]=\"myValue\" #myModel=\"ngModel\">\n * ```\n * I.e. `ngModel` can export itself on the element and then be used in the template.\n * Normally, this would result in expressions before the `input` that use the exported directive\n * to have and old value as they have been\n * dirty checked before. As this is a very common case for `ngModel`, we added this second change\n * detection run.\n *\n * Notes:\n * - this is just one extra run no matter how many `ngModel` have been changed.\n * - this is a general problem when using `exportAs` for directives!\n */\nvar resolvedPromise$1 = (ɵ0$1)();\n/**\n * @description\n * Creates a `FormControl` instance from a domain model and binds it\n * to a form control element.\n *\n * The `FormControl` instance tracks the value, user interaction, and\n * validation status of the control and keeps the view synced with the model. If used\n * within a parent form, the directive also registers itself with the form as a child\n * control.\n *\n * This directive is used by itself or as part of a larger form. Use the\n * `ngModel` selector to activate it.\n *\n * It accepts a domain model as an optional `Input`. If you have a one-way binding\n * to `ngModel` with `[]` syntax, changing the value of the domain model in the component\n * class sets the value in the view. If you have a two-way binding with `[()]` syntax\n * (also known as 'banana-box syntax'), the value in the UI always syncs back to\n * the domain model in your class.\n *\n * To inspect the properties of the associated `FormControl` (like validity state),\n * export the directive into a local template variable using `ngModel` as the key (ex:\n * `#myVar=\"ngModel\"`). You then access the control using the directive's `control` property, but\n * most properties used (like `valid` and `dirty`) fall through to the control anyway for direct\n * access. See a full list of properties directly available in `AbstractControlDirective`.\n *\n * @see `RadioControlValueAccessor`\n * @see `SelectControlValueAccessor`\n *\n * @usageNotes\n *\n * ### Using ngModel on a standalone control\n *\n * The following examples show a simple standalone control using `ngModel`:\n *\n * {@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}\n *\n * When using the `ngModel` within `<form>` tags, you'll also need to supply a `name` attribute\n * so that the control can be registered with the parent form under that name.\n *\n * In the context of a parent form, it's often unnecessary to include one-way or two-way binding,\n * as the parent form syncs the value for you. You access its properties by exporting it into a\n * local template variable using `ngForm` such as (`#f=\"ngForm\"`). Use the variable where\n * needed on form submission.\n *\n * If you do need to populate initial values into your form, using a one-way binding for\n * `ngModel` tends to be sufficient as long as you use the exported form's value rather\n * than the domain model's value on submit.\n *\n * ### Using ngModel within a form\n *\n * The following example shows controls using `ngModel` within a form:\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Using a standalone ngModel within a group\n *\n * The following example shows you how to use a standalone ngModel control\n * within a form. This controls the display of the form, but doesn't contain form data.\n *\n * ```html\n * <form>\n * <input name=\"login\" ngModel placeholder=\"Login\">\n * <input type=\"checkbox\" ngModel [ngModelOptions]=\"{standalone: true}\"> Show more options?\n * </form>\n * <!-- form value: {login: ''} -->\n * ```\n *\n * ### Setting the ngModel name attribute through options\n *\n * The following example shows you an alternate way to set the name attribute. The name attribute is\n * used within a custom form component, and the name `@Input` property serves a different purpose.\n *\n * ```html\n * <form>\n * <my-person-control name=\"Nancy\" ngModel [ngModelOptions]=\"{name: 'user'}\">\n * </my-person-control>\n * </form>\n * <!-- form value: {user: ''} -->\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\nvar NgModel = /** @class */ (function (_super) {\n __extends(NgModel, _super);\n function NgModel(parent, validators, asyncValidators, valueAccessors) {\n var _this = _super.call(this) || this;\n _this.control = new FormControl();\n /** @internal */\n _this._registered = false;\n /**\n * @description\n * Event emitter for producing the `ngModelChange` event after\n * the view model updates.\n */\n _this.update = new EventEmitter();\n _this._parent = parent;\n _this._rawValidators = validators || [];\n _this._rawAsyncValidators = asyncValidators || [];\n _this.valueAccessor = selectValueAccessor(_this, valueAccessors);\n return _this;\n }\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use\n * only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n NgModel.prototype.ngOnChanges = function (changes) {\n this._checkForErrors();\n if (!this._registered)\n this._setUpControl();\n if ('isDisabled' in changes) {\n this._updateDisabled(changes);\n }\n if (isPropertyUpdated(changes, this.viewModel)) {\n this._updateValue(this.model);\n this.viewModel = this.model;\n }\n };\n /**\n * @description\n * Lifecycle method called before the directive's instance is destroyed. For internal\n * use only.\n */\n NgModel.prototype.ngOnDestroy = function () {\n this.formDirective && this.formDirective.removeControl(this);\n };\n Object.defineProperty(NgModel.prototype, \"path\", {\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get: function () {\n return this._parent ? controlPath(this.name, this._parent) : [this.name];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgModel.prototype, \"formDirective\", {\n /**\n * @description\n * The top-level directive for this control if present, otherwise null.\n */\n get: function () {\n return this._parent ? this._parent.formDirective : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgModel.prototype, \"validator\", {\n /**\n * @description\n * Synchronous validator function composed of all the synchronous validators\n * registered with this directive.\n */\n get: function () {\n return composeValidators(this._rawValidators);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgModel.prototype, \"asyncValidator\", {\n /**\n * @description\n * Async validator function composed of all the async validators registered with this\n * directive.\n */\n get: function () {\n return composeAsyncValidators(this._rawAsyncValidators);\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value emitted by `ngModelChange`.\n */\n NgModel.prototype.viewToModelUpdate = function (newValue) {\n this.viewModel = newValue;\n this.update.emit(newValue);\n };\n NgModel.prototype._setUpControl = function () {\n this._setUpdateStrategy();\n this._isStandalone() ? this._setUpStandalone() : this.formDirective.addControl(this);\n this._registered = true;\n };\n NgModel.prototype._setUpdateStrategy = function () {\n if (this.options && this.options.updateOn != null) {\n this.control._updateOn = this.options.updateOn;\n }\n };\n NgModel.prototype._isStandalone = function () {\n return !this._parent || !!(this.options && this.options.standalone);\n };\n NgModel.prototype._setUpStandalone = function () {\n setUpControl(this.control, this);\n this.control.updateValueAndValidity({ emitEvent: false });\n };\n NgModel.prototype._checkForErrors = function () {\n if (!this._isStandalone()) {\n this._checkParentType();\n }\n this._checkName();\n };\n NgModel.prototype._checkParentType = function () {\n if (!(this._parent instanceof NgModelGroup) &&\n this._parent instanceof AbstractFormGroupDirective) {\n TemplateDrivenErrors.formGroupNameException();\n }\n else if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n TemplateDrivenErrors.modelParentException();\n }\n };\n NgModel.prototype._checkName = function () {\n if (this.options && this.options.name)\n this.name = this.options.name;\n if (!this._isStandalone() && !this.name) {\n TemplateDrivenErrors.missingNameException();\n }\n };\n NgModel.prototype._updateValue = function (value) {\n var _this = this;\n resolvedPromise$1.then(function () {\n _this.control.setValue(value, { emitViewToModelChange: false });\n });\n };\n NgModel.prototype._updateDisabled = function (changes) {\n var _this = this;\n var disabledValue = changes['isDisabled'].currentValue;\n var isDisabled = disabledValue === '' || (disabledValue && disabledValue !== 'false');\n resolvedPromise$1.then(function () {\n if (isDisabled && !_this.control.disabled) {\n _this.control.disable();\n }\n else if (!isDisabled && _this.control.disabled) {\n _this.control.enable();\n }\n });\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", String)\n ], NgModel.prototype, \"name\", void 0);\n __decorate([\n Input('disabled'),\n __metadata(\"design:type\", Boolean)\n ], NgModel.prototype, \"isDisabled\", void 0);\n __decorate([\n Input('ngModel'),\n __metadata(\"design:type\", Object)\n ], NgModel.prototype, \"model\", void 0);\n __decorate([\n Input('ngModelOptions'),\n __metadata(\"design:type\", Object)\n ], NgModel.prototype, \"options\", void 0);\n __decorate([\n Output('ngModelChange'),\n __metadata(\"design:type\", Object)\n ], NgModel.prototype, \"update\", void 0);\n NgModel = __decorate([ __param(0, Optional()), __param(0, Host()),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_VALIDATORS)),\n __param(2, Optional()), __param(2, Self()), __param(2, Inject(NG_ASYNC_VALIDATORS)),\n __param(3, Optional()), __param(3, Self()), __param(3, Inject(NG_VALUE_ACCESSOR)),\n __metadata(\"design:paramtypes\", [ControlContainer,\n Array,\n Array, Array])\n ], NgModel);\nNgModel.ɵfac = function NgModel_Factory(t) { return new (t || NgModel)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 9), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_VALUE_ACCESSOR, 10)); };\nNgModel.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgModel, selectors: [[\"\", \"ngModel\", \"\", 3, \"formControlName\", \"\", 3, \"formControl\", \"\"]], inputs: { name: \"name\", isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"], options: [\"ngModelOptions\", \"options\"] }, outputs: { update: \"ngModelChange\" }, exportAs: [\"ngModel\"], features: [ɵngcc0.ɵɵProvidersFeature([formControlBinding]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgModel, [{\n type: Directive,\n args: [{\n selector: '[ngModel]:not([formControlName]):not([formControl])',\n providers: [formControlBinding],\n exportAs: 'ngModel'\n }]\n }], function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }] }]; }, { name: [{\n type: Input\n }], isDisabled: [{\n type: Input,\n args: ['disabled']\n }], model: [{\n type: Input,\n args: ['ngModel']\n }], options: [{\n type: Input,\n args: ['ngModelOptions']\n }], update: [{\n type: Output,\n args: ['ngModelChange']\n }] }); })();\n return NgModel;\n}(NgControl));\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 * Adds `novalidate` attribute to all forms by default.\n *\n * `novalidate` is used to disable browser's native form validation.\n *\n * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:\n *\n * ```\n * <form ngNativeValidate></form>\n * ```\n *\n * @publicApi\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n */\nvar ɵNgNoValidate = /** @class */ (function () {\n function ɵNgNoValidate() {\n }\nɵNgNoValidate.ɵfac = function ɵNgNoValidate_Factory(t) { return new (t || ɵNgNoValidate)(); };\nɵNgNoValidate.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: ɵNgNoValidate, selectors: [[\"form\", 3, \"ngNoForm\", \"\", 3, \"ngNativeValidate\", \"\"]], hostAttrs: [\"novalidate\", \"\"] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(ɵNgNoValidate, [{\n type: Directive,\n args: [{\n selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n host: { 'novalidate': '' }\n }]\n }], function () { return []; }, null); })();\n return ɵNgNoValidate;\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 * Token to provide to turn off the ngModel warning on formControl and formControlName.\n */\nvar NG_MODEL_WITH_FORM_CONTROL_WARNING = new InjectionToken('NgModelWithFormControlWarning');\nvar formControlBinding$1 = {\n provide: NgControl,\n useExisting: forwardRef(function () { return FormControlDirective; })\n};\n/**\n * @description\n * Synchronizes a standalone `FormControl` instance to a form control element.\n *\n * Note that support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives was deprecated in Angular v6 and is scheduled for removal in\n * a future version of Angular.\n * For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * The following example shows how to register a standalone control and set its value.\n *\n * {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nvar FormControlDirective = /** @class */ (function (_super) {\n __extends(FormControlDirective, _super);\n function FormControlDirective(validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {\n var _this = _super.call(this) || this;\n _this._ngModelWarningConfig = _ngModelWarningConfig;\n /** @deprecated as of v6 */\n _this.update = new EventEmitter();\n /**\n * @description\n * Instance property used to track whether an ngModel warning has been sent out for this\n * particular `FormControlDirective` instance. Used to support warning config of \"always\".\n *\n * @internal\n */\n _this._ngModelWarningSent = false;\n _this._rawValidators = validators || [];\n _this._rawAsyncValidators = asyncValidators || [];\n _this.valueAccessor = selectValueAccessor(_this, valueAccessors);\n return _this;\n }\n FormControlDirective_1 = FormControlDirective;\n Object.defineProperty(FormControlDirective.prototype, \"isDisabled\", {\n /**\n * @description\n * Triggers a warning that this input should not be used with reactive forms.\n */\n set: function (isDisabled) {\n ReactiveErrors.disabledAttrWarning();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use\n * only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n FormControlDirective.prototype.ngOnChanges = function (changes) {\n if (this._isControlChanged(changes)) {\n setUpControl(this.form, this);\n if (this.control.disabled && this.valueAccessor.setDisabledState) {\n this.valueAccessor.setDisabledState(true);\n }\n this.form.updateValueAndValidity({ emitEvent: false });\n }\n if (isPropertyUpdated(changes, this.viewModel)) {\n _ngModelWarning('formControl', FormControlDirective_1, this, this._ngModelWarningConfig);\n this.form.setValue(this.model);\n this.viewModel = this.model;\n }\n };\n Object.defineProperty(FormControlDirective.prototype, \"path\", {\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get: function () {\n return [];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormControlDirective.prototype, \"validator\", {\n /**\n * @description\n * Synchronous validator function composed of all the synchronous validators\n * registered with this directive.\n */\n get: function () {\n return composeValidators(this._rawValidators);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormControlDirective.prototype, \"asyncValidator\", {\n /**\n * @description\n * Async validator function composed of all the async validators registered with this\n * directive.\n */\n get: function () {\n return composeAsyncValidators(this._rawAsyncValidators);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormControlDirective.prototype, \"control\", {\n /**\n * @description\n * The `FormControl` bound to this directive.\n */\n get: function () {\n return this.form;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value for the view model.\n */\n FormControlDirective.prototype.viewToModelUpdate = function (newValue) {\n this.viewModel = newValue;\n this.update.emit(newValue);\n };\n FormControlDirective.prototype._isControlChanged = function (changes) {\n return changes.hasOwnProperty('form');\n };\n var FormControlDirective_1;\n /**\n * @description\n * Static property used to track whether any ngModel warnings have been sent across\n * all instances of FormControlDirective. Used to support warning config of \"once\".\n *\n * @internal\n */\n FormControlDirective._ngModelWarningSentOnce = false;\n __decorate([\n Input('formControl'),\n __metadata(\"design:type\", FormControl)\n ], FormControlDirective.prototype, \"form\", void 0);\n __decorate([\n Input('disabled'),\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n ], FormControlDirective.prototype, \"isDisabled\", null);\n __decorate([\n Input('ngModel'),\n __metadata(\"design:type\", Object)\n ], FormControlDirective.prototype, \"model\", void 0);\n __decorate([\n Output('ngModelChange'),\n __metadata(\"design:type\", Object)\n ], FormControlDirective.prototype, \"update\", void 0);\n FormControlDirective = FormControlDirective_1 = __decorate([ __param(0, Optional()), __param(0, Self()), __param(0, Inject(NG_VALIDATORS)),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_ASYNC_VALIDATORS)),\n __param(2, Optional()), __param(2, Self()), __param(2, Inject(NG_VALUE_ACCESSOR)),\n __param(3, Optional()), __param(3, Inject(NG_MODEL_WITH_FORM_CONTROL_WARNING)),\n __metadata(\"design:paramtypes\", [Array,\n Array, Array, Object])\n ], FormControlDirective);\nFormControlDirective.ɵfac = function FormControlDirective_Factory(t) { return new (t || FormControlDirective)(ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_VALUE_ACCESSOR, 10), ɵngcc0.ɵɵdirectiveInject(NG_MODEL_WITH_FORM_CONTROL_WARNING, 8)); };\nFormControlDirective.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: FormControlDirective, selectors: [[\"\", \"formControl\", \"\"]], inputs: { isDisabled: [\"disabled\", \"isDisabled\"], form: [\"formControl\", \"form\"], model: [\"ngModel\", \"model\"] }, outputs: { update: \"ngModelChange\" }, exportAs: [\"ngForm\"], features: [ɵngcc0.ɵɵProvidersFeature([formControlBinding$1]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(FormControlDirective, [{\n type: Directive,\n args: [{ selector: '[formControl]', providers: [formControlBinding$1], exportAs: 'ngForm' }]\n }], function () { return [{ type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }] }, { type: Object, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]\n }] }]; }, { isDisabled: [{\n type: Input,\n args: ['disabled']\n }], form: [{\n type: Input,\n args: ['formControl']\n }], model: [{\n type: Input,\n args: ['ngModel']\n }], update: [{\n type: Output,\n args: ['ngModelChange']\n }] }); })();\n return FormControlDirective;\n}(NgControl));\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 */\nvar formDirectiveProvider$1 = {\n provide: ControlContainer,\n useExisting: forwardRef(function () { return FormGroupDirective; })\n};\n/**\n * @description\n *\n * Binds an existing `FormGroup` to a DOM element.\n *\n * This directive accepts an existing `FormGroup` instance. It will then use this\n * `FormGroup` instance to match any child `FormControl`, `FormGroup`,\n * and `FormArray` instances to child `FormControlName`, `FormGroupName`,\n * and `FormArrayName` directives.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * ### Register Form Group\n *\n * The following example registers a `FormGroup` with first name and last name controls,\n * and listens for the *ngSubmit* event when the button is clicked.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nvar FormGroupDirective = /** @class */ (function (_super) {\n __extends(FormGroupDirective, _super);\n function FormGroupDirective(_validators, _asyncValidators) {\n var _this = _super.call(this) || this;\n _this._validators = _validators;\n _this._asyncValidators = _asyncValidators;\n /**\n * @description\n * Reports whether the form submission has been triggered.\n */\n _this.submitted = false;\n /**\n * @description\n * Tracks the list of added `FormControlName` instances\n */\n _this.directives = [];\n /**\n * @description\n * Tracks the `FormGroup` bound to this directive.\n */\n _this.form = null;\n /**\n * @description\n * Emits an event when the form submission has been triggered.\n */\n _this.ngSubmit = new EventEmitter();\n return _this;\n }\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n FormGroupDirective.prototype.ngOnChanges = function (changes) {\n this._checkFormPresent();\n if (changes.hasOwnProperty('form')) {\n this._updateValidators();\n this._updateDomValue();\n this._updateRegistrations();\n }\n };\n Object.defineProperty(FormGroupDirective.prototype, \"formDirective\", {\n /**\n * @description\n * Returns this directive's instance.\n */\n get: function () {\n return this;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormGroupDirective.prototype, \"control\", {\n /**\n * @description\n * Returns the `FormGroup` bound to this directive.\n */\n get: function () {\n return this.form;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormGroupDirective.prototype, \"path\", {\n /**\n * @description\n * Returns an array representing the path to this group. Because this directive\n * always lives at the top level of a form, it always an empty array.\n */\n get: function () {\n return [];\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @description\n * Method that sets up the control directive in this group, re-calculates its value\n * and validity, and adds the instance to the internal list of directives.\n *\n * @param dir The `FormControlName` directive instance.\n */\n FormGroupDirective.prototype.addControl = function (dir) {\n var ctrl = this.form.get(dir.path);\n setUpControl(ctrl, dir);\n ctrl.updateValueAndValidity({ emitEvent: false });\n this.directives.push(dir);\n return ctrl;\n };\n /**\n * @description\n * Retrieves the `FormControl` instance from the provided `FormControlName` directive\n *\n * @param dir The `FormControlName` directive instance.\n */\n FormGroupDirective.prototype.getControl = function (dir) {\n return this.form.get(dir.path);\n };\n /**\n * @description\n * Removes the `FormControlName` instance from the internal list of directives\n *\n * @param dir The `FormControlName` directive instance.\n */\n FormGroupDirective.prototype.removeControl = function (dir) {\n removeDir(this.directives, dir);\n };\n /**\n * Adds a new `FormGroupName` directive instance to the form.\n *\n * @param dir The `FormGroupName` directive instance.\n */\n FormGroupDirective.prototype.addFormGroup = function (dir) {\n var ctrl = this.form.get(dir.path);\n setUpFormContainer(ctrl, dir);\n ctrl.updateValueAndValidity({ emitEvent: false });\n };\n /**\n * No-op method to remove the form group.\n *\n * @param dir The `FormGroupName` directive instance.\n */\n FormGroupDirective.prototype.removeFormGroup = function (dir) { };\n /**\n * @description\n * Retrieves the `FormGroup` for a provided `FormGroupName` directive instance\n *\n * @param dir The `FormGroupName` directive instance.\n */\n FormGroupDirective.prototype.getFormGroup = function (dir) {\n return this.form.get(dir.path);\n };\n /**\n * Adds a new `FormArrayName` directive instance to the form.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n FormGroupDirective.prototype.addFormArray = function (dir) {\n var ctrl = this.form.get(dir.path);\n setUpFormContainer(ctrl, dir);\n ctrl.updateValueAndValidity({ emitEvent: false });\n };\n /**\n * No-op method to remove the form array.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n FormGroupDirective.prototype.removeFormArray = function (dir) { };\n /**\n * @description\n * Retrieves the `FormArray` for a provided `FormArrayName` directive instance.\n *\n * @param dir The `FormArrayName` directive instance.\n */\n FormGroupDirective.prototype.getFormArray = function (dir) {\n return this.form.get(dir.path);\n };\n /**\n * Sets the new value for the provided `FormControlName` directive.\n *\n * @param dir The `FormControlName` directive instance.\n * @param value The new value for the directive's control.\n */\n FormGroupDirective.prototype.updateModel = function (dir, value) {\n var ctrl = this.form.get(dir.path);\n ctrl.setValue(value);\n };\n /**\n * @description\n * Method called with the \"submit\" event is triggered on the form.\n * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n *\n * @param $event The \"submit\" event object\n */\n FormGroupDirective.prototype.onSubmit = function ($event) {\n this.submitted = true;\n syncPendingControls(this.form, this.directives);\n this.ngSubmit.emit($event);\n return false;\n };\n /**\n * @description\n * Method called when the \"reset\" event is triggered on the form.\n */\n FormGroupDirective.prototype.onReset = function () {\n this.resetForm();\n };\n /**\n * @description\n * Resets the form to an initial value and resets its submitted status.\n *\n * @param value The new value for the form.\n */\n FormGroupDirective.prototype.resetForm = function (value) {\n if (value === void 0) { value = undefined; }\n this.form.reset(value);\n this.submitted = false;\n };\n /** @internal */\n FormGroupDirective.prototype._updateDomValue = function () {\n var _this = this;\n this.directives.forEach(function (dir) {\n var newCtrl = _this.form.get(dir.path);\n if (dir.control !== newCtrl) {\n cleanUpControl(dir.control, dir);\n if (newCtrl)\n setUpControl(newCtrl, dir);\n dir.control = newCtrl;\n }\n });\n this.form._updateTreeValidity({ emitEvent: false });\n };\n FormGroupDirective.prototype._updateRegistrations = function () {\n var _this = this;\n this.form._registerOnCollectionChange(function () { return _this._updateDomValue(); });\n if (this._oldForm)\n this._oldForm._registerOnCollectionChange(function () { });\n this._oldForm = this.form;\n };\n FormGroupDirective.prototype._updateValidators = function () {\n var sync = composeValidators(this._validators);\n this.form.validator = Validators.compose([this.form.validator, sync]);\n var async = composeAsyncValidators(this._asyncValidators);\n this.form.asyncValidator = Validators.composeAsync([this.form.asyncValidator, async]);\n };\n FormGroupDirective.prototype._checkFormPresent = function () {\n if (!this.form) {\n ReactiveErrors.missingFormException();\n }\n };\n __decorate([\n Input('formGroup'),\n __metadata(\"design:type\", FormGroup)\n ], FormGroupDirective.prototype, \"form\", void 0);\n __decorate([\n Output(),\n __metadata(\"design:type\", Object)\n ], FormGroupDirective.prototype, \"ngSubmit\", void 0);\n FormGroupDirective = __decorate([ __param(0, Optional()), __param(0, Self()), __param(0, Inject(NG_VALIDATORS)),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_ASYNC_VALIDATORS)),\n __metadata(\"design:paramtypes\", [Array, Array])\n ], FormGroupDirective);\nFormGroupDirective.ɵfac = function FormGroupDirective_Factory(t) { return new (t || FormGroupDirective)(ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10)); };\nFormGroupDirective.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: FormGroupDirective, selectors: [[\"\", \"formGroup\", \"\"]], hostBindings: function FormGroupDirective_HostBindings(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵlistener(\"submit\", function FormGroupDirective_submit_HostBindingHandler($event) { return ctx.onSubmit($event); })(\"reset\", function FormGroupDirective_reset_HostBindingHandler() { return ctx.onReset(); });\n } }, inputs: { form: [\"formGroup\", \"form\"] }, outputs: { ngSubmit: \"ngSubmit\" }, exportAs: [\"ngForm\"], features: [ɵngcc0.ɵɵProvidersFeature([formDirectiveProvider$1]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(FormGroupDirective, [{\n type: Directive,\n args: [{\n selector: '[formGroup]',\n providers: [formDirectiveProvider$1],\n host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n exportAs: 'ngForm'\n }]\n }], function () { return [{ type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, { form: [{\n type: Input,\n args: ['formGroup']\n }], ngSubmit: [{\n type: Output\n }] }); })();\n return FormGroupDirective;\n}(ControlContainer));\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 */\nvar formGroupNameProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(function () { return FormGroupName; })\n};\n/**\n * @description\n *\n * Syncs a nested `FormGroup` to a DOM element.\n *\n * This directive can only be used with a parent `FormGroupDirective`.\n *\n * It accepts the string name of the nested `FormGroup` to link, and\n * looks for a `FormGroup` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * Use nested form groups to validate a sub-group of a\n * form separately from the rest or to group the values of certain\n * controls into their own nested object.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @usageNotes\n *\n * ### Access the group by name\n *\n * The following example uses the {@link AbstractControl#get get} method to access the\n * associated `FormGroup`\n *\n * ```ts\n * this.form.get('name');\n * ```\n *\n * ### Access individual controls in the group\n *\n * The following example uses the {@link AbstractControl#get get} method to access\n * individual controls within the group using dot syntax.\n *\n * ```ts\n * this.form.get('name.first');\n * ```\n *\n * ### Register a nested `FormGroup`.\n *\n * The following example registers a nested *name* `FormGroup` within an existing `FormGroup`,\n * and provides methods to retrieve the nested `FormGroup` and individual controls.\n *\n * {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nvar FormGroupName = /** @class */ (function (_super) {\n __extends(FormGroupName, _super);\n function FormGroupName(parent, validators, asyncValidators) {\n var _this = _super.call(this) || this;\n _this._parent = parent;\n _this._validators = validators;\n _this._asyncValidators = asyncValidators;\n return _this;\n }\n /** @internal */\n FormGroupName.prototype._checkParentType = function () {\n if (_hasInvalidParent(this._parent)) {\n ReactiveErrors.groupParentException();\n }\n };\n __decorate([\n Input('formGroupName'),\n __metadata(\"design:type\", Object)\n ], FormGroupName.prototype, \"name\", void 0);\n FormGroupName = __decorate([ __param(0, Optional()), __param(0, Host()), __param(0, SkipSelf()),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_VALIDATORS)),\n __param(2, Optional()), __param(2, Self()), __param(2, Inject(NG_ASYNC_VALIDATORS)),\n __metadata(\"design:paramtypes\", [ControlContainer, Array, Array])\n ], FormGroupName);\nFormGroupName.ɵfac = function FormGroupName_Factory(t) { return new (t || FormGroupName)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 13), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10)); };\nFormGroupName.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: FormGroupName, selectors: [[\"\", \"formGroupName\", \"\"]], inputs: { name: [\"formGroupName\", \"name\"] }, features: [ɵngcc0.ɵɵProvidersFeature([formGroupNameProvider]), ɵngcc0.ɵɵInheritDefinitionFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(FormGroupName, [{\n type: Directive,\n args: [{ selector: '[formGroupName]', providers: [formGroupNameProvider] }]\n }], function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, { name: [{\n type: Input,\n args: ['formGroupName']\n }] }); })();\n return FormGroupName;\n}(AbstractFormGroupDirective));\nvar formArrayNameProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(function () { return FormArrayName; })\n};\n/**\n * @description\n *\n * Syncs a nested `FormArray` to a DOM element.\n *\n * This directive is designed to be used with a parent `FormGroupDirective` (selector:\n * `[formGroup]`).\n *\n * It accepts the string name of the nested `FormArray` you want to link, and\n * will look for a `FormArray` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nvar FormArrayName = /** @class */ (function (_super) {\n __extends(FormArrayName, _super);\n function FormArrayName(parent, validators, asyncValidators) {\n var _this = _super.call(this) || this;\n _this._parent = parent;\n _this._validators = validators;\n _this._asyncValidators = asyncValidators;\n return _this;\n }\n /**\n * @description\n * A lifecycle method called when the directive's inputs are initialized. For internal use only.\n *\n * @throws If the directive does not have a valid parent.\n */\n FormArrayName.prototype.ngOnInit = function () {\n this._checkParentType();\n this.formDirective.addFormArray(this);\n };\n /**\n * @description\n * A lifecycle method called before the directive's instance is destroyed. For internal use only.\n */\n FormArrayName.prototype.ngOnDestroy = function () {\n if (this.formDirective) {\n this.formDirective.removeFormArray(this);\n }\n };\n Object.defineProperty(FormArrayName.prototype, \"control\", {\n /**\n * @description\n * The `FormArray` bound to this directive.\n */\n get: function () {\n return this.formDirective.getFormArray(this);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormArrayName.prototype, \"formDirective\", {\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get: function () {\n return this._parent ? this._parent.formDirective : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormArrayName.prototype, \"path\", {\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get: function () {\n return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormArrayName.prototype, \"validator\", {\n /**\n * @description\n * Synchronous validator function composed of all the synchronous validators registered with this\n * directive.\n */\n get: function () {\n return composeValidators(this._validators);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormArrayName.prototype, \"asyncValidator\", {\n /**\n * @description\n * Async validator function composed of all the async validators registered with this directive.\n */\n get: function () {\n return composeAsyncValidators(this._asyncValidators);\n },\n enumerable: true,\n configurable: true\n });\n FormArrayName.prototype._checkParentType = function () {\n if (_hasInvalidParent(this._parent)) {\n ReactiveErrors.arrayParentException();\n }\n };\n __decorate([\n Input('formArrayName'),\n __metadata(\"design:type\", Object)\n ], FormArrayName.prototype, \"name\", void 0);\n FormArrayName = __decorate([ __param(0, Optional()), __param(0, Host()), __param(0, SkipSelf()),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_VALIDATORS)),\n __param(2, Optional()), __param(2, Self()), __param(2, Inject(NG_ASYNC_VALIDATORS)),\n __metadata(\"design:paramtypes\", [ControlContainer, Array, Array])\n ], FormArrayName);\nFormArrayName.ɵfac = function FormArrayName_Factory(t) { return new (t || FormArrayName)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 13), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10)); };\nFormArrayName.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: FormArrayName, selectors: [[\"\", \"formArrayName\", \"\"]], inputs: { name: [\"formArrayName\", \"name\"] }, features: [ɵngcc0.ɵɵProvidersFeature([formArrayNameProvider]), ɵngcc0.ɵɵInheritDefinitionFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(FormArrayName, [{\n type: Directive,\n args: [{ selector: '[formArrayName]', providers: [formArrayNameProvider] }]\n }], function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }]; }, { name: [{\n type: Input,\n args: ['formArrayName']\n }] }); })();\n return FormArrayName;\n}(ControlContainer));\nfunction _hasInvalidParent(parent) {\n return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) &&\n !(parent instanceof FormArrayName);\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 */\nvar controlNameBinding = {\n provide: NgControl,\n useExisting: forwardRef(function () { return FormControlName; })\n};\n/**\n * @description\n * Syncs a `FormControl` in an existing `FormGroup` to a form control\n * element by name.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Register `FormControl` within a group\n *\n * The following example shows how to register multiple form controls within a form group\n * and set their value.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * To see `formControlName` examples with different form control types, see:\n *\n * * Radio buttons: `RadioControlValueAccessor`\n * * Selects: `SelectControlValueAccessor`\n *\n * ### Use with ngModel is deprecated\n *\n * Support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives has been deprecated in Angular v6 and is scheduled for removal in\n * a future version of Angular.\n *\n * For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nvar FormControlName = /** @class */ (function (_super) {\n __extends(FormControlName, _super);\n function FormControlName(parent, validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {\n var _this = _super.call(this) || this;\n _this._ngModelWarningConfig = _ngModelWarningConfig;\n _this._added = false;\n /** @deprecated as of v6 */\n _this.update = new EventEmitter();\n /**\n * @description\n * Instance property used to track whether an ngModel warning has been sent out for this\n * particular FormControlName instance. Used to support warning config of \"always\".\n *\n * @internal\n */\n _this._ngModelWarningSent = false;\n _this._parent = parent;\n _this._rawValidators = validators || [];\n _this._rawAsyncValidators = asyncValidators || [];\n _this.valueAccessor = selectValueAccessor(_this, valueAccessors);\n return _this;\n }\n FormControlName_1 = FormControlName;\n Object.defineProperty(FormControlName.prototype, \"isDisabled\", {\n /**\n * @description\n * Triggers a warning that this input should not be used with reactive forms.\n */\n set: function (isDisabled) {\n ReactiveErrors.disabledAttrWarning();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n FormControlName.prototype.ngOnChanges = function (changes) {\n if (!this._added)\n this._setUpControl();\n if (isPropertyUpdated(changes, this.viewModel)) {\n _ngModelWarning('formControlName', FormControlName_1, this, this._ngModelWarningConfig);\n this.viewModel = this.model;\n this.formDirective.updateModel(this, this.model);\n }\n };\n /**\n * @description\n * Lifecycle method called before the directive's instance is destroyed. For internal use only.\n */\n FormControlName.prototype.ngOnDestroy = function () {\n if (this.formDirective) {\n this.formDirective.removeControl(this);\n }\n };\n /**\n * @description\n * Sets the new value for the view model and emits an `ngModelChange` event.\n *\n * @param newValue The new value for the view model.\n */\n FormControlName.prototype.viewToModelUpdate = function (newValue) {\n this.viewModel = newValue;\n this.update.emit(newValue);\n };\n Object.defineProperty(FormControlName.prototype, \"path\", {\n /**\n * @description\n * Returns an array that represents the path from the top-level form to this control.\n * Each index is the string name of the control on that level.\n */\n get: function () {\n return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormControlName.prototype, \"formDirective\", {\n /**\n * @description\n * The top-level directive for this group if present, otherwise null.\n */\n get: function () {\n return this._parent ? this._parent.formDirective : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormControlName.prototype, \"validator\", {\n /**\n * @description\n * Synchronous validator function composed of all the synchronous validators\n * registered with this directive.\n */\n get: function () {\n return composeValidators(this._rawValidators);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormControlName.prototype, \"asyncValidator\", {\n /**\n * @description\n * Async validator function composed of all the async validators registered with this\n * directive.\n */\n get: function () {\n return composeAsyncValidators(this._rawAsyncValidators);\n },\n enumerable: true,\n configurable: true\n });\n FormControlName.prototype._checkParentType = function () {\n if (!(this._parent instanceof FormGroupName) &&\n this._parent instanceof AbstractFormGroupDirective) {\n ReactiveErrors.ngModelGroupException();\n }\n else if (!(this._parent instanceof FormGroupName) && !(this._parent instanceof FormGroupDirective) &&\n !(this._parent instanceof FormArrayName)) {\n ReactiveErrors.controlParentException();\n }\n };\n FormControlName.prototype._setUpControl = function () {\n this._checkParentType();\n this.control = this.formDirective.addControl(this);\n if (this.control.disabled && this.valueAccessor.setDisabledState) {\n this.valueAccessor.setDisabledState(true);\n }\n this._added = true;\n };\n var FormControlName_1;\n /**\n * @description\n * Static property used to track whether any ngModel warnings have been sent across\n * all instances of FormControlName. Used to support warning config of \"once\".\n *\n * @internal\n */\n FormControlName._ngModelWarningSentOnce = false;\n __decorate([\n Input('formControlName'),\n __metadata(\"design:type\", Object)\n ], FormControlName.prototype, \"name\", void 0);\n __decorate([\n Input('disabled'),\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n ], FormControlName.prototype, \"isDisabled\", null);\n __decorate([\n Input('ngModel'),\n __metadata(\"design:type\", Object)\n ], FormControlName.prototype, \"model\", void 0);\n __decorate([\n Output('ngModelChange'),\n __metadata(\"design:type\", Object)\n ], FormControlName.prototype, \"update\", void 0);\n FormControlName = FormControlName_1 = __decorate([ __param(0, Optional()), __param(0, Host()), __param(0, SkipSelf()),\n __param(1, Optional()), __param(1, Self()), __param(1, Inject(NG_VALIDATORS)),\n __param(2, Optional()), __param(2, Self()), __param(2, Inject(NG_ASYNC_VALIDATORS)),\n __param(3, Optional()), __param(3, Self()), __param(3, Inject(NG_VALUE_ACCESSOR)),\n __param(4, Optional()), __param(4, Inject(NG_MODEL_WITH_FORM_CONTROL_WARNING)),\n __metadata(\"design:paramtypes\", [ControlContainer,\n Array,\n Array, Array, Object])\n ], FormControlName);\nFormControlName.ɵfac = function FormControlName_Factory(t) { return new (t || FormControlName)(ɵngcc0.ɵɵdirectiveInject(ControlContainer, 13), ɵngcc0.ɵɵdirectiveInject(NG_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_ASYNC_VALIDATORS, 10), ɵngcc0.ɵɵdirectiveInject(NG_VALUE_ACCESSOR, 10), ɵngcc0.ɵɵdirectiveInject(NG_MODEL_WITH_FORM_CONTROL_WARNING, 8)); };\nFormControlName.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: FormControlName, selectors: [[\"\", \"formControlName\", \"\"]], inputs: { isDisabled: [\"disabled\", \"isDisabled\"], name: [\"formControlName\", \"name\"], model: [\"ngModel\", \"model\"] }, outputs: { update: \"ngModelChange\" }, features: [ɵngcc0.ɵɵProvidersFeature([controlNameBinding]), ɵngcc0.ɵɵInheritDefinitionFeature, ɵngcc0.ɵɵNgOnChangesFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(FormControlName, [{\n type: Directive,\n args: [{ selector: '[formControlName]', providers: [controlNameBinding] }]\n }], function () { return [{ type: ControlContainer, decorators: [{\n type: Optional\n }, {\n type: Host\n }, {\n type: SkipSelf\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALIDATORS]\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_ASYNC_VALIDATORS]\n }] }, { type: Array, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [NG_VALUE_ACCESSOR]\n }] }, { type: Object, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]\n }] }]; }, { isDisabled: [{\n type: Input,\n args: ['disabled']\n }], name: [{\n type: Input,\n args: ['formControlName']\n }], model: [{\n type: Input,\n args: ['ngModel']\n }], update: [{\n type: Output,\n args: ['ngModelChange']\n }] }); })();\n return FormControlName;\n}(NgControl));\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 * Provider which adds `RequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nvar REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(function () { return RequiredValidator; }),\n multi: true\n};\n/**\n * @description\n * Provider which adds `CheckboxRequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nvar CHECKBOX_REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(function () { return CheckboxRequiredValidator; }),\n multi: true\n};\n/**\n * @description\n * A directive that adds the `required` validator to any controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required validator using template-driven forms\n *\n * ```\n * <input name=\"fullName\" ngModel required>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nvar RequiredValidator = /** @class */ (function () {\n function RequiredValidator() {\n }\n Object.defineProperty(RequiredValidator.prototype, \"required\", {\n /**\n * @description\n * Tracks changes to the required attribute bound to this directive.\n */\n get: function () {\n return this._required;\n },\n set: function (value) {\n this._required = value != null && value !== false && \"\" + value !== 'false';\n if (this._onChange)\n this._onChange();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @description\n * Method that validates whether the control is empty.\n * Returns the validation result if enabled, otherwise null.\n */\n RequiredValidator.prototype.validate = function (control) {\n return this.required ? Validators.required(control) : null;\n };\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n RequiredValidator.prototype.registerOnValidatorChange = function (fn) {\n this._onChange = fn;\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], RequiredValidator.prototype, \"required\", null);\nRequiredValidator.ɵfac = function RequiredValidator_Factory(t) { return new (t || RequiredValidator)(); };\nRequiredValidator.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: RequiredValidator, selectors: [[\"\", \"required\", \"\", \"formControlName\", \"\", 3, \"type\", \"checkbox\"], [\"\", \"required\", \"\", \"formControl\", \"\", 3, \"type\", \"checkbox\"], [\"\", \"required\", \"\", \"ngModel\", \"\", 3, \"type\", \"checkbox\"]], hostVars: 1, hostBindings: function RequiredValidator_HostBindings(rf, ctx) { if (rf & 2) {\n ɵngcc0.ɵɵattribute(\"required\", ctx.required ? \"\" : null);\n } }, inputs: { required: \"required\" }, features: [ɵngcc0.ɵɵProvidersFeature([REQUIRED_VALIDATOR])] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(RequiredValidator, [{\n type: Directive,\n args: [{\n selector: ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',\n providers: [REQUIRED_VALIDATOR],\n host: { '[attr.required]': 'required ? \"\" : null' }\n }]\n }], function () { return []; }, { required: [{\n type: Input\n }] }); })();\n return RequiredValidator;\n}());\n/**\n * A Directive that adds the `required` validator to checkbox controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required checkbox validator using template-driven forms\n *\n * The following example shows how to add a checkbox required validator to an input attached to an\n * ngModel binding.\n *\n * ```\n * <input type=\"checkbox\" name=\"active\" ngModel required>\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\nvar CheckboxRequiredValidator = /** @class */ (function (_super) {\n __extends(CheckboxRequiredValidator, _super);\n function CheckboxRequiredValidator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @description\n * Method that validates whether or not the checkbox has been checked.\n * Returns the validation result if enabled, otherwise null.\n */\n CheckboxRequiredValidator.prototype.validate = function (control) {\n return this.required ? Validators.requiredTrue(control) : null;\n };\nCheckboxRequiredValidator.ɵfac = function CheckboxRequiredValidator_Factory(t) { return ɵCheckboxRequiredValidator_BaseFactory(t || CheckboxRequiredValidator); };\nCheckboxRequiredValidator.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: CheckboxRequiredValidator, selectors: [[\"input\", \"type\", \"checkbox\", \"required\", \"\", \"formControlName\", \"\"], [\"input\", \"type\", \"checkbox\", \"required\", \"\", \"formControl\", \"\"], [\"input\", \"type\", \"checkbox\", \"required\", \"\", \"ngModel\", \"\"]], hostVars: 1, hostBindings: function CheckboxRequiredValidator_HostBindings(rf, ctx) { if (rf & 2) {\n ɵngcc0.ɵɵattribute(\"required\", ctx.required ? \"\" : null);\n } }, features: [ɵngcc0.ɵɵProvidersFeature([CHECKBOX_REQUIRED_VALIDATOR]), ɵngcc0.ɵɵInheritDefinitionFeature] });\nvar ɵCheckboxRequiredValidator_BaseFactory = ɵngcc0.ɵɵgetInheritedFactory(CheckboxRequiredValidator);\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(CheckboxRequiredValidator, [{\n type: Directive,\n args: [{\n selector: 'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',\n providers: [CHECKBOX_REQUIRED_VALIDATOR],\n host: { '[attr.required]': 'required ? \"\" : null' }\n }]\n }], null, null); })();\n return CheckboxRequiredValidator;\n}(RequiredValidator));\n/**\n * @description\n * Provider which adds `EmailValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nvar EMAIL_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(function () { return EmailValidator; }),\n multi: true\n};\n/**\n * A directive that adds the `email` validator to controls marked with the\n * `email` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding an email validator\n *\n * The following example shows how to add an email validator to an input attached to an ngModel\n * binding.\n *\n * ```\n * <input type=\"email\" name=\"email\" ngModel email>\n * <input type=\"email\" name=\"email\" ngModel email=\"true\">\n * <input type=\"email\" name=\"email\" ngModel [email]=\"true\">\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\nvar EmailValidator = /** @class */ (function () {\n function EmailValidator() {\n }\n Object.defineProperty(EmailValidator.prototype, \"email\", {\n /**\n * @description\n * Tracks changes to the email attribute bound to this directive.\n */\n set: function (value) {\n this._enabled = value === '' || value === true || value === 'true';\n if (this._onChange)\n this._onChange();\n },\n enumerable: true,\n configurable: true\n });\n /**\n * @description\n * Method that validates whether an email address is valid.\n * Returns the validation result if enabled, otherwise null.\n */\n EmailValidator.prototype.validate = function (control) {\n return this._enabled ? Validators.email(control) : null;\n };\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n EmailValidator.prototype.registerOnValidatorChange = function (fn) {\n this._onChange = fn;\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], EmailValidator.prototype, \"email\", null);\nEmailValidator.ɵfac = function EmailValidator_Factory(t) { return new (t || EmailValidator)(); };\nEmailValidator.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: EmailValidator, selectors: [[\"\", \"email\", \"\", \"formControlName\", \"\"], [\"\", \"email\", \"\", \"formControl\", \"\"], [\"\", \"email\", \"\", \"ngModel\", \"\"]], inputs: { email: \"email\" }, features: [ɵngcc0.ɵɵProvidersFeature([EMAIL_VALIDATOR])] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(EmailValidator, [{\n type: Directive,\n args: [{\n selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n providers: [EMAIL_VALIDATOR]\n }]\n }], function () { return []; }, { email: [{\n type: Input\n }] }); })();\n return EmailValidator;\n}());\n/**\n * @description\n * Provider which adds `MinLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nvar MIN_LENGTH_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(function () { return MinLengthValidator; }),\n multi: true\n};\n/**\n * A directive that adds minimum length validation to controls marked with the\n * `minlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a minimum length validator\n *\n * The following example shows how to add a minimum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel minlength=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar MinLengthValidator = /** @class */ (function () {\n function MinLengthValidator() {\n }\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use\n * only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n MinLengthValidator.prototype.ngOnChanges = function (changes) {\n if ('minlength' in changes) {\n this._createValidator();\n if (this._onChange)\n this._onChange();\n }\n };\n /**\n * @description\n * Method that validates whether the value meets a minimum length\n * requirement. Returns the validation result if enabled, otherwise null.\n */\n MinLengthValidator.prototype.validate = function (control) {\n return this.minlength == null ? null : this._validator(control);\n };\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n MinLengthValidator.prototype.registerOnValidatorChange = function (fn) {\n this._onChange = fn;\n };\n MinLengthValidator.prototype._createValidator = function () {\n this._validator = Validators.minLength(typeof this.minlength === 'number' ? this.minlength : parseInt(this.minlength, 10));\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], MinLengthValidator.prototype, \"minlength\", void 0);\nMinLengthValidator.ɵfac = function MinLengthValidator_Factory(t) { return new (t || MinLengthValidator)(); };\nMinLengthValidator.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: MinLengthValidator, selectors: [[\"\", \"minlength\", \"\", \"formControlName\", \"\"], [\"\", \"minlength\", \"\", \"formControl\", \"\"], [\"\", \"minlength\", \"\", \"ngModel\", \"\"]], hostVars: 1, hostBindings: function MinLengthValidator_HostBindings(rf, ctx) { if (rf & 2) {\n ɵngcc0.ɵɵattribute(\"minlength\", ctx.minlength ? ctx.minlength : null);\n } }, inputs: { minlength: \"minlength\" }, features: [ɵngcc0.ɵɵProvidersFeature([MIN_LENGTH_VALIDATOR]), ɵngcc0.ɵɵNgOnChangesFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(MinLengthValidator, [{\n type: Directive,\n args: [{\n selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',\n providers: [MIN_LENGTH_VALIDATOR],\n host: { '[attr.minlength]': 'minlength ? minlength : null' }\n }]\n }], function () { return []; }, { minlength: [{\n type: Input\n }] }); })();\n return MinLengthValidator;\n}());\n/**\n * @description\n * Provider which adds `MaxLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nvar MAX_LENGTH_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(function () { return MaxLengthValidator; }),\n multi: true\n};\n/**\n * A directive that adds max length validation to controls marked with the\n * `maxlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a maximum length validator\n *\n * The following example shows how to add a maximum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel maxlength=\"25\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar MaxLengthValidator = /** @class */ (function () {\n function MaxLengthValidator() {\n }\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use\n * only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n MaxLengthValidator.prototype.ngOnChanges = function (changes) {\n if ('maxlength' in changes) {\n this._createValidator();\n if (this._onChange)\n this._onChange();\n }\n };\n /**\n * @description\n * Method that validates whether the value exceeds\n * the maximum length requirement.\n */\n MaxLengthValidator.prototype.validate = function (control) {\n return this.maxlength != null ? this._validator(control) : null;\n };\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n MaxLengthValidator.prototype.registerOnValidatorChange = function (fn) {\n this._onChange = fn;\n };\n MaxLengthValidator.prototype._createValidator = function () {\n this._validator = Validators.maxLength(typeof this.maxlength === 'number' ? this.maxlength : parseInt(this.maxlength, 10));\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], MaxLengthValidator.prototype, \"maxlength\", void 0);\nMaxLengthValidator.ɵfac = function MaxLengthValidator_Factory(t) { return new (t || MaxLengthValidator)(); };\nMaxLengthValidator.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: MaxLengthValidator, selectors: [[\"\", \"maxlength\", \"\", \"formControlName\", \"\"], [\"\", \"maxlength\", \"\", \"formControl\", \"\"], [\"\", \"maxlength\", \"\", \"ngModel\", \"\"]], hostVars: 1, hostBindings: function MaxLengthValidator_HostBindings(rf, ctx) { if (rf & 2) {\n ɵngcc0.ɵɵattribute(\"maxlength\", ctx.maxlength ? ctx.maxlength : null);\n } }, inputs: { maxlength: \"maxlength\" }, features: [ɵngcc0.ɵɵProvidersFeature([MAX_LENGTH_VALIDATOR]), ɵngcc0.ɵɵNgOnChangesFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(MaxLengthValidator, [{\n type: Directive,\n args: [{\n selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',\n providers: [MAX_LENGTH_VALIDATOR],\n host: { '[attr.maxlength]': 'maxlength ? maxlength : null' }\n }]\n }], function () { return []; }, { maxlength: [{\n type: Input\n }] }); })();\n return MaxLengthValidator;\n}());\n/**\n * @description\n * Provider which adds `PatternValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nvar PATTERN_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(function () { return PatternValidator; }),\n multi: true\n};\n/**\n * @description\n * A directive that adds regex pattern validation to controls marked with the\n * `pattern` attribute. The regex must match the entire control value.\n * The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a pattern validator\n *\n * The following example shows how to add a pattern validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel pattern=\"[a-zA-Z ]*\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nvar PatternValidator = /** @class */ (function () {\n function PatternValidator() {\n }\n /**\n * @description\n * A lifecycle method called when the directive's inputs change. For internal use\n * only.\n *\n * @param changes A object of key/value pairs for the set of changed inputs.\n */\n PatternValidator.prototype.ngOnChanges = function (changes) {\n if ('pattern' in changes) {\n this._createValidator();\n if (this._onChange)\n this._onChange();\n }\n };\n /**\n * @description\n * Method that validates whether the value matches the\n * the pattern requirement.\n */\n PatternValidator.prototype.validate = function (control) {\n return this._validator(control);\n };\n /**\n * @description\n * Registers a callback function to call when the validator inputs change.\n *\n * @param fn The callback function\n */\n PatternValidator.prototype.registerOnValidatorChange = function (fn) {\n this._onChange = fn;\n };\n PatternValidator.prototype._createValidator = function () {\n this._validator = Validators.pattern(this.pattern);\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], PatternValidator.prototype, \"pattern\", void 0);\nPatternValidator.ɵfac = function PatternValidator_Factory(t) { return new (t || PatternValidator)(); };\nPatternValidator.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: PatternValidator, selectors: [[\"\", \"pattern\", \"\", \"formControlName\", \"\"], [\"\", \"pattern\", \"\", \"formControl\", \"\"], [\"\", \"pattern\", \"\", \"ngModel\", \"\"]], hostVars: 1, hostBindings: function PatternValidator_HostBindings(rf, ctx) { if (rf & 2) {\n ɵngcc0.ɵɵattribute(\"pattern\", ctx.pattern ? ctx.pattern : null);\n } }, inputs: { pattern: \"pattern\" }, features: [ɵngcc0.ɵɵProvidersFeature([PATTERN_VALIDATOR]), ɵngcc0.ɵɵNgOnChangesFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(PatternValidator, [{\n type: Directive,\n args: [{\n selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n providers: [PATTERN_VALIDATOR],\n host: { '[attr.pattern]': 'pattern ? pattern : null' }\n }]\n }], function () { return []; }, { pattern: [{\n type: Input\n }] }); })();\n return PatternValidator;\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 */\nvar SHARED_FORM_DIRECTIVES = [\n ɵNgNoValidate,\n NgSelectOption,\n ɵNgSelectMultipleOption,\n DefaultValueAccessor,\n NumberValueAccessor,\n RangeValueAccessor,\n CheckboxControlValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n NgControlStatus,\n NgControlStatusGroup,\n RequiredValidator,\n MinLengthValidator,\n MaxLengthValidator,\n PatternValidator,\n CheckboxRequiredValidator,\n EmailValidator,\n];\nvar TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm];\nvar REACTIVE_DRIVEN_DIRECTIVES = [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];\n/**\n * Internal module used for sharing directives between FormsModule and ReactiveFormsModule\n */\nvar ɵInternalFormsSharedModule = /** @class */ (function () {\n function ɵInternalFormsSharedModule() {\n }\nɵInternalFormsSharedModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: ɵInternalFormsSharedModule });\nɵInternalFormsSharedModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function ɵInternalFormsSharedModule_Factory(t) { return new (t || ɵInternalFormsSharedModule)(); } });\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(ɵInternalFormsSharedModule, { declarations: [ɵNgNoValidate,\n NgSelectOption,\n ɵNgSelectMultipleOption,\n DefaultValueAccessor,\n NumberValueAccessor,\n RangeValueAccessor,\n CheckboxControlValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n NgControlStatus,\n NgControlStatusGroup,\n RequiredValidator,\n MinLengthValidator,\n MaxLengthValidator,\n PatternValidator,\n CheckboxRequiredValidator,\n EmailValidator], exports: [ɵNgNoValidate,\n NgSelectOption,\n ɵNgSelectMultipleOption,\n DefaultValueAccessor,\n NumberValueAccessor,\n RangeValueAccessor,\n CheckboxControlValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n NgControlStatus,\n NgControlStatusGroup,\n RequiredValidator,\n MinLengthValidator,\n MaxLengthValidator,\n PatternValidator,\n CheckboxRequiredValidator,\n EmailValidator] }); })();\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(ɵInternalFormsSharedModule, [{\n type: NgModule,\n args: [{\n declarations: SHARED_FORM_DIRECTIVES,\n exports: SHARED_FORM_DIRECTIVES\n }]\n }], function () { return []; }, null); })();\n return ɵInternalFormsSharedModule;\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 */\nfunction isAbstractControlOptions(options) {\n return options.asyncValidators !== undefined ||\n options.validators !== undefined ||\n options.updateOn !== undefined;\n}\n/**\n * @description\n * Creates an `AbstractControl` from a user-specified configuration.\n *\n * The `FormBuilder` provides syntactic sugar that shortens creating instances of a `FormControl`,\n * `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to build complex\n * forms.\n *\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n *\n * @publicApi\n */\nvar FormBuilder = /** @class */ (function () {\n function FormBuilder() {\n }\n /**\n * @description\n * Construct a new `FormGroup` instance.\n *\n * @param controlsConfig A collection of child controls. The key for each child is the name\n * under which it is registered.\n *\n * @param options Configuration options object for the `FormGroup`. The object can\n * have two shapes:\n *\n * 1) `AbstractControlOptions` object (preferred), which consists of:\n * * `validators`: A synchronous validator function, or an array of validator functions\n * * `asyncValidators`: A single async validator or array of async validator functions\n * * `updateOn`: The event upon which the control should be updated (options: 'change' | 'blur' |\n * submit')\n *\n * 2) Legacy configuration object, which consists of:\n * * `validator`: A synchronous validator function, or an array of validator functions\n * * `asyncValidator`: A single async validator or array of async validator functions\n *\n */\n FormBuilder.prototype.group = function (controlsConfig, options) {\n if (options === void 0) { options = null; }\n var controls = this._reduceControls(controlsConfig);\n var validators = null;\n var asyncValidators = null;\n var updateOn = undefined;\n if (options != null) {\n if (isAbstractControlOptions(options)) {\n // `options` are `AbstractControlOptions`\n validators = options.validators != null ? options.validators : null;\n asyncValidators = options.asyncValidators != null ? options.asyncValidators : null;\n updateOn = options.updateOn != null ? options.updateOn : undefined;\n }\n else {\n // `options` are legacy form group options\n validators = options['validator'] != null ? options['validator'] : null;\n asyncValidators = options['asyncValidator'] != null ? options['asyncValidator'] : null;\n }\n }\n return new FormGroup(controls, { asyncValidators: asyncValidators, updateOn: updateOn, validators: validators });\n };\n /**\n * @description\n * Construct a new `FormControl` with the given state, validators and options.\n *\n * @param formState Initializes the control with an initial state value, or\n * with an object that contains both a value and a disabled status.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator\n * functions.\n *\n * @usageNotes\n *\n * ### Initialize a control as disabled\n *\n * The following example returns a control with an initial value in a disabled state.\n *\n * <code-example path=\"forms/ts/formBuilder/form_builder_example.ts\" region=\"disabled-control\">\n * </code-example>\n */\n FormBuilder.prototype.control = function (formState, validatorOrOpts, asyncValidator) {\n return new FormControl(formState, validatorOrOpts, asyncValidator);\n };\n /**\n * Constructs a new `FormArray` from the given array of configurations,\n * validators and options.\n *\n * @param controlsConfig An array of child controls or control configs. Each\n * child control is given an index when it is registered.\n *\n * @param validatorOrOpts A synchronous validator function, or an array of\n * such functions, or an `AbstractControlOptions` object that contains\n * validation functions and a validation trigger.\n *\n * @param asyncValidator A single async validator or array of async validator\n * functions.\n */\n FormBuilder.prototype.array = function (controlsConfig, validatorOrOpts, asyncValidator) {\n var _this = this;\n var controls = controlsConfig.map(function (c) { return _this._createControl(c); });\n return new FormArray(controls, validatorOrOpts, asyncValidator);\n };\n /** @internal */\n FormBuilder.prototype._reduceControls = function (controlsConfig) {\n var _this = this;\n var controls = {};\n Object.keys(controlsConfig).forEach(function (controlName) {\n controls[controlName] = _this._createControl(controlsConfig[controlName]);\n });\n return controls;\n };\n /** @internal */\n FormBuilder.prototype._createControl = function (controlConfig) {\n if (controlConfig instanceof FormControl || controlConfig instanceof FormGroup ||\n controlConfig instanceof FormArray) {\n return controlConfig;\n }\n else if (Array.isArray(controlConfig)) {\n var value = controlConfig[0];\n var validator = controlConfig.length > 1 ? controlConfig[1] : null;\n var asyncValidator = controlConfig.length > 2 ? controlConfig[2] : null;\n return this.control(value, validator, asyncValidator);\n }\n else {\n return this.control(controlConfig);\n }\n };\nFormBuilder.ɵfac = function FormBuilder_Factory(t) { return new (t || FormBuilder)(); };\nFormBuilder.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: FormBuilder, factory: function (t) { return FormBuilder.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(FormBuilder, [{\n type: Injectable\n }], function () { return []; }, null); })();\n return FormBuilder;\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 */\nvar VERSION = new Version('9.1.11');\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 * Exports the required providers and directives for template-driven forms,\n * making them available for import by NgModules that import this module.\n *\n * @see [Forms Overview](/guide/forms-overview)\n * @see [Template-driven Forms Guide](/guide/forms)\n *\n * @publicApi\n */\nvar FormsModule = /** @class */ (function () {\n function FormsModule() {\n }\nFormsModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: FormsModule });\nFormsModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function FormsModule_Factory(t) { return new (t || FormsModule)(); }, providers: [RadioControlRegistry], imports: [ɵInternalFormsSharedModule] });\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(FormsModule, { declarations: [NgModel,\n NgModelGroup,\n NgForm], exports: [ɵInternalFormsSharedModule,\n NgModel,\n NgModelGroup,\n NgForm] }); })();\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(FormsModule, [{\n type: NgModule,\n args: [{\n declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n providers: [RadioControlRegistry],\n exports: [ɵInternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]\n }]\n }], function () { return []; }, null); })();\n return FormsModule;\n}());\n/**\n * Exports the required infrastructure and directives for reactive forms,\n * making them available for import by NgModules that import this module.\n *\n * @see [Forms Overview](guide/forms-overview)\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @publicApi\n */\nvar ReactiveFormsModule = /** @class */ (function () {\n function ReactiveFormsModule() {\n }\n ReactiveFormsModule_1 = ReactiveFormsModule;\n /**\n * @description\n * Provides options for configuring the reactive forms module.\n *\n * @param opts An object of configuration options\n * * `warnOnNgModelWithFormControl` Configures when to emit a warning when an `ngModel`\n * binding is used with reactive form directives.\n */\n ReactiveFormsModule.withConfig = function (opts) {\n return {\n ngModule: ReactiveFormsModule_1,\n providers: [\n { provide: NG_MODEL_WITH_FORM_CONTROL_WARNING, useValue: opts.warnOnNgModelWithFormControl }\n ]\n };\n };\n var ReactiveFormsModule_1;\nReactiveFormsModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: ReactiveFormsModule });\nReactiveFormsModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function ReactiveFormsModule_Factory(t) { return new (t || ReactiveFormsModule)(); }, providers: [FormBuilder, RadioControlRegistry], imports: [ɵInternalFormsSharedModule] });\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(ReactiveFormsModule, { declarations: [FormControlDirective,\n FormGroupDirective,\n FormControlName,\n FormGroupName,\n FormArrayName], exports: [ɵInternalFormsSharedModule,\n FormControlDirective,\n FormGroupDirective,\n FormControlName,\n FormGroupName,\n FormArrayName] }); })();\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(ReactiveFormsModule, [{\n type: NgModule,\n args: [{\n declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n providers: [FormBuilder, RadioControlRegistry],\n exports: [ɵInternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]\n }]\n }], function () { return []; }, null); })();\n return ReactiveFormsModule;\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\nexport { AbstractControl, AbstractControlDirective, AbstractFormGroupDirective, COMPOSITION_BUFFER_MODE, CheckboxControlValueAccessor, CheckboxRequiredValidator, ControlContainer, DefaultValueAccessor, EmailValidator, FormArray, FormArrayName, FormBuilder, FormControl, FormControlDirective, FormControlName, FormGroup, FormGroupDirective, FormGroupName, FormsModule, MaxLengthValidator, MinLengthValidator, NG_ASYNC_VALIDATORS, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, NgSelectOption, NumberValueAccessor, PatternValidator, RadioControlValueAccessor, RangeValueAccessor, ReactiveFormsModule, RequiredValidator, SelectControlValueAccessor, SelectMultipleControlValueAccessor, VERSION, Validators, ɵInternalFormsSharedModule, ɵNgNoValidate, ɵNgSelectMultipleOption, SHARED_FORM_DIRECTIVES as ɵangular_packages_forms_forms_a, TEMPLATE_DRIVEN_DIRECTIVES as ɵangular_packages_forms_forms_b, CHECKBOX_REQUIRED_VALIDATOR as ɵangular_packages_forms_forms_ba, EMAIL_VALIDATOR as ɵangular_packages_forms_forms_bb, MIN_LENGTH_VALIDATOR as ɵangular_packages_forms_forms_bc, MAX_LENGTH_VALIDATOR as ɵangular_packages_forms_forms_bd, PATTERN_VALIDATOR as ɵangular_packages_forms_forms_be, REACTIVE_DRIVEN_DIRECTIVES as ɵangular_packages_forms_forms_c, ɵInternalFormsSharedModule as ɵangular_packages_forms_forms_d, CHECKBOX_VALUE_ACCESSOR as ɵangular_packages_forms_forms_e, DEFAULT_VALUE_ACCESSOR as ɵangular_packages_forms_forms_f, AbstractControlStatus as ɵangular_packages_forms_forms_g, ngControlStatusHost as ɵangular_packages_forms_forms_h, formDirectiveProvider as ɵangular_packages_forms_forms_i, formControlBinding as ɵangular_packages_forms_forms_j, modelGroupProvider as ɵangular_packages_forms_forms_k, NUMBER_VALUE_ACCESSOR as ɵangular_packages_forms_forms_l, RADIO_VALUE_ACCESSOR as ɵangular_packages_forms_forms_m, RadioControlRegistry as ɵangular_packages_forms_forms_n, RANGE_VALUE_ACCESSOR as ɵangular_packages_forms_forms_o, NG_MODEL_WITH_FORM_CONTROL_WARNING as ɵangular_packages_forms_forms_p, formControlBinding$1 as ɵangular_packages_forms_forms_q, controlNameBinding as ɵangular_packages_forms_forms_r, formDirectiveProvider$1 as ɵangular_packages_forms_forms_s, formGroupNameProvider as ɵangular_packages_forms_forms_t, formArrayNameProvider as ɵangular_packages_forms_forms_u, SELECT_VALUE_ACCESSOR as ɵangular_packages_forms_forms_v, SELECT_MULTIPLE_VALUE_ACCESSOR as ɵangular_packages_forms_forms_w, ɵNgSelectMultipleOption as ɵangular_packages_forms_forms_x, ɵNgNoValidate as ɵangular_packages_forms_forms_y, REQUIRED_VALIDATOR as ɵangular_packages_forms_forms_z };\n\n//# sourceMappingURL=forms.js.map","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function refCount() {\n return function refCountOperatorFunction(source) {\n return source.lift(new RefCountOperator(source));\n };\n}\nvar RefCountOperator = /*@__PURE__*/ (function () {\n function RefCountOperator(connectable) {\n this.connectable = connectable;\n }\n RefCountOperator.prototype.call = function (subscriber, source) {\n var connectable = this.connectable;\n connectable._refCount++;\n var refCounter = new RefCountSubscriber(subscriber, connectable);\n var subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n };\n return RefCountOperator;\n}());\nvar RefCountSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RefCountSubscriber, _super);\n function RefCountSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n RefCountSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n var refCount = connectable._refCount;\n if (refCount <= 0) {\n this.connection = null;\n return;\n }\n connectable._refCount = refCount - 1;\n if (refCount > 1) {\n this.connection = null;\n return;\n }\n var connection = this.connection;\n var sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n };\n return RefCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=refCount.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SubjectSubscriber } from '../Subject';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nvar ConnectableObservable = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ConnectableObservable, _super);\n function ConnectableObservable(source, subjectFactory) {\n var _this = _super.call(this) || this;\n _this.source = source;\n _this.subjectFactory = subjectFactory;\n _this._refCount = 0;\n _this._isComplete = false;\n return _this;\n }\n ConnectableObservable.prototype._subscribe = function (subscriber) {\n return this.getSubject().subscribe(subscriber);\n };\n ConnectableObservable.prototype.getSubject = function () {\n var subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n };\n ConnectableObservable.prototype.connect = function () {\n var connection = this._connection;\n if (!connection) {\n this._isComplete = false;\n connection = this._connection = new Subscription();\n connection.add(this.source\n .subscribe(new ConnectableSubscriber(this.getSubject(), this)));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n };\n ConnectableObservable.prototype.refCount = function () {\n return higherOrderRefCount()(this);\n };\n return ConnectableObservable;\n}(Observable));\nexport { ConnectableObservable };\nexport var connectableObservableDescriptor = /*@__PURE__*/ (function () {\n var connectableProto = ConnectableObservable.prototype;\n return {\n operator: { value: null },\n _refCount: { value: 0, writable: true },\n _subject: { value: null, writable: true },\n _connection: { value: null, writable: true },\n _subscribe: { value: connectableProto._subscribe },\n _isComplete: { value: connectableProto._isComplete, writable: true },\n getSubject: { value: connectableProto.getSubject },\n connect: { value: connectableProto.connect },\n refCount: { value: connectableProto.refCount }\n };\n})();\nvar ConnectableSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ConnectableSubscriber, _super);\n function ConnectableSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n ConnectableSubscriber.prototype._error = function (err) {\n this._unsubscribe();\n _super.prototype._error.call(this, err);\n };\n ConnectableSubscriber.prototype._complete = function () {\n this.connectable._isComplete = true;\n this._unsubscribe();\n _super.prototype._complete.call(this);\n };\n ConnectableSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (connectable) {\n this.connectable = null;\n var connection = connectable._connection;\n connectable._refCount = 0;\n connectable._subject = null;\n connectable._connection = null;\n if (connection) {\n connection.unsubscribe();\n }\n }\n };\n return ConnectableSubscriber;\n}(SubjectSubscriber));\nvar RefCountOperator = /*@__PURE__*/ (function () {\n function RefCountOperator(connectable) {\n this.connectable = connectable;\n }\n RefCountOperator.prototype.call = function (subscriber, source) {\n var connectable = this.connectable;\n connectable._refCount++;\n var refCounter = new RefCountSubscriber(subscriber, connectable);\n var subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n };\n return RefCountOperator;\n}());\nvar RefCountSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RefCountSubscriber, _super);\n function RefCountSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n RefCountSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n var refCount = connectable._refCount;\n if (refCount <= 0) {\n this.connection = null;\n return;\n }\n connectable._refCount = refCount - 1;\n if (refCount > 1) {\n this.connection = null;\n return;\n }\n var connection = this.connection;\n var sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n };\n return RefCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=ConnectableObservable.js.map\n","/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */\nimport { multicast } from './multicast';\nimport { refCount } from './refCount';\nimport { Subject } from '../Subject';\nfunction shareSubjectFactory() {\n return new Subject();\n}\nexport function share() {\n return function (source) { return refCount()(multicast(shareSubjectFactory)(source)); };\n}\n//# sourceMappingURL=share.js.map\n","/**\n * @license Angular v9.1.11\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { __spread, __extends, __values, __read, __assign, __decorate, __param, __metadata } from 'tslib';\nimport { Subscription, Subject, Observable, merge as merge$1 } from 'rxjs';\nimport { share } from 'rxjs/operators';\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 */\nfunction noSideEffects(fn) {\n return { toString: fn }.toString();\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 */\nvar ANNOTATIONS = '__annotations__';\nvar PARAMETERS = '__parameters__';\nvar PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\nfunction makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n return noSideEffects(function () {\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}\nfunction 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}\nfunction makeParamDecorator(name, props, parentClass) {\n return noSideEffects(function () {\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}\nfunction makePropDecorator(name, props, parentClass, additionalProcessing) {\n return noSideEffects(function () {\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/**\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 */\nvar ɵ0 = function (token) { return ({ token: token }); };\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nvar Inject = makeParamDecorator('Inject', ɵ0);\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nvar Optional = makeParamDecorator('Optional');\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nvar Self = makeParamDecorator('Self');\n/**\n * SkipSelf decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nvar SkipSelf = makeParamDecorator('SkipSelf');\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nvar Host = makeParamDecorator('Host');\nvar ɵ1 = function (attributeName) { return ({ attributeName: attributeName }); };\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nvar 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/**\n * Injection flags for DI.\n *\n * @publicApi\n */\nvar InjectFlags;\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})(InjectFlags || (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 */\nfunction 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 */\nfunction 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 `ɵprov` 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 */\nfunction ɵɵdefineInjectable(opts) {\n return {\n token: opts.token,\n providedIn: opts.providedIn || null,\n 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 */\nvar defineInjectable = ɵɵdefineInjectable;\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) 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 a `ɵprov` 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 */\nfunction ɵɵdefineInjector(options) {\n return {\n factory: options.factory,\n providers: options.providers || [],\n imports: options.imports || [],\n };\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nfunction getInjectableDef(type) {\n return getOwnDefinition(type, type[NG_PROV_DEF]) ||\n getOwnDefinition(type, type[NG_INJECTABLE_DEF]);\n}\n/**\n * Return `def` only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n *\n * The function `Object.hasOwnProperty` is not sufficient to distinguish this case because in older\n * browsers (e.g. IE10) static property inheritance is implemented by copying the properties.\n *\n * Instead, the definition'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 */\nfunction getOwnDefinition(type, def) {\n return def && def.token === type ? def : null;\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in v10, where an error will occur in the scenario if we find the\n * `ɵprov` on an ancestor only.\n */\nfunction getInheritedInjectableDef(type) {\n // See `jit/injectable.ts#compileInjectable` for context on NG_PROV_DEF_FALLBACK.\n var def = type &&\n (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF] ||\n (type[NG_PROV_DEF_FALLBACK] && type[NG_PROV_DEF_FALLBACK]()));\n if (def) {\n var typeName = getTypeName(type);\n // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n // ngDevMode &&\n console.warn(\"DEPRECATED: DI is instantiating a token \\\"\" + typeName + \"\\\" 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 \\\"\" + typeName + \"\\\" class.\"));\n return def;\n }\n else {\n return null;\n }\n}\n/** Gets the name of a type, accounting for some cross-browser differences. */\nfunction getTypeName(type) {\n // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers\n // it'll always return the name of the function itself, no matter how many other functions it\n // inherits from. On IE the function doesn't have its own `name` property, but it takes it from\n // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most\n // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around\n // the issue by converting the function to a string and parsing its name out that way via a regex.\n if (type.hasOwnProperty('name')) {\n return type.name;\n }\n var match = ('' + type).match(/^function\\s*([^\\s(]+)/);\n return match === null ? '' : match[1];\n}\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nfunction getInjectorDef(type) {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ?\n type[NG_INJ_DEF] :\n null;\n}\nvar NG_PROV_DEF = getClosureSafeProperty({ ɵprov: getClosureSafeProperty });\nvar NG_INJ_DEF = getClosureSafeProperty({ ɵinj: getClosureSafeProperty });\n// On IE10 properties defined via `defineProperty` won't be inherited by child classes,\n// which will break inheriting the injectable definition from a grandparent through an\n// undecorated parent class. We work around it by defining a fallback method which will be\n// used to retrieve the definition. This should only be a problem in JIT mode, because in\n// AOT TypeScript seems to have a workaround for static properties. When inheriting from an\n// undecorated parent is no longer supported in v10, this can safely be removed.\nvar NG_PROV_DEF_FALLBACK = getClosureSafeProperty({ ɵprovFallback: getClosureSafeProperty });\n// We need to keep these around so we can read off old defs if new defs are unavailable\nvar NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty });\nvar 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 */\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (Array.isArray(token)) {\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 * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\nfunction concatStringsWithSpace(before, after) {\n return (before == null || before === '') ?\n (after === null ? '' : after) :\n ((after == null || after === '') ? before : before + ' ' + after);\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 */\nvar __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 */\nfunction forwardRef(forwardRefFn) {\n forwardRefFn.__forward_ref__ = forwardRef;\n forwardRefFn.toString = function () {\n return stringify(this());\n };\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 */\nfunction resolveForwardRef(type) {\n return isForwardRef(type) ? type() : type;\n}\n/** Checks whether a function is wrapped by a `forwardRef`. */\nfunction isForwardRef(fn) {\n return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n fn.__forward_ref__ === forwardRef;\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 */\nvar __globalThis = typeof globalThis !== 'undefined' && globalThis;\nvar __window = typeof window !== 'undefined' && window;\nvar __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nvar __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.\nvar _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 */\nvar R3ResolvedDependencyType;\n(function (R3ResolvedDependencyType) {\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"Token\"] = 0] = \"Token\";\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"Attribute\"] = 1] = \"Attribute\";\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"ChangeDetectorRef\"] = 2] = \"ChangeDetectorRef\";\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"Invalid\"] = 3] = \"Invalid\";\n})(R3ResolvedDependencyType || (R3ResolvedDependencyType = {}));\nvar R3FactoryTarget;\n(function (R3FactoryTarget) {\n R3FactoryTarget[R3FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n R3FactoryTarget[R3FactoryTarget[\"Component\"] = 1] = \"Component\";\n R3FactoryTarget[R3FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n R3FactoryTarget[R3FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n R3FactoryTarget[R3FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(R3FactoryTarget || (R3FactoryTarget = {}));\nvar ViewEncapsulation;\n(function (ViewEncapsulation) {\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n ViewEncapsulation[ViewEncapsulation[\"Native\"] = 1] = \"Native\";\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation || (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 */\nfunction 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 */\nvar NG_COMP_DEF = getClosureSafeProperty({ ɵcmp: getClosureSafeProperty });\nvar NG_DIR_DEF = getClosureSafeProperty({ ɵdir: getClosureSafeProperty });\nvar NG_PIPE_DEF = getClosureSafeProperty({ ɵpipe: getClosureSafeProperty });\nvar NG_MOD_DEF = getClosureSafeProperty({ ɵmod: getClosureSafeProperty });\nvar NG_LOC_ID_DEF = getClosureSafeProperty({ ɵloc: getClosureSafeProperty });\nvar NG_FACTORY_DEF = getClosureSafeProperty({ ɵfac: 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.\nvar 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 */\nfunction ngDevModeResetPerfCounters() {\n var locationString = typeof location !== 'undefined' ? location.toString() : '';\n var newCounters = {\n namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n firstCreatePass: 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 };\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 function 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 * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions\n * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode\n * is defined for the entire instruction set.\n *\n * When using checking `ngDevMode` on toplevel, always init it before referencing it\n * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can\n * get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.\n *\n * Details on possible values for `ngDevMode` can be found on its docstring.\n *\n * NOTE:\n * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nfunction initNgDevMode() {\n // The below checks are to ensure that calling `initNgDevMode` multiple times does not\n // reset the counters.\n // If the `ngDevMode` is not an object, then it means we have not created the perf counters\n // yet.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (typeof ngDevMode !== 'object') {\n ngDevModeResetPerfCounters();\n }\n return !!ngDevMode;\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 * 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 */\nvar InjectionToken = /** @class */ (function () {\n function InjectionToken(_desc, options) {\n this._desc = _desc;\n /** @internal */\n this.ngMetadataName = 'InjectionToken';\n this.ɵprov = 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.ɵprov = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n }\n InjectionToken.prototype.toString = function () {\n return \"InjectionToken \" + this._desc;\n };\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 */\nvar INJECTOR = new InjectionToken('INJECTOR', -1 // `-1` is used by Ivy DI system as special value to recognize it as `Injector`.\n);\nvar _THROW_IF_NOT_FOUND = {};\nvar THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\nvar NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nvar NG_TOKEN_PATH = 'ngTokenPath';\nvar NEW_LINE = /\\n/gm;\nvar NO_NEW_LINE = 'ɵ';\nvar SOURCE = '__source';\nvar ɵ0$1 = getClosureSafeProperty;\nvar 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 */\nvar _currentInjector = undefined;\nfunction 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 */\nvar _injectImplementation;\n/**\n * Sets the current inject implementation.\n */\nfunction setInjectImplementation(impl) {\n var previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}\nfunction injectInjectorOnly(token, flags) {\n if (flags === void 0) { flags = 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 & InjectFlags.Optional ? null : undefined, flags);\n }\n}\nfunction ɵɵinject(token, flags) {\n if (flags === void 0) { flags = InjectFlags.Default; }\n return (_injectImplementation || injectInjectorOnly)(resolveForwardRef(token), flags);\n}\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nfunction ɵɵinvalidFactoryDep(index) {\n var msg = ngDevMode ?\n \"This constructor is not compatible with Angular Dependency Injection because its dependency at index \" + index + \" of the parameter list is invalid.\\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\\n\\nPlease check that 1) the type for the parameter at index \" + index + \" is correct and 2) the correct Angular decorators are defined for this class and its ancestors.\" :\n 'invalid';\n throw new Error(msg);\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 */\nvar 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 */\nfunction 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 & InjectFlags.Optional)\n return null;\n if (notFoundValue !== undefined)\n return notFoundValue;\n throw new Error(\"Injector: NOT_FOUND [\" + stringify(token) + \"]\");\n}\nfunction 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 = 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 |= InjectFlags.Optional;\n }\n else if (meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf' || meta === SkipSelf) {\n flags |= InjectFlags.SkipSelf;\n }\n else if (meta instanceof Self || meta.ngMetadataName === 'Self' || meta === Self) {\n flags |= 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}\nvar 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}());\nfunction 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}\nfunction 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 (Array.isArray(obj)) {\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 */\nvar angularCoreDiEnv = {\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵgetFactoryOf': getFactoryOf,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n};\nfunction getFactoryOf(type) {\n var typeAny = type;\n if (isForwardRef(type)) {\n return (function () {\n var factory = getFactoryOf(resolveForwardRef(typeAny));\n return factory ? factory() : null;\n });\n }\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 * 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 */\nvar NgModuleRef = /** @class */ (function () {\n function NgModuleRef() {\n }\n return NgModuleRef;\n}());\n/**\n * @publicApi\n */\nvar 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 */\nfunction assertNumber(actual, msg) {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n}\nfunction assertNumberInRange(actual, minInclusive, maxInclusive) {\n assertNumber(actual, 'Expected a number');\n assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\nfunction assertString(actual, msg) {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\nfunction assertEqual(actual, expected, msg) {\n if (!(actual == expected)) {\n throwError(msg, actual, expected, '==');\n }\n}\nfunction assertNotEqual(actual, expected, msg) {\n if (!(actual != expected)) {\n throwError(msg, actual, expected, '!=');\n }\n}\nfunction assertSame(actual, expected, msg) {\n if (!(actual === expected)) {\n throwError(msg, actual, expected, '===');\n }\n}\nfunction assertNotSame(actual, expected, msg) {\n if (!(actual !== expected)) {\n throwError(msg, actual, expected, '!==');\n }\n}\nfunction assertLessThan(actual, expected, msg) {\n if (!(actual < expected)) {\n throwError(msg, actual, expected, '<');\n }\n}\nfunction assertLessThanOrEqual(actual, expected, msg) {\n if (!(actual <= expected)) {\n throwError(msg, actual, expected, '<=');\n }\n}\nfunction assertGreaterThan(actual, expected, msg) {\n if (!(actual > expected)) {\n throwError(msg, actual, expected, '>');\n }\n}\nfunction assertGreaterThanOrEqual(actual, expected, msg) {\n if (!(actual >= expected)) {\n throwError(msg, actual, expected, '>=');\n }\n}\nfunction assertNotDefined(actual, msg) {\n if (actual != null) {\n throwError(msg, actual, null, '==');\n }\n}\nfunction assertDefined(actual, msg) {\n if (actual == null) {\n throwError(msg, actual, null, '!=');\n }\n}\nfunction throwError(msg, actual, expected, comparison) {\n throw new Error(\"ASSERTION ERROR: \" + msg +\n (comparison == null ? '' : \" [Expected=> \" + expected + \" \" + comparison + \" \" + actual + \" <=Actual]\"));\n}\nfunction 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 != null &&\n node.constructor.name === 'WebWorkerRenderNode'), true, \"The provided value must be an instance of a DOM Node but got \" + stringify(node));\n}\nfunction 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 * 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 */\nfunction 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 */\nfunction 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}\nfunction deepForEach(input, fn) {\n input.forEach(function (value) { return Array.isArray(value) ? deepForEach(value, fn) : fn(value); });\n}\nfunction 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}\nfunction removeFromArray(arr, index) {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n return arr.pop();\n }\n else {\n return arr.splice(index, 1)[0];\n }\n}\nfunction newArray(size, value) {\n var list = [];\n for (var i = 0; i < size; i++) {\n list.push(value);\n }\n return list;\n}\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nfunction arraySplice(array, index, count) {\n var length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nfunction arrayInsert(array, index, value) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n var end = array.length;\n while (end > index) {\n var previousEnd = end - 1;\n array[end] = array[previousEnd];\n end = previousEnd;\n }\n array[index] = value;\n}\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nfunction arrayInsert2(array, index, value1, value2) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n var end = array.length;\n if (end == index) {\n // inserting at the end.\n array.push(value1, value2);\n }\n else if (end === 1) {\n // corner case when we have less items in array than we have items to insert.\n array.push(value2, array[0]);\n array[0] = value1;\n }\n else {\n end--;\n array.push(array[end - 1], array[end]);\n while (end > index) {\n var previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n array[index] = value1;\n array[index + 1] = value2;\n }\n}\n/**\n * Insert a `value` into an `array` so that the array remains sorted.\n *\n * NOTE:\n * - Duplicates are not allowed, and are ignored.\n * - This uses binary search algorithm for fast inserts.\n *\n * @param array A sorted array to insert into.\n * @param value The value to insert.\n * @returns index of the inserted value.\n */\nfunction arrayInsertSorted(array, value) {\n var index = arrayIndexOfSorted(array, value);\n if (index < 0) {\n // if we did not find it insert it.\n index = ~index;\n arrayInsert(array, index, value);\n }\n return index;\n}\n/**\n * Remove `value` from a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to remove from.\n * @param value The value to remove.\n * @returns index of the removed value.\n * - positive index if value found and removed.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction arrayRemoveSorted(array, value) {\n var index = arrayIndexOfSorted(array, value);\n if (index >= 0) {\n arraySplice(array, index, 1);\n }\n return index;\n}\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * located)\n */\nfunction arrayIndexOfSorted(array, value) {\n return _arrayIndexOfSorted(array, value, 0);\n}\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nfunction keyValueArraySet(keyValueArray, key, value) {\n var index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it set it.\n keyValueArray[index | 1] = value;\n }\n else {\n index = ~index;\n arrayInsert2(keyValueArray, index, key, value);\n }\n return index;\n}\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nfunction keyValueArrayGet(keyValueArray, key) {\n var index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it retrieve it.\n return keyValueArray[index | 1];\n }\n return undefined;\n}\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n * - positive (even) index if key found.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been inserted.)\n */\nfunction keyValueArrayIndexOf(keyValueArray, key) {\n return _arrayIndexOfSorted(keyValueArray, key, 1);\n}\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n * - positive (even) index if key found and deleted.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been.)\n */\nfunction keyValueArrayDelete(keyValueArray, key) {\n var index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it remove it.\n arraySplice(keyValueArray, index, 2);\n }\n return index;\n}\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n * - `0` means look at every location\n * - `1` means only look at every other (even) location (the odd locations are to be ignored as\n * they are values.)\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array, value, shift) {\n ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n var start = 0;\n var end = array.length >> shift;\n while (end !== start) {\n var middle = start + ((end - start) >> 1); // find the middle.\n var current = array[middle << shift];\n if (value === current) {\n return (middle << shift);\n }\n else if (current > value) {\n end = middle;\n }\n else {\n start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n }\n }\n return ~(end << shift);\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 strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @publicApi\n */\nvar ChangeDetectionStrategy;\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})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\n/**\n * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\nvar ChangeDetectorStatus;\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})(ChangeDetectorStatus || (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 */\nfunction isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === 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 * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nvar ViewEncapsulation$1;\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})(ViewEncapsulation$1 || (ViewEncapsulation$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 * 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 */\nvar EMPTY_OBJ = {};\nvar EMPTY_ARRAY = [];\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {\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);\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 */\nvar _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 ɵcmp = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\nfunction ɵɵdefineComponent(componentDefinition) {\n return noSideEffects(function () {\n // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n var type = componentDefinition.type;\n var typePrototype = type.prototype;\n var declaredInputs = {};\n var def = {\n type: type,\n providersResolver: null,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n factory: null,\n template: componentDefinition.template || null,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n hostBindings: componentDefinition.hostBindings || null,\n hostVars: componentDefinition.hostVars || 0,\n hostAttrs: componentDefinition.hostAttrs || 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 === ChangeDetectionStrategy.OnPush,\n directiveDefs: null,\n pipeDefs: null,\n selectors: componentDefinition.selectors || EMPTY_ARRAY,\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\n // the next line. Also `None` should be 0 not 2.\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation$1.Emulated,\n id: 'c',\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n setInput: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n };\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 return def;\n });\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵsetComponentScope(type, directives, pipes) {\n var def = type.ɵcmp;\n def.directiveDefs = function () { return directives.map(extractDirectiveDef); };\n def.pipeDefs = function () { return pipes.map(extractPipeDef); };\n}\nfunction 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}\nfunction 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}\nvar autoRegisterModuleById = {};\n/**\n * @codeGenApi\n */\nfunction ɵɵdefineNgModule(def) {\n var res = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY,\n declarations: def.declarations || EMPTY_ARRAY,\n imports: def.imports || EMPTY_ARRAY,\n exports: def.exports || EMPTY_ARRAY,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null,\n };\n if (def.id != null) {\n noSideEffects(function () {\n autoRegisterModuleById[def.id] = def.type;\n });\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 */\nfunction ɵɵsetNgModuleScope(type, scope) {\n return noSideEffects(function () {\n var ngModuleDef = getNgModuleDef(type, true);\n ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;\n ngModuleDef.imports = scope.imports || EMPTY_ARRAY;\n ngModuleDef.exports = scope.exports || EMPTY_ARRAY;\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 */\nfunction 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 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 ɵdir = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nvar ɵɵ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 ɵpipe = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nfunction ɵɵdefinePipe(pipeDef) {\n return {\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\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 */\nfunction getComponentDef(type) {\n return type[NG_COMP_DEF] || null;\n}\nfunction getDirectiveDef(type) {\n return type[NG_DIR_DEF] || null;\n}\nfunction getPipeDef(type) {\n return type[NG_PIPE_DEF] || null;\n}\nfunction getFactoryDef(type, throwNotFound) {\n var hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(\"Type \" + stringify(type) + \" does not have '\\u0275fac' property.\");\n }\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\nfunction getNgModuleDef(type, throwNotFound) {\n var ngModuleDef = type[NG_MOD_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(\"Type \" + stringify(type) + \" does not have '\\u0275mod' property.\");\n }\n return ngModuleDef;\n}\nfunction getNgLocaleIdDef(type) {\n return type[NG_LOC_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// 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.\nvar HOST = 0;\nvar TVIEW = 1;\nvar FLAGS = 2;\nvar PARENT = 3;\nvar NEXT = 4;\nvar TRANSPLANTED_VIEWS_TO_REFRESH = 5;\nvar T_HOST = 6;\nvar CLEANUP = 7;\nvar CONTEXT = 8;\nvar INJECTOR$1 = 9;\nvar RENDERER_FACTORY = 10;\nvar RENDERER = 11;\nvar SANITIZER = 12;\nvar CHILD_HEAD = 13;\nvar CHILD_TAIL = 14;\nvar DECLARATION_VIEW = 15;\nvar DECLARATION_COMPONENT_VIEW = 16;\nvar DECLARATION_LCONTAINER = 17;\nvar PREORDER_HOOK_FLAGS = 18;\nvar QUERIES = 19;\n/** Size of LView's header. Necessary to adjust for it when setting slots. */\nvar HEADER_OFFSET = 20;\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nvar unusedValueExportToPlacateAjd = 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 * 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 */\nvar 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/**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip\n * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify\n * that the `MOVED_VIEWS` are transplanted and on-push.\n */\nvar HAS_TRANSPLANTED_VIEWS = 2;\n// PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\n// T_HOST is index 6\n// We already have this constants in LView, we don't need to re-create it.\nvar NATIVE = 7;\nvar VIEW_REFS = 8;\nvar MOVED_VIEWS = 9;\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 */\nvar CONTAINER_HEADER_OFFSET = 10;\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nvar unusedValueExportToPlacateAjd$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/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction 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`\n */\nfunction isLContainer(value) {\n return Array.isArray(value) && value[TYPE] === true;\n}\nfunction isContentQueryHost(tNode) {\n return (tNode.flags & 8 /* hasContentQuery */) !== 0;\n}\nfunction isComponentHost(tNode) {\n return (tNode.flags & 2 /* isComponentHost */) === 2 /* isComponentHost */;\n}\nfunction isDirectiveHost(tNode) {\n return (tNode.flags & 1 /* isDirectiveHost */) === 1 /* isDirectiveHost */;\n}\nfunction isComponentDef(def) {\n return def.template !== null;\n}\nfunction isRootView(target) {\n return (target[FLAGS] & 512 /* IsRoot */) !== 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// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\nfunction assertTNodeForLView(tNode, lView) {\n tNode.hasOwnProperty('tView_') &&\n assertEqual(tNode.tView_, lView[TVIEW], 'This TNode does not belong to this LView.');\n}\nfunction assertComponentType(actual, msg) {\n if (msg === void 0) { msg = 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.'; }\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n}\nfunction assertNgModuleType(actual, msg) {\n if (msg === void 0) { msg = 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.'; }\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n}\nfunction assertPreviousIsParent(isParent) {\n assertEqual(isParent, true, 'previousOrParentTNode should be a parent');\n}\nfunction assertHasParent(tNode) {\n assertDefined(tNode, 'previousOrParentTNode should exist!');\n assertDefined(tNode.parent, 'previousOrParentTNode should have a parent');\n}\nfunction assertDataNext(lView, index, arr) {\n if (arr == null)\n arr = lView;\n assertEqual(arr.length, index, \"index \" + index + \" expected to be at the end of arr (length \" + arr.length + \")\");\n}\nfunction assertLContainer(value) {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\nfunction assertLViewOrUndefined(value) {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\nfunction assertLView(value) {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n}\nfunction assertFirstCreatePass(tView, errMessage) {\n assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\nfunction assertFirstUpdatePass(tView, errMessage) {\n assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');\n}\n/**\n * This is a basic sanity check that an object is probably a directive def. DirectiveDef is\n * an interface, so we can't do a direct instanceof check.\n */\nfunction assertDirectiveDef(obj) {\n if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n throwError(\"Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.\");\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 */\nvar SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nvar MATH_ML_NAMESPACE = 'http://www.w3.org/1998/MathML/';\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 */\nvar 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 * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nvar DOCUMENT = undefined;\n/**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\nfunction setDocument(document) {\n DOCUMENT = document;\n}\n/**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\nfunction getDocument() {\n if (DOCUMENT !== undefined) {\n return DOCUMENT;\n }\n else if (typeof document !== 'undefined') {\n return document;\n }\n // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n // the current platform is not a browser. Since this is not a supported scenario at the moment\n // this should not happen in Angular apps.\n // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n // public API. Meanwhile we just return `undefined` and let the application fail.\n return 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// TODO: cleanup once the code is merged in angular/angular\nvar 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` */\nfunction isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}\nvar ɵ0$2 = function (hostElement, rendererType) {\n return getDocument();\n};\nvar domRendererFactory3 = {\n createRenderer: ɵ0$2\n};\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nvar unusedValueExportToPlacateAjd$2 = 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 * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such 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] === 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`\n */\nfunction unwrapRNode(value) {\n while (Array.isArray(value)) {\n value = value[HOST];\n }\n return value;\n}\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapLView(value) {\n while (Array.isArray(value)) {\n // This check is same as `isLView()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'object')\n return value;\n value = value[HOST];\n }\n return null;\n}\n/**\n * Returns `LContainer` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapLContainer(value) {\n while (Array.isArray(value)) {\n // This check is same as `isLContainer()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (value[TYPE] === true)\n return value;\n value = value[HOST];\n }\n return null;\n}\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nfunction getNativeByIndex(index, lView) {\n return unwrapRNode(lView[index + HEADER_OFFSET]);\n}\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNode(tNode, lView) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertDataInRange(lView, tNode.index);\n var node = unwrapRNode(lView[tNode.index]);\n ngDevMode && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n return node;\n}\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNodeOrNull(tNode, lView) {\n var index = tNode.index;\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n var node = unwrapRNode(lView[index]);\n ngDevMode && node !== null && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n return node;\n }\n return null;\n}\nfunction getTNode(tView, index) {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n return tView.data[index + HEADER_OFFSET];\n}\n/** Retrieves a value from any `LView` or `TData`. */\nfunction load(view, index) {\n ngDevMode && assertDataInRange(view, index + HEADER_OFFSET);\n return view[index + HEADER_OFFSET];\n}\nfunction getComponentLViewByIndex(nodeIndex, hostView) {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n ngDevMode && assertDataInRange(hostView, nodeIndex);\n var slotValue = hostView[nodeIndex];\n var lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\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 */\nfunction readPatchedData(target) {\n ngDevMode && assertDefined(target, 'Target expected');\n return target[MONKEY_PATCH_KEY_NAME] || null;\n}\nfunction readPatchedLView(target) {\n var value = readPatchedData(target);\n if (value) {\n return Array.isArray(value) ? value : value.lView;\n }\n return null;\n}\n/** Checks whether a given view is in creation mode */\nfunction isCreationMode(view) {\n return (view[FLAGS] & 4 /* CreationMode */) === 4 /* CreationMode */;\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 */\nfunction viewAttachedToChangeDetector(view) {\n return (view[FLAGS] & 128 /* Attached */) === 128 /* Attached */;\n}\n/** Returns a boolean for whether the view is attached to a container. */\nfunction viewAttachedToContainer(view) {\n return isLContainer(view[PARENT]);\n}\n/** Returns a constant from `TConstants` instance. */\nfunction getConstant(consts, index) {\n return consts === null || index == null ? null : consts[index];\n}\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nfunction resetPreOrderHookFlags(lView) {\n lView[PREORDER_HOOK_FLAGS] = 0;\n}\n/**\n * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents\n * whose\n * 1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh\n * or\n * 2. counter goes from 1 to 0, indicating there are no more descendant views to refresh\n */\nfunction updateTransplantedViewCount(lContainer, amount) {\n lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n var viewOrContainer = lContainer;\n var parent = lContainer[PARENT];\n while (parent !== null &&\n ((amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1) ||\n (amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0))) {\n parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n viewOrContainer = parent;\n parent = parent[PARENT];\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 */\nvar instructionState = {\n lFrame: createLFrame(null),\n bindingsEnabled: true,\n checkNoChangesMode: false,\n};\nfunction getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n}\nfunction increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n}\nfunction decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n}\nfunction getBindingsEnabled() {\n return instructionState.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 */\nfunction ɵɵenableBindings() {\n instructionState.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 */\nfunction ɵɵdisableBindings() {\n instructionState.bindingsEnabled = false;\n}\n/**\n * Return the current `LView`.\n */\nfunction getLView() {\n return instructionState.lFrame.lView;\n}\n/**\n * Return the current `TView`.\n */\nfunction getTView() {\n return instructionState.lFrame.tView;\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 */\nfunction ɵɵrestoreView(viewToRestore) {\n instructionState.lFrame.contextLView = viewToRestore;\n}\nfunction getPreviousOrParentTNode() {\n return instructionState.lFrame.previousOrParentTNode;\n}\nfunction setPreviousOrParentTNode(tNode, isParent) {\n instructionState.lFrame.previousOrParentTNode = tNode;\n instructionState.lFrame.isParent = isParent;\n}\nfunction getIsParent() {\n return instructionState.lFrame.isParent;\n}\nfunction setIsNotParent() {\n instructionState.lFrame.isParent = false;\n}\nfunction setIsParent() {\n instructionState.lFrame.isParent = true;\n}\nfunction getContextLView() {\n return instructionState.lFrame.contextLView;\n}\nfunction getCheckNoChangesMode() {\n // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.\n return instructionState.checkNoChangesMode;\n}\nfunction setCheckNoChangesMode(mode) {\n instructionState.checkNoChangesMode = mode;\n}\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nfunction getBindingRoot() {\n var lFrame = instructionState.lFrame;\n var index = lFrame.bindingRootIndex;\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n return index;\n}\nfunction getBindingIndex() {\n return instructionState.lFrame.bindingIndex;\n}\nfunction setBindingIndex(value) {\n return instructionState.lFrame.bindingIndex = value;\n}\nfunction nextBindingIndex() {\n return instructionState.lFrame.bindingIndex++;\n}\nfunction incrementBindingIndex(count) {\n var lFrame = instructionState.lFrame;\n var index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n}\n/**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n * whose `hostBindings` are being processed.\n */\nfunction setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {\n var lFrame = instructionState.lFrame;\n lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n setCurrentDirectiveIndex(currentDirectiveIndex);\n}\n/**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\nfunction getCurrentDirectiveIndex() {\n return instructionState.lFrame.currentDirectiveIndex;\n}\n/**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\nfunction setCurrentDirectiveIndex(currentDirectiveIndex) {\n instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\n/**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\nfunction getCurrentDirectiveDef(tData) {\n var currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];\n}\nfunction getCurrentQueryIndex() {\n return instructionState.lFrame.currentQueryIndex;\n}\nfunction setCurrentQueryIndex(value) {\n instructionState.lFrame.currentQueryIndex = value;\n}\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n * @param newView\n * @param tNode\n */\nfunction enterDI(newView, tNode) {\n ngDevMode && assertLViewOrUndefined(newView);\n var newLFrame = allocLFrame();\n instructionState.lFrame = newLFrame;\n newLFrame.previousOrParentTNode = tNode;\n newLFrame.lView = newView;\n}\n/**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView 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 lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @param tNode Element to which the View is a child of\n * @returns the previously active lView;\n */\nfunction enterView(newView, tNode) {\n ngDevMode && assertLViewOrUndefined(newView);\n var newLFrame = allocLFrame();\n if (ngDevMode) {\n assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.selectedIndex, 0, 'Expected clean LFrame');\n assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n assertEqual(newLFrame.currentSanitizer, null, 'Expected clean LFrame');\n assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n }\n var tView = newView[TVIEW];\n instructionState.lFrame = newLFrame;\n newLFrame.previousOrParentTNode = tNode;\n newLFrame.lView = newView;\n newLFrame.tView = tView;\n newLFrame.contextLView = newView;\n newLFrame.bindingIndex = tView.bindingStartIndex;\n}\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n var currentLFrame = instructionState.lFrame;\n var childLFrame = currentLFrame === null ? null : currentLFrame.child;\n var newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n return newLFrame;\n}\nfunction createLFrame(parent) {\n var lFrame = {\n previousOrParentTNode: null,\n isParent: true,\n lView: null,\n tView: null,\n selectedIndex: 0,\n contextLView: null,\n elementDepthCount: 0,\n currentNamespace: null,\n currentSanitizer: null,\n currentDirectiveIndex: -1,\n bindingRootIndex: -1,\n bindingIndex: -1,\n currentQueryIndex: 0,\n parent: parent,\n child: null,\n };\n parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n return lFrame;\n}\n/**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `previousOrParentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\nfunction leaveViewLight() {\n var oldLFrame = instructionState.lFrame;\n instructionState.lFrame = oldLFrame.parent;\n oldLFrame.previousOrParentTNode = null;\n oldLFrame.lView = null;\n return oldLFrame;\n}\n/**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\nvar leaveDI = leaveViewLight;\n/**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\nfunction leaveView() {\n var oldLFrame = leaveViewLight();\n oldLFrame.isParent = true;\n oldLFrame.tView = null;\n oldLFrame.selectedIndex = 0;\n oldLFrame.contextLView = null;\n oldLFrame.elementDepthCount = 0;\n oldLFrame.currentDirectiveIndex = -1;\n oldLFrame.currentNamespace = null;\n oldLFrame.currentSanitizer = null;\n oldLFrame.bindingRootIndex = -1;\n oldLFrame.bindingIndex = -1;\n oldLFrame.currentQueryIndex = 0;\n}\nfunction nextContextImpl(level) {\n var contextLView = instructionState.lFrame.contextLView =\n walkUpViews(level, instructionState.lFrame.contextLView);\n return contextLView[CONTEXT];\n}\nfunction walkUpViews(nestingLevel, currentView) {\n while (nestingLevel > 0) {\n ngDevMode &&\n 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 * Gets the currently selected element index.\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 */\nfunction getSelectedIndex() {\n return instructionState.lFrame.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 * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\nfunction setSelectedIndex(index) {\n instructionState.lFrame.selectedIndex = index;\n}\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nfunction getSelectedTNode() {\n var lFrame = instructionState.lFrame;\n return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceMathML() {\n instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceHTML() {\n namespaceHTMLInternal();\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nfunction namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}\nfunction getNamespace() {\n return instructionState.lFrame.currentNamespace;\n}\nfunction setCurrentStyleSanitizer(sanitizer) {\n instructionState.lFrame.currentSanitizer = sanitizer;\n}\nfunction resetCurrentStyleSanitizer() {\n setCurrentStyleSanitizer(null);\n}\nfunction getCurrentStyleSanitizer() {\n // TODO(misko): This should throw when there is no LView, but it turns out we can get here from\n // `NodeStyleDebug` hence we return `null`. This should be fixed\n var lFrame = instructionState.lFrame;\n return lFrame === null ? null : lFrame.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/**\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 */\nfunction registerPreOrderHooks(directiveIndex, directiveDef, tView) {\n ngDevMode && assertFirstCreatePass(tView);\n var onChanges = directiveDef.onChanges, onInit = directiveDef.onInit, doCheck = directiveDef.doCheck;\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 */\nfunction registerPostOrderHooks(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\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 = []))\n .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 * 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 pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on 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 */\nfunction executeCheckHooks(lView, hooks, nodeIndex) {\n callHooks(lView, hooks, 3 /* InitPhaseCompleted */, nodeIndex);\n}\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on 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 */\nfunction executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n ngDevMode &&\n assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');\n if ((lView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\nfunction incrementInitPhaseFlags(lView, initPhase) {\n ngDevMode &&\n assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');\n var flags = lView[FLAGS];\n if ((flags & 3 /* InitPhaseStateMask */) === initPhase) {\n flags &= 2047 /* IndexWithinInitPhaseReset */;\n flags += 1 /* InitPhaseStateIncrementer */;\n lView[FLAGS] = flags;\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 on 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 */\nfunction callHooks(currentView, arr, initPhase, currentNodeIndex) {\n ngDevMode &&\n assertEqual(getCheckNoChangesMode(), false, 'Hooks should never be run in the check no changes mode.');\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 */\nfunction 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] >> 11 /* 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] += 2048 /* IndexWithinInitPhaseIncrementer */;\n hook.call(directive);\n }\n }\n else {\n hook.call(directive);\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 */\nvar TNODE = 8;\nvar PARENT_INJECTOR = 8;\nvar INJECTOR_BLOOM_PARENT_SIZE = 9;\nvar 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 */\nvar 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}());\nfunction isFactory(obj) {\n return obj instanceof NodeInjectorFactory;\n}\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nvar unusedValueExportToPlacateAjd$3 = 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 */\nfunction assertNodeType(tNode, type) {\n assertDefined(tNode, 'should be called with a TNode');\n assertEqual(tNode.type, type, \"should be a \" + typeName(type));\n}\nfunction 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}\nfunction typeName(type) {\n if (type == 1 /* Projection */)\n return 'Projection';\n if (type == 0 /* Container */)\n return 'Container';\n if (type == 5 /* IcuContainer */)\n return 'IcuContainer';\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 * 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 * @param renderer The renderer to be used\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 */\nfunction setUpAttributes(renderer, native, attrs) {\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.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/**\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 */\nfunction isNameOnlyAttributeMarker(marker) {\n return marker === 3 /* Bindings */ || marker === 4 /* Template */ ||\n marker === 6 /* I18n */;\n}\nfunction isAnimationProp(name) {\n // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n // charCodeAt doesn't allocate memory to return a substring.\n return name.charCodeAt(0) === 64 /* AT_SIGN */;\n}\n/**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\nfunction mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {\n // do nothing\n }\n else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n }\n else {\n var srcMarker = -1 /* ImplicitAttributes */;\n for (var i = 0; i < src.length; i++) {\n var item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n }\n else {\n if (srcMarker === 0 /* NamespaceURI */) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n }\n else if (srcMarker === -1 /* ImplicitAttributes */ ||\n srcMarker === 2 /* Styles */) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n }\n else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item, null, null);\n }\n }\n }\n }\n return dst;\n}\n/**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\nfunction mergeHostAttribute(dst, marker, key1, key2, value) {\n var i = 0;\n // Assume that new markers will be inserted at the end.\n var markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === -1 /* ImplicitAttributes */) {\n markerInsertPosition = -1;\n }\n else {\n while (i < dst.length) {\n var dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n }\n else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n // search until you find place of insertion\n while (i < dst.length) {\n var item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n }\n else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n }\n else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null)\n i++;\n if (value !== null)\n i++;\n }\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, 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/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nfunction hasParentInjector(parentLocation) {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\nfunction getParentInjectorIndex(parentLocation) {\n return parentLocation & 32767 /* InjectorIndexMask */;\n}\nfunction 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 */\nfunction 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 * 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 */\nfunction 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 */\nfunction 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}\nvar ɵ0$3 = function () { return (typeof requestAnimationFrame !== 'undefined' &&\n requestAnimationFrame || // browser only\n setTimeout // everything else\n)\n .bind(_global); };\nvar defaultScheduler = (ɵ0$3)();\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveWindow(element) {\n return { name: 'window', target: element.ownerDocument.defaultView };\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveDocument(element) {\n return { name: 'document', target: element.ownerDocument };\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵ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 */\nvar INTERPOLATION_DELIMITER = \"\\uFFFD\";\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nfunction 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/**\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 */\nvar includeViewProviders = true;\nfunction 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 */\nvar BLOOM_SIZE = 256;\nvar BLOOM_MASK = BLOOM_SIZE - 1;\n/** Counter used to generate unique IDs for directives. */\nvar 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 */\nfunction bloomAdd(injectorIndex, tView, type) {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass 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 */\nfunction 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.firstCreatePass) {\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 }\n var parentLoc = getParentInjectorLocation(tNode, 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 parentIndex = getParentInjectorIndex(parentLoc);\n var parentLView = getParentInjectorView(parentLoc, hostView);\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}\nfunction insertBloom(arr, footer) {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\nfunction 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 */\nfunction 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 */\nfunction diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, 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.ɵcmp = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @publicApi\n */\nfunction injectAttributeImpl(tNode, attrNameToInject) {\n ngDevMode &&\n assertNodeOfPossibleTypes(tNode, 0 /* Container */, 3 /* Element */, 4 /* ElementContainer */);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n if (attrNameToInject === 'class') {\n return tNode.classes;\n }\n if (attrNameToInject === 'style') {\n return tNode.styles;\n }\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 while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\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 */\nfunction getOrCreateInjectable(tNode, lView, token, flags, notFoundValue) {\n if (flags === void 0) { flags = InjectFlags.Default; }\n if (tNode !== null) {\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 enterDI(lView, tNode);\n try {\n var value = bloomHash();\n if (value == null && !(flags & InjectFlags.Optional)) {\n throw new Error(\"No provider for \" + stringifyForError(token) + \"!\");\n }\n else {\n return value;\n }\n }\n finally {\n leaveDI();\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 & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][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 & 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 & InjectFlags.Optional && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n if ((flags & (InjectFlags.Self | 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 & InjectFlags.Optional);\n }\n else {\n return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n }\n }\n finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n if (flags & InjectFlags.Optional) {\n return notFoundValue;\n }\n else {\n throw new Error(\"NodeInjector: NOT_FOUND [\" + stringifyForError(token) + \"]\");\n }\n}\nvar NOT_FOUND = {};\nfunction 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 (isComponentHost(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 & InjectFlags.Host) && hostTElementNode === tNode;\n var injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n if (injectableIdx !== null) {\n return getNodeInjectable(lView, currentTView, 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 */\nfunction 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 `LView` 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 */\nfunction getNodeInjectable(lView, tView, index, tNode) {\n var value = lView[index];\n var tData = tView.data;\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 enterDI(lView, tNode);\n try {\n value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n // This code path is hit for both directives and providers.\n // For perf reasons, we want to avoid searching for hooks on providers.\n // It does no harm to try (the hooks just won't exist), but the extra\n // checks are unnecessary and this is a hot path. So we check to see\n // if the index of the dependency is in the directive range for this\n // tNode. If it's not, we know it's a provider and skip hook registration.\n if (tView.firstCreatePass && index >= tNode.directiveStart) {\n ngDevMode && assertDirectiveDef(tData[index]);\n registerPreOrderHooks(index, tData[index], tView);\n }\n }\n finally {\n if (factory.injectImpl)\n setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n leaveDI();\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 */\nfunction 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}\nfunction 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 */\nfunction shouldSearchParent(flags, isFirstHostTNode) {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\nvar 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 */\nfunction ɵɵgetFactoryOf(type) {\n var typeAny = type;\n if (isForwardRef(type)) {\n return (function () {\n var factory = ɵɵgetFactoryOf(resolveForwardRef(typeAny));\n return factory ? factory() : null;\n });\n }\n var factory = getFactoryDef(typeAny);\n if (factory === null) {\n var injectorDef = getInjectorDef(typeAny);\n factory = injectorDef && injectorDef.factory;\n }\n return factory || null;\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵgetInheritedFactory(type) {\n return noSideEffects(function () {\n var proto = Object.getPrototypeOf(type.prototype).constructor;\n var factory = proto[NG_FACTORY_DEF] || ɵɵ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/**\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 */\nvar ERROR_TYPE = 'ngType';\nvar ERROR_DEBUG_CONTEXT = 'ngDebugContext';\nvar ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nvar ERROR_LOGGER = 'ngErrorLogger';\nfunction 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 */\nfunction getType(error) {\n return error[ERROR_TYPE];\n}\nfunction getDebugContext(error) {\n return error[ERROR_DEBUG_CONTEXT];\n}\nfunction getOriginalError(error) {\n return error[ERROR_ORIGINAL_ERROR];\n}\nfunction getErrorLogger(error) {\n return error[ERROR_LOGGER] || defaultErrorLogger;\n}\nfunction 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 */\nvar 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 */\nvar CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\n/**\n * Defines a schema that allows any property on any element.\n *\n * @publicApi\n */\nvar 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 */\nvar SafeValueImpl = /** @class */ (function () {\n function SafeValueImpl(changingThisBreaksApplicationSecurity) {\n this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;\n }\n SafeValueImpl.prototype.toString = function () {\n return \"SafeValue must use [property]=binding: \" + this.changingThisBreaksApplicationSecurity +\n \" (see http://g.co/ng/security#xss)\";\n };\n return SafeValueImpl;\n}());\nvar SafeHtmlImpl = /** @class */ (function (_super) {\n __extends(SafeHtmlImpl, _super);\n function SafeHtmlImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeHtmlImpl.prototype.getTypeName = function () {\n return \"HTML\" /* Html */;\n };\n return SafeHtmlImpl;\n}(SafeValueImpl));\nvar SafeStyleImpl = /** @class */ (function (_super) {\n __extends(SafeStyleImpl, _super);\n function SafeStyleImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeStyleImpl.prototype.getTypeName = function () {\n return \"Style\" /* Style */;\n };\n return SafeStyleImpl;\n}(SafeValueImpl));\nvar SafeScriptImpl = /** @class */ (function (_super) {\n __extends(SafeScriptImpl, _super);\n function SafeScriptImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeScriptImpl.prototype.getTypeName = function () {\n return \"Script\" /* Script */;\n };\n return SafeScriptImpl;\n}(SafeValueImpl));\nvar SafeUrlImpl = /** @class */ (function (_super) {\n __extends(SafeUrlImpl, _super);\n function SafeUrlImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeUrlImpl.prototype.getTypeName = function () {\n return \"URL\" /* Url */;\n };\n return SafeUrlImpl;\n}(SafeValueImpl));\nvar SafeResourceUrlImpl = /** @class */ (function (_super) {\n __extends(SafeResourceUrlImpl, _super);\n function SafeResourceUrlImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeResourceUrlImpl.prototype.getTypeName = function () {\n return \"ResourceURL\" /* ResourceUrl */;\n };\n return SafeResourceUrlImpl;\n}(SafeValueImpl));\nfunction unwrapSafeValue(value) {\n return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity :\n value;\n}\nfunction allowSanitizationBypassAndThrow(value, type) {\n var actualType = getSanitizationBypassType(value);\n if (actualType != null && actualType !== type) {\n // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n if (actualType === \"ResourceURL\" /* ResourceUrl */ && type === \"URL\" /* Url */)\n return true;\n throw new Error(\"Required a safe \" + type + \", got a \" + actualType + \" (see http://g.co/ng/security#xss)\");\n }\n return actualType === type;\n}\nfunction getSanitizationBypassType(value) {\n return value instanceof SafeValueImpl && value.getTypeName() || null;\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` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustHtml(trustedHtml) {\n return new SafeHtmlImpl(trustedHtml);\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` hich has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustStyle(trustedStyle) {\n return new SafeStyleImpl(trustedStyle);\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` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustScript(trustedScript) {\n return new SafeScriptImpl(trustedScript);\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` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustUrl(trustedUrl) {\n return new SafeUrlImpl(trustedUrl);\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` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustResourceUrl(trustedResourceUrl) {\n return new SafeResourceUrlImpl(trustedResourceUrl);\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 */\nvar _devMode = true;\nvar _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 */\nfunction 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 */\nfunction 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 */\nvar InertBodyHelper = /** @class */ (function () {\n function InertBodyHelper(defaultDoc) {\n this.defaultDoc = defaultDoc;\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n var inertBodyElement = this.inertDocument.body;\n if (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 inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(inertBodyElement);\n }\n inertBodyElement.innerHTML = '<svg><g onload=\"this.parentNode.remove()\"></g></svg>';\n if (inertBodyElement.querySelector && !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 inertBodyElement.innerHTML = '<svg><p><style><img src=\"</style><img src=x onerror=alert(1)//\">';\n if (inertBodyElement.querySelector && 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.DOMParser().parseFromString(html, 'text/html').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 // Note that previously we used to do something like `this.inertDocument.body.innerHTML = html`\n // and we returned the inert `body` node. This was changed, because IE seems to treat setting\n // `innerHTML` on an inserted element differently, compared to one that hasn't been inserted\n // yet. In particular, IE appears to split some of the text into multiple text nodes rather\n // than keeping them in a single one which ends up messing with Ivy's i18n parsing further\n // down the line. This has been worked around by creating a new inert `body` and using it as\n // the root node in which we insert the HTML.\n var inertBody = this.inertDocument.createElement('body');\n inertBody.innerHTML = html;\n // Support: IE 9-11 only\n // strip custom-namespaced attributes on IE<=11\n if (this.defaultDoc.documentMode) {\n this.stripCustomNsAttrs(inertBody);\n }\n return inertBody;\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 */\nfunction 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. \"http\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo<bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript:...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nvar SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n/* A pattern that matches safe srcset values */\nvar SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n/** A pattern that matches safe data URLs. Only matches image, video and audio types. */\nvar 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;\nfunction _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}\nfunction 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 */\nfunction 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}\nfunction 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\nvar 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\nvar OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nvar OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nvar OPTIONAL_END_TAG_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n// Safe Block Elements - HTML5\nvar 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\nvar 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'));\nvar VALID_ELEMENTS = merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n// Attributes that have href and hence need to be sanitized\nvar URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n// Attributes that have special href set hence need to be sanitized\nvar SRCSET_ATTRS = tagSet('srcset');\nvar 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)\nvar 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.\nvar 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.\nvar 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 */\nvar 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) {\n this.buf.push(encodeEntities(chars));\n };\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\nvar SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nvar 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 */\nfunction encodeEntities(value) {\n return value.replace(/&/g, '&')\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) {\n return '&#' + match.charCodeAt(0) + ';';\n })\n .replace(/</g, '<')\n .replace(/>/g, '>');\n}\nvar 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 */\nfunction _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}\nfunction getTemplateContent(el) {\n return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ?\n el.content :\n null;\n}\nfunction 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/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n * @publicApi\n */\nvar SecurityContext;\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})(SecurityContext || (SecurityContext = {}));\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 */\nvar VALUES = '[-,.\"\\'%_!# a-zA-Z0-9]+';\nvar TRANSFORMATION_FNS = '(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|Z|3d)?';\nvar COLOR_FNS = '(?:rgb|hsl)a?';\nvar GRADIENTS = '(?:repeating-)?(?:linear|radial)-gradient';\nvar CSS3_FNS = '(?:attr|calc|var)';\nvar FN_ARGS = '\\\\([-0-9.%, #a-zA-Z]+\\\\)';\nvar 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 */\nvar 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 */\nfunction 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 */\nfunction _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 */\nfunction ɵɵsanitizeHtml(unsafeHtml) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeHtml, \"HTML\" /* Html */)) {\n return unwrapSafeValue(unsafeHtml);\n }\n return _sanitizeHtml(getDocument(), 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 */\nfunction ɵɵsanitizeStyle(unsafeStyle) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeStyle, \"Style\" /* Style */)) {\n return unwrapSafeValue(unsafeStyle);\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 */\nfunction ɵɵsanitizeUrl(unsafeUrl) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeUrl, \"URL\" /* Url */)) {\n return unwrapSafeValue(unsafeUrl);\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 */\nfunction ɵɵsanitizeResourceUrl(unsafeResourceUrl) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeResourceUrl, \"ResourceURL\" /* ResourceUrl */)) {\n return unwrapSafeValue(unsafeResourceUrl);\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 */\nfunction ɵɵsanitizeScript(unsafeScript) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '';\n }\n if (allowSanitizationBypassAndThrow(unsafeScript, \"Script\" /* Script */)) {\n return unwrapSafeValue(unsafeScript);\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 */\nfunction getUrlSanitizer(tag, prop) {\n if ((prop === 'src' &&\n (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' ||\n 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 */\nfunction ɵɵ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 */\nvar ɵɵdefaultStyleSanitizer = function (prop, value, mode) {\n if (value === undefined && mode === undefined) {\n // This is a workaround for the fact that `StyleSanitizeFn` should not exist once PR#34480\n // lands. For now the `StyleSanitizeFn` and should act like `(value: any) => string` as a\n // work around.\n return ɵɵsanitizeStyle(prop);\n }\n mode = mode || 3 /* ValidateAndSanitize */;\n var doSanitizeValue = true;\n if (mode & 1 /* ValidateProperty */) {\n doSanitizeValue = stylePropNeedsSanitization(prop);\n }\n if (mode & 2 /* SanitizeOnly */) {\n return doSanitizeValue ? ɵɵsanitizeStyle(value) : unwrapSafeValue(value);\n }\n else {\n return doSanitizeValue;\n }\n};\nfunction stylePropNeedsSanitization(prop) {\n return prop === 'background-image' || prop === 'backgroundImage' || prop === 'background' ||\n prop === 'border-image' || prop === 'borderImage' || prop === 'border-image-source' ||\n prop === 'borderImageSource' || prop === 'filter' || prop === 'list-style' ||\n prop === 'listStyle' || prop === 'list-style-image' || prop === 'listStyleImage' ||\n prop === 'clip-path' || prop === 'clipPath';\n}\nfunction 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}\nfunction 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}\nfunction 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/**\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 */\nfunction 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 \" + name + \" 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 */\nfunction 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}\nvar CAMEL_CASE_REGEXP = /([A-Z])/g;\nfunction 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}\nfunction 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/**\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 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 */\nfunction 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 */\nfunction 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 */\nfunction getComponentViewByInstance(componentInstance) {\n var lView = readPatchedData(componentInstance);\n var view;\n if (Array.isArray(lView)) {\n var nodeIndex = findViaComponent(lView, componentInstance);\n view = getComponentLViewByIndex(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 = getComponentLViewByIndex(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 */\nfunction attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}\nfunction isComponentInstance(instance) {\n return instance && instance.constructor && instance.constructor.ɵcmp;\n}\nfunction isDirectiveInstance(instance) {\n return instance && instance.constructor && instance.constructor.ɵdir;\n}\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView, target) {\n var tNode = lView[TVIEW].firstChild;\n while (tNode) {\n var native = getNativeByTNodeOrNull(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 */\nfunction 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 */\nfunction 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 = getComponentLViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n }\n else {\n var rootComponentView = getComponentLViewByIndex(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 */\nfunction 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 */\nfunction getDirectivesAtNodeIndex(nodeIndex, lView, includeComponents) {\n var tNode = lView[TVIEW].data[nodeIndex];\n var directiveStartIndex = tNode.directiveStart;\n if (directiveStartIndex == 0)\n return EMPTY_ARRAY;\n var directiveEndIndex = tNode.directiveEnd;\n if (!includeComponents && tNode.flags & 2 /* isComponentHost */)\n directiveStartIndex++;\n return lView.slice(directiveStartIndex, directiveEndIndex);\n}\nfunction getComponentAtNodeIndex(nodeIndex, lView) {\n var tNode = lView[TVIEW].data[nodeIndex];\n var directiveStartIndex = tNode.directiveStart;\n return tNode.flags & 2 /* isComponentHost */ ? 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 */\nfunction 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/** Called when directives inject each other (creating a circular dependency) */\nfunction 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 */\nfunction throwMultipleComponentError(tNode) {\n throw new Error(\"Multiple components match node with tagname \" + tNode.tagName);\n}\nfunction throwMixedMultiProviderError() {\n throw new Error(\"Cannot mix multi providers and regular providers\");\n}\nfunction 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/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nfunction throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {\n var field = propName ? \" for '\" + propName + \"'\" : '';\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value\" + field + \": '\" + 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, see `viewDebugError` function in\n // `packages/core/src/view/errors.ts` for reference.\n throw new Error(msg);\n}\nfunction constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {\n var _a = __read(meta.split(INTERPOLATION_DELIMITER)), propName = _a[0], prefix = _a[1], chunks = _a.slice(2);\n var oldValue = prefix, newValue = prefix;\n for (var i = 0; i < chunks.length; i++) {\n var slotIdx = rootIndex + i;\n oldValue += \"\" + lView[slotIdx] + chunks[i];\n newValue += \"\" + (slotIdx === expressionIndex ? changedValue : lView[slotIdx]) + chunks[i];\n }\n return { propName: propName, oldValue: oldValue, newValue: newValue };\n}\n/**\n * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:\n * - property name (for property bindings or interpolations)\n * - old and new values, enriched using information from metadata\n *\n * More information on the metadata storage format can be found in `storePropertyBindingMetadata`\n * function description.\n */\nfunction getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) {\n var tData = lView[TVIEW].data;\n var metadata = tData[bindingIndex];\n if (typeof metadata === 'string') {\n // metadata for property interpolation\n if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {\n return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue);\n }\n // metadata for property binding\n return { propName: metadata, oldValue: oldValue, newValue: newValue };\n }\n // metadata is not available for this expression, check if this expression is a part of the\n // property interpolation by going from the current binding index left and look for a string that\n // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:\n // [..., 'id�Prefix � and � suffix', null, null, null, ...]\n if (metadata === null) {\n var idx = bindingIndex - 1;\n while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n idx--;\n }\n var meta = tData[idx];\n if (typeof meta === 'string') {\n var matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));\n // first interpolation delimiter separates property name from interpolation parts (in case of\n // property interpolations), so we subtract one from total number of found delimiters\n if (matches && (matches.length - 1) > bindingIndex - idx) {\n return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);\n }\n }\n }\n return { propName: undefined, oldValue: oldValue, newValue: newValue };\n}\n\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nvar unusedValueExportToPlacateAjd$4 = 1;\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n * <div my-dir [class]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasClassInput(tNode) {\n return (tNode.flags & 16 /* hasClassInput */) !== 0;\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n * <div my-dir [style]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasStyleInput(tNode) {\n return (tNode.flags & 32 /* hasStyleInput */) !== 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// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nvar unusedValueExportToPlacateAjd$5 = 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 * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\nfunction classIndexOf(className, classToSearch, startingIndex) {\n ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n var end = className.length;\n while (true) {\n var foundIndex = className.indexOf(classToSearch, startingIndex);\n if (foundIndex === -1)\n return foundIndex;\n if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32 /* SPACE */) {\n // Ensure that it has leading whitespace\n var length_1 = classToSearch.length;\n if (foundIndex + length_1 === end ||\n className.charCodeAt(foundIndex + length_1) <= 32 /* SPACE */) {\n // Ensure that it has trailing whitespace\n return foundIndex;\n }\n }\n // False positive, keep searching from where we left off.\n startingIndex = foundIndex + 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 */\nvar unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5;\nvar NG_TEMPLATE_SELECTOR = 'ng-template';\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n * addition to the `AttributeMarker.Classes`.\n */\nfunction isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {\n // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect.\n // It is strange to me that sometimes the class information comes in form of `class` attribute\n // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine\n // if that is the right behavior.\n ngDevMode &&\n assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n var i = 0;\n while (i < attrs.length) {\n var item = attrs[i++];\n if (isProjectionMode && item === 'class') {\n item = attrs[i];\n if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {\n return true;\n }\n }\n else if (item === 1 /* Classes */) {\n // We found the classes section. Start searching for the class.\n while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {\n // while we have strings\n if (item.toLowerCase() === cssClassToMatch)\n return true;\n }\n return false;\n }\n }\n return false;\n}\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nfunction isInlineTemplate(tNode) {\n return tNode.type === 0 /* Container */ && tNode.tagName !== NG_TEMPLATE_SELECTOR;\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 */\nfunction 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 */\nfunction 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.attrs !== null) {\n if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n continue;\n }\n var attrName = (mode & 8 /* CLASS */) ? 'class' : current;\n var attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), 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 &&\n assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* NamespaceURI */, 'We do not match directives on namespaced attributes');\n // we lowercase the attribute value to be able to match\n // selectors without case-sensitivity\n // (selectors are already in lowercase when generated)\n nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();\n }\n var compareAgainstClassName = mode & 8 /* CLASS */ ? nodeAttrValue : null;\n if (compareAgainstClassName &&\n classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 ||\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}\nfunction isPositive(mode) {\n return (mode & 1 /* NOT */) === 0;\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 */\nfunction 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 */ || maybeAttrName === 2 /* Styles */) {\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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction matchTemplateAttribute(attrs, name) {\n var i = attrs.indexOf(4 /* Template */);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n var attr = attrs[i];\n // Return in case we checked all template attrs and are switching to the next section in the\n // attrs array (that starts with a number that represents an attribute marker).\n if (typeof attr === 'number')\n return -1;\n if (attr === 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 */\nfunction 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}\nfunction maybeWrapInNotSelector(isNegativeMode, chunk) {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\nfunction stringifyCSSSelector(selector) {\n var result = selector[0];\n var i = 1;\n var mode = 2 /* ATTRIBUTE */;\n var currentChunk = '';\n var isNegativeMode = false;\n while (i < selector.length) {\n var valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & 2 /* ATTRIBUTE */) {\n var attrValue = selector[++i];\n currentChunk +=\n '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n }\n else if (mode & 8 /* CLASS */) {\n currentChunk += '.' + valueOrMarker;\n }\n else if (mode & 4 /* ELEMENT */) {\n currentChunk += ' ' + valueOrMarker;\n }\n }\n else {\n //\n // Append current chunk to the final result in case we come across SelectorFlag, which\n // indicates that the previous section of a selector is over. We need to accumulate content\n // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n // ```\n // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n // ```\n // should be transformed to `.classA :not(.classB .classC)`.\n //\n // Note: for negative selector part, we accumulate content between flags until we find the\n // next negative flag. This is needed to support a case where `:not()` rule contains more than\n // one chunk, e.g. the following selector:\n // ```\n // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n // ```\n // should be stringified to `:not(p.foo) :not(.bar)`\n //\n if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n currentChunk = '';\n }\n mode = valueOrMarker;\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector.\n isNegativeMode = isNegativeMode || !isPositive(mode);\n }\n i++;\n }\n if (currentChunk !== '') {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n }\n return result;\n}\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nfunction stringifyCSSSelectorList(selectorList) {\n return selectorList.map(stringifyCSSSelector).join(',');\n}\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nfunction extractAttrsAndClassesFromSelector(selector) {\n var attrs = [];\n var classes = [];\n var i = 1;\n var mode = 2 /* ATTRIBUTE */;\n while (i < selector.length) {\n var valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === 2 /* ATTRIBUTE */) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i]);\n }\n }\n else if (mode === 8 /* CLASS */) {\n classes.push(valueOrMarker);\n }\n }\n else {\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n // extracted only for \"positive\" part of the selector, we can stop here.\n if (!isPositive(mode))\n break;\n mode = valueOrMarker;\n }\n i++;\n }\n return { attrs: attrs, classes: classes };\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. */\nvar NO_CHANGE = (typeof ngDevMode === 'undefined' || ngDevMode) ? { __brand__: 'NO_CHANGE' } : {};\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 */\nfunction 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 */\nfunction 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 * 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 */\nfunction 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 * Gets the first `LContainer` in the LView or `null` if none exists.\n */\nfunction getFirstLContainer(lView) {\n return getNearestLContainer(lView[CHILD_HEAD]);\n}\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nfunction getNextLContainer(container) {\n return getNearestLContainer(container[NEXT]);\n}\nfunction getNearestLContainer(viewOrContainer) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n return viewOrContainer;\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 * Advances to 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 * text(0, 'Hello');\n * text(1, 'Goodbye')\n * element(2, 'div');\n * }\n * if (rf & 2) {\n * advance(2); // Advance twice to the <div>.\n * property('title', 'test');\n * }\n * }\n * ```\n * @param delta Number of elements to advance forwards by.\n *\n * @codeGenApi\n */\nfunction ɵɵadvance(delta) {\n ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, getCheckNoChangesMode());\n}\n/**\n * Selects an element for later binding instructions.\n * @deprecated No longer being generated, but still used in unit tests.\n * @codeGenApi\n */\nfunction ɵɵselect(index) {\n // TODO(misko): Remove this function as it is no longer being used.\n selectIndexInternal(getTView(), getLView(), index, getCheckNoChangesMode());\n}\nfunction selectIndexInternal(tView, lView, index, checkNoChangesMode) {\n ngDevMode && assertGreaterThan(index, -1, 'Invalid index');\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n // Flush the initial hooks for elements in the view that have been added up to this point.\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!checkNoChangesMode) {\n var hooksInitPhaseCompleted = (lView[FLAGS] & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */;\n if (hooksInitPhaseCompleted) {\n var preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, index);\n }\n }\n else {\n var preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, 0 /* OnInitHooksToBeRun */, index);\n }\n }\n }\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 `ɵɵadvance` instruction.\n setSelectedIndex(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 * Marks that the next string is for element.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nvar ELEMENT_MARKER = {\n marker: 'element'\n};\n/**\n * Marks that the next string is for comment.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nvar COMMENT_MARKER = {\n marker: 'comment'\n};\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nvar unusedValueExportToPlacateAjd$6 = 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 */\nfunction toTStylingRange(prev, next) {\n ngDevMode && assertNumberInRange(prev, 0, 32767 /* UNSIGNED_MASK */);\n ngDevMode && assertNumberInRange(next, 0, 32767 /* UNSIGNED_MASK */);\n return (prev << 17 /* PREV_SHIFT */ | next << 2 /* NEXT_SHIFT */);\n}\nfunction getTStylingRangePrev(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange >> 17 /* PREV_SHIFT */) & 32767 /* UNSIGNED_MASK */;\n}\nfunction getTStylingRangePrevDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & 2 /* PREV_DUPLICATE */) ==\n 2 /* PREV_DUPLICATE */;\n}\nfunction setTStylingRangePrev(tStylingRange, previous) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(previous, 0, 32767 /* UNSIGNED_MASK */);\n return ((tStylingRange & ~4294836224 /* PREV_MASK */) |\n (previous << 17 /* PREV_SHIFT */));\n}\nfunction setTStylingRangePrevDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange | 2 /* PREV_DUPLICATE */);\n}\nfunction getTStylingRangeNext(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & 131068 /* NEXT_MASK */) >> 2 /* NEXT_SHIFT */;\n}\nfunction setTStylingRangeNext(tStylingRange, next) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n ngDevMode && assertNumberInRange(next, 0, 32767 /* UNSIGNED_MASK */);\n return ((tStylingRange & ~131068 /* NEXT_MASK */) | //\n next << 2 /* NEXT_SHIFT */);\n}\nfunction getTStylingRangeNextDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange & 1 /* NEXT_DUPLICATE */) ===\n 1 /* NEXT_DUPLICATE */;\n}\nfunction setTStylingRangeNextDuplicate(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n return (tStylingRange | 1 /* NEXT_DUPLICATE */);\n}\nfunction getTStylingRangeTail(tStylingRange) {\n ngDevMode && assertNumber(tStylingRange, 'expected number');\n var next = getTStylingRangeNext(tStylingRange);\n return next === 0 ? getTStylingRangePrev(tStylingRange) : next;\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 */\nfunction 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 */\nvar NG_DEV_MODE = ((typeof ngDevMode === 'undefined' || !!ngDevMode) && initNgDevMode());\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 */\nvar LVIEW_COMPONENT_CACHE;\nvar LVIEW_EMBEDDED_CACHE;\nvar LVIEW_ROOT;\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 */\nfunction cloneToLViewFromTViewBlueprint(tView) {\n var debugTView = tView;\n var lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);\n return lView.concat(tView.blueprint);\n}\nfunction getLViewToClone(type, name) {\n switch (type) {\n case 0 /* Root */:\n if (LVIEW_ROOT === undefined)\n LVIEW_ROOT = new (createNamedArrayType('LRootView'))();\n return LVIEW_ROOT;\n case 1 /* Component */:\n if (LVIEW_COMPONENT_CACHE === undefined)\n LVIEW_COMPONENT_CACHE = new Map();\n var componentArray = LVIEW_COMPONENT_CACHE.get(name);\n if (componentArray === undefined) {\n componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();\n LVIEW_COMPONENT_CACHE.set(name, componentArray);\n }\n return componentArray;\n case 2 /* Embedded */:\n if (LVIEW_EMBEDDED_CACHE === undefined)\n LVIEW_EMBEDDED_CACHE = new Map();\n var embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);\n if (embeddedArray === undefined) {\n embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();\n LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);\n }\n return embeddedArray;\n }\n throw new Error('unreachable code');\n}\nfunction nameSuffix(text) {\n if (text == null)\n return '';\n var index = text.lastIndexOf('_Template');\n return '_' + (index === -1 ? text : text.substr(0, index));\n}\n/**\n * This class is a debug version of Object literal so that we can have constructor name show up\n * in\n * debug tools in ngDevMode.\n */\nvar TViewConstructor = /** @class */ (function () {\n function TView(type, //\n id, //\n blueprint, //\n template, //\n queries, //\n viewQuery, //\n node, //\n data, //\n bindingStartIndex, //\n expandoStartIndex, //\n expandoInstructions, //\n firstCreatePass, //\n firstUpdatePass, //\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 consts, //\n incompleteFirstPass //\n ) {\n this.type = type;\n this.id = id;\n this.blueprint = blueprint;\n this.template = template;\n this.queries = queries;\n this.viewQuery = viewQuery;\n this.node = node;\n this.data = data;\n this.bindingStartIndex = bindingStartIndex;\n this.expandoStartIndex = expandoStartIndex;\n this.expandoInstructions = expandoInstructions;\n this.firstCreatePass = firstCreatePass;\n this.firstUpdatePass = firstUpdatePass;\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 this.consts = consts;\n this.incompleteFirstPass = incompleteFirstPass;\n }\n Object.defineProperty(TView.prototype, \"template_\", {\n get: function () {\n var buf = [];\n processTNodeChildren(this.firstChild, buf);\n return buf.join('');\n },\n enumerable: true,\n configurable: true\n });\n return TView;\n}());\nvar TNode = /** @class */ (function () {\n function TNode(tView_, //\n type, //\n index, //\n injectorIndex, //\n directiveStart, //\n directiveEnd, //\n directiveStylingLast, //\n propertyBindings, //\n flags, //\n providerIndexes, //\n tagName, //\n attrs, //\n mergedAttrs, //\n localNames, //\n initialInputs, //\n inputs, //\n outputs, //\n tViews, //\n next, //\n projectionNext, //\n child, //\n parent, //\n projection, //\n styles, //\n stylesWithoutHost, //\n residualStyles, //\n classes, //\n classesWithoutHost, //\n residualClasses, //\n classBindings, //\n styleBindings) {\n this.tView_ = tView_;\n this.type = type;\n this.index = index;\n this.injectorIndex = injectorIndex;\n this.directiveStart = directiveStart;\n this.directiveEnd = directiveEnd;\n this.directiveStylingLast = directiveStylingLast;\n this.propertyBindings = propertyBindings;\n this.flags = flags;\n this.providerIndexes = providerIndexes;\n this.tagName = tagName;\n this.attrs = attrs;\n this.mergedAttrs = mergedAttrs;\n this.localNames = localNames;\n this.initialInputs = initialInputs;\n this.inputs = inputs;\n this.outputs = outputs;\n this.tViews = tViews;\n this.next = next;\n this.projectionNext = projectionNext;\n this.child = child;\n this.parent = parent;\n this.projection = projection;\n this.styles = styles;\n this.stylesWithoutHost = stylesWithoutHost;\n this.residualStyles = residualStyles;\n this.classes = classes;\n this.classesWithoutHost = classesWithoutHost;\n this.residualClasses = residualClasses;\n this.classBindings = classBindings;\n this.styleBindings = styleBindings;\n }\n Object.defineProperty(TNode.prototype, \"type_\", {\n get: function () {\n switch (this.type) {\n case 0 /* Container */:\n return 'TNodeType.Container';\n case 3 /* Element */:\n return 'TNodeType.Element';\n case 4 /* ElementContainer */:\n return 'TNodeType.ElementContainer';\n case 5 /* IcuContainer */:\n return 'TNodeType.IcuContainer';\n case 1 /* Projection */:\n return 'TNodeType.Projection';\n case 2 /* View */:\n return 'TNodeType.View';\n default:\n return 'TNodeType.???';\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TNode.prototype, \"flags_\", {\n get: function () {\n var flags = [];\n if (this.flags & 16 /* hasClassInput */)\n flags.push('TNodeFlags.hasClassInput');\n if (this.flags & 8 /* hasContentQuery */)\n flags.push('TNodeFlags.hasContentQuery');\n if (this.flags & 32 /* hasStyleInput */)\n flags.push('TNodeFlags.hasStyleInput');\n if (this.flags & 128 /* hasHostBindings */)\n flags.push('TNodeFlags.hasHostBindings');\n if (this.flags & 2 /* isComponentHost */)\n flags.push('TNodeFlags.isComponentHost');\n if (this.flags & 1 /* isDirectiveHost */)\n flags.push('TNodeFlags.isDirectiveHost');\n if (this.flags & 64 /* isDetached */)\n flags.push('TNodeFlags.isDetached');\n if (this.flags & 4 /* isProjected */)\n flags.push('TNodeFlags.isProjected');\n return flags.join('|');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TNode.prototype, \"template_\", {\n get: function () {\n var buf = [];\n buf.push('<', this.tagName || this.type_);\n if (this.attrs) {\n for (var i = 0; i < this.attrs.length;) {\n var attrName = this.attrs[i++];\n if (typeof attrName == 'number') {\n break;\n }\n var attrValue = this.attrs[i++];\n buf.push(' ', attrName, '=\"', attrValue, '\"');\n }\n }\n buf.push('>');\n processTNodeChildren(this.child, buf);\n buf.push('</', this.tagName || this.type_, '>');\n return buf.join('');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TNode.prototype, \"styleBindings_\", {\n get: function () {\n return toDebugStyleBinding(this, false);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TNode.prototype, \"classBindings_\", {\n get: function () {\n return toDebugStyleBinding(this, true);\n },\n enumerable: true,\n configurable: true\n });\n return TNode;\n}());\nvar TNodeDebug = TNode;\nfunction toDebugStyleBinding(tNode, isClassBased) {\n var tData = tNode.tView_.data;\n var bindings = [];\n var range = isClassBased ? tNode.classBindings : tNode.styleBindings;\n var prev = getTStylingRangePrev(range);\n var next = getTStylingRangeNext(range);\n var isTemplate = next !== 0;\n var cursor = isTemplate ? next : prev;\n while (cursor !== 0) {\n var itemKey = tData[cursor];\n var itemRange = tData[cursor + 1];\n bindings.unshift({\n key: itemKey,\n index: cursor,\n isTemplate: isTemplate,\n prevDuplicate: getTStylingRangePrevDuplicate(itemRange),\n nextDuplicate: getTStylingRangeNextDuplicate(itemRange),\n nextIndex: getTStylingRangeNext(itemRange),\n prevIndex: getTStylingRangePrev(itemRange),\n });\n if (cursor === prev)\n isTemplate = false;\n cursor = getTStylingRangePrev(itemRange);\n }\n bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);\n return bindings;\n}\nfunction processTNodeChildren(tNode, buf) {\n while (tNode) {\n buf.push(tNode.template_);\n tNode = tNode.next;\n }\n}\nvar TViewData = NG_DEV_MODE && createNamedArrayType('TViewData') || null;\nvar TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because\n// `LView` 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 */\nfunction cloneToTViewData(list) {\n if (TVIEWDATA_EMPTY === undefined)\n TVIEWDATA_EMPTY = new TViewData();\n return TVIEWDATA_EMPTY.concat(list);\n}\nvar LViewBlueprint = NG_DEV_MODE && createNamedArrayType('LViewBlueprint') || null;\nvar MatchesArray = NG_DEV_MODE && createNamedArrayType('MatchesArray') || null;\nvar TViewComponents = NG_DEV_MODE && createNamedArrayType('TViewComponents') || null;\nvar TNodeLocalNames = NG_DEV_MODE && createNamedArrayType('TNodeLocalNames') || null;\nvar TNodeInitialInputs = NG_DEV_MODE && createNamedArrayType('TNodeInitialInputs') || null;\nvar TNodeInitialData = NG_DEV_MODE && createNamedArrayType('TNodeInitialData') || null;\nvar LCleanup = NG_DEV_MODE && createNamedArrayType('LCleanup') || null;\nvar TCleanup = NG_DEV_MODE && createNamedArrayType('TCleanup') || null;\nfunction attachLViewDebug(lView) {\n attachDebugObject(lView, new LViewDebug(lView));\n}\nfunction attachLContainerDebug(lContainer) {\n attachDebugObject(lContainer, new LContainerDebug(lContainer));\n}\nfunction 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\n * (same\n * as `outerHTML`). If `false` then the serialized HTML form will only contain the element\n * itself\n * (will not serialize child elements).\n */\nfunction 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]) + '>';\n }\n }\n else {\n return null;\n }\n}\nvar 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 >> 11 /* IndexWithinInitPhaseShift */,\n };\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"parent\", {\n get: function () {\n return toDebug(this._raw_lView[PARENT]);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"host\", {\n get: function () {\n return toHtml(this._raw_lView[HOST], true);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"html\", {\n get: function () {\n return (this.nodes || []).map(function (node) { return toHtml(node.native, true); }).join('');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"context\", {\n get: function () {\n return this._raw_lView[CONTEXT];\n },\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\n * 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, \"tView\", {\n get: function () {\n return this._raw_lView[TVIEW];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"cleanup\", {\n get: function () {\n return this._raw_lView[CLEANUP];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"injector\", {\n get: function () {\n return this._raw_lView[INJECTOR$1];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"rendererFactory\", {\n get: function () {\n return this._raw_lView[RENDERER_FACTORY];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"renderer\", {\n get: function () {\n return this._raw_lView[RENDERER];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"sanitizer\", {\n get: function () {\n return this._raw_lView[SANITIZER];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"childHead\", {\n get: function () {\n return toDebug(this._raw_lView[CHILD_HEAD]);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"next\", {\n get: function () {\n return toDebug(this._raw_lView[NEXT]);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"childTail\", {\n get: function () {\n return toDebug(this._raw_lView[CHILD_TAIL]);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"declarationView\", {\n get: function () {\n return toDebug(this._raw_lView[DECLARATION_VIEW]);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"queries\", {\n get: function () {\n return this._raw_lView[QUERIES];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"tHost\", {\n get: function () {\n return this._raw_lView[T_HOST];\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.childHead;\n while (child) {\n childViews.push(child);\n child = child.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 */\nfunction toDebugNodes(tNode, lView) {\n if (tNode) {\n var debugNodes = [];\n var tNodeCursor = tNode;\n while (tNodeCursor) {\n debugNodes.push(buildDebugNode(tNodeCursor, lView, tNodeCursor.index));\n tNodeCursor = tNodeCursor.next;\n }\n return debugNodes;\n }\n else {\n return null;\n }\n}\nfunction buildDebugNode(tNode, lView, nodeIndex) {\n var rawValue = lView[nodeIndex];\n var native = unwrapRNode(rawValue);\n var componentLViewDebug = toDebug(readLViewValue(rawValue));\n return {\n html: toHtml(native),\n native: native,\n nodes: toDebugNodes(tNode.child, lView),\n component: componentLViewDebug,\n };\n}\nvar LContainerDebug = /** @class */ (function () {\n function LContainerDebug(_raw_lContainer) {\n this._raw_lContainer = _raw_lContainer;\n }\n Object.defineProperty(LContainerDebug.prototype, \"hasTransplantedViews\", {\n get: function () {\n return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS];\n },\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 () {\n return toDebug(this._raw_lContainer[PARENT]);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"movedViews\", {\n get: function () {\n return this._raw_lContainer[MOVED_VIEWS];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"host\", {\n get: function () {\n return this._raw_lContainer[HOST];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"native\", {\n get: function () {\n return this._raw_lContainer[NATIVE];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"next\", {\n get: function () {\n return toDebug(this._raw_lContainer[NEXT]);\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 */\nfunction 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}\nvar 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 () {\n return getTNode(this._lView[TVIEW], this.nodeIndex);\n },\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 */\nfunction 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) {\n attachDebugObject(icuCase, new I18nMutateOpCodesDebug(icuCase, lView));\n });\n icu.update.forEach(function (icuCase) {\n attachDebugObject(icuCase, new I18nUpdateOpCodesDebug(icuCase, icus, lView));\n });\n });\n }\n}\nvar 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}());\nvar 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,\n attrName: attrName,\n sanitizeFn: sanitizeFn,\n });\n break;\n case 0 /* Text */:\n results.push({\n __raw_opCode: opCode,\n checkBit: checkBit,\n type: 'Text',\n 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\nvar ɵ0$4 = function () { return Promise.resolve(null); };\n/**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\nvar _CLEAN_PROMISE = (ɵ0$4)();\n/**\n * Process the `TView.expandoInstructions`. (Execute the `hostBindings`.)\n *\n * @param tView `TView` containing the `expandoInstructions`\n * @param lView `LView` associated with the `TView`\n */\nfunction setHostBindingsByExecutingExpandoInstructions(tView, lView) {\n ngDevMode && assertSame(tView, lView[TVIEW], '`LView` is not associated with the `TView`!');\n try {\n var expandoInstructions = tView.expandoInstructions;\n if (expandoInstructions !== null) {\n var bindingRootIndex = tView.expandoStartIndex;\n var currentDirectiveIndex = -1;\n var currentElementIndex = -1;\n // TODO(misko): PERF It is possible to get here with `TView.expandoInstructions` containing no\n // functions to execute. This is wasteful as there is no work to be done, but we still need\n // to iterate over the instructions.\n // In example of this is in this test: `host_binding_spec.ts`\n // `fit('should not cause problems if detectChanges is called when a property updates', ...`\n // In the above test we get here with expando [0, 0, 1] which requires a lot of processing but\n // there is no function to execute.\n for (var i = 0; i < expandoInstructions.length; i++) {\n var instruction = 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 // Important: In JS `-x` and `0-x` is not the same! If `x===0` then `-x` will produce\n // `-0` which requires non standard math arithmetic and it can prevent VM optimizations.\n // `0-0` will always produce `0` and will not cause a potential deoptimization in VM.\n // TODO(misko): PERF This should be refactored to use `~instruction` as that does not\n // suffer from `-0` and it is faster/more compact.\n currentElementIndex = 0 - instruction;\n setSelectedIndex(currentElementIndex);\n // Injector block and providers are taken into account.\n var providerCount = 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 }\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 setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex);\n var hostCtx = lView[currentDirectiveIndex];\n instruction(2 /* Update */, hostCtx);\n }\n // TODO(misko): PERF Relying on incrementing the `currentDirectiveIndex` here is\n // sub-optimal. The implications are that if we have a lot of directives but none of them\n // have host bindings we nevertheless need to iterate over the expando instructions to\n // update the counter. It would be much better if we could encode the\n // `currentDirectiveIndex` into the `expandoInstruction` array so that we only need to\n // iterate over those directives which actually have `hostBindings`.\n currentDirectiveIndex++;\n }\n }\n }\n }\n finally {\n setSelectedIndex(-1);\n }\n}\n/** Refreshes all content queries declared by directives in a given view */\nfunction refreshContentQueries(tView, lView) {\n var contentQueries = tView.contentQueries;\n if (contentQueries !== null) {\n for (var i = 0; i < contentQueries.length; i += 2) {\n var queryStartIdx = contentQueries[i];\n var directiveDefIdx = contentQueries[i + 1];\n if (directiveDefIdx !== -1) {\n var directiveDef = tView.data[directiveDefIdx];\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n setCurrentQueryIndex(queryStartIdx);\n directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n}\n/** Refreshes child components in the current view (update mode). */\nfunction refreshChildComponents(hostLView, components) {\n for (var i = 0; i < components.length; i++) {\n refreshComponent(hostLView, components[i]);\n }\n}\n/** Renders child components in the current view (creation mode). */\nfunction renderChildComponents(hostLView, components) {\n for (var i = 0; i < components.length; i++) {\n renderComponent(hostLView, components[i]);\n }\n}\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param name the tag name\n * @param renderer A renderer to use\n * @returns the element created\n */\nfunction elementCreate(name, renderer, namespace) {\n if (isProceduralRenderer(renderer)) {\n return renderer.createElement(name, namespace);\n }\n else {\n return namespace === null ? renderer.createElement(name) :\n renderer.createElementNS(namespace, name);\n }\n}\nfunction createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {\n var lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : 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 &&\n assertEqual(tView.type == 2 /* Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');\n lView[DECLARATION_COMPONENT_VIEW] =\n tView.type == 2 /* Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;\n ngDevMode && attachLViewDebug(lView);\n return lView;\n}\nfunction 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);\n setPreviousOrParentTNode(tNode, true);\n return tNode;\n}\nfunction createTNodeAtIndex(tView, tHostNode, adjustedIndex, type, name, attrs) {\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(tView, tParentNode, type, adjustedIndex, name, attrs);\n // Assign a pointer to the first child node of a given view. The first node is not always the one\n // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has\n // the index 1 or more, so we can't just check node index.\n if (tView.firstChild === null) {\n tView.firstChild = tNode;\n }\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}\nfunction 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(tView, tParentNode, //\n 2 /* View */, index, null, null);\n }\n 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 * @param tView `TView` associated with `LView`\n * @param view The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n */\nfunction allocExpando(tView, lView, numSlotsToAlloc) {\n ngDevMode &&\n assertGreaterThan(numSlotsToAlloc, 0, 'The number of slots to alloc should be greater than 0');\n if (numSlotsToAlloc > 0) {\n if (tView.firstCreatePass) {\n for (var i = 0; i < numSlotsToAlloc; i++) {\n tView.blueprint.push(null);\n tView.data.push(null);\n lView.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//////////////////////////\n//// Render\n//////////////////////////\n/**\n * Processes a view in the creation mode. This includes a number of steps in a specific order:\n * - creating view query functions (if any);\n * - executing a template function in the creation mode;\n * - updating static queries (if any);\n * - creating child components defined in a given view.\n */\nfunction renderView(tView, lView, context) {\n ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n enterView(lView, lView[T_HOST]);\n try {\n var viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(1 /* Create */, viewQuery, context);\n }\n // Execute a template associated with this view, if it exists. A template function might not be\n // defined for the root component views.\n var templateFn = tView.template;\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, 1 /* Create */, context);\n }\n // This needs to be set before children are processed to support recursive components.\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 firstCreatePass. If we don't set it here, instances will perform directive\n // matching, etc again and again.\n if (tView.firstCreatePass) {\n tView.firstCreatePass = false;\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 (tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n // We must materialize query results before child components are processed\n // in case a child component has projected a container. The LContainer needs\n // to exist so the embedded views are properly attached by the container.\n if (tView.staticViewQueries) {\n executeViewQueryFn(2 /* Update */, tView.viewQuery, context);\n }\n // Render child component views.\n var components = tView.components;\n if (components !== null) {\n renderChildComponents(lView, components);\n }\n }\n catch (error) {\n // If we didn't manage to get past the first template pass due to\n // an error, mark the view as corrupted so we can try to recover.\n if (tView.firstCreatePass) {\n tView.incompleteFirstPass = true;\n }\n throw error;\n }\n finally {\n lView[FLAGS] &= ~4 /* CreationMode */;\n leaveView();\n }\n}\n/**\n * Processes a view in update mode. This includes a number of steps in a specific order:\n * - executing a template function in update mode;\n * - executing hooks;\n * - refreshing queries;\n * - setting host bindings;\n * - refreshing child (embedded and component) views.\n */\nfunction refreshView(tView, lView, templateFn, context) {\n ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n var flags = lView[FLAGS];\n if ((flags & 256 /* Destroyed */) === 256 /* Destroyed */)\n return;\n enterView(lView, lView[T_HOST]);\n var checkNoChangesMode = getCheckNoChangesMode();\n try {\n resetPreOrderHookFlags(lView);\n setBindingIndex(tView.bindingStartIndex);\n if (templateFn !== null) {\n executeTemplate(tView, lView, templateFn, 2 /* Update */, context);\n }\n var hooksInitPhaseCompleted = (flags & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */;\n // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!checkNoChangesMode) {\n if (hooksInitPhaseCompleted) {\n var preOrderCheckHooks = tView.preOrderCheckHooks;\n if (preOrderCheckHooks !== null) {\n executeCheckHooks(lView, preOrderCheckHooks, null);\n }\n }\n else {\n var preOrderHooks = tView.preOrderHooks;\n if (preOrderHooks !== null) {\n executeInitAndCheckHooks(lView, preOrderHooks, 0 /* OnInitHooksToBeRun */, null);\n }\n incrementInitPhaseFlags(lView, 0 /* OnInitHooksToBeRun */);\n }\n }\n // First mark transplanted views that are declared in this lView as needing a refresh at their\n // insertion points. This is needed to avoid the situation where the template is defined in this\n // `LView` but its declaration appears after the insertion component.\n markTransplantedViewsForRefresh(lView);\n refreshEmbeddedViews(lView);\n // Content query results must be refreshed before content hooks are called.\n if (tView.contentQueries !== null) {\n refreshContentQueries(tView, lView);\n }\n // execute content hooks (AfterContentInit, AfterContentChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!checkNoChangesMode) {\n if (hooksInitPhaseCompleted) {\n var contentCheckHooks = tView.contentCheckHooks;\n if (contentCheckHooks !== null) {\n executeCheckHooks(lView, contentCheckHooks);\n }\n }\n else {\n var contentHooks = tView.contentHooks;\n if (contentHooks !== null) {\n executeInitAndCheckHooks(lView, contentHooks, 1 /* AfterContentInitHooksToBeRun */);\n }\n incrementInitPhaseFlags(lView, 1 /* AfterContentInitHooksToBeRun */);\n }\n }\n setHostBindingsByExecutingExpandoInstructions(tView, lView);\n // Refresh child component views.\n var components = tView.components;\n if (components !== null) {\n refreshChildComponents(lView, components);\n }\n // View queries must execute after refreshing child components because a template in this view\n // could be inserted in a child component. If the view query executes before child component\n // refresh, the template might not yet be inserted.\n var viewQuery = tView.viewQuery;\n if (viewQuery !== null) {\n executeViewQueryFn(2 /* Update */, viewQuery, context);\n }\n // execute view hooks (AfterViewInit, AfterViewChecked)\n // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n if (!checkNoChangesMode) {\n if (hooksInitPhaseCompleted) {\n var viewCheckHooks = tView.viewCheckHooks;\n if (viewCheckHooks !== null) {\n executeCheckHooks(lView, viewCheckHooks);\n }\n }\n else {\n var viewHooks = tView.viewHooks;\n if (viewHooks !== null) {\n executeInitAndCheckHooks(lView, viewHooks, 2 /* AfterViewInitHooksToBeRun */);\n }\n incrementInitPhaseFlags(lView, 2 /* AfterViewInitHooksToBeRun */);\n }\n }\n if (tView.firstUpdatePass === true) {\n // We need to make sure that we only flip the flag on successful `refreshView` only\n // Don't do this in `finally` block.\n // If we did this in `finally` block then an exception could block the execution of styling\n // instructions which in turn would be unable to insert themselves into the styling linked\n // list. The result of this would be that if the exception would not be throw on subsequent CD\n // the styling would be unable to process it data and reflect to the DOM.\n tView.firstUpdatePass = false;\n }\n // Do not reset the dirty state when running in check no changes mode. We don't want components\n // to behave differently depending on whether check no changes is enabled or not. For example:\n // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to\n // refresh a `NgClass` binding should work. If we would reset the dirty state in the check\n // no changes cycle, the component would be not be dirty for the next update pass. This would\n // be different in production mode where the component dirty state is not reset.\n if (!checkNoChangesMode) {\n lView[FLAGS] &= ~(64 /* Dirty */ | 8 /* FirstLViewPass */);\n }\n if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) {\n lView[FLAGS] &= ~1024 /* RefreshTransplantedView */;\n updateTransplantedViewCount(lView[PARENT], -1);\n }\n }\n finally {\n leaveView();\n }\n}\nfunction renderComponentOrTemplate(tView, lView, templateFn, context) {\n var rendererFactory = lView[RENDERER_FACTORY];\n var normalExecutionPath = !getCheckNoChangesMode();\n var creationModeIsActive = isCreationMode(lView);\n try {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {\n rendererFactory.begin();\n }\n if (creationModeIsActive) {\n renderView(tView, lView, context);\n }\n refreshView(tView, lView, templateFn, context);\n }\n finally {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {\n rendererFactory.end();\n }\n }\n}\nfunction executeTemplate(tView, lView, templateFn, rf, context) {\n var prevSelectedIndex = getSelectedIndex();\n try {\n setSelectedIndex(-1);\n if (rf & 2 /* Update */ && lView.length > HEADER_OFFSET) {\n // When we're updating, inherently select 0 so we don't\n // have to generate that instruction for most update blocks.\n selectIndexInternal(tView, lView, 0, getCheckNoChangesMode());\n }\n templateFn(rf, context);\n }\n finally {\n setSelectedIndex(prevSelectedIndex);\n }\n}\n//////////////////////////\n//// Element\n//////////////////////////\nfunction 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.\n */\nfunction createDirectivesInstances(tView, lView, tNode) {\n if (!getBindingsEnabled())\n return;\n instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));\n if ((tNode.flags & 128 /* hasHostBindings */) === 128 /* hasHostBindings */) {\n invokeDirectivesHostBindings(tView, lView, tNode);\n }\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 */\nfunction saveResolvedLocalsInData(viewData, tNode, localRefExtractor) {\n if (localRefExtractor === void 0) { localRefExtractor = getNativeByTNode; }\n var localNames = tNode.localNames;\n if (localNames !== null) {\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 */\nfunction getOrCreateTComponentView(def) {\n var tView = def.tView;\n // Create a TView if there isn't one, or recreate it if the first create pass didn't\n // complete successfuly since we can't know for sure whether it's in a usable shape.\n if (tView === null || tView.incompleteFirstPass) {\n return def.tView = createTView(1 /* Component */, -1, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts);\n }\n return tView;\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 decls 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 * @param consts Constants for this view\n */\nfunction createTView(type, viewIndex, templateFn, decls, vars, directives, pipes, viewQuery, schemas, consts) {\n ngDevMode && ngDevMode.tView++;\n var bindingStartIndex = HEADER_OFFSET + decls;\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(type, viewIndex, // id: number,\n blueprint, // blueprint: LView,\n templateFn, // template: ComponentTemplate<{}>|null,\n null, // queries: TQueries|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, // expandoStartIndex: number,\n null, // expandoInstructions: ExpandoInstructions|null,\n true, // firstCreatePass: boolean,\n true, // firstUpdatePass: 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: DestroyHookData|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, // schemas: SchemaMetadata[]|null,\n consts, // consts: TConstants|null\n false // incompleteFirstPass: boolean\n ) :\n {\n type: type,\n id: viewIndex,\n blueprint: blueprint,\n template: templateFn,\n queries: null,\n viewQuery: viewQuery,\n node: null,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n expandoStartIndex: initialViewLength,\n expandoInstructions: null,\n firstCreatePass: true,\n firstUpdatePass: 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 consts: consts,\n incompleteFirstPass: false\n };\n}\nfunction createViewBlueprint(bindingStartIndex, initialViewLength) {\n var blueprint = ngDevMode ? new LViewBlueprint() : [];\n for (var i = 0; i < initialViewLength; i++) {\n blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n }\n return blueprint;\n}\nfunction createError(text, token) {\n return new Error(\"Renderer: \" + text + \" [\" + stringifyForError(token) + \"]\");\n}\nfunction assertHostNodeExists(rElement, elementOrSelector) {\n if (!rElement) {\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}\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param rendererFactory Factory function to create renderer instance.\n * @param elementOrSelector Render element or CSS selector to locate the element.\n * @param encapsulation View Encapsulation defined for component that requests host element.\n */\nfunction locateHostElement(renderer, elementOrSelector, encapsulation) {\n if (isProceduralRenderer(renderer)) {\n // When using native Shadow DOM, do not clear host element to allow native slot projection\n var preserveContent = encapsulation === ViewEncapsulation$1.ShadowDom;\n return renderer.selectRootElement(elementOrSelector, preserveContent);\n }\n var rElement = typeof elementOrSelector === 'string' ?\n renderer.querySelector(elementOrSelector) :\n elementOrSelector;\n ngDevMode && assertHostNodeExists(rElement, elementOrSelector);\n // Always clear host element's content when Renderer3 is in use. For procedural renderer case we\n // make it depend on whether ShadowDom encapsulation is used (in which case the content should be\n // preserved to allow native slot projection). ShadowDom encapsulation requires procedural\n // renderer, and procedural renderer case is handled above.\n rElement.textContent = '';\n return rElement;\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 */\nfunction storeCleanupWithContext(tView, lView, context, cleanupFn) {\n var lCleanup = getLCleanup(lView);\n lCleanup.push(context);\n if (tView.firstCreatePass) {\n getTViewCleanup(tView).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 */\nfunction storeCleanupFn(tView, lView, cleanupFn) {\n getLCleanup(lView).push(cleanupFn);\n if (tView.firstCreatePass) {\n getTViewCleanup(tView).push(lView[CLEANUP].length - 1, null);\n }\n}\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param tView `TView` to which this `TNode` belongs (used only in `ngDevMode`)\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 */\nfunction createTNode(tView, tParent, type, adjustedIndex, tagName, attrs) {\n ngDevMode && ngDevMode.tNode++;\n var injectorIndex = tParent ? tParent.injectorIndex : -1;\n return ngDevMode ? new TNodeDebug(tView, // tView_: TView\n type, // type: TNodeType\n adjustedIndex, // index: number\n injectorIndex, // injectorIndex: number\n -1, // directiveStart: number\n -1, // directiveEnd: number\n -1, // directiveStylingLast: number\n null, // propertyBindings: number[]|null\n 0, // flags: TNodeFlags\n 0, // providerIndexes: TNodeProviderIndexes\n tagName, // tagName: string|null\n attrs, // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null\n null, // mergedAttrs\n null, // localNames: (string|number)[]|null\n undefined, // initialInputs: (string[]|null)[]|null|undefined\n null, // inputs: PropertyAliases|null\n null, // outputs: PropertyAliases|null\n null, // tViews: ITView|ITView[]|null\n null, // next: ITNode|null\n null, // projectionNext: ITNode|null\n null, // child: ITNode|null\n tParent, // parent: TElementNode|TContainerNode|null\n null, // projection: number|(ITNode|RNode[])[]|null\n null, // styles: string|null\n null, // stylesWithoutHost: string|null\n undefined, // residualStyles: string|null\n null, // classes: string|null\n null, // classesWithoutHost: string|null\n undefined, // residualClasses: string|null\n 0, // classBindings: TStylingRange;\n 0) :\n {\n type: type,\n index: adjustedIndex,\n injectorIndex: injectorIndex,\n directiveStart: -1,\n directiveEnd: -1,\n directiveStylingLast: -1,\n propertyBindings: null,\n flags: 0,\n providerIndexes: 0,\n tagName: tagName,\n attrs: attrs,\n mergedAttrs: null,\n localNames: null,\n initialInputs: undefined,\n inputs: null,\n outputs: null,\n tViews: null,\n next: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n projection: null,\n styles: null,\n stylesWithoutHost: null,\n residualStyles: undefined,\n classes: null,\n classesWithoutHost: null,\n residualClasses: undefined,\n classBindings: 0,\n styleBindings: 0,\n };\n}\nfunction generatePropertyAliases(inputAliasMap, directiveDefIdx, propStore) {\n for (var publicName in inputAliasMap) {\n if (inputAliasMap.hasOwnProperty(publicName)) {\n propStore = propStore === null ? {} : propStore;\n var internalName = inputAliasMap[publicName];\n if (propStore.hasOwnProperty(publicName)) {\n propStore[publicName].push(directiveDefIdx, internalName);\n }\n else {\n (propStore[publicName] = [directiveDefIdx, internalName]);\n }\n }\n }\n return propStore;\n}\n/**\n * Initializes data structures required to work with directive outputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\nfunction initializeInputAndOutputAliases(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n var start = tNode.directiveStart;\n var end = tNode.directiveEnd;\n var defs = tView.data;\n var tNodeAttrs = tNode.attrs;\n var inputsFromAttrs = ngDevMode ? new TNodeInitialInputs() : [];\n var inputsStore = null;\n var outputsStore = null;\n for (var i = start; i < end; i++) {\n var directiveDef = defs[i];\n var directiveInputs = directiveDef.inputs;\n // Do not use unbound attributes as inputs to structural directives, since structural\n // directive inputs can only be set using microsyntax (e.g. `<div *dir=\"exp\">`).\n // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which\n // should be set for inline templates.\n var initialInputs = (tNodeAttrs !== null && !isInlineTemplate(tNode)) ?\n generateInitialInputs(directiveInputs, tNodeAttrs) :\n null;\n inputsFromAttrs.push(initialInputs);\n inputsStore = generatePropertyAliases(directiveInputs, i, inputsStore);\n outputsStore = generatePropertyAliases(directiveDef.outputs, i, outputsStore);\n }\n if (inputsStore !== null) {\n if (inputsStore.hasOwnProperty('class')) {\n tNode.flags |= 16 /* hasClassInput */;\n }\n if (inputsStore.hasOwnProperty('style')) {\n tNode.flags |= 32 /* hasStyleInput */;\n }\n }\n tNode.initialInputs = inputsFromAttrs;\n tNode.inputs = inputsStore;\n tNode.outputs = outputsStore;\n}\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n *\n * Performance note: this function is written as a series of if checks (instead of, say, a property\n * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of\n * mapping property names. Do NOT change without benchmarking.\n *\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 */\nfunction mapPropName(name) {\n if (name === 'class')\n return 'className';\n if (name === 'for')\n return 'htmlFor';\n if (name === 'formaction')\n return 'formAction';\n if (name === 'innerHtml')\n return 'innerHTML';\n if (name === 'readonly')\n return 'readOnly';\n if (name === 'tabindex')\n return 'tabIndex';\n return name;\n}\nfunction elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n var element = getNativeByTNode(tNode, lView);\n var inputData = tNode.inputs;\n var dataValue;\n if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {\n setInputsForProperty(tView, lView, dataValue, propName, value);\n if (isComponentHost(tNode))\n markDirtyIfOnPush(lView, tNode.index);\n if (ngDevMode) {\n setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n }\n }\n else if (tNode.type === 3 /* Element */) {\n propName = mapPropName(propName);\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n if (!validateProperty(tView, lView, element, propName, tNode)) {\n // Return here since we only log warnings for unknown properties.\n warnAboutUnknownProperty(propName, tNode);\n return;\n }\n ngDevMode.rendererSetProperty++;\n }\n // It is assumed that the sanitizer is only added when the compiler determines that the\n // property 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(tView, lView, tNode.tagName)) {\n warnAboutUnknownProperty(propName, tNode);\n }\n }\n}\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(lView, viewIndex) {\n ngDevMode && assertLView(lView);\n var childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & 16 /* CheckAlways */)) {\n childComponentLView[FLAGS] |= 64 /* Dirty */;\n }\n}\nfunction 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}\nfunction setNgReflectProperties(lView, element, type, dataValue, value) {\n if (type === 3 /* Element */ || 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: privateName\n *\n * e.g. [0, 'change', 'change-minified']\n * we want to set the reflected property with the privateName: dataValue[i+1]\n */\n for (var i = 0; i < dataValue.length; i += 2) {\n setNgReflectProperty(lView, element, type, dataValue[i + 1], value);\n }\n }\n}\nfunction validateProperty(tView, lView, element, propName, tNode) {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (tView.schemas === null)\n return true;\n // The property is considered valid if the element matches the schema, it exists on the element\n // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).\n if (matchingSchemas(tView, lView, tNode.tagName) || propName in element ||\n isAnimationProp(propName)) {\n return true;\n }\n // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we\n // need to account for both here, while being careful for `typeof null` also returning 'object'.\n return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\nfunction matchingSchemas(tView, lView, tagName) {\n var schemas = 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 * Logs a warning that a property is not supported on an element.\n * @param propName Name of the invalid property.\n * @param tNode Node on which we encountered the property.\n */\nfunction warnAboutUnknownProperty(propName, tNode) {\n console.warn(\"Can't bind to '\" + propName + \"' since it isn't a known property of '\" + tNode.tagName + \"'.\");\n}\n/**\n * Instantiate a root component.\n */\nfunction instantiateRootComponent(tView, lView, def) {\n var rootTNode = getPreviousOrParentTNode();\n if (tView.firstCreatePass) {\n if (def.providersResolver)\n def.providersResolver(def);\n generateExpandoInstructionBlock(tView, rootTNode, 1);\n baseResolveDirective(tView, lView, def);\n }\n var directive = getNodeInjectable(lView, tView, lView.length - 1, rootTNode);\n attachPatchData(directive, lView);\n var native = getNativeByTNode(rootTNode, lView);\n if (native) {\n attachPatchData(native, lView);\n }\n return directive;\n}\n/**\n * Resolve the matched directives on a node.\n */\nfunction resolveDirectives(tView, lView, tNode, localRefs) {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n // tsickle.\n ngDevMode && assertFirstCreatePass(tView);\n var hasDirectives = false;\n if (getBindingsEnabled()) {\n var directiveDefs = findDirectiveDefMatches(tView, lView, tNode);\n var exportsMap = localRefs === null ? null : { '': -1 };\n if (directiveDefs !== null) {\n var totalDirectiveHostVars = 0;\n hasDirectives = true;\n initTNodeFlags(tNode, tView.data.length, directiveDefs.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 < directiveDefs.length; i++) {\n var def = directiveDefs[i];\n if (def.providersResolver)\n def.providersResolver(def);\n }\n generateExpandoInstructionBlock(tView, tNode, directiveDefs.length);\n var preOrderHooksFound = false;\n var preOrderCheckHooksFound = false;\n for (var i = 0; i < directiveDefs.length; i++) {\n var def = directiveDefs[i];\n // Merge the attrs in the order of matches. This assumes that the first directive is the\n // component itself, so that the component has the least priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n baseResolveDirective(tView, lView, def);\n saveNameToExportMap(tView.data.length - 1, def, exportsMap);\n if (def.contentQueries !== null)\n tNode.flags |= 8 /* hasContentQuery */;\n if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n tNode.flags |= 128 /* hasHostBindings */;\n // Only push a node index into the preOrderHooks array if this is the first\n // pre-order hook found on this node.\n if (!preOrderHooksFound && (def.onChanges || def.onInit || def.doCheck)) {\n // We will push the actual hook function into this array later during dir instantiation.\n // We cannot do it now because we must ensure hooks are registered in the same\n // order that directives are created (i.e. injection order).\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index - HEADER_OFFSET);\n preOrderHooksFound = true;\n }\n if (!preOrderCheckHooksFound && (def.onChanges || def.doCheck)) {\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = []))\n .push(tNode.index - HEADER_OFFSET);\n preOrderCheckHooksFound = true;\n }\n addHostBindingsToExpandoInstructions(tView, def);\n totalDirectiveHostVars += def.hostVars;\n }\n initializeInputAndOutputAliases(tView, tNode);\n growHostVarsSpace(tView, lView, totalDirectiveHostVars);\n }\n if (exportsMap)\n cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n }\n // Merge the template attrs last so that they have the highest priority.\n tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n return hasDirectives;\n}\n/**\n * Add `hostBindings` to the `TView.expandoInstructions`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\nfunction addHostBindingsToExpandoInstructions(tView, def) {\n ngDevMode && assertFirstCreatePass(tView);\n var expando = tView.expandoInstructions;\n // TODO(misko): PERF we are adding `hostBindings` even if there is nothing to add! This is\n // suboptimal for performance. `def.hostBindings` may be null,\n // but we still need to push null to the array as a placeholder\n // to ensure the directive counter is incremented (so host\n // binding functions always line up with the corrective directive).\n // This is suboptimal for performance. See `currentDirectiveIndex`\n // comment in `setHostBindingsByExecutingExpandoInstructions` for more\n // details. expando.push(def.hostBindings);\n expando.push(def.hostBindings);\n var hostVars = def.hostVars;\n if (hostVars !== 0) {\n expando.push(def.hostVars);\n }\n}\n/**\n * Grow the `LView`, blueprint and `TView.data` to accommodate the `hostBindings`.\n *\n * To support locality we don't know ahead of time how many `hostVars` of the containing directives\n * we need to allocate. For this reason we allow growing these data structures as we discover more\n * directives to accommodate them.\n *\n * @param tView `TView` which needs to be grown.\n * @param lView `LView` which needs to be grown.\n * @param count Size by which we need to grow the data structures.\n */\nfunction growHostVarsSpace(tView, lView, count) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n for (var i = 0; i < count; i++) {\n lView.push(NO_CHANGE);\n tView.blueprint.push(NO_CHANGE);\n tView.data.push(null);\n }\n}\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(tView, lView, tNode, native) {\n var start = tNode.directiveStart;\n var end = tNode.directiveEnd;\n if (!tView.firstCreatePass) {\n getOrCreateNodeInjectorForNode(tNode, lView);\n }\n attachPatchData(native, lView);\n var initialInputs = tNode.initialInputs;\n for (var i = start; i < end; i++) {\n var def = tView.data[i];\n var isComponent = isComponentDef(def);\n if (isComponent) {\n ngDevMode && assertNodeOfPossibleTypes(tNode, 3 /* Element */);\n addComponentLogic(lView, tNode, def);\n }\n var directive = getNodeInjectable(lView, tView, i, tNode);\n attachPatchData(directive, lView);\n if (initialInputs !== null) {\n setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);\n }\n if (isComponent) {\n var componentView = getComponentLViewByIndex(tNode.index, lView);\n componentView[CONTEXT] = directive;\n }\n }\n}\nfunction invokeDirectivesHostBindings(tView, lView, tNode) {\n var start = tNode.directiveStart;\n var end = tNode.directiveEnd;\n var expando = tView.expandoInstructions;\n var firstCreatePass = tView.firstCreatePass;\n var elementIndex = tNode.index - HEADER_OFFSET;\n var currentDirectiveIndex = getCurrentDirectiveIndex();\n try {\n setSelectedIndex(elementIndex);\n for (var dirIndex = start; dirIndex < end; dirIndex++) {\n var def = tView.data[dirIndex];\n var directive = lView[dirIndex];\n setCurrentDirectiveIndex(dirIndex);\n if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n invokeHostBindingsInCreationMode(def, directive);\n }\n else if (firstCreatePass) {\n expando.push(null);\n }\n }\n }\n finally {\n setSelectedIndex(-1);\n setCurrentDirectiveIndex(currentDirectiveIndex);\n }\n}\n/**\n * Invoke the host bindings in creation mode.\n *\n * @param def `DirectiveDef` which may contain the `hostBindings` function.\n * @param directive Instance of directive.\n */\nfunction invokeHostBindingsInCreationMode(def, directive) {\n if (def.hostBindings !== null) {\n def.hostBindings(1 /* Create */, directive);\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 */\nfunction generateExpandoInstructionBlock(tView, tNode, directiveCount) {\n ngDevMode &&\n assertEqual(tView.firstCreatePass, true, 'Expando block should only be generated on first create pass.');\n // Important: In JS `-x` and `0-x` is not the same! If `x===0` then `-x` will produce `-0` which\n // requires non standard math arithmetic and it can prevent VM optimizations.\n // `0-0` will always produce `0` and will not cause a potential deoptimization in VM.\n var elementIndex = HEADER_OFFSET - tNode.index;\n var providerStartIndex = tNode.providerIndexes & 65535 /* ProvidersStartIndexMask */;\n var providerCount = tView.data.length - providerStartIndex;\n (tView.expandoInstructions || (tView.expandoInstructions = []))\n .push(elementIndex, providerCount, directiveCount);\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 */\nfunction findDirectiveDefMatches(tView, viewData, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode &&\n assertNodeOfPossibleTypes(tNode, 3 /* Element */, 4 /* ElementContainer */, 0 /* Container */);\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(tNode, viewData), tView, def.type);\n if (isComponentDef(def)) {\n if (tNode.flags & 2 /* isComponentHost */)\n throwMultipleComponentError(tNode);\n markAsComponentHost(tView, tNode);\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/**\n * Marks a given TNode as a component's host. This consists of:\n * - setting appropriate TNode flags;\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\nfunction markAsComponentHost(tView, hostTNode) {\n ngDevMode && assertFirstCreatePass(tView);\n hostTNode.flags |= 2 /* isComponentHost */;\n (tView.components || (tView.components = ngDevMode ? new TViewComponents() : []))\n .push(hostTNode.index);\n}\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n if (localRefs) {\n var localNames = tNode.localNames = 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 */\nfunction 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 (isComponentDef(def))\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 */\nfunction initTNodeFlags(tNode, index, numberOfDirectives) {\n ngDevMode &&\n assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives');\n tNode.flags |= 1 /* isDirectiveHost */;\n // When the first directive is created on a node, save the index\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n}\nfunction baseResolveDirective(tView, viewData, def) {\n tView.data.push(def);\n var directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true));\n var nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);\n tView.blueprint.push(nodeInjectorFactory);\n viewData.push(nodeInjectorFactory);\n}\nfunction addComponentLogic(lView, hostTNode, def) {\n var native = getNativeByTNode(hostTNode, lView);\n var tView = getOrCreateTComponentView(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 */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def)));\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[hostTNode.index] = componentView;\n}\nfunction elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n ngDevMode && validateAgainstEventAttributes(name);\n var element = getNativeByTNode(tNode, 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 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 lView Current LView that is being processed.\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 */\nfunction setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) {\n var initialInputs = initialInputData[directiveIndex];\n if (initialInputs !== null) {\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 !== null) {\n def.setInput(instance, value, publicName, privateName);\n }\n else {\n instance[privateName] = value;\n }\n if (ngDevMode) {\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 inputs The list of inputs from the directive def\n * @param attrs The static attrs on this node\n */\nfunction generateInitialInputs(inputs, attrs) {\n var inputsToStore = null;\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 if (inputs.hasOwnProperty(attrName)) {\n if (inputsToStore === null)\n inputsToStore = [];\n inputsToStore.push(attrName, inputs[attrName], attrs[i + 1]);\n }\n i += 2;\n }\n return inputsToStore;\n}\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n// Not sure why I need to do `any` here but TS complains later.\nvar LContainerArray = ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) &&\n 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 */\nfunction createLContainer(hostNative, currentView, native, tNode) {\n ngDevMode && assertLView(currentView);\n ngDevMode && !isProceduralRenderer(currentView[RENDERER]) && assertDomNode(native);\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 false, // has transplanted views\n currentView, // parent\n null, // next\n 0, // transplanted views to refresh count\n tNode, // t_host\n native, // native,\n null, // view refs\n null);\n ngDevMode &&\n assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');\n ngDevMode && attachLContainerDebug(lContainer);\n return lContainer;\n}\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\nfunction refreshEmbeddedViews(lView) {\n for (var lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n var embeddedLView = lContainer[i];\n var embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n if (viewAttachedToChangeDetector(embeddedLView)) {\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n }\n }\n }\n}\n/**\n * Mark transplanted views as needing to be refreshed at their insertion points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\nfunction markTransplantedViewsForRefresh(lView) {\n for (var lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n if (!lContainer[HAS_TRANSPLANTED_VIEWS])\n continue;\n var movedViews = lContainer[MOVED_VIEWS];\n ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n for (var i = 0; i < movedViews.length; i++) {\n var movedLView = movedViews[i];\n var insertionLContainer = movedLView[PARENT];\n ngDevMode && assertLContainer(insertionLContainer);\n // We don't want to increment the counter if the moved LView was already marked for\n // refresh.\n if ((movedLView[FLAGS] & 1024 /* RefreshTransplantedView */) === 0) {\n updateTransplantedViewCount(insertionLContainer, 1);\n }\n // Note, it is possible that the `movedViews` is tracking views that are transplanted *and*\n // those that aren't (declaration component === insertion component). In the latter case,\n // it's fine to add the flag, as we will clear it immediately in\n // `refreshEmbeddedViews` for the view currently being refreshed.\n movedLView[FLAGS] |= 1024 /* RefreshTransplantedView */;\n }\n }\n}\n/////////////\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param componentHostIdx Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nfunction refreshComponent(hostLView, componentHostIdx) {\n ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n var componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView)) {\n var tView = componentView[TVIEW];\n if (componentView[FLAGS] & (16 /* CheckAlways */ | 64 /* Dirty */)) {\n refreshView(tView, componentView, tView.template, componentView[CONTEXT]);\n }\n else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n refreshContainsDirtyView(componentView);\n }\n }\n}\n/**\n * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are\n * children or descendants of the given lView.\n *\n * @param lView The lView which contains descendant transplanted views that need to be refreshed.\n */\nfunction refreshContainsDirtyView(lView) {\n for (var lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n var embeddedLView = lContainer[i];\n if (embeddedLView[FLAGS] & 1024 /* RefreshTransplantedView */) {\n var embeddedTView = embeddedLView[TVIEW];\n ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n }\n else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(embeddedLView);\n }\n }\n }\n var tView = lView[TVIEW];\n // Refresh child component views.\n var components = tView.components;\n if (components !== null) {\n for (var i = 0; i < components.length; i++) {\n var componentView = getComponentLViewByIndex(components[i], lView);\n // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n if (viewAttachedToChangeDetector(componentView) &&\n componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n refreshContainsDirtyView(componentView);\n }\n }\n }\n}\nfunction renderComponent(hostLView, componentHostIdx) {\n ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n var componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n var componentTView = componentView[TVIEW];\n syncViewWithBlueprint(componentTView, componentView);\n renderView(componentTView, componentView, componentView[CONTEXT]);\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 tView The `TView` that contains the blueprint for syncing\n * @param lView The view to sync\n */\nfunction syncViewWithBlueprint(tView, lView) {\n for (var i = lView.length; i < tView.blueprint.length; i++) {\n lView.push(tView.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 */\nfunction addToViewTree(lView, lViewOrLContainer) {\n // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of order, the change detection will run out of order, as the act of retrieving the the\n // LContainer 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 */\nfunction 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 */\nfunction 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}\nfunction tickRootContext(rootContext) {\n for (var i = 0; i < rootContext.components.length; i++) {\n var rootComponent = rootContext.components[i];\n var lView = readPatchedLView(rootComponent);\n var tView = lView[TVIEW];\n renderComponentOrTemplate(tView, lView, tView.template, rootComponent);\n }\n}\nfunction detectChangesInternal(tView, lView, context) {\n var rendererFactory = lView[RENDERER_FACTORY];\n if (rendererFactory.begin)\n rendererFactory.begin();\n try {\n refreshView(tView, lView, tView.template, context);\n }\n catch (error) {\n handleError(lView, 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 */\nfunction detectChangesInRootView(lView) {\n tickRootContext(lView[CONTEXT]);\n}\nfunction checkNoChangesInternal(tView, view, context) {\n setCheckNoChangesMode(true);\n try {\n detectChangesInternal(tView, 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 */\nfunction checkNoChangesInRootView(lView) {\n setCheckNoChangesMode(true);\n try {\n detectChangesInRootView(lView);\n }\n finally {\n setCheckNoChangesMode(false);\n }\n}\nfunction executeViewQueryFn(flags, viewQueryFn, component) {\n ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n setCurrentQueryIndex(0);\n viewQueryFn(flags, component);\n}\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n/**\n * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.\n *\n * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:\n * - a bound property name;\n * - a static parts of interpolated strings;\n *\n * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a\n * property binding metadata will be stored in `TView.data` at the same index as a bound value in\n * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the\n * following format:\n * - `propertyName` for bound properties;\n * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for\n * interpolated properties.\n *\n * @param tData `TData` where meta-data will be saved;\n * @param tNode `TNode` that is a target of the binding;\n * @param propertyName bound property name;\n * @param bindingIndex binding index in `LView`\n * @param interpolationParts static interpolation parts (for property interpolations)\n */\nfunction storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex) {\n var interpolationParts = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n interpolationParts[_i - 4] = arguments[_i];\n }\n // Binding meta-data are stored only the first time a given property instruction is processed.\n // Since we don't have a concept of the \"first update pass\" we need to check for presence of the\n // binding meta-data to decide if one should be stored (or if was stored already).\n if (tData[bindingIndex] === null) {\n if (tNode.inputs == null || !tNode.inputs[propertyName]) {\n var propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n propBindingIdxs.push(bindingIndex);\n var bindingMetadata = propertyName;\n if (interpolationParts.length > 0) {\n bindingMetadata +=\n INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n }\n tData[bindingIndex] = bindingMetadata;\n }\n }\n}\nvar CLEAN_PROMISE = _CLEAN_PROMISE;\nfunction getLCleanup(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}\nfunction getTViewCleanup(tView) {\n return tView.cleanup || (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 */\nfunction loadComponentRenderer(currentDef, tNode, lView) {\n // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root\n // component (see packages/core/src/render3/component.ts). This is not consistent with the process\n // of creating inner components, when current directive index is available in the state. In order\n // to avoid relying on current def being `null` (thus special-casing root component creation), the\n // process of creating root component should be unified with the process of creating inner\n // components.\n if (currentDef === null || isComponentDef(currentDef)) {\n lView = unwrapLView(lView[tNode.index]);\n }\n return lView[RENDERER];\n}\n/** Handles an error thrown in an LView. */\nfunction 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 tView The current TView\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 */\nfunction setInputsForProperty(tView, lView, inputs, publicName, value) {\n for (var i = 0; i < inputs.length;) {\n var index = inputs[i++];\n var privateName = inputs[i++];\n var instance = lView[index];\n ngDevMode && assertDataInRange(lView, index);\n var def = tView.data[index];\n if (def.setInput !== null) {\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 */\nfunction 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 */\nvar unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$2 + unusedValueExportToPlacateAjd;\nfunction 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 */\nfunction 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 */\nfunction applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {\n // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n // won't be created until i18nApply() in the update block, so this node should be skipped.\n // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n // in `i18n_spec.ts`.\n if (lNodeToHandle != null) {\n var lContainer = void 0;\n var isComponent = false;\n // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n // wrapped 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 && !isProceduralRenderer(renderer) && assertDomNode(rNode);\n if (action === 0 /* Create */ && parent !== null) {\n if (beforeNode == null) {\n nativeAppendChild(renderer, parent, rNode);\n }\n else {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null);\n }\n }\n else if (action === 1 /* Insert */ && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null);\n }\n else if (action === 2 /* Detach */) {\n nativeRemoveNode(renderer, rNode, isComponent);\n }\n else if (action === 3 /* Destroy */) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n renderer.destroyNode(rNode);\n }\n if (lContainer != null) {\n applyContainer(renderer, action, lContainer, parent, beforeNode);\n }\n }\n}\nfunction createTextNode(value, renderer) {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && ngDevMode.rendererSetText++;\n return isProceduralRenderer(renderer) ? renderer.createText(value) :\n renderer.createTextNode(value);\n}\nfunction addRemoveViewFromContainer(tView, lView, insertMode, beforeNode) {\n var renderParent = getContainerRenderParent(tView.node, lView);\n ngDevMode && assertNodeType(tView.node, 2 /* View */);\n if (renderParent) {\n var renderer = lView[RENDERER];\n var action = insertMode ? 1 /* Insert */ : 2 /* Detach */;\n applyView(tView, lView, renderer, action, renderParent, beforeNode);\n }\n}\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\nfunction renderDetachView(tView, lView) {\n applyView(tView, lView, lView[RENDERER], 2 /* Detach */, 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 */\nfunction 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[TVIEW], 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 isLView(lViewOrLContainer) && cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n lViewOrLContainer = getParentState(lViewOrLContainer, rootView);\n }\n if (lViewOrLContainer === null)\n lViewOrLContainer = rootView;\n isLView(lViewOrLContainer) && cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\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 tView The `TView' of the `LView` to insert\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 */\nfunction insertView(tView, 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 addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n }\n else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n lView[PARENT] = lContainer;\n // track views where declaration and insertion points are different\n var declarationLContainer = lView[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n trackMovedView(declarationLContainer, lView);\n }\n // notify query that a new view has been added\n var lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.insertView(tView);\n }\n // Sets the attached flag\n lView[FLAGS] |= 128 /* Attached */;\n}\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\nfunction trackMovedView(declarationContainer, lView) {\n ngDevMode && assertDefined(lView, 'LView required');\n ngDevMode && assertLContainer(declarationContainer);\n var movedViews = declarationContainer[MOVED_VIEWS];\n var insertedLContainer = lView[PARENT];\n ngDevMode && assertLContainer(insertedLContainer);\n var insertedComponentLView = insertedLContainer[PARENT][DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n var declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n if (declaredComponentLView !== insertedComponentLView) {\n // At this point the declaration-component is not same as insertion-component; this means that\n // this is a transplanted view. Mark the declared lView as having transplanted views so that\n // those views can participate in CD.\n declarationContainer[HAS_TRANSPLANTED_VIEWS] = true;\n }\n if (movedViews === null) {\n declarationContainer[MOVED_VIEWS] = [lView];\n }\n else {\n movedViews.push(lView);\n }\n}\nfunction detachMovedView(declarationContainer, lView) {\n ngDevMode && assertLContainer(declarationContainer);\n ngDevMode &&\n assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection');\n var movedViews = declarationContainer[MOVED_VIEWS];\n var declarationViewIndex = movedViews.indexOf(lView);\n var insertionLContainer = lView[PARENT];\n ngDevMode && assertLContainer(insertionLContainer);\n // If the view was marked for refresh but then detached before it was checked (where the flag\n // would be cleared and the counter decremented), we need to decrement the view counter here\n // instead.\n if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) {\n updateTransplantedViewCount(insertionLContainer, -1);\n }\n movedViews.splice(declarationViewIndex, 1);\n}\n/**\n * Detaches a view from a container.\n *\n * This method removes 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 */\nfunction 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 var declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n detachMovedView(declarationLContainer, viewToDetach);\n }\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];\n }\n var removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n addRemoveViewFromContainer(viewToDetach[TVIEW], viewToDetach, false, null);\n // notify query that a view has been removed\n var lQueries = removedLView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(removedLView[TVIEW]);\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 */\nfunction removeView(lContainer, removeIndex) {\n var detachedView = detachView(lContainer, removeIndex);\n detachedView && destroyLView(detachedView[TVIEW], detachedView);\n}\n/**\n * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\nfunction destroyLView(tView, lView) {\n if (!(lView[FLAGS] & 256 /* Destroyed */)) {\n var renderer = lView[RENDERER];\n if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n applyView(tView, lView, renderer, 3 /* Destroy */, 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 */\nfunction 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 tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\nfunction cleanUpView(tView, lView) {\n if (!(lView[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 lView[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 lView[FLAGS] |= 256 /* Destroyed */;\n executeOnDestroys(tView, lView);\n removeListeners(tView, lView);\n var hostTNode = lView[T_HOST];\n // For component views only, the local renderer is destroyed as clean up time.\n if (hostTNode && hostTNode.type === 3 /* Element */ &&\n isProceduralRenderer(lView[RENDERER])) {\n ngDevMode && ngDevMode.rendererDestroy++;\n lView[RENDERER].destroy();\n }\n var declarationContainer = lView[DECLARATION_LCONTAINER];\n // we are dealing with an embedded view that is still inserted into a container\n if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n // and this is a projected view\n if (declarationContainer !== lView[PARENT]) {\n detachMovedView(declarationContainer, lView);\n }\n // For embedded views still attached to a container: remove query result from this view.\n var lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(tView);\n }\n }\n }\n}\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction removeListeners(tView, lView) {\n var tCleanup = 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 */\nfunction executeOnDestroys(tView, lView) {\n var destroyHooks;\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (var i = 0; i < destroyHooks.length; i += 2) {\n var context = lView[destroyHooks[i]];\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n var toCall = destroyHooks[i + 1];\n if (Array.isArray(toCall)) {\n for (var j = 0; j < toCall.length; j += 2) {\n toCall[j + 1].call(context[toCall[j]]);\n }\n }\n else {\n toCall.call(context);\n }\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 */\nfunction getRenderParent(tView, tNode, currentView) {\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 parentTNode = tNode.parent;\n while (parentTNode != null &&\n (parentTNode.type === 4 /* ElementContainer */ ||\n parentTNode.type === 5 /* IcuContainer */)) {\n tNode = parentTNode;\n parentTNode = tNode.parent;\n }\n // If the parent tNode is null, then we are inserting across views: either into an embedded view\n // or a component view.\n if (parentTNode == 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 ngDevMode && assertNodeOfPossibleTypes(hostTNode, 3 /* Element */);\n return currentView[HOST];\n }\n }\n else {\n var isIcuCase = tNode && tNode.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 it's direct parent node is the renderer.\n if (isIcuCase && tNode.flags & 4 /* isProjected */) {\n return getNativeByTNode(tNode, currentView).parentNode;\n }\n ngDevMode && assertNodeType(parentTNode, 3 /* Element */);\n if (parentTNode.flags & 2 /* isComponentHost */) {\n var tData = tView.data;\n var tNode_1 = tData[parentTNode.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 !== ViewEncapsulation$1.ShadowDom &&\n encapsulation !== ViewEncapsulation$1.Native) {\n return null;\n }\n }\n return getNativeByTNode(parentTNode, currentView);\n }\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 */\nfunction 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}\nfunction nativeAppendChild(renderer, parent, child) {\n ngDevMode && ngDevMode.rendererAppendChild++;\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n if (isProceduralRenderer(renderer)) {\n renderer.appendChild(parent, child);\n }\n else {\n parent.appendChild(child);\n }\n}\nfunction 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. */\nfunction 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 */\nfunction 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 */\nfunction 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 */\nfunction getNativeAnchorNode(parentTNode, lView) {\n if (parentTNode.type === 2 /* View */) {\n var lContainer = getLContainer(parentTNode, lView);\n if (lContainer === null)\n return null;\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 tView The `TView' to be appended\n * @param lView The current LView\n * @param childEl The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n * @returns Whether or not the child was appended\n */\nfunction appendChild(tView, lView, childEl, childTNode) {\n var renderParent = getRenderParent(tView, childTNode, lView);\n if (renderParent != null) {\n var renderer = lView[RENDERER];\n var parentTNode = childTNode.parent || lView[T_HOST];\n var anchorNode = getNativeAnchorNode(parentTNode, lView);\n if (Array.isArray(childEl)) {\n for (var i = 0; i < childEl.length; i++) {\n nativeAppendOrInsertBefore(renderer, renderParent, childEl[i], anchorNode);\n }\n }\n else {\n nativeAppendOrInsertBefore(renderer, renderParent, childEl, anchorNode);\n }\n }\n}\n/**\n * Returns the first native node for a given LView, starting from the provided TNode.\n *\n * Native nodes are returned in the order in which those appear in the native tree (DOM).\n */\nfunction getFirstNativeNode(lView, tNode) {\n if (tNode !== null) {\n ngDevMode &&\n assertNodeOfPossibleTypes(tNode, 3 /* Element */, 0 /* Container */, 4 /* ElementContainer */, 5 /* IcuContainer */, 1 /* Projection */);\n var tNodeType = tNode.type;\n if (tNodeType === 3 /* Element */) {\n return getNativeByTNode(tNode, lView);\n }\n else if (tNodeType === 0 /* Container */) {\n return getBeforeNodeForView(-1, lView[tNode.index]);\n }\n else if (tNodeType === 4 /* ElementContainer */ || tNodeType === 5 /* IcuContainer */) {\n var elIcuContainerChild = tNode.child;\n if (elIcuContainerChild !== null) {\n return getFirstNativeNode(lView, elIcuContainerChild);\n }\n else {\n var rNodeOrLContainer = lView[tNode.index];\n if (isLContainer(rNodeOrLContainer)) {\n return getBeforeNodeForView(-1, rNodeOrLContainer);\n }\n else {\n return unwrapRNode(rNodeOrLContainer);\n }\n }\n }\n else {\n var componentView = lView[DECLARATION_COMPONENT_VIEW];\n var componentHost = componentView[T_HOST];\n var parentView = getLViewParent(componentView);\n var firstProjectedTNode = componentHost.projection[tNode.projection];\n if (firstProjectedTNode != null) {\n return getFirstNativeNode(parentView, firstProjectedTNode);\n }\n else {\n return getFirstNativeNode(lView, tNode.next);\n }\n }\n }\n return null;\n}\nfunction getBeforeNodeForView(viewIndexInContainer, lContainer) {\n var nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n if (nextViewIndex < lContainer.length) {\n var lView = lContainer[nextViewIndex];\n var firstTNodeOfView = lView[TVIEW].firstChild;\n if (firstTNodeOfView !== null) {\n return getFirstNativeNode(lView, firstTNodeOfView);\n }\n }\n return lContainer[NATIVE];\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 */\nfunction nativeRemoveNode(renderer, rNode, isHostElement) {\n var nativeParent = nativeParentNode(renderer, rNode);\n if (nativeParent) {\n nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n }\n}\n/**\n * Performs the operation of `action` on the node. Typically this involves inserting or removing\n * nodes on the LView or projection boundary.\n */\nfunction applyNodes(renderer, action, tNode, lView, renderParent, beforeNode, isProjection) {\n while (tNode != null) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode &&\n assertNodeOfPossibleTypes(tNode, 0 /* Container */, 3 /* Element */, 4 /* ElementContainer */, 1 /* Projection */, 1 /* Projection */, 5 /* IcuContainer */);\n var rawSlotValue = lView[tNode.index];\n var tNodeType = tNode.type;\n if (isProjection) {\n if (action === 0 /* Create */) {\n rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n tNode.flags |= 4 /* isProjected */;\n }\n }\n if ((tNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) {\n if (tNodeType === 4 /* ElementContainer */ || tNodeType === 5 /* IcuContainer */) {\n applyNodes(renderer, action, tNode.child, lView, renderParent, beforeNode, false);\n applyToElementOrContainer(action, renderer, renderParent, rawSlotValue, beforeNode);\n }\n else if (tNodeType === 1 /* Projection */) {\n applyProjectionRecursive(renderer, action, lView, tNode, renderParent, beforeNode);\n }\n else {\n ngDevMode && assertNodeOfPossibleTypes(tNode, 3 /* Element */, 0 /* Container */);\n applyToElementOrContainer(action, renderer, renderParent, rawSlotValue, beforeNode);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.next;\n }\n}\n/**\n * `applyView` performs operation on the view as specified in `action` (insert, detach, 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. Yes recursion is not most efficient but the\n * code is complicated enough that trying to implemented with recursion becomes unmaintainable.\n *\n * @param tView The `TView' which needs to be inserted, detached, destroyed\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyView(tView, lView, renderer, action, renderParent, beforeNode) {\n ngDevMode && assertNodeType(tView.node, 2 /* View */);\n var viewRootTNode = tView.node.child;\n applyNodes(renderer, action, viewRootTNode, lView, renderParent, beforeNode, false);\n}\n/**\n * `applyProjection` performs operation on the projection.\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 tView The `TView` of `LView` which needs to be inserted, detached, destroyed\n * @param lView The `LView` which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n */\nfunction applyProjection(tView, lView, tProjectionNode) {\n var renderer = lView[RENDERER];\n var renderParent = getRenderParent(tView, tProjectionNode, lView);\n var parentTNode = tProjectionNode.parent || lView[T_HOST];\n var beforeNode = getNativeAnchorNode(parentTNode, lView);\n applyProjectionRecursive(renderer, 0 /* Create */, lView, tProjectionNode, renderParent, beforeNode);\n}\n/**\n * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert,\n * 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 Render 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 tProjectionNode node to project\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyProjectionRecursive(renderer, action, lView, tProjectionNode, renderParent, beforeNode) {\n var componentLView = lView[DECLARATION_COMPONENT_VIEW];\n var componentNode = componentLView[T_HOST];\n ngDevMode &&\n assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n var nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection];\n if (Array.isArray(nodeToProjectOrRNodes)) {\n // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we\n // need to support passing projectable nodes, so we cheat and put them in the TNode\n // of the Host TView. (Yes we put instance info at the T Level). We can get away with it\n // because we know that that TView is not shared and therefore it will not be a problem.\n // This should be refactored and cleaned up.\n for (var i = 0; i < nodeToProjectOrRNodes.length; i++) {\n var rNode = nodeToProjectOrRNodes[i];\n applyToElementOrContainer(action, renderer, renderParent, rNode, beforeNode);\n }\n }\n else {\n var nodeToProject = nodeToProjectOrRNodes;\n var projectedComponentLView = componentLView[PARENT];\n applyNodes(renderer, action, nodeToProject, projectedComponentLView, renderParent, beforeNode, true);\n }\n}\n/**\n * `applyContainer` 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 */\nfunction applyContainer(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 executeActionOnElementOrContainer)\n // - container's host node (this is done here)\n if (anchor !== native) {\n // This is very strange to me (Misko). I would expect that the native is same as anchor. I don't\n // see a reason why they should be different, but they are.\n //\n // If they are we need to process the second anchor as well.\n applyToElementOrContainer(action, renderer, renderParent, anchor, beforeNode);\n }\n for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n var lView = lContainer[i];\n applyView(lView[TVIEW], lView, renderer, action, renderParent, anchor);\n }\n}\n/**\n * Writes class/style to element.\n *\n * @param renderer Renderer to use.\n * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`)\n * @param rNode The Node to write to.\n * @param prop Property to write to. This would be the class/style name.\n * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add\n * otherwise).\n */\nfunction applyStyling(renderer, isClassBased, rNode, prop, value) {\n var isProcedural = isProceduralRenderer(renderer);\n if (isClassBased) {\n // We actually want JS true/false here because any truthy value should add the class\n if (!value) {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n if (isProcedural) {\n renderer.removeClass(rNode, prop);\n }\n else {\n rNode.classList.remove(prop);\n }\n }\n else {\n ngDevMode && ngDevMode.rendererAddClass++;\n if (isProcedural) {\n renderer.addClass(rNode, prop);\n }\n else {\n ngDevMode && assertDefined(rNode.classList, 'HTMLElement expected');\n rNode.classList.add(prop);\n }\n }\n }\n else {\n // TODO(misko): Can't import RendererStyleFlags2.DashCase as it causes imports to be resolved in\n // different order which causes failures. Using direct constant as workaround for now.\n var flags = prop.indexOf('-') == -1 ? undefined : 2 /* RendererStyleFlags2.DashCase */;\n if (value == null /** || value === undefined */) {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n if (isProcedural) {\n renderer.removeStyle(rNode, prop, flags);\n }\n else {\n rNode.style.removeProperty(prop);\n }\n }\n else {\n ngDevMode && ngDevMode.rendererSetStyle++;\n if (isProcedural) {\n renderer.setStyle(rNode, prop, value, flags);\n }\n else {\n ngDevMode && assertDefined(rNode.style, 'HTMLElement expected');\n rNode.style.setProperty(prop, value);\n }\n }\n }\n}\n/**\n * Write `cssText` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nfunction writeDirectStyle(renderer, element, newValue) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n if (isProceduralRenderer(renderer)) {\n renderer.setAttribute(element, 'style', newValue);\n }\n else {\n element.style.cssText = newValue;\n }\n ngDevMode && ngDevMode.rendererSetStyle++;\n}\n/**\n * Write `className` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nfunction writeDirectClass(renderer, element, newValue) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n if (isProceduralRenderer(renderer)) {\n if (newValue === '') {\n // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.\n renderer.removeAttribute(element, 'class');\n }\n else {\n renderer.setAttribute(element, 'class', newValue);\n }\n }\n else {\n element.className = newValue;\n }\n ngDevMode && ngDevMode.rendererSetClassName++;\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 * If `startTNode.parent` exists and has an injector, returns TNode for that injector.\n * Otherwise, unwraps a parent injector location number to find the view offset from the current\n * injector, then walks up the declaration view tree until the TNode of the parent injector is\n * 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 */\nfunction getParentInjectorTNode(location, startView, startTNode) {\n // If there is an injector on the parent TNode, retrieve the TNode for that injector.\n if (startTNode.parent && startTNode.parent.injectorIndex !== -1) {\n // view offset is 0\n var injectorIndex = startTNode.parent.injectorIndex;\n var tNode = startTNode.parent;\n // If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent\n // injector.\n while (tNode.parent != null && injectorIndex == tNode.parent.injectorIndex) {\n tNode = tNode.parent;\n }\n return tNode;\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 */\nvar ViewRef = /** @class */ (function () {\n function ViewRef(\n /**\n * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.\n *\n * When ViewRef is created for a dynamic component, this also represents the `LView` for the\n * component.\n *\n * For a \"regular\" ViewRef created for an embedded view, this is the `LView` for the embedded\n * view.\n *\n * @internal\n */\n _lView, \n /**\n * This represents the `LView` associated with the point where `ChangeDetectorRef` was\n * requested.\n *\n * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.\n */\n _cdRefInjectingView) {\n this._lView = _lView;\n this._cdRefInjectingView = _cdRefInjectingView;\n this._appRef = null;\n this._viewContainerRef = null;\n }\n Object.defineProperty(ViewRef.prototype, \"rootNodes\", {\n get: function () {\n var lView = this._lView;\n if (lView[HOST] == null) {\n var hostTView = lView[T_HOST];\n return collectNativeNodes(lView[TVIEW], lView, hostTView.child, []);\n }\n return [];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef.prototype, \"context\", {\n get: function () {\n return this._lView[CONTEXT];\n },\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[TVIEW], this._lView);\n };\n ViewRef.prototype.onDestroy = function (callback) {\n storeCleanupFn(this._lView[TVIEW], this._lView, callback);\n };\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 () {\n markViewDirty(this._cdRefInjectingView || this._lView);\n };\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 () {\n this._lView[FLAGS] &= ~128 /* Attached */;\n };\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 () {\n this._lView[FLAGS] |= 128 /* Attached */;\n };\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 () {\n detectChangesInternal(this._lView[TVIEW], this._lView, this.context);\n };\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 () {\n checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context);\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 ViewRef.prototype.detachFromAppRef = function () {\n this._appRef = null;\n renderDetachView(this._lView[TVIEW], 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 return ViewRef;\n}());\n/** @internal */\nvar RootViewRef = /** @class */ (function (_super) {\n __extends(RootViewRef, _super);\n function RootViewRef(_view) {\n var _this = _super.call(this, _view) || this;\n _this._view = _view;\n return _this;\n }\n RootViewRef.prototype.detectChanges = function () {\n detectChangesInRootView(this._view);\n };\n RootViewRef.prototype.checkNoChanges = function () {\n checkNoChangesInRootView(this._view);\n };\n Object.defineProperty(RootViewRef.prototype, \"context\", {\n get: function () {\n return null;\n },\n enumerable: true,\n configurable: true\n });\n return RootViewRef;\n}(ViewRef));\nfunction collectNativeNodes(tView, lView, tNode, result, isProjection) {\n if (isProjection === void 0) { isProjection = false; }\n while (tNode !== null) {\n ngDevMode &&\n assertNodeOfPossibleTypes(tNode, 3 /* Element */, 0 /* Container */, 1 /* Projection */, 4 /* ElementContainer */, 5 /* IcuContainer */);\n var lNode = lView[tNode.index];\n if (lNode !== null) {\n result.push(unwrapRNode(lNode));\n }\n // A given lNode can represent either a native node or a LContainer (when it is a host of a\n // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes\n // from the views in this container.\n if (isLContainer(lNode)) {\n for (var i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) {\n var lViewInAContainer = lNode[i];\n var lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n if (lViewFirstChildTNode !== null) {\n collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n }\n }\n }\n var tNodeType = tNode.type;\n if (tNodeType === 4 /* ElementContainer */ || tNodeType === 5 /* IcuContainer */) {\n collectNativeNodes(tView, lView, tNode.child, result);\n }\n else if (tNodeType === 1 /* Projection */) {\n var componentView = lView[DECLARATION_COMPONENT_VIEW];\n var componentHost = componentView[T_HOST];\n var slotIdx = tNode.projection;\n ngDevMode &&\n assertDefined(componentHost.projection, 'Components with projection nodes (<ng-content>) must have projection slots defined.');\n var nodesInSlot = componentHost.projection[slotIdx];\n if (Array.isArray(nodesInSlot)) {\n result.push.apply(result, __spread(nodesInSlot));\n }\n else {\n var parentView = getLViewParent(componentView);\n ngDevMode &&\n assertDefined(parentView, 'Component views should always have a parent view (component\\'s host view)');\n collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n }\n }\n tNode = isProjection ? tNode.projectionNext : tNode.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 */\nfunction injectElementRef(ElementRefToken) {\n return createElementRef(ElementRefToken, getPreviousOrParentTNode(), getLView());\n}\nvar 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 */\nfunction createElementRef(ElementRefToken, tNode, view) {\n if (!R3ElementRef) {\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}\nvar R3TemplateRef;\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nfunction 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 on which a TemplateRef is requested\n * @param hostView The view to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\nfunction createTemplateRef(TemplateRefToken, ElementRefToken, hostTNode, hostView) {\n if (!R3TemplateRef) {\n R3TemplateRef = /** @class */ (function (_super) {\n __extends(TemplateRef, _super);\n function TemplateRef(_declarationView, _declarationTContainer, elementRef) {\n var _this = _super.call(this) || this;\n _this._declarationView = _declarationView;\n _this._declarationTContainer = _declarationTContainer;\n _this.elementRef = elementRef;\n return _this;\n }\n TemplateRef.prototype.createEmbeddedView = function (context) {\n var embeddedTView = this._declarationTContainer.tViews;\n var embeddedLView = createLView(this._declarationView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.node);\n var declarationLContainer = this._declarationView[this._declarationTContainer.index];\n ngDevMode && assertLContainer(declarationLContainer);\n embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n var declarationViewLQueries = this._declarationView[QUERIES];\n if (declarationViewLQueries !== null) {\n embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n }\n renderView(embeddedTView, embeddedLView, context);\n return new ViewRef(embeddedLView);\n };\n return TemplateRef;\n }(TemplateRefToken));\n }\n if (hostTNode.type === 0 /* Container */) {\n ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n return new R3TemplateRef(hostView, hostTNode, createElementRef(ElementRefToken, hostTNode, hostView));\n }\n else {\n return null;\n }\n}\nvar 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 */\nfunction 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 */\nfunction createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, hostView) {\n if (!R3ViewContainerRef) {\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 () {\n return new NodeInjector(this._hostTNode, this._hostView);\n },\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 > 0) {\n this.remove(this.length - 1);\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 return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n },\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.ngModule == null && contextInjector) {\n // DO NOT REFACTOR. The code here used to have a `value || undefined` expression\n // which seems to cause internal google apps to fail. This is documented in the\n // following internal bug issue: go/b/142967802\n var result = contextInjector.get(NgModuleRef, null);\n if (result) {\n ngModuleRef = result;\n }\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 var lView = viewRef._lView;\n var tView = lView[TVIEW];\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n this.allocateContainerIfNeeded();\n if (viewAttachedToContainer(lView)) {\n // If view is already attached, detach it first so we clean up references appropriately.\n var prevIdx = this.indexOf(viewRef);\n // A view might be attached either to this or a different container. The `prevIdx` for\n // those cases will be:\n // equal to -1 for views attached to this ViewContainerRef\n // >= 0 for views attached to a different ViewContainerRef\n if (prevIdx !== -1) {\n this.detach(prevIdx);\n }\n else {\n var prevLContainer = lView[PARENT];\n ngDevMode &&\n assertEqual(isLContainer(prevLContainer), true, 'An attached view should have its PARENT point to a container.');\n // We need to re-create a R3ViewContainerRef instance since those are not stored on\n // LView (nor anywhere else).\n var prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]);\n prevVCRef.detach(prevVCRef.indexOf(viewRef));\n }\n }\n var adjustedIdx = this._adjustIndex(index);\n insertView(tView, lView, this._lContainer, adjustedIdx);\n var beforeNode = getBeforeNodeForView(adjustedIdx, this._lContainer);\n addRemoveViewFromContainer(tView, lView, true, beforeNode);\n viewRef.attachToViewContainerRef(this);\n addToArray(this._lContainer[VIEW_REFS], adjustedIdx, 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 return this.insert(viewRef, newIndex);\n };\n ViewContainerRef.prototype.indexOf = function (viewRef) {\n var viewRefsArr = this._lContainer[VIEW_REFS];\n return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n };\n ViewContainerRef.prototype.remove = function (index) {\n this.allocateContainerIfNeeded();\n var adjustedIdx = this._adjustIndex(index, -1);\n removeView(this._lContainer, adjustedIdx);\n removeFromArray(this._lContainer[VIEW_REFS], adjustedIdx);\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 && removeFromArray(this._lContainer[VIEW_REFS], adjustedIdx) != null;\n return wasDetached ? new ViewRef(view) : 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, \"ViewRef index must be positive, got \" + index);\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 &&\n 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 }\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 // The comment node in question is already part of the DOM structure so we don't need to append\n // it again.\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 // A `ViewContainerRef` can be injected by the root (topmost / bootstrapped) component. In\n // this case we can't use TView / TNode data structures to insert container's marker node\n // (both a parent of a comment node and the comment node itself are not part of any view). In\n // this specific case we use low-level DOM manipulation to insert container's marker (comment)\n // 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(hostView[TVIEW], hostView, commentNode, hostTNode);\n }\n }\n hostView[hostTNode.index] = lContainer =\n createLContainer(slotValue, hostView, commentNode, hostTNode);\n addToViewTree(hostView, lContainer);\n }\n return new R3ViewContainerRef(lContainer, hostTNode, hostView);\n}\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nfunction injectChangeDetectorRef(isPipe) {\n if (isPipe === void 0) { isPipe = false; }\n return createViewRef(getPreviousOrParentTNode(), getLView(), isPipe);\n}\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param tNode The node that is requesting a ChangeDetectorRef\n * @param lView The view to which the node belongs\n * @param isPipe Whether the view is being injected into a pipe.\n * @returns The ChangeDetectorRef to use\n */\nfunction createViewRef(tNode, lView, isPipe) {\n // `isComponentView` will be true for Component and Directives (but not for Pipes).\n // See https://github.com/angular/angular/pull/33072 for proper fix\n var isComponentView = !isPipe && isComponentHost(tNode);\n if (isComponentView) {\n // The LView represents the location where the component is declared.\n // Instead we want the LView for the component View and so we need to look it up.\n var componentView = getComponentLViewByIndex(tNode.index, lView); // look down\n return new ViewRef(componentView, componentView);\n }\n else if (tNode.type === 3 /* Element */ || tNode.type === 0 /* Container */ ||\n tNode.type === 4 /* ElementContainer */ || tNode.type === 5 /* IcuContainer */) {\n // The LView represents the location where the injection is requested from.\n // We need to locate the containing LView (in case where the `lView` is an embedded view)\n var hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up\n return new ViewRef(hostComponentView, lView);\n }\n return null;\n}\n/** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */\nfunction 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. */\nfunction 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 = getComponentLViewByIndex(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/**\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 */\nvar 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}());\nvar SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = injectChangeDetectorRef;\nvar 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};\nvar ɵ0$5 = SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__;\nvar SWITCH_CHANGE_DETECTOR_REF_FACTORY = SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_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\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 */\nvar Type = Function;\nfunction 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 */\nvar DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*arguments\\)/;\nvar INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\nvar INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\nvar 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 */\nfunction 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}\nvar ReflectionCapabilities = /** @class */ (function () {\n function ReflectionCapabilities(reflect) {\n this._reflect = reflect || _global['Reflect'];\n }\n ReflectionCapabilities.prototype.isReflectionEnabled = function () {\n return true;\n };\n ReflectionCapabilities.prototype.factory = function (t) {\n 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 };\n /** @internal */\n ReflectionCapabilities.prototype._zipTypesAndAnnotations = function (paramTypes, paramAnnotations) {\n var result;\n if (typeof paramTypes === 'undefined') {\n result = newArray(paramAnnotations.length);\n }\n else {\n result = newArray(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 newArray(type.length);\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) {\n return {};\n };\n ReflectionCapabilities.prototype.getter = function (name) {\n return new Function('o', 'return o.' + name + ';');\n };\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) {\n return \"./\" + stringify(type);\n };\n ReflectionCapabilities.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {\n return runtime;\n };\n ReflectionCapabilities.prototype.resolveEnum = function (enumIdentifier, name) {\n return enumIdentifier[name];\n };\n return ReflectionCapabilities;\n}());\nfunction 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}\nfunction 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 */\nvar _reflect = null;\nfunction getReflect() {\n return (_reflect = _reflect || new ReflectionCapabilities());\n}\nfunction reflectDependencies(type) {\n return convertDependencies(getReflect().parameters(type));\n}\nfunction convertDependencies(deps) {\n var compiler = getCompilerFacade();\n return deps.map(function (dep) { return reflectDependency(compiler, dep); });\n}\nfunction 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) && dep.length > 0) {\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 var proto = Object.getPrototypeOf(param);\n if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n meta.optional = true;\n }\n else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n }\n else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n meta.self = true;\n }\n else if (param instanceof Host || 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 if (param === ChangeDetectorRef) {\n meta.token = param;\n meta.resolved = compiler.R3ResolvedDependencyType.ChangeDetectorRef;\n }\n else {\n setTokenAndResolvedType(param);\n }\n }\n }\n else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) {\n meta.token = undefined;\n meta.resolved = R3ResolvedDependencyType.Invalid;\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 * injectable def (`ɵprov`) onto the injectable type.\n */\nfunction compileInjectable(type, srcMeta) {\n var ngInjectableDef = null;\n var ngFactoryDef = null;\n // if NG_PROV_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_PROV_DEF)) {\n Object.defineProperty(type, NG_PROV_DEF, {\n get: function () {\n if (ngInjectableDef === null) {\n ngInjectableDef = getCompilerFacade().compileInjectable(angularCoreDiEnv, \"ng:///\" + type.name + \"/\\u0275prov.js\", getInjectableMetadata(type, srcMeta));\n }\n return ngInjectableDef;\n },\n });\n // On IE10 properties defined via `defineProperty` won't be inherited by child classes,\n // which will break inheriting the injectable definition from a grandparent through an\n // undecorated parent class. We work around it by defining a method which should be used\n // as a fallback. This should only be a problem in JIT mode, because in AOT TypeScript\n // seems to have a workaround for static properties. When inheriting from an undecorated\n // parent is no longer supported in v10, this can safely be removed.\n if (!type.hasOwnProperty(NG_PROV_DEF_FALLBACK)) {\n type[NG_PROV_DEF_FALLBACK] = function () { return type[NG_PROV_DEF]; };\n }\n }\n // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: function () {\n if (ngFactoryDef === null) {\n var metadata = getInjectableMetadata(type, srcMeta);\n var compiler = getCompilerFacade();\n ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, \"ng:///\" + type.name + \"/\\u0275fac.js\", {\n name: metadata.name,\n type: metadata.type,\n typeArgumentCount: metadata.typeArgumentCount,\n deps: reflectDependencies(type),\n injectFn: 'inject',\n target: compiler.R3FactoryTarget.Injectable\n });\n }\n return ngFactoryDef;\n },\n // Leave this configurable so that the factories from directives or pipes can take precedence.\n configurable: true\n });\n }\n}\nvar ɵ0$6 = getClosureSafeProperty;\nvar USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: ɵ0$6 });\nfunction isUseClassProvider(meta) {\n return meta.useClass !== undefined;\n}\nfunction isUseValueProvider(meta) {\n return USE_VALUE$1 in meta;\n}\nfunction isUseFactoryProvider(meta) {\n return meta.useFactory !== undefined;\n}\nfunction isUseExistingProvider(meta) {\n return meta.useExisting !== undefined;\n}\nfunction getInjectableMetadata(type, srcMeta) {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n var meta = srcMeta || { providedIn: null };\n var compilerMeta = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn,\n userDeps: undefined,\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.userDeps = convertDependencies(meta.deps);\n }\n if (isUseClassProvider(meta)) {\n // The user explicitly specified useClass, and may or may not have provided deps.\n compilerMeta.useClass = resolveForwardRef(meta.useClass);\n }\n else if (isUseValueProvider(meta)) {\n // The user explicitly specified useValue.\n compilerMeta.useValue = resolveForwardRef(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 = resolveForwardRef(meta.useExisting);\n }\n return compilerMeta;\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 */\nvar ɵ0$7 = getClosureSafeProperty;\nvar USE_VALUE$2 = getClosureSafeProperty({ provide: String, useValue: ɵ0$7 });\nvar EMPTY_ARRAY$1 = [];\nfunction 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(resolveForwardRef(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$1))); };\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 = (resolveForwardRef(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 */\nvar ɵ0$8 = function (type, meta) { return SWITCH_COMPILE_INJECTABLE(type, meta); };\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nvar Injectable = makeDecorator('Injectable', undefined, undefined, undefined, ɵ0$8);\n/**\n * Supports @Injectable() in JIT mode for Render2.\n */\nfunction render2CompileInjectable(injectableType, options) {\n if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {\n injectableType.ɵprov = ɵɵdefineInjectable({\n token: injectableType,\n providedIn: options.providedIn,\n factory: convertInjectableProviderToFactory(injectableType, options),\n });\n }\n}\nvar SWITCH_COMPILE_INJECTABLE__POST_R3__ = compileInjectable;\nvar SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;\nvar SWITCH_COMPILE_INJECTABLE = SWITCH_COMPILE_INJECTABLE__POST_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 * 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 */\nvar INJECTOR_SCOPE = new InjectionToken('Set Injector scope.');\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 */\nvar 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 */\nvar CIRCULAR = {};\nvar EMPTY_ARRAY$2 = [];\n/**\n * A lazily initialized NullInjector.\n */\nvar NULL_INJECTOR = undefined;\nfunction 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 */\nfunction createInjector(defType, parent, additionalProviders, name) {\n if (parent === void 0) { parent = null; }\n if (additionalProviders === void 0) { additionalProviders = null; }\n var injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector._resolveInjectorDefTypes();\n return injector;\n}\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nfunction createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name) {\n if (parent === void 0) { parent = null; }\n if (additionalProviders === void 0) { additionalProviders = null; }\n return new R3Injector(defType, additionalProviders, parent || getNullInjector(), name);\n}\nvar 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 * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n * to prevent further searches.\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 var dedupStack = [];\n // Start off by creating Records for every provider declared in every InjectorType\n // included transitively in additional providers then do the same for `def`. This order is\n // important because `def` may include providers that override ones in additionalProviders.\n additionalProviders &&\n deepForEach(additionalProviders, function (provider) { return _this.processProvider(provider, def, additionalProviders); });\n deepForEach([def], function (injectorDef) { return _this.processInjectorType(injectorDef, [], dedupStack); });\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 var record = this.records.get(INJECTOR_SCOPE);\n this.scope = record != null ? record.value : null;\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 () {\n return this._destroyed;\n },\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 = 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 & 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 injectable\n // def with a scope matching this injector.\n var def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n // all along.\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n }\n else {\n record = null;\n }\n this.records.set(token, record);\n }\n // If a record was found, get the instance for it and return it.\n if (record != null /* NOT null || 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 & InjectFlags.Self) ? this.parent : getNullInjector();\n // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n // is undefined, the value is null, otherwise it's the notFoundValue.\n notFoundValue = (flags & InjectFlags.Optional) && notFoundValue === THROW_IF_NOT_FOUND ?\n null :\n notFoundValue;\n return nextInjector.get(token, 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 /** @internal */\n R3Injector.prototype._resolveInjectorDefTypes = function () {\n var _this = this;\n this.injectorDefTypes.forEach(function (defType) { return _this.get(defType); });\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 injector def) 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 injector def (`ɵinj`).\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 // 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$2); });\n };\n for (var i = 0; i < importTypesWithProviders_1.length; i++) {\n _loop_1(i);\n }\n }\n }\n // Track the InjectorType and add a provider for it. It's important that this is done after the\n // def's imports.\n this.injectorDefTypes.add(defType);\n this.records.set(defType, makeRecord(def.factory, NOT_YET));\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 === this.scope);\n }\n else {\n return this.injectorDefTypes.has(def.providedIn);\n }\n };\n return R3Injector;\n}());\nfunction injectableDefOrInjectorDefFactory(token) {\n // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n var injectableDef = getInjectableDef(token);\n var factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n if (factory !== null) {\n return factory;\n }\n // If the token is an NgModule, it's also injectable but the factory is on its injector def\n // (`ɵinj`)\n var injectorDef = getInjectorDef(token);\n if (injectorDef !== null) {\n return injectorDef.factory;\n }\n // InjectionTokens should have an injectable def (ɵprov) 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 a \\u0275prov 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}\nfunction 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 = newArray(paramLength, '?');\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 injectable\n // def 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}\nfunction providerToRecord(provider, ngModuleType, providers) {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n }\n else {\n var factory = providerToFactory(provider, ngModuleType, providers);\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 */\nfunction providerToFactory(provider, ngModuleType, providers) {\n var factory = undefined;\n if (isTypeProvider(provider)) {\n var unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n }\n else {\n if (isValueProvider(provider)) {\n factory = function () { return resolveForwardRef(provider.useValue); };\n }\n else if (isFactoryProvider(provider)) {\n factory = function () { return provider.useFactory.apply(provider, __spread(injectArgs(provider.deps || []))); };\n }\n else if (isExistingProvider(provider)) {\n factory = function () { return ɵɵinject(resolveForwardRef(provider.useExisting)); };\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 getFactoryDef(classRef_1) || injectableDefOrInjectorDefFactory(classRef_1);\n }\n }\n }\n return factory;\n}\nfunction 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}\nfunction isValueProvider(value) {\n return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\nfunction isExistingProvider(value) {\n return !!(value && value.useExisting);\n}\nfunction isFactoryProvider(value) {\n return !!(value && value.useFactory);\n}\nfunction isTypeProvider(value) {\n return typeof value === 'function';\n}\nfunction isClassProvider(value) {\n return !!value.useClass;\n}\nfunction hasDeps(value) {\n return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n return value !== null && typeof value === 'object' &&\n typeof value.ngOnDestroy === 'function';\n}\nfunction 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 */\nfunction INJECTOR_IMPL__PRE_R3__(providers, parent, name) {\n return new StaticInjector(providers, parent, name);\n}\nfunction INJECTOR_IMPL__POST_R3__(providers, parent, name) {\n return createInjector({ name: name }, parent, providers, name);\n}\nvar INJECTOR_IMPL = INJECTOR_IMPL__POST_R3__;\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/glossary#provider) that associate\n * dependencies of various types with [injection tokens](guide/glossary#di-token).\n *\n * @see [\"DI Providers\"](guide/dependency-injection-providers).\n * @see `StaticProvider`\n *\n * @usageNotes\n *\n * The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage 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 */\nvar Injector = /** @class */ (function () {\n function Injector() {\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.ɵprov = ɵɵ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}());\nvar IDENT = function (value) {\n return value;\n};\nvar ɵ0$9 = IDENT;\nvar EMPTY = [];\nvar CIRCULAR$1 = IDENT;\nvar MULTI_PROVIDER_FN = function () {\n return Array.prototype.slice.call(arguments);\n};\nvar ɵ1$1 = MULTI_PROVIDER_FN;\nvar NO_NEW_LINE$1 = 'ɵ';\nvar 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 this.scope = recursivelyProcessProviders(records, providers);\n }\n StaticInjector.prototype.get = function (token, notFoundValue, flags) {\n if (flags === void 0) { flags = InjectFlags.Default; }\n var records = this._records;\n var record = records.get(token);\n if (record === undefined) {\n // This means we have never seen this record, see if it is tree shakable provider.\n var injectableDef = getInjectableDef(token);\n if (injectableDef) {\n var providedIn = injectableDef && injectableDef.providedIn;\n if (providedIn === 'any' || providedIn != null && providedIn === this.scope) {\n records.set(token, record = resolveProvider({ provide: token, useFactory: injectableDef.factory, deps: EMPTY }));\n }\n }\n if (record === undefined) {\n // Set record to null to make sure that we don't go through expensive lookup above again.\n records.set(token, null);\n }\n }\n var lastInjector = setCurrentInjector(this);\n try {\n return tryResolveToken(token, record, records, this.parent, notFoundValue, flags);\n }\n catch (e) {\n return catchInjectorError(e, token, 'StaticInjectorError', this.source);\n }\n finally {\n setCurrentInjector(lastInjector);\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}());\nfunction 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 // Just use IDENT\n }\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}\nfunction multiProviderMixError(token) {\n return staticError('Cannot mix multi providers and regular providers', token);\n}\nfunction recursivelyProcessProviders(records, provider) {\n var scope = null;\n if (provider) {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // if we have an array recurse into the array\n for (var i = 0; i < provider.length; i++) {\n scope = recursivelyProcessProviders(records, provider[i]) || scope;\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 if (token === INJECTOR_SCOPE) {\n scope = resolvedProvider.value;\n }\n records.set(token, resolvedProvider);\n }\n else {\n throw staticError('Unexpected provider', provider);\n }\n }\n return scope;\n}\nfunction 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}\nfunction resolveToken(token, record, records, parent, notFoundValue, flags) {\n var _a;\n var value;\n if (record && !(flags & 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, 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 & InjectFlags.Self)) {\n value = parent.get(token, notFoundValue, InjectFlags.Default);\n }\n else if (!(flags & InjectFlags.Optional)) {\n value = Injector.NULL.get(token, notFoundValue);\n }\n else {\n value = Injector.NULL.get(token, typeof notFoundValue !== 'undefined' ? notFoundValue : null);\n }\n return value;\n}\nfunction 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 (Array.isArray(token)) {\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}\nfunction 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 */\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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 */\nfunction 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 */\nfunction 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 */\nfunction 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 */\nfunction 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 */\nfunction 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 */\nfunction 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 */\nfunction 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 */\nvar 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 () {\n return _globalKeyRegistry.numberOfKeys;\n },\n enumerable: true,\n configurable: true\n });\n return ReflectiveKey;\n}());\nvar 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 () {\n return this._allKeys.size;\n },\n enumerable: true,\n configurable: true\n });\n return KeyRegistry;\n}());\nvar _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 */\nvar Reflector = /** @class */ (function () {\n function Reflector(reflectionCapabilities) {\n this.reflectionCapabilities = reflectionCapabilities;\n }\n Reflector.prototype.updateCapabilities = function (caps) {\n this.reflectionCapabilities = caps;\n };\n Reflector.prototype.factory = function (type) {\n return this.reflectionCapabilities.factory(type);\n };\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) {\n return this.reflectionCapabilities.getter(name);\n };\n Reflector.prototype.setter = function (name) {\n return this.reflectionCapabilities.setter(name);\n };\n Reflector.prototype.method = function (name) {\n return this.reflectionCapabilities.method(name);\n };\n Reflector.prototype.importUri = function (type) {\n return this.reflectionCapabilities.importUri(type);\n };\n Reflector.prototype.resourceUri = function (type) {\n return this.reflectionCapabilities.resourceUri(type);\n };\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 */\nvar 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 */\nvar 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}());\nvar _EMPTY_LIST = [];\nvar 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 */\nvar 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 */\nfunction 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 */\nfunction resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}\n/**\n * Resolve a list of Providers.\n */\nfunction 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 */\nfunction 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}\nfunction _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 (Array.isArray(b)) {\n _normalizeProviders(b, res);\n }\n else {\n throw invalidProviderError(b);\n }\n });\n return res;\n}\nfunction 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}\nfunction _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}\nfunction _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}\nfunction _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\nvar UNDEFINED = {};\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 */\nvar 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}());\nvar 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 = [];\n this.objs = [];\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 () {\n return this.objs.length;\n };\n ReflectiveInjector_.prototype._instantiateProvider = function (provider) {\n if (provider.multiProvider) {\n var res = [];\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 () {\n return this.displayName;\n };\n ReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector);\n return ReflectiveInjector_;\n}());\nfunction _mapProviders(injector, fn) {\n var res = [];\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 * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.\n */\nvar 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 */\nvar Query = /** @class */ (function () {\n function Query() {\n }\n return Query;\n}());\nvar ɵ0$a = 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 */\nvar ContentChildren = makePropDecorator('ContentChildren', ɵ0$a, Query);\nvar ɵ1$2 = 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 */\nvar ContentChild = makePropDecorator('ContentChild', ɵ1$2, Query);\nvar ɵ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 */\nvar ViewChildren = makePropDecorator('ViewChildren', ɵ2, Query);\nvar ɵ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 */\nvar 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/**\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 */\nfunction 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}\nvar componentResourceResolutionQueue = new Map();\n// Track when existing ɵcmp for a Type is waiting on resources.\nvar componentDefPendingResolution = new Set();\nfunction maybeQueueResolutionOfComponentResources(type, metadata) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n}\nfunction isComponentDefPendingResolution(type) {\n return componentDefPendingResolution.has(type);\n}\nfunction componentNeedsResolution(component) {\n return !!((component.templateUrl && !component.hasOwnProperty('template')) ||\n component.styleUrls && component.styleUrls.length);\n}\nfunction clearResolutionOfComponentResourcesQueue() {\n var old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n}\nfunction restoreComponentResolutionQueue(queue) {\n componentDefPendingResolution.clear();\n queue.forEach(function (_, type) { return componentDefPendingResolution.add(type); });\n componentResourceResolutionQueue = queue;\n}\nfunction isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n}\nfunction unwrapResponse(response) {\n return typeof response == 'string' ? response : response.text();\n}\nfunction 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/**\n * Compute the static styling (class/style) from `TAttributes`.\n *\n * This function should be called during `firstCreatePass` only.\n *\n * @param tNode The `TNode` into which the styling information should be loaded.\n * @param attrs `TAttributes` containing the styling information.\n * @param writeToHost Where should the resulting static styles be written?\n * - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost`\n * - `true` Write to `TNode.styles` / `TNode.classes`\n */\nfunction computeStaticStyling(tNode, attrs, writeToHost) {\n ngDevMode &&\n assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n var styles = writeToHost ? tNode.styles : null;\n var classes = writeToHost ? tNode.classes : null;\n var mode = 0;\n if (attrs !== null) {\n for (var i = 0; i < attrs.length; i++) {\n var value = attrs[i];\n if (typeof value === 'number') {\n mode = value;\n }\n else if (mode == 1 /* Classes */) {\n classes = concatStringsWithSpace(classes, value);\n }\n else if (mode == 2 /* Styles */) {\n var style = value;\n var styleValue = attrs[++i];\n styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n }\n }\n }\n writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles;\n writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes;\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 */\nvar _symbolIterator = null;\nfunction 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 */\nfunction isIterable(obj) {\n return obj !== null && typeof obj === 'object' && obj[getSymbolIterator()] !== undefined;\n}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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// JS has NaN !== NaN\nfunction looseIdentical(a, b) {\n return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);\n}\nfunction 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/**\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 */\nfunction devModeEqual$1(a, b) {\n var isListLikeIterableA = isListLikeIterable$1(a);\n var isListLikeIterableB = isListLikeIterable$1(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual$1(a, b, devModeEqual$1);\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 */\nvar WrappedValue = /** @class */ (function () {\n function WrappedValue(value) {\n this.wrapped = value;\n }\n /** Creates a wrapped value. */\n WrappedValue.wrap = function (value) {\n return new WrappedValue(value);\n };\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) {\n return WrappedValue.isWrapped(value) ? value.wrapped : value;\n };\n /** Returns true if `value` is a wrapped value. */\n WrappedValue.isWrapped = function (value) {\n return value instanceof WrappedValue;\n };\n return WrappedValue;\n}());\nfunction isListLikeIterable$1(obj) {\n if (!isJsObject$1(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}\nfunction areIterablesEqual$1(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}\nfunction iterateListLike$1(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}\nfunction isJsObject$1(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. */\nfunction updateBinding(lView, bindingIndex, value) {\n return lView[bindingIndex] = value;\n}\n/** Gets the current binding value. */\nfunction 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/**\n * Updates binding if changed, then returns whether it was updated.\n *\n * This function also checks the `CheckNoChangesMode` and throws if changes are made.\n * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE\n * behavior.\n *\n * @param lView current `LView`\n * @param bindingIndex The binding in the `LView` to check\n * @param value New value to check against `lView[bindingIndex]`\n * @returns `true` if the bindings has changed. (Throws if binding has changed during\n * `CheckNoChangesMode`)\n */\nfunction 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 (Object.is(oldValue, value)) {\n return false;\n }\n else {\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$1(oldValueToCompare, value)) {\n var details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);\n throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName);\n }\n // There was a change, but the `devModeEqual` decided that the change is exempt from an error.\n // For this reason we exit as if no change. The early exit is needed to prevent the changed\n // value to be written into `LView` (If we would write the new value that we would not see it\n // as change on next CD.)\n return false;\n }\n lView[bindingIndex] = value;\n return true;\n }\n}\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nfunction 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. */\nfunction 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. */\nfunction 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 * 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 */\nfunction ɵɵattribute(name, value, sanitizer, namespace) {\n var lView = getLView();\n var bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);\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 */\nfunction interpolationV(lView, 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 bindingIndex = getBindingIndex();\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 setBindingIndex(bindingIndex);\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 */\nfunction interpolation1(lView, prefix, v0, suffix) {\n var different = bindingUpdated(lView, nextBindingIndex(), v0);\n return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 2 expressions.\n */\nfunction interpolation2(lView, prefix, v0, i0, v1, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated2(lView, bindingIndex, v0, v1);\n incrementBindingIndex(2);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 3 expressions.\n */\nfunction interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n incrementBindingIndex(3);\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 */\nfunction interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n incrementBindingIndex(4);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + suffix :\n NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 5 expressions.\n */\nfunction interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n incrementBindingIndex(5);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix :\n NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 6 expressions.\n */\nfunction interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n incrementBindingIndex(6);\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 */\nfunction interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n incrementBindingIndex(7);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n renderStringify(v5) + i5 + renderStringify(v6) + suffix :\n NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 8 expressions.\n */\nfunction interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var bindingIndex = getBindingIndex();\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n incrementBindingIndex(8);\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n renderStringify(v5) + i5 + 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 */\nfunction ɵɵattributeInterpolate1(attrName, prefix, v0, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix);\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 */\nfunction ɵɵattributeInterpolate2(attrName, prefix, v0, i0, v1, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix);\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 */\nfunction ɵɵattributeInterpolate3(attrName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1, suffix);\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 */\nfunction ɵɵattributeInterpolate4(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\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 */\nfunction ɵɵattributeInterpolate5(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\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 */\nfunction ɵɵattributeInterpolate6(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\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 */\nfunction ɵɵattributeInterpolate7(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\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 */\nfunction ɵɵattributeInterpolate8(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer, namespace) {\n var lView = getLView();\n var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n ngDevMode &&\n storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n }\n return ɵɵattributeInterpolate8;\n}\n/**\n * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\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 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 */\nfunction ɵɵattributeInterpolateV(attrName, values, sanitizer, namespace) {\n var lView = getLView();\n var interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n var tNode = getSelectedTNode();\n elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);\n if (ngDevMode) {\n var interpolationInBetween = [values[0]]; // prefix\n for (var i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata.apply(void 0, __spread([getTView().data, tNode, 'attr.' + attrName,\n getBindingIndex() - interpolationInBetween.length + 1], interpolationInBetween));\n }\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.\n *\n * @param component The component which the change detection should be performed on.\n */\nfunction detectChanges(component) {\n var view = getComponentViewByInstance(component);\n detectChangesInternal(view[TVIEW], view, component);\n}\n/**\n * Marks the component as dirty (needing change detection). Marking a component dirty will\n * schedule a change detection on it at some point in the future.\n *\n * Marking an already dirty component as dirty won't do anything. Only one outstanding change\n * detection can be scheduled per component tree.\n *\n * @param component Component to mark as dirty.\n */\nfunction 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 * Used to perform change detection on the whole application.\n *\n * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`\n * executes lifecycle hooks and conditionally checks components based on their\n * `ChangeDetectionStrategy` and dirtiness.\n *\n * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally\n * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a\n * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can\n * be changed when calling `renderComponent` and providing the `scheduler` option.\n */\nfunction tick(component) {\n var rootView = getRootView(component);\n var rootContext = rootView[CONTEXT];\n tickRootContext(rootContext);\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 */\nfunction templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n var tViewConsts = tView.consts;\n // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n var tNode = getOrCreateTNode(tView, lView[T_HOST], index, 0 /* Container */, tagName || null, getConstant(tViewConsts, attrsIndex));\n resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n registerPostOrderHooks(tView, tNode);\n var embeddedTView = tNode.tViews = createTView(2 /* Embedded */, -1, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts);\n var embeddedTViewNode = createTNode(tView, null, 2 /* View */, -1, null, null);\n embeddedTViewNode.injectorIndex = tNode.injectorIndex;\n embeddedTView.node = embeddedTViewNode;\n if (tView.queries !== null) {\n tView.queries.template(tView, tNode);\n embeddedTView.queries = tView.queries.embeddedTView(tNode);\n }\n return tNode;\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 decls 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 attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\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 */\nfunction ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {\n var lView = getLView();\n var tView = getTView();\n var adjustedIndex = index + HEADER_OFFSET;\n var tNode = tView.firstCreatePass ?\n templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex];\n setPreviousOrParentTNode(tNode, false);\n var comment = lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n appendChild(tView, lView, comment, tNode);\n attachPatchData(comment, lView);\n addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode));\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n }\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode, localRefExtractor);\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/** Store a value in the `data` at a given `index`. */\nfunction store(tView, lView, index, value) {\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 */\nfunction ɵɵreference(index) {\n var contextLView = getContextLView();\n return load(contextLView, 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 */\nfunction ɵɵdirectiveInject(token, flags) {\n if (flags === void 0) { flags = InjectFlags.Default; }\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 var tNode = getPreviousOrParentTNode();\n return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);\n}\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nfunction ɵɵinjectAttribute(attrNameToInject) {\n return injectAttributeImpl(getPreviousOrParentTNode(), attrNameToInject);\n}\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nfunction ɵɵinvalidFactory() {\n var msg = ngDevMode ? \"This constructor was not compatible with Dependency Injection.\" : 'invalid';\n throw new Error(msg);\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 * @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 */\nfunction ɵɵproperty(propName, value, sanitizer) {\n var lView = getLView();\n var bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵproperty;\n}\n/**\n * Given `<div style=\"...\" my-dir>` and `MyDir` with `@Input('style')` we need to write to\n * directive input.\n */\nfunction setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased) {\n var inputs = tNode.inputs;\n var property = isClassBased ? 'class' : 'style';\n // We support both 'class' and `className` hence the fallback.\n setInputsForProperty(tView, lView, inputs[property], property, 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 */\nfunction elementStartFirstCreatePass(index, tView, lView, native, name, attrsIndex, localRefsIndex) {\n ngDevMode && assertFirstCreatePass(tView);\n ngDevMode && ngDevMode.firstCreatePass++;\n var tViewConsts = tView.consts;\n var attrs = getConstant(tViewConsts, attrsIndex);\n var tNode = getOrCreateTNode(tView, lView[T_HOST], index, 3 /* Element */, name, attrs);\n var hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n ngDevMode && warnAboutUnknownElement(tView, lView, native, tNode, hasDirectives);\n if (tNode.attrs !== null) {\n computeStaticStyling(tNode, tNode.attrs, false);\n }\n if (tNode.mergedAttrs !== null) {\n computeStaticStyling(tNode, tNode.mergedAttrs, true);\n }\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n return tNode;\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 attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\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 */\nfunction ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {\n var lView = getLView();\n var tView = getTView();\n var adjustedIndex = HEADER_OFFSET + index;\n ngDevMode &&\n assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings');\n ngDevMode && ngDevMode.rendererCreateElement++;\n ngDevMode && assertDataInRange(lView, adjustedIndex);\n var renderer = lView[RENDERER];\n var native = lView[adjustedIndex] = elementCreate(name, renderer, getNamespace());\n var tNode = tView.firstCreatePass ?\n elementStartFirstCreatePass(index, tView, lView, native, name, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex];\n setPreviousOrParentTNode(tNode, true);\n var mergedAttrs = tNode.mergedAttrs;\n if (mergedAttrs !== null) {\n setUpAttributes(renderer, native, mergedAttrs);\n }\n var classes = tNode.classes;\n if (classes !== null) {\n writeDirectClass(renderer, native, classes);\n }\n var styles = tNode.styles;\n if (styles !== null) {\n writeDirectStyle(renderer, native, styles);\n }\n appendChild(tView, lView, native, tNode);\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 (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n if (localRefsIndex !== null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n}\n/**\n * Mark the end of the element.\n *\n * @codeGenApi\n */\nfunction ɵɵ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 var tNode = previousOrParentTNode;\n ngDevMode && assertNodeType(tNode, 3 /* Element */);\n decreaseElementDepthCount();\n var tView = getTView();\n if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, previousOrParentTNode);\n if (isContentQueryHost(previousOrParentTNode)) {\n tView.queries.elementEnd(previousOrParentTNode);\n }\n }\n if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);\n }\n if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {\n setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);\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 attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n *\n * @codeGenApi\n */\nfunction ɵɵelement(index, name, attrsIndex, localRefsIndex) {\n ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n ɵɵelementEnd();\n}\nfunction warnAboutUnknownElement(tView, lView, element, tNode, hasDirectives) {\n var schemas = tView.schemas;\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null)\n return;\n var tagName = tNode.tagName;\n // If the element matches any directive, it's considered as valid.\n if (!hasDirectives && tagName !== null) {\n // The element is unknown if it's an instance of HTMLUnknownElement or it isn't registered\n // as a custom element. Note that unknown elements with a dash in their name won't be instances\n // of HTMLUnknownElement in browsers that support web components.\n var isUnknown = \n // Note that we can't check for `typeof HTMLUnknownElement === 'function'`,\n // because while most browsers return 'function', IE returns 'object'.\n (typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement &&\n element instanceof HTMLUnknownElement) ||\n (typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&\n !customElements.get(tagName));\n if (isUnknown && !matchingSchemas(tView, lView, tagName)) {\n var warning = \"'\" + tagName + \"' is not a known element:\\n\";\n warning += \"1. If '\" + tagName + \"' is an Angular component, then verify that it is part of this module.\\n\";\n if (tagName && tagName.indexOf('-') > -1) {\n warning += \"2. If '\" + tagName + \"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\";\n }\n else {\n warning +=\n \"2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.\";\n }\n console.warn(warning);\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 */\nfunction elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) {\n ngDevMode && ngDevMode.firstCreatePass++;\n var tViewConsts = tView.consts;\n var attrs = getConstant(tViewConsts, attrsIndex);\n var tNode = getOrCreateTNode(tView, lView[T_HOST], index, 4 /* ElementContainer */, 'ng-container', 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 if (attrs !== null) {\n computeStaticStyling(tNode, attrs, true);\n }\n var localRefs = getConstant(tViewConsts, localRefsIndex);\n resolveDirectives(tView, lView, tNode, localRefs);\n if (tView.queries !== null) {\n tView.queries.elementStart(tView, tNode);\n }\n return tNode;\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 attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\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 */\nfunction ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {\n var lView = getLView();\n var tView = getTView();\n var adjustedIndex = index + HEADER_OFFSET;\n ngDevMode && assertDataInRange(lView, adjustedIndex);\n ngDevMode &&\n assertEqual(getBindingIndex(), tView.bindingStartIndex, 'element containers should be created before any bindings');\n var tNode = tView.firstCreatePass ?\n elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) :\n tView.data[adjustedIndex];\n setPreviousOrParentTNode(tNode, true);\n ngDevMode && ngDevMode.rendererCreateComment++;\n var native = lView[adjustedIndex] =\n lView[RENDERER].createComment(ngDevMode ? 'ng-container' : '');\n appendChild(tView, lView, native, tNode);\n attachPatchData(native, lView);\n if (isDirectiveHost(tNode)) {\n createDirectivesInstances(tView, lView, tNode);\n executeContentQueries(tView, tNode, lView);\n }\n if (localRefsIndex != null) {\n saveResolvedLocalsInData(lView, tNode);\n }\n}\n/**\n * Mark the end of the <ng-container>.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainerEnd() {\n var previousOrParentTNode = getPreviousOrParentTNode();\n var tView = getTView();\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 if (tView.firstCreatePass) {\n registerPostOrderHooks(tView, previousOrParentTNode);\n if (isContentQueryHost(previousOrParentTNode)) {\n tView.queries.elementEnd(previousOrParentTNode);\n }\n }\n}\n/**\n * Creates an empty logical container using {@link elementContainerStart}\n * and {@link elementContainerEnd}\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainer(index, attrsIndex, localRefsIndex) {\n ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n ɵɵelementContainerEnd();\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 */\nfunction ɵɵ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 */\nfunction 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 */\nfunction 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 */\nfunction ɵɵlistener(eventName, listenerFn, useCapture, eventTargetResolver) {\n if (useCapture === void 0) { useCapture = false; }\n var lView = getLView();\n var tView = getTView();\n var tNode = getPreviousOrParentTNode();\n listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn, useCapture, eventTargetResolver);\n return ɵɵlistener;\n}\n/**\n * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.\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 */\nfunction ɵɵcomponentHostSyntheticListener(eventName, listenerFn, useCapture, eventTargetResolver) {\n if (useCapture === void 0) { useCapture = false; }\n var tNode = getPreviousOrParentTNode();\n var lView = getLView();\n var tView = getTView();\n var currentDef = getCurrentDirectiveDef(tView.data);\n var renderer = loadComponentRenderer(currentDef, tNode, lView);\n listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture, eventTargetResolver);\n return ɵɵcomponentHostSyntheticListener;\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 */\nfunction findExistingListener(tView, lView, eventName, tNodeIdx) {\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}\nfunction listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture, eventTargetResolver) {\n if (useCapture === void 0) { useCapture = false; }\n var isTNodeDirectiveHost = isDirectiveHost(tNode);\n var firstCreatePass = tView.firstCreatePass;\n var tCleanup = firstCreatePass && (tView.cleanup || (tView.cleanup = []));\n // When the ɵɵlistener instruction was generated and is executed we know that there is either a\n // native listener or a directive output on this element. As such we we know that we will have to\n // register a listener and store its cleanup function on LView.\n var lCleanup = getLCleanup(lView);\n ngDevMode &&\n 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 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 && isTNodeDirectiveHost) {\n existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n }\n if (existingListener !== null) {\n // Attach a new listener to coalesced listeners list, maintaining the order in which\n // listeners are registered. For performance reasons, we keep a reference to the last\n // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through\n // the entire set each time we need to add a new listener.\n var lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener;\n lastListenerFn.__ngNextListenerFn__ = listenerFn;\n existingListener.__ngLastListenerFn__ = 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 var outputs = tNode.outputs;\n var props;\n if (processOutputs && outputs !== null && (props = outputs[eventName])) {\n var propsLength = props.length;\n if (propsLength) {\n for (var i = 0; i < propsLength; i += 2) {\n var index = props[i];\n ngDevMode && assertDataInRange(lView, index);\n var minifiedName = props[i + 1];\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}\nfunction 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 */\nfunction 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 // Ivy uses `Function` as a special token that allows us to unwrap the function\n // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`.\n if (e === Function) {\n return listenerFn;\n }\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 & 2 /* isComponentHost */ ?\n getComponentLViewByIndex(tNode.index, lView) :\n 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 */\nfunction ɵɵnextContext(level) {\n if (level === void 0) { level = 1; }\n return nextContextImpl(level);\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 * 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 */\nfunction 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 */\nfunction ɵɵprojectionDef(projectionSlots) {\n var componentNode = getLView()[DECLARATION_COMPONENT_VIEW][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 newArray(numProjectionSlots, 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}\nvar delayProjection = false;\nfunction 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 */\nfunction ɵɵprojection(nodeIndex, selectorIndex, attrs) {\n if (selectorIndex === void 0) { selectorIndex = 0; }\n var lView = getLView();\n var tView = getTView();\n var tProjectionNode = getOrCreateTNode(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 applyProjection(tView, lView, tProjectionNode);\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 */\nfunction ɵɵ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 */\nfunction ɵɵpropertyInterpolate1(propName, prefix, v0, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix);\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 */\nfunction ɵɵpropertyInterpolate2(propName, prefix, v0, i0, v1, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix);\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 */\nfunction ɵɵpropertyInterpolate3(propName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix);\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 */\nfunction ɵɵpropertyInterpolate4(propName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\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 */\nfunction ɵɵpropertyInterpolate5(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\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 */\nfunction ɵɵpropertyInterpolate6(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\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 */\nfunction ɵɵpropertyInterpolate7(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\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 */\nfunction ɵɵpropertyInterpolate8(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n ngDevMode &&\n storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n }\n return ɵɵpropertyInterpolate8;\n}\n/**\n * Update an interpolated property on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\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 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 */\nfunction ɵɵpropertyInterpolateV(propName, values, sanitizer) {\n var lView = getLView();\n var interpolatedValue = interpolationV(lView, values);\n if (interpolatedValue !== NO_CHANGE) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n if (ngDevMode) {\n var interpolationInBetween = [values[0]]; // prefix\n for (var i = 2; i < values.length; i += 2) {\n interpolationInBetween.push(values[i]);\n }\n storePropertyBindingMetadata.apply(void 0, __spread([tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1], interpolationInBetween));\n }\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 * 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 */\nvar EMPTY_OBJ$1 = {};\nvar EMPTY_ARRAY$3 = [];\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {\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$1);\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_ARRAY$3);\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 * NOTE: The word `styling` is used interchangeably as style or class styling.\n *\n * This file contains code to link styling instructions together so that they can be replayed in\n * priority order. The file exists because Ivy styling instruction execution order does not match\n * that of the priority order. The purpose of this code is to create a linked list so that the\n * instructions can be traversed in priority order when computing the styles.\n *\n * Assume we are dealing with the following code:\n * ```\n * @Component({\n * template: `\n * <my-cmp [style]=\" {color: '#001'} \"\n * [style.color]=\" #002 \"\n * dir-style-color-1\n * dir-style-color-2> `\n * })\n * class ExampleComponent {\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#001'});\n * ɵɵstyleProp('color', '#002');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-1]',\n * })\n * class Style1Directive {\n * @HostBinding('style') style = {color: '#005'};\n * @HostBinding('style.color') color = '#006';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#005'});\n * ɵɵstyleProp('color', '#006');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `[dir-style-color-2]',\n * })\n * class Style2Directive {\n * @HostBinding('style') style = {color: '#007'};\n * @HostBinding('style.color') color = '#008';\n *\n * static ngDir = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#007'});\n * ɵɵstyleProp('color', '#008');\n * ...\n * }\n * }\n *\n * @Directive({\n * selector: `my-cmp',\n * })\n * class MyComponent {\n * @HostBinding('style') style = {color: '#003'};\n * @HostBinding('style.color') color = '#004';\n *\n * static ngComp = ... {\n * ...\n * // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n * ɵɵstyleMap({color: '#003'});\n * ɵɵstyleProp('color', '#004');\n * ...\n * }\n * }\n * ```\n *\n * The Order of instruction execution is:\n *\n * NOTE: the comment binding location is for illustrative purposes only.\n *\n * ```\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * ```\n *\n * The correct priority order of concatenation is:\n *\n * ```\n * // MyComponent\n * ɵɵstyleMap({color: '#003'}); // Binding index: 20\n * ɵɵstyleProp('color', '#004'); // Binding index: 22\n * // Style1Directive\n * ɵɵstyleMap({color: '#005'}); // Binding index: 24\n * ɵɵstyleProp('color', '#006'); // Binding index: 26\n * // Style2Directive\n * ɵɵstyleMap({color: '#007'}); // Binding index: 28\n * ɵɵstyleProp('color', '#008'); // Binding index: 30\n * // Template: (ExampleComponent)\n * ɵɵstyleMap({color: '#001'}); // Binding index: 10\n * ɵɵstyleProp('color', '#002'); // Binding index: 12\n * ```\n *\n * What color should be rendered?\n *\n * Once the items are correctly sorted in the list, the answer is simply the last item in the\n * concatenation list which is `#002`.\n *\n * To do so we keep a linked list of all of the bindings which pertain to this element.\n * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows\n * us to traverse them in the order of priority.\n *\n * |Idx|`TView.data`|`LView` | Notes\n * |---|------------|-----------------|--------------\n * |...| | |\n * |10 |`null` |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})`\n * |11 |`30 | 12` | ... |\n * |12 |`color` |`'#002'` | `ɵɵstyleProp('color', '#002')`\n * |13 |`10 | 0` | ... |\n * |...| | |\n * |20 |`null` |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})`\n * |21 |`0 | 22` | ... |\n * |22 |`color` |`'#004'` | `ɵɵstyleProp('color', '#004')`\n * |23 |`20 | 24` | ... |\n * |24 |`null` |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})`\n * |25 |`22 | 26` | ... |\n * |26 |`color` |`'#006'` | `ɵɵstyleProp('color', '#006')`\n * |27 |`24 | 28` | ... |\n * |28 |`null` |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})`\n * |29 |`26 | 30` | ... |\n * |30 |`color` |`'#008'` | `ɵɵstyleProp('color', '#008')`\n * |31 |`28 | 10` | ... |\n *\n * The above data structure allows us to re-concatenate the styling no matter which data binding\n * changes.\n *\n * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next\n * duplicate bit. The duplicate bit if true says there either is a binding with the same name or\n * there is a map (which may contain the name). This information is useful in knowing if other\n * styles with higher priority need to be searched for overwrites.\n *\n * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in\n * `tnode_linked_list_spec.ts` for working example.\n */\nvar __unused_const_as_closure_does_not_like_standalone_comment_blocks__;\n/**\n * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked\n * list of styles and compute the duplicate flag.\n *\n * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`.\n *\n * The function works by keeping track of `tStylingRange` which contains two pointers pointing to\n * the head/tail of the template portion of the styles.\n * - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange`\n * - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange`\n *\n * @param tData The `TData` to insert into.\n * @param tNode `TNode` associated with the styling element.\n * @param tStylingKey See `TStylingKey`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of\n * template.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction insertTStylingBinding(tData, tNode, tStylingKeyWithStatic, index, isHostBinding, isClassBinding) {\n ngDevMode && assertFirstUpdatePass(getTView());\n var tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n var tmplHead = getTStylingRangePrev(tBindings);\n var tmplTail = getTStylingRangeNext(tBindings);\n tData[index] = tStylingKeyWithStatic;\n var isKeyDuplicateOfStatic = false;\n var tStylingKey;\n if (Array.isArray(tStylingKeyWithStatic)) {\n // We are case when the `TStylingKey` contains static fields as well.\n var staticKeyValueArray = tStylingKeyWithStatic;\n tStylingKey = staticKeyValueArray[1]; // unwrap.\n // We need to check if our key is present in the static so that we can mark it as duplicate.\n if (tStylingKey === null ||\n keyValueArrayIndexOf(staticKeyValueArray, tStylingKey) > 0) {\n // tStylingKey is present in the statics, need to mark it as duplicate.\n isKeyDuplicateOfStatic = true;\n }\n }\n else {\n tStylingKey = tStylingKeyWithStatic;\n }\n if (isHostBinding) {\n // We are inserting host bindings\n // If we don't have template bindings then `tail` is 0.\n var hasTemplateBindings = tmplTail !== 0;\n // This is important to know because that means that the `head` can't point to the first\n // template bindings (there are none.) Instead the head points to the tail of the template.\n if (hasTemplateBindings) {\n // template head's \"prev\" will point to last host binding or to 0 if no host bindings yet\n var previousNode = getTStylingRangePrev(tData[tmplHead + 1]);\n tData[index + 1] = toTStylingRange(previousNode, tmplHead);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (previousNode !== 0) {\n // We need to update the template-tail value to point to us.\n tData[previousNode + 1] =\n setTStylingRangeNext(tData[previousNode + 1], index);\n }\n // The \"previous\" of the template binding head should point to this host binding\n tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1], index);\n }\n else {\n tData[index + 1] = toTStylingRange(tmplHead, 0);\n // if a host binding has already been registered, we need to update the next of that host\n // binding to point to this one\n if (tmplHead !== 0) {\n // We need to update the template-tail value to point to us.\n tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1], index);\n }\n // if we don't have template, the head points to template-tail, and needs to be advanced.\n tmplHead = index;\n }\n }\n else {\n // We are inserting in template section.\n // We need to set this binding's \"previous\" to the current template tail\n tData[index + 1] = toTStylingRange(tmplTail, 0);\n ngDevMode &&\n assertEqual(tmplHead !== 0 && tmplTail === 0, false, 'Adding template bindings after hostBindings is not allowed.');\n if (tmplHead === 0) {\n tmplHead = index;\n }\n else {\n // We need to update the previous value \"next\" to point to this binding\n tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1], index);\n }\n tmplTail = index;\n }\n // Now we need to update / compute the duplicates.\n // Starting with our location search towards head (least priority)\n if (isKeyDuplicateOfStatic) {\n tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1]);\n }\n markDuplicates(tData, tStylingKey, index, true, isClassBinding);\n markDuplicates(tData, tStylingKey, index, false, isClassBinding);\n markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);\n tBindings = toTStylingRange(tmplHead, tmplTail);\n if (isClassBinding) {\n tNode.classBindings = tBindings;\n }\n else {\n tNode.styleBindings = tBindings;\n }\n}\n/**\n * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual.\n *\n * @param tNode `TNode` where the residual is stored.\n * @param tStylingKey `TStylingKey` to store.\n * @param tData `TData` associated with the current `LView`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n * `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding) {\n var residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /* or undefined */ && typeof tStylingKey == 'string' &&\n keyValueArrayIndexOf(residual, tStylingKey) >= 0) {\n // We have duplicate in the residual so mark ourselves as duplicate.\n tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1]);\n }\n}\n/**\n * Marks `TStyleValue`s as duplicates if another style binding in the list has the same\n * `TStyleValue`.\n *\n * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once\n * with it set to `false` to search both the previous as well as next items in the list.\n *\n * No duplicate case\n * ```\n * [style.color]\n * [style.width.px] <<- index\n * [style.height.px]\n * ```\n *\n * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no\n * duplicates because `width` is not found in any other part of the linked list.\n *\n * Duplicate case\n * ```\n * [style.color]\n * [style.width.em]\n * [style.width.px] <<- index\n * ```\n * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]`\n * because `width` is found in the chain.\n *\n * Map case 1\n * ```\n * [style.width.px]\n * [style.color]\n * [style] <<- index\n * ```\n * In the above case adding `[style]` will produce a duplicate with any other bindings because\n * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`.\n *\n * Map case 2\n * ```\n * [style]\n * [style.width.px]\n * [style.color] <<- index\n * ```\n * In the above case adding `[style.color]` will produce a duplicate because there is already a\n * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or\n * `width`.\n *\n * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates.\n * NOTE: We use `style` as example, but same logic is applied to `class`es as well.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in\n * the linked list.\n * @param index Starting location in the linked list to search from\n * @param isPrevDir Direction.\n * - `true` for previous (lower priority);\n * - `false` for next (higher priority).\n */\nfunction markDuplicates(tData, tStylingKey, index, isPrevDir, isClassBinding) {\n var tStylingAtIndex = tData[index + 1];\n var isMap = tStylingKey === null;\n var cursor = isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex);\n var foundDuplicate = false;\n // We keep iterating as long as we have a cursor\n // AND either:\n // - we found what we are looking for, OR\n // - we are a map in which case we have to continue searching even after we find what we were\n // looking for since we are a wild card and everything needs to be flipped to duplicate.\n while (cursor !== 0 && (foundDuplicate === false || isMap)) {\n ngDevMode && assertDataInRange(tData, cursor);\n var tStylingValueAtCursor = tData[cursor];\n var tStyleRangeAtCursor = tData[cursor + 1];\n if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n foundDuplicate = true;\n tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) :\n setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n }\n cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) :\n getTStylingRangeNext(tStyleRangeAtCursor);\n }\n if (foundDuplicate) {\n // if we found a duplicate, than mark ourselves.\n tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) :\n setTStylingRangeNextDuplicate(tStylingAtIndex);\n }\n}\n/**\n * Determines if two `TStylingKey`s are a match.\n *\n * When computing weather a binding contains a duplicate, we need to compare if the instruction\n * `TStylingKey` has a match.\n *\n * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is:\n * - `color`\n * - `color` // Match another color\n * - `null` // That means that `tStylingKey` is a `classMap`/`styleMap` instruction\n * - `['', 'color', 'other', true]` // wrapped `color` so match\n * - `['', null, 'other', true]` // wrapped `null` so match\n * - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'`\n * - `null` // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction\n *\n * @param tStylingKeyCursor\n * @param tStylingKey\n */\nfunction isStylingMatch(tStylingKeyCursor, tStylingKey) {\n ngDevMode &&\n assertNotEqual(Array.isArray(tStylingKey), true, 'Expected that \\'tStylingKey\\' has been unwrapped');\n if (tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that\n // location so we must assume that we have a match.\n tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it\n // contains a match.\n (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) ===\n tStylingKey // If the keys match explicitly than we are a match.\n ) {\n return true;\n }\n else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') {\n // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has\n // statics and we need to check those as well.\n return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >=\n 0; // see if we are matching the key\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// Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\nvar parserState = {\n textEnd: 0,\n key: 0,\n keyEnd: 0,\n value: 0,\n valueEnd: 0,\n};\n/**\n * Retrieves the last parsed `key` of style.\n * @param text the text to substring the key from.\n */\nfunction getLastParsedKey(text) {\n return text.substring(parserState.key, parserState.keyEnd);\n}\n/**\n * Retrieves the last parsed `value` of style.\n * @param text the text to substring the key from.\n */\nfunction getLastParsedValue(text) {\n return text.substring(parserState.value, parserState.valueEnd);\n}\n/**\n * Initializes `className` string for parsing and parses the first token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n * @param text `className` to parse\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nfunction parseClassName(text) {\n resetParserState(text);\n return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n/**\n * Parses next `className` token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n * const key = getLastParsedKey();\n * ...\n * }\n * ```\n *\n * @param text `className` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nfunction parseClassNameNext(text, index) {\n var end = parserState.textEnd;\n if (end === index) {\n return -1;\n }\n index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end);\n return consumeWhitespace(text, index, end);\n}\n/**\n * Initializes `cssText` string for parsing and parses the first key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n * ```\n * @param text `cssText` to parse\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nfunction parseStyle(text) {\n resetParserState(text);\n return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n/**\n * Parses the next `cssText` key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n * const key = getLastParsedKey();\n * const value = getLastParsedValue();\n * ...\n * }\n *\n * @param text `cssText` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nfunction parseStyleNext(text, startIndex) {\n var end = parserState.textEnd;\n var index = parserState.key = consumeWhitespace(text, startIndex, end);\n if (end === index) {\n // we reached an end so just quit\n return -1;\n }\n index = parserState.keyEnd = consumeStyleKey(text, index, end);\n index = consumeSeparator(text, index, end, 58 /* COLON */);\n index = parserState.value = consumeWhitespace(text, index, end);\n index = parserState.valueEnd = consumeStyleValue(text, index, end);\n return consumeSeparator(text, index, end, 59 /* SEMI_COLON */);\n}\n/**\n * Reset the global state of the styling parser.\n * @param text The styling text to parse.\n */\nfunction resetParserState(text) {\n parserState.key = 0;\n parserState.keyEnd = 0;\n parserState.value = 0;\n parserState.valueEnd = 0;\n parserState.textEnd = text.length;\n}\n/**\n * Returns index of next non-whitespace character.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at\n * that location.)\n */\nfunction consumeWhitespace(text, startIndex, endIndex) {\n while (startIndex < endIndex && text.charCodeAt(startIndex) <= 32 /* SPACE */) {\n startIndex++;\n }\n return startIndex;\n}\n/**\n * Returns index of last char in class token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last char in class token.\n */\nfunction consumeClassToken(text, startIndex, endIndex) {\n while (startIndex < endIndex && text.charCodeAt(startIndex) > 32 /* SPACE */) {\n startIndex++;\n }\n return startIndex;\n}\n/**\n * Consumes all of the characters belonging to style key and token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style key character.\n */\nfunction consumeStyleKey(text, startIndex, endIndex) {\n var ch;\n while (startIndex < endIndex &&\n ((ch = text.charCodeAt(startIndex)) === 45 /* DASH */ || ch === 95 /* UNDERSCORE */ ||\n ((ch & -33 /* UPPER_CASE */) >= 65 /* A */ && (ch & -33 /* UPPER_CASE */) <= 90 /* Z */))) {\n startIndex++;\n }\n return startIndex;\n}\n/**\n * Consumes all whitespace and the separator `:` after the style key.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after separator and surrounding whitespace.\n */\nfunction consumeSeparator(text, startIndex, endIndex, separator) {\n startIndex = consumeWhitespace(text, startIndex, endIndex);\n if (startIndex < endIndex) {\n if (ngDevMode && text.charCodeAt(startIndex) !== separator) {\n malformedStyleError(text, String.fromCharCode(separator), startIndex);\n }\n startIndex++;\n }\n return startIndex;\n}\n/**\n * Consumes style value honoring `url()` and `\"\"` text.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style value character.\n */\nfunction consumeStyleValue(text, startIndex, endIndex) {\n var ch1 = -1; // 1st previous character\n var ch2 = -1; // 2nd previous character\n var ch3 = -1; // 3rd previous character\n var i = startIndex;\n var lastChIndex = i;\n while (i < endIndex) {\n var ch = text.charCodeAt(i++);\n if (ch === 59 /* SEMI_COLON */) {\n return lastChIndex;\n }\n else if (ch === 34 /* DOUBLE_QUOTE */ || ch === 39 /* SINGLE_QUOTE */) {\n lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n }\n else if (startIndex ===\n i - 4 && // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n ch3 === 85 /* U */ &&\n ch2 === 82 /* R */ && ch1 === 76 /* L */ && ch === 40 /* OPEN_PAREN */) {\n lastChIndex = i = consumeQuotedText(text, 41 /* CLOSE_PAREN */, i, endIndex);\n }\n else if (ch > 32 /* SPACE */) {\n // if we have a non-whitespace character then capture its location\n lastChIndex = i;\n }\n ch3 = ch2;\n ch2 = ch1;\n ch1 = ch & -33 /* UPPER_CASE */;\n }\n return lastChIndex;\n}\n/**\n * Consumes all of the quoted characters.\n *\n * @param text Text to scan\n * @param quoteCharCode CharCode of either `\"` or `'` quote or `)` for `url(...)`.\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after quoted characters.\n */\nfunction consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {\n var ch1 = -1; // 1st previous character\n var index = startIndex;\n while (index < endIndex) {\n var ch = text.charCodeAt(index++);\n if (ch == quoteCharCode && ch1 !== 92 /* BACK_SLASH */) {\n return index;\n }\n if (ch == 92 /* BACK_SLASH */ && ch1 === 92 /* BACK_SLASH */) {\n // two back slashes cancel each other out. For example `\"\\\\\"` should properly end the\n // quotation. (It should not assume that the last `\"` is escaped.)\n ch1 = 0;\n }\n else {\n ch1 = ch;\n }\n }\n throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) :\n new Error();\n}\nfunction malformedStyleError(text, expecting, index) {\n ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');\n throw throwError(\"Malformed style at location \" + index + \" in string '\" + text.substring(0, index) + '[>>' +\n text.substring(index, index + 1) + '<<]' + text.substr(index + 1) +\n (\"'. Expecting '\" + expecting + \"'.\"));\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 * 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 * `advance(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 */\nfunction ɵɵstyleSanitizer(sanitizer) {\n setCurrentStyleSanitizer(sanitizer);\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 prop A valid CSS property.\n * @param value New value to write (`null` or an empty string 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 *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding function.\n *\n * @codeGenApi\n */\nfunction ɵɵstyleProp(prop, value, suffix) {\n checkStylingProperty(prop, value, suffix, false);\n return ɵɵstyleProp;\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 prop A valid CSS class (only one).\n * @param value A true/false value which will turn the class on or off.\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 function.\n *\n * @codeGenApi\n */\nfunction ɵɵclassProp(className, value) {\n checkStylingProperty(className, value, null, true);\n return ɵɵclassProp;\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 */\nfunction ɵɵstyleMap(styles) {\n checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);\n}\n/**\n * Parse text as style and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵstyleMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nfunction styleStringParser(keyValueArray, text) {\n for (var i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {\n styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));\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 */\nfunction ɵɵclassMap(classes) {\n checkStylingMap(keyValueArraySet, classStringParser, classes, true);\n}\n/**\n * Parse text as class and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵclassMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nfunction classStringParser(keyValueArray, text) {\n for (var i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\n }\n}\n/**\n * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.\n *\n * @param prop property name.\n * @param value binding value.\n * @param suffixOrSanitizer suffix or sanitization function\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingProperty(prop, value, suffixOrSanitizer, isClassBased) {\n var lView = getLView();\n var tView = getTView();\n // Styling instructions use 2 slots per binding.\n // 1. one for the value / TStylingKey\n // 2. one for the intermittent-value / TStylingRange\n var bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n }\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n // This is a work around. Once PR#34480 lands the sanitizer is passed explicitly and this line\n // can be removed.\n var styleSanitizer = void 0;\n if (suffixOrSanitizer == null) {\n if (styleSanitizer = getCurrentStyleSanitizer()) {\n suffixOrSanitizer = styleSanitizer;\n }\n }\n var tNode = tView.data[getSelectedIndex() + HEADER_OFFSET];\n updateStyling(tView, tNode, lView, lView[RENDERER], prop, lView[bindingIndex + 1] = normalizeAndApplySuffixOrSanitizer(value, suffixOrSanitizer), isClassBased, bindingIndex);\n }\n}\n/**\n * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that\n * `style` can pass in version which does sanitization. This is done for tree shaking\n * purposes.\n * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`\n * have different parsers.)\n * @param value bound value from application\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingMap(keyValueArraySet, stringParser, value, isClassBased) {\n var tView = getTView();\n var bindingIndex = incrementBindingIndex(2);\n if (tView.firstUpdatePass) {\n stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n }\n var lView = getLView();\n if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n var tNode = tView.data[getSelectedIndex() + HEADER_OFFSET];\n if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {\n if (ngDevMode) {\n // verify that if we are shadowing then `TData` is appropriately marked so that we skip\n // processing this binding in styling resolution.\n var tStylingKey = tView.data[bindingIndex];\n assertEqual(Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false, 'Styling linked list shadow input should be marked as \\'false\\'');\n }\n // VE does not concatenate the static portion like we are doing here.\n // Instead VE just ignores the static completely if dynamic binding is present.\n // Because of locality we have already set the static portion because we don't know if there\n // is a dynamic portion until later. If we would ignore the static portion it would look like\n // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong\n // thing as it would think that the static portion was removed. For this reason we\n // concatenate it so that `[ngStyle]`/`[ngClass]` can continue to work on changed.\n var staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n ngDevMode && isClassBased === false && staticPrefix !== null &&\n assertEqual(staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \\';\\'');\n if (staticPrefix !== null) {\n // We want to make sure that falsy values of `value` become empty strings.\n value = concatStringsWithSpace(staticPrefix, value ? value : '');\n }\n // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n // This takes over the `[style]` binding. (Same for `[class]`)\n setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n }\n else {\n updateStylingMap(tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1], lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value), isClassBased, bindingIndex);\n }\n }\n}\n/**\n * Determines when the binding is in `hostBindings` section\n *\n * @param tView Current `TView`\n * @param bindingIndex index of binding which we would like if it is in `hostBindings`\n */\nfunction isInHostBindings(tView, bindingIndex) {\n // All host bindings are placed after the expando section.\n return bindingIndex >= tView.expandoStartIndex;\n}\n/**\n * Collects the necessary information to insert the binding into a linked list of style bindings\n * using `insertTStylingBinding`.\n *\n * @param tView `TView` where the binding linked list will be stored.\n * @param tStylingKey Property/key of the binding.\n * @param bindingIndex Index of binding associated with the `prop`\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) {\n ngDevMode && assertFirstUpdatePass(tView);\n var tData = tView.data;\n if (tData[bindingIndex + 1] === null) {\n // The above check is necessary because we don't clear first update pass until first successful\n // (no exception) template execution. This prevents the styling instruction from double adding\n // itself to the list.\n // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n // if so as not to read unnecessarily.\n var tNode = tData[getSelectedIndex() + HEADER_OFFSET];\n var isHostBindings = isInHostBindings(tView, bindingIndex);\n if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {\n // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.\n // If there is a directive which uses `@Input('style')` or `@Input('class')` than\n // we need to neutralize this binding since that directive is shadowing it.\n // We turn this into a noop by setting the key to `false`\n tStylingKey = false;\n }\n tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\n }\n}\n/**\n * Adds static styling information to the binding if applicable.\n *\n * The linked list of styles not only stores the list and keys, but also stores static styling\n * information on some of the keys. This function determines if the key should contain the styling\n * information and computes it.\n *\n * See `TStylingStatic` for more details.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction wrapInStaticStylingKey(tData, tNode, stylingKey, isClassBased) {\n var hostDirectiveDef = getCurrentDirectiveDef(tData);\n var residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (hostDirectiveDef === null) {\n // We are in template node.\n // If template node already had styling instruction then it has already collected the static\n // styling and there is no need to collect them again. We know that we are the first styling\n // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).\n var isFirstStylingInstructionInTemplate = (isClassBased ? tNode.classBindings : tNode.styleBindings) === 0;\n if (isFirstStylingInstructionInTemplate) {\n // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point\n // they are already merged and it would not be possible to figure which property belongs where\n // in the priority.\n stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);\n stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);\n // We know that if we have styling binding in template we can't have residual.\n residual = null;\n }\n }\n else {\n // We are in host binding node and there was no binding instruction in template node.\n // This means that we need to compute the residual.\n var directiveStylingLast = tNode.directiveStylingLast;\n var isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n if (isFirstStylingInstructionInHostBinding) {\n stylingKey =\n collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);\n if (residual === null) {\n // - If `null` than either:\n // - Template styling instruction already ran and it has consumed the static\n // styling into its `TStylingKey` and so there is no need to update residual. Instead\n // we need to update the `TStylingKey` associated with the first template node\n // instruction. OR\n // - Some other styling instruction ran and determined that there are no residuals\n var templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {\n // Only recompute if `templateStylingKey` had static values. (If no static value found\n // then there is nothing to do since this operation can only produce less static keys, not\n // more.)\n templateStylingKey = collectStylingFromDirectives(null, tData, tNode, templateStylingKey[1] /* unwrap previous statics */, isClassBased);\n templateStylingKey =\n collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased);\n setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);\n }\n }\n else {\n // We only need to recompute residual if it is not `null`.\n // - If existing residual (implies there was no template styling). This means that some of\n // the statics may have moved from the residual to the `stylingKey` and so we have to\n // recompute.\n // - If `undefined` this is the first time we are running.\n residual = collectResidual(tData, tNode, isClassBased);\n }\n }\n }\n if (residual !== undefined) {\n isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual);\n }\n return stylingKey;\n}\n/**\n * Retrieve the `TStylingKey` for the template styling instruction.\n *\n * This is needed since `hostBinding` styling instructions are inserted after the template\n * instruction. While the template instruction needs to update the residual in `TNode` the\n * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because\n * the template instruction is downstream from the `hostBindings` instructions.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @return `TStylingKey` if found or `undefined` if not found.\n */\nfunction getTemplateHeadTStylingKey(tData, tNode, isClassBased) {\n var bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n if (getTStylingRangeNext(bindings) === 0) {\n // There does not seem to be a styling instruction in the `template`.\n return undefined;\n }\n return tData[getTStylingRangePrev(bindings)];\n}\n/**\n * Update the `TStylingKey` of the first template instruction in `TNode`.\n *\n * Logically `hostBindings` styling instructions are of lower priority than that of the template.\n * However, they execute after the template styling instructions. This means that they get inserted\n * in front of the template styling instructions.\n *\n * If we have a template styling instruction and a new `hostBindings` styling instruction is\n * executed it means that it may need to steal static fields from the template instruction. This\n * method allows us to update the first template instruction `TStylingKey` with a new value.\n *\n * Assume:\n * ```\n * <div my-dir style=\"color: red\" [style.color]=\"tmplExp\"></div>\n *\n * @Directive({\n * host: {\n * 'style': 'width: 100px',\n * '[style.color]': 'dirExp',\n * }\n * })\n * class MyDir {}\n * ```\n *\n * when `[style.color]=\"tmplExp\"` executes it creates this data structure.\n * ```\n * ['', 'color', 'color', 'red', 'width', '100px'],\n * ```\n *\n * The reason for this is that the template instruction does not know if there are styling\n * instructions and must assume that there are none and must collect all of the static styling.\n * (both\n * `color' and 'width`)\n *\n * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.\n * ```\n * ['', 'color', 'width', '100px'], // newly inserted\n * ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong\n * ```\n *\n * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to\n * update it like so:\n * ```\n * ['', 'color', 'width', '100px'],\n * ['', 'color', 'color', 'red'], // UPDATE\n * ```\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param tStylingKey New `TStylingKey` which is replacing the old one.\n */\nfunction setTemplateHeadTStylingKey(tData, tNode, isClassBased, tStylingKey) {\n var bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n ngDevMode &&\n assertNotEqual(getTStylingRangeNext(bindings), 0, 'Expecting to have at least one template styling binding.');\n tData[getTStylingRangePrev(bindings)] = tStylingKey;\n}\n/**\n * Collect all static values after the current `TNode.directiveStylingLast` index.\n *\n * Collect the remaining styling information which has not yet been collected by an existing\n * styling instruction.\n *\n * @param tData `TData` where the `DirectiveDefs` are stored.\n * @param tNode `TNode` which contains the directive range.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectResidual(tData, tNode, isClassBased) {\n var residual = undefined;\n var directiveEnd = tNode.directiveEnd;\n ngDevMode &&\n assertNotEqual(tNode.directiveStylingLast, -1, 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.');\n // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are\n // collecting things after the last `hostBindings` directive which had a styling instruction.)\n for (var i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n var attrs = tData[i].hostAttrs;\n residual = collectStylingFromTAttrs(residual, attrs, isClassBased);\n }\n return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased);\n}\n/**\n * Collect the static styling information with lower priority than `hostDirectiveDef`.\n *\n * (This is opposite of residual styling.)\n *\n * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static\n * styling. (Or `null` if template styling)\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey Existing `TStylingKey` to update or wrap.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased) {\n // We need to loop because there can be directives which have `hostAttrs` but don't have\n // `hostBindings` so this loop catches up to the current directive..\n var currentDirective = null;\n var directiveEnd = tNode.directiveEnd;\n var directiveStylingLast = tNode.directiveStylingLast;\n if (directiveStylingLast === -1) {\n directiveStylingLast = tNode.directiveStart;\n }\n else {\n directiveStylingLast++;\n }\n while (directiveStylingLast < directiveEnd) {\n currentDirective = tData[directiveStylingLast];\n ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n if (currentDirective === hostDirectiveDef)\n break;\n directiveStylingLast++;\n }\n if (hostDirectiveDef !== null) {\n // we only advance the styling cursor if we are collecting data from host bindings.\n // Template executes before host bindings and so if we would update the index,\n // host bindings would not get their statics.\n tNode.directiveStylingLast = directiveStylingLast;\n }\n return stylingKey;\n}\n/**\n * Convert `TAttrs` into `TStylingStatic`.\n *\n * @param stylingKey existing `TStylingKey` to update or wrap.\n * @param attrs `TAttributes` to process.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromTAttrs(stylingKey, attrs, isClassBased) {\n var desiredMarker = isClassBased ? 1 /* Classes */ : 2 /* Styles */;\n var currentMarker = -1 /* ImplicitAttributes */;\n if (attrs !== null) {\n for (var i = 0; i < attrs.length; i++) {\n var item = attrs[i];\n if (typeof item === 'number') {\n currentMarker = item;\n }\n else {\n if (currentMarker === desiredMarker) {\n if (!Array.isArray(stylingKey)) {\n stylingKey = stylingKey === undefined ? [] : ['', stylingKey];\n }\n keyValueArraySet(stylingKey, item, isClassBased ? true : attrs[++i]);\n }\n }\n }\n }\n return stylingKey === undefined ? null : stylingKey;\n}\n/**\n * Convert user input to `KeyValueArray`.\n *\n * This function takes user input which could be `string`, Object literal, or iterable and converts\n * it into a consistent representation. The output of this is `KeyValueArray` (which is an array\n * where\n * even indexes contain keys and odd indexes contain values for those keys).\n *\n * The advantage of converting to `KeyValueArray` is that we can perform diff in an input\n * independent\n * way.\n * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be\n * applied)\n *\n * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the\n * difference in linear fashion without the need to allocate any additional data.\n *\n * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine\n * which values need to be deleted, over the new `Map` to determine additions, and we would have to\n * keep additional `Map` to keep track of duplicates or items which have not yet been visited.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n * function so that\n * `style` can pass in version which does sanitization. This is done for tree shaking\n * purposes.\n * @param stringParser The parser is passed in so that it will be tree shakable. See\n * `styleStringParser` and `classStringParser`\n * @param value The value to parse/convert to `KeyValueArray`\n */\nfunction toStylingKeyValueArray(keyValueArraySet, stringParser, value) {\n if (value == null /*|| value === undefined */ || value === '')\n return EMPTY_ARRAY$3;\n var styleKeyValueArray = [];\n var unwrappedValue = unwrapSafeValue(value);\n if (Array.isArray(unwrappedValue)) {\n for (var i = 0; i < unwrappedValue.length; i++) {\n keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n }\n }\n else if (typeof unwrappedValue === 'object') {\n for (var key in unwrappedValue) {\n if (unwrappedValue.hasOwnProperty(key)) {\n keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);\n }\n }\n }\n else if (typeof unwrappedValue === 'string') {\n stringParser(styleKeyValueArray, unwrappedValue);\n }\n else {\n ngDevMode &&\n throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);\n }\n return styleKeyValueArray;\n}\n/**\n * Set a `value` for a `key` taking style sanitization into account.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add. (This key will be checked if it needs sanitization)\n * @param value The value to set (If key needs sanitization it will be sanitized)\n */\nfunction styleKeyValueArraySet(keyValueArray, key, value) {\n if (stylePropNeedsSanitization(key)) {\n value = ɵɵsanitizeStyle(value);\n }\n keyValueArraySet(keyValueArray, key, value);\n}\n/**\n * Update map based styling.\n *\n * Map based styling could be anything which contains more than one binding. For example `string`,\n * or object literal. Dealing with all of these types would complicate the logic so\n * instead this function expects that the complex input is first converted into normalized\n * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it\n * very cheap to compute deltas between the previous and current value.\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param oldKeyValueArray Previous value represented as `KeyValueArray`\n * @param newKeyValueArray Current value represented as `KeyValueArray`\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStylingMap(tView, tNode, lView, renderer, oldKeyValueArray, newKeyValueArray, isClassBased, bindingIndex) {\n if (oldKeyValueArray === NO_CHANGE) {\n // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n oldKeyValueArray = EMPTY_ARRAY$3;\n }\n var oldIndex = 0;\n var newIndex = 0;\n var oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n var newKey = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n while (oldKey !== null || newKey !== null) {\n ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');\n ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');\n var oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n var newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n var setKey = null;\n var setValue = undefined;\n if (oldKey === newKey) {\n // UPDATE: Keys are equal => new value is overwriting old value.\n oldIndex += 2;\n newIndex += 2;\n if (oldValue !== newValue) {\n setKey = newKey;\n setValue = newValue;\n }\n }\n else if (newKey === null || oldKey !== null && oldKey < newKey) {\n // DELETE: oldKey key is missing or we did not find the oldKey in the newValue\n // (because the keyValueArray is sorted and `newKey` is found later alphabetically).\n // `\"background\" < \"color\"` so we need to delete `\"background\"` because it is not found in the\n // new array.\n oldIndex += 2;\n setKey = oldKey;\n }\n else {\n // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.\n // `\"color\" > \"background\"` so we need to add `color` because it is in new array but not in\n // old array.\n ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');\n newIndex += 2;\n setKey = newKey;\n setValue = newValue;\n }\n if (setKey !== null) {\n updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n }\n oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\n }\n}\n/**\n * Update a simple (property name) styling.\n *\n * This function takes `prop` and updates the DOM to that value. The function takes the binding\n * value as well as binding priority into consideration to determine which value should be written\n * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks\n * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param prop Either style property name or a class name.\n * @param value Either style value for `prop` or `true`/`false` if `prop` is class.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStyling(tView, tNode, lView, renderer, prop, value, isClassBased, bindingIndex) {\n if (tNode.type !== 3 /* Element */) {\n // It is possible to have styling on non-elements (such as ng-container).\n // This is rare, but it does happen. In such a case, just ignore the binding.\n return;\n }\n var tData = tView.data;\n var tRange = tData[bindingIndex + 1];\n var higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ?\n findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) :\n undefined;\n if (!isStylingValuePresent(higherPriorityValue)) {\n // We don't have a next duplicate, or we did not find a duplicate value.\n if (!isStylingValuePresent(value)) {\n // We should delete current value or restore to lower priority value.\n if (getTStylingRangePrevDuplicate(tRange)) {\n // We have a possible prev duplicate, let's retrieve it.\n value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);\n }\n }\n var rNode = getNativeByIndex(getSelectedIndex(), lView);\n applyStyling(renderer, isClassBased, rNode, prop, value);\n }\n}\n/**\n * Search for styling value with higher priority which is overwriting current value, or a\n * value of lower priority to which we should fall back if the value is `undefined`.\n *\n * When value is being applied at a location, related values need to be consulted.\n * - If there is a higher priority binding, we should be using that one instead.\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp1`\n * requires that we check `exp2` to see if it is set to value other than `undefined`.\n * - If there is a lower priority binding and we are changing to `undefined`\n * For example `<div [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp2` to\n * `undefined` requires that we check `exp1` (and static values) and use that as new value.\n *\n * NOTE: The styling stores two values.\n * 1. The raw value which came from the application is stored at `index + 0` location. (This value\n * is used for dirty checking).\n * 2. The normalized value (converted to `KeyValueArray` if map and sanitized) is stored at `index +\n * 1`.\n * The advantage of storing the sanitized value is that once the value is written we don't need\n * to worry about sanitizing it later or keeping track of the sanitizer.\n *\n * @param tData `TData` used for traversing the priority.\n * @param tNode `TNode` to use for resolving static styling. Also controls search direction.\n * - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n * If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n * - `null` search prev and go all the way to end. Return last value where\n * `isStylingValuePresent(value)` is true.\n * @param lView `LView` used for retrieving the actual values.\n * @param prop Property which we are interested in.\n * @param index Starting index in the linked list of styling bindings where the search should start.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction findStylingValue(tData, tNode, lView, prop, index, isClassBased) {\n // `TNode` to use for resolving static styling. Also controls search direction.\n // - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n // If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n // - `null` search prev and go all the way to end. Return last value where\n // `isStylingValuePresent(value)` is true.\n var isPrevDirection = tNode === null;\n var value = undefined;\n while (index > 0) {\n var rawKey = tData[index];\n var containsStatics = Array.isArray(rawKey);\n // Unwrap the key if we contain static values.\n var key = containsStatics ? rawKey[1] : rawKey;\n var isStylingMap = key === null;\n var valueAtLViewIndex = lView[index + 1];\n if (valueAtLViewIndex === NO_CHANGE) {\n // In firstUpdatePass the styling instructions create a linked list of styling.\n // On subsequent passes it is possible for a styling instruction to try to read a binding\n // which\n // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that\n // we have `undefined` (or empty array in case of styling-map instruction) instead. This\n // allows the resolution to apply the value (which may later be overwritten when the\n // binding actually executes.)\n valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY$3 : undefined;\n }\n var currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) :\n key === prop ? valueAtLViewIndex : undefined;\n if (containsStatics && !isStylingValuePresent(currentValue)) {\n currentValue = keyValueArrayGet(rawKey, prop);\n }\n if (isStylingValuePresent(currentValue)) {\n value = currentValue;\n if (isPrevDirection) {\n return value;\n }\n }\n var tRange = tData[index + 1];\n index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n }\n if (tNode !== null) {\n // in case where we are going in next direction AND we did not find anything, we need to\n // consult residual styling\n var residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n if (residual != null /** OR residual !=== undefined */) {\n value = keyValueArrayGet(residual, prop);\n }\n }\n return value;\n}\n/**\n * Determines if the binding value should be used (or if the value is 'undefined' and hence priority\n * resolution should be used.)\n *\n * @param value Binding style value.\n */\nfunction isStylingValuePresent(value) {\n // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't\n // have an opinion as to what this binding should be and you should consult other bindings by\n // priority to determine the valid value.\n // This is extracted into a single function so that we have a single place to control this.\n return value !== undefined;\n}\n/**\n * Sanitizes or adds suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffixOrSanitizer\n */\nfunction normalizeAndApplySuffixOrSanitizer(value, suffixOrSanitizer) {\n if (value == null /** || value === undefined */) {\n // do nothing\n }\n else if (typeof suffixOrSanitizer === 'function') {\n // sanitize the value.\n value = suffixOrSanitizer(value);\n }\n else if (typeof suffixOrSanitizer === 'string') {\n value = value + suffixOrSanitizer;\n }\n else if (typeof value === 'object') {\n value = stringify(unwrapSafeValue(value));\n }\n return value;\n}\n/**\n * Tests if the `TNode` has input shadow.\n *\n * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or\n * `@Input('class')` as input.\n *\n * @param tNode `TNode` which we would like to see if it has shadow.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction hasStylingInputShadow(tNode, isClassBased) {\n return (tNode.flags & (isClassBased ? 16 /* hasClassInput */ : 32 /* hasStyleInput */)) !== 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/**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Static string value to write.\n *\n * @codeGenApi\n */\nfunction ɵɵtext(index, value) {\n if (value === void 0) { value = ''; }\n var lView = getLView();\n var tView = getTView();\n var adjustedIndex = index + HEADER_OFFSET;\n ngDevMode &&\n assertEqual(getBindingIndex(), tView.bindingStartIndex, 'text nodes should be created before any bindings');\n ngDevMode && assertDataInRange(lView, adjustedIndex);\n var tNode = tView.firstCreatePass ?\n getOrCreateTNode(tView, lView[T_HOST], index, 3 /* Element */, null, null) :\n tView.data[adjustedIndex];\n var textNative = lView[adjustedIndex] = createTextNode(value, lView[RENDERER]);\n appendChild(tView, lView, textNative, tNode);\n // Text nodes are self closing.\n setPreviousOrParentTNode(tNode, 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 *\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 */\nfunction ɵɵ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 */\nfunction ɵɵtextInterpolate1(prefix, v0, suffix) {\n var lView = getLView();\n var interpolated = interpolation1(lView, prefix, v0, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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 */\nfunction ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) {\n var lView = getLView();\n var interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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 */\nfunction ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n var lView = getLView();\n var interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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 */\nfunction ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var lView = getLView();\n var interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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 */\nfunction ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var lView = getLView();\n var interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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 */\nfunction ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var lView = getLView();\n var interpolated = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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 */\nfunction ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var lView = getLView();\n var interpolated = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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 */\nfunction ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var lView = getLView();\n var interpolated = interpolation8(lView, 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, getSelectedIndex(), 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 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 */\nfunction ɵɵtextInterpolateV(values) {\n var lView = getLView();\n var interpolated = interpolationV(lView, values);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, getSelectedIndex(), 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 * Update an interpolated class 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 class=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');\n * ```\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 * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate1(prefix, v0, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate2(prefix, v0, i0, v1, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class 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 class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n * Update an interpolated class on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The 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 * @codeGenApi\n */\nfunction ɵɵclassMapInterpolateV(values) {\n var lView = getLView();\n var interpolatedValue = interpolationV(lView, values);\n checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\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 an interpolated style 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 style=\"key: {{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');\n * ```\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 * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate1(prefix, v0, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key1: {{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate2(prefix, v0, i0, v1, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate3(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate4(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate5(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};\n * key5: {{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate6(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate7(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style 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 style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate8(\n * 'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, 'suffix');\n * ```\n *\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 * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var lView = getLView();\n var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n ɵɵstyleMap(interpolatedValue);\n}\n/**\n * Update an interpolated style on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * class=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n * key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolateV(\n * ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n * '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);\n * ```\n *.\n * @param values The 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, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolateV(values) {\n var lView = getLView();\n var interpolatedValue = interpolationV(lView, values);\n ɵɵstyleMap(interpolatedValue);\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 an interpolated style 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 style.color=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate1(prop, prefix, v0, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate1;\n}\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate2(prop, prefix, v0, i0, v1, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate2;\n}\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate3(prop, prefix, v0, i0, v1, i1, v2, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate3;\n}\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate4(prop, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate4;\n}\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate5(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate5;\n}\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate6(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate6;\n}\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate7(\n * 0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate7(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate7;\n}\n/**\n *\n * Update an interpolated style 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 style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,\n * '-', v7, 'suffix');\n * ```\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 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate8(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolate8;\n}\n/**\n * Update an interpolated style property on an element with 9 or more bound values surrounded by\n * text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n * style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\">\n * </div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolateV(\n * 0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\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 values The 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 valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolateV(prop, values, valueSuffix) {\n var lView = getLView();\n var interpolatedValue = interpolationV(lView, values);\n checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n return ɵɵstylePropInterpolateV;\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 host element. Only applies to native node properties, not inputs.\n *\n * Operates on the element selected by index via the {@link select} instruction.\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 * @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 */\nfunction ɵɵhostProperty(propName, value, sanitizer) {\n var lView = getLView();\n var bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵhostProperty;\n}\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.\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 *\n * @codeGenApi\n */\nfunction ɵɵupdateSyntheticHostBinding(propName, value, sanitizer) {\n var lView = getLView();\n var bindingIndex = nextBindingIndex();\n if (bindingUpdated(lView, bindingIndex, value)) {\n var tView = getTView();\n var tNode = getSelectedTNode();\n var currentDef = getCurrentDirectiveDef(tView.data);\n var renderer = loadComponentRenderer(currentDef, tNode, lView);\n elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);\n ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n }\n return ɵɵupdateSyntheticHostBinding;\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 the component instance associated with a given DOM element.\n *\n * @usageNotes\n * Given the following DOM structure:\n * ```html\n * <my-app>\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </my-app>\n * ```\n * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`\n * associated with this DOM element.\n *\n * Calling the function on `<my-app>` will return the `MyApp` instance.\n *\n *\n * @param element DOM element from which the component should be retrieved.\n * @returns Component instance associated with the element or `null` if there\n * is no component associated with it.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getComponent(element) {\n assertDomElement(element);\n var context = loadLContext(element, false);\n if (context === null)\n return null;\n if (context.component === undefined) {\n context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);\n }\n return context.component;\n}\n/**\n * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded\n * view that the element is part of. Otherwise retrieves the instance of the component whose view\n * owns the element (in this case, the result is the same as calling `getOwningComponent`).\n *\n * @param element Element for which to get the surrounding component instance.\n * @returns Instance of the component that is around the element or null if the element isn't\n * inside any component.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getContext(element) {\n assertDomElement(element);\n var context = loadLContext(element, false);\n return context === null ? null : context.lView[CONTEXT];\n}\n/**\n * Retrieves the component instance whose view contains the DOM element.\n *\n * For example, if `<child-comp>` is used in the template of `<app-comp>`\n * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>`\n * would return `<app-comp>`.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Component instance whose view owns the DOM element or null if the element is not\n * part of a component view.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getOwningComponent(elementOrDir) {\n var context = loadLContext(elementOrDir, false);\n if (context === null)\n return null;\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 * Retrieves all root components associated with a DOM element, directive or component instance.\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param elementOrDir DOM element, component or directive instance\n * for which to retrieve the root components.\n * @returns Root components associated with the target object.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getRootComponents(elementOrDir) {\n return __spread(getRootContext(elementOrDir).components);\n}\n/**\n * Retrieves an `Injector` associated with an element, component or directive instance.\n *\n * @param elementOrDir DOM element, component or directive instance for which to\n * retrieve the injector.\n * @returns Injector associated with the element, component or directive instance.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getInjector(elementOrDir) {\n var context = loadLContext(elementOrDir, false);\n if (context === null)\n return Injector.NULL;\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 */\nfunction getInjectionTokens(element) {\n var context = loadLContext(element, false);\n if (context === null)\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 directive instances associated with a given DOM element. Does not include\n * component instances.\n *\n * @usageNotes\n * Given the following DOM structure:\n * ```\n * <my-app>\n * <button my-button></button>\n * <my-comp></my-comp>\n * </my-app>\n * ```\n * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`\n * directive that is associated with the DOM element.\n *\n * Calling `getDirectives` on `<my-comp>` will return an empty array.\n *\n * @param element DOM element for which to get the directives.\n * @returns Array of directives associated with the element.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getDirectives(element) {\n var context = loadLContext(element);\n if (context.directives === undefined) {\n context.directives = getDirectivesAtNodeIndex(context.nodeIndex, context.lView, false);\n }\n // The `directives` in this case are a named array called `LComponentView`. Clone the\n // result so we don't expose an internal data structure in the user's console.\n return context.directives === null ? [] : __spread(context.directives);\n}\nfunction 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 DOM element, component or directive instance for which to retrieve\n * the local references.\n */\nfunction getLocalRefs(target) {\n var context = loadLContext(target, false);\n if (context === null)\n return {};\n if (context.localRefs === undefined) {\n context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);\n }\n return context.localRefs || {};\n}\n/**\n * Retrieves the host element of a component or directive instance.\n * The host element is the DOM element that matched the selector of the directive.\n *\n * @param componentOrDirective Component or directive instance for which the host\n * element should be retrieved.\n * @returns Host element of the target.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getHostElement(componentOrDirective) {\n return getLContext(componentOrDirective).native;\n}\n/**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\nfunction getRenderedText(component) {\n var hostElement = getHostElement(component);\n return hostElement.textContent || '';\n}\nfunction loadLContextFromNode(node) {\n if (!(node instanceof Node))\n throw new Error('Expecting instance of DOM Element');\n return loadLContext(node);\n}\n/**\n * Retrieves a list of event listeners associated with a DOM element. The list does include host\n * listeners, but it does not include event listeners defined outside of the Angular context\n * (e.g. through `addEventListener`).\n *\n * @usageNotes\n * Given the following DOM structure:\n * ```\n * <my-app>\n * <div (click)=\"doSomething()\"></div>\n * </my-app>\n *\n * ```\n * Calling `getListeners` on `<div>` will return an object that looks as follows:\n * ```\n * {\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 * @returns Array of event listeners on the DOM element.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getListeners(element) {\n assertDomElement(element);\n var lContext = loadLContext(element, false);\n if (lContext === null)\n return [];\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 type = (typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0) ? 'dom' : 'output';\n var useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n if (element == listenerElement) {\n listeners.push({ element: element, name: name_1, callback: callback, useCapture: useCapture, type: type });\n }\n }\n }\n }\n listeners.sort(sortListeners);\n return listeners;\n}\nfunction 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 */\nfunction isDirectiveDefHack(obj) {\n return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;\n}\n/**\n * Returns the attached `DebugNode` instance for an element in the DOM.\n *\n * @param element DOM element which is owned by an existing component's view.\n */\nfunction getDebugNode(element) {\n var debugNode = null;\n var lContext = loadLContextFromNode(element);\n var lView = lContext.lView;\n var nodeIndex = lContext.nodeIndex;\n if (nodeIndex !== -1) {\n var valueInLView = lView[nodeIndex];\n // this means that value in the lView is a component with its own\n // data. In this situation the TNode is not accessed at the same spot.\n var tNode = isLView(valueInLView) ? valueInLView[T_HOST] :\n getTNode(lView[TVIEW], nodeIndex - HEADER_OFFSET);\n debugNode = buildDebugNode(tNode, lView, nodeIndex);\n }\n return debugNode;\n}\n/**\n * Retrieve the component `LView` from component/element.\n *\n * NOTE: `LView` is a private and should not be leaked outside.\n * Don't export this method to `ng.*` on window.\n *\n * @param target DOM element or component instance for which to retrieve the LView.\n */\nfunction getComponentLView(target) {\n var lContext = loadLContext(target);\n var nodeIndx = lContext.nodeIndex;\n var lView = lContext.lView;\n var componentLView = lView[nodeIndx];\n ngDevMode && assertLView(componentLView);\n return componentLView;\n}\n/** Asserts that a value is a DOM Element. */\nfunction assertDomElement(value) {\n if (typeof Element !== 'undefined' && !(value instanceof Element)) {\n throw new Error('Expecting instance of DOM Element');\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 * Marks a component for check (in case of OnPush components) and synchronously\n * performs change detection on the application this component belongs to.\n *\n * @param component Component to {@link ChangeDetectorRef#markForCheck mark for check}.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction applyChanges(component) {\n markDirty(component);\n getRootComponents(component).forEach(function (rootComponent) { return detectChanges(rootComponent); });\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 --config=ivy\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 * */\nvar GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\nvar _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 */\nfunction publishDefaultGlobalUtils() {\n if (!_published) {\n _published = true;\n publishGlobalUtil('getComponent', getComponent);\n publishGlobalUtil('getContext', getContext);\n publishGlobalUtil('getListeners', getListeners);\n publishGlobalUtil('getOwningComponent', getOwningComponent);\n publishGlobalUtil('getHostElement', getHostElement);\n publishGlobalUtil('getInjector', getInjector);\n publishGlobalUtil('getRootComponents', getRootComponents);\n publishGlobalUtil('getDirectives', getDirectives);\n publishGlobalUtil('applyChanges', applyChanges);\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 */\nfunction publishGlobalUtil(name, fn) {\n if (typeof COMPILED === 'undefined' || !COMPILED) {\n // Note: we can't export `ng` when using closure enhanced optimization as:\n // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n // - we can't declare a closure extern as the namespace `ng` is already used within Google\n // for typings for AngularJS (via `goog.provide('ng....')`).\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/**\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 */\nvar ɵ0$b = function (token, notFoundValue) {\n throw new Error('NullInjector: Not found: ' + stringifyForError(token));\n};\n// TODO: A hack to not pull in the NullInjector from @angular/core.\nvar NULL_INJECTOR$1 = {\n get: ɵ0$b\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 */\nfunction renderComponent$1(componentType /* Type as workaround for: Microsoft/TypeScript/issues/4881 */, opts) {\n if (opts === void 0) { opts = {}; }\n ngDevMode && publishDefaultGlobalUtils();\n ngDevMode && assertComponentType(componentType);\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 hostRenderer = rendererFactory.createRenderer(null, null);\n var hostRNode = locateHostElement(hostRenderer, opts.host || componentTag, componentDef.encapsulation);\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 rootTView = createTView(0 /* Root */, -1, null, 1, 0, null, null, null, null, null);\n var rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, undefined, opts.injector || null);\n enterView(rootView, null);\n var component;\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 // create mode pass\n renderView(rootTView, rootView, null);\n // update mode pass\n refreshView(rootTView, rootView, null, null);\n }\n finally {\n leaveView();\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 hostRenderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nfunction createRootComponentView(rNode, def, rootView, rendererFactory, hostRenderer, sanitizer) {\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 mergedAttrs = tNode.mergedAttrs = def.hostAttrs;\n if (mergedAttrs !== null) {\n computeStaticStyling(tNode, mergedAttrs, true);\n if (rNode !== null) {\n setUpAttributes(hostRenderer, rNode, mergedAttrs);\n if (tNode.classes !== null) {\n writeDirectClass(hostRenderer, rNode, tNode.classes);\n }\n if (tNode.styles !== null) {\n writeDirectStyle(hostRenderer, rNode, tNode.styles);\n }\n }\n }\n var viewRenderer = rendererFactory.createRenderer(rNode, def);\n var componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[HEADER_OFFSET], tNode, rendererFactory, viewRenderer, sanitizer);\n if (tView.firstCreatePass) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);\n markAsComponentHost(tView, tNode);\n initTNodeFlags(tNode, rootView.length, 1);\n }\n addToViewTree(rootView, componentView);\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 */\nfunction createRootComponent(componentView, componentDef, rootLView, rootContext, hostFeatures) {\n var tView = rootLView[TVIEW];\n // Create directive instance with factory() and store at next index in viewData\n var component = instantiateRootComponent(tView, rootLView, 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, rootLView.length - 1);\n }\n var rootTNode = getPreviousOrParentTNode();\n if (tView.firstCreatePass &&\n (componentDef.hostBindings !== null || componentDef.hostAttrs !== null)) {\n var elementIndex = rootTNode.index - HEADER_OFFSET;\n setSelectedIndex(elementIndex);\n var rootTView = rootLView[TVIEW];\n addHostBindingsToExpandoInstructions(rootTView, componentDef);\n growHostVarsSpace(rootTView, rootLView, componentDef.hostVars);\n invokeHostBindingsInCreationMode(componentDef, component);\n }\n return component;\n}\nfunction 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, {hostFeatures: [LifecycleHooksFeature]});\n * ```\n */\nfunction LifecycleHooksFeature(component, def) {\n var rootTView = readPatchedLView(component)[TVIEW];\n var dirIndex = rootTView.data.length - 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 */\nfunction 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 */\nfunction 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 */\nfunction ɵɵInheritDefinitionFeature(definition) {\n var superType = getSuperType(definition.type);\n var shouldInheritFields = true;\n var inheritanceChain = [definition];\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.ɵcmp || superType.ɵdir;\n }\n else {\n if (superType.ɵcmp) {\n throw new Error('Directives cannot inherit Components');\n }\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir;\n }\n if (superDef) {\n if (shouldInheritFields) {\n inheritanceChain.push(superDef);\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 var writeableDef = definition;\n writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\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 // Merge animations metadata.\n // If `superDef` is a Component, the `data` field is present (defaults to an empty object).\n if (isComponentDef(superDef) && superDef.data.animation) {\n // If super def is a Component, the `definition` is also a Component, since Directives can\n // not inherit Components (we throw an error above and cannot reach this code).\n var defData = definition.data;\n defData.animation = (defData.animation || []).concat(superDef.data.animation);\n }\n // Inherit hooks\n // Assume super class inheritance feature has already run.\n writeableDef.afterContentChecked =\n writeableDef.afterContentChecked || superDef.afterContentChecked;\n writeableDef.afterContentInit = definition.afterContentInit || superDef.afterContentInit;\n writeableDef.afterViewChecked = definition.afterViewChecked || superDef.afterViewChecked;\n writeableDef.afterViewInit = definition.afterViewInit || superDef.afterViewInit;\n writeableDef.doCheck = definition.doCheck || superDef.doCheck;\n writeableDef.onDestroy = definition.onDestroy || superDef.onDestroy;\n writeableDef.onInit = definition.onInit || superDef.onInit;\n }\n // Run parent features\n var features = superDef.features;\n if (features) {\n for (var i = 0; i < features.length; i++) {\n var feature = features[i];\n if (feature && feature.ngInherit) {\n feature(definition);\n }\n // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this\n // def already has all the necessary information inherited from its super class(es), so we\n // can stop merging fields from super classes. However we need to iterate through the\n // prototype chain to look for classes that might contain other \"features\" (like\n // NgOnChanges), which we should invoke for the original `definition`. We set the\n // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance\n // logic and only invoking functions from the \"features\" list.\n if (feature === ɵɵInheritDefinitionFeature) {\n shouldInheritFields = false;\n }\n }\n }\n }\n superType = Object.getPrototypeOf(superType);\n }\n mergeHostAttrsAcrossInheritance(inheritanceChain);\n}\n/**\n * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class.\n *\n * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing\n * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child\n * type.\n */\nfunction mergeHostAttrsAcrossInheritance(inheritanceChain) {\n var hostVars = 0;\n var hostAttrs = null;\n // We process the inheritance order from the base to the leaves here.\n for (var i = inheritanceChain.length - 1; i >= 0; i--) {\n var def = inheritanceChain[i];\n // For each `hostVars`, we need to add the superclass amount.\n def.hostVars = (hostVars += def.hostVars);\n // for each `hostAttrs` we need to merge it with superclass.\n def.hostAttrs =\n mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs));\n }\n}\nfunction maybeUnwrapEmpty(value) {\n if (value === EMPTY_OBJ) {\n return {};\n }\n else if (value === EMPTY_ARRAY) {\n return [];\n }\n else {\n return value;\n }\n}\nfunction 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}\nfunction 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}\nfunction inheritHostBindings(definition, superHostBindings) {\n var prevHostBindings = definition.hostBindings;\n if (prevHostBindings) {\n definition.hostBindings = function (rf, ctx) {\n superHostBindings(rf, ctx);\n prevHostBindings(rf, ctx);\n };\n }\n else {\n definition.hostBindings = superHostBindings;\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 * Fields which exist on either directive or component definitions, and need to be copied from\n * parent to child classes by the `ɵɵCopyDefinitionFeature`.\n */\nvar COPY_DIRECTIVE_FIELDS = [\n // The child class should use the providers of its parent.\n 'providersResolver',\n];\n/**\n * Fields which exist only on component definitions, and need to be copied from parent to child\n * classes by the `ɵɵCopyDefinitionFeature`.\n *\n * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`,\n * since those should go in `COPY_DIRECTIVE_FIELDS` above.\n */\nvar COPY_COMPONENT_FIELDS = [\n // The child class should use the template function of its parent, including all template\n // semantics.\n 'template',\n 'decls',\n 'consts',\n 'vars',\n 'onPush',\n 'ngContentSelectors',\n // The child class should use the CSS styles of its parent, including all styling semantics.\n 'styles',\n 'encapsulation',\n // The child class should be checked by the runtime in the same way as its parent.\n 'schemas',\n];\n/**\n * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a\n * definition.\n *\n * This exists primarily to support ngcc migration of an existing View Engine pattern, where an\n * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it\n * generates a skeleton definition on the child class, and applies this feature.\n *\n * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,\n * including things like the component template function.\n *\n * @param definition The definition of a child class which inherits from a parent class with its\n * own definition.\n *\n * @codeGenApi\n */\nfunction ɵɵCopyDefinitionFeature(definition) {\n var e_1, _a, e_2, _b;\n var superType = getSuperType(definition.type);\n var superDef = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵcmp;\n }\n else {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ɵdir;\n }\n // Needed because `definition` fields are readonly.\n var defAny = definition;\n try {\n // Copy over any fields that apply to either directives or components.\n for (var COPY_DIRECTIVE_FIELDS_1 = __values(COPY_DIRECTIVE_FIELDS), COPY_DIRECTIVE_FIELDS_1_1 = COPY_DIRECTIVE_FIELDS_1.next(); !COPY_DIRECTIVE_FIELDS_1_1.done; COPY_DIRECTIVE_FIELDS_1_1 = COPY_DIRECTIVE_FIELDS_1.next()) {\n var field = COPY_DIRECTIVE_FIELDS_1_1.value;\n defAny[field] = superDef[field];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (COPY_DIRECTIVE_FIELDS_1_1 && !COPY_DIRECTIVE_FIELDS_1_1.done && (_a = COPY_DIRECTIVE_FIELDS_1.return)) _a.call(COPY_DIRECTIVE_FIELDS_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (isComponentDef(superDef)) {\n try {\n // Copy over any component-specific fields.\n for (var COPY_COMPONENT_FIELDS_1 = __values(COPY_COMPONENT_FIELDS), COPY_COMPONENT_FIELDS_1_1 = COPY_COMPONENT_FIELDS_1.next(); !COPY_COMPONENT_FIELDS_1_1.done; COPY_COMPONENT_FIELDS_1_1 = COPY_COMPONENT_FIELDS_1.next()) {\n var field = COPY_COMPONENT_FIELDS_1_1.value;\n defAny[field] = superDef[field];\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (COPY_COMPONENT_FIELDS_1_1 && !COPY_COMPONENT_FIELDS_1_1.done && (_b = COPY_COMPONENT_FIELDS_1.return)) _b.call(COPY_COMPONENT_FIELDS_1);\n }\n finally { if (e_2) throw e_2.error; }\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 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 */\nvar 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 () {\n return this.firstChange;\n };\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 */\nvar PRIVATE_PREFIX = '__ngOnChanges_';\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 ɵcmp = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵNgOnChangesFeature(definition) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n definition.onChanges = wrapOnChanges();\n }\n}\n// This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\nɵɵNgOnChangesFeature.ngInherit = true;\nfunction 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}\nfunction 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}\nvar SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\nfunction getSimpleChangesStore(instance) {\n return instance[SIMPLE_CHANGES_STORE] || null;\n}\nfunction 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/**\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 */\nfunction providersResolver(def, providers, viewProviders) {\n var tView = getTView();\n if (tView.firstCreatePass) {\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 */\nfunction 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 tView = getTView();\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 (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), tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\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), tView, token);\n var factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\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 var indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex :\n existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex :\n existingViewProvidersFactoryIndex, indexInFactory);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n }\n }\n }\n}\n/**\n * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks.\n * @param tView `TView` in which to register the hook.\n * @param provider Provider whose hook should be registered.\n * @param contextIndex Index under which to find the context for the hook when it's being invoked.\n * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi\n * provider factory.\n */\nfunction registerDestroyHooksIfSupported(tView, provider, contextIndex, indexInFactory) {\n var providerIsTypeProvider = isTypeProvider(provider);\n if (providerIsTypeProvider || isClassProvider(provider)) {\n var prototype = (provider.useClass || provider).prototype;\n var ngOnDestroy = prototype.ngOnDestroy;\n if (ngOnDestroy) {\n var hooks = tView.destroyHooks || (tView.destroyHooks = []);\n if (!providerIsTypeProvider && provider.multi) {\n ngDevMode &&\n assertDefined(indexInFactory, 'indexInFactory when registering multi factory destroy hook');\n var existingCallbacksIndex = hooks.indexOf(contextIndex);\n if (existingCallbacksIndex === -1) {\n hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);\n }\n else {\n hooks[existingCallbacksIndex + 1].push(indexInFactory, ngOnDestroy);\n }\n }\n else {\n hooks.push(contextIndex, ngOnDestroy);\n }\n }\n }\n}\n/**\n * Add a factory in a multi factory.\n * @returns Index at which the factory was inserted.\n */\nfunction multiFactoryAdd(multiFactory, factory, isComponentProvider) {\n if (isComponentProvider) {\n multiFactory.componentProviders++;\n }\n return multiFactory.multi.push(factory) - 1;\n}\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\nfunction 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 */\nfunction 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 */\nfunction multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n var factories = this.multi;\n var result;\n if (this.providerFactory) {\n var componentCount = this.providerFactory.componentProviders;\n var multiProviders = getNodeInjectable(lView, lView[TVIEW], 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 */\nfunction 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 */\nfunction 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 ɵcmp = defineComponent({\n * type: ComponentWithProviders,\n * selectors: [['component-with-providers']],\n * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n * decls: 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 * ɵɵtextInterpolate(ctx.greeter.greet());\n * }\n * },\n * features: [ProvidersFeature([GreeterDE])]\n * });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\nfunction ɵɵ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 */\nvar 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 */\nvar 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 */\nfunction 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}\nvar ERROR_COMPONENT = 'ngComponent';\nfunction getComponent$1(error) {\n return error[ERROR_COMPONENT];\n}\nvar _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 */\nvar ComponentFactoryResolver = /** @class */ (function () {\n function ComponentFactoryResolver() {\n }\n ComponentFactoryResolver.NULL = new _NullComponentFactoryResolver();\n return ComponentFactoryResolver;\n}());\nvar 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}());\nvar 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 */\nfunction 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.\nvar 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}());\nvar SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = injectElementRef;\nvar SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;\nvar SWITCH_ELEMENT_REF_FACTORY = SWITCH_ELEMENT_REF_FACTORY__POST_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 */\nvar Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nvar RendererFactory2 = /** @class */ (function () {\n function RendererFactory2() {\n }\n return RendererFactory2;\n}());\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nvar RendererStyleFlags2;\n(function (RendererStyleFlags2) {\n // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\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})(RendererStyleFlags2 || (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 */\nvar 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}());\nvar SWITCH_RENDERER2_FACTORY__POST_R3__ = injectRenderer2;\nvar SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;\nvar SWITCH_RENDERER2_FACTORY = SWITCH_RENDERER2_FACTORY__POST_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 * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nvar Sanitizer = /** @class */ (function () {\n function Sanitizer() {\n }\n /** @nocollapse */\n Sanitizer.ɵprov = ɵɵdefineInjectable({\n token: Sanitizer,\n providedIn: 'root',\n factory: function () { return null; },\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 * @description Represents the version of Angular\n *\n * @publicApi\n */\nvar 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 */\nvar VERSION = new Version('9.1.11');\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 */\nvar DefaultIterableDifferFactory = /** @class */ (function () {\n function DefaultIterableDifferFactory() {\n }\n DefaultIterableDifferFactory.prototype.supports = function (obj) {\n return isListLikeIterable$1(obj);\n };\n DefaultIterableDifferFactory.prototype.create = function (trackByFn) {\n return new DefaultIterableDiffer(trackByFn);\n };\n return DefaultIterableDifferFactory;\n}());\nvar trackByIdentity = function (index, item) { return item; };\nvar ɵ0$c = trackByIdentity;\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nvar 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$1(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$1(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}());\nvar 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\nvar _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}());\nvar _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 () {\n return this.map.size === 0;\n },\n enumerable: true,\n configurable: true\n });\n _DuplicateMap.prototype.clear = function () {\n this.map.clear();\n };\n return _DuplicateMap;\n}());\nfunction 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 */\nvar DefaultKeyValueDifferFactory = /** @class */ (function () {\n function DefaultKeyValueDifferFactory() {\n }\n DefaultKeyValueDifferFactory.prototype.supports = function (obj) {\n return obj instanceof Map || isJsObject$1(obj);\n };\n DefaultKeyValueDifferFactory.prototype.create = function () {\n return new DefaultKeyValueDiffer();\n };\n return DefaultKeyValueDifferFactory;\n}());\nvar 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$1(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}());\nvar 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 */\nvar 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.ɵprov = ɵɵdefineInjectable({\n token: IterableDiffers,\n providedIn: 'root',\n factory: function () { return new IterableDiffers([new DefaultIterableDifferFactory()]); }\n });\n return IterableDiffers;\n}());\nfunction 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 */\nvar 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.ɵprov = ɵɵ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 * Structural diffing for `Object`s and `Map`s.\n */\nvar keyValDiff = [new DefaultKeyValueDifferFactory()];\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nvar iterableDiff = [new DefaultIterableDifferFactory()];\nvar defaultIterableDiffers = new IterableDiffers(iterableDiff);\nvar 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 */\nvar 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}());\nvar SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = injectTemplateRef;\nvar SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;\nvar SWITCH_TEMPLATE_REF_FACTORY = SWITCH_TEMPLATE_REF_FACTORY__POST_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 */\nvar 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}());\nvar SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = injectViewContainerRef;\nvar SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop;\nvar SWITCH_VIEW_CONTAINER_REF_FACTORY = SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_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 */\nfunction 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}\nfunction 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}\nfunction viewDebugError(msg, context) {\n var err = new Error(msg);\n _addDebugContext(err, context);\n return err;\n}\nfunction _addDebugContext(err, context) {\n err[ERROR_DEBUG_CONTEXT] = context;\n err[ERROR_LOGGER] = context.logError.bind(context);\n}\nfunction isViewDebugError(err) {\n return !!getDebugContext(err);\n}\nfunction 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.\nfunction 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.\nfunction 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 * Node instance data.\n *\n * We have a separate type per NodeType to save memory\n * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)\n *\n * To keep our code monomorphic,\n * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).\n * This way, no usage site can get a `NodeData` from view.nodes and then use it for different\n * purposes.\n */\nvar NodeData = /** @class */ (function () {\n function NodeData() {\n }\n return NodeData;\n}());\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asTextData(view, index) {\n return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asElementData(view, index) {\n return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asProviderData(view, index) {\n return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asPureExpressionData(view, index) {\n return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asQueryList(view, index) {\n return view.nodes[index];\n}\nvar 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 */\nvar 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 */\nvar NOOP = function () { };\nvar _tokenKeyCache = new Map();\nfunction 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}\nfunction 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}\nvar UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\nvar 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!\nfunction createRendererType2(values) {\n return {\n id: UNDEFINED_RENDERER_TYPE_ID,\n styles: values.styles,\n encapsulation: values.encapsulation,\n data: values.data\n };\n}\nvar _renderCompCount$1 = 0;\nfunction 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 !== ViewEncapsulation$1.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}\nfunction 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}\nfunction 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}\nfunction checkBindingNoChanges(view, def, bindingIdx, value) {\n var oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n if ((view.state & 1 /* BeforeFirstCheck */) || !devModeEqual$1(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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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 */\nfunction viewParentEl(view) {\n var parentView = view.parent;\n if (parentView) {\n return view.parentNodeDef.parent;\n }\n else {\n return null;\n }\n}\nfunction 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}\nfunction elementEventFullName(target, name) {\n return target ? target + \":\" + name : name;\n}\nfunction isComponentView(view) {\n return !!view.parent && !!(view.parentNodeDef.flags & 32768 /* Component */);\n}\nfunction isEmbeddedView(view) {\n return !!view.parent && !(view.parentNodeDef.flags & 32768 /* Component */);\n}\nfunction filterQueryId(queryId) {\n return 1 << (queryId % 32);\n}\nfunction 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}\nfunction 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}\nfunction 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 === ViewEncapsulation$1.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}\nvar DEFINITION_CACHE = new WeakMap();\nfunction 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}\nfunction rootRenderNodes(view) {\n var renderNodes = [];\n visitRootRenderNodes(view, 0 /* Collect */, undefined, undefined, renderNodes);\n return renderNodes;\n}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nvar NS_PREFIX_RE = /^:([^:]+):(.+)$/;\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction _toStringWithNull(v) {\n return v != null ? v.toString() : '';\n}\nvar EMPTY_ARRAY$4 = [];\nvar 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 */\nvar UNDEFINED_VALUE = {};\nvar InjectorRefTokenKey = tokenKey(Injector);\nvar INJECTORRefTokenKey = tokenKey(INJECTOR);\nvar NgModuleRefTokenKey = tokenKey(NgModuleRef);\nfunction 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,\n flags: flags,\n token: token,\n value: value\n };\n}\nfunction moduleDef(providers) {\n var providersByKey = {};\n var modules = [];\n var scope = null;\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n if (provider.token === INJECTOR_SCOPE) {\n scope = provider.value;\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 scope: scope,\n };\n}\nfunction initNgModule(data) {\n var def = data._def;\n var providers = data._providers = newArray(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}\nfunction 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: [],\n 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}\nfunction moduleTransitivelyPresent(ngModule, scope) {\n return ngModule._def.modules.indexOf(scope) > -1;\n}\nfunction targetsModule(ngModule, def) {\n var providedIn = def.providedIn;\n return providedIn != null &&\n (providedIn === 'any' || providedIn === ngModule._def.scope ||\n moduleTransitivelyPresent(ngModule, providedIn));\n}\nfunction _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}\nfunction _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 = [];\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}\nfunction _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 = [];\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}\nfunction 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 */\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction renderAttachEmbeddedView(elementData, prevView, view) {\n var prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) : 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}\nfunction renderDetachView$1(view) {\n visitRootRenderNodes(view, 3 /* RemoveChild */, null, 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 */\nvar EMPTY_CONTEXT = {};\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) {\n return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n}\nfunction getComponentViewDefinitionFactory(componentFactory) {\n return componentFactory.viewDefFactory;\n}\nvar 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));\nvar 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 () {\n return new Injector_(this._view, this._elDef);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentRef_.prototype, \"componentType\", {\n get: function () {\n return this._component.constructor;\n },\n enumerable: true,\n configurable: true\n });\n ComponentRef_.prototype.destroy = function () {\n this._viewRef.destroy();\n };\n ComponentRef_.prototype.onDestroy = function (callback) {\n this._viewRef.onDestroy(callback);\n };\n return ComponentRef_;\n}(ComponentRef));\nfunction createViewContainerData(view, elDef, elData) {\n return new ViewContainerRef_(view, elDef, elData);\n}\nvar 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 () {\n return new ElementRef(this._data.renderElement);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"injector\", {\n get: function () {\n return new Injector_(this._view, this._elDef);\n },\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 () {\n return this._embeddedViews.length;\n },\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}());\nfunction createChangeDetectorRef(view) {\n return new ViewRef_(view);\n}\nvar 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 () {\n return rootRenderNodes(this._view);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef_.prototype, \"context\", {\n get: function () {\n return this._view.context;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef_.prototype, \"destroyed\", {\n get: function () {\n return (this._view.state & 128 /* Destroyed */) !== 0;\n },\n enumerable: true,\n configurable: true\n });\n ViewRef_.prototype.markForCheck = function () {\n markParentViewsForCheck(this._view);\n };\n ViewRef_.prototype.detach = function () {\n this._view.state &= ~4 /* Attached */;\n };\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 () {\n Services.checkNoChangesView(this._view);\n };\n ViewRef_.prototype.reattach = function () {\n this._view.state |= 4 /* Attached */;\n };\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}());\nfunction createTemplateData(view, def) {\n return new TemplateRef_(view, def);\n}\nvar 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));\nfunction createInjector$1(view, elDef) {\n return new Injector_(view, elDef);\n}\nvar 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}());\nfunction 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}\nfunction createNgModuleRef(moduleType, parent, bootstrapComponents, def) {\n return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n}\nvar 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 = InjectFlags.Default; }\n var flags = 0 /* None */;\n if (injectFlags & InjectFlags.SkipSelf) {\n flags |= 1 /* SkipSelf */;\n }\n else if (injectFlags & 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 () {\n return this.get(this._moduleType);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgModuleRef_.prototype, \"componentFactoryResolver\", {\n get: function () {\n return this.get(ComponentFactoryResolver);\n },\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) {\n this._destroyListeners.push(callback);\n };\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 */\nvar Renderer2TokenKey = tokenKey(Renderer2);\nvar ElementRefTokenKey = tokenKey(ElementRef);\nvar ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\nvar TemplateRefTokenKey = tokenKey(TemplateRef);\nvar ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\nvar InjectorRefTokenKey$1 = tokenKey(Injector);\nvar INJECTORRefTokenKey$1 = tokenKey(INJECTOR);\nfunction 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,\n 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}\nfunction pipeDef(flags, ctor, deps) {\n flags |= 16 /* TypePipe */;\n return _def(-1, flags, null, 0, ctor, ctor, deps);\n}\nfunction providerDef(flags, matchedQueries, token, value, deps) {\n return _def(-1, flags, matchedQueries, 0, token, value, deps);\n}\nfunction _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,\n matchedQueries: matchedQueries,\n matchedQueryIds: matchedQueryIds,\n references: references,\n ngContentIndex: -1,\n childCount: childCount,\n bindings: bindings,\n bindingFlags: calcBindingFlags(bindings),\n outputs: outputs,\n element: null,\n provider: { token: token, value: value, deps: depDefs },\n text: null,\n query: null,\n ngContent: null\n };\n}\nfunction createProviderInstance(view, def) {\n return _createProviderInstance$1(view, def);\n}\nfunction 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}\nfunction 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}\nfunction eventHandlerClosure(view, index, eventName) {\n return function (event) { return dispatchEvent(view, index, eventName, event); };\n}\nfunction 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}\nfunction 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}\nfunction _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}\nfunction 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 = [];\n for (var i = 0; i < len; i++) {\n depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n }\n return new (ctor.bind.apply(ctor, __spread([void 0], depValues)))();\n }\n}\nfunction 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 = [];\n for (var i = 0; i < len; i++) {\n depValues.push(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)\nvar NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\nfunction 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 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}\nfunction 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}\nfunction 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().\nfunction 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}\nfunction 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}\nfunction 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 */\nvar 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));\nfunction 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}\nfunction getNamespace$1(elementName) {\n var name = elementName.toLowerCase();\n return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);\n}\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 */\nvar SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {\n providedIn: 'root',\n factory: function () { return defaultScheduler; },\n});\nfunction 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 */\nvar 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 = stringifyCSSSelectorList(componentDef.selectors);\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 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 hostRenderer = rendererFactory.createRenderer(null, this.componentDef);\n // Determine a tag name used for creating host elements when this component is created\n // dynamically. Default to 'div' if this component did not specify any tag name in its selector.\n var elementName = this.componentDef.selectors[0][0] || 'div';\n var hostRNode = rootSelectorOrNode ?\n locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) :\n elementCreate(elementName, rendererFactory.createRenderer(null, this.componentDef), getNamespace$1(elementName));\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 = createRootContext();\n // Create the root view. Uses empty TView and ContentTemplate.\n var rootTView = createTView(0 /* Root */, -1, null, 1, 0, null, null, null, null, null);\n var rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector);\n // rootView is the parent when bootstrapping\n // TODO(misko): it looks like we are entering view here but we don't really need to as\n // `renderView` does that. However as the code is written it is needed because\n // `createRootComponentView` and `createRootComponent` both read global state. Fixing those\n // issues would allow us to drop this.\n enterView(rootLView, null);\n var component;\n var tElementNode;\n try {\n var componentView = createRootComponentView(hostRNode, this.componentDef, rootLView, rendererFactory, hostRenderer);\n if (hostRNode) {\n if (rootSelectorOrNode) {\n setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]);\n }\n else {\n // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`\n // is not defined), also apply attributes and classes extracted from component selector.\n // Extract attributes and classes from the first selector only to match VE behavior.\n var _a = extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]), attrs = _a.attrs, classes = _a.classes;\n if (attrs) {\n setUpAttributes(hostRenderer, hostRNode, attrs);\n }\n if (classes && classes.length > 0) {\n writeDirectClass(hostRenderer, hostRNode, classes.join(' '));\n }\n }\n }\n tElementNode = getTNode(rootTView, 0);\n if (projectableNodes !== undefined) {\n var projection = tElementNode.projection = [];\n for (var i = 0; i < this.ngContentSelectors.length; i++) {\n var nodesforSlot = projectableNodes[i];\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 // We also normalize the length of the passed in projectable nodes (to match the number of\n // <ng-container> slots defined by a component).\n projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);\n }\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 renderView(rootTView, rootLView, null);\n }\n finally {\n leaveView();\n }\n var componentRef = new ComponentRef$1(this.componentType, component, createElementRef(ElementRef, tElementNode, rootLView), rootLView, tElementNode);\n if (!rootSelectorOrNode || isIsolated) {\n // The host element of the internal or isolated root view is attached to the component's host\n // view node.\n ngDevMode && assertNodeOfPossibleTypes(rootTView.node, 2 /* View */);\n rootTView.node.child = tElementNode;\n }\n return componentRef;\n };\n return ComponentFactory;\n}(ComponentFactory));\nvar componentFactoryResolver = new ComponentFactoryResolver$1();\n/**\n * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the\n * ComponentFactoryResolver\n * already exists, retrieves the existing ComponentFactoryResolver.\n *\n * @returns The ComponentFactoryResolver instance to use\n */\nfunction injectComponentFactoryResolver() {\n return componentFactoryResolver;\n}\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 */\nvar 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 assignTViewNodeToLView(_rootLView[TVIEW], null, -1, _rootLView);\n _this.componentType = componentType;\n return _this;\n }\n Object.defineProperty(ComponentRef.prototype, \"injector\", {\n get: function () {\n return new NodeInjector(this._tNode, this._rootLView);\n },\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 */\nif (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// THIS CODE IS GENERATED - DO NOT MODIFY\n// See angular/tools/gulp-tasks/cldr/extract.js\nvar u = undefined;\nfunction 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}\nvar localeEn = [\n 'en',\n [['a', 'p'], ['AM', 'PM'], u],\n [['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,\n [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']],\n 0,\n [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'],\n ['{1}, {0}', u, '{1} \\'at\\' {0}', u],\n ['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],\n ['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'],\n 'USD',\n '$',\n 'US Dollar',\n {},\n 'ltr',\n 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 * This const is used to store the locale data registered with `registerLocaleData`\n */\nvar LOCALE_DATA = {};\n/**\n * Register locale data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n#i18n-pipes) to know how to import additional locale data.\n *\n * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1\n */\nfunction registerLocaleData(data, localeId, extraData) {\n if (typeof localeId !== 'string') {\n extraData = localeId;\n localeId = data[LocaleDataIndex.LocaleId];\n }\n localeId = localeId.toLowerCase().replace(/_/g, '-');\n LOCALE_DATA[localeId] = data;\n if (extraData) {\n LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;\n }\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 */\nfunction findLocaleData(locale) {\n var normalizedLocale = normalizeLocale(locale);\n var match = getLocaleData(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 = getLocaleData(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 * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n */\nfunction getLocaleCurrencyCode(locale) {\n var data = findLocaleData(locale);\n return data[LocaleDataIndex.CurrencyCode] || null;\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 */\nfunction getLocalePluralCase(locale) {\n var data = findLocaleData(locale);\n return data[LocaleDataIndex.PluralCase];\n}\n/**\n * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`\n * or from the global `ng.common.locale`.\n */\nfunction getLocaleData(normalizedLocale) {\n if (!(normalizedLocale in LOCALE_DATA)) {\n LOCALE_DATA[normalizedLocale] = _global.ng && _global.ng.common && _global.ng.common.locales &&\n _global.ng.common.locales[normalizedLocale];\n }\n return LOCALE_DATA[normalizedLocale];\n}\n/**\n * Helper function to remove all the locale data from `LOCALE_DATA`.\n */\nfunction unregisterAllLocaleData() {\n LOCALE_DATA = {};\n}\n/**\n * Index of each type of locale data from the locale data array\n */\nvar LocaleDataIndex;\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[\"CurrencyCode\"] = 15] = \"CurrencyCode\";\n LocaleDataIndex[LocaleDataIndex[\"CurrencySymbol\"] = 16] = \"CurrencySymbol\";\n LocaleDataIndex[LocaleDataIndex[\"CurrencyName\"] = 17] = \"CurrencyName\";\n LocaleDataIndex[LocaleDataIndex[\"Currencies\"] = 18] = \"Currencies\";\n LocaleDataIndex[LocaleDataIndex[\"Directionality\"] = 19] = \"Directionality\";\n LocaleDataIndex[LocaleDataIndex[\"PluralCase\"] = 20] = \"PluralCase\";\n LocaleDataIndex[LocaleDataIndex[\"ExtraData\"] = 21] = \"ExtraData\";\n})(LocaleDataIndex || (LocaleDataIndex = {}));\n/**\n * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.\n */\nfunction normalizeLocale(locale) {\n return locale.toLowerCase().replace(/_/g, '-');\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 */\nvar pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n/**\n * Returns the plural case based on the locale\n */\nfunction getPluralCase(value, locale) {\n var plural = getLocalePluralCase(locale)(parseInt(value, 10));\n var result = pluralMapping[plural];\n return (result !== undefined) ? result : 'other';\n}\n/**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\nvar DEFAULT_LOCALE_ID = 'en-US';\n/**\n * USD currency code that the application uses by default for CurrencyPipe when no\n * DEFAULT_CURRENCY_CODE is provided.\n */\nvar USD_CURRENCY_CODE = 'USD';\n\nvar MARKER = \"\\uFFFD\";\nvar ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\nvar SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nvar PH_REGEXP = /�(\\/?[#*!]\\d+):?\\d*�/gi;\nvar BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nvar ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\n// i18nPostprocess consts\nvar ROOT_TEMPLATE_ID = 0;\nvar PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\nvar PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\nvar PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nvar PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;\nvar PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\nvar PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nvar 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 */\nfunction 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 */\nfunction 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 // 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 */\nfunction 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 */\nfunction getTranslationForTemplate(message, subTemplateIndex) {\n if (isRootTemplateMessage(subTemplateIndex)) {\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 */\nfunction 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}\nfunction 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}\nvar i18nIndexStack = [];\nvar 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 */\nfunction toMaskBit(bindingIndex) {\n return 1 << Math.min(bindingIndex, 31);\n}\nvar 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 */\nfunction ɵɵi18nStart(index, message, subTemplateIndex) {\n var tView = getTView();\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.firstCreatePass && tView.data[index + HEADER_OFFSET] === null) {\n i18nStartFirstPass(getLView(), 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.\nvar i18nVarsCount;\nfunction allocNodeIndex(startIndex) {\n return startIndex + i18nVarsCount++;\n}\n/**\n * See `i18nStart` above.\n */\nfunction i18nStartFirstPass(lView, tView, index, message, subTemplateIndex) {\n var startIndex = tView.blueprint.length - HEADER_OFFSET;\n i18nVarsCount = 0;\n var previousOrParentTNode = getPreviousOrParentTNode();\n var parentTNode = getIsParent() ? previousOrParentTNode : previousOrParentTNode && previousOrParentTNode.parent;\n var parentIndex = parentTNode && parentTNode !== lView[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. We should also\n // keep track whether an element was a parent node or not, so that the logic that consumes\n // the generated `I18nMutateOpCode`s can leverage this information to properly set TNode state\n // (whether it's a parent or sibling).\n if (index > 0 && previousOrParentTNode !== parentTNode) {\n var previousTNodeIndex = previousOrParentTNode.index - HEADER_OFFSET;\n // If current TNode is a sibling node, encode it using a negative index. This information is\n // required when the `Select` action is processed (see the `readCreateOpCodes` function).\n if (!getIsParent()) {\n previousTNodeIndex = ~previousTNodeIndex;\n }\n // Create an OpCode to select the previous TNode\n createOpCodes.push(previousTNodeIndex << 3 /* SHIFT_REF */ | 0 /* Select */);\n }\n var updateOpCodes = [];\n var icuExpressions = [];\n if (message === '' && isRootTemplateMessage(subTemplateIndex)) {\n // If top level translation is an empty string, do not invoke additional processing\n // and just create op codes for empty text node instead.\n createOpCodes.push(message, allocNodeIndex(startIndex), parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n }\n else {\n var templateTranslation = getTranslationForTemplate(message, subTemplateIndex);\n var msgParts = replaceNgsp(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 var isElement = value.charAt(0) === \"#\" /* ELEMENT */;\n // The value represents a placeholder that we move to the designated index.\n // Note: positive indicies indicate that a TNode with a given index should also be marked\n // as parent while executing `Select` instruction.\n createOpCodes.push((isElement ? phIndex : ~phIndex) << 3 /* SHIFT_REF */ |\n 0 /* Select */, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n if (isElement) {\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 var icuExpression = parts[j];\n // Verify that ICU expression has the right shape. Translations might contain invalid\n // constructions (while original messages were correct), so ICU parsing at runtime may\n // not succeed (thus `icuExpression` remains a string).\n if (typeof icuExpression !== 'object') {\n throw new Error(\"Unable to parse ICU expression in \\\"\" + templateTranslation + \"\\\" message.\");\n }\n // Create the comment node that will anchor the ICU expression\n var icuNodeIndex = allocNodeIndex(startIndex);\n createOpCodes.push(COMMENT_MARKER, ngDevMode ? \"ICU \" + icuNodeIndex : '', icuNodeIndex, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n // Update codes for the ICU expression\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 = allocNodeIndex(startIndex);\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 }\n if (i18nVarsCount > 0) {\n allocExpando(tView, lView, i18nVarsCount);\n }\n ngDevMode &&\n attachI18nOpCodesDebug(createOpCodes, updateOpCodes, icuExpressions.length ? icuExpressions : null, lView);\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}\nfunction appendI18nNode(tView, tNode, parentTNode, previousTNode, lView) {\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 !== lView[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 applyProjection(tView, lView, tNode);\n return tNode;\n }\n appendChild(tView, lView, getNativeByTNode(tNode, lView), tNode);\n var slotValue = lView[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(tView, lView, slotValue[NATIVE], tNode);\n }\n return tNode;\n}\nfunction isRootTemplateMessage(subTemplateIndex) {\n return subTemplateIndex === undefined;\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 placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. 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 */\nfunction ɵɵ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 placeholders used inside ICUs in a form of {PLACEHOLDER}\n */\n result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, function (match, key) {\n return replacements.hasOwnProperty(key) ? replacements[key] : match;\n });\n /**\n * Step 4: 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 */\nfunction ɵɵi18nEnd() {\n var lView = getLView();\n var tView = getTView();\n ngDevMode && assertDefined(tView, \"tView should be defined\");\n i18nEndFirstPass(tView, lView);\n // Stop delaying projections\n setDelayProjection(false);\n}\n/**\n * See `i18nEnd` above.\n */\nfunction i18nEndFirstPass(tView, lView) {\n ngDevMode &&\n assertEqual(getBindingIndex(), 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, tView, lView);\n // Remove deleted nodes\n var index = rootIndex + 1;\n while (index <= lastCreatedNode.index - HEADER_OFFSET) {\n if (visitedNodes.indexOf(index) === -1) {\n removeNode(tView, lView, index, /* markAsDetached */ true);\n }\n // Check if an element has any local refs and skip them\n var tNode = getTNode(tView, index);\n if (tNode &&\n (tNode.type === 0 /* Container */ || tNode.type === 3 /* Element */ ||\n tNode.type === 4 /* ElementContainer */) &&\n tNode.localNames !== null) {\n // Divide by 2 to get the number of local refs,\n // since they are stored as an array that also includes directive indexes,\n // i.e. [\"localRef\", directiveIndex, ...]\n index += tNode.localNames.length >> 1;\n }\n index++;\n }\n}\n/**\n * Creates and stores the dynamic TNode, and unhooks it from the tree for now.\n */\nfunction createDynamicNodeAtIndex(tView, 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(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 && previousOrParentTNode.next === tNode) {\n previousOrParentTNode.next = null;\n }\n return tNode;\n}\nfunction readCreateOpCodes(index, createOpCodes, tView, lView) {\n var renderer = lView[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(tView, lView, 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 = lView[T_HOST];\n }\n else {\n destinationTNode = getTNode(tView, destinationNodeIndex);\n }\n ngDevMode &&\n assertDefined(currentTNode, \"You need to create or select a node before you can insert it into the DOM\");\n previousTNode =\n appendI18nNode(tView, currentTNode, destinationTNode, previousTNode, lView);\n break;\n case 0 /* Select */:\n // Negative indicies indicate that a given TNode is a sibling node, not a parent node\n // (see `i18nStartFirstPass` for additional information).\n var isParent = opCode >= 0;\n var nodeIndex = (isParent ? opCode : ~opCode) >>> 3 /* SHIFT_REF */;\n visitedNodes.push(nodeIndex);\n previousTNode = currentTNode;\n currentTNode = getTNode(tView, nodeIndex);\n if (currentTNode) {\n setPreviousOrParentTNode(currentTNode, isParent);\n }\n break;\n case 5 /* ElementEnd */:\n var elementIndex = opCode >>> 3 /* SHIFT_REF */;\n previousTNode = currentTNode = getTNode(tView, elementIndex);\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(getTNode(tView, elementNodeIndex), lView, attrName, attrValue, null, null);\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 &&\n 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(tView, lView, commentNodeIndex, 5 /* IcuContainer */, commentRNode, null);\n visitedNodes.push(commentNodeIndex);\n attachPatchData(commentRNode, lView);\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 &&\n 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(tView, lView, 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}\nfunction readUpdateOpCodes(updateOpCodes, icus, bindingsStartIndex, changeMask, tView, lView, 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(lView[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(tView, getTNode(tView, nodeIndex), lView, propName, value, lView[RENDERER], sanitizeFn, false);\n break;\n case 0 /* Text */:\n textBindingInternal(lView, nodeIndex, value);\n break;\n case 2 /* IcuSwitch */:\n tIcuIndex = updateOpCodes[++j];\n tIcu = icus[tIcuIndex];\n icuTNode = getTNode(tView, nodeIndex);\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 // Remove DOM element, but do *not* mark TNode as detached, since we are\n // just switching ICU cases (while keeping the same TNode), so a DOM element\n // representing a new ICU case will be re-created.\n removeNode(tView, lView, nodeIndex_1, /* markAsDetached */ false);\n break;\n case 6 /* RemoveNestedIcu */:\n var nestedIcuNodeIndex = removeCodes[k + 1] >>> 3 /* SHIFT_REF */;\n var nestedIcuTNode = getTNode(tView, nestedIcuNodeIndex);\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 if (caseIndex > -1) {\n // Add the nodes for the new case\n readCreateOpCodes(-1, tIcu.create[caseIndex], tView, lView);\n caseCreated = true;\n }\n break;\n case 3 /* IcuUpdate */:\n tIcuIndex = updateOpCodes[++j];\n tIcu = icus[tIcuIndex];\n icuTNode = getTNode(tView, nodeIndex);\n if (icuTNode.activeCaseIndex !== null) {\n readUpdateOpCodes(tIcu.update[icuTNode.activeCaseIndex], icus, bindingsStartIndex, changeMask, tView, lView, caseCreated);\n }\n break;\n }\n }\n }\n }\n }\n i += skipCodes;\n }\n}\nfunction removeNode(tView, lView, index, markAsDetached) {\n var removedPhTNode = getTNode(tView, index);\n var removedPhRNode = getNativeByIndex(index, lView);\n if (removedPhRNode) {\n nativeRemoveNode(lView[RENDERER], removedPhRNode);\n }\n var slotValue = load(lView, index);\n if (isLContainer(slotValue)) {\n var lContainer = slotValue;\n if (removedPhTNode.type !== 0 /* Container */) {\n nativeRemoveNode(lView[RENDERER], lContainer[NATIVE]);\n }\n }\n if (markAsDetached) {\n // Define this node as detached to avoid projecting it later\n removedPhTNode.flags |= 64 /* isDetached */;\n }\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 */\nfunction ɵɵ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 */\nfunction ɵɵi18nAttributes(index, values) {\n var lView = getLView();\n var tView = getTView();\n ngDevMode && assertDefined(tView, \"tView should be defined\");\n i18nAttributesFirstPass(lView, tView, index, values);\n}\n/**\n * See `i18nAttributes` above.\n */\nfunction i18nAttributesFirstPass(lView, 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.firstCreatePass && tView.data[index + HEADER_OFFSET] === null) {\n addAllToArray(generateBindingUpdateOpCodes(value, previousElementIndex, attrName), updateOpCodes);\n }\n }\n else {\n var tNode = getTNode(tView, previousElementIndex);\n // Set attributes for Elements only, for other types (like ElementContainer),\n // only set inputs below\n if (tNode.type === 3 /* Element */) {\n elementAttributeInternal(tNode, lView, attrName, value, null, null);\n }\n // Check if that attribute is a directive input\n var dataValue = tNode.inputs !== null && tNode.inputs[attrName];\n if (dataValue) {\n setInputsForProperty(tView, lView, dataValue, attrName, value);\n if (ngDevMode) {\n var element = getNativeByIndex(previousElementIndex, lView);\n setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n }\n }\n }\n }\n }\n }\n if (tView.firstCreatePass && tView.data[index + HEADER_OFFSET] === null) {\n tView.data[index + HEADER_OFFSET] = updateOpCodes;\n }\n}\nvar changeMask = 0;\nvar 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 */\nfunction ɵɵi18nExp(value) {\n var lView = getLView();\n if (bindingUpdated(lView, nextBindingIndex(), value)) {\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 */\nfunction ɵɵi18nApply(index) {\n if (shiftsCounter) {\n var tView = getTView();\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 = getBindingIndex() - shiftsCounter - 1;\n var lView = getLView();\n readUpdateOpCodes(updateOpCodes, icus, bindingsStartIndex, changeMask, tView, 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 */\nfunction 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 */\nfunction 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 */\nfunction parseIcuCase(unsafeHtml, parentIndex, nestedIcus, tIcus, expandoStartIndex) {\n var inertBodyHelper = new InertBodyHelper(getDocument());\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}\nvar 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 */\nfunction 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/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here, since translations\n * might contain this special character.\n */\nvar NGSP_UNICODE_REGEXP = /\\uE500/g;\nfunction replaceNgsp(value) {\n return value.replace(NGSP_UNICODE_REGEXP, ' ');\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 */\nvar 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 */\nfunction setLocaleId(localeId) {\n assertDefined(localeId, \"Expected localeId to be defined\");\n if (typeof localeId === 'string') {\n LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n }\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 */\nfunction 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 * 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 */\nfunction 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\n // parent constructor and checking whether it's the same as the subclass metadata below.\n // We can't use `hasOwnProperty` here because it doesn't work correctly in IE10 for\n // static fields that are defined by TS. See\n // 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\n // use tsickle-style annotations and reflect over them in the same way, this could\n // cause issues, 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\n // different decorator types. Decorators on individual fields are not merged, as it's\n // also incredibly unlikely that a field will be decorated both with an Angular\n // decorator and a non-Angular decorator that's also been downleveled.\n if (clazz.propDecorators !== undefined &&\n (!parentConstructor ||\n parentConstructor.propDecorators !== clazz.propDecorators)) {\n clazz.propDecorators = __assign(__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 * Map of module-id to the corresponding NgModule.\n * - In pre Ivy we track NgModuleFactory,\n * - In post Ivy we track the NgModuleType\n */\nvar modules = new Map();\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @publicApi\n */\nfunction registerModuleFactory(id, factory) {\n var existing = modules.get(id);\n assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);\n modules.set(id, factory);\n}\nfunction 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}\nfunction registerNgModuleType(ngModuleType) {\n if (ngModuleType.ɵmod.id !== null) {\n var id = ngModuleType.ɵmod.id;\n var existing = modules.get(id);\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n }\n var imports = ngModuleType.ɵmod.imports;\n if (imports instanceof Function) {\n imports = imports();\n }\n if (imports) {\n imports.forEach(function (i) { return registerNgModuleType(i); });\n }\n}\nfunction clearModulesForTest() {\n modules.clear();\n}\nfunction getRegisteredNgModuleType(id) {\n return modules.get(id) || autoRegisterModuleById[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 */\nvar 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 // When bootstrapping a module we have a dependency graph that looks like this:\n // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the\n // module being resolved tries to inject the ComponentFactoryResolver, it'll create a\n // circular dependency which will result in a runtime error, because the injector doesn't\n // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves\n // and providing it, rather than letting the injector resolve it.\n _this.componentFactoryResolver = new ComponentFactoryResolver$1(_this);\n var ngModuleDef = getNgModuleDef(ngModuleType);\n ngDevMode &&\n assertDefined(ngModuleDef, \"NgModule '\" + stringify(ngModuleType) + \"' is not a subtype of 'NgModuleType'.\");\n var ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);\n ngLocaleIdDef && setLocaleId(ngLocaleIdDef);\n _this._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap);\n _this._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [\n { provide: NgModuleRef, useValue: _this }, {\n provide: ComponentFactoryResolver,\n useValue: _this.componentFactoryResolver\n }\n ], stringify(ngModuleType));\n // We need to resolve the injector types separately from the injector creation, because\n // the module might be trying to use this ref in its contructor for DI which will cause a\n // circular error that will eventually error out, because the injector isn't created yet.\n _this._r3Injector._resolveInjectorDefTypes();\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 = InjectFlags.Default; }\n if (token === Injector || token === NgModuleRef || token === INJECTOR) {\n return this;\n }\n return this._r3Injector.get(token, notFoundValue, injectFlags);\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));\nvar 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 * Bindings for pure functions are stored after regular bindings.\n *\n * |-------decls------|---------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 */\nfunction ɵɵpureFunction0(slotOffset, pureFn, thisArg) {\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n return lView[bindingIndex] === NO_CHANGE ?\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 */\nfunction ɵɵpureFunction1(slotOffset, pureFn, exp, thisArg) {\n return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);\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 */\nfunction ɵɵpureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {\n return pureFunction2Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg);\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 */\nfunction ɵɵpureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n return pureFunction3Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg);\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 */\nfunction ɵɵpureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n return pureFunction4Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg);\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 */\nfunction ɵɵpureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {\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 */\nfunction ɵɵpureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {\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 ? 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 */\nfunction ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\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 ? 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 */\nfunction ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\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 ? 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 */\nfunction ɵɵpureFunctionV(slotOffset, pureFn, exps, thisArg) {\n return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);\n}\n/**\n * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized\n * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first\n * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE\n * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert\n * it to `undefined`.\n */\nfunction getPureFunctionReturnValue(lView, returnValueIndex) {\n ngDevMode && assertDataInRange(lView, returnValueIndex);\n var lastReturnValue = lView[returnValueIndex];\n return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;\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 lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\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 */\nfunction pureFunction1Internal(lView, bindingRoot, slotOffset, pureFn, exp, thisArg) {\n var bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated(lView, bindingIndex, exp) ?\n updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n getPureFunctionReturnValue(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 lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\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 */\nfunction pureFunction2Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, thisArg) {\n var bindingIndex = bindingRoot + slotOffset;\n return bindingUpdated2(lView, bindingIndex, exp1, exp2) ?\n updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n getPureFunctionReturnValue(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 lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\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 */\nfunction pureFunction3Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n var bindingIndex = bindingRoot + slotOffset;\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 getPureFunctionReturnValue(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 lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\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 */\nfunction pureFunction4Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n var bindingIndex = bindingRoot + slotOffset;\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 getPureFunctionReturnValue(lView, bindingIndex + 4);\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 lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\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 */\nfunction pureFunctionVInternal(lView, bindingRoot, slotOffset, pureFn, exps, thisArg) {\n var bindingIndex = bindingRoot + slotOffset;\n var different = false;\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 getPureFunctionReturnValue(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 */\nfunction ɵɵpipe(index, pipeName) {\n var tView = getTView();\n var pipeDef;\n var adjustedIndex = index + HEADER_OFFSET;\n if (tView.firstCreatePass) {\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 pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n var previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n // DI for pipes is supposed to behave like directives when placed on a component\n // host node, which means that we have to disable access to `viewProviders`.\n var previousIncludeViewProviders = setIncludeViewProviders(false);\n var pipeInstance = pipeFactory();\n setIncludeViewProviders(previousIncludeViewProviders);\n setInjectImplementation(previousInjectImplementation);\n store(tView, getLView(), 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 */\nfunction 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 */\nfunction ɵɵpipeBind1(index, slotOffset, v1) {\n var lView = getLView();\n var pipeInstance = load(lView, index);\n return unwrapValue$1(lView, isPure(lView, index) ?\n pureFunction1Internal(lView, getBindingRoot(), 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 */\nfunction ɵɵpipeBind2(index, slotOffset, v1, v2) {\n var lView = getLView();\n var pipeInstance = load(lView, index);\n return unwrapValue$1(lView, isPure(lView, index) ?\n pureFunction2Internal(lView, getBindingRoot(), 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 */\nfunction ɵɵpipeBind3(index, slotOffset, v1, v2, v3) {\n var lView = getLView();\n var pipeInstance = load(lView, index);\n return unwrapValue$1(lView, isPure(lView, index) ? pureFunction3Internal(lView, getBindingRoot(), 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 */\nfunction ɵɵpipeBind4(index, slotOffset, v1, v2, v3, v4) {\n var lView = getLView();\n var pipeInstance = load(lView, index);\n return unwrapValue$1(lView, isPure(lView, index) ? pureFunction4Internal(lView, getBindingRoot(), 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 */\nfunction ɵɵpipeBindV(index, slotOffset, values) {\n var lView = getLView();\n var pipeInstance = load(lView, index);\n return unwrapValue$1(lView, isPure(lView, index) ?\n pureFunctionVInternal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values));\n}\nfunction isPure(lView, index) {\n return lView[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 */\nfunction unwrapValue$1(lView, newValue) {\n if (WrappedValue.isWrapped(newValue)) {\n newValue = WrappedValue.unwrap(newValue);\n // The NO_CHANGE value needs to be written at the index where the impacted binding value is\n // stored\n var bindingToInvalidateIdx = getBindingIndex();\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 components with the `@Output` directive to emit custom events\n * synchronously or asynchronously, and register handlers for those events\n * by subscribing to an instance.\n *\n * @usageNotes\n *\n * Extends\n * [RxJS `Subject`](https://rxjs.dev/api/index/class/Subject)\n * for Angular by adding the `emit()` method.\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 * @see [Observables in Angular](guide/observables-in-angular)\n * @publicApi\n */\nvar 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) {\n _super.prototype.next.call(this, value);\n };\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) {\n generatorOrNext.next(value);\n };\n if (generatorOrNext.error) {\n errorFn = this.__isAsync ? function (err) {\n setTimeout(function () { return generatorOrNext.error(err); });\n } : function (err) {\n generatorOrNext.error(err);\n };\n }\n if (generatorOrNext.complete) {\n completeFn = this.__isAsync ? function () {\n setTimeout(function () { return generatorOrNext.complete(); });\n } : function () {\n generatorOrNext.complete();\n };\n }\n }\n else {\n schedulerFn = this.__isAsync ? function (value) {\n setTimeout(function () { return generatorOrNext(value); });\n } : function (value) {\n generatorOrNext(value);\n };\n if (error) {\n errorFn = this.__isAsync ? function (err) {\n setTimeout(function () { return error(err); });\n } : function (err) {\n error(err);\n };\n }\n if (complete) {\n completeFn = this.__isAsync ? function () {\n setTimeout(function () { return complete(); });\n } : function () {\n complete();\n };\n }\n }\n var sink = _super.prototype.subscribe.call(this, schedulerFn, errorFn, completeFn);\n if (generatorOrNext instanceof Subscription) {\n generatorOrNext.add(sink);\n }\n return sink;\n };\n return EventEmitter;\n}(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 */\nfunction 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 */\nvar 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) {\n return this._results.map(fn);\n };\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) {\n this._results.forEach(fn);\n };\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 () {\n return this._results.slice();\n };\n QueryList.prototype.toString = function () {\n return this._results.toString();\n };\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 query results 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 () {\n this.changes.emit(this);\n };\n /** internal */\n QueryList.prototype.setDirty = function () {\n this.dirty = true;\n };\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// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nvar unusedValueExportToPlacateAjd$7 = 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// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nvar unusedValueExportToPlacateAjd$8 = 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 */\nvar unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$8;\nvar LQuery_ = /** @class */ (function () {\n function LQuery_(queryList) {\n this.queryList = queryList;\n this.matches = null;\n }\n LQuery_.prototype.clone = function () {\n return new LQuery_(this.queryList);\n };\n LQuery_.prototype.setDirty = function () {\n this.queryList.setDirty();\n };\n return LQuery_;\n}());\nvar LQueries_ = /** @class */ (function () {\n function LQueries_(queries) {\n if (queries === void 0) { queries = []; }\n this.queries = queries;\n }\n LQueries_.prototype.createEmbeddedView = function (tView) {\n var tQueries = tView.queries;\n if (tQueries !== null) {\n var noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n var viewLQueries = [];\n // An embedded view has queries propagated from a declaration view at the beginning of the\n // TQueries collection and up until a first content query declared in the embedded view. Only\n // propagated LQueries are created at this point (LQuery corresponding to declared content\n // queries will be instantiated from the content query instructions for each directive).\n for (var i = 0; i < noOfInheritedQueries; i++) {\n var tQuery = tQueries.getByIndex(i);\n var parentLQuery = this.queries[tQuery.indexInDeclarationView];\n viewLQueries.push(parentLQuery.clone());\n }\n return new LQueries_(viewLQueries);\n }\n return null;\n };\n LQueries_.prototype.insertView = function (tView) {\n this.dirtyQueriesWithMatches(tView);\n };\n LQueries_.prototype.detachView = function (tView) {\n this.dirtyQueriesWithMatches(tView);\n };\n LQueries_.prototype.dirtyQueriesWithMatches = function (tView) {\n for (var i = 0; i < this.queries.length; i++) {\n if (getTQuery(tView, i).matches !== null) {\n this.queries[i].setDirty();\n }\n }\n };\n return LQueries_;\n}());\nvar TQueryMetadata_ = /** @class */ (function () {\n function TQueryMetadata_(predicate, descendants, isStatic, read) {\n if (read === void 0) { read = null; }\n this.predicate = predicate;\n this.descendants = descendants;\n this.isStatic = isStatic;\n this.read = read;\n }\n return TQueryMetadata_;\n}());\nvar TQueries_ = /** @class */ (function () {\n function TQueries_(queries) {\n if (queries === void 0) { queries = []; }\n this.queries = queries;\n }\n TQueries_.prototype.elementStart = function (tView, tNode) {\n ngDevMode &&\n assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n for (var i = 0; i < this.queries.length; i++) {\n this.queries[i].elementStart(tView, tNode);\n }\n };\n TQueries_.prototype.elementEnd = function (tNode) {\n for (var i = 0; i < this.queries.length; i++) {\n this.queries[i].elementEnd(tNode);\n }\n };\n TQueries_.prototype.embeddedTView = function (tNode) {\n var queriesForTemplateRef = null;\n for (var i = 0; i < this.length; i++) {\n var childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n var tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n if (tqueryClone) {\n tqueryClone.indexInDeclarationView = i;\n if (queriesForTemplateRef !== null) {\n queriesForTemplateRef.push(tqueryClone);\n }\n else {\n queriesForTemplateRef = [tqueryClone];\n }\n }\n }\n return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;\n };\n TQueries_.prototype.template = function (tView, tNode) {\n ngDevMode &&\n assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n for (var i = 0; i < this.queries.length; i++) {\n this.queries[i].template(tView, tNode);\n }\n };\n TQueries_.prototype.getByIndex = function (index) {\n ngDevMode && assertDataInRange(this.queries, index);\n return this.queries[index];\n };\n Object.defineProperty(TQueries_.prototype, \"length\", {\n get: function () {\n return this.queries.length;\n },\n enumerable: true,\n configurable: true\n });\n TQueries_.prototype.track = function (tquery) {\n this.queries.push(tquery);\n };\n return TQueries_;\n}());\nvar TQuery_ = /** @class */ (function () {\n function TQuery_(metadata, nodeIndex) {\n if (nodeIndex === void 0) { nodeIndex = -1; }\n this.metadata = metadata;\n this.matches = null;\n this.indexInDeclarationView = -1;\n this.crossesNgTemplate = false;\n /**\n * A flag indicating if a given query still applies to nodes it is crossing. We use this flag\n * (alongside with _declarationNodeIndex) to know when to stop applying content queries to\n * elements in a template.\n */\n this._appliesToNextNode = true;\n this._declarationNodeIndex = nodeIndex;\n }\n TQuery_.prototype.elementStart = function (tView, tNode) {\n if (this.isApplyingToNode(tNode)) {\n this.matchTNode(tView, tNode);\n }\n };\n TQuery_.prototype.elementEnd = function (tNode) {\n if (this._declarationNodeIndex === tNode.index) {\n this._appliesToNextNode = false;\n }\n };\n TQuery_.prototype.template = function (tView, tNode) {\n this.elementStart(tView, tNode);\n };\n TQuery_.prototype.embeddedTView = function (tNode, childQueryIndex) {\n if (this.isApplyingToNode(tNode)) {\n this.crossesNgTemplate = true;\n // A marker indicating a `<ng-template>` element (a placeholder for query results from\n // embedded views created based on this `<ng-template>`).\n this.addMatch(-tNode.index, childQueryIndex);\n return new TQuery_(this.metadata);\n }\n return null;\n };\n TQuery_.prototype.isApplyingToNode = function (tNode) {\n if (this._appliesToNextNode && this.metadata.descendants === false) {\n var declarationNodeIdx = this._declarationNodeIndex;\n var parent_1 = tNode.parent;\n // Determine if a given TNode is a \"direct\" child of a node on which a content query was\n // declared (only direct children of query's host node can match with the descendants: false\n // option). There are 3 main use-case / conditions to consider here:\n // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query\n // host node;\n // - <needs-target><ng-template [ngIf]=\"true\"><i #target></i></ng-template></needs-target>:\n // here <i #target> parent node is null;\n // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need\n // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse\n // up past the query's host node!).\n while (parent_1 !== null && parent_1.type === 4 /* ElementContainer */ &&\n parent_1.index !== declarationNodeIdx) {\n parent_1 = parent_1.parent;\n }\n return declarationNodeIdx === (parent_1 !== null ? parent_1.index : -1);\n }\n return this._appliesToNextNode;\n };\n TQuery_.prototype.matchTNode = function (tView, tNode) {\n if (Array.isArray(this.metadata.predicate)) {\n var localNames = this.metadata.predicate;\n for (var i = 0; i < localNames.length; i++) {\n this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, localNames[i]));\n }\n }\n else {\n var typePredicate = this.metadata.predicate;\n if (typePredicate === TemplateRef) {\n if (tNode.type === 0 /* Container */) {\n this.matchTNodeWithReadOption(tView, tNode, -1);\n }\n }\n else {\n this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, typePredicate, false, false));\n }\n }\n };\n TQuery_.prototype.matchTNodeWithReadOption = function (tView, tNode, nodeMatchIdx) {\n if (nodeMatchIdx !== null) {\n var read = this.metadata.read;\n if (read !== null) {\n if (read === ElementRef || read === ViewContainerRef ||\n read === TemplateRef && tNode.type === 0 /* Container */) {\n this.addMatch(tNode.index, -2);\n }\n else {\n var directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false);\n if (directiveOrProviderIdx !== null) {\n this.addMatch(tNode.index, directiveOrProviderIdx);\n }\n }\n }\n else {\n this.addMatch(tNode.index, nodeMatchIdx);\n }\n }\n };\n TQuery_.prototype.addMatch = function (tNodeIdx, matchIdx) {\n if (this.matches === null) {\n this.matches = [tNodeIdx, matchIdx];\n }\n else {\n this.matches.push(tNodeIdx, matchIdx);\n }\n };\n return TQuery_;\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 */\nfunction getIdxOfMatchingSelector(tNode, selector) {\n var localNames = tNode.localNames;\n if (localNames !== null) {\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}\nfunction createResultByTNodeType(tNode, currentView) {\n if (tNode.type === 3 /* Element */ || tNode.type === 4 /* ElementContainer */) {\n return createElementRef(ElementRef, tNode, currentView);\n }\n else if (tNode.type === 0 /* Container */) {\n return createTemplateRef(TemplateRef, ElementRef, tNode, currentView);\n }\n return null;\n}\nfunction createResultForNode(lView, tNode, matchingIdx, read) {\n if (matchingIdx === -1) {\n // if read token and / or strategy is not specified, detect it using appropriate tNode type\n return createResultByTNodeType(tNode, lView);\n }\n else if (matchingIdx === -2) {\n // read a special token from a node injector\n return createSpecialToken(lView, tNode, read);\n }\n else {\n // read a token\n return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode);\n }\n}\nfunction createSpecialToken(lView, tNode, read) {\n if (read === ElementRef) {\n return createElementRef(ElementRef, tNode, lView);\n }\n else if (read === TemplateRef) {\n return createTemplateRef(TemplateRef, ElementRef, tNode, lView);\n }\n else if (read === ViewContainerRef) {\n ngDevMode &&\n assertNodeOfPossibleTypes(tNode, 3 /* Element */, 0 /* Container */, 4 /* ElementContainer */);\n return createContainerRef(ViewContainerRef, ElementRef, tNode, lView);\n }\n else {\n ngDevMode &&\n throwError(\"Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got \" + stringify(read) + \".\");\n }\n}\n/**\n * A helper function that creates query results for a given view. This function is meant to do the\n * processing once and only once for a given view instance (a set of results for a given view\n * doesn't change).\n */\nfunction materializeViewResults(tView, lView, tQuery, queryIndex) {\n var lQuery = lView[QUERIES].queries[queryIndex];\n if (lQuery.matches === null) {\n var tViewData = tView.data;\n var tQueryMatches = tQuery.matches;\n var result = [];\n for (var i = 0; i < tQueryMatches.length; i += 2) {\n var matchedNodeIdx = tQueryMatches[i];\n if (matchedNodeIdx < 0) {\n // we at the <ng-template> marker which might have results in views created based on this\n // <ng-template> - those results will be in separate views though, so here we just leave\n // null as a placeholder\n result.push(null);\n }\n else {\n ngDevMode && assertDataInRange(tViewData, matchedNodeIdx);\n var tNode = tViewData[matchedNodeIdx];\n result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n }\n }\n lQuery.matches = result;\n }\n return lQuery.matches;\n}\n/**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\nfunction collectQueryResults(tView, lView, queryIndex, result) {\n var tQuery = tView.queries.getByIndex(queryIndex);\n var tQueryMatches = tQuery.matches;\n if (tQueryMatches !== null) {\n var lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex);\n for (var i = 0; i < tQueryMatches.length; i += 2) {\n var tNodeIdx = tQueryMatches[i];\n if (tNodeIdx > 0) {\n result.push(lViewResults[i / 2]);\n }\n else {\n var childQueryIndex = tQueryMatches[i + 1];\n var declarationLContainer = lView[-tNodeIdx];\n ngDevMode && assertLContainer(declarationLContainer);\n // collect matches for views inserted in this container\n for (var i_1 = CONTAINER_HEADER_OFFSET; i_1 < declarationLContainer.length; i_1++) {\n var embeddedLView = declarationLContainer[i_1];\n if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n // collect matches for views created from this declaration container and inserted into\n // different containers\n if (declarationLContainer[MOVED_VIEWS] !== null) {\n var embeddedLViews = declarationLContainer[MOVED_VIEWS];\n for (var i_2 = 0; i_2 < embeddedLViews.length; i_2++) {\n var embeddedLView = embeddedLViews[i_2];\n collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n }\n }\n }\n }\n }\n return result;\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 */\nfunction ɵɵqueryRefresh(queryList) {\n var lView = getLView();\n var tView = getTView();\n var queryIndex = getCurrentQueryIndex();\n setCurrentQueryIndex(queryIndex + 1);\n var tQuery = getTQuery(tView, queryIndex);\n if (queryList.dirty && (isCreationMode(lView) === tQuery.metadata.isStatic)) {\n if (tQuery.matches === null) {\n queryList.reset([]);\n }\n else {\n var result = tQuery.crossesNgTemplate ?\n collectQueryResults(tView, lView, queryIndex, []) :\n materializeViewResults(tView, lView, tQuery, queryIndex);\n queryList.reset(result);\n queryList.notifyOnChanges();\n }\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 */\nfunction ɵɵstaticViewQuery(predicate, descend, read) {\n viewQueryInternal(getTView(), getLView(), predicate, descend, read, 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 *\n * @codeGenApi\n */\nfunction ɵɵviewQuery(predicate, descend, read) {\n viewQueryInternal(getTView(), getLView(), predicate, descend, read, false);\n}\nfunction viewQueryInternal(tView, lView, predicate, descend, read, isStatic) {\n if (tView.firstCreatePass) {\n createTQuery(tView, new TQueryMetadata_(predicate, descend, isStatic, read), -1);\n if (isStatic) {\n tView.staticViewQueries = true;\n }\n }\n createLQuery(tView, lView);\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 */\nfunction ɵɵcontentQuery(directiveIndex, predicate, descend, read) {\n contentQueryInternal(getTView(), getLView(), predicate, descend, read, false, getPreviousOrParentTNode(), directiveIndex);\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 */\nfunction ɵɵstaticContentQuery(directiveIndex, predicate, descend, read) {\n contentQueryInternal(getTView(), getLView(), predicate, descend, read, true, getPreviousOrParentTNode(), directiveIndex);\n}\nfunction contentQueryInternal(tView, lView, predicate, descend, read, isStatic, tNode, directiveIndex) {\n if (tView.firstCreatePass) {\n createTQuery(tView, new TQueryMetadata_(predicate, descend, isStatic, read), tNode.index);\n saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n if (isStatic) {\n tView.staticContentQueries = true;\n }\n }\n createLQuery(tView, lView);\n}\n/**\n * Loads a QueryList corresponding to the current view or content query.\n *\n * @codeGenApi\n */\nfunction ɵɵloadQuery() {\n return loadQueryInternal(getLView(), getCurrentQueryIndex());\n}\nfunction loadQueryInternal(lView, queryIndex) {\n ngDevMode &&\n assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n ngDevMode && assertDataInRange(lView[QUERIES].queries, queryIndex);\n return lView[QUERIES].queries[queryIndex].queryList;\n}\nfunction createLQuery(tView, lView) {\n var queryList = new QueryList();\n storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n if (lView[QUERIES] === null)\n lView[QUERIES] = new LQueries_();\n lView[QUERIES].queries.push(new LQuery_(queryList));\n}\nfunction createTQuery(tView, metadata, nodeIndex) {\n if (tView.queries === null)\n tView.queries = new TQueries_();\n tView.queries.track(new TQuery_(metadata, nodeIndex));\n}\nfunction saveContentQueryAndDirectiveIndex(tView, directiveIndex) {\n var tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n var lastSavedDirectiveIndex = tView.contentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;\n if (directiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(tView.queries.length - 1, directiveIndex);\n }\n}\nfunction getTQuery(tView, index) {\n ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');\n return tView.queries.getByIndex(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 */\nfunction ɵɵtemplateRefExtractor(tNode, currentView) {\n return createTemplateRef(TemplateRef, ElementRef, tNode, currentView);\n}\n/**\n * Returns the appropriate `ChangeDetectorRef` for a pipe.\n *\n * @codeGenApi\n */\nfunction ɵɵinjectPipeChangeDetectorRef(flags) {\n if (flags === void 0) { flags = InjectFlags.Default; }\n var value = injectChangeDetectorRef(true);\n if (value == null && !(flags & InjectFlags.Optional)) {\n throw new Error(\"No provider for ChangeDetectorRef!\");\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\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 */\nvar ɵ0$d = 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 'ɵɵ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 'ɵɵinvalidFactory': ɵɵinvalidFactory,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'ɵɵinjectPipeChangeDetectorRef': ɵɵinjectPipeChangeDetectorRef,\n 'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,\n 'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,\n 'ɵɵProvidersFeature': ɵɵProvidersFeature,\n 'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,\n 'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,\n 'ɵɵnextContext': ɵɵnextContext,\n 'ɵɵnamespaceHTML': ɵɵnamespaceHTML,\n 'ɵɵnamespaceMathML': ɵɵnamespaceMathML,\n 'ɵɵnamespaceSVG': ɵɵnamespaceSVG,\n 'ɵɵenableBindings': ɵɵenableBindings,\n 'ɵɵdisableBindings': ɵɵdisableBindings,\n 'ɵɵelementStart': ɵɵelementStart,\n 'ɵɵelementEnd': ɵɵelementEnd,\n 'ɵɵelement': ɵɵelement,\n 'ɵɵelementContainerStart': ɵɵelementContainerStart,\n 'ɵɵelementContainerEnd': ɵɵelementContainerEnd,\n 'ɵɵelementContainer': ɵɵelementContainer,\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 'ɵɵlistener': ɵɵlistener,\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 'ɵɵhostProperty': ɵɵhostProperty,\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 'ɵɵloadQuery': ɵɵloadQuery,\n 'ɵɵcontentQuery': ɵɵcontentQuery,\n 'ɵɵreference': ɵɵreference,\n 'ɵɵclassMap': ɵɵclassMap,\n 'ɵɵclassMapInterpolate1': ɵɵclassMapInterpolate1,\n 'ɵɵclassMapInterpolate2': ɵɵclassMapInterpolate2,\n 'ɵɵclassMapInterpolate3': ɵɵclassMapInterpolate3,\n 'ɵɵclassMapInterpolate4': ɵɵclassMapInterpolate4,\n 'ɵɵclassMapInterpolate5': ɵɵclassMapInterpolate5,\n 'ɵɵclassMapInterpolate6': ɵɵclassMapInterpolate6,\n 'ɵɵclassMapInterpolate7': ɵɵclassMapInterpolate7,\n 'ɵɵclassMapInterpolate8': ɵɵclassMapInterpolate8,\n 'ɵɵclassMapInterpolateV': ɵɵclassMapInterpolateV,\n 'ɵɵstyleMap': ɵɵstyleMap,\n 'ɵɵstyleMapInterpolate1': ɵɵstyleMapInterpolate1,\n 'ɵɵstyleMapInterpolate2': ɵɵstyleMapInterpolate2,\n 'ɵɵstyleMapInterpolate3': ɵɵstyleMapInterpolate3,\n 'ɵɵstyleMapInterpolate4': ɵɵstyleMapInterpolate4,\n 'ɵɵstyleMapInterpolate5': ɵɵstyleMapInterpolate5,\n 'ɵɵstyleMapInterpolate6': ɵɵstyleMapInterpolate6,\n 'ɵɵstyleMapInterpolate7': ɵɵstyleMapInterpolate7,\n 'ɵɵstyleMapInterpolate8': ɵɵstyleMapInterpolate8,\n 'ɵɵstyleMapInterpolateV': ɵɵstyleMapInterpolateV,\n 'ɵɵstyleProp': ɵɵstyleProp,\n 'ɵɵstylePropInterpolate1': ɵɵstylePropInterpolate1,\n 'ɵɵstylePropInterpolate2': ɵɵstylePropInterpolate2,\n 'ɵɵstylePropInterpolate3': ɵɵstylePropInterpolate3,\n 'ɵɵstylePropInterpolate4': ɵɵstylePropInterpolate4,\n 'ɵɵstylePropInterpolate5': ɵɵstylePropInterpolate5,\n 'ɵɵstylePropInterpolate6': ɵɵstylePropInterpolate6,\n 'ɵɵstylePropInterpolate7': ɵɵstylePropInterpolate7,\n 'ɵɵstylePropInterpolate8': ɵɵstylePropInterpolate8,\n 'ɵɵstylePropInterpolateV': ɵɵstylePropInterpolateV,\n 'ɵɵstyleSanitizer': ɵɵstyleSanitizer,\n 'ɵɵclassProp': ɵɵclassProp,\n 'ɵɵselect': ɵɵselect,\n 'ɵɵadvance': ɵɵadvance,\n 'ɵɵtemplate': ɵɵtemplate,\n 'ɵɵtext': ɵɵtext,\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 'ɵɵi18n': ɵɵi18n,\n 'ɵɵi18nAttributes': ɵɵi18nAttributes,\n 'ɵɵi18nExp': ɵɵi18nExp,\n 'ɵɵi18nStart': ɵɵi18nStart,\n 'ɵɵi18nEnd': ɵɵi18nEnd,\n 'ɵɵi18nApply': ɵɵi18nApply,\n 'ɵɵi18nPostprocess': ɵɵi18nPostprocess,\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 */\nvar angularCoreEnv = (ɵ0$d)();\n\nvar jitOptions = null;\nfunction setJitOptions(options) {\n if (jitOptions !== null) {\n if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) {\n ngDevMode &&\n console.error('Provided value for `defaultEncapsulation` can not be changed once it has been set.');\n return;\n }\n if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) {\n ngDevMode &&\n console.error('Provided value for `preserveWhitespaces` can not be changed once it has been set.');\n return;\n }\n }\n jitOptions = options;\n}\nfunction getJitOptions() {\n return jitOptions;\n}\nfunction resetJitOptions() {\n jitOptions = 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 */\nvar EMPTY_ARRAY$5 = [];\nvar moduleQueue = [];\n/**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\nfunction enqueueModuleForDelayedScoping(moduleType, ngModule) {\n moduleQueue.push({ moduleType: moduleType, ngModule: ngModule });\n}\nvar 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 */\nfunction 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 */\nfunction 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 */\nfunction 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 `ɵmod` and `ɵinj` 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 */\nfunction 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$5);\n var ngModuleDef = null;\n Object.defineProperty(moduleType, NG_MOD_DEF, {\n configurable: true,\n get: function () {\n if (ngModuleDef === null) {\n if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {\n // We need to assert this immediately, because allowing it to continue will cause it to\n // go into an infinite loop before we've reached the point where we throw all the errors.\n throw new Error(\"'\" + stringifyForError(moduleType) + \"' module can't import itself\");\n }\n ngModuleDef = getCompilerFacade().compileNgModule(angularCoreEnv, \"ng:///\" + moduleType.name + \"/\\u0275mod.js\", {\n type: moduleType,\n bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY$5).map(resolveForwardRef),\n declarations: declarations.map(resolveForwardRef),\n imports: flatten(ngModule.imports || EMPTY_ARRAY$5)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n exports: flatten(ngModule.exports || EMPTY_ARRAY$5)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n id: ngModule.id || null,\n });\n // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime\n // should verify that there are no unknown elements in a template. In AOT mode, that check\n // happens at compile time and `schemas` information is not present on Component and Module\n // defs after compilation (so the check doesn't happen the second time at runtime).\n if (!ngModuleDef.schemas) {\n ngModuleDef.schemas = [];\n }\n }\n return ngModuleDef;\n }\n });\n var ngInjectorDef = null;\n Object.defineProperty(moduleType, NG_INJ_DEF, {\n get: function () {\n if (ngInjectorDef === null) {\n ngDevMode &&\n verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);\n var meta = {\n name: moduleType.name,\n type: moduleType,\n deps: reflectDependencies(moduleType),\n providers: ngModule.providers || EMPTY_ARRAY$5,\n imports: [\n (ngModule.imports || EMPTY_ARRAY$5).map(resolveForwardRef),\n (ngModule.exports || EMPTY_ARRAY$5).map(resolveForwardRef),\n ],\n };\n ngInjectorDef = getCompilerFacade().compileInjector(angularCoreEnv, \"ng:///\" + moduleType.name + \"/\\u0275inj.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}\nfunction verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {\n if (verifiedNgModule.get(moduleType))\n return;\n verifiedNgModule.set(moduleType, true);\n moduleType = resolveForwardRef(moduleType);\n var ngModuleDef;\n if (importingModule) {\n ngModuleDef = getNgModuleDef(moduleType);\n if (!ngModuleDef) {\n throw new Error(\"Unexpected value '\" + moduleType.name + \"' imported by the module '\" + importingModule.name + \"'. Please add an @NgModule annotation.\");\n }\n }\n else {\n ngModuleDef = getNgModuleDef(moduleType, true);\n }\n var errors = [];\n var declarations = maybeUnwrapFn(ngModuleDef.declarations);\n var imports = maybeUnwrapFn(ngModuleDef.imports);\n flatten(imports).map(unwrapModuleWithProvidersImports).forEach(function (mod) {\n verifySemanticsOfNgModuleImport(mod, moduleType);\n verifySemanticsOfNgModuleDef(mod, false, moduleType);\n });\n var exports = maybeUnwrapFn(ngModuleDef.exports);\n declarations.forEach(verifyDeclarationsHaveDefinitions);\n declarations.forEach(verifyDirectivesHaveSelector);\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).map(unwrapModuleWithProvidersImports).forEach(function (mod) {\n verifySemanticsOfNgModuleImport(mod, moduleType);\n verifySemanticsOfNgModuleDef(mod, false, moduleType);\n });\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);\n ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);\n ngModule.entryComponents &&\n deepForEach(ngModule.entryComponents, 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 verifyDirectivesHaveSelector(type) {\n type = resolveForwardRef(type);\n var def = getDirectiveDef(type);\n if (!getComponentDef(type) && def && def.selectors.length == 0) {\n errors.push(\"Directive \" + stringifyForError(type) + \" has no selector, please add it!\");\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 deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);\n }\n }\n }\n function verifySemanticsOfNgModuleImport(type, importingModule) {\n type = resolveForwardRef(type);\n if (getComponentDef(type) || getDirectiveDef(type)) {\n throw new Error(\"Unexpected directive '\" + type.name + \"' imported by the module '\" + importingModule.name + \"'. Please add an @NgModule annotation.\");\n }\n if (getPipeDef(type)) {\n throw new Error(\"Unexpected pipe '\" + type.name + \"' imported by the module '\" + importingModule.name + \"'. Please add an @NgModule annotation.\");\n }\n }\n}\nfunction unwrapModuleWithProvidersImports(typeOrWithProviders) {\n typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n return typeOrWithProviders.ngModule || typeOrWithProviders;\n}\nfunction 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 */\nvar ownerNgModule = new Map();\nvar verifiedNgModule = new Map();\nfunction 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 */\nfunction 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 * ɵcmp 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 */\nfunction setScopeOnDeclaredComponents(moduleType, ngModule) {\n var declarations = flatten(ngModule.declarations || EMPTY_ARRAY$5);\n var transitiveScopes = transitiveScopesFor(moduleType);\n declarations.forEach(function (declaration) {\n if (declaration.hasOwnProperty(NG_COMP_DEF)) {\n // A `ɵcmp` 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_DIR_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 */\nfunction patchComponentDefWithScope(componentDef, transitiveScopes) {\n componentDef.directiveDefs = function () {\n return Array.from(transitiveScopes.compilation.directives)\n .map(function (dir) { return dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir) : 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. This function can\n * be called on modules with components that have not fully compiled yet, but the result should not\n * be used until they have.\n *\n * @param moduleType module that transitive scope should be calculated for.\n */\nfunction transitiveScopesFor(moduleType) {\n if (!isNgModule(moduleType)) {\n throw new Error(moduleType.name + \" does not have a module def (\\u0275mod property)\");\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.imports).forEach(function (imported) {\n var importedType = imported;\n if (!isNgModule(importedType)) {\n throw new Error(\"Importing \" + importedType.name + \" which does not have a \\u0275mod property\");\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);\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.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 a ɵcmp or ɵdir, 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.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 a\n // ɵcmp 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);\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}\nfunction expandModuleWithProviders(value) {\n if (isModuleWithProviders(value)) {\n return value.ngModule;\n }\n return value;\n}\nfunction isModuleWithProviders(value) {\n return value.ngModule !== undefined;\n}\nfunction 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 * component def (ɵcmp) 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 `ɵcmp`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\nfunction compileComponent(type, metadata) {\n // Initialize ngDevMode. This must be the first statement in compileComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n var ngComponentDef = null;\n // Metadata may have resources which need to be resolved.\n maybeQueueResolutionOfComponentResources(type, metadata);\n // Note that we're using the same function as `Directive`, because that's only subset of metadata\n // that we need to create the ngFactoryDef. We're avoiding using the component metadata\n // because we'd have to resolve the asynchronous templates.\n addDirectiveFactoryDef(type, metadata);\n Object.defineProperty(type, NG_COMP_DEF, {\n get: function () {\n if (ngComponentDef === null) {\n var compiler = getCompilerFacade();\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 // This const was called `jitOptions` previously but had to be renamed to `options` because\n // of a bug with Terser that caused optimized JIT builds to throw a `ReferenceError`.\n // This bug was investigated in https://github.com/angular/angular-cli/issues/17264.\n // We should not rename it back until https://github.com/terser/terser/issues/615 is fixed.\n var options = getJitOptions();\n var preserveWhitespaces = metadata.preserveWhitespaces;\n if (preserveWhitespaces === undefined) {\n if (options !== null && options.preserveWhitespaces !== undefined) {\n preserveWhitespaces = options.preserveWhitespaces;\n }\n else {\n preserveWhitespaces = false;\n }\n }\n var encapsulation = metadata.encapsulation;\n if (encapsulation === undefined) {\n if (options !== null && options.defaultEncapsulation !== undefined) {\n encapsulation = options.defaultEncapsulation;\n }\n else {\n encapsulation = ViewEncapsulation$1.Emulated;\n }\n }\n var templateUrl = metadata.templateUrl || \"ng:///\" + type.name + \"/template.html\";\n var meta = __assign(__assign({}, directiveMetadata(type, metadata)), { typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl), template: metadata.template || '', preserveWhitespaces: preserveWhitespaces, styles: metadata.styles || EMPTY_ARRAY, animations: metadata.animations, directives: [], changeDetection: metadata.changeDetection, pipes: new Map(), encapsulation: encapsulation, interpolation: metadata.interpolation, viewProviders: metadata.viewProviders || null });\n if (meta.usesInheritance) {\n addDirectiveDefToUndecoratedParents(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}\nfunction hasSelectorScope(component) {\n return component.ngSelectorScope !== undefined;\n}\n/**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * directive def 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 */\nfunction compileDirective(type, directive) {\n var ngDirectiveDef = null;\n addDirectiveFactoryDef(type, directive || {});\n Object.defineProperty(type, NG_DIR_DEF, {\n get: function () {\n if (ngDirectiveDef === null) {\n // `directive` can be null in the case of abstract directives as a base class\n // that use `@Directive()` with no selector. In that case, pass empty object to the\n // `directiveMetadata` function instead of null.\n var meta = getDirectiveMetadata(type, directive || {});\n ngDirectiveDef =\n getCompilerFacade().compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);\n }\n return ngDirectiveDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\nfunction getDirectiveMetadata(type, metadata) {\n var name = type && type.name;\n var sourceMapUrl = \"ng:///\" + name + \"/\\u0275dir.js\";\n var compiler = getCompilerFacade();\n var facade = directiveMetadata(type, metadata);\n facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n if (facade.usesInheritance) {\n addDirectiveDefToUndecoratedParents(type);\n }\n return { metadata: facade, sourceMapUrl: sourceMapUrl };\n}\nfunction addDirectiveFactoryDef(type, metadata) {\n var ngFactoryDef = null;\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: function () {\n if (ngFactoryDef === null) {\n var meta = getDirectiveMetadata(type, metadata);\n var compiler = getCompilerFacade();\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, \"ng:///\" + type.name + \"/\\u0275fac.js\", __assign(__assign({}, meta.metadata), { injectFn: 'directiveInject', target: compiler.R3FactoryTarget.Directive }));\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\nfunction 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 */\nfunction directiveMetadata(type, metadata) {\n // Reflect inputs and outputs.\n var reflect = getReflect();\n var propMetadata = reflect.ownPropMetadata(type);\n return {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n selector: metadata.selector !== undefined ? metadata.selector : null,\n deps: reflectDependencies(type),\n host: metadata.host || EMPTY_OBJ,\n propMetadata: propMetadata,\n inputs: metadata.inputs || EMPTY_ARRAY,\n outputs: metadata.outputs || EMPTY_ARRAY,\n queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n lifecycle: { usesOnChanges: reflect.hasLifecycleHook(type, '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 a directive definition to all parent classes of a type that don't have an Angular decorator.\n */\nfunction addDirectiveDefToUndecoratedParents(type) {\n var objPrototype = Object.prototype;\n var parent = Object.getPrototypeOf(type.prototype).constructor;\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 def if there are no annotations and the def hasn't been created already.\n if (!getDirectiveDef(parent) && !getComponentDef(parent) &&\n shouldAddAbstractDirective(parent)) {\n compileDirective(parent, null);\n }\n parent = Object.getPrototypeOf(parent);\n }\n}\nfunction convertToR3QueryPredicate(selector) {\n return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\nfunction 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}\nfunction extractQueriesMetadata(type, propMetadata, isQueryAnn) {\n var queriesMeta = [];\n var _loop_1 = 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(isInputAnnotation)) {\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_1(field);\n }\n return queriesMeta;\n}\nfunction extractExportAs(exportAs) {\n return exportAs === undefined ? null : splitByComma(exportAs);\n}\nfunction isContentQuery(value) {\n var name = value.ngMetadataName;\n return name === 'ContentChild' || name === 'ContentChildren';\n}\nfunction isViewQuery(value) {\n var name = value.ngMetadataName;\n return name === 'ViewChild' || name === 'ViewChildren';\n}\nfunction isInputAnnotation(value) {\n return value.ngMetadataName === 'Input';\n}\nfunction splitByComma(value) {\n return value.split(',').map(function (piece) { return piece.trim(); });\n}\nvar LIFECYCLE_HOOKS = [\n 'ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked',\n 'ngAfterContentInit', 'ngAfterContentChecked'\n];\nfunction shouldAddAbstractDirective(type) {\n var reflect = getReflect();\n if (LIFECYCLE_HOOKS.some(function (hookName) { return reflect.hasLifecycleHook(type, hookName); })) {\n return true;\n }\n var propMetadata = reflect.propMetadata(type);\n for (var field in propMetadata) {\n var annotations = propMetadata[field];\n for (var i = 0; i < annotations.length; i++) {\n var current = annotations[i];\n var metadataName = current.ngMetadataName;\n if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) ||\n metadataName === 'Output' || metadataName === 'HostBinding' ||\n metadataName === 'HostListener') {\n return true;\n }\n }\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 */\nfunction compilePipe(type, meta) {\n var ngPipeDef = null;\n var ngFactoryDef = null;\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: function () {\n if (ngFactoryDef === null) {\n var metadata = getPipeMetadata(type, meta);\n var compiler = getCompilerFacade();\n ngFactoryDef = compiler.compileFactory(angularCoreEnv, \"ng:///\" + metadata.name + \"/\\u0275fac.js\", __assign(__assign({}, metadata), { injectFn: 'directiveInject', target: compiler.R3FactoryTarget.Pipe }));\n }\n return ngFactoryDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n Object.defineProperty(type, NG_PIPE_DEF, {\n get: function () {\n if (ngPipeDef === null) {\n var metadata = getPipeMetadata(type, meta);\n ngPipeDef = getCompilerFacade().compilePipe(angularCoreEnv, \"ng:///\" + metadata.name + \"/\\u0275pipe.js\", metadata);\n }\n return ngPipeDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n}\nfunction getPipeMetadata(type, meta) {\n return {\n type: type,\n typeArgumentCount: 0,\n name: type.name,\n deps: reflectDependencies(type),\n pipeName: meta.name,\n pure: meta.pure !== undefined ? meta.pure : true\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 */\nvar ɵ0$e = function (dir) {\n if (dir === void 0) { dir = {}; }\n return dir;\n}, ɵ1$3 = function (type, meta) { return SWITCH_COMPILE_DIRECTIVE(type, meta); };\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\nvar Directive = makeDecorator('Directive', ɵ0$e, undefined, undefined, ɵ1$3);\nvar ɵ2$1 = function (c) {\n if (c === void 0) { c = {}; }\n return (__assign({ changeDetection: 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 */\nvar Component = makeDecorator('Component', ɵ2$1, Directive, undefined, ɵ3$1);\nvar ɵ4 = function (p) { return (__assign({ pure: true }, p)); }, ɵ5 = function (type, meta) { return SWITCH_COMPILE_PIPE(type, meta); };\n/**\n * @Annotation\n * @publicApi\n */\nvar Pipe = makeDecorator('Pipe', ɵ4, undefined, undefined, ɵ5);\nvar ɵ6 = function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); };\n/**\n * @Annotation\n * @publicApi\n */\nvar Input = makePropDecorator('Input', ɵ6);\nvar ɵ7 = function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); };\n/**\n * @Annotation\n * @publicApi\n */\nvar Output = makePropDecorator('Output', ɵ7);\nvar ɵ8 = function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); };\n/**\n * @Annotation\n * @publicApi\n */\nvar HostBinding = makePropDecorator('HostBinding', ɵ8);\nvar ɵ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 *\n * The following example registers another DOM event handler that listens for key-press events.\n * ``` ts\n * import { HostListener, Component } from \"@angular/core\";\n *\n * @Component({\n * selector: 'app',\n * template: `<h1>Hello, you have pressed keys {{counter}} number of times!</h1> Press any key to\n * increment the counter.\n * <button (click)=\"resetCounter()\">Reset Counter</button>`\n * })\n * class AppComponent {\n * counter = 0;\n * @HostListener('window:keydown', ['$event'])\n * handleKeyDown(event: KeyboardEvent) {\n * this.counter++;\n * }\n * resetCounter() {\n * this.counter = 0;\n * }\n * }\n * ```\n *\n * @Annotation\n * @publicApi\n */\nvar HostListener = makePropDecorator('HostListener', ɵ9);\nvar SWITCH_COMPILE_COMPONENT__POST_R3__ = compileComponent;\nvar SWITCH_COMPILE_DIRECTIVE__POST_R3__ = compileDirective;\nvar SWITCH_COMPILE_PIPE__POST_R3__ = compilePipe;\nvar SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;\nvar SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;\nvar SWITCH_COMPILE_PIPE__PRE_R3__ = noop;\nvar SWITCH_COMPILE_COMPONENT = SWITCH_COMPILE_COMPONENT__POST_R3__;\nvar SWITCH_COMPILE_DIRECTIVE = SWITCH_COMPILE_DIRECTIVE__POST_R3__;\nvar SWITCH_COMPILE_PIPE = SWITCH_COMPILE_PIPE__POST_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 */\nvar ɵ0$f = function (ngModule) { return ngModule; }, ɵ1$4 = \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 */\nfunction (type, meta) { return SWITCH_COMPILE_NGMODULE(type, meta); };\n/**\n * @Annotation\n * @publicApi\n */\nvar NgModule = makeDecorator('NgModule', ɵ0$f, undefined, undefined, ɵ1$4);\nfunction preR3NgModuleCompile(moduleType, metadata) {\n var imports = (metadata && metadata.imports) || [];\n if (metadata && metadata.exports) {\n imports = __spread(imports, [metadata.exports]);\n }\n moduleType.ɵinj = ɵɵdefineInjector({\n factory: convertInjectableProviderToFactory(moduleType, { useClass: moduleType }),\n providers: metadata && metadata.providers,\n imports: imports,\n });\n}\nvar SWITCH_COMPILE_NGMODULE__POST_R3__ = compileNgModule;\nvar SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;\nvar SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__POST_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/**\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 injection token that allows you to provide one or more initialization functions.\n * These function are injected at application startup and executed during\n * app initialization. If any of these functions returns a Promise, initialization\n * does not complete until the Promise is resolved.\n *\n * You can, for example, create a factory function that loads language data\n * or an external configuration, and provide that function to the `APP_INITIALIZER` token.\n * That way, the function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * @publicApi\n */\nvar APP_INITIALIZER = new InjectionToken('Application Initializer');\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER}s.\n *\n * @publicApi\n */\nvar 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)\n .then(function () {\n complete();\n })\n .catch(function (e) {\n _this.reject(e);\n });\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\n };\n ApplicationInitStatus = __decorate([ __param(0, Inject(APP_INITIALIZER)), __param(0, Optional()),\n __metadata(\"design:paramtypes\", [Array])\n ], ApplicationInitStatus);\nApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8)); };\nApplicationInitStatus.ɵprov = ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: function (t) { return ApplicationInitStatus.ɵfac(t); } });\n/*@__PURE__*/ (function () { setClassMetadata(ApplicationInitStatus, [{\n type: Injectable\n }], function () { return [{ type: Array, decorators: [{\n type: Inject,\n args: [APP_INITIALIZER]\n }, {\n type: Optional\n }] }]; }, null); })();\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 */\nvar APP_ID = new InjectionToken('AppId');\nfunction _appIdRandomProviderFactory() {\n return \"\" + _randomChar() + _randomChar() + _randomChar();\n}\n/**\n * Providers that will generate a random APP_ID_TOKEN.\n * @publicApi\n */\nvar APP_ID_RANDOM_PROVIDER = {\n provide: APP_ID,\n useFactory: _appIdRandomProviderFactory,\n deps: [],\n};\nfunction _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 */\nvar PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');\n/**\n * A token that indicates an opaque platform id.\n * @publicApi\n */\nvar 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 */\nvar APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');\n/**\n * A token which indicates the root directory of the application\n * @publicApi\n */\nvar 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 */\nvar 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 };\nConsole.ɵfac = function Console_Factory(t) { return new (t || Console)(); };\nConsole.ɵprov = ɵɵdefineInjectable({ token: Console, factory: function (t) { return Console.ɵfac(t); } });\n/*@__PURE__*/ (function () { setClassMetadata(Console, [{\n type: Injectable\n }], function () { return []; }, null); })();\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 */\nvar LOCALE_ID$1 = new InjectionToken('LocaleId');\n/**\n * Provide this token to set the default currency code your application uses for\n * CurrencyPipe when there is no currency code passed into it. This is only used by\n * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.\n *\n * See the [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v10 the default currency code will be taken from the current locale.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]\n * });\n * ```\n *\n * @publicApi\n */\nvar DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode');\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 */\nvar TRANSLATIONS = 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 */\nvar TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the [i18n guide](guide/i18n#missing-translation) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @publicApi\n */\nvar MissingTranslationStrategy;\n(function (MissingTranslationStrategy) {\n MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n})(MissingTranslationStrategy || (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 */\nvar SWITCH_IVY_ENABLED__POST_R3__ = true;\nvar SWITCH_IVY_ENABLED__PRE_R3__ = false;\nvar ivyEnabled = SWITCH_IVY_ENABLED__POST_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 * Combination of NgModuleFactory and ComponentFactorys.\n *\n * @publicApi\n */\nvar ModuleWithComponentFactories = /** @class */ (function () {\n function ModuleWithComponentFactories(ngModuleFactory, componentFactories) {\n this.ngModuleFactory = ngModuleFactory;\n this.componentFactories = componentFactories;\n }\n return ModuleWithComponentFactories;\n}());\nfunction _throwError() {\n throw new Error(\"Runtime compiler is not loaded\");\n}\nvar Compiler_compileModuleSync__PRE_R3__ = _throwError;\nvar Compiler_compileModuleSync__POST_R3__ = function (moduleType) {\n return new NgModuleFactory$1(moduleType);\n};\nvar Compiler_compileModuleSync = Compiler_compileModuleSync__POST_R3__;\nvar Compiler_compileModuleAsync__PRE_R3__ = _throwError;\nvar Compiler_compileModuleAsync__POST_R3__ = function (moduleType) {\n return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));\n};\nvar Compiler_compileModuleAsync = Compiler_compileModuleAsync__POST_R3__;\nvar Compiler_compileModuleAndAllComponentsSync__PRE_R3__ = _throwError;\nvar 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};\nvar Compiler_compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync__POST_R3__;\nvar Compiler_compileModuleAndAllComponentsAsync__PRE_R3__ = _throwError;\nvar Compiler_compileModuleAndAllComponentsAsync__POST_R3__ = function (moduleType) {\n return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));\n};\nvar Compiler_compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync__POST_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 */\nvar 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) {\n return undefined;\n };\nCompiler.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); };\nCompiler.ɵprov = ɵɵdefineInjectable({ token: Compiler, factory: function (t) { return Compiler.ɵfac(t); } });\n/*@__PURE__*/ (function () { setClassMetadata(Compiler, [{\n type: Injectable\n }], function () { return []; }, null); })();\n return Compiler;\n}());\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nvar COMPILER_OPTIONS = new InjectionToken('compilerOptions');\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\nvar 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 */\nvar promise = (function () { return Promise.resolve(0); })();\nfunction scheduleMicroTask(fn) {\n if (typeof Zone === 'undefined') {\n // use promise to schedule microTask instead of use Zone\n promise.then(function () {\n fn && fn.apply(null, null);\n });\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 */\nfunction getNativeRequestAnimationFrame() {\n var nativeRequestAnimationFrame = _global['requestAnimationFrame'];\n var nativeCancelAnimationFrame = _global['cancelAnimationFrame'];\n if (typeof Zone !== 'undefined' && nativeRequestAnimationFrame && nativeCancelAnimationFrame) {\n // use unpatched version of requestAnimationFrame(native delegate) if possible\n // to avoid another Change detection\n var unpatchedRequestAnimationFrame = nativeRequestAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n if (unpatchedRequestAnimationFrame) {\n nativeRequestAnimationFrame = unpatchedRequestAnimationFrame;\n }\n var unpatchedCancelAnimationFrame = nativeCancelAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n if (unpatchedCancelAnimationFrame) {\n nativeCancelAnimationFrame = unpatchedCancelAnimationFrame;\n }\n }\n return { nativeRequestAnimationFrame: nativeRequestAnimationFrame, nativeCancelAnimationFrame: nativeCancelAnimationFrame };\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 */\nvar NgZone = /** @class */ (function () {\n function NgZone(_a) {\n var _b = _a.enableLongStackTrace, enableLongStackTrace = _b === void 0 ? false : _b, _c = _a.shouldCoalesceEventChangeDetection, shouldCoalesceEventChangeDetection = _c === void 0 ? false : _c;\n this.hasPendingMacrotasks = false;\n this.hasPendingMicrotasks = 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 self.shouldCoalesceEventChangeDetection = shouldCoalesceEventChangeDetection;\n self.lastRequestAnimationFrameId = -1;\n self.nativeRequestAnimationFrame = getNativeRequestAnimationFrame().nativeRequestAnimationFrame;\n forkInnerZoneWithAngularBehavior(self);\n }\n NgZone.isInAngularZone = function () {\n return Zone.current.get('isAngularZone') === true;\n };\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}());\nfunction noop$1() { }\nvar EMPTY_PAYLOAD = {};\nfunction 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}\nfunction delayChangeDetectionForEvents(zone) {\n if (zone.lastRequestAnimationFrameId !== -1) {\n return;\n }\n zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(_global, function () {\n zone.lastRequestAnimationFrameId = -1;\n updateMicroTaskStatus(zone);\n checkStable(zone);\n });\n updateMicroTaskStatus(zone);\n}\nfunction forkInnerZoneWithAngularBehavior(zone) {\n var delayChangeDetectionForEventsDelegate = function () {\n delayChangeDetectionForEvents(zone);\n };\n var maybeDelayChangeDetection = !!zone.shouldCoalesceEventChangeDetection &&\n zone.nativeRequestAnimationFrame && delayChangeDetectionForEventsDelegate;\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: { 'isAngularZone': true, 'maybeDelayChangeDetection': maybeDelayChangeDetection },\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 if (maybeDelayChangeDetection && task.type === 'eventTask') {\n maybeDelayChangeDetection();\n }\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 updateMicroTaskStatus(zone);\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}\nfunction updateMicroTaskStatus(zone) {\n if (zone._hasPendingMicrotasks ||\n (zone.shouldCoalesceEventChangeDetection && zone.lastRequestAnimationFrameId !== -1)) {\n zone.hasPendingMicrotasks = true;\n }\n else {\n zone.hasPendingMicrotasks = false;\n }\n}\nfunction onEnter(zone) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\nfunction 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 */\nvar 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, applyThis, applyArgs) {\n return fn.apply(applyThis, applyArgs);\n };\n NoopNgZone.prototype.runGuarded = function (fn, applyThis, applyArgs) {\n return fn.apply(applyThis, applyArgs);\n };\n NoopNgZone.prototype.runOutsideAngular = function (fn) {\n return fn();\n };\n NoopNgZone.prototype.runTask = function (fn, applyThis, applyArgs, name) {\n return fn.apply(applyThis, applyArgs);\n };\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 */\nvar 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 () {\n return this._pendingCount;\n };\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([ __metadata(\"design:paramtypes\", [NgZone])\n ], Testability);\nTestability.ɵfac = function Testability_Factory(t) { return new (t || Testability)(ɵɵinject(NgZone)); };\nTestability.ɵprov = ɵɵdefineInjectable({ token: Testability, factory: function (t) { return Testability.ɵfac(t); } });\n/*@__PURE__*/ (function () { setClassMetadata(Testability, [{\n type: Injectable\n }], function () { return [{ type: NgZone }]; }, null); })();\n return Testability;\n}());\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\nvar 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) {\n this._applications.delete(token);\n };\n /**\n * Unregisters all applications\n */\n TestabilityRegistry.prototype.unregisterAllApplications = function () {\n this._applications.clear();\n };\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n TestabilityRegistry.prototype.getTestability = function (elem) {\n return this._applications.get(elem) || null;\n };\n /**\n * Get all registered testabilities\n */\n TestabilityRegistry.prototype.getAllTestabilities = function () {\n return Array.from(this._applications.values());\n };\n /**\n * Get all registered applications(root elements)\n */\n TestabilityRegistry.prototype.getAllRootElements = function () {\n return Array.from(this._applications.keys());\n };\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([ __metadata(\"design:paramtypes\", [])\n ], TestabilityRegistry);\nTestabilityRegistry.ɵfac = function TestabilityRegistry_Factory(t) { return new (t || TestabilityRegistry)(); };\nTestabilityRegistry.ɵprov = ɵɵdefineInjectable({ token: TestabilityRegistry, factory: function (t) { return TestabilityRegistry.ɵfac(t); } });\n/*@__PURE__*/ (function () { setClassMetadata(TestabilityRegistry, [{\n type: Injectable\n }], function () { return []; }, null); })();\n return TestabilityRegistry;\n}());\nvar _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 */\nfunction setTestabilityGetter(getter) {\n _testabilityGetter = getter;\n}\nvar _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 */\nvar _platform;\nvar compileNgModuleFactory = compileNgModuleFactory__POST_R3__;\nfunction compileNgModuleFactory__PRE_R3__(injector, options, moduleType) {\n var compilerFactory = injector.get(CompilerFactory);\n var compiler = compilerFactory.createCompiler([options]);\n return compiler.compileModuleAsync(moduleType);\n}\nfunction compileNgModuleFactory__POST_R3__(injector, options, moduleType) {\n ngDevMode && assertNgModuleType(moduleType);\n var compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n if (typeof ngJitMode === 'undefined' || ngJitMode) {\n // Configure the compiler to use the provided options. This call may fail when multiple modules\n // are bootstrapped with incompatible options, as a component can only be compiled according to\n // a single set of options.\n setJitOptions({\n defaultEncapsulation: _lastDefined(compilerOptions.map(function (options) { return options.defaultEncapsulation; })),\n preserveWhitespaces: _lastDefined(compilerOptions.map(function (options) { return options.preserveWhitespaces; })),\n });\n }\n var moduleFactory = new NgModuleFactory$1(moduleType);\n if (isComponentResourceResolutionQueueEmpty()) {\n return Promise.resolve(moduleFactory);\n }\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// the `window.ng` global utilities are only available in non-VE versions of\n// Angular. The function switch below will make sure that the code is not\n// included into Angular when PRE mode is active.\nfunction publishDefaultGlobalUtils__PRE_R3__() { }\nfunction publishDefaultGlobalUtils__POST_R3__() {\n ngDevMode && publishDefaultGlobalUtils();\n}\nvar publishDefaultGlobalUtils$1 = publishDefaultGlobalUtils__POST_R3__;\nvar isBoundToModule = isBoundToModule__POST_R3__;\nfunction isBoundToModule__PRE_R3__(cf) {\n return cf instanceof ComponentFactoryBoundToModule;\n}\nfunction isBoundToModule__POST_R3__(cf) {\n return cf.isBoundToModule;\n}\nvar ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\nvar 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 */\nfunction 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 publishDefaultGlobalUtils$1();\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 */\nfunction 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 provide: INJECTOR_SCOPE,\n useValue: 'platform'\n });\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 */\nfunction 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 */\nfunction destroyPlatform() {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n}\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nfunction 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 */\nvar 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 ngZoneEventCoalescing = (options && options.ngZoneEventCoalescing) || false;\n var ngZone = getNgZone(ngZoneOption, ngZoneEventCoalescing);\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 moduleRef.onDestroy(function () { return remove(_this._modules, moduleRef); });\n ngZone.runOutsideAngular(function () { return ngZone.onError.subscribe({\n next: function (error) {\n exceptionHandler.handleError(error);\n }\n }); });\n return _callAndReportToErrorHandler(exceptionHandler, ngZone, function () {\n var initStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(function () {\n if (ivyEnabled) {\n // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n var localeId = moduleRef.injector.get(LOCALE_ID$1, DEFAULT_LOCALE_ID);\n setLocaleId(localeId || DEFAULT_LOCALE_ID);\n }\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\n .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) {\n this._destroyListeners.push(callback);\n };\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 () {\n return this._injector;\n },\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 () {\n return this._destroyed;\n },\n enumerable: true,\n configurable: true\n });\n PlatformRef = __decorate([ __metadata(\"design:paramtypes\", [Injector])\n ], PlatformRef);\nPlatformRef.ɵfac = function PlatformRef_Factory(t) { return new (t || PlatformRef)(ɵɵinject(Injector)); };\nPlatformRef.ɵprov = ɵɵdefineInjectable({ token: PlatformRef, factory: function (t) { return PlatformRef.ɵfac(t); } });\n/*@__PURE__*/ (function () { setClassMetadata(PlatformRef, [{\n type: Injectable\n }], function () { return [{ type: Injector }]; }, null); })();\n return PlatformRef;\n}());\nfunction getNgZone(ngZoneOption, ngZoneEventCoalescing) {\n var ngZone;\n if (ngZoneOption === 'noop') {\n ngZone = new NoopNgZone();\n }\n else {\n ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) || new NgZone({\n enableLongStackTrace: isDevMode(),\n shouldCoalesceEventChangeDetection: ngZoneEventCoalescing\n });\n }\n return ngZone;\n}\nfunction _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}\nfunction optionsReducer(dst, objs) {\n if (Array.isArray(objs)) {\n dst = objs.reduce(optionsReducer, dst);\n }\n else {\n dst = __assign(__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 */\nvar 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 /** @internal */\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({\n next: function () {\n _this._zone.run(function () {\n _this.tick();\n });\n }\n });\n var isCurrentlyStable = new 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 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 () {\n observer.next(false);\n });\n }\n });\n return function () {\n stableSub.unsubscribe();\n unstableSub.unsubscribe();\n };\n });\n this.isStable =\n merge$1(isCurrentlyStable, isStable.pipe(share()));\n }\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) ? undefined : this._injector.get(NgModuleRef);\n var selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n var compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n compRef.onDestroy(function () {\n _this._unloadComponent(compRef);\n });\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 e_1, _a, e_2, _b;\n var _this = this;\n if (this._runningTick) {\n throw new Error('ApplicationRef.tick is called recursively');\n }\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 }\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 () {\n return this._views.length;\n },\n enumerable: true,\n configurable: true\n });\n ApplicationRef = __decorate([ __metadata(\"design:paramtypes\", [NgZone, Console, Injector,\n ErrorHandler,\n ComponentFactoryResolver,\n ApplicationInitStatus])\n ], ApplicationRef);\nApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Console), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationInitStatus)); };\nApplicationRef.ɵprov = ɵɵdefineInjectable({ token: ApplicationRef, factory: function (t) { return ApplicationRef.ɵfac(t); } });\n/*@__PURE__*/ (function () { setClassMetadata(ApplicationRef, [{\n type: Injectable\n }], function () { return [{ type: NgZone }, { type: Console }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver }, { type: ApplicationInitStatus }]; }, null); })();\n return ApplicationRef;\n}());\nfunction remove(list, el) {\n var index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\nfunction _lastDefined(args) {\n for (var i = args.length - 1; i >= 0; i--) {\n if (args[i] !== undefined) {\n return args[i];\n }\n }\n return undefined;\n}\nfunction _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 */\nvar NgModuleFactoryLoader = /** @class */ (function () {\n function NgModuleFactoryLoader() {\n }\n return NgModuleFactoryLoader;\n}());\nfunction getModuleFactory__PRE_R3__(id) {\n var factory = getRegisteredNgModuleType(id);\n if (!factory)\n throw noModuleError(id);\n return factory;\n}\nfunction 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 */\nvar getModuleFactory = getModuleFactory__POST_R3__;\nfunction 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 */\nvar _SEPARATOR = '#';\nvar 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 */\nvar SystemJsNgModuleLoaderConfig = /** @class */ (function () {\n function SystemJsNgModuleLoaderConfig() {\n }\n return SystemJsNgModuleLoaderConfig;\n}());\nvar 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 */\nvar 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([ __param(1, Optional()),\n __metadata(\"design:paramtypes\", [Compiler, SystemJsNgModuleLoaderConfig])\n ], SystemJsNgModuleLoader);\nSystemJsNgModuleLoader.ɵfac = function SystemJsNgModuleLoader_Factory(t) { return new (t || SystemJsNgModuleLoader)(ɵɵinject(Compiler), ɵɵinject(SystemJsNgModuleLoaderConfig, 8)); };\nSystemJsNgModuleLoader.ɵprov = ɵɵdefineInjectable({ token: SystemJsNgModuleLoader, factory: function (t) { return SystemJsNgModuleLoader.ɵfac(t); } });\n/*@__PURE__*/ (function () { setClassMetadata(SystemJsNgModuleLoader, [{\n type: Injectable\n }], function () { return [{ type: Compiler }, { type: SystemJsNgModuleLoaderConfig, decorators: [{\n type: Optional\n }] }]; }, null); })();\n return SystemJsNgModuleLoader;\n}());\nfunction 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 */\nvar 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 */\nvar 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 */\nvar DebugEventListener = /** @class */ (function () {\n function DebugEventListener(name, callback) {\n this.name = name;\n this.callback = callback;\n }\n return DebugEventListener;\n}());\nvar 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 () {\n return this._debugContext.injector;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"componentInstance\", {\n get: function () {\n return this._debugContext.component;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"context\", {\n get: function () {\n return this._debugContext.context;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"references\", {\n get: function () {\n return this._debugContext.references;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"providerTokens\", {\n get: function () {\n return this._debugContext.providerTokens;\n },\n enumerable: true,\n configurable: true\n });\n return DebugNode__PRE_R3__;\n}());\nvar 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 _a;\n var _this = this;\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.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 */\nfunction asNativeElements(debugEls) {\n return debugEls.map(function (el) { return el.nativeElement; });\n}\nfunction _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}\nfunction _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}\nvar 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 () {\n return getInjector(this.nativeNode);\n },\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) || getOwningComponent(nativeElement));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"context\", {\n get: function () {\n return getComponent(this.nativeNode) || getContext(this.nativeNode);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"listeners\", {\n get: function () {\n return getListeners(this.nativeNode).filter(function (listener) { return listener.type === 'dom'; });\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"references\", {\n get: function () {\n return getLocalRefs(this.nativeNode);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"providerTokens\", {\n get: function () {\n return getInjectionTokens(this.nativeNode);\n },\n enumerable: true,\n configurable: true\n });\n return DebugNode__POST_R3__;\n}());\nvar 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 () {\n try {\n var context = loadLContext(this.nativeNode);\n var lView = context.lView;\n var tData = lView[TVIEW].data;\n var tNode = tData[context.nodeIndex];\n return tNode.tagName;\n }\n catch (e) {\n return this.nativeNode.nodeName;\n }\n },\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, false);\n if (context == null) {\n return {};\n }\n var lView = context.lView;\n var tData = lView[TVIEW].data;\n var tNode = tData[context.nodeIndex];\n var properties = {};\n // Collect properties from the DOM.\n copyDomProperties(this.nativeElement, properties);\n // Collect properties from the bindings. This is needed for animation renderer which has\n // synthetic properties which don't get reflected into the DOM.\n collectPropertyBindings(properties, tNode, lView, tData);\n return properties;\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, false);\n if (context == null) {\n return {};\n }\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 var lowercaseName = attr.name.toLowerCase();\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(lowercaseName) === -1) {\n // Save the lowercase name to align the behavior between browsers.\n // IE preserves the case, while all other browser convert it to lower case.\n attributes[lowercaseName] = attr.value;\n }\n }\n return attributes;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"styles\", {\n get: function () {\n if (this.nativeElement && this.nativeElement.style) {\n return this.nativeElement.style;\n }\n return {};\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"classes\", {\n get: function () {\n var result = {};\n var element = this.nativeElement;\n // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n var className = element.className;\n var classes = className && typeof className !== 'string' ? className.baseVal.split(' ') :\n className.split(' ');\n classes.forEach(function (value) { return result[value] = true; });\n return result;\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 var node = this.nativeNode;\n var invokedListeners = [];\n this.listeners.forEach(function (listener) {\n if (listener.name === eventName) {\n var callback = listener.callback;\n callback.call(node, eventObj);\n invokedListeners.push(callback);\n }\n });\n // We need to check whether `eventListeners` exists, because it's something\n // that Zone.js only adds to `EventTarget` in browser environments.\n if (typeof node.eventListeners === 'function') {\n // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some\n // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event\n // listener.\n node.eventListeners(eventName).forEach(function (listener) {\n // In order to ensure that we can detect the special __ngUnwrap__ token described above, we\n // use `toString` on the listener and see if it contains the token. We use this approach to\n // ensure that it still worked with compiled code since it cannot remove or rename string\n // literals. We also considered using a special function name (i.e. if(listener.name ===\n // special)) but that was more cumbersome and we were also concerned the compiled code could\n // strip the name, turning the condition in to (\"\" === \"\") and always returning true.\n if (listener.toString().indexOf('__ngUnwrap__') !== -1) {\n var unwrappedListener = listener('__ngUnwrap__');\n return invokedListeners.indexOf(unwrappedListener) === -1 &&\n unwrappedListener.call(node, eventObj);\n }\n });\n }\n };\n return DebugElement__POST_R3__;\n}(DebugNode__POST_R3__));\nfunction copyDomProperties(element, properties) {\n if (element) {\n // Skip own properties (as those are patched)\n var obj = Object.getPrototypeOf(element);\n var NodePrototype = Node.prototype;\n while (obj !== null && obj !== NodePrototype) {\n var descriptors = Object.getOwnPropertyDescriptors(obj);\n for (var key in descriptors) {\n if (!key.startsWith('__') && !key.startsWith('on')) {\n // don't include properties starting with `__` and `on`.\n // `__` are patched values which should not be included.\n // `on` are listeners which also should not be included.\n var value = element[key];\n if (isPrimitiveValue(value)) {\n properties[key] = value;\n }\n }\n }\n obj = Object.getPrototypeOf(obj);\n }\n }\n}\nfunction isPrimitiveValue(value) {\n return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||\n value === null;\n}\nfunction _queryAllR3(parentElement, predicate, matches, elementsOnly) {\n var context = loadLContext(parentElement.nativeNode, false);\n if (context !== null) {\n var parentTNode = context.lView[TVIEW].data[context.nodeIndex];\n _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n }\n else {\n // If the context is null, then `parentElement` was either created with Renderer2 or native DOM\n // APIs.\n _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly);\n }\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 predicate should not be matched\n */\nfunction _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {\n var e_1, _a;\n var nativeNode = getNativeByTNodeOrNull(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 (isComponentHost(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 = getComponentLViewByIndex(tNode.index, lView);\n if (componentView && componentView[TVIEW].firstChild) {\n _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else {\n if (tNode.child) {\n // Otherwise, its children have to be processed.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n // We also have to query the DOM directly in order to catch elements inserted through\n // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple\n // times. ViewEngine could do it more efficiently, because all the insertions go through\n // Renderer2, however that's not the case in Ivy. This approach is being used because:\n // 1. Matching the ViewEngine behavior would mean potentially introducing a depedency\n // from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n // 2. We would have to make `Renderer3` \"know\" about debug nodes.\n // 3. It allows us to capture nodes that were inserted directly via the DOM.\n nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);\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 = lView[DECLARATION_COMPONENT_VIEW];\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 & 4 /* 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 predicate should not be matched\n */\nfunction _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 predicate should not be matched\n */\nfunction _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {\n if (rootNativeNode !== nativeNode) {\n var debugNode = getDebugNode$1(nativeNode);\n if (!debugNode) {\n return;\n }\n // Type of the \"predicate and \"matches\" array are set based on the value of\n // the \"elementsOnly\" parameter. TypeScript is not able to properly infer these\n // types with generics, so we manually cast the parameters accordingly.\n if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n else if (!elementsOnly && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n }\n}\n/**\n * Match all the descendants of a DOM node against a 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 */\nfunction _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) {\n var nodes = parentNode.childNodes;\n var length = nodes.length;\n for (var i = 0; i < length; i++) {\n var node = nodes[i];\n var debugNode = getDebugNode$1(node);\n if (debugNode) {\n if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n else if (!elementsOnly && predicate(debugNode) &&\n matches.indexOf(debugNode) === -1) {\n matches.push(debugNode);\n }\n _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);\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 */\nfunction collectPropertyBindings(properties, tNode, lView, tData) {\n var bindingIndexes = tNode.propertyBindings;\n if (bindingIndexes !== null) {\n for (var i = 0; i < bindingIndexes.length; i++) {\n var bindingIndex = bindingIndexes[i];\n var propMetadata = tData[bindingIndex];\n var metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n var propertyName = metadataParts[0];\n if (metadataParts.length > 1) {\n var value = metadataParts[1];\n for (var j = 1; j < metadataParts.length - 1; j++) {\n value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n }\n properties[propertyName] = value;\n }\n else {\n properties[propertyName] = lView[bindingIndex];\n }\n }\n }\n}\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nvar _nativeNodeToDebugNode = new Map();\nfunction getDebugNode__PRE_R3__(nativeNode) {\n return _nativeNodeToDebugNode.get(nativeNode) || null;\n}\nvar NG_DEBUG_PROPERTY = '__ng_debug__';\nfunction 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 */\nvar getDebugNode$1 = getDebugNode__POST_R3__;\nfunction getDebugNodeR2__PRE_R3__(nativeNode) {\n return getDebugNode__PRE_R3__(nativeNode);\n}\nfunction getDebugNodeR2__POST_R3__(_nativeNode) {\n return null;\n}\nvar getDebugNodeR2 = getDebugNodeR2__POST_R3__;\nfunction getAllDebugNodes() {\n return Array.from(_nativeNodeToDebugNode.values());\n}\nfunction indexDebugNode(node) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\nfunction removeDebugNodeFromIndex(node) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n/**\n * @publicApi\n */\nvar DebugNode = DebugNode__POST_R3__;\n/**\n * @publicApi\n */\nvar DebugElement = DebugElement__POST_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 */\nvar _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 */\nvar 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 */\nfunction _iterableDiffersFactory() {\n return defaultIterableDiffers;\n}\nfunction _keyValueDiffersFactory() {\n return defaultKeyValueDiffers;\n}\nfunction _localeFactory(locale) {\n locale = locale || getGlobalLocale();\n if (ivyEnabled) {\n setLocaleId(locale);\n }\n return locale;\n}\n/**\n * Work out the locale from the potential global properties.\n *\n * * Closure Compiler: use `goog.LOCALE`.\n * * Ivy enabled: use `$localize.locale`\n */\nfunction getGlobalLocale() {\n if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&\n typeof goog !== 'undefined' && goog.LOCALE !== 'en') {\n // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.\n // * In order to preserve backwards compatibility, we use Angular default value over\n // Closure Compiler's one.\n return goog.LOCALE;\n }\n else {\n // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE\n // COMPILE-TIME INLINER.\n //\n // * During compile time inlining of translations the expression will be replaced\n // with a string literal that is the current locale. Other forms of this expression are not\n // guaranteed to be replaced.\n //\n // * During runtime translation evaluation, the developer is required to set `$localize.locale`\n // if required, or just to provide their own `LOCALE_ID` provider.\n return (ivyEnabled && typeof $localize !== 'undefined' && $localize.locale) ||\n DEFAULT_LOCALE_ID;\n }\n}\nvar ɵ0$g = USD_CURRENCY_CODE;\n/**\n * A built-in [dependency injection token](guide/glossary#di-token)\n * that is used to configure the root injector for bootstrapping.\n */\nvar 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 { provide: DEFAULT_CURRENCY_CODE, useValue: ɵ0$g },\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 */\nfunction zoneSchedulerFactory(ngZone) {\n var queue = [];\n ngZone.onStable.subscribe(function () {\n while (queue.length) {\n queue.pop()();\n }\n });\n return function (fn) {\n queue.push(fn);\n };\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 */\nvar ApplicationModule = /** @class */ (function () {\n // Inject ApplicationRef to make it eager...\n function ApplicationModule(appRef) {\n }\n ApplicationModule = __decorate([ __metadata(\"design:paramtypes\", [ApplicationRef])\n ], ApplicationModule);\nApplicationModule.ɵmod = ɵɵdefineNgModule({ type: ApplicationModule });\nApplicationModule.ɵinj = ɵɵdefineInjector({ factory: function ApplicationModule_Factory(t) { return new (t || ApplicationModule)(ɵɵinject(ApplicationRef)); }, providers: APPLICATION_MODULE_PROVIDERS });\n/*@__PURE__*/ (function () { setClassMetadata(ApplicationModule, [{\n type: NgModule,\n args: [{ providers: APPLICATION_MODULE_PROVIDERS }]\n }], function () { return [{ type: ApplicationRef }]; }, null); })();\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 */\nfunction 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,\n matchedQueries: matchedQueries,\n matchedQueryIds: matchedQueryIds,\n references: references,\n ngContentIndex: ngContentIndex,\n childCount: childCount,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: {\n ns: null,\n name: null,\n attrs: null,\n 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}\nfunction 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 = [];\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 = [];\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 */, target: target, eventName: eventName, propName: null };\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,\n matchedQueries: matchedQueries,\n matchedQueryIds: matchedQueryIds,\n references: references,\n ngContentIndex: ngContentIndex,\n 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}\nfunction 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 === ViewEncapsulation$1.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}\nfunction 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}\nfunction renderEventHandlerClosure(view, index, eventName) {\n return function (event) { return dispatchEvent(view, index, eventName, event); };\n}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction setElementStyle(view, binding, renderNode, name, value) {\n var renderValue = view.root.sanitizer.sanitize(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}\nfunction 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 */\nfunction 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,\n 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}\nfunction createQuery() {\n return new QueryList();\n}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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 */\nfunction 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: {},\n 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}\nfunction 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 */\nfunction purePipeDef(checkIndex, argCount) {\n // argCount + 1 to include the pipe as first arg\n return _pureExpressionDef(128 /* TypePurePipe */, checkIndex, newArray(argCount + 1));\n}\nfunction pureArrayDef(checkIndex, argCount) {\n return _pureExpressionDef(32 /* TypePureArray */, checkIndex, newArray(argCount));\n}\nfunction pureObjectDef(checkIndex, propToIndex) {\n var keys = Object.keys(propToIndex);\n var nbKeys = keys.length;\n var propertyNames = [];\n for (var i = 0; i < nbKeys; i++) {\n var key = keys[i];\n var index = propToIndex[key];\n propertyNames.push(key);\n }\n return _pureExpressionDef(64 /* TypePureObject */, checkIndex, propertyNames);\n}\nfunction _pureExpressionDef(flags, checkIndex, propertyNames) {\n var bindings = [];\n for (var i = 0; i < propertyNames.length; i++) {\n var prop = propertyNames[i];\n bindings.push({\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,\n 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}\nfunction createPureExpression(view, def) {\n return { value: undefined };\n}\nfunction 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 = [];\n if (bindLen > 0)\n value.push(v0);\n if (bindLen > 1)\n value.push(v1);\n if (bindLen > 2)\n value.push(v2);\n if (bindLen > 3)\n value.push(v3);\n if (bindLen > 4)\n value.push(v4);\n if (bindLen > 5)\n value.push(v5);\n if (bindLen > 6)\n value.push(v6);\n if (bindLen > 7)\n value.push(v7);\n if (bindLen > 8)\n value.push(v8);\n if (bindLen > 9)\n value.push(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}\nfunction 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 */\nfunction textDef(checkIndex, ngContentIndex, staticText) {\n var bindings = [];\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: {},\n ngContentIndex: ngContentIndex,\n childCount: 0,\n 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction _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 */\nfunction 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,\n flags: flags,\n nodes: nodes,\n updateDirectives: updateDirectives || NOOP,\n updateRenderer: updateRenderer || NOOP,\n handleEvent: handleEvent,\n bindingCount: viewBindingCount,\n outputCount: viewDisposableCount,\n lastRenderRootNode: lastRenderRootNode\n };\n}\nfunction isNgContainer(node) {\n return (node.flags & 1 /* TypeElement */) !== 0 && node.element.name === null;\n}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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,\n parentNodeDef: parentNodeDef,\n context: null,\n component: null,\n nodes: nodes,\n state: 13 /* CatInit */,\n root: root,\n renderer: renderer,\n oldValues: new Array(def.bindingCount),\n disposables: disposables,\n initIndex: -1\n };\n return view;\n}\nfunction initView(view, component, context) {\n view.component = component;\n view.context = context;\n}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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 */\nfunction 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}\nfunction 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}\nfunction 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}\nvar 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 = {}));\nfunction 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}\nfunction 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}\nfunction 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}\nfunction execProjectedViewsAction(view, action) {\n execEmbeddedViewsAction(view, action);\n execComponentViewsAction(view, action);\n}\nfunction 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 */\nvar initialized = false;\nfunction 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}\nfunction 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 : prodCheckNoChangesNode, view); },\n updateRenderer: function (view, checkType) { return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view); },\n };\n}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction 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,\n projectableNodes: projectableNodes,\n selectorOrNode: rootSelectorOrNode,\n sanitizer: sanitizer,\n rendererFactory: rendererFactory,\n renderer: renderer,\n errorHandler: errorHandler\n };\n}\nfunction debugCreateEmbeddedView(parentView, anchorDef, viewDef, context) {\n var defWithOverride = applyProviderOverridesToView(viewDef);\n return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);\n}\nfunction 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}\nfunction debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {\n var defWithOverride = applyProviderOverridesToNgModule(def);\n return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n}\nvar providerOverrides = new Map();\nvar providerOverridesWithScope = new Map();\nvar viewDefOverrides = new Map();\nfunction 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}\nfunction debugOverrideComponentView(comp, compFactory) {\n var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n var compViewDef = resolveDefinition(hostViewDef.nodes[0].element.componentView);\n viewDefOverrides.set(comp, compViewDef);\n}\nfunction 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.\nfunction 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.\nfunction 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}\nfunction 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}\nfunction 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}\nfunction debugCheckAndUpdateView(view) {\n return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n}\nfunction debugCheckNoChangesView(view) {\n return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n}\nfunction debugDestroyView(view) {\n return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n}\nvar 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 = {}));\nvar _currentAction;\nvar _currentView;\nvar _currentNodeIndex;\nfunction debugSetCurrentNode(view, nodeIndex) {\n _currentView = view;\n _currentNodeIndex = nodeIndex;\n}\nfunction debugHandleEvent(view, nodeIndex, eventName, event) {\n debugSetCurrentNode(view, nodeIndex);\n return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n}\nfunction 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}\nfunction 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}\nfunction 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}\nfunction debugCheckNoChangesNode(view, nodeDef, argStyle, values) {\n checkNoChangesNode.apply(void 0, __spread([view, nodeDef, argStyle], values));\n}\nfunction 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}\nfunction 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}\nvar 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 () {\n return createInjector$1(this.elView, this.elDef);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"component\", {\n get: function () {\n return this.elOrCompView.component;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"context\", {\n get: function () {\n return this.elOrCompView.context;\n },\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}());\nfunction 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}\nfunction 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}\nfunction collectReferences(view, nodeDef, references) {\n for (var refName in nodeDef.references) {\n references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n }\n}\nfunction 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}\nfunction getCurrentDebugContext() {\n return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n}\nvar 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}());\nvar 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) {\n return this.debugContextFactory(nativeElement);\n };\n DebugRenderer2.prototype.destroyNode = function (node) {\n var debugNode = getDebugNode$1(node);\n removeDebugNodeFromIndex(debugNode);\n if (debugNode instanceof DebugNode__PRE_R3__) {\n debugNode.listeners.length = 0;\n }\n if (this.delegate.destroyNode) {\n this.delegate.destroyNode(node);\n }\n };\n DebugRenderer2.prototype.destroy = function () {\n this.delegate.destroy();\n };\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$1(parent);\n var debugChildEl = getDebugNode$1(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$1(parent);\n var debugChildEl = getDebugNode$1(newChild);\n var debugRefEl = getDebugNode$1(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$1(parent);\n var debugChildEl = getDebugNode$1(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$1(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$1(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$1(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$1(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$1(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$1(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$1(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$1(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) {\n return this.delegate.parentNode(node);\n };\n DebugRenderer2.prototype.nextSibling = function (node) {\n return this.delegate.nextSibling(node);\n };\n DebugRenderer2.prototype.setValue = function (node, value) {\n return this.delegate.setValue(node, value);\n };\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 */\nfunction overrideProvider(override) {\n initServicesIfNeeded();\n return Services.overrideProvider(override);\n}\nfunction overrideComponentView(comp, componentFactory) {\n initServicesIfNeeded();\n return Services.overrideComponentView(comp, componentFactory);\n}\nfunction 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!\nfunction createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) {\n return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n}\nfunction 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 scope: def.scope,\n providers: providers,\n modules: modules,\n providersByKey: providersByKey,\n };\n}\nvar 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 */\nif (ngDevMode) {\n // This helper is to give a reasonable error message to people upgrading to v9 that have not yet\n // installed `@angular/localize` in their app.\n // tslint:disable-next-line: no-toplevel-property-access\n _global.$localize = _global.$localize || function () {\n throw new Error('It looks like your application or one of its dependencies is using i18n.\\n' +\n 'Angular 9 introduced a global `$localize()` function that needs to be loaded.\\n' +\n 'Please run `ng add @angular/localize` from the Angular CLI.\\n' +\n '(For non-CLI projects, add `import \\'@angular/localize/init\\';` to your `polyfills.ts` file.\\n' +\n 'For server-side rendering applications add the import to your `main.server.ts` file.)');\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// 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\nexport { ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID$1 as LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory, NgModuleFactoryLoader, NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef$1 as ViewRef, WrappedValue, asNativeElements, assertPlatform, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode$1 as getDebugNode, getModuleFactory, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ɵ0, ɵ1, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ChangeDetectorStatus as ɵChangeDetectorStatus, CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver, Compiler_compileModuleAndAllComponentsAsync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, Compiler_compileModuleAndAllComponentsSync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, Compiler_compileModuleAsync__POST_R3__ as ɵCompiler_compileModuleAsync__POST_R3__, Compiler_compileModuleSync__POST_R3__ as ɵCompiler_compileModuleSync__POST_R3__, ComponentFactory as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, EMPTY_ARRAY$4 as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, INJECTOR_IMPL__POST_R3__ as ɵINJECTOR_IMPL__POST_R3__, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory$1 as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory$1 as ɵRender3ComponentFactory, ComponentRef$1 as ɵRender3ComponentRef, NgModuleRef$1 as ɵRender3NgModuleRef, SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ as ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, SWITCH_COMPILE_COMPONENT__POST_R3__ as ɵSWITCH_COMPILE_COMPONENT__POST_R3__, SWITCH_COMPILE_DIRECTIVE__POST_R3__ as ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, SWITCH_COMPILE_INJECTABLE__POST_R3__ as ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, SWITCH_COMPILE_NGMODULE__POST_R3__ as ɵSWITCH_COMPILE_NGMODULE__POST_R3__, SWITCH_COMPILE_PIPE__POST_R3__ as ɵSWITCH_COMPILE_PIPE__POST_R3__, SWITCH_ELEMENT_REF_FACTORY__POST_R3__ as ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, SWITCH_IVY_ENABLED__POST_R3__ as ɵSWITCH_IVY_ENABLED__POST_R3__, SWITCH_RENDERER2_FACTORY__POST_R3__ as ɵSWITCH_RENDERER2_FACTORY__POST_R3__, SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ as ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ as ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeStyle as ɵ_sanitizeStyle, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, anchorDef as ɵand, isForwardRef as ɵangular_packages_core_core_a, injectInjectorOnly as ɵangular_packages_core_core_b, getLView as ɵangular_packages_core_core_ba, getPreviousOrParentTNode as ɵangular_packages_core_core_bb, getBindingRoot as ɵangular_packages_core_core_bc, nextContextImpl as ɵangular_packages_core_core_bd, pureFunction1Internal as ɵangular_packages_core_core_bf, pureFunction2Internal as ɵangular_packages_core_core_bg, pureFunction3Internal as ɵangular_packages_core_core_bh, pureFunction4Internal as ɵangular_packages_core_core_bi, pureFunctionVInternal as ɵangular_packages_core_core_bj, getUrlSanitizer as ɵangular_packages_core_core_bk, makeParamDecorator as ɵangular_packages_core_core_bl, makePropDecorator as ɵangular_packages_core_core_bm, getClosureSafeProperty as ɵangular_packages_core_core_bn, noSideEffects as ɵangular_packages_core_core_bp, getRootContext as ɵangular_packages_core_core_bq, NullInjector as ɵangular_packages_core_core_c, ReflectiveInjector_ as ɵangular_packages_core_core_d, ReflectiveDependency as ɵangular_packages_core_core_e, resolveReflectiveProviders as ɵangular_packages_core_core_f, _appIdRandomProviderFactory as ɵangular_packages_core_core_g, createElementRef as ɵangular_packages_core_core_h, createTemplateRef as ɵangular_packages_core_core_i, getModuleFactory__PRE_R3__ as ɵangular_packages_core_core_j, DebugNode__PRE_R3__ as ɵangular_packages_core_core_k, DebugElement__PRE_R3__ as ɵangular_packages_core_core_l, getDebugNodeR2__PRE_R3__ as ɵangular_packages_core_core_m, DefaultIterableDifferFactory as ɵangular_packages_core_core_n, DefaultKeyValueDifferFactory as ɵangular_packages_core_core_o, _iterableDiffersFactory as ɵangular_packages_core_core_p, _keyValueDiffersFactory as ɵangular_packages_core_core_q, _localeFactory as ɵangular_packages_core_core_r, APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_s, zoneSchedulerFactory as ɵangular_packages_core_core_t, USD_CURRENCY_CODE as ɵangular_packages_core_core_u, _def as ɵangular_packages_core_core_v, DebugContext as ɵangular_packages_core_core_w, SCHEDULER as ɵangular_packages_core_core_x, injectAttributeImpl as ɵangular_packages_core_core_y, instructionState as ɵangular_packages_core_core_z, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, createComponentFactory as ɵccf, clearOverrides as ɵclearOverrides, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, createNgModuleFactory as ɵcmf, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory__POST_R3__ as ɵcompileNgModuleFactory__POST_R3__, compilePipe as ɵcompilePipe, createInjector as ɵcreateInjector, createRendererType2 as ɵcrt, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual$1 as ɵdevModeEqual, directiveDef as ɵdid, elementDef as ɵeld, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getComponentViewDefinitionFactory as ɵgetComponentViewDefinitionFactory, getDebugNodeR2 as ɵgetDebugNodeR2, getDebugNode__POST_R3__ as ɵgetDebugNode__POST_R3__, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getModuleFactory__POST_R3__ as ɵgetModuleFactory__POST_R3__, getSanitizationBypassType as ɵgetSanitizationBypassType, _global as ɵglobal, initServicesIfNeeded as ɵinitServicesIfNeeded, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, isBoundToModule__POST_R3__ as ɵisBoundToModule__POST_R3__, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable$1 as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, ivyEnabled as ɵivyEnabled, looseIdentical as ɵlooseIdentical, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, moduleDef as ɵmod, moduleProvideDef as ɵmpd, ngContentDef as ɵncd, nodeValue as ɵnov, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider, pureArrayDef as ɵpad, patchComponentDefWithScope as ɵpatchComponentDefWithScope, pipeDef as ɵpid, pureObjectDef as ɵpod, purePipeDef as ɵppd, providerDef as ɵprd, publishDefaultGlobalUtils as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, queryDef as ɵqud, registerLocaleData as ɵregisterLocaleData, registerModuleFactory as ɵregisterModuleFactory, registerNgModuleType as ɵregisterNgModuleType, renderComponent$1 as ɵrenderComponent, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, store as ɵstore, stringify as ɵstringify, textDef as ɵted, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapValue as ɵunv, unwrapSafeValue as ɵunwrapSafeValue, viewDef as ɵvid, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcomponentHostSyntheticListener, ɵɵcontentQuery, ɵɵdefaultStyleSanitizer, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetFactoryOf, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinjectPipeChangeDetectorRef, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵselect, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstaticContentQuery, ɵɵstaticViewQuery, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵstyleSanitizer, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵupdateSyntheticHostBinding, ɵɵviewQuery };\n\n//# sourceMappingURL=core.js.map","/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isScheduler } from '../util/isScheduler';\nimport { mergeAll } from '../operators/mergeAll';\nimport { fromArray } from './fromArray';\nexport function merge() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var concurrent = Number.POSITIVE_INFINITY;\n var scheduler = null;\n var last = observables[observables.length - 1];\n if (isScheduler(last)) {\n scheduler = observables.pop();\n if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {\n concurrent = observables.pop();\n }\n }\n else if (typeof last === 'number') {\n concurrent = observables.pop();\n }\n if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable) {\n return observables[0];\n }\n return mergeAll(concurrent)(fromArray(observables, scheduler));\n}\n//# sourceMappingURL=merge.js.map\n","/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */\nimport { connectableObservableDescriptor } from '../observable/ConnectableObservable';\nexport function multicast(subjectOrSubjectFactory, selector) {\n return function multicastOperatorFunction(source) {\n var subjectFactory;\n if (typeof subjectOrSubjectFactory === 'function') {\n subjectFactory = subjectOrSubjectFactory;\n }\n else {\n subjectFactory = function subjectFactory() {\n return subjectOrSubjectFactory;\n };\n }\n if (typeof selector === 'function') {\n return source.lift(new MulticastOperator(subjectFactory, selector));\n }\n var connectable = Object.create(source, connectableObservableDescriptor);\n connectable.source = source;\n connectable.subjectFactory = subjectFactory;\n return connectable;\n };\n}\nvar MulticastOperator = /*@__PURE__*/ (function () {\n function MulticastOperator(subjectFactory, selector) {\n this.subjectFactory = subjectFactory;\n this.selector = selector;\n }\n MulticastOperator.prototype.call = function (subscriber, source) {\n var selector = this.selector;\n var subject = this.subjectFactory();\n var subscription = selector(subject).subscribe(subscriber);\n subscription.add(source.subscribe(subject));\n return subscription;\n };\n return MulticastOperator;\n}());\nexport { MulticastOperator };\n//# sourceMappingURL=multicast.js.map\n","/**\n * @license Angular v9.1.11\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { __decorate, __extends, __param, __metadata, __read, __values } from 'tslib';\nimport { InjectionToken, ɵɵdefineInjectable, Injectable, ɵɵinject, Inject, Optional, EventEmitter, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵisListLikeIterable, ɵstringify, Input, Directive, IterableDiffers, KeyValueDiffers, ElementRef, Renderer2, NgModuleRef, ComponentFactoryResolver, Type, Injector, NgModuleFactory, ViewContainerRef, isDevMode, TemplateRef, Host, Attribute, ɵlooseIdentical, WrappedValue, ɵisPromise, ɵisObservable, Pipe, ChangeDetectorRef, DEFAULT_CURRENCY_CODE, NgModule, Version, ErrorHandler } from '@angular/core';\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 */\nimport * as ɵngcc0 from '@angular/core';\nvar _DOM = null;\nfunction getDOM() {\n return _DOM;\n}\nfunction setDOM(adapter) {\n _DOM = adapter;\n}\nfunction setRootDomAdapter(adapter) {\n if (!_DOM) {\n _DOM = adapter;\n }\n}\n/* tslint:disable:requireParameterType */\n/**\n * Provides DOM operations in an environment-agnostic way.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nvar DomAdapter = /** @class */ (function () {\n function DomAdapter() {\n }\n return DomAdapter;\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 the main rendering context. In a browser this is the DOM Document.\n *\n * Note: Document might not be available in the Application Context when Application and Rendering\n * Contexts are not the same (e.g. when running the application in a Web Worker).\n *\n * @publicApi\n */\nvar DOCUMENT = new InjectionToken('DocumentToken');\n\n/**\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be\n * platform-agnostic.\n * This means that we can have different implementation of `PlatformLocation` for the different\n * platforms that Angular supports. For example, `@angular/platform-browser` provides an\n * implementation specific to the browser environment, while `@angular/platform-server` provides\n * one suitable for use with server-side rendering.\n *\n * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}\n * when they need to interact with the DOM APIs like pushState, popState, etc.\n *\n * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly\n * by the {@link Router} in order to navigate between routes. Since all interactions between {@link\n * Router} /\n * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`\n * class, they are all platform-agnostic.\n *\n * @publicApi\n */\nvar PlatformLocation = /** @class */ (function () {\n function PlatformLocation() {\n }\n PlatformLocation.ɵprov = ɵɵdefineInjectable({ factory: useBrowserPlatformLocation, token: PlatformLocation, providedIn: \"platform\" });\nPlatformLocation.ɵfac = function PlatformLocation_Factory(t) { return new (t || PlatformLocation)(); };\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(PlatformLocation, [{\n type: Injectable,\n args: [{\n providedIn: 'platform',\n // See #23917\n useFactory: useBrowserPlatformLocation\n }]\n }], function () { return []; }, null); })();\n return PlatformLocation;\n}());\nfunction useBrowserPlatformLocation() {\n return ɵɵinject(BrowserPlatformLocation);\n}\n/**\n * @description\n * Indicates when a location is initialized.\n *\n * @publicApi\n */\nvar LOCATION_INITIALIZED = new InjectionToken('Location Initialized');\n/**\n * `PlatformLocation` encapsulates all of the direct calls to platform APIs.\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n */\nvar BrowserPlatformLocation = /** @class */ (function (_super) {\n __extends(BrowserPlatformLocation, _super);\n function BrowserPlatformLocation(_doc) {\n var _this = _super.call(this) || this;\n _this._doc = _doc;\n _this._init();\n return _this;\n }\n // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it\n /** @internal */\n BrowserPlatformLocation.prototype._init = function () {\n this.location = getDOM().getLocation();\n this._history = getDOM().getHistory();\n };\n BrowserPlatformLocation.prototype.getBaseHrefFromDOM = function () {\n return getDOM().getBaseHref(this._doc);\n };\n BrowserPlatformLocation.prototype.onPopState = function (fn) {\n getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('popstate', fn, false);\n };\n BrowserPlatformLocation.prototype.onHashChange = function (fn) {\n getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('hashchange', fn, false);\n };\n Object.defineProperty(BrowserPlatformLocation.prototype, \"href\", {\n get: function () {\n return this.location.href;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"protocol\", {\n get: function () {\n return this.location.protocol;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"hostname\", {\n get: function () {\n return this.location.hostname;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"port\", {\n get: function () {\n return this.location.port;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"pathname\", {\n get: function () {\n return this.location.pathname;\n },\n set: function (newPath) {\n this.location.pathname = newPath;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"search\", {\n get: function () {\n return this.location.search;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"hash\", {\n get: function () {\n return this.location.hash;\n },\n enumerable: true,\n configurable: true\n });\n BrowserPlatformLocation.prototype.pushState = function (state, title, url) {\n if (supportsState()) {\n this._history.pushState(state, title, url);\n }\n else {\n this.location.hash = url;\n }\n };\n BrowserPlatformLocation.prototype.replaceState = function (state, title, url) {\n if (supportsState()) {\n this._history.replaceState(state, title, url);\n }\n else {\n this.location.hash = url;\n }\n };\n BrowserPlatformLocation.prototype.forward = function () {\n this._history.forward();\n };\n BrowserPlatformLocation.prototype.back = function () {\n this._history.back();\n };\n BrowserPlatformLocation.prototype.getState = function () {\n return this._history.state;\n };\n BrowserPlatformLocation.ɵprov = ɵɵdefineInjectable({ factory: createBrowserPlatformLocation, token: BrowserPlatformLocation, providedIn: \"platform\" });\n BrowserPlatformLocation = __decorate([ __param(0, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [Object])\n ], BrowserPlatformLocation);\nBrowserPlatformLocation.ɵfac = function BrowserPlatformLocation_Factory(t) { return new (t || BrowserPlatformLocation)(ɵngcc0.ɵɵinject(DOCUMENT)); };\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(BrowserPlatformLocation, [{\n type: Injectable,\n args: [{\n providedIn: 'platform',\n // See #23917\n useFactory: createBrowserPlatformLocation\n }]\n }], function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n return BrowserPlatformLocation;\n}(PlatformLocation));\nfunction supportsState() {\n return !!window.history.pushState;\n}\nfunction createBrowserPlatformLocation() {\n return new BrowserPlatformLocation(ɵɵinject(DOCUMENT));\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 * Joins two parts of a URL with a slash if needed.\n *\n * @param start URL string\n * @param end URL string\n *\n *\n * @returns The joined URL string.\n */\nfunction joinWithSlash(start, end) {\n if (start.length == 0) {\n return end;\n }\n if (end.length == 0) {\n return start;\n }\n var slashes = 0;\n if (start.endsWith('/')) {\n slashes++;\n }\n if (end.startsWith('/')) {\n slashes++;\n }\n if (slashes == 2) {\n return start + end.substring(1);\n }\n if (slashes == 1) {\n return start + end;\n }\n return start + '/' + end;\n}\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nfunction stripTrailingSlash(url) {\n var match = url.match(/#|\\?|$/);\n var pathEndIdx = match && match.index || url.length;\n var droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nfunction normalizeQueryParams(params) {\n return params && params[0] !== '?' ? '?' + params : params;\n}\n\n/**\n * Enables the `Location` service to read route state from the browser's URL.\n * Angular provides two strategies:\n * `HashLocationStrategy` and `PathLocationStrategy`.\n *\n * Applications should use the `Router` or `Location` services to\n * interact with application route state.\n *\n * For instance, `HashLocationStrategy` produces URLs like\n * <code class=\"no-auto-link\">http://example.com#/foo</code>,\n * and `PathLocationStrategy` produces\n * <code class=\"no-auto-link\">http://example.com/foo</code> as an equivalent URL.\n *\n * See these two classes for more.\n *\n * @publicApi\n */\nvar LocationStrategy = /** @class */ (function () {\n function LocationStrategy() {\n }\n LocationStrategy.ɵprov = ɵɵdefineInjectable({ factory: provideLocationStrategy, token: LocationStrategy, providedIn: \"root\" });\nLocationStrategy.ɵfac = function LocationStrategy_Factory(t) { return new (t || LocationStrategy)(); };\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(LocationStrategy, [{\n type: Injectable,\n args: [{ providedIn: 'root', useFactory: provideLocationStrategy }]\n }], function () { return []; }, null); })();\n return LocationStrategy;\n}());\nfunction provideLocationStrategy(platformLocation) {\n // See #23917\n var location = ɵɵinject(DOCUMENT).location;\n return new PathLocationStrategy(ɵɵinject(PlatformLocation), location && location.origin || '');\n}\n/**\n * A predefined [DI token](guide/glossary#di-token) for the base href\n * to be used with the `PathLocationStrategy`.\n * The base href is the URL prefix that should be preserved when generating\n * and recognizing URLs.\n *\n * @usageNotes\n *\n * The following example shows how to use this token to configure the root app injector\n * with a base href value, so that the DI framework can supply the dependency anywhere in the app.\n *\n * ```typescript\n * import {Component, NgModule} from '@angular/core';\n * import {APP_BASE_HREF} from '@angular/common';\n *\n * @NgModule({\n * providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n */\nvar APP_BASE_HREF = new InjectionToken('appBaseHref');\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the\n * browser's URL.\n *\n * If you're using `PathLocationStrategy`, you must provide a {@link APP_BASE_HREF}\n * or add a base element to the document. This URL prefix that will be preserved\n * when generating and recognizing URLs.\n *\n * For instance, if you provide an `APP_BASE_HREF` of `'/my/app'` and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`.\n *\n * Similarly, if you add `<base href='/my/app'/>` to the document and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/path_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nvar PathLocationStrategy = /** @class */ (function (_super) {\n __extends(PathLocationStrategy, _super);\n function PathLocationStrategy(_platformLocation, href) {\n var _this = _super.call(this) || this;\n _this._platformLocation = _platformLocation;\n if (href == null) {\n href = _this._platformLocation.getBaseHrefFromDOM();\n }\n if (href == null) {\n throw new Error(\"No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.\");\n }\n _this._baseHref = href;\n return _this;\n }\n PathLocationStrategy.prototype.onPopState = function (fn) {\n this._platformLocation.onPopState(fn);\n this._platformLocation.onHashChange(fn);\n };\n PathLocationStrategy.prototype.getBaseHref = function () {\n return this._baseHref;\n };\n PathLocationStrategy.prototype.prepareExternalUrl = function (internal) {\n return joinWithSlash(this._baseHref, internal);\n };\n PathLocationStrategy.prototype.path = function (includeHash) {\n if (includeHash === void 0) { includeHash = false; }\n var pathname = this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search);\n var hash = this._platformLocation.hash;\n return hash && includeHash ? \"\" + pathname + hash : pathname;\n };\n PathLocationStrategy.prototype.pushState = function (state, title, url, queryParams) {\n var externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n this._platformLocation.pushState(state, title, externalUrl);\n };\n PathLocationStrategy.prototype.replaceState = function (state, title, url, queryParams) {\n var externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n this._platformLocation.replaceState(state, title, externalUrl);\n };\n PathLocationStrategy.prototype.forward = function () {\n this._platformLocation.forward();\n };\n PathLocationStrategy.prototype.back = function () {\n this._platformLocation.back();\n };\n PathLocationStrategy = __decorate([ __param(1, Optional()), __param(1, Inject(APP_BASE_HREF)),\n __metadata(\"design:paramtypes\", [PlatformLocation, String])\n ], PathLocationStrategy);\nPathLocationStrategy.ɵfac = function PathLocationStrategy_Factory(t) { return new (t || PathLocationStrategy)(ɵngcc0.ɵɵinject(PlatformLocation), ɵngcc0.ɵɵinject(APP_BASE_HREF, 8)); };\nPathLocationStrategy.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: PathLocationStrategy, factory: function (t) { return PathLocationStrategy.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(PathLocationStrategy, [{\n type: Injectable\n }], function () { return [{ type: PlatformLocation }, { type: String, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [APP_BASE_HREF]\n }] }]; }, null); })();\n return PathLocationStrategy;\n}(LocationStrategy));\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 * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)\n * of the browser's URL.\n *\n * For instance, if you call `location.go('/foo')`, the browser's URL will become\n * `example.com#/foo`.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nvar HashLocationStrategy = /** @class */ (function (_super) {\n __extends(HashLocationStrategy, _super);\n function HashLocationStrategy(_platformLocation, _baseHref) {\n var _this = _super.call(this) || this;\n _this._platformLocation = _platformLocation;\n _this._baseHref = '';\n if (_baseHref != null) {\n _this._baseHref = _baseHref;\n }\n return _this;\n }\n HashLocationStrategy.prototype.onPopState = function (fn) {\n this._platformLocation.onPopState(fn);\n this._platformLocation.onHashChange(fn);\n };\n HashLocationStrategy.prototype.getBaseHref = function () {\n return this._baseHref;\n };\n HashLocationStrategy.prototype.path = function (includeHash) {\n if (includeHash === void 0) { includeHash = false; }\n // the hash value is always prefixed with a `#`\n // and if it is empty then it will stay empty\n var path = this._platformLocation.hash;\n if (path == null)\n path = '#';\n return path.length > 0 ? path.substring(1) : path;\n };\n HashLocationStrategy.prototype.prepareExternalUrl = function (internal) {\n var url = joinWithSlash(this._baseHref, internal);\n return url.length > 0 ? ('#' + url) : url;\n };\n HashLocationStrategy.prototype.pushState = function (state, title, path, queryParams) {\n var url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n if (url.length == 0) {\n url = this._platformLocation.pathname;\n }\n this._platformLocation.pushState(state, title, url);\n };\n HashLocationStrategy.prototype.replaceState = function (state, title, path, queryParams) {\n var url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n if (url.length == 0) {\n url = this._platformLocation.pathname;\n }\n this._platformLocation.replaceState(state, title, url);\n };\n HashLocationStrategy.prototype.forward = function () {\n this._platformLocation.forward();\n };\n HashLocationStrategy.prototype.back = function () {\n this._platformLocation.back();\n };\n HashLocationStrategy = __decorate([ __param(1, Optional()), __param(1, Inject(APP_BASE_HREF)),\n __metadata(\"design:paramtypes\", [PlatformLocation, String])\n ], HashLocationStrategy);\nHashLocationStrategy.ɵfac = function HashLocationStrategy_Factory(t) { return new (t || HashLocationStrategy)(ɵngcc0.ɵɵinject(PlatformLocation), ɵngcc0.ɵɵinject(APP_BASE_HREF, 8)); };\nHashLocationStrategy.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: HashLocationStrategy, factory: function (t) { return HashLocationStrategy.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(HashLocationStrategy, [{\n type: Injectable\n }], function () { return [{ type: PlatformLocation }, { type: String, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [APP_BASE_HREF]\n }] }]; }, null); })();\n return HashLocationStrategy;\n}(LocationStrategy));\n\n/**\n * @description\n *\n * A service that applications can use to interact with a browser's URL.\n *\n * Depending on the `LocationStrategy` used, `Location` persists\n * to the URL's path or the URL's hash segment.\n *\n * @usageNotes\n *\n * It's better to use the `Router#navigate` service to trigger route changes. Use\n * `Location` only if you need to interact with or create normalized URLs outside of\n * routing.\n *\n * `Location` is responsible for normalizing the URL against the application's base href.\n * A normalized URL is absolute from the URL host, includes the application's base href, and has no\n * trailing slash:\n * - `/my/app/user/123` is normalized\n * - `my/app/user/123` **is not** normalized\n * - `/my/app/user/123/` **is not** normalized\n *\n * ### Example\n *\n * <code-example path='common/location/ts/path_location_component.ts'\n * region='LocationComponent'></code-example>\n *\n * @publicApi\n */\nvar Location = /** @class */ (function () {\n function Location(platformStrategy, platformLocation) {\n var _this = this;\n /** @internal */\n this._subject = new EventEmitter();\n /** @internal */\n this._urlChangeListeners = [];\n this._platformStrategy = platformStrategy;\n var browserBaseHref = this._platformStrategy.getBaseHref();\n this._platformLocation = platformLocation;\n this._baseHref = stripTrailingSlash(_stripIndexHtml(browserBaseHref));\n this._platformStrategy.onPopState(function (ev) {\n _this._subject.emit({\n 'url': _this.path(true),\n 'pop': true,\n 'state': ev.state,\n 'type': ev.type,\n });\n });\n }\n Location_1 = Location;\n /**\n * Normalizes the URL path for this location.\n *\n * @param includeHash True to include an anchor fragment in the path.\n *\n * @returns The normalized URL path.\n */\n // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is\n // removed.\n Location.prototype.path = function (includeHash) {\n if (includeHash === void 0) { includeHash = false; }\n return this.normalize(this._platformStrategy.path(includeHash));\n };\n /**\n * Reports the current state of the location history.\n * @returns The current value of the `history.state` object.\n */\n Location.prototype.getState = function () {\n return this._platformLocation.getState();\n };\n /**\n * Normalizes the given path and compares to the current normalized path.\n *\n * @param path The given URL path.\n * @param query Query parameters.\n *\n * @returns True if the given URL path is equal to the current normalized path, false\n * otherwise.\n */\n Location.prototype.isCurrentPathEqualTo = function (path, query) {\n if (query === void 0) { query = ''; }\n return this.path() == this.normalize(path + normalizeQueryParams(query));\n };\n /**\n * Normalizes a URL path by stripping any trailing slashes.\n *\n * @param url String representing a URL.\n *\n * @returns The normalized URL string.\n */\n Location.prototype.normalize = function (url) {\n return Location_1.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url)));\n };\n /**\n * Normalizes an external URL path.\n * If the given URL doesn't begin with a leading slash (`'/'`), adds one\n * before normalizing. Adds a hash if `HashLocationStrategy` is\n * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.\n *\n * @param url String representing a URL.\n *\n * @returns A normalized platform-specific URL.\n */\n Location.prototype.prepareExternalUrl = function (url) {\n if (url && url[0] !== '/') {\n url = '/' + url;\n }\n return this._platformStrategy.prepareExternalUrl(url);\n };\n // TODO: rename this method to pushState\n /**\n * Changes the browser's URL to a normalized version of a given URL, and pushes a\n * new item onto the platform's history.\n *\n * @param path URL path to normalize.\n * @param query Query parameters.\n * @param state Location history state.\n *\n */\n Location.prototype.go = function (path, query, state) {\n if (query === void 0) { query = ''; }\n if (state === void 0) { state = null; }\n this._platformStrategy.pushState(state, '', path, query);\n this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);\n };\n /**\n * Changes the browser's URL to a normalized version of the given URL, and replaces\n * the top item on the platform's history stack.\n *\n * @param path URL path to normalize.\n * @param query Query parameters.\n * @param state Location history state.\n */\n Location.prototype.replaceState = function (path, query, state) {\n if (query === void 0) { query = ''; }\n if (state === void 0) { state = null; }\n this._platformStrategy.replaceState(state, '', path, query);\n this._notifyUrlChangeListeners(this.prepareExternalUrl(path + normalizeQueryParams(query)), state);\n };\n /**\n * Navigates forward in the platform's history.\n */\n Location.prototype.forward = function () {\n this._platformStrategy.forward();\n };\n /**\n * Navigates back in the platform's history.\n */\n Location.prototype.back = function () {\n this._platformStrategy.back();\n };\n /**\n * Registers a URL change listener. Use to catch updates performed by the Angular\n * framework that are not detectible through \"popstate\" or \"hashchange\" events.\n *\n * @param fn The change handler function, which take a URL and a location history state.\n */\n Location.prototype.onUrlChange = function (fn) {\n var _this = this;\n this._urlChangeListeners.push(fn);\n this.subscribe(function (v) {\n _this._notifyUrlChangeListeners(v.url, v.state);\n });\n };\n /** @internal */\n Location.prototype._notifyUrlChangeListeners = function (url, state) {\n if (url === void 0) { url = ''; }\n this._urlChangeListeners.forEach(function (fn) { return fn(url, state); });\n };\n /**\n * Subscribes to the platform's `popState` events.\n *\n * @param value Event that is triggered when the state history changes.\n * @param exception The exception to throw.\n *\n * @returns Subscribed events.\n */\n Location.prototype.subscribe = function (onNext, onThrow, onReturn) {\n return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });\n };\n var Location_1;\n /**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\n Location.normalizeQueryParams = normalizeQueryParams;\n /**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start URL string\n * @param end URL string\n *\n *\n * @returns The joined URL string.\n */\n Location.joinWithSlash = joinWithSlash;\n /**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\n Location.stripTrailingSlash = stripTrailingSlash;\n Location.ɵprov = ɵɵdefineInjectable({ factory: createLocation, token: Location, providedIn: \"root\" });\n Location = Location_1 = __decorate([ __metadata(\"design:paramtypes\", [LocationStrategy, PlatformLocation])\n ], Location);\nLocation.ɵfac = function Location_Factory(t) { return new (t || Location)(ɵngcc0.ɵɵinject(LocationStrategy), ɵngcc0.ɵɵinject(PlatformLocation)); };\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(Location, [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n // See #23917\n useFactory: createLocation\n }]\n }], function () { return [{ type: LocationStrategy }, { type: PlatformLocation }]; }, null); })();\n return Location;\n}());\nfunction createLocation() {\n return new Location(ɵɵinject(LocationStrategy), ɵɵinject(PlatformLocation));\n}\nfunction _stripBaseHref(baseHref, url) {\n return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url;\n}\nfunction _stripIndexHtml(url) {\n return url.replace(/\\/index.html$/, '');\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/** @internal */\nvar CURRENCIES_EN = {\n 'ADP': [undefined, undefined, 0],\n 'AFN': [undefined, undefined, 0],\n 'ALL': [undefined, undefined, 0],\n 'AMD': [undefined, undefined, 2],\n 'AOA': [undefined, 'Kz'],\n 'ARS': [undefined, '$'],\n 'AUD': ['A$', '$'],\n 'BAM': [undefined, 'KM'],\n 'BBD': [undefined, '$'],\n 'BDT': [undefined, '৳'],\n 'BHD': [undefined, undefined, 3],\n 'BIF': [undefined, undefined, 0],\n 'BMD': [undefined, '$'],\n 'BND': [undefined, '$'],\n 'BOB': [undefined, 'Bs'],\n 'BRL': ['R$'],\n 'BSD': [undefined, '$'],\n 'BWP': [undefined, 'P'],\n 'BYN': [undefined, 'р.', 2],\n 'BYR': [undefined, undefined, 0],\n 'BZD': [undefined, '$'],\n 'CAD': ['CA$', '$', 2],\n 'CHF': [undefined, undefined, 2],\n 'CLF': [undefined, undefined, 4],\n 'CLP': [undefined, '$', 0],\n 'CNY': ['CN¥', '¥'],\n 'COP': [undefined, '$', 2],\n 'CRC': [undefined, '₡', 2],\n 'CUC': [undefined, '$'],\n 'CUP': [undefined, '$'],\n 'CZK': [undefined, 'Kč', 2],\n 'DJF': [undefined, undefined, 0],\n 'DKK': [undefined, 'kr', 2],\n 'DOP': [undefined, '$'],\n 'EGP': [undefined, 'E£'],\n 'ESP': [undefined, '₧', 0],\n 'EUR': ['€'],\n 'FJD': [undefined, '$'],\n 'FKP': [undefined, '£'],\n 'GBP': ['£'],\n 'GEL': [undefined, '₾'],\n 'GIP': [undefined, '£'],\n 'GNF': [undefined, 'FG', 0],\n 'GTQ': [undefined, 'Q'],\n 'GYD': [undefined, '$', 2],\n 'HKD': ['HK$', '$'],\n 'HNL': [undefined, 'L'],\n 'HRK': [undefined, 'kn'],\n 'HUF': [undefined, 'Ft', 2],\n 'IDR': [undefined, 'Rp', 2],\n 'ILS': ['₪'],\n 'INR': ['₹'],\n 'IQD': [undefined, undefined, 0],\n 'IRR': [undefined, undefined, 0],\n 'ISK': [undefined, 'kr', 0],\n 'ITL': [undefined, undefined, 0],\n 'JMD': [undefined, '$'],\n 'JOD': [undefined, undefined, 3],\n 'JPY': ['¥', undefined, 0],\n 'KHR': [undefined, '៛'],\n 'KMF': [undefined, 'CF', 0],\n 'KPW': [undefined, '₩', 0],\n 'KRW': ['₩', undefined, 0],\n 'KWD': [undefined, undefined, 3],\n 'KYD': [undefined, '$'],\n 'KZT': [undefined, '₸'],\n 'LAK': [undefined, '₭', 0],\n 'LBP': [undefined, 'L£', 0],\n 'LKR': [undefined, 'Rs'],\n 'LRD': [undefined, '$'],\n 'LTL': [undefined, 'Lt'],\n 'LUF': [undefined, undefined, 0],\n 'LVL': [undefined, 'Ls'],\n 'LYD': [undefined, undefined, 3],\n 'MGA': [undefined, 'Ar', 0],\n 'MGF': [undefined, undefined, 0],\n 'MMK': [undefined, 'K', 0],\n 'MNT': [undefined, '₮', 2],\n 'MRO': [undefined, undefined, 0],\n 'MUR': [undefined, 'Rs', 2],\n 'MXN': ['MX$', '$'],\n 'MYR': [undefined, 'RM'],\n 'NAD': [undefined, '$'],\n 'NGN': [undefined, '₦'],\n 'NIO': [undefined, 'C$'],\n 'NOK': [undefined, 'kr', 2],\n 'NPR': [undefined, 'Rs'],\n 'NZD': ['NZ$', '$'],\n 'OMR': [undefined, undefined, 3],\n 'PHP': [undefined, '₱'],\n 'PKR': [undefined, 'Rs', 2],\n 'PLN': [undefined, 'zł'],\n 'PYG': [undefined, '₲', 0],\n 'RON': [undefined, 'lei'],\n 'RSD': [undefined, undefined, 0],\n 'RUB': [undefined, '₽'],\n 'RUR': [undefined, 'р.'],\n 'RWF': [undefined, 'RF', 0],\n 'SBD': [undefined, '$'],\n 'SEK': [undefined, 'kr', 2],\n 'SGD': [undefined, '$'],\n 'SHP': [undefined, '£'],\n 'SLL': [undefined, undefined, 0],\n 'SOS': [undefined, undefined, 0],\n 'SRD': [undefined, '$'],\n 'SSP': [undefined, '£'],\n 'STD': [undefined, undefined, 0],\n 'STN': [undefined, 'Db'],\n 'SYP': [undefined, '£', 0],\n 'THB': [undefined, '฿'],\n 'TMM': [undefined, undefined, 0],\n 'TND': [undefined, undefined, 3],\n 'TOP': [undefined, 'T$'],\n 'TRL': [undefined, undefined, 0],\n 'TRY': [undefined, '₺'],\n 'TTD': [undefined, '$'],\n 'TWD': ['NT$', '$', 2],\n 'TZS': [undefined, undefined, 2],\n 'UAH': [undefined, '₴'],\n 'UGX': [undefined, undefined, 0],\n 'USD': ['$'],\n 'UYI': [undefined, undefined, 0],\n 'UYU': [undefined, '$'],\n 'UYW': [undefined, undefined, 4],\n 'UZS': [undefined, undefined, 2],\n 'VEF': [undefined, 'Bs', 2],\n 'VND': ['₫', undefined, 0],\n 'VUV': [undefined, undefined, 0],\n 'XAF': ['FCFA', undefined, 0],\n 'XCD': ['EC$', '$'],\n 'XOF': ['CFA', undefined, 0],\n 'XPF': ['CFPF', undefined, 0],\n 'XXX': ['¤'],\n 'YER': [undefined, undefined, 0],\n 'ZAR': [undefined, 'R'],\n 'ZMK': [undefined, undefined, 0],\n 'ZMW': [undefined, 'ZK'],\n 'ZWD': [undefined, undefined, 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/**\n * Format styles that can be used to represent numbers.\n * @see `getLocaleNumberFormat()`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nvar NumberFormatStyle;\n(function (NumberFormatStyle) {\n NumberFormatStyle[NumberFormatStyle[\"Decimal\"] = 0] = \"Decimal\";\n NumberFormatStyle[NumberFormatStyle[\"Percent\"] = 1] = \"Percent\";\n NumberFormatStyle[NumberFormatStyle[\"Currency\"] = 2] = \"Currency\";\n NumberFormatStyle[NumberFormatStyle[\"Scientific\"] = 3] = \"Scientific\";\n})(NumberFormatStyle || (NumberFormatStyle = {}));\n/**\n * Plurality cases used for translating plurals to different languages.\n *\n * @see `NgPlural`\n * @see `NgPluralCase`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nvar Plural;\n(function (Plural) {\n Plural[Plural[\"Zero\"] = 0] = \"Zero\";\n Plural[Plural[\"One\"] = 1] = \"One\";\n Plural[Plural[\"Two\"] = 2] = \"Two\";\n Plural[Plural[\"Few\"] = 3] = \"Few\";\n Plural[Plural[\"Many\"] = 4] = \"Many\";\n Plural[Plural[\"Other\"] = 5] = \"Other\";\n})(Plural || (Plural = {}));\n/**\n * Context-dependant translation forms for strings.\n * Typically the standalone version is for the nominative form of the word,\n * and the format version is used for the genitive case.\n * @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nvar FormStyle;\n(function (FormStyle) {\n FormStyle[FormStyle[\"Format\"] = 0] = \"Format\";\n FormStyle[FormStyle[\"Standalone\"] = 1] = \"Standalone\";\n})(FormStyle || (FormStyle = {}));\n/**\n * String widths available for translations.\n * The specific character widths are locale-specific.\n * Examples are given for the word \"Sunday\" in English.\n *\n * @publicApi\n */\nvar TranslationWidth;\n(function (TranslationWidth) {\n /** 1 character for `en-US`. For example: 'S' */\n TranslationWidth[TranslationWidth[\"Narrow\"] = 0] = \"Narrow\";\n /** 3 characters for `en-US`. For example: 'Sun' */\n TranslationWidth[TranslationWidth[\"Abbreviated\"] = 1] = \"Abbreviated\";\n /** Full length for `en-US`. For example: \"Sunday\" */\n TranslationWidth[TranslationWidth[\"Wide\"] = 2] = \"Wide\";\n /** 2 characters for `en-US`, For example: \"Su\" */\n TranslationWidth[TranslationWidth[\"Short\"] = 3] = \"Short\";\n})(TranslationWidth || (TranslationWidth = {}));\n/**\n * String widths available for date-time formats.\n * The specific character widths are locale-specific.\n * Examples are given for `en-US`.\n *\n * @see `getLocaleDateFormat()`\n * @see `getLocaleTimeFormat()``\n * @see `getLocaleDateTimeFormat()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n * @publicApi\n */\nvar FormatWidth;\n(function (FormatWidth) {\n /**\n * For `en-US`, 'M/d/yy, h:mm a'`\n * (Example: `6/15/15, 9:03 AM`)\n */\n FormatWidth[FormatWidth[\"Short\"] = 0] = \"Short\";\n /**\n * For `en-US`, `'MMM d, y, h:mm:ss a'`\n * (Example: `Jun 15, 2015, 9:03:01 AM`)\n */\n FormatWidth[FormatWidth[\"Medium\"] = 1] = \"Medium\";\n /**\n * For `en-US`, `'MMMM d, y, h:mm:ss a z'`\n * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)\n */\n FormatWidth[FormatWidth[\"Long\"] = 2] = \"Long\";\n /**\n * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'`\n * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`)\n */\n FormatWidth[FormatWidth[\"Full\"] = 3] = \"Full\";\n})(FormatWidth || (FormatWidth = {}));\n/**\n * Symbols that can be used to replace placeholders in number patterns.\n * Examples are based on `en-US` values.\n *\n * @see `getLocaleNumberSymbol()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nvar NumberSymbol;\n(function (NumberSymbol) {\n /**\n * Decimal separator.\n * For `en-US`, the dot character.\n * Example : 2,345`.`67\n */\n NumberSymbol[NumberSymbol[\"Decimal\"] = 0] = \"Decimal\";\n /**\n * Grouping separator, typically for thousands.\n * For `en-US`, the comma character.\n * Example: 2`,`345.67\n */\n NumberSymbol[NumberSymbol[\"Group\"] = 1] = \"Group\";\n /**\n * List-item separator.\n * Example: \"one, two, and three\"\n */\n NumberSymbol[NumberSymbol[\"List\"] = 2] = \"List\";\n /**\n * Sign for percentage (out of 100).\n * Example: 23.4%\n */\n NumberSymbol[NumberSymbol[\"PercentSign\"] = 3] = \"PercentSign\";\n /**\n * Sign for positive numbers.\n * Example: +23\n */\n NumberSymbol[NumberSymbol[\"PlusSign\"] = 4] = \"PlusSign\";\n /**\n * Sign for negative numbers.\n * Example: -23\n */\n NumberSymbol[NumberSymbol[\"MinusSign\"] = 5] = \"MinusSign\";\n /**\n * Computer notation for exponential value (n times a power of 10).\n * Example: 1.2E3\n */\n NumberSymbol[NumberSymbol[\"Exponential\"] = 6] = \"Exponential\";\n /**\n * Human-readable format of exponential.\n * Example: 1.2x103\n */\n NumberSymbol[NumberSymbol[\"SuperscriptingExponent\"] = 7] = \"SuperscriptingExponent\";\n /**\n * Sign for permille (out of 1000).\n * Example: 23.4‰\n */\n NumberSymbol[NumberSymbol[\"PerMille\"] = 8] = \"PerMille\";\n /**\n * Infinity, can be used with plus and minus.\n * Example: ∞, +∞, -∞\n */\n NumberSymbol[NumberSymbol[\"Infinity\"] = 9] = \"Infinity\";\n /**\n * Not a number.\n * Example: NaN\n */\n NumberSymbol[NumberSymbol[\"NaN\"] = 10] = \"NaN\";\n /**\n * Symbol used between time units.\n * Example: 10:52\n */\n NumberSymbol[NumberSymbol[\"TimeSeparator\"] = 11] = \"TimeSeparator\";\n /**\n * Decimal separator for currency values (fallback to `Decimal`).\n * Example: $2,345.67\n */\n NumberSymbol[NumberSymbol[\"CurrencyDecimal\"] = 12] = \"CurrencyDecimal\";\n /**\n * Group separator for currency values (fallback to `Group`).\n * Example: $2,345.67\n */\n NumberSymbol[NumberSymbol[\"CurrencyGroup\"] = 13] = \"CurrencyGroup\";\n})(NumberSymbol || (NumberSymbol = {}));\n/**\n * The value for each day of the week, based on the `en-US` locale\n *\n * @publicApi\n */\nvar WeekDay;\n(function (WeekDay) {\n WeekDay[WeekDay[\"Sunday\"] = 0] = \"Sunday\";\n WeekDay[WeekDay[\"Monday\"] = 1] = \"Monday\";\n WeekDay[WeekDay[\"Tuesday\"] = 2] = \"Tuesday\";\n WeekDay[WeekDay[\"Wednesday\"] = 3] = \"Wednesday\";\n WeekDay[WeekDay[\"Thursday\"] = 4] = \"Thursday\";\n WeekDay[WeekDay[\"Friday\"] = 5] = \"Friday\";\n WeekDay[WeekDay[\"Saturday\"] = 6] = \"Saturday\";\n})(WeekDay || (WeekDay = {}));\n/**\n * Retrieves the locale ID from the currently loaded locale.\n * The loaded locale could be, for example, a global one rather than a regional one.\n * @param locale A locale code, such as `fr-FR`.\n * @returns The locale code. For example, `fr`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleId(locale) {\n return ɵfindLocaleData(locale)[ɵLocaleDataIndex.LocaleId];\n}\n/**\n * Retrieves day period strings for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleDayPeriods(locale, formStyle, width) {\n var data = ɵfindLocaleData(locale);\n var amPmData = [\n data[ɵLocaleDataIndex.DayPeriodsFormat], data[ɵLocaleDataIndex.DayPeriodsStandalone]\n ];\n var amPm = getLastDefinedValue(amPmData, formStyle);\n return getLastDefinedValue(amPm, width);\n}\n/**\n * Retrieves days of the week for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example,`[Sunday, Monday, ... Saturday]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleDayNames(locale, formStyle, width) {\n var data = ɵfindLocaleData(locale);\n var daysData = [data[ɵLocaleDataIndex.DaysFormat], data[ɵLocaleDataIndex.DaysStandalone]];\n var days = getLastDefinedValue(daysData, formStyle);\n return getLastDefinedValue(days, width);\n}\n/**\n * Retrieves months of the year for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example, `[January, February, ...]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleMonthNames(locale, formStyle, width) {\n var data = ɵfindLocaleData(locale);\n var monthsData = [data[ɵLocaleDataIndex.MonthsFormat], data[ɵLocaleDataIndex.MonthsStandalone]];\n var months = getLastDefinedValue(monthsData, formStyle);\n return getLastDefinedValue(months, width);\n}\n/**\n * Retrieves Gregorian-calendar eras for the given locale.\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n\n * @returns An array of localized era strings.\n * For example, `[AD, BC]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleEraNames(locale, width) {\n var data = ɵfindLocaleData(locale);\n var erasData = data[ɵLocaleDataIndex.Eras];\n return getLastDefinedValue(erasData, width);\n}\n/**\n * Retrieves the first day of the week for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns A day index number, using the 0-based week-day index for `en-US`\n * (Sunday = 0, Monday = 1, ...).\n * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleFirstDayOfWeek(locale) {\n var data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.FirstDayOfWeek];\n}\n/**\n * Range of week days that are considered the week-end for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The range of day values, `[startDay, endDay]`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleWeekEndRange(locale) {\n var data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.WeekendRange];\n}\n/**\n * Retrieves a localized date-value formating string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formating string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleDateFormat(locale, width) {\n var data = ɵfindLocaleData(locale);\n return getLastDefinedValue(data[ɵLocaleDataIndex.DateFormat], width);\n}\n/**\n * Retrieves a localized time-value formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n\n * @publicApi\n */\nfunction getLocaleTimeFormat(locale, width) {\n var data = ɵfindLocaleData(locale);\n return getLastDefinedValue(data[ɵLocaleDataIndex.TimeFormat], width);\n}\n/**\n * Retrieves a localized date-time formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleDateTimeFormat(locale, width) {\n var data = ɵfindLocaleData(locale);\n var dateTimeFormatData = data[ɵLocaleDataIndex.DateTimeFormat];\n return getLastDefinedValue(dateTimeFormatData, width);\n}\n/**\n * Retrieves a localized number symbol that can be used to replace placeholders in number formats.\n * @param locale The locale code.\n * @param symbol The symbol to localize.\n * @returns The character for the localized symbol.\n * @see `NumberSymbol`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleNumberSymbol(locale, symbol) {\n var data = ɵfindLocaleData(locale);\n var res = data[ɵLocaleDataIndex.NumberSymbols][symbol];\n if (typeof res === 'undefined') {\n if (symbol === NumberSymbol.CurrencyDecimal) {\n return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Decimal];\n }\n else if (symbol === NumberSymbol.CurrencyGroup) {\n return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Group];\n }\n }\n return res;\n}\n/**\n * Retrieves a number format for a given locale.\n *\n * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`\n * when used to format the number 12345.678 could result in \"12'345,678\". That would happen if the\n * grouping separator for your language is an apostrophe, and the decimal separator is a comma.\n *\n * <b>Important:</b> The characters `.` `,` `0` `#` (and others below) are special placeholders\n * that stand for the decimal separator, and so on, and are NOT real characters.\n * You must NOT \"translate\" the placeholders. For example, don't change `.` to `,` even though in\n * your language the decimal point is written with a comma. The symbols should be replaced by the\n * local equivalents, using the appropriate `NumberSymbol` for your language.\n *\n * Here are the special characters used in number patterns:\n *\n * | Symbol | Meaning |\n * |--------|---------|\n * | . | Replaced automatically by the character used for the decimal point. |\n * | , | Replaced by the \"grouping\" (thousands) separator. |\n * | 0 | Replaced by a digit (or zero if there aren't enough digits). |\n * | # | Replaced by a digit (or nothing if there aren't enough). |\n * | ¤ | Replaced by a currency symbol, such as $ or USD. |\n * | % | Marks a percent format. The % symbol may change position, but must be retained. |\n * | E | Marks a scientific format. The E symbol may change position, but must be retained. |\n * | ' | Special characters used as literal characters are quoted with ASCII single quotes. |\n *\n * @param locale A locale code for the locale format rules to use.\n * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.)\n * @returns The localized format string.\n * @see `NumberFormatStyle`\n * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleNumberFormat(locale, type) {\n var data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.NumberFormats][type];\n}\n/**\n * Retrieves the symbol used to represent the currency for the main country\n * corresponding to a given locale. For example, '$' for `en-US`.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The localized symbol character,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleCurrencySymbol(locale) {\n var data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.CurrencySymbol] || null;\n}\n/**\n * Retrieves the name of the currency for the main country corresponding\n * to a given locale. For example, 'US Dollar' for `en-US`.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency name,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleCurrencyName(locale) {\n var data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.CurrencyName] || null;\n}\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n * @publicApi\n */\nfunction getLocaleCurrencyCode(locale) {\n return ɵgetLocaleCurrencyCode(locale);\n}\n/**\n * Retrieves the currency values for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency values.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nfunction getLocaleCurrencies(locale) {\n var data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.Currencies];\n}\n/**\n * @alias core/ɵgetLocalePluralCase\n * @publicApi\n */\nvar getLocalePluralCase = ɵgetLocalePluralCase;\nfunction checkFullData(data) {\n if (!data[ɵLocaleDataIndex.ExtraData]) {\n throw new Error(\"Missing extra locale data for the locale \\\"\" + data[ɵLocaleDataIndex\n .LocaleId] + \"\\\". Use \\\"registerLocaleData\\\" to load new data. See the \\\"I18n guide\\\" on angular.io to know more.\");\n }\n}\n/**\n * Retrieves locale-specific rules used to determine which day period to use\n * when more than one period is defined for a locale.\n *\n * There is a rule for each defined day period. The\n * first rule is applied to the first day period and so on.\n * Fall back to AM/PM when no rules are available.\n *\n * A rule can specify a period as time range, or as a single time value.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n#i18n-pipes).\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The rules for the locale, a single time value or array of *from-time, to-time*,\n * or null if no periods are available.\n *\n * @see `getLocaleExtraDayPeriods()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleExtraDayPeriodRules(locale) {\n var data = ɵfindLocaleData(locale);\n checkFullData(data);\n var rules = data[ɵLocaleDataIndex.ExtraData][2 /* ExtraDayPeriodsRules */] || [];\n return rules.map(function (rule) {\n if (typeof rule === 'string') {\n return extractTime(rule);\n }\n return [extractTime(rule[0]), extractTime(rule[1])];\n });\n}\n/**\n * Retrieves locale-specific day periods, which indicate roughly how a day is broken up\n * in different languages.\n * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n#i18n-pipes).\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns The translated day-period strings.\n * @see `getLocaleExtraDayPeriodRules()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLocaleExtraDayPeriods(locale, formStyle, width) {\n var data = ɵfindLocaleData(locale);\n checkFullData(data);\n var dayPeriodsData = [\n data[ɵLocaleDataIndex.ExtraData][0 /* ExtraDayPeriodFormats */],\n data[ɵLocaleDataIndex.ExtraData][1 /* ExtraDayPeriodStandalone */]\n ];\n var dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];\n return getLastDefinedValue(dayPeriods, width) || [];\n}\n/**\n * Retrieves the writing direction of a specified locale\n * @param locale A locale code for the locale format rules to use.\n * @publicApi\n * @returns 'rtl' or 'ltr'\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nfunction getLocaleDirection(locale) {\n var data = ɵfindLocaleData(locale);\n return data[ɵLocaleDataIndex.Directionality];\n}\n/**\n * Retrieves the first value that is defined in an array, going backwards from an index position.\n *\n * To avoid repeating the same data (as when the \"format\" and \"standalone\" forms are the same)\n * add the first value to the locale data arrays, and add other values only if they are different.\n *\n * @param data The data array to retrieve from.\n * @param index A 0-based index into the array to start from.\n * @returns The value immediately before the given index position.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLastDefinedValue(data, index) {\n for (var i = index; i > -1; i--) {\n if (typeof data[i] !== 'undefined') {\n return data[i];\n }\n }\n throw new Error('Locale data API: locale data undefined');\n}\n/**\n * Extracts the hours and minutes from a string like \"15:45\"\n */\nfunction extractTime(time) {\n var _a = __read(time.split(':'), 2), h = _a[0], m = _a[1];\n return { hours: +h, minutes: +m };\n}\n/**\n * Retrieves the currency symbol for a given currency code.\n *\n * For example, for the default `en-US` locale, the code `USD` can\n * be represented by the narrow symbol `$` or the wide symbol `US$`.\n *\n * @param code The currency code.\n * @param format The format, `wide` or `narrow`.\n * @param locale A locale code for the locale format rules to use.\n *\n * @returns The symbol, or the currency code if no symbol is available.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getCurrencySymbol(code, format, locale) {\n if (locale === void 0) { locale = 'en'; }\n var currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];\n var symbolNarrow = currency[1 /* SymbolNarrow */];\n if (format === 'narrow' && typeof symbolNarrow === 'string') {\n return symbolNarrow;\n }\n return currency[0 /* Symbol */] || code;\n}\n// Most currencies have cents, that's why the default is 2\nvar DEFAULT_NB_OF_CURRENCY_DIGITS = 2;\n/**\n * Reports the number of decimal digits for a given currency.\n * The value depends upon the presence of cents in that particular currency.\n *\n * @param code The currency code.\n * @returns The number of decimal digits, typically 0 or 2.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getNumberOfCurrencyDigits(code) {\n var digits;\n var currency = CURRENCIES_EN[code];\n if (currency) {\n digits = currency[2 /* NbOfDigits */];\n }\n return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;\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 */\nvar ISO8601_DATE_REGEX = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n// 1 2 3 4 5 6 7 8 9 10 11\nvar NAMED_FORMATS = {};\nvar DATE_FORMATS_SPLIT = /((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\\s\\S]*)/;\nvar ZoneWidth;\n(function (ZoneWidth) {\n ZoneWidth[ZoneWidth[\"Short\"] = 0] = \"Short\";\n ZoneWidth[ZoneWidth[\"ShortGMT\"] = 1] = \"ShortGMT\";\n ZoneWidth[ZoneWidth[\"Long\"] = 2] = \"Long\";\n ZoneWidth[ZoneWidth[\"Extended\"] = 3] = \"Extended\";\n})(ZoneWidth || (ZoneWidth = {}));\nvar DateType;\n(function (DateType) {\n DateType[DateType[\"FullYear\"] = 0] = \"FullYear\";\n DateType[DateType[\"Month\"] = 1] = \"Month\";\n DateType[DateType[\"Date\"] = 2] = \"Date\";\n DateType[DateType[\"Hours\"] = 3] = \"Hours\";\n DateType[DateType[\"Minutes\"] = 4] = \"Minutes\";\n DateType[DateType[\"Seconds\"] = 5] = \"Seconds\";\n DateType[DateType[\"FractionalSeconds\"] = 6] = \"FractionalSeconds\";\n DateType[DateType[\"Day\"] = 7] = \"Day\";\n})(DateType || (DateType = {}));\nvar TranslationType;\n(function (TranslationType) {\n TranslationType[TranslationType[\"DayPeriods\"] = 0] = \"DayPeriods\";\n TranslationType[TranslationType[\"Days\"] = 1] = \"Days\";\n TranslationType[TranslationType[\"Months\"] = 2] = \"Months\";\n TranslationType[TranslationType[\"Eras\"] = 3] = \"Eras\";\n})(TranslationType || (TranslationType = {}));\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date according to locale rules.\n *\n * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch)\n * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime).\n * @param format The date-time components to include. See `DatePipe` for details.\n * @param locale A locale code for the locale format rules to use.\n * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`),\n * or a standard UTC/GMT or continental US time zone abbreviation.\n * If not specified, uses host system settings.\n *\n * @returns The formatted date string.\n *\n * @see `DatePipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction formatDate(value, format, locale, timezone) {\n var date = toDate(value);\n var namedFormat = getNamedFormat(locale, format);\n format = namedFormat || format;\n var parts = [];\n var match;\n while (format) {\n match = DATE_FORMATS_SPLIT.exec(format);\n if (match) {\n parts = parts.concat(match.slice(1));\n var part = parts.pop();\n if (!part) {\n break;\n }\n format = part;\n }\n else {\n parts.push(format);\n break;\n }\n }\n var dateTimezoneOffset = date.getTimezoneOffset();\n if (timezone) {\n dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n date = convertTimezoneToLocal(date, timezone, true);\n }\n var text = '';\n parts.forEach(function (value) {\n var dateFormatter = getDateFormatter(value);\n text += dateFormatter ?\n dateFormatter(date, locale, dateTimezoneOffset) :\n value === '\\'\\'' ? '\\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\\'');\n });\n return text;\n}\nfunction getNamedFormat(locale, format) {\n var localeId = getLocaleId(locale);\n NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};\n if (NAMED_FORMATS[localeId][format]) {\n return NAMED_FORMATS[localeId][format];\n }\n var formatValue = '';\n switch (format) {\n case 'shortDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Short);\n break;\n case 'mediumDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Medium);\n break;\n case 'longDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Long);\n break;\n case 'fullDate':\n formatValue = getLocaleDateFormat(locale, FormatWidth.Full);\n break;\n case 'shortTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Short);\n break;\n case 'mediumTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium);\n break;\n case 'longTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Long);\n break;\n case 'fullTime':\n formatValue = getLocaleTimeFormat(locale, FormatWidth.Full);\n break;\n case 'short':\n var shortTime = getNamedFormat(locale, 'shortTime');\n var shortDate = getNamedFormat(locale, 'shortDate');\n formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);\n break;\n case 'medium':\n var mediumTime = getNamedFormat(locale, 'mediumTime');\n var mediumDate = getNamedFormat(locale, 'mediumDate');\n formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);\n break;\n case 'long':\n var longTime = getNamedFormat(locale, 'longTime');\n var longDate = getNamedFormat(locale, 'longDate');\n formatValue =\n formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);\n break;\n case 'full':\n var fullTime = getNamedFormat(locale, 'fullTime');\n var fullDate = getNamedFormat(locale, 'fullDate');\n formatValue =\n formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);\n break;\n }\n if (formatValue) {\n NAMED_FORMATS[localeId][format] = formatValue;\n }\n return formatValue;\n}\nfunction formatDateTime(str, opt_values) {\n if (opt_values) {\n str = str.replace(/\\{([^}]+)}/g, function (match, key) {\n return (opt_values != null && key in opt_values) ? opt_values[key] : match;\n });\n }\n return str;\n}\nfunction padNumber(num, digits, minusSign, trim, negWrap) {\n if (minusSign === void 0) { minusSign = '-'; }\n var neg = '';\n if (num < 0 || (negWrap && num <= 0)) {\n if (negWrap) {\n num = -num + 1;\n }\n else {\n num = -num;\n neg = minusSign;\n }\n }\n var strNum = String(num);\n while (strNum.length < digits) {\n strNum = '0' + strNum;\n }\n if (trim) {\n strNum = strNum.substr(strNum.length - digits);\n }\n return neg + strNum;\n}\nfunction formatFractionalSeconds(milliseconds, digits) {\n var strMs = padNumber(milliseconds, 3);\n return strMs.substr(0, digits);\n}\n/**\n * Returns a date formatter that transforms a date into its locale digit representation\n */\nfunction dateGetter(name, size, offset, trim, negWrap) {\n if (offset === void 0) { offset = 0; }\n if (trim === void 0) { trim = false; }\n if (negWrap === void 0) { negWrap = false; }\n return function (date, locale) {\n var part = getDatePart(name, date);\n if (offset > 0 || part > -offset) {\n part += offset;\n }\n if (name === DateType.Hours) {\n if (part === 0 && offset === -12) {\n part = 12;\n }\n }\n else if (name === DateType.FractionalSeconds) {\n return formatFractionalSeconds(part, size);\n }\n var localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n return padNumber(part, size, localeMinus, trim, negWrap);\n };\n}\nfunction getDatePart(part, date) {\n switch (part) {\n case DateType.FullYear:\n return date.getFullYear();\n case DateType.Month:\n return date.getMonth();\n case DateType.Date:\n return date.getDate();\n case DateType.Hours:\n return date.getHours();\n case DateType.Minutes:\n return date.getMinutes();\n case DateType.Seconds:\n return date.getSeconds();\n case DateType.FractionalSeconds:\n return date.getMilliseconds();\n case DateType.Day:\n return date.getDay();\n default:\n throw new Error(\"Unknown DateType value \\\"\" + part + \"\\\".\");\n }\n}\n/**\n * Returns a date formatter that transforms a date into its locale string representation\n */\nfunction dateStrGetter(name, width, form, extended) {\n if (form === void 0) { form = FormStyle.Format; }\n if (extended === void 0) { extended = false; }\n return function (date, locale) {\n return getDateTranslation(date, locale, name, width, form, extended);\n };\n}\n/**\n * Returns the locale translation of a date for a given form, type and width\n */\nfunction getDateTranslation(date, locale, name, width, form, extended) {\n switch (name) {\n case TranslationType.Months:\n return getLocaleMonthNames(locale, form, width)[date.getMonth()];\n case TranslationType.Days:\n return getLocaleDayNames(locale, form, width)[date.getDay()];\n case TranslationType.DayPeriods:\n var currentHours_1 = date.getHours();\n var currentMinutes_1 = date.getMinutes();\n if (extended) {\n var rules = getLocaleExtraDayPeriodRules(locale);\n var dayPeriods_1 = getLocaleExtraDayPeriods(locale, form, width);\n var result_1;\n rules.forEach(function (rule, index) {\n if (Array.isArray(rule)) {\n // morning, afternoon, evening, night\n var _a = rule[0], hoursFrom = _a.hours, minutesFrom = _a.minutes;\n var _b = rule[1], hoursTo = _b.hours, minutesTo = _b.minutes;\n if (currentHours_1 >= hoursFrom && currentMinutes_1 >= minutesFrom &&\n (currentHours_1 < hoursTo ||\n (currentHours_1 === hoursTo && currentMinutes_1 < minutesTo))) {\n result_1 = dayPeriods_1[index];\n }\n }\n else { // noon or midnight\n var hours = rule.hours, minutes = rule.minutes;\n if (hours === currentHours_1 && minutes === currentMinutes_1) {\n result_1 = dayPeriods_1[index];\n }\n }\n });\n if (result_1) {\n return result_1;\n }\n }\n // if no rules for the day periods, we use am/pm by default\n return getLocaleDayPeriods(locale, form, width)[currentHours_1 < 12 ? 0 : 1];\n case TranslationType.Eras:\n return getLocaleEraNames(locale, width)[date.getFullYear() <= 0 ? 0 : 1];\n default:\n // This default case is not needed by TypeScript compiler, as the switch is exhaustive.\n // However Closure Compiler does not understand that and reports an error in typed mode.\n // The `throw new Error` below works around the problem, and the unexpected: never variable\n // makes sure tsc still checks this code is unreachable.\n var unexpected = name;\n throw new Error(\"unexpected translation type \" + unexpected);\n }\n}\n/**\n * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or\n * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30,\n * extended = +04:30)\n */\nfunction timeZoneGetter(width) {\n return function (date, locale, offset) {\n var zone = -1 * offset;\n var minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n var hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);\n switch (width) {\n case ZoneWidth.Short:\n return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) +\n padNumber(Math.abs(zone % 60), 2, minusSign);\n case ZoneWidth.ShortGMT:\n return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 1, minusSign);\n case ZoneWidth.Long:\n return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +\n padNumber(Math.abs(zone % 60), 2, minusSign);\n case ZoneWidth.Extended:\n if (offset === 0) {\n return 'Z';\n }\n else {\n return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +\n padNumber(Math.abs(zone % 60), 2, minusSign);\n }\n default:\n throw new Error(\"Unknown zone width \\\"\" + width + \"\\\"\");\n }\n };\n}\nvar JANUARY = 0;\nvar THURSDAY = 4;\nfunction getFirstThursdayOfYear(year) {\n var firstDayOfYear = (new Date(year, JANUARY, 1)).getDay();\n return new Date(year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear);\n}\nfunction getThursdayThisWeek(datetime) {\n return new Date(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));\n}\nfunction weekGetter(size, monthBased) {\n if (monthBased === void 0) { monthBased = false; }\n return function (date, locale) {\n var result;\n if (monthBased) {\n var nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;\n var today = date.getDate();\n result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);\n }\n else {\n var firstThurs = getFirstThursdayOfYear(date.getFullYear());\n var thisThurs = getThursdayThisWeek(date);\n var diff = thisThurs.getTime() - firstThurs.getTime();\n result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n }\n return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n };\n}\nvar DATE_FORMATS = {};\n// Based on CLDR formats:\n// See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n// See also explanations: http://cldr.unicode.org/translation/date-time\n// TODO(ocombe): support all missing cldr formats: Y, U, Q, D, F, e, c, j, J, C, A, v, V, X, x\nfunction getDateFormatter(format) {\n if (DATE_FORMATS[format]) {\n return DATE_FORMATS[format];\n }\n var formatter;\n switch (format) {\n // Era name (AD/BC)\n case 'G':\n case 'GG':\n case 'GGG':\n formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated);\n break;\n case 'GGGG':\n formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide);\n break;\n case 'GGGGG':\n formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow);\n break;\n // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)\n case 'y':\n formatter = dateGetter(DateType.FullYear, 1, 0, false, true);\n break;\n // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n case 'yy':\n formatter = dateGetter(DateType.FullYear, 2, 0, true, true);\n break;\n // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)\n case 'yyy':\n formatter = dateGetter(DateType.FullYear, 3, 0, false, true);\n break;\n // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)\n case 'yyyy':\n formatter = dateGetter(DateType.FullYear, 4, 0, false, true);\n break;\n // Month of the year (1-12), numeric\n case 'M':\n case 'L':\n formatter = dateGetter(DateType.Month, 1, 1);\n break;\n case 'MM':\n case 'LL':\n formatter = dateGetter(DateType.Month, 2, 1);\n break;\n // Month of the year (January, ...), string, format\n case 'MMM':\n formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated);\n break;\n case 'MMMM':\n formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide);\n break;\n case 'MMMMM':\n formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow);\n break;\n // Month of the year (January, ...), string, standalone\n case 'LLL':\n formatter =\n dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);\n break;\n case 'LLLL':\n formatter =\n dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);\n break;\n case 'LLLLL':\n formatter =\n dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);\n break;\n // Week of the year (1, ... 52)\n case 'w':\n formatter = weekGetter(1);\n break;\n case 'ww':\n formatter = weekGetter(2);\n break;\n // Week of the month (1, ...)\n case 'W':\n formatter = weekGetter(1, true);\n break;\n // Day of the month (1-31)\n case 'd':\n formatter = dateGetter(DateType.Date, 1);\n break;\n case 'dd':\n formatter = dateGetter(DateType.Date, 2);\n break;\n // Day of the Week\n case 'E':\n case 'EE':\n case 'EEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated);\n break;\n case 'EEEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide);\n break;\n case 'EEEEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow);\n break;\n case 'EEEEEE':\n formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short);\n break;\n // Generic period of the day (am-pm)\n case 'a':\n case 'aa':\n case 'aaa':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated);\n break;\n case 'aaaa':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide);\n break;\n case 'aaaaa':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow);\n break;\n // Extended period of the day (midnight, at night, ...), standalone\n case 'b':\n case 'bb':\n case 'bbb':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true);\n break;\n case 'bbbb':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true);\n break;\n case 'bbbbb':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true);\n break;\n // Extended period of the day (midnight, night, ...), standalone\n case 'B':\n case 'BB':\n case 'BBB':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);\n break;\n case 'BBBB':\n formatter =\n dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);\n break;\n case 'BBBBB':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);\n break;\n // Hour in AM/PM, (1-12)\n case 'h':\n formatter = dateGetter(DateType.Hours, 1, -12);\n break;\n case 'hh':\n formatter = dateGetter(DateType.Hours, 2, -12);\n break;\n // Hour of the day (0-23)\n case 'H':\n formatter = dateGetter(DateType.Hours, 1);\n break;\n // Hour in day, padded (00-23)\n case 'HH':\n formatter = dateGetter(DateType.Hours, 2);\n break;\n // Minute of the hour (0-59)\n case 'm':\n formatter = dateGetter(DateType.Minutes, 1);\n break;\n case 'mm':\n formatter = dateGetter(DateType.Minutes, 2);\n break;\n // Second of the minute (0-59)\n case 's':\n formatter = dateGetter(DateType.Seconds, 1);\n break;\n case 'ss':\n formatter = dateGetter(DateType.Seconds, 2);\n break;\n // Fractional second\n case 'S':\n formatter = dateGetter(DateType.FractionalSeconds, 1);\n break;\n case 'SS':\n formatter = dateGetter(DateType.FractionalSeconds, 2);\n break;\n case 'SSS':\n formatter = dateGetter(DateType.FractionalSeconds, 3);\n break;\n // Timezone ISO8601 short format (-0430)\n case 'Z':\n case 'ZZ':\n case 'ZZZ':\n formatter = timeZoneGetter(ZoneWidth.Short);\n break;\n // Timezone ISO8601 extended format (-04:30)\n case 'ZZZZZ':\n formatter = timeZoneGetter(ZoneWidth.Extended);\n break;\n // Timezone GMT short format (GMT+4)\n case 'O':\n case 'OO':\n case 'OOO':\n // Should be location, but fallback to format O instead because we don't have the data yet\n case 'z':\n case 'zz':\n case 'zzz':\n formatter = timeZoneGetter(ZoneWidth.ShortGMT);\n break;\n // Timezone GMT long format (GMT+0430)\n case 'OOOO':\n case 'ZZZZ':\n // Should be location, but fallback to format O instead because we don't have the data yet\n case 'zzzz':\n formatter = timeZoneGetter(ZoneWidth.Long);\n break;\n default:\n return null;\n }\n DATE_FORMATS[format] = formatter;\n return formatter;\n}\nfunction timezoneToOffset(timezone, fallback) {\n // Support: IE 9-11 only, Edge 13-15+\n // IE/Edge do not \"understand\" colon (`:`) in timezone\n timezone = timezone.replace(/:/g, '');\n var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n}\nfunction addDateMinutes(date, minutes) {\n date = new Date(date.getTime());\n date.setMinutes(date.getMinutes() + minutes);\n return date;\n}\nfunction convertTimezoneToLocal(date, timezone, reverse) {\n var reverseValue = reverse ? -1 : 1;\n var dateTimezoneOffset = date.getTimezoneOffset();\n var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));\n}\n/**\n * Converts a value to date.\n *\n * Supported input formats:\n * - `Date`\n * - number: timestamp\n * - string: numeric (e.g. \"1234\"), ISO and date strings in a format supported by\n * [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\n * Note: ISO strings without time return a date without timeoffset.\n *\n * Throws if unable to convert to a date.\n */\nfunction toDate(value) {\n if (isDate(value)) {\n return value;\n }\n if (typeof value === 'number' && !isNaN(value)) {\n return new Date(value);\n }\n if (typeof value === 'string') {\n value = value.trim();\n var parsedNb = parseFloat(value);\n // any string that only contains numbers, like \"1234\" but not like \"1234hello\"\n if (!isNaN(value - parsedNb)) {\n return new Date(parsedNb);\n }\n if (/^(\\d{4}-\\d{1,2}-\\d{1,2})$/.test(value)) {\n /* For ISO Strings without time the day, month and year must be extracted from the ISO String\n before Date creation to avoid time offset and errors in the new Date.\n If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n date, some browsers (e.g. IE 9) will throw an invalid Date error.\n If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n is applied.\n Note: ISO months are 0 for January, 1 for February, ... */\n var _a = __read(value.split('-').map(function (val) { return +val; }), 3), y = _a[0], m = _a[1], d = _a[2];\n return new Date(y, m - 1, d);\n }\n var match = void 0;\n if (match = value.match(ISO8601_DATE_REGEX)) {\n return isoStringToDate(match);\n }\n }\n var date = new Date(value);\n if (!isDate(date)) {\n throw new Error(\"Unable to convert \\\"\" + value + \"\\\" into a date\");\n }\n return date;\n}\n/**\n * Converts a date in ISO8601 to a Date.\n * Used instead of `Date.parse` because of browser discrepancies.\n */\nfunction isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\n // if there is a timezone defined like \"+01:00\" or \"+0100\"\n if (match[9]) {\n tzHour = Number(match[9] + match[10]);\n tzMin = Number(match[9] + match[11]);\n }\n dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}\nfunction isDate(value) {\n return value instanceof Date && !isNaN(value.valueOf());\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 */\nvar NUMBER_FORMAT_REGEXP = /^(\\d+)?\\.((\\d+)(-(\\d+))?)?$/;\nvar MAX_DIGITS = 22;\nvar DECIMAL_SEP = '.';\nvar ZERO_CHAR = '0';\nvar PATTERN_SEP = ';';\nvar GROUP_SEP = ',';\nvar DIGIT_CHAR = '#';\nvar CURRENCY_CHAR = '¤';\nvar PERCENT_CHAR = '%';\n/**\n * Transforms a number to a locale string based on a style and a format.\n */\nfunction formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent) {\n if (isPercent === void 0) { isPercent = false; }\n var formattedText = '';\n var isZero = false;\n if (!isFinite(value)) {\n formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);\n }\n else {\n var parsedNumber = parseNumber(value);\n if (isPercent) {\n parsedNumber = toPercent(parsedNumber);\n }\n var minInt = pattern.minInt;\n var minFraction = pattern.minFrac;\n var maxFraction = pattern.maxFrac;\n if (digitsInfo) {\n var parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);\n if (parts === null) {\n throw new Error(digitsInfo + \" is not a valid digit info\");\n }\n var minIntPart = parts[1];\n var minFractionPart = parts[3];\n var maxFractionPart = parts[5];\n if (minIntPart != null) {\n minInt = parseIntAutoRadix(minIntPart);\n }\n if (minFractionPart != null) {\n minFraction = parseIntAutoRadix(minFractionPart);\n }\n if (maxFractionPart != null) {\n maxFraction = parseIntAutoRadix(maxFractionPart);\n }\n else if (minFractionPart != null && minFraction > maxFraction) {\n maxFraction = minFraction;\n }\n }\n roundNumber(parsedNumber, minFraction, maxFraction);\n var digits = parsedNumber.digits;\n var integerLen = parsedNumber.integerLen;\n var exponent = parsedNumber.exponent;\n var decimals = [];\n isZero = digits.every(function (d) { return !d; });\n // pad zeros for small numbers\n for (; integerLen < minInt; integerLen++) {\n digits.unshift(0);\n }\n // pad zeros for small numbers\n for (; integerLen < 0; integerLen++) {\n digits.unshift(0);\n }\n // extract decimals digits\n if (integerLen > 0) {\n decimals = digits.splice(integerLen, digits.length);\n }\n else {\n decimals = digits;\n digits = [0];\n }\n // format the integer digits with grouping separators\n var groups = [];\n if (digits.length >= pattern.lgSize) {\n groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));\n }\n while (digits.length > pattern.gSize) {\n groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));\n }\n if (digits.length) {\n groups.unshift(digits.join(''));\n }\n formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));\n // append the decimal digits\n if (decimals.length) {\n formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');\n }\n if (exponent) {\n formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;\n }\n }\n if (value < 0 && !isZero) {\n formattedText = pattern.negPre + formattedText + pattern.negSuf;\n }\n else {\n formattedText = pattern.posPre + formattedText + pattern.posSuf;\n }\n return formattedText;\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as currency using locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param currency A string containing the currency symbol or its name,\n * such as \"$\" or \"Canadian Dollar\". Used in output string, but does not affect the operation\n * of the function.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)\n * currency code, such as `USD` for the US dollar and `EUR` for the euro.\n * Used to determine the number of digits in the decimal part.\n * @param digitInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted currency value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction formatCurrency(value, locale, currency, currencyCode, digitsInfo) {\n var format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);\n var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);\n pattern.maxFrac = pattern.minFrac;\n var res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);\n return res\n .replace(CURRENCY_CHAR, currency)\n // if we have 2 time the currency character, the second one is ignored\n .replace(CURRENCY_CHAR, '')\n // If there is a spacing between currency character and the value and\n // the currency character is supressed by passing an empty string, the\n // spacing character would remain as part of the string. Then we\n // should remove it.\n .trim();\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as a percentage according to locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted percentage value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n * @publicApi\n *\n */\nfunction formatPercent(value, locale, digitsInfo) {\n var format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);\n var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n var res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);\n return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as text, with group sizing, separator, and other\n * parameters based on the locale.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted text string.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction formatNumber(value, locale, digitsInfo) {\n var format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);\n var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);\n}\nfunction parseNumberFormat(format, minusSign) {\n if (minusSign === void 0) { minusSign = '-'; }\n var p = {\n minInt: 1,\n minFrac: 0,\n maxFrac: 0,\n posPre: '',\n posSuf: '',\n negPre: '',\n negSuf: '',\n gSize: 0,\n lgSize: 0\n };\n var patternParts = format.split(PATTERN_SEP);\n var positive = patternParts[0];\n var negative = patternParts[1];\n var positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ?\n positive.split(DECIMAL_SEP) :\n [\n positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1),\n positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)\n ], integer = positiveParts[0], fraction = positiveParts[1] || '';\n p.posPre = integer.substr(0, integer.indexOf(DIGIT_CHAR));\n for (var i = 0; i < fraction.length; i++) {\n var ch = fraction.charAt(i);\n if (ch === ZERO_CHAR) {\n p.minFrac = p.maxFrac = i + 1;\n }\n else if (ch === DIGIT_CHAR) {\n p.maxFrac = i + 1;\n }\n else {\n p.posSuf += ch;\n }\n }\n var groups = integer.split(GROUP_SEP);\n p.gSize = groups[1] ? groups[1].length : 0;\n p.lgSize = (groups[2] || groups[1]) ? (groups[2] || groups[1]).length : 0;\n if (negative) {\n var trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR);\n p.negPre = negative.substr(0, pos).replace(/'/g, '');\n p.negSuf = negative.substr(pos + trunkLen).replace(/'/g, '');\n }\n else {\n p.negPre = minusSign + p.posPre;\n p.negSuf = p.posSuf;\n }\n return p;\n}\n// Transforms a parsed number into a percentage by multiplying it by 100\nfunction toPercent(parsedNumber) {\n // if the number is 0, don't do anything\n if (parsedNumber.digits[0] === 0) {\n return parsedNumber;\n }\n // Getting the current number of decimals\n var fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;\n if (parsedNumber.exponent) {\n parsedNumber.exponent += 2;\n }\n else {\n if (fractionLen === 0) {\n parsedNumber.digits.push(0, 0);\n }\n else if (fractionLen === 1) {\n parsedNumber.digits.push(0);\n }\n parsedNumber.integerLen += 2;\n }\n return parsedNumber;\n}\n/**\n * Parses a number.\n * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/\n */\nfunction parseNumber(num) {\n var numStr = Math.abs(num) + '';\n var exponent = 0, digits, integerLen;\n var i, j, zeros;\n // Decimal point?\n if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {\n numStr = numStr.replace(DECIMAL_SEP, '');\n }\n // Exponential form?\n if ((i = numStr.search(/e/i)) > 0) {\n // Work out the exponent.\n if (integerLen < 0)\n integerLen = i;\n integerLen += +numStr.slice(i + 1);\n numStr = numStr.substring(0, i);\n }\n else if (integerLen < 0) {\n // There was no decimal point or exponent so it is an integer.\n integerLen = numStr.length;\n }\n // Count the number of leading zeros.\n for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */\n }\n if (i === (zeros = numStr.length)) {\n // The digits are all zero.\n digits = [0];\n integerLen = 1;\n }\n else {\n // Count the number of trailing zeros\n zeros--;\n while (numStr.charAt(zeros) === ZERO_CHAR)\n zeros--;\n // Trailing zeros are insignificant so ignore them\n integerLen -= i;\n digits = [];\n // Convert string to array of digits without leading/trailing zeros.\n for (j = 0; i <= zeros; i++, j++) {\n digits[j] = Number(numStr.charAt(i));\n }\n }\n // If the number overflows the maximum allowed digits then use an exponent.\n if (integerLen > MAX_DIGITS) {\n digits = digits.splice(0, MAX_DIGITS - 1);\n exponent = integerLen - 1;\n integerLen = 1;\n }\n return { digits: digits, exponent: exponent, integerLen: integerLen };\n}\n/**\n * Round the parsed number to the specified number of decimal places\n * This function changes the parsedNumber in-place\n */\nfunction roundNumber(parsedNumber, minFrac, maxFrac) {\n if (minFrac > maxFrac) {\n throw new Error(\"The minimum number of digits after fraction (\" + minFrac + \") is higher than the maximum (\" + maxFrac + \").\");\n }\n var digits = parsedNumber.digits;\n var fractionLen = digits.length - parsedNumber.integerLen;\n var fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);\n // The index of the digit to where rounding is to occur\n var roundAt = fractionSize + parsedNumber.integerLen;\n var digit = digits[roundAt];\n if (roundAt > 0) {\n // Drop fractional digits beyond `roundAt`\n digits.splice(Math.max(parsedNumber.integerLen, roundAt));\n // Set non-fractional digits beyond `roundAt` to 0\n for (var j = roundAt; j < digits.length; j++) {\n digits[j] = 0;\n }\n }\n else {\n // We rounded to zero so reset the parsedNumber\n fractionLen = Math.max(0, fractionLen);\n parsedNumber.integerLen = 1;\n digits.length = Math.max(1, roundAt = fractionSize + 1);\n digits[0] = 0;\n for (var i = 1; i < roundAt; i++)\n digits[i] = 0;\n }\n if (digit >= 5) {\n if (roundAt - 1 < 0) {\n for (var k = 0; k > roundAt; k--) {\n digits.unshift(0);\n parsedNumber.integerLen++;\n }\n digits.unshift(1);\n parsedNumber.integerLen++;\n }\n else {\n digits[roundAt - 1]++;\n }\n }\n // Pad out with zeros to get the required fraction length\n for (; fractionLen < Math.max(0, fractionSize); fractionLen++)\n digits.push(0);\n var dropTrailingZeros = fractionSize !== 0;\n // Minimal length = nb of decimals required + current nb of integers\n // Any number besides that is optional and can be removed if it's a trailing 0\n var minLen = minFrac + parsedNumber.integerLen;\n // Do any carrying, e.g. a digit was rounded up to 10\n var carry = digits.reduceRight(function (carry, d, i, digits) {\n d = d + carry;\n digits[i] = d < 10 ? d : d - 10; // d % 10\n if (dropTrailingZeros) {\n // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52)\n if (digits[i] === 0 && i >= minLen) {\n digits.pop();\n }\n else {\n dropTrailingZeros = false;\n }\n }\n return d >= 10 ? 1 : 0; // Math.floor(d / 10);\n }, 0);\n if (carry) {\n digits.unshift(carry);\n parsedNumber.integerLen++;\n }\n}\nfunction parseIntAutoRadix(text) {\n var result = parseInt(text);\n if (isNaN(result)) {\n throw new Error('Invalid integer literal when parsing ' + text);\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 * @publicApi\n */\nvar NgLocalization = /** @class */ (function () {\n function NgLocalization() {\n }\n return NgLocalization;\n}());\n/**\n * Returns the plural category for a given value.\n * - \"=value\" when the case exists,\n * - the plural category otherwise\n */\nfunction getPluralCategory(value, cases, ngLocalization, locale) {\n var key = \"=\" + value;\n if (cases.indexOf(key) > -1) {\n return key;\n }\n key = ngLocalization.getPluralCategory(value, locale);\n if (cases.indexOf(key) > -1) {\n return key;\n }\n if (cases.indexOf('other') > -1) {\n return 'other';\n }\n throw new Error(\"No plural message found for value \\\"\" + value + \"\\\"\");\n}\n/**\n * Returns the plural case based on the locale\n *\n * @publicApi\n */\nvar NgLocaleLocalization = /** @class */ (function (_super) {\n __extends(NgLocaleLocalization, _super);\n function NgLocaleLocalization(locale) {\n var _this = _super.call(this) || this;\n _this.locale = locale;\n return _this;\n }\n NgLocaleLocalization.prototype.getPluralCategory = function (value, locale) {\n var plural = getLocalePluralCase(locale || this.locale)(value);\n switch (plural) {\n case Plural.Zero:\n return 'zero';\n case Plural.One:\n return 'one';\n case Plural.Two:\n return 'two';\n case Plural.Few:\n return 'few';\n case Plural.Many:\n return 'many';\n default:\n return 'other';\n }\n };\n NgLocaleLocalization = __decorate([ __param(0, Inject(LOCALE_ID)),\n __metadata(\"design:paramtypes\", [String])\n ], NgLocaleLocalization);\nNgLocaleLocalization.ɵfac = function NgLocaleLocalization_Factory(t) { return new (t || NgLocaleLocalization)(ɵngcc0.ɵɵinject(LOCALE_ID)); };\nNgLocaleLocalization.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: NgLocaleLocalization, factory: function (t) { return NgLocaleLocalization.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgLocaleLocalization, [{\n type: Injectable\n }], function () { return [{ type: String, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; }, null); })();\n return NgLocaleLocalization;\n}(NgLocalization));\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 * Register global data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n#i18n-pipes) to know how to import additional locale data.\n *\n * The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1\n *\n * @publicApi\n */\nfunction registerLocaleData(data, localeId, extraData) {\n return ɵregisterLocaleData(data, localeId, extraData);\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 */\nfunction parseCookieValue(cookieStr, name) {\n var e_1, _a;\n name = encodeURIComponent(name);\n try {\n for (var _b = __values(cookieStr.split(';')), _c = _b.next(); !_c.done; _c = _b.next()) {\n var cookie = _c.value;\n var eqIndex = cookie.indexOf('=');\n var _d = __read(eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)], 2), cookieName = _d[0], cookieValue = _d[1];\n if (cookieName.trim() === name) {\n return decodeURIComponent(cookieValue);\n }\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 null;\n}\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * <some-element [ngClass]=\"'first second'\">...</some-element>\n *\n * <some-element [ngClass]=\"['first', 'second']\">...</some-element>\n *\n * <some-element [ngClass]=\"{'first': true, 'second': true, 'third': false}\">...</some-element>\n *\n * <some-element [ngClass]=\"stringExp|arrayExp|objExp\">...</some-element>\n *\n * <some-element [ngClass]=\"{'class1 class2 class3' : true}\">...</some-element>\n * ```\n *\n * @description\n *\n * Adds and removes CSS classes on an HTML element.\n *\n * The CSS classes are updated as follows, depending on the type of the expression evaluation:\n * - `string` - the CSS classes listed in the string (space delimited) are added,\n * - `Array` - the CSS classes declared as Array elements are added,\n * - `Object` - keys are CSS classes that get added when the expression given in the value\n * evaluates to a truthy value, otherwise they are removed.\n *\n * @publicApi\n */\nvar NgClass = /** @class */ (function () {\n function NgClass(_iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {\n this._iterableDiffers = _iterableDiffers;\n this._keyValueDiffers = _keyValueDiffers;\n this._ngEl = _ngEl;\n this._renderer = _renderer;\n this._iterableDiffer = null;\n this._keyValueDiffer = null;\n this._initialClasses = [];\n this._rawClass = null;\n }\n Object.defineProperty(NgClass.prototype, \"klass\", {\n set: function (value) {\n this._removeClasses(this._initialClasses);\n this._initialClasses = typeof value === 'string' ? value.split(/\\s+/) : [];\n this._applyClasses(this._initialClasses);\n this._applyClasses(this._rawClass);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgClass.prototype, \"ngClass\", {\n set: function (value) {\n this._removeClasses(this._rawClass);\n this._applyClasses(this._initialClasses);\n this._iterableDiffer = null;\n this._keyValueDiffer = null;\n this._rawClass = typeof value === 'string' ? value.split(/\\s+/) : value;\n if (this._rawClass) {\n if (ɵisListLikeIterable(this._rawClass)) {\n this._iterableDiffer = this._iterableDiffers.find(this._rawClass).create();\n }\n else {\n this._keyValueDiffer = this._keyValueDiffers.find(this._rawClass).create();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n NgClass.prototype.ngDoCheck = function () {\n if (this._iterableDiffer) {\n var iterableChanges = this._iterableDiffer.diff(this._rawClass);\n if (iterableChanges) {\n this._applyIterableChanges(iterableChanges);\n }\n }\n else if (this._keyValueDiffer) {\n var keyValueChanges = this._keyValueDiffer.diff(this._rawClass);\n if (keyValueChanges) {\n this._applyKeyValueChanges(keyValueChanges);\n }\n }\n };\n NgClass.prototype._applyKeyValueChanges = function (changes) {\n var _this = this;\n changes.forEachAddedItem(function (record) { return _this._toggleClass(record.key, record.currentValue); });\n changes.forEachChangedItem(function (record) { return _this._toggleClass(record.key, record.currentValue); });\n changes.forEachRemovedItem(function (record) {\n if (record.previousValue) {\n _this._toggleClass(record.key, false);\n }\n });\n };\n NgClass.prototype._applyIterableChanges = function (changes) {\n var _this = this;\n changes.forEachAddedItem(function (record) {\n if (typeof record.item === 'string') {\n _this._toggleClass(record.item, true);\n }\n else {\n throw new Error(\"NgClass can only toggle CSS classes expressed as strings, got \" + ɵstringify(record.item));\n }\n });\n changes.forEachRemovedItem(function (record) { return _this._toggleClass(record.item, false); });\n };\n /**\n * Applies a collection of CSS classes to the DOM element.\n *\n * For argument of type Set and Array CSS class names contained in those collections are always\n * added.\n * For argument of type Map CSS class name in the map's key is toggled based on the value (added\n * for truthy and removed for falsy).\n */\n NgClass.prototype._applyClasses = function (rawClassVal) {\n var _this = this;\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach(function (klass) { return _this._toggleClass(klass, true); });\n }\n else {\n Object.keys(rawClassVal).forEach(function (klass) { return _this._toggleClass(klass, !!rawClassVal[klass]); });\n }\n }\n };\n /**\n * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup\n * purposes.\n */\n NgClass.prototype._removeClasses = function (rawClassVal) {\n var _this = this;\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach(function (klass) { return _this._toggleClass(klass, false); });\n }\n else {\n Object.keys(rawClassVal).forEach(function (klass) { return _this._toggleClass(klass, false); });\n }\n }\n };\n NgClass.prototype._toggleClass = function (klass, enabled) {\n var _this = this;\n klass = klass.trim();\n if (klass) {\n klass.split(/\\s+/g).forEach(function (klass) {\n if (enabled) {\n _this._renderer.addClass(_this._ngEl.nativeElement, klass);\n }\n else {\n _this._renderer.removeClass(_this._ngEl.nativeElement, klass);\n }\n });\n }\n };\n __decorate([\n Input('class'),\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [String])\n ], NgClass.prototype, \"klass\", null);\n __decorate([\n Input('ngClass'),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgClass.prototype, \"ngClass\", null);\n NgClass = __decorate([ __metadata(\"design:paramtypes\", [IterableDiffers, KeyValueDiffers,\n ElementRef, Renderer2])\n ], NgClass);\nNgClass.ɵfac = function NgClass_Factory(t) { return new (t || NgClass)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.IterableDiffers), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.KeyValueDiffers), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2)); };\nNgClass.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgClass, selectors: [[\"\", \"ngClass\", \"\"]], inputs: { klass: [\"class\", \"klass\"], ngClass: \"ngClass\" } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgClass, [{\n type: Directive,\n args: [{ selector: '[ngClass]' }]\n }], function () { return [{ type: ɵngcc0.IterableDiffers }, { type: ɵngcc0.KeyValueDiffers }, { type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }]; }, { klass: [{\n type: Input,\n args: ['class']\n }], ngClass: [{\n type: Input,\n args: ['ngClass']\n }] }); })();\n return NgClass;\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 * Instantiates a single {@link Component} type and inserts its Host View into current View.\n * `NgComponentOutlet` provides a declarative approach for dynamic component creation.\n *\n * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and\n * any existing component will get destroyed.\n *\n * @usageNotes\n *\n * ### Fine tune control\n *\n * You can control the component creation process by using the following optional attributes:\n *\n * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for\n * the Component. Defaults to the injector of the current view container.\n *\n * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content\n * section of the component, if exists.\n *\n * * `ngComponentOutletNgModuleFactory`: Optional module factory to allow dynamically loading other\n * module, then load a component from that module.\n *\n * ### Syntax\n *\n * Simple\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression\"></ng-container>\n * ```\n *\n * Customized injector/content\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n * injector: injectorExpression;\n * content: contentNodesExpression;\">\n * </ng-container>\n * ```\n *\n * Customized ngModuleFactory\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n * ngModuleFactory: moduleFactory;\">\n * </ng-container>\n * ```\n *\n * ### A simple example\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}\n *\n * A more complete example with additional options:\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}\n *\n * @publicApi\n * @ngModule CommonModule\n */\nvar NgComponentOutlet = /** @class */ (function () {\n function NgComponentOutlet(_viewContainerRef) {\n this._viewContainerRef = _viewContainerRef;\n this._componentRef = null;\n this._moduleRef = null;\n }\n NgComponentOutlet.prototype.ngOnChanges = function (changes) {\n this._viewContainerRef.clear();\n this._componentRef = null;\n if (this.ngComponentOutlet) {\n var elInjector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector;\n if (changes['ngComponentOutletNgModuleFactory']) {\n if (this._moduleRef)\n this._moduleRef.destroy();\n if (this.ngComponentOutletNgModuleFactory) {\n var parentModule = elInjector.get(NgModuleRef);\n this._moduleRef = this.ngComponentOutletNgModuleFactory.create(parentModule.injector);\n }\n else {\n this._moduleRef = null;\n }\n }\n var componentFactoryResolver = this._moduleRef ? this._moduleRef.componentFactoryResolver :\n elInjector.get(ComponentFactoryResolver);\n var componentFactory = componentFactoryResolver.resolveComponentFactory(this.ngComponentOutlet);\n this._componentRef = this._viewContainerRef.createComponent(componentFactory, this._viewContainerRef.length, elInjector, this.ngComponentOutletContent);\n }\n };\n NgComponentOutlet.prototype.ngOnDestroy = function () {\n if (this._moduleRef)\n this._moduleRef.destroy();\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Type)\n ], NgComponentOutlet.prototype, \"ngComponentOutlet\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Injector)\n ], NgComponentOutlet.prototype, \"ngComponentOutletInjector\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Array)\n ], NgComponentOutlet.prototype, \"ngComponentOutletContent\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", NgModuleFactory)\n ], NgComponentOutlet.prototype, \"ngComponentOutletNgModuleFactory\", void 0);\n NgComponentOutlet = __decorate([ __metadata(\"design:paramtypes\", [ViewContainerRef])\n ], NgComponentOutlet);\nNgComponentOutlet.ɵfac = function NgComponentOutlet_Factory(t) { return new (t || NgComponentOutlet)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef)); };\nNgComponentOutlet.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgComponentOutlet, selectors: [[\"\", \"ngComponentOutlet\", \"\"]], inputs: { ngComponentOutlet: \"ngComponentOutlet\", ngComponentOutletInjector: \"ngComponentOutletInjector\", ngComponentOutletContent: \"ngComponentOutletContent\", ngComponentOutletNgModuleFactory: \"ngComponentOutletNgModuleFactory\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgComponentOutlet, [{\n type: Directive,\n args: [{ selector: '[ngComponentOutlet]' }]\n }], function () { return [{ type: ɵngcc0.ViewContainerRef }]; }, { ngComponentOutlet: [{\n type: Input\n }], ngComponentOutletInjector: [{\n type: Input\n }], ngComponentOutletContent: [{\n type: Input\n }], ngComponentOutletNgModuleFactory: [{\n type: Input\n }] }); })();\n return NgComponentOutlet;\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 */\nvar NgForOfContext = /** @class */ (function () {\n function NgForOfContext($implicit, ngForOf, index, count) {\n this.$implicit = $implicit;\n this.ngForOf = ngForOf;\n this.index = index;\n this.count = count;\n }\n Object.defineProperty(NgForOfContext.prototype, \"first\", {\n get: function () {\n return this.index === 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForOfContext.prototype, \"last\", {\n get: function () {\n return this.index === this.count - 1;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForOfContext.prototype, \"even\", {\n get: function () {\n return this.index % 2 === 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForOfContext.prototype, \"odd\", {\n get: function () {\n return !this.even;\n },\n enumerable: true,\n configurable: true\n });\n return NgForOfContext;\n}());\n/**\n * A [structural directive](guide/structural-directives) that renders\n * a template for each item in a collection.\n * The directive is placed on an element, which becomes the parent\n * of the cloned templates.\n *\n * The `ngForOf` directive is generally used in the\n * [shorthand form](guide/structural-directives#the-asterisk--prefix) `*ngFor`.\n * In this form, the template to be rendered for each iteration is the content\n * of an anchor element containing the directive.\n *\n * The following example shows the shorthand syntax with some options,\n * contained in an `<li>` element.\n *\n * ```\n * <li *ngFor=\"let item of items; index as i; trackBy: trackByFn\">...</li>\n * ```\n *\n * The shorthand form expands into a long form that uses the `ngForOf` selector\n * on an `<ng-template>` element.\n * The content of the `<ng-template>` element is the `<li>` element that held the\n * short-form directive.\n *\n * Here is the expanded version of the short-form example.\n *\n * ```\n * <ng-template ngFor let-item [ngForOf]=\"items\" let-i=\"index\" [ngForTrackBy]=\"trackByFn\">\n * <li>...</li>\n * </ng-template>\n * ```\n *\n * Angular automatically expands the shorthand syntax as it compiles the template.\n * The context for each embedded view is logically merged to the current component\n * context according to its lexical position.\n *\n * When using the shorthand syntax, Angular allows only [one structural directive\n * on an element](guide/structural-directives#one-structural-directive-per-host-element).\n * If you want to iterate conditionally, for example,\n * put the `*ngIf` on a container element that wraps the `*ngFor` element.\n * For futher discussion, see\n * [Structural Directives](guide/structural-directives#one-per-element).\n *\n * @usageNotes\n *\n * ### Local variables\n *\n * `NgForOf` provides exported values that can be aliased to local variables.\n * For example:\n *\n * ```\n * <li *ngFor=\"let user of users; index as i; first as isFirst\">\n * {{i}}/{{users.length}}. {{user}} <span *ngIf=\"isFirst\">default</span>\n * </li>\n * ```\n *\n * The following exported values can be aliased to local variables:\n *\n * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).\n * - `ngForOf: NgIterable<T>`: The value of the iterable expression. Useful when the expression is\n * more complex then a property access, for example when using the async pipe (`userStreams |\n * async`).\n * - `index: number`: The index of the current item in the iterable.\n * - `count: number`: The length of the iterable.\n * - `first: boolean`: True when the item is the first item in the iterable.\n * - `last: boolean`: True when the item is the last item in the iterable.\n * - `even: boolean`: True when the item has an even index in the iterable.\n * - `odd: boolean`: True when the item has an odd index in the iterable.\n *\n * ### Change propagation\n *\n * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:\n *\n * * When an item is added, a new instance of the template is added to the DOM.\n * * When an item is removed, its template instance is removed from the DOM.\n * * When items are reordered, their respective templates are reordered in the DOM.\n *\n * Angular uses object identity to track insertions and deletions within the iterator and reproduce\n * those changes in the DOM. This has important implications for animations and any stateful\n * controls that are present, such as `<input>` elements that accept user input. Inserted rows can\n * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state\n * such as user input.\n * For more on animations, see [Transitions and Triggers](guide/transition-and-triggers).\n *\n * The identities of elements in the iterator can change while the data does not.\n * This can happen, for example, if the iterator is produced from an RPC to the server, and that\n * RPC is re-run. Even if the data hasn't changed, the second response produces objects with\n * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old\n * elements were deleted and all new elements inserted).\n *\n * To avoid this expensive operation, you can customize the default tracking algorithm.\n * by supplying the `trackBy` option to `NgForOf`.\n * `trackBy` takes a function that has two arguments: `index` and `item`.\n * If `trackBy` is given, Angular tracks changes by the return value of the function.\n *\n * @see [Structural Directives](guide/structural-directives)\n * @ngModule CommonModule\n * @publicApi\n */\nvar NgForOf = /** @class */ (function () {\n function NgForOf(_viewContainer, _template, _differs) {\n this._viewContainer = _viewContainer;\n this._template = _template;\n this._differs = _differs;\n this._ngForOf = null;\n this._ngForOfDirty = true;\n this._differ = null;\n }\n Object.defineProperty(NgForOf.prototype, \"ngForOf\", {\n /**\n * The value of the iterable expression, which can be used as a\n * [template input variable](guide/structural-directives#template-input-variable).\n */\n set: function (ngForOf) {\n this._ngForOf = ngForOf;\n this._ngForOfDirty = true;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForOf.prototype, \"ngForTrackBy\", {\n get: function () {\n return this._trackByFn;\n },\n /**\n * A function that defines how to track changes for items in the iterable.\n *\n * When items are added, moved, or removed in the iterable,\n * the directive must re-render the appropriate DOM nodes.\n * To minimize churn in the DOM, only nodes that have changed\n * are re-rendered.\n *\n * By default, the change detector assumes that\n * the object instance identifies the node in the iterable.\n * When this function is supplied, the directive uses\n * the result of calling this function to identify the item node,\n * rather than the identity of the object itself.\n *\n * The function receives two inputs,\n * the iteration index and the node object ID.\n */\n set: function (fn) {\n if (isDevMode() && fn != null && typeof fn !== 'function') {\n // TODO(vicb): use a log service once there is a public one available\n if (console && console.warn) {\n console.warn(\"trackBy must be a function, but received \" + JSON.stringify(fn) + \". \" +\n \"See https://angular.io/api/common/NgForOf#change-propagation for more information.\");\n }\n }\n this._trackByFn = fn;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForOf.prototype, \"ngForTemplate\", {\n /**\n * A reference to the template that is stamped out for each item in the iterable.\n * @see [template reference variable](guide/template-syntax#template-reference-variables--var-)\n */\n set: function (value) {\n // TODO(TS2.1): make TemplateRef<Partial<NgForRowOf<T>>> once we move to TS v2.1\n // The current type is too restrictive; a template that just uses index, for example,\n // should be acceptable.\n if (value) {\n this._template = value;\n }\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Applies the changes when needed.\n */\n NgForOf.prototype.ngDoCheck = function () {\n if (this._ngForOfDirty) {\n this._ngForOfDirty = false;\n // React on ngForOf changes only once all inputs have been initialized\n var value = this._ngForOf;\n if (!this._differ && value) {\n try {\n this._differ = this._differs.find(value).create(this.ngForTrackBy);\n }\n catch (_a) {\n throw new Error(\"Cannot find a differ supporting object '\" + value + \"' of type '\" + getTypeName(value) + \"'. NgFor only supports binding to Iterables such as Arrays.\");\n }\n }\n }\n if (this._differ) {\n var changes = this._differ.diff(this._ngForOf);\n if (changes)\n this._applyChanges(changes);\n }\n };\n NgForOf.prototype._applyChanges = function (changes) {\n var _this = this;\n var insertTuples = [];\n changes.forEachOperation(function (item, adjustedPreviousIndex, currentIndex) {\n if (item.previousIndex == null) {\n // NgForOf is never \"null\" or \"undefined\" here because the differ detected\n // that a new item needs to be inserted from the iterable. This implies that\n // there is an iterable value for \"_ngForOf\".\n var view = _this._viewContainer.createEmbeddedView(_this._template, new NgForOfContext(null, _this._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex);\n var tuple = new RecordViewTuple(item, view);\n insertTuples.push(tuple);\n }\n else if (currentIndex == null) {\n _this._viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n }\n else if (adjustedPreviousIndex !== null) {\n var view = _this._viewContainer.get(adjustedPreviousIndex);\n _this._viewContainer.move(view, currentIndex);\n var tuple = new RecordViewTuple(item, view);\n insertTuples.push(tuple);\n }\n });\n for (var i = 0; i < insertTuples.length; i++) {\n this._perViewChange(insertTuples[i].view, insertTuples[i].record);\n }\n for (var i = 0, ilen = this._viewContainer.length; i < ilen; i++) {\n var viewRef = this._viewContainer.get(i);\n viewRef.context.index = i;\n viewRef.context.count = ilen;\n viewRef.context.ngForOf = this._ngForOf;\n }\n changes.forEachIdentityChange(function (record) {\n var viewRef = _this._viewContainer.get(record.currentIndex);\n viewRef.context.$implicit = record.item;\n });\n };\n NgForOf.prototype._perViewChange = function (view, record) {\n view.context.$implicit = record.item;\n };\n /**\n * Asserts the correct type of the context for the template that `NgForOf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgForOf` structural directive renders its template with a specific context type.\n */\n NgForOf.ngTemplateContextGuard = function (dir, ctx) {\n return true;\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgForOf.prototype, \"ngForOf\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Function])\n ], NgForOf.prototype, \"ngForTrackBy\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", TemplateRef),\n __metadata(\"design:paramtypes\", [TemplateRef])\n ], NgForOf.prototype, \"ngForTemplate\", null);\n NgForOf = __decorate([ __metadata(\"design:paramtypes\", [ViewContainerRef,\n TemplateRef, IterableDiffers])\n ], NgForOf);\nNgForOf.ɵfac = function NgForOf_Factory(t) { return new (t || NgForOf)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.IterableDiffers)); };\nNgForOf.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgForOf, selectors: [[\"\", \"ngFor\", \"\", \"ngForOf\", \"\"]], inputs: { ngForOf: \"ngForOf\", ngForTrackBy: \"ngForTrackBy\", ngForTemplate: \"ngForTemplate\" } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgForOf, [{\n type: Directive,\n args: [{ selector: '[ngFor][ngForOf]' }]\n }], function () { return [{ type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.TemplateRef }, { type: ɵngcc0.IterableDiffers }]; }, { ngForOf: [{\n type: Input\n }], ngForTrackBy: [{\n type: Input\n }], ngForTemplate: [{\n type: Input\n }] }); })();\n return NgForOf;\n}());\nvar RecordViewTuple = /** @class */ (function () {\n function RecordViewTuple(record, view) {\n this.record = record;\n this.view = view;\n }\n return RecordViewTuple;\n}());\nfunction getTypeName(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 structural directive that conditionally includes a template based on the value of\n * an expression coerced to Boolean.\n * When the expression evaluates to true, Angular renders the template\n * provided in a `then` clause, and when false or null,\n * Angular renders the template provided in an optional `else` clause. The default\n * template for the `else` clause is blank.\n *\n * A [shorthand form](guide/structural-directives#the-asterisk--prefix) of the directive,\n * `*ngIf=\"condition\"`, is generally used, provided\n * as an attribute of the anchor element for the inserted template.\n * Angular expands this into a more explicit version, in which the anchor element\n * is contained in an `<ng-template>` element.\n *\n * Simple form with shorthand syntax:\n *\n * ```\n * <div *ngIf=\"condition\">Content to render when condition is true.</div>\n * ```\n *\n * Simple form with expanded syntax:\n *\n * ```\n * <ng-template [ngIf]=\"condition\"><div>Content to render when condition is\n * true.</div></ng-template>\n * ```\n *\n * Form with an \"else\" block:\n *\n * ```\n * <div *ngIf=\"condition; else elseBlock\">Content to render when condition is true.</div>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * ```\n *\n * Shorthand form with \"then\" and \"else\" blocks:\n *\n * ```\n * <div *ngIf=\"condition; then thenBlock else elseBlock\"></div>\n * <ng-template #thenBlock>Content to render when condition is true.</ng-template>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * ```\n *\n * Form with storing the value locally:\n *\n * ```\n * <div *ngIf=\"condition as value; else elseBlock\">{{value}}</div>\n * <ng-template #elseBlock>Content to render when value is null.</ng-template>\n * ```\n *\n * @usageNotes\n *\n * The `*ngIf` directive is most commonly used to conditionally show an inline template,\n * as seen in the following example.\n * The default `else` template is blank.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfSimple'}\n *\n * ### Showing an alternative template using `else`\n *\n * To display a template when `expression` evaluates to false, use an `else` template\n * binding as shown in the following example.\n * The `else` binding points to an `<ng-template>` element labeled `#elseBlock`.\n * The template can be defined anywhere in the component view, but is typically placed right after\n * `ngIf` for readability.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfElse'}\n *\n * ### Using an external `then` template\n *\n * In the previous example, the then-clause template is specified inline, as the content of the\n * tag that contains the `ngIf` directive. You can also specify a template that is defined\n * externally, by referencing a labeled `<ng-template>` element. When you do this, you can\n * change which template to use at runtime, as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}\n *\n * ### Storing a conditional result in a variable\n *\n * You might want to show a set of properties from the same object. If you are waiting\n * for asynchronous data, the object can be undefined.\n * In this case, you can use `ngIf` and store the result of the condition in a local\n * variable as shown in the the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfAs'}\n *\n * This code uses only one `AsyncPipe`, so only one subscription is created.\n * The conditional statement stores the result of `userStream|async` in the local variable `user`.\n * You can then bind the local `user` repeatedly.\n *\n * The conditional displays the data only if `userStream` returns a value,\n * so you don't need to use the\n * [safe-navigation-operator](guide/template-syntax#safe-navigation-operator) (`?.`)\n * to guard against null values when accessing properties.\n * You can display an alternative template while waiting for the data.\n *\n * ### Shorthand syntax\n *\n * The shorthand syntax `*ngIf` expands into two separate template specifications\n * for the \"then\" and \"else\" clauses. For example, consider the following shorthand statement,\n * that is meant to show a loading page while waiting for data to be loaded.\n *\n * ```\n * <div class=\"hero-list\" *ngIf=\"heroes else loading\">\n * ...\n * </div>\n *\n * <ng-template #loading>\n * <div>Loading...</div>\n * </ng-template>\n * ```\n *\n * You can see that the \"else\" clause references the `<ng-template>`\n * with the `#loading` label, and the template for the \"then\" clause\n * is provided as the content of the anchor element.\n *\n * However, when Angular expands the shorthand syntax, it creates\n * another `<ng-template>` tag, with `ngIf` and `ngIfElse` directives.\n * The anchor element containing the template for the \"then\" clause becomes\n * the content of this unlabeled `<ng-template>` tag.\n *\n * ```\n * <ng-template [ngIf]=\"heroes\" [ngIfElse]=\"loading\">\n * <div class=\"hero-list\">\n * ...\n * </div>\n * </ng-template>\n *\n * <ng-template #loading>\n * <div>Loading...</div>\n * </ng-template>\n * ```\n *\n * The presence of the implicit template object has implications for the nesting of\n * structural directives. For more on this subject, see\n * [Structural Directives](https://angular.io/guide/structural-directives#one-per-element).\n *\n * @ngModule CommonModule\n * @publicApi\n */\nvar NgIf = /** @class */ (function () {\n function NgIf(_viewContainer, templateRef) {\n this._viewContainer = _viewContainer;\n this._context = new NgIfContext();\n this._thenTemplateRef = null;\n this._elseTemplateRef = null;\n this._thenViewRef = null;\n this._elseViewRef = null;\n this._thenTemplateRef = templateRef;\n }\n Object.defineProperty(NgIf.prototype, \"ngIf\", {\n /**\n * The Boolean expression to evaluate as the condition for showing a template.\n */\n set: function (condition) {\n this._context.$implicit = this._context.ngIf = condition;\n this._updateView();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgIf.prototype, \"ngIfThen\", {\n /**\n * A template to show if the condition expression evaluates to true.\n */\n set: function (templateRef) {\n assertTemplate('ngIfThen', templateRef);\n this._thenTemplateRef = templateRef;\n this._thenViewRef = null; // clear previous view if any.\n this._updateView();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgIf.prototype, \"ngIfElse\", {\n /**\n * A template to show if the condition expression evaluates to false.\n */\n set: function (templateRef) {\n assertTemplate('ngIfElse', templateRef);\n this._elseTemplateRef = templateRef;\n this._elseViewRef = null; // clear previous view if any.\n this._updateView();\n },\n enumerable: true,\n configurable: true\n });\n NgIf.prototype._updateView = function () {\n if (this._context.$implicit) {\n if (!this._thenViewRef) {\n this._viewContainer.clear();\n this._elseViewRef = null;\n if (this._thenTemplateRef) {\n this._thenViewRef =\n this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);\n }\n }\n }\n else {\n if (!this._elseViewRef) {\n this._viewContainer.clear();\n this._thenViewRef = null;\n if (this._elseTemplateRef) {\n this._elseViewRef =\n this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);\n }\n }\n }\n };\n /**\n * Asserts the correct type of the context for the template that `NgIf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgIf` structural directive renders its template with a specific context type.\n */\n NgIf.ngTemplateContextGuard = function (dir, ctx) {\n return true;\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgIf.prototype, \"ngIf\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgIf.prototype, \"ngIfThen\", null);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgIf.prototype, \"ngIfElse\", null);\n NgIf = __decorate([ __metadata(\"design:paramtypes\", [ViewContainerRef, TemplateRef])\n ], NgIf);\nNgIf.ɵfac = function NgIf_Factory(t) { return new (t || NgIf)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef)); };\nNgIf.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgIf, selectors: [[\"\", \"ngIf\", \"\"]], inputs: { ngIf: \"ngIf\", ngIfThen: \"ngIfThen\", ngIfElse: \"ngIfElse\" } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgIf, [{\n type: Directive,\n args: [{ selector: '[ngIf]' }]\n }], function () { return [{ type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.TemplateRef }]; }, { ngIf: [{\n type: Input\n }], ngIfThen: [{\n type: Input\n }], ngIfElse: [{\n type: Input\n }] }); })();\n return NgIf;\n}());\n/**\n * @publicApi\n */\nvar NgIfContext = /** @class */ (function () {\n function NgIfContext() {\n this.$implicit = null;\n this.ngIf = null;\n }\n return NgIfContext;\n}());\nfunction assertTemplate(property, templateRef) {\n var isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);\n if (!isTemplateRefOrNull) {\n throw new Error(property + \" must be a TemplateRef, but received '\" + ɵstringify(templateRef) + \"'.\");\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 */\nvar SwitchView = /** @class */ (function () {\n function SwitchView(_viewContainerRef, _templateRef) {\n this._viewContainerRef = _viewContainerRef;\n this._templateRef = _templateRef;\n this._created = false;\n }\n SwitchView.prototype.create = function () {\n this._created = true;\n this._viewContainerRef.createEmbeddedView(this._templateRef);\n };\n SwitchView.prototype.destroy = function () {\n this._created = false;\n this._viewContainerRef.clear();\n };\n SwitchView.prototype.enforceState = function (created) {\n if (created && !this._created) {\n this.create();\n }\n else if (!created && this._created) {\n this.destroy();\n }\n };\n return SwitchView;\n}());\n/**\n * @ngModule CommonModule\n *\n * @description\n * The `[ngSwitch]` directive on a container specifies an expression to match against.\n * The expressions to match are provided by `ngSwitchCase` directives on views within the container.\n * - Every view that matches is rendered.\n * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered.\n * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase`\n * or `ngSwitchDefault` directive are preserved at the location.\n *\n * @usageNotes\n * Define a container element for the directive, and specify the switch expression\n * to match against as an attribute:\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * ```\n *\n * Within the container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * ...\n * <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * ### Usage Examples\n *\n * The following example shows how to use more than one case to display the same view:\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * <!-- the same view can be shown in more than one case -->\n * <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * <some-element *ngSwitchCase=\"match_expression_2\">...</some-element>\n * <some-other-element *ngSwitchCase=\"match_expression_3\">...</some-other-element>\n * <!--default case when there are no matches -->\n * <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * The following example shows how cases can be nested:\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * <some-element *ngSwitchCase=\"match_expression_2\">...</some-element>\n * <some-other-element *ngSwitchCase=\"match_expression_3\">...</some-other-element>\n * <ng-container *ngSwitchCase=\"match_expression_3\">\n * <!-- use a ng-container to group multiple root nodes -->\n * <inner-element></inner-element>\n * <inner-other-element></inner-other-element>\n * </ng-container>\n * <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * @publicApi\n * @see `NgSwitchCase`\n * @see `NgSwitchDefault`\n * @see [Structural Directives](guide/structural-directives)\n *\n */\nvar NgSwitch = /** @class */ (function () {\n function NgSwitch() {\n this._defaultUsed = false;\n this._caseCount = 0;\n this._lastCaseCheckIndex = 0;\n this._lastCasesMatched = false;\n }\n Object.defineProperty(NgSwitch.prototype, \"ngSwitch\", {\n set: function (newValue) {\n this._ngSwitch = newValue;\n if (this._caseCount === 0) {\n this._updateDefaultCases(true);\n }\n },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n NgSwitch.prototype._addCase = function () {\n return this._caseCount++;\n };\n /** @internal */\n NgSwitch.prototype._addDefault = function (view) {\n if (!this._defaultViews) {\n this._defaultViews = [];\n }\n this._defaultViews.push(view);\n };\n /** @internal */\n NgSwitch.prototype._matchCase = function (value) {\n var matched = value == this._ngSwitch;\n this._lastCasesMatched = this._lastCasesMatched || matched;\n this._lastCaseCheckIndex++;\n if (this._lastCaseCheckIndex === this._caseCount) {\n this._updateDefaultCases(!this._lastCasesMatched);\n this._lastCaseCheckIndex = 0;\n this._lastCasesMatched = false;\n }\n return matched;\n };\n NgSwitch.prototype._updateDefaultCases = function (useDefault) {\n if (this._defaultViews && useDefault !== this._defaultUsed) {\n this._defaultUsed = useDefault;\n for (var i = 0; i < this._defaultViews.length; i++) {\n var defaultView = this._defaultViews[i];\n defaultView.enforceState(useDefault);\n }\n }\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgSwitch.prototype, \"ngSwitch\", null);\nNgSwitch.ɵfac = function NgSwitch_Factory(t) { return new (t || NgSwitch)(); };\nNgSwitch.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgSwitch, selectors: [[\"\", \"ngSwitch\", \"\"]], inputs: { ngSwitch: \"ngSwitch\" } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgSwitch, [{\n type: Directive,\n args: [{ selector: '[ngSwitch]' }]\n }], function () { return []; }, { ngSwitch: [{\n type: Input\n }] }); })();\n return NgSwitch;\n}());\n/**\n * @ngModule CommonModule\n *\n * @description\n * Provides a switch case expression to match against an enclosing `ngSwitch` expression.\n * When the expressions match, the given `NgSwitchCase` template is rendered.\n * If multiple match expressions match the switch expression value, all of them are displayed.\n *\n * @usageNotes\n *\n * Within a switch container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * ...\n * <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * Each switch-case statement contains an in-line HTML template or template reference\n * that defines the subtree to be selected if the value of the match expression\n * matches the value of the switch expression.\n *\n * Unlike JavaScript, which uses strict equality, Angular uses loose equality.\n * This means that the empty string, `\"\"` matches 0.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchDefault`\n *\n */\nvar NgSwitchCase = /** @class */ (function () {\n function NgSwitchCase(viewContainer, templateRef, ngSwitch) {\n this.ngSwitch = ngSwitch;\n ngSwitch._addCase();\n this._view = new SwitchView(viewContainer, templateRef);\n }\n /**\n * Performs case matching. For internal use only.\n */\n NgSwitchCase.prototype.ngDoCheck = function () {\n this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], NgSwitchCase.prototype, \"ngSwitchCase\", void 0);\n NgSwitchCase = __decorate([ __param(2, Host()),\n __metadata(\"design:paramtypes\", [ViewContainerRef, TemplateRef,\n NgSwitch])\n ], NgSwitchCase);\nNgSwitchCase.ɵfac = function NgSwitchCase_Factory(t) { return new (t || NgSwitchCase)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef), ɵngcc0.ɵɵdirectiveInject(NgSwitch, 1)); };\nNgSwitchCase.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgSwitchCase, selectors: [[\"\", \"ngSwitchCase\", \"\"]], inputs: { ngSwitchCase: \"ngSwitchCase\" } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgSwitchCase, [{\n type: Directive,\n args: [{ selector: '[ngSwitchCase]' }]\n }], function () { return [{ type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.TemplateRef }, { type: NgSwitch, decorators: [{\n type: Host\n }] }]; }, { ngSwitchCase: [{\n type: Input\n }] }); })();\n return NgSwitchCase;\n}());\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that is rendered when no `NgSwitchCase` expressions\n * match the `NgSwitch` expression.\n * This statement should be the final case in an `NgSwitch`.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchCase`\n *\n */\nvar NgSwitchDefault = /** @class */ (function () {\n function NgSwitchDefault(viewContainer, templateRef, ngSwitch) {\n ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));\n }\n NgSwitchDefault = __decorate([ __param(2, Host()),\n __metadata(\"design:paramtypes\", [ViewContainerRef, TemplateRef,\n NgSwitch])\n ], NgSwitchDefault);\nNgSwitchDefault.ɵfac = function NgSwitchDefault_Factory(t) { return new (t || NgSwitchDefault)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef), ɵngcc0.ɵɵdirectiveInject(NgSwitch, 1)); };\nNgSwitchDefault.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgSwitchDefault, selectors: [[\"\", \"ngSwitchDefault\", \"\"]] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgSwitchDefault, [{\n type: Directive,\n args: [{ selector: '[ngSwitchDefault]' }]\n }], function () { return [{ type: ɵngcc0.ViewContainerRef }, { type: ɵngcc0.TemplateRef }, { type: NgSwitch, decorators: [{\n type: Host\n }] }]; }, null); })();\n return NgSwitchDefault;\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 * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * <some-element [ngPlural]=\"value\">\n * <ng-template ngPluralCase=\"=0\">there is nothing</ng-template>\n * <ng-template ngPluralCase=\"=1\">there is one</ng-template>\n * <ng-template ngPluralCase=\"few\">there are a few</ng-template>\n * </some-element>\n * ```\n *\n * @description\n *\n * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.\n *\n * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees\n * that match the switch expression's pluralization category.\n *\n * To use this directive you must provide a container element that sets the `[ngPlural]` attribute\n * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their\n * expression:\n * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value\n * matches the switch expression exactly,\n * - otherwise, the view will be treated as a \"category match\", and will only display if exact\n * value matches aren't found and the value maps to its category for the defined locale.\n *\n * See http://cldr.unicode.org/index/cldr-spec/plural-rules\n *\n * @publicApi\n */\nvar NgPlural = /** @class */ (function () {\n function NgPlural(_localization) {\n this._localization = _localization;\n this._caseViews = {};\n }\n Object.defineProperty(NgPlural.prototype, \"ngPlural\", {\n set: function (value) {\n this._switchValue = value;\n this._updateView();\n },\n enumerable: true,\n configurable: true\n });\n NgPlural.prototype.addCase = function (value, switchView) {\n this._caseViews[value] = switchView;\n };\n NgPlural.prototype._updateView = function () {\n this._clearViews();\n var cases = Object.keys(this._caseViews);\n var key = getPluralCategory(this._switchValue, cases, this._localization);\n this._activateView(this._caseViews[key]);\n };\n NgPlural.prototype._clearViews = function () {\n if (this._activeView)\n this._activeView.destroy();\n };\n NgPlural.prototype._activateView = function (view) {\n if (view) {\n this._activeView = view;\n this._activeView.create();\n }\n };\n __decorate([\n Input(),\n __metadata(\"design:type\", Number),\n __metadata(\"design:paramtypes\", [Number])\n ], NgPlural.prototype, \"ngPlural\", null);\n NgPlural = __decorate([ __metadata(\"design:paramtypes\", [NgLocalization])\n ], NgPlural);\nNgPlural.ɵfac = function NgPlural_Factory(t) { return new (t || NgPlural)(ɵngcc0.ɵɵdirectiveInject(NgLocalization)); };\nNgPlural.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgPlural, selectors: [[\"\", \"ngPlural\", \"\"]], inputs: { ngPlural: \"ngPlural\" } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgPlural, [{\n type: Directive,\n args: [{ selector: '[ngPlural]' }]\n }], function () { return [{ type: NgLocalization }]; }, { ngPlural: [{\n type: Input\n }] }); })();\n return NgPlural;\n}());\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that will be added/removed from the parent {@link NgPlural} when the\n * given expression matches the plural expression according to CLDR rules.\n *\n * @usageNotes\n * ```\n * <some-element [ngPlural]=\"value\">\n * <ng-template ngPluralCase=\"=0\">...</ng-template>\n * <ng-template ngPluralCase=\"other\">...</ng-template>\n * </some-element>\n *```\n *\n * See {@link NgPlural} for more details and example.\n *\n * @publicApi\n */\nvar NgPluralCase = /** @class */ (function () {\n function NgPluralCase(value, template, viewContainer, ngPlural) {\n this.value = value;\n var isANumber = !isNaN(Number(value));\n ngPlural.addCase(isANumber ? \"=\" + value : value, new SwitchView(viewContainer, template));\n }\n NgPluralCase = __decorate([ __param(0, Attribute('ngPluralCase')),\n __param(3, Host()),\n __metadata(\"design:paramtypes\", [String, TemplateRef,\n ViewContainerRef, NgPlural])\n ], NgPluralCase);\nNgPluralCase.ɵfac = function NgPluralCase_Factory(t) { return new (t || NgPluralCase)(ɵngcc0.ɵɵinjectAttribute('ngPluralCase'), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.TemplateRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef), ɵngcc0.ɵɵdirectiveInject(NgPlural, 1)); };\nNgPluralCase.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgPluralCase, selectors: [[\"\", \"ngPluralCase\", \"\"]] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgPluralCase, [{\n type: Directive,\n args: [{ selector: '[ngPluralCase]' }]\n }], function () { return [{ type: String, decorators: [{\n type: Attribute,\n args: ['ngPluralCase']\n }] }, { type: ɵngcc0.TemplateRef }, { type: ɵngcc0.ViewContainerRef }, { type: NgPlural, decorators: [{\n type: Host\n }] }]; }, null); })();\n return NgPluralCase;\n}());\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n *\n * Set the font of the containing element to the result of an expression.\n *\n * ```\n * <some-element [ngStyle]=\"{'font-style': styleExp}\">...</some-element>\n * ```\n *\n * Set the width of the containing element to a pixel value returned by an expression.\n *\n * ```\n * <some-element [ngStyle]=\"{'max-width.px': widthExp}\">...</some-element>\n * ```\n *\n * Set a collection of style values using an expression that returns key-value pairs.\n *\n * ```\n * <some-element [ngStyle]=\"objExp\">...</some-element>\n * ```\n *\n * @description\n *\n * An attribute directive that updates styles for the containing HTML element.\n * Sets one or more style properties, specified as colon-separated key-value pairs.\n * The key is a style name, with an optional `.<unit>` suffix\n * (such as 'top.px', 'font-style.em').\n * The value is an expression to be evaluated.\n * The resulting non-null value, expressed in the given unit,\n * is assigned to the given style property.\n * If the result of evaluation is null, the corresponding style is removed.\n *\n * @publicApi\n */\nvar NgStyle = /** @class */ (function () {\n function NgStyle(_ngEl, _differs, _renderer) {\n this._ngEl = _ngEl;\n this._differs = _differs;\n this._renderer = _renderer;\n this._ngStyle = null;\n this._differ = null;\n }\n Object.defineProperty(NgStyle.prototype, \"ngStyle\", {\n set: function (values) {\n this._ngStyle = values;\n if (!this._differ && values) {\n this._differ = this._differs.find(values).create();\n }\n },\n enumerable: true,\n configurable: true\n });\n NgStyle.prototype.ngDoCheck = function () {\n if (this._differ) {\n var changes = this._differ.diff(this._ngStyle);\n if (changes) {\n this._applyChanges(changes);\n }\n }\n };\n NgStyle.prototype._setStyle = function (nameAndUnit, value) {\n var _a = __read(nameAndUnit.split('.'), 2), name = _a[0], unit = _a[1];\n value = value != null && unit ? \"\" + value + unit : value;\n if (value != null) {\n this._renderer.setStyle(this._ngEl.nativeElement, name, value);\n }\n else {\n this._renderer.removeStyle(this._ngEl.nativeElement, name);\n }\n };\n NgStyle.prototype._applyChanges = function (changes) {\n var _this = this;\n changes.forEachRemovedItem(function (record) { return _this._setStyle(record.key, null); });\n changes.forEachAddedItem(function (record) { return _this._setStyle(record.key, record.currentValue); });\n changes.forEachChangedItem(function (record) { return _this._setStyle(record.key, record.currentValue); });\n };\n __decorate([\n Input('ngStyle'),\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [Object])\n ], NgStyle.prototype, \"ngStyle\", null);\n NgStyle = __decorate([ __metadata(\"design:paramtypes\", [ElementRef, KeyValueDiffers, Renderer2])\n ], NgStyle);\nNgStyle.ɵfac = function NgStyle_Factory(t) { return new (t || NgStyle)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.KeyValueDiffers), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2)); };\nNgStyle.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgStyle, selectors: [[\"\", \"ngStyle\", \"\"]], inputs: { ngStyle: \"ngStyle\" } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgStyle, [{\n type: Directive,\n args: [{ selector: '[ngStyle]' }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.KeyValueDiffers }, { type: ɵngcc0.Renderer2 }]; }, { ngStyle: [{\n type: Input,\n args: ['ngStyle']\n }] }); })();\n return NgStyle;\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 * @ngModule CommonModule\n *\n * @description\n *\n * Inserts an embedded view from a prepared `TemplateRef`.\n *\n * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.\n * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding\n * by the local template `let` declarations.\n *\n * @usageNotes\n * ```\n * <ng-container *ngTemplateOutlet=\"templateRefExp; context: contextExp\"></ng-container>\n * ```\n *\n * Using the key `$implicit` in the context object will set its value as default.\n *\n * ### Example\n *\n * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}\n *\n * @publicApi\n */\nvar NgTemplateOutlet = /** @class */ (function () {\n function NgTemplateOutlet(_viewContainerRef) {\n this._viewContainerRef = _viewContainerRef;\n this._viewRef = null;\n /**\n * A context object to attach to the {@link EmbeddedViewRef}. This should be an\n * object, the object's keys will be available for binding by the local template `let`\n * declarations.\n * Using the key `$implicit` in the context object will set its value as default.\n */\n this.ngTemplateOutletContext = null;\n /**\n * A string defining the template reference and optionally the context object for the template.\n */\n this.ngTemplateOutlet = null;\n }\n NgTemplateOutlet.prototype.ngOnChanges = function (changes) {\n var recreateView = this._shouldRecreateView(changes);\n if (recreateView) {\n var viewContainerRef = this._viewContainerRef;\n if (this._viewRef) {\n viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef));\n }\n this._viewRef = this.ngTemplateOutlet ?\n viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, this.ngTemplateOutletContext) :\n null;\n }\n else if (this._viewRef && this.ngTemplateOutletContext) {\n this._updateExistingContext(this.ngTemplateOutletContext);\n }\n };\n /**\n * We need to re-create existing embedded view if:\n * - templateRef has changed\n * - context has changes\n *\n * We mark context object as changed when the corresponding object\n * shape changes (new properties are added or existing properties are removed).\n * In other words we consider context with the same properties as \"the same\" even\n * if object reference changes (see https://github.com/angular/angular/issues/13407).\n */\n NgTemplateOutlet.prototype._shouldRecreateView = function (changes) {\n var ctxChange = changes['ngTemplateOutletContext'];\n return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));\n };\n NgTemplateOutlet.prototype._hasContextShapeChanged = function (ctxChange) {\n var e_1, _a;\n var prevCtxKeys = Object.keys(ctxChange.previousValue || {});\n var currCtxKeys = Object.keys(ctxChange.currentValue || {});\n if (prevCtxKeys.length === currCtxKeys.length) {\n try {\n for (var currCtxKeys_1 = __values(currCtxKeys), currCtxKeys_1_1 = currCtxKeys_1.next(); !currCtxKeys_1_1.done; currCtxKeys_1_1 = currCtxKeys_1.next()) {\n var propName = currCtxKeys_1_1.value;\n if (prevCtxKeys.indexOf(propName) === -1) {\n return true;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (currCtxKeys_1_1 && !currCtxKeys_1_1.done && (_a = currCtxKeys_1.return)) _a.call(currCtxKeys_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return false;\n }\n return true;\n };\n NgTemplateOutlet.prototype._updateExistingContext = function (ctx) {\n var e_2, _a;\n try {\n for (var _b = __values(Object.keys(ctx)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var propName = _c.value;\n this._viewRef.context[propName] = this.ngTemplateOutletContext[propName];\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 };\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], NgTemplateOutlet.prototype, \"ngTemplateOutletContext\", void 0);\n __decorate([\n Input(),\n __metadata(\"design:type\", Object)\n ], NgTemplateOutlet.prototype, \"ngTemplateOutlet\", void 0);\n NgTemplateOutlet = __decorate([ __metadata(\"design:paramtypes\", [ViewContainerRef])\n ], NgTemplateOutlet);\nNgTemplateOutlet.ɵfac = function NgTemplateOutlet_Factory(t) { return new (t || NgTemplateOutlet)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ViewContainerRef)); };\nNgTemplateOutlet.ɵdir = ɵngcc0.ɵɵdefineDirective({ type: NgTemplateOutlet, selectors: [[\"\", \"ngTemplateOutlet\", \"\"]], inputs: { ngTemplateOutletContext: \"ngTemplateOutletContext\", ngTemplateOutlet: \"ngTemplateOutlet\" }, features: [ɵngcc0.ɵɵNgOnChangesFeature] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NgTemplateOutlet, [{\n type: Directive,\n args: [{ selector: '[ngTemplateOutlet]' }]\n }], function () { return [{ type: ɵngcc0.ViewContainerRef }]; }, { ngTemplateOutletContext: [{\n type: Input\n }], ngTemplateOutlet: [{\n type: Input\n }] }); })();\n return NgTemplateOutlet;\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 collection of Angular directives that are likely to be used in each and every Angular\n * application.\n */\nvar COMMON_DIRECTIVES = [\n NgClass,\n NgComponentOutlet,\n NgForOf,\n NgIf,\n NgTemplateOutlet,\n NgStyle,\n NgSwitch,\n NgSwitchCase,\n NgSwitchDefault,\n NgPlural,\n NgPluralCase,\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 */\nfunction invalidPipeArgumentError(type, value) {\n return Error(\"InvalidPipeArgument: '\" + value + \"' for pipe '\" + ɵstringify(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 */\nvar ObservableStrategy = /** @class */ (function () {\n function ObservableStrategy() {\n }\n ObservableStrategy.prototype.createSubscription = function (async, updateLatestValue) {\n return async.subscribe({\n next: updateLatestValue,\n error: function (e) {\n throw e;\n }\n });\n };\n ObservableStrategy.prototype.dispose = function (subscription) {\n subscription.unsubscribe();\n };\n ObservableStrategy.prototype.onDestroy = function (subscription) {\n subscription.unsubscribe();\n };\n return ObservableStrategy;\n}());\nvar PromiseStrategy = /** @class */ (function () {\n function PromiseStrategy() {\n }\n PromiseStrategy.prototype.createSubscription = function (async, updateLatestValue) {\n return async.then(updateLatestValue, function (e) {\n throw e;\n });\n };\n PromiseStrategy.prototype.dispose = function (subscription) { };\n PromiseStrategy.prototype.onDestroy = function (subscription) { };\n return PromiseStrategy;\n}());\nvar _promiseStrategy = new PromiseStrategy();\nvar _observableStrategy = new ObservableStrategy();\n/**\n * @ngModule CommonModule\n * @description\n *\n * Unwraps a value from an asynchronous primitive.\n *\n * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has\n * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for\n * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid\n * potential memory leaks.\n *\n * @usageNotes\n *\n * ### Examples\n *\n * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the\n * promise.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}\n *\n * It's also possible to use `async` with Observables. The example below binds the `time` Observable\n * to the view. The Observable continuously updates the view with the current time.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}\n *\n * @publicApi\n */\nvar AsyncPipe = /** @class */ (function () {\n function AsyncPipe(_ref) {\n this._ref = _ref;\n this._latestValue = null;\n this._latestReturnedValue = null;\n this._subscription = null;\n this._obj = null;\n this._strategy = null;\n }\n AsyncPipe_1 = AsyncPipe;\n AsyncPipe.prototype.ngOnDestroy = function () {\n if (this._subscription) {\n this._dispose();\n }\n };\n AsyncPipe.prototype.transform = function (obj) {\n if (!this._obj) {\n if (obj) {\n this._subscribe(obj);\n }\n this._latestReturnedValue = this._latestValue;\n return this._latestValue;\n }\n if (obj !== this._obj) {\n this._dispose();\n return this.transform(obj);\n }\n if (ɵlooseIdentical(this._latestValue, this._latestReturnedValue)) {\n return this._latestReturnedValue;\n }\n this._latestReturnedValue = this._latestValue;\n return WrappedValue.wrap(this._latestValue);\n };\n AsyncPipe.prototype._subscribe = function (obj) {\n var _this = this;\n this._obj = obj;\n this._strategy = this._selectStrategy(obj);\n this._subscription = this._strategy.createSubscription(obj, function (value) { return _this._updateLatestValue(obj, value); });\n };\n AsyncPipe.prototype._selectStrategy = function (obj) {\n if (ɵisPromise(obj)) {\n return _promiseStrategy;\n }\n if (ɵisObservable(obj)) {\n return _observableStrategy;\n }\n throw invalidPipeArgumentError(AsyncPipe_1, obj);\n };\n AsyncPipe.prototype._dispose = function () {\n this._strategy.dispose(this._subscription);\n this._latestValue = null;\n this._latestReturnedValue = null;\n this._subscription = null;\n this._obj = null;\n };\n AsyncPipe.prototype._updateLatestValue = function (async, value) {\n if (async === this._obj) {\n this._latestValue = value;\n this._ref.markForCheck();\n }\n };\n var AsyncPipe_1;\n AsyncPipe = AsyncPipe_1 = __decorate([ __metadata(\"design:paramtypes\", [ChangeDetectorRef])\n ], AsyncPipe);\nAsyncPipe.ɵfac = function AsyncPipe_Factory(t) { return new (t || AsyncPipe)(ɵngcc0.ɵɵinjectPipeChangeDetectorRef()); };\nAsyncPipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"async\", type: AsyncPipe, pure: false });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(AsyncPipe, [{\n type: Pipe,\n args: [{ name: 'async', pure: false }]\n }], function () { return [{ type: ɵngcc0.ChangeDetectorRef }]; }, null); })();\n return AsyncPipe;\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 * Transforms text to all lower case.\n *\n * @see `UpperCasePipe`\n * @see `TitleCasePipe`\n * @usageNotes\n *\n * The following example defines a view that allows the user to enter\n * text, and then uses the pipe to convert the input text to all lower case.\n *\n * <code-example path=\"common/pipes/ts/lowerupper_pipe.ts\" region='LowerUpperPipe'></code-example>\n *\n * @ngModule CommonModule\n * @publicApi\n */\nvar LowerCasePipe = /** @class */ (function () {\n function LowerCasePipe() {\n }\n LowerCasePipe_1 = LowerCasePipe;\n /**\n * @param value The string to transform to lower case.\n */\n LowerCasePipe.prototype.transform = function (value) {\n if (!value)\n return value;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(LowerCasePipe_1, value);\n }\n return value.toLowerCase();\n };\n var LowerCasePipe_1;\nLowerCasePipe.ɵfac = function LowerCasePipe_Factory(t) { return new (t || LowerCasePipe)(); };\nLowerCasePipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"lowercase\", type: LowerCasePipe, pure: true });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(LowerCasePipe, [{\n type: Pipe,\n args: [{ name: 'lowercase' }]\n }], function () { return []; }, null); })();\n return LowerCasePipe;\n}());\n//\n// Regex below matches any Unicode word and compatible with ES5. In ES2018 the same result\n// can be achieved by using /\\p{L}\\S*/gu and also known as Unicode Property Escapes\n// (http://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no\n// transpilation of this functionality down to ES5 without external tool, the only solution is\n// to use already transpiled form. Example can be found here -\n// https://mothereff.in/regexpu#input=var+regex+%3D+/%5Cp%7BL%7D/u%3B&unicodePropertyEscape=1\n//\nvar unicodeWordMatch = /(?:[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640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DC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE83\\uDE86-\\uDE89\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00-\\uDD1E\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D])\\S*/g;\n/**\n * Transforms text to title case.\n * Capitalizes the first letter of each word and transforms the\n * rest of the word to lower case.\n * Words are delimited by any whitespace character, such as a space, tab, or line-feed character.\n *\n * @see `LowerCasePipe`\n * @see `UpperCasePipe`\n *\n * @usageNotes\n * The following example shows the result of transforming various strings into title case.\n *\n * <code-example path=\"common/pipes/ts/titlecase_pipe.ts\" region='TitleCasePipe'></code-example>\n *\n * @ngModule CommonModule\n * @publicApi\n */\nvar TitleCasePipe = /** @class */ (function () {\n function TitleCasePipe() {\n }\n TitleCasePipe_1 = TitleCasePipe;\n /**\n * @param value The string to transform to title case.\n */\n TitleCasePipe.prototype.transform = function (value) {\n if (!value)\n return value;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(TitleCasePipe_1, value);\n }\n return value.replace(unicodeWordMatch, (function (txt) { return txt[0].toUpperCase() + txt.substr(1).toLowerCase(); }));\n };\n var TitleCasePipe_1;\nTitleCasePipe.ɵfac = function TitleCasePipe_Factory(t) { return new (t || TitleCasePipe)(); };\nTitleCasePipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"titlecase\", type: TitleCasePipe, pure: true });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(TitleCasePipe, [{\n type: Pipe,\n args: [{ name: 'titlecase' }]\n }], function () { return []; }, null); })();\n return TitleCasePipe;\n}());\n/**\n * Transforms text to all upper case.\n * @see `LowerCasePipe`\n * @see `TitleCasePipe`\n *\n * @ngModule CommonModule\n * @publicApi\n */\nvar UpperCasePipe = /** @class */ (function () {\n function UpperCasePipe() {\n }\n UpperCasePipe_1 = UpperCasePipe;\n /**\n * @param value The string to transform to upper case.\n */\n UpperCasePipe.prototype.transform = function (value) {\n if (!value)\n return value;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(UpperCasePipe_1, value);\n }\n return value.toUpperCase();\n };\n var UpperCasePipe_1;\nUpperCasePipe.ɵfac = function UpperCasePipe_Factory(t) { return new (t || UpperCasePipe)(); };\nUpperCasePipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"uppercase\", type: UpperCasePipe, pure: true });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(UpperCasePipe, [{\n type: Pipe,\n args: [{ name: 'uppercase' }]\n }], function () { return []; }, null); })();\n return UpperCasePipe;\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 off\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date value according to locale rules.\n *\n * Only the `en-US` locale data comes with Angular. To localize dates\n * in another language, you must import the corresponding locale data.\n * See the [I18n guide](guide/i18n#i18n-pipes) for more information.\n *\n * @see `formatDate()`\n *\n *\n * @usageNotes\n *\n * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to\n * reformat the date on every change-detection cycle, treat the date as an immutable object\n * and change the reference when the pipe needs to run again.\n *\n * ### Pre-defined format options\n *\n * Examples are given in `en-US` locale.\n *\n * - `'short'`: equivalent to `'M/d/yy, h:mm a'` (`6/15/15, 9:03 AM`).\n * - `'medium'`: equivalent to `'MMM d, y, h:mm:ss a'` (`Jun 15, 2015, 9:03:01 AM`).\n * - `'long'`: equivalent to `'MMMM d, y, h:mm:ss a z'` (`June 15, 2015 at 9:03:01 AM\n * GMT+1`).\n * - `'full'`: equivalent to `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (`Monday, June 15, 2015 at\n * 9:03:01 AM GMT+01:00`).\n * - `'shortDate'`: equivalent to `'M/d/yy'` (`6/15/15`).\n * - `'mediumDate'`: equivalent to `'MMM d, y'` (`Jun 15, 2015`).\n * - `'longDate'`: equivalent to `'MMMM d, y'` (`June 15, 2015`).\n * - `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` (`Monday, June 15, 2015`).\n * - `'shortTime'`: equivalent to `'h:mm a'` (`9:03 AM`).\n * - `'mediumTime'`: equivalent to `'h:mm:ss a'` (`9:03:01 AM`).\n * - `'longTime'`: equivalent to `'h:mm:ss a z'` (`9:03:01 AM GMT+1`).\n * - `'fullTime'`: equivalent to `'h:mm:ss a zzzz'` (`9:03:01 AM GMT+01:00`).\n *\n * ### Custom format options\n *\n * You can construct a format string using symbols to specify the components\n * of a date-time value, as described in the following table.\n * Format details depend on the locale.\n * Fields marked with (*) are only available in the extra data set for the given locale.\n *\n * | Field type | Format | Description | Example Value |\n * |--------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------|\n * | Era | G, GG & GGG | Abbreviated | AD |\n * | | GGGG | Wide | Anno Domini |\n * | | GGGGG | Narrow | A |\n * | Year | y | Numeric: minimum digits | 2, 20, 201, 2017, 20173 |\n * | | yy | Numeric: 2 digits + zero padded | 02, 20, 01, 17, 73 |\n * | | yyy | Numeric: 3 digits + zero padded | 002, 020, 201, 2017, 20173 |\n * | | yyyy | Numeric: 4 digits or more + zero padded | 0002, 0020, 0201, 2017, 20173 |\n * | Month | M | Numeric: 1 digit | 9, 12 |\n * | | MM | Numeric: 2 digits + zero padded | 09, 12 |\n * | | MMM | Abbreviated | Sep |\n * | | MMMM | Wide | September |\n * | | MMMMM | Narrow | S |\n * | Month standalone | L | Numeric: 1 digit | 9, 12 |\n * | | LL | Numeric: 2 digits + zero padded | 09, 12 |\n * | | LLL | Abbreviated | Sep |\n * | | LLLL | Wide | September |\n * | | LLLLL | Narrow | S |\n * | Week of year | w | Numeric: minimum digits | 1... 53 |\n * | | ww | Numeric: 2 digits + zero padded | 01... 53 |\n * | Week of month | W | Numeric: 1 digit | 1... 5 |\n * | Day of month | d | Numeric: minimum digits | 1 |\n * | | dd | Numeric: 2 digits + zero padded | 01 |\n * | Week day | E, EE & EEE | Abbreviated | Tue |\n * | | EEEE | Wide | Tuesday |\n * | | EEEEE | Narrow | T |\n * | | EEEEEE | Short | Tu |\n * | Period | a, aa & aaa | Abbreviated | am/pm or AM/PM |\n * | | aaaa | Wide (fallback to `a` when missing) | ante meridiem/post meridiem |\n * | | aaaaa | Narrow | a/p |\n * | Period* | B, BB & BBB | Abbreviated | mid. |\n * | | BBBB | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |\n * | | BBBBB | Narrow | md |\n * | Period standalone* | b, bb & bbb | Abbreviated | mid. |\n * | | bbbb | Wide | am, pm, midnight, noon, morning, afternoon, evening, night |\n * | | bbbbb | Narrow | md |\n * | Hour 1-12 | h | Numeric: minimum digits | 1, 12 |\n * | | hh | Numeric: 2 digits + zero padded | 01, 12 |\n * | Hour 0-23 | H | Numeric: minimum digits | 0, 23 |\n * | | HH | Numeric: 2 digits + zero padded | 00, 23 |\n * | Minute | m | Numeric: minimum digits | 8, 59 |\n * | | mm | Numeric: 2 digits + zero padded | 08, 59 |\n * | Second | s | Numeric: minimum digits | 0... 59 |\n * | | ss | Numeric: 2 digits + zero padded | 00... 59 |\n * | Fractional seconds | S | Numeric: 1 digit | 0... 9 |\n * | | SS | Numeric: 2 digits + zero padded | 00... 99 |\n * | | SSS | Numeric: 3 digits + zero padded (= milliseconds) | 000... 999 |\n * | Zone | z, zz & zzz | Short specific non location format (fallback to O) | GMT-8 |\n * | | zzzz | Long specific non location format (fallback to OOOO) | GMT-08:00 |\n * | | Z, ZZ & ZZZ | ISO8601 basic format | -0800 |\n * | | ZZZZ | Long localized GMT format | GMT-8:00 |\n * | | ZZZZZ | ISO8601 extended format + Z indicator for offset 0 (= XXXXX) | -08:00 |\n * | | O, OO & OOO | Short localized GMT format | GMT-8 |\n * | | OOOO | Long localized GMT format | GMT-08:00 |\n *\n * Note that timezone correction is not applied to an ISO string that has no time component, such as \"2016-09-19\"\n *\n * ### Format examples\n *\n * These examples transform a date into various formats,\n * assuming that `dateObj` is a JavaScript `Date` object for\n * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11,\n * given in the local time for the `en-US` locale.\n *\n * ```\n * {{ dateObj | date }} // output is 'Jun 15, 2015'\n * {{ dateObj | date:'medium' }} // output is 'Jun 15, 2015, 9:43:11 PM'\n * {{ dateObj | date:'shortTime' }} // output is '9:43 PM'\n * {{ dateObj | date:'mm:ss' }} // output is '43:11'\n * ```\n *\n * ### Usage example\n *\n * The following component uses a date pipe to display the current date in different formats.\n *\n * ```\n * @Component({\n * selector: 'date-pipe',\n * template: `<div>\n * <p>Today is {{today | date}}</p>\n * <p>Or if you prefer, {{today | date:'fullDate'}}</p>\n * <p>The time is {{today | date:'h:mm a z'}}</p>\n * </div>`\n * })\n * // Get the current date and time as a date-time value.\n * export class DatePipeComponent {\n * today: number = Date.now();\n * }\n * ```\n *\n * @publicApi\n */\n// clang-format on\nvar DatePipe = /** @class */ (function () {\n function DatePipe(locale) {\n this.locale = locale;\n }\n DatePipe_1 = DatePipe;\n /**\n * @param value The date expression: a `Date` object, a number\n * (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime).\n * @param format The date/time components to include, using predefined options or a\n * custom format string.\n * @param timezone A timezone offset (such as `'+0430'`), or a standard\n * UTC/GMT or continental US timezone abbreviation.\n * When not supplied, uses the end-user's local system timezone.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n * @returns A date string in the desired format.\n */\n DatePipe.prototype.transform = function (value, format, timezone, locale) {\n if (format === void 0) { format = 'mediumDate'; }\n if (value == null || value === '' || value !== value)\n return null;\n try {\n return formatDate(value, format, locale || this.locale, timezone);\n }\n catch (error) {\n throw invalidPipeArgumentError(DatePipe_1, error.message);\n }\n };\n var DatePipe_1;\n DatePipe = DatePipe_1 = __decorate([ __param(0, Inject(LOCALE_ID)),\n __metadata(\"design:paramtypes\", [String])\n ], DatePipe);\nDatePipe.ɵfac = function DatePipe_Factory(t) { return new (t || DatePipe)(ɵngcc0.ɵɵdirectiveInject(LOCALE_ID)); };\nDatePipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"date\", type: DatePipe, pure: true });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(DatePipe, [{\n type: Pipe,\n args: [{ name: 'date', pure: true }]\n }], function () { return [{ type: String, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; }, null); })();\n return DatePipe;\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 */\nvar _INTERPOLATION_REGEXP = /#/g;\n/**\n * @ngModule CommonModule\n * @description\n *\n * Maps a value to a string that pluralizes the value according to locale rules.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}\n *\n * @publicApi\n */\nvar I18nPluralPipe = /** @class */ (function () {\n function I18nPluralPipe(_localization) {\n this._localization = _localization;\n }\n I18nPluralPipe_1 = I18nPluralPipe;\n /**\n * @param value the number to be formatted\n * @param pluralMap an object that mimics the ICU format, see\n * http://userguide.icu-project.org/formatparse/messages.\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n I18nPluralPipe.prototype.transform = function (value, pluralMap, locale) {\n if (value == null)\n return '';\n if (typeof pluralMap !== 'object' || pluralMap === null) {\n throw invalidPipeArgumentError(I18nPluralPipe_1, pluralMap);\n }\n var key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);\n return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());\n };\n var I18nPluralPipe_1;\n I18nPluralPipe = I18nPluralPipe_1 = __decorate([ __metadata(\"design:paramtypes\", [NgLocalization])\n ], I18nPluralPipe);\nI18nPluralPipe.ɵfac = function I18nPluralPipe_Factory(t) { return new (t || I18nPluralPipe)(ɵngcc0.ɵɵdirectiveInject(NgLocalization)); };\nI18nPluralPipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"i18nPlural\", type: I18nPluralPipe, pure: true });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(I18nPluralPipe, [{\n type: Pipe,\n args: [{ name: 'i18nPlural', pure: true }]\n }], function () { return [{ type: NgLocalization }]; }, null); })();\n return I18nPluralPipe;\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 * @ngModule CommonModule\n * @description\n *\n * Generic selector that displays the string that matches the current value.\n *\n * If none of the keys of the `mapping` match the `value`, then the content\n * of the `other` key is returned when present, otherwise an empty string is returned.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}\n *\n * @publicApi\n */\nvar I18nSelectPipe = /** @class */ (function () {\n function I18nSelectPipe() {\n }\n I18nSelectPipe_1 = I18nSelectPipe;\n /**\n * @param value a string to be internationalized.\n * @param mapping an object that indicates the text that should be displayed\n * for different values of the provided `value`.\n */\n I18nSelectPipe.prototype.transform = function (value, mapping) {\n if (value == null)\n return '';\n if (typeof mapping !== 'object' || typeof value !== 'string') {\n throw invalidPipeArgumentError(I18nSelectPipe_1, mapping);\n }\n if (mapping.hasOwnProperty(value)) {\n return mapping[value];\n }\n if (mapping.hasOwnProperty('other')) {\n return mapping['other'];\n }\n return '';\n };\n var I18nSelectPipe_1;\nI18nSelectPipe.ɵfac = function I18nSelectPipe_Factory(t) { return new (t || I18nSelectPipe)(); };\nI18nSelectPipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"i18nSelect\", type: I18nSelectPipe, pure: true });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(I18nSelectPipe, [{\n type: Pipe,\n args: [{ name: 'i18nSelect', pure: true }]\n }], function () { return []; }, null); })();\n return I18nSelectPipe;\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 * @ngModule CommonModule\n * @description\n *\n * Converts a value into its JSON-format representation. Useful for debugging.\n *\n * @usageNotes\n *\n * The following component uses a JSON pipe to convert an object\n * to JSON format, and displays the string in both formats for comparison.\n *\n * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}\n *\n * @publicApi\n */\nvar JsonPipe = /** @class */ (function () {\n function JsonPipe() {\n }\n /**\n * @param value A value of any type to convert into a JSON-format string.\n */\n JsonPipe.prototype.transform = function (value) {\n return JSON.stringify(value, null, 2);\n };\nJsonPipe.ɵfac = function JsonPipe_Factory(t) { return new (t || JsonPipe)(); };\nJsonPipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"json\", type: JsonPipe, pure: false });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(JsonPipe, [{\n type: Pipe,\n args: [{ name: 'json', pure: false }]\n }], function () { return []; }, null); })();\n return JsonPipe;\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 */\nfunction makeKeyValuePair(key, value) {\n return { key: key, value: value };\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms Object or Map into an array of key value pairs.\n *\n * The output array will be ordered by keys.\n * By default the comparator will be by Unicode point value.\n * You can optionally pass a compareFn if your keys are complex types.\n *\n * @usageNotes\n * ### Examples\n *\n * This examples show how an Object or a Map can be iterated by ngFor with the use of this keyvalue\n * pipe.\n *\n * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}\n *\n * @publicApi\n */\nvar KeyValuePipe = /** @class */ (function () {\n function KeyValuePipe(differs) {\n this.differs = differs;\n this.keyValues = [];\n }\n KeyValuePipe.prototype.transform = function (input, compareFn) {\n var _this = this;\n if (compareFn === void 0) { compareFn = defaultComparator; }\n if (!input || (!(input instanceof Map) && typeof input !== 'object')) {\n return null;\n }\n if (!this.differ) {\n // make a differ for whatever type we've been passed in\n this.differ = this.differs.find(input).create();\n }\n var differChanges = this.differ.diff(input);\n if (differChanges) {\n this.keyValues = [];\n differChanges.forEachItem(function (r) {\n _this.keyValues.push(makeKeyValuePair(r.key, r.currentValue));\n });\n this.keyValues.sort(compareFn);\n }\n return this.keyValues;\n };\n KeyValuePipe = __decorate([ __metadata(\"design:paramtypes\", [KeyValueDiffers])\n ], KeyValuePipe);\nKeyValuePipe.ɵfac = function KeyValuePipe_Factory(t) { return new (t || KeyValuePipe)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.KeyValueDiffers)); };\nKeyValuePipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"keyvalue\", type: KeyValuePipe, pure: false });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(KeyValuePipe, [{\n type: Pipe,\n args: [{ name: 'keyvalue', pure: false }]\n }], function () { return [{ type: ɵngcc0.KeyValueDiffers }]; }, null); })();\n return KeyValuePipe;\n}());\nfunction defaultComparator(keyValueA, keyValueB) {\n var a = keyValueA.key;\n var b = keyValueB.key;\n // if same exit with 0;\n if (a === b)\n return 0;\n // make sure that undefined are at the end of the sort.\n if (a === undefined)\n return 1;\n if (b === undefined)\n return -1;\n // make sure that nulls are at the end of the sort.\n if (a === null)\n return 1;\n if (b === null)\n return -1;\n if (typeof a == 'string' && typeof b == 'string') {\n return a < b ? -1 : 1;\n }\n if (typeof a == 'number' && typeof b == 'number') {\n return a - b;\n }\n if (typeof a == 'boolean' && typeof b == 'boolean') {\n return a < b ? -1 : 1;\n }\n // `a` and `b` are of different types. Compare their string values.\n var aString = String(a);\n var bString = String(b);\n return aString == bString ? 0 : aString < bString ? -1 : 1;\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 * @ngModule CommonModule\n * @description\n *\n * Transforms a number into a string,\n * formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * If no parameters are specified, the function rounds off to the nearest value using this\n * [rounding method](https://en.wikibooks.org/wiki/Arithmetic/Rounding).\n * The behavior differs from that of the JavaScript ```Math.round()``` function.\n * In the following case for example, the pipe rounds down where\n * ```Math.round()``` rounds up:\n *\n * ```html\n * -2.5 | number:'1.0-0'\n * > -3\n * Math.round(-2.5)\n * > -2\n * ```\n *\n * @see `formatNumber()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * ### Example\n *\n * <code-example path=\"common/pipes/ts/number_pipe.ts\" region='NumberPipe'></code-example>\n *\n * @publicApi\n */\nvar DecimalPipe = /** @class */ (function () {\n function DecimalPipe(_locale) {\n this._locale = _locale;\n }\n DecimalPipe_1 = DecimalPipe;\n /**\n * @param value The number to be formatted.\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:<br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `0`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `3`.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n */\n DecimalPipe.prototype.transform = function (value, digitsInfo, locale) {\n if (isEmpty(value))\n return null;\n locale = locale || this._locale;\n try {\n var num = strToNumber(value);\n return formatNumber(num, locale, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(DecimalPipe_1, error.message);\n }\n };\n var DecimalPipe_1;\n DecimalPipe = DecimalPipe_1 = __decorate([ __param(0, Inject(LOCALE_ID)),\n __metadata(\"design:paramtypes\", [String])\n ], DecimalPipe);\nDecimalPipe.ɵfac = function DecimalPipe_Factory(t) { return new (t || DecimalPipe)(ɵngcc0.ɵɵdirectiveInject(LOCALE_ID)); };\nDecimalPipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"number\", type: DecimalPipe, pure: true });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(DecimalPipe, [{\n type: Pipe,\n args: [{ name: 'number' }]\n }], function () { return [{ type: String, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; }, null); })();\n return DecimalPipe;\n}());\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a percentage\n * string, formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * @see `formatPercent()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/percent_pipe.ts\" region='PercentPipe'></code-example>\n *\n * @publicApi\n */\nvar PercentPipe = /** @class */ (function () {\n function PercentPipe(_locale) {\n this._locale = _locale;\n }\n PercentPipe_1 = PercentPipe;\n /**\n *\n * @param value The number to be formatted as a percentage.\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:<br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `0`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `0`.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n */\n PercentPipe.prototype.transform = function (value, digitsInfo, locale) {\n if (isEmpty(value))\n return null;\n locale = locale || this._locale;\n try {\n var num = strToNumber(value);\n return formatPercent(num, locale, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(PercentPipe_1, error.message);\n }\n };\n var PercentPipe_1;\n PercentPipe = PercentPipe_1 = __decorate([ __param(0, Inject(LOCALE_ID)),\n __metadata(\"design:paramtypes\", [String])\n ], PercentPipe);\nPercentPipe.ɵfac = function PercentPipe_Factory(t) { return new (t || PercentPipe)(ɵngcc0.ɵɵdirectiveInject(LOCALE_ID)); };\nPercentPipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"percent\", type: PercentPipe, pure: true });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(PercentPipe, [{\n type: Pipe,\n args: [{ name: 'percent' }]\n }], function () { return [{ type: String, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }]; }, null); })();\n return PercentPipe;\n}());\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a currency string, formatted according to locale rules\n * that determine group sizing and separator, decimal-point character,\n * and other locale-specific configurations.\n *\n * {@a currency-code-deprecation}\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v11 the default currency code will be taken from the current locale identified by\n * the `LOCAL_ID` token. See the [i18n guide](guide/i18n#setting-up-the-locale-of-your-app) for\n * more information.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @see `getCurrencySymbol()`\n * @see `formatCurrency()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/currency_pipe.ts\" region='CurrencyPipe'></code-example>\n *\n * @publicApi\n */\nvar CurrencyPipe = /** @class */ (function () {\n function CurrencyPipe(_locale, _defaultCurrencyCode) {\n if (_defaultCurrencyCode === void 0) { _defaultCurrencyCode = 'USD'; }\n this._locale = _locale;\n this._defaultCurrencyCode = _defaultCurrencyCode;\n }\n CurrencyPipe_1 = CurrencyPipe;\n /**\n *\n * @param value The number to be formatted as currency.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be\n * configured using the `DEFAULT_CURRENCY_CODE` injection token.\n * @param display The format for the currency indicator. One of the following:\n * - `code`: Show the code (such as `USD`).\n * - `symbol`(default): Show the symbol (such as `$`).\n * - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n * currency.\n * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n * locale has no narrow symbol, uses the standard symbol for the locale.\n * - String: Use the given string value instead of a code or a symbol.\n * For example, an empty string will suppress the currency & symbol.\n * - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n *\n * @param digitsInfo Decimal representation options, specified by a string\n * in the following format:<br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n * Default is `1`.\n * - `minFractionDigits`: The minimum number of digits after the decimal point.\n * Default is `2`.\n * - `maxFractionDigits`: The maximum number of digits after the decimal point.\n * Default is `2`.\n * If not provided, the number will be formatted with the proper amount of digits,\n * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n * @param locale A locale code for the locale format rules to use.\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n */\n CurrencyPipe.prototype.transform = function (value, currencyCode, display, digitsInfo, locale) {\n if (display === void 0) { display = 'symbol'; }\n if (isEmpty(value))\n return null;\n locale = locale || this._locale;\n if (typeof display === 'boolean') {\n if (console && console.warn) {\n console.warn(\"Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are \\\"code\\\", \\\"symbol\\\" or \\\"symbol-narrow\\\".\");\n }\n display = display ? 'symbol' : 'code';\n }\n var currency = currencyCode || this._defaultCurrencyCode;\n if (display !== 'code') {\n if (display === 'symbol' || display === 'symbol-narrow') {\n currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);\n }\n else {\n currency = display;\n }\n }\n try {\n var num = strToNumber(value);\n return formatCurrency(num, locale, currency, currencyCode, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(CurrencyPipe_1, error.message);\n }\n };\n var CurrencyPipe_1;\n CurrencyPipe = CurrencyPipe_1 = __decorate([ __param(0, Inject(LOCALE_ID)),\n __param(1, Inject(DEFAULT_CURRENCY_CODE)),\n __metadata(\"design:paramtypes\", [String, String])\n ], CurrencyPipe);\nCurrencyPipe.ɵfac = function CurrencyPipe_Factory(t) { return new (t || CurrencyPipe)(ɵngcc0.ɵɵdirectiveInject(LOCALE_ID), ɵngcc0.ɵɵdirectiveInject(DEFAULT_CURRENCY_CODE)); };\nCurrencyPipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"currency\", type: CurrencyPipe, pure: true });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(CurrencyPipe, [{\n type: Pipe,\n args: [{ name: 'currency' }]\n }], function () { return [{ type: String, decorators: [{\n type: Inject,\n args: [LOCALE_ID]\n }] }, { type: String, decorators: [{\n type: Inject,\n args: [DEFAULT_CURRENCY_CODE]\n }] }]; }, null); })();\n return CurrencyPipe;\n}());\nfunction isEmpty(value) {\n return value == null || value === '' || value !== value;\n}\n/**\n * Transforms a string into a number (if needed).\n */\nfunction strToNumber(value) {\n // Convert strings to numbers\n if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {\n return Number(value);\n }\n if (typeof value !== 'number') {\n throw new Error(value + \" is not a number\");\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 * @ngModule CommonModule\n * @description\n *\n * Creates a new `Array` or `String` containing a subset (slice) of the elements.\n *\n * @usageNotes\n *\n * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`\n * and `String.prototype.slice()`.\n *\n * When operating on an `Array`, the returned `Array` is always a copy even when all\n * the elements are being returned.\n *\n * When operating on a blank value, the pipe returns the blank value.\n *\n * ### List Example\n *\n * This `ngFor` example:\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}\n *\n * produces the following:\n *\n * ```html\n * <li>b</li>\n * <li>c</li>\n * ```\n *\n * ### String Examples\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}\n *\n * @publicApi\n */\nvar SlicePipe = /** @class */ (function () {\n function SlicePipe() {\n }\n SlicePipe_1 = SlicePipe;\n SlicePipe.prototype.transform = function (value, start, end) {\n if (value == null)\n return value;\n if (!this.supports(value)) {\n throw invalidPipeArgumentError(SlicePipe_1, value);\n }\n return value.slice(start, end);\n };\n SlicePipe.prototype.supports = function (obj) {\n return typeof obj === 'string' || Array.isArray(obj);\n };\n var SlicePipe_1;\nSlicePipe.ɵfac = function SlicePipe_Factory(t) { return new (t || SlicePipe)(); };\nSlicePipe.ɵpipe = ɵngcc0.ɵɵdefinePipe({ name: \"slice\", type: SlicePipe, pure: false });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(SlicePipe, [{\n type: Pipe,\n args: [{ name: 'slice', pure: false }]\n }], function () { return []; }, null); })();\n return SlicePipe;\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 collection of Angular pipes that are likely to be used in each and every application.\n */\nvar COMMON_PIPES = [\n AsyncPipe,\n UpperCasePipe,\n LowerCasePipe,\n JsonPipe,\n SlicePipe,\n DecimalPipe,\n PercentPipe,\n TitleCasePipe,\n CurrencyPipe,\n DatePipe,\n I18nPluralPipe,\n I18nSelectPipe,\n KeyValuePipe,\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// Note: This does not contain the location providers,\n// as they need some platform specific implementations to work.\n/**\n * Exports all the basic Angular directives and pipes,\n * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.\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 * * The `providers` options configure the NgModule's injector to provide\n * localization dependencies to members.\n * * The `exports` options make the declared directives and pipes available for import\n * by other NgModules.\n *\n * @publicApi\n */\nvar CommonModule = /** @class */ (function () {\n function CommonModule() {\n }\nCommonModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: CommonModule });\nCommonModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function CommonModule_Factory(t) { return new (t || CommonModule)(); }, providers: [\n { provide: NgLocalization, useClass: NgLocaleLocalization },\n ] });\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(CommonModule, { declarations: [NgClass,\n NgComponentOutlet,\n NgForOf,\n NgIf,\n NgTemplateOutlet,\n NgStyle,\n NgSwitch,\n NgSwitchCase,\n NgSwitchDefault,\n NgPlural,\n NgPluralCase,\n AsyncPipe,\n UpperCasePipe,\n LowerCasePipe,\n JsonPipe,\n SlicePipe,\n DecimalPipe,\n PercentPipe,\n TitleCasePipe,\n CurrencyPipe,\n DatePipe,\n I18nPluralPipe,\n I18nSelectPipe,\n KeyValuePipe], exports: [NgClass,\n NgComponentOutlet,\n NgForOf,\n NgIf,\n NgTemplateOutlet,\n NgStyle,\n NgSwitch,\n NgSwitchCase,\n NgSwitchDefault,\n NgPlural,\n NgPluralCase,\n AsyncPipe,\n UpperCasePipe,\n LowerCasePipe,\n JsonPipe,\n SlicePipe,\n DecimalPipe,\n PercentPipe,\n TitleCasePipe,\n CurrencyPipe,\n DatePipe,\n I18nPluralPipe,\n I18nSelectPipe,\n KeyValuePipe] }); })();\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(CommonModule, [{\n type: NgModule,\n args: [{\n declarations: [COMMON_DIRECTIVES, COMMON_PIPES],\n exports: [COMMON_DIRECTIVES, COMMON_PIPES],\n providers: [\n { provide: NgLocalization, useClass: NgLocaleLocalization },\n ]\n }]\n }], function () { return []; }, null); })();\n return CommonModule;\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 */\nvar PLATFORM_BROWSER_ID = 'browser';\nvar PLATFORM_SERVER_ID = 'server';\nvar PLATFORM_WORKER_APP_ID = 'browserWorkerApp';\nvar PLATFORM_WORKER_UI_ID = 'browserWorkerUi';\n/**\n * Returns whether a platform id represents a browser platform.\n * @publicApi\n */\nfunction isPlatformBrowser(platformId) {\n return platformId === PLATFORM_BROWSER_ID;\n}\n/**\n * Returns whether a platform id represents a server platform.\n * @publicApi\n */\nfunction isPlatformServer(platformId) {\n return platformId === PLATFORM_SERVER_ID;\n}\n/**\n * Returns whether a platform id represents a web worker app platform.\n * @publicApi\n */\nfunction isPlatformWorkerApp(platformId) {\n return platformId === PLATFORM_WORKER_APP_ID;\n}\n/**\n * Returns whether a platform id represents a web worker UI platform.\n * @publicApi\n */\nfunction isPlatformWorkerUi(platformId) {\n return platformId === PLATFORM_WORKER_UI_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 * @publicApi\n */\nvar VERSION = new Version('9.1.11');\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 scroll position manager. Implemented by `BrowserViewportScroller`.\n *\n * @publicApi\n */\nvar ViewportScroller = /** @class */ (function () {\n function ViewportScroller() {\n }\n // De-sugared tree-shakable injection\n // See #23917\n /** @nocollapse */\n ViewportScroller.ɵprov = ɵɵdefineInjectable({\n token: ViewportScroller,\n providedIn: 'root',\n factory: function () { return new BrowserViewportScroller(ɵɵinject(DOCUMENT), window, ɵɵinject(ErrorHandler)); }\n });\n return ViewportScroller;\n}());\n/**\n * Manages the scroll position for a browser window.\n */\nvar BrowserViewportScroller = /** @class */ (function () {\n function BrowserViewportScroller(document, window, errorHandler) {\n this.document = document;\n this.window = window;\n this.errorHandler = errorHandler;\n this.offset = function () { return [0, 0]; };\n }\n /**\n * Configures the top offset used when scrolling to an anchor.\n * @param offset A position in screen coordinates (a tuple with x and y values)\n * or a function that returns the top offset position.\n *\n */\n BrowserViewportScroller.prototype.setOffset = function (offset) {\n if (Array.isArray(offset)) {\n this.offset = function () { return offset; };\n }\n else {\n this.offset = offset;\n }\n };\n /**\n * Retrieves the current scroll position.\n * @returns The position in screen coordinates.\n */\n BrowserViewportScroller.prototype.getScrollPosition = function () {\n if (this.supportScrollRestoration()) {\n return [this.window.scrollX, this.window.scrollY];\n }\n else {\n return [0, 0];\n }\n };\n /**\n * Sets the scroll position.\n * @param position The new position in screen coordinates.\n */\n BrowserViewportScroller.prototype.scrollToPosition = function (position) {\n if (this.supportScrollRestoration()) {\n this.window.scrollTo(position[0], position[1]);\n }\n };\n /**\n * Scrolls to an anchor element.\n * @param anchor The ID of the anchor element.\n */\n BrowserViewportScroller.prototype.scrollToAnchor = function (anchor) {\n if (this.supportScrollRestoration()) {\n // Escape anything passed to `querySelector` as it can throw errors and stop the application\n // from working if invalid values are passed.\n if (this.window.CSS && this.window.CSS.escape) {\n anchor = this.window.CSS.escape(anchor);\n }\n else {\n anchor = anchor.replace(/(\\\"|\\'\\ |:|\\.|\\[|\\]|,|=)/g, '\\\\$1');\n }\n try {\n var elSelectedById = this.document.querySelector(\"#\" + anchor);\n if (elSelectedById) {\n this.scrollToElement(elSelectedById);\n return;\n }\n var elSelectedByName = this.document.querySelector(\"[name='\" + anchor + \"']\");\n if (elSelectedByName) {\n this.scrollToElement(elSelectedByName);\n return;\n }\n }\n catch (e) {\n this.errorHandler.handleError(e);\n }\n }\n };\n /**\n * Disables automatic scroll restoration provided by the browser.\n */\n BrowserViewportScroller.prototype.setHistoryScrollRestoration = function (scrollRestoration) {\n if (this.supportScrollRestoration()) {\n var history_1 = this.window.history;\n if (history_1 && history_1.scrollRestoration) {\n history_1.scrollRestoration = scrollRestoration;\n }\n }\n };\n BrowserViewportScroller.prototype.scrollToElement = function (el) {\n var rect = el.getBoundingClientRect();\n var left = rect.left + this.window.pageXOffset;\n var top = rect.top + this.window.pageYOffset;\n var offset = this.offset();\n this.window.scrollTo(left - offset[0], top - offset[1]);\n };\n /**\n * We only support scroll restoration when we can get a hold of window.\n * This means that we do not support this behavior when running in a web worker.\n *\n * Lifting this restriction right now would require more changes in the dom adapter.\n * Since webworkers aren't widely used, we will lift it once RouterScroller is\n * battle-tested.\n */\n BrowserViewportScroller.prototype.supportScrollRestoration = function () {\n try {\n return !!this.window && !!this.window.scrollTo;\n }\n catch (_a) {\n return false;\n }\n };\n return BrowserViewportScroller;\n}());\n/**\n * Provides an empty implementation of the viewport scroller. This will\n * live in @angular/common as it will be used by both platform-server and platform-webworker.\n */\nvar NullViewportScroller = /** @class */ (function () {\n function NullViewportScroller() {\n }\n /**\n * Empty implementation\n */\n NullViewportScroller.prototype.setOffset = function (offset) { };\n /**\n * Empty implementation\n */\n NullViewportScroller.prototype.getScrollPosition = function () {\n return [0, 0];\n };\n /**\n * Empty implementation\n */\n NullViewportScroller.prototype.scrollToPosition = function (position) { };\n /**\n * Empty implementation\n */\n NullViewportScroller.prototype.scrollToAnchor = function (anchor) { };\n /**\n * Empty implementation\n */\n NullViewportScroller.prototype.setHistoryScrollRestoration = function (scrollRestoration) { };\n return NullViewportScroller;\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\nexport { APP_BASE_HREF, AsyncPipe, CommonModule, CurrencyPipe, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, formatCurrency, formatDate, formatNumber, formatPercent, getCurrencySymbol, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleDirection, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleFirstDayOfWeek, getLocaleId, getLocaleMonthNames, getLocaleNumberFormat, getLocaleNumberSymbol, getLocalePluralCase, getLocaleTimeFormat, getLocaleWeekEndRange, getNumberOfCurrencyDigits, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi, registerLocaleData, BrowserPlatformLocation as ɵBrowserPlatformLocation, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, useBrowserPlatformLocation as ɵangular_packages_common_common_a, createBrowserPlatformLocation as ɵangular_packages_common_common_b, createLocation as ɵangular_packages_common_common_c, provideLocationStrategy as ɵangular_packages_common_common_d, COMMON_DIRECTIVES as ɵangular_packages_common_common_e, COMMON_PIPES as ɵangular_packages_common_common_f, getDOM as ɵgetDOM, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };\n\n//# sourceMappingURL=common.js.map","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function filter(predicate, thisArg) {\n return function filterOperatorFunction(source) {\n return source.lift(new FilterOperator(predicate, thisArg));\n };\n}\nvar FilterOperator = /*@__PURE__*/ (function () {\n function FilterOperator(predicate, thisArg) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n }\n FilterOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n };\n return FilterOperator;\n}());\nvar FilterSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(FilterSubscriber, _super);\n function FilterSubscriber(destination, predicate, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.thisArg = thisArg;\n _this.count = 0;\n return _this;\n }\n FilterSubscriber.prototype._next = function (value) {\n var result;\n try {\n result = this.predicate.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n this.destination.next(value);\n }\n };\n return FilterSubscriber;\n}(Subscriber));\n//# sourceMappingURL=filter.js.map\n","/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */\nimport { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar ArgumentOutOfRangeErrorImpl = /*@__PURE__*/ (function () {\n function ArgumentOutOfRangeErrorImpl() {\n Error.call(this);\n this.message = 'argument out of range';\n this.name = 'ArgumentOutOfRangeError';\n return this;\n }\n ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n return ArgumentOutOfRangeErrorImpl;\n})();\nexport var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;\n//# sourceMappingURL=ArgumentOutOfRangeError.js.map\n","// canvas-confetti v1.3.0 built on 2020-09-26T17:55:06.231Z\nvar module = {};\n\n// source content\n(function main(global, module, isWorker, workerSize) {\n var canUseWorker = !!(\n global.Worker &&\n global.Blob &&\n global.Promise &&\n global.OffscreenCanvas &&\n global.HTMLCanvasElement &&\n global.HTMLCanvasElement.prototype.transferControlToOffscreen &&\n global.URL &&\n global.URL.createObjectURL);\n\n function noop() {}\n\n // create a promise if it exists, otherwise, just\n // call the function directly\n function promise(func) {\n var ModulePromise = module.exports.Promise;\n var Prom = ModulePromise !== void 0 ? ModulePromise : global.Promise;\n\n if (typeof Prom === 'function') {\n return new Prom(func);\n }\n\n func(noop, noop);\n\n return null;\n }\n\n var raf = (function () {\n var TIME = Math.floor(1000 / 60);\n var frame, cancel;\n var frames = {};\n var lastFrameTime = 0;\n\n if (typeof requestAnimationFrame === 'function' && typeof cancelAnimationFrame === 'function') {\n frame = function (cb) {\n var id = Math.random();\n\n frames[id] = requestAnimationFrame(function onFrame(time) {\n if (lastFrameTime === time || lastFrameTime + TIME - 1 < time) {\n lastFrameTime = time;\n delete frames[id];\n\n cb();\n } else {\n frames[id] = requestAnimationFrame(onFrame);\n }\n });\n\n return id;\n };\n cancel = function (id) {\n if (frames[id]) {\n cancelAnimationFrame(frames[id]);\n }\n };\n } else {\n frame = function (cb) {\n return setTimeout(cb, TIME);\n };\n cancel = function (timer) {\n return clearTimeout(timer);\n };\n }\n\n return { frame: frame, cancel: cancel };\n }());\n\n var getWorker = (function () {\n var worker;\n var prom;\n var resolves = {};\n\n function decorate(worker) {\n function execute(options, callback) {\n worker.postMessage({ options: options || {}, callback: callback });\n }\n worker.init = function initWorker(canvas) {\n var offscreen = canvas.transferControlToOffscreen();\n worker.postMessage({ canvas: offscreen }, [offscreen]);\n };\n\n worker.fire = function fireWorker(options, size, done) {\n if (prom) {\n execute(options, null);\n return prom;\n }\n\n var id = Math.random().toString(36).slice(2);\n\n prom = promise(function (resolve) {\n function workerDone(msg) {\n if (msg.data.callback !== id) {\n return;\n }\n\n delete resolves[id];\n worker.removeEventListener('message', workerDone);\n\n prom = null;\n done();\n resolve();\n }\n\n worker.addEventListener('message', workerDone);\n execute(options, id);\n\n resolves[id] = workerDone.bind(null, { data: { callback: id }});\n });\n\n return prom;\n };\n\n worker.reset = function resetWorker() {\n worker.postMessage({ reset: true });\n\n for (var id in resolves) {\n resolves[id]();\n delete resolves[id];\n }\n };\n }\n\n return function () {\n if (worker) {\n return worker;\n }\n\n if (!isWorker && canUseWorker) {\n var code = [\n 'var CONFETTI, SIZE = {}, module = {};',\n '(' + main.toString() + ')(this, module, true, SIZE);',\n 'onmessage = function(msg) {',\n ' if (msg.data.options) {',\n ' CONFETTI(msg.data.options).then(function () {',\n ' if (msg.data.callback) {',\n ' postMessage({ callback: msg.data.callback });',\n ' }',\n ' });',\n ' } else if (msg.data.reset) {',\n ' CONFETTI.reset();',\n ' } else if (msg.data.resize) {',\n ' SIZE.width = msg.data.resize.width;',\n ' SIZE.height = msg.data.resize.height;',\n ' } else if (msg.data.canvas) {',\n ' SIZE.width = msg.data.canvas.width;',\n ' SIZE.height = msg.data.canvas.height;',\n ' CONFETTI = module.exports.create(msg.data.canvas);',\n ' }',\n '}',\n ].join('\\n');\n try {\n worker = new Worker(URL.createObjectURL(new Blob([code])));\n } catch (e) {\n // eslint-disable-next-line no-console\n typeof console !== undefined && typeof console.warn === 'function' ? console.warn('🎊 Could not load worker', e) : null;\n\n return null;\n }\n\n decorate(worker);\n }\n\n return worker;\n };\n })();\n\n var defaults = {\n particleCount: 50,\n angle: 90,\n spread: 45,\n startVelocity: 45,\n decay: 0.9,\n gravity: 1,\n ticks: 200,\n x: 0.5,\n y: 0.5,\n shapes: ['square', 'circle'],\n zIndex: 100,\n colors: [\n '#26ccff',\n '#a25afd',\n '#ff5e7e',\n '#88ff5a',\n '#fcff42',\n '#ffa62d',\n '#ff36ff'\n ],\n // probably should be true, but back-compat\n disableForReducedMotion: false,\n scalar: 1\n };\n\n function convert(val, transform) {\n return transform ? transform(val) : val;\n }\n\n function isOk(val) {\n return !(val === null || val === undefined);\n }\n\n function prop(options, name, transform) {\n return convert(\n options && isOk(options[name]) ? options[name] : defaults[name],\n transform\n );\n }\n\n function randomInt(min, max) {\n // [min, max)\n return Math.floor(Math.random() * (max - min)) + min;\n }\n\n function toDecimal(str) {\n return parseInt(str, 16);\n }\n\n function hexToRgb(str) {\n var val = String(str).replace(/[^0-9a-f]/gi, '');\n\n if (val.length < 6) {\n val = val[0]+val[0]+val[1]+val[1]+val[2]+val[2];\n }\n\n return {\n r: toDecimal(val.substring(0,2)),\n g: toDecimal(val.substring(2,4)),\n b: toDecimal(val.substring(4,6))\n };\n }\n\n function getOrigin(options) {\n var origin = prop(options, 'origin', Object);\n origin.x = prop(origin, 'x', Number);\n origin.y = prop(origin, 'y', Number);\n\n return origin;\n }\n\n function setCanvasWindowSize(canvas) {\n canvas.width = document.documentElement.clientWidth;\n canvas.height = document.documentElement.clientHeight;\n }\n\n function setCanvasRectSize(canvas) {\n var rect = canvas.getBoundingClientRect();\n canvas.width = rect.width;\n canvas.height = rect.height;\n }\n\n function getCanvas(zIndex) {\n var canvas = document.createElement('canvas');\n\n canvas.style.position = 'fixed';\n canvas.style.top = '0px';\n canvas.style.left = '0px';\n canvas.style.pointerEvents = 'none';\n canvas.style.zIndex = zIndex;\n\n return canvas;\n }\n\n function ellipse(context, x, y, radiusX, radiusY, rotation, startAngle, endAngle, antiClockwise) {\n context.save();\n context.translate(x, y);\n context.rotate(rotation);\n context.scale(radiusX, radiusY);\n context.arc(0, 0, 1, startAngle, endAngle, antiClockwise);\n context.restore();\n }\n\n function randomPhysics(opts) {\n var radAngle = opts.angle * (Math.PI / 180);\n var radSpread = opts.spread * (Math.PI / 180);\n\n return {\n x: opts.x,\n y: opts.y,\n wobble: Math.random() * 10,\n velocity: (opts.startVelocity * 0.5) + (Math.random() * opts.startVelocity),\n angle2D: -radAngle + ((0.5 * radSpread) - (Math.random() * radSpread)),\n tiltAngle: Math.random() * Math.PI,\n color: hexToRgb(opts.color),\n shape: opts.shape,\n tick: 0,\n totalTicks: opts.ticks,\n decay: opts.decay,\n random: Math.random() + 5,\n tiltSin: 0,\n tiltCos: 0,\n wobbleX: 0,\n wobbleY: 0,\n gravity: opts.gravity * 3,\n ovalScalar: 0.6,\n scalar: opts.scalar\n };\n }\n\n function updateFetti(context, fetti) {\n fetti.x += Math.cos(fetti.angle2D) * fetti.velocity;\n fetti.y += Math.sin(fetti.angle2D) * fetti.velocity + fetti.gravity;\n fetti.wobble += 0.1;\n fetti.velocity *= fetti.decay;\n fetti.tiltAngle += 0.1;\n fetti.tiltSin = Math.sin(fetti.tiltAngle);\n fetti.tiltCos = Math.cos(fetti.tiltAngle);\n fetti.random = Math.random() + 5;\n fetti.wobbleX = fetti.x + ((10 * fetti.scalar) * Math.cos(fetti.wobble));\n fetti.wobbleY = fetti.y + ((10 * fetti.scalar) * Math.sin(fetti.wobble));\n\n var progress = (fetti.tick++) / fetti.totalTicks;\n\n var x1 = fetti.x + (fetti.random * fetti.tiltCos);\n var y1 = fetti.y + (fetti.random * fetti.tiltSin);\n var x2 = fetti.wobbleX + (fetti.random * fetti.tiltCos);\n var y2 = fetti.wobbleY + (fetti.random * fetti.tiltSin);\n\n context.fillStyle = 'rgba(' + fetti.color.r + ', ' + fetti.color.g + ', ' + fetti.color.b + ', ' + (1 - progress) + ')';\n context.beginPath();\n\n if (fetti.shape === 'circle') {\n context.ellipse ?\n context.ellipse(fetti.x, fetti.y, Math.abs(x2 - x1) * fetti.ovalScalar, Math.abs(y2 - y1) * fetti.ovalScalar, Math.PI / 10 * fetti.wobble, 0, 2 * Math.PI) :\n ellipse(context, fetti.x, fetti.y, Math.abs(x2 - x1) * fetti.ovalScalar, Math.abs(y2 - y1) * fetti.ovalScalar, Math.PI / 10 * fetti.wobble, 0, 2 * Math.PI);\n } else {\n context.moveTo(Math.floor(fetti.x), Math.floor(fetti.y));\n context.lineTo(Math.floor(fetti.wobbleX), Math.floor(y1));\n context.lineTo(Math.floor(x2), Math.floor(y2));\n context.lineTo(Math.floor(x1), Math.floor(fetti.wobbleY));\n }\n\n context.closePath();\n context.fill();\n\n return fetti.tick < fetti.totalTicks;\n }\n\n function animate(canvas, fettis, resizer, size, done) {\n var animatingFettis = fettis.slice();\n var context = canvas.getContext('2d');\n var animationFrame;\n var destroy;\n\n var prom = promise(function (resolve) {\n function onDone() {\n animationFrame = destroy = null;\n\n context.clearRect(0, 0, size.width, size.height);\n\n done();\n resolve();\n }\n\n function update() {\n if (isWorker && !(size.width === workerSize.width && size.height === workerSize.height)) {\n size.width = canvas.width = workerSize.width;\n size.height = canvas.height = workerSize.height;\n }\n\n if (!size.width && !size.height) {\n resizer(canvas);\n size.width = canvas.width;\n size.height = canvas.height;\n }\n\n context.clearRect(0, 0, size.width, size.height);\n\n animatingFettis = animatingFettis.filter(function (fetti) {\n return updateFetti(context, fetti);\n });\n\n if (animatingFettis.length) {\n animationFrame = raf.frame(update);\n } else {\n onDone();\n }\n }\n\n animationFrame = raf.frame(update);\n destroy = onDone;\n });\n\n return {\n addFettis: function (fettis) {\n animatingFettis = animatingFettis.concat(fettis);\n\n return prom;\n },\n canvas: canvas,\n promise: prom,\n reset: function () {\n if (animationFrame) {\n raf.cancel(animationFrame);\n }\n\n if (destroy) {\n destroy();\n }\n }\n };\n }\n\n function confettiCannon(canvas, globalOpts) {\n var isLibCanvas = !canvas;\n var allowResize = !!prop(globalOpts || {}, 'resize');\n var globalDisableForReducedMotion = prop(globalOpts, 'disableForReducedMotion', Boolean);\n var shouldUseWorker = canUseWorker && !!prop(globalOpts || {}, 'useWorker');\n var worker = shouldUseWorker ? getWorker() : null;\n var resizer = isLibCanvas ? setCanvasWindowSize : setCanvasRectSize;\n var initialized = (canvas && worker) ? !!canvas.__confetti_initialized : false;\n var preferLessMotion = typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion)').matches;\n var animationObj;\n\n function fireLocal(options, size, done) {\n var particleCount = prop(options, 'particleCount', Math.floor);\n var angle = prop(options, 'angle', Number);\n var spread = prop(options, 'spread', Number);\n var startVelocity = prop(options, 'startVelocity', Number);\n var decay = prop(options, 'decay', Number);\n var gravity = prop(options, 'gravity', Number);\n var colors = prop(options, 'colors');\n var ticks = prop(options, 'ticks', Number);\n var shapes = prop(options, 'shapes');\n var scalar = prop(options, 'scalar');\n var origin = getOrigin(options);\n\n var temp = particleCount;\n var fettis = [];\n\n var startX = canvas.width * origin.x;\n var startY = canvas.height * origin.y;\n\n while (temp--) {\n fettis.push(\n randomPhysics({\n x: startX,\n y: startY,\n angle: angle,\n spread: spread,\n startVelocity: startVelocity,\n color: colors[temp % colors.length],\n shape: shapes[randomInt(0, shapes.length)],\n ticks: ticks,\n decay: decay,\n gravity: gravity,\n scalar: scalar\n })\n );\n }\n\n // if we have a previous canvas already animating,\n // add to it\n if (animationObj) {\n return animationObj.addFettis(fettis);\n }\n\n animationObj = animate(canvas, fettis, resizer, size , done);\n\n return animationObj.promise;\n }\n\n function fire(options) {\n var disableForReducedMotion = globalDisableForReducedMotion || prop(options, 'disableForReducedMotion', Boolean);\n var zIndex = prop(options, 'zIndex', Number);\n\n if (disableForReducedMotion && preferLessMotion) {\n return promise(function (resolve) {\n resolve();\n });\n }\n\n if (isLibCanvas && animationObj) {\n // use existing canvas from in-progress animation\n canvas = animationObj.canvas;\n } else if (isLibCanvas && !canvas) {\n // create and initialize a new canvas\n canvas = getCanvas(zIndex);\n document.body.appendChild(canvas);\n }\n\n if (allowResize && !initialized) {\n // initialize the size of a user-supplied canvas\n resizer(canvas);\n }\n\n var size = {\n width: canvas.width,\n height: canvas.height\n };\n\n if (worker && !initialized) {\n worker.init(canvas);\n }\n\n initialized = true;\n\n if (worker) {\n canvas.__confetti_initialized = true;\n }\n\n function onResize() {\n if (worker) {\n // TODO this really shouldn't be immediate, because it is expensive\n var obj = {\n getBoundingClientRect: function () {\n if (!isLibCanvas) {\n return canvas.getBoundingClientRect();\n }\n }\n };\n\n resizer(obj);\n\n worker.postMessage({\n resize: {\n width: obj.width,\n height: obj.height\n }\n });\n return;\n }\n\n // don't actually query the size here, since this\n // can execute frequently and rapidly\n size.width = size.height = null;\n }\n\n function done() {\n animationObj = null;\n\n if (allowResize) {\n global.removeEventListener('resize', onResize);\n }\n\n if (isLibCanvas && canvas) {\n document.body.removeChild(canvas);\n canvas = null;\n initialized = false;\n }\n }\n\n if (allowResize) {\n global.addEventListener('resize', onResize, false);\n }\n\n if (worker) {\n return worker.fire(options, size, done);\n }\n\n return fireLocal(options, size, done);\n }\n\n fire.reset = function () {\n if (worker) {\n worker.reset();\n }\n\n if (animationObj) {\n animationObj.reset();\n }\n };\n\n return fire;\n }\n\n module.exports = confettiCannon(null, { useWorker: true, resize: true });\n module.exports.create = confettiCannon;\n}((function () {\n if (typeof window !== 'undefined') {\n return window;\n }\n\n if (typeof self !== 'undefined') {\n return self;\n }\n\n return this;\n})(), module, false));\n\n// end source content\n\nexport default module.exports;\nexport var create = module.exports.create;\n","/**\n * @license Angular v9.1.11\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { __spread, __read, __extends, __decorate, __metadata, __param } from 'tslib';\nimport { Injectable, InjectionToken, Inject, PLATFORM_ID, Injector, NgModule } from '@angular/core';\nimport { of, Observable } from 'rxjs';\nimport { concatMap, filter, map } from 'rxjs/operators';\nimport { DOCUMENT, ɵparseCookieValue } from '@angular/common';\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 * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a\n * `HttpResponse`.\n *\n * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the\n * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the\n * `HttpBackend`.\n *\n * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.\n *\n * @publicApi\n */\nimport * as ɵngcc0 from '@angular/core';\nvar HttpHandler = /** @class */ (function () {\n function HttpHandler() {\n }\n return HttpHandler;\n}());\n/**\n * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.\n *\n * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.\n *\n * When injected, `HttpBackend` dispatches requests directly to the backend, without going\n * through the interceptor chain.\n *\n * @publicApi\n */\nvar HttpBackend = /** @class */ (function () {\n function HttpBackend() {\n }\n return HttpBackend;\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 the header configuration options for an HTTP request.\n * Instances are immutable. Modifying methods return a cloned\n * instance with the change. The original object is never changed.\n *\n * @publicApi\n */\nvar HttpHeaders = /** @class */ (function () {\n /** Constructs a new HTTP header object with the given values.*/\n function HttpHeaders(headers) {\n var _this = this;\n /**\n * Internal map of lowercased header names to the normalized\n * form of the name (the form seen first).\n */\n this.normalizedNames = new Map();\n /**\n * Queued updates to be materialized the next initialization.\n */\n this.lazyUpdate = null;\n if (!headers) {\n this.headers = new Map();\n }\n else if (typeof headers === 'string') {\n this.lazyInit = function () {\n _this.headers = new Map();\n headers.split('\\n').forEach(function (line) {\n var index = line.indexOf(':');\n if (index > 0) {\n var name_1 = line.slice(0, index);\n var key = name_1.toLowerCase();\n var value = line.slice(index + 1).trim();\n _this.maybeSetNormalizedName(name_1, key);\n if (_this.headers.has(key)) {\n _this.headers.get(key).push(value);\n }\n else {\n _this.headers.set(key, [value]);\n }\n }\n });\n };\n }\n else {\n this.lazyInit = function () {\n _this.headers = new Map();\n Object.keys(headers).forEach(function (name) {\n var values = headers[name];\n var key = name.toLowerCase();\n if (typeof values === 'string') {\n values = [values];\n }\n if (values.length > 0) {\n _this.headers.set(key, values);\n _this.maybeSetNormalizedName(name, key);\n }\n });\n };\n }\n }\n /**\n * Checks for existence of a given header.\n *\n * @param name The header name to check for existence.\n *\n * @returns True if the header exists, false otherwise.\n */\n HttpHeaders.prototype.has = function (name) {\n this.init();\n return this.headers.has(name.toLowerCase());\n };\n /**\n * Retrieves the first value of a given header.\n *\n * @param name The header name.\n *\n * @returns The value string if the header exists, null otherwise\n */\n HttpHeaders.prototype.get = function (name) {\n this.init();\n var values = this.headers.get(name.toLowerCase());\n return values && values.length > 0 ? values[0] : null;\n };\n /**\n * Retrieves the names of the headers.\n *\n * @returns A list of header names.\n */\n HttpHeaders.prototype.keys = function () {\n this.init();\n return Array.from(this.normalizedNames.values());\n };\n /**\n * Retrieves a list of values for a given header.\n *\n * @param name The header name from which to retrieve values.\n *\n * @returns A string of values if the header exists, null otherwise.\n */\n HttpHeaders.prototype.getAll = function (name) {\n this.init();\n return this.headers.get(name.toLowerCase()) || null;\n };\n /**\n * Appends a new value to the existing set of values for a header\n * and returns them in a clone of the original instance.\n *\n * @param name The header name for which to append the values.\n * @param value The value to append.\n *\n * @returns A clone of the HTTP headers object with the value appended to the given header.\n */\n HttpHeaders.prototype.append = function (name, value) {\n return this.clone({ name: name, value: value, op: 'a' });\n };\n /**\n * Sets or modifies a value for a given header in a clone of the original instance.\n * If the header already exists, its value is replaced with the given value\n * in the returned object.\n *\n * @param name The header name.\n * @param value The value or values to set or overide for the given header.\n *\n * @returns A clone of the HTTP headers object with the newly set header value.\n */\n HttpHeaders.prototype.set = function (name, value) {\n return this.clone({ name: name, value: value, op: 's' });\n };\n /**\n * Deletes values for a given header in a clone of the original instance.\n *\n * @param name The header name.\n * @param value The value or values to delete for the given header.\n *\n * @returns A clone of the HTTP headers object with the given value deleted.\n */\n HttpHeaders.prototype.delete = function (name, value) {\n return this.clone({ name: name, value: value, op: 'd' });\n };\n HttpHeaders.prototype.maybeSetNormalizedName = function (name, lcName) {\n if (!this.normalizedNames.has(lcName)) {\n this.normalizedNames.set(lcName, name);\n }\n };\n HttpHeaders.prototype.init = function () {\n var _this = this;\n if (!!this.lazyInit) {\n if (this.lazyInit instanceof HttpHeaders) {\n this.copyFrom(this.lazyInit);\n }\n else {\n this.lazyInit();\n }\n this.lazyInit = null;\n if (!!this.lazyUpdate) {\n this.lazyUpdate.forEach(function (update) { return _this.applyUpdate(update); });\n this.lazyUpdate = null;\n }\n }\n };\n HttpHeaders.prototype.copyFrom = function (other) {\n var _this = this;\n other.init();\n Array.from(other.headers.keys()).forEach(function (key) {\n _this.headers.set(key, other.headers.get(key));\n _this.normalizedNames.set(key, other.normalizedNames.get(key));\n });\n };\n HttpHeaders.prototype.clone = function (update) {\n var clone = new HttpHeaders();\n clone.lazyInit =\n (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;\n clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);\n return clone;\n };\n HttpHeaders.prototype.applyUpdate = function (update) {\n var key = update.name.toLowerCase();\n switch (update.op) {\n case 'a':\n case 's':\n var value = update.value;\n if (typeof value === 'string') {\n value = [value];\n }\n if (value.length === 0) {\n return;\n }\n this.maybeSetNormalizedName(update.name, key);\n var base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];\n base.push.apply(base, __spread(value));\n this.headers.set(key, base);\n break;\n case 'd':\n var toDelete_1 = update.value;\n if (!toDelete_1) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n var existing = this.headers.get(key);\n if (!existing) {\n return;\n }\n existing = existing.filter(function (value) { return toDelete_1.indexOf(value) === -1; });\n if (existing.length === 0) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n this.headers.set(key, existing);\n }\n }\n break;\n }\n };\n /**\n * @internal\n */\n HttpHeaders.prototype.forEach = function (fn) {\n var _this = this;\n this.init();\n Array.from(this.normalizedNames.keys())\n .forEach(function (key) { return fn(_this.normalizedNames.get(key), _this.headers.get(key)); });\n };\n return HttpHeaders;\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 encoding and decoding of URL parameter and query-string values.\n *\n * Serializes and parses URL parameter keys and values to encode and decode them.\n * If you pass URL query parameters without encoding,\n * the query parameters can be misinterpreted at the receiving end.\n *\n *\n * @publicApi\n */\nvar HttpUrlEncodingCodec = /** @class */ (function () {\n function HttpUrlEncodingCodec() {\n }\n /**\n * Encodes a key name for a URL parameter or query-string.\n * @param key The key name.\n * @returns The encoded key name.\n */\n HttpUrlEncodingCodec.prototype.encodeKey = function (key) {\n return standardEncoding(key);\n };\n /**\n * Encodes the value of a URL parameter or query-string.\n * @param value The value.\n * @returns The encoded value.\n */\n HttpUrlEncodingCodec.prototype.encodeValue = function (value) {\n return standardEncoding(value);\n };\n /**\n * Decodes an encoded URL parameter or query-string key.\n * @param key The encoded key name.\n * @returns The decoded key name.\n */\n HttpUrlEncodingCodec.prototype.decodeKey = function (key) {\n return decodeURIComponent(key);\n };\n /**\n * Decodes an encoded URL parameter or query-string value.\n * @param value The encoded value.\n * @returns The decoded value.\n */\n HttpUrlEncodingCodec.prototype.decodeValue = function (value) {\n return decodeURIComponent(value);\n };\n return HttpUrlEncodingCodec;\n}());\nfunction paramParser(rawParams, codec) {\n var map = new Map();\n if (rawParams.length > 0) {\n var params = rawParams.split('&');\n params.forEach(function (param) {\n var eqIdx = param.indexOf('=');\n var _a = __read(eqIdx == -1 ?\n [codec.decodeKey(param), ''] :\n [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))], 2), key = _a[0], val = _a[1];\n var list = map.get(key) || [];\n list.push(val);\n map.set(key, list);\n });\n }\n return map;\n}\nfunction standardEncoding(v) {\n return encodeURIComponent(v)\n .replace(/%40/gi, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/gi, '$')\n .replace(/%2C/gi, ',')\n .replace(/%3B/gi, ';')\n .replace(/%2B/gi, '+')\n .replace(/%3D/gi, '=')\n .replace(/%3F/gi, '?')\n .replace(/%2F/gi, '/');\n}\n/**\n * An HTTP request/response body that represents serialized parameters,\n * per the MIME type `application/x-www-form-urlencoded`.\n *\n * This class is immutable; all mutation operations return a new instance.\n *\n * @publicApi\n */\nvar HttpParams = /** @class */ (function () {\n function HttpParams(options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n this.updates = null;\n this.cloneFrom = null;\n this.encoder = options.encoder || new HttpUrlEncodingCodec();\n if (!!options.fromString) {\n if (!!options.fromObject) {\n throw new Error(\"Cannot specify both fromString and fromObject.\");\n }\n this.map = paramParser(options.fromString, this.encoder);\n }\n else if (!!options.fromObject) {\n this.map = new Map();\n Object.keys(options.fromObject).forEach(function (key) {\n var value = options.fromObject[key];\n _this.map.set(key, Array.isArray(value) ? value : [value]);\n });\n }\n else {\n this.map = null;\n }\n }\n /**\n * Reports whether the body includes one or more values for a given parameter.\n * @param param The parameter name.\n * @returns True if the parameter has one or more values,\n * false if it has no value or is not present.\n */\n HttpParams.prototype.has = function (param) {\n this.init();\n return this.map.has(param);\n };\n /**\n * Retrieves the first value for a parameter.\n * @param param The parameter name.\n * @returns The first value of the given parameter,\n * or `null` if the parameter is not present.\n */\n HttpParams.prototype.get = function (param) {\n this.init();\n var res = this.map.get(param);\n return !!res ? res[0] : null;\n };\n /**\n * Retrieves all values for a parameter.\n * @param param The parameter name.\n * @returns All values in a string array,\n * or `null` if the parameter not present.\n */\n HttpParams.prototype.getAll = function (param) {\n this.init();\n return this.map.get(param) || null;\n };\n /**\n * Retrieves all the parameters for this body.\n * @returns The parameter names in a string array.\n */\n HttpParams.prototype.keys = function () {\n this.init();\n return Array.from(this.map.keys());\n };\n /**\n * Appends a new value to existing values for a parameter.\n * @param param The parameter name.\n * @param value The new value to add.\n * @return A new body with the appended value.\n */\n HttpParams.prototype.append = function (param, value) {\n return this.clone({ param: param, value: value, op: 'a' });\n };\n /**\n * Replaces the value for a parameter.\n * @param param The parameter name.\n * @param value The new value.\n * @return A new body with the new value.\n */\n HttpParams.prototype.set = function (param, value) {\n return this.clone({ param: param, value: value, op: 's' });\n };\n /**\n * Removes a given value or all values from a parameter.\n * @param param The parameter name.\n * @param value The value to remove, if provided.\n * @return A new body with the given value removed, or with all values\n * removed if no value is specified.\n */\n HttpParams.prototype.delete = function (param, value) {\n return this.clone({ param: param, value: value, op: 'd' });\n };\n /**\n * Serializes the body to an encoded string, where key-value pairs (separated by `=`) are\n * separated by `&`s.\n */\n HttpParams.prototype.toString = function () {\n var _this = this;\n this.init();\n return this.keys()\n .map(function (key) {\n var eKey = _this.encoder.encodeKey(key);\n // `a: ['1']` produces `'a=1'`\n // `b: []` produces `''`\n // `c: ['1', '2']` produces `'c=1&c=2'`\n return _this.map.get(key).map(function (value) { return eKey + '=' + _this.encoder.encodeValue(value); })\n .join('&');\n })\n // filter out empty values because `b: []` produces `''`\n // which results in `a=1&&c=1&c=2` instead of `a=1&c=1&c=2` if we don't\n .filter(function (param) { return param !== ''; })\n .join('&');\n };\n HttpParams.prototype.clone = function (update) {\n var clone = new HttpParams({ encoder: this.encoder });\n clone.cloneFrom = this.cloneFrom || this;\n clone.updates = (this.updates || []).concat([update]);\n return clone;\n };\n HttpParams.prototype.init = function () {\n var _this = this;\n if (this.map === null) {\n this.map = new Map();\n }\n if (this.cloneFrom !== null) {\n this.cloneFrom.init();\n this.cloneFrom.keys().forEach(function (key) { return _this.map.set(key, _this.cloneFrom.map.get(key)); });\n this.updates.forEach(function (update) {\n switch (update.op) {\n case 'a':\n case 's':\n var base = (update.op === 'a' ? _this.map.get(update.param) : undefined) || [];\n base.push(update.value);\n _this.map.set(update.param, base);\n break;\n case 'd':\n if (update.value !== undefined) {\n var base_1 = _this.map.get(update.param) || [];\n var idx = base_1.indexOf(update.value);\n if (idx !== -1) {\n base_1.splice(idx, 1);\n }\n if (base_1.length > 0) {\n _this.map.set(update.param, base_1);\n }\n else {\n _this.map.delete(update.param);\n }\n }\n else {\n _this.map.delete(update.param);\n break;\n }\n }\n });\n this.cloneFrom = this.updates = null;\n }\n };\n return HttpParams;\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 whether the given HTTP method may include a body.\n */\nfunction mightHaveBody(method) {\n switch (method) {\n case 'DELETE':\n case 'GET':\n case 'HEAD':\n case 'OPTIONS':\n case 'JSONP':\n return false;\n default:\n return true;\n }\n}\n/**\n * Safely assert whether the given value is an ArrayBuffer.\n *\n * In some execution environments ArrayBuffer is not defined.\n */\nfunction isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}\n/**\n * Safely assert whether the given value is a Blob.\n *\n * In some execution environments Blob is not defined.\n */\nfunction isBlob(value) {\n return typeof Blob !== 'undefined' && value instanceof Blob;\n}\n/**\n * Safely assert whether the given value is a FormData instance.\n *\n * In some execution environments FormData is not defined.\n */\nfunction isFormData(value) {\n return typeof FormData !== 'undefined' && value instanceof FormData;\n}\n/**\n * An outgoing HTTP request with an optional typed body.\n *\n * `HttpRequest` represents an outgoing request, including URL, method,\n * headers, body, and other request configuration options. Instances should be\n * assumed to be immutable. To modify a `HttpRequest`, the `clone`\n * method should be used.\n *\n * @publicApi\n */\nvar HttpRequest = /** @class */ (function () {\n function HttpRequest(method, url, third, fourth) {\n this.url = url;\n /**\n * The request body, or `null` if one isn't set.\n *\n * Bodies are not enforced to be immutable, as they can include a reference to any\n * user-defined data type. However, interceptors should take care to preserve\n * idempotence by treating them as such.\n */\n this.body = null;\n /**\n * Whether this request should be made in a way that exposes progress events.\n *\n * Progress events are expensive (change detection runs on each event) and so\n * they should only be requested if the consumer intends to monitor them.\n */\n this.reportProgress = false;\n /**\n * Whether this request should be sent with outgoing credentials (cookies).\n */\n this.withCredentials = false;\n /**\n * The expected response type of the server.\n *\n * This is used to parse the response appropriately before returning it to\n * the requestee.\n */\n this.responseType = 'json';\n this.method = method.toUpperCase();\n // Next, need to figure out which argument holds the HttpRequestInit\n // options, if any.\n var options;\n // Check whether a body argument is expected. The only valid way to omit\n // the body argument is to use a known no-body method like GET.\n if (mightHaveBody(this.method) || !!fourth) {\n // Body is the third argument, options are the fourth.\n this.body = (third !== undefined) ? third : null;\n options = fourth;\n }\n else {\n // No body required, options are the third argument. The body stays null.\n options = third;\n }\n // If options have been passed, interpret them.\n if (options) {\n // Normalize reportProgress and withCredentials.\n this.reportProgress = !!options.reportProgress;\n this.withCredentials = !!options.withCredentials;\n // Override default response type of 'json' if one is provided.\n if (!!options.responseType) {\n this.responseType = options.responseType;\n }\n // Override headers if they're provided.\n if (!!options.headers) {\n this.headers = options.headers;\n }\n if (!!options.params) {\n this.params = options.params;\n }\n }\n // If no headers have been passed in, construct a new HttpHeaders instance.\n if (!this.headers) {\n this.headers = new HttpHeaders();\n }\n // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.\n if (!this.params) {\n this.params = new HttpParams();\n this.urlWithParams = url;\n }\n else {\n // Encode the parameters to a string in preparation for inclusion in the URL.\n var params = this.params.toString();\n if (params.length === 0) {\n // No parameters, the visible URL is just the URL given at creation time.\n this.urlWithParams = url;\n }\n else {\n // Does the URL already have query parameters? Look for '?'.\n var qIdx = url.indexOf('?');\n // There are 3 cases to handle:\n // 1) No existing parameters -> append '?' followed by params.\n // 2) '?' exists and is followed by existing query string ->\n // append '&' followed by params.\n // 3) '?' exists at the end of the url -> append params directly.\n // This basically amounts to determining the character, if any, with\n // which to join the URL and parameters.\n var sep = qIdx === -1 ? '?' : (qIdx < url.length - 1 ? '&' : '');\n this.urlWithParams = url + sep + params;\n }\n }\n }\n /**\n * Transform the free-form body into a serialized format suitable for\n * transmission to the server.\n */\n HttpRequest.prototype.serializeBody = function () {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n };\n /**\n * Examine the body and attempt to infer an appropriate MIME type\n * for it.\n *\n * If no such type can be inferred, this method will return `null`.\n */\n HttpRequest.prototype.detectContentTypeHeader = function () {\n // An empty body has no content type.\n if (this.body === null) {\n return null;\n }\n // FormData bodies rely on the browser's content type assignment.\n if (isFormData(this.body)) {\n return null;\n }\n // Blobs usually have their own content type. If it doesn't, then\n // no type can be inferred.\n if (isBlob(this.body)) {\n return this.body.type || null;\n }\n // Array buffers have unknown contents and thus no type can be inferred.\n if (isArrayBuffer(this.body)) {\n return null;\n }\n // Technically, strings could be a form of JSON data, but it's safe enough\n // to assume they're plain strings.\n if (typeof this.body === 'string') {\n return 'text/plain';\n }\n // `HttpUrlEncodedParams` has its own content-type.\n if (this.body instanceof HttpParams) {\n return 'application/x-www-form-urlencoded;charset=UTF-8';\n }\n // Arrays, objects, and numbers will be encoded as JSON.\n if (typeof this.body === 'object' || typeof this.body === 'number' ||\n Array.isArray(this.body)) {\n return 'application/json';\n }\n // No type could be inferred.\n return null;\n };\n HttpRequest.prototype.clone = function (update) {\n if (update === void 0) { update = {}; }\n // For method, url, and responseType, take the current value unless\n // it is overridden in the update hash.\n var method = update.method || this.method;\n var url = update.url || this.url;\n var responseType = update.responseType || this.responseType;\n // The body is somewhat special - a `null` value in update.body means\n // whatever current body is present is being overridden with an empty\n // body, whereas an `undefined` value in update.body implies no\n // override.\n var body = (update.body !== undefined) ? update.body : this.body;\n // Carefully handle the boolean options to differentiate between\n // `false` and `undefined` in the update args.\n var withCredentials = (update.withCredentials !== undefined) ? update.withCredentials : this.withCredentials;\n var reportProgress = (update.reportProgress !== undefined) ? update.reportProgress : this.reportProgress;\n // Headers and params may be appended to if `setHeaders` or\n // `setParams` are used.\n var headers = update.headers || this.headers;\n var params = update.params || this.params;\n // Check whether the caller has asked to add headers.\n if (update.setHeaders !== undefined) {\n // Set every requested header.\n headers =\n Object.keys(update.setHeaders)\n .reduce(function (headers, name) { return headers.set(name, update.setHeaders[name]); }, headers);\n }\n // Check whether the caller has asked to set params.\n if (update.setParams) {\n // Set every requested param.\n params = Object.keys(update.setParams)\n .reduce(function (params, param) { return params.set(param, update.setParams[param]); }, params);\n }\n // Finally, construct the new HttpRequest using the pieces from above.\n return new HttpRequest(method, url, body, {\n params: params,\n headers: headers,\n reportProgress: reportProgress,\n responseType: responseType,\n withCredentials: withCredentials,\n });\n };\n return HttpRequest;\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 * Type enumeration for the different kinds of `HttpEvent`.\n *\n * @publicApi\n */\nvar HttpEventType;\n(function (HttpEventType) {\n /**\n * The request was sent out over the wire.\n */\n HttpEventType[HttpEventType[\"Sent\"] = 0] = \"Sent\";\n /**\n * An upload progress event was received.\n */\n HttpEventType[HttpEventType[\"UploadProgress\"] = 1] = \"UploadProgress\";\n /**\n * The response status code and headers were received.\n */\n HttpEventType[HttpEventType[\"ResponseHeader\"] = 2] = \"ResponseHeader\";\n /**\n * A download progress event was received.\n */\n HttpEventType[HttpEventType[\"DownloadProgress\"] = 3] = \"DownloadProgress\";\n /**\n * The full response including the body was received.\n */\n HttpEventType[HttpEventType[\"Response\"] = 4] = \"Response\";\n /**\n * A custom event from an interceptor or a backend.\n */\n HttpEventType[HttpEventType[\"User\"] = 5] = \"User\";\n})(HttpEventType || (HttpEventType = {}));\n/**\n * Base class for both `HttpResponse` and `HttpHeaderResponse`.\n *\n * @publicApi\n */\nvar HttpResponseBase = /** @class */ (function () {\n /**\n * Super-constructor for all responses.\n *\n * The single parameter accepted is an initialization hash. Any properties\n * of the response passed there will override the default values.\n */\n function HttpResponseBase(init, defaultStatus, defaultStatusText) {\n if (defaultStatus === void 0) { defaultStatus = 200; }\n if (defaultStatusText === void 0) { defaultStatusText = 'OK'; }\n // If the hash has values passed, use them to initialize the response.\n // Otherwise use the default values.\n this.headers = init.headers || new HttpHeaders();\n this.status = init.status !== undefined ? init.status : defaultStatus;\n this.statusText = init.statusText || defaultStatusText;\n this.url = init.url || null;\n // Cache the ok value to avoid defining a getter.\n this.ok = this.status >= 200 && this.status < 300;\n }\n return HttpResponseBase;\n}());\n/**\n * A partial HTTP response which only includes the status and header data,\n * but no response body.\n *\n * `HttpHeaderResponse` is a `HttpEvent` available on the response\n * event stream, only when progress events are requested.\n *\n * @publicApi\n */\nvar HttpHeaderResponse = /** @class */ (function (_super) {\n __extends(HttpHeaderResponse, _super);\n /**\n * Create a new `HttpHeaderResponse` with the given parameters.\n */\n function HttpHeaderResponse(init) {\n if (init === void 0) { init = {}; }\n var _this = _super.call(this, init) || this;\n _this.type = HttpEventType.ResponseHeader;\n return _this;\n }\n /**\n * Copy this `HttpHeaderResponse`, overriding its contents with the\n * given parameter hash.\n */\n HttpHeaderResponse.prototype.clone = function (update) {\n if (update === void 0) { update = {}; }\n // Perform a straightforward initialization of the new HttpHeaderResponse,\n // overriding the current parameters with new ones if given.\n return new HttpHeaderResponse({\n headers: update.headers || this.headers,\n status: update.status !== undefined ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n };\n return HttpHeaderResponse;\n}(HttpResponseBase));\n/**\n * A full HTTP response, including a typed response body (which may be `null`\n * if one was not returned).\n *\n * `HttpResponse` is a `HttpEvent` available on the response event\n * stream.\n *\n * @publicApi\n */\nvar HttpResponse = /** @class */ (function (_super) {\n __extends(HttpResponse, _super);\n /**\n * Construct a new `HttpResponse`.\n */\n function HttpResponse(init) {\n if (init === void 0) { init = {}; }\n var _this = _super.call(this, init) || this;\n _this.type = HttpEventType.Response;\n _this.body = init.body !== undefined ? init.body : null;\n return _this;\n }\n HttpResponse.prototype.clone = function (update) {\n if (update === void 0) { update = {}; }\n return new HttpResponse({\n body: (update.body !== undefined) ? update.body : this.body,\n headers: update.headers || this.headers,\n status: (update.status !== undefined) ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n };\n return HttpResponse;\n}(HttpResponseBase));\n/**\n * A response that represents an error or failure, either from a\n * non-successful HTTP status, an error while executing the request,\n * or some other failure which occurred during the parsing of the response.\n *\n * Any error returned on the `Observable` response stream will be\n * wrapped in an `HttpErrorResponse` to provide additional context about\n * the state of the HTTP layer when the error occurred. The error property\n * will contain either a wrapped Error object or the error response returned\n * from the server.\n *\n * @publicApi\n */\nvar HttpErrorResponse = /** @class */ (function (_super) {\n __extends(HttpErrorResponse, _super);\n function HttpErrorResponse(init) {\n var _this = \n // Initialize with a default status of 0 / Unknown Error.\n _super.call(this, init, 0, 'Unknown Error') || this;\n _this.name = 'HttpErrorResponse';\n /**\n * Errors are never okay, even when the status code is in the 2xx success range.\n */\n _this.ok = false;\n // If the response was successful, then this was a parse error. Otherwise, it was\n // a protocol-level failure of some sort. Either the request failed in transit\n // or the server returned an unsuccessful status code.\n if (_this.status >= 200 && _this.status < 300) {\n _this.message = \"Http failure during parsing for \" + (init.url || '(unknown url)');\n }\n else {\n _this.message = \"Http failure response for \" + (init.url || '(unknown url)') + \": \" + init.status + \" \" + init.statusText;\n }\n _this.error = init.error || null;\n return _this;\n }\n return HttpErrorResponse;\n}(HttpResponseBase));\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 * Constructs an instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and\n * the given `body`. This function clones the object and adds the body.\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n *\n */\nfunction addBody(options, body) {\n return {\n body: body,\n headers: options.headers,\n observe: options.observe,\n params: options.params,\n reportProgress: options.reportProgress,\n responseType: options.responseType,\n withCredentials: options.withCredentials,\n };\n}\n/**\n * Performs HTTP requests.\n * This service is available as an injectable class, with methods to perform HTTP requests.\n * Each request method has multiple signatures, and the return type varies based on\n * the signature that is called (mainly the values of `observe` and `responseType`).\n *\n * Note that the `responseType` *options* value is a String that identifies the\n * single data type of the response.\n * A single overload version of the method handles each response type.\n * The value of `responseType` cannot be a union, as the combined signature could imply.\n\n *\n * @usageNotes\n * Sample HTTP requests for the [Tour of Heroes](/tutorial/toh-pt0) application.\n *\n * ### HTTP Request Example\n *\n * ```\n * // GET heroes whose name contains search term\n * searchHeroes(term: string): observable<Hero[]>{\n *\n * const params = new HttpParams({fromString: 'name=term'});\n * return this.httpClient.request('GET', this.heroesUrl, {responseType:'json', params});\n * }\n * ```\n * ### JSONP Example\n * ```\n * requestJsonp(url, callback = 'callback') {\n * return this.httpClient.jsonp(this.heroesURL, callback);\n * }\n * ```\n *\n * ### PATCH Example\n * ```\n * // PATCH one of the heroes' name\n * patchHero (id: number, heroName: string): Observable<{}> {\n * const url = `${this.heroesUrl}/${id}`; // PATCH api/heroes/42\n * return this.httpClient.patch(url, {name: heroName}, httpOptions)\n * .pipe(catchError(this.handleError('patchHero')));\n * }\n * ```\n *\n * @see [HTTP Guide](guide/http)\n *\n * @publicApi\n */\nvar HttpClient = /** @class */ (function () {\n function HttpClient(handler) {\n this.handler = handler;\n }\n /**\n * Constructs an observable for a generic HTTP request that, when subscribed,\n * fires the request through the chain of registered interceptors and on to the\n * server.\n *\n * You can pass an `HttpRequest` directly as the only parameter. In this case,\n * the call returns an observable of the raw `HttpEvent` stream.\n *\n * Alternatively you can pass an HTTP method as the first parameter,\n * a URL string as the second, and an options hash containing the request body as the third.\n * See `addBody()`. In this case, the specified `responseType` and `observe` options determine the\n * type of returned observable.\n * * The `responseType` value determines how a successful response body is parsed.\n * * If `responseType` is the default `json`, you can pass a type interface for the resulting\n * object as a type parameter to the call.\n *\n * The `observe` value determines the return type, according to what you are interested in\n * observing.\n * * An `observe` value of events returns an observable of the raw `HttpEvent` stream, including\n * progress events by default.\n * * An `observe` value of response returns an observable of `HttpResponse<T>`,\n * where the `T` parameter depends on the `responseType` and any optionally provided type\n * parameter.\n * * An `observe` value of body returns an observable of `<T>` with the same `T` body type.\n *\n */\n HttpClient.prototype.request = function (first, url, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n var req;\n // First, check whether the primary argument is an instance of `HttpRequest`.\n if (first instanceof HttpRequest) {\n // It is. The other arguments must be undefined (per the signatures) and can be\n // ignored.\n req = first;\n }\n else {\n // It's a string, so it represents a URL. Construct a request based on it,\n // and incorporate the remaining arguments (assuming `GET` unless a method is\n // provided.\n // Figure out the headers.\n var headers = undefined;\n if (options.headers instanceof HttpHeaders) {\n headers = options.headers;\n }\n else {\n headers = new HttpHeaders(options.headers);\n }\n // Sort out parameters.\n var params = undefined;\n if (!!options.params) {\n if (options.params instanceof HttpParams) {\n params = options.params;\n }\n else {\n params = new HttpParams({ fromObject: options.params });\n }\n }\n // Construct the request.\n req = new HttpRequest(first, url, (options.body !== undefined ? options.body : null), {\n headers: headers,\n params: params,\n reportProgress: options.reportProgress,\n // By default, JSON is assumed to be returned for all calls.\n responseType: options.responseType || 'json',\n withCredentials: options.withCredentials,\n });\n }\n // Start with an Observable.of() the initial request, and run the handler (which\n // includes all interceptors) inside a concatMap(). This way, the handler runs\n // inside an Observable chain, which causes interceptors to be re-run on every\n // subscription (this also makes retries re-run the handler, including interceptors).\n var events$ = of(req).pipe(concatMap(function (req) { return _this.handler.handle(req); }));\n // If coming via the API signature which accepts a previously constructed HttpRequest,\n // the only option is to get the event stream. Otherwise, return the event stream if\n // that is what was requested.\n if (first instanceof HttpRequest || options.observe === 'events') {\n return events$;\n }\n // The requested stream contains either the full response or the body. In either\n // case, the first step is to filter the event stream to extract a stream of\n // responses(s).\n var res$ = events$.pipe(filter(function (event) { return event instanceof HttpResponse; }));\n // Decide which stream to return.\n switch (options.observe || 'body') {\n case 'body':\n // The requested stream is the body. Map the response stream to the response\n // body. This could be done more simply, but a misbehaving interceptor might\n // transform the response body into a different format and ignore the requested\n // responseType. Guard against this by validating that the response is of the\n // requested type.\n switch (req.responseType) {\n case 'arraybuffer':\n return res$.pipe(map(function (res) {\n // Validate that the body is an ArrayBuffer.\n if (res.body !== null && !(res.body instanceof ArrayBuffer)) {\n throw new Error('Response is not an ArrayBuffer.');\n }\n return res.body;\n }));\n case 'blob':\n return res$.pipe(map(function (res) {\n // Validate that the body is a Blob.\n if (res.body !== null && !(res.body instanceof Blob)) {\n throw new Error('Response is not a Blob.');\n }\n return res.body;\n }));\n case 'text':\n return res$.pipe(map(function (res) {\n // Validate that the body is a string.\n if (res.body !== null && typeof res.body !== 'string') {\n throw new Error('Response is not a string.');\n }\n return res.body;\n }));\n case 'json':\n default:\n // No validation needed for JSON responses, as they can be of any type.\n return res$.pipe(map(function (res) { return res.body; }));\n }\n case 'response':\n // The response stream was requested directly, so return it.\n return res$;\n default:\n // Guard against new future observe types being added.\n throw new Error(\"Unreachable: unhandled observe type \" + options.observe + \"}\");\n }\n };\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `DELETE` request to execute on the server. See the individual overloads for\n * details on the return type.\n *\n * @param url The endpoint URL.\n * @param options The HTTP options to send with the request.\n *\n */\n HttpClient.prototype.delete = function (url, options) {\n if (options === void 0) { options = {}; }\n return this.request('DELETE', url, options);\n };\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `GET` request to execute on the server. See the individual overloads for\n * details on the return type.\n */\n HttpClient.prototype.get = function (url, options) {\n if (options === void 0) { options = {}; }\n return this.request('GET', url, options);\n };\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `HEAD` request to execute on the server. The `HEAD` method returns\n * meta information about the resource without transferring the\n * resource itself. See the individual overloads for\n * details on the return type.\n */\n HttpClient.prototype.head = function (url, options) {\n if (options === void 0) { options = {}; }\n return this.request('HEAD', url, options);\n };\n /**\n * Constructs an `Observable` that, when subscribed, causes a request with the special method\n * `JSONP` to be dispatched via the interceptor pipeline.\n * The [JSONP pattern](https://en.wikipedia.org/wiki/JSONP) works around limitations of certain\n * API endpoints that don't support newer,\n * and preferable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) protocol.\n * JSONP treats the endpoint API as a JavaScript file and tricks the browser to process the\n * requests even if the API endpoint is not located on the same domain (origin) as the client-side\n * application making the request.\n * The endpoint API must support JSONP callback for JSONP requests to work.\n * The resource API returns the JSON response wrapped in a callback function.\n * You can pass the callback function name as one of the query parameters.\n * Note that JSONP requests can only be used with `GET` requests.\n *\n * @param url The resource URL.\n * @param callbackParam The callback function name.\n *\n */\n HttpClient.prototype.jsonp = function (url, callbackParam) {\n return this.request('JSONP', url, {\n params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),\n observe: 'body',\n responseType: 'json',\n });\n };\n /**\n * Constructs an `Observable` that, when subscribed, causes the configured\n * `OPTIONS` request to execute on the server. This method allows the client\n * to determine the supported HTTP methods and other capabilites of an endpoint,\n * without implying a resource action. See the individual overloads for\n * details on the return type.\n */\n HttpClient.prototype.options = function (url, options) {\n if (options === void 0) { options = {}; }\n return this.request('OPTIONS', url, options);\n };\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `PATCH` request to execute on the server. See the individual overloads for\n * details on the return type.\n */\n HttpClient.prototype.patch = function (url, body, options) {\n if (options === void 0) { options = {}; }\n return this.request('PATCH', url, addBody(options, body));\n };\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `POST` request to execute on the server. The server responds with the location of\n * the replaced resource. See the individual overloads for\n * details on the return type.\n */\n HttpClient.prototype.post = function (url, body, options) {\n if (options === void 0) { options = {}; }\n return this.request('POST', url, addBody(options, body));\n };\n /**\n * Constructs an observable that, when subscribed, causes the configured\n * `PUT` request to execute on the server. The `PUT` method replaces an existing resource\n * with a new set of values.\n * See the individual overloads for details on the return type.\n */\n HttpClient.prototype.put = function (url, body, options) {\n if (options === void 0) { options = {}; }\n return this.request('PUT', url, addBody(options, body));\n };\n HttpClient = __decorate([ __metadata(\"design:paramtypes\", [HttpHandler])\n ], HttpClient);\nHttpClient.ɵfac = function HttpClient_Factory(t) { return new (t || HttpClient)(ɵngcc0.ɵɵinject(HttpHandler)); };\nHttpClient.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: HttpClient, factory: function (t) { return HttpClient.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(HttpClient, [{\n type: Injectable\n }], function () { return [{ type: HttpHandler }]; }, null); })();\n return HttpClient;\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 * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.\n *\n *\n */\nvar HttpInterceptorHandler = /** @class */ (function () {\n function HttpInterceptorHandler(next, interceptor) {\n this.next = next;\n this.interceptor = interceptor;\n }\n HttpInterceptorHandler.prototype.handle = function (req) {\n return this.interceptor.intercept(req, this.next);\n };\n return HttpInterceptorHandler;\n}());\n/**\n * A multi-provider token that represents the array of registered\n * `HttpInterceptor` objects.\n *\n * @publicApi\n */\nvar HTTP_INTERCEPTORS = new InjectionToken('HTTP_INTERCEPTORS');\nvar NoopInterceptor = /** @class */ (function () {\n function NoopInterceptor() {\n }\n NoopInterceptor.prototype.intercept = function (req, next) {\n return next.handle(req);\n };\nNoopInterceptor.ɵfac = function NoopInterceptor_Factory(t) { return new (t || NoopInterceptor)(); };\nNoopInterceptor.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: NoopInterceptor, factory: function (t) { return NoopInterceptor.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(NoopInterceptor, [{\n type: Injectable\n }], function () { return []; }, null); })();\n return NoopInterceptor;\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// Every request made through JSONP needs a callback name that's unique across the\n// whole page. Each request is assigned an id and the callback name is constructed\n// from that. The next id to be assigned is tracked in a global variable here that\n// is shared among all applications on the page.\nvar nextRequestId = 0;\n// Error text given when a JSONP script is injected, but doesn't invoke the callback\n// passed in its URL.\nvar JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';\n// Error text given when a request is passed to the JsonpClientBackend that doesn't\n// have a request method JSONP.\nvar JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.';\nvar JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.';\n/**\n * DI token/abstract type representing a map of JSONP callbacks.\n *\n * In the browser, this should always be the `window` object.\n *\n *\n */\nvar JsonpCallbackContext = /** @class */ (function () {\n function JsonpCallbackContext() {\n }\n return JsonpCallbackContext;\n}());\n/**\n * Processes an `HttpRequest` with the JSONP method,\n * by performing JSONP style requests.\n * @see `HttpHandler`\n * @see `HttpXhrBackend`\n *\n * @publicApi\n */\nvar JsonpClientBackend = /** @class */ (function () {\n function JsonpClientBackend(callbackMap, document) {\n this.callbackMap = callbackMap;\n this.document = document;\n }\n /**\n * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n */\n JsonpClientBackend.prototype.nextCallback = function () {\n return \"ng_jsonp_callback_\" + nextRequestId++;\n };\n /**\n * Processes a JSONP request and returns an event stream of the results.\n * @param req The request object.\n * @returns An observable of the response events.\n *\n */\n JsonpClientBackend.prototype.handle = function (req) {\n var _this = this;\n // Firstly, check both the method and response type. If either doesn't match\n // then the request was improperly routed here and cannot be handled.\n if (req.method !== 'JSONP') {\n throw new Error(JSONP_ERR_WRONG_METHOD);\n }\n else if (req.responseType !== 'json') {\n throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE);\n }\n // Everything else happens inside the Observable boundary.\n return new Observable(function (observer) {\n // The first step to make a request is to generate the callback name, and replace the\n // callback placeholder in the URL with the name. Care has to be taken here to ensure\n // a trailing &, if matched, gets inserted back into the URL in the correct place.\n var callback = _this.nextCallback();\n var url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, \"=\" + callback + \"$1\");\n // Construct the <script> tag and point it at the URL.\n var node = _this.document.createElement('script');\n node.src = url;\n // A JSONP request requires waiting for multiple callbacks. These variables\n // are closed over and track state across those callbacks.\n // The response object, if one has been received, or null otherwise.\n var body = null;\n // Whether the response callback has been called.\n var finished = false;\n // Whether the request has been cancelled (and thus any other callbacks)\n // should be ignored.\n var cancelled = false;\n // Set the response callback in this.callbackMap (which will be the window\n // object in the browser. The script being loaded via the <script> tag will\n // eventually call this callback.\n _this.callbackMap[callback] = function (data) {\n // Data has been received from the JSONP script. Firstly, delete this callback.\n delete _this.callbackMap[callback];\n // Next, make sure the request wasn't cancelled in the meantime.\n if (cancelled) {\n return;\n }\n // Set state to indicate data was received.\n body = data;\n finished = true;\n };\n // cleanup() is a utility closure that removes the <script> from the page and\n // the response callback from the window. This logic is used in both the\n // success, error, and cancellation paths, so it's extracted out for convenience.\n var cleanup = function () {\n // Remove the <script> tag if it's still on the page.\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n // Remove the response callback from the callbackMap (window object in the\n // browser).\n delete _this.callbackMap[callback];\n };\n // onLoad() is the success callback which runs after the response callback\n // if the JSONP script loads successfully. The event itself is unimportant.\n // If something went wrong, onLoad() may run without the response callback\n // having been invoked.\n var onLoad = function (event) {\n // Do nothing if the request has been cancelled.\n if (cancelled) {\n return;\n }\n // Cleanup the page.\n cleanup();\n // Check whether the response callback has run.\n if (!finished) {\n // It hasn't, something went wrong with the request. Return an error via\n // the Observable error path. All JSONP errors have status 0.\n observer.error(new HttpErrorResponse({\n url: url,\n status: 0,\n statusText: 'JSONP Error',\n error: new Error(JSONP_ERR_NO_CALLBACK),\n }));\n return;\n }\n // Success. body either contains the response body or null if none was\n // returned.\n observer.next(new HttpResponse({\n body: body,\n status: 200,\n statusText: 'OK',\n url: url,\n }));\n // Complete the stream, the response is over.\n observer.complete();\n };\n // onError() is the error callback, which runs if the script returned generates\n // a Javascript error. It emits the error via the Observable error channel as\n // a HttpErrorResponse.\n var onError = function (error) {\n // If the request was already cancelled, no need to emit anything.\n if (cancelled) {\n return;\n }\n cleanup();\n // Wrap the error in a HttpErrorResponse.\n observer.error(new HttpErrorResponse({\n error: error,\n status: 0,\n statusText: 'JSONP Error',\n url: url,\n }));\n };\n // Subscribe to both the success (load) and error events on the <script> tag,\n // and add it to the page.\n node.addEventListener('load', onLoad);\n node.addEventListener('error', onError);\n _this.document.body.appendChild(node);\n // The request has now been successfully sent.\n observer.next({ type: HttpEventType.Sent });\n // Cancellation handler.\n return function () {\n // Track the cancellation so event listeners won't do anything even if already scheduled.\n cancelled = true;\n // Remove the event listeners so they won't run if the events later fire.\n node.removeEventListener('load', onLoad);\n node.removeEventListener('error', onError);\n // And finally, clean up the page.\n cleanup();\n };\n });\n };\n JsonpClientBackend = __decorate([ __param(1, Inject(DOCUMENT)),\n __metadata(\"design:paramtypes\", [JsonpCallbackContext, Object])\n ], JsonpClientBackend);\nJsonpClientBackend.ɵfac = function JsonpClientBackend_Factory(t) { return new (t || JsonpClientBackend)(ɵngcc0.ɵɵinject(JsonpCallbackContext), ɵngcc0.ɵɵinject(DOCUMENT)); };\nJsonpClientBackend.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: JsonpClientBackend, factory: function (t) { return JsonpClientBackend.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(JsonpClientBackend, [{\n type: Injectable\n }], function () { return [{ type: JsonpCallbackContext }, { type: Object, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }]; }, null); })();\n return JsonpClientBackend;\n}());\n/**\n * Identifies requests with the method JSONP and\n * shifts them to the `JsonpClientBackend`.\n *\n * @see `HttpInterceptor`\n *\n * @publicApi\n */\nvar JsonpInterceptor = /** @class */ (function () {\n function JsonpInterceptor(jsonp) {\n this.jsonp = jsonp;\n }\n /**\n * Identifies and handles a given JSONP request.\n * @param req The outgoing request object to handle.\n * @param next The next interceptor in the chain, or the backend\n * if no interceptors remain in the chain.\n * @returns An observable of the event stream.\n */\n JsonpInterceptor.prototype.intercept = function (req, next) {\n if (req.method === 'JSONP') {\n return this.jsonp.handle(req);\n }\n // Fall through for normal HTTP requests.\n return next.handle(req);\n };\n JsonpInterceptor = __decorate([ __metadata(\"design:paramtypes\", [JsonpClientBackend])\n ], JsonpInterceptor);\nJsonpInterceptor.ɵfac = function JsonpInterceptor_Factory(t) { return new (t || JsonpInterceptor)(ɵngcc0.ɵɵinject(JsonpClientBackend)); };\nJsonpInterceptor.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: JsonpInterceptor, factory: function (t) { return JsonpInterceptor.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(JsonpInterceptor, [{\n type: Injectable\n }], function () { return [{ type: JsonpClientBackend }]; }, null); })();\n return JsonpInterceptor;\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 */\nvar XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n/**\n * Determine an appropriate URL for the response, by checking either\n * XMLHttpRequest.responseURL or the X-Request-URL header.\n */\nfunction getResponseUrl(xhr) {\n if ('responseURL' in xhr && xhr.responseURL) {\n return xhr.responseURL;\n }\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL');\n }\n return null;\n}\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n */\nvar XhrFactory = /** @class */ (function () {\n function XhrFactory() {\n }\n return XhrFactory;\n}());\n/**\n * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.\n *\n */\nvar BrowserXhr = /** @class */ (function () {\n function BrowserXhr() {\n }\n BrowserXhr.prototype.build = function () {\n return (new XMLHttpRequest());\n };\n BrowserXhr = __decorate([ __metadata(\"design:paramtypes\", [])\n ], BrowserXhr);\nBrowserXhr.ɵfac = function BrowserXhr_Factory(t) { return new (t || BrowserXhr)(); };\nBrowserXhr.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: BrowserXhr, factory: function (t) { return BrowserXhr.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(BrowserXhr, [{\n type: Injectable\n }], function () { return []; }, null); })();\n return BrowserXhr;\n}());\n/**\n * Uses `XMLHttpRequest` to send requests to a backend server.\n * @see `HttpHandler`\n * @see `JsonpClientBackend`\n *\n * @publicApi\n */\nvar HttpXhrBackend = /** @class */ (function () {\n function HttpXhrBackend(xhrFactory) {\n this.xhrFactory = xhrFactory;\n }\n /**\n * Processes a request and returns a stream of response events.\n * @param req The request object.\n * @returns An observable of the response events.\n */\n HttpXhrBackend.prototype.handle = function (req) {\n var _this = this;\n // Quick check to give a better error message when a user attempts to use\n // HttpClient.jsonp() without installing the JsonpClientModule\n if (req.method === 'JSONP') {\n throw new Error(\"Attempted to construct Jsonp request without JsonpClientModule installed.\");\n }\n // Everything happens on Observable subscription.\n return new Observable(function (observer) {\n // Start by setting up the XHR object with request method, URL, and withCredentials flag.\n var xhr = _this.xhrFactory.build();\n xhr.open(req.method, req.urlWithParams);\n if (!!req.withCredentials) {\n xhr.withCredentials = true;\n }\n // Add all the requested headers.\n req.headers.forEach(function (name, values) { return xhr.setRequestHeader(name, values.join(',')); });\n // Add an Accept header if one isn't present already.\n if (!req.headers.has('Accept')) {\n xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');\n }\n // Auto-detect the Content-Type header if one isn't present already.\n if (!req.headers.has('Content-Type')) {\n var detectedType = req.detectContentTypeHeader();\n // Sometimes Content-Type detection fails.\n if (detectedType !== null) {\n xhr.setRequestHeader('Content-Type', detectedType);\n }\n }\n // Set the responseType if one was requested.\n if (req.responseType) {\n var responseType = req.responseType.toLowerCase();\n // JSON responses need to be processed as text. This is because if the server\n // returns an XSSI-prefixed JSON response, the browser will fail to parse it,\n // xhr.response will be null, and xhr.responseText cannot be accessed to\n // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON\n // is parsed by first requesting text and then applying JSON.parse.\n xhr.responseType = ((responseType !== 'json') ? responseType : 'text');\n }\n // Serialize the request body if one is present. If not, this will be set to null.\n var reqBody = req.serializeBody();\n // If progress events are enabled, response headers will be delivered\n // in two events - the HttpHeaderResponse event and the full HttpResponse\n // event. However, since response headers don't change in between these\n // two events, it doesn't make sense to parse them twice. So headerResponse\n // caches the data extracted from the response whenever it's first parsed,\n // to ensure parsing isn't duplicated.\n var headerResponse = null;\n // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest\n // state, and memoizes it into headerResponse.\n var partialFromXhr = function () {\n if (headerResponse !== null) {\n return headerResponse;\n }\n // Read status and normalize an IE9 bug (http://bugs.jquery.com/ticket/1450).\n var status = xhr.status === 1223 ? 204 : xhr.status;\n var statusText = xhr.statusText || 'OK';\n // Parse headers from XMLHttpRequest - this step is lazy.\n var headers = new HttpHeaders(xhr.getAllResponseHeaders());\n // Read the response URL from the XMLHttpResponse instance and fall back on the\n // request URL.\n var url = getResponseUrl(xhr) || req.url;\n // Construct the HttpHeaderResponse and memoize it.\n headerResponse = new HttpHeaderResponse({ headers: headers, status: status, statusText: statusText, url: url });\n return headerResponse;\n };\n // Next, a few closures are defined for the various events which XMLHttpRequest can\n // emit. This allows them to be unregistered as event listeners later.\n // First up is the load event, which represents a response being fully available.\n var onLoad = function () {\n // Read response state from the memoized partial data.\n var _a = partialFromXhr(), headers = _a.headers, status = _a.status, statusText = _a.statusText, url = _a.url;\n // The body will be read out if present.\n var body = null;\n if (status !== 204) {\n // Use XMLHttpRequest.response if set, responseText otherwise.\n body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response;\n }\n // Normalize another potential bug (this one comes from CORS).\n if (status === 0) {\n status = !!body ? 200 : 0;\n }\n // ok determines whether the response will be transmitted on the event or\n // error channel. Unsuccessful status codes (not 2xx) will always be errors,\n // but a successful status code can still result in an error if the user\n // asked for JSON data and the body cannot be parsed as such.\n var ok = status >= 200 && status < 300;\n // Check whether the body needs to be parsed as JSON (in many cases the browser\n // will have done that already).\n if (req.responseType === 'json' && typeof body === 'string') {\n // Save the original body, before attempting XSSI prefix stripping.\n var originalBody = body;\n body = body.replace(XSSI_PREFIX, '');\n try {\n // Attempt the parse. If it fails, a parse error should be delivered to the user.\n body = body !== '' ? JSON.parse(body) : null;\n }\n catch (error) {\n // Since the JSON.parse failed, it's reasonable to assume this might not have been a\n // JSON response. Restore the original body (including any XSSI prefix) to deliver\n // a better error response.\n body = originalBody;\n // If this was an error request to begin with, leave it as a string, it probably\n // just isn't JSON. Otherwise, deliver the parsing error to the user.\n if (ok) {\n // Even though the response status was 2xx, this is still an error.\n ok = false;\n // The parse error contains the text of the body that failed to parse.\n body = { error: error, text: body };\n }\n }\n }\n if (ok) {\n // A successful response is delivered on the event stream.\n observer.next(new HttpResponse({\n body: body,\n headers: headers,\n status: status,\n statusText: statusText,\n url: url || undefined,\n }));\n // The full body has been received and delivered, no further events\n // are possible. This request is complete.\n observer.complete();\n }\n else {\n // An unsuccessful request is delivered on the error channel.\n observer.error(new HttpErrorResponse({\n // The error in this case is the response body (error from the server).\n error: body,\n headers: headers,\n status: status,\n statusText: statusText,\n url: url || undefined,\n }));\n }\n };\n // The onError callback is called when something goes wrong at the network level.\n // Connection timeout, DNS error, offline, etc. These are actual errors, and are\n // transmitted on the error channel.\n var onError = function (error) {\n var url = partialFromXhr().url;\n var res = new HttpErrorResponse({\n error: error,\n status: xhr.status || 0,\n statusText: xhr.statusText || 'Unknown Error',\n url: url || undefined,\n });\n observer.error(res);\n };\n // The sentHeaders flag tracks whether the HttpResponseHeaders event\n // has been sent on the stream. This is necessary to track if progress\n // is enabled since the event will be sent on only the first download\n // progerss event.\n var sentHeaders = false;\n // The download progress event handler, which is only registered if\n // progress events are enabled.\n var onDownProgress = function (event) {\n // Send the HttpResponseHeaders event if it hasn't been sent already.\n if (!sentHeaders) {\n observer.next(partialFromXhr());\n sentHeaders = true;\n }\n // Start building the download progress event to deliver on the response\n // event stream.\n var progressEvent = {\n type: HttpEventType.DownloadProgress,\n loaded: event.loaded,\n };\n // Set the total number of bytes in the event if it's available.\n if (event.lengthComputable) {\n progressEvent.total = event.total;\n }\n // If the request was for text content and a partial response is\n // available on XMLHttpRequest, include it in the progress event\n // to allow for streaming reads.\n if (req.responseType === 'text' && !!xhr.responseText) {\n progressEvent.partialText = xhr.responseText;\n }\n // Finally, fire the event.\n observer.next(progressEvent);\n };\n // The upload progress event handler, which is only registered if\n // progress events are enabled.\n var onUpProgress = function (event) {\n // Upload progress events are simpler. Begin building the progress\n // event.\n var progress = {\n type: HttpEventType.UploadProgress,\n loaded: event.loaded,\n };\n // If the total number of bytes being uploaded is available, include\n // it.\n if (event.lengthComputable) {\n progress.total = event.total;\n }\n // Send the event.\n observer.next(progress);\n };\n // By default, register for load and error events.\n xhr.addEventListener('load', onLoad);\n xhr.addEventListener('error', onError);\n // Progress events are only enabled if requested.\n if (req.reportProgress) {\n // Download progress is always enabled if requested.\n xhr.addEventListener('progress', onDownProgress);\n // Upload progress depends on whether there is a body to upload.\n if (reqBody !== null && xhr.upload) {\n xhr.upload.addEventListener('progress', onUpProgress);\n }\n }\n // Fire the request, and notify the event stream that it was fired.\n xhr.send(reqBody);\n observer.next({ type: HttpEventType.Sent });\n // This is the return from the Observable function, which is the\n // request cancellation handler.\n return function () {\n // On a cancellation, remove all registered event listeners.\n xhr.removeEventListener('error', onError);\n xhr.removeEventListener('load', onLoad);\n if (req.reportProgress) {\n xhr.removeEventListener('progress', onDownProgress);\n if (reqBody !== null && xhr.upload) {\n xhr.upload.removeEventListener('progress', onUpProgress);\n }\n }\n // Finally, abort the in-flight request.\n xhr.abort();\n };\n });\n };\n HttpXhrBackend = __decorate([ __metadata(\"design:paramtypes\", [XhrFactory])\n ], HttpXhrBackend);\nHttpXhrBackend.ɵfac = function HttpXhrBackend_Factory(t) { return new (t || HttpXhrBackend)(ɵngcc0.ɵɵinject(XhrFactory)); };\nHttpXhrBackend.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: HttpXhrBackend, factory: function (t) { return HttpXhrBackend.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(HttpXhrBackend, [{\n type: Injectable\n }], function () { return [{ type: XhrFactory }]; }, null); })();\n return HttpXhrBackend;\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 */\nvar XSRF_COOKIE_NAME = new InjectionToken('XSRF_COOKIE_NAME');\nvar XSRF_HEADER_NAME = new InjectionToken('XSRF_HEADER_NAME');\n/**\n * Retrieves the current XSRF token to use with the next outgoing request.\n *\n * @publicApi\n */\nvar HttpXsrfTokenExtractor = /** @class */ (function () {\n function HttpXsrfTokenExtractor() {\n }\n return HttpXsrfTokenExtractor;\n}());\n/**\n * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.\n */\nvar HttpXsrfCookieExtractor = /** @class */ (function () {\n function HttpXsrfCookieExtractor(doc, platform, cookieName) {\n this.doc = doc;\n this.platform = platform;\n this.cookieName = cookieName;\n this.lastCookieString = '';\n this.lastToken = null;\n /**\n * @internal for testing\n */\n this.parseCount = 0;\n }\n HttpXsrfCookieExtractor.prototype.getToken = function () {\n if (this.platform === 'server') {\n return null;\n }\n var cookieString = this.doc.cookie || '';\n if (cookieString !== this.lastCookieString) {\n this.parseCount++;\n this.lastToken = ɵparseCookieValue(cookieString, this.cookieName);\n this.lastCookieString = cookieString;\n }\n return this.lastToken;\n };\n HttpXsrfCookieExtractor = __decorate([ __param(0, Inject(DOCUMENT)), __param(1, Inject(PLATFORM_ID)),\n __param(2, Inject(XSRF_COOKIE_NAME)),\n __metadata(\"design:paramtypes\", [Object, String, String])\n ], HttpXsrfCookieExtractor);\nHttpXsrfCookieExtractor.ɵfac = function HttpXsrfCookieExtractor_Factory(t) { return new (t || HttpXsrfCookieExtractor)(ɵngcc0.ɵɵinject(DOCUMENT), ɵngcc0.ɵɵinject(PLATFORM_ID), ɵngcc0.ɵɵinject(XSRF_COOKIE_NAME)); };\nHttpXsrfCookieExtractor.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: HttpXsrfCookieExtractor, factory: function (t) { return HttpXsrfCookieExtractor.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(HttpXsrfCookieExtractor, [{\n type: Injectable\n }], function () { return [{ type: Object, decorators: [{\n type: Inject,\n args: [DOCUMENT]\n }] }, { type: String, decorators: [{\n type: Inject,\n args: [PLATFORM_ID]\n }] }, { type: String, decorators: [{\n type: Inject,\n args: [XSRF_COOKIE_NAME]\n }] }]; }, null); })();\n return HttpXsrfCookieExtractor;\n}());\n/**\n * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.\n */\nvar HttpXsrfInterceptor = /** @class */ (function () {\n function HttpXsrfInterceptor(tokenService, headerName) {\n this.tokenService = tokenService;\n this.headerName = headerName;\n }\n HttpXsrfInterceptor.prototype.intercept = function (req, next) {\n var lcUrl = req.url.toLowerCase();\n // Skip both non-mutating requests and absolute URLs.\n // Non-mutating requests don't require a token, and absolute URLs require special handling\n // anyway as the cookie set\n // on our origin is not the same as the token expected by another origin.\n if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') ||\n lcUrl.startsWith('https://')) {\n return next.handle(req);\n }\n var token = this.tokenService.getToken();\n // Be careful not to overwrite an existing header of the same name.\n if (token !== null && !req.headers.has(this.headerName)) {\n req = req.clone({ headers: req.headers.set(this.headerName, token) });\n }\n return next.handle(req);\n };\n HttpXsrfInterceptor = __decorate([ __param(1, Inject(XSRF_HEADER_NAME)),\n __metadata(\"design:paramtypes\", [HttpXsrfTokenExtractor, String])\n ], HttpXsrfInterceptor);\nHttpXsrfInterceptor.ɵfac = function HttpXsrfInterceptor_Factory(t) { return new (t || HttpXsrfInterceptor)(ɵngcc0.ɵɵinject(HttpXsrfTokenExtractor), ɵngcc0.ɵɵinject(XSRF_HEADER_NAME)); };\nHttpXsrfInterceptor.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: HttpXsrfInterceptor, factory: function (t) { return HttpXsrfInterceptor.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(HttpXsrfInterceptor, [{\n type: Injectable\n }], function () { return [{ type: HttpXsrfTokenExtractor }, { type: String, decorators: [{\n type: Inject,\n args: [XSRF_HEADER_NAME]\n }] }]; }, null); })();\n return HttpXsrfInterceptor;\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 `HttpHandler` that applies multiple interceptors\n * to a request before passing it to the given `HttpBackend`.\n *\n * The interceptors are loaded lazily from the injector, to allow\n * interceptors to themselves inject classes depending indirectly\n * on `HttpInterceptingHandler` itself.\n * @see `HttpInterceptor`\n */\nvar HttpInterceptingHandler = /** @class */ (function () {\n function HttpInterceptingHandler(backend, injector) {\n this.backend = backend;\n this.injector = injector;\n this.chain = null;\n }\n HttpInterceptingHandler.prototype.handle = function (req) {\n if (this.chain === null) {\n var interceptors = this.injector.get(HTTP_INTERCEPTORS, []);\n this.chain = interceptors.reduceRight(function (next, interceptor) { return new HttpInterceptorHandler(next, interceptor); }, this.backend);\n }\n return this.chain.handle(req);\n };\n HttpInterceptingHandler = __decorate([ __metadata(\"design:paramtypes\", [HttpBackend, Injector])\n ], HttpInterceptingHandler);\nHttpInterceptingHandler.ɵfac = function HttpInterceptingHandler_Factory(t) { return new (t || HttpInterceptingHandler)(ɵngcc0.ɵɵinject(HttpBackend), ɵngcc0.ɵɵinject(ɵngcc0.Injector)); };\nHttpInterceptingHandler.ɵprov = ɵngcc0.ɵɵdefineInjectable({ token: HttpInterceptingHandler, factory: function (t) { return HttpInterceptingHandler.ɵfac(t); } });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(HttpInterceptingHandler, [{\n type: Injectable\n }], function () { return [{ type: HttpBackend }, { type: ɵngcc0.Injector }]; }, null); })();\n return HttpInterceptingHandler;\n}());\n/**\n * Constructs an `HttpHandler` that applies interceptors\n * to a request before passing it to the given `HttpBackend`.\n *\n * Use as a factory function within `HttpClientModule`.\n *\n *\n */\nfunction interceptingHandler(backend, interceptors) {\n if (interceptors === void 0) { interceptors = []; }\n if (!interceptors) {\n return backend;\n }\n return interceptors.reduceRight(function (next, interceptor) { return new HttpInterceptorHandler(next, interceptor); }, backend);\n}\n/**\n * Factory function that determines where to store JSONP callbacks.\n *\n * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist\n * in test environments. In that case, callbacks are stored on an anonymous object instead.\n *\n *\n */\nfunction jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}\n/**\n * Configures XSRF protection support for outgoing requests.\n *\n * For a server that supports a cookie-based XSRF protection system,\n * use directly to configure XSRF protection with the correct\n * cookie and header names.\n *\n * If no names are supplied, the default cookie name is `XSRF-TOKEN`\n * and the default header name is `X-XSRF-TOKEN`.\n *\n * @publicApi\n */\nvar HttpClientXsrfModule = /** @class */ (function () {\n function HttpClientXsrfModule() {\n }\n HttpClientXsrfModule_1 = HttpClientXsrfModule;\n /**\n * Disable the default XSRF protection.\n */\n HttpClientXsrfModule.disable = function () {\n return {\n ngModule: HttpClientXsrfModule_1,\n providers: [\n { provide: HttpXsrfInterceptor, useClass: NoopInterceptor },\n ],\n };\n };\n /**\n * Configure XSRF protection.\n * @param options An object that can specify either or both\n * cookie name or header name.\n * - Cookie name default is `XSRF-TOKEN`.\n * - Header name default is `X-XSRF-TOKEN`.\n *\n */\n HttpClientXsrfModule.withOptions = function (options) {\n if (options === void 0) { options = {}; }\n return {\n ngModule: HttpClientXsrfModule_1,\n providers: [\n options.cookieName ? { provide: XSRF_COOKIE_NAME, useValue: options.cookieName } : [],\n options.headerName ? { provide: XSRF_HEADER_NAME, useValue: options.headerName } : [],\n ],\n };\n };\n var HttpClientXsrfModule_1;\nHttpClientXsrfModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: HttpClientXsrfModule });\nHttpClientXsrfModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function HttpClientXsrfModule_Factory(t) { return new (t || HttpClientXsrfModule)(); }, providers: [\n HttpXsrfInterceptor,\n { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' },\n { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' },\n ] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(HttpClientXsrfModule, [{\n type: NgModule,\n args: [{\n providers: [\n HttpXsrfInterceptor,\n { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' },\n { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' },\n ]\n }]\n }], function () { return []; }, null); })();\n return HttpClientXsrfModule;\n}());\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for XSRF. Automatically imported by `HttpClientModule`.\n *\n * You can add interceptors to the chain behind `HttpClient` by binding them to the\n * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.\n *\n * @publicApi\n */\nvar HttpClientModule = /** @class */ (function () {\n function HttpClientModule() {\n }\nHttpClientModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: HttpClientModule });\nHttpClientModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function HttpClientModule_Factory(t) { return new (t || HttpClientModule)(); }, providers: [\n HttpClient,\n { provide: HttpHandler, useClass: HttpInterceptingHandler },\n HttpXhrBackend,\n { provide: HttpBackend, useExisting: HttpXhrBackend },\n BrowserXhr,\n { provide: XhrFactory, useExisting: BrowserXhr },\n ], imports: [[\n HttpClientXsrfModule.withOptions({\n cookieName: 'XSRF-TOKEN',\n headerName: 'X-XSRF-TOKEN'\n }),\n ]] });\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(HttpClientModule, { imports: [HttpClientXsrfModule] }); })();\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(HttpClientModule, [{\n type: NgModule,\n args: [{\n /**\n * Optional configuration for XSRF protection.\n */\n imports: [\n HttpClientXsrfModule.withOptions({\n cookieName: 'XSRF-TOKEN',\n headerName: 'X-XSRF-TOKEN'\n }),\n ],\n /**\n * Configures the [dependency injector](guide/glossary#injector) where it is imported\n * with supporting services for HTTP communications.\n */\n providers: [\n HttpClient,\n { provide: HttpHandler, useClass: HttpInterceptingHandler },\n HttpXhrBackend,\n { provide: HttpBackend, useExisting: HttpXhrBackend },\n BrowserXhr,\n { provide: XhrFactory, useExisting: BrowserXhr },\n ]\n }]\n }], function () { return []; }, null); })();\n return HttpClientModule;\n}());\n/**\n * Configures the [dependency injector](guide/glossary#injector) for `HttpClient`\n * with supporting services for JSONP.\n * Without this module, Jsonp requests reach the backend\n * with method JSONP, where they are rejected.\n *\n * You can add interceptors to the chain behind `HttpClient` by binding them to the\n * multiprovider for built-in [DI token](guide/glossary#di-token) `HTTP_INTERCEPTORS`.\n *\n * @publicApi\n */\nvar HttpClientJsonpModule = /** @class */ (function () {\n function HttpClientJsonpModule() {\n }\nHttpClientJsonpModule.ɵmod = ɵngcc0.ɵɵdefineNgModule({ type: HttpClientJsonpModule });\nHttpClientJsonpModule.ɵinj = ɵngcc0.ɵɵdefineInjector({ factory: function HttpClientJsonpModule_Factory(t) { return new (t || HttpClientJsonpModule)(); }, providers: [\n JsonpClientBackend,\n { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true },\n ] });\n/*@__PURE__*/ (function () { ɵngcc0.ɵsetClassMetadata(HttpClientJsonpModule, [{\n type: NgModule,\n args: [{\n providers: [\n JsonpClientBackend,\n { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true },\n ]\n }]\n }], function () { return []; }, null); })();\n return HttpClientJsonpModule;\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 * Generated bundle index. Do not edit.\n */\n\nexport { HTTP_INTERCEPTORS, HttpBackend, HttpClient, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpErrorResponse, HttpEventType, HttpHandler, HttpHeaderResponse, HttpHeaders, HttpParams, HttpRequest, HttpResponse, HttpResponseBase, HttpUrlEncodingCodec, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, XhrFactory, HttpInterceptingHandler as ɵHttpInterceptingHandler, NoopInterceptor as ɵangular_packages_common_http_http_a, JsonpCallbackContext as ɵangular_packages_common_http_http_b, jsonpCallbackContext as ɵangular_packages_common_http_http_c, BrowserXhr as ɵangular_packages_common_http_http_d, XSRF_COOKIE_NAME as ɵangular_packages_common_http_http_e, XSRF_HEADER_NAME as ɵangular_packages_common_http_http_f, HttpXsrfCookieExtractor as ɵangular_packages_common_http_http_g, HttpXsrfInterceptor as ɵangular_packages_common_http_http_h };\n\n//# sourceMappingURL=http.js.map","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar _enable_super_gross_mode_that_will_cause_bad_things = false;\nexport var config = {\n Promise: undefined,\n set useDeprecatedSynchronousErrorHandling(value) {\n if (value) {\n var error = /*@__PURE__*/ new Error();\n /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \\n' + error.stack);\n }\n else if (_enable_super_gross_mode_that_will_cause_bad_things) {\n /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');\n }\n _enable_super_gross_mode_that_will_cause_bad_things = value;\n },\n get useDeprecatedSynchronousErrorHandling() {\n return _enable_super_gross_mode_that_will_cause_bad_things;\n },\n};\n//# sourceMappingURL=config.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var isArray = /*@__PURE__*/ (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })();\n//# sourceMappingURL=isArray.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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\nexport 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\nexport 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\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport 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\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") 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 throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport 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\nexport 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}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isScheduler(value) {\n return value && typeof value.schedule === 'function';\n}\n//# sourceMappingURL=isScheduler.js.map\n","/*!\n * JavaScript Cookie v2.2.1\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n\tvar registeredInModuleLoader;\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (!registeredInModuleLoader) {\n\t\tvar OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction decode (s) {\n\t\treturn s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api() {}\n\n\t\tfunction set (key, value, attributes) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tattributes = extend({\n\t\t\t\tpath: '/'\n\t\t\t}, api.defaults, attributes);\n\n\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\tattributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n\t\t\t}\n\n\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\ttry {\n\t\t\t\tvar result = JSON.stringify(value);\n\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\tvalue = result;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\n\t\t\tvalue = converter.write ?\n\t\t\t\tconverter.write(value, key) :\n\t\t\t\tencodeURIComponent(String(value))\n\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n\t\t\tkey = encodeURIComponent(String(key))\n\t\t\t\t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n\t\t\t\t.replace(/[\\(\\)]/g, escape);\n\n\t\t\tvar stringifiedAttributes = '';\n\t\t\tfor (var attributeName in attributes) {\n\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Considers RFC 6265 section 5.2:\n\t\t\t\t// ...\n\t\t\t\t// 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n\t\t\t\t// character:\n\t\t\t\t// Consume the characters of the unparsed-attributes up to,\n\t\t\t\t// not including, the first %x3B (\";\") character.\n\t\t\t\t// ...\n\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n\t\t\t}\n\n\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t}\n\n\t\tfunction get (key, json) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar jar = {};\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all.\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = decode(parts[0]);\n\t\t\t\t\tcookie = (converter.read || converter)(cookie, name) ||\n\t\t\t\t\t\tdecode(cookie);\n\n\t\t\t\t\tif (json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tjar[name] = cookie;\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn key ? jar[key] : jar;\n\t\t}\n\n\t\tapi.set = set;\n\t\tapi.get = function (key) {\n\t\t\treturn get(key, false /* read as raw */);\n\t\t};\n\t\tapi.getJSON = function (key) {\n\t\t\treturn get(key, true /* read as json */);\n\t\t};\n\t\tapi.remove = function (key, attributes) {\n\t\t\tset(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.defaults = {};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n","/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { map } from './map';\nimport { from } from '../observable/from';\nexport function mergeMap(project, resultSelector, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n if (typeof resultSelector === 'function') {\n return function (source) { return source.pipe(mergeMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };\n}\nvar MergeMapOperator = /*@__PURE__*/ (function () {\n function MergeMapOperator(project, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n this.project = project;\n this.concurrent = concurrent;\n }\n MergeMapOperator.prototype.call = function (observer, source) {\n return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));\n };\n return MergeMapOperator;\n}());\nexport { MergeMapOperator };\nvar MergeMapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MergeMapSubscriber, _super);\n function MergeMapSubscriber(destination, project, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.concurrent = concurrent;\n _this.hasCompleted = false;\n _this.buffer = [];\n _this.active = 0;\n _this.index = 0;\n return _this;\n }\n MergeMapSubscriber.prototype._next = function (value) {\n if (this.active < this.concurrent) {\n this._tryNext(value);\n }\n else {\n this.buffer.push(value);\n }\n };\n MergeMapSubscriber.prototype._tryNext = function (value) {\n var result;\n var index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.active++;\n this._innerSub(result, value, index);\n };\n MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {\n var innerSubscriber = new InnerSubscriber(this, value, index);\n var destination = this.destination;\n destination.add(innerSubscriber);\n var innerSubscription = subscribeToResult(this, ish, undefined, undefined, innerSubscriber);\n if (innerSubscription !== innerSubscriber) {\n destination.add(innerSubscription);\n }\n };\n MergeMapSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (this.active === 0 && this.buffer.length === 0) {\n this.destination.complete();\n }\n this.unsubscribe();\n };\n MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {\n var buffer = this.buffer;\n this.remove(innerSub);\n this.active--;\n if (buffer.length > 0) {\n this._next(buffer.shift());\n }\n else if (this.active === 0 && this.hasCompleted) {\n this.destination.complete();\n }\n };\n return MergeMapSubscriber;\n}(OuterSubscriber));\nexport { MergeMapSubscriber };\n//# sourceMappingURL=mergeMap.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar UnsubscriptionErrorImpl = /*@__PURE__*/ (function () {\n function UnsubscriptionErrorImpl(errors) {\n Error.call(this);\n this.message = errors ?\n errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ') : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n return this;\n }\n UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n return UnsubscriptionErrorImpl;\n})();\nexport var UnsubscriptionError = UnsubscriptionErrorImpl;\n//# sourceMappingURL=UnsubscriptionError.js.map\n","/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */\nimport { isArray } from './util/isArray';\nimport { isObject } from './util/isObject';\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nvar Subscription = /*@__PURE__*/ (function () {\n function Subscription(unsubscribe) {\n this.closed = false;\n this._parentOrParents = null;\n this._subscriptions = null;\n if (unsubscribe) {\n this._unsubscribe = unsubscribe;\n }\n }\n Subscription.prototype.unsubscribe = function () {\n var errors;\n if (this.closed) {\n return;\n }\n var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;\n this.closed = true;\n this._parentOrParents = null;\n this._subscriptions = null;\n if (_parentOrParents instanceof Subscription) {\n _parentOrParents.remove(this);\n }\n else if (_parentOrParents !== null) {\n for (var index = 0; index < _parentOrParents.length; ++index) {\n var parent_1 = _parentOrParents[index];\n parent_1.remove(this);\n }\n }\n if (isFunction(_unsubscribe)) {\n try {\n _unsubscribe.call(this);\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];\n }\n }\n if (isArray(_subscriptions)) {\n var index = -1;\n var len = _subscriptions.length;\n while (++index < len) {\n var sub = _subscriptions[index];\n if (isObject(sub)) {\n try {\n sub.unsubscribe();\n }\n catch (e) {\n errors = errors || [];\n if (e instanceof UnsubscriptionError) {\n errors = errors.concat(flattenUnsubscriptionErrors(e.errors));\n }\n else {\n errors.push(e);\n }\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n };\n Subscription.prototype.add = function (teardown) {\n var subscription = teardown;\n if (!teardown) {\n return Subscription.EMPTY;\n }\n switch (typeof teardown) {\n case 'function':\n subscription = new Subscription(teardown);\n case 'object':\n if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {\n return subscription;\n }\n else if (this.closed) {\n subscription.unsubscribe();\n return subscription;\n }\n else if (!(subscription instanceof Subscription)) {\n var tmp = subscription;\n subscription = new Subscription();\n subscription._subscriptions = [tmp];\n }\n break;\n default: {\n throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');\n }\n }\n var _parentOrParents = subscription._parentOrParents;\n if (_parentOrParents === null) {\n subscription._parentOrParents = this;\n }\n else if (_parentOrParents instanceof Subscription) {\n if (_parentOrParents === this) {\n return subscription;\n }\n subscription._parentOrParents = [_parentOrParents, this];\n }\n else if (_parentOrParents.indexOf(this) === -1) {\n _parentOrParents.push(this);\n }\n else {\n return subscription;\n }\n var subscriptions = this._subscriptions;\n if (subscriptions === null) {\n this._subscriptions = [subscription];\n }\n else {\n subscriptions.push(subscription);\n }\n return subscription;\n };\n Subscription.prototype.remove = function (subscription) {\n var subscriptions = this._subscriptions;\n if (subscriptions) {\n var subscriptionIndex = subscriptions.indexOf(subscription);\n if (subscriptionIndex !== -1) {\n subscriptions.splice(subscriptionIndex, 1);\n }\n }\n };\n Subscription.EMPTY = (function (empty) {\n empty.closed = true;\n return empty;\n }(new Subscription()));\n return Subscription;\n}());\nexport { Subscription };\nfunction flattenUnsubscriptionErrors(errors) {\n return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError) ? err.errors : err); }, []);\n}\n//# sourceMappingURL=Subscription.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from './Subscriber';\nvar InnerSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(InnerSubscriber, _super);\n function InnerSubscriber(parent, outerValue, outerIndex) {\n var _this = _super.call(this) || this;\n _this.parent = parent;\n _this.outerValue = outerValue;\n _this.outerIndex = outerIndex;\n _this.index = 0;\n return _this;\n }\n InnerSubscriber.prototype._next = function (value) {\n this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);\n };\n InnerSubscriber.prototype._error = function (error) {\n this.parent.notifyError(error, this);\n this.unsubscribe();\n };\n InnerSubscriber.prototype._complete = function () {\n this.parent.notifyComplete(this);\n this.unsubscribe();\n };\n return InnerSubscriber;\n}(Subscriber));\nexport { InnerSubscriber };\n//# sourceMappingURL=InnerSubscriber.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function take(count) {\n return function (source) {\n if (count === 0) {\n return empty();\n }\n else {\n return source.lift(new TakeOperator(count));\n }\n };\n}\nvar TakeOperator = /*@__PURE__*/ (function () {\n function TakeOperator(total) {\n this.total = total;\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n TakeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TakeSubscriber(subscriber, this.total));\n };\n return TakeOperator;\n}());\nvar TakeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TakeSubscriber, _super);\n function TakeSubscriber(destination, total) {\n var _this = _super.call(this, destination) || this;\n _this.total = total;\n _this.count = 0;\n return _this;\n }\n TakeSubscriber.prototype._next = function (value) {\n var total = this.total;\n var count = ++this.count;\n if (count <= total) {\n this.destination.next(value);\n if (count === total) {\n this.destination.complete();\n this.unsubscribe();\n }\n }\n };\n return TakeSubscriber;\n}(Subscriber));\n//# sourceMappingURL=take.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function noop() { }\n//# sourceMappingURL=noop.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { noop } from '../util/noop';\nimport { isFunction } from '../util/isFunction';\nexport function tap(nextOrObserver, error, complete) {\n return function tapOperatorFunction(source) {\n return source.lift(new DoOperator(nextOrObserver, error, complete));\n };\n}\nvar DoOperator = /*@__PURE__*/ (function () {\n function DoOperator(nextOrObserver, error, complete) {\n this.nextOrObserver = nextOrObserver;\n this.error = error;\n this.complete = complete;\n }\n DoOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));\n };\n return DoOperator;\n}());\nvar TapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TapSubscriber, _super);\n function TapSubscriber(destination, observerOrNext, error, complete) {\n var _this = _super.call(this, destination) || this;\n _this._tapNext = noop;\n _this._tapError = noop;\n _this._tapComplete = noop;\n _this._tapError = error || noop;\n _this._tapComplete = complete || noop;\n if (isFunction(observerOrNext)) {\n _this._context = _this;\n _this._tapNext = observerOrNext;\n }\n else if (observerOrNext) {\n _this._context = observerOrNext;\n _this._tapNext = observerOrNext.next || noop;\n _this._tapError = observerOrNext.error || noop;\n _this._tapComplete = observerOrNext.complete || noop;\n }\n return _this;\n }\n TapSubscriber.prototype._next = function (value) {\n try {\n this._tapNext.call(this._context, value);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(value);\n };\n TapSubscriber.prototype._error = function (err) {\n try {\n this._tapError.call(this._context, err);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.error(err);\n };\n TapSubscriber.prototype._complete = function () {\n try {\n this._tapComplete.call(this._context);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n return this.destination.complete();\n };\n return TapSubscriber;\n}(Subscriber));\n//# sourceMappingURL=tap.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var observable = /*@__PURE__*/ (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })();\n//# sourceMappingURL=observable.js.map\n","/** PURE_IMPORTS_START _identity PURE_IMPORTS_END */\nimport { identity } from './identity';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map\n","/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo,_Observable PURE_IMPORTS_END */\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeTo } from './subscribeTo';\nimport { Observable } from '../Observable';\nexport function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber) {\n if (innerSubscriber === void 0) {\n innerSubscriber = new InnerSubscriber(outerSubscriber, outerValue, outerIndex);\n }\n if (innerSubscriber.closed) {\n return undefined;\n }\n if (result instanceof Observable) {\n return result.subscribe(innerSubscriber);\n }\n return subscribeTo(result)(innerSubscriber);\n}\n//# sourceMappingURL=subscribeToResult.js.map\n"],"sourceRoot":"webpack:///"}