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EAAAtgQ,GAAAI,GAAAI,EAAAi4L,EAAA8nE,GAAA,OAAAxgQ,EACA,CACA,SAAAwgQ,GAAAxgQ,GACAugQ,EAAAtgQ,GAAAI,GAAAI,EAAAi4L,EAAA8nE,GAAA,QAAAxgQ,EACA,CACA04L,OAAA,EACA,EACA,CACA","names":["_DOM","getDOM","DomAdapter","DOCUMENT","InjectionToken","PlatformLocation","historyGo","relativePosition","Error","static","__ngFactoryType__","i0","token","factory","inject","BrowserPlatformLocation","providedIn","_location","_history","_doc","constructor","super","this","window","location","history","getBaseHrefFromDOM","getBaseHref","onPopState","fn","getGlobalEventTarget","addEventListener","removeEventListener","onHashChange","href","protocol","hostname","port","pathname","search","hash","newPath","pushState","state","title","url","replaceState","forward","back","go","getState","joinWithSlash","start","end","length","slashes","endsWith","startsWith","substring","stripTrailingSlash","match","pathEndIdx","index","slice","normalizeQueryParams","params","LocationStrategy","PathLocationStrategy","APP_BASE_HREF","_platformLocation","_baseHref","_removeListenerFns","origin","ngOnDestroy","pop","push","prepareExternalUrl","internal","path","includeHash","queryParams","externalUrl","ɵfac","Location","_subject","Subject","_basePath","_locationStrategy","_urlChangeListeners","_urlChangeSubscription","locationStrategy","baseHref","_stripOrigin","RegExp","test","split","_stripIndexHtml","ev","next","type","unsubscribe","normalize","isCurrentPathEqualTo","query","_stripBasePath","basePath","strippedUrl","includes","_notifyUrlChangeListeners","onUrlChange","subscribe","v","fnIndex","indexOf","splice","forEach","onNext","onThrow","onReturn","error","undefined","complete","createLocation","ɵɵinject","replace","CURRENCIES_EN","ADP","AFN","ALL","AMD","AOA","ARS","AUD","AZN","BAM","BBD","BDT","BHD","BIF","BMD","BND","BOB","BRL","BSD","BWP","BYN","BYR","BZD","CAD","CHF","CLF","CLP","CNY","COP","CRC","CUC","CUP","CZK","DJF","DKK","DOP","EGP","ESP","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GNF","GTQ","GYD","HKD","HNL","HRK","HUF","IDR","ILS","INR","IQD","IRR","ISK","ITL","JMD","JOD","JPY","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LTL","LUF","LVL","LYD","MGA","MGF","MMK","MNT","MRO","MUR","MXN","MYR","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PHP","PKR","PLN","PYG","RON","RSD","RUB","RWF","SBD","SEK","SGD","SHP","SLE","SLL","SOS","SRD","SSP","STD","STN","SYP","THB","TMM","TND","TOP","TRL","TRY","TTD","TWD","TZS","UAH","UGX","USD","UYI","UYU","UYW","UZS","VEF","VND","VUV","XAF","XCD","XOF","XPF","XXX","YER","ZAR","ZMK","ZMW","ZWD","NumberFormatStyle","Decimal","Percent","Currency","Scientific","getLocaleNumberSymbol","locale","symbol","data","ɵfindLocaleData","res","ɵLocaleDataIndex","NumberSymbols","NUMBER_FORMAT_REGEXP","formatCurrency","value","currency","currencyCode","digitsInfo","pattern","parseNumberFormat","format","minusSign","p","minInt","minFrac","maxFrac","posPre","posSuf","negPre","negSuf","gSize","lgSize","patternParts","positive","negative","positiveParts","lastIndexOf","integer","fraction","i","ch","charAt","groups","trunkLen","pos","getLocaleNumberFormat","NumberFormats","getNumberOfCurrencyDigits","code","digits","formatNumberToLocaleString","groupSymbol","decimalSymbol","isPercent","formattedText","isZero","isFinite","parsedNumber","parseNumber","num","integerLen","j","zeros","numStr","Math","abs","exponent","Number","MAX_DIGITS","toPercent","fractionLen","minFraction","maxFraction","parts","minIntPart","minFractionPart","maxFractionPart","parseIntAutoRadix","roundNumber","fractionSize","min","max","roundAt","digit","k","unshift","dropTrailingZeros","minLen","carry","reduceRight","d","decimals","every","join","trim","text","result","parseInt","isNaN","parseCookieValue","cookieStr","name","encodeURIComponent","cookie","eqIndex","cookieName","cookieValue","decodeURIComponent","WS_REGEXP","EMPTY_ARRAY","NgClass","_ngEl","_renderer","initialClasses","rawClass","stateMap","Map","klass","ngClass","ngDoCheck","_updateState","Array","isArray","Set","Object","keys","_applyStateDiff","nextEnabled","get","enabled","changed","touched","set","stateEntry","_toggleClass","delete","addClass","nativeElement","removeClass","selectors","inputs","NgForOfContext","$implicit","ngForOf","count","first","last","even","odd","NgForOf","_viewContainer","_template","_differs","_ngForOf","_ngForOfDirty","ngForTrackBy","_trackByFn","_differ","ngForTemplate","find","create","changes","diff","_applyChanges","viewContainer","forEachOperation","item","adjustedPreviousIndex","currentIndex","previousIndex","createEmbeddedView","remove","view","move","applyViewChange","ilen","context","forEachIdentityChange","record","ngTemplateContextGuard","dir","ctx","NgIf","_context","NgIfContext","_thenTemplateRef","_elseTemplateRef","_thenViewRef","_elseViewRef","templateRef","ngIf","condition","_updateView","ngIfThen","assertTemplate","ngIfElse","clear","property","ɵstringify","NgTemplateOutlet","_viewContainerRef","_viewRef","ngTemplateOutletContext","ngTemplateOutlet","ngTemplateOutletInjector","ngOnChanges","_shouldRecreateView","viewContainerRef","viewContext","_createContextForwardProxy","injector","Proxy","_target","prop","newValue","Reflect","receiver","features","invalidPipeArgumentError","ɵRuntimeError","ngDevMode","SubscribableStrategy","createSubscription","async","updateLatestValue","untracked","e","dispose","subscription","PromiseStrategy","then","_promiseStrategy","_subscribableStrategy","AsyncPipe","_ref","_latestValue","markForCheckOnValueUpdate","_subscription","_obj","_strategy","ref","_dispose","transform","obj","_subscribe","_selectStrategy","_updateLatestValue","ɵisPromise","ɵisSubscribable","markForCheck","pure","CurrencyPipe","_locale","_defaultCurrencyCode","display","isValue","getCurrencySymbol","getLocaleCurrencies","Currencies","symbolNarrow","strToNumber","parseFloat","LOCALE_ID","DEFAULT_CURRENCY_CODE","CommonModule","PLATFORM_BROWSER_ID","isPlatformServer","platformId","XhrFactory","GenericBrowserDomAdapter","ɵDomAdapter","supportsDOMEvents","BrowserDomAdapter","makeCurrent","setRootDomAdapter","adapter","ɵsetRootDomAdapter","onAndCancel","el","evt","listener","dispatchEvent","node","createElement","tagName","doc","getDefaultDocument","createHtmlDocument","document","implementation","createHTMLDocument","isElementNode","nodeType","Node","ELEMENT_NODE","isShadowRoot","DocumentFragment","target","body","getBaseElementHref","baseElement","querySelector","getAttribute","relativePath","URL","baseURI","resetBaseElement","getUserAgent","navigator","userAgent","getCookie","ɵparseCookieValue","BrowserXhr","build","XMLHttpRequest","EVENT_MANAGER_PLUGINS","EventManager","_zone","_plugins","_eventNameToPlugin","plugins","plugin","manager","reverse","element","eventName","handler","_findPluginFor","getZone","supports","EventManagerPlugin","APP_ID_ATTRIBUTE_NAME","removeElements","elements","createStyleElement","style","styleElement","textContent","createLinkElement","linkElement","setAttribute","SharedStylesHost","appId","nonce","inline","external","hosts","isServer","addServerStyles","head","querySelectorAll","removeAttribute","HTMLLinkElement","usage","add","addStyles","styles","urls","addUsage","removeStyles","removeUsage","usages","creator","map","host","addElement","addHost","hostNode","removeHost","appendChild","APP_ID","CSP_NONCE","PLATFORM_ID","NAMESPACE_URIS","svg","xhtml","xlink","xml","xmlns","math","COMPONENT_REGEX","REMOVE_STYLES_ON_COMPONENT_DESTROY","shimStylesContent","compId","s","DomRendererFactory2","eventManager","sharedStylesHost","removeStylesOnCompDestroy","ngZone","rendererByCompId","defaultRenderer","platformIsServer","DefaultDomRenderer2","createRenderer","encapsulation","ViewEncapsulation","ShadowDom","Emulated","renderer","getOrCreateRenderer","EmulatedEncapsulationDomRenderer2","applyToHost","NoneEncapsulationDomRenderer","applyStyles","id","ShadowDomRenderer","throwOnSyntheticProps","destroy","destroyNode","namespace","createElementNS","createComment","createText","createTextNode","parent","newChild","isTemplateNode","content","insertBefore","refChild","removeChild","_parent","oldChild","selectRootElement","selectorOrNode","preserveContent","parentNode","nextSibling","namespaceUri","setAttributeNS","removeAttributeNS","classList","setStyle","flags","RendererStyleFlags2","DashCase","Important","setProperty","removeStyle","removeProperty","setValue","nodeValue","listen","event","callback","ɵgetDOM","decoratePreventDefault","eventHandler","runGuarded","preventDefault","hostEl","shadowRoot","component","attachShadow","mode","styleEl","styleUrls","getExternalStyles","styleUrl","linkEl","nodeOrShadowRoot","contentAttr","hostAttr","shimContentAttribute","componentShortId","shimHostAttribute","DomEventsPlugin","MODIFIER_KEYS","_keyMap","Del","Esc","Left","Right","Up","Down","Menu","Scroll","Win","MODIFIER_KEY_GETTERS","alt","altKey","control","ctrlKey","meta","metaKey","shift","shiftKey","KeyEventsPlugin","parseEventName","parsedEvent","outsideHandler","eventCallback","fullKey","runOutsideAngular","domEventName","toLowerCase","key","_normalizeKey","codeIX","modifierName","matchEventFullKeyCode","fullKeyCode","keycode","modifierGetter","zone","keyName","createProvidersConfig","options","appProviders","BROWSER_MODULE_PROVIDERS","providers","platformProviders","INTERNAL_BROWSER_PLATFORM_PROVIDERS","provide","useValue","ɵPLATFORM_BROWSER_ID","PLATFORM_INITIALIZER","initDomAdapter","multi","useFactory","_document","ɵsetDocument","deps","ɵINJECTOR_SCOPE","ErrorHandler","errorHandler","useClass","NgZone","RendererFactory2","useExisting","hasV8BreakIterator","Title","getTitle","setTitle","newTitle","DomSanitizer","__ngConditionalFactory__","DomSanitizerImpl","sanitize","SecurityContext","NONE","HTML","ɵallowSanitizationBypassAndThrow","ɵunwrapSafeValue","ɵ_sanitizeHtml","String","toString","STYLE","SCRIPT","ɵ_sanitizeUrl","RESOURCE_URL","bypassSecurityTrustHtml","ɵbypassSanitizationTrustHtml","bypassSecurityTrustStyle","ɵbypassSanitizationTrustStyle","bypassSecurityTrustScript","ɵbypassSanitizationTrustScript","bypassSecurityTrustUrl","ɵbypassSanitizationTrustUrl","bypassSecurityTrustResourceUrl","ɵbypassSanitizationTrustResourceUrl","Intl","v8BreakIterator","supportedInputTypes","Platform","_platformId","isBrowser","isPlatformBrowser","EDGE","TRIDENT","BLINK","chrome","CSS","WEBKIT","IOS","FIREFOX","ANDROID","SAFARI","candidateInputTypes","getSupportedInputTypes","featureTestInput","filter","supportsPassiveEvents","normalizePassiveListenerOptions","supportsPassiveEventListeners","defineProperty","capture","RtlScrollAxisType","NORMAL","NEGATED","INVERTED","rtlScrollAxisType","scrollBehaviorSupported","shadowDomIsSupported","supportsScrollBehavior","Element","documentElement","scrollToFunction","prototype","scrollTo","getRtlScrollAxisType","scrollContainer","containerStyle","width","overflow","visibility","pointerEvents","position","contentStyle","height","scrollLeft","_getFocusedElementPierceShadowDom","activeElement","newActiveElement","_getEventTarget","composedPath","_isTestEnvironment","__karma__","jasmine","jest","Mocha","appsWithLoaders","WeakMap","_CdkPrivateStyleLoader","_appRef","_injector","Injector","_environmentInjector","EnvironmentInjector","load","loader","appRef","ApplicationRef","loaders","refs","onDestroy","has","createComponent","environmentInjector","_VisuallyHiddenLoader","exportAs","decls","vars","template","rf","changeDetection","hasModifierKey","modifiers","some","modifier","isScheduler","isFunction","schedule","arr","popResultSelector","args","popScheduler","__rest","t","hasOwnProperty","call","getOwnPropertySymbols","propertyIsEnumerable","__await","__asyncGenerator","thisArg","_arguments","generator","Symbol","asyncIterator","TypeError","g","apply","q","AsyncIterator","verb","awaitReturn","f","Promise","resolve","reject","n","a","b","resume","step","r","fulfill","settle","__asyncDelegator","o","iterator","done","__asyncValues","m","__values","SuppressedError","isArrayLike","x","isPromise","isInteropObservable","input","Symbol_observable","isAsyncIterable","createInvalidObservableTypeError","getSymbolIterator","isIterable","Symbol_iterator","readableStreamLikeToAsyncGenerator","readableStream","arguments","reader","getReader","read","releaseLock","isReadableStreamLike","innerFrom","Observable","fromInteropObservable","subscriber","obs","fromArrayLike","array","closed","fromPromise","promise","err","reportUnhandledError","fromAsyncIterable","fromIterable","iterable","fromReadableStreamLike","asyncIterable","process","asyncIterable_1","asyncIterable_1_1","e_1","_a","__awaiter","P","fulfilled","rejected","throw","adopt","e_1_1","return","catch","executeSchedule","parentSubscription","scheduler","work","delay","repeat","scheduleSubscription","observeOn","operate","source","createOperatorSubscriber","subscribeOn","scheduleAsyncIterable","from","scheduled","scheduleObservable","pipe","scheduleArray","schedulePromise","scheduleIterable","scheduleReadableStreamLike","of","tap","observerOrNext","tapObserver","isUnsub","_b","finalize","identity","Action","Subscription","intervalProvider","setInterval","timeout","delegate","clearInterval","handle","AsyncAction","pending","recycleAsyncId","requestAsyncId","_id","flush","bind","_scheduler","execute","_execute","_delay","errorValue","errored","actions","arrRemove","dateTimestampProvider","now","Date","Scheduler","schedulerActionCtor","AsyncScheduler","SchedulerAction","_active","action","asyncScheduler","debounceTime","dueTime","activeTask","lastValue","lastTime","emit","emitWhenIdle","targetTime","predicate","EMPTY","take","seen","skip","_","distinctUntilChanged","comparator","keySelector","defaultCompare","previousKey","currentKey","takeUntil","notifier","noop","MutationObserverFactory","MutationObserver","ObserversModule","coerceBooleanProperty","coerceNumberProperty","fallbackValue","_isNumberValue","coerceArray","coerceCssPixelValue","coerceElement","elementOrRef","ElementRef","getPrototypeOf","objectProto","getKeys","argsArgArrayOrObject","isPOJO","mapOneOrManyArgs","callOrApply","createObject","values","reduce","combineLatest","resultSelector","observables","combineLatestInit","valueTransform","maybeSchedule","active","remainingFirstValues","hasFirstValue","mergeMap","project","concurrent","Infinity","ii","mergeInternals","onBeforeNext","expand","innerSubScheduler","additionalFinalizer","buffer","isComplete","checkComplete","outerNext","doInnerSub","innerComplete","innerValue","bufferedValue","mergeAll","concat","concatAll","startWith","mediaQueriesForWebkitCompatibility","mediaQueryStyleNode","MediaMatcher","_platform","_nonce","optional","_matchMedia","matchMedia","noopMatchMedia","createEmptyStyleRule","sheet","insertRule","console","matches","media","addListener","removeListener","BreakpointObserver","_mediaMatcher","_queries","_destroySubject","isMatched","splitQueries","mediaQuery","_registerQuery","mql","observe","stateObservable","observable","breakpointStates","response","breakpoints","output","observer","run","queries","a1","a2","addAriaReferencedId","attr","ids","getAriaReferenceIds","existingId","removeAriaReferencedId","filteredIds","val","Typeahead","_letterKeyStream","_items","_selectedItemIndex","_pressedLetters","_skipPredicateFn","_selectedItem","selectedItem","initialItems","config","typeAheadInterval","debounceInterval","skipPredicate","setItems","_setupKeyHandler","setCurrentSelectedItemIndex","items","handleKey","keyCode","toLocaleUpperCase","fromCharCode","isTyping","reset","letter","inputString","getLabel","ListKeyManager","_activeItemIndex","_activeItem","signal","_wrap","_typeaheadSubscription","_itemChangesSubscription","_vertical","_horizontal","_allowedModifierKeys","_homeAndEnd","_pageUpAndDown","delta","_effectRef","_typeahead","disabled","QueryList","newItems","_itemsChanged","toArray","isSignal","effect","tabOut","change","withWrap","shouldWrap","withVerticalOrientation","withHorizontalOrientation","direction","withAllowedModifierKeys","withTypeAhead","_getItemsArray","setActiveItem","cancelTypeahead","withHomeAndEnd","withPageUpDown","previousActiveItem","updateActiveItem","onKeydown","isModifierAllowed","setNextItemActive","setPreviousItemActive","setFirstItemActive","setLastItemActive","targetIndex","_setActiveItemByIndex","itemsLength","activeItemIndex","activeItem","_setActiveItemByDelta","itemArray","_setActiveInWrapMode","_setActiveInDefaultMode","fallbackDelta","newIndex","ActiveDescendantKeyManager","setInactiveStyles","setActiveStyles","InteractivityChecker","isDisabled","hasAttribute","isVisible","hasGeometry","offsetWidth","offsetHeight","getClientRects","getComputedStyle","isTabbable","frameElement","getFrameElement","getWindow","ownerDocument","defaultView","getTabIndexValue","nodeName","tabIndexValue","isPotentiallyTabbableIOS","inputType","tabIndex","isFocusable","isPotentiallyFocusable","isHiddenInput","isInputElement","isNativeFormElement","isAnchorWithHref","isAnchorElement","hasValidTabIndex","ignoreVisibility","FocusTrap","_element","_checker","_ngZone","_startAnchor","_endAnchor","_hasAttached","startAnchorListener","focusLastTabbableElement","endAnchorListener","focusFirstTabbableElement","_enabled","_toggleAnchorTabIndex","deferAnchors","attachAnchors","startAnchor","endAnchor","_createAnchor","focusInitialElementWhenReady","_executeOnStable","focusInitialElement","focusFirstTabbableElementWhenReady","focusLastTabbableElementWhenReady","_getRegionBoundary","bound","markers","_getFirstTabbableElement","_getLastTabbableElement","redirectToElement","focusableChild","focus","hasAttached","root","children","tabbableChild","anchor","isEnabled","toggleAnchors","afterNextRender","setTimeout","FocusTrapFactory","deferCaptureElements","CdkTrapFocus","_elementRef","_focusTrapFactory","focusTrap","_previouslyFocusedElement","autoCapture","ngAfterContentInit","_captureFocus","autoCaptureChange","firstChange","booleanAttribute","isFakeMousedownFromScreenReader","buttons","detail","isFakeTouchstartFromScreenReader","touch","touches","changedTouches","identifier","radiusX","radiusY","INPUT_MODALITY_DETECTOR_OPTIONS","INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS","ignoreKeys","modalityEventListenerOptions","passive","InputModalityDetector","modalityDetected","modalityChanged","mostRecentModality","_modality","_mostRecentTarget","BehaviorSubject","_options","_lastTouchMs","_onKeydown","_onMousedown","_onTouchstart","LIVE_ANNOUNCER_ELEMENT_TOKEN","LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY","LIVE_ANNOUNCER_DEFAULT_OPTIONS","uniqueIds","LiveAnnouncer","_defaultOptions","_liveElement","_previousTimeout","_currentPromise","_currentResolve","elementToken","_createLiveElement","announce","message","defaultOptions","politeness","duration","clearTimeout","_exposeAnnouncerToModals","elementClass","previousElements","getElementsByClassName","liveEl","modals","modal","ariaOwns","FocusMonitorDetectionMode","IMMEDIATE","EVENTUAL","FOCUS_MONITOR_DEFAULT_OPTIONS","captureEventListenerOptions","FocusMonitor","_inputModalityDetector","_origin","_lastFocusOrigin","_windowFocused","_windowFocusTimeoutId","_originTimeoutId","_originFromTouchInteraction","_elementInfo","_monitoredElementCount","_rootNodeFocusListenerCount","_detectionMode","_windowFocusListener","_stopInputModalityDetector","detectionMode","_rootNodeFocusAndBlurListener","parentElement","_onFocus","_onBlur","monitor","checkChildren","rootNode","_getShadowRoot","_supportsShadowDom","createShadowRoot","getRootNode","ShadowRoot","_getDocument","cachedInfo","subject","info","_registerGlobalListeners","stopMonitoring","elementInfo","_setClasses","_removeGlobalListeners","focusVia","_getClosestElementsInfo","currentElement","_originChanged","_setOrigin","_info","_getWindow","_getFocusOrigin","focusEventTarget","_shouldBeAttributedToTouch","_isLastInteractionFromInputLabel","contains","toggle","isFromInteraction","relatedTarget","_emitOrigin","observers","rootNodeFocusListeners","modality","results","mostRecentTarget","labels","CdkMonitorFocus","_focusMonitor","_monitorSubscription","_focusOrigin","cdkFocusChange","EventEmitter","focusOrigin","ngAfterViewInit","outputs","HighContrastMode","BLACK_ON_WHITE","WHITE_ON_BLACK","BLACK_ON_WHITE_CSS_CLASS","WHITE_ON_BLACK_CSS_CLASS","HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS","HighContrastModeDetector","_hasCheckedHighContrastMode","_breakpointSubscription","_applyBodyHighContrastModeCssClasses","getHighContrastMode","testElement","backgroundColor","documentWindow","computedStyle","computedColor","bodyClasses","A11yModule","imports","counters","_IdGenerator","_appId","getId","prefix","DIR_DOCUMENT","DIR_DOCUMENT_FACTORY","RTL_LOCALE_PATTERN","Directionality","_resolveDirectionality","rawValue","language","BidiModule","_c2","_c3","_c4","MatOption_Conditional_0_Template","ctx_r0","selected","MatOption_Conditional_5_Template","MatOption_Conditional_6_Template","group","label","_c5","_c6","MatCommonModule","_ErrorStateTracker","_defaultMatcher","ngControl","_parentFormGroup","_parentForm","_stateChanges","errorState","matcher","updateErrorState","oldState","newState","isErrorState","MAT_DATE_LOCALE","MAT_DATE_LOCALE_FACTORY","NOT_IMPLEMENTED","DateAdapter","_localeChanges","localeChanges","setTime","hours","minutes","seconds","getHours","date","getMinutes","getSeconds","parseTime","parseFormat","addSeconds","amount","getValidDateOrNull","isDateInstance","isValid","deserialize","invalid","setLocale","compareDate","second","getYear","getMonth","getDate","compareTime","sameDate","firstValid","secondValid","sameTime","clampDate","MAT_DATE_FORMATS","ISO_8601_REGEX","TIME_REGEX","range","valueFunction","valuesArray","NativeDateAdapter","useUtcForDisplay","_matDateLocale","matDateLocale","getFullYear","getDayOfWeek","getDay","getMonthNames","dtf","DateTimeFormat","month","timeZone","_format","getDateNames","day","getDayOfWeekNames","weekday","getYearName","year","getFirstDayOfWeek","Locale","firstDay","getWeekInfo","weekInfo","getNumDaysInMonth","_createDateWithOverflow","clone","getTime","createDate","today","parse","displayFormat","addCalendarYears","years","addCalendarMonths","months","newDate","addCalendarDays","days","toIso8601","getUTCFullYear","_2digit","getUTCMonth","getUTCDate","NaN","setHours","userValue","_parseTimeString","withoutExtras","setFullYear","setUTCFullYear","setUTCHours","getMilliseconds","parsed","toUpperCase","amPm","inRange","MAT_NATIVE_DATE_FORMATS","dateInput","timeInput","hour","minute","monthYearLabel","dateA11yLabel","monthYearA11yLabel","timeOptionLabel","ErrorStateMatcher","form","submitted","_StructuralStylesLoader","RippleState","FADING_IN","VISIBLE","FADING_OUT","HIDDEN","RippleRef","_animationForciblyDisabledThroughCss","fadeOut","fadeOutRipple","passiveCapturingEventOptions$1","RippleEventManager","_events","addHandler","handlersForEvent","handlersForElement","_delegateEventHandler","removeHandler","size","handlers","handleEvent","defaultRippleAnimationConfig","enterDuration","exitDuration","passiveCapturingEventOptions","pointerDownEvents","pointerUpEvents","_MatRippleStylesLoader","hostAttrs","RippleRenderer","_containerElement","_triggerElement","_isPointerDown","_activeRipples","_mostRecentTransientRipple","_lastTouchStartEvent","_pointerUpEventsRegistered","_containerRect","elementOrElementRef","fadeInRipple","y","containerRect","getBoundingClientRect","animationConfig","animation","centered","left","top","radius","distanceToFurthestCorner","rect","distX","right","distY","bottom","sqrt","offsetX","offsetY","ripple","color","transitionDuration","computedStyles","userTransitionDuration","animationForciblyDisabledThroughCss","transitionProperty","rippleRef","persistent","eventListeners","onTransitionEnd","fallbackTimer","_finishRippleTransition","onTransitionCancel","_destroyRipple","rippleEl","opacity","fadeOutAll","_getActiveRipples","fadeOutAllNonPersistent","setupTriggerEvents","_removeTriggerEvents","_eventManager","_onTouchStart","_onPointerUp","_startFadeOutTransition","isMostRecentTransientRipple","isFakeMousedown","isSyntheticEvent","rippleDisabled","clientX","clientY","rippleConfig","terminateOnPointerUp","trigger","MAT_RIPPLE_GLOBAL_OPTIONS","MatRipple","_animationMode","ANIMATION_MODULE_TYPE","unbounded","_disabled","_setupTriggerEventsIfEnabled","_trigger","_rippleRenderer","_globalOptions","_isInitialized","platform","globalOptions","ngOnInit","launch","configOrX","hostVars","hostBindings","MatRippleModule","MatPseudoCheckbox","appearance","MatPseudoCheckboxModule","MAT_OPTION_PARENT_COMPONENT","MAT_OPTGROUP","MatOptionSelectionChange","isUserInput","MatOption","_changeDetectorRef","ChangeDetectorRef","_signalDisableRipple","_selected","_mostRecentViewValue","multiple","disableRipple","hideSingleSelectionIndicator","onSelectionChange","_text","viewValue","select","emitEvent","_emitSelectionChangeEvent","deselect","_getHostElement","_handleKeydown","_selectViaInteraction","_getTabIndex","ngAfterViewChecked","viewQuery","_t","$event","ngContentSelectors","consts","_inert","dependencies","_countGroupLabelsBeforeOption","optionIndex","optionGroups","optionsArray","groupCounter","_getOptionScrollPosition","optionOffset","optionHeight","currentScrollPosition","panelHeight","MatOptionModule","eventListenerOptions","rippleInteractionEvents","matRippleUninitialized","matRippleClassName","matRippleCentered","matRippleDisabled","MatRippleLoader","_globalRippleOptions","_hosts","_onInteraction","destroyRipple","configureRipple","className","setDisabled","hasSetUpEvents","eventTarget","HTMLElement","closest","_createRipple","append","isNoopAnimations","_MatInternalFormField","labelPosition","attrs","MatProgressBar_Conditional_2_Template","MAT_PROGRESS_BAR_DEFAULT_OPTIONS","MatProgressBar","Renderer2","_cleanupTransitionEnd","defaults","_isNoopAnimation","_defaultColor","_color","_value","clamp","bufferValue","_bufferValue","animationEnd","_mode","_transitionendHandler","_getPrimaryBarTransform","_isIndeterminate","_getBufferBarFlexBasis","numberAttribute","MatProgressBarModule","_c0","_c1","_c8","_c9","MAT_BUTTON_CONFIG","HOST_SELECTOR_MDC_CLASS_PAIR","attribute","mdcClasses","MatButtonBase","_rippleLoader","_isFab","_disableRipple","_updateRippleDisabled","ariaDisabled","disabledInteractive","_getAriaDisabled","_getDisabledAttribute","MatAnchorBase","_cleanupClick","_haltDisabledEvents","stopImmediatePropagation","ɵMatAnchorBase_BaseFactory","MatButton","ɵMatButton_BaseFactory","MatAnchor","ɵMatAnchor_BaseFactory","MatIconButton","MatButtonModule","Portal","_attachedHost","attach","detach","isAttached","setAttachedHost","ComponentPortal","componentFactoryResolver","projectableNodes","_componentFactoryResolver","TemplatePortal","elementRef","DomPortal","BasePortalOutlet","_attachedPortal","_disposeFn","_isDisposed","portal","attachComponentPortal","attachTemplatePortal","attachDomPortal","_invokeDisposeFn","setDisposeFn","DomPortalOutlet","outletElement","_defaultInjector","_unusedComponentFactoryResolver","componentRef","ngModuleRef","NgModuleRef","elementInjector","NULL","attachView","hostView","viewCount","detachView","_getComponentRootNode","viewRef","rootNodes","detectChanges","anchorNode","replaceChild","CdkPortalOutlet","_moduleRef","ViewContainerRef","_attachedRef","attached","attachedRef","_getRootNode","PortalModule","nodeEventEmitterMethods","eventTargetMethods","jqueryMethods","fromEvent","isEventTarget","methodName","isNodeStyleEventEmitter","toCommonHandlerRegistry","isJQueryStyleEventEmitter","on","off","subTarget","animationFrameProvider","request","requestAnimationFrame","cancel","cancelAnimationFrame","timestamp","AnimationFrameScheduler","flushId","_scheduled","AnimationFrameAction","resolved","nextHandle","activeHandles","findAndClearHandle","Immediate","setImmediate","cb","clearImmediate","immediateProvider","AsapScheduler","AsapAction","timer","intervalOrScheduler","intervalDuration","due","isValidDate","auditTime","audit","durationSelector","hasValue","durationSubscriber","endDuration","cleanupDuration","ScrollDispatcher","_scrolled","_globalSubscription","_scrolledCount","scrollContainers","register","scrollable","elementScrolled","deregister","scrollableReference","scrolled","auditTimeInMs","_addGlobalListener","_removeGlobalListener","container","ancestorScrolled","ancestors","getAncestorScrollContainers","scrollingContainers","_scrollableContainsElement","scrollableElement","getElementRef","CdkScrollable","scrollDispatcher","_destroyed","_elementScrolled","isRtl","scrollHeight","clientHeight","scrollWidth","clientWidth","_applyScrollToOptions","scrollTop","measureScrollOffset","LEFT","RIGHT","ViewportRuler","_listeners","_viewportSize","_change","changeListener","cleanup","getViewportSize","_updateViewportSize","getViewportRect","scrollPosition","getViewportScrollPosition","documentRect","scrollY","scrollX","throttleTime","innerWidth","innerHeight","CdkScrollableModule","ScrollingModule","merge","popNumber","defaultValue","sources","BlockScrollStrategy","_viewportRuler","_previousHTMLStyles","_previousScrollPosition","_isEnabled","enable","_canBeEnabled","disable","html","htmlStyle","bodyStyle","previousHtmlScrollBehavior","scrollBehavior","previousBodyScrollBehavior","scroll","viewport","CloseScrollStrategy","_scrollDispatcher","_config","_scrollSubscription","_overlayRef","_initialScrollPosition","overlayRef","stream","overlayElement","threshold","_detach","updatePosition","NoopScrollStrategy","isElementScrolledOutsideView","containerBounds","isElementClippedByScrolling","scrollContainerRect","RepositionScrollStrategy","scrollThrottle","autoClose","overlayRect","ScrollStrategyOptions","close","block","reposition","OverlayConfig","positionStrategy","scrollStrategy","panelClass","hasBackdrop","backdropClass","minWidth","minHeight","maxWidth","maxHeight","disposeOnNavigation","configKeys","ConnectedOverlayPositionChange","connectionPair","scrollableViewProperties","BaseOverlayDispatcher","_attachedOverlays","_isAttached","OverlayKeyboardDispatcher","_cleanupKeydown","_keydownListener","overlays","_keydownEvents","ɵOverlayKeyboardDispatcher_BaseFactory","OverlayOutsideClickDispatcher","_cursorOriginalValue","_cursorStyleIsSet","_pointerDownEventTarget","_addEventListeners","cursor","_pointerDownListener","_clickListener","_outsidePointerEvents","containsPierceShadowDom","outsidePointerEvents","ɵOverlayOutsideClickDispatcher_BaseFactory","child","supportsShadowRoot","current","_CdkOverlayStyleLoader","OverlayContainer","_styleLoader","getContainerElement","_loadStyles","_createContainer","containerClass","oppositePlatformContainers","OverlayRef","_portalOutlet","_host","_pane","_keyboardDispatcher","_outsideClickDispatcher","_animationsDisabled","_backdropElement","_backdropTimeout","_backdropClick","_attachments","_detachments","_positionStrategy","_scrollStrategy","_locationChanges","_cleanupBackdropClick","_cleanupBackdropTransitionEnd","_previousHostParent","_renders","_afterRenderRef","_afterNextRenderRef","afterRender","backdropElement","hostElement","attachResult","_updateStackingOrder","_updateElementSize","_updateElementDirection","_togglePointerEvents","_attachBackdrop","_toggleClasses","detachBackdrop","detachmentResult","_detachContentWhenEmpty","_disposeScrollStrategy","_disposeBackdrop","backdropClick","attachments","detachments","keydownEvents","getConfig","updatePositionStrategy","strategy","updateSize","sizeConfig","setDirection","addPanelClass","classes","removePanelClass","getDirection","updateScrollStrategy","enablePointer","showingClass","backdropToDetach","cssClasses","isAdd","c","backdrop","boundingBoxClass","cssUnitPattern","FlexibleConnectedPositionStrategy","_overlayContainer","_isInitialRender","_lastBoundingBoxSize","_isPushed","_canPush","_growAfterOpen","_hasFlexibleDimensions","_positionLocked","_originRect","_overlayRect","_viewportRect","_viewportMargin","_scrollables","_preferredPositions","_boundingBox","_lastPosition","_lastScrollVisibility","_positionChanges","_resizeSubscription","_offsetX","_offsetY","_transformOriginSelector","_appliedPanelClasses","_previousPushAmount","positionChanges","positions","connectedTo","setOrigin","_validatePositions","reapplyLastPosition","_clearPanelClasses","_resetOverlayElementStyles","_resetBoundingBoxStyles","_getNarrowedViewportRect","_getOriginRect","originRect","viewportRect","flexibleFits","fallback","originPoint","_getOriginPoint","overlayPoint","_getOverlayPoint","overlayFit","_getOverlayFit","isCompletelyWithinViewport","_applyPosition","_canFitWithFlexibleDimensions","boundingBoxRect","_calculateBoundingBoxRect","visibleArea","bestFit","bestScore","fit","score","weight","extendStyles","alignItems","justifyContent","lastPosition","withScrollableContainers","scrollables","withPositions","withViewportMargin","margin","withFlexibleDimensions","flexibleDimensions","withGrowAfterOpen","growAfterOpen","withPush","canPush","withLockedPosition","isLocked","withDefaultOffsetX","offset","withDefaultOffsetY","withTransformOriginOn","selector","originX","startX","_isRtl","endX","originY","overlayStartX","overlayStartY","overlayX","overlayY","point","rawOverlayRect","overlay","getRoundedBoundingClientRect","_getOffset","topOverflow","bottomOverflow","visibleWidth","_subtractOverflows","visibleHeight","fitsInViewportVertically","fitsInViewportHorizontally","availableHeight","availableWidth","getPixelValue","_pushOverlayOnScreen","overflowRight","overflowBottom","overflowTop","overflowLeft","pushX","pushY","_setTransformOrigin","_setOverlayElementStyles","_setBoundingBoxStyles","_addPanelClasses","scrollVisibility","_getScrollVisibility","compareScrollVisibility","isOriginClipped","isOriginOutsideView","isOverlayClipped","isOverlayOutsideView","changeEvent","xOrigin","yOrigin","transformOrigin","smallestDistanceToViewportEdge","previousHeight","previousWidth","_hasExactPosition","hasExactPosition","hasFlexibleDimensions","_getExactOverlayY","_getExactOverlayX","transformString","horizontalStyleProperty","originBounds","overlayBounds","scrollContainerBounds","overflows","currentValue","currentOverflow","axis","cssClass","destination","units","clientRect","floor","wrapperClass","GlobalPositionStrategy","_cssPosition","_topOffset","_bottomOffset","_alignItems","_xPosition","_xOffset","_width","_height","centerHorizontally","centerVertically","parentStyles","shouldBeFlushHorizontally","shouldBeFlushVertically","xPosition","xOffset","marginLeft","marginRight","marginTop","marginBottom","OverlayPositionBuilder","global","flexibleConnectedTo","Overlay","scrollStrategies","_positionBuilder","_directionality","_animationsModuleType","_idGenerator","_createHostElement","pane","_createPaneElement","portalOutlet","_createPortalOutlet","overlayConfig","defaultPositionList","CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY","CdkOverlayOrigin","CdkConnectedOverlay","_overlay","_dir","_templatePortal","_backdropSubscription","_attachSubscription","_detachSubscription","_positionSubscription","_position","_scrollStrategyFactory","_disposeOnNavigation","_updatePositionStrategy","viewportMargin","open","disableClose","transformOriginSelector","lockPosition","positionChange","overlayKeydown","overlayOutsideClick","TemplateRef","_attachOverlay","_detachOverlay","_createOverlay","_buildConfig","_getOriginElement","_createPositionStrategy","currentPosition","_getOrigin","takeWhile","inclusive","CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER","CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY","OverlayModule","SimpleSnackBar_Conditional_2_Template","_r1","ctx_r1","MatSnackBarContainer_ng_template_4_Template","MAX_TIMEOUT","pow","MatSnackBarRef","instance","containerInstance","_afterDismissed","_afterOpened","_onAction","_durationTimeoutId","_dismissedByAction","_onExit","_finishDismiss","dismiss","exit","dismissWithAction","closeWithAction","_dismissAfter","_open","dismissedByAction","afterDismissed","afterOpened","_onEnter","onAction","MAT_SNACK_BAR_DATA","MatSnackBarConfig","announcementMessage","horizontalPosition","verticalPosition","MatSnackBarLabel","MatSnackBarActions","MatSnackBarAction","SimpleSnackBar","snackBarRef","hasAction","matSnackBarAnimations","snackBarState","transition","animate","MatSnackBarContainer","snackBarConfig","_trackedModals","_announceDelay","_announceTimeoutId","_onAnnounce","_animationState","_live","_label","_role","_liveElementId","_assertNotAttached","_afterPortalAttached","onAnimationEnd","fromState","toState","_completeExit","onEnter","enter","_screenReaderAnnounce","_clearFromModals","queueMicrotask","panelClasses","_exposeToModals","labelClass","inertElement","liveElement","focusedElement","MAT_SNACK_BAR_DEFAULT_OPTIONS","MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY","MatSnackBar","_breakpointObserver","_parentSnackBar","skipSelf","_defaultConfig","_snackBarRefAtThisLevel","simpleSnackBarComponent","snackBarContainerComponent","handsetCssClass","_openedSnackBarRef","openFromComponent","_attach","openFromTemplate","_attachSnackBarContainer","containerPortal","containerRef","userConfig","_createInjector","contentRef","_animateSnackBar","isLeft","isRight","MatSnackBarModule","EmptyError","createErrorClass","_super","defer","observableFactory","throwError","errorOrErrorFactory","errorFactory","init","refCount","connection","_refCount","refCounter","sharedConnection","_connection","conn","connect","ConnectableObservable","subjectFactory","hasLift","lift","getSubject","isStopped","_teardown","higherOrderRefCount","switchMap","innerSubscriber","innerIndex","outerIndex","defaultIfEmpty","throwIfEmpty","defaultErrorFactory","hasDefaultValue","concatMap","catchError","handledResult","innerSub","syncUnsub","takeLast","mapTo","PRIMARY_OUTLET","RouteTitleKey","ParamsAsMap","getAll","convertToParamMap","defaultUrlMatcher","segments","segmentGroup","route","pathMatch","hasChildren","posParams","part","segment","consumed","shallowEqual","k1","getDataKeys","k2","equalArraysOrString","aSorted","sort","bSorted","wrapIntoObservable","isObservable","pathCompareMap","exact","equalSegmentGroups","containee","matrixParams","equalPath","matrixParamsMatch","numberOfChildren","subset","containsSegmentGroup","paramCompareMap","equalParams","containsParams","ignored","containsTree","paths","fragment","containsSegmentGroupHelper","containeePaths","containerPaths","containeeSegment","parameters","UrlTree","_queryParamMap","UrlSegmentGroup","queryParamMap","DEFAULT_SERIALIZER","serialize","serializePaths","UrlSegment","_parameterMap","parameterMap","serializePath","as","bs","UrlSerializer","DefaultUrlSerializer","UrlParser","parseRootSegment","parseQueryParams","parseFragment","tree","serializeSegment","serializeQueryParams","strParams","entries","encodeUriQuery","encodeUriFragment","encodeURI","primary","mapChildrenIntoArray","childOutlet","encodeUriString","encodeUriSegment","decode","decodeQuery","serializeMatrixParams","SEGMENT_RE","matchSegments","str","MATRIX_PARAM_SEGMENT_RE","QUERY_PARAM_RE","QUERY_PARAM_VALUE_RE","remaining","consumeOptional","peekStartsWith","parseChildren","parseQueryParam","parseSegment","parseParens","parseMatrixParams","parseParam","matchMatrixKeySegments","valueMatch","matchQueryParams","matchUrlQueryParamValue","decodedKey","decodedVal","currentVal","allowPrimary","outletName","createRoot","rootCandidate","Me","squashSegmentGroup","newChildren","childCandidate","grandChildOutlet","grandChild","mergeTrivialChildren","isUrlTree","createSegmentGroupFromRoute","targetGroup","rootSegmentGroup","createSegmentGroupFromRouteRecursive","currentRoute","childOutlets","childSnapshot","outlet","createUrlTreeFromSegmentGroup","relativeTo","commands","nav","computeNavigation","Navigation","numberOfDoubleDots","isAbsolute","cmd","cmdIdx","outlets","segmentPath","urlPart","partIndex","toRoot","findStartingPositionForTargetGroup","Position","isMatrixParams","createPositionApplyingDoubleDots","ci","dd","newSegmentGroup","processChildren","updateSegmentGroupChildren","updateSegmentGroup","command","isCommandWithOutlets","oldRoot","oldSegmentGroup","qp","replaceSegment","newRoot","oldSegment","newSegment","cmdWithOutlet","startIndex","prefixedWith","currentCommandIndex","currentPathIndex","noMatch","pathIndex","commandIndex","curr","compare","slicedCommands","createNewSegmentGroup","getOutlets","childrenOfEmptyChild","createNewSegmentChildren","stringify","IMPERATIVE_NAVIGATION","EventType","NavigationStart","NavigationEnd","NavigationCancel","NavigationError","RoutesRecognized","ResolveStart","ResolveEnd","GuardsCheckStart","GuardsCheckEnd","RouteConfigLoadStart","RouteConfigLoadEnd","ChildActivationStart","ChildActivationEnd","ActivationStart","ActivationEnd","NavigationSkipped","RouterEvent","navigationTrigger","restoredState","urlAfterRedirects","NavigationCancellationCode","Redirect","SupersededByNewNavigation","NoDataFromResolver","GuardRejected","NavigationSkippedCode","IgnoredSameUrlNavigation","IgnoredByUrlHandlingStrategy","reason","shouldActivate","snapshot","routeConfig","BeforeActivateRoutes","RedirectRequest","navigationBehaviorOptions","getOutlet","getClosestRouteInjector","_loadedInjector","OutletContext","rootInjector","attachRef","ChildrenOutletContexts","contexts","onChildOutletCreated","childName","getOrCreateContext","onChildOutletDestroyed","getContext","onOutletDeactivated","onOutletReAttached","Tree","_root","pathFromRoot","findNode","firstChild","siblings","findPath","cc","TreeNode","nodeChildrenAsMap","RouterState","setRouterState","createEmptyState","rootComponent","createEmptyStateSnapshot","activated","ActivatedRouteSnapshot","RouterStateSnapshot","emptyUrl","emptyParams","emptyData","emptyQueryParams","ActivatedRoute","urlSubject","paramsSubject","queryParamsSubject","fragmentSubject","dataSubject","_futureSnapshot","_routerState","_paramMap","futureSnapshot","paramMap","getInherited","paramsInheritanceStrategy","inherited","loadComponent","_resolvedData","hasStaticTitle","_resolve","serializeNode","advanceActivatedRoute","currentSnapshot","nextSnapshot","shallowEqualArrays","equalParamsAndUrlSegments","equalUrlParams","equalSegments","ROUTER_OUTLET_DATA","RouterOutlet","activatedComponentRef","_activatedRoute","activateEvents","deactivateEvents","attachEvents","detachEvents","routerOutletData","parentContexts","changeDetector","inputBinder","INPUT_BINDER","supportsBindingToComponentInputs","previousValue","isTrackedInParentContexts","deactivate","initializeOutletWithName","unsubscribeFromRouteData","activateWith","isActivated","activatedRoute","activatedRouteData","cmp","insert","bindActivatedRouteToOutletComponent","childContexts","OutletInjector","outletData","__ngOutletInjector","parentInjector","notFoundValue","createNode","routeReuseStrategy","prevState","shouldReuseRoute","createOrReuseChildren","shouldAttach","detachedRouteHandle","retrieve","createActivatedRoute","RedirectCommand","redirectTo","NAVIGATION_CANCELING_ERROR","redirectingNavigationError","urlSerializer","redirect","navigationCancelingError","cancellationCode","isNavigationCancelingError","ActivateRoutes","futureState","currState","forwardEvent","inputBindingEnabled","activate","futureRoot","currRoot","deactivateChildRoutes","activateChildRoutes","futureNode","currNode","futureChild","childOutletName","deactivateRoutes","deactivateRouteAndItsChildren","parentContext","future","shouldDetach","detachAndStoreRouteSubtree","deactivateRouteAndOutlet","treeNode","store","activateRoutes","stored","CanActivate","CanDeactivate","getAllRouteGuards","getChildRouteGuards","getTokenOrFunctionIdentity","tokenOrFunction","NOT_FOUND","ɵisInjectable","futurePath","checks","canDeactivateChecks","canActivateChecks","prevChildren","getRouteGuards","shouldRun","shouldRunGuardsAndResolvers","runGuardsAndResolvers","isEmptyError","INITIAL_VALUE","prioritizedGuardValue","isRedirect","redirectIfUrlTree","NoMatch","AbsoluteRedirect","urlTree","noMatch$1","ApplyRedirects","lineralizeSegments","applyRedirectCommands","redirectToFn","newRedirect","runInInjectionContext","newTree","applyRedirectCreateUrlTree","createSegmentGroup","createQueryParams","redirectToParams","actualParams","sourceName","updatedSegments","createSegments","redirectToSegments","actualSegments","findPosParam","findOrReturn","redirectToUrlSegment","idx","matched","consumedSegments","remainingSegments","positionalParamSegments","matchWithChecks","getOrCreateRouteInjectorIfNeeded","currentInjector","createEnvironmentInjector","runCanMatchGuards","canMatch","injectionToken","guard","isCanMatch","createWildcardMatchResult","slicedSegments","containsEmptyPathMatchesWithNamedOutlets","routes","emptyPathMatch","createChildrenForEmptyPaths","containsEmptyPathMatches","addEmptyPathsToChildrenIfNeeded","primarySegment","NoLeftoversInUrl","Recognizer","configLoader","rootComponentType","applyRedirects","absoluteRedirectCount","allowRedirects","noMatchError","recognize","rootSnapshot","routeState","createUrlTreeFromSnapshot","freeze","processSegmentGroup","parentRoute","processSegment","sortedConfig","sortByMatchingOutlets","scan","accumulator","seed","scanInternals","hasSeed","emitOnNext","emitBeforeComplete","hasState","outletChildren","last$1","mergedChildren","mergeEmptyPathMatches","sortActivatedRouteSnapshots","nodes","localeCompare","processSegmentAgainstRoute","noLeftoversInUrl","rawSegment","matchSegmentAgainstRoute","expandSegmentAgainstRouteUsingRedirect","getData","_loadedComponent","getResolve","newSegments","matchResult","getChildConfig","childConfig","childInjector","matchedOnOutlet","loadChildren","_loadedRoutes","runCanLoadGuards","canLoad","isCanLoad","shouldLoadResult","cfg","canLoadFails","hasEmptyPathConfig","mergedNodes","duplicateEmptyPathNode","resultNode","mergedNode","flattenRouteTree","descendants","flat","switchTap","nextResult","TitleStrategy","buildTitle","pageTitle","getResolvedTitleForRoute","DefaultTitleStrategy","updateTitle","i1","ROUTER_CONFIGURATION","ɵEmptyOutletComponent","standardizeConfig","ROUTES","RouterConfigLoader","componentLoaders","childrenLoaders","onLoadStartListener","onLoadEndListener","compiler","Compiler","loadRunner","maybeUnwrapDefaultExport","NgModuleFactory","compileModuleAsync","factoryOrRoutes","rawRoutes","requireStandaloneComponents","self","isWrappedDefaultExport","default","UrlHandlingStrategy","DefaultUrlHandlingStrategy","shouldProcessUrl","extract","newUrlPart","wholeUrl","CREATE_VIEW_TRANSITION","NAVIGATION_ERROR_HANDLER","NavigationTransitions","currentNavigation","currentTransition","lastSuccessfulNavigation","events","transitionAbortSubject","rootContexts","titleStrategy","urlHandlingStrategy","createViewTransition","navigationErrorHandler","navigationId","hasRequestedNavigation","transitions","afterPreactivation","handleNavigationRequest","setupNavigations","router","initialUrlTree","initialRouterState","currentUrlTree","currentRawUrl","extractedUrl","rawUrl","extras","targetSnapshot","currentRouterState","targetRouterState","guards","guardsResult","overallTransitionState","completed","cancelNavigationTransition","initialUrl","targetBrowserUrl","browserUrl","previousNavigation","urlTransition","navigated","isUpdatingInternalState","isUpdatedBrowserUrl","onSameUrlNavigation","getValue","serializer","recognize$1","finalUrl","routesRecognized","navStart","skipLocationChange","replaceUrl","guardsStart","checkGuards","runCanDeactivateChecks","futureRSS","currRSS","check","runCanDeactivate","currARS","canDeactivate","closestInjector","isCanDeactivate","isBoolean","runCanActivateChecks","fireChildActivationStart","fireActivationStart","runCanActivateChild","futureARS","canActivateChildGuardsMapped","getCanActivateChild","canActivateChild","isCanActivateChild","runCanActivate","canActivate","canActivateObservables","isCanActivate","guardsEnd","resolveStart","dataResolved","resolveData","routesWithResolversToRun","routesNeedingDataUpdates","newRoute","routesProcessed","runResolve","resolveNode","getResolver","resolver","resolvedData","resolveEnd","loadComponents","loadedComponent","viewTransitionStarted","createRouterState","isRedirectingNavigationCancelingError","navigationError","navigationErrorHandlerResult","ee","resolveNavigationPromiseOnError","navCancel","currentBrowserUrl","isBrowserTriggeredNavigation","RouteReuseStrategy","DefaultRouteReuseStrategy","BaseRouteReuseStrategy","detachedTree","ɵDefaultRouteReuseStrategy_BaseFactory","StateManager","HistoryStateManager","canceledNavigationResolution","urlUpdateStrategy","getCurrentUrlTree","rawUrlTree","getRawUrlTree","currentPageId","lastSuccessfulId","browserPageId","ɵrouterPageId","routerState","getRouterState","stateMemento","createStateMemento","registerNonRouterCurrentEntryChangeListener","handleRouterEvent","setBrowserUrl","restoreHistory","generateNgRouterState","navigation","restoringFromCaughtError","targetPagePosition","resetState","resetUrlToCurrentUrlTree","routerPageId","ɵHistoryStateManager_BaseFactory","NavigationResult","COMPLETE","FAILED","REDIRECTING","exactMatchOptions","subsetMatchOptions","Router","stateManager","disposed","nonRouterCurrentEntryChangeSubscription","ɵConsole","pendingTasks","ɵPendingTasksInternal","navigationTransitions","componentInputBindingEnabled","resetConfig","warn","subscribeToNavigationEvents","eventsSubscription","opts","mergedTree","scheduleNavigation","isPublicRouterEvent","resetRootComponentType","initialNavigation","setUpLocationChangeListener","navigateToSyncWithBrowser","stateCopy","parseUrl","serializeUrl","getCurrentNavigation","createUrlTree","navigationExtras","queryParamsHandling","preserveFragment","relativeToUrlSegmentGroup","defaultQueryParamsHandling","removeEmptyProps","navigateByUrl","navigate","validateCommands","isActive","matchOptions","priorPromise","rej","taskId","afterNextNavigation","RouterLink","tabIndexAttribute","onChanges","updateHref","setTabIndexIfNotOnNativeEl","newTabIndex","applyAttributeValue","routerLinkInput","routerLink","commandsOrUrlTree","onClick","button","sanitizedValue","ɵɵsanitizeUrlOrResourceUrl","attrName","attrValue","i3","ROUTER_SCROLLER","rootRoute","getBootstrapListener","bootstrappedComponentRef","components","bootstrapDone","BOOTSTRAP_DONE","INITIAL_NAVIGATION","ROUTER_PRELOADER","InjectFlags","Optional","setUpPreloading","componentTypes","HttpHandler","HttpBackend","HttpHeaders","headers","normalizedNames","lazyInit","lazyUpdate","line","addHeaderEntry","Headers","setHeaderEntries","op","maybeSetNormalizedName","lcName","copyFrom","update","applyUpdate","other","base","toDelete","existing","headerValues","HttpUrlEncodingCodec","encodeKey","standardEncoding","encodeValue","decodeKey","decodeValue","STANDARD_ENCODING_REGEX","STANDARD_ENCODING_REPLACEMENTS","valueToString","HttpParams","encoder","updates","cloneFrom","fromString","fromObject","paramParser","rawParams","codec","param","eqIdx","list","appendAll","eKey","HttpContext","isArrayBuffer","ArrayBuffer","isBlob","Blob","isFormData","FormData","HttpRequest","reportProgress","withCredentials","responseType","method","urlWithParams","transferCache","third","fourth","mightHaveBody","qIdx","serializeBody","isUrlSearchParams","URLSearchParams","JSON","detectContentTypeHeader","setHeaders","setParams","HttpEventType","Sent","UploadProgress","ResponseHeader","DownloadProgress","Response","User","HttpResponseBase","status","statusText","ok","defaultStatus","defaultStatusText","HttpHeaderResponse","HttpResponse","HttpErrorResponse","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","addBody","HttpClient","req","events$","res$","jsonp","callbackParam","patch","post","put","XSSI_PREFIX$1","getResponseUrl$1","xRequestUrl","toLocaleLowerCase","FetchBackend","fetchImpl","FetchFactory","fetch","globalThis","aborter","AbortController","doRequest","abort","_this","_asyncToGenerator","createRequestInit","fetchPromise","silenceSuperfluousUnhandledPromiseRejection","contentLength","chunks","decoder","partialText","receivedLength","reqZone","Zone","TextDecoder","total","loaded","chunksAll","concatChunks","contentType","parseBody","binContent","credentials","Accept","detectedType","totalLength","Uint8Array","chunk","interceptorChainEndFn","finalHandlerFn","HTTP_INTERCEPTOR_FNS","HTTP_ROOT_INTERCEPTOR_FNS","REQUESTS_CONTRIBUTE_TO_STABILITY","HttpInterceptorHandler","backend","chain","contributeToStability","initialRequest","dedupedInterceptorFns","nextSequencedFn","interceptorFn","chainedInterceptorFn","chainTailFn","downstreamRequest","XSSI_PREFIX","HttpXhrBackend","xhrFactory","ɵloadImpl","xhr","setRequestHeader","reqBody","headerResponse","partialFromXhr","getAllResponseHeaders","getResponseUrl","responseURL","getResponseHeader","onLoad","responseText","originalBody","onError","sentHeaders","onDownProgress","progressEvent","lengthComputable","onUpProgress","progress","upload","send","readyState","DONE","XSRF_ENABLED","XSRF_COOKIE_NAME","XSRF_HEADER_NAME","HttpXsrfTokenExtractor","HttpXsrfCookieExtractor","lastCookieString","lastToken","parseCount","getToken","cookieString","xsrfInterceptorFn","lcUrl","headerName","HttpFeatureKind","Interceptors","LegacyInterceptors","CustomXsrfConfiguration","NoXsrfProtection","JsonpSupport","RequestsMadeViaParent","Fetch","AppStateService","appState$","initializeState","getState$","setState","localStorage","setItem","getProperty","propertyName","updatedState","appStateJson","getItem","appState","SecurityService","appStateService","setToken","removeToken","isValidToken","payload","atob","currentTime","valueOf","exp","getPagedAsyncIterator","pagedResult","iter","getItemAsyncIterator","_c","_d","e_2","_e","_f","pages","getPageAsyncIterator","firstVal","pages_2_1","_h","pages_2","e_2_1","toElements","pages_1_1","_g","pages_1","byPage","settings","continuationToken","maxPageSize","pageLink","getPage","firstPageLink","page","nextPageLink","ValidPhaseNames","HttpPipeline","policies","_policies","_orderedPolicies","addPolicy","policy","phase","afterPhase","removePolicy","removedPolicies","policyDescriptor","sendRequest","httpClient","getOrderedPolicies","orderPolicies","policyMap","createPhase","hasRun","hasAfterPolicies","serializePhase","noPhase","deserializePhase","retryPhase","signPhase","orderedPhases","getPhase","descriptor","policyName","dependsOn","dependants","afterPolicies","afterPolicyName","afterNode","beforePolicies","beforePolicyName","beforeNode","walkPhase","dependant","walkPhases","iteration","initialResultLength","debugEnvVariable","env","DEBUG","enabledString","enabledNamespaces","skippedNamespaces","debuggers","debugObj","assign","createDebugger","log","firstArg","debug","namespaces","wildcard","namespaceList","ns","substr","skipped","enabledNamespace","newDebugger","extend","registeredLoggers","logLevelFromEnv","AZURE_LOG_LEVEL","azureLogLevel","AzureLogger","AZURE_LOG_LEVELS","isAzureLogLevel","setLogLevel","level","logger","shouldEnable","levelMap","verbose","warning","createClientLogger","clientRootLogger","patchLogMethod","createLogger","logLevel","AbortError","getRandomIntegerInclusive","ceil","random","timeInMs","abortSignal","abortErrorMsg","createAbortablePromise","buildPromise","cleanupBeforeAbort","rejectOnAbort","removeListeners","onAbort","aborted","isObject","isError","getErrorMessage","stringified","uint8ArrayToString","bytes","uint8ArrayToUtf8String","uint8ArrayToBase64","uint8ArrayToBase64Url","uint8ArrayToHexString","padStart","stringToUint8Array","utf8StringToUint8Array","TextEncoder","encode","base64ToUint8Array","base64UrlToUint8Array","hexStringToUint8Array","highNibble","lowNibble","hexDigits","btoa","charCodeAt","subtleCrypto","getCrypto","crypto","subtle","_computeSha256Hmac","stringToSign","encoding","keyBytes","stringToSignBytes","cryptoKey","importKey","signature","sign","_computeSha256Hash","contentBytes","digest","isDefined","thing","uuidFunction","randomUUID","generateUUID","uuid","randomNumber","importScripts","Deno","version","Bun","isNodeLike","versions","RedactedString","defaultAllowedHeaderNames","defaultAllowedQueryParameters","Sanitizer","additionalAllowedHeaderNames","allowedHeaderNames","additionalAllowedQueryParameters","allowedQueryParameters","sanitizeHeaders","sanitizeUrl","sanitizeQuery","searchParams","sanitized","redirectPolicyName","allowedRedirect","handleRedirect","_x","_x2","_x3","_handleRedirect","maxRetries","currentRetries","locationHeader","_setPlatformSpecificData","localNavigator","osPlatform","userAgentData","entropyValues","getHighEntropyValues","architecture","platformVersion","brand","getBrandVersionString","brands","brandOrder","foundBrand","getBrowserInfo","browserRegexes","regex","browser","EdgeRuntime","getUserAgentValue","_getUserAgentValue","runtimeInfo","setPlatformSpecificData","defaultAgent","getUserAgentString","telemetryInfo","UserAgentHeaderName","rawContent","isNodeReadableStream","isWebReadableStream","tee","toBlobPart","_toBlobPart","drain","blob","getRawContent","hasRawContent","_concat","encodeHeaders","getLength","byteLength","_buildRequestBody","boundary","flatMap","getTotalLength","partLength","multipartPolicyName","validBoundaryCharacters","delayInMs","onAborted","parseHeaderValueAsNumber","valueAsNum","RetryAfterHeader","AllRetryAfterHeaders","getRetryAfterInMs","header","retryAfterValue","retryAfterHeader","exponentialRetryStrategy","retryInterval","retryDelayInMs","maxRetryInterval","maxRetryDelayInMs","retry","retryCount","responseError","matchedSystemError","isSystemError","ignoreSystemErrors","isExponential","isExponentialRetryResponse","ignoreExponentialResponse","ignoreHttpStatusCodes","isThrottlingRetryResponse","skipStrategy","calculateRetryDelay","retryAttempt","exponentialDelay","clampedDelay","retryAfterInMs","errorToThrow","retryPolicyLogger","retryPolicy","strategies","retryRequest","requestId","strategiesLoop","strategyLogger","normalizeName","HttpHeadersImpl","rawHeaders","_headersMap","toJSON","preserveCase","entry","normalizedName","headerIterator","createHttpHeaders","_prepareFormData","formData","fieldName","fileName","multipartBody","knownContextKeys","span","for","createTracingContext","TracingContextImpl","initialContext","_contextMap","newContext","deleteValue","instrumenterImplementation","getInstrumenter","createDefaultInstrumenter","createRequestHeaders","parseTraceparentHeader","startSpan","_name","spanOptions","isRecording","recordException","setStatus","addEvent","tracingContext","withContext","callbackArgs","createTracingClient","packageName","packageVersion","operationOptions","startSpanResult","tracingOptions","updatedOptions","_withSpan","withSpan","_x4","traceparentHeader","custom","errorSanitizer","RestError","statusCode","enumerable","setPrototypeOf","REQUEST_SEND_ERROR","PARSE_ERROR","isRestError","createPipelineFromOptions","pipeline","createEmptyPipeline","agent","agentPolicy","tlsOptions","tlsPolicy","tlsSettings","proxyPolicy","decompressResponsePolicy","formDataPolicy","formDataToFormDataMap","formDataMap","wwwFormUrlEncode","urlSearchParams","subValue","prepareFormData","userAgentPolicy","userAgentValue","userAgentPrefix","userAgentOptions","setClientRequestIdPolicy","requestIdHeaderName","telemetryOptions","clientRequestIdHeaderName","multipartPolicy","contentTypeHeader","parsedHeader","parsedBoundary","assertValidBoundary","generateBoundary","buildRequestBody","defaultRetryPolicy","retryOptions","tracingPolicy","userAgentPromise","sanitizer","tracingClient","tryCreateTracingClient","spanAttributes","tryCreateSpan","spanKind","tryProcessResponse","serviceRequestId","tryProcessError","loggingOptions","redirectPolicy","redirectOptions","logPolicy","coreLogger","FetchHttpClient","allowInsecureConnection","proxySettings","makeRequest","_makeRequest","getError","abortController","abortControllerCleanup","setupAbortSignal","abortListener","buildFetchHeaders","pipelineHeaders","streaming","requestBody","buildBodyStream","onProgress","onUploadProgress","requestInit","Request","cache","duplex","loadedBytes","buildPipelineResponse","_buildPipelineResponse","httpResponse","buildPipelineHeaders","responseHeaders","bodyStream","onDownloadProgress","onEnd","streamResponseStatusCodes","POSITIVE_INFINITY","enableBrowserStreams","browserStreamBody","responseStream","blobBody","bodyAsText","isTransformStreamSupported","pipeThrough","TransformStream","controller","enqueue","terminate","ReadableStream","pull","PipelineRequestImpl","disableKeepAlive","createPipelineRequest","DEFAULT_CYCLER_OPTIONS","forcedRefreshWindowInMs","retryIntervalInMs","refreshWindowInMs","_beginRefresh","getAccessToken","refreshTimeout","tryGetAccessToken","_tryGetAccessToken","finalToken","trySendRequest","_trySendRequest","defaultAuthorizeRequest","_defaultAuthorizeRequest","scopes","getTokenOptions","enableCae","accessToken","isChallengeResponse","authorizeRequestOnCaeChallenge","_x5","_authorizeRequestOnCaeChallenge","onChallengeOptions","caeClaims","claims","tokenType","bearerTokenAuthenticationPolicy","credential","challengeCallbacks","callbacks","authorizeRequest","authorizeRequestOnChallenge","createTokenCycler","tokenCyclerOptions","tenantId","refreshWorker","cycler","isRefreshing","shouldRefresh","refreshAfterTimestamp","expiresOnTimestamp","mustRefresh","refresh","beginRefresh","_token","tokenOptions","hasClaimChallenge","shouldSendRequest","getCaeChallengeClaims","parsedClaim","challenges","parseChallenges","challengeRegex","paramRegex","parsedChallenges","exec","scheme","paramsString","paramMatch","SyncTokenHeaderName","SyncTokens","_currentSyncTokens","addSyncTokenFromHeaderValue","syncTokenHeaderValue","newTokens","parseSyncToken","newToken","existingToken","sequenceNumber","getSyncTokenHeaderValue","syncTokenStrings","syncToken","syncTokenRegex","featureFlagPrefix","quoteETag","etag","checkAndFormatIfAndIfNoneMatch","objectWithEtag","onlyIfChanged","onlyIfUnchanged","ifMatch","ifNoneMatch","formatFiltersAndSelect","listConfigOptions","acceptDatetime","acceptDateTime","toISOString","keyFilter","labelFilter","tags","tagsFilter","formatFieldsForSelect","fields","formatAcceptDateTime","newOptions","extractAfterTokenFromNextLink","nextLink","afterToken","transformKeyValue","kvp","setting","isReadOnly","locked","serializeAsConfigurationSettingParam","isSimpleConfigSetting","isConfigSettingWithFeatureFlagValue","featureFlag","jsonFeatureFlagValue","description","conditions","client_filters","clientFilters","display_name","displayName","FeatureFlagHelper","isConfigSettingWithSecretReferenceValue","secretReference","jsonSecretReferenceValue","uri","secretId","SecretReferenceHelper","transformKeyValueResponseWithStatusCode","hasUnderscoreResponse","_response","transformKeyValueResponse","eTag","transformSnapshotResponse","fieldNames","assertResponse","encodeByteArray","decodeString","byteString","XML_ATTRKEY","isPrimitiveBody","mapperTypeName","validateISODuration","validUuidRegex","flattenResponse","fullResponse","responseSpec","parsedHeaders","parsedBody","bodyMapper","isNullable","nullable","expectedBodyTypeName","readableStreamBody","modelProperties","isPageableResponse","serializedName","arrayResponse","getOwnPropertyNames","handleNullableResponseAndWrappableBody","responseObject","combinedHeadersAndBody","hasNullableType","shouldWrapBody","SerializerImpl","modelMappers","isXML","validateConstraints","mapper","objectName","failValidation","constraintName","constraintValue","constraints","ExclusiveMaximum","ExclusiveMinimum","InclusiveMaximum","InclusiveMinimum","MaxItems","MaxLength","MinItems","MinLength","MultipleOf","Pattern","UniqueItems","ar","object","rootName","includeRoot","xmlCharKey","mapperType","isConstant","required","serializeBasicTypes","typeName","isValidUuid","objectType","isView","serializeEnumType","allowedValues","serializeDateTypes","toUTCString","dateToUnixTime","isDuration","serializeByteArrayType","base64","serializeBase64UrlType","bufferToBase64Url","trimEnd","len","serializeSequenceType","isXml","elementType","tempArray","serializedValue","xmlNamespace","xmlnsKey","xmlNamespacePrefix","D","serializeDictionaryType","valueType","tempDictionary","getXmlObjectValue","serializeCompositeType","getPolymorphicDiscriminatorRecursively","getPolymorphicMapper","modelProps","resolveModelProperties","propertyMapper","readOnly","propName","parentObject","xmlIsWrapped","xmlName","xmlElementName","splitSerializeName","pathName","H","propertyObjectName","toSerialize","polymorphicDiscriminator","clientName","xmlIsAttribute","additionalPropertiesMapper","resolveAdditionalProperties","additionalProperties","modelMapper","resolveReferencedMapper","propNames","clientPropName","pn","responseBody","ignoreUnknownProperties","deserializeCompositeType","handledPropertyNames","headerCollectionPrefix","dictionary","headerKey","xmlIsMsText","wrapped","elementList","propertyInstance","steps","arrayInstance","isAdditionalProperty","responsePropName","isSpecialXmlProperty","unixTimeToDate","base64UrlToByteArray","deserializeSequenceType","deserializeDictionaryType","partialclass","subwords","polymorphicPropertyName","discriminatorName","discriminatorValue","uberParent","polymorphicMapper","getIndexDiscriminator","discriminators","typeNamesToCheck","currentName","indexDiscriminator","getPolymorphicDiscriminatorSafely","operationRequestMap","getOperationArgumentValueFromParameter","operationArguments","parameter","fallbackObject","parameterPath","parameterMapper","propertySearchResult","getPropertyFromParameterPath","propertyFound","useDefaultValue","propertyValue","parameterPathPart","originalRequestSymbol","getOperationRequestInfo","hasOriginalRequest","defaultJsonContentTypes","defaultXmlContentTypes","_deserializeResponseBody","jsonContentTypes","xmlContentTypes","parseXML","parsedResponse","_x6","_x7","_x8","_x9","_x10","_parse","shouldDeserializeResponse","operationInfo","shouldDeserialize","operationSpec","responses","getOperationResponseMap","operationResponseGetter","shouldReturnResponse","handleErrorResponse","isSuccessByStatus","isOperationSpecEmpty","expectedStatusCodes","errorResponseSpec","initialErrorMessage","defaultBodyMapper","defaultHeadersMapper","headersMapper","deserializedError","valueToDeserialize","elementName","internalError","defaultError","deserializeError","httpMethod","operationResponse","contentComponents","getPathStringFromParameter","cachedHttpClient","CollectionFormatToDelimiterMap","CSV","SSV","Multi","TSV","Pipes","getRequestUrl","baseUri","urlReplacements","calculateUrlReplacements","urlParameters","urlParameter","urlParameterValue","parameterPathString","skipEncoding","isAbsolutePath","requestUrl","replaceAll","isAbsoluteUrl","appendPath","pathToAppend","parsedUrl","searchStart","sequenceParams","calculateQueryParameters","queryParameters","queryParameter","queryParameterValue","delimiter","collectionFormat","appendQueryParams","noOverwrite","combinedParams","simpleParseQueryParams","queryString","pairs","pair","existingValue","valueSet","searchPieces","replacements","searchValue","replaceValue","ServiceClient","_requestContentType","requestContentType","_endpoint","endpoint","_allowInsecureConnection","_httpClient","getCachedDefaultHttpClient","createDefaultHttpClient","createFetchHttpClient","createDefaultPipeline","credentialScopes","getCredentialScopes","credentialOptions","createClientPipeline","serializationPolicy","stringifyXML","serializeHeaders","headerParameters","headerParameter","headerValue","customHeaders","requestOptions","customHeaderName","serializeRequestBody","serializerOptions","requestBodyParameterPathString","isStream","getXmlValueWithNamespace","prepareXMLRootList","xmlNamespaceKey","mediaType","formDataParameters","formDataParameter","formDataParameterValue","formDataParameterPropertyName","serializationOptions","deserializationPolicy","expectedContentTypes","json","deserializeResponseBody","deserializationOptions","additionalPolicies","sendOperationRequest","_this2","baseUrl","getStreamingResponseStatusCodes","rawResponse","flatResponse","onResponse","details","disableKeepAlivePolicyName","originalClientRequestSymbol","toWebResourceLike","originalRequest","webResource","toHttpHeadersLike","keepAlive","prepare","validateRequestProperties","createProxy","toPipelineRequest","toJson","newRequest","getHeaderKey","headersArray","headerNames","resultPreservingCasing","originalResponse","toCompatResponse","ExtendedServiceClient","keepAliveOptions","pipelineContainsDisableKeepAlivePolicy","createDisableKeepAlivePolicy","handleRedirects","_superprop_getSendOperationRequest","userProvidedCallBack","lastResponse","POLL_INTERVAL_IN_MS","terminalStates","setStateError","stateProxy","isOperationError","setError","setFailed","appendReadableErrorMessage","currentMessage","innerMessage","processOperationStatus","isDone","processResult","setErrorAsResult","setSucceeded","postfix","simplifyError","curErr","innererror","errStr","setCanceled","setResult","buildResult","_initOperation","getOperationStatus","withOperationLocation","operationLocation","resourceLocation","metadata","initState","_pollOperationHelper","poll","getResourceLocation","_pollOperation","getOperationLocation","getPollingInterval","updateState","setDelay","pollOperationHelper","intervalInMs","isUpdated","getOperationLocationPollingUrl","azureAsyncOperation","getLocationHeader","getOperationLocationHeader","getAzureAsyncOperationHeader","findResourceLocation","requestMethod","requestPath","resourceLocationConfig","getDefault","transformStatus","toOperationStatus","parseRetryAfter","retryAfter","retryAfterInSeconds","calculatePollingIntervalFromDate","retryAfterDate","timeNow","retryAfterTime","getErrorFromResponse","accessBodyProperty","getStatusFromInitialResponse","helper","getStatus","getProvisioningState","properties","provisioningState","loc","_createHttpPoller","lro","restoreFrom","resolveOnUnsuccessful","buildCreatePoller","getStatusFromPollResponse","withOperationLocationCallback","createStateProxy","setRunning","getResult","isCanceled","isFailed","isRunning","isSucceeded","called","deserializeState","serializedState","initOperation","resultPromise","handleProgressEvents","_ref2","h","cancelErrMsg","currentPollIntervalInMs","poller","getOperationState","stopPolling","pollUntilDone","pollOptions","inputAbortSignal","once","finally","pollOperation","pollIntervalInMs","sendInitialRequest","inferLroMode","pollingUrl","normalizedRequestMethod","sendPollRequest","KeyListResult","Key","ErrorModel","KeyValueListResult","KeyValue","lastModified","SnapshotListResult","ConfigurationSnapshot","filters","compositionType","createdOn","expiresOn","retentionPeriodInSeconds","sizeInBytes","itemCount","ConfigurationSettingsFilter","SnapshotUpdateParameters","LabelListResult","SettingLabel","OperationDetails","ErrorDetail","InnerError","AppConfigurationGetKeysHeaders","AppConfigurationCheckKeysHeaders","AppConfigurationGetKeyValuesHeaders","AppConfigurationCheckKeyValuesHeaders","AppConfigurationGetKeyValueHeaders","AppConfigurationPutKeyValueHeaders","AppConfigurationDeleteKeyValueHeaders","AppConfigurationCheckKeyValueHeaders","AppConfigurationGetSnapshotsHeaders","AppConfigurationCheckSnapshotsHeaders","AppConfigurationGetSnapshotHeaders","link","AppConfigurationCreateSnapshotHeaders","AppConfigurationUpdateSnapshotHeaders","AppConfigurationCheckSnapshotHeaders","AppConfigurationGetLabelsHeaders","AppConfigurationCheckLabelsHeaders","AppConfigurationPutLockHeaders","AppConfigurationDeleteLockHeaders","AppConfigurationGetRevisionsHeaders","AppConfigurationCheckRevisionsHeaders","AppConfigurationGetKeysNextHeaders","AppConfigurationGetKeyValuesNextHeaders","AppConfigurationGetSnapshotsNextHeaders","AppConfigurationGetLabelsNextHeaders","AppConfigurationGetRevisionsNextHeaders","accept","apiVersion","after","accept1","accept2","key1","entity","KeyValueMapper","accept3","select1","accept4","name1","entity1","ConfigurationSnapshotMapper","entity2","SnapshotUpdateParametersMapper","accept5","select2","AppConfiguration","coreHttpCompat","packageDetails","addCustomApiVersionPolicy","newParams","getKeysOperationSpec","checkKeys","checkKeysOperationSpec","getKeyValues","getKeyValuesOperationSpec","checkKeyValues","checkKeyValuesOperationSpec","getKeyValue","getKeyValueOperationSpec","putKeyValue","putKeyValueOperationSpec","deleteKeyValue","deleteKeyValueOperationSpec","checkKeyValue","checkKeyValueOperationSpec","getSnapshots","getSnapshotsOperationSpec","checkSnapshots","checkSnapshotsOperationSpec","getSnapshot","getSnapshotOperationSpec","beginCreateSnapshot","directSendOperation","spec","createLroSpec","sendOperationFn","restSpec","currentRawResponse","providedCallback","updatedArgs","createSnapshotOperationSpec","createHttpPoller","resumeFrom","updateIntervalInMs","beginCreateSnapshotAndWait","updateSnapshot","updateSnapshotOperationSpec","checkSnapshot","checkSnapshotOperationSpec","getLabels","getLabelsOperationSpec","checkLabels","checkLabelsOperationSpec","putLock","putLockOperationSpec","deleteLock","deleteLockOperationSpec","getRevisions","getRevisionsOperationSpec","checkRevisions","checkRevisionsOperationSpec","getOperationDetails","getOperationDetailsOperationSpec","getKeysNext","getKeysNextOperationSpec","getKeyValuesNext","getKeyValuesNextOperationSpec","getSnapshotsNext","getSnapshotsNextOperationSpec","getLabelsNext","getLabelsNextOperationSpec","getRevisionsNext","getRevisionsNextOperationSpec","createSerializer","coreClient","Mappers","Parameters","ConnectionStringRegex","deserializationContentTypes","AppConfigurationClient","connectionStringOrEndpoint","tokenCredentialOrOptions","appConfigCredential","appConfigEndpoint","authPolicy","appConfigOptions","isTokenCredential","signRequest","regexMatch","appConfigKeyCredentialPolicy","secret","utcNow","contentHash","computeSha256Hash","computeSha256Hmac","internalClientPipelineOptions","_syncTokens","syncTokens","client","syncTokenPolicy","addConfigurationSetting","configurationSetting","keyValue","deleteConfigurationSetting","getConfigurationSetting","_this3","_ref3","makeConfigurationSettingEmpty","names","listConfigurationSettings","_this4","pageEtags","_ref4","sendConfigurationSettingsRequest","currentResponse","extractAfterTokenFromLinkHeader","linkValue","listConfigurationSettingsForSnapshot","snapshotName","_this5","_ref5","listLabels","_this6","_ref6","sendLabelsRequest","_this7","_ref7","formatLabelsFiltersAndSelect","listLabelsOptions","nameFilter","_this8","_ref8","formatConfigurationSettingsFiltersAndSelect","listRevisions","_this9","_ref9","sendRevisionsRequest","_this10","_ref10","setConfigurationSetting","_this11","_ref11","_x11","setReadOnly","_this12","_ref12","_x12","updateSyncToken","_this13","_ref13","_x13","recoverSnapshot","_this14","_ref14","_x14","archiveSnapshot","_this15","_ref15","_x15","listSnapshots","_this16","_ref16","sendSnapShotsRequest","_x16","_this17","_ref17","formatSnapshotFiltersAndSelect","listSnapshotOptions","statusFilter","_x17","ConfigurationService","appConfiguration","_listConfigurationSettings","configuration","resolveFn","rejectFn","connectionString","buildJetfileConfigurationFromLocalFile","buildJetfileConfigurationFromAzure","alert","wugPortalApiUrl","environmentAlias","initListSettings","getConfigurationSettingValue","settingName","settingValue","nameOf","marker","AppSessionStateService","appSessionStateJson","sessionStorage","appSessionState","effectiveDateTimestamp","effectiveDate","expirationDateTimestamp","expirationDate","removeItem","getEffectiveDateWithTimeShift","setMinutes","getTimezoneOffset","getExpirationDateWithTimeShift","AuthService","http","securityService","configurationService","appSessionStateService","login","email","password","logOut","insured","setCurrentUser","user","i2","i4","i5","LoadingService","isLoading$","unload","NotificationType","Information","NotificationService","notifications$","showInformation","showError","AppComponent","authService","loadingService","notificationService","snackBar","isLoading","notification","i6","AppComponent_mat_progress_bar_0_Template","i7","i8","AsyncAnimationRendererFactory","animationType","moduleImpl","_rendererFactoryPromise","ɵChangeDetectionScheduler","loadingSchedulerFn","ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN","_engine","loadImpl","loadFn","__webpack_require__","moduleImplPromise","ɵcreateEngine","ɵAnimationRendererFactory","rendererFactory","rendererType","ɵtype","dynamicRenderer","DynamicDelegationRenderer","animationRendererFactory","animationRenderer","use","notify","begin","whenRenderingDone","replay","impl","isMove","isHostElement","shouldReplay","propOrEventName","AppInitializer","QuotingService","getQuoting","appQuotingStateJson","setQuoting","quoting","forkJoin","remainingCompletions","remainingEmissions","sourceIndex","BaseControlValueAccessor","onChange","onTouched","registerOnTouched","registerOnChange","setDisabledState","BuiltInControlValueAccessor","ɵBuiltInControlValueAccessor_BaseFactory","NG_VALUE_ACCESSOR","DEFAULT_VALUE_ACCESSOR","forwardRef","DefaultValueAccessor","COMPOSITION_BUFFER_MODE","_compositionMode","_composing","_isAndroid","writeValue","_handleInput","_compositionStart","_compositionEnd","standalone","isEmptyInputValue","hasValidLength","NG_VALIDATORS","NG_ASYNC_VALIDATORS","EMAIL_REGEXP","Validators","minValidator","actual","maxValidator","requiredValidator","requiredTrue","requiredTrueValidator","emailValidator","minLength","minLengthValidator","minlength","requiredLength","actualLength","maxLength","maxLengthValidator","maxlength","patternValidator","nullValidator","regexStr","requiredPattern","actualValue","compose","validators","composeAsync","isPresent","toObservable","mergeErrors","arrayOfErrors","errors","executeValidators","validator","normalizeValidators","isValidatorFn","validate","presentValidators","composeValidators","composeAsyncValidators","mergeValidators","controlValidators","dirValidator","getControlValidators","_rawValidators","getControlAsyncValidators","_rawAsyncValidators","makeValidatorsArray","hasValidator","addValidators","currentValidators","validatorsToAdd","removeValidators","AbstractControlDirective","valid","pristine","dirty","untouched","statusChanges","valueChanges","_composedValidatorFn","_composedAsyncValidatorFn","_setValidators","_setAsyncValidators","asyncValidator","_onDestroyCallbacks","_registerOnDestroy","_invokeOnDestroyCallbacks","hasError","errorCode","ControlContainer","formDirective","NgControl","valueAccessor","AbstractControlStatus","_cd","cd","isTouched","_touched","isUntouched","isPristine","_pristine","isDirty","_status","isInvalid","isPending","isSubmitted","_submitted","NgControlStatus","NgControlStatusGroup","VALID","INVALID","PENDING","DISABLED","ControlEvent","ValueChangeEvent","PristineChangeEvent","TouchedChangeEvent","StatusChangeEvent","FormSubmittedEvent","FormResetEvent","pickValidators","validatorOrOpts","isOptionsObj","pickAsyncValidators","asyncValidators","assertControlPresent","isGroup","controls","assertAllValuesPresent","_forEachChild","AbstractControl","_pendingDirty","_hasOwnPendingAsyncValidator","_pendingTouched","_onCollectionChange","_updateOn","_asyncValidationSubscription","_assignValidators","_assignAsyncValidators","validatorFn","asyncValidatorFn","statusReactive","computed","pristineReactive","touchedReactive","asObservable","updateOn","setValidators","setAsyncValidators","addAsyncValidators","removeAsyncValidators","hasAsyncValidator","clearValidators","clearAsyncValidators","markAsTouched","sourceControl","onlySelf","markAllAsTouched","markAsUntouched","_updateTouched","markAsDirty","markAsPristine","_updatePristine","markAsPending","skipPristineCheck","_parentMarkedDirty","_updateValue","_updateAncestors","_onDisabledChange","changeFn","updateValueAndValidity","setParent","getRawValue","_setInitialStatus","shouldHaveEmitted","_cancelExistingSubscription","_runValidator","_calculateStatus","_runAsyncValidator","_updateTreeValidity","ctrl","_allControlsDisabled","setErrors","_updateControlsErrors","currPath","_find","changedControl","_initObservables","_anyControlsHaveStatus","_anyControls","_anyControlsDirty","_anyControlsTouched","newPristine","_registerOnCollectionChange","_setUpdateStrategy","coerceToValidator","coerceToAsyncValidator","FormGroup","_setUpControls","registerControl","addControl","removeControl","setControl","controlName","patchValue","_reduceChildren","acc","_syncPendingControls","subtreeUpdated","updated","_reduceValue","initValue","FormRecord","CALL_SET_DISABLED_STATE","setDisabledStateDefault","controlPath","setUpControl","callSetDisabledState","setUpValidators","setUpViewChangePipeline","_pendingValue","_pendingChange","updateControl","setUpModelChangePipeline","emitModelEvent","viewToModelUpdate","_unregisterOnChange","setUpBlurPipeline","setUpDisabledChangeHandler","onDisabledChange","registerOnDisabledChange","_unregisterOnDisabledChange","cleanUpControl","validateControlPresenceOnChange","cleanUpValidators","registerOnValidatorChange","onValidatorChange","isControlUpdated","updatedValidators","updatedAsyncValidators","emitModelToViewChange","setUpFormContainer","isPropertyUpdated","viewModel","model","isFirstChange","is","syncPendingControls","directives","selectValueAccessor","valueAccessors","defaultAccessor","builtinAccessor","customAccessor","isBuiltInAccessor","formDirectiveProvider$1","NgForm","resolvedPromise$1","submittedReactive","_directives","ngSubmit","_findContainer","getControl","addFormGroup","removeFormGroup","getFormGroup","updateModel","onSubmit","onReset","resetForm","removeListItem","isFormControlState","formState","FormControl","_onChange","_applyFormState","nonNullable","initialValueIsDefault","emitViewToModelChange","formControlBinding$1","NgModel","resolvedPromise","_registered","_checkForErrors","_checkName","oldName","_getPath","_setUpControl","_updateDisabled","_isStandalone","_setUpStandalone","_checkParentType","disabledValue","ɵNgNoValidate","NG_MODEL_WITH_FORM_CONTROL_WARNING","formDirectiveProvider","FormGroupDirective","_submittedReactive","_oldForm","_updateDomValue","_checkFormPresent","_updateValidators","_updateRegistrations","removeListItem$1","_setUpFormContainer","_cleanUpFormContainer","addFormArray","removeFormArray","getFormArray","oldCtrl","newCtrl","isFormControl","cleanUpFormContainer","controlNameBinding","FormControlName","_ngModelWarningConfig","_added","_ngModelWarningSent","ɵInternalFormsSharedModule","FormArray","at","_adjustIndex","_registerControl","removeAt","adjustedIndex","isAbstractControlOptions","FormBuilder","useNonNullable","nnfb","reducedControls","_reduceControls","createdControls","_createControl","FormsModule","withConfig","ngModule","ReactiveFormsModule","warnOnNgModelWithFormControl","MAT_CHECKBOX_DEFAULT_OPTIONS","MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY","clickAction","TransitionCheckState","Init","Checked","Unchecked","Indeterminate","MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR","MatCheckbox","MatCheckboxChange","checked","_inputElement","_createChangeEvent","isChecked","_getAnimationTargetElement","_animationClasses","uncheckedToChecked","uncheckedToIndeterminate","checkedToUnchecked","checkedToIndeterminate","indeterminateToChecked","indeterminateToUnchecked","ariaLabel","ariaLabelledby","ariaDescribedby","ariaExpanded","ariaControls","_uniqueId","inputId","indeterminateChange","_labelElement","_onTouched","_currentAnimationClass","_currentCheckState","_controlValueAccessorChangeFn","_validatorChangeFn","HostAttributeToken","_syncIndeterminate","_indeterminate","_checked","indeterminate","_transitionCheckState","_isRippleDisabled","_onLabelTextChange","_getAnimationClassForCheckStateTransition","animationClass","_emitChangeEvent","_handleInputClick","_onInteractionEvent","stopPropagation","nativeCheckbox","_onInputClick","_onTouchTargetClick","_preventBubblingFromLabel","checkbox_r2","MatCheckboxModule","ReplaySubject","_bufferSize","_windowTime","_timestampProvider","_buffer","_infiniteTimeWindow","_trimBuffer","_throwIfClosed","_innerSubscribe","copy","_checkFinalizedStatuses","adjustedBufferSize","share","connector","resetOnError","resetOnComplete","resetOnRefCountZero","wrapperSource","resetConnection","hasCompleted","hasErrored","cancelReset","resetAndUnsubscribe","dest","handleReset","SafeSubscriber","onSubscriber","SingleBoxSharedResizeObserver","_box","_resizeSubject","_resizeObserver","_elementObservables","ResizeObserver","box","unobserve","shareReplay","configOrBufferSize","windowTime","bufferSize","SharedResizeObserver","_cleanupErrorListener","_observers","_c7","MatFormField_ng_template_0_Conditional_0_Conditional_2_Template","MatFormField_ng_template_0_Conditional_0_Template","_shouldLabelFloat","_hasOutline","_labelId","_control","disableAutomaticLabeling","hideRequiredMarker","MatFormField_ng_template_0_Template","_hasFloatingLabel","MatFormField_Conditional_4_Template","MatFormField_Conditional_6_Conditional_1_ng_template_0_Template","MatFormField_Conditional_6_Conditional_1_Template","labelTemplate_r3","MatFormField_Conditional_6_Template","_forceDisplayInfixLabel","MatFormField_Conditional_7_Template","MatFormField_Conditional_8_Template","MatFormField_Conditional_10_ng_template_0_Template","MatFormField_Conditional_10_Template","MatFormField_Conditional_12_Template","MatFormField_Conditional_13_Template","MatFormField_Conditional_14_Template","MatFormField_Case_16_Template","_subscriptAnimationState","MatFormField_Case_17_Conditional_1_Template","_hintLabelId","hintLabel","MatFormField_Case_17_Template","MatLabel","MAT_ERROR","MatError","MatHint","align","MAT_PREFIX","MAT_SUFFIX","MatSuffix","_isTextSelector","_isText","FLOATING_LABEL_PARENT","MatFormFieldFloatingLabel","floating","_floating","monitorResize","_handleResize","_monitorResize","_subscribeToResize","getWidth","estimateScrollWidth","offsetParent","cloneNode","_handleLabelResized","ACTIVATE_CLASS","DEACTIVATING_CLASS","MatFormFieldLineRipple","_handleTransitionEnd","isDeactivating","MatFormFieldNotchedOutline","_notch","_setNotchWidth","labelWidth","matFormFieldAnimations","transitionMessages","MatFormFieldControl","stateChanges","placeholder","focused","empty","shouldLabelFloat","controlType","autofilled","userAriaDescribedBy","MAT_FORM_FIELD","MAT_FORM_FIELD_DEFAULT_OPTIONS","MatFormField","_defaults","_textField","_iconPrefixContainer","_textPrefixContainer","_iconSuffixContainer","_textSuffixContainer","_floatingLabel","_notchedOutline","_lineRipple","_formFieldControl","_prefixChildren","_suffixChildren","_errorChildren","_hintChildren","_labelChild","contentChild","_hideRequiredMarker","floatLabel","_floatLabel","_appearance","oldValue","_needsOutlineLabelOffsetUpdate","subscriptSizing","_subscriptSizing","_hintLabel","_processHints","_hasIconPrefix","_hasTextPrefix","_hasIconSuffix","_hasTextSuffix","_explicitFormFieldControl","_isFocused","_previousControl","_valueChanges","_describedByChanges","_updateFocusState","_assertFormFieldControl","_initializeSubscript","_initializePrefixAndSuffix","_initializeOutlineLabelOffsetSubscriptions","ngAfterContentChecked","_initializeControl","getLabelId","getConnectedOverlayOrigin","_animateAndLockLabel","previousControl","classPrefix","pairwise","prev","hasPrev","prevErrorState","prevDescribedBy","currentErrorState","currentDescribedBy","_syncDescribedByIds","_checkPrefixAndSuffixTypes","_validateHints","_updateOutlineLabelOffset","_shouldAlwaysFloat","_shouldForward","_getDisplayedMessages","_refreshOutlineNotchWidth","startHint","hint","endHint","setDescribedByIds","floatingLabel","_isAttachedToDom","iconPrefixContainer","textPrefixContainer","iconSuffixContainer","textSuffixContainer","iconPrefixContainerWidth","textPrefixContainerWidth","iconSuffixContainerWidth","textSuffixContainerWidth","contentQueries","dirIndex","onContainerClick","tmp_16_0","MatFormFieldModule","_CdkTextFieldStyleLoader","listenerOptions","AutofillMonitor","_monitoredElements","animationName","isAutofilled","unlisten","TextFieldModule","MAT_INPUT_VALUE_ACCESSOR","MAT_INPUT_INVALID_TYPES","MAT_INPUT_CONFIG","MatInput","_autofillMonitor","_formField","_uid","_previousNativeValue","_inputValueAccessor","_signalBasedValueAccessor","_previousPlaceholder","_errorStateTracker","_cleanupIosKeyup","_cleanupWebkitWheel","_formFieldDescribedBy","_isServer","_isNativeSelect","_isTextarea","_isInFormField","_required","_type","prevType","_validateType","_ensureWheelDefaultBehavior","errorStateMatcher","readonly","_readonly","_neverEmptyInputTypes","parentForm","parentFormGroup","defaultErrorStateMatcher","accessor","_iOSKeyupListener","_dirtyCheckNativeValue","_dirtyCheckPlaceholder","_focusChanged","isFocused","setSelectionRange","_onInput","_getPlaceholder","_isNeverEmpty","_isBadInput","validity","badInput","selectElement","firstOption","selectedIndex","existingDescribedBy","toAssign","exclude","_isInlineSelect","selectionStart","selectionEnd","_webkitBlinkWheelListener","_getReadonlyAttribute","MatInputModule","_forTrack0","$index","$item","_trackRow","_forTrack1","MatCalendarBody_Conditional_0_Template","_cellPadding","numCols","MatCalendarBody_For_2_Conditional_1_Template","_firstRowOffset","labelMinRequiredCells","MatCalendarBody_For_2_For_3_Template","_r2","item_r3","_cellClicked","_emitActiveDateChange","ɵ$index_14_r4","ɵ$index_7_r5","_cellWidth","_isActiveCell","_isRangeStart","compareValue","_isRangeEnd","_isInRange","_isComparisonBridgeStart","_isComparisonBridgeEnd","_isComparisonStart","_isComparisonEnd","_isInComparisonRange","_isPreviewStart","_isPreviewEnd","_isInPreview","_isSelected","todayValue","_getDescribedby","_isComparisonIdentical","displayValue","MatCalendarBody_For_2_Template","row_r6","MatMonthView_For_4_Template","day_r1","long","narrow","MatCalendar_ng_template_0_Template","MatCalendar_Case_2_Template","activeDate","_dateSelected","_dragStarted","_dragEnded","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","_activeDrag","MatCalendar_Case_3_Template","_r3","_monthSelectedInYearView","_goToDateInView","MatCalendar_Case_4_Template","_r4","_yearSelectedInMultiYearView","MatDatepickerContent_ng_template_2_Template","MatDatepickerToggle_Conditional_2_Template","MatDatepickerIntl","calendarLabel","openCalendarLabel","closeCalendarLabel","prevMonthLabel","nextMonthLabel","prevYearLabel","nextYearLabel","prevMultiYearLabel","nextMultiYearLabel","switchToMonthViewLabel","switchToMultiYearViewLabel","startDateLabel","endDateLabel","comparisonDateLabel","formatYearRange","formatYearRangeLabel","uniqueIdCounter$1","MatCalendarCell","activeCapturingEventOptions","passiveEventOptions","MatCalendarBody","_intl","_skipNextFocus","_focusActiveCellAfterViewChecked","rows","startValue","endValue","activeCell","_focusActiveCell","isRange","cellAspectRatio","previewStart","previewEnd","selectedValueChange","previewChange","activeDateChange","dragStarted","dragEnded","_startDateLabelId","_endDateLabelId","_comparisonStartDateLabelId","_comparisonEndDateLabelId","_didDragSinceMouseDown","comparisonDateAccessibleName","row","idGenerator","_touchmoveHandler","_enterHandler","_leaveHandler","_mousedownHandler","_mouseupHandler","_touchendHandler","cell","columnChanges","rowIndex","colIndex","cellNumber","movePreview","_scheduleFocusActiveCellAfterViewChecked","isStart","isEnd","isInRange","previousCell","previousRow","nextCell","nextRow","_getCellFromElement","getActualTouchTarget","getCellElement","cellElement","col","isTableCell","rangeEnabled","touchLocation","elementFromPoint","DateRange","_disableStructuralEquivalency","MatDateSelectionModel","selection","_adapter","_selectionChanged","selectionChanged","updateSelection","_isValidDateInstance","MatSingleDateSelectionModel","MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER","SkipSelf","MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY","MAT_DATE_RANGE_SELECTION_STRATEGY","uniqueIdCounter","MatMonthView","_dateFormats","_dateAdapter","_rangeStrategy","_rerenderSubscription","_selectionKeyPressed","_activeDate","oldActiveDate","validDate","_hasSameMonthAndYear","_init","_setRanges","_minDate","_maxDate","activeDrag","selectedChange","_userSelection","_matCalendarBody","_monthLabel","_weeks","_firstWeekOffset","_rangeStart","_rangeEnd","_comparisonRangeStart","_comparisonRangeEnd","_previewStart","_previewEnd","_isRange","_todayDate","_weekdays","comparisonChange","_clearPreview","selectedDate","_getDateFromDayOfMonth","rangeStartDate","rangeEndDate","_getDateInCurrentMonth","_updateActiveDate","_handleCalendarBodyKeydown","_canSelect","_handleCalendarBodyKeyup","_getCellCompareValue","monthLabel","firstOfMonth","_initWeekdays","_createWeekCells","_previewChanged","previewRange","createPreview","dragRange","createDrag","dragDropResult","dayOfMonth","firstDayOfWeek","narrowWeekdays","weekdays","daysInMonth","dateNames","_shouldEnableDate","cellClasses","d1","d2","selectedValue","MatMultiYearView","isSameMultiYearView","_setSelectedYear","yearSelected","_years","_todayYear","_selectedYear","minYearOfPage","getActiveOffset","_createCellForYear","_yearSelected","selectedYear","_getDateFromYear","yearsPerPage","_getActiveCell","activeMonth","yearName","_shouldEnableYear","dateAdapter","date1","date2","year1","year2","startingYear","getStartingYear","euclideanModulo","MatYearView","_setSelectedMonth","monthSelected","_months","_yearLabel","_todayMonth","_selectedMonth","_monthSelected","selectedMonth","_getDateFromMonth","_getMonthInCurrentYear","monthNames","_createCellForMonth","normalizedDate","monthName","_shouldEnableMonth","activeYear","_isYearAndMonthAfterMaxDate","_isYearAndMonthBeforeMinDate","maxYear","maxMonth","minYear","minMonth","MatCalendarHeader","calendar","MatCalendar","changeDetectorRef","periodButtonText","currentView","_formatMinAndMaxYearLabels","periodButtonDescription","periodButtonLabel","prevButtonLabel","nextButtonLabel","currentPeriodClicked","previousClicked","nextClicked","previousEnabled","_isSameView","maxYearOfPage","_periodButtonLabelId","headerComponent","_calendarHeaderPortal","_intlChanges","_moveFocusOnNextTick","startAt","_startAt","startView","viewChanged","_userDragDrop","monthView","yearView","multiYearView","_clampedActiveDate","_currentView","viewChangedResult","focusActiveCell","minDateChange","maxDateChange","changeRequiringRerender","_getCurrentViewComponent","updateTodaysDate","normalizedYear","normalizedMonth","tmp_1_0","matDatepickerAnimations","transformPanel","keyframes","fadeInCalendar","MAT_DATEPICKER_SCROLL_STRATEGY","MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER","MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY","MatDatepickerContent","_globalModel","_rangeSelectionStrategy","_subscriptions","_model","_calendar","datepicker","_isAbove","_animationDone","_isAnimating","_closeButtonText","_closeButtonFocused","_actionsPortal","_dialogLabelId","intl","touchUi","_handleUserSelection","newSelection","selectionFinished","_handleUserDragDrop","_startExitAnimation","_handleAnimationEvent","phaseName","_getSelected","_applyPendingSelection","_assignActions","forceRerender","_selectYear","_selectMonth","_viewChanged","tmp_3_0","calendarHeaderComponent","_getMinDate","_getMaxDate","_getDateFilter","MatDatepickerBase","_inputStateChanges","datepickerInput","getStartValue","getThemePalette","yPosition","restoreFocus","openedStream","closedStream","_panelClass","coerceStringArray","separator","sourceValues","sourceValue","trimmedString","opened","_opened","_componentRef","_focusedElementBeforeOpen","_backdropHarnessClass","_setConnectedPositions","_destroyOverlay","registerInput","registerActions","removeActions","_openOverlay","canRestoreFocus","completeClose","_forwardContentValues","getOverlayLabelId","isDialog","_getDialogStrategy","_getDropdownStrategy","_getCloseStream","primaryX","secondaryX","primaryY","secondaryY","ctrlShiftMetaModifiers","MatDatepicker","ɵMatDatepicker_BaseFactory","MatDatepickerInputEvent","targetElement","MatDatepickerInputBase","_getValueFromModel","_assignValueProgrammatically","_parentDisabled","blur","dateChange","_validatorOnChange","_cvaOnChange","_valueChangesSubscription","_localeSubscription","_parseValidator","_lastValueValid","matDatepickerParse","_filterValidator","controlValue","_matchesFilter","matDatepickerFilter","_minValidator","matDatepickerMin","_maxValidator","matDatepickerMax","_getValidators","_registerModel","_assignValue","_shouldHandleChangeEvent","_isValidValue","_formatValue","dateInputsHaveChanged","_validator","_openPopup","lastValueWasValid","hasChanged","_assignValueToModel","MAT_DATEPICKER_VALUE_ACCESSOR","MatDatepickerInput","MAT_DATEPICKER_VALIDATORS","_closedSubscription","_openedSubscription","matDatepicker","_datepicker","_ariaOwns","_min","validValue","_max","_dateFilter","wasMatchingValue","modelValue","MatDatepickerToggleIcon","MatDatepickerToggle","_customIcon","_button","defaultTabIndex","parsedTabIndex","_watchStateChanges","datepickerStateChanged","inputStateChanged","datepickerToggled","MatDatepickerModule","SelectionModel","_multiple","_emitChanges","compareWith","_selection","_deselectedToEmit","_selectedToEmit","initiallySelectedValues","_markSelected","_verifyValueAssignment","_hasQueuedChanges","_unmarkSelected","setSelection","oldValues","newSelectedSet","_getConcreteValue","isSelected","flushEvent","_unmarkAll","isEmpty","isMultipleSelection","added","removed","inputValue","UniqueSelectionDispatcher","registered","MatRadioChange","MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR","MatRadioGroup","MAT_RADIO_GROUP","MAT_RADIO_DEFAULT_OPTIONS","MAT_RADIO_DEFAULT_OPTIONS_FACTORY","_changeDetector","_labelPosition","_buttonChanges","_radios","_updateRadioButtonNames","_markRadiosForCheck","_updateSelectedRadioFromValue","_checkSelectedRadioButton","_disabledInteractive","radio","_touch","_markForCheck","MatRadioButton","_radioDispatcher","radioGroup","_setDisabled","_removeUniqueSelectionListener","_previousTabIndex","_rippleTrigger","_noopAnimations","animationMode","_updateTabIndex","_onInputInteraction","groupValueChanged","MatRadioModule","MatSelect_Conditional_4_Template","MatSelect_Conditional_5_Conditional_1_Template","MatSelect_Conditional_5_Conditional_2_Template","triggerValue","MatSelect_Conditional_5_Template","customTrigger","MatSelect_ng_template_10_Template","_panelDoneAnimatingStream","_getPanelTheme","_getPanelAriaLabelledby","matSelectAnimations","transformPanelWrap","animateChild","MAT_SELECT_SCROLL_STRATEGY","MAT_SELECT_CONFIG","MAT_SELECT_SCROLL_STRATEGY_PROVIDER","MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY","MAT_SELECT_TRIGGER","MatSelectChange","MatSelect","_parentFormField","_liveAnnouncer","_initialized","_positions","_scrollOptionIntoView","option","panel","labelCount","offsetTop","_positioningSettled","_keyManager","_getChangeEvent","_panelOpen","_compareWith","o1","o2","_triggerAriaLabelledBy","_destroy","_selectionModel","_preferredOverlayOrigin","_overlayWidth","_valueId","_overlayPanelClass","overlayPanelClass","_focused","_overlayDir","_hideSingleSelectionIndicator","_syncParentProperties","_placeholder","disableOptionCentering","_initializeSelection","typeaheadDebounceInterval","sortComparator","panelWidth","canSelectNullableOptions","optionSelectionChanges","openedChange","_openedStream","_closedStream","selectionChange","valueChange","_panelDoneAnimating","panelOpen","_getOverlayWidth","_initKeyManager","_resetOptions","newAriaLabelledby","_getTriggerAriaLabelledby","_clearFromModal","_canOpen","_applyModalPanelOwnership","_highlightCorrectOption","_trackedModal","panelId","selectedOptions","_handleOpenKeydown","_handleClosedKeydown","isArrowKey","isOpenKey","previouslySelectedOption","selectedOption","hasDeselectedOptions","opt","previouslyFocusedIndex","_onAttached","_setSelectionByValue","_selectOptionByValue","_sortValues","correspondingOption","_skipPredicate","preferredOrigin","changedOrDestroyed","_onSelect","wasSelected","_propagateChanges","valueToEmit","firstEnabledOptionIndex","labelId","_getAriaActiveDescendant","isOpen","fallbackOverlayOrigin_r4","MatSelectModule","delayWhen","delayDurationSelector","subscriptionDelay","ignoreElements","MatAutocomplete_ng_template_0_Template","formFieldId_r3","_classList","showPanel","panelAnimation","MatAutocompleteSelectedEvent","MAT_AUTOCOMPLETE_DEFAULT_OPTIONS","MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY","autoActiveFirstOption","autoSelectActiveOption","requireSelection","MatAutocomplete","_activeOptionChanges","_isOpen","_latestOpeningTrigger","_setColor","displayWith","optionSelected","optionActivated","inertGroups","_setVisibility","_setScrollTop","_getScrollTop","_emitSelectEvent","MAT_AUTOCOMPLETE_VALUE_ACCESSOR","MatAutocompleteTrigger","MAT_AUTOCOMPLETE_SCROLL_STRATEGY","MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER","MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY","_portal","_componentDestroyed","_keydownSubscription","_outsideClickSubscription","_cleanupWindowBlur","_previousValue","_valueOnAttach","_valueOnLastKeydown","_manuallyFloatingLabel","_closingActionsSubscription","_viewportSubscription","_handsetLandscapeSubscription","_canOpenOnNextFocus","_valueBeforeAutoSelection","_pendingAutoselectedOption","_closeKeyEventStream","_windowBlurHandler","autocomplete","autocompleteAttribute","autocompleteDisabled","_aboveClass","_setStrategyPositions","_destroyPanel","_overlayAttached","openPanel","_openPanelInternal","closePanel","_resetLabel","_updatePanelState","panelClosingActions","optionSelections","_getOutsideClickStream","activeOption","clickTarget","formField","customOrigin","cleanups","_assignOptionValue","hasModifier","_resetActiveItem","prevActiveItem","_scrollToOption","_getDisplayValue","_clearPreviousSelectedOption","valueOnAttach","_handleFocus","_handleClick","shouldAnimate","_subscribeToClosingActions","initialRender","optionChanges","wasOpen","_emitOpened","_setValueAndClose","toDisplay","_updateNativeInputValue","toSelect","_getConnectedElement","_getPanelWidth","_getOverlayConfig","_handlePanelKeydown","_getOverlayPosition","belowPositions","abovePositions","_getHostWidth","newScrollPosition","MatAutocompleteModule","CDK_ACCORDION","CdkAccordionItem","accordion","_expansionDispatcher","_openCloseAllSubscription","destroyed","expandedChange","expanded","_expanded","accordionId","_subscribeToOpenCloseAllActions","_openCloseAllActions","CdkAccordionModule","MatExpansionPanel_ng_template_7_Template","MatExpansionPanelHeader_Conditional_4_Template","MAT_ACCORDION","MAT_EXPANSION_PANEL","MatExpansionPanelContent","_expansionPanel","MAT_EXPANSION_PANEL_DEFAULT_OPTIONS","MatExpansionPanel","hideToggle","_hideToggle","togglePosition","_togglePosition","afterExpand","afterCollapse","_inputChanges","_lazyContent","_body","_bodyWrapper","_headerId","_hasSpacing","displayMode","_getExpandedState","_setupAnimationEvents","_containsFocus","bodyElement","_transitionEndListener","MatExpansionPanelHeader","_parentChangeSubscription","accordionHideToggleChange","expandedHeight","collapsedHeight","_toggle","_isExpanded","_getPanelId","_getTogglePosition","_showToggle","_getHeaderHeight","isExpanded","_keydown","_handleHeaderKeydown","_handleHeaderFocus","MatExpansionPanelTitle","MatExpansionModule","insured_r2","address","city","zipCode","InsuredInformationComponent_mat_form_field_16_mat_error_4_Template","InsuredInformationComponent_mat_form_field_16_mat_error_5_Template","tmp_2_0","ctx_r2","insuredForm","InsuredInformationComponent_mat_form_field_17_mat_error_6_Template","InsuredInformationComponent_mat_form_field_19_mat_error_4_Template","state_r4","InsuredInformationComponent","states","filteredStates","insureds","onInsuredChange","insuredStateControl","filterStates","filterValue","InsuredInformationComponent_mat_radio_button_5_Template","InsuredInformationComponent_div_9_Template","InsuredInformationComponent_mat_error_15_Template","InsuredInformationComponent_mat_form_field_16_Template","InsuredInformationComponent_mat_form_field_17_Template","InsuredInformationComponent_mat_form_field_18_Template","InsuredInformationComponent_mat_form_field_19_Template","InsuredInformationComponent_mat_error_24_Template","InsuredInformationComponent_mat_error_30_Template","InsuredInformationComponent_For_38_Template","InsuredInformationComponent_mat_error_40_Template","InsuredInformationComponent_mat_error_45_Template","InsuredInformationComponent_mat_error_46_Template","tmp_7_0","tmp_12_0","tmp_13_0","auto_r5","tmp_17_0","tmp_18_0","i9","i10","RaterDataService","getRaterData","toDateString","licensePrefixOption_r1","licenseTypeOption_r2","LicenseInformationComponent_div_7_mat_form_field_14_For_5_Template","LicenseInformationComponent_div_7_mat_form_field_14_mat_error_6_Template","licenseTypeOptions","licenseForm","LicenseInformationComponent_div_7_mat_error_5_Template","LicenseInformationComponent_div_7_mat_error_6_Template","LicenseInformationComponent_div_7_For_12_Template","LicenseInformationComponent_div_7_mat_error_13_Template","LicenseInformationComponent_div_7_mat_form_field_14_Template","licensePrefixOptions","tmp_4_0","LicenseInformationComponent","raterDataService","raterData","LicenseInformationComponent_div_7_Template","LoggedInComponent","trustedHTMLFromString","getPolicy","ttWindow","trustedTypes","createPolicy","createHTML","getMatIconNameNotFoundError","iconName","getMatIconFailedToSanitizeUrlError","getMatIconFailedToSanitizeLiteralError","literal","SvgIconConfig","svgText","svgElement","MatIconRegistry","_sanitizer","_errorHandler","_svgIconConfigs","_iconSetConfigs","_cachedIconsByUrl","_inProgressUrlFetches","_fontCssClassesByAlias","_resolvers","_defaultFontSetClass","addSvgIcon","addSvgIconInNamespace","addSvgIconLiteral","addSvgIconLiteralInNamespace","_addSvgIconConfig","addSvgIconResolver","cleanLiteral","trustedLiteral","addSvgIconSet","addSvgIconSetInNamespace","addSvgIconSetLiteral","addSvgIconSetLiteralInNamespace","_addSvgIconSetConfig","registerFontClassAlias","alias","classNames","classNameForFontAlias","setDefaultFontSetClass","getDefaultFontSetClass","getSvgIconFromUrl","safeUrl","cachedIcon","cloneSvg","_loadSvgIconFromConfig","getNamedSvgIcon","iconKey","_getSvgFromConfig","_getIconConfigFromResolvers","iconSetConfigs","_getSvgFromIconSetConfigs","_svgElementFromConfig","namedIcon","_extractIconWithNameFromAnySet","iconSetConfig","_loadSvgIconSetFromConfig","errorMessage","handleError","foundIcon","_extractSvgIconFromSet","_fetchIcon","iconSet","iconSource","iconElement","_setSvgAttributes","_toSvgElement","_svgElementFromString","div","innerHTML","attributes","childNodes","viewBox","iconConfig","getMatIconNoHttpProviderError","inProgressFetch","configNamespace","isSafeUrlWithOptions","MAT_ICON_DEFAULT_OPTIONS","MAT_ICON_LOCATION","MAT_ICON_LOCATION_FACTORY","getPathname","funcIriAttributes","funcIriAttributeSelector","funcIriPattern","MatIcon","_iconRegistry","svgIcon","_svgIcon","_updateSvgIcon","_clearSvgElement","fontSet","_fontSet","_cleanupFontValue","_updateFontIconClasses","fontIcon","_fontIcon","_previousFontSetClass","_previousFontIconClass","_svgName","_svgNamespace","_previousPath","_elementsWithExternalReferences","_currentIconFetch","ariaHidden","_splitIconName","cachedElements","_prependPathToReferences","_usingFontIcon","_setSvgElement","_cacheChildrenWithExternalReferences","layoutElement","childCount","elem","fontSetClasses","elementsWithFuncIri","elementWithReference","rawName","MatIconModule","InsuredService","getInsureds","userId","createInsured","LoginComponent","insuredService","loginForm","hidePassword","isRequestProcessing","principal","LoginComponent_mat_error_9_Template","LoginComponent_mat_error_10_Template","LoginComponent_mat_error_17_Template","i11","ContactInformationComponent","contactForm","ContactInformationComponent_mat_error_8_Template","ContactInformationComponent_mat_error_13_Template","ContactInformationComponent_mat_error_14_Template","ContactInformationComponent_mat_error_19_Template","ContactInformationComponent_mat_error_20_Template","tmp_5_0","tmp_6_0","NotLoggedInComponent","FirmOption","Firm","Individual","YesNoOption","Yes","No","authForm","AuthComponent","quotingService","firmOption","policyTerm","firmName","ssn","phone","pendingLicense","licenseBody","licensePrefixId","licenseTypeId","minEffectiveDate","maxEffectiveDate","initializeEffectiveDateRange","contactFormGroup","resetAndDisable","onFirmOptionChange","onInsuredNameChange","onPendingLicenseChange","contact","license","formGroup","currentYear","currentMonth","setDate","licenseFormGroup","licenseTypeIdControl","insuredFormGroup","firmNameControl","ssnControl","secretaryOfStateIdControl","responsibleBrokerLastNameControl","insuredFormDisabled","insuredName","contactNameControl","AuthComponent_mat_error_25_Template","AuthComponent_app_logged_in_26_Template","AuthComponent_app_login_28_Template","AuthComponent_app_not_logged_in_29_Template","picker_r3","tmp_9_0","i12","i13","UserService","verificationCodeRequest","userEmail","verificationCode","resetPasswordRequest","resetPassword","resetCode","insuredPortalUrl","ForgotPasswordComponent","userService","forgotPasswordForm","requestReset","ForgotPasswordComponent_mat_error_8_Template","ForgotPasswordComponent_mat_error_9_Template","confirmPasswordValidator","matchingControlName","matchingControl","passwordNoMatch","PasswordResetComponent","resetPasswordForm","newPassword","confirmPassword","hideConfirmPassword","formBuilder","PasswordResetComponent_mat_error_10_Template","PasswordResetComponent_mat_error_17_Template","PasswordResetComponent_mat_error_18_Template","RaterService","createRater","rater","calculateRaterPremium","InsuredRaterService","raterService","createInsuredAndRater","insuredNum$","insuredState","secretaryOfStateId","responsibleBrokerLastName","insuredNum","createIncludedCoverageOptions","includedCoverageOptions","licenseNum","invalidLicenseCharged","createAdditionalCoverageOptions","additionalCoverageOptions","isActiveMember","hasActiveLicense","coverage","isAppraiser","createRaterRequest","proposedEffectiveDate","proposedExpirationDate","premium","coverageOptionId","conformityOptions","isForFirm","createRaterResponse","qNum","qSuffix","licenseType","verify","RegisterComponent_ng_container_45_mat_error_12_Template","RegisterComponent_ng_container_45_mat_error_13_Template","verifyForm","RegisterComponent_ng_container_46_mat_error_12_Template","RegisterComponent_ng_container_46_mat_error_19_Template","RegisterComponent_ng_container_46_mat_error_20_Template","registerForm","tmp_8_0","RegisterComponent","insuredRaterService","licensePrefix","isEmailVerificationComplete","confirmationToken","insuredPrincipal","existInsured","RegisterComponent_div_40_Template","RegisterComponent_ng_container_45_Template","RegisterComponent_ng_container_46_Template","i14","i15","i16","termsAccepted","LandingPageComponent","configMode","LandingPageComponent_div_1_Template","LandingPageComponent_ng_template_2_Template","landingContent_r3","LayoutComponent","CdkTableModule","MatTableModule","CdkDialogContainer_ng_template_0_Template","DialogConfig","role","ariaDescribedBy","ariaLabelledBy","ariaModal","autoFocus","closeOnNavigation","closeOnDestroy","closeOnOverlayDetachments","templateContext","CdkDialogContainer","_interactivityChecker","_focusTrap","_elementFocusedBeforeDialogWasOpened","_closeInteractionType","_ariaLabelledByQueue","_isDestroyed","_addAriaLabelledBy","_removeAriaLabelledBy","_contentAttached","_initializeFocusTrap","_handleBackdropClicks","_captureInitialFocus","_trapFocus","_restoreFocus","_recaptureFocus","_forceFocus","deregisterBlur","deregisterMousedown","_focusByCssSelector","elementToFocus","_focusDialogContainer","focusConfig","focusTargetElement","DialogRef","componentInstance","closedSubject","DIALOG_SCROLL_STRATEGY","DIALOG_DATA","DEFAULT_DIALOG_CONFIG","Dialog","_parentDialog","_openDialogsAtThisLevel","_afterAllClosedAtThisLevel","_afterOpenedAtThisLevel","_ariaHiddenElements","openDialogs","afterAllClosed","_getAfterAllClosed","componentOrTemplateRef","getDialogById","dialogRef","dialogContainer","_attachContainer","_attachDialogContent","_hideNonDialogContentFromAssistiveTechnology","_removeOpenDialog","closeAll","reverseForEach","dialog","userInjector","containerType","fallbackInjector","overlayContainer","sibling","DialogModule","MatDialogContainer_ng_template_2_Template","MatDialogConfig","delayFocusTrap","enterAnimationDuration","exitAnimationDuration","OPEN_CLASS","OPENING_CLASS","CLOSING_CLASS","MatDialogContainer","_animationStateChanged","_animationsEnabled","_actionSectionCount","_hostElement","_enterAnimationDuration","parseCssTime","_exitAnimationDuration","_animationTimer","_startOpenAnimation","totalTime","TRANSITION_DURATION_PROPERTY","_requestAnimationFrame","_waitForAnimationToComplete","_finishDialogOpen","_finishDialogClose","_updateActionSectionCount","_clearAnimationClasses","_openAnimationDone","ɵMatDialogContainer_BaseFactory","time","MatDialogState","OPEN","CLOSING","CLOSED","MatDialogRef","_containerInstance","_beforeClosed","_result","_closeFallbackTimeout","_state","_closeDialogVia","dialogResult","afterClosed","beforeClosed","interactionType","MAT_DIALOG_DATA","MAT_DIALOG_DEFAULT_OPTIONS","MAT_DIALOG_SCROLL_STRATEGY","MatDialog","_dialog","dialogConfigClass","_dialogRefConstructor","_dialogContainerType","_dialogDataToken","cdkRef","cdkConfig","_closeDialogs","dialogs","MatDialogClose","_matDialogClose","getClosestDialog","proxiedChange","_matDialogCloseResult","_onButtonClick","screenX","screenY","MatDialogLayoutSection","_dialogRef","_onAdd","_onRemove","MatDialogTitle","ɵMatDialogTitle_BaseFactory","MatDialogContent","MatDialogActions","ɵMatDialogActions_BaseFactory","MatDialogModule","AdditionalCoverageNrdsDialogComponent","validateYesNo","expectedValue","invalidYesNoOption","coverage_r1","limits","basePremium","quotingForm","deductible","option_r3","QuotingComponent_For_42_div_8_mat_error_13_Template","showNrdsPopup","option_r5","yesNoOption","tmp_15_0","QuotingComponent_For_42_div_9_mat_form_field_17_mat_error_4_Template","QuotingComponent_For_42_div_9_mat_form_field_17_Template","QuotingComponent_For_42_div_8_Template","QuotingComponent_For_42_div_9_Template","getLimitsText","getPremiumText","QuotingComponent_For_49_mat_form_field_4_mat_error_4_Template","QuotingComponent_For_49_mat_form_field_4_mat_error_5_Template","QuotingComponent_For_49_mat_form_field_4_mat_error_6_Template","option_r6","tmp_14_0","QuotingComponent_For_49_mat_form_field_4_Template","QuotingComponent_For_49_mat_checkbox_6_Template","QuotingComponent","coverageOptions","coverageToAdditionalCoverageOptions","additionalCoverageTitle","calculateRater","firmOptions","isDefault","isForIndividual","individualOptions","setCoverageData","formValue","selectedCoverage","selectedAdditionalCoverages","requiresLicense","premiumText","selectedConformityOptions","coverageToAdditionalCoverageMapping","additionalCoverageOptionId","invalidLicenseCharge","existingQuoting","setCoverage","setIndividualCoverageOptions","setAdditionalCoverageOptions","setConformityOptions","existingCoverage","addCheckboxControl","handleAdditionalCoverage","handleAppraisalCoverage","listenForCoverageChanges","addLicenseControl","listenForActiveMemberChanges","listenForHoldChanges","licenseNumControl","hold","toggleAdditionalCoverageControls","toggleAppraisalControls","conformityOption","licenseControl","pendingLicenseControl","QuotingComponent_For_18_Template","QuotingComponent_mat_error_19_Template","QuotingComponent_span_21_Template","QuotingComponent_For_30_Template","QuotingComponent_For_42_Template","QuotingComponent_For_49_Template","i17","i18","i19","PaymentService","payToBindLink","insuredNumber","option_r2","SummaryComponent_div_1_For_29_span_4_Template","SummaryComponent_div_1_For_29_Template","SummaryComponent_div_1_For_34_Template","SummaryComponent_div_1_ForEmpty_35_Template","ctx_r3","buyThisCoverage","licenseText","conformityOptionsText","appSessionStateGuard","registerGuard","SummaryComponent","paymentService","SummaryComponent_div_1_Template","authGuard","quotingGuard","totalRequests","bootstrapApplication","ɵinternalCreateApplication","provideZoneChangeDetection","eventCoalescing","provideRouter","makeEnvironmentProviders","APP_BOOTSTRAP_LISTENER","feature","ɵproviders","provideAnimationsAsync","ɵperformanceMarkFeature","ɵDomRendererFactory2","provideAppInitializer","initConfiguration","initializer","provideHttpClient","withInterceptors","interceptorFns","makeHttpFeature","kind","ɵkind","loadingInterceptor","tokenInterceptor","Authorization","provideNativeDateAdapter","formats","thrownError","operator","isSubscriber","Subscriber","isObserver","isSubscription","errorContext","_trySubscribe","sink","promiseCtor","getPromiseCtor","operations","pipeFromArray","toPromise","ObjectUnsubscribedError","currentObservers","AnonymousSubject","observed","EMPTY_SUBSCRIPTION","COMPLETE_NOTIFICATION","createNotification","EMPTY_OBSERVER","handleStoppedNotification","nextNotification","_next","errorNotification","_error","_complete","_bind","Function","ConsumerObserver","partialObserver","handleUnhandledError","useDeprecatedNextContext","useDeprecatedSynchronousErrorHandling","captureError","onStoppedNotification","timeoutProvider","defaultErrorHandler","UnsubscriptionError","initialTeardown","_parentage","_finalizers","initialFinalizer","finalizer","execFinalizer","teardown","_hasParent","_addParent","_removeParent","onUnhandledError","onComplete","onFinalize","OperatorSubscriber","shouldUnsubscribe","createImpl","ctorFunc","stack","isRoot","errorThrown","liftedSource","fns","AnimationMetadataType","State","Transition","Sequence","Group","Animate","Keyframes","Style","Trigger","Reference","AnimateChild","AnimateRef","Query","Stagger","AUTO_STYLE","definitions","timings","sequence","tokens","stateChangeExpr","expr","NoopAnimationPlayer","_onDoneFns","_onStartFns","_onDestroyFns","_originalOnDoneFns","_originalOnStartFns","_started","_finished","parentPlayer","_onFinish","onStart","onDone","hasStarted","play","_onStart","triggerMicrotask","pause","restart","finish","setPosition","getPosition","triggerCallback","methods","AnimationGroupPlayer","players","_players","doneCount","destroyCount","startCount","player","_onDestroy","timeAtPosition","longestPlayer","longestSoFar","beforeDestroy","ɵPRE_STYLE","defaultEquals","activeConsumer","inNotificationPhase","epoch","SIGNAL","setActiveConsumer","consumer","REACTIVE_NODE","lastCleanEpoch","producerNode","producerLastReadVersion","producerIndexOfThis","nextProducerIndex","liveConsumerNode","liveConsumerIndexOfThis","consumerAllowSignalWrites","consumerIsAlwaysLive","producerMustRecompute","producerRecomputeValue","consumerMarkedDirty","consumerOnSignalRead","producerAccessed","assertConsumerNode","consumerIsLive","producerRemoveLiveConsumerAtIndex","producerAddLiveConsumer","producerUpdateValueVersion","consumerPollProducersForChange","producerMarkClean","producerNotifyConsumers","consumerMarkDirty","producerUpdatesAllowed","consumerBeforeComputation","consumerAfterComputation","prevConsumer","producer","seenVersion","consumerDestroy","indexOfThis","assertProducerNode","isConsumerNode","lastIdx","idxProducer","createComputed","computation","COMPUTED_NODE","ERRORED","UNSET","COMPUTING","equal","throwInvalidWriteToSignalErrorFn","defaultThrowError","throwInvalidWriteToSignalError","postSignalSetFn","signalSetFn","signalValueChanged","producerIncrementEpoch","SIGNAL_NODE","NOOP_CLEANUP_FN","WATCH_NODE","cleanupFn","XSS_SECURITY_URL","RuntimeError","formatRuntimeError","REQUIRED_UNSET_VALUE","INPUT_SIGNAL_NODE","SIGNAL_NODE$1","transformFn","applyValueToInputSignal","signalSetFn$1","createInputSignal","initialValue","inputValueFn","producerAccessed$1","SIGNAL$1","noSideEffects","PARAMETERS","makeParamDecorator","props","parentClass","metaCtor","makeMetadataCtor","ParamDecoratorFactory","annotationInstance","ParamDecorator","annotation","cls","unusedKey","ngMetadataName","annotationCls","_global","getClosureSafeProperty","objWithPropertyToExtract","fillProperties","overriddenName","newLineIndex","concatStringsWithSpace","before","__forward_ref__","forwardRefFn","resolveForwardRef","isForwardRef","ɵɵdefineInjectable","ɵɵdefineInjector","getInjectableDef","getOwnDefinition","NG_PROV_DEF","NG_INJECTABLE_DEF","isInjectable","field","getInjectorDef","NG_INJ_DEF","NG_INJECTOR_DEF","ɵprov","ɵinj","ngInjectableDef","ngInjectorDef","_desc","__NG_ELEMENT_ID__","isEnvironmentProviders","NG_COMP_DEF","ɵcmp","NG_DIR_DEF","ɵdir","NG_PIPE_DEF","ɵpipe","NG_MOD_DEF","ɵmod","NG_FACTORY_DEF","NG_ELEMENT_ID","NG_ENV_ID","__NG_ENV_ID__","renderStringify","throwProviderNotFoundError","injectorName","Default","Host","Self","_injectImplementation","getInjectImplementation","setInjectImplementation","previous","injectRootLimpMode","injectableDef","THROW_IF_NOT_FOUND","DI_DECORATOR_FLAG","NG_TEMP_TOKEN_PATH","NEW_LINE","SOURCE","_currentInjector","setCurrentInjector","former","injectInjectorOnly","convertToBitFlags","injectArgs","types","arg","flag","getInjectFlag","attachInjectFlag","decorator","getFactoryDef","throwNotFound","deepForEach","addToArray","removeFromArray","keyValueArraySet","keyValueArray","keyValueArrayIndexOf","arrayInsert2","value1","value2","keyValueArrayGet","_arrayIndexOfSorted","middle","EMPTY_OBJ","ENVIRONMENT_INITIALIZER","INJECTOR$1","INJECTOR_DEF_TYPES","NullInjector","getNgModuleDef","ngModuleDef","getComponentDef","getDirectiveDef","getPipeDef$1","isStandalone","def","importProvidersFrom","internalImportProvidersFrom","ɵfromNgModule","checkForStandaloneCmp","providersOut","dedup","injectorTypesWithProviders","collectProviders","provider","internalSource","walkProviderTree","processInjectorTypesWithProviders","typesWithProviders","visitor","deepForEachProvider","parents","defType","injDef","cmpDef","isDuplicate","dep","importTypesWithProviders","imported","defProviders","injectorType","USE_VALUE$1","isValueProvider","isTypeProvider","INJECTOR_SCOPE","NOT_YET","CIRCULAR","NULL_INJECTOR","getNullInjector","R3Injector","records","_ngOnDestroyHooks","_onDestroyHooks","injectorDefTypes","forEachSingleProvider","processProvider","makeRecord","assertNotDestroyed","setActiveConsumer$1","service","onDestroyHooks","hook","removeOnDestroy","runInContext","previousInjector","previousInjectImplementation","couldBeInjectableType","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","catchInjectorError","injectorErrorName","tokenPath","formatError","resolveInjectorInitializers","initializers","providerToRecord","providerToFactory","multiRecord","hasOnDestroy","destroyCBIdx","getUndecoratedInjectableFactory","inheritedInjectableDef","getInheritedInjectableDef","ngModuleType","unwrappedProvider","isFactoryProvider","isExistingProvider","classRef","hasDeps","prevInjector","isInInjectionContext","getCurrentInjector","assertInInjectionContext","debugFn","HOST","TVIEW","FLAGS","PARENT","NEXT","T_HOST","HYDRATION","CLEANUP","CONTEXT","INJECTOR","ENVIRONMENT","RENDERER","CHILD_HEAD","CHILD_TAIL","DECLARATION_VIEW","DECLARATION_COMPONENT_VIEW","DECLARATION_LCONTAINER","PREORDER_HOOK_FLAGS","QUERIES","ID","EMBEDDED_VIEW_INJECTOR","ON_DESTROY_HOOKS","EFFECTS_TO_SCHEDULE","EFFECTS","REACTIVE_TEMPLATE_CONSUMER","HEADER_OFFSET","TYPE","NATIVE","MOVED_VIEWS","CONTAINER_HEADER_OFFSET","LContainerFlags","None","HasTransplantedViews","isLView","isLContainer","isContentQueryHost","tNode","isComponentHost","componentOffset","isDirectiveHost","isComponentDef","isRootView","SimpleChange","applyValueToInputField","inputSignalNode","privateName","ɵɵNgOnChangesFeature","ɵɵNgOnChangesFeatureImpl","NgOnChangesFeatureImpl","ngInherit","definition","setInput","ngOnChangesSetInput","rememberChangeHistoryAndInvokeOnChangesHook","simpleChangesStore","getSimpleChangesStore","publicName","declaredName","declaredInputs","setSimpleChangesStore","SIMPLE_CHANGES_STORE","previousChange","profiler","hookOrListener","SVG_NAMESPACE","unwrapRNode","getNativeByIndex","lView","getNativeByTNode","getTNode","tView","getComponentLViewByIndex","nodeIndex","slotValue","viewAttachedToChangeDetector","getConstant","resetPreOrderHookFlags","markViewForRefresh","markAncestorsForTraversal","requiresRefreshOrTraversal","updateAncestorTraversalFlagsOnAttach","changeDetectionScheduler","getLViewParent","storeLViewOnDestroy","onDestroyCallback","instructionState","lFrame","createLFrame","bindingsEnabled","skipHydrationRootTNode","_isRefreshingViews","getBindingsEnabled","isInSkipHydrationBlock$1","getLView","getTView","ɵɵrestoreView","viewToRestore","contextLView","ɵɵresetView","getCurrentTNode","currentTNode","getCurrentTNodePlaceholderOk","setCurrentTNode","isParent","isCurrentTNodeParent","setCurrentTNodeAsNotParent","isRefreshingViews","setIsRefreshingViews","getBindingRoot","bindingRootIndex","bindingStartIndex","getBindingIndex","bindingIndex","nextBindingIndex","incrementBindingIndex","setBindingRootForHostBindings","currentDirectiveIndex","setCurrentDirectiveIndex","getCurrentDirectiveDef","tData","getCurrentQueryIndex","currentQueryIndex","setCurrentQueryIndex","getDeclarationTNode","declTNode","enterDI","parentTNode","parentLView","allocLFrame","enterView","newView","newLFrame","inI18n","currentLFrame","childLFrame","elementDepthCount","currentNamespace","leaveViewLight","oldLFrame","leaveDI","leaveView","getSelectedIndex","setSelectedIndex","getSelectedTNode","ɵɵnamespaceSVG","ɵɵnamespaceHTML","namespaceHTMLInternal","_wasLastNodeCreated","wasLastNodeCreated","lastNodeWasCreated","registerPostOrderHooks","directiveStart","directiveEnd","lifecycleHooks","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","executeCheckHooks","hooks","callHooks","executeInitAndCheckHooks","initPhase","incrementInitPhaseFlags","currentNodeIndex","nodeIndexLimit","lastNodeIndexFound","callHook","callHookInternal","directive","isInitHook","NO_PARENT_INJECTOR","NodeInjectorFactory","injectImpl","resolving","canSeeViewProviders","componentProviders","providerFactory","isViewProvider","injectImplementation","setUpAttributes","native","namespaceURI","attrVal","isAnimationProp","isNameOnlyAttributeMarker","mergeHostAttrs","dst","src","srcMarker","mergeHostAttribute","key2","markerInsertPosition","dstValue","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","ChainedInjector","hasParentInjector","parentLocation","getParentInjectorIndex","getParentInjectorView","viewOffset","getParentInjectorViewOffset","parentView","includeViewProviders","setIncludeViewProviders","BLOOM_MASK","BLOOM_BUCKET_BITS","nextNgElementId","getOrCreateNodeInjectorForNode","existingInjectorIndex","getInjectorIndex","firstCreatePass","injectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","parentIndex","parentData","footer","declarationViewOffset","lViewCursor","getTNodeFromLView","diPublicInInjector","bloomAdd","bloomHash","notFoundValueOrThrow","lookupTokenUsingModuleInjector","moduleInjector","getOrCreateInjectable","embeddedInjectorValue","lookupTokenUsingEmbeddedInjector","currentLView","nodeInjectorValue","lookupTokenUsingNodeInjector","embeddedViewInjector","embeddedViewInjectorValue","bloomHashBitOrFactory","tokenId","createNodeInjector","previousTView","hostTElementNode","shouldSearchParent","bloomHasToken","searchTokensOnInjector","currentTView","injectableIdx","locateDirectiveOrProvider","getNodeInjectable","canAccessViewProviders","isHostSpecialCase","nodeProviderIndexes","providerIndexes","tInjectables","injectablesStart","directivesStart","cptViewProvidersCount","endIndex","providerTokenOrDef","dirDef","isFactory","throwCyclicDependencyError","stringifyForError","previousIncludeViewProviders","registerPreOrderHooks","directiveIndex","directiveDef","wrappedOnChanges","preOrderHooks","preOrderCheckHooks","injectorView","isFirstHostTNode","NodeInjector","_tNode","_lView","ɵɵgetInheritedFactory","ownConstructor","ownFactory","getFactoryOf","objectPrototype","tViewType","ɵɵinjectAttribute","attrNameToInject","injectAttributeImpl","attrsLength","createInjector","additionalProviders","createInjectorWithoutInjectorInstances","attributeName","SCHEDULE_IN_ROOT_ZONE_DEFAULT","DestroyRef","injectDestroyRef","NodeInjectorDestroyRef","removeLViewOnDestroy","ChangeDetectionScheduler","ZONELESS_ENABLED","ZONELESS_SCHEDULER_DISABLED","SCHEDULE_IN_ROOT_ZONE","PendingTasksInternal","_hasPendingTasks","hasPendingTasks","EventEmitter_","__isAsync","destroyRef","isAsync","nextFn","errorFn","completeFn","wrapInTimeout","scheduleCallbackWithRafRace","timeoutId","animationFrameId","scheduleCallbackWithMicrotask","isAngularZoneProperty","angularZoneInstanceIdProperty","ngZoneInstanceId","hasPendingMacrotasks","hasPendingMicrotasks","isStable","onUnstable","onMicrotaskEmpty","onStable","enableLongStackTrace","shouldCoalesceEventChangeDetection","shouldCoalesceRunChangeDetection","scheduleInRootZone","assertZonePatched","_nesting","_outer","_inner","TaskTrackingZoneSpec","fork","longStackTraceZoneSpec","callbackScheduled","forkInnerZoneWithAngularBehavior","delayChangeDetectionForEventsDelegate","delayChangeDetectionForEvents","scheduleCheckStable","updateMicroTaskStatus","isCheckStableRunning","checkStable","instanceId","Fm","$u","onInvokeTask","task","applyThis","applyArgs","shouldBeIgnoredByZone","hasApplyArgsData","invokeTask","onLeave","onInvoke","invoke","isSchedulerTick","onHasTask","hasTaskState","hasTask","_hasPendingMicrotasks","microTask","macroTask","onHandleError","isInAngularZone","assertInAngularZone","assertNotInAngularZone","runTask","scheduleEventTask","EMPTY_PAYLOAD","cancelTask","NoopNgZone","_console","INTERNAL_APPLICATION_ERROR_HANDLER","userErrorHandler","inputFunction","inputRequiredFunction","injectElementRef","createElementRef","unwrapElementRef","symbolIterator","_results","_emitDistinctChangesOnly","_onDirty","_changesDetected","_changes","resultsTree","identityAccessor","newResultFlat","flatten","arrayEquals","valueA","valueB","notifyOnChanges","onDirty","setDirty","hasInSkipHydrationBlockFlag","ChangeDetectionStrategy","OnPush","TRACKED_LVIEWS","unregisterLView","MONKEY_PATCH_KEY_NAME","attachPatchData","registerLView","getFirstLContainer","getNearestLContainer","getNextLContainer","viewOrContainer","setDocument","DEFAULT_APP_ID","getDocument","PRESERVE_HOST_CONTENT","TracingAction","CHANGE_DETECTION","AFTER_NEXT_RENDER","TracingService","markedFeatures","performanceMarkFeature","performance","mark","AfterRenderPhase","EarlyRead","Write","MixedReadWrite","Read","AfterRenderManager","AFTER_RENDER_PHASES","AfterRenderImpl","sequences","deferredRegistrations","executing","erroredOrDestroyed","pipelinedValue","maybeTrace","afterRun","unregister","AfterRenderSequence","unregisterOnDestroy","callbackOrSpec","afterRenderImpl","tracing","manualCleanup","getHooks","earlyRead","write","mixedReadWrite","_retrieveHydrationInfoImpl","retrieveHydrationInfo","rNode","policy$1","getPolicy$1","createScript","createScriptURL","trustedScriptURLFromStringBypass","SafeValueImpl","changingThisBreaksApplicationSecurity","SafeHtmlImpl","getTypeName","SafeStyleImpl","SafeScriptImpl","SafeUrlImpl","SafeResourceUrlImpl","unwrapSafeValue","allowSanitizationBypassAndThrow","actualType","getSanitizationBypassType","bypassSanitizationTrustHtml","trustedHtml","bypassSanitizationTrustStyle","trustedStyle","bypassSanitizationTrustScript","trustedScript","bypassSanitizationTrustUrl","trustedUrl","bypassSanitizationTrustResourceUrl","trustedResourceUrl","DOMParserHelper","inertDocumentHelper","getInertBodyElement","DOMParser","parseFromString","InertDocumentHelper","defaultDoc","inertDocument","templateEl","SAFE_URL_PATTERN","_sanitizeUrl","tagSet","sets","VOID_ELEMENTS","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","VALID_ELEMENTS","URI_ATTRS","VALID_ATTRS","SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS","SanitizingHtmlSerializer","sanitizedSomething","buf","sanitizeChildren","traverseContent","parentNodes","startElement","TEXT_NODE","chars","getFirstChild","endElement","getNextSibling","getNodeName","elAttrs","elAttr","lower","encodeEntities","previousSibling","clobberedElementError","isClobberedElement","childNode","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","inertBodyHelper","_sanitizeHtml","unsafeHtmlInput","inertBodyElement","getInertBodyHelper","isDOMParserAvailable","unsafeHtml","mXSSAttempts","parsedHtml","getTemplateContent","isTemplateElement","ɵɵsanitizeUrl","unsafeUrl","getSanitizer","ɵɵsanitizeResourceUrl","unsafeResourceUrl","tag","getUrlSanitizer","COMMENT_DISALLOWED","COMMENT_DELIMITER","maybeUnwrapFn","InputFlags","SignalBased","HasDecoratorInputTransform","_icuContainerIterate","icuContainerIterate","tIcuContainerNode","applyToElementOrContainer","lNodeToHandle","lContainer","isComponent","nativeAppendChild","nativeInsertBefore","nativeRemoveNode","applyContainer","parentRElement","applyView","createCommentNode","escapeCommentText","createElementNode","detachViewFromDOM","trackMovedView","declarationContainer","movedViews","detachMovedView","declarationViewIndex","removeIndex","indexInContainer","viewToDetach","declarationLContainer","removedLView","removeViewFromDOM","lQueries","destroyLView","destroyViewTree","rootView","lViewOrLContainer","cleanUpView","firstView","consumerDestroy$1","executeOnDestroys","toCall","callContext","processCleanups","tCleanup","lCleanup","targetIdx","destroyHooksFn","effects","getParentRElement","getClosestRElement","nativeAppendOrInsertBefore","nativeParentNode","getInsertInFrontOfRNode","_getInsertInFrontOfRNodeWithI18n","_processI18nInsertBefore","getInsertInFrontOfRNodeWithNoI18n","childRNode","childTNode","parentRNode","getFirstNativeNode","tNodeType","getBeforeNodeForView","elIcuContainerChild","rNodeOrLContainer","projectionNodes","getProjectionNodes","projection","viewIndexInContainer","nextViewIndex","firstTNodeOfView","applyNodes","isProjection","rawSlotValue","nextRNode","applyProjectionRecursive","projectionNext","tProjectionNode","componentLView","nodeToProjectOrRNodes","nodeToProject","projectedComponentLView","writeDirectClass","setupStaticAttributes","mergedAttrs","writeDirectStyle","classIndexOf","classToSearch","startingIndex","foundIndex","NG_TEMPLATE_SELECTOR","isCssClassMatching","cssClassToMatch","isProjectionMode","isInlineTemplate","hasTagAndTypeMatch","currentSelector","isNodeMatchingSelector","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","isPositive","selectorAttrValue","attrIndexInNode","findAttrIndexInNode","nodeAttrValue","bindingsMode","maybeAttrName","matchTemplateAttribute","isNodeMatchingSelectorList","isSelectorInSelectorList","selectorListLoop","currentSelectorInList","maybeWrapInNotSelector","isNegativeMode","stringifyCSSSelector","currentChunk","valueOrMarker","NO_CHANGE","ɵɵadvance","selectIndexInternal","checkNoChangesMode","ɵɵdirectiveInject","ɵɵinvalidFactory","writeToDirectiveInput","inputTransforms","createLView","tHostNode","environment","hydrationInfo","getUniqueLViewId","getOrCreateTNode","createTNodeAtIndex","createTNode","tParent","insertBeforeIndex","directiveStylingLast","propertyBindings","localNames","initialInputs","stylesWithoutHost","residualStyles","classesWithoutHost","residualClasses","classBindings","styleBindings","isInI18nBlock","getCurrentParentTNode","allocExpando","numSlotsToAlloc","allocIdx","executeTemplate","templateFn","prevSelectedIndex","isUpdatePhase","executeContentQueries","createDirectivesInstances","instantiateAllDirectives","addComponentLogic","hostTNode","getOrCreateComponentTView","componentView","addToEndOfViewTree","getInitialLViewFlagsFromDef","setInputsFromAttrs","invokeDirectivesHostBindings","saveResolvedLocalsInData","viewData","localRefExtractor","localIndex","incompleteFirstPass","createTView","directiveDefs","pipeDefs","schemas","pipes","constsOrFactory","ssrId","initialViewLength","createViewBlueprint","fill","expandoStartIndex","hostBindingOpCodes","firstUpdatePass","staticViewQueries","staticContentQueries","directiveRegistry","pipeRegistry","_applyRootElementTransformImpl","captureNodeBindings","aliasMap","bindingsResult","hostDirectiveAliasMap","internalName","inputFlags","finalPublicName","addPropertyBinding","bindings","elementPropertyInternal","nativeOnly","dataValue","inputData","setInputsForProperty","markDirtyIfOnPush","viewIndex","childComponentLView","mapPropName","resolveDirectives","localRefs","exportsMap","findDirectiveDefMatches","registry","hostDirectiveDefs","findHostDirectiveDefs","hostDirectiveMatches","markAsComponentHost","initializeDirectives","cacheMatchingLocalNames","initTNodeFlags","numberOfDirectives","providersResolver","preOrderHooksFound","preOrderCheckHooksFound","directiveIdx","configureViewWithDirective","saveNameToExportMap","lifeCycleHooks","initializeInputAndOutputAliases","hostDirectiveDefinitionMap","tViewData","tNodeAttrs","inputsFromAttrs","inputsStore","outputsStore","aliasData","aliasedOutputs","generateInitialInputs","elementIndex","getCurrentDirectiveIndex","invokeHostBindingsInCreationMode","directiveFactory","nodeInjectorFactory","registerHostBindingOpCodes","directiveVarsIdx","elementIndx","lastSelectedElementIdx","signals","onPush","elementAttributeInternal","setElementAttribute","strValue","initialInputData","inputsToStore","inputConfig","createLContainer","hostNative","refreshContentQueries","directiveDefIdx","executeViewQueryFn","viewQueryFn","getOrCreateLViewCleanup","getOrCreateTViewCleanup","loadComponentRenderer","currentDef","unwrapLView","textBindingInternal","updateTextNode","renderComponent","hostLView","componentHostIdx","componentTView","syncViewWithBlueprint","hostRNode","renderView","finishViewCreation","renderChildComponents","createAndRenderEmbeddedLView","declarationLView","templateTNode","embeddedTView","embeddedLView","dehydratedView","declarationViewLQueries","getLViewFromLContainer","shouldAddViewToDom","addLViewToLContainer","addToDOM","insertView","containerLength","addViewToDOM","parentNativeNode","removeLViewFromLContainer","collectNativeNodes","lNode","collectNativeNodesInLContainer","nodesInSlot","lViewInAContainer","lViewFirstChildTNode","freeConsumers","REACTIVE_LVIEW_CONSUMER_NODE","REACTIVE_NODE$1","TEMPORARY_CONSUMER_NODE","viewShouldHaveReactiveConsumer","runEffectsInView","tryFlushEffects","foundDirtyEffect","detectChangesInternal","notifyErrorHandler","detectChangesInViewWhileDirty","lastIsRefreshingViewsValue","detectChangesInView","retries","refreshView","returnConsumerToPool","currentConsumer","getOrBorrowReactiveLViewConsumer","borrowReactiveLViewConsumer","consumerBeforeComputation$1","getActiveConsumer","getActiveConsumer$1","getOrCreateTemporaryConsumer","setBindingIndex","hooksInitPhaseCompleted","markTransplantedViewsForRefresh","detectChangesInEmbeddedViews","processHostBindingOpCodes","opCode","bindingRootIndx","hostBindingFn","detectChangesInChildComponents","notifyEffect","consumerAfterComputation$1","maybeReturnReactiveLViewConsumer","detectChangesInViewIfAttached","detectChangesInComponent","shouldRefreshView","consumerPollProducersForChange$1","markViewDirty","dirtyBitsToUse","ViewRef$1","_cdRefInjectingView","_attachedToViewContainer","viewRefs","markForRefresh","reattach","checkNoChanges","attachToViewContainerRef","detachFromAppRef","attachToAppRef","injectTemplateRef","ViewEngineTemplateRef","R3TemplateRef","_declarationLView","_declarationTContainer","createEmbeddedViewImpl","createTemplateRef","_findMatchingDehydratedViewImpl","findMatchingDehydratedView","ComponentRef$1","ComponentFactory$1","_NullComponentFactoryResolver","resolveComponentFactory","ComponentFactoryResolver$1","injectRenderer2","nodeAtIndex","isNgModule","computeStaticStyling","writeToHost","ComponentFactoryResolver","componentDef","ComponentFactory","toRefArray","isInputMap","templateName","componentType","isBoundToModule","refArray","stringifyCSSSelectorList","selectorList","rootSelectorOrNode","realEnvironmentInjector","getStandaloneInjector","rootViewInjector","hostRenderer","locateHostElement","elementOrSelector","rootElement","applyRootElementTransform","getNamespace","rootFlags","rootTView","rootLView","tElementNode","rootComponentDef","rootDirectives","createRootComponentTNode","createRootComponentView","applyRootComponentStyling","viewRenderer","setRootNodeAttributes","extractAttrsAndClassesFromSelector","projectNodes","nodesforSlot","createRootComponent","hostFeatures","rootTNode","LifecycleHooksFeature","ComponentRef","_rootLView","previousInputValues","injectViewContainerRef","createContainerRef","VE_ViewContainerRef","R3ViewContainerRef","_lContainer","_hostTNode","_hostLView","getViewRefs","indexOrOptions","insertImpl","componentFactoryOrType","isComponentFactory","isType","componentFactory","contextInjector","viewAttachedToContainer","prevIdx","prevLContainer","prevVCRef","adjustedIdx","getOrCreateViewRefs","viewRefsArr","detachedView","_locateOrCreateAnchorNode","createAnchorNode","commentNode","insertAnchorNode","nativeNextSibling","_populateDehydratedViewsInLContainer","LQuery_","queryList","LQueries_","tQueries","noOfInheritedQueries","viewLQueries","tQuery","getByIndex","indexInDeclarationView","dirtyQueriesWithMatches","getTQuery","TQueryMetadata_","splitQueryMultiSelectors","locator","TQueries_","elementStart","elementEnd","queriesForTemplateRef","childQueryIndex","tqueryClone","track","tquery","TQuery_","crossesNgTemplate","_declarationNodeIndex","_appliesToNextNode","isApplyingToNode","matchTNode","addMatch","declarationNodeIdx","matchTNodeWithReadOption","getIdxOfMatchingSelector","nodeMatchIdx","directiveOrProviderIdx","tNodeIdx","matchIdx","createResultForNode","matchingIdx","createResultByTNodeType","createSpecialToken","materializeViewResults","queryIndex","lQuery","tQueryMatches","matchedNodeIdx","collectQueryResults","lViewResults","embeddedLViews","loadQueryInternal","createLQuery","storeCleanupWithContext","createContentQuery","createTQuery","saveContentQueryAndDirectiveIndex","tViewContentQueries","getQueryResults","signalFn","createSignal","getter","createSignal$1","updateFn","signalUpdateFn","updater","signalUpdateFn$1","asReadonly","signalAsReadonlyFn","readonlyFn","isWritableSignal","createQuerySignalFn","firstOnly","createComputed$1","_dirtyCounter","refreshSignalQuery","_queryIndex","_flatValue","contentChildFn","createSingleResultOptionalQuerySignalFn","contentChildRequiredFn","createSingleResultRequiredQuerySignalFn","NgModuleRef$1","NgModuleFactory$1","createNgModule","_bootstrapComponents","_r3Injector","destroyCbs","runInjectorInitializers","bootstrap","moduleType","EnvironmentNgModuleRefAdapter","debugName","runEnvironmentInitializers","StandaloneService","cachedInjectors","getOrCreateStandaloneInjector","standaloneInjector","ɵɵdefineComponent","componentDefinition","baseDef","getNgDirectiveDef","initFeatures","extractDefListOrFactory","getComponentId","hashSelectors","char","imul","extractDirectiveDef","nonNull","ɵɵdefineNgModule","declarations","exports","transitiveCompileScopes","parseAndConvertBindingsForDefinition","newLookup","minifiedKey","ɵɵdefineDirective","directiveDefinition","ɵɵdefinePipe","pipeDef","hostDirectives","debugInfo","defExtractor","ɵɵInheritDefinitionFeature","superType","getSuperType","shouldInheritFields","inheritanceChain","superDef","writeableDef","maybeUnwrapEmpty","superHostBindings","inheritHostBindings","superViewQuery","superContentQueries","inheritViewQuery","inheritContentQueries","mergeInputsWithTransforms","defData","mergeHostAttrsAcrossInheritance","minifiedName","prevViewQuery","prevContentQueries","prevHostBindings","ɵɵHostDirectivesFeature","rawHostDirectives","isEager","createHostDirectiveDef","matchedDefs","configOrFn","trackHostDirectiveDef","hostDirectiveDef","patchDeclaredInputs","exposedInputs","bindingArrayToMap","ɵɵInputTransformsFeature","isListLikeIterable","isJsObject","updateBinding","bindingUpdated","bindingUpdated2","exp1","exp2","different","declareTemplate","declarationTView","localRefsIndex","templateFirstCreatePass","tViewConsts","comment","_locateOrCreateContainerAnchor","populateDehydratedViewsInLContainer","ɵɵtemplate","attrsIndex","createContainerAnchorImpl","Console","GLOBAL_PUBLISH_EXPANDO_KEY","publishExternalGlobalUtil","publishUtil","COMPILED","w","TESTABILITY","TESTABILITY_GETTER","_testabilityGetter","Testability","_isZoneStable","_callbacks","taskTrackingZone","testabilityGetter","setTestabilityGetter","addToWindow","_watchAngularEvents","_runCallbacksIfReady","doneCb","getPendingTasks","updateCb","macroTasks","creationLocation","addCallback","whenStable","registerApplication","unregisterApplication","findProviders","using","exactMatch","TestabilityRegistry","_applications","testability","unregisterAllApplications","getTestability","getAllTestabilities","getAllRootElements","findTestabilityInTree","findInAncestors","isSubscribable","APP_INITIALIZER","initializerFn","ApplicationInitStatus","initialized","donePromise","appInits","runInitializers","asyncInitPromises","initResult","observableAsPromise","all","EffectScheduler","ZoneAwareEffectScheduler","queuedEffectCount","queues","queue","flushQueue","_runningTick","_destroyListeners","_views","internalErrorHandler","afterRenderManager","zonelessEnabled","rootEffectScheduler","dirtyFlags","deferredDirtyFlags","tracingSnapshot","externalTestViews","afterTick","allViews","stable","_rendererFactory","componentOrFactory","cf","compRef","_loadComponent","tick","_tick","synchronize","runs","synchronizeOnce","useGlobalCheck","detectChangesInViewIfRequired","syncDirtyFlagsWithViews","warnIfDestroyed","isFirstPass","ɵɵattribute","interpolation1","v0","suffix","interpolation3","v1","v2","bindingUpdated3","exp3","toTStylingRange","getTStylingRangePrev","tStylingRange","setTStylingRangePrevDuplicate","getTStylingRangeNext","setTStylingRangeNext","setTStylingRangeNextDuplicate","markDuplicates","tStylingKey","isPrevDir","tStylingAtIndex","isMap","foundDuplicate","tStyleRangeAtCursor","isStylingMatch","tStylingKeyCursor","parserState","textEnd","keyEnd","valueEnd","getLastParsedKey","parseClassNameNext","consumeClassToken","consumeWhitespace","ɵɵproperty","setDirectiveInputsWhichShadowsStyling","isClassBased","ɵɵstyleProp","checkStylingProperty","ɵɵclassProp","ɵɵclassMap","checkStylingMap","classKeyValueArraySet","classStringParser","parseClassName","resetParserState","stylingFirstUpdatePass","updateStyling","normalizeSuffix","stringParser","hasStylingInputShadow","isInHostBindings","staticPrefix","updateStylingMap","oldKeyValueArray","newKeyValueArray","oldIndex","oldKey","newKey","setKey","toStylingKeyValueArray","styleKeyValueArray","unwrappedValue","isHostBindings","wrapInStaticStylingKey","stylingKey","residual","collectStylingFromTAttrs","collectStylingFromDirectives","templateStylingKey","getTemplateHeadTStylingKey","setTemplateHeadTStylingKey","collectResidual","insertTStylingBinding","tStylingKeyWithStatic","isHostBinding","isClassBinding","tBindings","tmplHead","tmplTail","isKeyDuplicateOfStatic","previousNode","setTStylingRangePrev","markDuplicateOfResidualStyling","currentDirective","desiredMarker","currentMarker","stringKey","tRange","higherPriorityValue","getTStylingRangeNextDuplicate","findStylingValue","isStylingValuePresent","getTStylingRangePrevDuplicate","applyStyling","isPrevDirection","rawKey","containsStatics","isStylingMap","valueAtLViewIndex","ɵɵclassMapInterpolate1","LiveCollection","updateValue","swap","index1","index2","startIdx","endIdx","endItem","startItem","prevIndex","newIdx","valuesMatching","liveIdx","liveValue","trackBy","attachPreviouslyDetached","prevCollection","detachedItems","createOrAttach","liveCollection","trackByFn","newItem","initLiveItemsInTheFuture","UniqueValueMultiKeyMap","kvMap","_vMap","prevValue","vMap","ɵɵconditional","matchingTemplateIndex","contextValue","prevMatchingTemplateIndex","prevContainer","getLContainer","nextLContainerIndex","nextContainer","getExistingTNode","RepeaterContext","$count","ɵɵrepeaterTrackByIdentity","RepeaterMetadata","hasEmptyBlock","ɵɵrepeaterCreate","trackByUsesComponentInstance","emptyTemplateFn","emptyDecls","emptyVars","emptyTagName","emptyAttrsIndex","boundTrackBy","LiveCollectionLContainerImpl","operationsCounter","needsIndexUpdate","detachExistingView","recordCreate","recordDestroy","updateIndexes","getExistingLViewFromLContainer","ɵɵrepeater","collection","metadataSlotIdx","hostTView","containerIndex","itemTemplateTNode","reconcile","newCollection","liveKeysInTheFuture","liveStartIdx","liveEndIdx","newEndIdx","liveStartValue","newStartValue","isStartMatching","liveEndValue","newEndValue","isEndMatching","liveStartKey","liveEndKey","newStartKey","newEndKey","newCollectionIterator","newIterationResult","liveKey","isCollectionEmpty","emptyTemplateIndex","lContainerForEmpty","emptyTemplateTNode","ɵɵelementStart","elementStartFirstCreatePass","_locateOrCreateElementNode","hasDirectives","isDetachedByI18n","getElementDepthCount","increaseElementDepthCount","ɵɵelementEnd","isSkipHydrationRootTNode","leaveSkipHydrationBlock","decreaseElementDepthCount","hasClassInput","hasStyleInput","ɵɵelement","getNamespace$1","ɵɵelementContainerStart","elementContainerStartFirstCreatePass","_locateOrCreateElementContainerNode","ɵɵelementContainerEnd","ɵɵelementContainer","ɵɵgetCurrentView","ɵɵhostProperty","ɵɵsyntheticHostProperty","u","localeEn","plural","LOCALE_DATA","findLocaleData","normalizedLocale","normalizeLocale","getLocaleData","parentLocale","getLocalePluralCase","LocaleDataIndex","PluralCase","ng","common","locales","LocaleId","DayPeriodsFormat","DayPeriodsStandalone","DaysFormat","DaysStandalone","MonthsFormat","MonthsStandalone","Eras","FirstDayOfWeek","WeekendRange","DateFormat","TimeFormat","CurrencyCode","CurrencySymbol","CurrencyName","ExtraData","DEFAULT_LOCALE_ID","LOCALE_ID$1","stashEventListener","listenerFn","ɵɵlistener","useCapture","eventTargetResolver","listenerInternal","ɵɵsyntheticHostListener","isTNodeDirectiveHost","processOutputs","lCleanupIndex","idxOrTargetGetter","existingListener","findExistingListener","cleanupEventName","listenerIdxInLCleanup","__ngLastListenerFn__","__ngNextListenerFn__","wrapListener","propsLength","executeListenerWithErrorHandling","wrapListenerIn_markDirtyAndPreventDefault","nextListenerFn","ɵɵnextContext","nextContextImpl","walkUpViews","nestingLevel","matchingProjectionSlotIndex","projectionSlots","wildcardNgContentIndex","ngProjectAsAttrVal","getProjectAsAttrValue","ngProjectAsAttrIdx","ɵɵprojectionDef","componentNode","projectionHeads","newArray","tails","componentChild","slotIndex","ɵɵprojection","selectorIndex","fallbackTemplateFn","fallbackDecls","fallbackVars","fallbackIndex","isNodeCreationMode","insertFallbackContent","fallbackTNode","fallbackLContainer","applyProjection","ɵɵcontentQuery","ɵɵviewQuery","createViewQuery","ɵɵqueryRefresh","isCreationMode","ɵɵloadQuery","ɵɵcontentQuerySignal","bindQueryToSignal","_queryList","ɵɵqueryAdvance","indexOffset","ɵɵreference","getContextLView","ɵɵtext","textNative","_locateOrCreateTextNode","ɵɵtextInterpolate","ɵɵtextInterpolate1","interpolated","ɵɵtextInterpolate2","interpolation2","ɵɵtextInterpolate3","ɵɵtwoWayProperty","ɵɵtwoWayBindingSet","canWrite","ɵɵtwoWayListener","resolveProvider","lInjectablesBlueprint","beginIndex","existingFactoryIndex","registerDestroyHooksIfSupported","existingProvidersFactoryIndex","existingViewProvidersFactoryIndex","doesViewProvidersFactoryExist","multiFactory","factoryFn","multiFactoryAdd","multiViewProvidersFactoryResolver","multiProvidersFactoryResolver","contextIndex","indexInFactory","providerIsTypeProvider","providerIsClassProvider","isClassProvider","existingCallbacksIndex","isComponentProvider","lData","multiResolve","factories","componentCount","multiProviders","ɵɵProvidersFeature","viewProviders","processProvidersFn","ɵɵpureFunction0","slotOffset","pureFn","getBinding","ɵɵpureFunction1","pureFunction1Internal","getPureFunctionReturnValue","returnValueIndex","lastReturnValue","bindingRoot","pureFunction4Internal","exp4","bindingUpdated4","ɵɵpipe","pipeName","getPipeDef","pipeFactory","pipeInstance","ɵɵpipeBind1","isPure","ɵɵpipeBind4","v3","v4","ɵɵtemplateRefExtractor","Version","full","major","minor","ModuleWithComponentFactories","ngModuleFactory","componentFactories","compileModuleSync","compileModuleAndAllComponentsSync","declaration","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","getModuleId","NgZoneChangeDetectionScheduler","applicationRef","_onMicrotaskEmptySubscription","initialize","runningTick","PROVIDED_NG_ZONE","internalProvideZoneChangeDetection","ngZoneFactory","ignoreChangesOutsideZone","getNgZoneOptions","ngZoneChangeDetectionScheduler","ZoneStablePendingTask","zoneProviders","ngZoneOptions","runCoalescing","ChangeDetectionSchedulerImpl","taskService","disableScheduling","zoneIsDefined","schedulerTickApplyArgs","__scheduler_tick__","subscriptions","angularZoneId","cancelScheduledCallback","useMicrotaskScheduler","pendingRenderTaskId","force","shouldScheduleTick","scheduleCallback","getGlobalLocale","$localize","PLATFORM_DESTROY_LISTENERS","ENABLE_ROOT_COMPONENT_BOOTSTRAP","isApplicationBootstrapConfig","moduleRef","_platformInjector","injectChangeDetectorRef","createViewRef","isPipe","DefaultIterableDifferFactory","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","forEachItem","nextIt","nextRemove","addRemoveOffset","moveOffsets","getPreviousIndex","adjPreviousIndex","_nextRemoved","localMovePreviousIndex","localCurrentIndex","forEachPreviousItem","_nextPrevious","forEachAddedItem","_nextAdded","forEachMovedItem","_nextMoved","forEachRemovedItem","_nextIdentityChange","_reset","itemTrackBy","mayBeDirty","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","iterateListLike","_truncate","previousRecord","_prev","_remove","_reinsertAfter","_moveAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","nextRecord","_addToRemovals","_unlink","prevRecord","_prevRemoved","_insertAfter","_DuplicateMap","toIndex","_prevDup","_nextDup","_DuplicateItemRecordList","_head","_tail","atOrAfterIndex","duplicates","recordList","moveOffset","DefaultKeyValueDifferFactory","DefaultKeyValueDiffer","_records","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","forEachChangedItem","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","KeyValueChangeRecord_","_addToAdditions","_addToChanges","defaultIterableDiffersFactory","IterableDiffers","copied","defaultKeyValueDiffersFactory","KeyValueDiffers","kv","internalCreateApplication","platformInjector","createOrReusePlatformInjector","createPlatformInjector","publishSignalConfiguration","setThrowInvalidWriteToSignalError","setThrowInvalidWriteToSignalError$1","runPlatformInitializers","inits","allAppProviders","envInjector","r3Injector","exceptionHandler","onErrorSubscription","destroyListener","onPlatformDestroyListeners","allPlatformModules","_callAndReportToErrorHandler","initStatus","setLocaleId","localeId","moduleDoBootstrap","ngDoBootstrap","nonReactiveReadsFn","ViewContext","injectViewContext","MicrotaskEffectScheduler","EffectHandle","effectFn","watcher","allowSignalWrites","createWatch","registerOnCleanup","isInNotificationPhase","destroyWatchNode","isWatchNodeDestroyed","ue","createWatch$1","onCleanup","runEffect","useMicrotaskEffectsByDefault","EffectRefImpl","microtaskEffect","cdr","forceRoot","createRootEffect","ROOT_EFFECT_NODE","createViewEffect","VIEW_EFFECT_NODE","onDestroyFn","BASE_EFFECT_NODE","cleanupFns","registerCleanupFn","prevNode","prevRefreshingViews","maybeCleanup","asyncGeneratorStep","_throw"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./node_modules/@angular/common/fesm2022/common.mjs","./node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs","./node_modules/@angular/cdk/fesm2022/platform.mjs","./node_modules/@angular/cdk/fesm2022/private.mjs","./node_modules/@angular/cdk/fesm2022/keycodes.mjs","./node_modules/rxjs/dist/esm/internal/util/isScheduler.js","./node_modules/rxjs/dist/esm/internal/util/args.js","./node_modules/tslib/tslib.es6.mjs","./node_modules/rxjs/dist/esm/internal/util/isArrayLike.js","./node_modules/rxjs/dist/esm/internal/util/isPromise.js","./node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js","./node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js","./node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js","./node_modules/rxjs/dist/esm/internal/symbol/iterator.js","./node_modules/rxjs/dist/esm/internal/util/isIterable.js","./node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js","./node_modules/rxjs/dist/esm/internal/observable/innerFrom.js","./node_modules/rxjs/dist/esm/internal/util/executeSchedule.js","./node_modules/rxjs/dist/esm/internal/operators/observeOn.js","./node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js","./node_modules/rxjs/dist/esm/internal/observable/from.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js","./node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js","./node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js","./node_modules/rxjs/dist/esm/internal/observable/of.js","./node_modules/rxjs/dist/esm/internal/operators/tap.js","./node_modules/rxjs/dist/esm/internal/scheduler/Action.js","./node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","./node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","./node_modules/rxjs/dist/esm/internal/Scheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/async.js","./node_modules/rxjs/dist/esm/internal/operators/debounceTime.js","./node_modules/rxjs/dist/esm/internal/operators/filter.js","./node_modules/rxjs/dist/esm/internal/observable/empty.js","./node_modules/rxjs/dist/esm/internal/operators/take.js","./node_modules/rxjs/dist/esm/internal/operators/skip.js","./node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js","./node_modules/rxjs/dist/esm/internal/operators/takeUntil.js","./node_modules/@angular/cdk/fesm2022/observers.mjs","./node_modules/@angular/cdk/fesm2022/coercion.mjs","./node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js","./node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js","./node_modules/rxjs/dist/esm/internal/util/createObject.js","./node_modules/rxjs/dist/esm/internal/observable/combineLatest.js","./node_modules/rxjs/dist/esm/internal/operators/mergeMap.js","./node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js","./node_modules/rxjs/dist/esm/internal/operators/mergeAll.js","./node_modules/rxjs/dist/esm/internal/observable/concat.js","./node_modules/rxjs/dist/esm/internal/operators/concatAll.js","./node_modules/rxjs/dist/esm/internal/operators/startWith.js","./node_modules/@angular/cdk/fesm2022/layout.mjs","./node_modules/@angular/cdk/fesm2022/a11y.mjs","./node_modules/@angular/cdk/fesm2022/bidi.mjs","./node_modules/@angular/material/fesm2022/core.mjs","./node_modules/@angular/material/fesm2022/progress-bar.mjs","./node_modules/@angular/material/fesm2022/button.mjs","./node_modules/@angular/cdk/fesm2022/portal.mjs","./node_modules/rxjs/dist/esm/internal/observable/fromEvent.js","./node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js","./node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js","./node_modules/rxjs/dist/esm/internal/util/Immediate.js","./node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js","./node_modules/rxjs/dist/esm/internal/scheduler/asap.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js","./node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js","./node_modules/rxjs/dist/esm/internal/observable/timer.js","./node_modules/rxjs/dist/esm/internal/util/isDate.js","./node_modules/rxjs/dist/esm/internal/operators/auditTime.js","./node_modules/rxjs/dist/esm/internal/operators/audit.js","./node_modules/@angular/cdk/fesm2022/scrolling.mjs","./node_modules/rxjs/dist/esm/internal/observable/merge.js","./node_modules/@angular/cdk/fesm2022/overlay.mjs","./node_modules/rxjs/dist/esm/internal/operators/takeWhile.js","./node_modules/@angular/material/fesm2022/snack-bar.mjs","./node_modules/rxjs/dist/esm/internal/util/EmptyError.js","./node_modules/rxjs/dist/esm/internal/observable/defer.js","./node_modules/rxjs/dist/esm/internal/observable/throwError.js","./node_modules/rxjs/dist/esm/internal/operators/refCount.js","./node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js","./node_modules/rxjs/dist/esm/internal/operators/switchMap.js","./node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js","./node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js","./node_modules/rxjs/dist/esm/internal/operators/first.js","./node_modules/rxjs/dist/esm/internal/operators/concatMap.js","./node_modules/rxjs/dist/esm/internal/operators/catchError.js","./node_modules/rxjs/dist/esm/internal/operators/takeLast.js","./node_modules/rxjs/dist/esm/internal/operators/mapTo.js","./node_modules/rxjs/dist/esm/internal/operators/finalize.js","./node_modules/@angular/router/fesm2022/router.mjs","./node_modules/rxjs/dist/esm/internal/util/isObservable.js","./node_modules/rxjs/dist/esm/internal/operators/scan.js","./node_modules/rxjs/dist/esm/internal/operators/scanInternals.js","./node_modules/rxjs/dist/esm/internal/operators/last.js","./node_modules/@angular/common/fesm2022/http.mjs","./src/app/services/app-state.service.ts","./src/app/services/security.service.ts","./node_modules/@azure/core-paging/dist/browser/getPagedAsyncIterator.js","./node_modules/@azure/core-rest-pipeline/dist/browser/pipeline.js","./node_modules/@azure/logger/dist/browser/debug.js","./node_modules/@azure/logger/dist/browser/log.common.js","./node_modules/@azure/logger/dist/browser/index.js","./node_modules/@azure/core-rest-pipeline/dist/browser/log.js","./node_modules/@azure/abort-controller/dist/browser/AbortError.js","./node_modules/@azure/core-util/dist/browser/random.js","./node_modules/@azure/core-util/dist/browser/delay.js","./node_modules/@azure/core-util/dist/browser/createAbortablePromise.js","./node_modules/@azure/core-util/dist/browser/object.js","./node_modules/@azure/core-util/dist/browser/error.js","./node_modules/@azure/core-util/dist/browser/bytesEncoding.common.js","./node_modules/@azure/core-util/dist/browser/sha256.common.js","./node_modules/@azure/core-util/dist/browser/typeGuards.js","./node_modules/@azure/core-util/dist/browser/uuidUtils.js","./node_modules/@azure/core-util/dist/browser/uuidUtils.common.js","./node_modules/@azure/core-util/dist/browser/checkEnvironment.js","./node_modules/@azure/core-rest-pipeline/dist/browser/util/sanitizer.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/redirectPolicy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/util/userAgentPlatform.js","./node_modules/@azure/core-rest-pipeline/dist/browser/util/userAgent.js","./node_modules/@azure/core-rest-pipeline/dist/browser/constants.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/userAgentPolicy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/util/file.js","./node_modules/@azure/core-rest-pipeline/dist/browser/util/typeGuards.js","./node_modules/@azure/core-rest-pipeline/dist/browser/util/concat.common.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/multipartPolicy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/util/helpers.js","./node_modules/@azure/core-rest-pipeline/dist/browser/retryStrategies/throttlingRetryStrategy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/retryStrategies/exponentialRetryStrategy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/retryPolicy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/httpHeaders.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/formDataPolicy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/proxyPolicy.common.js","./node_modules/@azure/core-tracing/dist/browser/tracingContext.js","./node_modules/@azure/core-tracing/dist/browser/state.js","./node_modules/@azure/core-tracing/dist/browser/instrumenter.js","./node_modules/@azure/core-tracing/dist/browser/tracingClient.js","./node_modules/@azure/core-rest-pipeline/dist/browser/util/inspect.common.js","./node_modules/@azure/core-rest-pipeline/dist/browser/restError.js","./node_modules/@azure/core-rest-pipeline/dist/browser/createPipelineFromOptions.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/agentPolicy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/tlsPolicy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/decompressResponsePolicy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/setClientRequestIdPolicy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/defaultRetryPolicy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/tracingPolicy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/logPolicy.js","./node_modules/@azure/core-rest-pipeline/dist/browser/fetchHttpClient.js","./node_modules/@azure/core-rest-pipeline/dist/browser/pipelineRequest.js","./node_modules/@azure/core-rest-pipeline/dist/browser/util/tokenCycler.js","./node_modules/@azure/core-rest-pipeline/dist/browser/policies/bearerTokenAuthenticationPolicy.js","./node_modules/@azure/app-configuration/dist/browser/logger.js","./node_modules/@azure/app-configuration/dist/browser/internal/synctokenpolicy.js","./node_modules/@azure/app-configuration/dist/browser/featureFlag.js","./node_modules/@azure/app-configuration/dist/browser/internal/helpers.js","./node_modules/@azure/app-configuration/dist/browser/secretReference.js","./node_modules/@azure/core-client/dist/browser/base64.js","./node_modules/@azure/core-client/dist/browser/interfaces.js","./node_modules/@azure/core-client/dist/browser/utils.js","./node_modules/@azure/core-client/dist/browser/serializer.js","./node_modules/@azure/core-client/dist/browser/state.js","./node_modules/@azure/core-client/dist/browser/operationHelpers.js","./node_modules/@azure/core-client/dist/browser/deserializationPolicy.js","./node_modules/@azure/core-client/dist/browser/interfaceHelpers.js","./node_modules/@azure/core-client/dist/browser/httpClientCache.js","./node_modules/@azure/core-client/dist/browser/urlHelpers.js","./node_modules/@azure/core-client/dist/browser/log.js","./node_modules/@azure/core-client/dist/browser/serviceClient.js","./node_modules/@azure/core-rest-pipeline/dist/browser/defaultHttpClient.js","./node_modules/@azure/core-client/dist/browser/pipeline.js","./node_modules/@azure/core-client/dist/browser/serializationPolicy.js","./node_modules/@azure/core-http-compat/dist/browser/policies/disableKeepAlivePolicy.js","./node_modules/@azure/core-http-compat/dist/browser/util.js","./node_modules/@azure/core-http-compat/dist/browser/response.js","./node_modules/@azure/core-http-compat/dist/browser/extendedClient.js","./node_modules/@azure/core-lro/dist/browser/logger.js","./node_modules/@azure/core-lro/dist/browser/poller/constants.js","./node_modules/@azure/core-lro/dist/browser/poller/operation.js","./node_modules/@azure/core-lro/dist/browser/http/operation.js","./node_modules/@azure/core-lro/dist/browser/http/poller.js","./node_modules/@azure/core-lro/dist/browser/poller/poller.js","./node_modules/@azure/core-lro/dist/browser/legacy/poller.js","./node_modules/@azure/app-configuration/dist/browser/generated/src/models/mappers.js","./node_modules/@azure/app-configuration/dist/browser/generated/src/models/parameters.js","./node_modules/@azure/app-configuration/dist/browser/generated/src/appConfiguration.js","./node_modules/@azure/app-configuration/dist/browser/generated/src/lroImpl.js","./node_modules/@azure/app-configuration/dist/browser/internal/constants.js","./node_modules/@azure/app-configuration/dist/browser/internal/tracing.js","./node_modules/@azure/app-configuration/dist/browser/appConfigurationClient.js","./node_modules/@azure/core-auth/dist/browser/tokenCredential.js","./node_modules/@azure/app-configuration/dist/browser/appConfigCredential.js","./src/app/app-configuration/configurationService.ts","./src/environments/environment.ts","./src/app/services/app-session-state.service.ts","./src/app/services/auth.service.ts","./src/app/services/loading.service.ts","./src/app/models/notification.model.ts","./src/app/services/notification.service.ts","./src/app/app.component.html","./src/app/app.component.ts","./node_modules/@angular/platform-browser/fesm2022/animations/async.mjs","./src/app/app-configuration/appInitializer.ts","./src/app/services/quoting.service.ts","./node_modules/rxjs/dist/esm/internal/observable/forkJoin.js","./node_modules/@angular/forms/fesm2022/forms.mjs","./node_modules/@angular/material/fesm2022/checkbox.mjs","./node_modules/rxjs/dist/esm/internal/ReplaySubject.js","./node_modules/rxjs/dist/esm/internal/operators/share.js","./node_modules/@angular/cdk/fesm2022/observers/private.mjs","./node_modules/rxjs/dist/esm/internal/operators/shareReplay.js","./node_modules/@angular/material/fesm2022/form-field.mjs","./node_modules/rxjs/dist/esm/internal/operators/pairwise.js","./node_modules/@angular/cdk/fesm2022/text-field.mjs","./node_modules/@angular/material/fesm2022/input.mjs","./node_modules/@angular/material/fesm2022/datepicker.mjs","./node_modules/@angular/cdk/fesm2022/collections.mjs","./node_modules/@angular/material/fesm2022/radio.mjs","./node_modules/@angular/material/fesm2022/select.mjs","./node_modules/rxjs/dist/esm/internal/operators/delayWhen.js","./node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js","./node_modules/@angular/material/fesm2022/autocomplete.mjs","./node_modules/rxjs/dist/esm/internal/operators/delay.js","./node_modules/@angular/cdk/fesm2022/accordion.mjs","./node_modules/@angular/material/fesm2022/expansion.mjs","./src/app/pages/auth/insured-information/insured-information.component.html","./src/app/pages/auth/insured-information/insured-information.component.ts","./src/app/services/rater-data.service.ts","./src/app/pages/auth/license-information/license-information.component.html","./src/app/pages/auth/license-information/license-information.component.ts","./src/app/pages/auth/logged-in/logged-in.component.ts","./src/app/pages/auth/logged-in/logged-in.component.html","./node_modules/@angular/material/fesm2022/icon.mjs","./src/app/services/insured.service.ts","./src/app/pages/auth/login/login.component.html","./src/app/pages/auth/login/login.component.ts","./src/app/pages/auth/not-logged-in/contact-information/contact-information.component.html","./src/app/pages/auth/not-logged-in/contact-information/contact-information.component.ts","./src/app/pages/auth/not-logged-in/not-logged-in.component.ts","./src/app/pages/auth/not-logged-in/not-logged-in.component.html","./src/app/models/rater-data.model.ts","./src/app/pages/auth/auth.component.html","./src/app/pages/auth/auth.component.ts","./src/app/services/user.service.ts","./src/app/pages/auth/login/forgot-password/forgot-password.component.html","./src/app/pages/auth/login/forgot-password/forgot-password.component.ts","./src/app/validators/confirm-password.validator.ts","./src/app/pages/auth/login/password-reset/password-reset.component.html","./src/app/pages/auth/login/password-reset/password-reset.component.ts","./src/app/services/rater.service.ts","./src/app/services/insured-rater.service.ts","./src/app/pages/auth/register/register.component.html","./src/app/pages/auth/register/register.component.ts","./src/app/pages/landing-page/landing-page.component.html","./src/app/pages/landing-page/landing-page.component.ts","./src/app/pages/layout/layout.component.ts","./src/app/pages/layout/layout.component.html","./node_modules/@angular/cdk/fesm2022/table.mjs","./node_modules/@angular/material/fesm2022/table.mjs","./node_modules/@angular/cdk/fesm2022/dialog.mjs","./node_modules/@angular/material/fesm2022/dialog.mjs","./src/app/pages/quoting/additional-coverage-nrds-dialog/additional-coverage-nrds-dialog.component.ts","./src/app/pages/quoting/additional-coverage-nrds-dialog/additional-coverage-nrds-dialog.component.html","./src/app/validators/yes-no.validator.ts","./src/app/pages/quoting/quoting.component.html","./src/app/pages/quoting/quoting.component.ts","./src/app/services/payment.service.ts","./src/app/pages/summary/summary.component.html","./src/app/app.routes.ts","./src/app/guards/reset-password.guard.ts","./src/app/guards/app-session-state.guard.ts","./src/app/guards/register.guard.ts","./src/app/pages/summary/summary.component.ts","./src/app/guards/auth.guard.ts","./src/app/guards/quoting.guard.ts","./src/app/interceptors/loading.interceptor.ts","./src/main.ts","./src/app/app.config.ts","./src/app/app-configuration/configurationFactory.ts","./src/app/interceptors/token.interceptor.ts","./node_modules/rxjs/dist/esm/internal/BehaviorSubject.js","./node_modules/rxjs/dist/esm/internal/Observable.js","./node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","./node_modules/rxjs/dist/esm/internal/Subject.js","./node_modules/rxjs/dist/esm/internal/NotificationFactories.js","./node_modules/rxjs/dist/esm/internal/Subscriber.js","./node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js","./node_modules/rxjs/dist/esm/internal/Subscription.js","./node_modules/rxjs/dist/esm/internal/config.js","./node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js","./node_modules/rxjs/dist/esm/internal/operators/map.js","./node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js","./node_modules/rxjs/dist/esm/internal/symbol/observable.js","./node_modules/rxjs/dist/esm/internal/util/arrRemove.js","./node_modules/rxjs/dist/esm/internal/util/createErrorClass.js","./node_modules/rxjs/dist/esm/internal/util/errorContext.js","./node_modules/rxjs/dist/esm/internal/util/identity.js","./node_modules/rxjs/dist/esm/internal/util/isFunction.js","./node_modules/rxjs/dist/esm/internal/util/lift.js","./node_modules/rxjs/dist/esm/internal/util/noop.js","./node_modules/rxjs/dist/esm/internal/util/pipe.js","./node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js","./node_modules/@angular/animations/fesm2022/animations.mjs","./node_modules/@angular/core/fesm2022/primitives/signals.mjs","./node_modules/@angular/core/fesm2022/core.mjs","./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"],"sourcesContent":["/**\n * @license Angular v19.0.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { Injectable, InjectionToken, inject, Optional, Inject, ɵɵinject, ɵfindLocaleData, ɵLocaleDataIndex, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, LOCALE_ID, ɵregisterLocaleData, ɵstringify, Directive, Input, createNgModule, NgModuleRef, ɵRuntimeError, Host, Attribute, RendererStyleFlags2, untracked, ɵisPromise, ɵisSubscribable, Pipe, DEFAULT_CURRENCY_CODE, NgModule, Version, ɵɵdefineInjectable, PLATFORM_ID, ɵformatRuntimeError, ɵIMAGE_CONFIG, Renderer2, ElementRef, Injector, ɵperformanceMarkFeature, NgZone, ApplicationRef, ChangeDetectorRef, numberAttribute, booleanAttribute, ɵIMAGE_CONFIG_DEFAULTS, ɵunwrapSafeValue } from '@angular/core';\nexport { ɵIMAGE_CONFIG as IMAGE_CONFIG } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nlet _DOM = null;\nfunction getDOM() {\n    return _DOM;\n}\nfunction setRootDomAdapter(adapter) {\n    _DOM ??= adapter;\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 */\nclass DomAdapter {\n}\n\n/**\n * This class wraps the platform Navigation API which allows server-specific and test\n * implementations.\n */\nclass PlatformNavigation {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PlatformNavigation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PlatformNavigation, providedIn: 'platform', useFactory: () => window.navigation });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PlatformNavigation, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'platform', useFactory: () => window.navigation }]\n        }] });\n\n/**\n * A DI Token representing the main rendering context.\n * In a browser and SSR this is the DOM Document.\n * When using SSR, that document is created by [Domino](https://github.com/angular/domino).\n *\n * @publicApi\n */\nconst DOCUMENT = new InjectionToken(ngDevMode ? '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 */\nclass PlatformLocation {\n    historyGo(relativePosition) {\n        throw new Error(ngDevMode ? 'Not implemented' : '');\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PlatformLocation, providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation) });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PlatformLocation, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'platform', useFactory: () => inject(BrowserPlatformLocation) }]\n        }] });\n/**\n * @description\n * Indicates when a location is initialized.\n *\n * @publicApi\n */\nconst LOCATION_INITIALIZED = new InjectionToken(ngDevMode ? '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 *\n * @publicApi\n */\nclass BrowserPlatformLocation extends PlatformLocation {\n    _location;\n    _history;\n    _doc = inject(DOCUMENT);\n    constructor() {\n        super();\n        this._location = window.location;\n        this._history = window.history;\n    }\n    getBaseHrefFromDOM() {\n        return getDOM().getBaseHref(this._doc);\n    }\n    onPopState(fn) {\n        const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n        window.addEventListener('popstate', fn, false);\n        return () => window.removeEventListener('popstate', fn);\n    }\n    onHashChange(fn) {\n        const window = getDOM().getGlobalEventTarget(this._doc, 'window');\n        window.addEventListener('hashchange', fn, false);\n        return () => window.removeEventListener('hashchange', fn);\n    }\n    get href() {\n        return this._location.href;\n    }\n    get protocol() {\n        return this._location.protocol;\n    }\n    get hostname() {\n        return this._location.hostname;\n    }\n    get port() {\n        return this._location.port;\n    }\n    get pathname() {\n        return this._location.pathname;\n    }\n    get search() {\n        return this._location.search;\n    }\n    get hash() {\n        return this._location.hash;\n    }\n    set pathname(newPath) {\n        this._location.pathname = newPath;\n    }\n    pushState(state, title, url) {\n        this._history.pushState(state, title, url);\n    }\n    replaceState(state, title, url) {\n        this._history.replaceState(state, title, url);\n    }\n    forward() {\n        this._history.forward();\n    }\n    back() {\n        this._history.back();\n    }\n    historyGo(relativePosition = 0) {\n        this._history.go(relativePosition);\n    }\n    getState() {\n        return this._history.state;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserPlatformLocation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserPlatformLocation, providedIn: 'platform', useFactory: () => new BrowserPlatformLocation() });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserPlatformLocation, decorators: [{\n            type: Injectable,\n            args: [{\n                    providedIn: 'platform',\n                    useFactory: () => new BrowserPlatformLocation(),\n                }]\n        }], ctorParameters: () => [] });\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    let 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    const match = url.match(/#|\\?|$/);\n    const pathEndIdx = (match && match.index) || url.length;\n    const 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 */\nclass LocationStrategy {\n    historyGo(relativePosition) {\n        throw new Error(ngDevMode ? 'Not implemented' : '');\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: LocationStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: LocationStrategy, providedIn: 'root', useFactory: () => inject(PathLocationStrategy) });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: LocationStrategy, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root', useFactory: () => inject(PathLocationStrategy) }]\n        }] });\n/**\n * A predefined 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 * ```ts\n * import {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 */\nconst APP_BASE_HREF = new InjectionToken(ngDevMode ? '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 may provide a {@link APP_BASE_HREF}\n * or add a `<base href>` element to the document to override the default.\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`. To ensure all relative URIs resolve correctly,\n * the `<base href>` and/or `APP_BASE_HREF` should end with a `/`.\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 * Note that when using `PathLocationStrategy`, neither the query nor\n * the fragment in the `<base href>` will be preserved, as outlined\n * by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2).\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/path_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nclass PathLocationStrategy extends LocationStrategy {\n    _platformLocation;\n    _baseHref;\n    _removeListenerFns = [];\n    constructor(_platformLocation, href) {\n        super();\n        this._platformLocation = _platformLocation;\n        this._baseHref =\n            href ??\n                this._platformLocation.getBaseHrefFromDOM() ??\n                inject(DOCUMENT).location?.origin ??\n                '';\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        while (this._removeListenerFns.length) {\n            this._removeListenerFns.pop()();\n        }\n    }\n    onPopState(fn) {\n        this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));\n    }\n    getBaseHref() {\n        return this._baseHref;\n    }\n    prepareExternalUrl(internal) {\n        return joinWithSlash(this._baseHref, internal);\n    }\n    path(includeHash = false) {\n        const pathname = this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search);\n        const hash = this._platformLocation.hash;\n        return hash && includeHash ? `${pathname}${hash}` : pathname;\n    }\n    pushState(state, title, url, queryParams) {\n        const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n        this._platformLocation.pushState(state, title, externalUrl);\n    }\n    replaceState(state, title, url, queryParams) {\n        const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n        this._platformLocation.replaceState(state, title, externalUrl);\n    }\n    forward() {\n        this._platformLocation.forward();\n    }\n    back() {\n        this._platformLocation.back();\n    }\n    getState() {\n        return this._platformLocation.getState();\n    }\n    historyGo(relativePosition = 0) {\n        this._platformLocation.historyGo?.(relativePosition);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PathLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PathLocationStrategy, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PathLocationStrategy, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [{ type: PlatformLocation }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [APP_BASE_HREF]\n                }] }] });\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 */\nclass HashLocationStrategy extends LocationStrategy {\n    _platformLocation;\n    _baseHref = '';\n    _removeListenerFns = [];\n    constructor(_platformLocation, _baseHref) {\n        super();\n        this._platformLocation = _platformLocation;\n        if (_baseHref != null) {\n            this._baseHref = _baseHref;\n        }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        while (this._removeListenerFns.length) {\n            this._removeListenerFns.pop()();\n        }\n    }\n    onPopState(fn) {\n        this._removeListenerFns.push(this._platformLocation.onPopState(fn), this._platformLocation.onHashChange(fn));\n    }\n    getBaseHref() {\n        return this._baseHref;\n    }\n    path(includeHash = false) {\n        // the hash value is always prefixed with a `#`\n        // and if it is empty then it will stay empty\n        const path = this._platformLocation.hash ?? '#';\n        return path.length > 0 ? path.substring(1) : path;\n    }\n    prepareExternalUrl(internal) {\n        const url = joinWithSlash(this._baseHref, internal);\n        return url.length > 0 ? '#' + url : url;\n    }\n    pushState(state, title, path, queryParams) {\n        let 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    replaceState(state, title, path, queryParams) {\n        let 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    forward() {\n        this._platformLocation.forward();\n    }\n    back() {\n        this._platformLocation.back();\n    }\n    getState() {\n        return this._platformLocation.getState();\n    }\n    historyGo(relativePosition = 0) {\n        this._platformLocation.historyGo?.(relativePosition);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HashLocationStrategy, deps: [{ token: PlatformLocation }, { token: APP_BASE_HREF, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HashLocationStrategy });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HashLocationStrategy, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: PlatformLocation }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [APP_BASE_HREF]\n                }] }] });\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 * {@example common/location/ts/path_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\nclass Location {\n    /** @internal */\n    _subject = new Subject();\n    /** @internal */\n    _basePath;\n    /** @internal */\n    _locationStrategy;\n    /** @internal */\n    _urlChangeListeners = [];\n    /** @internal */\n    _urlChangeSubscription = null;\n    constructor(locationStrategy) {\n        this._locationStrategy = locationStrategy;\n        const baseHref = this._locationStrategy.getBaseHref();\n        // Note: This class's interaction with base HREF does not fully follow the rules\n        // outlined in the spec https://www.freesoft.org/CIE/RFC/1808/18.htm.\n        // Instead of trying to fix individual bugs with more and more code, we should\n        // investigate using the URL constructor and providing the base as a second\n        // argument.\n        // https://developer.mozilla.org/en-US/docs/Web/API/URL/URL#parameters\n        this._basePath = _stripOrigin(stripTrailingSlash(_stripIndexHtml(baseHref)));\n        this._locationStrategy.onPopState((ev) => {\n            this._subject.next({\n                'url': this.path(true),\n                'pop': true,\n                'state': ev.state,\n                'type': ev.type,\n            });\n        });\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        this._urlChangeSubscription?.unsubscribe();\n        this._urlChangeListeners = [];\n    }\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    path(includeHash = false) {\n        return this.normalize(this._locationStrategy.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    getState() {\n        return this._locationStrategy.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    isCurrentPathEqualTo(path, 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    normalize(url) {\n        return Location.stripTrailingSlash(_stripBasePath(this._basePath, _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    prepareExternalUrl(url) {\n        if (url && url[0] !== '/') {\n            url = '/' + url;\n        }\n        return this._locationStrategy.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    go(path, query = '', state = null) {\n        this._locationStrategy.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    replaceState(path, query = '', state = null) {\n        this._locationStrategy.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    forward() {\n        this._locationStrategy.forward();\n    }\n    /**\n     * Navigates back in the platform's history.\n     */\n    back() {\n        this._locationStrategy.back();\n    }\n    /**\n     * Navigate to a specific page from session history, identified by its relative position to the\n     * current page.\n     *\n     * @param relativePosition  Position of the target page in the history relative to the current\n     *     page.\n     * A negative value moves backwards, a positive value moves forwards, e.g. `location.historyGo(2)`\n     * moves forward two pages and `location.historyGo(-2)` moves back two pages. When we try to go\n     * beyond what's stored in the history session, we stay in the current page. Same behaviour occurs\n     * when `relativePosition` equals 0.\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/History_API#Moving_to_a_specific_point_in_history\n     */\n    historyGo(relativePosition = 0) {\n        this._locationStrategy.historyGo?.(relativePosition);\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     * @returns A function that, when executed, unregisters a URL change listener.\n     */\n    onUrlChange(fn) {\n        this._urlChangeListeners.push(fn);\n        this._urlChangeSubscription ??= this.subscribe((v) => {\n            this._notifyUrlChangeListeners(v.url, v.state);\n        });\n        return () => {\n            const fnIndex = this._urlChangeListeners.indexOf(fn);\n            this._urlChangeListeners.splice(fnIndex, 1);\n            if (this._urlChangeListeners.length === 0) {\n                this._urlChangeSubscription?.unsubscribe();\n                this._urlChangeSubscription = null;\n            }\n        };\n    }\n    /** @internal */\n    _notifyUrlChangeListeners(url = '', state) {\n        this._urlChangeListeners.forEach((fn) => fn(url, state));\n    }\n    /**\n     * Subscribes to the platform's `popState` events.\n     *\n     * Note: `Location.go()` does not trigger the `popState` event in the browser. Use\n     * `Location.onUrlChange()` to subscribe to URL changes instead.\n     *\n     * @param value Event that is triggered when the state history changes.\n     * @param exception The exception to throw.\n     *\n     * @see [onpopstate](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate)\n     *\n     * @returns Subscribed events.\n     */\n    subscribe(onNext, onThrow, onReturn) {\n        return this._subject.subscribe({\n            next: onNext,\n            error: onThrow ?? undefined,\n            complete: onReturn ?? undefined,\n        });\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     */\n    static 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    static 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    static stripTrailingSlash = stripTrailingSlash;\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: Location, deps: [{ token: LocationStrategy }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: Location, providedIn: 'root', useFactory: createLocation });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: Location, decorators: [{\n            type: Injectable,\n            args: [{\n                    providedIn: 'root',\n                    // See #23917\n                    useFactory: createLocation,\n                }]\n        }], ctorParameters: () => [{ type: LocationStrategy }] });\nfunction createLocation() {\n    return new Location(ɵɵinject(LocationStrategy));\n}\nfunction _stripBasePath(basePath, url) {\n    if (!basePath || !url.startsWith(basePath)) {\n        return url;\n    }\n    const strippedUrl = url.substring(basePath.length);\n    if (strippedUrl === '' || ['/', ';', '?', '#'].includes(strippedUrl[0])) {\n        return strippedUrl;\n    }\n    return url;\n}\nfunction _stripIndexHtml(url) {\n    return url.replace(/\\/index.html$/, '');\n}\nfunction _stripOrigin(baseHref) {\n    // DO NOT REFACTOR! Previously, this check looked like this:\n    // `/^(https?:)?\\/\\//.test(baseHref)`, but that resulted in\n    // syntactically incorrect code after Closure Compiler minification.\n    // This was likely caused by a bug in Closure Compiler, but\n    // for now, the check is rewritten to use `new RegExp` instead.\n    const isAbsoluteUrl = new RegExp('^(https?:)?//').test(baseHref);\n    if (isAbsoluteUrl) {\n        const [, pathname] = baseHref.split(/\\/\\/[^\\/]+/);\n        return pathname;\n    }\n    return baseHref;\n}\n\n/** @internal */\nconst CURRENCIES_EN = { \"ADP\": [undefined, undefined, 0], \"AFN\": [undefined, \"؋\", 0], \"ALL\": [undefined, undefined, 0], \"AMD\": [undefined, \"֏\", 2], \"AOA\": [undefined, \"Kz\"], \"ARS\": [undefined, \"$\"], \"AUD\": [\"A$\", \"$\"], \"AZN\": [undefined, \"₼\"], \"BAM\": [undefined, \"KM\"], \"BBD\": [undefined, \"$\"], \"BDT\": [undefined, \"৳\"], \"BHD\": [undefined, undefined, 3], \"BIF\": [undefined, undefined, 0], \"BMD\": [undefined, \"$\"], \"BND\": [undefined, \"$\"], \"BOB\": [undefined, \"Bs\"], \"BRL\": [\"R$\"], \"BSD\": [undefined, \"$\"], \"BWP\": [undefined, \"P\"], \"BYN\": [undefined, undefined, 2], \"BYR\": [undefined, undefined, 0], \"BZD\": [undefined, \"$\"], \"CAD\": [\"CA$\", \"$\", 2], \"CHF\": [undefined, undefined, 2], \"CLF\": [undefined, undefined, 4], \"CLP\": [undefined, \"$\", 0], \"CNY\": [\"CN¥\", \"¥\"], \"COP\": [undefined, \"$\", 2], \"CRC\": [undefined, \"₡\", 2], \"CUC\": [undefined, \"$\"], \"CUP\": [undefined, \"$\"], \"CZK\": [undefined, \"Kč\", 2], \"DJF\": [undefined, undefined, 0], \"DKK\": [undefined, \"kr\", 2], \"DOP\": [undefined, \"$\"], \"EGP\": [undefined, \"E£\"], \"ESP\": [undefined, \"₧\", 0], \"EUR\": [\"€\"], \"FJD\": [undefined, \"$\"], \"FKP\": [undefined, \"£\"], \"GBP\": [\"£\"], \"GEL\": [undefined, \"₾\"], \"GHS\": [undefined, \"GH₵\"], \"GIP\": [undefined, \"£\"], \"GNF\": [undefined, \"FG\", 0], \"GTQ\": [undefined, \"Q\"], \"GYD\": [undefined, \"$\", 2], \"HKD\": [\"HK$\", \"$\"], \"HNL\": [undefined, \"L\"], \"HRK\": [undefined, \"kn\"], \"HUF\": [undefined, \"Ft\", 2], \"IDR\": [undefined, \"Rp\", 2], \"ILS\": [\"₪\"], \"INR\": [\"₹\"], \"IQD\": [undefined, undefined, 0], \"IRR\": [undefined, undefined, 0], \"ISK\": [undefined, \"kr\", 0], \"ITL\": [undefined, undefined, 0], \"JMD\": [undefined, \"$\"], \"JOD\": [undefined, undefined, 3], \"JPY\": [\"¥\", undefined, 0], \"KHR\": [undefined, \"៛\"], \"KMF\": [undefined, \"CF\", 0], \"KPW\": [undefined, \"₩\", 0], \"KRW\": [\"₩\", undefined, 0], \"KWD\": [undefined, undefined, 3], \"KYD\": [undefined, \"$\"], \"KZT\": [undefined, \"₸\"], \"LAK\": [undefined, \"₭\", 0], \"LBP\": [undefined, \"L£\", 0], \"LKR\": [undefined, \"Rs\"], \"LRD\": [undefined, \"$\"], \"LTL\": [undefined, \"Lt\"], \"LUF\": [undefined, undefined, 0], \"LVL\": [undefined, \"Ls\"], \"LYD\": [undefined, undefined, 3], \"MGA\": [undefined, \"Ar\", 0], \"MGF\": [undefined, undefined, 0], \"MMK\": [undefined, \"K\", 0], \"MNT\": [undefined, \"₮\", 2], \"MRO\": [undefined, undefined, 0], \"MUR\": [undefined, \"Rs\", 2], \"MXN\": [\"MX$\", \"$\"], \"MYR\": [undefined, \"RM\"], \"NAD\": [undefined, \"$\"], \"NGN\": [undefined, \"₦\"], \"NIO\": [undefined, \"C$\"], \"NOK\": [undefined, \"kr\", 2], \"NPR\": [undefined, \"Rs\"], \"NZD\": [\"NZ$\", \"$\"], \"OMR\": [undefined, undefined, 3], \"PHP\": [\"₱\"], \"PKR\": [undefined, \"Rs\", 2], \"PLN\": [undefined, \"zł\"], \"PYG\": [undefined, \"₲\", 0], \"RON\": [undefined, \"lei\"], \"RSD\": [undefined, undefined, 0], \"RUB\": [undefined, \"₽\"], \"RWF\": [undefined, \"RF\", 0], \"SBD\": [undefined, \"$\"], \"SEK\": [undefined, \"kr\", 2], \"SGD\": [undefined, \"$\"], \"SHP\": [undefined, \"£\"], \"SLE\": [undefined, undefined, 2], \"SLL\": [undefined, undefined, 0], \"SOS\": [undefined, undefined, 0], \"SRD\": [undefined, \"$\"], \"SSP\": [undefined, \"£\"], \"STD\": [undefined, undefined, 0], \"STN\": [undefined, \"Db\"], \"SYP\": [undefined, \"£\", 0], \"THB\": [undefined, \"฿\"], \"TMM\": [undefined, undefined, 0], \"TND\": [undefined, undefined, 3], \"TOP\": [undefined, \"T$\"], \"TRL\": [undefined, undefined, 0], \"TRY\": [undefined, \"₺\"], \"TTD\": [undefined, \"$\"], \"TWD\": [\"NT$\", \"$\", 2], \"TZS\": [undefined, undefined, 2], \"UAH\": [undefined, \"₴\"], \"UGX\": [undefined, undefined, 0], \"USD\": [\"$\"], \"UYI\": [undefined, undefined, 0], \"UYU\": [undefined, \"$\"], \"UYW\": [undefined, undefined, 4], \"UZS\": [undefined, undefined, 2], \"VEF\": [undefined, \"Bs\", 2], \"VND\": [\"₫\", undefined, 0], \"VUV\": [undefined, undefined, 0], \"XAF\": [\"FCFA\", undefined, 0], \"XCD\": [\"EC$\", \"$\"], \"XOF\": [\"F CFA\", undefined, 0], \"XPF\": [\"CFPF\", undefined, 0], \"XXX\": [\"¤\"], \"YER\": [undefined, undefined, 0], \"ZAR\": [undefined, \"R\"], \"ZMK\": [undefined, undefined, 0], \"ZMW\": [undefined, \"ZK\"], \"ZWD\": [undefined, undefined, 0] };\n\n/**\n * Format styles that can be used to represent numbers.\n * @see {@link getLocaleNumberFormat}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated `getLocaleNumberFormat` is deprecated\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 {@link NgPlural}\n * @see {@link NgPluralCase}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated `getLocalePluralCase` is deprecated\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](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated locale data getters are deprecated\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 *\n * @deprecated locale data getters are deprecated\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 {@link getLocaleDateFormat}\n * @see {@link getLocaleTimeFormat}\n * @see {@link getLocaleDateTimeFormat}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n * @publicApi\n *\n * @deprecated Date locale data getters are deprecated\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// This needs to be an object literal, rather than an enum, because TypeScript 5.4+\n// doesn't allow numeric keys and we have `Infinity` and `NaN`.\n/**\n * Symbols that can be used to replace placeholders in number patterns.\n * Examples are based on `en-US` values.\n *\n * @see {@link getLocaleNumberSymbol}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated `getLocaleNumberSymbol` is deprecated\n *\n * @object-literal-as-enum\n */\nconst NumberSymbol = {\n    /**\n     * Decimal separator.\n     * For `en-US`, the dot character.\n     * Example: 2,345`.`67\n     */\n    Decimal: 0,\n    /**\n     * Grouping separator, typically for thousands.\n     * For `en-US`, the comma character.\n     * Example: 2`,`345.67\n     */\n    Group: 1,\n    /**\n     * List-item separator.\n     * Example: \"one, two, and three\"\n     */\n    List: 2,\n    /**\n     * Sign for percentage (out of 100).\n     * Example: 23.4%\n     */\n    PercentSign: 3,\n    /**\n     * Sign for positive numbers.\n     * Example: +23\n     */\n    PlusSign: 4,\n    /**\n     * Sign for negative numbers.\n     * Example: -23\n     */\n    MinusSign: 5,\n    /**\n     * Computer notation for exponential value (n times a power of 10).\n     * Example: 1.2E3\n     */\n    Exponential: 6,\n    /**\n     * Human-readable format of exponential.\n     * Example: 1.2x103\n     */\n    SuperscriptingExponent: 7,\n    /**\n     * Sign for permille (out of 1000).\n     * Example: 23.4‰\n     */\n    PerMille: 8,\n    /**\n     * Infinity, can be used with plus and minus.\n     * Example: ∞, +∞, -∞\n     */\n    Infinity: 9,\n    /**\n     * Not a number.\n     * Example: NaN\n     */\n    NaN: 10,\n    /**\n     * Symbol used between time units.\n     * Example: 10:52\n     */\n    TimeSeparator: 11,\n    /**\n     * Decimal separator for currency values (fallback to `Decimal`).\n     * Example: $2,345.67\n     */\n    CurrencyDecimal: 12,\n    /**\n     * Group separator for currency values (fallback to `Group`).\n     * Example: $2,345.67\n     */\n    CurrencyGroup: 13,\n};\n/**\n * The value for each day of the week, based on the `en-US` locale\n *\n * @publicApi\n *\n * @deprecated Week locale getters are deprecated\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](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * This function serves no purpose when relying on the `Intl` API.\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](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nfunction getLocaleDayPeriods(locale, formStyle, width) {\n    const data = ɵfindLocaleData(locale);\n    const amPmData = [\n        data[ɵLocaleDataIndex.DayPeriodsFormat],\n        data[ɵLocaleDataIndex.DayPeriodsStandalone],\n    ];\n    const 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](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nfunction getLocaleDayNames(locale, formStyle, width) {\n    const data = ɵfindLocaleData(locale);\n    const daysData = [\n        data[ɵLocaleDataIndex.DaysFormat],\n        data[ɵLocaleDataIndex.DaysStandalone],\n    ];\n    const 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](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nfunction getLocaleMonthNames(locale, formStyle, width) {\n    const data = ɵfindLocaleData(locale);\n    const monthsData = [\n        data[ɵLocaleDataIndex.MonthsFormat],\n        data[ɵLocaleDataIndex.MonthsStandalone],\n    ];\n    const 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 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](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nfunction getLocaleEraNames(locale, width) {\n    const data = ɵfindLocaleData(locale);\n    const 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](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Intl's [`getWeekInfo`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo) has partial support (Chromium M99 & Safari 17).\n * You may want to rely on the following alternatives:\n * - Libraries like [`Luxon`](https://moment.github.io/luxon/#/) rely on `Intl` but fallback on the ISO 8601 definition (monday) if `getWeekInfo` is not supported.\n * - Other librairies like [`date-fns`](https://date-fns.org/), [`day.js`](https://day.js.org/en/) or [`weekstart`](https://www.npmjs.com/package/weekstart) library provide their own locale based data for the first day of the week.\n */\nfunction getLocaleFirstDayOfWeek(locale) {\n    const 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](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Intl's [`getWeekInfo`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo) has partial support (Chromium M99 & Safari 17).\n * Libraries like [`Luxon`](https://moment.github.io/luxon/#/) rely on `Intl` but fallback on the ISO 8601 definition (Saturday+Sunday) if `getWeekInfo` is not supported .\n */\nfunction getLocaleWeekEndRange(locale) {\n    const data = ɵfindLocaleData(locale);\n    return data[ɵLocaleDataIndex.WeekendRange];\n}\n/**\n * Retrieves a localized date-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 {@link FormatWidth}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nfunction getLocaleDateFormat(locale, width) {\n    const 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 {@link FormatWidth}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n\n * @publicApi\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nfunction getLocaleTimeFormat(locale, width) {\n    const 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 {@link FormatWidth}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.DateTimeFormat` for date formating instead.\n */\nfunction getLocaleDateTimeFormat(locale, width) {\n    const data = ɵfindLocaleData(locale);\n    const 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. Must be one of `NumberSymbol`.\n * @returns The character for the localized symbol.\n * @see {@link NumberSymbol}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.NumberFormat` to format numbers instead.\n */\nfunction getLocaleNumberSymbol(locale, symbol) {\n    const data = ɵfindLocaleData(locale);\n    const 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 {@link NumberFormatStyle}\n * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Let `Intl.NumberFormat` determine the number format instead\n */\nfunction getLocaleNumberFormat(locale, type) {\n    const 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](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Use the `Intl` API to format a currency with from currency code\n */\nfunction getLocaleCurrencySymbol(locale) {\n    const 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](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Use the `Intl` API to format a currency with from currency code\n */\nfunction getLocaleCurrencyName(locale) {\n    const 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 *\n * @deprecated We recommend you create a map of locale to ISO 4217 currency codes.\n * Time relative currency data is provided by the CLDR project. See https://www.unicode.org/cldr/charts/44/supplemental/detailed_territory_currency_information.html\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](guide/i18n)\n */\nfunction getLocaleCurrencies(locale) {\n    const data = ɵfindLocaleData(locale);\n    return data[ɵLocaleDataIndex.Currencies];\n}\n/**\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Use `Intl.PluralRules` instead\n */\nconst getLocalePluralCase = ɵgetLocalePluralCase;\nfunction checkFullData(data) {\n    if (!data[ɵLocaleDataIndex.ExtraData]) {\n        throw new Error(`Missing extra locale data for the locale \"${data[ɵLocaleDataIndex.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/format-data-locale).\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 {@link getLocaleExtraDayPeriods}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * Let `Intl.DateTimeFormat` determine the day period instead.\n */\nfunction getLocaleExtraDayPeriodRules(locale) {\n    const data = ɵfindLocaleData(locale);\n    checkFullData(data);\n    const rules = data[ɵLocaleDataIndex.ExtraData][2 /* ɵExtraLocaleDataIndex.ExtraDayPeriodsRules */] || [];\n    return rules.map((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/format-data-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 The translated day-period strings.\n * @see {@link getLocaleExtraDayPeriodRules}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * To extract a day period use `Intl.DateTimeFormat` with the `dayPeriod` option instead.\n */\nfunction getLocaleExtraDayPeriods(locale, formStyle, width) {\n    const data = ɵfindLocaleData(locale);\n    checkFullData(data);\n    const dayPeriodsData = [\n        data[ɵLocaleDataIndex.ExtraData][0 /* ɵExtraLocaleDataIndex.ExtraDayPeriodFormats */],\n        data[ɵLocaleDataIndex.ExtraData][1 /* ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone */],\n    ];\n    const 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](guide/i18n)\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * For dates and numbers, let `Intl.DateTimeFormat()` and `Intl.NumberFormat()` determine the writing direction.\n * The `Intl` alternative [`getTextInfo`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo).\n * has only partial support (Chromium M99 & Safari 17).\n * 3rd party alternatives like [`rtl-detect`](https://www.npmjs.com/package/rtl-detect) can work around this issue.\n */\nfunction getLocaleDirection(locale) {\n    const 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](guide/i18n)\n *\n */\nfunction getLastDefinedValue(data, index) {\n    for (let 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    const [h, m] = time.split(':');\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](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * You can use `Intl.NumberFormat().formatToParts()` to extract the currency symbol.\n * For example: `Intl.NumberFormat('en', {style:'currency', currency: 'USD'}).formatToParts().find(part => part.type === 'currency').value`\n * returns `$` for USD currency code in the `en` locale.\n * Note: `US$` is a currency symbol for the `en-ca` locale but not the `en-us` locale.\n */\nfunction getCurrencySymbol(code, format, locale = 'en') {\n    const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];\n    const symbolNarrow = currency[1 /* ɵCurrencyIndex.SymbolNarrow */];\n    if (format === 'narrow' && typeof symbolNarrow === 'string') {\n        return symbolNarrow;\n    }\n    return currency[0 /* ɵCurrencyIndex.Symbol */] || code;\n}\n// Most currencies have cents, that's why the default is 2\nconst 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](guide/i18n)\n *\n * @publicApi\n *\n * @deprecated Angular recommends relying on the `Intl` API for i18n.\n * This function should not be used anymore. Let `Intl.NumberFormat` determine the number of digits to display for the currency\n */\nfunction getNumberOfCurrencyDigits(code) {\n    let digits;\n    const currency = CURRENCIES_EN[code];\n    if (currency) {\n        digits = currency[2 /* ɵCurrencyIndex.NbOfDigits */];\n    }\n    return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;\n}\n\nconst 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\nconst NAMED_FORMATS = {};\nconst DATE_FORMATS_SPLIT = /((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{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 * If not specified, uses host system settings.\n *\n * @returns The formatted date string.\n *\n * @see {@link DatePipe}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n */\nfunction formatDate(value, format, locale, timezone) {\n    let date = toDate(value);\n    const namedFormat = getNamedFormat(locale, format);\n    format = namedFormat || format;\n    let parts = [];\n    let match;\n    while (format) {\n        match = DATE_FORMATS_SPLIT.exec(format);\n        if (match) {\n            parts = parts.concat(match.slice(1));\n            const part = parts.pop();\n            if (!part) {\n                break;\n            }\n            format = part;\n        }\n        else {\n            parts.push(format);\n            break;\n        }\n    }\n    let dateTimezoneOffset = date.getTimezoneOffset();\n    if (timezone) {\n        dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n        date = convertTimezoneToLocal(date, timezone, true);\n    }\n    let text = '';\n    parts.forEach((value) => {\n        const dateFormatter = getDateFormatter(value);\n        text += dateFormatter\n            ? dateFormatter(date, locale, dateTimezoneOffset)\n            : value === \"''\"\n                ? \"'\"\n                : value.replace(/(^'|'$)/g, '').replace(/''/g, \"'\");\n    });\n    return text;\n}\n/**\n * Create a new Date object with the given date value, and the time set to midnight.\n *\n * We cannot use `new Date(year, month, date)` because it maps years between 0 and 99 to 1900-1999.\n * See: https://github.com/angular/angular/issues/40377\n *\n * Note that this function returns a Date object whose time is midnight in the current locale's\n * timezone. In the future we might want to change this to be midnight in UTC, but this would be a\n * considerable breaking change.\n */\nfunction createDate(year, month, date) {\n    // The `newDate` is set to midnight (UTC) on January 1st 1970.\n    // - In PST this will be December 31st 1969 at 4pm.\n    // - In GMT this will be January 1st 1970 at 1am.\n    // Note that they even have different years, dates and months!\n    const newDate = new Date(0);\n    // `setFullYear()` allows years like 0001 to be set correctly. This function does not\n    // change the internal time of the date.\n    // Consider calling `setFullYear(2019, 8, 20)` (September 20, 2019).\n    // - In PST this will now be September 20, 2019 at 4pm\n    // - In GMT this will now be September 20, 2019 at 1am\n    newDate.setFullYear(year, month, date);\n    // We want the final date to be at local midnight, so we reset the time.\n    // - In PST this will now be September 20, 2019 at 12am\n    // - In GMT this will now be September 20, 2019 at 12am\n    newDate.setHours(0, 0, 0);\n    return newDate;\n}\nfunction getNamedFormat(locale, format) {\n    const localeId = getLocaleId(locale);\n    NAMED_FORMATS[localeId] ??= {};\n    if (NAMED_FORMATS[localeId][format]) {\n        return NAMED_FORMATS[localeId][format];\n    }\n    let 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            const shortTime = getNamedFormat(locale, 'shortTime');\n            const shortDate = getNamedFormat(locale, 'shortDate');\n            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [\n                shortTime,\n                shortDate,\n            ]);\n            break;\n        case 'medium':\n            const mediumTime = getNamedFormat(locale, 'mediumTime');\n            const mediumDate = getNamedFormat(locale, 'mediumDate');\n            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [\n                mediumTime,\n                mediumDate,\n            ]);\n            break;\n        case 'long':\n            const longTime = getNamedFormat(locale, 'longTime');\n            const longDate = getNamedFormat(locale, 'longDate');\n            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [\n                longTime,\n                longDate,\n            ]);\n            break;\n        case 'full':\n            const fullTime = getNamedFormat(locale, 'fullTime');\n            const fullDate = getNamedFormat(locale, 'fullDate');\n            formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [\n                fullTime,\n                fullDate,\n            ]);\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    let 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    let strNum = String(num);\n    while (strNum.length < digits) {\n        strNum = '0' + strNum;\n    }\n    if (trim) {\n        strNum = strNum.slice(strNum.length - digits);\n    }\n    return neg + strNum;\n}\nfunction formatFractionalSeconds(milliseconds, digits) {\n    const strMs = padNumber(milliseconds, 3);\n    return strMs.substring(0, digits);\n}\n/**\n * Returns a date formatter that transforms a date into its locale digit representation\n */\nfunction dateGetter(name, size, offset = 0, trim = false, negWrap = false) {\n    return function (date, locale) {\n        let 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        const 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 = FormStyle.Format, 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            const currentHours = date.getHours();\n            const currentMinutes = date.getMinutes();\n            if (extended) {\n                const rules = getLocaleExtraDayPeriodRules(locale);\n                const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);\n                const index = rules.findIndex((rule) => {\n                    if (Array.isArray(rule)) {\n                        // morning, afternoon, evening, night\n                        const [from, to] = rule;\n                        const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes;\n                        const beforeTo = currentHours < to.hours || (currentHours === to.hours && currentMinutes < to.minutes);\n                        // We must account for normal rules that span a period during the day (e.g. 6am-9am)\n                        // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g.\n                        // 10pm - 5am) where `from` is greater (later!) than `to`.\n                        //\n                        // In the first case the current time must be BOTH after `from` AND before `to`\n                        // (e.g. 8am is after 6am AND before 10am).\n                        //\n                        // In the second case the current time must be EITHER after `from` OR before `to`\n                        // (e.g. 4am is before 5am but not after 10pm; and 11pm is not before 5am but it is\n                        // after 10pm).\n                        if (from.hours < to.hours) {\n                            if (afterFrom && beforeTo) {\n                                return true;\n                            }\n                        }\n                        else if (afterFrom || beforeTo) {\n                            return true;\n                        }\n                    }\n                    else {\n                        // noon or midnight\n                        if (rule.hours === currentHours && rule.minutes === currentMinutes) {\n                            return true;\n                        }\n                    }\n                    return false;\n                });\n                if (index !== -1) {\n                    return dayPeriods[index];\n                }\n            }\n            // if no rules for the day periods, we use am/pm by default\n            return getLocaleDayPeriods(locale, form, width)[currentHours < 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            const 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        const zone = -1 * offset;\n        const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n        const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);\n        switch (width) {\n            case ZoneWidth.Short:\n                return ((zone >= 0 ? '+' : '') +\n                    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' +\n                    (zone >= 0 ? '+' : '') +\n                    padNumber(hours, 2, minusSign) +\n                    ':' +\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 ? '+' : '') +\n                        padNumber(hours, 2, minusSign) +\n                        ':' +\n                        padNumber(Math.abs(zone % 60), 2, minusSign));\n                }\n            default:\n                throw new Error(`Unknown zone width \"${width}\"`);\n        }\n    };\n}\nconst JANUARY = 0;\nconst THURSDAY = 4;\nfunction getFirstThursdayOfYear(year) {\n    const firstDayOfYear = createDate(year, JANUARY, 1).getDay();\n    return createDate(year, 0, 1 + (firstDayOfYear <= THURSDAY ? THURSDAY : THURSDAY + 7) - firstDayOfYear);\n}\n/**\n *  ISO Week starts on day 1 (Monday) and ends with day 0 (Sunday)\n */\nfunction getThursdayThisIsoWeek(datetime) {\n    // getDay returns 0-6 range with sunday as 0.\n    const currentDay = datetime.getDay();\n    // On a Sunday, read the previous Thursday since ISO weeks start on Monday.\n    const deltaToThursday = currentDay === 0 ? -3 : THURSDAY - currentDay;\n    return createDate(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + deltaToThursday);\n}\nfunction weekGetter(size, monthBased = false) {\n    return function (date, locale) {\n        let result;\n        if (monthBased) {\n            const nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;\n            const today = date.getDate();\n            result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);\n        }\n        else {\n            const thisThurs = getThursdayThisIsoWeek(date);\n            // Some days of a year are part of next year according to ISO 8601.\n            // Compute the firstThurs from the year of this week's Thursday\n            const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());\n            const 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}\n/**\n * Returns a date formatter that provides the week-numbering year for the input date.\n */\nfunction weekNumberingYearGetter(size, trim = false) {\n    return function (date, locale) {\n        const thisThurs = getThursdayThisIsoWeek(date);\n        const weekNumberingYear = thisThurs.getFullYear();\n        return padNumber(weekNumberingYear, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim);\n    };\n}\nconst 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: U, Q, D, F, e, j, J, C, A, v, V, X, x\nfunction getDateFormatter(format) {\n    if (DATE_FORMATS[format]) {\n        return DATE_FORMATS[format];\n    }\n    let 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        // 1 digit representation of the week-numbering year, e.g. (AD 1 => 1, AD 199 => 199)\n        case 'Y':\n            formatter = weekNumberingYearGetter(1);\n            break;\n        // 2 digit representation of the week-numbering year, padded (00-99). (e.g. AD 2001 => 01, AD\n        // 2010 => 10)\n        case 'YY':\n            formatter = weekNumberingYearGetter(2, true);\n            break;\n        // 3 digit representation of the week-numbering year, padded (000-999). (e.g. AD 1 => 001, AD\n        // 2010 => 2010)\n        case 'YYY':\n            formatter = weekNumberingYearGetter(3);\n            break;\n        // 4 digit representation of the week-numbering year (e.g. AD 1 => 0001, AD 2010 => 2010)\n        case 'YYYY':\n            formatter = weekNumberingYearGetter(4);\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 = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);\n            break;\n        case 'LLLL':\n            formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);\n            break;\n        case 'LLLLL':\n            formatter = 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 StandAlone (1, 1, Mon, Monday, M, Mo)\n        case 'c':\n        case 'cc':\n            formatter = dateGetter(DateType.Day, 1);\n            break;\n        case 'ccc':\n            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated, FormStyle.Standalone);\n            break;\n        case 'cccc':\n            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide, FormStyle.Standalone);\n            break;\n        case 'ccccc':\n            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow, FormStyle.Standalone);\n            break;\n        case 'cccccc':\n            formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short, FormStyle.Standalone);\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 = 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 11 only, Edge 13-15+\n    // IE/Edge do not \"understand\" colon (`:`) in timezone\n    timezone = timezone.replace(/:/g, '');\n    const 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    const reverseValue = reverse ? -1 : 1;\n    const dateTimezoneOffset = date.getTimezoneOffset();\n    const 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        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            const [y, m = 1, d = 1] = value.split('-').map((val) => +val);\n            return createDate(y, m - 1, d);\n        }\n        const 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        let match;\n        if ((match = value.match(ISO8601_DATE_REGEX))) {\n            return isoStringToDate(match);\n        }\n    }\n    const 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    const date = new Date(0);\n    let tzHour = 0;\n    let tzMin = 0;\n    // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n    const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n    const 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    const h = Number(match[4] || 0) - tzHour;\n    const m = Number(match[5] || 0) - tzMin;\n    const s = Number(match[6] || 0);\n    // The ECMAScript specification (https://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.11)\n    // defines that `DateTime` milliseconds should always be rounded down, so that `999.9ms`\n    // becomes `999ms`.\n    const ms = Math.floor(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\nconst NUMBER_FORMAT_REGEXP = /^(\\d+)?\\.((\\d+)(-(\\d+))?)?$/;\nconst MAX_DIGITS = 22;\nconst DECIMAL_SEP = '.';\nconst ZERO_CHAR = '0';\nconst PATTERN_SEP = ';';\nconst GROUP_SEP = ',';\nconst DIGIT_CHAR = '#';\nconst CURRENCY_CHAR = '¤';\nconst 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 = false) {\n    let formattedText = '';\n    let isZero = false;\n    if (!isFinite(value)) {\n        formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);\n    }\n    else {\n        let parsedNumber = parseNumber(value);\n        if (isPercent) {\n            parsedNumber = toPercent(parsedNumber);\n        }\n        let minInt = pattern.minInt;\n        let minFraction = pattern.minFrac;\n        let maxFraction = pattern.maxFrac;\n        if (digitsInfo) {\n            const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);\n            if (parts === null) {\n                throw new Error(`${digitsInfo} is not a valid digit info`);\n            }\n            const minIntPart = parts[1];\n            const minFractionPart = parts[3];\n            const 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        let digits = parsedNumber.digits;\n        let integerLen = parsedNumber.integerLen;\n        const exponent = parsedNumber.exponent;\n        let decimals = [];\n        isZero = digits.every((d) => !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        const 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 digitsInfo 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 {@link formatNumber}\n * @see {@link DecimalPipe}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n *\n * @publicApi\n */\nfunction formatCurrency(value, locale, currency, currencyCode, digitsInfo) {\n    const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);\n    const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n    pattern.minFrac = getNumberOfCurrencyDigits(currencyCode);\n    pattern.maxFrac = pattern.minFrac;\n    const 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 suppressed 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 digitsInfo 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 {@link formatNumber}\n * @see {@link DecimalPipe}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n * @publicApi\n *\n */\nfunction formatPercent(value, locale, digitsInfo) {\n    const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);\n    const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n    const 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 digitsInfo 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](guide/i18n)\n *\n * @publicApi\n */\nfunction formatNumber(value, locale, digitsInfo) {\n    const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);\n    const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n    return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);\n}\nfunction parseNumberFormat(format, minusSign = '-') {\n    const 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    const patternParts = format.split(PATTERN_SEP);\n    const positive = patternParts[0];\n    const negative = patternParts[1];\n    const 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.substring(0, integer.indexOf(DIGIT_CHAR));\n    for (let i = 0; i < fraction.length; i++) {\n        const 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    const 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        const trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR);\n        p.negPre = negative.substring(0, pos).replace(/'/g, '');\n        p.negSuf = negative.slice(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    const 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    let numStr = Math.abs(num) + '';\n    let exponent = 0, digits, integerLen;\n    let 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++) {\n        /* 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, exponent, 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    let digits = parsedNumber.digits;\n    let fractionLen = digits.length - parsedNumber.integerLen;\n    const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);\n    // The index of the digit to where rounding is to occur\n    let roundAt = fractionSize + parsedNumber.integerLen;\n    let 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 (let 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 (let i = 1; i < roundAt; i++)\n            digits[i] = 0;\n    }\n    if (digit >= 5) {\n        if (roundAt - 1 < 0) {\n            for (let 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    let 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    const minLen = minFrac + parsedNumber.integerLen;\n    // Do any carrying, e.g. a digit was rounded up to 10\n    const 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    const 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 * @publicApi\n */\nclass NgLocalization {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgLocalization, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgLocalization, providedIn: 'root', useFactory: (locale) => new NgLocaleLocalization(locale), deps: [{ token: LOCALE_ID }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgLocalization, decorators: [{\n            type: Injectable,\n            args: [{\n                    providedIn: 'root',\n                    useFactory: (locale) => new NgLocaleLocalization(locale),\n                    deps: [LOCALE_ID],\n                }]\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    let 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 */\nclass NgLocaleLocalization extends NgLocalization {\n    locale;\n    constructor(locale) {\n        super();\n        this.locale = locale;\n    }\n    getPluralCategory(value, locale) {\n        const 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    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgLocaleLocalization, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgLocaleLocalization });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgLocaleLocalization, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [LOCALE_ID]\n                }] }] });\n\n/**\n * Register global data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n/format-data-locale) to know how to import additional locale\n * 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\nfunction parseCookieValue(cookieStr, name) {\n    name = encodeURIComponent(name);\n    for (const cookie of cookieStr.split(';')) {\n        const eqIndex = cookie.indexOf('=');\n        const [cookieName, cookieValue] = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)];\n        if (cookieName.trim() === name) {\n            return decodeURIComponent(cookieValue);\n        }\n    }\n    return null;\n}\n\nconst WS_REGEXP = /\\s+/;\nconst EMPTY_ARRAY = [];\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```html\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 */\nclass NgClass {\n    _ngEl;\n    _renderer;\n    initialClasses = EMPTY_ARRAY;\n    rawClass;\n    stateMap = new Map();\n    constructor(_ngEl, _renderer) {\n        this._ngEl = _ngEl;\n        this._renderer = _renderer;\n    }\n    set klass(value) {\n        this.initialClasses = value != null ? value.trim().split(WS_REGEXP) : EMPTY_ARRAY;\n    }\n    set ngClass(value) {\n        this.rawClass = typeof value === 'string' ? value.trim().split(WS_REGEXP) : value;\n    }\n    /*\n    The NgClass directive uses the custom change detection algorithm for its inputs. The custom\n    algorithm is necessary since inputs are represented as complex object or arrays that need to be\n    deeply-compared.\n  \n    This algorithm is perf-sensitive since NgClass is used very frequently and its poor performance\n    might negatively impact runtime performance of the entire change detection cycle. The design of\n    this algorithm is making sure that:\n    - there is no unnecessary DOM manipulation (CSS classes are added / removed from the DOM only when\n    needed), even if references to bound objects change;\n    - there is no memory allocation if nothing changes (even relatively modest memory allocation\n    during the change detection cycle can result in GC pauses for some of the CD cycles).\n  \n    The algorithm works by iterating over the set of bound classes, staring with [class] binding and\n    then going over [ngClass] binding. For each CSS class name:\n    - check if it was seen before (this information is tracked in the state map) and if its value\n    changed;\n    - mark it as \"touched\" - names that are not marked are not present in the latest set of binding\n    and we can remove such class name from the internal data structures;\n  \n    After iteration over all the CSS class names we've got data structure with all the information\n    necessary to synchronize changes to the DOM - it is enough to iterate over the state map, flush\n    changes to the DOM and reset internal data structures so those are ready for the next change\n    detection cycle.\n     */\n    ngDoCheck() {\n        // classes from the [class] binding\n        for (const klass of this.initialClasses) {\n            this._updateState(klass, true);\n        }\n        // classes from the [ngClass] binding\n        const rawClass = this.rawClass;\n        if (Array.isArray(rawClass) || rawClass instanceof Set) {\n            for (const klass of rawClass) {\n                this._updateState(klass, true);\n            }\n        }\n        else if (rawClass != null) {\n            for (const klass of Object.keys(rawClass)) {\n                this._updateState(klass, Boolean(rawClass[klass]));\n            }\n        }\n        this._applyStateDiff();\n    }\n    _updateState(klass, nextEnabled) {\n        const state = this.stateMap.get(klass);\n        if (state !== undefined) {\n            if (state.enabled !== nextEnabled) {\n                state.changed = true;\n                state.enabled = nextEnabled;\n            }\n            state.touched = true;\n        }\n        else {\n            this.stateMap.set(klass, { enabled: nextEnabled, changed: true, touched: true });\n        }\n    }\n    _applyStateDiff() {\n        for (const stateEntry of this.stateMap) {\n            const klass = stateEntry[0];\n            const state = stateEntry[1];\n            if (state.changed) {\n                this._toggleClass(klass, state.enabled);\n                state.changed = false;\n            }\n            else if (!state.touched) {\n                // A class that was previously active got removed from the new collection of classes -\n                // remove from the DOM as well.\n                if (state.enabled) {\n                    this._toggleClass(klass, false);\n                }\n                this.stateMap.delete(klass);\n            }\n            state.touched = false;\n        }\n    }\n    _toggleClass(klass, enabled) {\n        if (ngDevMode) {\n            if (typeof klass !== 'string') {\n                throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${ɵstringify(klass)}`);\n            }\n        }\n        klass = klass.trim();\n        if (klass.length > 0) {\n            klass.split(WS_REGEXP).forEach((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    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgClass, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgClass, isStandalone: true, selector: \"[ngClass]\", inputs: { klass: [\"class\", \"klass\"], ngClass: \"ngClass\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgClass, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngClass]',\n                }]\n        }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { klass: [{\n                type: Input,\n                args: ['class']\n            }], ngClass: [{\n                type: Input,\n                args: ['ngClass']\n            }] } });\n\n/**\n * Instantiates a {@link Component} type and inserts its Host View into the 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 be 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 * * `ngComponentOutletInputs`: Optional component inputs object, which will be bind to the\n * component.\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 it exists.\n *\n * * `ngComponentOutletNgModule`: Optional NgModule class reference to allow loading another\n * module dynamically, then loading a component from that module.\n *\n * * `ngComponentOutletNgModuleFactory`: Deprecated config option that allows providing optional\n * NgModule factory to allow loading another module dynamically, then loading a component from that\n * module. Use `ngComponentOutletNgModule` instead.\n *\n * ### Syntax\n *\n * Simple\n * ```html\n * <ng-container *ngComponentOutlet=\"componentTypeExpression\"></ng-container>\n * ```\n *\n * With inputs\n * ```html\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n *                                   inputs: inputsExpression;\">\n * </ng-container>\n * ```\n *\n * Customized injector/content\n * ```html\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n *                                   injector: injectorExpression;\n *                                   content: contentNodesExpression;\">\n * </ng-container>\n * ```\n *\n * Customized NgModule reference\n * ```html\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n *                                   ngModule: ngModuleClass;\">\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 */\nclass NgComponentOutlet {\n    _viewContainerRef;\n    ngComponentOutlet = null;\n    ngComponentOutletInputs;\n    ngComponentOutletInjector;\n    ngComponentOutletContent;\n    ngComponentOutletNgModule;\n    /**\n     * @deprecated This input is deprecated, use `ngComponentOutletNgModule` instead.\n     */\n    ngComponentOutletNgModuleFactory;\n    _componentRef;\n    _moduleRef;\n    /**\n     * A helper data structure that allows us to track inputs that were part of the\n     * ngComponentOutletInputs expression. Tracking inputs is necessary for proper removal of ones\n     * that are no longer referenced.\n     */\n    _inputsUsed = new Map();\n    constructor(_viewContainerRef) {\n        this._viewContainerRef = _viewContainerRef;\n    }\n    _needToReCreateNgModuleInstance(changes) {\n        // Note: square brackets property accessor is safe for Closure compiler optimizations (the\n        // `changes` argument of the `ngOnChanges` lifecycle hook retains the names of the fields that\n        // were changed).\n        return (changes['ngComponentOutletNgModule'] !== undefined ||\n            changes['ngComponentOutletNgModuleFactory'] !== undefined);\n    }\n    _needToReCreateComponentInstance(changes) {\n        // Note: square brackets property accessor is safe for Closure compiler optimizations (the\n        // `changes` argument of the `ngOnChanges` lifecycle hook retains the names of the fields that\n        // were changed).\n        return (changes['ngComponentOutlet'] !== undefined ||\n            changes['ngComponentOutletContent'] !== undefined ||\n            changes['ngComponentOutletInjector'] !== undefined ||\n            this._needToReCreateNgModuleInstance(changes));\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        if (this._needToReCreateComponentInstance(changes)) {\n            this._viewContainerRef.clear();\n            this._inputsUsed.clear();\n            this._componentRef = undefined;\n            if (this.ngComponentOutlet) {\n                const injector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector;\n                if (this._needToReCreateNgModuleInstance(changes)) {\n                    this._moduleRef?.destroy();\n                    if (this.ngComponentOutletNgModule) {\n                        this._moduleRef = createNgModule(this.ngComponentOutletNgModule, getParentInjector(injector));\n                    }\n                    else if (this.ngComponentOutletNgModuleFactory) {\n                        this._moduleRef = this.ngComponentOutletNgModuleFactory.create(getParentInjector(injector));\n                    }\n                    else {\n                        this._moduleRef = undefined;\n                    }\n                }\n                this._componentRef = this._viewContainerRef.createComponent(this.ngComponentOutlet, {\n                    injector,\n                    ngModuleRef: this._moduleRef,\n                    projectableNodes: this.ngComponentOutletContent,\n                });\n            }\n        }\n    }\n    /** @nodoc */\n    ngDoCheck() {\n        if (this._componentRef) {\n            if (this.ngComponentOutletInputs) {\n                for (const inputName of Object.keys(this.ngComponentOutletInputs)) {\n                    this._inputsUsed.set(inputName, true);\n                }\n            }\n            this._applyInputStateDiff(this._componentRef);\n        }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        this._moduleRef?.destroy();\n    }\n    _applyInputStateDiff(componentRef) {\n        for (const [inputName, touched] of this._inputsUsed) {\n            if (!touched) {\n                // The input that was previously active no longer exists and needs to be set to undefined.\n                componentRef.setInput(inputName, undefined);\n                this._inputsUsed.delete(inputName);\n            }\n            else {\n                // Since touched is true, it can be asserted that the inputs object is not empty.\n                componentRef.setInput(inputName, this.ngComponentOutletInputs[inputName]);\n                this._inputsUsed.set(inputName, false);\n            }\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgComponentOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgComponentOutlet, isStandalone: true, selector: \"[ngComponentOutlet]\", inputs: { ngComponentOutlet: \"ngComponentOutlet\", ngComponentOutletInputs: \"ngComponentOutletInputs\", ngComponentOutletInjector: \"ngComponentOutletInjector\", ngComponentOutletContent: \"ngComponentOutletContent\", ngComponentOutletNgModule: \"ngComponentOutletNgModule\", ngComponentOutletNgModuleFactory: \"ngComponentOutletNgModuleFactory\" }, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgComponentOutlet, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngComponentOutlet]',\n                    standalone: true,\n                }]\n        }], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { ngComponentOutlet: [{\n                type: Input\n            }], ngComponentOutletInputs: [{\n                type: Input\n            }], ngComponentOutletInjector: [{\n                type: Input\n            }], ngComponentOutletContent: [{\n                type: Input\n            }], ngComponentOutletNgModule: [{\n                type: Input\n            }], ngComponentOutletNgModuleFactory: [{\n                type: Input\n            }] } });\n// Helper function that returns an Injector instance of a parent NgModule.\nfunction getParentInjector(injector) {\n    const parentNgModule = injector.get(NgModuleRef);\n    return parentNgModule.injector;\n}\n\n/**\n * @publicApi\n */\nclass NgForOfContext {\n    $implicit;\n    ngForOf;\n    index;\n    count;\n    constructor(\n    /** Reference to the current item from the collection. */\n    $implicit, \n    /**\n     * 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\n     * (`userStreams | async`).\n     */\n    ngForOf, \n    /** Returns an index of the current item in the collection. */\n    index, \n    /** Returns total amount of items in the collection. */\n    count) {\n        this.$implicit = $implicit;\n        this.ngForOf = ngForOf;\n        this.index = index;\n        this.count = count;\n    }\n    // Indicates whether this is the first item in the collection.\n    get first() {\n        return this.index === 0;\n    }\n    // Indicates whether this is the last item in the collection.\n    get last() {\n        return this.index === this.count - 1;\n    }\n    // Indicates whether an index of this item in the collection is even.\n    get even() {\n        return this.index % 2 === 0;\n    }\n    // Indicates whether an index of this item in the collection is odd.\n    get odd() {\n        return !this.even;\n    }\n}\n/**\n * A [structural directive](guide/directives/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/directives/structural-directives#asterisk) `*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 * ```html\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 * ```html\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/directives/structural-directives#one-per-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 further discussion, see\n * [Structural Directives](guide/directives/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 *  ```html\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/animations/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/directives/structural-directives)\n * @ngModule CommonModule\n * @publicApi\n */\nclass NgForOf {\n    _viewContainer;\n    _template;\n    _differs;\n    /**\n     * The value of the iterable expression, which can be used as a\n     * [template input variable](guide/directives/structural-directives#shorthand).\n     */\n    set ngForOf(ngForOf) {\n        this._ngForOf = ngForOf;\n        this._ngForOfDirty = true;\n    }\n    /**\n     * Specifies a custom `TrackByFunction` to compute the identity of items in an iterable.\n     *\n     * If a custom `TrackByFunction` is not provided, `NgForOf` will use the item's [object\n     * identity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)\n     * as the key.\n     *\n     * `NgForOf` uses the computed key to associate items in an iterable with DOM elements\n     * it produces for these items.\n     *\n     * A custom `TrackByFunction` is useful to provide good user experience in cases when items in an\n     * iterable rendered using `NgForOf` have a natural identifier (for example, custom ID or a\n     * primary key), and this iterable could be updated with new object instances that still\n     * represent the same underlying entity (for example, when data is re-fetched from the server,\n     * and the iterable is recreated and re-rendered, but most of the data is still the same).\n     *\n     * @see {@link TrackByFunction}\n     */\n    set ngForTrackBy(fn) {\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') {\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        this._trackByFn = fn;\n    }\n    get ngForTrackBy() {\n        return this._trackByFn;\n    }\n    _ngForOf = null;\n    _ngForOfDirty = true;\n    _differ = null;\n    // TODO(issue/24571): remove '!'\n    // waiting for microsoft/typescript#43662 to allow the return type `TrackByFunction|undefined` for\n    // the getter\n    _trackByFn;\n    constructor(_viewContainer, _template, _differs) {\n        this._viewContainer = _viewContainer;\n        this._template = _template;\n        this._differs = _differs;\n    }\n    /**\n     * A reference to the template that is stamped out for each item in the iterable.\n     * @see [template reference variable](guide/templates/variables#template-reference-variables)\n     */\n    set ngForTemplate(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    /**\n     * Applies the changes when needed.\n     * @nodoc\n     */\n    ngDoCheck() {\n        if (this._ngForOfDirty) {\n            this._ngForOfDirty = false;\n            // React on ngForOf changes only once all inputs have been initialized\n            const value = this._ngForOf;\n            if (!this._differ && value) {\n                if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                    try {\n                        // CAUTION: this logic is duplicated for production mode below, as the try-catch\n                        // is only present in development builds.\n                        this._differ = this._differs.find(value).create(this.ngForTrackBy);\n                    }\n                    catch {\n                        let errorMessage = `Cannot find a differ supporting object '${value}' of type '` +\n                            `${getTypeName(value)}'. NgFor only supports binding to Iterables, such as Arrays.`;\n                        if (typeof value === 'object') {\n                            errorMessage += ' Did you mean to use the keyvalue pipe?';\n                        }\n                        throw new ɵRuntimeError(-2200 /* RuntimeErrorCode.NG_FOR_MISSING_DIFFER */, errorMessage);\n                    }\n                }\n                else {\n                    // CAUTION: this logic is duplicated for development mode above, as the try-catch\n                    // is only present in development builds.\n                    this._differ = this._differs.find(value).create(this.ngForTrackBy);\n                }\n            }\n        }\n        if (this._differ) {\n            const changes = this._differ.diff(this._ngForOf);\n            if (changes)\n                this._applyChanges(changes);\n        }\n    }\n    _applyChanges(changes) {\n        const viewContainer = this._viewContainer;\n        changes.forEachOperation((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                viewContainer.createEmbeddedView(this._template, new NgForOfContext(item.item, this._ngForOf, -1, -1), currentIndex === null ? undefined : currentIndex);\n            }\n            else if (currentIndex == null) {\n                viewContainer.remove(adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n            }\n            else if (adjustedPreviousIndex !== null) {\n                const view = viewContainer.get(adjustedPreviousIndex);\n                viewContainer.move(view, currentIndex);\n                applyViewChange(view, item);\n            }\n        });\n        for (let i = 0, ilen = viewContainer.length; i < ilen; i++) {\n            const viewRef = viewContainer.get(i);\n            const context = viewRef.context;\n            context.index = i;\n            context.count = ilen;\n            context.ngForOf = this._ngForOf;\n        }\n        changes.forEachIdentityChange((record) => {\n            const viewRef = viewContainer.get(record.currentIndex);\n            applyViewChange(viewRef, record);\n        });\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    static ngTemplateContextGuard(dir, ctx) {\n        return true;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgForOf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgForOf, isStandalone: true, selector: \"[ngFor][ngForOf]\", inputs: { ngForOf: \"ngForOf\", ngForTrackBy: \"ngForTrackBy\", ngForTemplate: \"ngForTemplate\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgForOf, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngFor][ngForOf]',\n                }]\n        }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i0.IterableDiffers }], propDecorators: { ngForOf: [{\n                type: Input\n            }], ngForTrackBy: [{\n                type: Input\n            }], ngForTemplate: [{\n                type: Input\n            }] } });\nfunction applyViewChange(view, record) {\n    view.context.$implicit = record.item;\n}\nfunction getTypeName(type) {\n    return type['name'] || typeof type;\n}\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/directives/structural-directives#asterisk) 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 * ```html\n * <div *ngIf=\"condition\">Content to render when condition is true.</div>\n * ```\n *\n * Simple form with expanded syntax:\n *\n * ```html\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 * ```html\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 * ```html\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 * ```html\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 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 (`?.`)\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 * ```html\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 * ```html\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](guide/directives/structural-directives#one-per-element).\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass NgIf {\n    _viewContainer;\n    _context = new NgIfContext();\n    _thenTemplateRef = null;\n    _elseTemplateRef = null;\n    _thenViewRef = null;\n    _elseViewRef = null;\n    constructor(_viewContainer, templateRef) {\n        this._viewContainer = _viewContainer;\n        this._thenTemplateRef = templateRef;\n    }\n    /**\n     * The Boolean expression to evaluate as the condition for showing a template.\n     */\n    set ngIf(condition) {\n        this._context.$implicit = this._context.ngIf = condition;\n        this._updateView();\n    }\n    /**\n     * A template to show if the condition expression evaluates to true.\n     */\n    set ngIfThen(templateRef) {\n        assertTemplate('ngIfThen', templateRef);\n        this._thenTemplateRef = templateRef;\n        this._thenViewRef = null; // clear previous view if any.\n        this._updateView();\n    }\n    /**\n     * A template to show if the condition expression evaluates to false.\n     */\n    set ngIfElse(templateRef) {\n        assertTemplate('ngIfElse', templateRef);\n        this._elseTemplateRef = templateRef;\n        this._elseViewRef = null; // clear previous view if any.\n        this._updateView();\n    }\n    _updateView() {\n        if (this._context.$implicit) {\n            if (!this._thenViewRef) {\n                this._viewContainer.clear();\n                this._elseViewRef = null;\n                if (this._thenTemplateRef) {\n                    this._thenViewRef = 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 = this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);\n                }\n            }\n        }\n    }\n    /** @internal */\n    static ngIfUseIfTypeGuard;\n    /**\n     * Assert the correct type of the expression bound to the `ngIf` input within the template.\n     *\n     * The presence of this static field is a signal to the Ivy template type check compiler that\n     * when the `NgIf` structural directive renders its template, the type of the expression bound\n     * to `ngIf` should be narrowed in some way. For `NgIf`, the binding expression itself is used to\n     * narrow its type, which allows the strictNullChecks feature of TypeScript to work with `NgIf`.\n     */\n    static ngTemplateGuard_ngIf;\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    static ngTemplateContextGuard(dir, ctx) {\n        return true;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgIf, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgIf, isStandalone: true, selector: \"[ngIf]\", inputs: { ngIf: \"ngIf\", ngIfThen: \"ngIfThen\", ngIfElse: \"ngIfElse\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgIf, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngIf]',\n                }]\n        }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }], propDecorators: { ngIf: [{\n                type: Input\n            }], ngIfThen: [{\n                type: Input\n            }], ngIfElse: [{\n                type: Input\n            }] } });\n/**\n * @publicApi\n */\nclass NgIfContext {\n    $implicit = null;\n    ngIf = null;\n}\nfunction assertTemplate(property, templateRef) {\n    const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);\n    if (!isTemplateRefOrNull) {\n        throw new Error(`${property} must be a TemplateRef, but received '${ɵstringify(templateRef)}'.`);\n    }\n}\n\nclass SwitchView {\n    _viewContainerRef;\n    _templateRef;\n    _created = false;\n    constructor(_viewContainerRef, _templateRef) {\n        this._viewContainerRef = _viewContainerRef;\n        this._templateRef = _templateRef;\n    }\n    create() {\n        this._created = true;\n        this._viewContainerRef.createEmbeddedView(this._templateRef);\n    }\n    destroy() {\n        this._created = false;\n        this._viewContainerRef.clear();\n    }\n    enforceState(created) {\n        if (created && !this._created) {\n            this.create();\n        }\n        else if (!created && this._created) {\n            this.destroy();\n        }\n    }\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 * ```html\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 * ```html\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 * ```html\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 * ```html\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 {@link NgSwitchCase}\n * @see {@link NgSwitchDefault}\n * @see [Structural Directives](guide/directives/structural-directives)\n *\n */\nclass NgSwitch {\n    _defaultViews = [];\n    _defaultUsed = false;\n    _caseCount = 0;\n    _lastCaseCheckIndex = 0;\n    _lastCasesMatched = false;\n    _ngSwitch;\n    set ngSwitch(newValue) {\n        this._ngSwitch = newValue;\n        if (this._caseCount === 0) {\n            this._updateDefaultCases(true);\n        }\n    }\n    /** @internal */\n    _addCase() {\n        return this._caseCount++;\n    }\n    /** @internal */\n    _addDefault(view) {\n        this._defaultViews.push(view);\n    }\n    /** @internal */\n    _matchCase(value) {\n        const matched = value === this._ngSwitch;\n        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    _updateDefaultCases(useDefault) {\n        if (this._defaultViews.length > 0 && useDefault !== this._defaultUsed) {\n            this._defaultUsed = useDefault;\n            for (const defaultView of this._defaultViews) {\n                defaultView.enforceState(useDefault);\n            }\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgSwitch, isStandalone: true, selector: \"[ngSwitch]\", inputs: { ngSwitch: \"ngSwitch\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgSwitch, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngSwitch]',\n                }]\n        }], propDecorators: { ngSwitch: [{\n                type: Input\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 * ```html\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 * As of Angular v17 the NgSwitch directive uses strict equality comparison (`===`) instead of\n * loose equality (`==`) to match different cases.\n *\n * @publicApi\n * @see {@link NgSwitch}\n * @see {@link NgSwitchDefault}\n *\n */\nclass NgSwitchCase {\n    ngSwitch;\n    _view;\n    /**\n     * Stores the HTML template to be selected on match.\n     */\n    ngSwitchCase;\n    constructor(viewContainer, templateRef, ngSwitch) {\n        this.ngSwitch = ngSwitch;\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {\n            throwNgSwitchProviderNotFoundError('ngSwitchCase', 'NgSwitchCase');\n        }\n        ngSwitch._addCase();\n        this._view = new SwitchView(viewContainer, templateRef);\n    }\n    /**\n     * Performs case matching. For internal use only.\n     * @nodoc\n     */\n    ngDoCheck() {\n        this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgSwitchCase, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgSwitchCase, isStandalone: true, selector: \"[ngSwitchCase]\", inputs: { ngSwitchCase: \"ngSwitchCase\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgSwitchCase, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngSwitchCase]',\n                }]\n        }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: NgSwitch, decorators: [{\n                    type: Optional\n                }, {\n                    type: Host\n                }] }], propDecorators: { ngSwitchCase: [{\n                type: Input\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 {@link NgSwitch}\n * @see {@link NgSwitchCase}\n *\n */\nclass NgSwitchDefault {\n    constructor(viewContainer, templateRef, ngSwitch) {\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ngSwitch) {\n            throwNgSwitchProviderNotFoundError('ngSwitchDefault', 'NgSwitchDefault');\n        }\n        ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgSwitchDefault, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NgSwitch, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgSwitchDefault, isStandalone: true, selector: \"[ngSwitchDefault]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgSwitchDefault, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngSwitchDefault]',\n                }]\n        }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: NgSwitch, decorators: [{\n                    type: Optional\n                }, {\n                    type: Host\n                }] }] });\nfunction throwNgSwitchProviderNotFoundError(attrName, directiveName) {\n    throw new ɵRuntimeError(2000 /* RuntimeErrorCode.PARENT_NG_SWITCH_NOT_FOUND */, `An element with the \"${attrName}\" attribute ` +\n        `(matching the \"${directiveName}\" directive) must be located inside an element with the \"ngSwitch\" attribute ` +\n        `(matching \"NgSwitch\" directive)`);\n}\nfunction stringifyValue(value) {\n    return typeof value === 'string' ? `'${value}'` : String(value);\n}\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```html\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 */\nclass NgPlural {\n    _localization;\n    _activeView;\n    _caseViews = {};\n    constructor(_localization) {\n        this._localization = _localization;\n    }\n    set ngPlural(value) {\n        this._updateView(value);\n    }\n    addCase(value, switchView) {\n        this._caseViews[value] = switchView;\n    }\n    _updateView(switchValue) {\n        this._clearViews();\n        const cases = Object.keys(this._caseViews);\n        const key = getPluralCategory(switchValue, cases, this._localization);\n        this._activateView(this._caseViews[key]);\n    }\n    _clearViews() {\n        if (this._activeView)\n            this._activeView.destroy();\n    }\n    _activateView(view) {\n        if (view) {\n            this._activeView = view;\n            this._activeView.create();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgPlural, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgPlural, isStandalone: true, selector: \"[ngPlural]\", inputs: { ngPlural: \"ngPlural\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgPlural, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngPlural]',\n                }]\n        }], ctorParameters: () => [{ type: NgLocalization }], propDecorators: { ngPlural: [{\n                type: Input\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 * ```html\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 */\nclass NgPluralCase {\n    value;\n    constructor(value, template, viewContainer, ngPlural) {\n        this.value = value;\n        const isANumber = !isNaN(Number(value));\n        ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgPluralCase, deps: [{ token: 'ngPluralCase', attribute: true }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: NgPlural, host: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgPluralCase, isStandalone: true, selector: \"[ngPluralCase]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgPluralCase, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngPluralCase]',\n                }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Attribute,\n                    args: ['ngPluralCase']\n                }] }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: NgPlural, decorators: [{\n                    type: Host\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 * ```html\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 * ```html\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 * ```html\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 */\nclass NgStyle {\n    _ngEl;\n    _differs;\n    _renderer;\n    _ngStyle = null;\n    _differ = null;\n    constructor(_ngEl, _differs, _renderer) {\n        this._ngEl = _ngEl;\n        this._differs = _differs;\n        this._renderer = _renderer;\n    }\n    set ngStyle(values) {\n        this._ngStyle = values;\n        if (!this._differ && values) {\n            this._differ = this._differs.find(values).create();\n        }\n    }\n    ngDoCheck() {\n        if (this._differ) {\n            const changes = this._differ.diff(this._ngStyle);\n            if (changes) {\n                this._applyChanges(changes);\n            }\n        }\n    }\n    _setStyle(nameAndUnit, value) {\n        const [name, unit] = nameAndUnit.split('.');\n        const flags = name.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n        if (value != null) {\n            this._renderer.setStyle(this._ngEl.nativeElement, name, unit ? `${value}${unit}` : value, flags);\n        }\n        else {\n            this._renderer.removeStyle(this._ngEl.nativeElement, name, flags);\n        }\n    }\n    _applyChanges(changes) {\n        changes.forEachRemovedItem((record) => this._setStyle(record.key, null));\n        changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue));\n        changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgStyle, deps: [{ token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgStyle, isStandalone: true, selector: \"[ngStyle]\", inputs: { ngStyle: \"ngStyle\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgStyle, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngStyle]',\n                }]\n        }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.KeyValueDiffers }, { type: i0.Renderer2 }], propDecorators: { ngStyle: [{\n                type: Input,\n                args: ['ngStyle']\n            }] } });\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 * ```html\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 */\nclass NgTemplateOutlet {\n    _viewContainerRef;\n    _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    ngTemplateOutletContext = null;\n    /**\n     * A string defining the template reference and optionally the context object for the template.\n     */\n    ngTemplateOutlet = null;\n    /** Injector to be used within the embedded view. */\n    ngTemplateOutletInjector = null;\n    constructor(_viewContainerRef) {\n        this._viewContainerRef = _viewContainerRef;\n    }\n    ngOnChanges(changes) {\n        if (this._shouldRecreateView(changes)) {\n            const viewContainerRef = this._viewContainerRef;\n            if (this._viewRef) {\n                viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef));\n            }\n            // If there is no outlet, clear the destroyed view ref.\n            if (!this.ngTemplateOutlet) {\n                this._viewRef = null;\n                return;\n            }\n            // Create a context forward `Proxy` that will always bind to the user-specified context,\n            // without having to destroy and re-create views whenever the context changes.\n            const viewContext = this._createContextForwardProxy();\n            this._viewRef = viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, viewContext, {\n                injector: this.ngTemplateOutletInjector ?? undefined,\n            });\n        }\n    }\n    /**\n     * We need to re-create existing embedded view if either is true:\n     * - the outlet changed.\n     * - the injector changed.\n     */\n    _shouldRecreateView(changes) {\n        return !!changes['ngTemplateOutlet'] || !!changes['ngTemplateOutletInjector'];\n    }\n    /**\n     * For a given outlet instance, we create a proxy object that delegates\n     * to the user-specified context. This allows changing, or swapping out\n     * the context object completely without having to destroy/re-create the view.\n     */\n    _createContextForwardProxy() {\n        return new Proxy({}, {\n            set: (_target, prop, newValue) => {\n                if (!this.ngTemplateOutletContext) {\n                    return false;\n                }\n                return Reflect.set(this.ngTemplateOutletContext, prop, newValue);\n            },\n            get: (_target, prop, receiver) => {\n                if (!this.ngTemplateOutletContext) {\n                    return undefined;\n                }\n                return Reflect.get(this.ngTemplateOutletContext, prop, receiver);\n            },\n        });\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgTemplateOutlet, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgTemplateOutlet, isStandalone: true, selector: \"[ngTemplateOutlet]\", inputs: { ngTemplateOutletContext: \"ngTemplateOutletContext\", ngTemplateOutlet: \"ngTemplateOutlet\", ngTemplateOutletInjector: \"ngTemplateOutletInjector\" }, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgTemplateOutlet, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngTemplateOutlet]',\n                }]\n        }], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { ngTemplateOutletContext: [{\n                type: Input\n            }], ngTemplateOutlet: [{\n                type: Input\n            }], ngTemplateOutletInjector: [{\n                type: Input\n            }] } });\n\n/**\n * A collection of Angular directives that are likely to be used in each and every Angular\n * application.\n */\nconst 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\nfunction invalidPipeArgumentError(type, value) {\n    return new ɵRuntimeError(2100 /* RuntimeErrorCode.INVALID_PIPE_ARGUMENT */, ngDevMode && `InvalidPipeArgument: '${value}' for pipe '${ɵstringify(type)}'`);\n}\n\nclass SubscribableStrategy {\n    createSubscription(async, updateLatestValue) {\n        // Subscription can be side-effectful, and we don't want any signal reads which happen in the\n        // side effect of the subscription to be tracked by a component's template when that\n        // subscription is triggered via the async pipe. So we wrap the subscription in `untracked` to\n        // decouple from the current reactive context.\n        //\n        // `untracked` also prevents signal _writes_ which happen in the subscription side effect from\n        // being treated as signal writes during the template evaluation (which throws errors).\n        return untracked(() => async.subscribe({\n            next: updateLatestValue,\n            error: (e) => {\n                throw e;\n            },\n        }));\n    }\n    dispose(subscription) {\n        // See the comment in `createSubscription` above on the use of `untracked`.\n        untracked(() => subscription.unsubscribe());\n    }\n}\nclass PromiseStrategy {\n    createSubscription(async, updateLatestValue) {\n        return async.then(updateLatestValue, (e) => {\n            throw e;\n        });\n    }\n    dispose(subscription) { }\n}\nconst _promiseStrategy = new PromiseStrategy();\nconst _subscribableStrategy = new SubscribableStrategy();\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. When the reference of the expression changes, the `async` pipe\n * automatically unsubscribes from the old `Observable` or `Promise` and subscribes to the new one.\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 */\nclass AsyncPipe {\n    _ref;\n    _latestValue = null;\n    markForCheckOnValueUpdate = true;\n    _subscription = null;\n    _obj = null;\n    _strategy = null;\n    constructor(ref) {\n        // Assign `ref` into `this._ref` manually instead of declaring `_ref` in the constructor\n        // parameter list, as the type of `this._ref` includes `null` unlike the type of `ref`.\n        this._ref = ref;\n    }\n    ngOnDestroy() {\n        if (this._subscription) {\n            this._dispose();\n        }\n        // Clear the `ChangeDetectorRef` and its association with the view data, to mitigate\n        // potential memory leaks in Observables that could otherwise cause the view data to\n        // be retained.\n        // https://github.com/angular/angular/issues/17624\n        this._ref = null;\n    }\n    transform(obj) {\n        if (!this._obj) {\n            if (obj) {\n                try {\n                    // Only call `markForCheck` if the value is updated asynchronously.\n                    // Synchronous updates _during_ subscription should not wastefully mark for check -\n                    // this value is already going to be returned from the transform function.\n                    this.markForCheckOnValueUpdate = false;\n                    this._subscribe(obj);\n                }\n                finally {\n                    this.markForCheckOnValueUpdate = true;\n                }\n            }\n            return this._latestValue;\n        }\n        if (obj !== this._obj) {\n            this._dispose();\n            return this.transform(obj);\n        }\n        return this._latestValue;\n    }\n    _subscribe(obj) {\n        this._obj = obj;\n        this._strategy = this._selectStrategy(obj);\n        this._subscription = this._strategy.createSubscription(obj, (value) => this._updateLatestValue(obj, value));\n    }\n    _selectStrategy(obj) {\n        if (ɵisPromise(obj)) {\n            return _promiseStrategy;\n        }\n        if (ɵisSubscribable(obj)) {\n            return _subscribableStrategy;\n        }\n        throw invalidPipeArgumentError(AsyncPipe, obj);\n    }\n    _dispose() {\n        // Note: `dispose` is only called if a subscription has been initialized before, indicating\n        // that `this._strategy` is also available.\n        this._strategy.dispose(this._subscription);\n        this._latestValue = null;\n        this._subscription = null;\n        this._obj = null;\n    }\n    _updateLatestValue(async, value) {\n        if (async === this._obj) {\n            this._latestValue = value;\n            if (this.markForCheckOnValueUpdate) {\n                this._ref?.markForCheck();\n            }\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: AsyncPipe, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: AsyncPipe, isStandalone: true, name: \"async\", pure: false });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: AsyncPipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'async',\n                    pure: false,\n                }]\n        }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });\n\n/**\n * Transforms text to all lower case.\n *\n * @see {@link UpperCasePipe}\n * @see {@link 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 * {@example common/pipes/ts/lowerupper_pipe.ts region='LowerUpperPipe'}\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass LowerCasePipe {\n    transform(value) {\n        if (value == null)\n            return null;\n        if (typeof value !== 'string') {\n            throw invalidPipeArgumentError(LowerCasePipe, value);\n        }\n        return value.toLowerCase();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: LowerCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: LowerCasePipe, isStandalone: true, name: \"lowercase\" });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: LowerCasePipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'lowercase',\n                }]\n        }] });\n//\n// Regex below matches any Unicode word and number compatible with ES5. In ES2018 the same result\n// can be achieved by using /[0-9\\p{L}]\\S*/gu and also known as Unicode Property Escapes\n// (https://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+%2F%5B0-9%5Cp%7BL%7D%5D%5CS*%2Fgu%3B%0A%0A&unicodePropertyEscape=1\n//\nconst unicodeWordMatch = /(?:[0-9A-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\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\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\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09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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-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\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-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\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-\\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-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9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]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDEB8\\uDF00-\\uDF1A\\uDF40-\\uDF46]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEB0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|\\uD80B[\\uDF90-\\uDFF0]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE70-\\uDEBE\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uD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\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDEDF\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF38\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])\\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 {@link LowerCasePipe}\n * @see {@link UpperCasePipe}\n *\n * @usageNotes\n * The following example shows the result of transforming various strings into title case.\n *\n * {@example common/pipes/ts/titlecase_pipe.ts region='TitleCasePipe'}\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass TitleCasePipe {\n    transform(value) {\n        if (value == null)\n            return null;\n        if (typeof value !== 'string') {\n            throw invalidPipeArgumentError(TitleCasePipe, value);\n        }\n        return value.replace(unicodeWordMatch, (txt) => txt[0].toUpperCase() + txt.slice(1).toLowerCase());\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: TitleCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: TitleCasePipe, isStandalone: true, name: \"titlecase\" });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: TitleCasePipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'titlecase',\n                }]\n        }] });\n/**\n * Transforms text to all upper case.\n * @see {@link LowerCasePipe}\n * @see {@link TitleCasePipe}\n *\n * @ngModule CommonModule\n * @publicApi\n */\nclass UpperCasePipe {\n    transform(value) {\n        if (value == null)\n            return null;\n        if (typeof value !== 'string') {\n            throw invalidPipeArgumentError(UpperCasePipe, value);\n        }\n        return value.toUpperCase();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: UpperCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: UpperCasePipe, isStandalone: true, name: \"uppercase\" });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: UpperCasePipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'uppercase',\n                }]\n        }] });\n\n/**\n * The default date format of Angular date pipe, which corresponds to the following format:\n * `'MMM d,y'` (e.g. `Jun 15, 2015`)\n */\nconst DEFAULT_DATE_FORMAT = 'mediumDate';\n\n/**\n * Optionally-provided default timezone to use for all instances of `DatePipe` (such as `'+0430'`).\n * If the value isn't provided, the `DatePipe` will use the end-user's local system timezone.\n *\n * @deprecated use DATE_PIPE_DEFAULT_OPTIONS token to configure DatePipe\n */\nconst DATE_PIPE_DEFAULT_TIMEZONE = new InjectionToken(ngDevMode ? 'DATE_PIPE_DEFAULT_TIMEZONE' : '');\n/**\n * DI token that allows to provide default configuration for the `DatePipe` instances in an\n * application. The value is an object which can include the following fields:\n * - `dateFormat`: configures the default date format. If not provided, the `DatePipe`\n * will use the 'mediumDate' as a value.\n * - `timezone`: configures the default timezone. If not provided, the `DatePipe` will\n * use the end-user's local system timezone.\n *\n * @see {@link DatePipeConfig}\n *\n * @usageNotes\n *\n * Various date pipe default values can be overwritten by providing this token with\n * the value that has this interface.\n *\n * For example:\n *\n * Override the default date format by providing a value using the token:\n * ```ts\n * providers: [\n *   {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {dateFormat: 'shortDate'}}\n * ]\n * ```\n *\n * Override the default timezone by providing a value using the token:\n * ```ts\n * providers: [\n *   {provide: DATE_PIPE_DEFAULT_OPTIONS, useValue: {timezone: '-1200'}}\n * ]\n * ```\n */\nconst DATE_PIPE_DEFAULT_OPTIONS = new InjectionToken(ngDevMode ? 'DATE_PIPE_DEFAULT_OPTIONS' : '');\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date value according to locale rules.\n *\n * `DatePipe` is executed only when it detects a pure change to the input value.\n * A pure change is either a change to a primitive input value\n * (such as `String`, `Number`, `Boolean`, or `Symbol`),\n * or a changed object reference (such as `Date`, `Array`, `Function`, or `Object`).\n *\n * Note that mutating a `Date` object does not cause the pipe to be rendered again.\n * To ensure that the pipe is executed, you must create a new `Date` object.\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/format-data-locale) for more information.\n *\n * The time zone of the formatted value can be specified either by passing it in as the second\n * parameter of the pipe, or by setting the default through the `DATE_PIPE_DEFAULT_OPTIONS`\n * injection token. The value that is passed in as the second parameter takes precedence over\n * the one defined using the injection token.\n *\n * @see {@link 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 * | Option        | Equivalent to                       | Examples (given in `en-US` locale)              |\n * |---------------|-------------------------------------|-------------------------------------------------|\n * | `'short'`     | `'M/d/yy, h:mm a'`                  | `6/15/15, 9:03 AM`                              |\n * | `'medium'`    | `'MMM d, y, h:mm:ss a'`             | `Jun 15, 2015, 9:03:01 AM`                      |\n * | `'long'`      | `'MMMM d, y, h:mm:ss a z'`          | `June 15, 2015 at 9:03:01 AM GMT+1`             |\n * | `'full'`      | `'EEEE, MMMM d, y, h:mm:ss a zzzz'` | `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00` |\n * | `'shortDate'` | `'M/d/yy'`                          | `6/15/15`                                       |\n * | `'mediumDate'`| `'MMM d, y'`                        | `Jun 15, 2015`                                  |\n * | `'longDate'`  | `'MMMM d, y'`                       | `June 15, 2015`                                 |\n * | `'fullDate'`  | `'EEEE, MMMM d, y'`                 | `Monday, June 15, 2015`                         |\n * | `'shortTime'` | `'h:mm a'`                          | `9:03 AM`                                       |\n * | `'mediumTime'`| `'h:mm:ss a'`                       | `9:03:01 AM`                                    |\n * | `'longTime'`  | `'h:mm:ss a z'`                     | `9:03:01 AM GMT+1`                              |\n * | `'fullTime'`  | `'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 *  | ISO Week-numbering 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 *  | ISO 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 *  | Week day standalone     | c, cc       | Numeric: 1 digit                                              | 2                                                          |\n *  |                         | ccc         | Abbreviated                                                   | Tue                                                        |\n *  |                         | cccc        | Wide                                                          | Tuesday                                                    |\n *  |                         | ccccc       | Narrow                                                        | T                                                          |\n *  |                         | cccccc      | 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 *\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 * {{ dateObj | date:\"MMM dd, yyyy 'at' hh:mm a\" }}  // output is 'Jun 15, 2015 at 09:43 PM'\n * ```\n *\n * ### Usage example\n *\n * The following component uses a date pipe to display the current date in different formats.\n *\n * ```angular-ts\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 */\nclass DatePipe {\n    locale;\n    defaultTimezone;\n    defaultOptions;\n    constructor(locale, defaultTimezone, defaultOptions) {\n        this.locale = locale;\n        this.defaultTimezone = defaultTimezone;\n        this.defaultOptions = defaultOptions;\n    }\n    transform(value, format, timezone, locale) {\n        if (value == null || value === '' || value !== value)\n            return null;\n        try {\n            const _format = format ?? this.defaultOptions?.dateFormat ?? DEFAULT_DATE_FORMAT;\n            const _timezone = timezone ?? this.defaultOptions?.timezone ?? this.defaultTimezone ?? undefined;\n            return formatDate(value, _format, locale || this.locale, _timezone);\n        }\n        catch (error) {\n            throw invalidPipeArgumentError(DatePipe, error.message);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DatePipe, deps: [{ token: LOCALE_ID }, { token: DATE_PIPE_DEFAULT_TIMEZONE, optional: true }, { token: DATE_PIPE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: DatePipe, isStandalone: true, name: \"date\" });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DatePipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'date',\n                }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [LOCALE_ID]\n                }] }, { type: undefined, decorators: [{\n                    type: Inject,\n                    args: [DATE_PIPE_DEFAULT_TIMEZONE]\n                }, {\n                    type: Optional\n                }] }, { type: undefined, decorators: [{\n                    type: Inject,\n                    args: [DATE_PIPE_DEFAULT_OPTIONS]\n                }, {\n                    type: Optional\n                }] }] });\n\nconst _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 */\nclass I18nPluralPipe {\n    _localization;\n    constructor(_localization) {\n        this._localization = _localization;\n    }\n    /**\n     * @param value the number to be formatted\n     * @param pluralMap an object that mimics the ICU format, see\n     * https://unicode-org.github.io/icu/userguide/format_parse/messages/.\n     * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n     * default).\n     */\n    transform(value, pluralMap, locale) {\n        if (value == null)\n            return '';\n        if (typeof pluralMap !== 'object' || pluralMap === null) {\n            throw invalidPipeArgumentError(I18nPluralPipe, pluralMap);\n        }\n        const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);\n        return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: I18nPluralPipe, deps: [{ token: NgLocalization }], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: I18nPluralPipe, isStandalone: true, name: \"i18nPlural\" });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: I18nPluralPipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'i18nPlural',\n                }]\n        }], ctorParameters: () => [{ type: NgLocalization }] });\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 */\nclass 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    transform(value, mapping) {\n        if (value == null)\n            return '';\n        if (typeof mapping !== 'object' || typeof value !== 'string') {\n            throw invalidPipeArgumentError(I18nSelectPipe, 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    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: I18nSelectPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: I18nSelectPipe, isStandalone: true, name: \"i18nSelect\" });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: I18nSelectPipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'i18nSelect',\n                }]\n        }] });\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 */\nclass JsonPipe {\n    /**\n     * @param value A value of any type to convert into a JSON-format string.\n     */\n    transform(value) {\n        return JSON.stringify(value, null, 2);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: JsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: JsonPipe, isStandalone: true, name: \"json\", pure: false });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: JsonPipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'json',\n                    pure: false,\n                }]\n        }] });\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 * Passing `null` as the compareFn will use natural ordering of the input.\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\n * keyvalue pipe.\n *\n * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}\n *\n * @publicApi\n */\nclass KeyValuePipe {\n    differs;\n    constructor(differs) {\n        this.differs = differs;\n    }\n    differ;\n    keyValues = [];\n    compareFn = defaultComparator;\n    transform(input, compareFn = defaultComparator) {\n        if (!input || (!(input instanceof Map) && typeof input !== 'object')) {\n            return null;\n        }\n        // make a differ for whatever type we've been passed in\n        this.differ ??= this.differs.find(input).create();\n        const differChanges = this.differ.diff(input);\n        const compareFnChanged = compareFn !== this.compareFn;\n        if (differChanges) {\n            this.keyValues = [];\n            differChanges.forEachItem((r) => {\n                this.keyValues.push(makeKeyValuePair(r.key, r.currentValue));\n            });\n        }\n        if (differChanges || compareFnChanged) {\n            if (compareFn) {\n                this.keyValues.sort(compareFn);\n            }\n            this.compareFn = compareFn;\n        }\n        return this.keyValues;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: KeyValuePipe, deps: [{ token: i0.KeyValueDiffers }], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: KeyValuePipe, isStandalone: true, name: \"keyvalue\", pure: false });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: KeyValuePipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'keyvalue',\n                    pure: false,\n                }]\n        }], ctorParameters: () => [{ type: i0.KeyValueDiffers }] });\nfunction defaultComparator(keyValueA, keyValueB) {\n    const a = keyValueA.key;\n    const 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    const aString = String(a);\n    const bString = String(b);\n    return aString == bString ? 0 : aString < bString ? -1 : 1;\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a value according to digit options and locale rules.\n * Locale determines group sizing and separator,\n * decimal point character, and other locale-specific configurations.\n *\n * @see {@link formatNumber}\n *\n * @usageNotes\n *\n * ### digitsInfo\n *\n * The value's decimal representation is specified by the `digitsInfo`\n * parameter, written in the following format:<br>\n *\n * ```\n * {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}\n * ```\n *\n *  - `minIntegerDigits`:\n * The minimum number of integer digits before the decimal point.\n * Default is 1.\n *\n * - `minFractionDigits`:\n * The minimum number of digits after the decimal point.\n * Default is 0.\n *\n *  - `maxFractionDigits`:\n * The maximum number of digits after the decimal point.\n * Default is 3.\n *\n * If the formatted value is truncated it will be rounded using the \"to-nearest\" method:\n *\n * ```\n * {{3.6 | number: '1.0-0'}}\n * <!--will output '4'-->\n *\n * {{-3.6 | number:'1.0-0'}}\n * <!--will output '-4'-->\n * ```\n *\n * ### locale\n *\n * `locale` will format a value according to locale rules.\n * Locale determines group sizing and separator,\n * decimal point character, and other locale-specific configurations.\n *\n * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n *\n * See [Setting your app locale](guide/i18n/locale-id).\n *\n * ### Example\n *\n * The following code shows how the pipe transforms values\n * according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * {@example common/pipes/ts/number_pipe.ts region='NumberPipe'}\n *\n * @publicApi\n */\nclass DecimalPipe {\n    _locale;\n    constructor(_locale) {\n        this._locale = _locale;\n    }\n    transform(value, digitsInfo, locale) {\n        if (!isValue(value))\n            return null;\n        locale ||= this._locale;\n        try {\n            const num = strToNumber(value);\n            return formatNumber(num, locale, digitsInfo);\n        }\n        catch (error) {\n            throw invalidPipeArgumentError(DecimalPipe, error.message);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DecimalPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: DecimalPipe, isStandalone: true, name: \"number\" });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DecimalPipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'number',\n                }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [LOCALE_ID]\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 {@link 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 * {@example common/pipes/ts/percent_pipe.ts region='PercentPipe'}\n *\n * @publicApi\n */\nclass PercentPipe {\n    _locale;\n    constructor(_locale) {\n        this._locale = _locale;\n    }\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/locale-id).\n     */\n    transform(value, digitsInfo, locale) {\n        if (!isValue(value))\n            return null;\n        locale ||= this._locale;\n        try {\n            const num = strToNumber(value);\n            return formatPercent(num, locale, digitsInfo);\n        }\n        catch (error) {\n            throw invalidPipeArgumentError(PercentPipe, error.message);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PercentPipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: PercentPipe, isStandalone: true, name: \"percent\" });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PercentPipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'percent',\n                }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [LOCALE_ID]\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 *\n * @see {@link getCurrencySymbol}\n * @see {@link 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 * {@example common/pipes/ts/currency_pipe.ts region='CurrencyPipe'}\n *\n * @publicApi\n */\nclass CurrencyPipe {\n    _locale;\n    _defaultCurrencyCode;\n    constructor(_locale, _defaultCurrencyCode = 'USD') {\n        this._locale = _locale;\n        this._defaultCurrencyCode = _defaultCurrencyCode;\n    }\n    transform(value, currencyCode = this._defaultCurrencyCode, display = 'symbol', digitsInfo, locale) {\n        if (!isValue(value))\n            return null;\n        locale ||= this._locale;\n        if (typeof display === 'boolean') {\n            if ((typeof ngDevMode === 'undefined' || ngDevMode) && 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        let 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            const num = strToNumber(value);\n            return formatCurrency(num, locale, currency, currencyCode, digitsInfo);\n        }\n        catch (error) {\n            throw invalidPipeArgumentError(CurrencyPipe, error.message);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: CurrencyPipe, deps: [{ token: LOCALE_ID }, { token: DEFAULT_CURRENCY_CODE }], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: CurrencyPipe, isStandalone: true, name: \"currency\" });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: CurrencyPipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'currency',\n                }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [LOCALE_ID]\n                }] }, { type: undefined, decorators: [{\n                    type: Inject,\n                    args: [DEFAULT_CURRENCY_CODE]\n                }] }] });\nfunction isValue(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 * @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 */\nclass SlicePipe {\n    transform(value, start, end) {\n        if (value == null)\n            return null;\n        if (!this.supports(value)) {\n            throw invalidPipeArgumentError(SlicePipe, value);\n        }\n        return value.slice(start, end);\n    }\n    supports(obj) {\n        return typeof obj === 'string' || Array.isArray(obj);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: SlicePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });\n    static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: SlicePipe, isStandalone: true, name: \"slice\", pure: false });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: SlicePipe, decorators: [{\n            type: Pipe,\n            args: [{\n                    name: 'slice',\n                    pure: false,\n                }]\n        }] });\n\n/**\n * @module\n * @description\n * This module provides a set of common Pipes.\n */\n/**\n * A collection of Angular pipes that are likely to be used in each and every application.\n */\nconst 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// 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 * @publicApi\n */\nclass CommonModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: CommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: CommonModule, imports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe], exports: [NgClass, NgComponentOutlet, NgForOf, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgPlural, NgPluralCase, AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, TitleCasePipe, CurrencyPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, KeyValuePipe] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: CommonModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: CommonModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [COMMON_DIRECTIVES, COMMON_PIPES],\n                    exports: [COMMON_DIRECTIVES, COMMON_PIPES],\n                }]\n        }] });\n\nconst PLATFORM_BROWSER_ID = 'browser';\nconst PLATFORM_SERVER_ID = 'server';\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/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('19.0.5');\n\n/**\n * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.\n *\n * @publicApi\n */\nclass ViewportScroller {\n    // De-sugared tree-shakable injection\n    // See #23917\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: ViewportScroller,\n        providedIn: 'root',\n        factory: () => isPlatformBrowser(inject(PLATFORM_ID))\n            ? new BrowserViewportScroller(inject(DOCUMENT), window)\n            : new NullViewportScroller(),\n    });\n}\n/**\n * Manages the scroll position for a browser window.\n */\nclass BrowserViewportScroller {\n    document;\n    window;\n    offset = () => [0, 0];\n    constructor(document, window) {\n        this.document = document;\n        this.window = window;\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    setOffset(offset) {\n        if (Array.isArray(offset)) {\n            this.offset = () => 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    getScrollPosition() {\n        return [this.window.scrollX, this.window.scrollY];\n    }\n    /**\n     * Sets the scroll position.\n     * @param position The new position in screen coordinates.\n     */\n    scrollToPosition(position) {\n        this.window.scrollTo(position[0], position[1]);\n    }\n    /**\n     * Scrolls to an element and attempts to focus the element.\n     *\n     * Note that the function name here is misleading in that the target string may be an ID for a\n     * non-anchor element.\n     *\n     * @param target The ID of an element or name of the anchor.\n     *\n     * @see https://html.spec.whatwg.org/#the-indicated-part-of-the-document\n     * @see https://html.spec.whatwg.org/#scroll-to-fragid\n     */\n    scrollToAnchor(target) {\n        const elSelected = findAnchorFromDocument(this.document, target);\n        if (elSelected) {\n            this.scrollToElement(elSelected);\n            // After scrolling to the element, the spec dictates that we follow the focus steps for the\n            // target. Rather than following the robust steps, simply attempt focus.\n            //\n            // @see https://html.spec.whatwg.org/#get-the-focusable-area\n            // @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus\n            // @see https://html.spec.whatwg.org/#focusable-area\n            elSelected.focus();\n        }\n    }\n    /**\n     * Disables automatic scroll restoration provided by the browser.\n     */\n    setHistoryScrollRestoration(scrollRestoration) {\n        this.window.history.scrollRestoration = scrollRestoration;\n    }\n    /**\n     * Scrolls to an element using the native offset and the specified offset set on this scroller.\n     *\n     * The offset can be used when we know that there is a floating header and scrolling naively to an\n     * element (ex: `scrollIntoView`) leaves the element hidden behind the floating header.\n     */\n    scrollToElement(el) {\n        const rect = el.getBoundingClientRect();\n        const left = rect.left + this.window.pageXOffset;\n        const top = rect.top + this.window.pageYOffset;\n        const offset = this.offset();\n        this.window.scrollTo(left - offset[0], top - offset[1]);\n    }\n}\nfunction findAnchorFromDocument(document, target) {\n    const documentResult = document.getElementById(target) || document.getElementsByName(target)[0];\n    if (documentResult) {\n        return documentResult;\n    }\n    // `getElementById` and `getElementsByName` won't pierce through the shadow DOM so we\n    // have to traverse the DOM manually and do the lookup through the shadow roots.\n    if (typeof document.createTreeWalker === 'function' &&\n        document.body &&\n        typeof document.body.attachShadow === 'function') {\n        const treeWalker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);\n        let currentNode = treeWalker.currentNode;\n        while (currentNode) {\n            const shadowRoot = currentNode.shadowRoot;\n            if (shadowRoot) {\n                // Note that `ShadowRoot` doesn't support `getElementsByName`\n                // so we have to fall back to `querySelector`.\n                const result = shadowRoot.getElementById(target) || shadowRoot.querySelector(`[name=\"${target}\"]`);\n                if (result) {\n                    return result;\n                }\n            }\n            currentNode = treeWalker.nextNode();\n        }\n    }\n    return null;\n}\n/**\n * Provides an empty implementation of the viewport scroller.\n */\nclass NullViewportScroller {\n    /**\n     * Empty implementation\n     */\n    setOffset(offset) { }\n    /**\n     * Empty implementation\n     */\n    getScrollPosition() {\n        return [0, 0];\n    }\n    /**\n     * Empty implementation\n     */\n    scrollToPosition(position) { }\n    /**\n     * Empty implementation\n     */\n    scrollToAnchor(anchor) { }\n    /**\n     * Empty implementation\n     */\n    setHistoryScrollRestoration(scrollRestoration) { }\n}\n\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n * @publicApi\n */\nclass XhrFactory {\n}\n\n/**\n * Value (out of 100) of the requested quality for placeholder images.\n */\nconst PLACEHOLDER_QUALITY = '20';\n\n// Converts a string that represents a URL into a URL class instance.\nfunction getUrl(src, win) {\n    // Don't use a base URL is the URL is absolute.\n    return isAbsoluteUrl(src) ? new URL(src) : new URL(src, win.location.href);\n}\n// Checks whether a URL is absolute (i.e. starts with `http://` or `https://`).\nfunction isAbsoluteUrl(src) {\n    return /^https?:\\/\\//.test(src);\n}\n// Given a URL, extract the hostname part.\n// If a URL is a relative one - the URL is returned as is.\nfunction extractHostname(url) {\n    return isAbsoluteUrl(url) ? new URL(url).hostname : url;\n}\nfunction isValidPath(path) {\n    const isString = typeof path === 'string';\n    if (!isString || path.trim() === '') {\n        return false;\n    }\n    // Calling new URL() will throw if the path string is malformed\n    try {\n        const url = new URL(path);\n        return true;\n    }\n    catch {\n        return false;\n    }\n}\nfunction normalizePath(path) {\n    return path.endsWith('/') ? path.slice(0, -1) : path;\n}\nfunction normalizeSrc(src) {\n    return src.startsWith('/') ? src.slice(1) : src;\n}\n\n/**\n * Noop image loader that does no transformation to the original src and just returns it as is.\n * This loader is used as a default one if more specific logic is not provided in an app config.\n *\n * @see {@link ImageLoader}\n * @see {@link NgOptimizedImage}\n */\nconst noopImageLoader = (config) => config.src;\n/**\n * Injection token that configures the image loader function.\n *\n * @see {@link ImageLoader}\n * @see {@link NgOptimizedImage}\n * @publicApi\n */\nconst IMAGE_LOADER = new InjectionToken(ngDevMode ? 'ImageLoader' : '', {\n    providedIn: 'root',\n    factory: () => noopImageLoader,\n});\n/**\n * Internal helper function that makes it easier to introduce custom image loaders for the\n * `NgOptimizedImage` directive. It is enough to specify a URL builder function to obtain full DI\n * configuration for a given loader: a DI token corresponding to the actual loader function, plus DI\n * tokens managing preconnect check functionality.\n * @param buildUrlFn a function returning a full URL based on loader's configuration\n * @param exampleUrls example of full URLs for a given loader (used in error messages)\n * @returns a set of DI providers corresponding to the configured image loader\n */\nfunction createImageLoader(buildUrlFn, exampleUrls) {\n    return function provideImageLoader(path) {\n        if (!isValidPath(path)) {\n            throwInvalidPathError(path, exampleUrls || []);\n        }\n        // The trailing / is stripped (if provided) to make URL construction (concatenation) easier in\n        // the individual loader functions.\n        path = normalizePath(path);\n        const loaderFn = (config) => {\n            if (isAbsoluteUrl(config.src)) {\n                // Image loader functions expect an image file name (e.g. `my-image.png`)\n                // or a relative path + a file name (e.g. `/a/b/c/my-image.png`) as an input,\n                // so the final absolute URL can be constructed.\n                // When an absolute URL is provided instead - the loader can not\n                // build a final URL, thus the error is thrown to indicate that.\n                throwUnexpectedAbsoluteUrlError(path, config.src);\n            }\n            return buildUrlFn(path, { ...config, src: normalizeSrc(config.src) });\n        };\n        const providers = [{ provide: IMAGE_LOADER, useValue: loaderFn }];\n        return providers;\n    };\n}\nfunction throwInvalidPathError(path, exampleUrls) {\n    throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&\n        `Image loader has detected an invalid path (\\`${path}\\`). ` +\n            `To fix this, supply a path using one of the following formats: ${exampleUrls.join(' or ')}`);\n}\nfunction throwUnexpectedAbsoluteUrlError(path, url) {\n    throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&\n        `Image loader has detected a \\`<img>\\` tag with an invalid \\`ngSrc\\` attribute: ${url}. ` +\n            `This image loader expects \\`ngSrc\\` to be a relative URL - ` +\n            `however the provided value is an absolute URL. ` +\n            `To fix this, provide \\`ngSrc\\` as a path relative to the base URL ` +\n            `configured for this loader (\\`${path}\\`).`);\n}\n\n/**\n * Function that generates an ImageLoader for [Cloudflare Image\n * Resizing](https://developers.cloudflare.com/images/image-resizing/) and turns it into an Angular\n * provider. Note: Cloudflare has multiple image products - this provider is specifically for\n * Cloudflare Image Resizing; it will not work with Cloudflare Images or Cloudflare Polish.\n *\n * @param path Your domain name, e.g. https://mysite.com\n * @returns Provider that provides an ImageLoader function\n *\n * @publicApi\n */\nconst provideCloudflareLoader = createImageLoader(createCloudflareUrl, ngDevMode ? ['https://<ZONE>/cdn-cgi/image/<OPTIONS>/<SOURCE-IMAGE>'] : undefined);\nfunction createCloudflareUrl(path, config) {\n    let params = `format=auto`;\n    if (config.width) {\n        params += `,width=${config.width}`;\n    }\n    // When requesting a placeholder image we ask for a low quality image to reduce the load time.\n    if (config.isPlaceholder) {\n        params += `,quality=${PLACEHOLDER_QUALITY}`;\n    }\n    // Cloudflare image URLs format:\n    // https://developers.cloudflare.com/images/image-resizing/url-format/\n    return `${path}/cdn-cgi/image/${params}/${config.src}`;\n}\n\n/**\n * Name and URL tester for Cloudinary.\n */\nconst cloudinaryLoaderInfo = {\n    name: 'Cloudinary',\n    testUrl: isCloudinaryUrl,\n};\nconst CLOUDINARY_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.cloudinary\\.com\\/.+/;\n/**\n * Tests whether a URL is from Cloudinary CDN.\n */\nfunction isCloudinaryUrl(url) {\n    return CLOUDINARY_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for Cloudinary and turns it into an Angular provider.\n *\n * @param path Base URL of your Cloudinary images\n * This URL should match one of the following formats:\n * https://res.cloudinary.com/mysite\n * https://mysite.cloudinary.com\n * https://subdomain.mysite.com\n * @returns Set of providers to configure the Cloudinary loader.\n *\n * @publicApi\n */\nconst provideCloudinaryLoader = createImageLoader(createCloudinaryUrl, ngDevMode\n    ? [\n        'https://res.cloudinary.com/mysite',\n        'https://mysite.cloudinary.com',\n        'https://subdomain.mysite.com',\n    ]\n    : undefined);\nfunction createCloudinaryUrl(path, config) {\n    // Cloudinary image URLformat:\n    // https://cloudinary.com/documentation/image_transformations#transformation_url_structure\n    // Example of a Cloudinary image URL:\n    // https://res.cloudinary.com/mysite/image/upload/c_scale,f_auto,q_auto,w_600/marketing/tile-topics-m.png\n    // For a placeholder image, we use the lowest image setting available to reduce the load time\n    // else we use the auto size\n    const quality = config.isPlaceholder ? 'q_auto:low' : 'q_auto';\n    let params = `f_auto,${quality}`;\n    if (config.width) {\n        params += `,w_${config.width}`;\n    }\n    if (config.loaderParams?.['rounded']) {\n        params += `,r_max`;\n    }\n    return `${path}/image/upload/${params}/${config.src}`;\n}\n\n/**\n * Name and URL tester for ImageKit.\n */\nconst imageKitLoaderInfo = {\n    name: 'ImageKit',\n    testUrl: isImageKitUrl,\n};\nconst IMAGE_KIT_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.imagekit\\.io\\/.+/;\n/**\n * Tests whether a URL is from ImageKit CDN.\n */\nfunction isImageKitUrl(url) {\n    return IMAGE_KIT_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for ImageKit and turns it into an Angular provider.\n *\n * @param path Base URL of your ImageKit images\n * This URL should match one of the following formats:\n * https://ik.imagekit.io/myaccount\n * https://subdomain.mysite.com\n * @returns Set of providers to configure the ImageKit loader.\n *\n * @publicApi\n */\nconst provideImageKitLoader = createImageLoader(createImagekitUrl, ngDevMode ? ['https://ik.imagekit.io/mysite', 'https://subdomain.mysite.com'] : undefined);\nfunction createImagekitUrl(path, config) {\n    // Example of an ImageKit image URL:\n    // https://ik.imagekit.io/demo/tr:w-300,h-300/medium_cafe_B1iTdD0C.jpg\n    const { src, width } = config;\n    const params = [];\n    if (width) {\n        params.push(`w-${width}`);\n    }\n    // When requesting a placeholder image we ask for a low quality image to reduce the load time.\n    if (config.isPlaceholder) {\n        params.push(`q-${PLACEHOLDER_QUALITY}`);\n    }\n    const urlSegments = params.length ? [path, `tr:${params.join(',')}`, src] : [path, src];\n    const url = new URL(urlSegments.join('/'));\n    return url.href;\n}\n\n/**\n * Name and URL tester for Imgix.\n */\nconst imgixLoaderInfo = {\n    name: 'Imgix',\n    testUrl: isImgixUrl,\n};\nconst IMGIX_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.imgix\\.net\\/.+/;\n/**\n * Tests whether a URL is from Imgix CDN.\n */\nfunction isImgixUrl(url) {\n    return IMGIX_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for Imgix and turns it into an Angular provider.\n *\n * @param path path to the desired Imgix origin,\n * e.g. https://somepath.imgix.net or https://images.mysite.com\n * @returns Set of providers to configure the Imgix loader.\n *\n * @publicApi\n */\nconst provideImgixLoader = createImageLoader(createImgixUrl, ngDevMode ? ['https://somepath.imgix.net/'] : undefined);\nfunction createImgixUrl(path, config) {\n    const url = new URL(`${path}/${config.src}`);\n    // This setting ensures the smallest allowable format is set.\n    url.searchParams.set('auto', 'format');\n    if (config.width) {\n        url.searchParams.set('w', config.width.toString());\n    }\n    // When requesting a placeholder image we ask a low quality image to reduce the load time.\n    if (config.isPlaceholder) {\n        url.searchParams.set('q', PLACEHOLDER_QUALITY);\n    }\n    return url.href;\n}\n\n/**\n * Name and URL tester for Netlify.\n */\nconst netlifyLoaderInfo = {\n    name: 'Netlify',\n    testUrl: isNetlifyUrl,\n};\nconst NETLIFY_LOADER_REGEX = /https?\\:\\/\\/[^\\/]+\\.netlify\\.app\\/.+/;\n/**\n * Tests whether a URL is from a Netlify site. This won't catch sites with a custom domain,\n * but it's a good start for sites in development. This is only used to warn users who haven't\n * configured an image loader.\n */\nfunction isNetlifyUrl(url) {\n    return NETLIFY_LOADER_REGEX.test(url);\n}\n/**\n * Function that generates an ImageLoader for Netlify and turns it into an Angular provider.\n *\n * @param path optional URL of the desired Netlify site. Defaults to the current site.\n * @returns Set of providers to configure the Netlify loader.\n *\n * @publicApi\n */\nfunction provideNetlifyLoader(path) {\n    if (path && !isValidPath(path)) {\n        throw new ɵRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, ngDevMode &&\n            `Image loader has detected an invalid path (\\`${path}\\`). ` +\n                `To fix this, supply either the full URL to the Netlify site, or leave it empty to use the current site.`);\n    }\n    if (path) {\n        const url = new URL(path);\n        path = url.origin;\n    }\n    const loaderFn = (config) => {\n        return createNetlifyUrl(config, path);\n    };\n    const providers = [{ provide: IMAGE_LOADER, useValue: loaderFn }];\n    return providers;\n}\nconst validParams = new Map([\n    ['height', 'h'],\n    ['fit', 'fit'],\n    ['quality', 'q'],\n    ['q', 'q'],\n    ['position', 'position'],\n]);\nfunction createNetlifyUrl(config, path) {\n    // Note: `path` can be undefined, in which case we use a fake one to construct a `URL` instance.\n    const url = new URL(path ?? 'https://a/');\n    url.pathname = '/.netlify/images';\n    if (!isAbsoluteUrl(config.src) && !config.src.startsWith('/')) {\n        config.src = '/' + config.src;\n    }\n    url.searchParams.set('url', config.src);\n    if (config.width) {\n        url.searchParams.set('w', config.width.toString());\n    }\n    // When requesting a placeholder image we ask for a low quality image to reduce the load time.\n    // If the quality is specified in the loader config - always use provided value.\n    const configQuality = config.loaderParams?.['quality'] ?? config.loaderParams?.['q'];\n    if (config.isPlaceholder && !configQuality) {\n        url.searchParams.set('q', PLACEHOLDER_QUALITY);\n    }\n    for (const [param, value] of Object.entries(config.loaderParams ?? {})) {\n        if (validParams.has(param)) {\n            url.searchParams.set(validParams.get(param), value.toString());\n        }\n        else {\n            if (ngDevMode) {\n                console.warn(ɵformatRuntimeError(2959 /* RuntimeErrorCode.INVALID_LOADER_ARGUMENTS */, `The Netlify image loader has detected an \\`<img>\\` tag with the unsupported attribute \"\\`${param}\\`\".`));\n            }\n        }\n    }\n    // The \"a\" hostname is used for relative URLs, so we can remove it from the final URL.\n    return url.hostname === 'a' ? url.href.replace(url.origin, '') : url.href;\n}\n\n// Assembles directive details string, useful for error messages.\nfunction imgDirectiveDetails(ngSrc, includeNgSrc = true) {\n    const ngSrcInfo = includeNgSrc\n        ? `(activated on an <img> element with the \\`ngSrc=\"${ngSrc}\"\\`) `\n        : '';\n    return `The NgOptimizedImage directive ${ngSrcInfo}has detected that`;\n}\n\n/**\n * Asserts that the application is in development mode. Throws an error if the application is in\n * production mode. This assert can be used to make sure that there is no dev-mode code invoked in\n * the prod mode accidentally.\n */\nfunction assertDevMode(checkName) {\n    if (!ngDevMode) {\n        throw new ɵRuntimeError(2958 /* RuntimeErrorCode.UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE */, `Unexpected invocation of the ${checkName} in the prod mode. ` +\n            `Please make sure that the prod mode is enabled for production builds.`);\n    }\n}\n\n/**\n * Observer that detects whether an image with `NgOptimizedImage`\n * is treated as a Largest Contentful Paint (LCP) element. If so,\n * asserts that the image has the `priority` attribute.\n *\n * Note: this is a dev-mode only class and it does not appear in prod bundles,\n * thus there is no `ngDevMode` use in the code.\n *\n * Based on https://web.dev/lcp/#measure-lcp-in-javascript.\n */\nclass LCPImageObserver {\n    // Map of full image URLs -> original `ngSrc` values.\n    images = new Map();\n    window = null;\n    observer = null;\n    constructor() {\n        const isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n        assertDevMode('LCP checker');\n        const win = inject(DOCUMENT).defaultView;\n        if (isBrowser && typeof PerformanceObserver !== 'undefined') {\n            this.window = win;\n            this.observer = this.initPerformanceObserver();\n        }\n    }\n    /**\n     * Inits PerformanceObserver and subscribes to LCP events.\n     * Based on https://web.dev/lcp/#measure-lcp-in-javascript\n     */\n    initPerformanceObserver() {\n        const observer = new PerformanceObserver((entryList) => {\n            const entries = entryList.getEntries();\n            if (entries.length === 0)\n                return;\n            // We use the latest entry produced by the `PerformanceObserver` as the best\n            // signal on which element is actually an LCP one. As an example, the first image to load on\n            // a page, by virtue of being the only thing on the page so far, is often a LCP candidate\n            // and gets reported by PerformanceObserver, but isn't necessarily the LCP element.\n            const lcpElement = entries[entries.length - 1];\n            // Cast to `any` due to missing `element` on the `LargestContentfulPaint` type of entry.\n            // See https://developer.mozilla.org/en-US/docs/Web/API/LargestContentfulPaint\n            const imgSrc = lcpElement.element?.src ?? '';\n            // Exclude `data:` and `blob:` URLs, since they are not supported by the directive.\n            if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:'))\n                return;\n            const img = this.images.get(imgSrc);\n            if (!img)\n                return;\n            if (!img.priority && !img.alreadyWarnedPriority) {\n                img.alreadyWarnedPriority = true;\n                logMissingPriorityError(imgSrc);\n            }\n            if (img.modified && !img.alreadyWarnedModified) {\n                img.alreadyWarnedModified = true;\n                logModifiedWarning(imgSrc);\n            }\n        });\n        observer.observe({ type: 'largest-contentful-paint', buffered: true });\n        return observer;\n    }\n    registerImage(rewrittenSrc, originalNgSrc, isPriority) {\n        if (!this.observer)\n            return;\n        const newObservedImageState = {\n            priority: isPriority,\n            modified: false,\n            alreadyWarnedModified: false,\n            alreadyWarnedPriority: false,\n        };\n        this.images.set(getUrl(rewrittenSrc, this.window).href, newObservedImageState);\n    }\n    unregisterImage(rewrittenSrc) {\n        if (!this.observer)\n            return;\n        this.images.delete(getUrl(rewrittenSrc, this.window).href);\n    }\n    updateImage(originalSrc, newSrc) {\n        if (!this.observer)\n            return;\n        const originalUrl = getUrl(originalSrc, this.window).href;\n        const img = this.images.get(originalUrl);\n        if (img) {\n            img.modified = true;\n            this.images.set(getUrl(newSrc, this.window).href, img);\n            this.images.delete(originalUrl);\n        }\n    }\n    ngOnDestroy() {\n        if (!this.observer)\n            return;\n        this.observer.disconnect();\n        this.images.clear();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: LCPImageObserver, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\nfunction logMissingPriorityError(ngSrc) {\n    const directiveDetails = imgDirectiveDetails(ngSrc);\n    console.error(ɵformatRuntimeError(2955 /* RuntimeErrorCode.LCP_IMG_MISSING_PRIORITY */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` +\n        `element but was not marked \"priority\". This image should be marked ` +\n        `\"priority\" in order to prioritize its loading. ` +\n        `To fix this, add the \"priority\" attribute.`));\n}\nfunction logModifiedWarning(ngSrc) {\n    const directiveDetails = imgDirectiveDetails(ngSrc);\n    console.warn(ɵformatRuntimeError(2964 /* RuntimeErrorCode.LCP_IMG_NGSRC_MODIFIED */, `${directiveDetails} this image is the Largest Contentful Paint (LCP) ` +\n        `element and has had its \"ngSrc\" attribute modified. This can cause ` +\n        `slower loading performance. It is recommended not to modify the \"ngSrc\" ` +\n        `property on any image which could be the LCP element.`));\n}\n\n// Set of origins that are always excluded from the preconnect checks.\nconst INTERNAL_PRECONNECT_CHECK_BLOCKLIST = new Set(['localhost', '127.0.0.1', '0.0.0.0']);\n/**\n * Injection token to configure which origins should be excluded\n * from the preconnect checks. It can either be a single string or an array of strings\n * to represent a group of origins, for example:\n *\n * ```ts\n *  {provide: PRECONNECT_CHECK_BLOCKLIST, useValue: 'https://your-domain.com'}\n * ```\n *\n * or:\n *\n * ```ts\n *  {provide: PRECONNECT_CHECK_BLOCKLIST,\n *   useValue: ['https://your-domain-1.com', 'https://your-domain-2.com']}\n * ```\n *\n * @publicApi\n */\nconst PRECONNECT_CHECK_BLOCKLIST = new InjectionToken(ngDevMode ? 'PRECONNECT_CHECK_BLOCKLIST' : '');\n/**\n * Contains the logic to detect whether an image, marked with the \"priority\" attribute\n * has a corresponding `<link rel=\"preconnect\">` tag in the `document.head`.\n *\n * Note: this is a dev-mode only class, which should not appear in prod bundles,\n * thus there is no `ngDevMode` use in the code.\n */\nclass PreconnectLinkChecker {\n    document = inject(DOCUMENT);\n    isServer = isPlatformServer(inject(PLATFORM_ID));\n    /**\n     * Set of <link rel=\"preconnect\"> tags found on this page.\n     * The `null` value indicates that there was no DOM query operation performed.\n     */\n    preconnectLinks = null;\n    /*\n     * Keep track of all already seen origin URLs to avoid repeating the same check.\n     */\n    alreadySeen = new Set();\n    window = null;\n    blocklist = new Set(INTERNAL_PRECONNECT_CHECK_BLOCKLIST);\n    constructor() {\n        assertDevMode('preconnect link checker');\n        const win = this.document.defaultView;\n        if (typeof win !== 'undefined') {\n            this.window = win;\n        }\n        const blocklist = inject(PRECONNECT_CHECK_BLOCKLIST, { optional: true });\n        if (blocklist) {\n            this.populateBlocklist(blocklist);\n        }\n    }\n    populateBlocklist(origins) {\n        if (Array.isArray(origins)) {\n            deepForEach(origins, (origin) => {\n                this.blocklist.add(extractHostname(origin));\n            });\n        }\n        else {\n            this.blocklist.add(extractHostname(origins));\n        }\n    }\n    /**\n     * Checks that a preconnect resource hint exists in the head for the\n     * given src.\n     *\n     * @param rewrittenSrc src formatted with loader\n     * @param originalNgSrc ngSrc value\n     */\n    assertPreconnect(rewrittenSrc, originalNgSrc) {\n        if (this.isServer)\n            return;\n        const imgUrl = getUrl(rewrittenSrc, this.window);\n        if (this.blocklist.has(imgUrl.hostname) || this.alreadySeen.has(imgUrl.origin))\n            return;\n        // Register this origin as seen, so we don't check it again later.\n        this.alreadySeen.add(imgUrl.origin);\n        // Note: we query for preconnect links only *once* and cache the results\n        // for the entire lifespan of an application, since it's unlikely that the\n        // list would change frequently. This allows to make sure there are no\n        // performance implications of making extra DOM lookups for each image.\n        this.preconnectLinks ??= this.queryPreconnectLinks();\n        if (!this.preconnectLinks.has(imgUrl.origin)) {\n            console.warn(ɵformatRuntimeError(2956 /* RuntimeErrorCode.PRIORITY_IMG_MISSING_PRECONNECT_TAG */, `${imgDirectiveDetails(originalNgSrc)} there is no preconnect tag present for this ` +\n                `image. Preconnecting to the origin(s) that serve priority images ensures that these ` +\n                `images are delivered as soon as possible. To fix this, please add the following ` +\n                `element into the <head> of the document:\\n` +\n                `  <link rel=\"preconnect\" href=\"${imgUrl.origin}\">`));\n        }\n    }\n    queryPreconnectLinks() {\n        const preconnectUrls = new Set();\n        const selector = 'link[rel=preconnect]';\n        const links = Array.from(this.document.querySelectorAll(selector));\n        for (let link of links) {\n            const url = getUrl(link.href, this.window);\n            preconnectUrls.add(url.origin);\n        }\n        return preconnectUrls;\n    }\n    ngOnDestroy() {\n        this.preconnectLinks?.clear();\n        this.alreadySeen.clear();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PreconnectLinkChecker, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n/**\n * Invokes a callback for each element in the array. Also invokes a callback\n * recursively for each nested array.\n */\nfunction deepForEach(input, fn) {\n    for (let value of input) {\n        Array.isArray(value) ? deepForEach(value, fn) : fn(value);\n    }\n}\n\n/**\n * In SSR scenarios, a preload `<link>` element is generated for priority images.\n * Having a large number of preload tags may negatively affect the performance,\n * so we warn developers (by throwing an error) if the number of preloaded images\n * is above a certain threshold. This const specifies this threshold.\n */\nconst DEFAULT_PRELOADED_IMAGES_LIMIT = 5;\n/**\n * Helps to keep track of priority images that already have a corresponding\n * preload tag (to avoid generating multiple preload tags with the same URL).\n *\n * This Set tracks the original src passed into the `ngSrc` input not the src after it has been\n * run through the specified `IMAGE_LOADER`.\n */\nconst PRELOADED_IMAGES = new InjectionToken('NG_OPTIMIZED_PRELOADED_IMAGES', {\n    providedIn: 'root',\n    factory: () => new Set(),\n});\n\n/**\n * @description Contains the logic needed to track and add preload link tags to the `<head>` tag. It\n * will also track what images have already had preload link tags added so as to not duplicate link\n * tags.\n *\n * In dev mode this service will validate that the number of preloaded images does not exceed the\n * configured default preloaded images limit: {@link DEFAULT_PRELOADED_IMAGES_LIMIT}.\n */\nclass PreloadLinkCreator {\n    preloadedImages = inject(PRELOADED_IMAGES);\n    document = inject(DOCUMENT);\n    /**\n     * @description Add a preload `<link>` to the `<head>` of the `index.html` that is served from the\n     * server while using Angular Universal and SSR to kick off image loads for high priority images.\n     *\n     * The `sizes` (passed in from the user) and `srcset` (parsed and formatted from `ngSrcset`)\n     * properties used to set the corresponding attributes, `imagesizes` and `imagesrcset`\n     * respectively, on the preload `<link>` tag so that the correctly sized image is preloaded from\n     * the CDN.\n     *\n     * {@link https://web.dev/preload-responsive-images/#imagesrcset-and-imagesizes}\n     *\n     * @param renderer The `Renderer2` passed in from the directive\n     * @param src The original src of the image that is set on the `ngSrc` input.\n     * @param srcset The parsed and formatted srcset created from the `ngSrcset` input\n     * @param sizes The value of the `sizes` attribute passed in to the `<img>` tag\n     */\n    createPreloadLinkTag(renderer, src, srcset, sizes) {\n        if (ngDevMode) {\n            if (this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {\n                throw new ɵRuntimeError(2961 /* RuntimeErrorCode.TOO_MANY_PRELOADED_IMAGES */, ngDevMode &&\n                    `The \\`NgOptimizedImage\\` directive has detected that more than ` +\n                        `${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` +\n                        `This might negatively affect an overall performance of the page. ` +\n                        `To fix this, remove the \"priority\" attribute from images with less priority.`);\n            }\n        }\n        if (this.preloadedImages.has(src)) {\n            return;\n        }\n        this.preloadedImages.add(src);\n        const preload = renderer.createElement('link');\n        renderer.setAttribute(preload, 'as', 'image');\n        renderer.setAttribute(preload, 'href', src);\n        renderer.setAttribute(preload, 'rel', 'preload');\n        renderer.setAttribute(preload, 'fetchpriority', 'high');\n        if (sizes) {\n            renderer.setAttribute(preload, 'imageSizes', sizes);\n        }\n        if (srcset) {\n            renderer.setAttribute(preload, 'imageSrcset', srcset);\n        }\n        renderer.appendChild(this.document.head, preload);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PreloadLinkCreator, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n\n/**\n * When a Base64-encoded image is passed as an input to the `NgOptimizedImage` directive,\n * an error is thrown. The image content (as a string) might be very long, thus making\n * it hard to read an error message if the entire string is included. This const defines\n * the number of characters that should be included into the error message. The rest\n * of the content is truncated.\n */\nconst BASE64_IMG_MAX_LENGTH_IN_ERROR = 50;\n/**\n * RegExpr to determine whether a src in a srcset is using width descriptors.\n * Should match something like: \"100w, 200w\".\n */\nconst VALID_WIDTH_DESCRIPTOR_SRCSET = /^((\\s*\\d+w\\s*(,|$)){1,})$/;\n/**\n * RegExpr to determine whether a src in a srcset is using density descriptors.\n * Should match something like: \"1x, 2x, 50x\". Also supports decimals like \"1.5x, 1.50x\".\n */\nconst VALID_DENSITY_DESCRIPTOR_SRCSET = /^((\\s*\\d+(\\.\\d+)?x\\s*(,|$)){1,})$/;\n/**\n * Srcset values with a density descriptor higher than this value will actively\n * throw an error. Such densities are not permitted as they cause image sizes\n * to be unreasonably large and slow down LCP.\n */\nconst ABSOLUTE_SRCSET_DENSITY_CAP = 3;\n/**\n * Used only in error message text to communicate best practices, as we will\n * only throw based on the slightly more conservative ABSOLUTE_SRCSET_DENSITY_CAP.\n */\nconst RECOMMENDED_SRCSET_DENSITY_CAP = 2;\n/**\n * Used in generating automatic density-based srcsets\n */\nconst DENSITY_SRCSET_MULTIPLIERS = [1, 2];\n/**\n * Used to determine which breakpoints to use on full-width images\n */\nconst VIEWPORT_BREAKPOINT_CUTOFF = 640;\n/**\n * Used to determine whether two aspect ratios are similar in value.\n */\nconst ASPECT_RATIO_TOLERANCE = 0.1;\n/**\n * Used to determine whether the image has been requested at an overly\n * large size compared to the actual rendered image size (after taking\n * into account a typical device pixel ratio). In pixels.\n */\nconst OVERSIZED_IMAGE_TOLERANCE = 1000;\n/**\n * Used to limit automatic srcset generation of very large sources for\n * fixed-size images. In pixels.\n */\nconst FIXED_SRCSET_WIDTH_LIMIT = 1920;\nconst FIXED_SRCSET_HEIGHT_LIMIT = 1080;\n/**\n * Default blur radius of the CSS filter used on placeholder images, in pixels\n */\nconst PLACEHOLDER_BLUR_AMOUNT = 15;\n/**\n * Placeholder dimension (height or width) limit in pixels. Angular produces a warning\n * when this limit is crossed.\n */\nconst PLACEHOLDER_DIMENSION_LIMIT = 1000;\n/**\n * Used to warn or error when the user provides an overly large dataURL for the placeholder\n * attribute.\n * Character count of Base64 images is 1 character per byte, and base64 encoding is approximately\n * 33% larger than base images, so 4000 characters is around 3KB on disk and 10000 characters is\n * around 7.7KB. Experimentally, 4000 characters is about 20x20px in PNG or medium-quality JPEG\n * format, and 10,000 is around 50x50px, but there's quite a bit of variation depending on how the\n * image is saved.\n */\nconst DATA_URL_WARN_LIMIT = 4000;\nconst DATA_URL_ERROR_LIMIT = 10000;\n/** Info about built-in loaders we can test for. */\nconst BUILT_IN_LOADERS = [\n    imgixLoaderInfo,\n    imageKitLoaderInfo,\n    cloudinaryLoaderInfo,\n    netlifyLoaderInfo,\n];\n/**\n * Threshold for the PRIORITY_TRUE_COUNT\n */\nconst PRIORITY_COUNT_THRESHOLD = 10;\n/**\n * This count is used to log a devMode warning\n * when the count of directive instances with priority=true\n * exceeds the threshold PRIORITY_COUNT_THRESHOLD\n */\nlet IMGS_WITH_PRIORITY_ATTR_COUNT = 0;\n/**\n * This function is for testing purpose.\n */\nfunction resetImagePriorityCount() {\n    IMGS_WITH_PRIORITY_ATTR_COUNT = 0;\n}\n/**\n * Directive that improves image loading performance by enforcing best practices.\n *\n * `NgOptimizedImage` ensures that the loading of the Largest Contentful Paint (LCP) image is\n * prioritized by:\n * - Automatically setting the `fetchpriority` attribute on the `<img>` tag\n * - Lazy loading non-priority images by default\n * - Automatically generating a preconnect link tag in the document head\n *\n * In addition, the directive:\n * - Generates appropriate asset URLs if a corresponding `ImageLoader` function is provided\n * - Automatically generates a srcset\n * - Requires that `width` and `height` are set\n * - Warns if `width` or `height` have been set incorrectly\n * - Warns if the image will be visually distorted when rendered\n *\n * @usageNotes\n * The `NgOptimizedImage` directive is marked as [standalone](guide/components/importing) and can\n * be imported directly.\n *\n * Follow the steps below to enable and use the directive:\n * 1. Import it into the necessary NgModule or a standalone Component.\n * 2. Optionally provide an `ImageLoader` if you use an image hosting service.\n * 3. Update the necessary `<img>` tags in templates and replace `src` attributes with `ngSrc`.\n * Using a `ngSrc` allows the directive to control when the `src` gets set, which triggers an image\n * download.\n *\n * Step 1: import the `NgOptimizedImage` directive.\n *\n * ```ts\n * import { NgOptimizedImage } from '@angular/common';\n *\n * // Include it into the necessary NgModule\n * @NgModule({\n *   imports: [NgOptimizedImage],\n * })\n * class AppModule {}\n *\n * // ... or a standalone Component\n * @Component({\n *   imports: [NgOptimizedImage],\n * })\n * class MyStandaloneComponent {}\n * ```\n *\n * Step 2: configure a loader.\n *\n * To use the **default loader**: no additional code changes are necessary. The URL returned by the\n * generic loader will always match the value of \"src\". In other words, this loader applies no\n * transformations to the resource URL and the value of the `ngSrc` attribute will be used as is.\n *\n * To use an existing loader for a **third-party image service**: add the provider factory for your\n * chosen service to the `providers` array. In the example below, the Imgix loader is used:\n *\n * ```ts\n * import {provideImgixLoader} from '@angular/common';\n *\n * // Call the function and add the result to the `providers` array:\n * providers: [\n *   provideImgixLoader(\"https://my.base.url/\"),\n * ],\n * ```\n *\n * The `NgOptimizedImage` directive provides the following functions:\n * - `provideCloudflareLoader`\n * - `provideCloudinaryLoader`\n * - `provideImageKitLoader`\n * - `provideImgixLoader`\n *\n * If you use a different image provider, you can create a custom loader function as described\n * below.\n *\n * To use a **custom loader**: provide your loader function as a value for the `IMAGE_LOADER` DI\n * token.\n *\n * ```ts\n * import {IMAGE_LOADER, ImageLoaderConfig} from '@angular/common';\n *\n * // Configure the loader using the `IMAGE_LOADER` token.\n * providers: [\n *   {\n *      provide: IMAGE_LOADER,\n *      useValue: (config: ImageLoaderConfig) => {\n *        return `https://example.com/${config.src}-${config.width}.jpg`;\n *      }\n *   },\n * ],\n * ```\n *\n * Step 3: update `<img>` tags in templates to use `ngSrc` instead of `src`.\n *\n * ```html\n * <img ngSrc=\"logo.png\" width=\"200\" height=\"100\">\n * ```\n *\n * @publicApi\n */\nclass NgOptimizedImage {\n    imageLoader = inject(IMAGE_LOADER);\n    config = processConfig(inject(ɵIMAGE_CONFIG));\n    renderer = inject(Renderer2);\n    imgElement = inject(ElementRef).nativeElement;\n    injector = inject(Injector);\n    isServer = isPlatformServer(inject(PLATFORM_ID));\n    preloadLinkCreator = inject(PreloadLinkCreator);\n    // a LCP image observer - should be injected only in the dev mode\n    lcpObserver = ngDevMode ? this.injector.get(LCPImageObserver) : null;\n    /**\n     * Calculate the rewritten `src` once and store it.\n     * This is needed to avoid repetitive calculations and make sure the directive cleanup in the\n     * `ngOnDestroy` does not rely on the `IMAGE_LOADER` logic (which in turn can rely on some other\n     * instance that might be already destroyed).\n     */\n    _renderedSrc = null;\n    /**\n     * Name of the source image.\n     * Image name will be processed by the image loader and the final URL will be applied as the `src`\n     * property of the image.\n     */\n    ngSrc;\n    /**\n     * A comma separated list of width or density descriptors.\n     * The image name will be taken from `ngSrc` and combined with the list of width or density\n     * descriptors to generate the final `srcset` property of the image.\n     *\n     * Example:\n     * ```\n     * <img ngSrc=\"hello.jpg\" ngSrcset=\"100w, 200w\" />  =>\n     * <img src=\"path/hello.jpg\" srcset=\"path/hello.jpg?w=100 100w, path/hello.jpg?w=200 200w\" />\n     * ```\n     */\n    ngSrcset;\n    /**\n     * The base `sizes` attribute passed through to the `<img>` element.\n     * Providing sizes causes the image to create an automatic responsive srcset.\n     */\n    sizes;\n    /**\n     * For responsive images: the intrinsic width of the image in pixels.\n     * For fixed size images: the desired rendered width of the image in pixels.\n     */\n    width;\n    /**\n     * For responsive images: the intrinsic height of the image in pixels.\n     * For fixed size images: the desired rendered height of the image in pixels.\n     */\n    height;\n    /**\n     * The desired loading behavior (lazy, eager, or auto). Defaults to `lazy`,\n     * which is recommended for most images.\n     *\n     * Warning: Setting images as loading=\"eager\" or loading=\"auto\" marks them\n     * as non-priority images and can hurt loading performance. For images which\n     * may be the LCP element, use the `priority` attribute instead of `loading`.\n     */\n    loading;\n    /**\n     * Indicates whether this image should have a high priority.\n     */\n    priority = false;\n    /**\n     * Data to pass through to custom loaders.\n     */\n    loaderParams;\n    /**\n     * Disables automatic srcset generation for this image.\n     */\n    disableOptimizedSrcset = false;\n    /**\n     * Sets the image to \"fill mode\", which eliminates the height/width requirement and adds\n     * styles such that the image fills its containing element.\n     */\n    fill = false;\n    /**\n     * A URL or data URL for an image to be used as a placeholder while this image loads.\n     */\n    placeholder;\n    /**\n     * Configuration object for placeholder settings. Options:\n     *   * blur: Setting this to false disables the automatic CSS blur.\n     */\n    placeholderConfig;\n    /**\n     * Value of the `src` attribute if set on the host `<img>` element.\n     * This input is exclusively read to assert that `src` is not set in conflict\n     * with `ngSrc` and that images don't start to load until a lazy loading strategy is set.\n     * @internal\n     */\n    src;\n    /**\n     * Value of the `srcset` attribute if set on the host `<img>` element.\n     * This input is exclusively read to assert that `srcset` is not set in conflict\n     * with `ngSrcset` and that images don't start to load until a lazy loading strategy is set.\n     * @internal\n     */\n    srcset;\n    /** @nodoc */\n    ngOnInit() {\n        ɵperformanceMarkFeature('NgOptimizedImage');\n        if (ngDevMode) {\n            const ngZone = this.injector.get(NgZone);\n            assertNonEmptyInput(this, 'ngSrc', this.ngSrc);\n            assertValidNgSrcset(this, this.ngSrcset);\n            assertNoConflictingSrc(this);\n            if (this.ngSrcset) {\n                assertNoConflictingSrcset(this);\n            }\n            assertNotBase64Image(this);\n            assertNotBlobUrl(this);\n            if (this.fill) {\n                assertEmptyWidthAndHeight(this);\n                // This leaves the Angular zone to avoid triggering unnecessary change detection cycles when\n                // `load` tasks are invoked on images.\n                ngZone.runOutsideAngular(() => assertNonZeroRenderedHeight(this, this.imgElement, this.renderer));\n            }\n            else {\n                assertNonEmptyWidthAndHeight(this);\n                if (this.height !== undefined) {\n                    assertGreaterThanZero(this, this.height, 'height');\n                }\n                if (this.width !== undefined) {\n                    assertGreaterThanZero(this, this.width, 'width');\n                }\n                // Only check for distorted images when not in fill mode, where\n                // images may be intentionally stretched, cropped or letterboxed.\n                ngZone.runOutsideAngular(() => assertNoImageDistortion(this, this.imgElement, this.renderer));\n            }\n            assertValidLoadingInput(this);\n            if (!this.ngSrcset) {\n                assertNoComplexSizes(this);\n            }\n            assertValidPlaceholder(this, this.imageLoader);\n            assertNotMissingBuiltInLoader(this.ngSrc, this.imageLoader);\n            assertNoNgSrcsetWithoutLoader(this, this.imageLoader);\n            assertNoLoaderParamsWithoutLoader(this, this.imageLoader);\n            if (this.lcpObserver !== null) {\n                const ngZone = this.injector.get(NgZone);\n                ngZone.runOutsideAngular(() => {\n                    this.lcpObserver.registerImage(this.getRewrittenSrc(), this.ngSrc, this.priority);\n                });\n            }\n            if (this.priority) {\n                const checker = this.injector.get(PreconnectLinkChecker);\n                checker.assertPreconnect(this.getRewrittenSrc(), this.ngSrc);\n                if (!this.isServer) {\n                    const applicationRef = this.injector.get(ApplicationRef);\n                    assetPriorityCountBelowThreshold(applicationRef);\n                }\n            }\n        }\n        if (this.placeholder) {\n            this.removePlaceholderOnLoad(this.imgElement);\n        }\n        this.setHostAttributes();\n    }\n    setHostAttributes() {\n        // Must set width/height explicitly in case they are bound (in which case they will\n        // only be reflected and not found by the browser)\n        if (this.fill) {\n            this.sizes ||= '100vw';\n        }\n        else {\n            this.setHostAttribute('width', this.width.toString());\n            this.setHostAttribute('height', this.height.toString());\n        }\n        this.setHostAttribute('loading', this.getLoadingBehavior());\n        this.setHostAttribute('fetchpriority', this.getFetchPriority());\n        // The `data-ng-img` attribute flags an image as using the directive, to allow\n        // for analysis of the directive's performance.\n        this.setHostAttribute('ng-img', 'true');\n        // The `src` and `srcset` attributes should be set last since other attributes\n        // could affect the image's loading behavior.\n        const rewrittenSrcset = this.updateSrcAndSrcset();\n        if (this.sizes) {\n            if (this.getLoadingBehavior() === 'lazy') {\n                this.setHostAttribute('sizes', 'auto, ' + this.sizes);\n            }\n            else {\n                this.setHostAttribute('sizes', this.sizes);\n            }\n        }\n        else {\n            if (this.ngSrcset &&\n                VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset) &&\n                this.getLoadingBehavior() === 'lazy') {\n                this.setHostAttribute('sizes', 'auto, 100vw');\n            }\n        }\n        if (this.isServer && this.priority) {\n            this.preloadLinkCreator.createPreloadLinkTag(this.renderer, this.getRewrittenSrc(), rewrittenSrcset, this.sizes);\n        }\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        if (ngDevMode) {\n            assertNoPostInitInputChange(this, changes, [\n                'ngSrcset',\n                'width',\n                'height',\n                'priority',\n                'fill',\n                'loading',\n                'sizes',\n                'loaderParams',\n                'disableOptimizedSrcset',\n            ]);\n        }\n        if (changes['ngSrc'] && !changes['ngSrc'].isFirstChange()) {\n            const oldSrc = this._renderedSrc;\n            this.updateSrcAndSrcset(true);\n            const newSrc = this._renderedSrc;\n            if (this.lcpObserver !== null && oldSrc && newSrc && oldSrc !== newSrc) {\n                const ngZone = this.injector.get(NgZone);\n                ngZone.runOutsideAngular(() => {\n                    this.lcpObserver?.updateImage(oldSrc, newSrc);\n                });\n            }\n        }\n        if (ngDevMode && changes['placeholder']?.currentValue && !this.isServer) {\n            assertPlaceholderDimensions(this, this.imgElement);\n        }\n    }\n    callImageLoader(configWithoutCustomParams) {\n        let augmentedConfig = configWithoutCustomParams;\n        if (this.loaderParams) {\n            augmentedConfig.loaderParams = this.loaderParams;\n        }\n        return this.imageLoader(augmentedConfig);\n    }\n    getLoadingBehavior() {\n        if (!this.priority && this.loading !== undefined) {\n            return this.loading;\n        }\n        return this.priority ? 'eager' : 'lazy';\n    }\n    getFetchPriority() {\n        return this.priority ? 'high' : 'auto';\n    }\n    getRewrittenSrc() {\n        // ImageLoaderConfig supports setting a width property. However, we're not setting width here\n        // because if the developer uses rendered width instead of intrinsic width in the HTML width\n        // attribute, the image requested may be too small for 2x+ screens.\n        if (!this._renderedSrc) {\n            const imgConfig = { src: this.ngSrc };\n            // Cache calculated image src to reuse it later in the code.\n            this._renderedSrc = this.callImageLoader(imgConfig);\n        }\n        return this._renderedSrc;\n    }\n    getRewrittenSrcset() {\n        const widthSrcSet = VALID_WIDTH_DESCRIPTOR_SRCSET.test(this.ngSrcset);\n        const finalSrcs = this.ngSrcset\n            .split(',')\n            .filter((src) => src !== '')\n            .map((srcStr) => {\n            srcStr = srcStr.trim();\n            const width = widthSrcSet ? parseFloat(srcStr) : parseFloat(srcStr) * this.width;\n            return `${this.callImageLoader({ src: this.ngSrc, width })} ${srcStr}`;\n        });\n        return finalSrcs.join(', ');\n    }\n    getAutomaticSrcset() {\n        if (this.sizes) {\n            return this.getResponsiveSrcset();\n        }\n        else {\n            return this.getFixedSrcset();\n        }\n    }\n    getResponsiveSrcset() {\n        const { breakpoints } = this.config;\n        let filteredBreakpoints = breakpoints;\n        if (this.sizes?.trim() === '100vw') {\n            // Since this is a full-screen-width image, our srcset only needs to include\n            // breakpoints with full viewport widths.\n            filteredBreakpoints = breakpoints.filter((bp) => bp >= VIEWPORT_BREAKPOINT_CUTOFF);\n        }\n        const finalSrcs = filteredBreakpoints.map((bp) => `${this.callImageLoader({ src: this.ngSrc, width: bp })} ${bp}w`);\n        return finalSrcs.join(', ');\n    }\n    updateSrcAndSrcset(forceSrcRecalc = false) {\n        if (forceSrcRecalc) {\n            // Reset cached value, so that the followup `getRewrittenSrc()` call\n            // will recalculate it and update the cache.\n            this._renderedSrc = null;\n        }\n        const rewrittenSrc = this.getRewrittenSrc();\n        this.setHostAttribute('src', rewrittenSrc);\n        let rewrittenSrcset = undefined;\n        if (this.ngSrcset) {\n            rewrittenSrcset = this.getRewrittenSrcset();\n        }\n        else if (this.shouldGenerateAutomaticSrcset()) {\n            rewrittenSrcset = this.getAutomaticSrcset();\n        }\n        if (rewrittenSrcset) {\n            this.setHostAttribute('srcset', rewrittenSrcset);\n        }\n        return rewrittenSrcset;\n    }\n    getFixedSrcset() {\n        const finalSrcs = DENSITY_SRCSET_MULTIPLIERS.map((multiplier) => `${this.callImageLoader({\n            src: this.ngSrc,\n            width: this.width * multiplier,\n        })} ${multiplier}x`);\n        return finalSrcs.join(', ');\n    }\n    shouldGenerateAutomaticSrcset() {\n        let oversizedImage = false;\n        if (!this.sizes) {\n            oversizedImage =\n                this.width > FIXED_SRCSET_WIDTH_LIMIT || this.height > FIXED_SRCSET_HEIGHT_LIMIT;\n        }\n        return (!this.disableOptimizedSrcset &&\n            !this.srcset &&\n            this.imageLoader !== noopImageLoader &&\n            !oversizedImage);\n    }\n    /**\n     * Returns an image url formatted for use with the CSS background-image property. Expects one of:\n     * * A base64 encoded image, which is wrapped and passed through.\n     * * A boolean. If true, calls the image loader to generate a small placeholder url.\n     */\n    generatePlaceholder(placeholderInput) {\n        const { placeholderResolution } = this.config;\n        if (placeholderInput === true) {\n            return `url(${this.callImageLoader({\n                src: this.ngSrc,\n                width: placeholderResolution,\n                isPlaceholder: true,\n            })})`;\n        }\n        else if (typeof placeholderInput === 'string') {\n            return `url(${placeholderInput})`;\n        }\n        return null;\n    }\n    /**\n     * Determines if blur should be applied, based on an optional boolean\n     * property `blur` within the optional configuration object `placeholderConfig`.\n     */\n    shouldBlurPlaceholder(placeholderConfig) {\n        if (!placeholderConfig || !placeholderConfig.hasOwnProperty('blur')) {\n            return true;\n        }\n        return Boolean(placeholderConfig.blur);\n    }\n    removePlaceholderOnLoad(img) {\n        const callback = () => {\n            const changeDetectorRef = this.injector.get(ChangeDetectorRef);\n            removeLoadListenerFn();\n            removeErrorListenerFn();\n            this.placeholder = false;\n            changeDetectorRef.markForCheck();\n        };\n        const removeLoadListenerFn = this.renderer.listen(img, 'load', callback);\n        const removeErrorListenerFn = this.renderer.listen(img, 'error', callback);\n        callOnLoadIfImageIsLoaded(img, callback);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (ngDevMode) {\n            if (!this.priority && this._renderedSrc !== null && this.lcpObserver !== null) {\n                this.lcpObserver.unregisterImage(this._renderedSrc);\n            }\n        }\n    }\n    setHostAttribute(name, value) {\n        this.renderer.setAttribute(this.imgElement, name, value);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.5\", type: NgOptimizedImage, isStandalone: true, selector: \"img[ngSrc]\", inputs: { ngSrc: [\"ngSrc\", \"ngSrc\", unwrapSafeUrl], ngSrcset: \"ngSrcset\", sizes: \"sizes\", width: [\"width\", \"width\", numberAttribute], height: [\"height\", \"height\", numberAttribute], loading: \"loading\", priority: [\"priority\", \"priority\", booleanAttribute], loaderParams: \"loaderParams\", disableOptimizedSrcset: [\"disableOptimizedSrcset\", \"disableOptimizedSrcset\", booleanAttribute], fill: [\"fill\", \"fill\", booleanAttribute], placeholder: [\"placeholder\", \"placeholder\", booleanOrUrlAttribute], placeholderConfig: \"placeholderConfig\", src: \"src\", srcset: \"srcset\" }, host: { properties: { \"style.position\": \"fill ? \\\"absolute\\\" : null\", \"style.width\": \"fill ? \\\"100%\\\" : null\", \"style.height\": \"fill ? \\\"100%\\\" : null\", \"style.inset\": \"fill ? \\\"0\\\" : null\", \"style.background-size\": \"placeholder ? \\\"cover\\\" : null\", \"style.background-position\": \"placeholder ? \\\"50% 50%\\\" : null\", \"style.background-repeat\": \"placeholder ? \\\"no-repeat\\\" : null\", \"style.background-image\": \"placeholder ? generatePlaceholder(placeholder) : null\", \"style.filter\": \"placeholder && shouldBlurPlaceholder(placeholderConfig) ? \\\"blur(15px)\\\" : null\" } }, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgOptimizedImage, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'img[ngSrc]',\n                    host: {\n                        '[style.position]': 'fill ? \"absolute\" : null',\n                        '[style.width]': 'fill ? \"100%\" : null',\n                        '[style.height]': 'fill ? \"100%\" : null',\n                        '[style.inset]': 'fill ? \"0\" : null',\n                        '[style.background-size]': 'placeholder ? \"cover\" : null',\n                        '[style.background-position]': 'placeholder ? \"50% 50%\" : null',\n                        '[style.background-repeat]': 'placeholder ? \"no-repeat\" : null',\n                        '[style.background-image]': 'placeholder ? generatePlaceholder(placeholder) : null',\n                        '[style.filter]': `placeholder && shouldBlurPlaceholder(placeholderConfig) ? \"blur(${PLACEHOLDER_BLUR_AMOUNT}px)\" : null`,\n                    },\n                }]\n        }], propDecorators: { ngSrc: [{\n                type: Input,\n                args: [{ required: true, transform: unwrapSafeUrl }]\n            }], ngSrcset: [{\n                type: Input\n            }], sizes: [{\n                type: Input\n            }], width: [{\n                type: Input,\n                args: [{ transform: numberAttribute }]\n            }], height: [{\n                type: Input,\n                args: [{ transform: numberAttribute }]\n            }], loading: [{\n                type: Input\n            }], priority: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], loaderParams: [{\n                type: Input\n            }], disableOptimizedSrcset: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], fill: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], placeholder: [{\n                type: Input,\n                args: [{ transform: booleanOrUrlAttribute }]\n            }], placeholderConfig: [{\n                type: Input\n            }], src: [{\n                type: Input\n            }], srcset: [{\n                type: Input\n            }] } });\n/***** Helpers *****/\n/**\n * Sorts provided config breakpoints and uses defaults.\n */\nfunction processConfig(config) {\n    let sortedBreakpoints = {};\n    if (config.breakpoints) {\n        sortedBreakpoints.breakpoints = config.breakpoints.sort((a, b) => a - b);\n    }\n    return Object.assign({}, ɵIMAGE_CONFIG_DEFAULTS, config, sortedBreakpoints);\n}\n/***** Assert functions *****/\n/**\n * Verifies that there is no `src` set on a host element.\n */\nfunction assertNoConflictingSrc(dir) {\n    if (dir.src) {\n        throw new ɵRuntimeError(2950 /* RuntimeErrorCode.UNEXPECTED_SRC_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \\`src\\` and \\`ngSrc\\` have been set. ` +\n            `Supplying both of these attributes breaks lazy loading. ` +\n            `The NgOptimizedImage directive sets \\`src\\` itself based on the value of \\`ngSrc\\`. ` +\n            `To fix this, please remove the \\`src\\` attribute.`);\n    }\n}\n/**\n * Verifies that there is no `srcset` set on a host element.\n */\nfunction assertNoConflictingSrcset(dir) {\n    if (dir.srcset) {\n        throw new ɵRuntimeError(2951 /* RuntimeErrorCode.UNEXPECTED_SRCSET_ATTR */, `${imgDirectiveDetails(dir.ngSrc)} both \\`srcset\\` and \\`ngSrcset\\` have been set. ` +\n            `Supplying both of these attributes breaks lazy loading. ` +\n            `The NgOptimizedImage directive sets \\`srcset\\` itself based on the value of ` +\n            `\\`ngSrcset\\`. To fix this, please remove the \\`srcset\\` attribute.`);\n    }\n}\n/**\n * Verifies that the `ngSrc` is not a Base64-encoded image.\n */\nfunction assertNotBase64Image(dir) {\n    let ngSrc = dir.ngSrc.trim();\n    if (ngSrc.startsWith('data:')) {\n        if (ngSrc.length > BASE64_IMG_MAX_LENGTH_IN_ERROR) {\n            ngSrc = ngSrc.substring(0, BASE64_IMG_MAX_LENGTH_IN_ERROR) + '...';\n        }\n        throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \\`ngSrc\\` is a Base64-encoded string ` +\n            `(${ngSrc}). NgOptimizedImage does not support Base64-encoded strings. ` +\n            `To fix this, disable the NgOptimizedImage directive for this element ` +\n            `by removing \\`ngSrc\\` and using a standard \\`src\\` attribute instead.`);\n    }\n}\n/**\n * Verifies that the 'sizes' only includes responsive values.\n */\nfunction assertNoComplexSizes(dir) {\n    let sizes = dir.sizes;\n    if (sizes?.match(/((\\)|,)\\s|^)\\d+px/)) {\n        throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \\`sizes\\` was set to a string including ` +\n            `pixel values. For automatic \\`srcset\\` generation, \\`sizes\\` must only include responsive ` +\n            `values, such as \\`sizes=\"50vw\"\\` or \\`sizes=\"(min-width: 768px) 50vw, 100vw\"\\`. ` +\n            `To fix this, modify the \\`sizes\\` attribute, or provide your own \\`ngSrcset\\` value directly.`);\n    }\n}\nfunction assertValidPlaceholder(dir, imageLoader) {\n    assertNoPlaceholderConfigWithoutPlaceholder(dir);\n    assertNoRelativePlaceholderWithoutLoader(dir, imageLoader);\n    assertNoOversizedDataUrl(dir);\n}\n/**\n * Verifies that placeholderConfig isn't being used without placeholder\n */\nfunction assertNoPlaceholderConfigWithoutPlaceholder(dir) {\n    if (dir.placeholderConfig && !dir.placeholder) {\n        throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc, false)} \\`placeholderConfig\\` options were provided for an ` +\n            `image that does not use the \\`placeholder\\` attribute, and will have no effect.`);\n    }\n}\n/**\n * Warns if a relative URL placeholder is specified, but no loader is present to provide the small\n * image.\n */\nfunction assertNoRelativePlaceholderWithoutLoader(dir, imageLoader) {\n    if (dir.placeholder === true && imageLoader === noopImageLoader) {\n        throw new ɵRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \\`placeholder\\` attribute is set to true but ` +\n            `no image loader is configured (i.e. the default one is being used), ` +\n            `which would result in the same image being used for the primary image and its placeholder. ` +\n            `To fix this, provide a loader or remove the \\`placeholder\\` attribute from the image.`);\n    }\n}\n/**\n * Warns or throws an error if an oversized dataURL placeholder is provided.\n */\nfunction assertNoOversizedDataUrl(dir) {\n    if (dir.placeholder &&\n        typeof dir.placeholder === 'string' &&\n        dir.placeholder.startsWith('data:')) {\n        if (dir.placeholder.length > DATA_URL_ERROR_LIMIT) {\n            throw new ɵRuntimeError(2965 /* RuntimeErrorCode.OVERSIZED_PLACEHOLDER */, `${imgDirectiveDetails(dir.ngSrc)} the \\`placeholder\\` attribute is set to a data URL which is longer ` +\n                `than ${DATA_URL_ERROR_LIMIT} characters. This is strongly discouraged, as large inline placeholders ` +\n                `directly increase the bundle size of Angular and hurt page load performance. To fix this, generate ` +\n                `a smaller data URL placeholder.`);\n        }\n        if (dir.placeholder.length > DATA_URL_WARN_LIMIT) {\n            console.warn(ɵformatRuntimeError(2965 /* RuntimeErrorCode.OVERSIZED_PLACEHOLDER */, `${imgDirectiveDetails(dir.ngSrc)} the \\`placeholder\\` attribute is set to a data URL which is longer ` +\n                `than ${DATA_URL_WARN_LIMIT} characters. This is discouraged, as large inline placeholders ` +\n                `directly increase the bundle size of Angular and hurt page load performance. For better loading performance, ` +\n                `generate a smaller data URL placeholder.`));\n        }\n    }\n}\n/**\n * Verifies that the `ngSrc` is not a Blob URL.\n */\nfunction assertNotBlobUrl(dir) {\n    const ngSrc = dir.ngSrc.trim();\n    if (ngSrc.startsWith('blob:')) {\n        throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`ngSrc\\` was set to a blob URL (${ngSrc}). ` +\n            `Blob URLs are not supported by the NgOptimizedImage directive. ` +\n            `To fix this, disable the NgOptimizedImage directive for this element ` +\n            `by removing \\`ngSrc\\` and using a regular \\`src\\` attribute instead.`);\n    }\n}\n/**\n * Verifies that the input is set to a non-empty string.\n */\nfunction assertNonEmptyInput(dir, name, value) {\n    const isString = typeof value === 'string';\n    const isEmptyString = isString && value.trim() === '';\n    if (!isString || isEmptyString) {\n        throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`${name}\\` has an invalid value ` +\n            `(\\`${value}\\`). To fix this, change the value to a non-empty string.`);\n    }\n}\n/**\n * Verifies that the `ngSrcset` is in a valid format, e.g. \"100w, 200w\" or \"1x, 2x\".\n */\nfunction assertValidNgSrcset(dir, value) {\n    if (value == null)\n        return;\n    assertNonEmptyInput(dir, 'ngSrcset', value);\n    const stringVal = value;\n    const isValidWidthDescriptor = VALID_WIDTH_DESCRIPTOR_SRCSET.test(stringVal);\n    const isValidDensityDescriptor = VALID_DENSITY_DESCRIPTOR_SRCSET.test(stringVal);\n    if (isValidDensityDescriptor) {\n        assertUnderDensityCap(dir, stringVal);\n    }\n    const isValidSrcset = isValidWidthDescriptor || isValidDensityDescriptor;\n    if (!isValidSrcset) {\n        throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`ngSrcset\\` has an invalid value (\\`${value}\\`). ` +\n            `To fix this, supply \\`ngSrcset\\` using a comma-separated list of one or more width ` +\n            `descriptors (e.g. \"100w, 200w\") or density descriptors (e.g. \"1x, 2x\").`);\n    }\n}\nfunction assertUnderDensityCap(dir, value) {\n    const underDensityCap = value\n        .split(',')\n        .every((num) => num === '' || parseFloat(num) <= ABSOLUTE_SRCSET_DENSITY_CAP);\n    if (!underDensityCap) {\n        throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`ngSrcset\\` contains an unsupported image density:` +\n            `\\`${value}\\`. NgOptimizedImage generally recommends a max image density of ` +\n            `${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` +\n            `${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` +\n            `greater than ${RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for ` +\n            `most use cases. Images that will be pinch-zoomed are typically the primary use case for ` +\n            `${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`);\n    }\n}\n/**\n * Creates a `RuntimeError` instance to represent a situation when an input is set after\n * the directive has initialized.\n */\nfunction postInitInputChangeError(dir, inputName) {\n    let reason;\n    if (inputName === 'width' || inputName === 'height') {\n        reason =\n            `Changing \\`${inputName}\\` may result in different attribute value ` +\n                `applied to the underlying image element and cause layout shifts on a page.`;\n    }\n    else {\n        reason =\n            `Changing the \\`${inputName}\\` would have no effect on the underlying ` +\n                `image element, because the resource loading has already occurred.`;\n    }\n    return new ɵRuntimeError(2953 /* RuntimeErrorCode.UNEXPECTED_INPUT_CHANGE */, `${imgDirectiveDetails(dir.ngSrc)} \\`${inputName}\\` was updated after initialization. ` +\n        `The NgOptimizedImage directive will not react to this input change. ${reason} ` +\n        `To fix this, either switch \\`${inputName}\\` to a static value ` +\n        `or wrap the image element in an @if that is gated on the necessary value.`);\n}\n/**\n * Verify that none of the listed inputs has changed.\n */\nfunction assertNoPostInitInputChange(dir, changes, inputs) {\n    inputs.forEach((input) => {\n        const isUpdated = changes.hasOwnProperty(input);\n        if (isUpdated && !changes[input].isFirstChange()) {\n            if (input === 'ngSrc') {\n                // When the `ngSrc` input changes, we detect that only in the\n                // `ngOnChanges` hook, thus the `ngSrc` is already set. We use\n                // `ngSrc` in the error message, so we use a previous value, but\n                // not the updated one in it.\n                dir = { ngSrc: changes[input].previousValue };\n            }\n            throw postInitInputChangeError(dir, input);\n        }\n    });\n}\n/**\n * Verifies that a specified input is a number greater than 0.\n */\nfunction assertGreaterThanZero(dir, inputValue, inputName) {\n    const validNumber = typeof inputValue === 'number' && inputValue > 0;\n    const validString = typeof inputValue === 'string' && /^\\d+$/.test(inputValue.trim()) && parseInt(inputValue) > 0;\n    if (!validNumber && !validString) {\n        throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} \\`${inputName}\\` has an invalid value. ` +\n            `To fix this, provide \\`${inputName}\\` as a number greater than 0.`);\n    }\n}\n/**\n * Verifies that the rendered image is not visually distorted. Effectively this is checking:\n * - Whether the \"width\" and \"height\" attributes reflect the actual dimensions of the image.\n * - Whether image styling is \"correct\" (see below for a longer explanation).\n */\nfunction assertNoImageDistortion(dir, img, renderer) {\n    const callback = () => {\n        removeLoadListenerFn();\n        removeErrorListenerFn();\n        const computedStyle = window.getComputedStyle(img);\n        let renderedWidth = parseFloat(computedStyle.getPropertyValue('width'));\n        let renderedHeight = parseFloat(computedStyle.getPropertyValue('height'));\n        const boxSizing = computedStyle.getPropertyValue('box-sizing');\n        if (boxSizing === 'border-box') {\n            const paddingTop = computedStyle.getPropertyValue('padding-top');\n            const paddingRight = computedStyle.getPropertyValue('padding-right');\n            const paddingBottom = computedStyle.getPropertyValue('padding-bottom');\n            const paddingLeft = computedStyle.getPropertyValue('padding-left');\n            renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft);\n            renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom);\n        }\n        const renderedAspectRatio = renderedWidth / renderedHeight;\n        const nonZeroRenderedDimensions = renderedWidth !== 0 && renderedHeight !== 0;\n        const intrinsicWidth = img.naturalWidth;\n        const intrinsicHeight = img.naturalHeight;\n        const intrinsicAspectRatio = intrinsicWidth / intrinsicHeight;\n        const suppliedWidth = dir.width;\n        const suppliedHeight = dir.height;\n        const suppliedAspectRatio = suppliedWidth / suppliedHeight;\n        // Tolerance is used to account for the impact of subpixel rendering.\n        // Due to subpixel rendering, the rendered, intrinsic, and supplied\n        // aspect ratios of a correctly configured image may not exactly match.\n        // For example, a `width=4030 height=3020` image might have a rendered\n        // size of \"1062w, 796.48h\". (An aspect ratio of 1.334... vs. 1.333...)\n        const inaccurateDimensions = Math.abs(suppliedAspectRatio - intrinsicAspectRatio) > ASPECT_RATIO_TOLERANCE;\n        const stylingDistortion = nonZeroRenderedDimensions &&\n            Math.abs(intrinsicAspectRatio - renderedAspectRatio) > ASPECT_RATIO_TOLERANCE;\n        if (inaccurateDimensions) {\n            console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the image does not match ` +\n                `the aspect ratio indicated by the width and height attributes. ` +\n                `\\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +\n                `(aspect-ratio: ${round(intrinsicAspectRatio)}). \\nSupplied width and height attributes: ` +\n                `${suppliedWidth}w x ${suppliedHeight}h (aspect-ratio: ${round(suppliedAspectRatio)}). ` +\n                `\\nTo fix this, update the width and height attributes.`));\n        }\n        else if (stylingDistortion) {\n            console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the aspect ratio of the rendered image ` +\n                `does not match the image's intrinsic aspect ratio. ` +\n                `\\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +\n                `(aspect-ratio: ${round(intrinsicAspectRatio)}). \\nRendered image size: ` +\n                `${renderedWidth}w x ${renderedHeight}h (aspect-ratio: ` +\n                `${round(renderedAspectRatio)}). \\nThis issue can occur if \"width\" and \"height\" ` +\n                `attributes are added to an image without updating the corresponding ` +\n                `image styling. To fix this, adjust image styling. In most cases, ` +\n                `adding \"height: auto\" or \"width: auto\" to the image styling will fix ` +\n                `this issue.`));\n        }\n        else if (!dir.ngSrcset && nonZeroRenderedDimensions) {\n            // If `ngSrcset` hasn't been set, sanity check the intrinsic size.\n            const recommendedWidth = RECOMMENDED_SRCSET_DENSITY_CAP * renderedWidth;\n            const recommendedHeight = RECOMMENDED_SRCSET_DENSITY_CAP * renderedHeight;\n            const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;\n            const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;\n            if (oversizedWidth || oversizedHeight) {\n                console.warn(ɵformatRuntimeError(2960 /* RuntimeErrorCode.OVERSIZED_IMAGE */, `${imgDirectiveDetails(dir.ngSrc)} the intrinsic image is significantly ` +\n                    `larger than necessary. ` +\n                    `\\nRendered image size: ${renderedWidth}w x ${renderedHeight}h. ` +\n                    `\\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` +\n                    `\\nRecommended intrinsic image size: ${recommendedWidth}w x ${recommendedHeight}h. ` +\n                    `\\nNote: Recommended intrinsic image size is calculated assuming a maximum DPR of ` +\n                    `${RECOMMENDED_SRCSET_DENSITY_CAP}. To improve loading time, resize the image ` +\n                    `or consider using the \"ngSrcset\" and \"sizes\" attributes.`));\n            }\n        }\n    };\n    const removeLoadListenerFn = renderer.listen(img, 'load', callback);\n    // We only listen to the `error` event to remove the `load` event listener because it will not be\n    // fired if the image fails to load. This is done to prevent memory leaks in development mode\n    // because image elements aren't garbage-collected properly. It happens because zone.js stores the\n    // event listener directly on the element and closures capture `dir`.\n    const removeErrorListenerFn = renderer.listen(img, 'error', () => {\n        removeLoadListenerFn();\n        removeErrorListenerFn();\n    });\n    callOnLoadIfImageIsLoaded(img, callback);\n}\n/**\n * Verifies that a specified input is set.\n */\nfunction assertNonEmptyWidthAndHeight(dir) {\n    let missingAttributes = [];\n    if (dir.width === undefined)\n        missingAttributes.push('width');\n    if (dir.height === undefined)\n        missingAttributes.push('height');\n    if (missingAttributes.length > 0) {\n        throw new ɵRuntimeError(2954 /* RuntimeErrorCode.REQUIRED_INPUT_MISSING */, `${imgDirectiveDetails(dir.ngSrc)} these required attributes ` +\n            `are missing: ${missingAttributes.map((attr) => `\"${attr}\"`).join(', ')}. ` +\n            `Including \"width\" and \"height\" attributes will prevent image-related layout shifts. ` +\n            `To fix this, include \"width\" and \"height\" attributes on the image tag or turn on ` +\n            `\"fill\" mode with the \\`fill\\` attribute.`);\n    }\n}\n/**\n * Verifies that width and height are not set. Used in fill mode, where those attributes don't make\n * sense.\n */\nfunction assertEmptyWidthAndHeight(dir) {\n    if (dir.width || dir.height) {\n        throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the attributes \\`height\\` and/or \\`width\\` are present ` +\n            `along with the \\`fill\\` attribute. Because \\`fill\\` mode causes an image to fill its containing ` +\n            `element, the size attributes have no effect and should be removed.`);\n    }\n}\n/**\n * Verifies that the rendered image has a nonzero height. If the image is in fill mode, provides\n * guidance that this can be caused by the containing element's CSS position property.\n */\nfunction assertNonZeroRenderedHeight(dir, img, renderer) {\n    const callback = () => {\n        removeLoadListenerFn();\n        removeErrorListenerFn();\n        const renderedHeight = img.clientHeight;\n        if (dir.fill && renderedHeight === 0) {\n            console.warn(ɵformatRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the height of the fill-mode image is zero. ` +\n                `This is likely because the containing element does not have the CSS 'position' ` +\n                `property set to one of the following: \"relative\", \"fixed\", or \"absolute\". ` +\n                `To fix this problem, make sure the container element has the CSS 'position' ` +\n                `property defined and the height of the element is not zero.`));\n        }\n    };\n    const removeLoadListenerFn = renderer.listen(img, 'load', callback);\n    // See comments in the `assertNoImageDistortion`.\n    const removeErrorListenerFn = renderer.listen(img, 'error', () => {\n        removeLoadListenerFn();\n        removeErrorListenerFn();\n    });\n    callOnLoadIfImageIsLoaded(img, callback);\n}\n/**\n * Verifies that the `loading` attribute is set to a valid input &\n * is not used on priority images.\n */\nfunction assertValidLoadingInput(dir) {\n    if (dir.loading && dir.priority) {\n        throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`loading\\` attribute ` +\n            `was used on an image that was marked \"priority\". ` +\n            `Setting \\`loading\\` on priority images is not allowed ` +\n            `because these images will always be eagerly loaded. ` +\n            `To fix this, remove the “loading” attribute from the priority image.`);\n    }\n    const validInputs = ['auto', 'eager', 'lazy'];\n    if (typeof dir.loading === 'string' && !validInputs.includes(dir.loading)) {\n        throw new ɵRuntimeError(2952 /* RuntimeErrorCode.INVALID_INPUT */, `${imgDirectiveDetails(dir.ngSrc)} the \\`loading\\` attribute ` +\n            `has an invalid value (\\`${dir.loading}\\`). ` +\n            `To fix this, provide a valid value (\"lazy\", \"eager\", or \"auto\").`);\n    }\n}\n/**\n * Warns if NOT using a loader (falling back to the generic loader) and\n * the image appears to be hosted on one of the image CDNs for which\n * we do have a built-in image loader. Suggests switching to the\n * built-in loader.\n *\n * @param ngSrc Value of the ngSrc attribute\n * @param imageLoader ImageLoader provided\n */\nfunction assertNotMissingBuiltInLoader(ngSrc, imageLoader) {\n    if (imageLoader === noopImageLoader) {\n        let builtInLoaderName = '';\n        for (const loader of BUILT_IN_LOADERS) {\n            if (loader.testUrl(ngSrc)) {\n                builtInLoaderName = loader.name;\n                break;\n            }\n        }\n        if (builtInLoaderName) {\n            console.warn(ɵformatRuntimeError(2962 /* RuntimeErrorCode.MISSING_BUILTIN_LOADER */, `NgOptimizedImage: It looks like your images may be hosted on the ` +\n                `${builtInLoaderName} CDN, but your app is not using Angular's ` +\n                `built-in loader for that CDN. We recommend switching to use ` +\n                `the built-in by calling \\`provide${builtInLoaderName}Loader()\\` ` +\n                `in your \\`providers\\` and passing it your instance's base URL. ` +\n                `If you don't want to use the built-in loader, define a custom ` +\n                `loader function using IMAGE_LOADER to silence this warning.`));\n        }\n    }\n}\n/**\n * Warns if ngSrcset is present and no loader is configured (i.e. the default one is being used).\n */\nfunction assertNoNgSrcsetWithoutLoader(dir, imageLoader) {\n    if (dir.ngSrcset && imageLoader === noopImageLoader) {\n        console.warn(ɵformatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \\`ngSrcset\\` attribute is present but ` +\n            `no image loader is configured (i.e. the default one is being used), ` +\n            `which would result in the same image being used for all configured sizes. ` +\n            `To fix this, provide a loader or remove the \\`ngSrcset\\` attribute from the image.`));\n    }\n}\n/**\n * Warns if loaderParams is present and no loader is configured (i.e. the default one is being\n * used).\n */\nfunction assertNoLoaderParamsWithoutLoader(dir, imageLoader) {\n    if (dir.loaderParams && imageLoader === noopImageLoader) {\n        console.warn(ɵformatRuntimeError(2963 /* RuntimeErrorCode.MISSING_NECESSARY_LOADER */, `${imgDirectiveDetails(dir.ngSrc)} the \\`loaderParams\\` attribute is present but ` +\n            `no image loader is configured (i.e. the default one is being used), ` +\n            `which means that the loaderParams data will not be consumed and will not affect the URL. ` +\n            `To fix this, provide a custom loader or remove the \\`loaderParams\\` attribute from the image.`));\n    }\n}\n/**\n * Warns if the priority attribute is used too often on page load\n */\nasync function assetPriorityCountBelowThreshold(appRef) {\n    if (IMGS_WITH_PRIORITY_ATTR_COUNT === 0) {\n        IMGS_WITH_PRIORITY_ATTR_COUNT++;\n        await appRef.whenStable();\n        if (IMGS_WITH_PRIORITY_ATTR_COUNT > PRIORITY_COUNT_THRESHOLD) {\n            console.warn(ɵformatRuntimeError(2966 /* RuntimeErrorCode.TOO_MANY_PRIORITY_ATTRIBUTES */, `NgOptimizedImage: The \"priority\" attribute is set to true more than ${PRIORITY_COUNT_THRESHOLD} times (${IMGS_WITH_PRIORITY_ATTR_COUNT} times). ` +\n                `Marking too many images as \"high\" priority can hurt your application's LCP (https://web.dev/lcp). ` +\n                `\"Priority\" should only be set on the image expected to be the page's LCP element.`));\n        }\n    }\n    else {\n        IMGS_WITH_PRIORITY_ATTR_COUNT++;\n    }\n}\n/**\n * Warns if placeholder's dimension are over a threshold.\n *\n * This assert function is meant to only run on the browser.\n */\nfunction assertPlaceholderDimensions(dir, imgElement) {\n    const computedStyle = window.getComputedStyle(imgElement);\n    let renderedWidth = parseFloat(computedStyle.getPropertyValue('width'));\n    let renderedHeight = parseFloat(computedStyle.getPropertyValue('height'));\n    if (renderedWidth > PLACEHOLDER_DIMENSION_LIMIT || renderedHeight > PLACEHOLDER_DIMENSION_LIMIT) {\n        console.warn(ɵformatRuntimeError(2967 /* RuntimeErrorCode.PLACEHOLDER_DIMENSION_LIMIT_EXCEEDED */, `${imgDirectiveDetails(dir.ngSrc)} it uses a placeholder image, but at least one ` +\n            `of the dimensions attribute (height or width) exceeds the limit of ${PLACEHOLDER_DIMENSION_LIMIT}px. ` +\n            `To fix this, use a smaller image as a placeholder.`));\n    }\n}\nfunction callOnLoadIfImageIsLoaded(img, callback) {\n    // https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-complete\n    // The spec defines that `complete` is truthy once its request state is fully available.\n    // The image may already be available if it’s loaded from the browser cache.\n    // In that case, the `load` event will not fire at all, meaning that all setup\n    // callbacks listening for the `load` event will not be invoked.\n    // In Safari, there is a known behavior where the `complete` property of an\n    // `HTMLImageElement` may sometimes return `true` even when the image is not fully loaded.\n    // Checking both `img.complete` and `img.naturalWidth` is the most reliable way to\n    // determine if an image has been fully loaded, especially in browsers where the\n    // `complete` property may return `true` prematurely.\n    if (img.complete && img.naturalWidth) {\n        callback();\n    }\n}\nfunction round(input) {\n    return Number.isInteger(input) ? input : input.toFixed(2);\n}\n// Transform function to handle SafeValue input for ngSrc. This doesn't do any sanitization,\n// as that is not needed for img.src and img.srcset. This transform is purely for compatibility.\nfunction unwrapSafeUrl(value) {\n    if (typeof value === 'string') {\n        return value;\n    }\n    return ɵunwrapSafeValue(value);\n}\n// Transform function to handle inputs which may be booleans, strings, or string representations\n// of boolean values. Used for the placeholder attribute.\nfunction booleanOrUrlAttribute(value) {\n    if (typeof value === 'string' && value !== 'true' && value !== 'false' && value !== '') {\n        return value;\n    }\n    return booleanAttribute(value);\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { APP_BASE_HREF, AsyncPipe, BrowserPlatformLocation, CommonModule, CurrencyPipe, DATE_PIPE_DEFAULT_OPTIONS, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, DatePipe, DecimalPipe, FormStyle, FormatWidth, HashLocationStrategy, I18nPluralPipe, I18nSelectPipe, IMAGE_LOADER, JsonPipe, KeyValuePipe, LOCATION_INITIALIZED, Location, LocationStrategy, LowerCasePipe, NgClass, NgComponentOutlet, NgForOf as NgFor, NgForOf, NgForOfContext, NgIf, NgIfContext, NgLocaleLocalization, NgLocalization, NgOptimizedImage, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NumberFormatStyle, NumberSymbol, PRECONNECT_CHECK_BLOCKLIST, PathLocationStrategy, PercentPipe, PlatformLocation, Plural, SlicePipe, TitleCasePipe, TranslationWidth, UpperCasePipe, VERSION, ViewportScroller, WeekDay, XhrFactory, 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, provideCloudflareLoader, provideCloudinaryLoader, provideImageKitLoader, provideImgixLoader, provideNetlifyLoader, registerLocaleData, DomAdapter as ɵDomAdapter, NullViewportScroller as ɵNullViewportScroller, PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PlatformNavigation as ɵPlatformNavigation, getDOM as ɵgetDOM, normalizeQueryParams as ɵnormalizeQueryParams, parseCookieValue as ɵparseCookieValue, setRootDomAdapter as ɵsetRootDomAdapter };\n","/**\n * @license Angular v19.0.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ɵDomAdapter, ɵsetRootDomAdapter, ɵparseCookieValue, ɵgetDOM, isPlatformServer, DOCUMENT, ɵPLATFORM_BROWSER_ID, XhrFactory, CommonModule } from '@angular/common';\nexport { ɵgetDOM } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { ɵglobal, ɵRuntimeError, Injectable, InjectionToken, Inject, APP_ID, CSP_NONCE, PLATFORM_ID, Optional, ViewEncapsulation, RendererStyleFlags2, ɵinternalCreateApplication, ErrorHandler, ɵsetDocument, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, ɵTESTABILITY_GETTER, ɵTESTABILITY, Testability, NgZone, TestabilityRegistry, ɵINJECTOR_SCOPE, RendererFactory2, ApplicationModule, NgModule, SkipSelf, ApplicationRef, ɵConsole, forwardRef, ɵXSS_SECURITY_URL, SecurityContext, ɵallowSanitizationBypassAndThrow, ɵunwrapSafeValue, ɵ_sanitizeUrl, ɵ_sanitizeHtml, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, ɵwithI18nSupport, ɵwithEventReplay, ɵwithIncrementalHydration, ENVIRONMENT_INITIALIZER, inject, ɵZONELESS_ENABLED, ɵformatRuntimeError, makeEnvironmentProviders, ɵwithDomHydration, Version } from '@angular/core';\nimport { ɵwithHttpTransferCache } from '@angular/common/http';\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 */\nclass GenericBrowserDomAdapter extends ɵDomAdapter {\n    supportsDOMEvents = true;\n}\n\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 */\nclass BrowserDomAdapter extends GenericBrowserDomAdapter {\n    static makeCurrent() {\n        ɵsetRootDomAdapter(new BrowserDomAdapter());\n    }\n    onAndCancel(el, evt, listener) {\n        el.addEventListener(evt, listener);\n        return () => {\n            el.removeEventListener(evt, listener);\n        };\n    }\n    dispatchEvent(el, evt) {\n        el.dispatchEvent(evt);\n    }\n    remove(node) {\n        node.remove();\n    }\n    createElement(tagName, doc) {\n        doc = doc || this.getDefaultDocument();\n        return doc.createElement(tagName);\n    }\n    createHtmlDocument() {\n        return document.implementation.createHTMLDocument('fakeTitle');\n    }\n    getDefaultDocument() {\n        return document;\n    }\n    isElementNode(node) {\n        return node.nodeType === Node.ELEMENT_NODE;\n    }\n    isShadowRoot(node) {\n        return node instanceof DocumentFragment;\n    }\n    /** @deprecated No longer being used in Ivy code. To be removed in version 14. */\n    getGlobalEventTarget(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    getBaseHref(doc) {\n        const href = getBaseElementHref();\n        return href == null ? null : relativePath(href);\n    }\n    resetBaseElement() {\n        baseElement = null;\n    }\n    getUserAgent() {\n        return window.navigator.userAgent;\n    }\n    getCookie(name) {\n        return ɵparseCookieValue(document.cookie, name);\n    }\n}\nlet baseElement = null;\nfunction getBaseElementHref() {\n    baseElement = baseElement || document.querySelector('base');\n    return baseElement ? baseElement.getAttribute('href') : null;\n}\nfunction relativePath(url) {\n    // The base URL doesn't really matter, we just need it so relative paths have something\n    // to resolve against. In the browser `HTMLBaseElement.href` is always absolute.\n    return new URL(url, document.baseURI).pathname;\n}\n\nclass BrowserGetTestability {\n    addToWindow(registry) {\n        ɵglobal['getAngularTestability'] = (elem, findInAncestors = true) => {\n            const testability = registry.findTestabilityInTree(elem, findInAncestors);\n            if (testability == null) {\n                throw new ɵRuntimeError(5103 /* RuntimeErrorCode.TESTABILITY_NOT_FOUND */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                    'Could not find testability for element.');\n            }\n            return testability;\n        };\n        ɵglobal['getAllAngularTestabilities'] = () => registry.getAllTestabilities();\n        ɵglobal['getAllAngularRootElements'] = () => registry.getAllRootElements();\n        const whenAllStable = (callback) => {\n            const testabilities = ɵglobal['getAllAngularTestabilities']();\n            let count = testabilities.length;\n            const decrement = function () {\n                count--;\n                if (count == 0) {\n                    callback();\n                }\n            };\n            testabilities.forEach((testability) => {\n                testability.whenStable(decrement);\n            });\n        };\n        if (!ɵglobal['frameworkStabilizers']) {\n            ɵglobal['frameworkStabilizers'] = [];\n        }\n        ɵglobal['frameworkStabilizers'].push(whenAllStable);\n    }\n    findTestabilityInTree(registry, elem, findInAncestors) {\n        if (elem == null) {\n            return null;\n        }\n        const 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}\n\n/**\n * A factory for `HttpXhrBackend` that uses the `XMLHttpRequest` browser API.\n */\nclass BrowserXhr {\n    build() {\n        return new XMLHttpRequest();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserXhr });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserXhr, decorators: [{\n            type: Injectable\n        }] });\n\n/**\n * The injection token for plugins of the `EventManager` service.\n *\n * @publicApi\n */\nconst EVENT_MANAGER_PLUGINS = new InjectionToken(ngDevMode ? 'EventManagerPlugins' : '');\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n *\n * @publicApi\n */\nclass EventManager {\n    _zone;\n    _plugins;\n    _eventNameToPlugin = new Map();\n    /**\n     * Initializes an instance of the event-manager service.\n     */\n    constructor(plugins, _zone) {\n        this._zone = _zone;\n        plugins.forEach((plugin) => {\n            plugin.manager = this;\n        });\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    addEventListener(element, eventName, handler) {\n        const plugin = this._findPluginFor(eventName);\n        return plugin.addEventListener(element, eventName, handler);\n    }\n    /**\n     * Retrieves the compilation zone in which event listeners are registered.\n     */\n    getZone() {\n        return this._zone;\n    }\n    /** @internal */\n    _findPluginFor(eventName) {\n        let plugin = this._eventNameToPlugin.get(eventName);\n        if (plugin) {\n            return plugin;\n        }\n        const plugins = this._plugins;\n        plugin = plugins.find((plugin) => plugin.supports(eventName));\n        if (!plugin) {\n            throw new ɵRuntimeError(5101 /* RuntimeErrorCode.NO_PLUGIN_FOR_EVENT */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                `No event manager plugin found for event ${eventName}`);\n        }\n        this._eventNameToPlugin.set(eventName, plugin);\n        return plugin;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: EventManager, deps: [{ token: EVENT_MANAGER_PLUGINS }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: EventManager });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: EventManager, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [EVENT_MANAGER_PLUGINS]\n                }] }, { type: i0.NgZone }] });\n/**\n * The plugin definition for the `EventManager` class\n *\n * It can be used as a base class to create custom manager plugins, i.e. you can create your own\n * class that extends the `EventManagerPlugin` one.\n *\n * @publicApi\n */\nclass EventManagerPlugin {\n    _doc;\n    // TODO: remove (has some usage in G3)\n    constructor(_doc) {\n        this._doc = _doc;\n    }\n    // Using non-null assertion because it's set by EventManager's constructor\n    manager;\n}\n\n/** The style elements attribute name used to set value of `APP_ID` token. */\nconst APP_ID_ATTRIBUTE_NAME = 'ng-app-id';\n/**\n * Removes all provided elements from the document.\n * @param elements An array of HTML Elements.\n */\nfunction removeElements(elements) {\n    for (const element of elements) {\n        element.remove();\n    }\n}\n/**\n * Creates a `style` element with the provided inline style content.\n * @param style A string of the inline style content.\n * @param doc A DOM Document to use to create the element.\n * @returns An HTMLStyleElement instance.\n */\nfunction createStyleElement(style, doc) {\n    const styleElement = doc.createElement('style');\n    styleElement.textContent = style;\n    return styleElement;\n}\n/**\n * Searches a DOM document's head element for style elements with a matching application\n * identifier attribute (`ng-app-id`) to the provide identifier and adds usage records for each.\n * @param doc An HTML DOM document instance.\n * @param appId A string containing an Angular application identifer.\n * @param inline A Map object for tracking inline (defined via `styles` in component decorator) style usage.\n * @param external A Map object for tracking external (defined via `styleUrls` in component decorator) style usage.\n */\nfunction addServerStyles(doc, appId, inline, external) {\n    const elements = doc.head?.querySelectorAll(`style[${APP_ID_ATTRIBUTE_NAME}=\"${appId}\"],link[${APP_ID_ATTRIBUTE_NAME}=\"${appId}\"]`);\n    if (elements) {\n        for (const styleElement of elements) {\n            styleElement.removeAttribute(APP_ID_ATTRIBUTE_NAME);\n            if (styleElement instanceof HTMLLinkElement) {\n                // Only use filename from href\n                // The href is build time generated with a unique value to prevent duplicates.\n                external.set(styleElement.href.slice(styleElement.href.lastIndexOf('/') + 1), {\n                    usage: 0,\n                    elements: [styleElement],\n                });\n            }\n            else if (styleElement.textContent) {\n                inline.set(styleElement.textContent, { usage: 0, elements: [styleElement] });\n            }\n        }\n    }\n}\n/**\n * Creates a `link` element for the provided external style URL.\n * @param url A string of the URL for the stylesheet.\n * @param doc A DOM Document to use to create the element.\n * @returns An HTMLLinkElement instance.\n */\nfunction createLinkElement(url, doc) {\n    const linkElement = doc.createElement('link');\n    linkElement.setAttribute('rel', 'stylesheet');\n    linkElement.setAttribute('href', url);\n    return linkElement;\n}\nclass SharedStylesHost {\n    doc;\n    appId;\n    nonce;\n    /**\n     * Provides usage information for active inline style content and associated HTML <style> elements.\n     * Embedded styles typically originate from the `styles` metadata of a rendered component.\n     */\n    inline = new Map();\n    /**\n     * Provides usage information for active external style URLs and the associated HTML <link> elements.\n     * External styles typically originate from the `ɵɵExternalStylesFeature` of a rendered component.\n     */\n    external = new Map();\n    /**\n     * Set of host DOM nodes that will have styles attached.\n     */\n    hosts = new Set();\n    /**\n     * Whether the application code is currently executing on a server.\n     */\n    isServer;\n    constructor(doc, appId, nonce, platformId = {}) {\n        this.doc = doc;\n        this.appId = appId;\n        this.nonce = nonce;\n        this.isServer = isPlatformServer(platformId);\n        addServerStyles(doc, appId, this.inline, this.external);\n        this.hosts.add(doc.head);\n    }\n    /**\n     * Adds embedded styles to the DOM via HTML `style` elements.\n     * @param styles An array of style content strings.\n     */\n    addStyles(styles, urls) {\n        for (const value of styles) {\n            this.addUsage(value, this.inline, createStyleElement);\n        }\n        urls?.forEach((value) => this.addUsage(value, this.external, createLinkElement));\n    }\n    /**\n     * Removes embedded styles from the DOM that were added as HTML `style` elements.\n     * @param styles An array of style content strings.\n     */\n    removeStyles(styles, urls) {\n        for (const value of styles) {\n            this.removeUsage(value, this.inline);\n        }\n        urls?.forEach((value) => this.removeUsage(value, this.external));\n    }\n    addUsage(value, usages, creator) {\n        // Attempt to get any current usage of the value\n        const record = usages.get(value);\n        // If existing, just increment the usage count\n        if (record) {\n            if ((typeof ngDevMode === 'undefined' || ngDevMode) && record.usage === 0) {\n                // A usage count of zero indicates a preexisting server generated style.\n                // This attribute is solely used for debugging purposes of SSR style reuse.\n                record.elements.forEach((element) => element.setAttribute('ng-style-reused', ''));\n            }\n            record.usage++;\n        }\n        else {\n            // Otherwise, create an entry to track the elements and add element for each host\n            usages.set(value, {\n                usage: 1,\n                elements: [...this.hosts].map((host) => this.addElement(host, creator(value, this.doc))),\n            });\n        }\n    }\n    removeUsage(value, usages) {\n        // Attempt to get any current usage of the value\n        const record = usages.get(value);\n        // If there is a record, reduce the usage count and if no longer used,\n        // remove from DOM and delete usage record.\n        if (record) {\n            record.usage--;\n            if (record.usage <= 0) {\n                removeElements(record.elements);\n                usages.delete(value);\n            }\n        }\n    }\n    ngOnDestroy() {\n        for (const [, { elements }] of [...this.inline, ...this.external]) {\n            removeElements(elements);\n        }\n        this.hosts.clear();\n    }\n    /**\n     * Adds a host node to the set of style hosts and adds all existing style usage to\n     * the newly added host node.\n     *\n     * This is currently only used for Shadow DOM encapsulation mode.\n     */\n    addHost(hostNode) {\n        this.hosts.add(hostNode);\n        // Add existing styles to new host\n        for (const [style, { elements }] of this.inline) {\n            elements.push(this.addElement(hostNode, createStyleElement(style, this.doc)));\n        }\n        for (const [url, { elements }] of this.external) {\n            elements.push(this.addElement(hostNode, createLinkElement(url, this.doc)));\n        }\n    }\n    removeHost(hostNode) {\n        this.hosts.delete(hostNode);\n    }\n    addElement(host, element) {\n        // Add a nonce if present\n        if (this.nonce) {\n            element.setAttribute('nonce', this.nonce);\n        }\n        // Add application identifier when on the server to support client-side reuse\n        if (this.isServer) {\n            element.setAttribute(APP_ID_ATTRIBUTE_NAME, this.appId);\n        }\n        // Insert the element into the DOM with the host node as parent\n        return host.appendChild(element);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: SharedStylesHost, deps: [{ token: DOCUMENT }, { token: APP_ID }, { token: CSP_NONCE, optional: true }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: SharedStylesHost });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: SharedStylesHost, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: Document, decorators: [{\n                    type: Inject,\n                    args: [DOCUMENT]\n                }] }, { type: undefined, decorators: [{\n                    type: Inject,\n                    args: [APP_ID]\n                }] }, { type: undefined, decorators: [{\n                    type: Inject,\n                    args: [CSP_NONCE]\n                }, {\n                    type: Optional\n                }] }, { type: undefined, decorators: [{\n                    type: Inject,\n                    args: [PLATFORM_ID]\n                }] }] });\n\nconst 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    'math': 'http://www.w3.org/1998/Math/MathML',\n};\nconst COMPONENT_REGEX = /%COMP%/g;\nconst COMPONENT_VARIABLE = '%COMP%';\nconst HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nconst CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\n/**\n * The default value for the `REMOVE_STYLES_ON_COMPONENT_DESTROY` DI token.\n */\nconst REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT = true;\n/**\n * A DI token that indicates whether styles\n * of destroyed components should be removed from DOM.\n *\n * By default, the value is set to `true`.\n * @publicApi\n */\nconst REMOVE_STYLES_ON_COMPONENT_DESTROY = new InjectionToken(ngDevMode ? 'RemoveStylesOnCompDestroy' : '', {\n    providedIn: 'root',\n    factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT,\n});\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 shimStylesContent(compId, styles) {\n    return styles.map((s) => s.replace(COMPONENT_REGEX, compId));\n}\nclass DomRendererFactory2 {\n    eventManager;\n    sharedStylesHost;\n    appId;\n    removeStylesOnCompDestroy;\n    doc;\n    platformId;\n    ngZone;\n    nonce;\n    rendererByCompId = new Map();\n    defaultRenderer;\n    platformIsServer;\n    constructor(eventManager, sharedStylesHost, appId, removeStylesOnCompDestroy, doc, platformId, ngZone, nonce = null) {\n        this.eventManager = eventManager;\n        this.sharedStylesHost = sharedStylesHost;\n        this.appId = appId;\n        this.removeStylesOnCompDestroy = removeStylesOnCompDestroy;\n        this.doc = doc;\n        this.platformId = platformId;\n        this.ngZone = ngZone;\n        this.nonce = nonce;\n        this.platformIsServer = isPlatformServer(platformId);\n        this.defaultRenderer = new DefaultDomRenderer2(eventManager, doc, ngZone, this.platformIsServer);\n    }\n    createRenderer(element, type) {\n        if (!element || !type) {\n            return this.defaultRenderer;\n        }\n        if (this.platformIsServer && type.encapsulation === ViewEncapsulation.ShadowDom) {\n            // Domino does not support shadow DOM.\n            type = { ...type, encapsulation: ViewEncapsulation.Emulated };\n        }\n        const renderer = this.getOrCreateRenderer(element, type);\n        // Renderers have different logic due to different encapsulation behaviours.\n        // Ex: for emulated, an attribute is added to the element.\n        if (renderer instanceof EmulatedEncapsulationDomRenderer2) {\n            renderer.applyToHost(element);\n        }\n        else if (renderer instanceof NoneEncapsulationDomRenderer) {\n            renderer.applyStyles();\n        }\n        return renderer;\n    }\n    getOrCreateRenderer(element, type) {\n        const rendererByCompId = this.rendererByCompId;\n        let renderer = rendererByCompId.get(type.id);\n        if (!renderer) {\n            const doc = this.doc;\n            const ngZone = this.ngZone;\n            const eventManager = this.eventManager;\n            const sharedStylesHost = this.sharedStylesHost;\n            const removeStylesOnCompDestroy = this.removeStylesOnCompDestroy;\n            const platformIsServer = this.platformIsServer;\n            switch (type.encapsulation) {\n                case ViewEncapsulation.Emulated:\n                    renderer = new EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, type, this.appId, removeStylesOnCompDestroy, doc, ngZone, platformIsServer);\n                    break;\n                case ViewEncapsulation.ShadowDom:\n                    return new ShadowDomRenderer(eventManager, sharedStylesHost, element, type, doc, ngZone, this.nonce, platformIsServer);\n                default:\n                    renderer = new NoneEncapsulationDomRenderer(eventManager, sharedStylesHost, type, removeStylesOnCompDestroy, doc, ngZone, platformIsServer);\n                    break;\n            }\n            rendererByCompId.set(type.id, renderer);\n        }\n        return renderer;\n    }\n    ngOnDestroy() {\n        this.rendererByCompId.clear();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DomRendererFactory2, deps: [{ token: EventManager }, { token: SharedStylesHost }, { token: APP_ID }, { token: REMOVE_STYLES_ON_COMPONENT_DESTROY }, { token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: CSP_NONCE }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DomRendererFactory2 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DomRendererFactory2, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: EventManager }, { type: SharedStylesHost }, { type: undefined, decorators: [{\n                    type: Inject,\n                    args: [APP_ID]\n                }] }, { type: undefined, decorators: [{\n                    type: Inject,\n                    args: [REMOVE_STYLES_ON_COMPONENT_DESTROY]\n                }] }, { type: Document, decorators: [{\n                    type: Inject,\n                    args: [DOCUMENT]\n                }] }, { type: Object, decorators: [{\n                    type: Inject,\n                    args: [PLATFORM_ID]\n                }] }, { type: i0.NgZone }, { type: undefined, decorators: [{\n                    type: Inject,\n                    args: [CSP_NONCE]\n                }] }] });\nclass DefaultDomRenderer2 {\n    eventManager;\n    doc;\n    ngZone;\n    platformIsServer;\n    data = Object.create(null);\n    /**\n     * By default this renderer throws when encountering synthetic properties\n     * This can be disabled for example by the AsyncAnimationRendererFactory\n     */\n    throwOnSyntheticProps = true;\n    constructor(eventManager, doc, ngZone, platformIsServer) {\n        this.eventManager = eventManager;\n        this.doc = doc;\n        this.ngZone = ngZone;\n        this.platformIsServer = platformIsServer;\n    }\n    destroy() { }\n    destroyNode = null;\n    createElement(name, namespace) {\n        if (namespace) {\n            // TODO: `|| namespace` was added in\n            // https://github.com/angular/angular/commit/2b9cc8503d48173492c29f5a271b61126104fbdb to\n            // support how Ivy passed around the namespace URI rather than short name at the time. It did\n            // not, however extend the support to other parts of the system (setAttribute, setAttribute,\n            // and the ServerRenderer). We should decide what exactly the semantics for dealing with\n            // namespaces should be and make it consistent.\n            // Related issues:\n            // https://github.com/angular/angular/issues/44028\n            // https://github.com/angular/angular/issues/44883\n            return this.doc.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n        }\n        return this.doc.createElement(name);\n    }\n    createComment(value) {\n        return this.doc.createComment(value);\n    }\n    createText(value) {\n        return this.doc.createTextNode(value);\n    }\n    appendChild(parent, newChild) {\n        const targetParent = isTemplateNode(parent) ? parent.content : parent;\n        targetParent.appendChild(newChild);\n    }\n    insertBefore(parent, newChild, refChild) {\n        if (parent) {\n            const targetParent = isTemplateNode(parent) ? parent.content : parent;\n            targetParent.insertBefore(newChild, refChild);\n        }\n    }\n    removeChild(_parent, oldChild) {\n        oldChild.remove();\n    }\n    selectRootElement(selectorOrNode, preserveContent) {\n        let el = typeof selectorOrNode === 'string' ? this.doc.querySelector(selectorOrNode) : selectorOrNode;\n        if (!el) {\n            throw new ɵRuntimeError(-5104 /* RuntimeErrorCode.ROOT_NODE_NOT_FOUND */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                `The selector \"${selectorOrNode}\" did not match any elements`);\n        }\n        if (!preserveContent) {\n            el.textContent = '';\n        }\n        return el;\n    }\n    parentNode(node) {\n        return node.parentNode;\n    }\n    nextSibling(node) {\n        return node.nextSibling;\n    }\n    setAttribute(el, name, value, namespace) {\n        if (namespace) {\n            name = namespace + ':' + name;\n            const 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    removeAttribute(el, name, namespace) {\n        if (namespace) {\n            const namespaceUri = NAMESPACE_URIS[namespace];\n            if (namespaceUri) {\n                el.removeAttributeNS(namespaceUri, name);\n            }\n            else {\n                el.removeAttribute(`${namespace}:${name}`);\n            }\n        }\n        else {\n            el.removeAttribute(name);\n        }\n    }\n    addClass(el, name) {\n        el.classList.add(name);\n    }\n    removeClass(el, name) {\n        el.classList.remove(name);\n    }\n    setStyle(el, style, value, flags) {\n        if (flags & (RendererStyleFlags2.DashCase | RendererStyleFlags2.Important)) {\n            el.style.setProperty(style, value, flags & RendererStyleFlags2.Important ? 'important' : '');\n        }\n        else {\n            el.style[style] = value;\n        }\n    }\n    removeStyle(el, style, flags) {\n        if (flags & RendererStyleFlags2.DashCase) {\n            // removeProperty has no effect when used on camelCased properties.\n            el.style.removeProperty(style);\n        }\n        else {\n            el.style[style] = '';\n        }\n    }\n    setProperty(el, name, value) {\n        if (el == null) {\n            return;\n        }\n        (typeof ngDevMode === 'undefined' || ngDevMode) &&\n            this.throwOnSyntheticProps &&\n            checkNoSyntheticProp(name, 'property');\n        el[name] = value;\n    }\n    setValue(node, value) {\n        node.nodeValue = value;\n    }\n    listen(target, event, callback) {\n        (typeof ngDevMode === 'undefined' || ngDevMode) &&\n            this.throwOnSyntheticProps &&\n            checkNoSyntheticProp(event, 'listener');\n        if (typeof target === 'string') {\n            target = ɵgetDOM().getGlobalEventTarget(this.doc, target);\n            if (!target) {\n                throw new Error(`Unsupported event target ${target} for event ${event}`);\n            }\n        }\n        return this.eventManager.addEventListener(target, event, this.decoratePreventDefault(callback));\n    }\n    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\n        // the two differently. In the first case, the special '__ngUnwrap__' token is passed to the\n        // unwrap the listener (see below).\n        return (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\n            // debug_node can inspect the listener toString contents for the existence of this special\n            // token. Because the token is a string literal, it is ensured to not be modified by compiled\n            // code.\n            if (event === '__ngUnwrap__') {\n                return eventHandler;\n            }\n            // Run the event handler inside the ngZone because event handlers are not patched\n            // by Zone on the server. This is required only for tests.\n            const allowDefaultBehavior = this.platformIsServer\n                ? this.ngZone.runGuarded(() => eventHandler(event))\n                : eventHandler(event);\n            if (allowDefaultBehavior === false) {\n                event.preventDefault();\n            }\n            return undefined;\n        };\n    }\n}\nconst AT_CHARCODE = (() => '@'.charCodeAt(0))();\nfunction checkNoSyntheticProp(name, nameKind) {\n    if (name.charCodeAt(0) === AT_CHARCODE) {\n        throw new ɵRuntimeError(5105 /* RuntimeErrorCode.UNEXPECTED_SYNTHETIC_PROPERTY */, `Unexpected synthetic ${nameKind} ${name} found. Please make sure that:\n  - Either \\`BrowserAnimationsModule\\` or \\`NoopAnimationsModule\\` are imported in your application.\n  - There is corresponding configuration for the animation named \\`${name}\\` defined in the \\`animations\\` field of the \\`@Component\\` decorator (see https://angular.io/api/core/Component#animations).`);\n    }\n}\nfunction isTemplateNode(node) {\n    return node.tagName === 'TEMPLATE' && node.content !== undefined;\n}\nclass ShadowDomRenderer extends DefaultDomRenderer2 {\n    sharedStylesHost;\n    hostEl;\n    shadowRoot;\n    constructor(eventManager, sharedStylesHost, hostEl, component, doc, ngZone, nonce, platformIsServer) {\n        super(eventManager, doc, ngZone, platformIsServer);\n        this.sharedStylesHost = sharedStylesHost;\n        this.hostEl = hostEl;\n        this.shadowRoot = hostEl.attachShadow({ mode: 'open' });\n        this.sharedStylesHost.addHost(this.shadowRoot);\n        const styles = shimStylesContent(component.id, component.styles);\n        for (const style of styles) {\n            const styleEl = document.createElement('style');\n            if (nonce) {\n                styleEl.setAttribute('nonce', nonce);\n            }\n            styleEl.textContent = style;\n            this.shadowRoot.appendChild(styleEl);\n        }\n        // Apply any external component styles to the shadow root for the component's element.\n        // The ShadowDOM renderer uses an alternative execution path for component styles that\n        // does not use the SharedStylesHost that other encapsulation modes leverage. Much like\n        // the manual addition of embedded styles directly above, any external stylesheets\n        // must be manually added here to ensure ShadowDOM components are correctly styled.\n        // TODO: Consider reworking the DOM Renderers to consolidate style handling.\n        const styleUrls = component.getExternalStyles?.();\n        if (styleUrls) {\n            for (const styleUrl of styleUrls) {\n                const linkEl = createLinkElement(styleUrl, doc);\n                if (nonce) {\n                    linkEl.setAttribute('nonce', nonce);\n                }\n                this.shadowRoot.appendChild(linkEl);\n            }\n        }\n    }\n    nodeOrShadowRoot(node) {\n        return node === this.hostEl ? this.shadowRoot : node;\n    }\n    appendChild(parent, newChild) {\n        return super.appendChild(this.nodeOrShadowRoot(parent), newChild);\n    }\n    insertBefore(parent, newChild, refChild) {\n        return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);\n    }\n    removeChild(_parent, oldChild) {\n        return super.removeChild(null, oldChild);\n    }\n    parentNode(node) {\n        return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));\n    }\n    destroy() {\n        this.sharedStylesHost.removeHost(this.shadowRoot);\n    }\n}\nclass NoneEncapsulationDomRenderer extends DefaultDomRenderer2 {\n    sharedStylesHost;\n    removeStylesOnCompDestroy;\n    styles;\n    styleUrls;\n    constructor(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, compId) {\n        super(eventManager, doc, ngZone, platformIsServer);\n        this.sharedStylesHost = sharedStylesHost;\n        this.removeStylesOnCompDestroy = removeStylesOnCompDestroy;\n        this.styles = compId ? shimStylesContent(compId, component.styles) : component.styles;\n        this.styleUrls = component.getExternalStyles?.(compId);\n    }\n    applyStyles() {\n        this.sharedStylesHost.addStyles(this.styles, this.styleUrls);\n    }\n    destroy() {\n        if (!this.removeStylesOnCompDestroy) {\n            return;\n        }\n        this.sharedStylesHost.removeStyles(this.styles, this.styleUrls);\n    }\n}\nclass EmulatedEncapsulationDomRenderer2 extends NoneEncapsulationDomRenderer {\n    contentAttr;\n    hostAttr;\n    constructor(eventManager, sharedStylesHost, component, appId, removeStylesOnCompDestroy, doc, ngZone, platformIsServer) {\n        const compId = appId + '-' + component.id;\n        super(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, compId);\n        this.contentAttr = shimContentAttribute(compId);\n        this.hostAttr = shimHostAttribute(compId);\n    }\n    applyToHost(element) {\n        this.applyStyles();\n        this.setAttribute(element, this.hostAttr, '');\n    }\n    createElement(parent, name) {\n        const el = super.createElement(parent, name);\n        super.setAttribute(el, this.contentAttr, '');\n        return el;\n    }\n}\n\nclass DomEventsPlugin extends EventManagerPlugin {\n    constructor(doc) {\n        super(doc);\n    }\n    // This plugin should come last in the list of plugins, because it accepts all\n    // events.\n    supports(eventName) {\n        return true;\n    }\n    addEventListener(element, eventName, handler) {\n        element.addEventListener(eventName, handler, false);\n        return () => this.removeEventListener(element, eventName, handler);\n    }\n    removeEventListener(target, eventName, callback) {\n        return target.removeEventListener(eventName, callback);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DomEventsPlugin });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DomEventsPlugin, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [DOCUMENT]\n                }] }] });\n\n/**\n * Defines supported modifiers for key events.\n */\nconst MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\n// The following values are here for cross-browser compatibility and to match the W3C standard\n// cf https://www.w3.org/TR/DOM-Level-3-Events-key/\nconst _keyMap = {\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/**\n * Retrieves modifiers from key-event objects.\n */\nconst MODIFIER_KEY_GETTERS = {\n    'alt': (event) => event.altKey,\n    'control': (event) => event.ctrlKey,\n    'meta': (event) => event.metaKey,\n    'shift': (event) => event.shiftKey,\n};\n/**\n * A browser plug-in that provides support for handling of key events in Angular.\n */\nclass KeyEventsPlugin extends EventManagerPlugin {\n    /**\n     * Initializes an instance of the browser plug-in.\n     * @param doc The document in which key events will be detected.\n     */\n    constructor(doc) {\n        super(doc);\n    }\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    supports(eventName) {\n        return KeyEventsPlugin.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    addEventListener(element, eventName, handler) {\n        const parsedEvent = KeyEventsPlugin.parseEventName(eventName);\n        const outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());\n        return this.manager.getZone().runOutsideAngular(() => {\n            return ɵgetDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);\n        });\n    }\n    /**\n     * Parses the user provided full keyboard event definition and normalizes it for\n     * later internal use. It ensures the string is all lowercase, converts special\n     * characters to a standard spelling, and orders all the values consistently.\n     *\n     * @param eventName The name of the key event to listen for.\n     * @returns an object with the full, normalized string, and the dom event name\n     * or null in the case when the event doesn't match a keyboard event.\n     */\n    static parseEventName(eventName) {\n        const parts = eventName.toLowerCase().split('.');\n        const domEventName = parts.shift();\n        if (parts.length === 0 || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n            return null;\n        }\n        const key = KeyEventsPlugin._normalizeKey(parts.pop());\n        let fullKey = '';\n        let codeIX = parts.indexOf('code');\n        if (codeIX > -1) {\n            parts.splice(codeIX, 1);\n            fullKey = 'code.';\n        }\n        MODIFIER_KEYS.forEach((modifierName) => {\n            const 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        // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming.\n        //       The code must remain in the `result['domEventName']` form.\n        // return {domEventName, fullKey};\n        const result = {};\n        result['domEventName'] = domEventName;\n        result['fullKey'] = fullKey;\n        return result;\n    }\n    /**\n     * Determines whether the actual keys pressed match the configured key code string.\n     * The `fullKeyCode` event is normalized in the `parseEventName` method when the\n     * event is attached to the DOM during the `addEventListener` call. This is unseen\n     * by the end user and is normalized for internal consistency and parsing.\n     *\n     * @param event The keyboard event.\n     * @param fullKeyCode The normalized user defined expected key event string\n     * @returns boolean.\n     */\n    static matchEventFullKeyCode(event, fullKeyCode) {\n        let keycode = _keyMap[event.key] || event.key;\n        let key = '';\n        if (fullKeyCode.indexOf('code.') > -1) {\n            keycode = event.code;\n            key = 'code.';\n        }\n        // the keycode could be unidentified so we have to check here\n        if (keycode == null || !keycode)\n            return false;\n        keycode = keycode.toLowerCase();\n        if (keycode === ' ') {\n            keycode = 'space'; // for readability\n        }\n        else if (keycode === '.') {\n            keycode = 'dot'; // because '.' is used as a separator in event names\n        }\n        MODIFIER_KEYS.forEach((modifierName) => {\n            if (modifierName !== keycode) {\n                const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n                if (modifierGetter(event)) {\n                    key += modifierName + '.';\n                }\n            }\n        });\n        key += keycode;\n        return key === fullKeyCode;\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    static eventCallback(fullKey, handler, zone) {\n        return (event) => {\n            if (KeyEventsPlugin.matchEventFullKeyCode(event, fullKey)) {\n                zone.runGuarded(() => handler(event));\n            }\n        };\n    }\n    /** @internal */\n    static _normalizeKey(keyName) {\n        return keyName === 'esc' ? 'escape' : keyName;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: KeyEventsPlugin });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: KeyEventsPlugin, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [DOCUMENT]\n                }] }] });\n\n/**\n * Bootstraps an instance of an Angular application and renders a standalone component as the\n * application's root component. More information about standalone components can be found in [this\n * guide](guide/components/importing).\n *\n * @usageNotes\n * The root component passed into this function *must* be a standalone one (should have the\n * `standalone: true` flag in the `@Component` decorator config).\n *\n * ```angular-ts\n * @Component({\n *   standalone: true,\n *   template: 'Hello world!'\n * })\n * class RootComponent {}\n *\n * const appRef: ApplicationRef = await bootstrapApplication(RootComponent);\n * ```\n *\n * You can add the list of providers that should be available in the application injector by\n * specifying the `providers` field in an object passed as the second argument:\n *\n * ```ts\n * await bootstrapApplication(RootComponent, {\n *   providers: [\n *     {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'}\n *   ]\n * });\n * ```\n *\n * The `importProvidersFrom` helper method can be used to collect all providers from any\n * existing NgModule (and transitively from all NgModules that it imports):\n *\n * ```ts\n * await bootstrapApplication(RootComponent, {\n *   providers: [\n *     importProvidersFrom(SomeNgModule)\n *   ]\n * });\n * ```\n *\n * Note: the `bootstrapApplication` method doesn't include [Testability](api/core/Testability) by\n * default. You can add [Testability](api/core/Testability) by getting the list of necessary\n * providers using `provideProtractorTestingSupport()` function and adding them into the `providers`\n * array, for example:\n *\n * ```ts\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, {providers: [provideProtractorTestingSupport()]});\n * ```\n *\n * @param rootComponent A reference to a standalone component that should be rendered.\n * @param options Extra configuration for the bootstrap operation, see `ApplicationConfig` for\n *     additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nfunction bootstrapApplication(rootComponent, options) {\n    return ɵinternalCreateApplication({ rootComponent, ...createProvidersConfig(options) });\n}\n/**\n * Create an instance of an Angular application without bootstrapping any components. This is useful\n * for the situation where one wants to decouple application environment creation (a platform and\n * associated injectors) from rendering components on a screen. Components can be subsequently\n * bootstrapped on the returned `ApplicationRef`.\n *\n * @param options Extra configuration for the application environment, see `ApplicationConfig` for\n *     additional info.\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n *\n * @publicApi\n */\nfunction createApplication(options) {\n    return ɵinternalCreateApplication(createProvidersConfig(options));\n}\nfunction createProvidersConfig(options) {\n    return {\n        appProviders: [...BROWSER_MODULE_PROVIDERS, ...(options?.providers ?? [])],\n        platformProviders: INTERNAL_BROWSER_PLATFORM_PROVIDERS,\n    };\n}\n/**\n * Returns a set of providers required to setup [Testability](api/core/Testability) for an\n * application bootstrapped using the `bootstrapApplication` function. The set of providers is\n * needed to support testing an application with Protractor (which relies on the Testability APIs\n * to be present).\n *\n * @returns An array of providers required to setup Testability for an application and make it\n *     available for testing using Protractor.\n *\n * @publicApi\n */\nfunction provideProtractorTestingSupport() {\n    // Return a copy to prevent changes to the original array in case any in-place\n    // alterations are performed to the `provideProtractorTestingSupport` call results in app\n    // code.\n    return [...TESTABILITY_PROVIDERS];\n}\nfunction initDomAdapter() {\n    BrowserDomAdapter.makeCurrent();\n}\nfunction errorHandler() {\n    return new ErrorHandler();\n}\nfunction _document() {\n    // Tell ivy about the global document\n    ɵsetDocument(document);\n    return document;\n}\nconst INTERNAL_BROWSER_PLATFORM_PROVIDERS = [\n    { provide: PLATFORM_ID, useValue: ɵPLATFORM_BROWSER_ID },\n    { provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },\n    { provide: DOCUMENT, useFactory: _document, deps: [] },\n];\n/**\n * A factory function that returns a `PlatformRef` instance associated with browser service\n * providers.\n *\n * @publicApi\n */\nconst platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\n/**\n * Internal marker to signal whether providers from the `BrowserModule` are already present in DI.\n * This is needed to avoid loading `BrowserModule` providers twice. We can't rely on the\n * `BrowserModule` presence itself, since the standalone-based bootstrap just imports\n * `BrowserModule` providers without referencing the module itself.\n */\nconst BROWSER_MODULE_PROVIDERS_MARKER = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'BrowserModule Providers Marker' : '');\nconst TESTABILITY_PROVIDERS = [\n    {\n        provide: ɵTESTABILITY_GETTER,\n        useClass: BrowserGetTestability,\n        deps: [],\n    },\n    {\n        provide: ɵTESTABILITY,\n        useClass: Testability,\n        deps: [NgZone, TestabilityRegistry, ɵTESTABILITY_GETTER],\n    },\n    {\n        provide: Testability, // Also provide as `Testability` for backwards-compatibility.\n        useClass: Testability,\n        deps: [NgZone, TestabilityRegistry, ɵTESTABILITY_GETTER],\n    },\n];\nconst BROWSER_MODULE_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    DomRendererFactory2,\n    SharedStylesHost,\n    EventManager,\n    { provide: RendererFactory2, useExisting: DomRendererFactory2 },\n    { provide: XhrFactory, useClass: BrowserXhr, deps: [] },\n    typeof ngDevMode === 'undefined' || ngDevMode\n        ? { provide: BROWSER_MODULE_PROVIDERS_MARKER, useValue: true }\n        : [],\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 */\nclass BrowserModule {\n    constructor(providersAlreadyPresent) {\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && providersAlreadyPresent) {\n            throw new ɵRuntimeError(5100 /* RuntimeErrorCode.BROWSER_MODULE_ALREADY_LOADED */, `Providers from the \\`BrowserModule\\` have already been loaded. If you need access ` +\n                `to common directives such as NgIf and NgFor, import the \\`CommonModule\\` instead.`);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserModule, deps: [{ token: BROWSER_MODULE_PROVIDERS_MARKER, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserModule, providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS], imports: [CommonModule, ApplicationModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],\n                    exports: [CommonModule, ApplicationModule],\n                }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: SkipSelf\n                }, {\n                    type: Inject,\n                    args: [BROWSER_MODULE_PROVIDERS_MARKER]\n                }] }] });\n\n/**\n * A service for managing HTML `<meta>` tags.\n *\n * Properties of the `MetaDefinition` object match the attributes of the\n * HTML `<meta>` tag. These tags define document metadata that is important for\n * things like configuring a Content Security Policy, defining browser compatibility\n * and security settings, setting HTTP Headers, defining rich content for social sharing,\n * and Search Engine Optimization (SEO).\n *\n * To identify specific `<meta>` tags in a document, use an attribute selection\n * string in the format `\"tag_attribute='value string'\"`.\n * For example, an `attrSelector` value of `\"name='description'\"` matches a tag\n * whose `name` attribute has the value `\"description\"`.\n * Selectors are used with the `querySelector()` Document method,\n * in the format `meta[{attrSelector}]`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)\n *\n *\n * @publicApi\n */\nclass Meta {\n    _doc;\n    _dom;\n    constructor(_doc) {\n        this._doc = _doc;\n        this._dom = ɵgetDOM();\n    }\n    /**\n     * Retrieves or creates a specific `<meta>` tag element in the current HTML document.\n     * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n     * values in the provided tag definition, and verifies that all other attribute values are equal.\n     * If an existing element is found, it is returned and is not modified in any way.\n     * @param tag The definition of a `<meta>` element to match or create.\n     * @param forceCreation True to create a new element without checking whether one already exists.\n     * @returns The existing element with the same attributes and values if found,\n     * the new element if no match is found, or `null` if the tag parameter is not defined.\n     */\n    addTag(tag, forceCreation = false) {\n        if (!tag)\n            return null;\n        return this._getOrCreateElement(tag, forceCreation);\n    }\n    /**\n     * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.\n     * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n     * values in the provided tag definition, and verifies that all other attribute values are equal.\n     * @param tags An array of tag definitions to match or create.\n     * @param forceCreation True to create new elements without checking whether they already exist.\n     * @returns The matching elements if found, or the new elements.\n     */\n    addTags(tags, forceCreation = false) {\n        if (!tags)\n            return [];\n        return tags.reduce((result, tag) => {\n            if (tag) {\n                result.push(this._getOrCreateElement(tag, forceCreation));\n            }\n            return result;\n        }, []);\n    }\n    /**\n     * Retrieves a `<meta>` tag element in the current HTML document.\n     * @param attrSelector The tag attribute and value to match against, in the format\n     * `\"tag_attribute='value string'\"`.\n     * @returns The matching element, if any.\n     */\n    getTag(attrSelector) {\n        if (!attrSelector)\n            return null;\n        return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n    }\n    /**\n     * Retrieves a set of `<meta>` tag elements in the current HTML document.\n     * @param attrSelector The tag attribute and value to match against, in the format\n     * `\"tag_attribute='value string'\"`.\n     * @returns The matching elements, if any.\n     */\n    getTags(attrSelector) {\n        if (!attrSelector)\n            return [];\n        const list /*NodeList*/ = this._doc.querySelectorAll(`meta[${attrSelector}]`);\n        return list ? [].slice.call(list) : [];\n    }\n    /**\n     * Modifies an existing `<meta>` tag element in the current HTML document.\n     * @param tag The tag description with which to replace the existing tag content.\n     * @param selector A tag attribute and value to match against, to identify\n     * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n     * If not supplied, matches a tag with the same `name` or `property` attribute value as the\n     * replacement tag.\n     * @return The modified element.\n     */\n    updateTag(tag, selector) {\n        if (!tag)\n            return null;\n        selector = selector || this._parseSelector(tag);\n        const meta = this.getTag(selector);\n        if (meta) {\n            return this._setMetaElementAttributes(tag, meta);\n        }\n        return this._getOrCreateElement(tag, true);\n    }\n    /**\n     * Removes an existing `<meta>` tag element from the current HTML document.\n     * @param attrSelector A tag attribute and value to match against, to identify\n     * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n     */\n    removeTag(attrSelector) {\n        this.removeTagElement(this.getTag(attrSelector));\n    }\n    /**\n     * Removes an existing `<meta>` tag element from the current HTML document.\n     * @param meta The tag definition to match against to identify an existing tag.\n     */\n    removeTagElement(meta) {\n        if (meta) {\n            this._dom.remove(meta);\n        }\n    }\n    _getOrCreateElement(meta, forceCreation = false) {\n        if (!forceCreation) {\n            const selector = this._parseSelector(meta);\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            const elem = this.getTags(selector).filter((elem) => this._containsAttributes(meta, elem))[0];\n            if (elem !== undefined)\n                return elem;\n        }\n        const element = this._dom.createElement('meta');\n        this._setMetaElementAttributes(meta, element);\n        const head = this._doc.getElementsByTagName('head')[0];\n        head.appendChild(element);\n        return element;\n    }\n    _setMetaElementAttributes(tag, el) {\n        Object.keys(tag).forEach((prop) => el.setAttribute(this._getMetaKeyMap(prop), tag[prop]));\n        return el;\n    }\n    _parseSelector(tag) {\n        const attr = tag.name ? 'name' : 'property';\n        return `${attr}=\"${tag[attr]}\"`;\n    }\n    _containsAttributes(tag, elem) {\n        return Object.keys(tag).every((key) => elem.getAttribute(this._getMetaKeyMap(key)) === tag[key]);\n    }\n    _getMetaKeyMap(prop) {\n        return META_KEYS_MAP[prop] || prop;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: Meta, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: Meta, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [DOCUMENT]\n                }] }] });\n/**\n * Mapping for MetaDefinition properties with their correct meta attribute names\n */\nconst META_KEYS_MAP = {\n    httpEquiv: 'http-equiv',\n};\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 (`<html>` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `<title>` tag). Instead, this service can be used to set and get the current\n * title value.\n *\n * @publicApi\n */\nclass Title {\n    _doc;\n    constructor(_doc) {\n        this._doc = _doc;\n    }\n    /**\n     * Get the title of the current HTML document.\n     */\n    getTitle() {\n        return this._doc.title;\n    }\n    /**\n     * Set the title of the current HTML document.\n     * @param newTitle\n     */\n    setTitle(newTitle) {\n        this._doc.title = newTitle || '';\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: Title, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: Title, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [DOCUMENT]\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        const ng = (ɵglobal['ng'] = ɵglobal['ng'] || {});\n        ng[name] = value;\n    }\n}\n\nclass ChangeDetectionPerfRecord {\n    msPerTick;\n    numTicks;\n    constructor(msPerTick, numTicks) {\n        this.msPerTick = msPerTick;\n        this.numTicks = numTicks;\n    }\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 */\nclass AngularProfiler {\n    appRef;\n    constructor(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    timeChangeDetection(config) {\n        const record = config && config['record'];\n        const profileName = 'Change Detection';\n        // Profiler is not available in Android browsers without dev tools opened\n        if (record && 'profile' in console && typeof console.profile === 'function') {\n            console.profile(profileName);\n        }\n        const start = performance.now();\n        let numTicks = 0;\n        while (numTicks < 5 || performance.now() - start < 500) {\n            this.appRef.tick();\n            numTicks++;\n        }\n        const end = performance.now();\n        if (record && 'profileEnd' in console && typeof console.profileEnd === 'function') {\n            console.profileEnd(profileName);\n        }\n        const msPerTick = (end - start) / numTicks;\n        console.log(`ran ${numTicks} change detection cycles`);\n        console.log(`${msPerTick.toFixed(2)} ms per check`);\n        return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n    }\n}\n\nconst 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 * Predicates for use with {@link DebugElement}'s query functions.\n *\n * @publicApi\n */\nclass By {\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    static all() {\n        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    static css(selector) {\n        return (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    static directive(type) {\n        return (debugNode) => debugNode.providerTokens.indexOf(type) !== -1;\n    }\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 * Supported HammerJS recognizer event names.\n */\nconst 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    'doubletap': true,\n};\n/**\n * DI token for providing [HammerJS](https://hammerjs.github.io/) support to Angular.\n * @see {@link HammerGestureConfig}\n *\n * @ngModule HammerModule\n * @publicApi\n */\nconst HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');\n/**\n * Injection token used to provide a HammerLoader to Angular.\n *\n * @see {@link HammerLoader}\n *\n * @publicApi\n */\nconst HAMMER_LOADER = new InjectionToken('HammerLoader');\n/**\n * An injectable [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\n * for gesture recognition. Configures specific event recognition.\n * @publicApi\n */\nclass 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](https://hammerjs.github.io/).\n     */\n    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](https://hammerjs.github.io/).\n     *\n     */\n    overrides = {};\n    /**\n     * Properties whose default values can be overridden for a given event.\n     * Different sets of properties apply to different events.\n     * For information about which properties are supported for which events,\n     * and their allowed and default values, see\n     * [HammerJS documentation](https://hammerjs.github.io/).\n     */\n    options;\n    /**\n     * Creates a [HammerJS Manager](https://hammerjs.github.io/api/#hammermanager)\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    buildHammer(element) {\n        const mc = new Hammer(element, this.options);\n        mc.get('pinch').set({ enable: true });\n        mc.get('rotate').set({ enable: true });\n        for (const eventName in this.overrides) {\n            mc.get(eventName).set(this.overrides[eventName]);\n        }\n        return mc;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HammerGestureConfig });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HammerGestureConfig, decorators: [{\n            type: Injectable\n        }] });\n/**\n * Event plugin that adds Hammer support to an application.\n *\n * @ngModule HammerModule\n */\nclass HammerGesturesPlugin extends EventManagerPlugin {\n    _config;\n    console;\n    loader;\n    _loaderPromise = null;\n    constructor(doc, _config, console, loader) {\n        super(doc);\n        this._config = _config;\n        this.console = console;\n        this.loader = loader;\n    }\n    supports(eventName) {\n        if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {\n            return false;\n        }\n        if (!window.Hammer && !this.loader) {\n            if (typeof ngDevMode === 'undefined' || ngDevMode) {\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            }\n            return false;\n        }\n        return true;\n    }\n    addEventListener(element, eventName, handler) {\n        const 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._loaderPromise = this._loaderPromise || zone.runOutsideAngular(() => 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            let cancelRegistration = false;\n            let deregister = () => {\n                cancelRegistration = true;\n            };\n            zone.runOutsideAngular(() => this._loaderPromise.then(() => {\n                // If Hammer isn't actually loaded when the custom loader resolves, give up.\n                if (!window.Hammer) {\n                    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                        this.console.warn(`The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);\n                    }\n                    deregister = () => { };\n                    return;\n                }\n                if (!cancelRegistration) {\n                    // Now that Hammer is loaded and the listener is being loaded for real,\n                    // the deregistration function changes from canceling registration to\n                    // removal.\n                    deregister = this.addEventListener(element, eventName, handler);\n                }\n            }).catch(() => {\n                if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                    this.console.warn(`The \"${eventName}\" event cannot be bound because the custom ` +\n                        `Hammer.JS loader failed.`);\n                }\n                deregister = () => { };\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 () => {\n                deregister();\n            };\n        }\n        return zone.runOutsideAngular(() => {\n            // Creating the manager bind events, must be done outside of angular\n            const mc = this._config.buildHammer(element);\n            const callback = function (eventObj) {\n                zone.runGuarded(function () {\n                    handler(eventObj);\n                });\n            };\n            mc.on(eventName, callback);\n            return () => {\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    isCustomEvent(eventName) {\n        return this._config.events.indexOf(eventName) > -1;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HammerGesturesPlugin, deps: [{ token: DOCUMENT }, { token: HAMMER_GESTURE_CONFIG }, { token: i0.ɵConsole }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HammerGesturesPlugin });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HammerGesturesPlugin, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [DOCUMENT]\n                }] }, { type: HammerGestureConfig, decorators: [{\n                    type: Inject,\n                    args: [HAMMER_GESTURE_CONFIG]\n                }] }, { type: i0.ɵConsole }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [HAMMER_LOADER]\n                }] }] });\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 */\nclass HammerModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: HammerModule });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HammerModule, providers: [\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        ] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HammerModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    providers: [\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                    ],\n                }]\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 `<a [href]=\"someValue\">` 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](https://g.co/ng/security).\n *\n * @publicApi\n */\nclass DomSanitizer {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(() => DomSanitizerImpl) });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DomSanitizer, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl) }]\n        }] });\nclass DomSanitizerImpl extends DomSanitizer {\n    _doc;\n    constructor(_doc) {\n        super();\n        this._doc = _doc;\n    }\n    sanitize(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\" /* BypassType.Html */)) {\n                    return ɵunwrapSafeValue(value);\n                }\n                return ɵ_sanitizeHtml(this._doc, String(value)).toString();\n            case SecurityContext.STYLE:\n                if (ɵallowSanitizationBypassAndThrow(value, \"Style\" /* BypassType.Style */)) {\n                    return ɵunwrapSafeValue(value);\n                }\n                return value;\n            case SecurityContext.SCRIPT:\n                if (ɵallowSanitizationBypassAndThrow(value, \"Script\" /* BypassType.Script */)) {\n                    return ɵunwrapSafeValue(value);\n                }\n                throw new ɵRuntimeError(5200 /* RuntimeErrorCode.SANITIZATION_UNSAFE_SCRIPT */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                    'unsafe value used in a script context');\n            case SecurityContext.URL:\n                if (ɵallowSanitizationBypassAndThrow(value, \"URL\" /* BypassType.Url */)) {\n                    return ɵunwrapSafeValue(value);\n                }\n                return ɵ_sanitizeUrl(String(value));\n            case SecurityContext.RESOURCE_URL:\n                if (ɵallowSanitizationBypassAndThrow(value, \"ResourceURL\" /* BypassType.ResourceUrl */)) {\n                    return ɵunwrapSafeValue(value);\n                }\n                throw new ɵRuntimeError(5201 /* RuntimeErrorCode.SANITIZATION_UNSAFE_RESOURCE_URL */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                    `unsafe value used in a resource URL context (see ${ɵXSS_SECURITY_URL})`);\n            default:\n                throw new ɵRuntimeError(5202 /* RuntimeErrorCode.SANITIZATION_UNEXPECTED_CTX */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                    `Unexpected SecurityContext ${ctx} (see ${ɵXSS_SECURITY_URL})`);\n        }\n    }\n    bypassSecurityTrustHtml(value) {\n        return ɵbypassSanitizationTrustHtml(value);\n    }\n    bypassSecurityTrustStyle(value) {\n        return ɵbypassSanitizationTrustStyle(value);\n    }\n    bypassSecurityTrustScript(value) {\n        return ɵbypassSanitizationTrustScript(value);\n    }\n    bypassSecurityTrustUrl(value) {\n        return ɵbypassSanitizationTrustUrl(value);\n    }\n    bypassSecurityTrustResourceUrl(value) {\n        return ɵbypassSanitizationTrustResourceUrl(value);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DomSanitizerImpl, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [DOCUMENT]\n                }] }] });\n\n/**\n * The list of features as an enum to uniquely type each `HydrationFeature`.\n * @see {@link HydrationFeature}\n *\n * @publicApi\n */\nvar HydrationFeatureKind;\n(function (HydrationFeatureKind) {\n    HydrationFeatureKind[HydrationFeatureKind[\"NoHttpTransferCache\"] = 0] = \"NoHttpTransferCache\";\n    HydrationFeatureKind[HydrationFeatureKind[\"HttpTransferCacheOptions\"] = 1] = \"HttpTransferCacheOptions\";\n    HydrationFeatureKind[HydrationFeatureKind[\"I18nSupport\"] = 2] = \"I18nSupport\";\n    HydrationFeatureKind[HydrationFeatureKind[\"EventReplay\"] = 3] = \"EventReplay\";\n    HydrationFeatureKind[HydrationFeatureKind[\"IncrementalHydration\"] = 4] = \"IncrementalHydration\";\n})(HydrationFeatureKind || (HydrationFeatureKind = {}));\n/**\n * Helper function to create an object that represents a Hydration feature.\n */\nfunction hydrationFeature(ɵkind, ɵproviders = [], ɵoptions = {}) {\n    return { ɵkind, ɵproviders };\n}\n/**\n * Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the\n * server and other one on the browser.\n *\n * @publicApi\n */\nfunction withNoHttpTransferCache() {\n    // This feature has no providers and acts as a flag that turns off\n    // HTTP transfer cache (which otherwise is turned on by default).\n    return hydrationFeature(HydrationFeatureKind.NoHttpTransferCache);\n}\n/**\n * The function accepts an object, which allows to configure cache parameters,\n * such as which headers should be included (no headers are included by default),\n * whether POST requests should be cached or a callback function to determine if a\n * particular request should be cached.\n *\n * @publicApi\n */\nfunction withHttpTransferCacheOptions(options) {\n    // This feature has no providers and acts as a flag to pass options to the HTTP transfer cache.\n    return hydrationFeature(HydrationFeatureKind.HttpTransferCacheOptions, ɵwithHttpTransferCache(options));\n}\n/**\n * Enables support for hydrating i18n blocks.\n *\n * @developerPreview\n * @publicApi\n */\nfunction withI18nSupport() {\n    return hydrationFeature(HydrationFeatureKind.I18nSupport, ɵwithI18nSupport());\n}\n/**\n * Enables support for replaying user events (e.g. `click`s) that happened on a page\n * before hydration logic has completed. Once an application is hydrated, all captured\n * events are replayed and relevant event listeners are executed.\n *\n * @usageNotes\n *\n * Basic example of how you can enable event replay in your application when\n * `bootstrapApplication` function is used:\n * ```ts\n * bootstrapApplication(AppComponent, {\n *   providers: [provideClientHydration(withEventReplay())]\n * });\n * ```\n * @publicApi\n * @see {@link provideClientHydration}\n */\nfunction withEventReplay() {\n    return hydrationFeature(HydrationFeatureKind.EventReplay, ɵwithEventReplay());\n}\n/**\n * Enables support for incremental hydration using the `hydrate` trigger syntax.\n *\n * @usageNotes\n *\n * Basic example of how you can enable incremental hydration in your application when\n * the `bootstrapApplication` function is used:\n * ```ts\n * bootstrapApplication(AppComponent, {\n *   providers: [provideClientHydration(withIncrementalHydration())]\n * });\n * ```\n * @experimental\n * @publicApi\n * @see {@link provideClientHydration}\n */\nfunction withIncrementalHydration() {\n    return hydrationFeature(HydrationFeatureKind.IncrementalHydration, ɵwithIncrementalHydration());\n}\n/**\n * Returns an `ENVIRONMENT_INITIALIZER` token setup with a function\n * that verifies whether compatible ZoneJS was used in an application\n * and logs a warning in a console if it's not the case.\n */\nfunction provideZoneJsCompatibilityDetector() {\n    return [\n        {\n            provide: ENVIRONMENT_INITIALIZER,\n            useValue: () => {\n                const ngZone = inject(NgZone);\n                const isZoneless = inject(ɵZONELESS_ENABLED);\n                // Checking `ngZone instanceof NgZone` would be insufficient here,\n                // because custom implementations might use NgZone as a base class.\n                if (!isZoneless && ngZone.constructor !== NgZone) {\n                    const console = inject(ɵConsole);\n                    const message = ɵformatRuntimeError(-5000 /* RuntimeErrorCode.UNSUPPORTED_ZONEJS_INSTANCE */, 'Angular detected that hydration was enabled for an application ' +\n                        'that uses a custom or a noop Zone.js implementation. ' +\n                        'This is not yet a fully supported configuration.');\n                    // tslint:disable-next-line:no-console\n                    console.warn(message);\n                }\n            },\n            multi: true,\n        },\n    ];\n}\n/**\n * Sets up providers necessary to enable hydration functionality for the application.\n *\n * By default, the function enables the recommended set of features for the optimal\n * performance for most of the applications. It includes the following features:\n *\n * * Reconciling DOM hydration. Learn more about it [here](guide/hydration).\n * * [`HttpClient`](api/common/http/HttpClient) response caching while running on the server and\n * transferring this cache to the client to avoid extra HTTP requests. Learn more about data caching\n * [here](guide/ssr#caching-data-when-using-httpclient).\n *\n * These functions allow you to disable some of the default features or enable new ones:\n *\n * * {@link withNoHttpTransferCache} to disable HTTP transfer cache\n * * {@link withHttpTransferCacheOptions} to configure some HTTP transfer cache options\n * * {@link withI18nSupport} to enable hydration support for i18n blocks\n * * {@link withEventReplay} to enable support for replaying user events\n *\n * @usageNotes\n *\n * Basic example of how you can enable hydration in your application when\n * `bootstrapApplication` function is used:\n * ```ts\n * bootstrapApplication(AppComponent, {\n *   providers: [provideClientHydration()]\n * });\n * ```\n *\n * Alternatively if you are using NgModules, you would add `provideClientHydration`\n * to your root app module's provider list.\n * ```ts\n * @NgModule({\n *   declarations: [RootCmp],\n *   bootstrap: [RootCmp],\n *   providers: [provideClientHydration()],\n * })\n * export class AppModule {}\n * ```\n *\n * @see {@link withNoHttpTransferCache}\n * @see {@link withHttpTransferCacheOptions}\n * @see {@link withI18nSupport}\n * @see {@link withEventReplay}\n *\n * @param features Optional features to configure additional router behaviors.\n * @returns A set of providers to enable hydration.\n *\n * @publicApi\n */\nfunction provideClientHydration(...features) {\n    const providers = [];\n    const featuresKind = new Set();\n    const hasHttpTransferCacheOptions = featuresKind.has(HydrationFeatureKind.HttpTransferCacheOptions);\n    for (const { ɵproviders, ɵkind } of features) {\n        featuresKind.add(ɵkind);\n        if (ɵproviders.length) {\n            providers.push(ɵproviders);\n        }\n    }\n    if (typeof ngDevMode !== 'undefined' &&\n        ngDevMode &&\n        featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) &&\n        hasHttpTransferCacheOptions) {\n        // TODO: Make this a runtime error\n        throw new Error('Configuration error: found both withHttpTransferCacheOptions() and withNoHttpTransferCache() in the same call to provideClientHydration(), which is a contradiction.');\n    }\n    return makeEnvironmentProviders([\n        typeof ngDevMode !== 'undefined' && ngDevMode ? provideZoneJsCompatibilityDetector() : [],\n        ɵwithDomHydration(),\n        featuresKind.has(HydrationFeatureKind.NoHttpTransferCache) || hasHttpTransferCacheOptions\n            ? []\n            : ɵwithHttpTransferCache({}),\n        providers,\n    ]);\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the platform-browser package.\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('19.0.5');\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BrowserModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, EventManagerPlugin, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, HydrationFeatureKind, Meta, REMOVE_STYLES_ON_COMPONENT_DESTROY, Title, VERSION, bootstrapApplication, createApplication, disableDebugTools, enableDebugTools, platformBrowser, provideClientHydration, provideProtractorTestingSupport, withEventReplay, withHttpTransferCacheOptions, withI18nSupport, withIncrementalHydration, withNoHttpTransferCache, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserGetTestability as ɵBrowserGetTestability, DomEventsPlugin as ɵDomEventsPlugin, DomRendererFactory2 as ɵDomRendererFactory2, DomSanitizerImpl as ɵDomSanitizerImpl, HammerGesturesPlugin as ɵHammerGesturesPlugin, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, KeyEventsPlugin as ɵKeyEventsPlugin, SharedStylesHost as ɵSharedStylesHost, initDomAdapter as ɵinitDomAdapter };\n","import * as i0 from '@angular/core';\nimport { inject, PLATFORM_ID, Injectable, NgModule } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator;\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n    hasV8BreakIterator = typeof Intl !== 'undefined' && Intl.v8BreakIterator;\n}\ncatch {\n    hasV8BreakIterator = false;\n}\n/**\n * Service to detect the current platform by comparing the userAgent strings and\n * checking browser-specific global properties.\n */\nclass Platform {\n    _platformId = inject(PLATFORM_ID);\n    // We want to use the Angular platform check because if the Document is shimmed\n    // without the navigator, the following checks will fail. This is preferred because\n    // sometimes the Document may be shimmed without the user's knowledge or intention\n    /** Whether the Angular application is being rendered in the browser. */\n    isBrowser = this._platformId\n        ? isPlatformBrowser(this._platformId)\n        : typeof document === 'object' && !!document;\n    /** Whether the current browser is Microsoft Edge. */\n    EDGE = this.isBrowser && /(edge)/i.test(navigator.userAgent);\n    /** Whether the current rendering engine is Microsoft Trident. */\n    TRIDENT = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\n    // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n    /** Whether the current rendering engine is Blink. */\n    BLINK = this.isBrowser &&\n        !!(window.chrome || hasV8BreakIterator) &&\n        typeof CSS !== 'undefined' &&\n        !this.EDGE &&\n        !this.TRIDENT;\n    // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n    // ensure that Webkit runs standalone and is not used as another engine's base.\n    /** Whether the current rendering engine is WebKit. */\n    WEBKIT = this.isBrowser &&\n        /AppleWebKit/i.test(navigator.userAgent) &&\n        !this.BLINK &&\n        !this.EDGE &&\n        !this.TRIDENT;\n    /** Whether the current platform is Apple iOS. */\n    IOS = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n    // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n    // them self as Gecko-like browsers and modify the userAgent's according to that.\n    // Since we only cover one explicit Firefox case, we can simply check for Firefox\n    // instead of having an unstable check for Gecko.\n    /** Whether the current browser is Firefox. */\n    FIREFOX = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\n    /** Whether the current platform is Android. */\n    // Trident on mobile adds the android platform to the userAgent to trick detections.\n    ANDROID = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;\n    // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n    // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n    // Safari browser should also use Webkit as its layout engine.\n    /** Whether the current browser is Safari. */\n    SAFARI = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;\n    constructor() { }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Platform, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Platform, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Platform, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\nclass PlatformModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: PlatformModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: PlatformModule });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: PlatformModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: PlatformModule, decorators: [{\n            type: NgModule,\n            args: [{}]\n        }] });\n\n/** Cached result Set of input types support by the current browser. */\nlet supportedInputTypes;\n/** Types of `<input>` that *might* be supported. */\nconst candidateInputTypes = [\n    // `color` must come first. Chrome 56 shows a warning if we change the type to `color` after\n    // first changing it to something else:\n    // The specified value \"\" does not conform to the required format.\n    // The format is \"#rrggbb\" where rr, gg, bb are two-digit hexadecimal numbers.\n    'color',\n    'button',\n    'checkbox',\n    'date',\n    'datetime-local',\n    'email',\n    'file',\n    'hidden',\n    'image',\n    'month',\n    'number',\n    'password',\n    'radio',\n    'range',\n    'reset',\n    'search',\n    'submit',\n    'tel',\n    'text',\n    'time',\n    'url',\n    'week',\n];\n/** @returns The input types supported by this browser. */\nfunction getSupportedInputTypes() {\n    // Result is cached.\n    if (supportedInputTypes) {\n        return supportedInputTypes;\n    }\n    // We can't check if an input type is not supported until we're on the browser, so say that\n    // everything is supported when not on the browser. We don't use `Platform` here since it's\n    // just a helper function and can't inject it.\n    if (typeof document !== 'object' || !document) {\n        supportedInputTypes = new Set(candidateInputTypes);\n        return supportedInputTypes;\n    }\n    let featureTestInput = document.createElement('input');\n    supportedInputTypes = new Set(candidateInputTypes.filter(value => {\n        featureTestInput.setAttribute('type', value);\n        return featureTestInput.type === value;\n    }));\n    return supportedInputTypes;\n}\n\n/** Cached result of whether the user's browser supports passive event listeners. */\nlet supportsPassiveEvents;\n/**\n * Checks whether the user's browser supports passive event listeners.\n * See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n */\nfunction supportsPassiveEventListeners() {\n    if (supportsPassiveEvents == null && typeof window !== 'undefined') {\n        try {\n            window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n                get: () => (supportsPassiveEvents = true),\n            }));\n        }\n        finally {\n            supportsPassiveEvents = supportsPassiveEvents || false;\n        }\n    }\n    return supportsPassiveEvents;\n}\n/**\n * Normalizes an `AddEventListener` object to something that can be passed\n * to `addEventListener` on any browser, no matter whether it supports the\n * `options` parameter.\n * @param options Object to be normalized.\n */\nfunction normalizePassiveListenerOptions(options) {\n    return supportsPassiveEventListeners() ? options : !!options.capture;\n}\n\n/** The possible ways the browser may handle the horizontal scroll axis in RTL languages. */\nvar RtlScrollAxisType;\n(function (RtlScrollAxisType) {\n    /**\n     * scrollLeft is 0 when scrolled all the way left and (scrollWidth - clientWidth) when scrolled\n     * all the way right.\n     */\n    RtlScrollAxisType[RtlScrollAxisType[\"NORMAL\"] = 0] = \"NORMAL\";\n    /**\n     * scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n     * all the way right.\n     */\n    RtlScrollAxisType[RtlScrollAxisType[\"NEGATED\"] = 1] = \"NEGATED\";\n    /**\n     * scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and 0 when scrolled\n     * all the way right.\n     */\n    RtlScrollAxisType[RtlScrollAxisType[\"INVERTED\"] = 2] = \"INVERTED\";\n})(RtlScrollAxisType || (RtlScrollAxisType = {}));\n/** Cached result of the way the browser handles the horizontal scroll axis in RTL mode. */\nlet rtlScrollAxisType;\n/** Cached result of the check that indicates whether the browser supports scroll behaviors. */\nlet scrollBehaviorSupported;\n/** Check whether the browser supports scroll behaviors. */\nfunction supportsScrollBehavior() {\n    if (scrollBehaviorSupported == null) {\n        // If we're not in the browser, it can't be supported. Also check for `Element`, because\n        // some projects stub out the global `document` during SSR which can throw us off.\n        if (typeof document !== 'object' || !document || typeof Element !== 'function' || !Element) {\n            scrollBehaviorSupported = false;\n            return scrollBehaviorSupported;\n        }\n        // If the element can have a `scrollBehavior` style, we can be sure that it's supported.\n        if ('scrollBehavior' in document.documentElement.style) {\n            scrollBehaviorSupported = true;\n        }\n        else {\n            // At this point we have 3 possibilities: `scrollTo` isn't supported at all, it's\n            // supported but it doesn't handle scroll behavior, or it has been polyfilled.\n            const scrollToFunction = Element.prototype.scrollTo;\n            if (scrollToFunction) {\n                // We can detect if the function has been polyfilled by calling `toString` on it. Native\n                // functions are obfuscated using `[native code]`, whereas if it was overwritten we'd get\n                // the actual function source. Via https://davidwalsh.name/detect-native-function. Consider\n                // polyfilled functions as supporting scroll behavior.\n                scrollBehaviorSupported = !/\\{\\s*\\[native code\\]\\s*\\}/.test(scrollToFunction.toString());\n            }\n            else {\n                scrollBehaviorSupported = false;\n            }\n        }\n    }\n    return scrollBehaviorSupported;\n}\n/**\n * Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL,\n * Firefox & Safari are NEGATED, and IE & Edge are INVERTED.\n */\nfunction getRtlScrollAxisType() {\n    // We can't check unless we're on the browser. Just assume 'normal' if we're not.\n    if (typeof document !== 'object' || !document) {\n        return RtlScrollAxisType.NORMAL;\n    }\n    if (rtlScrollAxisType == null) {\n        // Create a 1px wide scrolling container and a 2px wide content element.\n        const scrollContainer = document.createElement('div');\n        const containerStyle = scrollContainer.style;\n        scrollContainer.dir = 'rtl';\n        containerStyle.width = '1px';\n        containerStyle.overflow = 'auto';\n        containerStyle.visibility = 'hidden';\n        containerStyle.pointerEvents = 'none';\n        containerStyle.position = 'absolute';\n        const content = document.createElement('div');\n        const contentStyle = content.style;\n        contentStyle.width = '2px';\n        contentStyle.height = '1px';\n        scrollContainer.appendChild(content);\n        document.body.appendChild(scrollContainer);\n        rtlScrollAxisType = RtlScrollAxisType.NORMAL;\n        // The viewport starts scrolled all the way to the right in RTL mode. If we are in a NORMAL\n        // browser this would mean that the scrollLeft should be 1. If it's zero instead we know we're\n        // dealing with one of the other two types of browsers.\n        if (scrollContainer.scrollLeft === 0) {\n            // In a NEGATED browser the scrollLeft is always somewhere in [-maxScrollAmount, 0]. For an\n            // INVERTED browser it is always somewhere in [0, maxScrollAmount]. We can determine which by\n            // setting to the scrollLeft to 1. This is past the max for a NEGATED browser, so it will\n            // return 0 when we read it again.\n            scrollContainer.scrollLeft = 1;\n            rtlScrollAxisType =\n                scrollContainer.scrollLeft === 0 ? RtlScrollAxisType.NEGATED : RtlScrollAxisType.INVERTED;\n        }\n        scrollContainer.remove();\n    }\n    return rtlScrollAxisType;\n}\n\nlet shadowDomIsSupported;\n/** Checks whether the user's browser support Shadow DOM. */\nfunction _supportsShadowDom() {\n    if (shadowDomIsSupported == null) {\n        const head = typeof document !== 'undefined' ? document.head : null;\n        shadowDomIsSupported = !!(head && (head.createShadowRoot || head.attachShadow));\n    }\n    return shadowDomIsSupported;\n}\n/** Gets the shadow root of an element, if supported and the element is inside the Shadow DOM. */\nfunction _getShadowRoot(element) {\n    if (_supportsShadowDom()) {\n        const rootNode = element.getRootNode ? element.getRootNode() : null;\n        // Note that this should be caught by `_supportsShadowDom`, but some\n        // teams have been able to hit this code path on unsupported browsers.\n        if (typeof ShadowRoot !== 'undefined' && ShadowRoot && rootNode instanceof ShadowRoot) {\n            return rootNode;\n        }\n    }\n    return null;\n}\n/**\n * Gets the currently-focused element on the page while\n * also piercing through Shadow DOM boundaries.\n */\nfunction _getFocusedElementPierceShadowDom() {\n    let activeElement = typeof document !== 'undefined' && document\n        ? document.activeElement\n        : null;\n    while (activeElement && activeElement.shadowRoot) {\n        const newActiveElement = activeElement.shadowRoot.activeElement;\n        if (newActiveElement === activeElement) {\n            break;\n        }\n        else {\n            activeElement = newActiveElement;\n        }\n    }\n    return activeElement;\n}\n/** Gets the target of an event while accounting for Shadow DOM. */\nfunction _getEventTarget(event) {\n    // If an event is bound outside the Shadow DOM, the `event.target` will\n    // point to the shadow root so we have to use `composedPath` instead.\n    return (event.composedPath ? event.composedPath()[0] : event.target);\n}\n\n/** Gets whether the code is currently running in a test environment. */\nfunction _isTestEnvironment() {\n    // We can't use `declare const` because it causes conflicts inside Google with the real typings\n    // for these symbols and we can't read them off the global object, because they don't appear to\n    // be attached there for some runners like Jest.\n    // (see: https://github.com/angular/components/issues/23365#issuecomment-938146643)\n    return (\n    // @ts-ignore\n    (typeof __karma__ !== 'undefined' && !!__karma__) ||\n        // @ts-ignore\n        (typeof jasmine !== 'undefined' && !!jasmine) ||\n        // @ts-ignore\n        (typeof jest !== 'undefined' && !!jest) ||\n        // @ts-ignore\n        (typeof Mocha !== 'undefined' && !!Mocha));\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Platform, PlatformModule, RtlScrollAxisType, _getEventTarget, _getFocusedElementPierceShadowDom, _getShadowRoot, _isTestEnvironment, _supportsShadowDom, getRtlScrollAxisType, getSupportedInputTypes, normalizePassiveListenerOptions, supportsPassiveEventListeners, supportsScrollBehavior };\n","import * as i0 from '@angular/core';\nimport { inject, Injector, EnvironmentInjector, ApplicationRef, createComponent, Injectable, Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\n\n/** Apps in which we've loaded styles. */\nconst appsWithLoaders = new WeakMap();\n/**\n * Service that loads structural styles dynamically\n * and ensures that they're only loaded once per app.\n */\nclass _CdkPrivateStyleLoader {\n    _appRef;\n    _injector = inject(Injector);\n    _environmentInjector = inject(EnvironmentInjector);\n    /**\n     * Loads a set of styles.\n     * @param loader Component which will be instantiated to load the styles.\n     */\n    load(loader) {\n        // Resolve the app ref lazily to avoid circular dependency errors if this is called too early.\n        const appRef = (this._appRef = this._appRef || this._injector.get(ApplicationRef));\n        let data = appsWithLoaders.get(appRef);\n        // If we haven't loaded for this app before, we have to initialize it.\n        if (!data) {\n            data = { loaders: new Set(), refs: [] };\n            appsWithLoaders.set(appRef, data);\n            // When the app is destroyed, we need to clean up all the related loaders.\n            appRef.onDestroy(() => {\n                appsWithLoaders.get(appRef)?.refs.forEach(ref => ref.destroy());\n                appsWithLoaders.delete(appRef);\n            });\n        }\n        // If the loader hasn't been loaded before, we need to instatiate it.\n        if (!data.loaders.has(loader)) {\n            data.loaders.add(loader);\n            data.refs.push(createComponent(loader, { environmentInjector: this._environmentInjector }));\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _CdkPrivateStyleLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _CdkPrivateStyleLoader, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _CdkPrivateStyleLoader, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n\n/**\n * Component used to load the .cdk-visually-hidden styles.\n * @docs-private\n */\nclass _VisuallyHiddenLoader {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _VisuallyHiddenLoader, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: _VisuallyHiddenLoader, isStandalone: true, selector: \"ng-component\", exportAs: [\"cdkVisuallyHidden\"], ngImport: i0, template: '', isInline: true, styles: [\".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _VisuallyHiddenLoader, decorators: [{\n            type: Component,\n            args: [{ exportAs: 'cdkVisuallyHidden', encapsulation: ViewEncapsulation.None, template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}\"] }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { _CdkPrivateStyleLoader, _VisuallyHiddenLoader };\n","const MAC_ENTER = 3;\nconst BACKSPACE = 8;\nconst TAB = 9;\nconst NUM_CENTER = 12;\nconst ENTER = 13;\nconst SHIFT = 16;\nconst CONTROL = 17;\nconst ALT = 18;\nconst PAUSE = 19;\nconst CAPS_LOCK = 20;\nconst ESCAPE = 27;\nconst SPACE = 32;\nconst PAGE_UP = 33;\nconst PAGE_DOWN = 34;\nconst END = 35;\nconst HOME = 36;\nconst LEFT_ARROW = 37;\nconst UP_ARROW = 38;\nconst RIGHT_ARROW = 39;\nconst DOWN_ARROW = 40;\nconst PLUS_SIGN = 43;\nconst PRINT_SCREEN = 44;\nconst INSERT = 45;\nconst DELETE = 46;\nconst ZERO = 48;\nconst ONE = 49;\nconst TWO = 50;\nconst THREE = 51;\nconst FOUR = 52;\nconst FIVE = 53;\nconst SIX = 54;\nconst SEVEN = 55;\nconst EIGHT = 56;\nconst NINE = 57;\nconst FF_SEMICOLON = 59; // Firefox (Gecko) fires this for semicolon instead of 186\nconst FF_EQUALS = 61; // Firefox (Gecko) fires this for equals instead of 187\nconst QUESTION_MARK = 63;\nconst AT_SIGN = 64;\nconst A = 65;\nconst B = 66;\nconst C = 67;\nconst D = 68;\nconst E = 69;\nconst F = 70;\nconst G = 71;\nconst H = 72;\nconst I = 73;\nconst J = 74;\nconst K = 75;\nconst L = 76;\nconst M = 77;\nconst N = 78;\nconst O = 79;\nconst P = 80;\nconst Q = 81;\nconst R = 82;\nconst S = 83;\nconst T = 84;\nconst U = 85;\nconst V = 86;\nconst W = 87;\nconst X = 88;\nconst Y = 89;\nconst Z = 90;\nconst META = 91; // WIN_KEY_LEFT\nconst MAC_WK_CMD_LEFT = 91;\nconst MAC_WK_CMD_RIGHT = 93;\nconst CONTEXT_MENU = 93;\nconst NUMPAD_ZERO = 96;\nconst NUMPAD_ONE = 97;\nconst NUMPAD_TWO = 98;\nconst NUMPAD_THREE = 99;\nconst NUMPAD_FOUR = 100;\nconst NUMPAD_FIVE = 101;\nconst NUMPAD_SIX = 102;\nconst NUMPAD_SEVEN = 103;\nconst NUMPAD_EIGHT = 104;\nconst NUMPAD_NINE = 105;\nconst NUMPAD_MULTIPLY = 106;\nconst NUMPAD_PLUS = 107;\nconst NUMPAD_MINUS = 109;\nconst NUMPAD_PERIOD = 110;\nconst NUMPAD_DIVIDE = 111;\nconst F1 = 112;\nconst F2 = 113;\nconst F3 = 114;\nconst F4 = 115;\nconst F5 = 116;\nconst F6 = 117;\nconst F7 = 118;\nconst F8 = 119;\nconst F9 = 120;\nconst F10 = 121;\nconst F11 = 122;\nconst F12 = 123;\nconst NUM_LOCK = 144;\nconst SCROLL_LOCK = 145;\nconst FIRST_MEDIA = 166;\nconst FF_MINUS = 173;\nconst MUTE = 173; // Firefox (Gecko) fires 181 for MUTE\nconst VOLUME_DOWN = 174; // Firefox (Gecko) fires 182 for VOLUME_DOWN\nconst VOLUME_UP = 175; // Firefox (Gecko) fires 183 for VOLUME_UP\nconst FF_MUTE = 181;\nconst FF_VOLUME_DOWN = 182;\nconst LAST_MEDIA = 183;\nconst FF_VOLUME_UP = 183;\nconst SEMICOLON = 186; // Firefox (Gecko) fires 59 for SEMICOLON\nconst EQUALS = 187; // Firefox (Gecko) fires 61 for EQUALS\nconst COMMA = 188;\nconst DASH = 189; // Firefox (Gecko) fires 173 for DASH/MINUS\nconst PERIOD = 190;\nconst SLASH = 191;\nconst APOSTROPHE = 192;\nconst TILDE = 192;\nconst OPEN_SQUARE_BRACKET = 219;\nconst BACKSLASH = 220;\nconst CLOSE_SQUARE_BRACKET = 221;\nconst SINGLE_QUOTE = 222;\nconst MAC_META = 224;\n\n/**\n * Checks whether a modifier key is pressed.\n * @param event Event to be checked.\n */\nfunction hasModifierKey(event, ...modifiers) {\n    if (modifiers.length) {\n        return modifiers.some(modifier => event[modifier]);\n    }\n    return event.altKey || event.shiftKey || event.ctrlKey || event.metaKey;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { A, ALT, APOSTROPHE, AT_SIGN, B, BACKSLASH, BACKSPACE, C, CAPS_LOCK, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, D, DASH, DELETE, DOWN_ARROW, E, EIGHT, END, ENTER, EQUALS, ESCAPE, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, FF_EQUALS, FF_MINUS, FF_MUTE, FF_SEMICOLON, FF_VOLUME_DOWN, FF_VOLUME_UP, FIRST_MEDIA, FIVE, FOUR, G, H, HOME, I, INSERT, J, K, L, LAST_MEDIA, LEFT_ARROW, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, META, MUTE, N, NINE, NUMPAD_DIVIDE, NUMPAD_EIGHT, NUMPAD_FIVE, NUMPAD_FOUR, NUMPAD_MINUS, NUMPAD_MULTIPLY, NUMPAD_NINE, NUMPAD_ONE, NUMPAD_PERIOD, NUMPAD_PLUS, NUMPAD_SEVEN, NUMPAD_SIX, NUMPAD_THREE, NUMPAD_TWO, NUMPAD_ZERO, NUM_CENTER, NUM_LOCK, O, ONE, OPEN_SQUARE_BRACKET, P, PAGE_DOWN, PAGE_UP, PAUSE, PERIOD, PLUS_SIGN, PRINT_SCREEN, Q, QUESTION_MARK, R, RIGHT_ARROW, S, SCROLL_LOCK, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SPACE, T, TAB, THREE, TILDE, TWO, U, UP_ARROW, V, VOLUME_DOWN, VOLUME_UP, W, X, Y, Z, ZERO, hasModifierKey };\n","import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n    return value && isFunction(value.schedule);\n}\n","import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n    return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n    return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n    return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n    return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n  extendStatics = Object.setPrototypeOf ||\n      ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n      function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n  return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n  if (typeof b !== \"function\" && b !== null)\n      throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n  extendStatics(d, b);\n  function __() { this.constructor = d; }\n  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n  __assign = Object.assign || function __assign(t) {\n      for (var s, i = 1, n = arguments.length; i < n; i++) {\n          s = arguments[i];\n          for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n      }\n      return t;\n  }\n  return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n      t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n      for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n              t[p[i]] = s[p[i]];\n      }\n  return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n  if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n  return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n  return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n  function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n  var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n  var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n  var _, done = false;\n  for (var i = decorators.length - 1; i >= 0; i--) {\n      var context = {};\n      for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n      for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n      context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n      var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n      if (kind === \"accessor\") {\n          if (result === void 0) continue;\n          if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n          if (_ = accept(result.get)) descriptor.get = _;\n          if (_ = accept(result.set)) descriptor.set = _;\n          if (_ = accept(result.init)) initializers.unshift(_);\n      }\n      else if (_ = accept(result)) {\n          if (kind === \"field\") initializers.unshift(_);\n          else descriptor[key] = _;\n      }\n  }\n  if (target) Object.defineProperty(target, contextIn.name, descriptor);\n  done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n  var useValue = arguments.length > 2;\n  for (var i = 0; i < initializers.length; i++) {\n      value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n  }\n  return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n  return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n  if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n  return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n  if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n  return new (P || (P = Promise))(function (resolve, reject) {\n      function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n      function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n      function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n      step((generator = generator.apply(thisArg, _arguments || [])).next());\n  });\n}\n\nexport function __generator(thisArg, body) {\n  var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n  return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n  function verb(n) { return function (v) { return step([n, v]); }; }\n  function step(op) {\n      if (f) throw new TypeError(\"Generator is already executing.\");\n      while (g && (g = 0, op[0] && (_ = 0)), _) try {\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;\n          if (y = 0, t) op = [op[0] & 2, t.value];\n          switch (op[0]) {\n              case 0: case 1: t = op; break;\n              case 4: _.label++; return { value: op[1], done: false };\n              case 5: _.label++; y = op[1]; op = [0]; continue;\n              case 7: op = _.ops.pop(); _.trys.pop(); continue;\n              default:\n                  if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                  if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                  if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                  if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                  if (t[2]) _.ops.pop();\n                  _.trys.pop(); continue;\n          }\n          op = body.call(thisArg, _);\n      } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n      if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n  }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n  if (k2 === undefined) k2 = k;\n  var desc = Object.getOwnPropertyDescriptor(m, k);\n  if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n  }\n  Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n  if (k2 === undefined) k2 = k;\n  o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n  for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n  var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n  if (m) return m.call(o);\n  if (o && typeof o.length === \"number\") return {\n      next: function () {\n          if (o && i >= o.length) o = void 0;\n          return { value: o && o[i++], done: !o };\n      }\n  };\n  throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n  var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n  if (!m) return o;\n  var i = m.call(o), r, ar = [], e;\n  try {\n      while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n  }\n  catch (error) { e = { error: error }; }\n  finally {\n      try {\n          if (r && !r.done && (m = i[\"return\"])) m.call(i);\n      }\n      finally { if (e) throw e.error; }\n  }\n  return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n  for (var ar = [], i = 0; i < arguments.length; i++)\n      ar = ar.concat(__read(arguments[i]));\n  return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n  for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n  for (var r = Array(s), k = 0, i = 0; i < il; i++)\n      for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n          r[k] = a[j];\n  return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n      if (ar || !(i in from)) {\n          if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n          ar[i] = from[i];\n      }\n  }\n  return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n  return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n  if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n  var g = generator.apply(thisArg, _arguments || []), i, q = [];\n  return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n  function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n  function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n  function fulfill(value) { resume(\"next\", value); }\n  function reject(value) { resume(\"throw\", value); }\n  function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n  var i, p;\n  return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n  function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n  if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n  var m = o[Symbol.asyncIterator], i;\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);\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); }); }; }\n  function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n  if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n  return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n  Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n  o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n  ownKeys = Object.getOwnPropertyNames || function (o) {\n    var ar = [];\n    for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n    return ar;\n  };\n  return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n  if (mod && mod.__esModule) return mod;\n  var result = {};\n  if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n  __setModuleDefault(result, mod);\n  return result;\n}\n\nexport function __importDefault(mod) {\n  return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n  if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n  if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n  return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n  if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n  if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n  if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n  return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n  if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n  return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n  if (value !== null && value !== void 0) {\n    if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n    var dispose, inner;\n    if (async) {\n      if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n      dispose = value[Symbol.asyncDispose];\n    }\n    if (dispose === void 0) {\n      if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n      dispose = value[Symbol.dispose];\n      if (async) inner = dispose;\n    }\n    if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n    if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n    env.stack.push({ value: value, dispose: dispose, async: async });\n  }\n  else if (async) {\n    env.stack.push({ async: true });\n  }\n  return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n  var e = new Error(message);\n  return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n  function fail(e) {\n    env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n    env.hasError = true;\n  }\n  var r, s = 0;\n  function next() {\n    while (r = env.stack.pop()) {\n      try {\n        if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n        if (r.dispose) {\n          var result = r.dispose.call(r.value);\n          if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n        }\n        else s |= 1;\n      }\n      catch (e) {\n        fail(e);\n      }\n    }\n    if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n    if (env.hasError) throw env.error;\n  }\n  return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n  if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n      return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n          return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n      });\n  }\n  return path;\n}\n\nexport default {\n  __extends,\n  __assign,\n  __rest,\n  __decorate,\n  __param,\n  __esDecorate,\n  __runInitializers,\n  __propKey,\n  __setFunctionName,\n  __metadata,\n  __awaiter,\n  __generator,\n  __createBinding,\n  __exportStar,\n  __values,\n  __read,\n  __spread,\n  __spreadArrays,\n  __spreadArray,\n  __await,\n  __asyncGenerator,\n  __asyncDelegator,\n  __asyncValues,\n  __makeTemplateObject,\n  __importStar,\n  __importDefault,\n  __classPrivateFieldGet,\n  __classPrivateFieldSet,\n  __classPrivateFieldIn,\n  __addDisposableResource,\n  __disposeResources,\n  __rewriteRelativeImportExtension,\n};\n","export const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function');\n","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n    return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n    return isFunction(input[Symbol_observable]);\n}\n","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n    return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n","export function createInvalidObservableTypeError(input) {\n    return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`);\n}\n","export function getSymbolIterator() {\n    if (typeof Symbol !== 'function' || !Symbol.iterator) {\n        return '@@iterator';\n    }\n    return Symbol.iterator;\n}\nexport const iterator = getSymbolIterator();\n","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n    return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n","import { __asyncGenerator, __await } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n    return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() {\n        const reader = readableStream.getReader();\n        try {\n            while (true) {\n                const { value, done } = yield __await(reader.read());\n                if (done) {\n                    return yield __await(void 0);\n                }\n                yield yield __await(value);\n            }\n        }\n        finally {\n            reader.releaseLock();\n        }\n    });\n}\nexport function isReadableStreamLike(obj) {\n    return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n","import { __asyncValues, __awaiter } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n    if (input instanceof Observable) {\n        return input;\n    }\n    if (input != null) {\n        if (isInteropObservable(input)) {\n            return fromInteropObservable(input);\n        }\n        if (isArrayLike(input)) {\n            return fromArrayLike(input);\n        }\n        if (isPromise(input)) {\n            return fromPromise(input);\n        }\n        if (isAsyncIterable(input)) {\n            return fromAsyncIterable(input);\n        }\n        if (isIterable(input)) {\n            return fromIterable(input);\n        }\n        if (isReadableStreamLike(input)) {\n            return fromReadableStreamLike(input);\n        }\n    }\n    throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n    return new Observable((subscriber) => {\n        const obs = obj[Symbol_observable]();\n        if (isFunction(obs.subscribe)) {\n            return obs.subscribe(subscriber);\n        }\n        throw new TypeError('Provided object does not correctly implement Symbol.observable');\n    });\n}\nexport function fromArrayLike(array) {\n    return new Observable((subscriber) => {\n        for (let i = 0; i < array.length && !subscriber.closed; i++) {\n            subscriber.next(array[i]);\n        }\n        subscriber.complete();\n    });\n}\nexport function fromPromise(promise) {\n    return new Observable((subscriber) => {\n        promise\n            .then((value) => {\n            if (!subscriber.closed) {\n                subscriber.next(value);\n                subscriber.complete();\n            }\n        }, (err) => subscriber.error(err))\n            .then(null, reportUnhandledError);\n    });\n}\nexport function fromIterable(iterable) {\n    return new Observable((subscriber) => {\n        for (const value of iterable) {\n            subscriber.next(value);\n            if (subscriber.closed) {\n                return;\n            }\n        }\n        subscriber.complete();\n    });\n}\nexport function fromAsyncIterable(asyncIterable) {\n    return new Observable((subscriber) => {\n        process(asyncIterable, subscriber).catch((err) => subscriber.error(err));\n    });\n}\nexport function fromReadableStreamLike(readableStream) {\n    return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n    var asyncIterable_1, asyncIterable_1_1;\n    var e_1, _a;\n    return __awaiter(this, void 0, void 0, function* () {\n        try {\n            for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) {\n                const value = asyncIterable_1_1.value;\n                subscriber.next(value);\n                if (subscriber.closed) {\n                    return;\n                }\n            }\n        }\n        catch (e_1_1) { e_1 = { error: e_1_1 }; }\n        finally {\n            try {\n                if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1);\n            }\n            finally { if (e_1) throw e_1.error; }\n        }\n        subscriber.complete();\n    });\n}\n","export function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) {\n    const scheduleSubscription = scheduler.schedule(function () {\n        work();\n        if (repeat) {\n            parentSubscription.add(this.schedule(null, delay));\n        }\n        else {\n            this.unsubscribe();\n        }\n    }, delay);\n    parentSubscription.add(scheduleSubscription);\n    if (!repeat) {\n        return scheduleSubscription;\n    }\n}\n","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay = 0) {\n    return operate((source, subscriber) => {\n        source.subscribe(createOperatorSubscriber(subscriber, (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay)));\n    });\n}\n","import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay = 0) {\n    return operate((source, subscriber) => {\n        subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay));\n    });\n}\n","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n    if (!input) {\n        throw new Error('Iterable cannot be null');\n    }\n    return new Observable((subscriber) => {\n        executeSchedule(subscriber, scheduler, () => {\n            const iterator = input[Symbol.asyncIterator]();\n            executeSchedule(subscriber, scheduler, () => {\n                iterator.next().then((result) => {\n                    if (result.done) {\n                        subscriber.complete();\n                    }\n                    else {\n                        subscriber.next(result.value);\n                    }\n                });\n            }, 0, true);\n        });\n    });\n}\n","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n    return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n    if (input != null) {\n        if (isInteropObservable(input)) {\n            return scheduleObservable(input, scheduler);\n        }\n        if (isArrayLike(input)) {\n            return scheduleArray(input, scheduler);\n        }\n        if (isPromise(input)) {\n            return schedulePromise(input, scheduler);\n        }\n        if (isAsyncIterable(input)) {\n            return scheduleAsyncIterable(input, scheduler);\n        }\n        if (isIterable(input)) {\n            return scheduleIterable(input, scheduler);\n        }\n        if (isReadableStreamLike(input)) {\n            return scheduleReadableStreamLike(input, scheduler);\n        }\n    }\n    throw createInvalidObservableTypeError(input);\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n    return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n    return new Observable((subscriber) => {\n        let i = 0;\n        return scheduler.schedule(function () {\n            if (i === input.length) {\n                subscriber.complete();\n            }\n            else {\n                subscriber.next(input[i++]);\n                if (!subscriber.closed) {\n                    this.schedule();\n                }\n            }\n        });\n    });\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n    return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n    return new Observable((subscriber) => {\n        let iterator;\n        executeSchedule(subscriber, scheduler, () => {\n            iterator = input[Symbol_iterator]();\n            executeSchedule(subscriber, scheduler, () => {\n                let value;\n                let done;\n                try {\n                    ({ value, done } = iterator.next());\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                }\n            }, 0, true);\n        });\n        return () => isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return();\n    });\n}\n","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n    return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of(...args) {\n    const scheduler = popScheduler(args);\n    return from(args, scheduler);\n}\n","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n    const tapObserver = isFunction(observerOrNext) || error || complete\n        ?\n            { next: observerOrNext, error, complete }\n        : observerOrNext;\n    return tapObserver\n        ? operate((source, subscriber) => {\n            var _a;\n            (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n            let isUnsub = true;\n            source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n                var _a;\n                (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n                subscriber.next(value);\n            }, () => {\n                var _a;\n                isUnsub = false;\n                (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n                subscriber.complete();\n            }, (err) => {\n                var _a;\n                isUnsub = false;\n                (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n                subscriber.error(err);\n            }, () => {\n                var _a, _b;\n                if (isUnsub) {\n                    (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n                }\n                (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n            }));\n        })\n        :\n            identity;\n}\n","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n    constructor(scheduler, work) {\n        super();\n    }\n    schedule(state, delay = 0) {\n        return this;\n    }\n}\n","export const intervalProvider = {\n    setInterval(handler, timeout, ...args) {\n        const { delegate } = intervalProvider;\n        if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n            return delegate.setInterval(handler, timeout, ...args);\n        }\n        return setInterval(handler, timeout, ...args);\n    },\n    clearInterval(handle) {\n        const { delegate } = intervalProvider;\n        return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n    },\n    delegate: undefined,\n};\n","import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n    constructor(scheduler, work) {\n        super(scheduler, work);\n        this.scheduler = scheduler;\n        this.work = work;\n        this.pending = false;\n    }\n    schedule(state, delay = 0) {\n        var _a;\n        if (this.closed) {\n            return this;\n        }\n        this.state = state;\n        const id = this.id;\n        const scheduler = this.scheduler;\n        if (id != null) {\n            this.id = this.recycleAsyncId(scheduler, id, delay);\n        }\n        this.pending = true;\n        this.delay = delay;\n        this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n        return this;\n    }\n    requestAsyncId(scheduler, _id, delay = 0) {\n        return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n    }\n    recycleAsyncId(_scheduler, id, delay = 0) {\n        if (delay != null && this.delay === delay && this.pending === false) {\n            return id;\n        }\n        if (id != null) {\n            intervalProvider.clearInterval(id);\n        }\n        return undefined;\n    }\n    execute(state, delay) {\n        if (this.closed) {\n            return new Error('executing a cancelled action');\n        }\n        this.pending = false;\n        const error = this._execute(state, delay);\n        if (error) {\n            return error;\n        }\n        else if (this.pending === false && this.id != null) {\n            this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n        }\n    }\n    _execute(state, _delay) {\n        let errored = false;\n        let errorValue;\n        try {\n            this.work(state);\n        }\n        catch (e) {\n            errored = true;\n            errorValue = e ? e : new Error('Scheduled action threw falsy error');\n        }\n        if (errored) {\n            this.unsubscribe();\n            return errorValue;\n        }\n    }\n    unsubscribe() {\n        if (!this.closed) {\n            const { id, scheduler } = this;\n            const { actions } = scheduler;\n            this.work = this.state = this.scheduler = null;\n            this.pending = false;\n            arrRemove(actions, this);\n            if (id != null) {\n                this.id = this.recycleAsyncId(scheduler, id, null);\n            }\n            this.delay = null;\n            super.unsubscribe();\n        }\n    }\n}\n","export const dateTimestampProvider = {\n    now() {\n        return (dateTimestampProvider.delegate || Date).now();\n    },\n    delegate: undefined,\n};\n","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n    constructor(schedulerActionCtor, now = Scheduler.now) {\n        this.schedulerActionCtor = schedulerActionCtor;\n        this.now = now;\n    }\n    schedule(work, delay = 0, state) {\n        return new this.schedulerActionCtor(this, work).schedule(state, delay);\n    }\n}\nScheduler.now = dateTimestampProvider.now;\n","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n    constructor(SchedulerAction, now = Scheduler.now) {\n        super(SchedulerAction, now);\n        this.actions = [];\n        this._active = false;\n    }\n    flush(action) {\n        const { actions } = this;\n        if (this._active) {\n            actions.push(action);\n            return;\n        }\n        let error;\n        this._active = true;\n        do {\n            if ((error = action.execute(action.state, action.delay))) {\n                break;\n            }\n        } while ((action = actions.shift()));\n        this._active = false;\n        if (error) {\n            while ((action = actions.shift())) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler = asyncScheduler) {\n    return operate((source, subscriber) => {\n        let activeTask = null;\n        let lastValue = null;\n        let lastTime = null;\n        const emit = () => {\n            if (activeTask) {\n                activeTask.unsubscribe();\n                activeTask = null;\n                const value = lastValue;\n                lastValue = null;\n                subscriber.next(value);\n            }\n        };\n        function emitWhenIdle() {\n            const targetTime = lastTime + dueTime;\n            const now = scheduler.now();\n            if (now < targetTime) {\n                activeTask = this.schedule(undefined, targetTime - now);\n                subscriber.add(activeTask);\n                return;\n            }\n            emit();\n        }\n        source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n            lastValue = value;\n            lastTime = scheduler.now();\n            if (!activeTask) {\n                activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n                subscriber.add(activeTask);\n            }\n        }, () => {\n            emit();\n            subscriber.complete();\n        }, undefined, () => {\n            lastValue = activeTask = null;\n        }));\n    });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n    return operate((source, subscriber) => {\n        let index = 0;\n        source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));\n    });\n}\n","import { Observable } from '../Observable';\nexport const EMPTY = new Observable((subscriber) => subscriber.complete());\nexport function empty(scheduler) {\n    return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n    return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n    return count <= 0\n        ?\n            () => EMPTY\n        : operate((source, subscriber) => {\n            let seen = 0;\n            source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n                if (++seen <= count) {\n                    subscriber.next(value);\n                    if (count <= seen) {\n                        subscriber.complete();\n                    }\n                }\n            }));\n        });\n}\n","import { filter } from './filter';\nexport function skip(count) {\n    return filter((_, index) => count <= index);\n}\n","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n    comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n    return operate((source, subscriber) => {\n        let previousKey;\n        let first = true;\n        source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n            const currentKey = keySelector(value);\n            if (first || !comparator(previousKey, currentKey)) {\n                first = false;\n                previousKey = currentKey;\n                subscriber.next(value);\n            }\n        }));\n    });\n}\nfunction defaultCompare(a, b) {\n    return a === b;\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n    return operate((source, subscriber) => {\n        innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n        !subscriber.closed && source.subscribe(subscriber);\n    });\n}\n","import { coerceElement, coerceNumberProperty } from '@angular/cdk/coercion';\nimport * as i0 from '@angular/core';\nimport { Injectable, inject, NgZone, ElementRef, EventEmitter, booleanAttribute, Directive, Output, Input, NgModule } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { map, filter, debounceTime } from 'rxjs/operators';\n\n// Angular may add, remove, or edit comment nodes during change detection. We don't care about\n// these changes because they don't affect the user-preceived content, and worse it can cause\n// infinite change detection cycles where the change detection updates a comment, triggering the\n// MutationObserver, triggering another change detection and kicking the cycle off again.\nfunction shouldIgnoreRecord(record) {\n    // Ignore changes to comment text.\n    if (record.type === 'characterData' && record.target instanceof Comment) {\n        return true;\n    }\n    // Ignore addition / removal of comments.\n    if (record.type === 'childList') {\n        for (let i = 0; i < record.addedNodes.length; i++) {\n            if (!(record.addedNodes[i] instanceof Comment)) {\n                return false;\n            }\n        }\n        for (let i = 0; i < record.removedNodes.length; i++) {\n            if (!(record.removedNodes[i] instanceof Comment)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    // Observe everything else.\n    return false;\n}\n/**\n * Factory that creates a new MutationObserver and allows us to stub it out in unit tests.\n * @docs-private\n */\nclass MutationObserverFactory {\n    create(callback) {\n        return typeof MutationObserver === 'undefined' ? null : new MutationObserver(callback);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MutationObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MutationObserverFactory, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MutationObserverFactory, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n/** An injectable service that allows watching elements for changes to their content. */\nclass ContentObserver {\n    _mutationObserverFactory = inject(MutationObserverFactory);\n    /** Keeps track of the existing MutationObservers so they can be reused. */\n    _observedElements = new Map();\n    _ngZone = inject(NgZone);\n    constructor() { }\n    ngOnDestroy() {\n        this._observedElements.forEach((_, element) => this._cleanupObserver(element));\n    }\n    observe(elementOrRef) {\n        const element = coerceElement(elementOrRef);\n        return new Observable((observer) => {\n            const stream = this._observeElement(element);\n            const subscription = stream\n                .pipe(map(records => records.filter(record => !shouldIgnoreRecord(record))), filter(records => !!records.length))\n                .subscribe(records => {\n                this._ngZone.run(() => {\n                    observer.next(records);\n                });\n            });\n            return () => {\n                subscription.unsubscribe();\n                this._unobserveElement(element);\n            };\n        });\n    }\n    /**\n     * Observes the given element by using the existing MutationObserver if available, or creating a\n     * new one if not.\n     */\n    _observeElement(element) {\n        return this._ngZone.runOutsideAngular(() => {\n            if (!this._observedElements.has(element)) {\n                const stream = new Subject();\n                const observer = this._mutationObserverFactory.create(mutations => stream.next(mutations));\n                if (observer) {\n                    observer.observe(element, {\n                        characterData: true,\n                        childList: true,\n                        subtree: true,\n                    });\n                }\n                this._observedElements.set(element, { observer, stream, count: 1 });\n            }\n            else {\n                this._observedElements.get(element).count++;\n            }\n            return this._observedElements.get(element).stream;\n        });\n    }\n    /**\n     * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is\n     * observing this element.\n     */\n    _unobserveElement(element) {\n        if (this._observedElements.has(element)) {\n            this._observedElements.get(element).count--;\n            if (!this._observedElements.get(element).count) {\n                this._cleanupObserver(element);\n            }\n        }\n    }\n    /** Clean up the underlying MutationObserver for the specified element. */\n    _cleanupObserver(element) {\n        if (this._observedElements.has(element)) {\n            const { observer, stream } = this._observedElements.get(element);\n            if (observer) {\n                observer.disconnect();\n            }\n            stream.complete();\n            this._observedElements.delete(element);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ContentObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ContentObserver, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ContentObserver, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n/**\n * Directive that triggers a callback whenever the content of\n * its associated element has changed.\n */\nclass CdkObserveContent {\n    _contentObserver = inject(ContentObserver);\n    _elementRef = inject(ElementRef);\n    /** Event emitted for each change in the element's content. */\n    event = new EventEmitter();\n    /**\n     * Whether observing content is disabled. This option can be used\n     * to disconnect the underlying MutationObserver until it is needed.\n     */\n    get disabled() {\n        return this._disabled;\n    }\n    set disabled(value) {\n        this._disabled = value;\n        this._disabled ? this._unsubscribe() : this._subscribe();\n    }\n    _disabled = false;\n    /** Debounce interval for emitting the changes. */\n    get debounce() {\n        return this._debounce;\n    }\n    set debounce(value) {\n        this._debounce = coerceNumberProperty(value);\n        this._subscribe();\n    }\n    _debounce;\n    _currentSubscription = null;\n    constructor() { }\n    ngAfterContentInit() {\n        if (!this._currentSubscription && !this.disabled) {\n            this._subscribe();\n        }\n    }\n    ngOnDestroy() {\n        this._unsubscribe();\n    }\n    _subscribe() {\n        this._unsubscribe();\n        const stream = this._contentObserver.observe(this._elementRef);\n        this._currentSubscription = (this.debounce ? stream.pipe(debounceTime(this.debounce)) : stream).subscribe(this.event);\n    }\n    _unsubscribe() {\n        this._currentSubscription?.unsubscribe();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkObserveContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: CdkObserveContent, isStandalone: true, selector: \"[cdkObserveContent]\", inputs: { disabled: [\"cdkObserveContentDisabled\", \"disabled\", booleanAttribute], debounce: \"debounce\" }, outputs: { event: \"cdkObserveContent\" }, exportAs: [\"cdkObserveContent\"], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkObserveContent, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkObserveContent]',\n                    exportAs: 'cdkObserveContent',\n                }]\n        }], ctorParameters: () => [], propDecorators: { event: [{\n                type: Output,\n                args: ['cdkObserveContent']\n            }], disabled: [{\n                type: Input,\n                args: [{ alias: 'cdkObserveContentDisabled', transform: booleanAttribute }]\n            }], debounce: [{\n                type: Input\n            }] } });\nclass ObserversModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ObserversModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: ObserversModule, imports: [CdkObserveContent], exports: [CdkObserveContent] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ObserversModule, providers: [MutationObserverFactory] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ObserversModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [CdkObserveContent],\n                    exports: [CdkObserveContent],\n                    providers: [MutationObserverFactory],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CdkObserveContent, ContentObserver, MutationObserverFactory, ObserversModule };\n","import { ElementRef } from '@angular/core';\n\n/** Coerces a data-bound value (typically a string) to a boolean. */\nfunction coerceBooleanProperty(value) {\n    return value != null && `${value}` !== 'false';\n}\n\nfunction coerceNumberProperty(value, fallbackValue = 0) {\n    if (_isNumberValue(value)) {\n        return Number(value);\n    }\n    return arguments.length === 2 ? fallbackValue : 0;\n}\n/**\n * Whether the provided value is considered a number.\n * @docs-private\n */\nfunction _isNumberValue(value) {\n    // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n    // and other non-number values as NaN, where Number just uses 0) but it considers the string\n    // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n    return !isNaN(parseFloat(value)) && !isNaN(Number(value));\n}\n\nfunction coerceArray(value) {\n    return Array.isArray(value) ? value : [value];\n}\n\n/** Coerces a value to a CSS pixel value. */\nfunction coerceCssPixelValue(value) {\n    if (value == null) {\n        return '';\n    }\n    return typeof value === 'string' ? value : `${value}px`;\n}\n\n/**\n * Coerces an ElementRef or an Element into an element.\n * Useful for APIs that can accept either a ref or the native element itself.\n */\nfunction coerceElement(elementOrRef) {\n    return elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n}\n\n/**\n * Coerces a value to an array of trimmed non-empty strings.\n * Any input that is not an array, `null` or `undefined` will be turned into a string\n * via `toString()` and subsequently split with the given separator.\n * `null` and `undefined` will result in an empty array.\n * This results in the following outcomes:\n * - `null` -&gt; `[]`\n * - `[null]` -&gt; `[\"null\"]`\n * - `[\"a\", \"b \", \" \"]` -&gt; `[\"a\", \"b\"]`\n * - `[1, [2, 3]]` -&gt; `[\"1\", \"2,3\"]`\n * - `[{ a: 0 }]` -&gt; `[\"[object Object]\"]`\n * - `{ a: 0 }` -&gt; `[\"[object\", \"Object]\"]`\n *\n * Useful for defining CSS classes or table columns.\n * @param value the value to coerce into an array of strings\n * @param separator split-separator if value isn't an array\n */\nfunction coerceStringArray(value, separator = /\\s+/) {\n    const result = [];\n    if (value != null) {\n        const sourceValues = Array.isArray(value) ? value : `${value}`.split(separator);\n        for (const sourceValue of sourceValues) {\n            const trimmedString = `${sourceValue}`.trim();\n            if (trimmedString) {\n                result.push(trimmedString);\n            }\n        }\n    }\n    return result;\n}\n\nexport { _isNumberValue, coerceArray, coerceBooleanProperty, coerceCssPixelValue, coerceElement, coerceNumberProperty, coerceStringArray };\n","const { isArray } = Array;\nconst { getPrototypeOf, prototype: objectProto, keys: getKeys } = Object;\nexport function argsArgArrayOrObject(args) {\n    if (args.length === 1) {\n        const first = args[0];\n        if (isArray(first)) {\n            return { args: first, keys: null };\n        }\n        if (isPOJO(first)) {\n            const keys = getKeys(first);\n            return {\n                args: keys.map((key) => first[key]),\n                keys,\n            };\n        }\n    }\n    return { args: args, keys: null };\n}\nfunction isPOJO(obj) {\n    return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n","import { map } from \"../operators/map\";\nconst { isArray } = Array;\nfunction callOrApply(fn, args) {\n    return isArray(args) ? fn(...args) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n    return map(args => callOrApply(fn, args));\n}\n","export function createObject(keys, values) {\n    return keys.reduce((result, key, i) => ((result[key] = values[i]), result), {});\n}\n","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest(...args) {\n    const scheduler = popScheduler(args);\n    const resultSelector = popResultSelector(args);\n    const { args: observables, keys } = argsArgArrayOrObject(args);\n    if (observables.length === 0) {\n        return from([], scheduler);\n    }\n    const result = new Observable(combineLatestInit(observables, scheduler, keys\n        ?\n            (values) => createObject(keys, values)\n        :\n            identity));\n    return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform = identity) {\n    return (subscriber) => {\n        maybeSchedule(scheduler, () => {\n            const { length } = observables;\n            const values = new Array(length);\n            let active = length;\n            let remainingFirstValues = length;\n            for (let i = 0; i < length; i++) {\n                maybeSchedule(scheduler, () => {\n                    const source = from(observables[i], scheduler);\n                    let hasFirstValue = false;\n                    source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n                        values[i] = value;\n                        if (!hasFirstValue) {\n                            hasFirstValue = true;\n                            remainingFirstValues--;\n                        }\n                        if (!remainingFirstValues) {\n                            subscriber.next(valueTransform(values.slice()));\n                        }\n                    }, () => {\n                        if (!--active) {\n                            subscriber.complete();\n                        }\n                    }));\n                }, subscriber);\n            }\n        }, subscriber);\n    };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n    if (scheduler) {\n        executeSchedule(subscription, scheduler, execute);\n    }\n    else {\n        execute();\n    }\n}\n","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent = Infinity) {\n    if (isFunction(resultSelector)) {\n        return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n    }\n    else if (typeof resultSelector === 'number') {\n        concurrent = resultSelector;\n    }\n    return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n    const buffer = [];\n    let active = 0;\n    let index = 0;\n    let isComplete = false;\n    const checkComplete = () => {\n        if (isComplete && !buffer.length && !active) {\n            subscriber.complete();\n        }\n    };\n    const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value));\n    const doInnerSub = (value) => {\n        expand && subscriber.next(value);\n        active++;\n        let innerComplete = false;\n        innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {\n            onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n            if (expand) {\n                outerNext(innerValue);\n            }\n            else {\n                subscriber.next(innerValue);\n            }\n        }, () => {\n            innerComplete = true;\n        }, undefined, () => {\n            if (innerComplete) {\n                try {\n                    active--;\n                    while (buffer.length && active < concurrent) {\n                        const bufferedValue = buffer.shift();\n                        if (innerSubScheduler) {\n                            executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n                        }\n                        else {\n                            doInnerSub(bufferedValue);\n                        }\n                    }\n                    checkComplete();\n                }\n                catch (err) {\n                    subscriber.error(err);\n                }\n            }\n        }));\n    };\n    source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {\n        isComplete = true;\n        checkComplete();\n    }));\n    return () => {\n        additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n    };\n}\n","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Infinity) {\n    return mergeMap(identity, concurrent);\n}\n","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n    return concatAll()(from(args, popScheduler(args)));\n}\n","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n    return mergeAll(1);\n}\n","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n    const scheduler = popScheduler(values);\n    return operate((source, subscriber) => {\n        (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n    });\n}\n","import * as i0 from '@angular/core';\nimport { NgModule, inject, CSP_NONCE, Injectable, NgZone } from '@angular/core';\nimport { coerceArray } from '@angular/cdk/coercion';\nimport { Subject, combineLatest, concat, Observable } from 'rxjs';\nimport { take, skip, debounceTime, map, startWith, takeUntil } from 'rxjs/operators';\nimport { Platform } from '@angular/cdk/platform';\n\nclass LayoutModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: LayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: LayoutModule });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: LayoutModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: LayoutModule, decorators: [{\n            type: NgModule,\n            args: [{}]\n        }] });\n\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility = new Set();\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode;\n/** A utility for calling matchMedia queries. */\nclass MediaMatcher {\n    _platform = inject(Platform);\n    _nonce = inject(CSP_NONCE, { optional: true });\n    /** The internal matchMedia method to return back a MediaQueryList like object. */\n    _matchMedia;\n    constructor() {\n        this._matchMedia =\n            this._platform.isBrowser && window.matchMedia\n                ? // matchMedia is bound to the window scope intentionally as it is an illegal invocation to\n                    // call it from a different scope.\n                    window.matchMedia.bind(window)\n                : noopMatchMedia;\n    }\n    /**\n     * Evaluates the given media query and returns the native MediaQueryList from which results\n     * can be retrieved.\n     * Confirms the layout engine will trigger for the selector query provided and returns the\n     * MediaQueryList for the query provided.\n     */\n    matchMedia(query) {\n        if (this._platform.WEBKIT || this._platform.BLINK) {\n            createEmptyStyleRule(query, this._nonce);\n        }\n        return this._matchMedia(query);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MediaMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MediaMatcher, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MediaMatcher, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query, nonce) {\n    if (mediaQueriesForWebkitCompatibility.has(query)) {\n        return;\n    }\n    try {\n        if (!mediaQueryStyleNode) {\n            mediaQueryStyleNode = document.createElement('style');\n            if (nonce) {\n                mediaQueryStyleNode.setAttribute('nonce', nonce);\n            }\n            mediaQueryStyleNode.setAttribute('type', 'text/css');\n            document.head.appendChild(mediaQueryStyleNode);\n        }\n        if (mediaQueryStyleNode.sheet) {\n            mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n            mediaQueriesForWebkitCompatibility.add(query);\n        }\n    }\n    catch (e) {\n        console.error(e);\n    }\n}\n/** No-op matchMedia replacement for non-browser platforms. */\nfunction noopMatchMedia(query) {\n    // Use `as any` here to avoid adding additional necessary properties for\n    // the noop matcher.\n    return {\n        matches: query === 'all' || query === '',\n        media: query,\n        addListener: () => { },\n        removeListener: () => { },\n    };\n}\n\n/** Utility for checking the matching state of `@media` queries. */\nclass BreakpointObserver {\n    _mediaMatcher = inject(MediaMatcher);\n    _zone = inject(NgZone);\n    /**  A map of all media queries currently being listened for. */\n    _queries = new Map();\n    /** A subject for all other observables to takeUntil based on. */\n    _destroySubject = new Subject();\n    constructor() { }\n    /** Completes the active subject, signalling to all other observables to complete. */\n    ngOnDestroy() {\n        this._destroySubject.next();\n        this._destroySubject.complete();\n    }\n    /**\n     * Whether one or more media queries match the current viewport size.\n     * @param value One or more media queries to check.\n     * @returns Whether any of the media queries match.\n     */\n    isMatched(value) {\n        const queries = splitQueries(coerceArray(value));\n        return queries.some(mediaQuery => this._registerQuery(mediaQuery).mql.matches);\n    }\n    /**\n     * Gets an observable of results for the given queries that will emit new results for any changes\n     * in matching of the given queries.\n     * @param value One or more media queries to check.\n     * @returns A stream of matches for the given queries.\n     */\n    observe(value) {\n        const queries = splitQueries(coerceArray(value));\n        const observables = queries.map(query => this._registerQuery(query).observable);\n        let stateObservable = combineLatest(observables);\n        // Emit the first state immediately, and then debounce the subsequent emissions.\n        stateObservable = concat(stateObservable.pipe(take(1)), stateObservable.pipe(skip(1), debounceTime(0)));\n        return stateObservable.pipe(map(breakpointStates => {\n            const response = {\n                matches: false,\n                breakpoints: {},\n            };\n            breakpointStates.forEach(({ matches, query }) => {\n                response.matches = response.matches || matches;\n                response.breakpoints[query] = matches;\n            });\n            return response;\n        }));\n    }\n    /** Registers a specific query to be listened for. */\n    _registerQuery(query) {\n        // Only set up a new MediaQueryList if it is not already being listened for.\n        if (this._queries.has(query)) {\n            return this._queries.get(query);\n        }\n        const mql = this._mediaMatcher.matchMedia(query);\n        // Create callback for match changes and add it is as a listener.\n        const queryObservable = new Observable((observer) => {\n            // Listener callback methods are wrapped to be placed back in ngZone. Callbacks must be placed\n            // back into the zone because matchMedia is only included in Zone.js by loading the\n            // webapis-media-query.js file alongside the zone.js file.  Additionally, some browsers do not\n            // have MediaQueryList inherit from EventTarget, which causes inconsistencies in how Zone.js\n            // patches it.\n            const handler = (e) => this._zone.run(() => observer.next(e));\n            mql.addListener(handler);\n            return () => {\n                mql.removeListener(handler);\n            };\n        }).pipe(startWith(mql), map(({ matches }) => ({ query, matches })), takeUntil(this._destroySubject));\n        // Add the MediaQueryList to the set of queries.\n        const output = { observable: queryObservable, mql };\n        this._queries.set(query, output);\n        return output;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: BreakpointObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: BreakpointObserver, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: BreakpointObserver, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n/**\n * Split each query string into separate query strings if two queries are provided as comma\n * separated.\n */\nfunction splitQueries(queries) {\n    return queries\n        .map(query => query.split(','))\n        .reduce((a1, a2) => a1.concat(a2))\n        .map(query => query.trim());\n}\n\n// PascalCase is being used as Breakpoints is used like an enum.\n// tslint:disable-next-line:variable-name\nconst Breakpoints = {\n    XSmall: '(max-width: 599.98px)',\n    Small: '(min-width: 600px) and (max-width: 959.98px)',\n    Medium: '(min-width: 960px) and (max-width: 1279.98px)',\n    Large: '(min-width: 1280px) and (max-width: 1919.98px)',\n    XLarge: '(min-width: 1920px)',\n    Handset: '(max-width: 599.98px) and (orientation: portrait), ' +\n        '(max-width: 959.98px) and (orientation: landscape)',\n    Tablet: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), ' +\n        '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n    Web: '(min-width: 840px) and (orientation: portrait), ' +\n        '(min-width: 1280px) and (orientation: landscape)',\n    HandsetPortrait: '(max-width: 599.98px) and (orientation: portrait)',\n    TabletPortrait: '(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)',\n    WebPortrait: '(min-width: 840px) and (orientation: portrait)',\n    HandsetLandscape: '(max-width: 959.98px) and (orientation: landscape)',\n    TabletLandscape: '(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)',\n    WebLandscape: '(min-width: 1280px) and (orientation: landscape)',\n};\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BreakpointObserver, Breakpoints, LayoutModule, MediaMatcher };\n","import { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, APP_ID, Injectable, signal, QueryList, isSignal, effect, InjectionToken, afterNextRender, NgZone, Injector, ElementRef, booleanAttribute, Directive, Input, EventEmitter, Output, NgModule } from '@angular/core';\nimport { Platform, _getFocusedElementPierceShadowDom, normalizePassiveListenerOptions, _getEventTarget, _getShadowRoot } from '@angular/cdk/platform';\nimport { _CdkPrivateStyleLoader, _VisuallyHiddenLoader } from '@angular/cdk/private';\nimport { A, Z, ZERO, NINE, hasModifierKey, PAGE_DOWN, PAGE_UP, END, HOME, LEFT_ARROW, RIGHT_ARROW, UP_ARROW, DOWN_ARROW, TAB, ALT, CONTROL, MAC_META, META, SHIFT } from '@angular/cdk/keycodes';\nimport { Subject, Subscription, isObservable, of, BehaviorSubject } from 'rxjs';\nimport { tap, debounceTime, filter, map, take, skip, distinctUntilChanged, takeUntil } from 'rxjs/operators';\nimport { coerceObservable } from '@angular/cdk/coercion/private';\nimport { ContentObserver, ObserversModule } from '@angular/cdk/observers';\nimport { coerceElement } from '@angular/cdk/coercion';\nimport { BreakpointObserver } from '@angular/cdk/layout';\n\n/** IDs are delimited by an empty space, as per the spec. */\nconst ID_DELIMITER = ' ';\n/**\n * Adds the given ID to the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nfunction addAriaReferencedId(el, attr, id) {\n    const ids = getAriaReferenceIds(el, attr);\n    id = id.trim();\n    if (ids.some(existingId => existingId.trim() === id)) {\n        return;\n    }\n    ids.push(id);\n    el.setAttribute(attr, ids.join(ID_DELIMITER));\n}\n/**\n * Removes the given ID from the specified ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nfunction removeAriaReferencedId(el, attr, id) {\n    const ids = getAriaReferenceIds(el, attr);\n    id = id.trim();\n    const filteredIds = ids.filter(val => val !== id);\n    if (filteredIds.length) {\n        el.setAttribute(attr, filteredIds.join(ID_DELIMITER));\n    }\n    else {\n        el.removeAttribute(attr);\n    }\n}\n/**\n * Gets the list of IDs referenced by the given ARIA attribute on an element.\n * Used for attributes such as aria-labelledby, aria-owns, etc.\n */\nfunction getAriaReferenceIds(el, attr) {\n    // Get string array of all individual ids (whitespace delimited) in the attribute value\n    const attrValue = el.getAttribute(attr);\n    return attrValue?.match(/\\S+/g) ?? [];\n}\n\n/**\n * ID used for the body container where all messages are appended.\n * @deprecated No longer being used. To be removed.\n * @breaking-change 14.0.0\n */\nconst MESSAGES_CONTAINER_ID = 'cdk-describedby-message-container';\n/**\n * ID prefix used for each created message element.\n * @deprecated To be turned into a private variable.\n * @breaking-change 14.0.0\n */\nconst CDK_DESCRIBEDBY_ID_PREFIX = 'cdk-describedby-message';\n/**\n * Attribute given to each host element that is described by a message element.\n * @deprecated To be turned into a private variable.\n * @breaking-change 14.0.0\n */\nconst CDK_DESCRIBEDBY_HOST_ATTRIBUTE = 'cdk-describedby-host';\n/** Global incremental identifier for each registered message element. */\nlet nextId = 0;\n/**\n * Utility that creates visually hidden elements with a message content. Useful for elements that\n * want to use aria-describedby to further describe themselves without adding additional visual\n * content.\n */\nclass AriaDescriber {\n    _platform = inject(Platform);\n    _document = inject(DOCUMENT);\n    /** Map of all registered message elements that have been placed into the document. */\n    _messageRegistry = new Map();\n    /** Container for all registered messages. */\n    _messagesContainer = null;\n    /** Unique ID for the service. */\n    _id = `${nextId++}`;\n    constructor() {\n        inject(_CdkPrivateStyleLoader).load(_VisuallyHiddenLoader);\n        this._id = inject(APP_ID) + '-' + nextId++;\n    }\n    describe(hostElement, message, role) {\n        if (!this._canBeDescribed(hostElement, message)) {\n            return;\n        }\n        const key = getKey(message, role);\n        if (typeof message !== 'string') {\n            // We need to ensure that the element has an ID.\n            setMessageId(message, this._id);\n            this._messageRegistry.set(key, { messageElement: message, referenceCount: 0 });\n        }\n        else if (!this._messageRegistry.has(key)) {\n            this._createMessageElement(message, role);\n        }\n        if (!this._isElementDescribedByMessage(hostElement, key)) {\n            this._addMessageReference(hostElement, key);\n        }\n    }\n    removeDescription(hostElement, message, role) {\n        if (!message || !this._isElementNode(hostElement)) {\n            return;\n        }\n        const key = getKey(message, role);\n        if (this._isElementDescribedByMessage(hostElement, key)) {\n            this._removeMessageReference(hostElement, key);\n        }\n        // If the message is a string, it means that it's one that we created for the\n        // consumer so we can remove it safely, otherwise we should leave it in place.\n        if (typeof message === 'string') {\n            const registeredMessage = this._messageRegistry.get(key);\n            if (registeredMessage && registeredMessage.referenceCount === 0) {\n                this._deleteMessageElement(key);\n            }\n        }\n        if (this._messagesContainer?.childNodes.length === 0) {\n            this._messagesContainer.remove();\n            this._messagesContainer = null;\n        }\n    }\n    /** Unregisters all created message elements and removes the message container. */\n    ngOnDestroy() {\n        const describedElements = this._document.querySelectorAll(`[${CDK_DESCRIBEDBY_HOST_ATTRIBUTE}=\"${this._id}\"]`);\n        for (let i = 0; i < describedElements.length; i++) {\n            this._removeCdkDescribedByReferenceIds(describedElements[i]);\n            describedElements[i].removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n        }\n        this._messagesContainer?.remove();\n        this._messagesContainer = null;\n        this._messageRegistry.clear();\n    }\n    /**\n     * Creates a new element in the visually hidden message container element with the message\n     * as its content and adds it to the message registry.\n     */\n    _createMessageElement(message, role) {\n        const messageElement = this._document.createElement('div');\n        setMessageId(messageElement, this._id);\n        messageElement.textContent = message;\n        if (role) {\n            messageElement.setAttribute('role', role);\n        }\n        this._createMessagesContainer();\n        this._messagesContainer.appendChild(messageElement);\n        this._messageRegistry.set(getKey(message, role), { messageElement, referenceCount: 0 });\n    }\n    /** Deletes the message element from the global messages container. */\n    _deleteMessageElement(key) {\n        this._messageRegistry.get(key)?.messageElement?.remove();\n        this._messageRegistry.delete(key);\n    }\n    /** Creates the global container for all aria-describedby messages. */\n    _createMessagesContainer() {\n        if (this._messagesContainer) {\n            return;\n        }\n        const containerClassName = 'cdk-describedby-message-container';\n        const serverContainers = this._document.querySelectorAll(`.${containerClassName}[platform=\"server\"]`);\n        for (let i = 0; i < serverContainers.length; i++) {\n            // When going from the server to the client, we may end up in a situation where there's\n            // already a container on the page, but we don't have a reference to it. Clear the\n            // old container so we don't get duplicates. Doing this, instead of emptying the previous\n            // container, should be slightly faster.\n            serverContainers[i].remove();\n        }\n        const messagesContainer = this._document.createElement('div');\n        // We add `visibility: hidden` in order to prevent text in this container from\n        // being searchable by the browser's Ctrl + F functionality.\n        // Screen-readers will still read the description for elements with aria-describedby even\n        // when the description element is not visible.\n        messagesContainer.style.visibility = 'hidden';\n        // Even though we use `visibility: hidden`, we still apply `cdk-visually-hidden` so that\n        // the description element doesn't impact page layout.\n        messagesContainer.classList.add(containerClassName);\n        messagesContainer.classList.add('cdk-visually-hidden');\n        if (!this._platform.isBrowser) {\n            messagesContainer.setAttribute('platform', 'server');\n        }\n        this._document.body.appendChild(messagesContainer);\n        this._messagesContainer = messagesContainer;\n    }\n    /** Removes all cdk-describedby messages that are hosted through the element. */\n    _removeCdkDescribedByReferenceIds(element) {\n        // Remove all aria-describedby reference IDs that are prefixed by CDK_DESCRIBEDBY_ID_PREFIX\n        const originalReferenceIds = getAriaReferenceIds(element, 'aria-describedby').filter(id => id.indexOf(CDK_DESCRIBEDBY_ID_PREFIX) != 0);\n        element.setAttribute('aria-describedby', originalReferenceIds.join(' '));\n    }\n    /**\n     * Adds a message reference to the element using aria-describedby and increments the registered\n     * message's reference count.\n     */\n    _addMessageReference(element, key) {\n        const registeredMessage = this._messageRegistry.get(key);\n        // Add the aria-describedby reference and set the\n        // describedby_host attribute to mark the element.\n        addAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n        element.setAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE, this._id);\n        registeredMessage.referenceCount++;\n    }\n    /**\n     * Removes a message reference from the element using aria-describedby\n     * and decrements the registered message's reference count.\n     */\n    _removeMessageReference(element, key) {\n        const registeredMessage = this._messageRegistry.get(key);\n        registeredMessage.referenceCount--;\n        removeAriaReferencedId(element, 'aria-describedby', registeredMessage.messageElement.id);\n        element.removeAttribute(CDK_DESCRIBEDBY_HOST_ATTRIBUTE);\n    }\n    /** Returns true if the element has been described by the provided message ID. */\n    _isElementDescribedByMessage(element, key) {\n        const referenceIds = getAriaReferenceIds(element, 'aria-describedby');\n        const registeredMessage = this._messageRegistry.get(key);\n        const messageId = registeredMessage && registeredMessage.messageElement.id;\n        return !!messageId && referenceIds.indexOf(messageId) != -1;\n    }\n    /** Determines whether a message can be described on a particular element. */\n    _canBeDescribed(element, message) {\n        if (!this._isElementNode(element)) {\n            return false;\n        }\n        if (message && typeof message === 'object') {\n            // We'd have to make some assumptions about the description element's text, if the consumer\n            // passed in an element. Assume that if an element is passed in, the consumer has verified\n            // that it can be used as a description.\n            return true;\n        }\n        const trimmedMessage = message == null ? '' : `${message}`.trim();\n        const ariaLabel = element.getAttribute('aria-label');\n        // We shouldn't set descriptions if they're exactly the same as the `aria-label` of the\n        // element, because screen readers will end up reading out the same text twice in a row.\n        return trimmedMessage ? !ariaLabel || ariaLabel.trim() !== trimmedMessage : false;\n    }\n    /** Checks whether a node is an Element node. */\n    _isElementNode(element) {\n        return element.nodeType === this._document.ELEMENT_NODE;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: AriaDescriber, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: AriaDescriber, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: AriaDescriber, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n/** Gets a key that can be used to look messages up in the registry. */\nfunction getKey(message, role) {\n    return typeof message === 'string' ? `${role || ''}/${message}` : message;\n}\n/** Assigns a unique ID to an element, if it doesn't have one already. */\nfunction setMessageId(element, serviceId) {\n    if (!element.id) {\n        element.id = `${CDK_DESCRIBEDBY_ID_PREFIX}-${serviceId}-${nextId++}`;\n    }\n}\n\nconst DEFAULT_TYPEAHEAD_DEBOUNCE_INTERVAL_MS = 200;\n/**\n * Selects items based on keyboard inputs. Implements the typeahead functionality of\n * `role=\"listbox\"` or `role=\"tree\"` and other related roles.\n */\nclass Typeahead {\n    _letterKeyStream = new Subject();\n    _items = [];\n    _selectedItemIndex = -1;\n    /** Buffer for the letters that the user has pressed */\n    _pressedLetters = [];\n    _skipPredicateFn;\n    _selectedItem = new Subject();\n    selectedItem = this._selectedItem;\n    constructor(initialItems, config) {\n        const typeAheadInterval = typeof config?.debounceInterval === 'number'\n            ? config.debounceInterval\n            : DEFAULT_TYPEAHEAD_DEBOUNCE_INTERVAL_MS;\n        if (config?.skipPredicate) {\n            this._skipPredicateFn = config.skipPredicate;\n        }\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n            initialItems.length &&\n            initialItems.some(item => typeof item.getLabel !== 'function')) {\n            throw new Error('KeyManager items in typeahead mode must implement the `getLabel` method.');\n        }\n        this.setItems(initialItems);\n        this._setupKeyHandler(typeAheadInterval);\n    }\n    destroy() {\n        this._pressedLetters = [];\n        this._letterKeyStream.complete();\n        this._selectedItem.complete();\n    }\n    setCurrentSelectedItemIndex(index) {\n        this._selectedItemIndex = index;\n    }\n    setItems(items) {\n        this._items = items;\n    }\n    handleKey(event) {\n        const keyCode = event.keyCode;\n        // Attempt to use the `event.key` which also maps it to the user's keyboard language,\n        // otherwise fall back to resolving alphanumeric characters via the keyCode.\n        if (event.key && event.key.length === 1) {\n            this._letterKeyStream.next(event.key.toLocaleUpperCase());\n        }\n        else if ((keyCode >= A && keyCode <= Z) || (keyCode >= ZERO && keyCode <= NINE)) {\n            this._letterKeyStream.next(String.fromCharCode(keyCode));\n        }\n    }\n    /** Gets whether the user is currently typing into the manager using the typeahead feature. */\n    isTyping() {\n        return this._pressedLetters.length > 0;\n    }\n    /** Resets the currently stored sequence of typed letters. */\n    reset() {\n        this._pressedLetters = [];\n    }\n    _setupKeyHandler(typeAheadInterval) {\n        // Debounce the presses of non-navigational keys, collect the ones that correspond to letters\n        // and convert those letters back into a string. Afterwards find the first item that starts\n        // with that string and select it.\n        this._letterKeyStream\n            .pipe(tap(letter => this._pressedLetters.push(letter)), debounceTime(typeAheadInterval), filter(() => this._pressedLetters.length > 0), map(() => this._pressedLetters.join('').toLocaleUpperCase()))\n            .subscribe(inputString => {\n            // Start at 1 because we want to start searching at the item immediately\n            // following the current active item.\n            for (let i = 1; i < this._items.length + 1; i++) {\n                const index = (this._selectedItemIndex + i) % this._items.length;\n                const item = this._items[index];\n                if (!this._skipPredicateFn?.(item) &&\n                    item.getLabel?.().toLocaleUpperCase().trim().indexOf(inputString) === 0) {\n                    this._selectedItem.next(item);\n                    break;\n                }\n            }\n            this._pressedLetters = [];\n        });\n    }\n}\n\n/**\n * This class manages keyboard events for selectable lists. If you pass it a query list\n * of items, it will set the active item correctly when arrow events occur.\n */\nclass ListKeyManager {\n    _items;\n    _activeItemIndex = -1;\n    _activeItem = signal(null);\n    _wrap = false;\n    _typeaheadSubscription = Subscription.EMPTY;\n    _itemChangesSubscription;\n    _vertical = true;\n    _horizontal;\n    _allowedModifierKeys = [];\n    _homeAndEnd = false;\n    _pageUpAndDown = { enabled: false, delta: 10 };\n    _effectRef;\n    _typeahead;\n    /**\n     * Predicate function that can be used to check whether an item should be skipped\n     * by the key manager. By default, disabled items are skipped.\n     */\n    _skipPredicateFn = (item) => item.disabled;\n    constructor(_items, injector) {\n        this._items = _items;\n        // We allow for the items to be an array because, in some cases, the consumer may\n        // not have access to a QueryList of the items they want to manage (e.g. when the\n        // items aren't being collected via `ViewChildren` or `ContentChildren`).\n        if (_items instanceof QueryList) {\n            this._itemChangesSubscription = _items.changes.subscribe((newItems) => this._itemsChanged(newItems.toArray()));\n        }\n        else if (isSignal(_items)) {\n            if (!injector && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n                throw new Error('ListKeyManager constructed with a signal must receive an injector');\n            }\n            this._effectRef = effect(() => this._itemsChanged(_items()), { injector });\n        }\n    }\n    /**\n     * Stream that emits any time the TAB key is pressed, so components can react\n     * when focus is shifted off of the list.\n     */\n    tabOut = new Subject();\n    /** Stream that emits whenever the active item of the list manager changes. */\n    change = new Subject();\n    /**\n     * Sets the predicate function that determines which items should be skipped by the\n     * list key manager.\n     * @param predicate Function that determines whether the given item should be skipped.\n     */\n    skipPredicate(predicate) {\n        this._skipPredicateFn = predicate;\n        return this;\n    }\n    /**\n     * Configures wrapping mode, which determines whether the active item will wrap to\n     * the other end of list when there are no more items in the given direction.\n     * @param shouldWrap Whether the list should wrap when reaching the end.\n     */\n    withWrap(shouldWrap = true) {\n        this._wrap = shouldWrap;\n        return this;\n    }\n    /**\n     * Configures whether the key manager should be able to move the selection vertically.\n     * @param enabled Whether vertical selection should be enabled.\n     */\n    withVerticalOrientation(enabled = true) {\n        this._vertical = enabled;\n        return this;\n    }\n    /**\n     * Configures the key manager to move the selection horizontally.\n     * Passing in `null` will disable horizontal movement.\n     * @param direction Direction in which the selection can be moved.\n     */\n    withHorizontalOrientation(direction) {\n        this._horizontal = direction;\n        return this;\n    }\n    /**\n     * Modifier keys which are allowed to be held down and whose default actions will be prevented\n     * as the user is pressing the arrow keys. Defaults to not allowing any modifier keys.\n     */\n    withAllowedModifierKeys(keys) {\n        this._allowedModifierKeys = keys;\n        return this;\n    }\n    /**\n     * Turns on typeahead mode which allows users to set the active item by typing.\n     * @param debounceInterval Time to wait after the last keystroke before setting the active item.\n     */\n    withTypeAhead(debounceInterval = 200) {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            const items = this._getItemsArray();\n            if (items.length > 0 && items.some(item => typeof item.getLabel !== 'function')) {\n                throw Error('ListKeyManager items in typeahead mode must implement the `getLabel` method.');\n            }\n        }\n        this._typeaheadSubscription.unsubscribe();\n        const items = this._getItemsArray();\n        this._typeahead = new Typeahead(items, {\n            debounceInterval: typeof debounceInterval === 'number' ? debounceInterval : undefined,\n            skipPredicate: item => this._skipPredicateFn(item),\n        });\n        this._typeaheadSubscription = this._typeahead.selectedItem.subscribe(item => {\n            this.setActiveItem(item);\n        });\n        return this;\n    }\n    /** Cancels the current typeahead sequence. */\n    cancelTypeahead() {\n        this._typeahead?.reset();\n        return this;\n    }\n    /**\n     * Configures the key manager to activate the first and last items\n     * respectively when the Home or End key is pressed.\n     * @param enabled Whether pressing the Home or End key activates the first/last item.\n     */\n    withHomeAndEnd(enabled = true) {\n        this._homeAndEnd = enabled;\n        return this;\n    }\n    /**\n     * Configures the key manager to activate every 10th, configured or first/last element in up/down direction\n     * respectively when the Page-Up or Page-Down key is pressed.\n     * @param enabled Whether pressing the Page-Up or Page-Down key activates the first/last item.\n     * @param delta Whether pressing the Home or End key activates the first/last item.\n     */\n    withPageUpDown(enabled = true, delta = 10) {\n        this._pageUpAndDown = { enabled, delta };\n        return this;\n    }\n    setActiveItem(item) {\n        const previousActiveItem = this._activeItem();\n        this.updateActiveItem(item);\n        if (this._activeItem() !== previousActiveItem) {\n            this.change.next(this._activeItemIndex);\n        }\n    }\n    /**\n     * Sets the active item depending on the key event passed in.\n     * @param event Keyboard event to be used for determining which element should be active.\n     */\n    onKeydown(event) {\n        const keyCode = event.keyCode;\n        const modifiers = ['altKey', 'ctrlKey', 'metaKey', 'shiftKey'];\n        const isModifierAllowed = modifiers.every(modifier => {\n            return !event[modifier] || this._allowedModifierKeys.indexOf(modifier) > -1;\n        });\n        switch (keyCode) {\n            case TAB:\n                this.tabOut.next();\n                return;\n            case DOWN_ARROW:\n                if (this._vertical && isModifierAllowed) {\n                    this.setNextItemActive();\n                    break;\n                }\n                else {\n                    return;\n                }\n            case UP_ARROW:\n                if (this._vertical && isModifierAllowed) {\n                    this.setPreviousItemActive();\n                    break;\n                }\n                else {\n                    return;\n                }\n            case RIGHT_ARROW:\n                if (this._horizontal && isModifierAllowed) {\n                    this._horizontal === 'rtl' ? this.setPreviousItemActive() : this.setNextItemActive();\n                    break;\n                }\n                else {\n                    return;\n                }\n            case LEFT_ARROW:\n                if (this._horizontal && isModifierAllowed) {\n                    this._horizontal === 'rtl' ? this.setNextItemActive() : this.setPreviousItemActive();\n                    break;\n                }\n                else {\n                    return;\n                }\n            case HOME:\n                if (this._homeAndEnd && isModifierAllowed) {\n                    this.setFirstItemActive();\n                    break;\n                }\n                else {\n                    return;\n                }\n            case END:\n                if (this._homeAndEnd && isModifierAllowed) {\n                    this.setLastItemActive();\n                    break;\n                }\n                else {\n                    return;\n                }\n            case PAGE_UP:\n                if (this._pageUpAndDown.enabled && isModifierAllowed) {\n                    const targetIndex = this._activeItemIndex - this._pageUpAndDown.delta;\n                    this._setActiveItemByIndex(targetIndex > 0 ? targetIndex : 0, 1);\n                    break;\n                }\n                else {\n                    return;\n                }\n            case PAGE_DOWN:\n                if (this._pageUpAndDown.enabled && isModifierAllowed) {\n                    const targetIndex = this._activeItemIndex + this._pageUpAndDown.delta;\n                    const itemsLength = this._getItemsArray().length;\n                    this._setActiveItemByIndex(targetIndex < itemsLength ? targetIndex : itemsLength - 1, -1);\n                    break;\n                }\n                else {\n                    return;\n                }\n            default:\n                if (isModifierAllowed || hasModifierKey(event, 'shiftKey')) {\n                    this._typeahead?.handleKey(event);\n                }\n                // Note that we return here, in order to avoid preventing\n                // the default action of non-navigational keys.\n                return;\n        }\n        this._typeahead?.reset();\n        event.preventDefault();\n    }\n    /** Index of the currently active item. */\n    get activeItemIndex() {\n        return this._activeItemIndex;\n    }\n    /** The active item. */\n    get activeItem() {\n        return this._activeItem();\n    }\n    /** Gets whether the user is currently typing into the manager using the typeahead feature. */\n    isTyping() {\n        return !!this._typeahead && this._typeahead.isTyping();\n    }\n    /** Sets the active item to the first enabled item in the list. */\n    setFirstItemActive() {\n        this._setActiveItemByIndex(0, 1);\n    }\n    /** Sets the active item to the last enabled item in the list. */\n    setLastItemActive() {\n        this._setActiveItemByIndex(this._getItemsArray().length - 1, -1);\n    }\n    /** Sets the active item to the next enabled item in the list. */\n    setNextItemActive() {\n        this._activeItemIndex < 0 ? this.setFirstItemActive() : this._setActiveItemByDelta(1);\n    }\n    /** Sets the active item to a previous enabled item in the list. */\n    setPreviousItemActive() {\n        this._activeItemIndex < 0 && this._wrap\n            ? this.setLastItemActive()\n            : this._setActiveItemByDelta(-1);\n    }\n    updateActiveItem(item) {\n        const itemArray = this._getItemsArray();\n        const index = typeof item === 'number' ? item : itemArray.indexOf(item);\n        const activeItem = itemArray[index];\n        // Explicitly check for `null` and `undefined` because other falsy values are valid.\n        this._activeItem.set(activeItem == null ? null : activeItem);\n        this._activeItemIndex = index;\n        this._typeahead?.setCurrentSelectedItemIndex(index);\n    }\n    /** Cleans up the key manager. */\n    destroy() {\n        this._typeaheadSubscription.unsubscribe();\n        this._itemChangesSubscription?.unsubscribe();\n        this._effectRef?.destroy();\n        this._typeahead?.destroy();\n        this.tabOut.complete();\n        this.change.complete();\n    }\n    /**\n     * This method sets the active item, given a list of items and the delta between the\n     * currently active item and the new active item. It will calculate differently\n     * depending on whether wrap mode is turned on.\n     */\n    _setActiveItemByDelta(delta) {\n        this._wrap ? this._setActiveInWrapMode(delta) : this._setActiveInDefaultMode(delta);\n    }\n    /**\n     * Sets the active item properly given \"wrap\" mode. In other words, it will continue to move\n     * down the list until it finds an item that is not disabled, and it will wrap if it\n     * encounters either end of the list.\n     */\n    _setActiveInWrapMode(delta) {\n        const items = this._getItemsArray();\n        for (let i = 1; i <= items.length; i++) {\n            const index = (this._activeItemIndex + delta * i + items.length) % items.length;\n            const item = items[index];\n            if (!this._skipPredicateFn(item)) {\n                this.setActiveItem(index);\n                return;\n            }\n        }\n    }\n    /**\n     * Sets the active item properly given the default mode. In other words, it will\n     * continue to move down the list until it finds an item that is not disabled. If\n     * it encounters either end of the list, it will stop and not wrap.\n     */\n    _setActiveInDefaultMode(delta) {\n        this._setActiveItemByIndex(this._activeItemIndex + delta, delta);\n    }\n    /**\n     * Sets the active item to the first enabled item starting at the index specified. If the\n     * item is disabled, it will move in the fallbackDelta direction until it either\n     * finds an enabled item or encounters the end of the list.\n     */\n    _setActiveItemByIndex(index, fallbackDelta) {\n        const items = this._getItemsArray();\n        if (!items[index]) {\n            return;\n        }\n        while (this._skipPredicateFn(items[index])) {\n            index += fallbackDelta;\n            if (!items[index]) {\n                return;\n            }\n        }\n        this.setActiveItem(index);\n    }\n    /** Returns the items as an array. */\n    _getItemsArray() {\n        if (isSignal(this._items)) {\n            return this._items();\n        }\n        return this._items instanceof QueryList ? this._items.toArray() : this._items;\n    }\n    /** Callback for when the items have changed. */\n    _itemsChanged(newItems) {\n        this._typeahead?.setItems(newItems);\n        const activeItem = this._activeItem();\n        if (activeItem) {\n            const newIndex = newItems.indexOf(activeItem);\n            if (newIndex > -1 && newIndex !== this._activeItemIndex) {\n                this._activeItemIndex = newIndex;\n                this._typeahead?.setCurrentSelectedItemIndex(newIndex);\n            }\n        }\n    }\n}\n\nclass ActiveDescendantKeyManager extends ListKeyManager {\n    setActiveItem(index) {\n        if (this.activeItem) {\n            this.activeItem.setInactiveStyles();\n        }\n        super.setActiveItem(index);\n        if (this.activeItem) {\n            this.activeItem.setActiveStyles();\n        }\n    }\n}\n\nclass FocusKeyManager extends ListKeyManager {\n    _origin = 'program';\n    /**\n     * Sets the focus origin that will be passed in to the items for any subsequent `focus` calls.\n     * @param origin Focus origin to be used when focusing items.\n     */\n    setFocusOrigin(origin) {\n        this._origin = origin;\n        return this;\n    }\n    setActiveItem(item) {\n        super.setActiveItem(item);\n        if (this.activeItem) {\n            this.activeItem.focus(this._origin);\n        }\n    }\n}\n\n/**\n * This class manages keyboard events for trees. If you pass it a QueryList or other list of tree\n * items, it will set the active item, focus, handle expansion and typeahead correctly when\n * keyboard events occur.\n */\nclass TreeKeyManager {\n    /** The index of the currently active (focused) item. */\n    _activeItemIndex = -1;\n    /** The currently active (focused) item. */\n    _activeItem = null;\n    /** Whether or not we activate the item when it's focused. */\n    _shouldActivationFollowFocus = false;\n    /**\n     * The orientation that the tree is laid out in. In `rtl` mode, the behavior of Left and\n     * Right arrow are switched.\n     */\n    _horizontalOrientation = 'ltr';\n    /**\n     * Predicate function that can be used to check whether an item should be skipped\n     * by the key manager.\n     *\n     * The default value for this doesn't skip any elements in order to keep tree items focusable\n     * when disabled. This aligns with ARIA guidelines:\n     * https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#focusabilityofdisabledcontrols.\n     */\n    _skipPredicateFn = (_item) => false;\n    /** Function to determine equivalent items. */\n    _trackByFn = (item) => item;\n    /** Synchronous cache of the items to manage. */\n    _items = [];\n    _typeahead;\n    _typeaheadSubscription = Subscription.EMPTY;\n    _hasInitialFocused = false;\n    _initializeFocus() {\n        if (this._hasInitialFocused || this._items.length === 0) {\n            return;\n        }\n        let activeIndex = 0;\n        for (let i = 0; i < this._items.length; i++) {\n            if (!this._skipPredicateFn(this._items[i]) && !this._isItemDisabled(this._items[i])) {\n                activeIndex = i;\n                break;\n            }\n        }\n        const activeItem = this._items[activeIndex];\n        // Use `makeFocusable` here, because we want the item to just be focusable, not actually\n        // capture the focus since the user isn't interacting with it. See #29628.\n        if (activeItem.makeFocusable) {\n            this._activeItem?.unfocus();\n            this._activeItemIndex = activeIndex;\n            this._activeItem = activeItem;\n            this._typeahead?.setCurrentSelectedItemIndex(activeIndex);\n            activeItem.makeFocusable();\n        }\n        else {\n            // Backwards compatibility for items that don't implement `makeFocusable`.\n            this.focusItem(activeIndex);\n        }\n        this._hasInitialFocused = true;\n    }\n    /**\n     *\n     * @param items List of TreeKeyManager options. Can be synchronous or asynchronous.\n     * @param config Optional configuration options. By default, use 'ltr' horizontal orientation. By\n     * default, do not skip any nodes. By default, key manager only calls `focus` method when items\n     * are focused and does not call `activate`. If `typeaheadDefaultInterval` is `true`, use a\n     * default interval of 200ms.\n     */\n    constructor(items, config) {\n        // We allow for the items to be an array or Observable because, in some cases, the consumer may\n        // not have access to a QueryList of the items they want to manage (e.g. when the\n        // items aren't being collected via `ViewChildren` or `ContentChildren`).\n        if (items instanceof QueryList) {\n            this._items = items.toArray();\n            items.changes.subscribe((newItems) => {\n                this._items = newItems.toArray();\n                this._typeahead?.setItems(this._items);\n                this._updateActiveItemIndex(this._items);\n                this._initializeFocus();\n            });\n        }\n        else if (isObservable(items)) {\n            items.subscribe(newItems => {\n                this._items = newItems;\n                this._typeahead?.setItems(newItems);\n                this._updateActiveItemIndex(newItems);\n                this._initializeFocus();\n            });\n        }\n        else {\n            this._items = items;\n            this._initializeFocus();\n        }\n        if (typeof config.shouldActivationFollowFocus === 'boolean') {\n            this._shouldActivationFollowFocus = config.shouldActivationFollowFocus;\n        }\n        if (config.horizontalOrientation) {\n            this._horizontalOrientation = config.horizontalOrientation;\n        }\n        if (config.skipPredicate) {\n            this._skipPredicateFn = config.skipPredicate;\n        }\n        if (config.trackBy) {\n            this._trackByFn = config.trackBy;\n        }\n        if (typeof config.typeAheadDebounceInterval !== 'undefined') {\n            this._setTypeAhead(config.typeAheadDebounceInterval);\n        }\n    }\n    /** Stream that emits any time the focused item changes. */\n    change = new Subject();\n    /** Cleans up the key manager. */\n    destroy() {\n        this._typeaheadSubscription.unsubscribe();\n        this._typeahead?.destroy();\n        this.change.complete();\n    }\n    /**\n     * Handles a keyboard event on the tree.\n     * @param event Keyboard event that represents the user interaction with the tree.\n     */\n    onKeydown(event) {\n        const key = event.key;\n        switch (key) {\n            case 'Tab':\n                // Return early here, in order to allow Tab to actually tab out of the tree\n                return;\n            case 'ArrowDown':\n                this._focusNextItem();\n                break;\n            case 'ArrowUp':\n                this._focusPreviousItem();\n                break;\n            case 'ArrowRight':\n                this._horizontalOrientation === 'rtl'\n                    ? this._collapseCurrentItem()\n                    : this._expandCurrentItem();\n                break;\n            case 'ArrowLeft':\n                this._horizontalOrientation === 'rtl'\n                    ? this._expandCurrentItem()\n                    : this._collapseCurrentItem();\n                break;\n            case 'Home':\n                this._focusFirstItem();\n                break;\n            case 'End':\n                this._focusLastItem();\n                break;\n            case 'Enter':\n            case ' ':\n                this._activateCurrentItem();\n                break;\n            default:\n                if (event.key === '*') {\n                    this._expandAllItemsAtCurrentItemLevel();\n                    break;\n                }\n                this._typeahead?.handleKey(event);\n                // Return here, in order to avoid preventing the default action of non-navigational\n                // keys or resetting the buffer of pressed letters.\n                return;\n        }\n        // Reset the typeahead since the user has used a navigational key.\n        this._typeahead?.reset();\n        event.preventDefault();\n    }\n    /** Index of the currently active item. */\n    getActiveItemIndex() {\n        return this._activeItemIndex;\n    }\n    /** The currently active item. */\n    getActiveItem() {\n        return this._activeItem;\n    }\n    /** Focus the first available item. */\n    _focusFirstItem() {\n        this.focusItem(this._findNextAvailableItemIndex(-1));\n    }\n    /** Focus the last available item. */\n    _focusLastItem() {\n        this.focusItem(this._findPreviousAvailableItemIndex(this._items.length));\n    }\n    /** Focus the next available item. */\n    _focusNextItem() {\n        this.focusItem(this._findNextAvailableItemIndex(this._activeItemIndex));\n    }\n    /** Focus the previous available item. */\n    _focusPreviousItem() {\n        this.focusItem(this._findPreviousAvailableItemIndex(this._activeItemIndex));\n    }\n    focusItem(itemOrIndex, options = {}) {\n        // Set default options\n        options.emitChangeEvent ??= true;\n        let index = typeof itemOrIndex === 'number'\n            ? itemOrIndex\n            : this._items.findIndex(item => this._trackByFn(item) === this._trackByFn(itemOrIndex));\n        if (index < 0 || index >= this._items.length) {\n            return;\n        }\n        const activeItem = this._items[index];\n        // If we're just setting the same item, don't re-call activate or focus\n        if (this._activeItem !== null &&\n            this._trackByFn(activeItem) === this._trackByFn(this._activeItem)) {\n            return;\n        }\n        const previousActiveItem = this._activeItem;\n        this._activeItem = activeItem ?? null;\n        this._activeItemIndex = index;\n        this._typeahead?.setCurrentSelectedItemIndex(index);\n        this._activeItem?.focus();\n        previousActiveItem?.unfocus();\n        if (options.emitChangeEvent) {\n            this.change.next(this._activeItem);\n        }\n        if (this._shouldActivationFollowFocus) {\n            this._activateCurrentItem();\n        }\n    }\n    _updateActiveItemIndex(newItems) {\n        const activeItem = this._activeItem;\n        if (!activeItem) {\n            return;\n        }\n        const newIndex = newItems.findIndex(item => this._trackByFn(item) === this._trackByFn(activeItem));\n        if (newIndex > -1 && newIndex !== this._activeItemIndex) {\n            this._activeItemIndex = newIndex;\n            this._typeahead?.setCurrentSelectedItemIndex(newIndex);\n        }\n    }\n    _setTypeAhead(debounceInterval) {\n        this._typeahead = new Typeahead(this._items, {\n            debounceInterval: typeof debounceInterval === 'number' ? debounceInterval : undefined,\n            skipPredicate: item => this._skipPredicateFn(item),\n        });\n        this._typeaheadSubscription = this._typeahead.selectedItem.subscribe(item => {\n            this.focusItem(item);\n        });\n    }\n    _findNextAvailableItemIndex(startingIndex) {\n        for (let i = startingIndex + 1; i < this._items.length; i++) {\n            if (!this._skipPredicateFn(this._items[i])) {\n                return i;\n            }\n        }\n        return startingIndex;\n    }\n    _findPreviousAvailableItemIndex(startingIndex) {\n        for (let i = startingIndex - 1; i >= 0; i--) {\n            if (!this._skipPredicateFn(this._items[i])) {\n                return i;\n            }\n        }\n        return startingIndex;\n    }\n    /**\n     * If the item is already expanded, we collapse the item. Otherwise, we will focus the parent.\n     */\n    _collapseCurrentItem() {\n        if (!this._activeItem) {\n            return;\n        }\n        if (this._isCurrentItemExpanded()) {\n            this._activeItem.collapse();\n        }\n        else {\n            const parent = this._activeItem.getParent();\n            if (!parent || this._skipPredicateFn(parent)) {\n                return;\n            }\n            this.focusItem(parent);\n        }\n    }\n    /**\n     * If the item is already collapsed, we expand the item. Otherwise, we will focus the first child.\n     */\n    _expandCurrentItem() {\n        if (!this._activeItem) {\n            return;\n        }\n        if (!this._isCurrentItemExpanded()) {\n            this._activeItem.expand();\n        }\n        else {\n            coerceObservable(this._activeItem.getChildren())\n                .pipe(take(1))\n                .subscribe(children => {\n                const firstChild = children.find(child => !this._skipPredicateFn(child));\n                if (!firstChild) {\n                    return;\n                }\n                this.focusItem(firstChild);\n            });\n        }\n    }\n    _isCurrentItemExpanded() {\n        if (!this._activeItem) {\n            return false;\n        }\n        return typeof this._activeItem.isExpanded === 'boolean'\n            ? this._activeItem.isExpanded\n            : this._activeItem.isExpanded();\n    }\n    _isItemDisabled(item) {\n        return typeof item.isDisabled === 'boolean' ? item.isDisabled : item.isDisabled?.();\n    }\n    /** For all items that are the same level as the current item, we expand those items. */\n    _expandAllItemsAtCurrentItemLevel() {\n        if (!this._activeItem) {\n            return;\n        }\n        const parent = this._activeItem.getParent();\n        let itemsToExpand;\n        if (!parent) {\n            itemsToExpand = of(this._items.filter(item => item.getParent() === null));\n        }\n        else {\n            itemsToExpand = coerceObservable(parent.getChildren());\n        }\n        itemsToExpand.pipe(take(1)).subscribe(items => {\n            for (const item of items) {\n                item.expand();\n            }\n        });\n    }\n    _activateCurrentItem() {\n        this._activeItem?.activate();\n    }\n}\n/** @docs-private */\nfunction TREE_KEY_MANAGER_FACTORY() {\n    return (items, options) => new TreeKeyManager(items, options);\n}\n/** Injection token that determines the key manager to use. */\nconst TREE_KEY_MANAGER = new InjectionToken('tree-key-manager', {\n    providedIn: 'root',\n    factory: TREE_KEY_MANAGER_FACTORY,\n});\n/** @docs-private */\nconst TREE_KEY_MANAGER_FACTORY_PROVIDER = {\n    provide: TREE_KEY_MANAGER,\n    useFactory: TREE_KEY_MANAGER_FACTORY,\n};\n\n// NoopTreeKeyManager is a \"noop\" implementation of TreeKeyMangerStrategy. Methods are noops. Does\n// not emit to streams.\n//\n// Used for applications built before TreeKeyManager to opt-out of TreeKeyManager and revert to\n// legacy behavior.\n/**\n * @docs-private\n *\n * Opt-out of Tree of key manager behavior.\n *\n * When provided, Tree has same focus management behavior as before TreeKeyManager was introduced.\n *  - Tree does not respond to keyboard interaction\n *  - Tree node allows tabindex to be set by Input binding\n *  - Tree node allows tabindex to be set by attribute binding\n *\n * @deprecated NoopTreeKeyManager deprecated. Use TreeKeyManager or inject a\n * TreeKeyManagerStrategy instead. To be removed in a future version.\n *\n * @breaking-change 21.0.0\n */\nclass NoopTreeKeyManager {\n    _isNoopTreeKeyManager = true;\n    // Provide change as required by TreeKeyManagerStrategy. NoopTreeKeyManager is a \"noop\"\n    // implementation that does not emit to streams.\n    change = new Subject();\n    destroy() {\n        this.change.complete();\n    }\n    onKeydown() {\n        // noop\n    }\n    getActiveItemIndex() {\n        // Always return null. NoopTreeKeyManager is a \"noop\" implementation that does not maintain\n        // the active item.\n        return null;\n    }\n    getActiveItem() {\n        // Always return null. NoopTreeKeyManager is a \"noop\" implementation that does not maintain\n        // the active item.\n        return null;\n    }\n    focusItem() {\n        // noop\n    }\n}\n/**\n * @docs-private\n *\n * Opt-out of Tree of key manager behavior.\n *\n * When provided, Tree has same focus management behavior as before TreeKeyManager was introduced.\n *  - Tree does not respond to keyboard interaction\n *  - Tree node allows tabindex to be set by Input binding\n *  - Tree node allows tabindex to be set by attribute binding\n *\n * @deprecated NoopTreeKeyManager deprecated. Use TreeKeyManager or inject a\n * TreeKeyManagerStrategy instead. To be removed in a future version.\n *\n * @breaking-change 21.0.0\n */\nfunction NOOP_TREE_KEY_MANAGER_FACTORY() {\n    return () => new NoopTreeKeyManager();\n}\n/**\n * @docs-private\n *\n * Opt-out of Tree of key manager behavior.\n *\n * When provided, Tree has same focus management behavior as before TreeKeyManager was introduced.\n *  - Tree does not respond to keyboard interaction\n *  - Tree node allows tabindex to be set by Input binding\n *  - Tree node allows tabindex to be set by attribute binding\n *\n * @deprecated NoopTreeKeyManager deprecated. Use TreeKeyManager or inject a\n * TreeKeyManagerStrategy instead. To be removed in a future version.\n *\n * @breaking-change 21.0.0\n */\nconst NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER = {\n    provide: TREE_KEY_MANAGER,\n    useFactory: NOOP_TREE_KEY_MANAGER_FACTORY,\n};\n\n/**\n * Configuration for the isFocusable method.\n */\nclass IsFocusableConfig {\n    /**\n     * Whether to count an element as focusable even if it is not currently visible.\n     */\n    ignoreVisibility = false;\n}\n// The InteractivityChecker leans heavily on the ally.js accessibility utilities.\n// Methods like `isTabbable` are only covering specific edge-cases for the browsers which are\n// supported.\n/**\n * Utility for checking the interactivity of an element, such as whether it is focusable or\n * tabbable.\n */\nclass InteractivityChecker {\n    _platform = inject(Platform);\n    constructor() { }\n    /**\n     * Gets whether an element is disabled.\n     *\n     * @param element Element to be checked.\n     * @returns Whether the element is disabled.\n     */\n    isDisabled(element) {\n        // This does not capture some cases, such as a non-form control with a disabled attribute or\n        // a form control inside of a disabled form, but should capture the most common cases.\n        return element.hasAttribute('disabled');\n    }\n    /**\n     * Gets whether an element is visible for the purposes of interactivity.\n     *\n     * This will capture states like `display: none` and `visibility: hidden`, but not things like\n     * being clipped by an `overflow: hidden` parent or being outside the viewport.\n     *\n     * @returns Whether the element is visible.\n     */\n    isVisible(element) {\n        return hasGeometry(element) && getComputedStyle(element).visibility === 'visible';\n    }\n    /**\n     * Gets whether an element can be reached via Tab key.\n     * Assumes that the element has already been checked with isFocusable.\n     *\n     * @param element Element to be checked.\n     * @returns Whether the element is tabbable.\n     */\n    isTabbable(element) {\n        // Nothing is tabbable on the server 😎\n        if (!this._platform.isBrowser) {\n            return false;\n        }\n        const frameElement = getFrameElement(getWindow(element));\n        if (frameElement) {\n            // Frame elements inherit their tabindex onto all child elements.\n            if (getTabIndexValue(frameElement) === -1) {\n                return false;\n            }\n            // Browsers disable tabbing to an element inside of an invisible frame.\n            if (!this.isVisible(frameElement)) {\n                return false;\n            }\n        }\n        let nodeName = element.nodeName.toLowerCase();\n        let tabIndexValue = getTabIndexValue(element);\n        if (element.hasAttribute('contenteditable')) {\n            return tabIndexValue !== -1;\n        }\n        if (nodeName === 'iframe' || nodeName === 'object') {\n            // The frame or object's content may be tabbable depending on the content, but it's\n            // not possibly to reliably detect the content of the frames. We always consider such\n            // elements as non-tabbable.\n            return false;\n        }\n        // In iOS, the browser only considers some specific elements as tabbable.\n        if (this._platform.WEBKIT && this._platform.IOS && !isPotentiallyTabbableIOS(element)) {\n            return false;\n        }\n        if (nodeName === 'audio') {\n            // Audio elements without controls enabled are never tabbable, regardless\n            // of the tabindex attribute explicitly being set.\n            if (!element.hasAttribute('controls')) {\n                return false;\n            }\n            // Audio elements with controls are by default tabbable unless the\n            // tabindex attribute is set to `-1` explicitly.\n            return tabIndexValue !== -1;\n        }\n        if (nodeName === 'video') {\n            // For all video elements, if the tabindex attribute is set to `-1`, the video\n            // is not tabbable. Note: We cannot rely on the default `HTMLElement.tabIndex`\n            // property as that one is set to `-1` in Chrome, Edge and Safari v13.1. The\n            // tabindex attribute is the source of truth here.\n            if (tabIndexValue === -1) {\n                return false;\n            }\n            // If the tabindex is explicitly set, and not `-1` (as per check before), the\n            // video element is always tabbable (regardless of whether it has controls or not).\n            if (tabIndexValue !== null) {\n                return true;\n            }\n            // Otherwise (when no explicit tabindex is set), a video is only tabbable if it\n            // has controls enabled. Firefox is special as videos are always tabbable regardless\n            // of whether there are controls or not.\n            return this._platform.FIREFOX || element.hasAttribute('controls');\n        }\n        return element.tabIndex >= 0;\n    }\n    /**\n     * Gets whether an element can be focused by the user.\n     *\n     * @param element Element to be checked.\n     * @param config The config object with options to customize this method's behavior\n     * @returns Whether the element is focusable.\n     */\n    isFocusable(element, config) {\n        // Perform checks in order of left to most expensive.\n        // Again, naive approach that does not capture many edge cases and browser quirks.\n        return (isPotentiallyFocusable(element) &&\n            !this.isDisabled(element) &&\n            (config?.ignoreVisibility || this.isVisible(element)));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: InteractivityChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: InteractivityChecker, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: InteractivityChecker, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n/**\n * Returns the frame element from a window object. Since browsers like MS Edge throw errors if\n * the frameElement property is being accessed from a different host address, this property\n * should be accessed carefully.\n */\nfunction getFrameElement(window) {\n    try {\n        return window.frameElement;\n    }\n    catch {\n        return null;\n    }\n}\n/** Checks whether the specified element has any geometry / rectangles. */\nfunction hasGeometry(element) {\n    // Use logic from jQuery to check for an invisible element.\n    // See https://github.com/jquery/jquery/blob/master/src/css/hiddenVisibleSelectors.js#L12\n    return !!(element.offsetWidth ||\n        element.offsetHeight ||\n        (typeof element.getClientRects === 'function' && element.getClientRects().length));\n}\n/** Gets whether an element's  */\nfunction isNativeFormElement(element) {\n    let nodeName = element.nodeName.toLowerCase();\n    return (nodeName === 'input' ||\n        nodeName === 'select' ||\n        nodeName === 'button' ||\n        nodeName === 'textarea');\n}\n/** Gets whether an element is an `<input type=\"hidden\">`. */\nfunction isHiddenInput(element) {\n    return isInputElement(element) && element.type == 'hidden';\n}\n/** Gets whether an element is an anchor that has an href attribute. */\nfunction isAnchorWithHref(element) {\n    return isAnchorElement(element) && element.hasAttribute('href');\n}\n/** Gets whether an element is an input element. */\nfunction isInputElement(element) {\n    return element.nodeName.toLowerCase() == 'input';\n}\n/** Gets whether an element is an anchor element. */\nfunction isAnchorElement(element) {\n    return element.nodeName.toLowerCase() == 'a';\n}\n/** Gets whether an element has a valid tabindex. */\nfunction hasValidTabIndex(element) {\n    if (!element.hasAttribute('tabindex') || element.tabIndex === undefined) {\n        return false;\n    }\n    let tabIndex = element.getAttribute('tabindex');\n    return !!(tabIndex && !isNaN(parseInt(tabIndex, 10)));\n}\n/**\n * Returns the parsed tabindex from the element attributes instead of returning the\n * evaluated tabindex from the browsers defaults.\n */\nfunction getTabIndexValue(element) {\n    if (!hasValidTabIndex(element)) {\n        return null;\n    }\n    // See browser issue in Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054\n    const tabIndex = parseInt(element.getAttribute('tabindex') || '', 10);\n    return isNaN(tabIndex) ? -1 : tabIndex;\n}\n/** Checks whether the specified element is potentially tabbable on iOS */\nfunction isPotentiallyTabbableIOS(element) {\n    let nodeName = element.nodeName.toLowerCase();\n    let inputType = nodeName === 'input' && element.type;\n    return (inputType === 'text' ||\n        inputType === 'password' ||\n        nodeName === 'select' ||\n        nodeName === 'textarea');\n}\n/**\n * Gets whether an element is potentially focusable without taking current visible/disabled state\n * into account.\n */\nfunction isPotentiallyFocusable(element) {\n    // Inputs are potentially focusable *unless* they're type=\"hidden\".\n    if (isHiddenInput(element)) {\n        return false;\n    }\n    return (isNativeFormElement(element) ||\n        isAnchorWithHref(element) ||\n        element.hasAttribute('contenteditable') ||\n        hasValidTabIndex(element));\n}\n/** Gets the parent window of a DOM node with regards of being inside of an iframe. */\nfunction getWindow(node) {\n    // ownerDocument is null if `node` itself *is* a document.\n    return (node.ownerDocument && node.ownerDocument.defaultView) || window;\n}\n\n/**\n * Class that allows for trapping focus within a DOM element.\n *\n * This class currently uses a relatively simple approach to focus trapping.\n * It assumes that the tab order is the same as DOM order, which is not necessarily true.\n * Things like `tabIndex > 0`, flex `order`, and shadow roots can cause the two to be misaligned.\n */\nclass FocusTrap {\n    _element;\n    _checker;\n    _ngZone;\n    _document;\n    _injector;\n    _startAnchor;\n    _endAnchor;\n    _hasAttached = false;\n    // Event listeners for the anchors. Need to be regular functions so that we can unbind them later.\n    startAnchorListener = () => this.focusLastTabbableElement();\n    endAnchorListener = () => this.focusFirstTabbableElement();\n    /** Whether the focus trap is active. */\n    get enabled() {\n        return this._enabled;\n    }\n    set enabled(value) {\n        this._enabled = value;\n        if (this._startAnchor && this._endAnchor) {\n            this._toggleAnchorTabIndex(value, this._startAnchor);\n            this._toggleAnchorTabIndex(value, this._endAnchor);\n        }\n    }\n    _enabled = true;\n    constructor(_element, _checker, _ngZone, _document, deferAnchors = false, \n    /** @breaking-change 20.0.0 param to become required */\n    _injector) {\n        this._element = _element;\n        this._checker = _checker;\n        this._ngZone = _ngZone;\n        this._document = _document;\n        this._injector = _injector;\n        if (!deferAnchors) {\n            this.attachAnchors();\n        }\n    }\n    /** Destroys the focus trap by cleaning up the anchors. */\n    destroy() {\n        const startAnchor = this._startAnchor;\n        const endAnchor = this._endAnchor;\n        if (startAnchor) {\n            startAnchor.removeEventListener('focus', this.startAnchorListener);\n            startAnchor.remove();\n        }\n        if (endAnchor) {\n            endAnchor.removeEventListener('focus', this.endAnchorListener);\n            endAnchor.remove();\n        }\n        this._startAnchor = this._endAnchor = null;\n        this._hasAttached = false;\n    }\n    /**\n     * Inserts the anchors into the DOM. This is usually done automatically\n     * in the constructor, but can be deferred for cases like directives with `*ngIf`.\n     * @returns Whether the focus trap managed to attach successfully. This may not be the case\n     * if the target element isn't currently in the DOM.\n     */\n    attachAnchors() {\n        // If we're not on the browser, there can be no focus to trap.\n        if (this._hasAttached) {\n            return true;\n        }\n        this._ngZone.runOutsideAngular(() => {\n            if (!this._startAnchor) {\n                this._startAnchor = this._createAnchor();\n                this._startAnchor.addEventListener('focus', this.startAnchorListener);\n            }\n            if (!this._endAnchor) {\n                this._endAnchor = this._createAnchor();\n                this._endAnchor.addEventListener('focus', this.endAnchorListener);\n            }\n        });\n        if (this._element.parentNode) {\n            this._element.parentNode.insertBefore(this._startAnchor, this._element);\n            this._element.parentNode.insertBefore(this._endAnchor, this._element.nextSibling);\n            this._hasAttached = true;\n        }\n        return this._hasAttached;\n    }\n    /**\n     * Waits for the zone to stabilize, then focuses the first tabbable element.\n     * @returns Returns a promise that resolves with a boolean, depending\n     * on whether focus was moved successfully.\n     */\n    focusInitialElementWhenReady(options) {\n        return new Promise(resolve => {\n            this._executeOnStable(() => resolve(this.focusInitialElement(options)));\n        });\n    }\n    /**\n     * Waits for the zone to stabilize, then focuses\n     * the first tabbable element within the focus trap region.\n     * @returns Returns a promise that resolves with a boolean, depending\n     * on whether focus was moved successfully.\n     */\n    focusFirstTabbableElementWhenReady(options) {\n        return new Promise(resolve => {\n            this._executeOnStable(() => resolve(this.focusFirstTabbableElement(options)));\n        });\n    }\n    /**\n     * Waits for the zone to stabilize, then focuses\n     * the last tabbable element within the focus trap region.\n     * @returns Returns a promise that resolves with a boolean, depending\n     * on whether focus was moved successfully.\n     */\n    focusLastTabbableElementWhenReady(options) {\n        return new Promise(resolve => {\n            this._executeOnStable(() => resolve(this.focusLastTabbableElement(options)));\n        });\n    }\n    /**\n     * Get the specified boundary element of the trapped region.\n     * @param bound The boundary to get (start or end of trapped region).\n     * @returns The boundary element.\n     */\n    _getRegionBoundary(bound) {\n        // Contains the deprecated version of selector, for temporary backwards comparability.\n        const markers = this._element.querySelectorAll(`[cdk-focus-region-${bound}], ` + `[cdkFocusRegion${bound}], ` + `[cdk-focus-${bound}]`);\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            for (let i = 0; i < markers.length; i++) {\n                // @breaking-change 8.0.0\n                if (markers[i].hasAttribute(`cdk-focus-${bound}`)) {\n                    console.warn(`Found use of deprecated attribute 'cdk-focus-${bound}', ` +\n                        `use 'cdkFocusRegion${bound}' instead. The deprecated ` +\n                        `attribute will be removed in 8.0.0.`, markers[i]);\n                }\n                else if (markers[i].hasAttribute(`cdk-focus-region-${bound}`)) {\n                    console.warn(`Found use of deprecated attribute 'cdk-focus-region-${bound}', ` +\n                        `use 'cdkFocusRegion${bound}' instead. The deprecated attribute ` +\n                        `will be removed in 8.0.0.`, markers[i]);\n                }\n            }\n        }\n        if (bound == 'start') {\n            return markers.length ? markers[0] : this._getFirstTabbableElement(this._element);\n        }\n        return markers.length\n            ? markers[markers.length - 1]\n            : this._getLastTabbableElement(this._element);\n    }\n    /**\n     * Focuses the element that should be focused when the focus trap is initialized.\n     * @returns Whether focus was moved successfully.\n     */\n    focusInitialElement(options) {\n        // Contains the deprecated version of selector, for temporary backwards comparability.\n        const redirectToElement = this._element.querySelector(`[cdk-focus-initial], ` + `[cdkFocusInitial]`);\n        if (redirectToElement) {\n            // @breaking-change 8.0.0\n            if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n                redirectToElement.hasAttribute(`cdk-focus-initial`)) {\n                console.warn(`Found use of deprecated attribute 'cdk-focus-initial', ` +\n                    `use 'cdkFocusInitial' instead. The deprecated attribute ` +\n                    `will be removed in 8.0.0`, redirectToElement);\n            }\n            // Warn the consumer if the element they've pointed to\n            // isn't focusable, when not in production mode.\n            if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n                !this._checker.isFocusable(redirectToElement)) {\n                console.warn(`Element matching '[cdkFocusInitial]' is not focusable.`, redirectToElement);\n            }\n            if (!this._checker.isFocusable(redirectToElement)) {\n                const focusableChild = this._getFirstTabbableElement(redirectToElement);\n                focusableChild?.focus(options);\n                return !!focusableChild;\n            }\n            redirectToElement.focus(options);\n            return true;\n        }\n        return this.focusFirstTabbableElement(options);\n    }\n    /**\n     * Focuses the first tabbable element within the focus trap region.\n     * @returns Whether focus was moved successfully.\n     */\n    focusFirstTabbableElement(options) {\n        const redirectToElement = this._getRegionBoundary('start');\n        if (redirectToElement) {\n            redirectToElement.focus(options);\n        }\n        return !!redirectToElement;\n    }\n    /**\n     * Focuses the last tabbable element within the focus trap region.\n     * @returns Whether focus was moved successfully.\n     */\n    focusLastTabbableElement(options) {\n        const redirectToElement = this._getRegionBoundary('end');\n        if (redirectToElement) {\n            redirectToElement.focus(options);\n        }\n        return !!redirectToElement;\n    }\n    /**\n     * Checks whether the focus trap has successfully been attached.\n     */\n    hasAttached() {\n        return this._hasAttached;\n    }\n    /** Get the first tabbable element from a DOM subtree (inclusive). */\n    _getFirstTabbableElement(root) {\n        if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {\n            return root;\n        }\n        const children = root.children;\n        for (let i = 0; i < children.length; i++) {\n            const tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE\n                ? this._getFirstTabbableElement(children[i])\n                : null;\n            if (tabbableChild) {\n                return tabbableChild;\n            }\n        }\n        return null;\n    }\n    /** Get the last tabbable element from a DOM subtree (inclusive). */\n    _getLastTabbableElement(root) {\n        if (this._checker.isFocusable(root) && this._checker.isTabbable(root)) {\n            return root;\n        }\n        // Iterate in reverse DOM order.\n        const children = root.children;\n        for (let i = children.length - 1; i >= 0; i--) {\n            const tabbableChild = children[i].nodeType === this._document.ELEMENT_NODE\n                ? this._getLastTabbableElement(children[i])\n                : null;\n            if (tabbableChild) {\n                return tabbableChild;\n            }\n        }\n        return null;\n    }\n    /** Creates an anchor element. */\n    _createAnchor() {\n        const anchor = this._document.createElement('div');\n        this._toggleAnchorTabIndex(this._enabled, anchor);\n        anchor.classList.add('cdk-visually-hidden');\n        anchor.classList.add('cdk-focus-trap-anchor');\n        anchor.setAttribute('aria-hidden', 'true');\n        return anchor;\n    }\n    /**\n     * Toggles the `tabindex` of an anchor, based on the enabled state of the focus trap.\n     * @param isEnabled Whether the focus trap is enabled.\n     * @param anchor Anchor on which to toggle the tabindex.\n     */\n    _toggleAnchorTabIndex(isEnabled, anchor) {\n        // Remove the tabindex completely, rather than setting it to -1, because if the\n        // element has a tabindex, the user might still hit it when navigating with the arrow keys.\n        isEnabled ? anchor.setAttribute('tabindex', '0') : anchor.removeAttribute('tabindex');\n    }\n    /**\n     * Toggles the`tabindex` of both anchors to either trap Tab focus or allow it to escape.\n     * @param enabled: Whether the anchors should trap Tab.\n     */\n    toggleAnchors(enabled) {\n        if (this._startAnchor && this._endAnchor) {\n            this._toggleAnchorTabIndex(enabled, this._startAnchor);\n            this._toggleAnchorTabIndex(enabled, this._endAnchor);\n        }\n    }\n    /** Executes a function when the zone is stable. */\n    _executeOnStable(fn) {\n        // TODO: remove this conditional when injector is required in the constructor.\n        if (this._injector) {\n            afterNextRender(fn, { injector: this._injector });\n        }\n        else {\n            setTimeout(fn);\n        }\n    }\n}\n/**\n * Factory that allows easy instantiation of focus traps.\n */\nclass FocusTrapFactory {\n    _checker = inject(InteractivityChecker);\n    _ngZone = inject(NgZone);\n    _document = inject(DOCUMENT);\n    _injector = inject(Injector);\n    constructor() {\n        inject(_CdkPrivateStyleLoader).load(_VisuallyHiddenLoader);\n    }\n    /**\n     * Creates a focus-trapped region around the given element.\n     * @param element The element around which focus will be trapped.\n     * @param deferCaptureElements Defers the creation of focus-capturing elements to be done\n     *     manually by the user.\n     * @returns The created focus trap instance.\n     */\n    create(element, deferCaptureElements = false) {\n        return new FocusTrap(element, this._checker, this._ngZone, this._document, deferCaptureElements, this._injector);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FocusTrapFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FocusTrapFactory, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FocusTrapFactory, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n/** Directive for trapping focus within a region. */\nclass CdkTrapFocus {\n    _elementRef = inject(ElementRef);\n    _focusTrapFactory = inject(FocusTrapFactory);\n    /** Underlying FocusTrap instance. */\n    focusTrap;\n    /** Previously focused element to restore focus to upon destroy when using autoCapture. */\n    _previouslyFocusedElement = null;\n    /** Whether the focus trap is active. */\n    get enabled() {\n        return this.focusTrap?.enabled || false;\n    }\n    set enabled(value) {\n        if (this.focusTrap) {\n            this.focusTrap.enabled = value;\n        }\n    }\n    /**\n     * Whether the directive should automatically move focus into the trapped region upon\n     * initialization and return focus to the previous activeElement upon destruction.\n     */\n    autoCapture;\n    constructor() {\n        const platform = inject(Platform);\n        if (platform.isBrowser) {\n            this.focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement, true);\n        }\n    }\n    ngOnDestroy() {\n        this.focusTrap?.destroy();\n        // If we stored a previously focused element when using autoCapture, return focus to that\n        // element now that the trapped region is being destroyed.\n        if (this._previouslyFocusedElement) {\n            this._previouslyFocusedElement.focus();\n            this._previouslyFocusedElement = null;\n        }\n    }\n    ngAfterContentInit() {\n        this.focusTrap?.attachAnchors();\n        if (this.autoCapture) {\n            this._captureFocus();\n        }\n    }\n    ngDoCheck() {\n        if (this.focusTrap && !this.focusTrap.hasAttached()) {\n            this.focusTrap.attachAnchors();\n        }\n    }\n    ngOnChanges(changes) {\n        const autoCaptureChange = changes['autoCapture'];\n        if (autoCaptureChange &&\n            !autoCaptureChange.firstChange &&\n            this.autoCapture &&\n            this.focusTrap?.hasAttached()) {\n            this._captureFocus();\n        }\n    }\n    _captureFocus() {\n        this._previouslyFocusedElement = _getFocusedElementPierceShadowDom();\n        this.focusTrap?.focusInitialElementWhenReady();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkTrapFocus, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: CdkTrapFocus, isStandalone: true, selector: \"[cdkTrapFocus]\", inputs: { enabled: [\"cdkTrapFocus\", \"enabled\", booleanAttribute], autoCapture: [\"cdkTrapFocusAutoCapture\", \"autoCapture\", booleanAttribute] }, exportAs: [\"cdkTrapFocus\"], usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkTrapFocus, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkTrapFocus]',\n                    exportAs: 'cdkTrapFocus',\n                }]\n        }], ctorParameters: () => [], propDecorators: { enabled: [{\n                type: Input,\n                args: [{ alias: 'cdkTrapFocus', transform: booleanAttribute }]\n            }], autoCapture: [{\n                type: Input,\n                args: [{ alias: 'cdkTrapFocusAutoCapture', transform: booleanAttribute }]\n            }] } });\n\n/**\n * Class that allows for trapping focus within a DOM element.\n *\n * This class uses a strategy pattern that determines how it traps focus.\n * See FocusTrapInertStrategy.\n */\nclass ConfigurableFocusTrap extends FocusTrap {\n    _focusTrapManager;\n    _inertStrategy;\n    /** Whether the FocusTrap is enabled. */\n    get enabled() {\n        return this._enabled;\n    }\n    set enabled(value) {\n        this._enabled = value;\n        if (this._enabled) {\n            this._focusTrapManager.register(this);\n        }\n        else {\n            this._focusTrapManager.deregister(this);\n        }\n    }\n    constructor(_element, _checker, _ngZone, _document, _focusTrapManager, _inertStrategy, config, injector) {\n        super(_element, _checker, _ngZone, _document, config.defer, injector);\n        this._focusTrapManager = _focusTrapManager;\n        this._inertStrategy = _inertStrategy;\n        this._focusTrapManager.register(this);\n    }\n    /** Notifies the FocusTrapManager that this FocusTrap will be destroyed. */\n    destroy() {\n        this._focusTrapManager.deregister(this);\n        super.destroy();\n    }\n    /** @docs-private Implemented as part of ManagedFocusTrap. */\n    _enable() {\n        this._inertStrategy.preventFocus(this);\n        this.toggleAnchors(true);\n    }\n    /** @docs-private Implemented as part of ManagedFocusTrap. */\n    _disable() {\n        this._inertStrategy.allowFocus(this);\n        this.toggleAnchors(false);\n    }\n}\n\n/**\n * Lightweight FocusTrapInertStrategy that adds a document focus event\n * listener to redirect focus back inside the FocusTrap.\n */\nclass EventListenerFocusTrapInertStrategy {\n    /** Focus event handler. */\n    _listener = null;\n    /** Adds a document event listener that keeps focus inside the FocusTrap. */\n    preventFocus(focusTrap) {\n        // Ensure there's only one listener per document\n        if (this._listener) {\n            focusTrap._document.removeEventListener('focus', this._listener, true);\n        }\n        this._listener = (e) => this._trapFocus(focusTrap, e);\n        focusTrap._ngZone.runOutsideAngular(() => {\n            focusTrap._document.addEventListener('focus', this._listener, true);\n        });\n    }\n    /** Removes the event listener added in preventFocus. */\n    allowFocus(focusTrap) {\n        if (!this._listener) {\n            return;\n        }\n        focusTrap._document.removeEventListener('focus', this._listener, true);\n        this._listener = null;\n    }\n    /**\n     * Refocuses the first element in the FocusTrap if the focus event target was outside\n     * the FocusTrap.\n     *\n     * This is an event listener callback. The event listener is added in runOutsideAngular,\n     * so all this code runs outside Angular as well.\n     */\n    _trapFocus(focusTrap, event) {\n        const target = event.target;\n        const focusTrapRoot = focusTrap._element;\n        // Don't refocus if target was in an overlay, because the overlay might be associated\n        // with an element inside the FocusTrap, ex. mat-select.\n        if (target && !focusTrapRoot.contains(target) && !target.closest?.('div.cdk-overlay-pane')) {\n            // Some legacy FocusTrap usages have logic that focuses some element on the page\n            // just before FocusTrap is destroyed. For backwards compatibility, wait\n            // to be sure FocusTrap is still enabled before refocusing.\n            setTimeout(() => {\n                // Check whether focus wasn't put back into the focus trap while the timeout was pending.\n                if (focusTrap.enabled && !focusTrapRoot.contains(focusTrap._document.activeElement)) {\n                    focusTrap.focusFirstTabbableElement();\n                }\n            });\n        }\n    }\n}\n\n/** The injection token used to specify the inert strategy. */\nconst FOCUS_TRAP_INERT_STRATEGY = new InjectionToken('FOCUS_TRAP_INERT_STRATEGY');\n\n/** Injectable that ensures only the most recently enabled FocusTrap is active. */\nclass FocusTrapManager {\n    // A stack of the FocusTraps on the page. Only the FocusTrap at the\n    // top of the stack is active.\n    _focusTrapStack = [];\n    /**\n     * Disables the FocusTrap at the top of the stack, and then pushes\n     * the new FocusTrap onto the stack.\n     */\n    register(focusTrap) {\n        // Dedupe focusTraps that register multiple times.\n        this._focusTrapStack = this._focusTrapStack.filter(ft => ft !== focusTrap);\n        let stack = this._focusTrapStack;\n        if (stack.length) {\n            stack[stack.length - 1]._disable();\n        }\n        stack.push(focusTrap);\n        focusTrap._enable();\n    }\n    /**\n     * Removes the FocusTrap from the stack, and activates the\n     * FocusTrap that is the new top of the stack.\n     */\n    deregister(focusTrap) {\n        focusTrap._disable();\n        const stack = this._focusTrapStack;\n        const i = stack.indexOf(focusTrap);\n        if (i !== -1) {\n            stack.splice(i, 1);\n            if (stack.length) {\n                stack[stack.length - 1]._enable();\n            }\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FocusTrapManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FocusTrapManager, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FocusTrapManager, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n\n/** Factory that allows easy instantiation of configurable focus traps. */\nclass ConfigurableFocusTrapFactory {\n    _checker = inject(InteractivityChecker);\n    _ngZone = inject(NgZone);\n    _focusTrapManager = inject(FocusTrapManager);\n    _document = inject(DOCUMENT);\n    _inertStrategy;\n    _injector = inject(Injector);\n    constructor() {\n        const inertStrategy = inject(FOCUS_TRAP_INERT_STRATEGY, { optional: true });\n        // TODO split up the strategies into different modules, similar to DateAdapter.\n        this._inertStrategy = inertStrategy || new EventListenerFocusTrapInertStrategy();\n    }\n    create(element, config = { defer: false }) {\n        let configObject;\n        if (typeof config === 'boolean') {\n            configObject = { defer: config };\n        }\n        else {\n            configObject = config;\n        }\n        return new ConfigurableFocusTrap(element, this._checker, this._ngZone, this._document, this._focusTrapManager, this._inertStrategy, configObject, this._injector);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ConfigurableFocusTrapFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ConfigurableFocusTrapFactory, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ConfigurableFocusTrapFactory, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\n/** Gets whether an event could be a faked `mousedown` event dispatched by a screen reader. */\nfunction isFakeMousedownFromScreenReader(event) {\n    // Some screen readers will dispatch a fake `mousedown` event when pressing enter or space on\n    // a clickable element. We can distinguish these events when `event.buttons` is zero, or\n    // `event.detail` is zero depending on the browser:\n    // - `event.buttons` works on Firefox, but fails on Chrome.\n    // - `detail` works on Chrome, but fails on Firefox.\n    return event.buttons === 0 || event.detail === 0;\n}\n/** Gets whether an event could be a faked `touchstart` event dispatched by a screen reader. */\nfunction isFakeTouchstartFromScreenReader(event) {\n    const touch = (event.touches && event.touches[0]) || (event.changedTouches && event.changedTouches[0]);\n    // A fake `touchstart` can be distinguished from a real one by looking at the `identifier`\n    // which is typically >= 0 on a real device versus -1 from a screen reader. Just to be safe,\n    // we can also look at `radiusX` and `radiusY`. This behavior was observed against a Windows 10\n    // device with a touch screen running NVDA v2020.4 and Firefox 85 or Chrome 88.\n    return (!!touch &&\n        touch.identifier === -1 &&\n        (touch.radiusX == null || touch.radiusX === 1) &&\n        (touch.radiusY == null || touch.radiusY === 1));\n}\n\n/**\n * Injectable options for the InputModalityDetector. These are shallowly merged with the default\n * options.\n */\nconst INPUT_MODALITY_DETECTOR_OPTIONS = new InjectionToken('cdk-input-modality-detector-options');\n/**\n * Default options for the InputModalityDetector.\n *\n * Modifier keys are ignored by default (i.e. when pressed won't cause the service to detect\n * keyboard input modality) for two reasons:\n *\n * 1. Modifier keys are commonly used with mouse to perform actions such as 'right click' or 'open\n *    in new tab', and are thus less representative of actual keyboard interaction.\n * 2. VoiceOver triggers some keyboard events when linearly navigating with Control + Option (but\n *    confusingly not with Caps Lock). Thus, to have parity with other screen readers, we ignore\n *    these keys so as to not update the input modality.\n *\n * Note that we do not by default ignore the right Meta key on Safari because it has the same key\n * code as the ContextMenu key on other browsers. When we switch to using event.key, we can\n * distinguish between the two.\n */\nconst INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS = {\n    ignoreKeys: [ALT, CONTROL, MAC_META, META, SHIFT],\n};\n/**\n * The amount of time needed to pass after a touchstart event in order for a subsequent mousedown\n * event to be attributed as mouse and not touch.\n *\n * This is the value used by AngularJS Material. Through trial and error (on iPhone 6S) they found\n * that a value of around 650ms seems appropriate.\n */\nconst TOUCH_BUFFER_MS = 650;\n/**\n * Event listener options that enable capturing and also mark the listener as passive if the browser\n * supports it.\n */\nconst modalityEventListenerOptions = normalizePassiveListenerOptions({\n    passive: true,\n    capture: true,\n});\n/**\n * Service that detects the user's input modality.\n *\n * This service does not update the input modality when a user navigates with a screen reader\n * (e.g. linear navigation with VoiceOver, object navigation / browse mode with NVDA, virtual PC\n * cursor mode with JAWS). This is in part due to technical limitations (i.e. keyboard events do not\n * fire as expected in these modes) but is also arguably the correct behavior. Navigating with a\n * screen reader is akin to visually scanning a page, and should not be interpreted as actual user\n * input interaction.\n *\n * When a user is not navigating but *interacting* with a screen reader, this service attempts to\n * update the input modality to keyboard, but in general this service's behavior is largely\n * undefined.\n */\nclass InputModalityDetector {\n    _platform = inject(Platform);\n    /** Emits whenever an input modality is detected. */\n    modalityDetected;\n    /** Emits when the input modality changes. */\n    modalityChanged;\n    /** The most recently detected input modality. */\n    get mostRecentModality() {\n        return this._modality.value;\n    }\n    /**\n     * The most recently detected input modality event target. Is null if no input modality has been\n     * detected or if the associated event target is null for some unknown reason.\n     */\n    _mostRecentTarget = null;\n    /** The underlying BehaviorSubject that emits whenever an input modality is detected. */\n    _modality = new BehaviorSubject(null);\n    /** Options for this InputModalityDetector. */\n    _options;\n    /**\n     * The timestamp of the last touch input modality. Used to determine whether mousedown events\n     * should be attributed to mouse or touch.\n     */\n    _lastTouchMs = 0;\n    /**\n     * Handles keydown events. Must be an arrow function in order to preserve the context when it gets\n     * bound.\n     */\n    _onKeydown = (event) => {\n        // If this is one of the keys we should ignore, then ignore it and don't update the input\n        // modality to keyboard.\n        if (this._options?.ignoreKeys?.some(keyCode => keyCode === event.keyCode)) {\n            return;\n        }\n        this._modality.next('keyboard');\n        this._mostRecentTarget = _getEventTarget(event);\n    };\n    /**\n     * Handles mousedown events. Must be an arrow function in order to preserve the context when it\n     * gets bound.\n     */\n    _onMousedown = (event) => {\n        // Touches trigger both touch and mouse events, so we need to distinguish between mouse events\n        // that were triggered via mouse vs touch. To do so, check if the mouse event occurs closely\n        // after the previous touch event.\n        if (Date.now() - this._lastTouchMs < TOUCH_BUFFER_MS) {\n            return;\n        }\n        // Fake mousedown events are fired by some screen readers when controls are activated by the\n        // screen reader. Attribute them to keyboard input modality.\n        this._modality.next(isFakeMousedownFromScreenReader(event) ? 'keyboard' : 'mouse');\n        this._mostRecentTarget = _getEventTarget(event);\n    };\n    /**\n     * Handles touchstart events. Must be an arrow function in order to preserve the context when it\n     * gets bound.\n     */\n    _onTouchstart = (event) => {\n        // Same scenario as mentioned in _onMousedown, but on touch screen devices, fake touchstart\n        // events are fired. Again, attribute to keyboard input modality.\n        if (isFakeTouchstartFromScreenReader(event)) {\n            this._modality.next('keyboard');\n            return;\n        }\n        // Store the timestamp of this touch event, as it's used to distinguish between mouse events\n        // triggered via mouse vs touch.\n        this._lastTouchMs = Date.now();\n        this._modality.next('touch');\n        this._mostRecentTarget = _getEventTarget(event);\n    };\n    constructor() {\n        const ngZone = inject(NgZone);\n        const document = inject(DOCUMENT);\n        const options = inject(INPUT_MODALITY_DETECTOR_OPTIONS, { optional: true });\n        this._options = {\n            ...INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS,\n            ...options,\n        };\n        // Skip the first emission as it's null.\n        this.modalityDetected = this._modality.pipe(skip(1));\n        this.modalityChanged = this.modalityDetected.pipe(distinctUntilChanged());\n        // If we're not in a browser, this service should do nothing, as there's no relevant input\n        // modality to detect.\n        if (this._platform.isBrowser) {\n            ngZone.runOutsideAngular(() => {\n                document.addEventListener('keydown', this._onKeydown, modalityEventListenerOptions);\n                document.addEventListener('mousedown', this._onMousedown, modalityEventListenerOptions);\n                document.addEventListener('touchstart', this._onTouchstart, modalityEventListenerOptions);\n            });\n        }\n    }\n    ngOnDestroy() {\n        this._modality.complete();\n        if (this._platform.isBrowser) {\n            document.removeEventListener('keydown', this._onKeydown, modalityEventListenerOptions);\n            document.removeEventListener('mousedown', this._onMousedown, modalityEventListenerOptions);\n            document.removeEventListener('touchstart', this._onTouchstart, modalityEventListenerOptions);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: InputModalityDetector, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: InputModalityDetector, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: InputModalityDetector, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\nconst LIVE_ANNOUNCER_ELEMENT_TOKEN = new InjectionToken('liveAnnouncerElement', {\n    providedIn: 'root',\n    factory: LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY,\n});\n/** @docs-private */\nfunction LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY() {\n    return null;\n}\n/** Injection token that can be used to configure the default options for the LiveAnnouncer. */\nconst LIVE_ANNOUNCER_DEFAULT_OPTIONS = new InjectionToken('LIVE_ANNOUNCER_DEFAULT_OPTIONS');\n\nlet uniqueIds = 0;\nclass LiveAnnouncer {\n    _ngZone = inject(NgZone);\n    _defaultOptions = inject(LIVE_ANNOUNCER_DEFAULT_OPTIONS, {\n        optional: true,\n    });\n    _liveElement;\n    _document = inject(DOCUMENT);\n    _previousTimeout;\n    _currentPromise;\n    _currentResolve;\n    constructor() {\n        const elementToken = inject(LIVE_ANNOUNCER_ELEMENT_TOKEN, { optional: true });\n        this._liveElement = elementToken || this._createLiveElement();\n    }\n    announce(message, ...args) {\n        const defaultOptions = this._defaultOptions;\n        let politeness;\n        let duration;\n        if (args.length === 1 && typeof args[0] === 'number') {\n            duration = args[0];\n        }\n        else {\n            [politeness, duration] = args;\n        }\n        this.clear();\n        clearTimeout(this._previousTimeout);\n        if (!politeness) {\n            politeness =\n                defaultOptions && defaultOptions.politeness ? defaultOptions.politeness : 'polite';\n        }\n        if (duration == null && defaultOptions) {\n            duration = defaultOptions.duration;\n        }\n        // TODO: ensure changing the politeness works on all environments we support.\n        this._liveElement.setAttribute('aria-live', politeness);\n        if (this._liveElement.id) {\n            this._exposeAnnouncerToModals(this._liveElement.id);\n        }\n        // This 100ms timeout is necessary for some browser + screen-reader combinations:\n        // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout.\n        // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a\n        //   second time without clearing and then using a non-zero delay.\n        // (using JAWS 17 at time of this writing).\n        return this._ngZone.runOutsideAngular(() => {\n            if (!this._currentPromise) {\n                this._currentPromise = new Promise(resolve => (this._currentResolve = resolve));\n            }\n            clearTimeout(this._previousTimeout);\n            this._previousTimeout = setTimeout(() => {\n                this._liveElement.textContent = message;\n                if (typeof duration === 'number') {\n                    this._previousTimeout = setTimeout(() => this.clear(), duration);\n                }\n                // For some reason in tests this can be undefined\n                // Probably related to ZoneJS and every other thing that patches browser APIs in tests\n                this._currentResolve?.();\n                this._currentPromise = this._currentResolve = undefined;\n            }, 100);\n            return this._currentPromise;\n        });\n    }\n    /**\n     * Clears the current text from the announcer element. Can be used to prevent\n     * screen readers from reading the text out again while the user is going\n     * through the page landmarks.\n     */\n    clear() {\n        if (this._liveElement) {\n            this._liveElement.textContent = '';\n        }\n    }\n    ngOnDestroy() {\n        clearTimeout(this._previousTimeout);\n        this._liveElement?.remove();\n        this._liveElement = null;\n        this._currentResolve?.();\n        this._currentPromise = this._currentResolve = undefined;\n    }\n    _createLiveElement() {\n        const elementClass = 'cdk-live-announcer-element';\n        const previousElements = this._document.getElementsByClassName(elementClass);\n        const liveEl = this._document.createElement('div');\n        // Remove any old containers. This can happen when coming in from a server-side-rendered page.\n        for (let i = 0; i < previousElements.length; i++) {\n            previousElements[i].remove();\n        }\n        liveEl.classList.add(elementClass);\n        liveEl.classList.add('cdk-visually-hidden');\n        liveEl.setAttribute('aria-atomic', 'true');\n        liveEl.setAttribute('aria-live', 'polite');\n        liveEl.id = `cdk-live-announcer-${uniqueIds++}`;\n        this._document.body.appendChild(liveEl);\n        return liveEl;\n    }\n    /**\n     * Some browsers won't expose the accessibility node of the live announcer element if there is an\n     * `aria-modal` and the live announcer is outside of it. This method works around the issue by\n     * pointing the `aria-owns` of all modals to the live announcer element.\n     */\n    _exposeAnnouncerToModals(id) {\n        // TODO(http://github.com/angular/components/issues/26853): consider de-duplicating this with\n        // the `SnakBarContainer` and other usages.\n        //\n        // Note that the selector here is limited to CDK overlays at the moment in order to reduce the\n        // section of the DOM we need to look through. This should cover all the cases we support, but\n        // the selector can be expanded if it turns out to be too narrow.\n        const modals = this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal=\"true\"]');\n        for (let i = 0; i < modals.length; i++) {\n            const modal = modals[i];\n            const ariaOwns = modal.getAttribute('aria-owns');\n            if (!ariaOwns) {\n                modal.setAttribute('aria-owns', id);\n            }\n            else if (ariaOwns.indexOf(id) === -1) {\n                modal.setAttribute('aria-owns', ariaOwns + ' ' + id);\n            }\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: LiveAnnouncer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: LiveAnnouncer, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: LiveAnnouncer, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n/**\n * A directive that works similarly to aria-live, but uses the LiveAnnouncer to ensure compatibility\n * with a wider range of browsers and screen readers.\n */\nclass CdkAriaLive {\n    _elementRef = inject(ElementRef);\n    _liveAnnouncer = inject(LiveAnnouncer);\n    _contentObserver = inject(ContentObserver);\n    _ngZone = inject(NgZone);\n    /** The aria-live politeness level to use when announcing messages. */\n    get politeness() {\n        return this._politeness;\n    }\n    set politeness(value) {\n        this._politeness = value === 'off' || value === 'assertive' ? value : 'polite';\n        if (this._politeness === 'off') {\n            if (this._subscription) {\n                this._subscription.unsubscribe();\n                this._subscription = null;\n            }\n        }\n        else if (!this._subscription) {\n            this._subscription = this._ngZone.runOutsideAngular(() => {\n                return this._contentObserver.observe(this._elementRef).subscribe(() => {\n                    // Note that we use textContent here, rather than innerText, in order to avoid a reflow.\n                    const elementText = this._elementRef.nativeElement.textContent;\n                    // The `MutationObserver` fires also for attribute\n                    // changes which we don't want to announce.\n                    if (elementText !== this._previousAnnouncedText) {\n                        this._liveAnnouncer.announce(elementText, this._politeness, this.duration);\n                        this._previousAnnouncedText = elementText;\n                    }\n                });\n            });\n        }\n    }\n    _politeness = 'polite';\n    /** Time in milliseconds after which to clear out the announcer element. */\n    duration;\n    _previousAnnouncedText;\n    _subscription;\n    constructor() {\n        inject(_CdkPrivateStyleLoader).load(_VisuallyHiddenLoader);\n    }\n    ngOnDestroy() {\n        if (this._subscription) {\n            this._subscription.unsubscribe();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkAriaLive, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkAriaLive, isStandalone: true, selector: \"[cdkAriaLive]\", inputs: { politeness: [\"cdkAriaLive\", \"politeness\"], duration: [\"cdkAriaLiveDuration\", \"duration\"] }, exportAs: [\"cdkAriaLive\"], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkAriaLive, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkAriaLive]',\n                    exportAs: 'cdkAriaLive',\n                }]\n        }], ctorParameters: () => [], propDecorators: { politeness: [{\n                type: Input,\n                args: ['cdkAriaLive']\n            }], duration: [{\n                type: Input,\n                args: ['cdkAriaLiveDuration']\n            }] } });\n\n/** Detection mode used for attributing the origin of a focus event. */\nvar FocusMonitorDetectionMode;\n(function (FocusMonitorDetectionMode) {\n    /**\n     * Any mousedown, keydown, or touchstart event that happened in the previous\n     * tick or the current tick will be used to assign a focus event's origin (to\n     * either mouse, keyboard, or touch). This is the default option.\n     */\n    FocusMonitorDetectionMode[FocusMonitorDetectionMode[\"IMMEDIATE\"] = 0] = \"IMMEDIATE\";\n    /**\n     * A focus event's origin is always attributed to the last corresponding\n     * mousedown, keydown, or touchstart event, no matter how long ago it occurred.\n     */\n    FocusMonitorDetectionMode[FocusMonitorDetectionMode[\"EVENTUAL\"] = 1] = \"EVENTUAL\";\n})(FocusMonitorDetectionMode || (FocusMonitorDetectionMode = {}));\n/** InjectionToken for FocusMonitorOptions. */\nconst FOCUS_MONITOR_DEFAULT_OPTIONS = new InjectionToken('cdk-focus-monitor-default-options');\n/**\n * Event listener options that enable capturing and also\n * mark the listener as passive if the browser supports it.\n */\nconst captureEventListenerOptions = normalizePassiveListenerOptions({\n    passive: true,\n    capture: true,\n});\n/** Monitors mouse and keyboard events to determine the cause of focus events. */\nclass FocusMonitor {\n    _ngZone = inject(NgZone);\n    _platform = inject(Platform);\n    _inputModalityDetector = inject(InputModalityDetector);\n    /** The focus origin that the next focus event is a result of. */\n    _origin = null;\n    /** The FocusOrigin of the last focus event tracked by the FocusMonitor. */\n    _lastFocusOrigin;\n    /** Whether the window has just been focused. */\n    _windowFocused = false;\n    /** The timeout id of the window focus timeout. */\n    _windowFocusTimeoutId;\n    /** The timeout id of the origin clearing timeout. */\n    _originTimeoutId;\n    /**\n     * Whether the origin was determined via a touch interaction. Necessary as properly attributing\n     * focus events to touch interactions requires special logic.\n     */\n    _originFromTouchInteraction = false;\n    /** Map of elements being monitored to their info. */\n    _elementInfo = new Map();\n    /** The number of elements currently being monitored. */\n    _monitoredElementCount = 0;\n    /**\n     * Keeps track of the root nodes to which we've currently bound a focus/blur handler,\n     * as well as the number of monitored elements that they contain. We have to treat focus/blur\n     * handlers differently from the rest of the events, because the browser won't emit events\n     * to the document when focus moves inside of a shadow root.\n     */\n    _rootNodeFocusListenerCount = new Map();\n    /**\n     * The specified detection mode, used for attributing the origin of a focus\n     * event.\n     */\n    _detectionMode;\n    /**\n     * Event listener for `focus` events on the window.\n     * Needs to be an arrow function in order to preserve the context when it gets bound.\n     */\n    _windowFocusListener = () => {\n        // Make a note of when the window regains focus, so we can\n        // restore the origin info for the focused element.\n        this._windowFocused = true;\n        this._windowFocusTimeoutId = setTimeout(() => (this._windowFocused = false));\n    };\n    /** Used to reference correct document/window */\n    _document = inject(DOCUMENT, { optional: true });\n    /** Subject for stopping our InputModalityDetector subscription. */\n    _stopInputModalityDetector = new Subject();\n    constructor() {\n        const options = inject(FOCUS_MONITOR_DEFAULT_OPTIONS, {\n            optional: true,\n        });\n        this._detectionMode = options?.detectionMode || FocusMonitorDetectionMode.IMMEDIATE;\n    }\n    /**\n     * Event listener for `focus` and 'blur' events on the document.\n     * Needs to be an arrow function in order to preserve the context when it gets bound.\n     */\n    _rootNodeFocusAndBlurListener = (event) => {\n        const target = _getEventTarget(event);\n        // We need to walk up the ancestor chain in order to support `checkChildren`.\n        for (let element = target; element; element = element.parentElement) {\n            if (event.type === 'focus') {\n                this._onFocus(event, element);\n            }\n            else {\n                this._onBlur(event, element);\n            }\n        }\n    };\n    monitor(element, checkChildren = false) {\n        const nativeElement = coerceElement(element);\n        // Do nothing if we're not on the browser platform or the passed in node isn't an element.\n        if (!this._platform.isBrowser || nativeElement.nodeType !== 1) {\n            // Note: we don't want the observable to emit at all so we don't pass any parameters.\n            return of();\n        }\n        // If the element is inside the shadow DOM, we need to bind our focus/blur listeners to\n        // the shadow root, rather than the `document`, because the browser won't emit focus events\n        // to the `document`, if focus is moving within the same shadow root.\n        const rootNode = _getShadowRoot(nativeElement) || this._getDocument();\n        const cachedInfo = this._elementInfo.get(nativeElement);\n        // Check if we're already monitoring this element.\n        if (cachedInfo) {\n            if (checkChildren) {\n                // TODO(COMP-318): this can be problematic, because it'll turn all non-checkChildren\n                // observers into ones that behave as if `checkChildren` was turned on. We need a more\n                // robust solution.\n                cachedInfo.checkChildren = true;\n            }\n            return cachedInfo.subject;\n        }\n        // Create monitored element info.\n        const info = {\n            checkChildren: checkChildren,\n            subject: new Subject(),\n            rootNode,\n        };\n        this._elementInfo.set(nativeElement, info);\n        this._registerGlobalListeners(info);\n        return info.subject;\n    }\n    stopMonitoring(element) {\n        const nativeElement = coerceElement(element);\n        const elementInfo = this._elementInfo.get(nativeElement);\n        if (elementInfo) {\n            elementInfo.subject.complete();\n            this._setClasses(nativeElement);\n            this._elementInfo.delete(nativeElement);\n            this._removeGlobalListeners(elementInfo);\n        }\n    }\n    focusVia(element, origin, options) {\n        const nativeElement = coerceElement(element);\n        const focusedElement = this._getDocument().activeElement;\n        // If the element is focused already, calling `focus` again won't trigger the event listener\n        // which means that the focus classes won't be updated. If that's the case, update the classes\n        // directly without waiting for an event.\n        if (nativeElement === focusedElement) {\n            this._getClosestElementsInfo(nativeElement).forEach(([currentElement, info]) => this._originChanged(currentElement, origin, info));\n        }\n        else {\n            this._setOrigin(origin);\n            // `focus` isn't available on the server\n            if (typeof nativeElement.focus === 'function') {\n                nativeElement.focus(options);\n            }\n        }\n    }\n    ngOnDestroy() {\n        this._elementInfo.forEach((_info, element) => this.stopMonitoring(element));\n    }\n    /** Access injected document if available or fallback to global document reference */\n    _getDocument() {\n        return this._document || document;\n    }\n    /** Use defaultView of injected document if available or fallback to global window reference */\n    _getWindow() {\n        const doc = this._getDocument();\n        return doc.defaultView || window;\n    }\n    _getFocusOrigin(focusEventTarget) {\n        if (this._origin) {\n            // If the origin was realized via a touch interaction, we need to perform additional checks\n            // to determine whether the focus origin should be attributed to touch or program.\n            if (this._originFromTouchInteraction) {\n                return this._shouldBeAttributedToTouch(focusEventTarget) ? 'touch' : 'program';\n            }\n            else {\n                return this._origin;\n            }\n        }\n        // If the window has just regained focus, we can restore the most recent origin from before the\n        // window blurred. Otherwise, we've reached the point where we can't identify the source of the\n        // focus. This typically means one of two things happened:\n        //\n        // 1) The element was programmatically focused, or\n        // 2) The element was focused via screen reader navigation (which generally doesn't fire\n        //    events).\n        //\n        // Because we can't distinguish between these two cases, we default to setting `program`.\n        if (this._windowFocused && this._lastFocusOrigin) {\n            return this._lastFocusOrigin;\n        }\n        // If the interaction is coming from an input label, we consider it a mouse interactions.\n        // This is a special case where focus moves on `click`, rather than `mousedown` which breaks\n        // our detection, because all our assumptions are for `mousedown`. We need to handle this\n        // special case, because it's very common for checkboxes and radio buttons.\n        if (focusEventTarget && this._isLastInteractionFromInputLabel(focusEventTarget)) {\n            return 'mouse';\n        }\n        return 'program';\n    }\n    /**\n     * Returns whether the focus event should be attributed to touch. Recall that in IMMEDIATE mode, a\n     * touch origin isn't immediately reset at the next tick (see _setOrigin). This means that when we\n     * handle a focus event following a touch interaction, we need to determine whether (1) the focus\n     * event was directly caused by the touch interaction or (2) the focus event was caused by a\n     * subsequent programmatic focus call triggered by the touch interaction.\n     * @param focusEventTarget The target of the focus event under examination.\n     */\n    _shouldBeAttributedToTouch(focusEventTarget) {\n        // Please note that this check is not perfect. Consider the following edge case:\n        //\n        // <div #parent tabindex=\"0\">\n        //   <div #child tabindex=\"0\" (click)=\"#parent.focus()\"></div>\n        // </div>\n        //\n        // Suppose there is a FocusMonitor in IMMEDIATE mode attached to #parent. When the user touches\n        // #child, #parent is programmatically focused. This code will attribute the focus to touch\n        // instead of program. This is a relatively minor edge-case that can be worked around by using\n        // focusVia(parent, 'program') to focus #parent.\n        return (this._detectionMode === FocusMonitorDetectionMode.EVENTUAL ||\n            !!focusEventTarget?.contains(this._inputModalityDetector._mostRecentTarget));\n    }\n    /**\n     * Sets the focus classes on the element based on the given focus origin.\n     * @param element The element to update the classes on.\n     * @param origin The focus origin.\n     */\n    _setClasses(element, origin) {\n        element.classList.toggle('cdk-focused', !!origin);\n        element.classList.toggle('cdk-touch-focused', origin === 'touch');\n        element.classList.toggle('cdk-keyboard-focused', origin === 'keyboard');\n        element.classList.toggle('cdk-mouse-focused', origin === 'mouse');\n        element.classList.toggle('cdk-program-focused', origin === 'program');\n    }\n    /**\n     * Updates the focus origin. If we're using immediate detection mode, we schedule an async\n     * function to clear the origin at the end of a timeout. The duration of the timeout depends on\n     * the origin being set.\n     * @param origin The origin to set.\n     * @param isFromInteraction Whether we are setting the origin from an interaction event.\n     */\n    _setOrigin(origin, isFromInteraction = false) {\n        this._ngZone.runOutsideAngular(() => {\n            this._origin = origin;\n            this._originFromTouchInteraction = origin === 'touch' && isFromInteraction;\n            // If we're in IMMEDIATE mode, reset the origin at the next tick (or in `TOUCH_BUFFER_MS` ms\n            // for a touch event). We reset the origin at the next tick because Firefox focuses one tick\n            // after the interaction event. We wait `TOUCH_BUFFER_MS` ms before resetting the origin for\n            // a touch event because when a touch event is fired, the associated focus event isn't yet in\n            // the event queue. Before doing so, clear any pending timeouts.\n            if (this._detectionMode === FocusMonitorDetectionMode.IMMEDIATE) {\n                clearTimeout(this._originTimeoutId);\n                const ms = this._originFromTouchInteraction ? TOUCH_BUFFER_MS : 1;\n                this._originTimeoutId = setTimeout(() => (this._origin = null), ms);\n            }\n        });\n    }\n    /**\n     * Handles focus events on a registered element.\n     * @param event The focus event.\n     * @param element The monitored element.\n     */\n    _onFocus(event, element) {\n        // NOTE(mmalerba): We currently set the classes based on the focus origin of the most recent\n        // focus event affecting the monitored element. If we want to use the origin of the first event\n        // instead we should check for the cdk-focused class here and return if the element already has\n        // it. (This only matters for elements that have includesChildren = true).\n        // If we are not counting child-element-focus as focused, make sure that the event target is the\n        // monitored element itself.\n        const elementInfo = this._elementInfo.get(element);\n        const focusEventTarget = _getEventTarget(event);\n        if (!elementInfo || (!elementInfo.checkChildren && element !== focusEventTarget)) {\n            return;\n        }\n        this._originChanged(element, this._getFocusOrigin(focusEventTarget), elementInfo);\n    }\n    /**\n     * Handles blur events on a registered element.\n     * @param event The blur event.\n     * @param element The monitored element.\n     */\n    _onBlur(event, element) {\n        // If we are counting child-element-focus as focused, make sure that we aren't just blurring in\n        // order to focus another child of the monitored element.\n        const elementInfo = this._elementInfo.get(element);\n        if (!elementInfo ||\n            (elementInfo.checkChildren &&\n                event.relatedTarget instanceof Node &&\n                element.contains(event.relatedTarget))) {\n            return;\n        }\n        this._setClasses(element);\n        this._emitOrigin(elementInfo, null);\n    }\n    _emitOrigin(info, origin) {\n        if (info.subject.observers.length) {\n            this._ngZone.run(() => info.subject.next(origin));\n        }\n    }\n    _registerGlobalListeners(elementInfo) {\n        if (!this._platform.isBrowser) {\n            return;\n        }\n        const rootNode = elementInfo.rootNode;\n        const rootNodeFocusListeners = this._rootNodeFocusListenerCount.get(rootNode) || 0;\n        if (!rootNodeFocusListeners) {\n            this._ngZone.runOutsideAngular(() => {\n                rootNode.addEventListener('focus', this._rootNodeFocusAndBlurListener, captureEventListenerOptions);\n                rootNode.addEventListener('blur', this._rootNodeFocusAndBlurListener, captureEventListenerOptions);\n            });\n        }\n        this._rootNodeFocusListenerCount.set(rootNode, rootNodeFocusListeners + 1);\n        // Register global listeners when first element is monitored.\n        if (++this._monitoredElementCount === 1) {\n            // Note: we listen to events in the capture phase so we\n            // can detect them even if the user stops propagation.\n            this._ngZone.runOutsideAngular(() => {\n                const window = this._getWindow();\n                window.addEventListener('focus', this._windowFocusListener);\n            });\n            // The InputModalityDetector is also just a collection of global listeners.\n            this._inputModalityDetector.modalityDetected\n                .pipe(takeUntil(this._stopInputModalityDetector))\n                .subscribe(modality => {\n                this._setOrigin(modality, true /* isFromInteraction */);\n            });\n        }\n    }\n    _removeGlobalListeners(elementInfo) {\n        const rootNode = elementInfo.rootNode;\n        if (this._rootNodeFocusListenerCount.has(rootNode)) {\n            const rootNodeFocusListeners = this._rootNodeFocusListenerCount.get(rootNode);\n            if (rootNodeFocusListeners > 1) {\n                this._rootNodeFocusListenerCount.set(rootNode, rootNodeFocusListeners - 1);\n            }\n            else {\n                rootNode.removeEventListener('focus', this._rootNodeFocusAndBlurListener, captureEventListenerOptions);\n                rootNode.removeEventListener('blur', this._rootNodeFocusAndBlurListener, captureEventListenerOptions);\n                this._rootNodeFocusListenerCount.delete(rootNode);\n            }\n        }\n        // Unregister global listeners when last element is unmonitored.\n        if (!--this._monitoredElementCount) {\n            const window = this._getWindow();\n            window.removeEventListener('focus', this._windowFocusListener);\n            // Equivalently, stop our InputModalityDetector subscription.\n            this._stopInputModalityDetector.next();\n            // Clear timeouts for all potentially pending timeouts to prevent the leaks.\n            clearTimeout(this._windowFocusTimeoutId);\n            clearTimeout(this._originTimeoutId);\n        }\n    }\n    /** Updates all the state on an element once its focus origin has changed. */\n    _originChanged(element, origin, elementInfo) {\n        this._setClasses(element, origin);\n        this._emitOrigin(elementInfo, origin);\n        this._lastFocusOrigin = origin;\n    }\n    /**\n     * Collects the `MonitoredElementInfo` of a particular element and\n     * all of its ancestors that have enabled `checkChildren`.\n     * @param element Element from which to start the search.\n     */\n    _getClosestElementsInfo(element) {\n        const results = [];\n        this._elementInfo.forEach((info, currentElement) => {\n            if (currentElement === element || (info.checkChildren && currentElement.contains(element))) {\n                results.push([currentElement, info]);\n            }\n        });\n        return results;\n    }\n    /**\n     * Returns whether an interaction is likely to have come from the user clicking the `label` of\n     * an `input` or `textarea` in order to focus it.\n     * @param focusEventTarget Target currently receiving focus.\n     */\n    _isLastInteractionFromInputLabel(focusEventTarget) {\n        const { _mostRecentTarget: mostRecentTarget, mostRecentModality } = this._inputModalityDetector;\n        // If the last interaction used the mouse on an element contained by one of the labels\n        // of an `input`/`textarea` that is currently focused, it is very likely that the\n        // user redirected focus using the label.\n        if (mostRecentModality !== 'mouse' ||\n            !mostRecentTarget ||\n            mostRecentTarget === focusEventTarget ||\n            (focusEventTarget.nodeName !== 'INPUT' && focusEventTarget.nodeName !== 'TEXTAREA') ||\n            focusEventTarget.disabled) {\n            return false;\n        }\n        const labels = focusEventTarget.labels;\n        if (labels) {\n            for (let i = 0; i < labels.length; i++) {\n                if (labels[i].contains(mostRecentTarget)) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FocusMonitor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FocusMonitor, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FocusMonitor, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n/**\n * Directive that determines how a particular element was focused (via keyboard, mouse, touch, or\n * programmatically) and adds corresponding classes to the element.\n *\n * There are two variants of this directive:\n * 1) cdkMonitorElementFocus: does not consider an element to be focused if one of its children is\n *    focused.\n * 2) cdkMonitorSubtreeFocus: considers an element focused if it or any of its children are focused.\n */\nclass CdkMonitorFocus {\n    _elementRef = inject(ElementRef);\n    _focusMonitor = inject(FocusMonitor);\n    _monitorSubscription;\n    _focusOrigin = null;\n    cdkFocusChange = new EventEmitter();\n    constructor() { }\n    get focusOrigin() {\n        return this._focusOrigin;\n    }\n    ngAfterViewInit() {\n        const element = this._elementRef.nativeElement;\n        this._monitorSubscription = this._focusMonitor\n            .monitor(element, element.nodeType === 1 && element.hasAttribute('cdkMonitorSubtreeFocus'))\n            .subscribe(origin => {\n            this._focusOrigin = origin;\n            this.cdkFocusChange.emit(origin);\n        });\n    }\n    ngOnDestroy() {\n        this._focusMonitor.stopMonitoring(this._elementRef);\n        if (this._monitorSubscription) {\n            this._monitorSubscription.unsubscribe();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkMonitorFocus, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkMonitorFocus, isStandalone: true, selector: \"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]\", outputs: { cdkFocusChange: \"cdkFocusChange\" }, exportAs: [\"cdkMonitorFocus\"], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkMonitorFocus, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]',\n                    exportAs: 'cdkMonitorFocus',\n                }]\n        }], ctorParameters: () => [], propDecorators: { cdkFocusChange: [{\n                type: Output\n            }] } });\n\n/** Set of possible high-contrast mode backgrounds. */\nvar HighContrastMode;\n(function (HighContrastMode) {\n    HighContrastMode[HighContrastMode[\"NONE\"] = 0] = \"NONE\";\n    HighContrastMode[HighContrastMode[\"BLACK_ON_WHITE\"] = 1] = \"BLACK_ON_WHITE\";\n    HighContrastMode[HighContrastMode[\"WHITE_ON_BLACK\"] = 2] = \"WHITE_ON_BLACK\";\n})(HighContrastMode || (HighContrastMode = {}));\n/** CSS class applied to the document body when in black-on-white high-contrast mode. */\nconst BLACK_ON_WHITE_CSS_CLASS = 'cdk-high-contrast-black-on-white';\n/** CSS class applied to the document body when in white-on-black high-contrast mode. */\nconst WHITE_ON_BLACK_CSS_CLASS = 'cdk-high-contrast-white-on-black';\n/** CSS class applied to the document body when in high-contrast mode. */\nconst HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS = 'cdk-high-contrast-active';\n/**\n * Service to determine whether the browser is currently in a high-contrast-mode environment.\n *\n * Microsoft Windows supports an accessibility feature called \"High Contrast Mode\". This mode\n * changes the appearance of all applications, including web applications, to dramatically increase\n * contrast.\n *\n * IE, Edge, and Firefox currently support this mode. Chrome does not support Windows High Contrast\n * Mode. This service does not detect high-contrast mode as added by the Chrome \"High Contrast\"\n * browser extension.\n */\nclass HighContrastModeDetector {\n    _platform = inject(Platform);\n    /**\n     * Figuring out the high contrast mode and adding the body classes can cause\n     * some expensive layouts. This flag is used to ensure that we only do it once.\n     */\n    _hasCheckedHighContrastMode;\n    _document = inject(DOCUMENT);\n    _breakpointSubscription;\n    constructor() {\n        this._breakpointSubscription = inject(BreakpointObserver)\n            .observe('(forced-colors: active)')\n            .subscribe(() => {\n            if (this._hasCheckedHighContrastMode) {\n                this._hasCheckedHighContrastMode = false;\n                this._applyBodyHighContrastModeCssClasses();\n            }\n        });\n    }\n    /** Gets the current high-contrast-mode for the page. */\n    getHighContrastMode() {\n        if (!this._platform.isBrowser) {\n            return HighContrastMode.NONE;\n        }\n        // Create a test element with an arbitrary background-color that is neither black nor\n        // white; high-contrast mode will coerce the color to either black or white. Also ensure that\n        // appending the test element to the DOM does not affect layout by absolutely positioning it\n        const testElement = this._document.createElement('div');\n        testElement.style.backgroundColor = 'rgb(1,2,3)';\n        testElement.style.position = 'absolute';\n        this._document.body.appendChild(testElement);\n        // Get the computed style for the background color, collapsing spaces to normalize between\n        // browsers. Once we get this color, we no longer need the test element. Access the `window`\n        // via the document so we can fake it in tests. Note that we have extra null checks, because\n        // this logic will likely run during app bootstrap and throwing can break the entire app.\n        const documentWindow = this._document.defaultView || window;\n        const computedStyle = documentWindow && documentWindow.getComputedStyle\n            ? documentWindow.getComputedStyle(testElement)\n            : null;\n        const computedColor = ((computedStyle && computedStyle.backgroundColor) || '').replace(/ /g, '');\n        testElement.remove();\n        switch (computedColor) {\n            // Pre Windows 11 dark theme.\n            case 'rgb(0,0,0)':\n            // Windows 11 dark themes.\n            case 'rgb(45,50,54)':\n            case 'rgb(32,32,32)':\n                return HighContrastMode.WHITE_ON_BLACK;\n            // Pre Windows 11 light theme.\n            case 'rgb(255,255,255)':\n            // Windows 11 light theme.\n            case 'rgb(255,250,239)':\n                return HighContrastMode.BLACK_ON_WHITE;\n        }\n        return HighContrastMode.NONE;\n    }\n    ngOnDestroy() {\n        this._breakpointSubscription.unsubscribe();\n    }\n    /** Applies CSS classes indicating high-contrast mode to document body (browser-only). */\n    _applyBodyHighContrastModeCssClasses() {\n        if (!this._hasCheckedHighContrastMode && this._platform.isBrowser && this._document.body) {\n            const bodyClasses = this._document.body.classList;\n            bodyClasses.remove(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, BLACK_ON_WHITE_CSS_CLASS, WHITE_ON_BLACK_CSS_CLASS);\n            this._hasCheckedHighContrastMode = true;\n            const mode = this.getHighContrastMode();\n            if (mode === HighContrastMode.BLACK_ON_WHITE) {\n                bodyClasses.add(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, BLACK_ON_WHITE_CSS_CLASS);\n            }\n            else if (mode === HighContrastMode.WHITE_ON_BLACK) {\n                bodyClasses.add(HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS, WHITE_ON_BLACK_CSS_CLASS);\n            }\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: HighContrastModeDetector, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: HighContrastModeDetector, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: HighContrastModeDetector, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\nclass A11yModule {\n    constructor() {\n        inject(HighContrastModeDetector)._applyBodyHighContrastModeCssClasses();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: A11yModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: A11yModule, imports: [ObserversModule, CdkAriaLive, CdkTrapFocus, CdkMonitorFocus], exports: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: A11yModule, imports: [ObserversModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: A11yModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [ObserversModule, CdkAriaLive, CdkTrapFocus, CdkMonitorFocus],\n                    exports: [CdkAriaLive, CdkTrapFocus, CdkMonitorFocus],\n                }]\n        }], ctorParameters: () => [] });\n\n/**\n * Keeps track of the ID count per prefix. This helps us make the IDs a bit more deterministic\n * like they were before the service was introduced. Note that ideally we wouldn't have to do\n * this, but there are some internal tests that rely on the IDs.\n */\nconst counters = {};\n/** Service that generates unique IDs for DOM nodes. */\nclass _IdGenerator {\n    _appId = inject(APP_ID);\n    /**\n     * Generates a unique ID with a specific prefix.\n     * @param prefix Prefix to add to the ID.\n     */\n    getId(prefix) {\n        // Omit the app ID if it's the default `ng`. Since the vast majority of pages have one\n        // Angular app on them, we can reduce the amount of breakages by not adding it.\n        if (this._appId !== 'ng') {\n            prefix += this._appId;\n        }\n        if (!counters.hasOwnProperty(prefix)) {\n            counters[prefix] = 0;\n        }\n        return `${prefix}${counters[prefix]++}`;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _IdGenerator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _IdGenerator, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _IdGenerator, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { A11yModule, ActiveDescendantKeyManager, AriaDescriber, CDK_DESCRIBEDBY_HOST_ATTRIBUTE, CDK_DESCRIBEDBY_ID_PREFIX, CdkAriaLive, CdkMonitorFocus, CdkTrapFocus, ConfigurableFocusTrap, ConfigurableFocusTrapFactory, EventListenerFocusTrapInertStrategy, FOCUS_MONITOR_DEFAULT_OPTIONS, FOCUS_TRAP_INERT_STRATEGY, FocusKeyManager, FocusMonitor, FocusMonitorDetectionMode, FocusTrap, FocusTrapFactory, HighContrastMode, HighContrastModeDetector, INPUT_MODALITY_DETECTOR_DEFAULT_OPTIONS, INPUT_MODALITY_DETECTOR_OPTIONS, InputModalityDetector, InteractivityChecker, IsFocusableConfig, LIVE_ANNOUNCER_DEFAULT_OPTIONS, LIVE_ANNOUNCER_ELEMENT_TOKEN, LIVE_ANNOUNCER_ELEMENT_TOKEN_FACTORY, ListKeyManager, LiveAnnouncer, MESSAGES_CONTAINER_ID, NOOP_TREE_KEY_MANAGER_FACTORY, NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER, NoopTreeKeyManager, TREE_KEY_MANAGER, TREE_KEY_MANAGER_FACTORY, TREE_KEY_MANAGER_FACTORY_PROVIDER, TreeKeyManager, _IdGenerator, addAriaReferencedId, getAriaReferenceIds, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader, removeAriaReferencedId };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, inject, EventEmitter, Injectable, Directive, Output, Input, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * Injection token used to inject the document into Directionality.\n * This is used so that the value can be faked in tests.\n *\n * We can't use the real document in tests because changing the real `dir` causes geometry-based\n * tests in Safari to fail.\n *\n * We also can't re-provide the DOCUMENT token from platform-browser because the unit tests\n * themselves use things like `querySelector` in test code.\n *\n * This token is defined in a separate file from Directionality as a workaround for\n * https://github.com/angular/angular/issues/22559\n *\n * @docs-private\n */\nconst DIR_DOCUMENT = new InjectionToken('cdk-dir-doc', {\n    providedIn: 'root',\n    factory: DIR_DOCUMENT_FACTORY,\n});\n/** @docs-private */\nfunction DIR_DOCUMENT_FACTORY() {\n    return inject(DOCUMENT);\n}\n\n/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */\nconst RTL_LOCALE_PATTERN = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;\n/** Resolves a string value to a specific direction. */\nfunction _resolveDirectionality(rawValue) {\n    const value = rawValue?.toLowerCase() || '';\n    if (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) {\n        return RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr';\n    }\n    return value === 'rtl' ? 'rtl' : 'ltr';\n}\n/**\n * The directionality (LTR / RTL) context for the application (or a subtree of it).\n * Exposes the current direction and a stream of direction changes.\n */\nclass Directionality {\n    /** The current 'ltr' or 'rtl' value. */\n    value = 'ltr';\n    /** Stream that emits whenever the 'ltr' / 'rtl' state changes. */\n    change = new EventEmitter();\n    constructor() {\n        const _document = inject(DIR_DOCUMENT, { optional: true });\n        if (_document) {\n            const bodyDir = _document.body ? _document.body.dir : null;\n            const htmlDir = _document.documentElement ? _document.documentElement.dir : null;\n            this.value = _resolveDirectionality(bodyDir || htmlDir || 'ltr');\n        }\n    }\n    ngOnDestroy() {\n        this.change.complete();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Directionality, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Directionality, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Directionality, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\n/**\n * Directive to listen for changes of direction of part of the DOM.\n *\n * Provides itself as Directionality such that descendant directives only need to ever inject\n * Directionality to get the closest direction.\n */\nclass Dir {\n    /** Normalized direction that accounts for invalid/unsupported values. */\n    _dir = 'ltr';\n    /** Whether the `value` has been set to its initial value. */\n    _isInitialized = false;\n    /** Direction as passed in by the consumer. */\n    _rawDir;\n    /** Event emitted when the direction changes. */\n    change = new EventEmitter();\n    /** @docs-private */\n    get dir() {\n        return this._dir;\n    }\n    set dir(value) {\n        const previousValue = this._dir;\n        // Note: `_resolveDirectionality` resolves the language based on the browser's language,\n        // whereas the browser does it based on the content of the element. Since doing so based\n        // on the content can be expensive, for now we're doing the simpler matching.\n        this._dir = _resolveDirectionality(value);\n        this._rawDir = value;\n        if (previousValue !== this._dir && this._isInitialized) {\n            this.change.emit(this._dir);\n        }\n    }\n    /** Current layout direction of the element. */\n    get value() {\n        return this.dir;\n    }\n    /** Initialize once default value has been set. */\n    ngAfterContentInit() {\n        this._isInitialized = true;\n    }\n    ngOnDestroy() {\n        this.change.complete();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Dir, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: Dir, isStandalone: true, selector: \"[dir]\", inputs: { dir: \"dir\" }, outputs: { change: \"dirChange\" }, host: { properties: { \"attr.dir\": \"_rawDir\" } }, providers: [{ provide: Directionality, useExisting: Dir }], exportAs: [\"dir\"], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Dir, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[dir]',\n                    providers: [{ provide: Directionality, useExisting: Dir }],\n                    host: { '[attr.dir]': '_rawDir' },\n                    exportAs: 'dir',\n                }]\n        }], propDecorators: { change: [{\n                type: Output,\n                args: ['dirChange']\n            }], dir: [{\n                type: Input\n            }] } });\n\nclass BidiModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: BidiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: BidiModule, imports: [Dir], exports: [Dir] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: BidiModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: BidiModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [Dir],\n                    exports: [Dir],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BidiModule, DIR_DOCUMENT, Dir, Directionality };\n","import * as i0 from '@angular/core';\nimport { Version, InjectionToken, inject, NgModule, LOCALE_ID, Injectable, Component, ViewEncapsulation, ChangeDetectionStrategy, Directive, ElementRef, ANIMATION_MODULE_TYPE, NgZone, Injector, Input, booleanAttribute, ChangeDetectorRef, EventEmitter, isSignal, Output, ViewChild } from '@angular/core';\nimport { HighContrastModeDetector, isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader, _IdGenerator } from '@angular/cdk/a11y';\nimport { BidiModule } from '@angular/cdk/bidi';\nimport { Subject } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { normalizePassiveListenerOptions, _getEventTarget, Platform } from '@angular/cdk/platform';\nimport { coerceElement } from '@angular/cdk/coercion';\nimport { _CdkPrivateStyleLoader, _VisuallyHiddenLoader } from '@angular/cdk/private';\nimport { ENTER, SPACE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { DOCUMENT } from '@angular/common';\n\n/** Current version of Angular Material. */\nconst VERSION = new Version('19.0.4');\n\n/** @docs-private */\nclass AnimationCurves {\n    static STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)';\n    static DECELERATION_CURVE = 'cubic-bezier(0.0,0.0,0.2,1)';\n    static ACCELERATION_CURVE = 'cubic-bezier(0.4,0.0,1,1)';\n    static SHARP_CURVE = 'cubic-bezier(0.4,0.0,0.6,1)';\n}\n/** @docs-private */\nclass AnimationDurations {\n    static COMPLEX = '375ms';\n    static ENTERING = '225ms';\n    static EXITING = '195ms';\n}\n\n/**\n * Injection token that configures whether the Material sanity checks are enabled.\n * @deprecated No longer used and will be removed.\n * @breaking-change 21.0.0\n */\nconst MATERIAL_SANITY_CHECKS = new InjectionToken('mat-sanity-checks', {\n    providedIn: 'root',\n    factory: () => true,\n});\n/**\n * Module that captures anything that should be loaded and/or run for *all* Angular Material\n * components. This includes Bidi, etc.\n *\n * This module should be imported to each top-level component module (e.g., MatTabsModule).\n * @deprecated No longer used and will be removed.\n * @breaking-change 21.0.0\n */\nclass MatCommonModule {\n    constructor() {\n        // While A11yModule also does this, we repeat it here to avoid importing A11yModule\n        // in MatCommonModule.\n        inject(HighContrastModeDetector)._applyBodyHighContrastModeCssClasses();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCommonModule, imports: [BidiModule], exports: [BidiModule] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCommonModule, imports: [BidiModule, BidiModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCommonModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [BidiModule],\n                    exports: [BidiModule],\n                }]\n        }], ctorParameters: () => [] });\n\n/**\n * Class that tracks the error state of a component.\n * @docs-private\n */\nclass _ErrorStateTracker {\n    _defaultMatcher;\n    ngControl;\n    _parentFormGroup;\n    _parentForm;\n    _stateChanges;\n    /** Whether the tracker is currently in an error state. */\n    errorState = false;\n    /** User-defined matcher for the error state. */\n    matcher;\n    constructor(_defaultMatcher, ngControl, _parentFormGroup, _parentForm, _stateChanges) {\n        this._defaultMatcher = _defaultMatcher;\n        this.ngControl = ngControl;\n        this._parentFormGroup = _parentFormGroup;\n        this._parentForm = _parentForm;\n        this._stateChanges = _stateChanges;\n    }\n    /** Updates the error state based on the provided error state matcher. */\n    updateErrorState() {\n        const oldState = this.errorState;\n        const parent = this._parentFormGroup || this._parentForm;\n        const matcher = this.matcher || this._defaultMatcher;\n        const control = this.ngControl ? this.ngControl.control : null;\n        const newState = matcher?.isErrorState(control, parent) ?? false;\n        if (newState !== oldState) {\n            this.errorState = newState;\n            this._stateChanges.next();\n        }\n    }\n}\n\n/** InjectionToken for datepicker that can be used to override default locale code. */\nconst MAT_DATE_LOCALE = new InjectionToken('MAT_DATE_LOCALE', {\n    providedIn: 'root',\n    factory: MAT_DATE_LOCALE_FACTORY,\n});\n/** @docs-private */\nfunction MAT_DATE_LOCALE_FACTORY() {\n    return inject(LOCALE_ID);\n}\nconst NOT_IMPLEMENTED = 'Method not implemented';\n/** Adapts type `D` to be usable as a date by cdk-based components that work with dates. */\nclass DateAdapter {\n    /** The locale to use for all dates. */\n    locale;\n    _localeChanges = new Subject();\n    /** A stream that emits when the locale changes. */\n    localeChanges = this._localeChanges;\n    /**\n     * Sets the time of one date to the time of another.\n     * @param target Date whose time will be set.\n     * @param hours New hours to set on the date object.\n     * @param minutes New minutes to set on the date object.\n     * @param seconds New seconds to set on the date object.\n     */\n    setTime(target, hours, minutes, seconds) {\n        throw new Error(NOT_IMPLEMENTED);\n    }\n    /**\n     * Gets the hours component of the given date.\n     * @param date The date to extract the hours from.\n     */\n    getHours(date) {\n        throw new Error(NOT_IMPLEMENTED);\n    }\n    /**\n     * Gets the minutes component of the given date.\n     * @param date The date to extract the minutes from.\n     */\n    getMinutes(date) {\n        throw new Error(NOT_IMPLEMENTED);\n    }\n    /**\n     * Gets the seconds component of the given date.\n     * @param date The date to extract the seconds from.\n     */\n    getSeconds(date) {\n        throw new Error(NOT_IMPLEMENTED);\n    }\n    /**\n     * Parses a date with a specific time from a user-provided value.\n     * @param value The value to parse.\n     * @param parseFormat The expected format of the value being parsed\n     *     (type is implementation-dependent).\n     */\n    parseTime(value, parseFormat) {\n        throw new Error(NOT_IMPLEMENTED);\n    }\n    /**\n     * Adds an amount of seconds to the specified date.\n     * @param date Date to which to add the seconds.\n     * @param amount Amount of seconds to add to the date.\n     */\n    addSeconds(date, amount) {\n        throw new Error(NOT_IMPLEMENTED);\n    }\n    /**\n     * Given a potential date object, returns that same date object if it is\n     * a valid date, or `null` if it's not a valid date.\n     * @param obj The object to check.\n     * @returns A date or `null`.\n     */\n    getValidDateOrNull(obj) {\n        return this.isDateInstance(obj) && this.isValid(obj) ? obj : null;\n    }\n    /**\n     * Attempts to deserialize a value to a valid date object. This is different from parsing in that\n     * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601\n     * string). The default implementation does not allow any deserialization, it simply checks that\n     * the given value is already a valid date object or null. The `<mat-datepicker>` will call this\n     * method on all of its `@Input()` properties that accept dates. It is therefore possible to\n     * support passing values from your backend directly to these properties by overriding this method\n     * to also deserialize the format used by your backend.\n     * @param value The value to be deserialized into a date object.\n     * @returns The deserialized date object, either a valid date, null if the value can be\n     *     deserialized into a null date (e.g. the empty string), or an invalid date.\n     */\n    deserialize(value) {\n        if (value == null || (this.isDateInstance(value) && this.isValid(value))) {\n            return value;\n        }\n        return this.invalid();\n    }\n    /**\n     * Sets the locale used for all dates.\n     * @param locale The new locale.\n     */\n    setLocale(locale) {\n        this.locale = locale;\n        this._localeChanges.next();\n    }\n    /**\n     * Compares two dates.\n     * @param first The first date to compare.\n     * @param second The second date to compare.\n     * @returns 0 if the dates are equal, a number less than 0 if the first date is earlier,\n     *     a number greater than 0 if the first date is later.\n     */\n    compareDate(first, second) {\n        return (this.getYear(first) - this.getYear(second) ||\n            this.getMonth(first) - this.getMonth(second) ||\n            this.getDate(first) - this.getDate(second));\n    }\n    /**\n     * Compares the time values of two dates.\n     * @param first First date to compare.\n     * @param second Second date to compare.\n     * @returns 0 if the times are equal, a number less than 0 if the first time is earlier,\n     *     a number greater than 0 if the first time is later.\n     */\n    compareTime(first, second) {\n        return (this.getHours(first) - this.getHours(second) ||\n            this.getMinutes(first) - this.getMinutes(second) ||\n            this.getSeconds(first) - this.getSeconds(second));\n    }\n    /**\n     * Checks if two dates are equal.\n     * @param first The first date to check.\n     * @param second The second date to check.\n     * @returns Whether the two dates are equal.\n     *     Null dates are considered equal to other null dates.\n     */\n    sameDate(first, second) {\n        if (first && second) {\n            let firstValid = this.isValid(first);\n            let secondValid = this.isValid(second);\n            if (firstValid && secondValid) {\n                return !this.compareDate(first, second);\n            }\n            return firstValid == secondValid;\n        }\n        return first == second;\n    }\n    /**\n     * Checks if the times of two dates are equal.\n     * @param first The first date to check.\n     * @param second The second date to check.\n     * @returns Whether the times of the two dates are equal.\n     *     Null dates are considered equal to other null dates.\n     */\n    sameTime(first, second) {\n        if (first && second) {\n            const firstValid = this.isValid(first);\n            const secondValid = this.isValid(second);\n            if (firstValid && secondValid) {\n                return !this.compareTime(first, second);\n            }\n            return firstValid == secondValid;\n        }\n        return first == second;\n    }\n    /**\n     * Clamp the given date between min and max dates.\n     * @param date The date to clamp.\n     * @param min The minimum value to allow. If null or omitted no min is enforced.\n     * @param max The maximum value to allow. If null or omitted no max is enforced.\n     * @returns `min` if `date` is less than `min`, `max` if date is greater than `max`,\n     *     otherwise `date`.\n     */\n    clampDate(date, min, max) {\n        if (min && this.compareDate(date, min) < 0) {\n            return min;\n        }\n        if (max && this.compareDate(date, max) > 0) {\n            return max;\n        }\n        return date;\n    }\n}\n\nconst MAT_DATE_FORMATS = new InjectionToken('mat-date-formats');\n\n/**\n * Matches strings that have the form of a valid RFC 3339 string\n * (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date\n * because the regex will match strings with an out of bounds month, date, etc.\n */\nconst ISO_8601_REGEX = /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|(?:(?:\\+|-)\\d{2}:\\d{2}))?)?$/;\n/**\n * Matches a time string. Supported formats:\n * - {{hours}}:{{minutes}}\n * - {{hours}}:{{minutes}}:{{seconds}}\n * - {{hours}}:{{minutes}} AM/PM\n * - {{hours}}:{{minutes}}:{{seconds}} AM/PM\n * - {{hours}}.{{minutes}}\n * - {{hours}}.{{minutes}}.{{seconds}}\n * - {{hours}}.{{minutes}} AM/PM\n * - {{hours}}.{{minutes}}.{{seconds}} AM/PM\n */\nconst TIME_REGEX = /^(\\d?\\d)[:.](\\d?\\d)(?:[:.](\\d?\\d))?\\s*(AM|PM)?$/i;\n/** Creates an array and fills it with values. */\nfunction range(length, valueFunction) {\n    const valuesArray = Array(length);\n    for (let i = 0; i < length; i++) {\n        valuesArray[i] = valueFunction(i);\n    }\n    return valuesArray;\n}\n/** Adapts the native JS Date for use with cdk-based components that work with dates. */\nclass NativeDateAdapter extends DateAdapter {\n    /**\n     * @deprecated No longer being used. To be removed.\n     * @breaking-change 14.0.0\n     */\n    useUtcForDisplay = false;\n    /** The injected locale. */\n    _matDateLocale = inject(MAT_DATE_LOCALE, { optional: true });\n    constructor() {\n        super();\n        const matDateLocale = inject(MAT_DATE_LOCALE, { optional: true });\n        if (matDateLocale !== undefined) {\n            this._matDateLocale = matDateLocale;\n        }\n        super.setLocale(this._matDateLocale);\n    }\n    getYear(date) {\n        return date.getFullYear();\n    }\n    getMonth(date) {\n        return date.getMonth();\n    }\n    getDate(date) {\n        return date.getDate();\n    }\n    getDayOfWeek(date) {\n        return date.getDay();\n    }\n    getMonthNames(style) {\n        const dtf = new Intl.DateTimeFormat(this.locale, { month: style, timeZone: 'utc' });\n        return range(12, i => this._format(dtf, new Date(2017, i, 1)));\n    }\n    getDateNames() {\n        const dtf = new Intl.DateTimeFormat(this.locale, { day: 'numeric', timeZone: 'utc' });\n        return range(31, i => this._format(dtf, new Date(2017, 0, i + 1)));\n    }\n    getDayOfWeekNames(style) {\n        const dtf = new Intl.DateTimeFormat(this.locale, { weekday: style, timeZone: 'utc' });\n        return range(7, i => this._format(dtf, new Date(2017, 0, i + 1)));\n    }\n    getYearName(date) {\n        const dtf = new Intl.DateTimeFormat(this.locale, { year: 'numeric', timeZone: 'utc' });\n        return this._format(dtf, date);\n    }\n    getFirstDayOfWeek() {\n        // At the time of writing `Intl.Locale` isn't available\n        // in the internal types so we need to cast to `any`.\n        if (typeof Intl !== 'undefined' && Intl.Locale) {\n            const locale = new Intl.Locale(this.locale);\n            // Some browsers implement a `getWeekInfo` method while others have a `weekInfo` getter.\n            // Note that this isn't supported in all browsers so we need to null check it.\n            const firstDay = (locale.getWeekInfo?.() || locale.weekInfo)?.firstDay ?? 0;\n            // `weekInfo.firstDay` is a number between 1 and 7 where, starting from Monday,\n            // whereas our representation is 0 to 6 where 0 is Sunday so we need to normalize it.\n            return firstDay === 7 ? 0 : firstDay;\n        }\n        // Default to Sunday if the browser doesn't provide the week information.\n        return 0;\n    }\n    getNumDaysInMonth(date) {\n        return this.getDate(this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0));\n    }\n    clone(date) {\n        return new Date(date.getTime());\n    }\n    createDate(year, month, date) {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            // Check for invalid month and date (except upper bound on date which we have to check after\n            // creating the Date).\n            if (month < 0 || month > 11) {\n                throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\n            }\n            if (date < 1) {\n                throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\n            }\n        }\n        let result = this._createDateWithOverflow(year, month, date);\n        // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n        if (result.getMonth() != month && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n        }\n        return result;\n    }\n    today() {\n        return new Date();\n    }\n    parse(value, parseFormat) {\n        // We have no way using the native JS Date to set the parse format or locale, so we ignore these\n        // parameters.\n        if (typeof value == 'number') {\n            return new Date(value);\n        }\n        return value ? new Date(Date.parse(value)) : null;\n    }\n    format(date, displayFormat) {\n        if (!this.isValid(date)) {\n            throw Error('NativeDateAdapter: Cannot format invalid date.');\n        }\n        const dtf = new Intl.DateTimeFormat(this.locale, { ...displayFormat, timeZone: 'utc' });\n        return this._format(dtf, date);\n    }\n    addCalendarYears(date, years) {\n        return this.addCalendarMonths(date, years * 12);\n    }\n    addCalendarMonths(date, months) {\n        let newDate = this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + months, this.getDate(date));\n        // It's possible to wind up in the wrong month if the original month has more days than the new\n        // month. In this case we want to go to the last day of the desired month.\n        // Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't\n        // guarantee this.\n        if (this.getMonth(newDate) != (((this.getMonth(date) + months) % 12) + 12) % 12) {\n            newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0);\n        }\n        return newDate;\n    }\n    addCalendarDays(date, days) {\n        return this._createDateWithOverflow(this.getYear(date), this.getMonth(date), this.getDate(date) + days);\n    }\n    toIso8601(date) {\n        return [\n            date.getUTCFullYear(),\n            this._2digit(date.getUTCMonth() + 1),\n            this._2digit(date.getUTCDate()),\n        ].join('-');\n    }\n    /**\n     * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\n     * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\n     * invalid date for all other values.\n     */\n    deserialize(value) {\n        if (typeof value === 'string') {\n            if (!value) {\n                return null;\n            }\n            // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n            // string is the right format first.\n            if (ISO_8601_REGEX.test(value)) {\n                let date = new Date(value);\n                if (this.isValid(date)) {\n                    return date;\n                }\n            }\n        }\n        return super.deserialize(value);\n    }\n    isDateInstance(obj) {\n        return obj instanceof Date;\n    }\n    isValid(date) {\n        return !isNaN(date.getTime());\n    }\n    invalid() {\n        return new Date(NaN);\n    }\n    setTime(target, hours, minutes, seconds) {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (!inRange(hours, 0, 23)) {\n                throw Error(`Invalid hours \"${hours}\". Hours value must be between 0 and 23.`);\n            }\n            if (!inRange(minutes, 0, 59)) {\n                throw Error(`Invalid minutes \"${minutes}\". Minutes value must be between 0 and 59.`);\n            }\n            if (!inRange(seconds, 0, 59)) {\n                throw Error(`Invalid seconds \"${seconds}\". Seconds value must be between 0 and 59.`);\n            }\n        }\n        const clone = this.clone(target);\n        clone.setHours(hours, minutes, seconds, 0);\n        return clone;\n    }\n    getHours(date) {\n        return date.getHours();\n    }\n    getMinutes(date) {\n        return date.getMinutes();\n    }\n    getSeconds(date) {\n        return date.getSeconds();\n    }\n    parseTime(userValue, parseFormat) {\n        if (typeof userValue !== 'string') {\n            return userValue instanceof Date ? new Date(userValue.getTime()) : null;\n        }\n        const value = userValue.trim();\n        if (value.length === 0) {\n            return null;\n        }\n        // Attempt to parse the value directly.\n        let result = this._parseTimeString(value);\n        // Some locales add extra characters around the time, but are otherwise parseable\n        // (e.g. `00:05 ч.` in bg-BG). Try replacing all non-number and non-colon characters.\n        if (result === null) {\n            const withoutExtras = value.replace(/[^0-9:(AM|PM)]/gi, '').trim();\n            if (withoutExtras.length > 0) {\n                result = this._parseTimeString(withoutExtras);\n            }\n        }\n        return result || this.invalid();\n    }\n    addSeconds(date, amount) {\n        return new Date(date.getTime() + amount * 1000);\n    }\n    /** Creates a date but allows the month and date to overflow. */\n    _createDateWithOverflow(year, month, date) {\n        // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n        // To work around this we use `setFullYear` and `setHours` instead.\n        const d = new Date();\n        d.setFullYear(year, month, date);\n        d.setHours(0, 0, 0, 0);\n        return d;\n    }\n    /**\n     * Pads a number to make it two digits.\n     * @param n The number to pad.\n     * @returns The padded number.\n     */\n    _2digit(n) {\n        return ('00' + n).slice(-2);\n    }\n    /**\n     * When converting Date object to string, javascript built-in functions may return wrong\n     * results because it applies its internal DST rules. The DST rules around the world change\n     * very frequently, and the current valid rule is not always valid in previous years though.\n     * We work around this problem building a new Date object which has its internal UTC\n     * representation with the local date and time.\n     * @param dtf Intl.DateTimeFormat object, containing the desired string format. It must have\n     *    timeZone set to 'utc' to work fine.\n     * @param date Date from which we want to get the string representation according to dtf\n     * @returns A Date object with its UTC representation based on the passed in date info\n     */\n    _format(dtf, date) {\n        // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n        // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n        const d = new Date();\n        d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n        d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n        return dtf.format(d);\n    }\n    /**\n     * Attempts to parse a time string into a date object. Returns null if it cannot be parsed.\n     * @param value Time string to parse.\n     */\n    _parseTimeString(value) {\n        // Note: we can technically rely on the browser for the time parsing by generating\n        // an ISO string and appending the string to the end of it. We don't do it, because\n        // browsers aren't consistent in what they support. Some examples:\n        // - Safari doesn't support AM/PM.\n        // - Firefox produces a valid date object if the time string has overflows (e.g. 12:75) while\n        //   other browsers produce an invalid date.\n        // - Safari doesn't allow padded numbers.\n        const parsed = value.toUpperCase().match(TIME_REGEX);\n        if (parsed) {\n            let hours = parseInt(parsed[1]);\n            const minutes = parseInt(parsed[2]);\n            let seconds = parsed[3] == null ? undefined : parseInt(parsed[3]);\n            const amPm = parsed[4];\n            if (hours === 12) {\n                hours = amPm === 'AM' ? 0 : hours;\n            }\n            else if (amPm === 'PM') {\n                hours += 12;\n            }\n            if (inRange(hours, 0, 23) &&\n                inRange(minutes, 0, 59) &&\n                (seconds == null || inRange(seconds, 0, 59))) {\n                return this.setTime(this.today(), hours, minutes, seconds || 0);\n            }\n        }\n        return null;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: NativeDateAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: NativeDateAdapter });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: NativeDateAdapter, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [] });\n/** Checks whether a number is within a certain range. */\nfunction inRange(value, min, max) {\n    return !isNaN(value) && value >= min && value <= max;\n}\n\nconst MAT_NATIVE_DATE_FORMATS = {\n    parse: {\n        dateInput: null,\n        timeInput: null,\n    },\n    display: {\n        dateInput: { year: 'numeric', month: 'numeric', day: 'numeric' },\n        timeInput: { hour: 'numeric', minute: 'numeric' },\n        monthYearLabel: { year: 'numeric', month: 'short' },\n        dateA11yLabel: { year: 'numeric', month: 'long', day: 'numeric' },\n        monthYearA11yLabel: { year: 'numeric', month: 'long' },\n        timeOptionLabel: { hour: 'numeric', minute: 'numeric' },\n    },\n};\n\nclass NativeDateModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: NativeDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: NativeDateModule });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: NativeDateModule, providers: [{ provide: DateAdapter, useClass: NativeDateAdapter }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: NativeDateModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    providers: [{ provide: DateAdapter, useClass: NativeDateAdapter }],\n                }]\n        }] });\nclass MatNativeDateModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatNativeDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatNativeDateModule });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatNativeDateModule, providers: [provideNativeDateAdapter()] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatNativeDateModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    providers: [provideNativeDateAdapter()],\n                }]\n        }] });\nfunction provideNativeDateAdapter(formats = MAT_NATIVE_DATE_FORMATS) {\n    return [\n        { provide: DateAdapter, useClass: NativeDateAdapter },\n        { provide: MAT_DATE_FORMATS, useValue: formats },\n    ];\n}\n\n/** Error state matcher that matches when a control is invalid and dirty. */\nclass ShowOnDirtyErrorStateMatcher {\n    isErrorState(control, form) {\n        return !!(control && control.invalid && (control.dirty || (form && form.submitted)));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ShowOnDirtyErrorStateMatcher });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ShowOnDirtyErrorStateMatcher, decorators: [{\n            type: Injectable\n        }] });\n/** Provider that defines how form controls behave with regards to displaying error messages. */\nclass ErrorStateMatcher {\n    isErrorState(control, form) {\n        return !!(control && control.invalid && (control.touched || (form && form.submitted)));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ErrorStateMatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ErrorStateMatcher, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ErrorStateMatcher, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n\n/**\n * Component used to load structural styles for focus indicators.\n * @docs-private\n */\nclass _StructuralStylesLoader {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _StructuralStylesLoader, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: _StructuralStylesLoader, isStandalone: true, selector: \"structural-styles\", ngImport: i0, template: '', isInline: true, styles: [\".mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus::before{content:\\\"\\\"}@media(forced-colors: active){html{--mat-focus-indicator-display: block}}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _StructuralStylesLoader, decorators: [{\n            type: Component,\n            args: [{ selector: 'structural-styles', encapsulation: ViewEncapsulation.None, template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [\".mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus::before{content:\\\"\\\"}@media(forced-colors: active){html{--mat-focus-indicator-display: block}}\"] }]\n        }] });\n\n/**\n * Shared directive to count lines inside a text area, such as a list item.\n * Line elements can be extracted with a @ContentChildren(MatLine) query, then\n * counted by checking the query list's length.\n */\nclass MatLine {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatLine, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatLine, isStandalone: true, selector: \"[mat-line], [matLine]\", host: { classAttribute: \"mat-line\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatLine, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[mat-line], [matLine]',\n                    host: { 'class': 'mat-line' },\n                }]\n        }] });\n/**\n * Helper that takes a query list of lines and sets the correct class on the host.\n * @docs-private\n */\nfunction setLines(lines, element, prefix = 'mat') {\n    // Note: doesn't need to unsubscribe, because `changes`\n    // gets completed by Angular when the view is destroyed.\n    lines.changes.pipe(startWith(lines)).subscribe(({ length }) => {\n        setClass(element, `${prefix}-2-line`, false);\n        setClass(element, `${prefix}-3-line`, false);\n        setClass(element, `${prefix}-multi-line`, false);\n        if (length === 2 || length === 3) {\n            setClass(element, `${prefix}-${length}-line`, true);\n        }\n        else if (length > 3) {\n            setClass(element, `${prefix}-multi-line`, true);\n        }\n    });\n}\n/** Adds or removes a class from an element. */\nfunction setClass(element, className, isAdd) {\n    element.nativeElement.classList.toggle(className, isAdd);\n}\nclass MatLineModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatLineModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatLineModule, imports: [MatCommonModule, MatLine], exports: [MatLine, MatCommonModule] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatLineModule, imports: [MatCommonModule, MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatLineModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [MatCommonModule, MatLine],\n                    exports: [MatLine, MatCommonModule],\n                }]\n        }] });\n\n/** Possible states for a ripple element. */\nvar RippleState;\n(function (RippleState) {\n    RippleState[RippleState[\"FADING_IN\"] = 0] = \"FADING_IN\";\n    RippleState[RippleState[\"VISIBLE\"] = 1] = \"VISIBLE\";\n    RippleState[RippleState[\"FADING_OUT\"] = 2] = \"FADING_OUT\";\n    RippleState[RippleState[\"HIDDEN\"] = 3] = \"HIDDEN\";\n})(RippleState || (RippleState = {}));\n/**\n * Reference to a previously launched ripple element.\n */\nclass RippleRef {\n    _renderer;\n    element;\n    config;\n    _animationForciblyDisabledThroughCss;\n    /** Current state of the ripple. */\n    state = RippleState.HIDDEN;\n    constructor(_renderer, \n    /** Reference to the ripple HTML element. */\n    element, \n    /** Ripple configuration used for the ripple. */\n    config, \n    /* Whether animations are forcibly disabled for ripples through CSS. */\n    _animationForciblyDisabledThroughCss = false) {\n        this._renderer = _renderer;\n        this.element = element;\n        this.config = config;\n        this._animationForciblyDisabledThroughCss = _animationForciblyDisabledThroughCss;\n    }\n    /** Fades out the ripple element. */\n    fadeOut() {\n        this._renderer.fadeOutRipple(this);\n    }\n}\n\n/** Options used to bind a passive capturing event. */\nconst passiveCapturingEventOptions$1 = normalizePassiveListenerOptions({\n    passive: true,\n    capture: true,\n});\n/** Manages events through delegation so that as few event handlers as possible are bound. */\nclass RippleEventManager {\n    _events = new Map();\n    /** Adds an event handler. */\n    addHandler(ngZone, name, element, handler) {\n        const handlersForEvent = this._events.get(name);\n        if (handlersForEvent) {\n            const handlersForElement = handlersForEvent.get(element);\n            if (handlersForElement) {\n                handlersForElement.add(handler);\n            }\n            else {\n                handlersForEvent.set(element, new Set([handler]));\n            }\n        }\n        else {\n            this._events.set(name, new Map([[element, new Set([handler])]]));\n            ngZone.runOutsideAngular(() => {\n                document.addEventListener(name, this._delegateEventHandler, passiveCapturingEventOptions$1);\n            });\n        }\n    }\n    /** Removes an event handler. */\n    removeHandler(name, element, handler) {\n        const handlersForEvent = this._events.get(name);\n        if (!handlersForEvent) {\n            return;\n        }\n        const handlersForElement = handlersForEvent.get(element);\n        if (!handlersForElement) {\n            return;\n        }\n        handlersForElement.delete(handler);\n        if (handlersForElement.size === 0) {\n            handlersForEvent.delete(element);\n        }\n        if (handlersForEvent.size === 0) {\n            this._events.delete(name);\n            document.removeEventListener(name, this._delegateEventHandler, passiveCapturingEventOptions$1);\n        }\n    }\n    /** Event handler that is bound and which dispatches the events to the different targets. */\n    _delegateEventHandler = (event) => {\n        const target = _getEventTarget(event);\n        if (target) {\n            this._events.get(event.type)?.forEach((handlers, element) => {\n                if (element === target || element.contains(target)) {\n                    handlers.forEach(handler => handler.handleEvent(event));\n                }\n            });\n        }\n    };\n}\n\n/**\n * Default ripple animation configuration for ripples without an explicit\n * animation config specified.\n */\nconst defaultRippleAnimationConfig = {\n    enterDuration: 225,\n    exitDuration: 150,\n};\n/**\n * Timeout for ignoring mouse events. Mouse events will be temporary ignored after touch\n * events to avoid synthetic mouse events.\n */\nconst ignoreMouseEventsTimeout = 800;\n/** Options used to bind a passive capturing event. */\nconst passiveCapturingEventOptions = normalizePassiveListenerOptions({\n    passive: true,\n    capture: true,\n});\n/** Events that signal that the pointer is down. */\nconst pointerDownEvents = ['mousedown', 'touchstart'];\n/** Events that signal that the pointer is up. */\nconst pointerUpEvents = ['mouseup', 'mouseleave', 'touchend', 'touchcancel'];\nclass _MatRippleStylesLoader {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _MatRippleStylesLoader, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: _MatRippleStylesLoader, isStandalone: true, selector: \"ng-component\", host: { attributes: { \"mat-ripple-style-loader\": \"\" } }, ngImport: i0, template: '', isInline: true, styles: [\".mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _MatRippleStylesLoader, decorators: [{\n            type: Component,\n            args: [{ template: '', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'mat-ripple-style-loader': '' }, styles: [\".mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none}\"] }]\n        }] });\n/**\n * Helper service that performs DOM manipulations. Not intended to be used outside this module.\n * The constructor takes a reference to the ripple directive's host element and a map of DOM\n * event handlers to be installed on the element that triggers ripple animations.\n * This will eventually become a custom renderer once Angular support exists.\n * @docs-private\n */\nclass RippleRenderer {\n    _target;\n    _ngZone;\n    _platform;\n    /** Element where the ripples are being added to. */\n    _containerElement;\n    /** Element which triggers the ripple elements on mouse events. */\n    _triggerElement;\n    /** Whether the pointer is currently down or not. */\n    _isPointerDown = false;\n    /**\n     * Map of currently active ripple references.\n     * The ripple reference is mapped to its element event listeners.\n     * The reason why `| null` is used is that event listeners are added only\n     * when the condition is truthy (see the `_startFadeOutTransition` method).\n     */\n    _activeRipples = new Map();\n    /** Latest non-persistent ripple that was triggered. */\n    _mostRecentTransientRipple;\n    /** Time in milliseconds when the last touchstart event happened. */\n    _lastTouchStartEvent;\n    /** Whether pointer-up event listeners have been registered. */\n    _pointerUpEventsRegistered = false;\n    /**\n     * Cached dimensions of the ripple container. Set when the first\n     * ripple is shown and cleared once no more ripples are visible.\n     */\n    _containerRect;\n    static _eventManager = new RippleEventManager();\n    constructor(_target, _ngZone, elementOrElementRef, _platform, injector) {\n        this._target = _target;\n        this._ngZone = _ngZone;\n        this._platform = _platform;\n        // Only do anything if we're on the browser.\n        if (_platform.isBrowser) {\n            this._containerElement = coerceElement(elementOrElementRef);\n        }\n        if (injector) {\n            injector.get(_CdkPrivateStyleLoader).load(_MatRippleStylesLoader);\n        }\n    }\n    /**\n     * Fades in a ripple at the given coordinates.\n     * @param x Coordinate within the element, along the X axis at which to start the ripple.\n     * @param y Coordinate within the element, along the Y axis at which to start the ripple.\n     * @param config Extra ripple options.\n     */\n    fadeInRipple(x, y, config = {}) {\n        const containerRect = (this._containerRect =\n            this._containerRect || this._containerElement.getBoundingClientRect());\n        const animationConfig = { ...defaultRippleAnimationConfig, ...config.animation };\n        if (config.centered) {\n            x = containerRect.left + containerRect.width / 2;\n            y = containerRect.top + containerRect.height / 2;\n        }\n        const radius = config.radius || distanceToFurthestCorner(x, y, containerRect);\n        const offsetX = x - containerRect.left;\n        const offsetY = y - containerRect.top;\n        const enterDuration = animationConfig.enterDuration;\n        const ripple = document.createElement('div');\n        ripple.classList.add('mat-ripple-element');\n        ripple.style.left = `${offsetX - radius}px`;\n        ripple.style.top = `${offsetY - radius}px`;\n        ripple.style.height = `${radius * 2}px`;\n        ripple.style.width = `${radius * 2}px`;\n        // If a custom color has been specified, set it as inline style. If no color is\n        // set, the default color will be applied through the ripple theme styles.\n        if (config.color != null) {\n            ripple.style.backgroundColor = config.color;\n        }\n        ripple.style.transitionDuration = `${enterDuration}ms`;\n        this._containerElement.appendChild(ripple);\n        // By default the browser does not recalculate the styles of dynamically created\n        // ripple elements. This is critical to ensure that the `scale` animates properly.\n        // We enforce a style recalculation by calling `getComputedStyle` and *accessing* a property.\n        // See: https://gist.github.com/paulirish/5d52fb081b3570c81e3a\n        const computedStyles = window.getComputedStyle(ripple);\n        const userTransitionProperty = computedStyles.transitionProperty;\n        const userTransitionDuration = computedStyles.transitionDuration;\n        // Note: We detect whether animation is forcibly disabled through CSS (e.g. through\n        // `transition: none` or `display: none`). This is technically unexpected since animations are\n        // controlled through the animation config, but this exists for backwards compatibility. This\n        // logic does not need to be super accurate since it covers some edge cases which can be easily\n        // avoided by users.\n        const animationForciblyDisabledThroughCss = userTransitionProperty === 'none' ||\n            // Note: The canonical unit for serialized CSS `<time>` properties is seconds. Additionally\n            // some browsers expand the duration for every property (in our case `opacity` and `transform`).\n            userTransitionDuration === '0s' ||\n            userTransitionDuration === '0s, 0s' ||\n            // If the container is 0x0, it's likely `display: none`.\n            (containerRect.width === 0 && containerRect.height === 0);\n        // Exposed reference to the ripple that will be returned.\n        const rippleRef = new RippleRef(this, ripple, config, animationForciblyDisabledThroughCss);\n        // Start the enter animation by setting the transform/scale to 100%. The animation will\n        // execute as part of this statement because we forced a style recalculation before.\n        // Note: We use a 3d transform here in order to avoid an issue in Safari where\n        // the ripples aren't clipped when inside the shadow DOM (see #24028).\n        ripple.style.transform = 'scale3d(1, 1, 1)';\n        rippleRef.state = RippleState.FADING_IN;\n        if (!config.persistent) {\n            this._mostRecentTransientRipple = rippleRef;\n        }\n        let eventListeners = null;\n        // Do not register the `transition` event listener if fade-in and fade-out duration\n        // are set to zero. The events won't fire anyway and we can save resources here.\n        if (!animationForciblyDisabledThroughCss && (enterDuration || animationConfig.exitDuration)) {\n            this._ngZone.runOutsideAngular(() => {\n                const onTransitionEnd = () => {\n                    // Clear the fallback timer since the transition fired correctly.\n                    if (eventListeners) {\n                        eventListeners.fallbackTimer = null;\n                    }\n                    clearTimeout(fallbackTimer);\n                    this._finishRippleTransition(rippleRef);\n                };\n                const onTransitionCancel = () => this._destroyRipple(rippleRef);\n                // In some cases where there's a higher load on the browser, it can choose not to dispatch\n                // neither `transitionend` nor `transitioncancel` (see b/227356674). This timer serves as a\n                // fallback for such cases so that the ripple doesn't become stuck. We add a 100ms buffer\n                // because timers aren't precise. Note that another approach can be to transition the ripple\n                // to the `VISIBLE` state immediately above and to `FADING_IN` afterwards inside\n                // `transitionstart`. We go with the timer because it's one less event listener and\n                // it's less likely to break existing tests.\n                const fallbackTimer = setTimeout(onTransitionCancel, enterDuration + 100);\n                ripple.addEventListener('transitionend', onTransitionEnd);\n                // If the transition is cancelled (e.g. due to DOM removal), we destroy the ripple\n                // directly as otherwise we would keep it part of the ripple container forever.\n                // https://www.w3.org/TR/css-transitions-1/#:~:text=no%20longer%20in%20the%20document.\n                ripple.addEventListener('transitioncancel', onTransitionCancel);\n                eventListeners = { onTransitionEnd, onTransitionCancel, fallbackTimer };\n            });\n        }\n        // Add the ripple reference to the list of all active ripples.\n        this._activeRipples.set(rippleRef, eventListeners);\n        // In case there is no fade-in transition duration, we need to manually call the transition\n        // end listener because `transitionend` doesn't fire if there is no transition.\n        if (animationForciblyDisabledThroughCss || !enterDuration) {\n            this._finishRippleTransition(rippleRef);\n        }\n        return rippleRef;\n    }\n    /** Fades out a ripple reference. */\n    fadeOutRipple(rippleRef) {\n        // For ripples already fading out or hidden, this should be a noop.\n        if (rippleRef.state === RippleState.FADING_OUT || rippleRef.state === RippleState.HIDDEN) {\n            return;\n        }\n        const rippleEl = rippleRef.element;\n        const animationConfig = { ...defaultRippleAnimationConfig, ...rippleRef.config.animation };\n        // This starts the fade-out transition and will fire the transition end listener that\n        // removes the ripple element from the DOM.\n        rippleEl.style.transitionDuration = `${animationConfig.exitDuration}ms`;\n        rippleEl.style.opacity = '0';\n        rippleRef.state = RippleState.FADING_OUT;\n        // In case there is no fade-out transition duration, we need to manually call the\n        // transition end listener because `transitionend` doesn't fire if there is no transition.\n        if (rippleRef._animationForciblyDisabledThroughCss || !animationConfig.exitDuration) {\n            this._finishRippleTransition(rippleRef);\n        }\n    }\n    /** Fades out all currently active ripples. */\n    fadeOutAll() {\n        this._getActiveRipples().forEach(ripple => ripple.fadeOut());\n    }\n    /** Fades out all currently active non-persistent ripples. */\n    fadeOutAllNonPersistent() {\n        this._getActiveRipples().forEach(ripple => {\n            if (!ripple.config.persistent) {\n                ripple.fadeOut();\n            }\n        });\n    }\n    /** Sets up the trigger event listeners */\n    setupTriggerEvents(elementOrElementRef) {\n        const element = coerceElement(elementOrElementRef);\n        if (!this._platform.isBrowser || !element || element === this._triggerElement) {\n            return;\n        }\n        // Remove all previously registered event listeners from the trigger element.\n        this._removeTriggerEvents();\n        this._triggerElement = element;\n        // Use event delegation for the trigger events since they're\n        // set up during creation and are performance-sensitive.\n        pointerDownEvents.forEach(type => {\n            RippleRenderer._eventManager.addHandler(this._ngZone, type, element, this);\n        });\n    }\n    /**\n     * Handles all registered events.\n     * @docs-private\n     */\n    handleEvent(event) {\n        if (event.type === 'mousedown') {\n            this._onMousedown(event);\n        }\n        else if (event.type === 'touchstart') {\n            this._onTouchStart(event);\n        }\n        else {\n            this._onPointerUp();\n        }\n        // If pointer-up events haven't been registered yet, do so now.\n        // We do this on-demand in order to reduce the total number of event listeners\n        // registered by the ripples, which speeds up the rendering time for large UIs.\n        if (!this._pointerUpEventsRegistered) {\n            // The events for hiding the ripple are bound directly on the trigger, because:\n            // 1. Some of them occur frequently (e.g. `mouseleave`) and any advantage we get from\n            // delegation will be diminished by having to look through all the data structures often.\n            // 2. They aren't as performance-sensitive, because they're bound only after the user\n            // has interacted with an element.\n            this._ngZone.runOutsideAngular(() => {\n                pointerUpEvents.forEach(type => {\n                    this._triggerElement.addEventListener(type, this, passiveCapturingEventOptions);\n                });\n            });\n            this._pointerUpEventsRegistered = true;\n        }\n    }\n    /** Method that will be called if the fade-in or fade-in transition completed. */\n    _finishRippleTransition(rippleRef) {\n        if (rippleRef.state === RippleState.FADING_IN) {\n            this._startFadeOutTransition(rippleRef);\n        }\n        else if (rippleRef.state === RippleState.FADING_OUT) {\n            this._destroyRipple(rippleRef);\n        }\n    }\n    /**\n     * Starts the fade-out transition of the given ripple if it's not persistent and the pointer\n     * is not held down anymore.\n     */\n    _startFadeOutTransition(rippleRef) {\n        const isMostRecentTransientRipple = rippleRef === this._mostRecentTransientRipple;\n        const { persistent } = rippleRef.config;\n        rippleRef.state = RippleState.VISIBLE;\n        // When the timer runs out while the user has kept their pointer down, we want to\n        // keep only the persistent ripples and the latest transient ripple. We do this,\n        // because we don't want stacked transient ripples to appear after their enter\n        // animation has finished.\n        if (!persistent && (!isMostRecentTransientRipple || !this._isPointerDown)) {\n            rippleRef.fadeOut();\n        }\n    }\n    /** Destroys the given ripple by removing it from the DOM and updating its state. */\n    _destroyRipple(rippleRef) {\n        const eventListeners = this._activeRipples.get(rippleRef) ?? null;\n        this._activeRipples.delete(rippleRef);\n        // Clear out the cached bounding rect if we have no more ripples.\n        if (!this._activeRipples.size) {\n            this._containerRect = null;\n        }\n        // If the current ref is the most recent transient ripple, unset it\n        // avoid memory leaks.\n        if (rippleRef === this._mostRecentTransientRipple) {\n            this._mostRecentTransientRipple = null;\n        }\n        rippleRef.state = RippleState.HIDDEN;\n        if (eventListeners !== null) {\n            rippleRef.element.removeEventListener('transitionend', eventListeners.onTransitionEnd);\n            rippleRef.element.removeEventListener('transitioncancel', eventListeners.onTransitionCancel);\n            if (eventListeners.fallbackTimer !== null) {\n                clearTimeout(eventListeners.fallbackTimer);\n            }\n        }\n        rippleRef.element.remove();\n    }\n    /** Function being called whenever the trigger is being pressed using mouse. */\n    _onMousedown(event) {\n        // Screen readers will fire fake mouse events for space/enter. Skip launching a\n        // ripple in this case for consistency with the non-screen-reader experience.\n        const isFakeMousedown = isFakeMousedownFromScreenReader(event);\n        const isSyntheticEvent = this._lastTouchStartEvent &&\n            Date.now() < this._lastTouchStartEvent + ignoreMouseEventsTimeout;\n        if (!this._target.rippleDisabled && !isFakeMousedown && !isSyntheticEvent) {\n            this._isPointerDown = true;\n            this.fadeInRipple(event.clientX, event.clientY, this._target.rippleConfig);\n        }\n    }\n    /** Function being called whenever the trigger is being pressed using touch. */\n    _onTouchStart(event) {\n        if (!this._target.rippleDisabled && !isFakeTouchstartFromScreenReader(event)) {\n            // Some browsers fire mouse events after a `touchstart` event. Those synthetic mouse\n            // events will launch a second ripple if we don't ignore mouse events for a specific\n            // time after a touchstart event.\n            this._lastTouchStartEvent = Date.now();\n            this._isPointerDown = true;\n            // Use `changedTouches` so we skip any touches where the user put\n            // their finger down, but used another finger to tap the element again.\n            const touches = event.changedTouches;\n            // According to the typings the touches should always be defined, but in some cases\n            // the browser appears to not assign them in tests which leads to flakes.\n            if (touches) {\n                for (let i = 0; i < touches.length; i++) {\n                    this.fadeInRipple(touches[i].clientX, touches[i].clientY, this._target.rippleConfig);\n                }\n            }\n        }\n    }\n    /** Function being called whenever the trigger is being released. */\n    _onPointerUp() {\n        if (!this._isPointerDown) {\n            return;\n        }\n        this._isPointerDown = false;\n        // Fade-out all ripples that are visible and not persistent.\n        this._getActiveRipples().forEach(ripple => {\n            // By default, only ripples that are completely visible will fade out on pointer release.\n            // If the `terminateOnPointerUp` option is set, ripples that still fade in will also fade out.\n            const isVisible = ripple.state === RippleState.VISIBLE ||\n                (ripple.config.terminateOnPointerUp && ripple.state === RippleState.FADING_IN);\n            if (!ripple.config.persistent && isVisible) {\n                ripple.fadeOut();\n            }\n        });\n    }\n    _getActiveRipples() {\n        return Array.from(this._activeRipples.keys());\n    }\n    /** Removes previously registered event listeners from the trigger element. */\n    _removeTriggerEvents() {\n        const trigger = this._triggerElement;\n        if (trigger) {\n            pointerDownEvents.forEach(type => RippleRenderer._eventManager.removeHandler(type, trigger, this));\n            if (this._pointerUpEventsRegistered) {\n                pointerUpEvents.forEach(type => trigger.removeEventListener(type, this, passiveCapturingEventOptions));\n                this._pointerUpEventsRegistered = false;\n            }\n        }\n    }\n}\n/**\n * Returns the distance from the point (x, y) to the furthest corner of a rectangle.\n */\nfunction distanceToFurthestCorner(x, y, rect) {\n    const distX = Math.max(Math.abs(x - rect.left), Math.abs(x - rect.right));\n    const distY = Math.max(Math.abs(y - rect.top), Math.abs(y - rect.bottom));\n    return Math.sqrt(distX * distX + distY * distY);\n}\n\n/** Injection token that can be used to specify the global ripple options. */\nconst MAT_RIPPLE_GLOBAL_OPTIONS = new InjectionToken('mat-ripple-global-options');\nclass MatRipple {\n    _elementRef = inject(ElementRef);\n    _animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });\n    /** Custom color for all ripples. */\n    color;\n    /** Whether the ripples should be visible outside the component's bounds. */\n    unbounded;\n    /**\n     * Whether the ripple always originates from the center of the host element's bounds, rather\n     * than originating from the location of the click event.\n     */\n    centered;\n    /**\n     * If set, the radius in pixels of foreground ripples when fully expanded. If unset, the radius\n     * will be the distance from the center of the ripple to the furthest corner of the host element's\n     * bounding rectangle.\n     */\n    radius = 0;\n    /**\n     * Configuration for the ripple animation. Allows modifying the enter and exit animation\n     * duration of the ripples. The animation durations will be overwritten if the\n     * `NoopAnimationsModule` is being used.\n     */\n    animation;\n    /**\n     * Whether click events will not trigger the ripple. Ripples can be still launched manually\n     * by using the `launch()` method.\n     */\n    get disabled() {\n        return this._disabled;\n    }\n    set disabled(value) {\n        if (value) {\n            this.fadeOutAllNonPersistent();\n        }\n        this._disabled = value;\n        this._setupTriggerEventsIfEnabled();\n    }\n    _disabled = false;\n    /**\n     * The element that triggers the ripple when click events are received.\n     * Defaults to the directive's host element.\n     */\n    get trigger() {\n        return this._trigger || this._elementRef.nativeElement;\n    }\n    set trigger(trigger) {\n        this._trigger = trigger;\n        this._setupTriggerEventsIfEnabled();\n    }\n    _trigger;\n    /** Renderer for the ripple DOM manipulations. */\n    _rippleRenderer;\n    /** Options that are set globally for all ripples. */\n    _globalOptions;\n    /** @docs-private Whether ripple directive is initialized and the input bindings are set. */\n    _isInitialized = false;\n    constructor() {\n        const ngZone = inject(NgZone);\n        const platform = inject(Platform);\n        const globalOptions = inject(MAT_RIPPLE_GLOBAL_OPTIONS, { optional: true });\n        const injector = inject(Injector);\n        // Note: cannot use `inject()` here, because this class\n        // gets instantiated manually in the ripple loader.\n        this._globalOptions = globalOptions || {};\n        this._rippleRenderer = new RippleRenderer(this, ngZone, this._elementRef, platform, injector);\n    }\n    ngOnInit() {\n        this._isInitialized = true;\n        this._setupTriggerEventsIfEnabled();\n    }\n    ngOnDestroy() {\n        this._rippleRenderer._removeTriggerEvents();\n    }\n    /** Fades out all currently showing ripple elements. */\n    fadeOutAll() {\n        this._rippleRenderer.fadeOutAll();\n    }\n    /** Fades out all currently showing non-persistent ripple elements. */\n    fadeOutAllNonPersistent() {\n        this._rippleRenderer.fadeOutAllNonPersistent();\n    }\n    /**\n     * Ripple configuration from the directive's input values.\n     * @docs-private Implemented as part of RippleTarget\n     */\n    get rippleConfig() {\n        return {\n            centered: this.centered,\n            radius: this.radius,\n            color: this.color,\n            animation: {\n                ...this._globalOptions.animation,\n                ...(this._animationMode === 'NoopAnimations' ? { enterDuration: 0, exitDuration: 0 } : {}),\n                ...this.animation,\n            },\n            terminateOnPointerUp: this._globalOptions.terminateOnPointerUp,\n        };\n    }\n    /**\n     * Whether ripples on pointer-down are disabled or not.\n     * @docs-private Implemented as part of RippleTarget\n     */\n    get rippleDisabled() {\n        return this.disabled || !!this._globalOptions.disabled;\n    }\n    /** Sets up the trigger event listeners if ripples are enabled. */\n    _setupTriggerEventsIfEnabled() {\n        if (!this.disabled && this._isInitialized) {\n            this._rippleRenderer.setupTriggerEvents(this.trigger);\n        }\n    }\n    /** Launches a manual ripple at the specified coordinated or just by the ripple config. */\n    launch(configOrX, y = 0, config) {\n        if (typeof configOrX === 'number') {\n            return this._rippleRenderer.fadeInRipple(configOrX, y, { ...this.rippleConfig, ...config });\n        }\n        else {\n            return this._rippleRenderer.fadeInRipple(0, 0, { ...this.rippleConfig, ...configOrX });\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRipple, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatRipple, isStandalone: true, selector: \"[mat-ripple], [matRipple]\", inputs: { color: [\"matRippleColor\", \"color\"], unbounded: [\"matRippleUnbounded\", \"unbounded\"], centered: [\"matRippleCentered\", \"centered\"], radius: [\"matRippleRadius\", \"radius\"], animation: [\"matRippleAnimation\", \"animation\"], disabled: [\"matRippleDisabled\", \"disabled\"], trigger: [\"matRippleTrigger\", \"trigger\"] }, host: { properties: { \"class.mat-ripple-unbounded\": \"unbounded\" }, classAttribute: \"mat-ripple\" }, exportAs: [\"matRipple\"], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRipple, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[mat-ripple], [matRipple]',\n                    exportAs: 'matRipple',\n                    host: {\n                        'class': 'mat-ripple',\n                        '[class.mat-ripple-unbounded]': 'unbounded',\n                    },\n                }]\n        }], ctorParameters: () => [], propDecorators: { color: [{\n                type: Input,\n                args: ['matRippleColor']\n            }], unbounded: [{\n                type: Input,\n                args: ['matRippleUnbounded']\n            }], centered: [{\n                type: Input,\n                args: ['matRippleCentered']\n            }], radius: [{\n                type: Input,\n                args: ['matRippleRadius']\n            }], animation: [{\n                type: Input,\n                args: ['matRippleAnimation']\n            }], disabled: [{\n                type: Input,\n                args: ['matRippleDisabled']\n            }], trigger: [{\n                type: Input,\n                args: ['matRippleTrigger']\n            }] } });\n\nclass MatRippleModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRippleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRippleModule, imports: [MatCommonModule, MatRipple], exports: [MatRipple, MatCommonModule] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRippleModule, imports: [MatCommonModule, MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRippleModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [MatCommonModule, MatRipple],\n                    exports: [MatRipple, MatCommonModule],\n                }]\n        }] });\n\n/**\n * Component that shows a simplified checkbox without including any kind of \"real\" checkbox.\n * Meant to be used when the checkbox is purely decorative and a large number of them will be\n * included, such as for the options in a multi-select. Uses no SVGs or complex animations.\n * Note that theming is meant to be handled by the parent element, e.g.\n * `mat-primary .mat-pseudo-checkbox`.\n *\n * Note that this component will be completely invisible to screen-reader users. This is *not*\n * interchangeable with `<mat-checkbox>` and should *not* be used if the user would directly\n * interact with the checkbox. The pseudo-checkbox should only be used as an implementation detail\n * of more complex components that appropriately handle selected / checked state.\n * @docs-private\n */\nclass MatPseudoCheckbox {\n    _animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });\n    /** Display state of the checkbox. */\n    state = 'unchecked';\n    /** Whether the checkbox is disabled. */\n    disabled = false;\n    /**\n     * Appearance of the pseudo checkbox. Default appearance of 'full' renders a checkmark/mixedmark\n     * indicator inside a square box. 'minimal' appearance only renders the checkmark/mixedmark.\n     */\n    appearance = 'full';\n    constructor() { }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatPseudoCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatPseudoCheckbox, isStandalone: true, selector: \"mat-pseudo-checkbox\", inputs: { state: \"state\", disabled: \"disabled\", appearance: \"appearance\" }, host: { properties: { \"class.mat-pseudo-checkbox-indeterminate\": \"state === \\\"indeterminate\\\"\", \"class.mat-pseudo-checkbox-checked\": \"state === \\\"checked\\\"\", \"class.mat-pseudo-checkbox-disabled\": \"disabled\", \"class.mat-pseudo-checkbox-minimal\": \"appearance === \\\"minimal\\\"\", \"class.mat-pseudo-checkbox-full\": \"appearance === \\\"full\\\"\", \"class._mat-animation-noopable\": \"_animationMode === \\\"NoopAnimations\\\"\" }, classAttribute: \"mat-pseudo-checkbox\" }, ngImport: i0, template: '', isInline: true, styles: [\".mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:\\\"\\\";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatPseudoCheckbox, decorators: [{\n            type: Component,\n            args: [{ encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, selector: 'mat-pseudo-checkbox', template: '', host: {\n                        'class': 'mat-pseudo-checkbox',\n                        '[class.mat-pseudo-checkbox-indeterminate]': 'state === \"indeterminate\"',\n                        '[class.mat-pseudo-checkbox-checked]': 'state === \"checked\"',\n                        '[class.mat-pseudo-checkbox-disabled]': 'disabled',\n                        '[class.mat-pseudo-checkbox-minimal]': 'appearance === \"minimal\"',\n                        '[class.mat-pseudo-checkbox-full]': 'appearance === \"full\"',\n                        '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n                    }, styles: [\".mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:\\\"\\\";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}\"] }]\n        }], ctorParameters: () => [], propDecorators: { state: [{\n                type: Input\n            }], disabled: [{\n                type: Input\n            }], appearance: [{\n                type: Input\n            }] } });\n\nclass MatPseudoCheckboxModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatPseudoCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatPseudoCheckboxModule, imports: [MatCommonModule, MatPseudoCheckbox], exports: [MatPseudoCheckbox] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatPseudoCheckboxModule, imports: [MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatPseudoCheckboxModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [MatCommonModule, MatPseudoCheckbox],\n                    exports: [MatPseudoCheckbox],\n                }]\n        }] });\n\n/**\n * Injection token used to provide the parent component to options.\n */\nconst MAT_OPTION_PARENT_COMPONENT = new InjectionToken('MAT_OPTION_PARENT_COMPONENT');\n\n// Notes on the accessibility pattern used for `mat-optgroup`.\n// The option group has two different \"modes\": regular and inert. The regular mode uses the\n// recommended a11y pattern which has `role=\"group\"` on the group element with `aria-labelledby`\n// pointing to the label. This works for `mat-select`, but it seems to hit a bug for autocomplete\n// under VoiceOver where the group doesn't get read out at all. The bug appears to be that if\n// there's __any__ a11y-related attribute on the group (e.g. `role` or `aria-labelledby`),\n// VoiceOver on Safari won't read it out.\n// We've introduced the `inert` mode as a workaround. Under this mode, all a11y attributes are\n// removed from the group, and we get the screen reader to read out the group label by mirroring it\n// inside an invisible element in the option. This is sub-optimal, because the screen reader will\n// repeat the group label on each navigation, whereas the default pattern only reads the group when\n// the user enters a new group. The following alternate approaches were considered:\n// 1. Reading out the group label using the `LiveAnnouncer` solves the problem, but we can't control\n//    when the text will be read out so sometimes it comes in too late or never if the user\n//    navigates quickly.\n// 2. `<mat-option aria-describedby=\"groupLabel\"` - This works on Safari, but VoiceOver in Chrome\n//    won't read out the description at all.\n// 3. `<mat-option aria-labelledby=\"optionLabel groupLabel\"` - This works on Chrome, but Safari\n//     doesn't read out the text at all. Furthermore, on\n/**\n * Injection token that can be used to reference instances of `MatOptgroup`. It serves as\n * alternative token to the actual `MatOptgroup` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nconst MAT_OPTGROUP = new InjectionToken('MatOptgroup');\n/**\n * Component that is used to group instances of `mat-option`.\n */\nclass MatOptgroup {\n    /** Label for the option group. */\n    label;\n    /** whether the option group is disabled. */\n    disabled = false;\n    /** Unique id for the underlying label. */\n    _labelId = inject(_IdGenerator).getId('mat-optgroup-label-');\n    /** Whether the group is in inert a11y mode. */\n    _inert;\n    constructor() {\n        const parent = inject(MAT_OPTION_PARENT_COMPONENT, { optional: true });\n        this._inert = parent?.inertGroups ?? false;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatOptgroup, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatOptgroup, isStandalone: true, selector: \"mat-optgroup\", inputs: { label: \"label\", disabled: [\"disabled\", \"disabled\", booleanAttribute] }, host: { properties: { \"attr.role\": \"_inert ? null : \\\"group\\\"\", \"attr.aria-disabled\": \"_inert ? null : disabled.toString()\", \"attr.aria-labelledby\": \"_inert ? null : _labelId\" }, classAttribute: \"mat-mdc-optgroup\" }, providers: [{ provide: MAT_OPTGROUP, useExisting: MatOptgroup }], exportAs: [\"matOptgroup\"], ngImport: i0, template: \"<span\\n  class=\\\"mat-mdc-optgroup-label\\\"\\n  role=\\\"presentation\\\"\\n  [class.mdc-list-item--disabled]=\\\"disabled\\\"\\n  [id]=\\\"_labelId\\\">\\n  <span class=\\\"mdc-list-item__primary-text\\\">{{ label }} <ng-content></ng-content></span>\\n</span>\\n\\n<ng-content select=\\\"mat-option, ng-container\\\"></ng-content>\\n\", styles: [\".mat-mdc-optgroup{color:var(--mat-optgroup-label-text-color, var(--mat-sys-on-surface-variant));font-family:var(--mat-optgroup-label-text-font, var(--mat-sys-title-small-font));line-height:var(--mat-optgroup-label-text-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-optgroup-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-optgroup-label-text-tracking, var(--mat-sys-title-small-tracking));font-weight:var(--mat-optgroup-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-optgroup-label{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;outline:none}.mat-mdc-optgroup-label.mdc-list-item--disabled{opacity:.38}.mat-mdc-optgroup-label .mdc-list-item__primary-text{font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;white-space:normal;color:inherit}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatOptgroup, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-optgroup', exportAs: 'matOptgroup', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {\n                        'class': 'mat-mdc-optgroup',\n                        '[attr.role]': '_inert ? null : \"group\"',\n                        '[attr.aria-disabled]': '_inert ? null : disabled.toString()',\n                        '[attr.aria-labelledby]': '_inert ? null : _labelId',\n                    }, providers: [{ provide: MAT_OPTGROUP, useExisting: MatOptgroup }], template: \"<span\\n  class=\\\"mat-mdc-optgroup-label\\\"\\n  role=\\\"presentation\\\"\\n  [class.mdc-list-item--disabled]=\\\"disabled\\\"\\n  [id]=\\\"_labelId\\\">\\n  <span class=\\\"mdc-list-item__primary-text\\\">{{ label }} <ng-content></ng-content></span>\\n</span>\\n\\n<ng-content select=\\\"mat-option, ng-container\\\"></ng-content>\\n\", styles: [\".mat-mdc-optgroup{color:var(--mat-optgroup-label-text-color, var(--mat-sys-on-surface-variant));font-family:var(--mat-optgroup-label-text-font, var(--mat-sys-title-small-font));line-height:var(--mat-optgroup-label-text-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-optgroup-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-optgroup-label-text-tracking, var(--mat-sys-title-small-tracking));font-weight:var(--mat-optgroup-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-optgroup-label{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;outline:none}.mat-mdc-optgroup-label.mdc-list-item--disabled{opacity:.38}.mat-mdc-optgroup-label .mdc-list-item__primary-text{font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;white-space:normal;color:inherit}\"] }]\n        }], ctorParameters: () => [], propDecorators: { label: [{\n                type: Input\n            }], disabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }] } });\n\n/** Event object emitted by MatOption when selected or deselected. */\nclass MatOptionSelectionChange {\n    source;\n    isUserInput;\n    constructor(\n    /** Reference to the option that emitted the event. */\n    source, \n    /** Whether the change in the option's value was a result of a user action. */\n    isUserInput = false) {\n        this.source = source;\n        this.isUserInput = isUserInput;\n    }\n}\n/**\n * Single option inside of a `<mat-select>` element.\n */\nclass MatOption {\n    _element = inject(ElementRef);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _parent = inject(MAT_OPTION_PARENT_COMPONENT, { optional: true });\n    group = inject(MAT_OPTGROUP, { optional: true });\n    _signalDisableRipple = false;\n    _selected = false;\n    _active = false;\n    _disabled = false;\n    _mostRecentViewValue = '';\n    /** Whether the wrapping component is in multiple selection mode. */\n    get multiple() {\n        return this._parent && this._parent.multiple;\n    }\n    /** Whether or not the option is currently selected. */\n    get selected() {\n        return this._selected;\n    }\n    /** The form value of the option. */\n    value;\n    /** The unique ID of the option. */\n    id = inject(_IdGenerator).getId('mat-option-');\n    /** Whether the option is disabled. */\n    get disabled() {\n        return (this.group && this.group.disabled) || this._disabled;\n    }\n    set disabled(value) {\n        this._disabled = value;\n    }\n    /** Whether ripples for the option are disabled. */\n    get disableRipple() {\n        return this._signalDisableRipple\n            ? this._parent.disableRipple()\n            : !!this._parent?.disableRipple;\n    }\n    /** Whether to display checkmark for single-selection. */\n    get hideSingleSelectionIndicator() {\n        return !!(this._parent && this._parent.hideSingleSelectionIndicator);\n    }\n    /** Event emitted when the option is selected or deselected. */\n    // tslint:disable-next-line:no-output-on-prefix\n    onSelectionChange = new EventEmitter();\n    /** Element containing the option's text. */\n    _text;\n    /** Emits when the state of the option changes and any parents have to be notified. */\n    _stateChanges = new Subject();\n    constructor() {\n        inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n        inject(_CdkPrivateStyleLoader).load(_VisuallyHiddenLoader);\n        this._signalDisableRipple = !!this._parent && isSignal(this._parent.disableRipple);\n    }\n    /**\n     * Whether or not the option is currently active and ready to be selected.\n     * An active option displays styles as if it is focused, but the\n     * focus is actually retained somewhere else. This comes in handy\n     * for components like autocomplete where focus must remain on the input.\n     */\n    get active() {\n        return this._active;\n    }\n    /**\n     * The displayed value of the option. It is necessary to show the selected option in the\n     * select's trigger.\n     */\n    get viewValue() {\n        // TODO(kara): Add input property alternative for node envs.\n        return (this._text?.nativeElement.textContent || '').trim();\n    }\n    /** Selects the option. */\n    select(emitEvent = true) {\n        if (!this._selected) {\n            this._selected = true;\n            this._changeDetectorRef.markForCheck();\n            if (emitEvent) {\n                this._emitSelectionChangeEvent();\n            }\n        }\n    }\n    /** Deselects the option. */\n    deselect(emitEvent = true) {\n        if (this._selected) {\n            this._selected = false;\n            this._changeDetectorRef.markForCheck();\n            if (emitEvent) {\n                this._emitSelectionChangeEvent();\n            }\n        }\n    }\n    /** Sets focus onto this option. */\n    focus(_origin, options) {\n        // Note that we aren't using `_origin`, but we need to keep it because some internal consumers\n        // use `MatOption` in a `FocusKeyManager` and we need it to match `FocusableOption`.\n        const element = this._getHostElement();\n        if (typeof element.focus === 'function') {\n            element.focus(options);\n        }\n    }\n    /**\n     * This method sets display styles on the option to make it appear\n     * active. This is used by the ActiveDescendantKeyManager so key\n     * events will display the proper options as active on arrow key events.\n     */\n    setActiveStyles() {\n        if (!this._active) {\n            this._active = true;\n            this._changeDetectorRef.markForCheck();\n        }\n    }\n    /**\n     * This method removes display styles on the option that made it appear\n     * active. This is used by the ActiveDescendantKeyManager so key\n     * events will display the proper options as active on arrow key events.\n     */\n    setInactiveStyles() {\n        if (this._active) {\n            this._active = false;\n            this._changeDetectorRef.markForCheck();\n        }\n    }\n    /** Gets the label to be used when determining whether the option should be focused. */\n    getLabel() {\n        return this.viewValue;\n    }\n    /** Ensures the option is selected when activated from the keyboard. */\n    _handleKeydown(event) {\n        if ((event.keyCode === ENTER || event.keyCode === SPACE) && !hasModifierKey(event)) {\n            this._selectViaInteraction();\n            // Prevent the page from scrolling down and form submits.\n            event.preventDefault();\n        }\n    }\n    /**\n     * `Selects the option while indicating the selection came from the user. Used to\n     * determine if the select's view -> model callback should be invoked.`\n     */\n    _selectViaInteraction() {\n        if (!this.disabled) {\n            this._selected = this.multiple ? !this._selected : true;\n            this._changeDetectorRef.markForCheck();\n            this._emitSelectionChangeEvent(true);\n        }\n    }\n    /** Returns the correct tabindex for the option depending on disabled state. */\n    // This method is only used by `MatLegacyOption`. Keeping it here to avoid breaking the types.\n    // That's because `MatLegacyOption` use `MatOption` type in a few places such as\n    // `MatOptionSelectionChange`. It is safe to delete this when `MatLegacyOption` is deleted.\n    _getTabIndex() {\n        return this.disabled ? '-1' : '0';\n    }\n    /** Gets the host DOM element. */\n    _getHostElement() {\n        return this._element.nativeElement;\n    }\n    ngAfterViewChecked() {\n        // Since parent components could be using the option's label to display the selected values\n        // (e.g. `mat-select`) and they don't have a way of knowing if the option's label has changed\n        // we have to check for changes in the DOM ourselves and dispatch an event. These checks are\n        // relatively cheap, however we still limit them only to selected options in order to avoid\n        // hitting the DOM too often.\n        if (this._selected) {\n            const viewValue = this.viewValue;\n            if (viewValue !== this._mostRecentViewValue) {\n                if (this._mostRecentViewValue) {\n                    this._stateChanges.next();\n                }\n                this._mostRecentViewValue = viewValue;\n            }\n        }\n    }\n    ngOnDestroy() {\n        this._stateChanges.complete();\n    }\n    /** Emits the selection change event. */\n    _emitSelectionChangeEvent(isUserInput = false) {\n        this.onSelectionChange.emit(new MatOptionSelectionChange(this, isUserInput));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatOption, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"19.0.0\", type: MatOption, isStandalone: true, selector: \"mat-option\", inputs: { value: \"value\", id: \"id\", disabled: [\"disabled\", \"disabled\", booleanAttribute] }, outputs: { onSelectionChange: \"onSelectionChange\" }, host: { attributes: { \"role\": \"option\" }, listeners: { \"click\": \"_selectViaInteraction()\", \"keydown\": \"_handleKeydown($event)\" }, properties: { \"class.mdc-list-item--selected\": \"selected\", \"class.mat-mdc-option-multiple\": \"multiple\", \"class.mat-mdc-option-active\": \"active\", \"class.mdc-list-item--disabled\": \"disabled\", \"id\": \"id\", \"attr.aria-selected\": \"selected\", \"attr.aria-disabled\": \"disabled.toString()\" }, classAttribute: \"mat-mdc-option mdc-list-item\" }, viewQueries: [{ propertyName: \"_text\", first: true, predicate: [\"text\"], descendants: true, static: true }], exportAs: [\"matOption\"], ngImport: i0, template: \"<!-- Set aria-hidden=\\\"true\\\" to this DOM node and other decorative nodes in this file. This might\\n be contributing to issue where sometimes VoiceOver focuses on a TextNode in the a11y tree instead\\n of the Option node (#23202). Most assistive technology will generally ignore non-role,\\n non-text-content elements. Adding aria-hidden seems to make VoiceOver behave more consistently. -->\\n@if (multiple) {\\n    <mat-pseudo-checkbox\\n        class=\\\"mat-mdc-option-pseudo-checkbox\\\"\\n        [disabled]=\\\"disabled\\\"\\n        [state]=\\\"selected ? 'checked' : 'unchecked'\\\"\\n        aria-hidden=\\\"true\\\"></mat-pseudo-checkbox>\\n}\\n\\n<ng-content select=\\\"mat-icon\\\"></ng-content>\\n\\n<span class=\\\"mdc-list-item__primary-text\\\" #text><ng-content></ng-content></span>\\n\\n<!-- Render checkmark at the end for single-selection. -->\\n@if (!multiple && selected && !hideSingleSelectionIndicator) {\\n    <mat-pseudo-checkbox\\n        class=\\\"mat-mdc-option-pseudo-checkbox\\\"\\n        [disabled]=\\\"disabled\\\"\\n        state=\\\"checked\\\"\\n        aria-hidden=\\\"true\\\"\\n        appearance=\\\"minimal\\\"></mat-pseudo-checkbox>\\n}\\n\\n<!-- See a11y notes inside optgroup.ts for context behind this element. -->\\n@if (group && group._inert) {\\n    <span class=\\\"cdk-visually-hidden\\\">({{ group.label }})</span>\\n}\\n\\n<div class=\\\"mat-mdc-option-ripple mat-focus-indicator\\\" aria-hidden=\\\"true\\\" mat-ripple\\n     [matRippleTrigger]=\\\"_getHostElement()\\\" [matRippleDisabled]=\\\"disabled || disableRipple\\\">\\n</div>\\n\", styles: [\".mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors: active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{content:\\\"\\\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{right:auto;left:16px}}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator::before{content:\\\"\\\"}\"], dependencies: [{ kind: \"component\", type: MatPseudoCheckbox, selector: \"mat-pseudo-checkbox\", inputs: [\"state\", \"disabled\", \"appearance\"] }, { kind: \"directive\", type: MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatOption, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-option', exportAs: 'matOption', host: {\n                        'role': 'option',\n                        '[class.mdc-list-item--selected]': 'selected',\n                        '[class.mat-mdc-option-multiple]': 'multiple',\n                        '[class.mat-mdc-option-active]': 'active',\n                        '[class.mdc-list-item--disabled]': 'disabled',\n                        '[id]': 'id',\n                        // Set aria-selected to false for non-selected items and true for selected items. Conform to\n                        // [WAI ARIA Listbox authoring practices guide](\n                        //  https://www.w3.org/WAI/ARIA/apg/patterns/listbox/), \"If any options are selected, each\n                        // selected option has either aria-selected or aria-checked  set to true. All options that are\n                        // selectable but not selected have either aria-selected or aria-checked set to false.\" Align\n                        // aria-selected implementation of Chips and List components.\n                        //\n                        // Set `aria-selected=\"false\"` on not-selected listbox options to fix VoiceOver announcing\n                        // every option as \"selected\" (#21491).\n                        '[attr.aria-selected]': 'selected',\n                        '[attr.aria-disabled]': 'disabled.toString()',\n                        '(click)': '_selectViaInteraction()',\n                        '(keydown)': '_handleKeydown($event)',\n                        'class': 'mat-mdc-option mdc-list-item',\n                    }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatPseudoCheckbox, MatRipple], template: \"<!-- Set aria-hidden=\\\"true\\\" to this DOM node and other decorative nodes in this file. This might\\n be contributing to issue where sometimes VoiceOver focuses on a TextNode in the a11y tree instead\\n of the Option node (#23202). Most assistive technology will generally ignore non-role,\\n non-text-content elements. Adding aria-hidden seems to make VoiceOver behave more consistently. -->\\n@if (multiple) {\\n    <mat-pseudo-checkbox\\n        class=\\\"mat-mdc-option-pseudo-checkbox\\\"\\n        [disabled]=\\\"disabled\\\"\\n        [state]=\\\"selected ? 'checked' : 'unchecked'\\\"\\n        aria-hidden=\\\"true\\\"></mat-pseudo-checkbox>\\n}\\n\\n<ng-content select=\\\"mat-icon\\\"></ng-content>\\n\\n<span class=\\\"mdc-list-item__primary-text\\\" #text><ng-content></ng-content></span>\\n\\n<!-- Render checkmark at the end for single-selection. -->\\n@if (!multiple && selected && !hideSingleSelectionIndicator) {\\n    <mat-pseudo-checkbox\\n        class=\\\"mat-mdc-option-pseudo-checkbox\\\"\\n        [disabled]=\\\"disabled\\\"\\n        state=\\\"checked\\\"\\n        aria-hidden=\\\"true\\\"\\n        appearance=\\\"minimal\\\"></mat-pseudo-checkbox>\\n}\\n\\n<!-- See a11y notes inside optgroup.ts for context behind this element. -->\\n@if (group && group._inert) {\\n    <span class=\\\"cdk-visually-hidden\\\">({{ group.label }})</span>\\n}\\n\\n<div class=\\\"mat-mdc-option-ripple mat-focus-indicator\\\" aria-hidden=\\\"true\\\" mat-ripple\\n     [matRippleTrigger]=\\\"_getHostElement()\\\" [matRippleDisabled]=\\\"disabled || disableRipple\\\">\\n</div>\\n\", styles: [\".mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors: active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{content:\\\"\\\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{right:auto;left:16px}}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator::before{content:\\\"\\\"}\"] }]\n        }], ctorParameters: () => [], propDecorators: { value: [{\n                type: Input\n            }], id: [{\n                type: Input\n            }], disabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], onSelectionChange: [{\n                type: Output\n            }], _text: [{\n                type: ViewChild,\n                args: ['text', { static: true }]\n            }] } });\n/**\n * Counts the amount of option group labels that precede the specified option.\n * @param optionIndex Index of the option at which to start counting.\n * @param options Flat list of all of the options.\n * @param optionGroups Flat list of all of the option groups.\n * @docs-private\n */\nfunction _countGroupLabelsBeforeOption(optionIndex, options, optionGroups) {\n    if (optionGroups.length) {\n        let optionsArray = options.toArray();\n        let groups = optionGroups.toArray();\n        let groupCounter = 0;\n        for (let i = 0; i < optionIndex + 1; i++) {\n            if (optionsArray[i].group && optionsArray[i].group === groups[groupCounter]) {\n                groupCounter++;\n            }\n        }\n        return groupCounter;\n    }\n    return 0;\n}\n/**\n * Determines the position to which to scroll a panel in order for an option to be into view.\n * @param optionOffset Offset of the option from the top of the panel.\n * @param optionHeight Height of the options.\n * @param currentScrollPosition Current scroll position of the panel.\n * @param panelHeight Height of the panel.\n * @docs-private\n */\nfunction _getOptionScrollPosition(optionOffset, optionHeight, currentScrollPosition, panelHeight) {\n    if (optionOffset < currentScrollPosition) {\n        return optionOffset;\n    }\n    if (optionOffset + optionHeight > currentScrollPosition + panelHeight) {\n        return Math.max(0, optionOffset - panelHeight + optionHeight);\n    }\n    return currentScrollPosition;\n}\n\nclass MatOptionModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatOptionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatOptionModule, imports: [MatRippleModule, MatCommonModule, MatPseudoCheckboxModule, MatOption, MatOptgroup], exports: [MatOption, MatOptgroup] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatOptionModule, imports: [MatRippleModule, MatCommonModule, MatPseudoCheckboxModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatOptionModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [MatRippleModule, MatCommonModule, MatPseudoCheckboxModule, MatOption, MatOptgroup],\n                    exports: [MatOption, MatOptgroup],\n                }]\n        }] });\n\n/** The options for the MatRippleLoader's event listeners. */\nconst eventListenerOptions = { capture: true };\n/**\n * The events that should trigger the initialization of the ripple.\n * Note that we use `mousedown`, rather than `click`, for mouse devices because\n * we can't rely on `mouseenter` in the shadow DOM and `click` happens too late.\n */\nconst rippleInteractionEvents = ['focus', 'mousedown', 'mouseenter', 'touchstart'];\n/** The attribute attached to a component whose ripple has not yet been initialized. */\nconst matRippleUninitialized = 'mat-ripple-loader-uninitialized';\n/** Additional classes that should be added to the ripple when it is rendered. */\nconst matRippleClassName = 'mat-ripple-loader-class-name';\n/** Whether the ripple should be centered. */\nconst matRippleCentered = 'mat-ripple-loader-centered';\n/** Whether the ripple should be disabled. */\nconst matRippleDisabled = 'mat-ripple-loader-disabled';\n/**\n * Handles attaching ripples on demand.\n *\n * This service allows us to avoid eagerly creating & attaching MatRipples.\n * It works by creating & attaching a ripple only when a component is first interacted with.\n *\n * @docs-private\n */\nclass MatRippleLoader {\n    _document = inject(DOCUMENT, { optional: true });\n    _animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });\n    _globalRippleOptions = inject(MAT_RIPPLE_GLOBAL_OPTIONS, { optional: true });\n    _platform = inject(Platform);\n    _ngZone = inject(NgZone);\n    _injector = inject(Injector);\n    _hosts = new Map();\n    constructor() {\n        this._ngZone.runOutsideAngular(() => {\n            for (const event of rippleInteractionEvents) {\n                this._document?.addEventListener(event, this._onInteraction, eventListenerOptions);\n            }\n        });\n    }\n    ngOnDestroy() {\n        const hosts = this._hosts.keys();\n        for (const host of hosts) {\n            this.destroyRipple(host);\n        }\n        for (const event of rippleInteractionEvents) {\n            this._document?.removeEventListener(event, this._onInteraction, eventListenerOptions);\n        }\n    }\n    /**\n     * Configures the ripple that will be rendered by the ripple loader.\n     *\n     * Stores the given information about how the ripple should be configured on the host\n     * element so that it can later be retrived & used when the ripple is actually created.\n     */\n    configureRipple(host, config) {\n        // Indicates that the ripple has not yet been rendered for this component.\n        host.setAttribute(matRippleUninitialized, this._globalRippleOptions?.namespace ?? '');\n        // Store the additional class name(s) that should be added to the ripple element.\n        if (config.className || !host.hasAttribute(matRippleClassName)) {\n            host.setAttribute(matRippleClassName, config.className || '');\n        }\n        // Store whether the ripple should be centered.\n        if (config.centered) {\n            host.setAttribute(matRippleCentered, '');\n        }\n        if (config.disabled) {\n            host.setAttribute(matRippleDisabled, '');\n        }\n    }\n    /** Sets the disabled state on the ripple instance corresponding to the given host element. */\n    setDisabled(host, disabled) {\n        const ripple = this._hosts.get(host);\n        // If the ripple has already been instantiated, just disable it.\n        if (ripple) {\n            ripple.target.rippleDisabled = disabled;\n            if (!disabled && !ripple.hasSetUpEvents) {\n                ripple.hasSetUpEvents = true;\n                ripple.renderer.setupTriggerEvents(host);\n            }\n        }\n        else if (disabled) {\n            // Otherwise, set an attribute so we know what the\n            // disabled state should be when the ripple is initialized.\n            host.setAttribute(matRippleDisabled, '');\n        }\n        else {\n            host.removeAttribute(matRippleDisabled);\n        }\n    }\n    /**\n     * Handles creating and attaching component internals\n     * when a component is initially interacted with.\n     */\n    _onInteraction = (event) => {\n        const eventTarget = _getEventTarget(event);\n        if (eventTarget instanceof HTMLElement) {\n            // TODO(wagnermaciel): Consider batching these events to improve runtime performance.\n            const element = eventTarget.closest(`[${matRippleUninitialized}=\"${this._globalRippleOptions?.namespace ?? ''}\"]`);\n            if (element) {\n                this._createRipple(element);\n            }\n        }\n    };\n    /** Creates a MatRipple and appends it to the given element. */\n    _createRipple(host) {\n        if (!this._document || this._hosts.has(host)) {\n            return;\n        }\n        // Create the ripple element.\n        host.querySelector('.mat-ripple')?.remove();\n        const rippleEl = this._document.createElement('span');\n        rippleEl.classList.add('mat-ripple', host.getAttribute(matRippleClassName));\n        host.append(rippleEl);\n        const isNoopAnimations = this._animationMode === 'NoopAnimations';\n        const globalOptions = this._globalRippleOptions;\n        const enterDuration = isNoopAnimations\n            ? 0\n            : globalOptions?.animation?.enterDuration ?? defaultRippleAnimationConfig.enterDuration;\n        const exitDuration = isNoopAnimations\n            ? 0\n            : globalOptions?.animation?.exitDuration ?? defaultRippleAnimationConfig.exitDuration;\n        const target = {\n            rippleDisabled: isNoopAnimations || globalOptions?.disabled || host.hasAttribute(matRippleDisabled),\n            rippleConfig: {\n                centered: host.hasAttribute(matRippleCentered),\n                terminateOnPointerUp: globalOptions?.terminateOnPointerUp,\n                animation: {\n                    enterDuration,\n                    exitDuration,\n                },\n            },\n        };\n        const renderer = new RippleRenderer(target, this._ngZone, rippleEl, this._platform, this._injector);\n        const hasSetUpEvents = !target.rippleDisabled;\n        if (hasSetUpEvents) {\n            renderer.setupTriggerEvents(host);\n        }\n        this._hosts.set(host, {\n            target,\n            renderer,\n            hasSetUpEvents,\n        });\n        host.removeAttribute(matRippleUninitialized);\n    }\n    destroyRipple(host) {\n        const ripple = this._hosts.get(host);\n        if (ripple) {\n            ripple.renderer._removeTriggerEvents();\n            this._hosts.delete(host);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRippleLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRippleLoader, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRippleLoader, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\n/**\n * Internal shared component used as a container in form field controls.\n * Not to be confused with `mat-form-field` which MDC calls a \"text field\".\n * @docs-private\n */\nclass _MatInternalFormField {\n    /** Position of the label relative to the content. */\n    labelPosition;\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _MatInternalFormField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: _MatInternalFormField, isStandalone: true, selector: \"div[mat-internal-form-field]\", inputs: { labelPosition: \"labelPosition\" }, host: { properties: { \"class.mdc-form-field--align-end\": \"labelPosition === \\\"before\\\"\" }, classAttribute: \"mdc-form-field mat-internal-form-field\" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [\".mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _MatInternalFormField, decorators: [{\n            type: Component,\n            args: [{ selector: 'div[mat-internal-form-field]', template: '<ng-content></ng-content>', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {\n                        'class': 'mdc-form-field mat-internal-form-field',\n                        '[class.mdc-form-field--align-end]': 'labelPosition === \"before\"',\n                    }, styles: [\".mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}\"] }]\n        }], propDecorators: { labelPosition: [{\n                type: Input,\n                args: [{ required: true }]\n            }] } });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AnimationCurves, AnimationDurations, DateAdapter, ErrorStateMatcher, MATERIAL_SANITY_CHECKS, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MAT_DATE_LOCALE_FACTORY, MAT_NATIVE_DATE_FORMATS, MAT_OPTGROUP, MAT_OPTION_PARENT_COMPONENT, MAT_RIPPLE_GLOBAL_OPTIONS, MatCommonModule, MatLine, MatLineModule, MatNativeDateModule, MatOptgroup, MatOption, MatOptionModule, MatOptionSelectionChange, MatPseudoCheckbox, MatPseudoCheckboxModule, MatRipple, MatRippleLoader, MatRippleModule, NativeDateAdapter, NativeDateModule, RippleRef, RippleRenderer, RippleState, ShowOnDirtyErrorStateMatcher, VERSION, _ErrorStateTracker, _MatInternalFormField, _StructuralStylesLoader, _countGroupLabelsBeforeOption, _getOptionScrollPosition, defaultRippleAnimationConfig, provideNativeDateAdapter, setLines };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, inject, ElementRef, NgZone, ChangeDetectorRef, Renderer2, ANIMATION_MODULE_TYPE, EventEmitter, numberAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { MatCommonModule } from '@angular/material/core';\n\n/** Injection token to be used to override the default options for `mat-progress-bar`. */\nconst MAT_PROGRESS_BAR_DEFAULT_OPTIONS = new InjectionToken('MAT_PROGRESS_BAR_DEFAULT_OPTIONS');\n/**\n * Injection token used to provide the current location to `MatProgressBar`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nconst MAT_PROGRESS_BAR_LOCATION = new InjectionToken('mat-progress-bar-location', { providedIn: 'root', factory: MAT_PROGRESS_BAR_LOCATION_FACTORY });\n/** @docs-private */\nfunction MAT_PROGRESS_BAR_LOCATION_FACTORY() {\n    const _document = inject(DOCUMENT);\n    const _location = _document ? _document.location : null;\n    return {\n        // Note that this needs to be a function, rather than a property, because Angular\n        // will only resolve it once, but we want the current path on each call.\n        getPathname: () => (_location ? _location.pathname + _location.search : ''),\n    };\n}\nclass MatProgressBar {\n    _elementRef = inject(ElementRef);\n    _ngZone = inject(NgZone);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _renderer = inject(Renderer2);\n    _cleanupTransitionEnd;\n    _animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });\n    constructor() {\n        const defaults = inject(MAT_PROGRESS_BAR_DEFAULT_OPTIONS, {\n            optional: true,\n        });\n        this._isNoopAnimation = this._animationMode === 'NoopAnimations';\n        if (defaults) {\n            if (defaults.color) {\n                this.color = this._defaultColor = defaults.color;\n            }\n            this.mode = defaults.mode || this.mode;\n        }\n    }\n    /** Flag that indicates whether NoopAnimations mode is set to true. */\n    _isNoopAnimation = false;\n    // TODO: should be typed as `ThemePalette` but internal apps pass in arbitrary strings.\n    /**\n     * Theme color of the progress bar. This API is supported in M2 themes only, it\n     * has no effect in M3 themes.\n     *\n     * For information on applying color variants in M3, see\n     * https://material.angular.io/guide/theming#using-component-color-variants.\n     */\n    get color() {\n        return this._color || this._defaultColor;\n    }\n    set color(value) {\n        this._color = value;\n    }\n    _color;\n    _defaultColor = 'primary';\n    /** Value of the progress bar. Defaults to zero. Mirrored to aria-valuenow. */\n    get value() {\n        return this._value;\n    }\n    set value(v) {\n        this._value = clamp(v || 0);\n        this._changeDetectorRef.markForCheck();\n    }\n    _value = 0;\n    /** Buffer value of the progress bar. Defaults to zero. */\n    get bufferValue() {\n        return this._bufferValue || 0;\n    }\n    set bufferValue(v) {\n        this._bufferValue = clamp(v || 0);\n        this._changeDetectorRef.markForCheck();\n    }\n    _bufferValue = 0;\n    /**\n     * Event emitted when animation of the primary progress bar completes. This event will not\n     * be emitted when animations are disabled, nor will it be emitted for modes with continuous\n     * animations (indeterminate and query).\n     */\n    animationEnd = new EventEmitter();\n    /**\n     * Mode of the progress bar.\n     *\n     * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to\n     * 'determinate'.\n     * Mirrored to mode attribute.\n     */\n    get mode() {\n        return this._mode;\n    }\n    set mode(value) {\n        // Note that we don't technically need a getter and a setter here,\n        // but we use it to match the behavior of the existing mat-progress-bar.\n        this._mode = value;\n        this._changeDetectorRef.markForCheck();\n    }\n    _mode = 'determinate';\n    ngAfterViewInit() {\n        // Run outside angular so change detection didn't get triggered on every transition end\n        // instead only on the animation that we care about (primary value bar's transitionend)\n        this._ngZone.runOutsideAngular(() => {\n            this._cleanupTransitionEnd = this._renderer.listen(this._elementRef.nativeElement, 'transitionend', this._transitionendHandler);\n        });\n    }\n    ngOnDestroy() {\n        this._cleanupTransitionEnd?.();\n    }\n    /** Gets the transform style that should be applied to the primary bar. */\n    _getPrimaryBarTransform() {\n        return `scaleX(${this._isIndeterminate() ? 1 : this.value / 100})`;\n    }\n    /** Gets the `flex-basis` value that should be applied to the buffer bar. */\n    _getBufferBarFlexBasis() {\n        return `${this.mode === 'buffer' ? this.bufferValue : 100}%`;\n    }\n    /** Returns whether the progress bar is indeterminate. */\n    _isIndeterminate() {\n        return this.mode === 'indeterminate' || this.mode === 'query';\n    }\n    /** Event handler for `transitionend` events. */\n    _transitionendHandler = (event) => {\n        if (this.animationEnd.observers.length === 0 ||\n            !event.target ||\n            !event.target.classList.contains('mdc-linear-progress__primary-bar')) {\n            return;\n        }\n        if (this.mode === 'determinate' || this.mode === 'buffer') {\n            this._ngZone.run(() => this.animationEnd.next({ value: this.value }));\n        }\n    };\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatProgressBar, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"19.0.0\", type: MatProgressBar, isStandalone: true, selector: \"mat-progress-bar\", inputs: { color: \"color\", value: [\"value\", \"value\", numberAttribute], bufferValue: [\"bufferValue\", \"bufferValue\", numberAttribute], mode: \"mode\" }, outputs: { animationEnd: \"animationEnd\" }, host: { attributes: { \"role\": \"progressbar\", \"aria-valuemin\": \"0\", \"aria-valuemax\": \"100\", \"tabindex\": \"-1\" }, properties: { \"attr.aria-valuenow\": \"_isIndeterminate() ? null : value\", \"attr.mode\": \"mode\", \"class\": \"\\\"mat-\\\" + color\", \"class._mat-animation-noopable\": \"_isNoopAnimation\", \"class.mdc-linear-progress--animation-ready\": \"!_isNoopAnimation\", \"class.mdc-linear-progress--indeterminate\": \"_isIndeterminate()\" }, classAttribute: \"mat-mdc-progress-bar mdc-linear-progress\" }, exportAs: [\"matProgressBar\"], ngImport: i0, template: \"<!--\\n  All children need to be hidden for screen readers in order to support ChromeVox.\\n  More context in the issue: https://github.com/angular/components/issues/22165.\\n-->\\n<div class=\\\"mdc-linear-progress__buffer\\\" aria-hidden=\\\"true\\\">\\n  <div\\n    class=\\\"mdc-linear-progress__buffer-bar\\\"\\n    [style.flex-basis]=\\\"_getBufferBarFlexBasis()\\\"></div>\\n  <!-- Remove the dots outside of buffer mode since they can cause CSP issues (see #28938) -->\\n  @if (mode === 'buffer') {\\n    <div class=\\\"mdc-linear-progress__buffer-dots\\\"></div>\\n  }\\n</div>\\n<div\\n  class=\\\"mdc-linear-progress__bar mdc-linear-progress__primary-bar\\\"\\n  aria-hidden=\\\"true\\\"\\n  [style.transform]=\\\"_getPrimaryBarTransform()\\\">\\n  <span class=\\\"mdc-linear-progress__bar-inner\\\"></span>\\n</div>\\n<div class=\\\"mdc-linear-progress__bar mdc-linear-progress__secondary-bar\\\" aria-hidden=\\\"true\\\">\\n  <span class=\\\"mdc-linear-progress__bar-inner\\\"></span>\\n</div>\\n\", styles: [\".mat-mdc-progress-bar{display:block;text-align:start}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow-x:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:max(var(--mdc-linear-progress-track-height, 4px),var(--mdc-linear-progress-active-indicator-height, 4px))}@media(forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;top:0;bottom:0;margin:auto 0;width:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:var(--mdc-linear-progress-active-indicator-height, 4px)}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}[dir=rtl] .mdc-linear-progress__bar{right:0;transform-origin:center right}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid;border-color:var(--mdc-linear-progress-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mdc-linear-progress-active-indicator-height, 4px)}.mdc-linear-progress__buffer{display:flex;position:absolute;top:0;bottom:0;margin:auto 0;width:100%;overflow:hidden;height:var(--mdc-linear-progress-track-height, 4px);border-radius:var(--mdc-linear-progress-track-shape, var(--mat-sys-corner-none))}.mdc-linear-progress__buffer-dots{-webkit-mask-image:url(\\\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\\\");mask-image:url(\\\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\\\");background-repeat:repeat-x;flex:auto;transform:rotate(180deg);animation:mdc-linear-progress-buffering 250ms infinite linear;background-color:var(--mdc-linear-progress-track-color, var(--mat-sys-surface-variant))}@media(forced-colors: active){.mdc-linear-progress__buffer-dots{background-color:ButtonBorder}}[dir=rtl] .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);background-color:var(--mdc-linear-progress-track-color, var(--mat-sys-surface-variant))}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(calc(var(--mdc-linear-progress-track-height, 4px) * -2.5))}}@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(-83.67142%)}100%{transform:translateX(-200.611057%)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(-37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(-84.386165%)}100%{transform:translateX(-160.277782%)}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatProgressBar, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-progress-bar', exportAs: 'matProgressBar', host: {\n                        'role': 'progressbar',\n                        'aria-valuemin': '0',\n                        'aria-valuemax': '100',\n                        // set tab index to -1 so screen readers will read the aria-label\n                        // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n                        'tabindex': '-1',\n                        '[attr.aria-valuenow]': '_isIndeterminate() ? null : value',\n                        '[attr.mode]': 'mode',\n                        'class': 'mat-mdc-progress-bar mdc-linear-progress',\n                        '[class]': '\"mat-\" + color',\n                        '[class._mat-animation-noopable]': '_isNoopAnimation',\n                        '[class.mdc-linear-progress--animation-ready]': '!_isNoopAnimation',\n                        '[class.mdc-linear-progress--indeterminate]': '_isIndeterminate()',\n                    }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: \"<!--\\n  All children need to be hidden for screen readers in order to support ChromeVox.\\n  More context in the issue: https://github.com/angular/components/issues/22165.\\n-->\\n<div class=\\\"mdc-linear-progress__buffer\\\" aria-hidden=\\\"true\\\">\\n  <div\\n    class=\\\"mdc-linear-progress__buffer-bar\\\"\\n    [style.flex-basis]=\\\"_getBufferBarFlexBasis()\\\"></div>\\n  <!-- Remove the dots outside of buffer mode since they can cause CSP issues (see #28938) -->\\n  @if (mode === 'buffer') {\\n    <div class=\\\"mdc-linear-progress__buffer-dots\\\"></div>\\n  }\\n</div>\\n<div\\n  class=\\\"mdc-linear-progress__bar mdc-linear-progress__primary-bar\\\"\\n  aria-hidden=\\\"true\\\"\\n  [style.transform]=\\\"_getPrimaryBarTransform()\\\">\\n  <span class=\\\"mdc-linear-progress__bar-inner\\\"></span>\\n</div>\\n<div class=\\\"mdc-linear-progress__bar mdc-linear-progress__secondary-bar\\\" aria-hidden=\\\"true\\\">\\n  <span class=\\\"mdc-linear-progress__bar-inner\\\"></span>\\n</div>\\n\", styles: [\".mat-mdc-progress-bar{display:block;text-align:start}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow-x:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:max(var(--mdc-linear-progress-track-height, 4px),var(--mdc-linear-progress-active-indicator-height, 4px))}@media(forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;top:0;bottom:0;margin:auto 0;width:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);height:var(--mdc-linear-progress-active-indicator-height, 4px)}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}[dir=rtl] .mdc-linear-progress__bar{right:0;transform-origin:center right}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid;border-color:var(--mdc-linear-progress-active-indicator-color, var(--mat-sys-primary));border-top-width:var(--mdc-linear-progress-active-indicator-height, 4px)}.mdc-linear-progress__buffer{display:flex;position:absolute;top:0;bottom:0;margin:auto 0;width:100%;overflow:hidden;height:var(--mdc-linear-progress-track-height, 4px);border-radius:var(--mdc-linear-progress-track-shape, var(--mat-sys-corner-none))}.mdc-linear-progress__buffer-dots{-webkit-mask-image:url(\\\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\\\");mask-image:url(\\\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\\\");background-repeat:repeat-x;flex:auto;transform:rotate(180deg);animation:mdc-linear-progress-buffering 250ms infinite linear;background-color:var(--mdc-linear-progress-track-color, var(--mat-sys-surface-variant))}@media(forced-colors: active){.mdc-linear-progress__buffer-dots{background-color:ButtonBorder}}[dir=rtl] .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1);background-color:var(--mdc-linear-progress-track-color, var(--mat-sys-surface-variant))}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(calc(var(--mdc-linear-progress-track-height, 4px) * -2.5))}}@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(-83.67142%)}100%{transform:translateX(-200.611057%)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(-37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(-84.386165%)}100%{transform:translateX(-160.277782%)}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}\"] }]\n        }], ctorParameters: () => [], propDecorators: { color: [{\n                type: Input\n            }], value: [{\n                type: Input,\n                args: [{ transform: numberAttribute }]\n            }], bufferValue: [{\n                type: Input,\n                args: [{ transform: numberAttribute }]\n            }], animationEnd: [{\n                type: Output\n            }], mode: [{\n                type: Input\n            }] } });\n/** Clamps a value to be between two numbers, by default 0 and 100. */\nfunction clamp(v, min = 0, max = 100) {\n    return Math.max(min, Math.min(max, v));\n}\n\nclass MatProgressBarModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatProgressBarModule, imports: [MatProgressBar], exports: [MatProgressBar, MatCommonModule] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatProgressBarModule, imports: [MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatProgressBarModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [MatProgressBar],\n                    exports: [MatProgressBar, MatCommonModule],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_PROGRESS_BAR_DEFAULT_OPTIONS, MAT_PROGRESS_BAR_LOCATION, MAT_PROGRESS_BAR_LOCATION_FACTORY, MatProgressBar, MatProgressBarModule };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, inject, ElementRef, NgZone, ANIMATION_MODULE_TYPE, booleanAttribute, Directive, Input, Renderer2, numberAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { Platform } from '@angular/cdk/platform';\nimport { MatRippleLoader, _StructuralStylesLoader, MatCommonModule, MatRippleModule } from '@angular/material/core';\nimport { _CdkPrivateStyleLoader } from '@angular/cdk/private';\n\n/** Injection token that can be used to provide the default options the button component. */\nconst MAT_BUTTON_CONFIG = new InjectionToken('MAT_BUTTON_CONFIG');\n/** Shared host configuration for all buttons */\nconst MAT_BUTTON_HOST = {\n    '[attr.disabled]': '_getDisabledAttribute()',\n    '[attr.aria-disabled]': '_getAriaDisabled()',\n    '[class.mat-mdc-button-disabled]': 'disabled',\n    '[class.mat-mdc-button-disabled-interactive]': 'disabledInteractive',\n    '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n    // MDC automatically applies the primary theme color to the button, but we want to support\n    // an unthemed version. If color is undefined, apply a CSS class that makes it easy to\n    // select and style this \"theme\".\n    '[class.mat-unthemed]': '!color',\n    // Add a class that applies to all buttons. This makes it easier to target if somebody\n    // wants to target all Material buttons.\n    '[class.mat-mdc-button-base]': 'true',\n    '[class]': 'color ? \"mat-\" + color : \"\"',\n};\n/** List of classes to add to buttons instances based on host attribute selector. */\nconst HOST_SELECTOR_MDC_CLASS_PAIR = [\n    {\n        attribute: 'mat-button',\n        mdcClasses: ['mdc-button', 'mat-mdc-button'],\n    },\n    {\n        attribute: 'mat-flat-button',\n        mdcClasses: ['mdc-button', 'mdc-button--unelevated', 'mat-mdc-unelevated-button'],\n    },\n    {\n        attribute: 'mat-raised-button',\n        mdcClasses: ['mdc-button', 'mdc-button--raised', 'mat-mdc-raised-button'],\n    },\n    {\n        attribute: 'mat-stroked-button',\n        mdcClasses: ['mdc-button', 'mdc-button--outlined', 'mat-mdc-outlined-button'],\n    },\n    {\n        attribute: 'mat-fab',\n        mdcClasses: ['mdc-fab', 'mat-mdc-fab-base', 'mat-mdc-fab'],\n    },\n    {\n        attribute: 'mat-mini-fab',\n        mdcClasses: ['mdc-fab', 'mat-mdc-fab-base', 'mdc-fab--mini', 'mat-mdc-mini-fab'],\n    },\n    {\n        attribute: 'mat-icon-button',\n        mdcClasses: ['mdc-icon-button', 'mat-mdc-icon-button'],\n    },\n];\n/** Base class for all buttons.  */\nclass MatButtonBase {\n    _elementRef = inject(ElementRef);\n    _platform = inject(Platform);\n    _ngZone = inject(NgZone);\n    _animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });\n    _focusMonitor = inject(FocusMonitor);\n    /**\n     * Handles the lazy creation of the MatButton ripple.\n     * Used to improve initial load time of large applications.\n     */\n    _rippleLoader = inject(MatRippleLoader);\n    /** Whether this button is a FAB. Used to apply the correct class on the ripple. */\n    _isFab = false;\n    /**\n     * Theme color of the button. This API is supported in M2 themes only, it has\n     * no effect in M3 themes.\n     *\n     * For information on applying color variants in M3, see\n     * https://material.angular.io/guide/theming#using-component-color-variants.\n     */\n    color;\n    /** Whether the ripple effect is disabled or not. */\n    get disableRipple() {\n        return this._disableRipple;\n    }\n    set disableRipple(value) {\n        this._disableRipple = value;\n        this._updateRippleDisabled();\n    }\n    _disableRipple = false;\n    /** Whether the button is disabled. */\n    get disabled() {\n        return this._disabled;\n    }\n    set disabled(value) {\n        this._disabled = value;\n        this._updateRippleDisabled();\n    }\n    _disabled = false;\n    /** `aria-disabled` value of the button. */\n    ariaDisabled;\n    /**\n     * Natively disabled buttons prevent focus and any pointer events from reaching the button.\n     * In some scenarios this might not be desirable, because it can prevent users from finding out\n     * why the button is disabled (e.g. via tooltip).\n     *\n     * Enabling this input will change the button so that it is styled to be disabled and will be\n     * marked as `aria-disabled`, but it will allow the button to receive events and focus.\n     *\n     * Note that by enabling this, you need to set the `tabindex` yourself if the button isn't\n     * meant to be tabbable and you have to prevent the button action (e.g. form submissions).\n     */\n    disabledInteractive;\n    constructor() {\n        inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n        const config = inject(MAT_BUTTON_CONFIG, { optional: true });\n        const element = this._elementRef.nativeElement;\n        const classList = element.classList;\n        this.disabledInteractive = config?.disabledInteractive ?? false;\n        this.color = config?.color ?? null;\n        this._rippleLoader?.configureRipple(element, { className: 'mat-mdc-button-ripple' });\n        // For each of the variant selectors that is present in the button's host\n        // attributes, add the correct corresponding MDC classes.\n        for (const { attribute, mdcClasses } of HOST_SELECTOR_MDC_CLASS_PAIR) {\n            if (element.hasAttribute(attribute)) {\n                classList.add(...mdcClasses);\n            }\n        }\n    }\n    ngAfterViewInit() {\n        this._focusMonitor.monitor(this._elementRef, true);\n    }\n    ngOnDestroy() {\n        this._focusMonitor.stopMonitoring(this._elementRef);\n        this._rippleLoader?.destroyRipple(this._elementRef.nativeElement);\n    }\n    /** Focuses the button. */\n    focus(origin = 'program', options) {\n        if (origin) {\n            this._focusMonitor.focusVia(this._elementRef.nativeElement, origin, options);\n        }\n        else {\n            this._elementRef.nativeElement.focus(options);\n        }\n    }\n    _getAriaDisabled() {\n        if (this.ariaDisabled != null) {\n            return this.ariaDisabled;\n        }\n        return this.disabled && this.disabledInteractive ? true : null;\n    }\n    _getDisabledAttribute() {\n        return this.disabledInteractive || !this.disabled ? null : true;\n    }\n    _updateRippleDisabled() {\n        this._rippleLoader?.setDisabled(this._elementRef.nativeElement, this.disableRipple || this.disabled);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatButtonBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatButtonBase, isStandalone: true, inputs: { color: \"color\", disableRipple: [\"disableRipple\", \"disableRipple\", booleanAttribute], disabled: [\"disabled\", \"disabled\", booleanAttribute], ariaDisabled: [\"aria-disabled\", \"ariaDisabled\", booleanAttribute], disabledInteractive: [\"disabledInteractive\", \"disabledInteractive\", booleanAttribute] }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatButtonBase, decorators: [{\n            type: Directive\n        }], ctorParameters: () => [], propDecorators: { color: [{\n                type: Input\n            }], disableRipple: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], disabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], ariaDisabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute, alias: 'aria-disabled' }]\n            }], disabledInteractive: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }] } });\n/** Shared host configuration for buttons using the `<a>` tag. */\nconst MAT_ANCHOR_HOST = {\n    // Note that this is basically a noop on anchors,\n    // but it appears that some internal apps depend on it.\n    '[attr.disabled]': '_getDisabledAttribute()',\n    '[class.mat-mdc-button-disabled]': 'disabled',\n    '[class.mat-mdc-button-disabled-interactive]': 'disabledInteractive',\n    '[class._mat-animation-noopable]': '_animationMode === \"NoopAnimations\"',\n    // Note that we ignore the user-specified tabindex when it's disabled for\n    // consistency with the `mat-button` applied on native buttons where even\n    // though they have an index, they're not tabbable.\n    '[attr.tabindex]': 'disabled && !disabledInteractive ? -1 : tabIndex',\n    '[attr.aria-disabled]': '_getAriaDisabled()',\n    // MDC automatically applies the primary theme color to the button, but we want to support\n    // an unthemed version. If color is undefined, apply a CSS class that makes it easy to\n    // select and style this \"theme\".\n    '[class.mat-unthemed]': '!color',\n    // Add a class that applies to all buttons. This makes it easier to target if somebody\n    // wants to target all Material buttons.\n    '[class.mat-mdc-button-base]': 'true',\n    '[class]': 'color ? \"mat-\" + color : \"\"',\n};\n/**\n * Anchor button base.\n */\nclass MatAnchorBase extends MatButtonBase {\n    _renderer = inject(Renderer2);\n    _cleanupClick;\n    tabIndex;\n    ngOnInit() {\n        this._ngZone.runOutsideAngular(() => {\n            this._cleanupClick = this._renderer.listen(this._elementRef.nativeElement, 'click', this._haltDisabledEvents);\n        });\n    }\n    ngOnDestroy() {\n        super.ngOnDestroy();\n        this._cleanupClick?.();\n    }\n    _haltDisabledEvents = (event) => {\n        // A disabled button shouldn't apply any actions\n        if (this.disabled) {\n            event.preventDefault();\n            event.stopImmediatePropagation();\n        }\n    };\n    _getAriaDisabled() {\n        if (this.ariaDisabled != null) {\n            return this.ariaDisabled;\n        }\n        return this.disabled || null;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAnchorBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatAnchorBase, isStandalone: true, inputs: { tabIndex: [\"tabIndex\", \"tabIndex\", (value) => {\n                    return value == null ? undefined : numberAttribute(value);\n                }] }, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAnchorBase, decorators: [{\n            type: Directive\n        }], propDecorators: { tabIndex: [{\n                type: Input,\n                args: [{\n                        transform: (value) => {\n                            return value == null ? undefined : numberAttribute(value);\n                        },\n                    }]\n            }] } });\n\n/**\n * Material Design button component. Users interact with a button to perform an action.\n * See https://material.io/components/buttons\n *\n * The `MatButton` class applies to native button elements and captures the appearances for\n * \"text button\", \"outlined button\", and \"contained button\" per the Material Design\n * specification. `MatButton` additionally captures an additional \"flat\" appearance, which matches\n * \"contained\" but without elevation.\n */\nclass MatButton extends MatButtonBase {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatButton, deps: null, target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatButton, isStandalone: true, selector: \"\\n    button[mat-button], button[mat-raised-button], button[mat-flat-button],\\n    button[mat-stroked-button]\\n  \", host: { properties: { \"attr.disabled\": \"_getDisabledAttribute()\", \"attr.aria-disabled\": \"_getAriaDisabled()\", \"class.mat-mdc-button-disabled\": \"disabled\", \"class.mat-mdc-button-disabled-interactive\": \"disabledInteractive\", \"class._mat-animation-noopable\": \"_animationMode === \\\"NoopAnimations\\\"\", \"class.mat-unthemed\": \"!color\", \"class.mat-mdc-button-base\": \"true\", \"class\": \"color ? \\\"mat-\\\" + color : \\\"\\\"\" } }, exportAs: [\"matButton\"], usesInheritance: true, ngImport: i0, template: \"<span\\n    class=\\\"mat-mdc-button-persistent-ripple\\\"\\n    [class.mdc-button__ripple]=\\\"!_isFab\\\"\\n    [class.mdc-fab__ripple]=\\\"_isFab\\\"></span>\\n\\n<ng-content select=\\\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\\\">\\n</ng-content>\\n\\n<span class=\\\"mdc-button__label\\\"><ng-content></ng-content></span>\\n\\n<ng-content select=\\\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\\\">\\n</ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 12px);height:var(--mdc-text-button-container-height, 40px);font-family:var(--mdc-text-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-text-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-text-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display, block)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-filled-button-container-height, 40px);font-family:var(--mdc-filled-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-filled-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-filled-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-filled-button-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display, block)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, var(--mat-sys-on-primary));background-color:var(--mdc-filled-button-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-filled-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mdc-protected-button-container-elevation-shadow, var(--mat-sys-level1));height:var(--mdc-protected-button-container-height, 40px);font-family:var(--mdc-protected-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-protected-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-protected-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-protected-button-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display, block)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, var(--mat-sys-primary));background-color:var(--mdc-protected-button-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow, var(--mat-sys-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-protected-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-outlined-button-container-height, 40px);font-family:var(--mdc-outlined-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-outlined-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-outlined-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mdc-outlined-button-container-shape, var(--mat-sys-corner-full));border-width:var(--mdc-outlined-button-outline-width, 1px);padding:0 var(--mat-outlined-button-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display, block)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, var(--mat-sys-primary));border-color:var(--mdc-outlined-button-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mdc-outlined-button-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width, 1px);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-focus-indicator::before,.mat-mdc-raised-button:focus .mat-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}\", \"@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-icon-button.mat-mdc-icon-button{outline:solid 1px}}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatButton, decorators: [{\n            type: Component,\n            args: [{ selector: `\n    button[mat-button], button[mat-raised-button], button[mat-flat-button],\n    button[mat-stroked-button]\n  `, host: MAT_BUTTON_HOST, exportAs: 'matButton', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<span\\n    class=\\\"mat-mdc-button-persistent-ripple\\\"\\n    [class.mdc-button__ripple]=\\\"!_isFab\\\"\\n    [class.mdc-fab__ripple]=\\\"_isFab\\\"></span>\\n\\n<ng-content select=\\\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\\\">\\n</ng-content>\\n\\n<span class=\\\"mdc-button__label\\\"><ng-content></ng-content></span>\\n\\n<ng-content select=\\\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\\\">\\n</ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 12px);height:var(--mdc-text-button-container-height, 40px);font-family:var(--mdc-text-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-text-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-text-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display, block)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-filled-button-container-height, 40px);font-family:var(--mdc-filled-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-filled-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-filled-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-filled-button-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display, block)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, var(--mat-sys-on-primary));background-color:var(--mdc-filled-button-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-filled-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mdc-protected-button-container-elevation-shadow, var(--mat-sys-level1));height:var(--mdc-protected-button-container-height, 40px);font-family:var(--mdc-protected-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-protected-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-protected-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-protected-button-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display, block)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, var(--mat-sys-primary));background-color:var(--mdc-protected-button-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow, var(--mat-sys-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-protected-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-outlined-button-container-height, 40px);font-family:var(--mdc-outlined-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-outlined-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-outlined-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mdc-outlined-button-container-shape, var(--mat-sys-corner-full));border-width:var(--mdc-outlined-button-outline-width, 1px);padding:0 var(--mat-outlined-button-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display, block)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, var(--mat-sys-primary));border-color:var(--mdc-outlined-button-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mdc-outlined-button-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width, 1px);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-focus-indicator::before,.mat-mdc-raised-button:focus .mat-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}\", \"@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-icon-button.mat-mdc-icon-button{outline:solid 1px}}\"] }]\n        }] });\n/**\n * Material Design button component for anchor elements. Anchor elements are used to provide\n * links for the user to navigate across different routes or pages.\n * See https://material.io/components/buttons\n *\n * The `MatAnchor` class applies to native anchor elements and captures the appearances for\n * \"text button\", \"outlined button\", and \"contained button\" per the Material Design\n * specification. `MatAnchor` additionally captures an additional \"flat\" appearance, which matches\n * \"contained\" but without elevation.\n */\nclass MatAnchor extends MatAnchorBase {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAnchor, deps: null, target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatAnchor, isStandalone: true, selector: \"a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]\", host: { properties: { \"attr.disabled\": \"_getDisabledAttribute()\", \"class.mat-mdc-button-disabled\": \"disabled\", \"class.mat-mdc-button-disabled-interactive\": \"disabledInteractive\", \"class._mat-animation-noopable\": \"_animationMode === \\\"NoopAnimations\\\"\", \"attr.tabindex\": \"disabled && !disabledInteractive ? -1 : tabIndex\", \"attr.aria-disabled\": \"_getAriaDisabled()\", \"class.mat-unthemed\": \"!color\", \"class.mat-mdc-button-base\": \"true\", \"class\": \"color ? \\\"mat-\\\" + color : \\\"\\\"\" } }, exportAs: [\"matButton\", \"matAnchor\"], usesInheritance: true, ngImport: i0, template: \"<span\\n    class=\\\"mat-mdc-button-persistent-ripple\\\"\\n    [class.mdc-button__ripple]=\\\"!_isFab\\\"\\n    [class.mdc-fab__ripple]=\\\"_isFab\\\"></span>\\n\\n<ng-content select=\\\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\\\">\\n</ng-content>\\n\\n<span class=\\\"mdc-button__label\\\"><ng-content></ng-content></span>\\n\\n<ng-content select=\\\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\\\">\\n</ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 12px);height:var(--mdc-text-button-container-height, 40px);font-family:var(--mdc-text-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-text-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-text-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display, block)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-filled-button-container-height, 40px);font-family:var(--mdc-filled-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-filled-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-filled-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-filled-button-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display, block)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, var(--mat-sys-on-primary));background-color:var(--mdc-filled-button-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-filled-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mdc-protected-button-container-elevation-shadow, var(--mat-sys-level1));height:var(--mdc-protected-button-container-height, 40px);font-family:var(--mdc-protected-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-protected-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-protected-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-protected-button-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display, block)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, var(--mat-sys-primary));background-color:var(--mdc-protected-button-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow, var(--mat-sys-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-protected-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-outlined-button-container-height, 40px);font-family:var(--mdc-outlined-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-outlined-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-outlined-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mdc-outlined-button-container-shape, var(--mat-sys-corner-full));border-width:var(--mdc-outlined-button-outline-width, 1px);padding:0 var(--mat-outlined-button-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display, block)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, var(--mat-sys-primary));border-color:var(--mdc-outlined-button-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mdc-outlined-button-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width, 1px);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-focus-indicator::before,.mat-mdc-raised-button:focus .mat-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}\", \"@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-icon-button.mat-mdc-icon-button{outline:solid 1px}}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAnchor, decorators: [{\n            type: Component,\n            args: [{ selector: `a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]`, exportAs: 'matButton, matAnchor', host: MAT_ANCHOR_HOST, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<span\\n    class=\\\"mat-mdc-button-persistent-ripple\\\"\\n    [class.mdc-button__ripple]=\\\"!_isFab\\\"\\n    [class.mdc-fab__ripple]=\\\"_isFab\\\"></span>\\n\\n<ng-content select=\\\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\\\">\\n</ng-content>\\n\\n<span class=\\\"mdc-button__label\\\"><ng-content></ng-content></span>\\n\\n<ng-content select=\\\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\\\">\\n</ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 12px);height:var(--mdc-text-button-container-height, 40px);font-family:var(--mdc-text-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-text-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-text-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display, block)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-filled-button-container-height, 40px);font-family:var(--mdc-filled-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-filled-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-filled-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-filled-button-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display, block)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, var(--mat-sys-on-primary));background-color:var(--mdc-filled-button-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-filled-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mdc-protected-button-container-elevation-shadow, var(--mat-sys-level1));height:var(--mdc-protected-button-container-height, 40px);font-family:var(--mdc-protected-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-protected-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-protected-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-protected-button-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display, block)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, var(--mat-sys-primary));background-color:var(--mdc-protected-button-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow, var(--mat-sys-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-protected-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-outlined-button-container-height, 40px);font-family:var(--mdc-outlined-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-outlined-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-outlined-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mdc-outlined-button-container-shape, var(--mat-sys-corner-full));border-width:var(--mdc-outlined-button-outline-width, 1px);padding:0 var(--mat-outlined-button-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display, block)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, var(--mat-sys-primary));border-color:var(--mdc-outlined-button-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mdc-outlined-button-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width, 1px);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-focus-indicator::before,.mat-mdc-raised-button:focus .mat-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}\", \"@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-icon-button.mat-mdc-icon-button{outline:solid 1px}}\"] }]\n        }] });\n\n/** Injection token to be used to override the default options for FAB. */\nconst MAT_FAB_DEFAULT_OPTIONS = new InjectionToken('mat-mdc-fab-default-options', {\n    providedIn: 'root',\n    factory: MAT_FAB_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_FAB_DEFAULT_OPTIONS_FACTORY() {\n    return {\n        // The FAB by default has its color set to accent.\n        color: 'accent',\n    };\n}\n// Default FAB configuration.\nconst defaults = MAT_FAB_DEFAULT_OPTIONS_FACTORY();\n/**\n * Material Design floating action button (FAB) component. These buttons represent the primary\n * or most common action for users to interact with.\n * See https://material.io/components/buttons-floating-action-button/\n *\n * The `MatFabButton` class has two appearances: normal and extended.\n */\nclass MatFabButton extends MatButtonBase {\n    _options = inject(MAT_FAB_DEFAULT_OPTIONS, { optional: true });\n    _isFab = true;\n    extended;\n    constructor() {\n        super();\n        this._options = this._options || defaults;\n        this.color = this._options.color || defaults.color;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFabButton, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatFabButton, isStandalone: true, selector: \"button[mat-fab]\", inputs: { extended: [\"extended\", \"extended\", booleanAttribute] }, host: { properties: { \"attr.disabled\": \"_getDisabledAttribute()\", \"attr.aria-disabled\": \"_getAriaDisabled()\", \"class.mat-mdc-button-disabled\": \"disabled\", \"class.mat-mdc-button-disabled-interactive\": \"disabledInteractive\", \"class._mat-animation-noopable\": \"_animationMode === \\\"NoopAnimations\\\"\", \"class.mat-unthemed\": \"!color\", \"class.mat-mdc-button-base\": \"true\", \"class\": \"color ? \\\"mat-\\\" + color : \\\"\\\"\", \"class.mdc-fab--extended\": \"extended\", \"class.mat-mdc-extended-fab\": \"extended\" } }, exportAs: [\"matButton\"], usesInheritance: true, ngImport: i0, template: \"<span\\n    class=\\\"mat-mdc-button-persistent-ripple\\\"\\n    [class.mdc-button__ripple]=\\\"!_isFab\\\"\\n    [class.mdc-fab__ripple]=\\\"_isFab\\\"></span>\\n\\n<ng-content select=\\\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\\\">\\n</ng-content>\\n\\n<span class=\\\"mdc-button__label\\\"><ng-content></ng-content></span>\\n\\n<ng-content select=\\\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\\\">\\n</ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-fab-base{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1);flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-fab-base .mat-mdc-button-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-fab-base .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-fab-base .mdc-button__label,.mat-mdc-fab-base .mat-icon{z-index:1;position:relative}.mat-mdc-fab-base .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-fab-base:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-fab-base._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-fab-base::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}.mat-mdc-fab-base[hidden]{display:none}.mat-mdc-fab-base::-moz-focus-inner{padding:0;border:0}.mat-mdc-fab-base:active,.mat-mdc-fab-base:focus{outline:none}.mat-mdc-fab-base:hover{cursor:pointer}.mat-mdc-fab-base>svg{width:100%}.mat-mdc-fab-base .mat-icon,.mat-mdc-fab-base .material-icons{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mat-mdc-fab-base .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base[disabled]:focus,.mat-mdc-fab-base.mat-mdc-button-disabled,.mat-mdc-fab-base.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-fab-base.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab{background-color:var(--mdc-fab-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-container-shape, var(--mat-sys-corner-large));color:var(--mat-fab-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:hover{box-shadow:var(--mdc-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-fab:focus{box-shadow:var(--mdc-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:active,.mat-mdc-fab:focus:active{box-shadow:var(--mdc-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab[disabled],.mat-mdc-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-touch-target-display, block)}.mat-mdc-fab .mat-ripple-element{background-color:var(--mat-fab-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-disabled-state-layer-color)}.mat-mdc-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-mini-fab{width:40px;height:40px;background-color:var(--mdc-fab-small-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-small-container-shape, var(--mat-sys-corner-medium));color:var(--mat-fab-small-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-small-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:hover{box-shadow:var(--mdc-fab-small-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-mini-fab:focus{box-shadow:var(--mdc-fab-small-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:active,.mat-mdc-mini-fab:focus:active{box-shadow:var(--mdc-fab-small-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab[disabled],.mat-mdc-mini-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-small-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-small-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-mini-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-small-touch-target-display)}.mat-mdc-mini-fab .mat-ripple-element{background-color:var(--mat-fab-small-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-mini-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-disabled-state-layer-color)}.mat-mdc-mini-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-mini-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-mini-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-extended-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;line-height:normal;height:var(--mdc-extended-fab-container-height, 56px);border-radius:var(--mdc-extended-fab-container-shape, var(--mat-sys-corner-large));font-family:var(--mdc-extended-fab-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-extended-fab-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mdc-extended-fab-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mdc-extended-fab-label-text-tracking, var(--mat-sys-label-large-tracking));box-shadow:var(--mdc-extended-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:hover{box-shadow:var(--mdc-extended-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-extended-fab:focus{box-shadow:var(--mdc-extended-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:active,.mat-mdc-extended-fab:focus:active{box-shadow:var(--mdc-extended-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab[disabled]:focus,.mat-mdc-extended-fab.mat-mdc-button-disabled,.mat-mdc-extended-fab.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-extended-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.material-icons,.mat-mdc-extended-fab>.mat-icon,.mat-mdc-extended-fab>.material-icons{margin-left:-8px;margin-right:12px}.mat-mdc-extended-fab .mdc-button__label+.mat-icon,.mat-mdc-extended-fab .mdc-button__label+.material-icons,[dir=rtl] .mat-mdc-extended-fab>.mat-icon,[dir=rtl] .mat-mdc-extended-fab>.material-icons{margin-left:12px;margin-right:-8px}.mat-mdc-extended-fab .mat-mdc-button-touch-target{width:100%}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFabButton, decorators: [{\n            type: Component,\n            args: [{ selector: `button[mat-fab]`, host: {\n                        ...MAT_BUTTON_HOST,\n                        '[class.mdc-fab--extended]': 'extended',\n                        '[class.mat-mdc-extended-fab]': 'extended',\n                    }, exportAs: 'matButton', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<span\\n    class=\\\"mat-mdc-button-persistent-ripple\\\"\\n    [class.mdc-button__ripple]=\\\"!_isFab\\\"\\n    [class.mdc-fab__ripple]=\\\"_isFab\\\"></span>\\n\\n<ng-content select=\\\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\\\">\\n</ng-content>\\n\\n<span class=\\\"mdc-button__label\\\"><ng-content></ng-content></span>\\n\\n<ng-content select=\\\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\\\">\\n</ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-fab-base{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1);flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-fab-base .mat-mdc-button-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-fab-base .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-fab-base .mdc-button__label,.mat-mdc-fab-base .mat-icon{z-index:1;position:relative}.mat-mdc-fab-base .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-fab-base:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-fab-base._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-fab-base::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}.mat-mdc-fab-base[hidden]{display:none}.mat-mdc-fab-base::-moz-focus-inner{padding:0;border:0}.mat-mdc-fab-base:active,.mat-mdc-fab-base:focus{outline:none}.mat-mdc-fab-base:hover{cursor:pointer}.mat-mdc-fab-base>svg{width:100%}.mat-mdc-fab-base .mat-icon,.mat-mdc-fab-base .material-icons{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mat-mdc-fab-base .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base[disabled]:focus,.mat-mdc-fab-base.mat-mdc-button-disabled,.mat-mdc-fab-base.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-fab-base.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab{background-color:var(--mdc-fab-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-container-shape, var(--mat-sys-corner-large));color:var(--mat-fab-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:hover{box-shadow:var(--mdc-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-fab:focus{box-shadow:var(--mdc-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:active,.mat-mdc-fab:focus:active{box-shadow:var(--mdc-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab[disabled],.mat-mdc-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-touch-target-display, block)}.mat-mdc-fab .mat-ripple-element{background-color:var(--mat-fab-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-disabled-state-layer-color)}.mat-mdc-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-mini-fab{width:40px;height:40px;background-color:var(--mdc-fab-small-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-small-container-shape, var(--mat-sys-corner-medium));color:var(--mat-fab-small-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-small-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:hover{box-shadow:var(--mdc-fab-small-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-mini-fab:focus{box-shadow:var(--mdc-fab-small-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:active,.mat-mdc-mini-fab:focus:active{box-shadow:var(--mdc-fab-small-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab[disabled],.mat-mdc-mini-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-small-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-small-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-mini-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-small-touch-target-display)}.mat-mdc-mini-fab .mat-ripple-element{background-color:var(--mat-fab-small-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-mini-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-disabled-state-layer-color)}.mat-mdc-mini-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-mini-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-mini-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-extended-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;line-height:normal;height:var(--mdc-extended-fab-container-height, 56px);border-radius:var(--mdc-extended-fab-container-shape, var(--mat-sys-corner-large));font-family:var(--mdc-extended-fab-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-extended-fab-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mdc-extended-fab-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mdc-extended-fab-label-text-tracking, var(--mat-sys-label-large-tracking));box-shadow:var(--mdc-extended-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:hover{box-shadow:var(--mdc-extended-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-extended-fab:focus{box-shadow:var(--mdc-extended-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:active,.mat-mdc-extended-fab:focus:active{box-shadow:var(--mdc-extended-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab[disabled]:focus,.mat-mdc-extended-fab.mat-mdc-button-disabled,.mat-mdc-extended-fab.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-extended-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.material-icons,.mat-mdc-extended-fab>.mat-icon,.mat-mdc-extended-fab>.material-icons{margin-left:-8px;margin-right:12px}.mat-mdc-extended-fab .mdc-button__label+.mat-icon,.mat-mdc-extended-fab .mdc-button__label+.material-icons,[dir=rtl] .mat-mdc-extended-fab>.mat-icon,[dir=rtl] .mat-mdc-extended-fab>.material-icons{margin-left:12px;margin-right:-8px}.mat-mdc-extended-fab .mat-mdc-button-touch-target{width:100%}\"] }]\n        }], ctorParameters: () => [], propDecorators: { extended: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }] } });\n/**\n * Material Design mini floating action button (FAB) component. These buttons represent the primary\n * or most common action for users to interact with.\n * See https://material.io/components/buttons-floating-action-button/\n */\nclass MatMiniFabButton extends MatButtonBase {\n    _options = inject(MAT_FAB_DEFAULT_OPTIONS, { optional: true });\n    _isFab = true;\n    constructor() {\n        super();\n        this._options = this._options || defaults;\n        this.color = this._options.color || defaults.color;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatMiniFabButton, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatMiniFabButton, isStandalone: true, selector: \"button[mat-mini-fab]\", host: { properties: { \"attr.disabled\": \"_getDisabledAttribute()\", \"attr.aria-disabled\": \"_getAriaDisabled()\", \"class.mat-mdc-button-disabled\": \"disabled\", \"class.mat-mdc-button-disabled-interactive\": \"disabledInteractive\", \"class._mat-animation-noopable\": \"_animationMode === \\\"NoopAnimations\\\"\", \"class.mat-unthemed\": \"!color\", \"class.mat-mdc-button-base\": \"true\", \"class\": \"color ? \\\"mat-\\\" + color : \\\"\\\"\" } }, exportAs: [\"matButton\"], usesInheritance: true, ngImport: i0, template: \"<span\\n    class=\\\"mat-mdc-button-persistent-ripple\\\"\\n    [class.mdc-button__ripple]=\\\"!_isFab\\\"\\n    [class.mdc-fab__ripple]=\\\"_isFab\\\"></span>\\n\\n<ng-content select=\\\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\\\">\\n</ng-content>\\n\\n<span class=\\\"mdc-button__label\\\"><ng-content></ng-content></span>\\n\\n<ng-content select=\\\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\\\">\\n</ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-fab-base{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1);flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-fab-base .mat-mdc-button-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-fab-base .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-fab-base .mdc-button__label,.mat-mdc-fab-base .mat-icon{z-index:1;position:relative}.mat-mdc-fab-base .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-fab-base:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-fab-base._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-fab-base::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}.mat-mdc-fab-base[hidden]{display:none}.mat-mdc-fab-base::-moz-focus-inner{padding:0;border:0}.mat-mdc-fab-base:active,.mat-mdc-fab-base:focus{outline:none}.mat-mdc-fab-base:hover{cursor:pointer}.mat-mdc-fab-base>svg{width:100%}.mat-mdc-fab-base .mat-icon,.mat-mdc-fab-base .material-icons{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mat-mdc-fab-base .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base[disabled]:focus,.mat-mdc-fab-base.mat-mdc-button-disabled,.mat-mdc-fab-base.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-fab-base.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab{background-color:var(--mdc-fab-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-container-shape, var(--mat-sys-corner-large));color:var(--mat-fab-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:hover{box-shadow:var(--mdc-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-fab:focus{box-shadow:var(--mdc-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:active,.mat-mdc-fab:focus:active{box-shadow:var(--mdc-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab[disabled],.mat-mdc-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-touch-target-display, block)}.mat-mdc-fab .mat-ripple-element{background-color:var(--mat-fab-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-disabled-state-layer-color)}.mat-mdc-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-mini-fab{width:40px;height:40px;background-color:var(--mdc-fab-small-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-small-container-shape, var(--mat-sys-corner-medium));color:var(--mat-fab-small-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-small-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:hover{box-shadow:var(--mdc-fab-small-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-mini-fab:focus{box-shadow:var(--mdc-fab-small-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:active,.mat-mdc-mini-fab:focus:active{box-shadow:var(--mdc-fab-small-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab[disabled],.mat-mdc-mini-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-small-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-small-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-mini-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-small-touch-target-display)}.mat-mdc-mini-fab .mat-ripple-element{background-color:var(--mat-fab-small-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-mini-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-disabled-state-layer-color)}.mat-mdc-mini-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-mini-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-mini-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-extended-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;line-height:normal;height:var(--mdc-extended-fab-container-height, 56px);border-radius:var(--mdc-extended-fab-container-shape, var(--mat-sys-corner-large));font-family:var(--mdc-extended-fab-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-extended-fab-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mdc-extended-fab-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mdc-extended-fab-label-text-tracking, var(--mat-sys-label-large-tracking));box-shadow:var(--mdc-extended-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:hover{box-shadow:var(--mdc-extended-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-extended-fab:focus{box-shadow:var(--mdc-extended-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:active,.mat-mdc-extended-fab:focus:active{box-shadow:var(--mdc-extended-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab[disabled]:focus,.mat-mdc-extended-fab.mat-mdc-button-disabled,.mat-mdc-extended-fab.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-extended-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.material-icons,.mat-mdc-extended-fab>.mat-icon,.mat-mdc-extended-fab>.material-icons{margin-left:-8px;margin-right:12px}.mat-mdc-extended-fab .mdc-button__label+.mat-icon,.mat-mdc-extended-fab .mdc-button__label+.material-icons,[dir=rtl] .mat-mdc-extended-fab>.mat-icon,[dir=rtl] .mat-mdc-extended-fab>.material-icons{margin-left:12px;margin-right:-8px}.mat-mdc-extended-fab .mat-mdc-button-touch-target{width:100%}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatMiniFabButton, decorators: [{\n            type: Component,\n            args: [{ selector: `button[mat-mini-fab]`, host: MAT_BUTTON_HOST, exportAs: 'matButton', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<span\\n    class=\\\"mat-mdc-button-persistent-ripple\\\"\\n    [class.mdc-button__ripple]=\\\"!_isFab\\\"\\n    [class.mdc-fab__ripple]=\\\"_isFab\\\"></span>\\n\\n<ng-content select=\\\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\\\">\\n</ng-content>\\n\\n<span class=\\\"mdc-button__label\\\"><ng-content></ng-content></span>\\n\\n<ng-content select=\\\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\\\">\\n</ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-fab-base{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1);flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-fab-base .mat-mdc-button-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-fab-base .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-fab-base .mdc-button__label,.mat-mdc-fab-base .mat-icon{z-index:1;position:relative}.mat-mdc-fab-base .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-fab-base:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-fab-base._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-fab-base::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}.mat-mdc-fab-base[hidden]{display:none}.mat-mdc-fab-base::-moz-focus-inner{padding:0;border:0}.mat-mdc-fab-base:active,.mat-mdc-fab-base:focus{outline:none}.mat-mdc-fab-base:hover{cursor:pointer}.mat-mdc-fab-base>svg{width:100%}.mat-mdc-fab-base .mat-icon,.mat-mdc-fab-base .material-icons{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mat-mdc-fab-base .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base[disabled]:focus,.mat-mdc-fab-base.mat-mdc-button-disabled,.mat-mdc-fab-base.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-fab-base.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab{background-color:var(--mdc-fab-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-container-shape, var(--mat-sys-corner-large));color:var(--mat-fab-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:hover{box-shadow:var(--mdc-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-fab:focus{box-shadow:var(--mdc-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:active,.mat-mdc-fab:focus:active{box-shadow:var(--mdc-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab[disabled],.mat-mdc-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-touch-target-display, block)}.mat-mdc-fab .mat-ripple-element{background-color:var(--mat-fab-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-disabled-state-layer-color)}.mat-mdc-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-mini-fab{width:40px;height:40px;background-color:var(--mdc-fab-small-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-small-container-shape, var(--mat-sys-corner-medium));color:var(--mat-fab-small-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-small-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:hover{box-shadow:var(--mdc-fab-small-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-mini-fab:focus{box-shadow:var(--mdc-fab-small-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:active,.mat-mdc-mini-fab:focus:active{box-shadow:var(--mdc-fab-small-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab[disabled],.mat-mdc-mini-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-small-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-small-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-mini-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-small-touch-target-display)}.mat-mdc-mini-fab .mat-ripple-element{background-color:var(--mat-fab-small-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-mini-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-disabled-state-layer-color)}.mat-mdc-mini-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-mini-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-mini-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-extended-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;line-height:normal;height:var(--mdc-extended-fab-container-height, 56px);border-radius:var(--mdc-extended-fab-container-shape, var(--mat-sys-corner-large));font-family:var(--mdc-extended-fab-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-extended-fab-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mdc-extended-fab-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mdc-extended-fab-label-text-tracking, var(--mat-sys-label-large-tracking));box-shadow:var(--mdc-extended-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:hover{box-shadow:var(--mdc-extended-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-extended-fab:focus{box-shadow:var(--mdc-extended-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:active,.mat-mdc-extended-fab:focus:active{box-shadow:var(--mdc-extended-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab[disabled]:focus,.mat-mdc-extended-fab.mat-mdc-button-disabled,.mat-mdc-extended-fab.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-extended-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.material-icons,.mat-mdc-extended-fab>.mat-icon,.mat-mdc-extended-fab>.material-icons{margin-left:-8px;margin-right:12px}.mat-mdc-extended-fab .mdc-button__label+.mat-icon,.mat-mdc-extended-fab .mdc-button__label+.material-icons,[dir=rtl] .mat-mdc-extended-fab>.mat-icon,[dir=rtl] .mat-mdc-extended-fab>.material-icons{margin-left:12px;margin-right:-8px}.mat-mdc-extended-fab .mat-mdc-button-touch-target{width:100%}\"] }]\n        }], ctorParameters: () => [] });\n/**\n * Material Design floating action button (FAB) component for anchor elements. Anchor elements\n * are used to provide links for the user to navigate across different routes or pages.\n * See https://material.io/components/buttons-floating-action-button/\n *\n * The `MatFabAnchor` class has two appearances: normal and extended.\n */\nclass MatFabAnchor extends MatAnchor {\n    _options = inject(MAT_FAB_DEFAULT_OPTIONS, { optional: true });\n    _isFab = true;\n    extended;\n    constructor() {\n        super();\n        this._options = this._options || defaults;\n        this.color = this._options.color || defaults.color;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFabAnchor, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatFabAnchor, isStandalone: true, selector: \"a[mat-fab]\", inputs: { extended: [\"extended\", \"extended\", booleanAttribute] }, host: { properties: { \"attr.disabled\": \"_getDisabledAttribute()\", \"class.mat-mdc-button-disabled\": \"disabled\", \"class.mat-mdc-button-disabled-interactive\": \"disabledInteractive\", \"class._mat-animation-noopable\": \"_animationMode === \\\"NoopAnimations\\\"\", \"attr.tabindex\": \"disabled && !disabledInteractive ? -1 : tabIndex\", \"attr.aria-disabled\": \"_getAriaDisabled()\", \"class.mat-unthemed\": \"!color\", \"class.mat-mdc-button-base\": \"true\", \"class\": \"color ? \\\"mat-\\\" + color : \\\"\\\"\", \"class.mdc-fab--extended\": \"extended\", \"class.mat-mdc-extended-fab\": \"extended\" } }, exportAs: [\"matButton\", \"matAnchor\"], usesInheritance: true, ngImport: i0, template: \"<span\\n    class=\\\"mat-mdc-button-persistent-ripple\\\"\\n    [class.mdc-button__ripple]=\\\"!_isFab\\\"\\n    [class.mdc-fab__ripple]=\\\"_isFab\\\"></span>\\n\\n<ng-content select=\\\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\\\">\\n</ng-content>\\n\\n<span class=\\\"mdc-button__label\\\"><ng-content></ng-content></span>\\n\\n<ng-content select=\\\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\\\">\\n</ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-fab-base{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1);flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-fab-base .mat-mdc-button-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-fab-base .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-fab-base .mdc-button__label,.mat-mdc-fab-base .mat-icon{z-index:1;position:relative}.mat-mdc-fab-base .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-fab-base:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-fab-base._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-fab-base::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}.mat-mdc-fab-base[hidden]{display:none}.mat-mdc-fab-base::-moz-focus-inner{padding:0;border:0}.mat-mdc-fab-base:active,.mat-mdc-fab-base:focus{outline:none}.mat-mdc-fab-base:hover{cursor:pointer}.mat-mdc-fab-base>svg{width:100%}.mat-mdc-fab-base .mat-icon,.mat-mdc-fab-base .material-icons{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mat-mdc-fab-base .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base[disabled]:focus,.mat-mdc-fab-base.mat-mdc-button-disabled,.mat-mdc-fab-base.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-fab-base.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab{background-color:var(--mdc-fab-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-container-shape, var(--mat-sys-corner-large));color:var(--mat-fab-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:hover{box-shadow:var(--mdc-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-fab:focus{box-shadow:var(--mdc-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:active,.mat-mdc-fab:focus:active{box-shadow:var(--mdc-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab[disabled],.mat-mdc-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-touch-target-display, block)}.mat-mdc-fab .mat-ripple-element{background-color:var(--mat-fab-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-disabled-state-layer-color)}.mat-mdc-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-mini-fab{width:40px;height:40px;background-color:var(--mdc-fab-small-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-small-container-shape, var(--mat-sys-corner-medium));color:var(--mat-fab-small-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-small-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:hover{box-shadow:var(--mdc-fab-small-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-mini-fab:focus{box-shadow:var(--mdc-fab-small-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:active,.mat-mdc-mini-fab:focus:active{box-shadow:var(--mdc-fab-small-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab[disabled],.mat-mdc-mini-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-small-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-small-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-mini-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-small-touch-target-display)}.mat-mdc-mini-fab .mat-ripple-element{background-color:var(--mat-fab-small-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-mini-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-disabled-state-layer-color)}.mat-mdc-mini-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-mini-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-mini-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-extended-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;line-height:normal;height:var(--mdc-extended-fab-container-height, 56px);border-radius:var(--mdc-extended-fab-container-shape, var(--mat-sys-corner-large));font-family:var(--mdc-extended-fab-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-extended-fab-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mdc-extended-fab-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mdc-extended-fab-label-text-tracking, var(--mat-sys-label-large-tracking));box-shadow:var(--mdc-extended-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:hover{box-shadow:var(--mdc-extended-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-extended-fab:focus{box-shadow:var(--mdc-extended-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:active,.mat-mdc-extended-fab:focus:active{box-shadow:var(--mdc-extended-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab[disabled]:focus,.mat-mdc-extended-fab.mat-mdc-button-disabled,.mat-mdc-extended-fab.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-extended-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.material-icons,.mat-mdc-extended-fab>.mat-icon,.mat-mdc-extended-fab>.material-icons{margin-left:-8px;margin-right:12px}.mat-mdc-extended-fab .mdc-button__label+.mat-icon,.mat-mdc-extended-fab .mdc-button__label+.material-icons,[dir=rtl] .mat-mdc-extended-fab>.mat-icon,[dir=rtl] .mat-mdc-extended-fab>.material-icons{margin-left:12px;margin-right:-8px}.mat-mdc-extended-fab .mat-mdc-button-touch-target{width:100%}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFabAnchor, decorators: [{\n            type: Component,\n            args: [{ selector: `a[mat-fab]`, host: {\n                        ...MAT_ANCHOR_HOST,\n                        '[class.mdc-fab--extended]': 'extended',\n                        '[class.mat-mdc-extended-fab]': 'extended',\n                    }, exportAs: 'matButton, matAnchor', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<span\\n    class=\\\"mat-mdc-button-persistent-ripple\\\"\\n    [class.mdc-button__ripple]=\\\"!_isFab\\\"\\n    [class.mdc-fab__ripple]=\\\"_isFab\\\"></span>\\n\\n<ng-content select=\\\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\\\">\\n</ng-content>\\n\\n<span class=\\\"mdc-button__label\\\"><ng-content></ng-content></span>\\n\\n<ng-content select=\\\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\\\">\\n</ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-fab-base{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1);flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-fab-base .mat-mdc-button-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-fab-base .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-fab-base .mdc-button__label,.mat-mdc-fab-base .mat-icon{z-index:1;position:relative}.mat-mdc-fab-base .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-fab-base:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-fab-base._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-fab-base::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}.mat-mdc-fab-base[hidden]{display:none}.mat-mdc-fab-base::-moz-focus-inner{padding:0;border:0}.mat-mdc-fab-base:active,.mat-mdc-fab-base:focus{outline:none}.mat-mdc-fab-base:hover{cursor:pointer}.mat-mdc-fab-base>svg{width:100%}.mat-mdc-fab-base .mat-icon,.mat-mdc-fab-base .material-icons{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mat-mdc-fab-base .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base[disabled]:focus,.mat-mdc-fab-base.mat-mdc-button-disabled,.mat-mdc-fab-base.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-fab-base.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab{background-color:var(--mdc-fab-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-container-shape, var(--mat-sys-corner-large));color:var(--mat-fab-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:hover{box-shadow:var(--mdc-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-fab:focus{box-shadow:var(--mdc-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:active,.mat-mdc-fab:focus:active{box-shadow:var(--mdc-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab[disabled],.mat-mdc-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-touch-target-display, block)}.mat-mdc-fab .mat-ripple-element{background-color:var(--mat-fab-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-disabled-state-layer-color)}.mat-mdc-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-mini-fab{width:40px;height:40px;background-color:var(--mdc-fab-small-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-small-container-shape, var(--mat-sys-corner-medium));color:var(--mat-fab-small-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-small-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:hover{box-shadow:var(--mdc-fab-small-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-mini-fab:focus{box-shadow:var(--mdc-fab-small-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:active,.mat-mdc-mini-fab:focus:active{box-shadow:var(--mdc-fab-small-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab[disabled],.mat-mdc-mini-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-small-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-small-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-mini-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-small-touch-target-display)}.mat-mdc-mini-fab .mat-ripple-element{background-color:var(--mat-fab-small-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-mini-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-disabled-state-layer-color)}.mat-mdc-mini-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-mini-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-mini-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-extended-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;line-height:normal;height:var(--mdc-extended-fab-container-height, 56px);border-radius:var(--mdc-extended-fab-container-shape, var(--mat-sys-corner-large));font-family:var(--mdc-extended-fab-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-extended-fab-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mdc-extended-fab-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mdc-extended-fab-label-text-tracking, var(--mat-sys-label-large-tracking));box-shadow:var(--mdc-extended-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:hover{box-shadow:var(--mdc-extended-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-extended-fab:focus{box-shadow:var(--mdc-extended-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:active,.mat-mdc-extended-fab:focus:active{box-shadow:var(--mdc-extended-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab[disabled]:focus,.mat-mdc-extended-fab.mat-mdc-button-disabled,.mat-mdc-extended-fab.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-extended-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.material-icons,.mat-mdc-extended-fab>.mat-icon,.mat-mdc-extended-fab>.material-icons{margin-left:-8px;margin-right:12px}.mat-mdc-extended-fab .mdc-button__label+.mat-icon,.mat-mdc-extended-fab .mdc-button__label+.material-icons,[dir=rtl] .mat-mdc-extended-fab>.mat-icon,[dir=rtl] .mat-mdc-extended-fab>.material-icons{margin-left:12px;margin-right:-8px}.mat-mdc-extended-fab .mat-mdc-button-touch-target{width:100%}\"] }]\n        }], ctorParameters: () => [], propDecorators: { extended: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }] } });\n/**\n * Material Design mini floating action button (FAB) component for anchor elements. Anchor elements\n * are used to provide links for the user to navigate across different routes or pages.\n * See https://material.io/components/buttons-floating-action-button/\n */\nclass MatMiniFabAnchor extends MatAnchor {\n    _options = inject(MAT_FAB_DEFAULT_OPTIONS, { optional: true });\n    _isFab = true;\n    constructor() {\n        super();\n        this._options = this._options || defaults;\n        this.color = this._options.color || defaults.color;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatMiniFabAnchor, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatMiniFabAnchor, isStandalone: true, selector: \"a[mat-mini-fab]\", host: { properties: { \"attr.disabled\": \"_getDisabledAttribute()\", \"class.mat-mdc-button-disabled\": \"disabled\", \"class.mat-mdc-button-disabled-interactive\": \"disabledInteractive\", \"class._mat-animation-noopable\": \"_animationMode === \\\"NoopAnimations\\\"\", \"attr.tabindex\": \"disabled && !disabledInteractive ? -1 : tabIndex\", \"attr.aria-disabled\": \"_getAriaDisabled()\", \"class.mat-unthemed\": \"!color\", \"class.mat-mdc-button-base\": \"true\", \"class\": \"color ? \\\"mat-\\\" + color : \\\"\\\"\" } }, exportAs: [\"matButton\", \"matAnchor\"], usesInheritance: true, ngImport: i0, template: \"<span\\n    class=\\\"mat-mdc-button-persistent-ripple\\\"\\n    [class.mdc-button__ripple]=\\\"!_isFab\\\"\\n    [class.mdc-fab__ripple]=\\\"_isFab\\\"></span>\\n\\n<ng-content select=\\\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\\\">\\n</ng-content>\\n\\n<span class=\\\"mdc-button__label\\\"><ng-content></ng-content></span>\\n\\n<ng-content select=\\\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\\\">\\n</ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-fab-base{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1);flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-fab-base .mat-mdc-button-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-fab-base .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-fab-base .mdc-button__label,.mat-mdc-fab-base .mat-icon{z-index:1;position:relative}.mat-mdc-fab-base .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-fab-base:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-fab-base._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-fab-base::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}.mat-mdc-fab-base[hidden]{display:none}.mat-mdc-fab-base::-moz-focus-inner{padding:0;border:0}.mat-mdc-fab-base:active,.mat-mdc-fab-base:focus{outline:none}.mat-mdc-fab-base:hover{cursor:pointer}.mat-mdc-fab-base>svg{width:100%}.mat-mdc-fab-base .mat-icon,.mat-mdc-fab-base .material-icons{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mat-mdc-fab-base .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base[disabled]:focus,.mat-mdc-fab-base.mat-mdc-button-disabled,.mat-mdc-fab-base.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-fab-base.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab{background-color:var(--mdc-fab-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-container-shape, var(--mat-sys-corner-large));color:var(--mat-fab-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:hover{box-shadow:var(--mdc-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-fab:focus{box-shadow:var(--mdc-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:active,.mat-mdc-fab:focus:active{box-shadow:var(--mdc-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab[disabled],.mat-mdc-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-touch-target-display, block)}.mat-mdc-fab .mat-ripple-element{background-color:var(--mat-fab-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-disabled-state-layer-color)}.mat-mdc-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-mini-fab{width:40px;height:40px;background-color:var(--mdc-fab-small-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-small-container-shape, var(--mat-sys-corner-medium));color:var(--mat-fab-small-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-small-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:hover{box-shadow:var(--mdc-fab-small-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-mini-fab:focus{box-shadow:var(--mdc-fab-small-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:active,.mat-mdc-mini-fab:focus:active{box-shadow:var(--mdc-fab-small-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab[disabled],.mat-mdc-mini-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-small-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-small-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-mini-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-small-touch-target-display)}.mat-mdc-mini-fab .mat-ripple-element{background-color:var(--mat-fab-small-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-mini-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-disabled-state-layer-color)}.mat-mdc-mini-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-mini-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-mini-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-extended-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;line-height:normal;height:var(--mdc-extended-fab-container-height, 56px);border-radius:var(--mdc-extended-fab-container-shape, var(--mat-sys-corner-large));font-family:var(--mdc-extended-fab-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-extended-fab-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mdc-extended-fab-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mdc-extended-fab-label-text-tracking, var(--mat-sys-label-large-tracking));box-shadow:var(--mdc-extended-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:hover{box-shadow:var(--mdc-extended-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-extended-fab:focus{box-shadow:var(--mdc-extended-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:active,.mat-mdc-extended-fab:focus:active{box-shadow:var(--mdc-extended-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab[disabled]:focus,.mat-mdc-extended-fab.mat-mdc-button-disabled,.mat-mdc-extended-fab.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-extended-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.material-icons,.mat-mdc-extended-fab>.mat-icon,.mat-mdc-extended-fab>.material-icons{margin-left:-8px;margin-right:12px}.mat-mdc-extended-fab .mdc-button__label+.mat-icon,.mat-mdc-extended-fab .mdc-button__label+.material-icons,[dir=rtl] .mat-mdc-extended-fab>.mat-icon,[dir=rtl] .mat-mdc-extended-fab>.material-icons{margin-left:12px;margin-right:-8px}.mat-mdc-extended-fab .mat-mdc-button-touch-target{width:100%}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatMiniFabAnchor, decorators: [{\n            type: Component,\n            args: [{ selector: `a[mat-mini-fab]`, host: MAT_ANCHOR_HOST, exportAs: 'matButton, matAnchor', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<span\\n    class=\\\"mat-mdc-button-persistent-ripple\\\"\\n    [class.mdc-button__ripple]=\\\"!_isFab\\\"\\n    [class.mdc-fab__ripple]=\\\"_isFab\\\"></span>\\n\\n<ng-content select=\\\".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])\\\">\\n</ng-content>\\n\\n<span class=\\\"mdc-button__label\\\"><ng-content></ng-content></span>\\n\\n<ng-content select=\\\".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]\\\">\\n</ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-fab-base{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1);flex-shrink:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-fab-base .mat-mdc-button-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple,.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-fab-base .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-fab-base .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-fab-base .mdc-button__label,.mat-mdc-fab-base .mat-icon{z-index:1;position:relative}.mat-mdc-fab-base .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-fab-base:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-fab-base._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-fab-base::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}.mat-mdc-fab-base[hidden]{display:none}.mat-mdc-fab-base::-moz-focus-inner{padding:0;border:0}.mat-mdc-fab-base:active,.mat-mdc-fab-base:focus{outline:none}.mat-mdc-fab-base:hover{cursor:pointer}.mat-mdc-fab-base>svg{width:100%}.mat-mdc-fab-base .mat-icon,.mat-mdc-fab-base .material-icons{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mat-mdc-fab-base .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-fab-base[disabled],.mat-mdc-fab-base[disabled]:focus,.mat-mdc-fab-base.mat-mdc-button-disabled,.mat-mdc-fab-base.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-fab-base.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab{background-color:var(--mdc-fab-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-container-shape, var(--mat-sys-corner-large));color:var(--mat-fab-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:hover{box-shadow:var(--mdc-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-fab:focus{box-shadow:var(--mdc-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab:active,.mat-mdc-fab:focus:active{box-shadow:var(--mdc-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-fab[disabled],.mat-mdc-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-touch-target-display, block)}.mat-mdc-fab .mat-ripple-element{background-color:var(--mat-fab-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-disabled-state-layer-color)}.mat-mdc-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-mini-fab{width:40px;height:40px;background-color:var(--mdc-fab-small-container-color, var(--mat-sys-primary-container));border-radius:var(--mdc-fab-small-container-shape, var(--mat-sys-corner-medium));color:var(--mat-fab-small-foreground-color, var(--mat-sys-on-primary-container, inherit));box-shadow:var(--mdc-fab-small-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:hover{box-shadow:var(--mdc-fab-small-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-mini-fab:focus{box-shadow:var(--mdc-fab-small-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab:active,.mat-mdc-mini-fab:focus:active{box-shadow:var(--mdc-fab-small-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-mini-fab[disabled],.mat-mdc-mini-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-fab-small-disabled-state-foreground-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-fab-small-disabled-state-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-mini-fab .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-fab-small-touch-target-display)}.mat-mdc-mini-fab .mat-ripple-element{background-color:var(--mat-fab-small-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-mini-fab .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-state-layer-color, var(--mat-sys-on-primary-container))}.mat-mdc-mini-fab.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-fab-small-disabled-state-layer-color)}.mat-mdc-mini-fab:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-mini-fab.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-mini-fab.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-mini-fab:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-fab-small-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-extended-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;line-height:normal;height:var(--mdc-extended-fab-container-height, 56px);border-radius:var(--mdc-extended-fab-container-shape, var(--mat-sys-corner-large));font-family:var(--mdc-extended-fab-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-extended-fab-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mdc-extended-fab-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mdc-extended-fab-label-text-tracking, var(--mat-sys-label-large-tracking));box-shadow:var(--mdc-extended-fab-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:hover{box-shadow:var(--mdc-extended-fab-hover-container-elevation-shadow, var(--mat-sys-level4))}.mat-mdc-extended-fab:focus{box-shadow:var(--mdc-extended-fab-focus-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab:active,.mat-mdc-extended-fab:focus:active{box-shadow:var(--mdc-extended-fab-pressed-container-elevation-shadow, var(--mat-sys-level3))}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab.mat-mdc-button-disabled{cursor:default;pointer-events:none}.mat-mdc-extended-fab[disabled],.mat-mdc-extended-fab[disabled]:focus,.mat-mdc-extended-fab.mat-mdc-button-disabled,.mat-mdc-extended-fab.mat-mdc-button-disabled:focus{box-shadow:none}.mat-mdc-extended-fab.mat-mdc-button-disabled-interactive{pointer-events:auto}[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-extended-fab .mdc-button__label+.material-icons,.mat-mdc-extended-fab>.mat-icon,.mat-mdc-extended-fab>.material-icons{margin-left:-8px;margin-right:12px}.mat-mdc-extended-fab .mdc-button__label+.mat-icon,.mat-mdc-extended-fab .mdc-button__label+.material-icons,[dir=rtl] .mat-mdc-extended-fab>.mat-icon,[dir=rtl] .mat-mdc-extended-fab>.material-icons{margin-left:12px;margin-right:-8px}.mat-mdc-extended-fab .mat-mdc-button-touch-target{width:100%}\"] }]\n        }], ctorParameters: () => [] });\n\n/**\n * Material Design icon button component. This type of button displays a single interactive icon for\n * users to perform an action.\n * See https://material.io/develop/web/components/buttons/icon-buttons/\n */\nclass MatIconButton extends MatButtonBase {\n    constructor() {\n        super();\n        this._rippleLoader.configureRipple(this._elementRef.nativeElement, { centered: true });\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIconButton, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatIconButton, isStandalone: true, selector: \"button[mat-icon-button]\", host: { properties: { \"attr.disabled\": \"_getDisabledAttribute()\", \"attr.aria-disabled\": \"_getAriaDisabled()\", \"class.mat-mdc-button-disabled\": \"disabled\", \"class.mat-mdc-button-disabled-interactive\": \"disabledInteractive\", \"class._mat-animation-noopable\": \"_animationMode === \\\"NoopAnimations\\\"\", \"class.mat-unthemed\": \"!color\", \"class.mat-mdc-button-base\": \"true\", \"class\": \"color ? \\\"mat-\\\" + color : \\\"\\\"\" } }, exportAs: [\"matButton\"], usesInheritance: true, ngImport: i0, template: \"<span class=\\\"mat-mdc-button-persistent-ripple mdc-icon-button__ripple\\\"></span>\\n\\n<ng-content></ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 40px);height:var(--mdc-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 40px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size, 24px);color:var(--mdc-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display, block)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}\", \"@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-icon-button.mat-mdc-icon-button{outline:solid 1px}}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIconButton, decorators: [{\n            type: Component,\n            args: [{ selector: `button[mat-icon-button]`, host: MAT_BUTTON_HOST, exportAs: 'matButton', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<span class=\\\"mat-mdc-button-persistent-ripple mdc-icon-button__ripple\\\"></span>\\n\\n<ng-content></ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 40px);height:var(--mdc-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 40px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size, 24px);color:var(--mdc-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display, block)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}\", \"@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-icon-button.mat-mdc-icon-button{outline:solid 1px}}\"] }]\n        }], ctorParameters: () => [] });\n/**\n * Material Design icon button component for anchor elements. This button displays a single\n * interaction icon that allows users to navigate across different routes or pages.\n * See https://material.io/develop/web/components/buttons/icon-buttons/\n */\nclass MatIconAnchor extends MatAnchorBase {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIconAnchor, deps: null, target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatIconAnchor, isStandalone: true, selector: \"a[mat-icon-button]\", host: { properties: { \"attr.disabled\": \"_getDisabledAttribute()\", \"class.mat-mdc-button-disabled\": \"disabled\", \"class.mat-mdc-button-disabled-interactive\": \"disabledInteractive\", \"class._mat-animation-noopable\": \"_animationMode === \\\"NoopAnimations\\\"\", \"attr.tabindex\": \"disabled && !disabledInteractive ? -1 : tabIndex\", \"attr.aria-disabled\": \"_getAriaDisabled()\", \"class.mat-unthemed\": \"!color\", \"class.mat-mdc-button-base\": \"true\", \"class\": \"color ? \\\"mat-\\\" + color : \\\"\\\"\" } }, exportAs: [\"matButton\", \"matAnchor\"], usesInheritance: true, ngImport: i0, template: \"<span class=\\\"mat-mdc-button-persistent-ripple mdc-icon-button__ripple\\\"></span>\\n\\n<ng-content></ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 40px);height:var(--mdc-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 40px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size, 24px);color:var(--mdc-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display, block)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}\", \"@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-icon-button.mat-mdc-icon-button{outline:solid 1px}}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIconAnchor, decorators: [{\n            type: Component,\n            args: [{ selector: `a[mat-icon-button]`, host: MAT_ANCHOR_HOST, exportAs: 'matButton, matAnchor', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: \"<span class=\\\"mat-mdc-button-persistent-ripple mdc-icon-button__ripple\\\"></span>\\n\\n<ng-content></ng-content>\\n\\n<!--\\n  The indicator can't be directly on the button, because MDC uses ::before for high contrast\\n  indication and it can't be on the ripple, because it has a border radius and overflow: hidden.\\n-->\\n<span class=\\\"mat-focus-indicator\\\"></span>\\n\\n<span class=\\\"mat-mdc-button-touch-target\\\"></span>\\n\", styles: [\".mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 40px);height:var(--mdc-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 40px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size, 24px);color:var(--mdc-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:\\\"\\\";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display, block)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}\", \"@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-icon-button.mat-mdc-icon-button{outline:solid 1px}}\"] }]\n        }] });\n\nclass MatButtonModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatButtonModule, imports: [MatCommonModule,\n            MatRippleModule,\n            MatAnchor,\n            MatButton,\n            MatIconAnchor,\n            MatMiniFabAnchor,\n            MatMiniFabButton,\n            MatIconButton,\n            MatFabAnchor,\n            MatFabButton], exports: [MatAnchor,\n            MatButton,\n            MatIconAnchor,\n            MatIconButton,\n            MatMiniFabAnchor,\n            MatMiniFabButton,\n            MatFabAnchor,\n            MatFabButton,\n            MatCommonModule] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatButtonModule, imports: [MatCommonModule,\n            MatRippleModule, MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatButtonModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [\n                        MatCommonModule,\n                        MatRippleModule,\n                        MatAnchor,\n                        MatButton,\n                        MatIconAnchor,\n                        MatMiniFabAnchor,\n                        MatMiniFabButton,\n                        MatIconButton,\n                        MatFabAnchor,\n                        MatFabButton,\n                    ],\n                    exports: [\n                        MatAnchor,\n                        MatButton,\n                        MatIconAnchor,\n                        MatIconButton,\n                        MatMiniFabAnchor,\n                        MatMiniFabButton,\n                        MatFabAnchor,\n                        MatFabButton,\n                        MatCommonModule,\n                    ],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_BUTTON_CONFIG, MAT_FAB_DEFAULT_OPTIONS, MAT_FAB_DEFAULT_OPTIONS_FACTORY, MatAnchor, MatButton, MatButtonModule, MatFabAnchor, MatFabButton, MatIconAnchor, MatIconButton, MatMiniFabAnchor, MatMiniFabButton };\n","import * as i0 from '@angular/core';\nimport { ElementRef, NgModuleRef, createComponent, Injector, inject, TemplateRef, ViewContainerRef, Directive, EventEmitter, Input, Output, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nfunction throwNullPortalError() {\n    throw Error('Must provide a portal to attach');\n}\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nfunction throwPortalAlreadyAttachedError() {\n    throw Error('Host already has a portal attached');\n}\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nfunction throwPortalOutletAlreadyDisposedError() {\n    throw Error('This PortalOutlet has already been disposed');\n}\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nfunction throwUnknownPortalTypeError() {\n    throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' +\n        'a ComponentPortal or a TemplatePortal.');\n}\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nfunction throwNullPortalOutletError() {\n    throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nfunction throwNoPortalAttachedError() {\n    throw Error('Attempting to detach a portal that is not attached to a host');\n}\n\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nclass Portal {\n    _attachedHost;\n    /** Attach this portal to a host. */\n    attach(host) {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (host == null) {\n                throwNullPortalOutletError();\n            }\n            if (host.hasAttached()) {\n                throwPortalAlreadyAttachedError();\n            }\n        }\n        this._attachedHost = host;\n        return host.attach(this);\n    }\n    /** Detach this portal from its host */\n    detach() {\n        let host = this._attachedHost;\n        if (host != null) {\n            this._attachedHost = null;\n            host.detach();\n        }\n        else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            throwNoPortalAttachedError();\n        }\n    }\n    /** Whether this portal is attached to a host. */\n    get isAttached() {\n        return this._attachedHost != null;\n    }\n    /**\n     * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n     * the PortalOutlet when it is performing an `attach()` or `detach()`.\n     */\n    setAttachedHost(host) {\n        this._attachedHost = host;\n    }\n}\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nclass ComponentPortal extends Portal {\n    /** The type of the component that will be instantiated for attachment. */\n    component;\n    /**\n     * Where the attached component should live in Angular's *logical* component tree.\n     * This is different from where the component *renders*, which is determined by the PortalOutlet.\n     * The origin is necessary when the host is outside of the Angular application context.\n     */\n    viewContainerRef;\n    /** Injector used for the instantiation of the component. */\n    injector;\n    /**\n     * @deprecated No longer in use. To be removed.\n     * @breaking-change 18.0.0\n     */\n    componentFactoryResolver;\n    /**\n     * List of DOM nodes that should be projected through `<ng-content>` of the attached component.\n     */\n    projectableNodes;\n    constructor(component, viewContainerRef, injector, \n    /**\n     * @deprecated No longer in use. To be removed.\n     * @breaking-change 18.0.0\n     */\n    _componentFactoryResolver, projectableNodes) {\n        super();\n        this.component = component;\n        this.viewContainerRef = viewContainerRef;\n        this.injector = injector;\n        this.projectableNodes = projectableNodes;\n    }\n}\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nclass TemplatePortal extends Portal {\n    templateRef;\n    viewContainerRef;\n    context;\n    injector;\n    constructor(\n    /** The embedded template that will be used to instantiate an embedded View in the host. */\n    templateRef, \n    /** Reference to the ViewContainer into which the template will be stamped out. */\n    viewContainerRef, \n    /** Contextual data to be passed in to the embedded view. */\n    context, \n    /** The injector to use for the embedded view. */\n    injector) {\n        super();\n        this.templateRef = templateRef;\n        this.viewContainerRef = viewContainerRef;\n        this.context = context;\n        this.injector = injector;\n    }\n    get origin() {\n        return this.templateRef.elementRef;\n    }\n    /**\n     * Attach the portal to the provided `PortalOutlet`.\n     * When a context is provided it will override the `context` property of the `TemplatePortal`\n     * instance.\n     */\n    attach(host, context = this.context) {\n        this.context = context;\n        return super.attach(host);\n    }\n    detach() {\n        this.context = undefined;\n        return super.detach();\n    }\n}\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nclass DomPortal extends Portal {\n    /** DOM node hosting the portal's content. */\n    element;\n    constructor(element) {\n        super();\n        this.element = element instanceof ElementRef ? element.nativeElement : element;\n    }\n}\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nclass BasePortalOutlet {\n    /** The portal currently attached to the host. */\n    _attachedPortal;\n    /** A function that will permanently dispose this host. */\n    _disposeFn;\n    /** Whether this host has already been permanently disposed. */\n    _isDisposed = false;\n    /** Whether this host has an attached portal. */\n    hasAttached() {\n        return !!this._attachedPortal;\n    }\n    /** Attaches a portal. */\n    attach(portal) {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (!portal) {\n                throwNullPortalError();\n            }\n            if (this.hasAttached()) {\n                throwPortalAlreadyAttachedError();\n            }\n            if (this._isDisposed) {\n                throwPortalOutletAlreadyDisposedError();\n            }\n        }\n        if (portal instanceof ComponentPortal) {\n            this._attachedPortal = portal;\n            return this.attachComponentPortal(portal);\n        }\n        else if (portal instanceof TemplatePortal) {\n            this._attachedPortal = portal;\n            return this.attachTemplatePortal(portal);\n            // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n        }\n        else if (this.attachDomPortal && portal instanceof DomPortal) {\n            this._attachedPortal = portal;\n            return this.attachDomPortal(portal);\n        }\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            throwUnknownPortalTypeError();\n        }\n    }\n    // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n    attachDomPortal = null;\n    /** Detaches a previously attached portal. */\n    detach() {\n        if (this._attachedPortal) {\n            this._attachedPortal.setAttachedHost(null);\n            this._attachedPortal = null;\n        }\n        this._invokeDisposeFn();\n    }\n    /** Permanently dispose of this portal host. */\n    dispose() {\n        if (this.hasAttached()) {\n            this.detach();\n        }\n        this._invokeDisposeFn();\n        this._isDisposed = true;\n    }\n    /** @docs-private */\n    setDisposeFn(fn) {\n        this._disposeFn = fn;\n    }\n    _invokeDisposeFn() {\n        if (this._disposeFn) {\n            this._disposeFn();\n            this._disposeFn = null;\n        }\n    }\n}\n/**\n * @deprecated Use `BasePortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass BasePortalHost extends BasePortalOutlet {\n}\n\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nclass DomPortalOutlet extends BasePortalOutlet {\n    outletElement;\n    _appRef;\n    _defaultInjector;\n    _document;\n    /**\n     * @param outletElement Element into which the content is projected.\n     * @param _unusedComponentFactoryResolver Used to resolve the component factory.\n     *   Only required when attaching component portals.\n     * @param _appRef Reference to the application. Only used in component portals when there\n     *   is no `ViewContainerRef` available.\n     * @param _defaultInjector Injector to use as a fallback when the portal being attached doesn't\n     *   have one. Only used for component portals.\n     * @param _document Reference to the document. Used when attaching a DOM portal. Will eventually\n     *   become a required parameter.\n     */\n    constructor(\n    /** Element into which the content is projected. */\n    outletElement, \n    /**\n     * @deprecated No longer in use. To be removed.\n     * @breaking-change 18.0.0\n     */\n    _unusedComponentFactoryResolver, _appRef, _defaultInjector, \n    /**\n     * @deprecated `_document` Parameter to be made required.\n     * @breaking-change 10.0.0\n     */\n    _document) {\n        super();\n        this.outletElement = outletElement;\n        this._appRef = _appRef;\n        this._defaultInjector = _defaultInjector;\n        this._document = _document;\n    }\n    /**\n     * Attach the given ComponentPortal to DOM element.\n     * @param portal Portal to be attached\n     * @returns Reference to the created component.\n     */\n    attachComponentPortal(portal) {\n        let componentRef;\n        // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n        // for the component (in terms of Angular's component tree, not rendering).\n        // When the ViewContainerRef is missing, we use the factory to create the component directly\n        // and then manually attach the view to the application.\n        if (portal.viewContainerRef) {\n            const injector = portal.injector || portal.viewContainerRef.injector;\n            const ngModuleRef = injector.get(NgModuleRef, null, { optional: true }) || undefined;\n            componentRef = portal.viewContainerRef.createComponent(portal.component, {\n                index: portal.viewContainerRef.length,\n                injector,\n                ngModuleRef,\n                projectableNodes: portal.projectableNodes || undefined,\n            });\n            this.setDisposeFn(() => componentRef.destroy());\n        }\n        else {\n            if ((typeof ngDevMode === 'undefined' || ngDevMode) && !this._appRef) {\n                throw Error('Cannot attach component portal to outlet without an ApplicationRef.');\n            }\n            componentRef = createComponent(portal.component, {\n                elementInjector: portal.injector || this._defaultInjector || Injector.NULL,\n                environmentInjector: this._appRef.injector,\n                projectableNodes: portal.projectableNodes || undefined,\n            });\n            this._appRef.attachView(componentRef.hostView);\n            this.setDisposeFn(() => {\n                // Verify that the ApplicationRef has registered views before trying to detach a host view.\n                // This check also protects the `detachView` from being called on a destroyed ApplicationRef.\n                if (this._appRef.viewCount > 0) {\n                    this._appRef.detachView(componentRef.hostView);\n                }\n                componentRef.destroy();\n            });\n        }\n        // At this point the component has been instantiated, so we move it to the location in the DOM\n        // where we want it to be rendered.\n        this.outletElement.appendChild(this._getComponentRootNode(componentRef));\n        this._attachedPortal = portal;\n        return componentRef;\n    }\n    /**\n     * Attaches a template portal to the DOM as an embedded view.\n     * @param portal Portal to be attached.\n     * @returns Reference to the created embedded view.\n     */\n    attachTemplatePortal(portal) {\n        let viewContainer = portal.viewContainerRef;\n        let viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context, {\n            injector: portal.injector,\n        });\n        // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n        // But for the DomPortalOutlet the view can be added everywhere in the DOM\n        // (e.g Overlay Container) To move the view to the specified host element. We just\n        // re-append the existing root nodes.\n        viewRef.rootNodes.forEach(rootNode => this.outletElement.appendChild(rootNode));\n        // Note that we want to detect changes after the nodes have been moved so that\n        // any directives inside the portal that are looking at the DOM inside a lifecycle\n        // hook won't be invoked too early.\n        viewRef.detectChanges();\n        this.setDisposeFn(() => {\n            let index = viewContainer.indexOf(viewRef);\n            if (index !== -1) {\n                viewContainer.remove(index);\n            }\n        });\n        this._attachedPortal = portal;\n        // TODO(jelbourn): Return locals from view.\n        return viewRef;\n    }\n    /**\n     * Attaches a DOM portal by transferring its content into the outlet.\n     * @param portal Portal to be attached.\n     * @deprecated To be turned into a method.\n     * @breaking-change 10.0.0\n     */\n    attachDomPortal = (portal) => {\n        const element = portal.element;\n        if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error('DOM portal content must be attached to a parent node.');\n        }\n        // Anchor used to save the element's previous position so\n        // that we can restore it when the portal is detached.\n        const anchorNode = this._document.createComment('dom-portal');\n        element.parentNode.insertBefore(anchorNode, element);\n        this.outletElement.appendChild(element);\n        this._attachedPortal = portal;\n        super.setDisposeFn(() => {\n            // We can't use `replaceWith` here because IE doesn't support it.\n            if (anchorNode.parentNode) {\n                anchorNode.parentNode.replaceChild(element, anchorNode);\n            }\n        });\n    };\n    /**\n     * Clears out a portal from the DOM.\n     */\n    dispose() {\n        super.dispose();\n        this.outletElement.remove();\n    }\n    /** Gets the root HTMLElement for an instantiated component. */\n    _getComponentRootNode(componentRef) {\n        return componentRef.hostView.rootNodes[0];\n    }\n}\n/**\n * @deprecated Use `DomPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass DomPortalHost extends DomPortalOutlet {\n}\n\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\nclass CdkPortal extends TemplatePortal {\n    constructor() {\n        const templateRef = inject(TemplateRef);\n        const viewContainerRef = inject(ViewContainerRef);\n        super(templateRef, viewContainerRef);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkPortal, isStandalone: true, selector: \"[cdkPortal]\", exportAs: [\"cdkPortal\"], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkPortal, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkPortal]',\n                    exportAs: 'cdkPortal',\n                }]\n        }], ctorParameters: () => [] });\n/**\n * @deprecated Use `CdkPortal` instead.\n * @breaking-change 9.0.0\n */\nclass TemplatePortalDirective extends CdkPortal {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: TemplatePortalDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: TemplatePortalDirective, isStandalone: true, selector: \"[cdk-portal], [portal]\", providers: [\n            {\n                provide: CdkPortal,\n                useExisting: TemplatePortalDirective,\n            },\n        ], exportAs: [\"cdkPortal\"], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: TemplatePortalDirective, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdk-portal], [portal]',\n                    exportAs: 'cdkPortal',\n                    providers: [\n                        {\n                            provide: CdkPortal,\n                            useExisting: TemplatePortalDirective,\n                        },\n                    ],\n                }]\n        }] });\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\nclass CdkPortalOutlet extends BasePortalOutlet {\n    _moduleRef = inject(NgModuleRef, { optional: true });\n    _document = inject(DOCUMENT);\n    _viewContainerRef = inject(ViewContainerRef);\n    /** Whether the portal component is initialized. */\n    _isInitialized = false;\n    /** Reference to the currently-attached component/view ref. */\n    _attachedRef;\n    constructor() {\n        super();\n    }\n    /** Portal associated with the Portal outlet. */\n    get portal() {\n        return this._attachedPortal;\n    }\n    set portal(portal) {\n        // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n        // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n        // and attach a portal programmatically in the parent component. When Angular does the first CD\n        // round, it will fire the setter with empty string, causing the user's content to be cleared.\n        if (this.hasAttached() && !portal && !this._isInitialized) {\n            return;\n        }\n        if (this.hasAttached()) {\n            super.detach();\n        }\n        if (portal) {\n            super.attach(portal);\n        }\n        this._attachedPortal = portal || null;\n    }\n    /** Emits when a portal is attached to the outlet. */\n    attached = new EventEmitter();\n    /** Component or view reference that is attached to the portal. */\n    get attachedRef() {\n        return this._attachedRef;\n    }\n    ngOnInit() {\n        this._isInitialized = true;\n    }\n    ngOnDestroy() {\n        super.dispose();\n        this._attachedRef = this._attachedPortal = null;\n    }\n    /**\n     * Attach the given ComponentPortal to this PortalOutlet.\n     *\n     * @param portal Portal to be attached to the portal outlet.\n     * @returns Reference to the created component.\n     */\n    attachComponentPortal(portal) {\n        portal.setAttachedHost(this);\n        // If the portal specifies an origin, use that as the logical location of the component\n        // in the application tree. Otherwise use the location of this PortalOutlet.\n        const viewContainerRef = portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;\n        const ref = viewContainerRef.createComponent(portal.component, {\n            index: viewContainerRef.length,\n            injector: portal.injector || viewContainerRef.injector,\n            projectableNodes: portal.projectableNodes || undefined,\n            ngModuleRef: this._moduleRef || undefined,\n        });\n        // If we're using a view container that's different from the injected one (e.g. when the portal\n        // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n        // inside of the alternate view container.\n        if (viewContainerRef !== this._viewContainerRef) {\n            this._getRootNode().appendChild(ref.hostView.rootNodes[0]);\n        }\n        super.setDisposeFn(() => ref.destroy());\n        this._attachedPortal = portal;\n        this._attachedRef = ref;\n        this.attached.emit(ref);\n        return ref;\n    }\n    /**\n     * Attach the given TemplatePortal to this PortalHost as an embedded View.\n     * @param portal Portal to be attached.\n     * @returns Reference to the created embedded view.\n     */\n    attachTemplatePortal(portal) {\n        portal.setAttachedHost(this);\n        const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context, {\n            injector: portal.injector,\n        });\n        super.setDisposeFn(() => this._viewContainerRef.clear());\n        this._attachedPortal = portal;\n        this._attachedRef = viewRef;\n        this.attached.emit(viewRef);\n        return viewRef;\n    }\n    /**\n     * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n     * @param portal Portal to be attached.\n     * @deprecated To be turned into a method.\n     * @breaking-change 10.0.0\n     */\n    attachDomPortal = (portal) => {\n        const element = portal.element;\n        if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error('DOM portal content must be attached to a parent node.');\n        }\n        // Anchor used to save the element's previous position so\n        // that we can restore it when the portal is detached.\n        const anchorNode = this._document.createComment('dom-portal');\n        portal.setAttachedHost(this);\n        element.parentNode.insertBefore(anchorNode, element);\n        this._getRootNode().appendChild(element);\n        this._attachedPortal = portal;\n        super.setDisposeFn(() => {\n            if (anchorNode.parentNode) {\n                anchorNode.parentNode.replaceChild(element, anchorNode);\n            }\n        });\n    };\n    /** Gets the root node of the portal outlet. */\n    _getRootNode() {\n        const nativeElement = this._viewContainerRef.element.nativeElement;\n        // The directive could be set on a template which will result in a comment\n        // node being the root. Use the comment's parent node if that is the case.\n        return (nativeElement.nodeType === nativeElement.ELEMENT_NODE\n            ? nativeElement\n            : nativeElement.parentNode);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkPortalOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkPortalOutlet, isStandalone: true, selector: \"[cdkPortalOutlet]\", inputs: { portal: [\"cdkPortalOutlet\", \"portal\"] }, outputs: { attached: \"attached\" }, exportAs: [\"cdkPortalOutlet\"], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkPortalOutlet, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkPortalOutlet]',\n                    exportAs: 'cdkPortalOutlet',\n                }]\n        }], ctorParameters: () => [], propDecorators: { portal: [{\n                type: Input,\n                args: ['cdkPortalOutlet']\n            }], attached: [{\n                type: Output\n            }] } });\n/**\n * @deprecated Use `CdkPortalOutlet` instead.\n * @breaking-change 9.0.0\n */\nclass PortalHostDirective extends CdkPortalOutlet {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: PortalHostDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: PortalHostDirective, isStandalone: true, selector: \"[cdkPortalHost], [portalHost]\", inputs: { portal: [\"cdkPortalHost\", \"portal\"] }, providers: [\n            {\n                provide: CdkPortalOutlet,\n                useExisting: PortalHostDirective,\n            },\n        ], exportAs: [\"cdkPortalHost\"], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: PortalHostDirective, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkPortalHost], [portalHost]',\n                    exportAs: 'cdkPortalHost',\n                    inputs: [{ name: 'portal', alias: 'cdkPortalHost' }],\n                    providers: [\n                        {\n                            provide: CdkPortalOutlet,\n                            useExisting: PortalHostDirective,\n                        },\n                    ],\n                }]\n        }] });\nclass PortalModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: PortalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: PortalModule, imports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective], exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: PortalModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: PortalModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n                    exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective],\n                }]\n        }] });\n\n/**\n * Custom injector to be used when providing custom\n * injection tokens to components inside a portal.\n * @docs-private\n * @deprecated Use `Injector.create` instead.\n * @breaking-change 11.0.0\n */\nclass PortalInjector {\n    _parentInjector;\n    _customTokens;\n    constructor(_parentInjector, _customTokens) {\n        this._parentInjector = _parentInjector;\n        this._customTokens = _customTokens;\n    }\n    get(token, notFoundValue) {\n        const value = this._customTokens.get(token);\n        if (typeof value !== 'undefined') {\n            return value;\n        }\n        return this._parentInjector.get(token, notFoundValue);\n    }\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BasePortalHost, BasePortalOutlet, CdkPortal, CdkPortalOutlet, ComponentPortal, DomPortal, DomPortalHost, DomPortalOutlet, Portal, PortalHostDirective, PortalInjector, PortalModule, TemplatePortal, TemplatePortalDirective };\n","import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'];\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'];\nconst jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n    if (isFunction(options)) {\n        resultSelector = options;\n        options = undefined;\n    }\n    if (resultSelector) {\n        return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n    }\n    const [add, remove] = isEventTarget(target)\n        ? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options))\n        :\n            isNodeStyleEventEmitter(target)\n                ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n                : isJQueryStyleEventEmitter(target)\n                    ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n                    : [];\n    if (!add) {\n        if (isArrayLike(target)) {\n            return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target));\n        }\n    }\n    if (!add) {\n        throw new TypeError('Invalid event target');\n    }\n    return new Observable((subscriber) => {\n        const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);\n        add(handler);\n        return () => remove(handler);\n    });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n    return (methodName) => (handler) => target[methodName](eventName, handler);\n}\nfunction isNodeStyleEventEmitter(target) {\n    return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n    return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n    return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n","import { Subscription } from '../Subscription';\nexport const animationFrameProvider = {\n    schedule(callback) {\n        let request = requestAnimationFrame;\n        let cancel = cancelAnimationFrame;\n        const { delegate } = animationFrameProvider;\n        if (delegate) {\n            request = delegate.requestAnimationFrame;\n            cancel = delegate.cancelAnimationFrame;\n        }\n        const handle = request((timestamp) => {\n            cancel = undefined;\n            callback(timestamp);\n        });\n        return new Subscription(() => cancel === null || cancel === void 0 ? void 0 : cancel(handle));\n    },\n    requestAnimationFrame(...args) {\n        const { delegate } = animationFrameProvider;\n        return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame)(...args);\n    },\n    cancelAnimationFrame(...args) {\n        const { delegate } = animationFrameProvider;\n        return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame)(...args);\n    },\n    delegate: undefined,\n};\n","import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nexport const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\nexport const animationFrame = animationFrameScheduler;\n","import { AsyncScheduler } from './AsyncScheduler';\nexport class AnimationFrameScheduler extends AsyncScheduler {\n    flush(action) {\n        this._active = true;\n        const flushId = this._scheduled;\n        this._scheduled = undefined;\n        const { actions } = this;\n        let error;\n        action = action || actions.shift();\n        do {\n            if ((error = action.execute(action.state, action.delay))) {\n                break;\n            }\n        } while ((action = actions[0]) && action.id === flushId && actions.shift());\n        this._active = false;\n        if (error) {\n            while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { animationFrameProvider } from './animationFrameProvider';\nexport class AnimationFrameAction extends AsyncAction {\n    constructor(scheduler, work) {\n        super(scheduler, work);\n        this.scheduler = scheduler;\n        this.work = work;\n    }\n    requestAsyncId(scheduler, id, delay = 0) {\n        if (delay !== null && delay > 0) {\n            return super.requestAsyncId(scheduler, id, delay);\n        }\n        scheduler.actions.push(this);\n        return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined)));\n    }\n    recycleAsyncId(scheduler, id, delay = 0) {\n        var _a;\n        if (delay != null ? delay > 0 : this.delay > 0) {\n            return super.recycleAsyncId(scheduler, id, delay);\n        }\n        const { actions } = scheduler;\n        if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {\n            animationFrameProvider.cancelAnimationFrame(id);\n            scheduler._scheduled = undefined;\n        }\n        return undefined;\n    }\n}\n","let nextHandle = 1;\nlet resolved;\nconst activeHandles = {};\nfunction findAndClearHandle(handle) {\n    if (handle in activeHandles) {\n        delete activeHandles[handle];\n        return true;\n    }\n    return false;\n}\nexport const Immediate = {\n    setImmediate(cb) {\n        const handle = nextHandle++;\n        activeHandles[handle] = true;\n        if (!resolved) {\n            resolved = Promise.resolve();\n        }\n        resolved.then(() => findAndClearHandle(handle) && cb());\n        return handle;\n    },\n    clearImmediate(handle) {\n        findAndClearHandle(handle);\n    },\n};\nexport const TestTools = {\n    pending() {\n        return Object.keys(activeHandles).length;\n    }\n};\n","import { Immediate } from '../util/Immediate';\nconst { setImmediate, clearImmediate } = Immediate;\nexport const immediateProvider = {\n    setImmediate(...args) {\n        const { delegate } = immediateProvider;\n        return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate)(...args);\n    },\n    clearImmediate(handle) {\n        const { delegate } = immediateProvider;\n        return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle);\n    },\n    delegate: undefined,\n};\n","import { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\nexport const asapScheduler = new AsapScheduler(AsapAction);\nexport const asap = asapScheduler;\n","import { AsyncScheduler } from './AsyncScheduler';\nexport class AsapScheduler extends AsyncScheduler {\n    flush(action) {\n        this._active = true;\n        const flushId = this._scheduled;\n        this._scheduled = undefined;\n        const { actions } = this;\n        let error;\n        action = action || actions.shift();\n        do {\n            if ((error = action.execute(action.state, action.delay))) {\n                break;\n            }\n        } while ((action = actions[0]) && action.id === flushId && actions.shift());\n        this._active = false;\n        if (error) {\n            while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { immediateProvider } from './immediateProvider';\nexport class AsapAction extends AsyncAction {\n    constructor(scheduler, work) {\n        super(scheduler, work);\n        this.scheduler = scheduler;\n        this.work = work;\n    }\n    requestAsyncId(scheduler, id, delay = 0) {\n        if (delay !== null && delay > 0) {\n            return super.requestAsyncId(scheduler, id, delay);\n        }\n        scheduler.actions.push(this);\n        return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined)));\n    }\n    recycleAsyncId(scheduler, id, delay = 0) {\n        var _a;\n        if (delay != null ? delay > 0 : this.delay > 0) {\n            return super.recycleAsyncId(scheduler, id, delay);\n        }\n        const { actions } = scheduler;\n        if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {\n            immediateProvider.clearImmediate(id);\n            if (scheduler._scheduled === id) {\n                scheduler._scheduled = undefined;\n            }\n        }\n        return undefined;\n    }\n}\n","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) {\n    let intervalDuration = -1;\n    if (intervalOrScheduler != null) {\n        if (isScheduler(intervalOrScheduler)) {\n            scheduler = intervalOrScheduler;\n        }\n        else {\n            intervalDuration = intervalOrScheduler;\n        }\n    }\n    return new Observable((subscriber) => {\n        let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n        if (due < 0) {\n            due = 0;\n        }\n        let n = 0;\n        return scheduler.schedule(function () {\n            if (!subscriber.closed) {\n                subscriber.next(n++);\n                if (0 <= intervalDuration) {\n                    this.schedule(undefined, intervalDuration);\n                }\n                else {\n                    subscriber.complete();\n                }\n            }\n        }, due);\n    });\n}\n","export function isValidDate(value) {\n    return value instanceof Date && !isNaN(value);\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler = asyncScheduler) {\n    return audit(() => timer(duration, scheduler));\n}\n","import { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function audit(durationSelector) {\n    return operate((source, subscriber) => {\n        let hasValue = false;\n        let lastValue = null;\n        let durationSubscriber = null;\n        let isComplete = false;\n        const endDuration = () => {\n            durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n            durationSubscriber = null;\n            if (hasValue) {\n                hasValue = false;\n                const value = lastValue;\n                lastValue = null;\n                subscriber.next(value);\n            }\n            isComplete && subscriber.complete();\n        };\n        const cleanupDuration = () => {\n            durationSubscriber = null;\n            isComplete && subscriber.complete();\n        };\n        source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n            hasValue = true;\n            lastValue = value;\n            if (!durationSubscriber) {\n                innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));\n            }\n        }, () => {\n            isComplete = true;\n            (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();\n        }));\n    });\n}\n","import { coerceNumberProperty, coerceElement } from '@angular/cdk/coercion';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, Directive, Input, inject, NgZone, Injectable, ElementRef, RendererFactory2, ChangeDetectorRef, Injector, afterNextRender, booleanAttribute, Optional, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, ViewChild, ViewContainerRef, TemplateRef, IterableDiffers, NgModule } from '@angular/core';\nimport { Subject, of, Observable, fromEvent, animationFrameScheduler, asapScheduler, Subscription, isObservable } from 'rxjs';\nimport { distinctUntilChanged, auditTime, filter, takeUntil, startWith, pairwise, switchMap, shareReplay } from 'rxjs/operators';\nimport { Platform, getRtlScrollAxisType, RtlScrollAxisType, supportsScrollBehavior } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport { Directionality, BidiModule } from '@angular/cdk/bidi';\nimport { _VIEW_REPEATER_STRATEGY, isDataSource, ArrayDataSource, _RecycleViewRepeaterStrategy } from '@angular/cdk/collections';\n\n/** The injection token used to specify the virtual scrolling strategy. */\nconst VIRTUAL_SCROLL_STRATEGY = new InjectionToken('VIRTUAL_SCROLL_STRATEGY');\n\n/** Virtual scrolling strategy for lists with items of known fixed size. */\nclass FixedSizeVirtualScrollStrategy {\n    _scrolledIndexChange = new Subject();\n    /** @docs-private Implemented as part of VirtualScrollStrategy. */\n    scrolledIndexChange = this._scrolledIndexChange.pipe(distinctUntilChanged());\n    /** The attached viewport. */\n    _viewport = null;\n    /** The size of the items in the virtually scrolling list. */\n    _itemSize;\n    /** The minimum amount of buffer rendered beyond the viewport (in pixels). */\n    _minBufferPx;\n    /** The number of buffer items to render beyond the edge of the viewport (in pixels). */\n    _maxBufferPx;\n    /**\n     * @param itemSize The size of the items in the virtually scrolling list.\n     * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more\n     * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.\n     */\n    constructor(itemSize, minBufferPx, maxBufferPx) {\n        this._itemSize = itemSize;\n        this._minBufferPx = minBufferPx;\n        this._maxBufferPx = maxBufferPx;\n    }\n    /**\n     * Attaches this scroll strategy to a viewport.\n     * @param viewport The viewport to attach this strategy to.\n     */\n    attach(viewport) {\n        this._viewport = viewport;\n        this._updateTotalContentSize();\n        this._updateRenderedRange();\n    }\n    /** Detaches this scroll strategy from the currently attached viewport. */\n    detach() {\n        this._scrolledIndexChange.complete();\n        this._viewport = null;\n    }\n    /**\n     * Update the item size and buffer size.\n     * @param itemSize The size of the items in the virtually scrolling list.\n     * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more\n     * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.\n     */\n    updateItemAndBufferSize(itemSize, minBufferPx, maxBufferPx) {\n        if (maxBufferPx < minBufferPx && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error('CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx');\n        }\n        this._itemSize = itemSize;\n        this._minBufferPx = minBufferPx;\n        this._maxBufferPx = maxBufferPx;\n        this._updateTotalContentSize();\n        this._updateRenderedRange();\n    }\n    /** @docs-private Implemented as part of VirtualScrollStrategy. */\n    onContentScrolled() {\n        this._updateRenderedRange();\n    }\n    /** @docs-private Implemented as part of VirtualScrollStrategy. */\n    onDataLengthChanged() {\n        this._updateTotalContentSize();\n        this._updateRenderedRange();\n    }\n    /** @docs-private Implemented as part of VirtualScrollStrategy. */\n    onContentRendered() {\n        /* no-op */\n    }\n    /** @docs-private Implemented as part of VirtualScrollStrategy. */\n    onRenderedOffsetChanged() {\n        /* no-op */\n    }\n    /**\n     * Scroll to the offset for the given index.\n     * @param index The index of the element to scroll to.\n     * @param behavior The ScrollBehavior to use when scrolling.\n     */\n    scrollToIndex(index, behavior) {\n        if (this._viewport) {\n            this._viewport.scrollToOffset(index * this._itemSize, behavior);\n        }\n    }\n    /** Update the viewport's total content size. */\n    _updateTotalContentSize() {\n        if (!this._viewport) {\n            return;\n        }\n        this._viewport.setTotalContentSize(this._viewport.getDataLength() * this._itemSize);\n    }\n    /** Update the viewport's rendered range. */\n    _updateRenderedRange() {\n        if (!this._viewport) {\n            return;\n        }\n        const renderedRange = this._viewport.getRenderedRange();\n        const newRange = { start: renderedRange.start, end: renderedRange.end };\n        const viewportSize = this._viewport.getViewportSize();\n        const dataLength = this._viewport.getDataLength();\n        let scrollOffset = this._viewport.measureScrollOffset();\n        // Prevent NaN as result when dividing by zero.\n        let firstVisibleIndex = this._itemSize > 0 ? scrollOffset / this._itemSize : 0;\n        // If user scrolls to the bottom of the list and data changes to a smaller list\n        if (newRange.end > dataLength) {\n            // We have to recalculate the first visible index based on new data length and viewport size.\n            const maxVisibleItems = Math.ceil(viewportSize / this._itemSize);\n            const newVisibleIndex = Math.max(0, Math.min(firstVisibleIndex, dataLength - maxVisibleItems));\n            // If first visible index changed we must update scroll offset to handle start/end buffers\n            // Current range must also be adjusted to cover the new position (bottom of new list).\n            if (firstVisibleIndex != newVisibleIndex) {\n                firstVisibleIndex = newVisibleIndex;\n                scrollOffset = newVisibleIndex * this._itemSize;\n                newRange.start = Math.floor(firstVisibleIndex);\n            }\n            newRange.end = Math.max(0, Math.min(dataLength, newRange.start + maxVisibleItems));\n        }\n        const startBuffer = scrollOffset - newRange.start * this._itemSize;\n        if (startBuffer < this._minBufferPx && newRange.start != 0) {\n            const expandStart = Math.ceil((this._maxBufferPx - startBuffer) / this._itemSize);\n            newRange.start = Math.max(0, newRange.start - expandStart);\n            newRange.end = Math.min(dataLength, Math.ceil(firstVisibleIndex + (viewportSize + this._minBufferPx) / this._itemSize));\n        }\n        else {\n            const endBuffer = newRange.end * this._itemSize - (scrollOffset + viewportSize);\n            if (endBuffer < this._minBufferPx && newRange.end != dataLength) {\n                const expandEnd = Math.ceil((this._maxBufferPx - endBuffer) / this._itemSize);\n                if (expandEnd > 0) {\n                    newRange.end = Math.min(dataLength, newRange.end + expandEnd);\n                    newRange.start = Math.max(0, Math.floor(firstVisibleIndex - this._minBufferPx / this._itemSize));\n                }\n            }\n        }\n        this._viewport.setRenderedRange(newRange);\n        this._viewport.setRenderedContentOffset(this._itemSize * newRange.start);\n        this._scrolledIndexChange.next(Math.floor(firstVisibleIndex));\n    }\n}\n/**\n * Provider factory for `FixedSizeVirtualScrollStrategy` that simply extracts the already created\n * `FixedSizeVirtualScrollStrategy` from the given directive.\n * @param fixedSizeDir The instance of `CdkFixedSizeVirtualScroll` to extract the\n *     `FixedSizeVirtualScrollStrategy` from.\n */\nfunction _fixedSizeVirtualScrollStrategyFactory(fixedSizeDir) {\n    return fixedSizeDir._scrollStrategy;\n}\n/** A virtual scroll strategy that supports fixed-size items. */\nclass CdkFixedSizeVirtualScroll {\n    /** The size of the items in the list (in pixels). */\n    get itemSize() {\n        return this._itemSize;\n    }\n    set itemSize(value) {\n        this._itemSize = coerceNumberProperty(value);\n    }\n    _itemSize = 20;\n    /**\n     * The minimum amount of buffer rendered beyond the viewport (in pixels).\n     * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px.\n     */\n    get minBufferPx() {\n        return this._minBufferPx;\n    }\n    set minBufferPx(value) {\n        this._minBufferPx = coerceNumberProperty(value);\n    }\n    _minBufferPx = 100;\n    /**\n     * The number of pixels worth of buffer to render for when rendering new items. Defaults to 200px.\n     */\n    get maxBufferPx() {\n        return this._maxBufferPx;\n    }\n    set maxBufferPx(value) {\n        this._maxBufferPx = coerceNumberProperty(value);\n    }\n    _maxBufferPx = 200;\n    /** The scroll strategy used by this directive. */\n    _scrollStrategy = new FixedSizeVirtualScrollStrategy(this.itemSize, this.minBufferPx, this.maxBufferPx);\n    ngOnChanges() {\n        this._scrollStrategy.updateItemAndBufferSize(this.itemSize, this.minBufferPx, this.maxBufferPx);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkFixedSizeVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkFixedSizeVirtualScroll, isStandalone: true, selector: \"cdk-virtual-scroll-viewport[itemSize]\", inputs: { itemSize: \"itemSize\", minBufferPx: \"minBufferPx\", maxBufferPx: \"maxBufferPx\" }, providers: [\n            {\n                provide: VIRTUAL_SCROLL_STRATEGY,\n                useFactory: _fixedSizeVirtualScrollStrategyFactory,\n                deps: [forwardRef(() => CdkFixedSizeVirtualScroll)],\n            },\n        ], usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkFixedSizeVirtualScroll, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'cdk-virtual-scroll-viewport[itemSize]',\n                    providers: [\n                        {\n                            provide: VIRTUAL_SCROLL_STRATEGY,\n                            useFactory: _fixedSizeVirtualScrollStrategyFactory,\n                            deps: [forwardRef(() => CdkFixedSizeVirtualScroll)],\n                        },\n                    ],\n                }]\n        }], propDecorators: { itemSize: [{\n                type: Input\n            }], minBufferPx: [{\n                type: Input\n            }], maxBufferPx: [{\n                type: Input\n            }] } });\n\n/** Time in ms to throttle the scrolling events by default. */\nconst DEFAULT_SCROLL_TIME = 20;\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\nclass ScrollDispatcher {\n    _ngZone = inject(NgZone);\n    _platform = inject(Platform);\n    /** Used to reference correct document/window */\n    _document = inject(DOCUMENT, { optional: true });\n    constructor() { }\n    /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n    _scrolled = new Subject();\n    /** Keeps track of the global `scroll` and `resize` subscriptions. */\n    _globalSubscription = null;\n    /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n    _scrolledCount = 0;\n    /**\n     * Map of all the scrollable references that are registered with the service and their\n     * scroll event subscriptions.\n     */\n    scrollContainers = new Map();\n    /**\n     * Registers a scrollable instance with the service and listens for its scrolled events. When the\n     * scrollable is scrolled, the service emits the event to its scrolled observable.\n     * @param scrollable Scrollable instance to be registered.\n     */\n    register(scrollable) {\n        if (!this.scrollContainers.has(scrollable)) {\n            this.scrollContainers.set(scrollable, scrollable.elementScrolled().subscribe(() => this._scrolled.next(scrollable)));\n        }\n    }\n    /**\n     * De-registers a Scrollable reference and unsubscribes from its scroll event observable.\n     * @param scrollable Scrollable instance to be deregistered.\n     */\n    deregister(scrollable) {\n        const scrollableReference = this.scrollContainers.get(scrollable);\n        if (scrollableReference) {\n            scrollableReference.unsubscribe();\n            this.scrollContainers.delete(scrollable);\n        }\n    }\n    /**\n     * Returns an observable that emits an event whenever any of the registered Scrollable\n     * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n     * to override the default \"throttle\" time.\n     *\n     * **Note:** in order to avoid hitting change detection for every scroll event,\n     * all of the events emitted from this stream will be run outside the Angular zone.\n     * If you need to update any data bindings as a result of a scroll event, you have\n     * to run the callback using `NgZone.run`.\n     */\n    scrolled(auditTimeInMs = DEFAULT_SCROLL_TIME) {\n        if (!this._platform.isBrowser) {\n            return of();\n        }\n        return new Observable((observer) => {\n            if (!this._globalSubscription) {\n                this._addGlobalListener();\n            }\n            // In the case of a 0ms delay, use an observable without auditTime\n            // since it does add a perceptible delay in processing overhead.\n            const subscription = auditTimeInMs > 0\n                ? this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer)\n                : this._scrolled.subscribe(observer);\n            this._scrolledCount++;\n            return () => {\n                subscription.unsubscribe();\n                this._scrolledCount--;\n                if (!this._scrolledCount) {\n                    this._removeGlobalListener();\n                }\n            };\n        });\n    }\n    ngOnDestroy() {\n        this._removeGlobalListener();\n        this.scrollContainers.forEach((_, container) => this.deregister(container));\n        this._scrolled.complete();\n    }\n    /**\n     * Returns an observable that emits whenever any of the\n     * scrollable ancestors of an element are scrolled.\n     * @param elementOrElementRef Element whose ancestors to listen for.\n     * @param auditTimeInMs Time to throttle the scroll events.\n     */\n    ancestorScrolled(elementOrElementRef, auditTimeInMs) {\n        const ancestors = this.getAncestorScrollContainers(elementOrElementRef);\n        return this.scrolled(auditTimeInMs).pipe(filter(target => {\n            return !target || ancestors.indexOf(target) > -1;\n        }));\n    }\n    /** Returns all registered Scrollables that contain the provided element. */\n    getAncestorScrollContainers(elementOrElementRef) {\n        const scrollingContainers = [];\n        this.scrollContainers.forEach((_subscription, scrollable) => {\n            if (this._scrollableContainsElement(scrollable, elementOrElementRef)) {\n                scrollingContainers.push(scrollable);\n            }\n        });\n        return scrollingContainers;\n    }\n    /** Use defaultView of injected document if available or fallback to global window reference */\n    _getWindow() {\n        return this._document.defaultView || window;\n    }\n    /** Returns true if the element is contained within the provided Scrollable. */\n    _scrollableContainsElement(scrollable, elementOrElementRef) {\n        let element = coerceElement(elementOrElementRef);\n        let scrollableElement = scrollable.getElementRef().nativeElement;\n        // Traverse through the element parents until we reach null, checking if any of the elements\n        // are the scrollable's element.\n        do {\n            if (element == scrollableElement) {\n                return true;\n            }\n        } while ((element = element.parentElement));\n        return false;\n    }\n    /** Sets up the global scroll listeners. */\n    _addGlobalListener() {\n        this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n            const window = this._getWindow();\n            return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n        });\n    }\n    /** Cleans up the global scroll listener. */\n    _removeGlobalListener() {\n        if (this._globalSubscription) {\n            this._globalSubscription.unsubscribe();\n            this._globalSubscription = null;\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ScrollDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ScrollDispatcher, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ScrollDispatcher, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\n/**\n * Sends an event when the directive's element is scrolled. Registers itself with the\n * ScrollDispatcher service to include itself as part of its collection of scrolling events that it\n * can be listened to through the service.\n */\nclass CdkScrollable {\n    elementRef = inject(ElementRef);\n    scrollDispatcher = inject(ScrollDispatcher);\n    ngZone = inject(NgZone);\n    dir = inject(Directionality, { optional: true });\n    _destroyed = new Subject();\n    _elementScrolled = new Observable((observer) => this.ngZone.runOutsideAngular(() => fromEvent(this.elementRef.nativeElement, 'scroll')\n        .pipe(takeUntil(this._destroyed))\n        .subscribe(observer)));\n    constructor() { }\n    ngOnInit() {\n        this.scrollDispatcher.register(this);\n    }\n    ngOnDestroy() {\n        this.scrollDispatcher.deregister(this);\n        this._destroyed.next();\n        this._destroyed.complete();\n    }\n    /** Returns observable that emits when a scroll event is fired on the host element. */\n    elementScrolled() {\n        return this._elementScrolled;\n    }\n    /** Gets the ElementRef for the viewport. */\n    getElementRef() {\n        return this.elementRef;\n    }\n    /**\n     * Scrolls to the specified offsets. This is a normalized version of the browser's native scrollTo\n     * method, since browsers are not consistent about what scrollLeft means in RTL. For this method\n     * left and right always refer to the left and right side of the scrolling container irrespective\n     * of the layout direction. start and end refer to left and right in an LTR context and vice-versa\n     * in an RTL context.\n     * @param options specified the offsets to scroll to.\n     */\n    scrollTo(options) {\n        const el = this.elementRef.nativeElement;\n        const isRtl = this.dir && this.dir.value == 'rtl';\n        // Rewrite start & end offsets as right or left offsets.\n        if (options.left == null) {\n            options.left = isRtl ? options.end : options.start;\n        }\n        if (options.right == null) {\n            options.right = isRtl ? options.start : options.end;\n        }\n        // Rewrite the bottom offset as a top offset.\n        if (options.bottom != null) {\n            options.top =\n                el.scrollHeight - el.clientHeight - options.bottom;\n        }\n        // Rewrite the right offset as a left offset.\n        if (isRtl && getRtlScrollAxisType() != RtlScrollAxisType.NORMAL) {\n            if (options.left != null) {\n                options.right =\n                    el.scrollWidth - el.clientWidth - options.left;\n            }\n            if (getRtlScrollAxisType() == RtlScrollAxisType.INVERTED) {\n                options.left = options.right;\n            }\n            else if (getRtlScrollAxisType() == RtlScrollAxisType.NEGATED) {\n                options.left = options.right ? -options.right : options.right;\n            }\n        }\n        else {\n            if (options.right != null) {\n                options.left =\n                    el.scrollWidth - el.clientWidth - options.right;\n            }\n        }\n        this._applyScrollToOptions(options);\n    }\n    _applyScrollToOptions(options) {\n        const el = this.elementRef.nativeElement;\n        if (supportsScrollBehavior()) {\n            el.scrollTo(options);\n        }\n        else {\n            if (options.top != null) {\n                el.scrollTop = options.top;\n            }\n            if (options.left != null) {\n                el.scrollLeft = options.left;\n            }\n        }\n    }\n    /**\n     * Measures the scroll offset relative to the specified edge of the viewport. This method can be\n     * used instead of directly checking scrollLeft or scrollTop, since browsers are not consistent\n     * about what scrollLeft means in RTL. The values returned by this method are normalized such that\n     * left and right always refer to the left and right side of the scrolling container irrespective\n     * of the layout direction. start and end refer to left and right in an LTR context and vice-versa\n     * in an RTL context.\n     * @param from The edge to measure from.\n     */\n    measureScrollOffset(from) {\n        const LEFT = 'left';\n        const RIGHT = 'right';\n        const el = this.elementRef.nativeElement;\n        if (from == 'top') {\n            return el.scrollTop;\n        }\n        if (from == 'bottom') {\n            return el.scrollHeight - el.clientHeight - el.scrollTop;\n        }\n        // Rewrite start & end as left or right offsets.\n        const isRtl = this.dir && this.dir.value == 'rtl';\n        if (from == 'start') {\n            from = isRtl ? RIGHT : LEFT;\n        }\n        else if (from == 'end') {\n            from = isRtl ? LEFT : RIGHT;\n        }\n        if (isRtl && getRtlScrollAxisType() == RtlScrollAxisType.INVERTED) {\n            // For INVERTED, scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and\n            // 0 when scrolled all the way right.\n            if (from == LEFT) {\n                return el.scrollWidth - el.clientWidth - el.scrollLeft;\n            }\n            else {\n                return el.scrollLeft;\n            }\n        }\n        else if (isRtl && getRtlScrollAxisType() == RtlScrollAxisType.NEGATED) {\n            // For NEGATED, scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and\n            // 0 when scrolled all the way right.\n            if (from == LEFT) {\n                return el.scrollLeft + el.scrollWidth - el.clientWidth;\n            }\n            else {\n                return -el.scrollLeft;\n            }\n        }\n        else {\n            // For NORMAL, as well as non-RTL contexts, scrollLeft is 0 when scrolled all the way left and\n            // (scrollWidth - clientWidth) when scrolled all the way right.\n            if (from == LEFT) {\n                return el.scrollLeft;\n            }\n            else {\n                return el.scrollWidth - el.clientWidth - el.scrollLeft;\n            }\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkScrollable, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkScrollable, isStandalone: true, selector: \"[cdk-scrollable], [cdkScrollable]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkScrollable, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdk-scrollable], [cdkScrollable]',\n                }]\n        }], ctorParameters: () => [] });\n\n/** Time in ms to throttle the resize events by default. */\nconst DEFAULT_RESIZE_TIME = 20;\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\nclass ViewportRuler {\n    _platform = inject(Platform);\n    _listeners;\n    /** Cached viewport dimensions. */\n    _viewportSize;\n    /** Stream of viewport change events. */\n    _change = new Subject();\n    /** Used to reference correct document/window */\n    _document = inject(DOCUMENT, { optional: true });\n    constructor() {\n        const ngZone = inject(NgZone);\n        const renderer = inject(RendererFactory2).createRenderer(null, null);\n        ngZone.runOutsideAngular(() => {\n            if (this._platform.isBrowser) {\n                const changeListener = (event) => this._change.next(event);\n                this._listeners = [\n                    renderer.listen('window', 'resize', changeListener),\n                    renderer.listen('window', 'orientationchange', changeListener),\n                ];\n            }\n            // Clear the cached position so that the viewport is re-measured next time it is required.\n            // We don't need to keep track of the subscription, because it is completed on destroy.\n            this.change().subscribe(() => (this._viewportSize = null));\n        });\n    }\n    ngOnDestroy() {\n        this._listeners?.forEach(cleanup => cleanup());\n        this._change.complete();\n    }\n    /** Returns the viewport's width and height. */\n    getViewportSize() {\n        if (!this._viewportSize) {\n            this._updateViewportSize();\n        }\n        const output = { width: this._viewportSize.width, height: this._viewportSize.height };\n        // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n        if (!this._platform.isBrowser) {\n            this._viewportSize = null;\n        }\n        return output;\n    }\n    /** Gets a DOMRect for the viewport's bounds. */\n    getViewportRect() {\n        // Use the document element's bounding rect rather than the window scroll properties\n        // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n        // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n        // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n        // can disagree when the page is pinch-zoomed (on devices that support touch).\n        // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n        // We use the documentElement instead of the body because, by default (without a css reset)\n        // browsers typically give the document body an 8px margin, which is not included in\n        // getBoundingClientRect().\n        const scrollPosition = this.getViewportScrollPosition();\n        const { width, height } = this.getViewportSize();\n        return {\n            top: scrollPosition.top,\n            left: scrollPosition.left,\n            bottom: scrollPosition.top + height,\n            right: scrollPosition.left + width,\n            height,\n            width,\n        };\n    }\n    /** Gets the (top, left) scroll position of the viewport. */\n    getViewportScrollPosition() {\n        // While we can get a reference to the fake document\n        // during SSR, it doesn't have getBoundingClientRect.\n        if (!this._platform.isBrowser) {\n            return { top: 0, left: 0 };\n        }\n        // The top-left-corner of the viewport is determined by the scroll position of the document\n        // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n        // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n        // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n        // `document.documentElement` works consistently, where the `top` and `left` values will\n        // equal negative the scroll position.\n        const document = this._document;\n        const window = this._getWindow();\n        const documentElement = document.documentElement;\n        const documentRect = documentElement.getBoundingClientRect();\n        const top = -documentRect.top ||\n            document.body.scrollTop ||\n            window.scrollY ||\n            documentElement.scrollTop ||\n            0;\n        const left = -documentRect.left ||\n            document.body.scrollLeft ||\n            window.scrollX ||\n            documentElement.scrollLeft ||\n            0;\n        return { top, left };\n    }\n    /**\n     * Returns a stream that emits whenever the size of the viewport changes.\n     * This stream emits outside of the Angular zone.\n     * @param throttleTime Time in milliseconds to throttle the stream.\n     */\n    change(throttleTime = DEFAULT_RESIZE_TIME) {\n        return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n    }\n    /** Use defaultView of injected document if available or fallback to global window reference */\n    _getWindow() {\n        return this._document.defaultView || window;\n    }\n    /** Updates the cached viewport size. */\n    _updateViewportSize() {\n        const window = this._getWindow();\n        this._viewportSize = this._platform.isBrowser\n            ? { width: window.innerWidth, height: window.innerHeight }\n            : { width: 0, height: 0 };\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ViewportRuler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ViewportRuler, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ViewportRuler, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\nconst VIRTUAL_SCROLLABLE = new InjectionToken('VIRTUAL_SCROLLABLE');\n/**\n * Extending the {@link CdkScrollable} to be used as scrolling container for virtual scrolling.\n */\nclass CdkVirtualScrollable extends CdkScrollable {\n    constructor() {\n        super();\n    }\n    /**\n     * Measure the viewport size for the provided orientation.\n     *\n     * @param orientation The orientation to measure the size from.\n     */\n    measureViewportSize(orientation) {\n        const viewportEl = this.elementRef.nativeElement;\n        return orientation === 'horizontal' ? viewportEl.clientWidth : viewportEl.clientHeight;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkVirtualScrollable, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkVirtualScrollable, isStandalone: true, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkVirtualScrollable, decorators: [{\n            type: Directive\n        }], ctorParameters: () => [] });\n\n/** Checks if the given ranges are equal. */\nfunction rangesEqual(r1, r2) {\n    return r1.start == r2.start && r1.end == r2.end;\n}\n/**\n * Scheduler to be used for scroll events. Needs to fall back to\n * something that doesn't rely on requestAnimationFrame on environments\n * that don't support it (e.g. server-side rendering).\n */\nconst SCROLL_SCHEDULER = typeof requestAnimationFrame !== 'undefined' ? animationFrameScheduler : asapScheduler;\n/** A viewport that virtualizes its scrolling with the help of `CdkVirtualForOf`. */\nclass CdkVirtualScrollViewport extends CdkVirtualScrollable {\n    elementRef = inject(ElementRef);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _scrollStrategy = inject(VIRTUAL_SCROLL_STRATEGY, {\n        optional: true,\n    });\n    scrollable = inject(VIRTUAL_SCROLLABLE, { optional: true });\n    _platform = inject(Platform);\n    /** Emits when the viewport is detached from a CdkVirtualForOf. */\n    _detachedSubject = new Subject();\n    /** Emits when the rendered range changes. */\n    _renderedRangeSubject = new Subject();\n    /** The direction the viewport scrolls. */\n    get orientation() {\n        return this._orientation;\n    }\n    set orientation(orientation) {\n        if (this._orientation !== orientation) {\n            this._orientation = orientation;\n            this._calculateSpacerSize();\n        }\n    }\n    _orientation = 'vertical';\n    /**\n     * Whether rendered items should persist in the DOM after scrolling out of view. By default, items\n     * will be removed.\n     */\n    appendOnly = false;\n    // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll\n    // strategy lazily (i.e. only if the user is actually listening to the events). We do this because\n    // depending on how the strategy calculates the scrolled index, it may come at a cost to\n    // performance.\n    /** Emits when the index of the first element visible in the viewport changes. */\n    scrolledIndexChange = new Observable((observer) => this._scrollStrategy.scrolledIndexChange.subscribe(index => Promise.resolve().then(() => this.ngZone.run(() => observer.next(index)))));\n    /** The element that wraps the rendered content. */\n    _contentWrapper;\n    /** A stream that emits whenever the rendered range changes. */\n    renderedRangeStream = this._renderedRangeSubject;\n    /**\n     * The total size of all content (in pixels), including content that is not currently rendered.\n     */\n    _totalContentSize = 0;\n    /** A string representing the `style.width` property value to be used for the spacer element. */\n    _totalContentWidth = '';\n    /** A string representing the `style.height` property value to be used for the spacer element. */\n    _totalContentHeight = '';\n    /**\n     * The CSS transform applied to the rendered subset of items so that they appear within the bounds\n     * of the visible viewport.\n     */\n    _renderedContentTransform;\n    /** The currently rendered range of indices. */\n    _renderedRange = { start: 0, end: 0 };\n    /** The length of the data bound to this viewport (in number of items). */\n    _dataLength = 0;\n    /** The size of the viewport (in pixels). */\n    _viewportSize = 0;\n    /** the currently attached CdkVirtualScrollRepeater. */\n    _forOf;\n    /** The last rendered content offset that was set. */\n    _renderedContentOffset = 0;\n    /**\n     * Whether the last rendered content offset was to the end of the content (and therefore needs to\n     * be rewritten as an offset to the start of the content).\n     */\n    _renderedContentOffsetNeedsRewrite = false;\n    /** Whether there is a pending change detection cycle. */\n    _isChangeDetectionPending = false;\n    /** A list of functions to run after the next change detection cycle. */\n    _runAfterChangeDetection = [];\n    /** Subscription to changes in the viewport size. */\n    _viewportChanges = Subscription.EMPTY;\n    _injector = inject(Injector);\n    _isDestroyed = false;\n    constructor() {\n        super();\n        const viewportRuler = inject(ViewportRuler);\n        if (!this._scrollStrategy && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error('Error: cdk-virtual-scroll-viewport requires the \"itemSize\" property to be set.');\n        }\n        this._viewportChanges = viewportRuler.change().subscribe(() => {\n            this.checkViewportSize();\n        });\n        if (!this.scrollable) {\n            // No scrollable is provided, so the virtual-scroll-viewport needs to become a scrollable\n            this.elementRef.nativeElement.classList.add('cdk-virtual-scrollable');\n            this.scrollable = this;\n        }\n    }\n    ngOnInit() {\n        // Scrolling depends on the element dimensions which we can't get during SSR.\n        if (!this._platform.isBrowser) {\n            return;\n        }\n        if (this.scrollable === this) {\n            super.ngOnInit();\n        }\n        // It's still too early to measure the viewport at this point. Deferring with a promise allows\n        // the Viewport to be rendered with the correct size before we measure. We run this outside the\n        // zone to avoid causing more change detection cycles. We handle the change detection loop\n        // ourselves instead.\n        this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {\n            this._measureViewportSize();\n            this._scrollStrategy.attach(this);\n            this.scrollable\n                .elementScrolled()\n                .pipe(\n            // Start off with a fake scroll event so we properly detect our initial position.\n            startWith(null), \n            // Collect multiple events into one until the next animation frame. This way if\n            // there are multiple scroll events in the same frame we only need to recheck\n            // our layout once.\n            auditTime(0, SCROLL_SCHEDULER), \n            // Usually `elementScrolled` is completed when the scrollable is destroyed, but\n            // that may not be the case if a `CdkVirtualScrollableElement` is used so we have\n            // to unsubscribe here just in case.\n            takeUntil(this._destroyed))\n                .subscribe(() => this._scrollStrategy.onContentScrolled());\n            this._markChangeDetectionNeeded();\n        }));\n    }\n    ngOnDestroy() {\n        this.detach();\n        this._scrollStrategy.detach();\n        // Complete all subjects\n        this._renderedRangeSubject.complete();\n        this._detachedSubject.complete();\n        this._viewportChanges.unsubscribe();\n        this._isDestroyed = true;\n        super.ngOnDestroy();\n    }\n    /** Attaches a `CdkVirtualScrollRepeater` to this viewport. */\n    attach(forOf) {\n        if (this._forOf && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error('CdkVirtualScrollViewport is already attached.');\n        }\n        // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length\n        // changes. Run outside the zone to avoid triggering change detection, since we're managing the\n        // change detection loop ourselves.\n        this.ngZone.runOutsideAngular(() => {\n            this._forOf = forOf;\n            this._forOf.dataStream.pipe(takeUntil(this._detachedSubject)).subscribe(data => {\n                const newLength = data.length;\n                if (newLength !== this._dataLength) {\n                    this._dataLength = newLength;\n                    this._scrollStrategy.onDataLengthChanged();\n                }\n                this._doChangeDetection();\n            });\n        });\n    }\n    /** Detaches the current `CdkVirtualForOf`. */\n    detach() {\n        this._forOf = null;\n        this._detachedSubject.next();\n    }\n    /** Gets the length of the data bound to this viewport (in number of items). */\n    getDataLength() {\n        return this._dataLength;\n    }\n    /** Gets the size of the viewport (in pixels). */\n    getViewportSize() {\n        return this._viewportSize;\n    }\n    // TODO(mmalerba): This is technically out of sync with what's really rendered until a render\n    // cycle happens. I'm being careful to only call it after the render cycle is complete and before\n    // setting it to something else, but its error prone and should probably be split into\n    // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.\n    /** Get the current rendered range of items. */\n    getRenderedRange() {\n        return this._renderedRange;\n    }\n    measureBoundingClientRectWithScrollOffset(from) {\n        return this.getElementRef().nativeElement.getBoundingClientRect()[from];\n    }\n    /**\n     * Sets the total size of all content (in pixels), including content that is not currently\n     * rendered.\n     */\n    setTotalContentSize(size) {\n        if (this._totalContentSize !== size) {\n            this._totalContentSize = size;\n            this._calculateSpacerSize();\n            this._markChangeDetectionNeeded();\n        }\n    }\n    /** Sets the currently rendered range of indices. */\n    setRenderedRange(range) {\n        if (!rangesEqual(this._renderedRange, range)) {\n            if (this.appendOnly) {\n                range = { start: 0, end: Math.max(this._renderedRange.end, range.end) };\n            }\n            this._renderedRangeSubject.next((this._renderedRange = range));\n            this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());\n        }\n    }\n    /**\n     * Gets the offset from the start of the viewport to the start of the rendered data (in pixels).\n     */\n    getOffsetToRenderedContentStart() {\n        return this._renderedContentOffsetNeedsRewrite ? null : this._renderedContentOffset;\n    }\n    /**\n     * Sets the offset from the start of the viewport to either the start or end of the rendered data\n     * (in pixels).\n     */\n    setRenderedContentOffset(offset, to = 'to-start') {\n        // In appendOnly, we always start from the top\n        offset = this.appendOnly && to === 'to-start' ? 0 : offset;\n        // For a horizontal viewport in a right-to-left language we need to translate along the x-axis\n        // in the negative direction.\n        const isRtl = this.dir && this.dir.value == 'rtl';\n        const isHorizontal = this.orientation == 'horizontal';\n        const axis = isHorizontal ? 'X' : 'Y';\n        const axisDirection = isHorizontal && isRtl ? -1 : 1;\n        let transform = `translate${axis}(${Number(axisDirection * offset)}px)`;\n        this._renderedContentOffset = offset;\n        if (to === 'to-end') {\n            transform += ` translate${axis}(-100%)`;\n            // The viewport should rewrite this as a `to-start` offset on the next render cycle. Otherwise\n            // elements will appear to expand in the wrong direction (e.g. `mat-expansion-panel` would\n            // expand upward).\n            this._renderedContentOffsetNeedsRewrite = true;\n        }\n        if (this._renderedContentTransform != transform) {\n            // We know this value is safe because we parse `offset` with `Number()` before passing it\n            // into the string.\n            this._renderedContentTransform = transform;\n            this._markChangeDetectionNeeded(() => {\n                if (this._renderedContentOffsetNeedsRewrite) {\n                    this._renderedContentOffset -= this.measureRenderedContentSize();\n                    this._renderedContentOffsetNeedsRewrite = false;\n                    this.setRenderedContentOffset(this._renderedContentOffset);\n                }\n                else {\n                    this._scrollStrategy.onRenderedOffsetChanged();\n                }\n            });\n        }\n    }\n    /**\n     * Scrolls to the given offset from the start of the viewport. Please note that this is not always\n     * the same as setting `scrollTop` or `scrollLeft`. In a horizontal viewport with right-to-left\n     * direction, this would be the equivalent of setting a fictional `scrollRight` property.\n     * @param offset The offset to scroll to.\n     * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.\n     */\n    scrollToOffset(offset, behavior = 'auto') {\n        const options = { behavior };\n        if (this.orientation === 'horizontal') {\n            options.start = offset;\n        }\n        else {\n            options.top = offset;\n        }\n        this.scrollable.scrollTo(options);\n    }\n    /**\n     * Scrolls to the offset for the given index.\n     * @param index The index of the element to scroll to.\n     * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.\n     */\n    scrollToIndex(index, behavior = 'auto') {\n        this._scrollStrategy.scrollToIndex(index, behavior);\n    }\n    /**\n     * Gets the current scroll offset from the start of the scrollable (in pixels).\n     * @param from The edge to measure the offset from. Defaults to 'top' in vertical mode and 'start'\n     *     in horizontal mode.\n     */\n    measureScrollOffset(from) {\n        // This is to break the call cycle\n        let measureScrollOffset;\n        if (this.scrollable == this) {\n            measureScrollOffset = (_from) => super.measureScrollOffset(_from);\n        }\n        else {\n            measureScrollOffset = (_from) => this.scrollable.measureScrollOffset(_from);\n        }\n        return Math.max(0, measureScrollOffset(from ?? (this.orientation === 'horizontal' ? 'start' : 'top')) -\n            this.measureViewportOffset());\n    }\n    /**\n     * Measures the offset of the viewport from the scrolling container\n     * @param from The edge to measure from.\n     */\n    measureViewportOffset(from) {\n        let fromRect;\n        const LEFT = 'left';\n        const RIGHT = 'right';\n        const isRtl = this.dir?.value == 'rtl';\n        if (from == 'start') {\n            fromRect = isRtl ? RIGHT : LEFT;\n        }\n        else if (from == 'end') {\n            fromRect = isRtl ? LEFT : RIGHT;\n        }\n        else if (from) {\n            fromRect = from;\n        }\n        else {\n            fromRect = this.orientation === 'horizontal' ? 'left' : 'top';\n        }\n        const scrollerClientRect = this.scrollable.measureBoundingClientRectWithScrollOffset(fromRect);\n        const viewportClientRect = this.elementRef.nativeElement.getBoundingClientRect()[fromRect];\n        return viewportClientRect - scrollerClientRect;\n    }\n    /** Measure the combined size of all of the rendered items. */\n    measureRenderedContentSize() {\n        const contentEl = this._contentWrapper.nativeElement;\n        return this.orientation === 'horizontal' ? contentEl.offsetWidth : contentEl.offsetHeight;\n    }\n    /**\n     * Measure the total combined size of the given range. Throws if the range includes items that are\n     * not rendered.\n     */\n    measureRangeSize(range) {\n        if (!this._forOf) {\n            return 0;\n        }\n        return this._forOf.measureRangeSize(range, this.orientation);\n    }\n    /** Update the viewport dimensions and re-render. */\n    checkViewportSize() {\n        // TODO: Cleanup later when add logic for handling content resize\n        this._measureViewportSize();\n        this._scrollStrategy.onDataLengthChanged();\n    }\n    /** Measure the viewport size. */\n    _measureViewportSize() {\n        this._viewportSize = this.scrollable.measureViewportSize(this.orientation);\n    }\n    /** Queue up change detection to run. */\n    _markChangeDetectionNeeded(runAfter) {\n        if (runAfter) {\n            this._runAfterChangeDetection.push(runAfter);\n        }\n        // Use a Promise to batch together calls to `_doChangeDetection`. This way if we set a bunch of\n        // properties sequentially we only have to run `_doChangeDetection` once at the end.\n        if (!this._isChangeDetectionPending) {\n            this._isChangeDetectionPending = true;\n            this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {\n                this._doChangeDetection();\n            }));\n        }\n    }\n    /** Run change detection. */\n    _doChangeDetection() {\n        if (this._isDestroyed) {\n            return;\n        }\n        this.ngZone.run(() => {\n            // Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection\n            // from the root, since the repeated items are content projected in. Calling `detectChanges`\n            // instead does not properly check the projected content.\n            this._changeDetectorRef.markForCheck();\n            // Apply the content transform. The transform can't be set via an Angular binding because\n            // bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of\n            // string literals, a variable that can only be 'X' or 'Y', and user input that is run through\n            // the `Number` function first to coerce it to a numeric value.\n            this._contentWrapper.nativeElement.style.transform = this._renderedContentTransform;\n            afterNextRender(() => {\n                this._isChangeDetectionPending = false;\n                const runAfterChangeDetection = this._runAfterChangeDetection;\n                this._runAfterChangeDetection = [];\n                for (const fn of runAfterChangeDetection) {\n                    fn();\n                }\n            }, { injector: this._injector });\n        });\n    }\n    /** Calculates the `style.width` and `style.height` for the spacer element. */\n    _calculateSpacerSize() {\n        this._totalContentHeight =\n            this.orientation === 'horizontal' ? '' : `${this._totalContentSize}px`;\n        this._totalContentWidth =\n            this.orientation === 'horizontal' ? `${this._totalContentSize}px` : '';\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkVirtualScrollViewport, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"16.1.0\", version: \"19.0.0\", type: CdkVirtualScrollViewport, isStandalone: true, selector: \"cdk-virtual-scroll-viewport\", inputs: { orientation: \"orientation\", appendOnly: [\"appendOnly\", \"appendOnly\", booleanAttribute] }, outputs: { scrolledIndexChange: \"scrolledIndexChange\" }, host: { properties: { \"class.cdk-virtual-scroll-orientation-horizontal\": \"orientation === \\\"horizontal\\\"\", \"class.cdk-virtual-scroll-orientation-vertical\": \"orientation !== \\\"horizontal\\\"\" }, classAttribute: \"cdk-virtual-scroll-viewport\" }, providers: [\n            {\n                provide: CdkScrollable,\n                useFactory: (virtualScrollable, viewport) => virtualScrollable || viewport,\n                deps: [[new Optional(), new Inject(VIRTUAL_SCROLLABLE)], CdkVirtualScrollViewport],\n            },\n        ], viewQueries: [{ propertyName: \"_contentWrapper\", first: true, predicate: [\"contentWrapper\"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"<!--\\n  Wrap the rendered content in an element that will be used to offset it based on the scroll\\n  position.\\n-->\\n<div #contentWrapper class=\\\"cdk-virtual-scroll-content-wrapper\\\">\\n  <ng-content></ng-content>\\n</div>\\n<!--\\n  Spacer used to force the scrolling container to the correct size for the *total* number of items\\n  so that the scrollbar captures the size of the entire data set.\\n-->\\n<div class=\\\"cdk-virtual-scroll-spacer\\\"\\n     [style.width]=\\\"_totalContentWidth\\\" [style.height]=\\\"_totalContentHeight\\\"></div>\\n\", styles: [\"cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkVirtualScrollViewport, decorators: [{\n            type: Component,\n            args: [{ selector: 'cdk-virtual-scroll-viewport', host: {\n                        'class': 'cdk-virtual-scroll-viewport',\n                        '[class.cdk-virtual-scroll-orientation-horizontal]': 'orientation === \"horizontal\"',\n                        '[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== \"horizontal\"',\n                    }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [\n                        {\n                            provide: CdkScrollable,\n                            useFactory: (virtualScrollable, viewport) => virtualScrollable || viewport,\n                            deps: [[new Optional(), new Inject(VIRTUAL_SCROLLABLE)], CdkVirtualScrollViewport],\n                        },\n                    ], template: \"<!--\\n  Wrap the rendered content in an element that will be used to offset it based on the scroll\\n  position.\\n-->\\n<div #contentWrapper class=\\\"cdk-virtual-scroll-content-wrapper\\\">\\n  <ng-content></ng-content>\\n</div>\\n<!--\\n  Spacer used to force the scrolling container to the correct size for the *total* number of items\\n  so that the scrollbar captures the size of the entire data set.\\n-->\\n<div class=\\\"cdk-virtual-scroll-spacer\\\"\\n     [style.width]=\\\"_totalContentWidth\\\" [style.height]=\\\"_totalContentHeight\\\"></div>\\n\", styles: [\"cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}\"] }]\n        }], ctorParameters: () => [], propDecorators: { orientation: [{\n                type: Input\n            }], appendOnly: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], scrolledIndexChange: [{\n                type: Output\n            }], _contentWrapper: [{\n                type: ViewChild,\n                args: ['contentWrapper', { static: true }]\n            }] } });\n\n/** Helper to extract the offset of a DOM Node in a certain direction. */\nfunction getOffset(orientation, direction, node) {\n    const el = node;\n    if (!el.getBoundingClientRect) {\n        return 0;\n    }\n    const rect = el.getBoundingClientRect();\n    if (orientation === 'horizontal') {\n        return direction === 'start' ? rect.left : rect.right;\n    }\n    return direction === 'start' ? rect.top : rect.bottom;\n}\n/**\n * A directive similar to `ngForOf` to be used for rendering data inside a virtual scrolling\n * container.\n */\nclass CdkVirtualForOf {\n    _viewContainerRef = inject(ViewContainerRef);\n    _template = inject(TemplateRef);\n    _differs = inject(IterableDiffers);\n    _viewRepeater = inject(_VIEW_REPEATER_STRATEGY);\n    _viewport = inject(CdkVirtualScrollViewport, { skipSelf: true });\n    /** Emits when the rendered view of the data changes. */\n    viewChange = new Subject();\n    /** Subject that emits when a new DataSource instance is given. */\n    _dataSourceChanges = new Subject();\n    /** The DataSource to display. */\n    get cdkVirtualForOf() {\n        return this._cdkVirtualForOf;\n    }\n    set cdkVirtualForOf(value) {\n        this._cdkVirtualForOf = value;\n        if (isDataSource(value)) {\n            this._dataSourceChanges.next(value);\n        }\n        else {\n            // If value is an an NgIterable, convert it to an array.\n            this._dataSourceChanges.next(new ArrayDataSource(isObservable(value) ? value : Array.from(value || [])));\n        }\n    }\n    _cdkVirtualForOf;\n    /**\n     * The `TrackByFunction` to use for tracking changes. The `TrackByFunction` takes the index and\n     * the item and produces a value to be used as the item's identity when tracking changes.\n     */\n    get cdkVirtualForTrackBy() {\n        return this._cdkVirtualForTrackBy;\n    }\n    set cdkVirtualForTrackBy(fn) {\n        this._needsUpdate = true;\n        this._cdkVirtualForTrackBy = fn\n            ? (index, item) => fn(index + (this._renderedRange ? this._renderedRange.start : 0), item)\n            : undefined;\n    }\n    _cdkVirtualForTrackBy;\n    /** The template used to stamp out new elements. */\n    set cdkVirtualForTemplate(value) {\n        if (value) {\n            this._needsUpdate = true;\n            this._template = value;\n        }\n    }\n    /**\n     * The size of the cache used to store templates that are not being used for re-use later.\n     * Setting the cache size to `0` will disable caching. Defaults to 20 templates.\n     */\n    get cdkVirtualForTemplateCacheSize() {\n        return this._viewRepeater.viewCacheSize;\n    }\n    set cdkVirtualForTemplateCacheSize(size) {\n        this._viewRepeater.viewCacheSize = coerceNumberProperty(size);\n    }\n    /** Emits whenever the data in the current DataSource changes. */\n    dataStream = this._dataSourceChanges.pipe(\n    // Start off with null `DataSource`.\n    startWith(null), \n    // Bundle up the previous and current data sources so we can work with both.\n    pairwise(), \n    // Use `_changeDataSource` to disconnect from the previous data source and connect to the\n    // new one, passing back a stream of data changes which we run through `switchMap` to give\n    // us a data stream that emits the latest data from whatever the current `DataSource` is.\n    switchMap(([prev, cur]) => this._changeDataSource(prev, cur)), \n    // Replay the last emitted data when someone subscribes.\n    shareReplay(1));\n    /** The differ used to calculate changes to the data. */\n    _differ = null;\n    /** The most recent data emitted from the DataSource. */\n    _data;\n    /** The currently rendered items. */\n    _renderedItems;\n    /** The currently rendered range of indices. */\n    _renderedRange;\n    /** Whether the rendered data should be updated during the next ngDoCheck cycle. */\n    _needsUpdate = false;\n    _destroyed = new Subject();\n    constructor() {\n        const ngZone = inject(NgZone);\n        this.dataStream.subscribe(data => {\n            this._data = data;\n            this._onRenderedDataChange();\n        });\n        this._viewport.renderedRangeStream.pipe(takeUntil(this._destroyed)).subscribe(range => {\n            this._renderedRange = range;\n            if (this.viewChange.observers.length) {\n                ngZone.run(() => this.viewChange.next(this._renderedRange));\n            }\n            this._onRenderedDataChange();\n        });\n        this._viewport.attach(this);\n    }\n    /**\n     * Measures the combined size (width for horizontal orientation, height for vertical) of all items\n     * in the specified range. Throws an error if the range includes items that are not currently\n     * rendered.\n     */\n    measureRangeSize(range, orientation) {\n        if (range.start >= range.end) {\n            return 0;\n        }\n        if ((range.start < this._renderedRange.start || range.end > this._renderedRange.end) &&\n            (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error(`Error: attempted to measure an item that isn't rendered.`);\n        }\n        // The index into the list of rendered views for the first item in the range.\n        const renderedStartIndex = range.start - this._renderedRange.start;\n        // The length of the range we're measuring.\n        const rangeLen = range.end - range.start;\n        // Loop over all the views, find the first and land node and compute the size by subtracting\n        // the top of the first node from the bottom of the last one.\n        let firstNode;\n        let lastNode;\n        // Find the first node by starting from the beginning and going forwards.\n        for (let i = 0; i < rangeLen; i++) {\n            const view = this._viewContainerRef.get(i + renderedStartIndex);\n            if (view && view.rootNodes.length) {\n                firstNode = lastNode = view.rootNodes[0];\n                break;\n            }\n        }\n        // Find the last node by starting from the end and going backwards.\n        for (let i = rangeLen - 1; i > -1; i--) {\n            const view = this._viewContainerRef.get(i + renderedStartIndex);\n            if (view && view.rootNodes.length) {\n                lastNode = view.rootNodes[view.rootNodes.length - 1];\n                break;\n            }\n        }\n        return firstNode && lastNode\n            ? getOffset(orientation, 'end', lastNode) - getOffset(orientation, 'start', firstNode)\n            : 0;\n    }\n    ngDoCheck() {\n        if (this._differ && this._needsUpdate) {\n            // TODO(mmalerba): We should differentiate needs update due to scrolling and a new portion of\n            // this list being rendered (can use simpler algorithm) vs needs update due to data actually\n            // changing (need to do this diff).\n            const changes = this._differ.diff(this._renderedItems);\n            if (!changes) {\n                this._updateContext();\n            }\n            else {\n                this._applyChanges(changes);\n            }\n            this._needsUpdate = false;\n        }\n    }\n    ngOnDestroy() {\n        this._viewport.detach();\n        this._dataSourceChanges.next(undefined);\n        this._dataSourceChanges.complete();\n        this.viewChange.complete();\n        this._destroyed.next();\n        this._destroyed.complete();\n        this._viewRepeater.detach();\n    }\n    /** React to scroll state changes in the viewport. */\n    _onRenderedDataChange() {\n        if (!this._renderedRange) {\n            return;\n        }\n        this._renderedItems = this._data.slice(this._renderedRange.start, this._renderedRange.end);\n        if (!this._differ) {\n            // Use a wrapper function for the `trackBy` so any new values are\n            // picked up automatically without having to recreate the differ.\n            this._differ = this._differs.find(this._renderedItems).create((index, item) => {\n                return this.cdkVirtualForTrackBy ? this.cdkVirtualForTrackBy(index, item) : item;\n            });\n        }\n        this._needsUpdate = true;\n    }\n    /** Swap out one `DataSource` for another. */\n    _changeDataSource(oldDs, newDs) {\n        if (oldDs) {\n            oldDs.disconnect(this);\n        }\n        this._needsUpdate = true;\n        return newDs ? newDs.connect(this) : of();\n    }\n    /** Update the `CdkVirtualForOfContext` for all views. */\n    _updateContext() {\n        const count = this._data.length;\n        let i = this._viewContainerRef.length;\n        while (i--) {\n            const view = this._viewContainerRef.get(i);\n            view.context.index = this._renderedRange.start + i;\n            view.context.count = count;\n            this._updateComputedContextProperties(view.context);\n            view.detectChanges();\n        }\n    }\n    /** Apply changes to the DOM. */\n    _applyChanges(changes) {\n        this._viewRepeater.applyChanges(changes, this._viewContainerRef, (record, _adjustedPreviousIndex, currentIndex) => this._getEmbeddedViewArgs(record, currentIndex), record => record.item);\n        // Update $implicit for any items that had an identity change.\n        changes.forEachIdentityChange((record) => {\n            const view = this._viewContainerRef.get(record.currentIndex);\n            view.context.$implicit = record.item;\n        });\n        // Update the context variables on all items.\n        const count = this._data.length;\n        let i = this._viewContainerRef.length;\n        while (i--) {\n            const view = this._viewContainerRef.get(i);\n            view.context.index = this._renderedRange.start + i;\n            view.context.count = count;\n            this._updateComputedContextProperties(view.context);\n        }\n    }\n    /** Update the computed properties on the `CdkVirtualForOfContext`. */\n    _updateComputedContextProperties(context) {\n        context.first = context.index === 0;\n        context.last = context.index === context.count - 1;\n        context.even = context.index % 2 === 0;\n        context.odd = !context.even;\n    }\n    _getEmbeddedViewArgs(record, index) {\n        // Note that it's important that we insert the item directly at the proper index,\n        // rather than inserting it and the moving it in place, because if there's a directive\n        // on the same node that injects the `ViewContainerRef`, Angular will insert another\n        // comment node which can throw off the move when it's being repeated for all items.\n        return {\n            templateRef: this._template,\n            context: {\n                $implicit: record.item,\n                // It's guaranteed that the iterable is not \"undefined\" or \"null\" because we only\n                // generate views for elements if the \"cdkVirtualForOf\" iterable has elements.\n                cdkVirtualForOf: this._cdkVirtualForOf,\n                index: -1,\n                count: -1,\n                first: false,\n                last: false,\n                odd: false,\n                even: false,\n            },\n            index,\n        };\n    }\n    static ngTemplateContextGuard(directive, context) {\n        return true;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkVirtualForOf, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkVirtualForOf, isStandalone: true, selector: \"[cdkVirtualFor][cdkVirtualForOf]\", inputs: { cdkVirtualForOf: \"cdkVirtualForOf\", cdkVirtualForTrackBy: \"cdkVirtualForTrackBy\", cdkVirtualForTemplate: \"cdkVirtualForTemplate\", cdkVirtualForTemplateCacheSize: \"cdkVirtualForTemplateCacheSize\" }, providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkVirtualForOf, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkVirtualFor][cdkVirtualForOf]',\n                    providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }],\n                }]\n        }], ctorParameters: () => [], propDecorators: { cdkVirtualForOf: [{\n                type: Input\n            }], cdkVirtualForTrackBy: [{\n                type: Input\n            }], cdkVirtualForTemplate: [{\n                type: Input\n            }], cdkVirtualForTemplateCacheSize: [{\n                type: Input\n            }] } });\n\n/**\n * Provides a virtual scrollable for the element it is attached to.\n */\nclass CdkVirtualScrollableElement extends CdkVirtualScrollable {\n    constructor() {\n        super();\n    }\n    measureBoundingClientRectWithScrollOffset(from) {\n        return (this.getElementRef().nativeElement.getBoundingClientRect()[from] -\n            this.measureScrollOffset(from));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkVirtualScrollableElement, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkVirtualScrollableElement, isStandalone: true, selector: \"[cdkVirtualScrollingElement]\", host: { classAttribute: \"cdk-virtual-scrollable\" }, providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement }], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkVirtualScrollableElement, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkVirtualScrollingElement]',\n                    providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableElement }],\n                    host: {\n                        'class': 'cdk-virtual-scrollable',\n                    },\n                }]\n        }], ctorParameters: () => [] });\n\n/**\n * Provides as virtual scrollable for the global / window scrollbar.\n */\nclass CdkVirtualScrollableWindow extends CdkVirtualScrollable {\n    _elementScrolled = new Observable((observer) => this.ngZone.runOutsideAngular(() => fromEvent(document, 'scroll').pipe(takeUntil(this._destroyed)).subscribe(observer)));\n    constructor() {\n        super();\n        this.elementRef = new ElementRef(document.documentElement);\n    }\n    measureBoundingClientRectWithScrollOffset(from) {\n        return this.getElementRef().nativeElement.getBoundingClientRect()[from];\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkVirtualScrollableWindow, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkVirtualScrollableWindow, isStandalone: true, selector: \"cdk-virtual-scroll-viewport[scrollWindow]\", providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableWindow }], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkVirtualScrollableWindow, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'cdk-virtual-scroll-viewport[scrollWindow]',\n                    providers: [{ provide: VIRTUAL_SCROLLABLE, useExisting: CdkVirtualScrollableWindow }],\n                }]\n        }], ctorParameters: () => [] });\n\nclass CdkScrollableModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkScrollableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkScrollableModule, imports: [CdkScrollable], exports: [CdkScrollable] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkScrollableModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkScrollableModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    exports: [CdkScrollable],\n                    imports: [CdkScrollable],\n                }]\n        }] });\n/**\n * @docs-primary-export\n */\nclass ScrollingModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ScrollingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: ScrollingModule, imports: [BidiModule, CdkScrollableModule, CdkVirtualScrollViewport,\n            CdkFixedSizeVirtualScroll,\n            CdkVirtualForOf,\n            CdkVirtualScrollableWindow,\n            CdkVirtualScrollableElement], exports: [BidiModule, CdkScrollableModule, CdkFixedSizeVirtualScroll,\n            CdkVirtualForOf,\n            CdkVirtualScrollViewport,\n            CdkVirtualScrollableWindow,\n            CdkVirtualScrollableElement] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ScrollingModule, imports: [BidiModule,\n            CdkScrollableModule, BidiModule, CdkScrollableModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ScrollingModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [\n                        BidiModule,\n                        CdkScrollableModule,\n                        CdkVirtualScrollViewport,\n                        CdkFixedSizeVirtualScroll,\n                        CdkVirtualForOf,\n                        CdkVirtualScrollableWindow,\n                        CdkVirtualScrollableElement,\n                    ],\n                    exports: [\n                        BidiModule,\n                        CdkScrollableModule,\n                        CdkFixedSizeVirtualScroll,\n                        CdkVirtualForOf,\n                        CdkVirtualScrollViewport,\n                        CdkVirtualScrollableWindow,\n                        CdkVirtualScrollableElement,\n                    ],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CdkFixedSizeVirtualScroll, CdkScrollable, CdkScrollableModule, CdkVirtualForOf, CdkVirtualScrollViewport, CdkVirtualScrollable, CdkVirtualScrollableElement, CdkVirtualScrollableWindow, DEFAULT_RESIZE_TIME, DEFAULT_SCROLL_TIME, FixedSizeVirtualScrollStrategy, ScrollDispatcher, ScrollingModule, VIRTUAL_SCROLLABLE, VIRTUAL_SCROLL_STRATEGY, ViewportRuler, _fixedSizeVirtualScrollStrategyFactory };\n","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge(...args) {\n    const scheduler = popScheduler(args);\n    const concurrent = popNumber(args, Infinity);\n    const sources = args;\n    return !sources.length\n        ?\n            EMPTY\n        : sources.length === 1\n            ?\n                innerFrom(sources[0])\n            :\n                mergeAll(concurrent)(from(sources, scheduler));\n}\n","import { ScrollDispatcher, ViewportRuler, ScrollingModule } from '@angular/cdk/scrolling';\nexport { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling';\nimport { DOCUMENT, Location } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, NgZone, Injectable, RendererFactory2, Component, ChangeDetectionStrategy, ViewEncapsulation, untracked, afterRender, afterNextRender, ElementRef, Injector, ANIMATION_MODULE_TYPE, EnvironmentInjector, ApplicationRef, InjectionToken, Directive, EventEmitter, TemplateRef, ViewContainerRef, booleanAttribute, Input, Output, NgModule } from '@angular/core';\nimport { coerceCssPixelValue, coerceArray } from '@angular/cdk/coercion';\nimport { supportsScrollBehavior, Platform, _getEventTarget, _isTestEnvironment } from '@angular/cdk/platform';\nimport { filter, takeUntil, takeWhile } from 'rxjs/operators';\nimport { Directionality, BidiModule } from '@angular/cdk/bidi';\nimport { DomPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport { _IdGenerator } from '@angular/cdk/a11y';\nimport { _CdkPrivateStyleLoader } from '@angular/cdk/private';\nimport { Subject, Subscription, merge } from 'rxjs';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\n\nconst scrollBehaviorSupported = supportsScrollBehavior();\n/**\n * Strategy that will prevent the user from scrolling while the overlay is visible.\n */\nclass BlockScrollStrategy {\n    _viewportRuler;\n    _previousHTMLStyles = { top: '', left: '' };\n    _previousScrollPosition;\n    _isEnabled = false;\n    _document;\n    constructor(_viewportRuler, document) {\n        this._viewportRuler = _viewportRuler;\n        this._document = document;\n    }\n    /** Attaches this scroll strategy to an overlay. */\n    attach() { }\n    /** Blocks page-level scroll while the attached overlay is open. */\n    enable() {\n        if (this._canBeEnabled()) {\n            const root = this._document.documentElement;\n            this._previousScrollPosition = this._viewportRuler.getViewportScrollPosition();\n            // Cache the previous inline styles in case the user had set them.\n            this._previousHTMLStyles.left = root.style.left || '';\n            this._previousHTMLStyles.top = root.style.top || '';\n            // Note: we're using the `html` node, instead of the `body`, because the `body` may\n            // have the user agent margin, whereas the `html` is guaranteed not to have one.\n            root.style.left = coerceCssPixelValue(-this._previousScrollPosition.left);\n            root.style.top = coerceCssPixelValue(-this._previousScrollPosition.top);\n            root.classList.add('cdk-global-scrollblock');\n            this._isEnabled = true;\n        }\n    }\n    /** Unblocks page-level scroll while the attached overlay is open. */\n    disable() {\n        if (this._isEnabled) {\n            const html = this._document.documentElement;\n            const body = this._document.body;\n            const htmlStyle = html.style;\n            const bodyStyle = body.style;\n            const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || '';\n            const previousBodyScrollBehavior = bodyStyle.scrollBehavior || '';\n            this._isEnabled = false;\n            htmlStyle.left = this._previousHTMLStyles.left;\n            htmlStyle.top = this._previousHTMLStyles.top;\n            html.classList.remove('cdk-global-scrollblock');\n            // Disable user-defined smooth scrolling temporarily while we restore the scroll position.\n            // See https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior\n            // Note that we don't mutate the property if the browser doesn't support `scroll-behavior`,\n            // because it can throw off feature detections in `supportsScrollBehavior` which\n            // checks for `'scrollBehavior' in documentElement.style`.\n            if (scrollBehaviorSupported) {\n                htmlStyle.scrollBehavior = bodyStyle.scrollBehavior = 'auto';\n            }\n            window.scroll(this._previousScrollPosition.left, this._previousScrollPosition.top);\n            if (scrollBehaviorSupported) {\n                htmlStyle.scrollBehavior = previousHtmlScrollBehavior;\n                bodyStyle.scrollBehavior = previousBodyScrollBehavior;\n            }\n        }\n    }\n    _canBeEnabled() {\n        // Since the scroll strategies can't be singletons, we have to use a global CSS class\n        // (`cdk-global-scrollblock`) to make sure that we don't try to disable global\n        // scrolling multiple times.\n        const html = this._document.documentElement;\n        if (html.classList.contains('cdk-global-scrollblock') || this._isEnabled) {\n            return false;\n        }\n        const body = this._document.body;\n        const viewport = this._viewportRuler.getViewportSize();\n        return body.scrollHeight > viewport.height || body.scrollWidth > viewport.width;\n    }\n}\n\n/**\n * Returns an error to be thrown when attempting to attach an already-attached scroll strategy.\n */\nfunction getMatScrollStrategyAlreadyAttachedError() {\n    return Error(`Scroll strategy has already been attached.`);\n}\n\n/**\n * Strategy that will close the overlay as soon as the user starts scrolling.\n */\nclass CloseScrollStrategy {\n    _scrollDispatcher;\n    _ngZone;\n    _viewportRuler;\n    _config;\n    _scrollSubscription = null;\n    _overlayRef;\n    _initialScrollPosition;\n    constructor(_scrollDispatcher, _ngZone, _viewportRuler, _config) {\n        this._scrollDispatcher = _scrollDispatcher;\n        this._ngZone = _ngZone;\n        this._viewportRuler = _viewportRuler;\n        this._config = _config;\n    }\n    /** Attaches this scroll strategy to an overlay. */\n    attach(overlayRef) {\n        if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getMatScrollStrategyAlreadyAttachedError();\n        }\n        this._overlayRef = overlayRef;\n    }\n    /** Enables the closing of the attached overlay on scroll. */\n    enable() {\n        if (this._scrollSubscription) {\n            return;\n        }\n        const stream = this._scrollDispatcher.scrolled(0).pipe(filter(scrollable => {\n            return (!scrollable ||\n                !this._overlayRef.overlayElement.contains(scrollable.getElementRef().nativeElement));\n        }));\n        if (this._config && this._config.threshold && this._config.threshold > 1) {\n            this._initialScrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n            this._scrollSubscription = stream.subscribe(() => {\n                const scrollPosition = this._viewportRuler.getViewportScrollPosition().top;\n                if (Math.abs(scrollPosition - this._initialScrollPosition) > this._config.threshold) {\n                    this._detach();\n                }\n                else {\n                    this._overlayRef.updatePosition();\n                }\n            });\n        }\n        else {\n            this._scrollSubscription = stream.subscribe(this._detach);\n        }\n    }\n    /** Disables the closing the attached overlay on scroll. */\n    disable() {\n        if (this._scrollSubscription) {\n            this._scrollSubscription.unsubscribe();\n            this._scrollSubscription = null;\n        }\n    }\n    detach() {\n        this.disable();\n        this._overlayRef = null;\n    }\n    /** Detaches the overlay ref and disables the scroll strategy. */\n    _detach = () => {\n        this.disable();\n        if (this._overlayRef.hasAttached()) {\n            this._ngZone.run(() => this._overlayRef.detach());\n        }\n    };\n}\n\n/** Scroll strategy that doesn't do anything. */\nclass NoopScrollStrategy {\n    /** Does nothing, as this scroll strategy is a no-op. */\n    enable() { }\n    /** Does nothing, as this scroll strategy is a no-op. */\n    disable() { }\n    /** Does nothing, as this scroll strategy is a no-op. */\n    attach() { }\n}\n\n/**\n * Gets whether an element is scrolled outside of view by any of its parent scrolling containers.\n * @param element Dimensions of the element (from getBoundingClientRect)\n * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @returns Whether the element is scrolled out of view\n * @docs-private\n */\nfunction isElementScrolledOutsideView(element, scrollContainers) {\n    return scrollContainers.some(containerBounds => {\n        const outsideAbove = element.bottom < containerBounds.top;\n        const outsideBelow = element.top > containerBounds.bottom;\n        const outsideLeft = element.right < containerBounds.left;\n        const outsideRight = element.left > containerBounds.right;\n        return outsideAbove || outsideBelow || outsideLeft || outsideRight;\n    });\n}\n/**\n * Gets whether an element is clipped by any of its scrolling containers.\n * @param element Dimensions of the element (from getBoundingClientRect)\n * @param scrollContainers Dimensions of element's scrolling containers (from getBoundingClientRect)\n * @returns Whether the element is clipped\n * @docs-private\n */\nfunction isElementClippedByScrolling(element, scrollContainers) {\n    return scrollContainers.some(scrollContainerRect => {\n        const clippedAbove = element.top < scrollContainerRect.top;\n        const clippedBelow = element.bottom > scrollContainerRect.bottom;\n        const clippedLeft = element.left < scrollContainerRect.left;\n        const clippedRight = element.right > scrollContainerRect.right;\n        return clippedAbove || clippedBelow || clippedLeft || clippedRight;\n    });\n}\n\n/**\n * Strategy that will update the element position as the user is scrolling.\n */\nclass RepositionScrollStrategy {\n    _scrollDispatcher;\n    _viewportRuler;\n    _ngZone;\n    _config;\n    _scrollSubscription = null;\n    _overlayRef;\n    constructor(_scrollDispatcher, _viewportRuler, _ngZone, _config) {\n        this._scrollDispatcher = _scrollDispatcher;\n        this._viewportRuler = _viewportRuler;\n        this._ngZone = _ngZone;\n        this._config = _config;\n    }\n    /** Attaches this scroll strategy to an overlay. */\n    attach(overlayRef) {\n        if (this._overlayRef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getMatScrollStrategyAlreadyAttachedError();\n        }\n        this._overlayRef = overlayRef;\n    }\n    /** Enables repositioning of the attached overlay on scroll. */\n    enable() {\n        if (!this._scrollSubscription) {\n            const throttle = this._config ? this._config.scrollThrottle : 0;\n            this._scrollSubscription = this._scrollDispatcher.scrolled(throttle).subscribe(() => {\n                this._overlayRef.updatePosition();\n                // TODO(crisbeto): make `close` on by default once all components can handle it.\n                if (this._config && this._config.autoClose) {\n                    const overlayRect = this._overlayRef.overlayElement.getBoundingClientRect();\n                    const { width, height } = this._viewportRuler.getViewportSize();\n                    // TODO(crisbeto): include all ancestor scroll containers here once\n                    // we have a way of exposing the trigger element to the scroll strategy.\n                    const parentRects = [{ width, height, bottom: height, right: width, top: 0, left: 0 }];\n                    if (isElementScrolledOutsideView(overlayRect, parentRects)) {\n                        this.disable();\n                        this._ngZone.run(() => this._overlayRef.detach());\n                    }\n                }\n            });\n        }\n    }\n    /** Disables repositioning of the attached overlay on scroll. */\n    disable() {\n        if (this._scrollSubscription) {\n            this._scrollSubscription.unsubscribe();\n            this._scrollSubscription = null;\n        }\n    }\n    detach() {\n        this.disable();\n        this._overlayRef = null;\n    }\n}\n\n/**\n * Options for how an overlay will handle scrolling.\n *\n * Users can provide a custom value for `ScrollStrategyOptions` to replace the default\n * behaviors. This class primarily acts as a factory for ScrollStrategy instances.\n */\nclass ScrollStrategyOptions {\n    _scrollDispatcher = inject(ScrollDispatcher);\n    _viewportRuler = inject(ViewportRuler);\n    _ngZone = inject(NgZone);\n    _document = inject(DOCUMENT);\n    constructor() { }\n    /** Do nothing on scroll. */\n    noop = () => new NoopScrollStrategy();\n    /**\n     * Close the overlay as soon as the user scrolls.\n     * @param config Configuration to be used inside the scroll strategy.\n     */\n    close = (config) => new CloseScrollStrategy(this._scrollDispatcher, this._ngZone, this._viewportRuler, config);\n    /** Block scrolling. */\n    block = () => new BlockScrollStrategy(this._viewportRuler, this._document);\n    /**\n     * Update the overlay's position on scroll.\n     * @param config Configuration to be used inside the scroll strategy.\n     * Allows debouncing the reposition calls.\n     */\n    reposition = (config) => new RepositionScrollStrategy(this._scrollDispatcher, this._viewportRuler, this._ngZone, config);\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ScrollStrategyOptions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ScrollStrategyOptions, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: ScrollStrategyOptions, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\n/** Initial configuration used when creating an overlay. */\nclass OverlayConfig {\n    /** Strategy with which to position the overlay. */\n    positionStrategy;\n    /** Strategy to be used when handling scroll events while the overlay is open. */\n    scrollStrategy = new NoopScrollStrategy();\n    /** Custom class to add to the overlay pane. */\n    panelClass = '';\n    /** Whether the overlay has a backdrop. */\n    hasBackdrop = false;\n    /** Custom class to add to the backdrop */\n    backdropClass = 'cdk-overlay-dark-backdrop';\n    /** The width of the overlay panel. If a number is provided, pixel units are assumed. */\n    width;\n    /** The height of the overlay panel. If a number is provided, pixel units are assumed. */\n    height;\n    /** The min-width of the overlay panel. If a number is provided, pixel units are assumed. */\n    minWidth;\n    /** The min-height of the overlay panel. If a number is provided, pixel units are assumed. */\n    minHeight;\n    /** The max-width of the overlay panel. If a number is provided, pixel units are assumed. */\n    maxWidth;\n    /** The max-height of the overlay panel. If a number is provided, pixel units are assumed. */\n    maxHeight;\n    /**\n     * Direction of the text in the overlay panel. If a `Directionality` instance\n     * is passed in, the overlay will handle changes to its value automatically.\n     */\n    direction;\n    /**\n     * Whether the overlay should be disposed of when the user goes backwards/forwards in history.\n     * Note that this usually doesn't include clicking on links (unless the user is using\n     * the `HashLocationStrategy`).\n     */\n    disposeOnNavigation = false;\n    constructor(config) {\n        if (config) {\n            // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,\n            // loses the array generic type in the `for of`. But we *also* have to use `Array` because\n            // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`\n            const configKeys = Object.keys(config);\n            for (const key of configKeys) {\n                if (config[key] !== undefined) {\n                    // TypeScript, as of version 3.5, sees the left-hand-side of this expression\n                    // as \"I don't know *which* key this is, so the only valid value is the intersection\n                    // of all the possible values.\" In this case, that happens to be `undefined`. TypeScript\n                    // is not smart enough to see that the right-hand-side is actually an access of the same\n                    // exact type with the same exact key, meaning that the value type must be identical.\n                    // So we use `any` to work around this.\n                    this[key] = config[key];\n                }\n            }\n        }\n    }\n}\n\n/** The points of the origin element and the overlay element to connect. */\nclass ConnectionPositionPair {\n    offsetX;\n    offsetY;\n    panelClass;\n    /** X-axis attachment point for connected overlay origin. Can be 'start', 'end', or 'center'. */\n    originX;\n    /** Y-axis attachment point for connected overlay origin. Can be 'top', 'bottom', or 'center'. */\n    originY;\n    /** X-axis attachment point for connected overlay. Can be 'start', 'end', or 'center'. */\n    overlayX;\n    /** Y-axis attachment point for connected overlay. Can be 'top', 'bottom', or 'center'. */\n    overlayY;\n    constructor(origin, overlay, \n    /** Offset along the X axis. */\n    offsetX, \n    /** Offset along the Y axis. */\n    offsetY, \n    /** Class(es) to be applied to the panel while this position is active. */\n    panelClass) {\n        this.offsetX = offsetX;\n        this.offsetY = offsetY;\n        this.panelClass = panelClass;\n        this.originX = origin.originX;\n        this.originY = origin.originY;\n        this.overlayX = overlay.overlayX;\n        this.overlayY = overlay.overlayY;\n    }\n}\n/**\n * Set of properties regarding the position of the origin and overlay relative to the viewport\n * with respect to the containing Scrollable elements.\n *\n * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the\n * bounds of any one of the strategy's Scrollable's bounding client rectangle.\n *\n * The overlay and origin are outside view if there is no overlap between their bounding client\n * rectangle and any one of the strategy's Scrollable's bounding client rectangle.\n *\n *       -----------                    -----------\n *       | outside |                    | clipped |\n *       |  view   |              --------------------------\n *       |         |              |     |         |        |\n *       ----------               |     -----------        |\n *  --------------------------    |                        |\n *  |                        |    |      Scrollable        |\n *  |                        |    |                        |\n *  |                        |     --------------------------\n *  |      Scrollable        |\n *  |                        |\n *  --------------------------\n *\n *  @docs-private\n */\nclass ScrollingVisibility {\n    isOriginClipped;\n    isOriginOutsideView;\n    isOverlayClipped;\n    isOverlayOutsideView;\n}\n/** The change event emitted by the strategy when a fallback position is used. */\nclass ConnectedOverlayPositionChange {\n    connectionPair;\n    scrollableViewProperties;\n    constructor(\n    /** The position used as a result of this change. */\n    connectionPair, \n    /** @docs-private */\n    scrollableViewProperties) {\n        this.connectionPair = connectionPair;\n        this.scrollableViewProperties = scrollableViewProperties;\n    }\n}\n/**\n * Validates whether a vertical position property matches the expected values.\n * @param property Name of the property being validated.\n * @param value Value of the property being validated.\n * @docs-private\n */\nfunction validateVerticalPosition(property, value) {\n    if (value !== 'top' && value !== 'bottom' && value !== 'center') {\n        throw Error(`ConnectedPosition: Invalid ${property} \"${value}\". ` +\n            `Expected \"top\", \"bottom\" or \"center\".`);\n    }\n}\n/**\n * Validates whether a horizontal position property matches the expected values.\n * @param property Name of the property being validated.\n * @param value Value of the property being validated.\n * @docs-private\n */\nfunction validateHorizontalPosition(property, value) {\n    if (value !== 'start' && value !== 'end' && value !== 'center') {\n        throw Error(`ConnectedPosition: Invalid ${property} \"${value}\". ` +\n            `Expected \"start\", \"end\" or \"center\".`);\n    }\n}\n\n/**\n * Service for dispatching events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nclass BaseOverlayDispatcher {\n    /** Currently attached overlays in the order they were attached. */\n    _attachedOverlays = [];\n    _document = inject(DOCUMENT);\n    _isAttached;\n    constructor() { }\n    ngOnDestroy() {\n        this.detach();\n    }\n    /** Add a new overlay to the list of attached overlay refs. */\n    add(overlayRef) {\n        // Ensure that we don't get the same overlay multiple times.\n        this.remove(overlayRef);\n        this._attachedOverlays.push(overlayRef);\n    }\n    /** Remove an overlay from the list of attached overlay refs. */\n    remove(overlayRef) {\n        const index = this._attachedOverlays.indexOf(overlayRef);\n        if (index > -1) {\n            this._attachedOverlays.splice(index, 1);\n        }\n        // Remove the global listener once there are no more overlays.\n        if (this._attachedOverlays.length === 0) {\n            this.detach();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: BaseOverlayDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: BaseOverlayDispatcher, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: BaseOverlayDispatcher, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\n/**\n * Service for dispatching keyboard events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nclass OverlayKeyboardDispatcher extends BaseOverlayDispatcher {\n    _ngZone = inject(NgZone);\n    _renderer = inject(RendererFactory2).createRenderer(null, null);\n    _cleanupKeydown;\n    /** Add a new overlay to the list of attached overlay refs. */\n    add(overlayRef) {\n        super.add(overlayRef);\n        // Lazily start dispatcher once first overlay is added\n        if (!this._isAttached) {\n            this._ngZone.runOutsideAngular(() => {\n                this._cleanupKeydown = this._renderer.listen('body', 'keydown', this._keydownListener);\n            });\n            this._isAttached = true;\n        }\n    }\n    /** Detaches the global keyboard event listener. */\n    detach() {\n        if (this._isAttached) {\n            this._cleanupKeydown?.();\n            this._isAttached = false;\n        }\n    }\n    /** Keyboard event listener that will be attached to the body. */\n    _keydownListener = (event) => {\n        const overlays = this._attachedOverlays;\n        for (let i = overlays.length - 1; i > -1; i--) {\n            // Dispatch the keydown event to the top overlay which has subscribers to its keydown events.\n            // We want to target the most recent overlay, rather than trying to match where the event came\n            // from, because some components might open an overlay, but keep focus on a trigger element\n            // (e.g. for select and autocomplete). We skip overlays without keydown event subscriptions,\n            // because we don't want overlays that don't handle keyboard events to block the ones below\n            // them that do.\n            if (overlays[i]._keydownEvents.observers.length > 0) {\n                this._ngZone.run(() => overlays[i]._keydownEvents.next(event));\n                break;\n            }\n        }\n    };\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayKeyboardDispatcher, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayKeyboardDispatcher, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayKeyboardDispatcher, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n\n/**\n * Service for dispatching mouse click events that land on the body to appropriate overlay ref,\n * if any. It maintains a list of attached overlays to determine best suited overlay based\n * on event target and order of overlay opens.\n */\nclass OverlayOutsideClickDispatcher extends BaseOverlayDispatcher {\n    _platform = inject(Platform);\n    _ngZone = inject(NgZone, { optional: true });\n    _cursorOriginalValue;\n    _cursorStyleIsSet = false;\n    _pointerDownEventTarget;\n    /** Add a new overlay to the list of attached overlay refs. */\n    add(overlayRef) {\n        super.add(overlayRef);\n        // Safari on iOS does not generate click events for non-interactive\n        // elements. However, we want to receive a click for any element outside\n        // the overlay. We can force a \"clickable\" state by setting\n        // `cursor: pointer` on the document body. See:\n        // https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event#Safari_Mobile\n        // https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html\n        if (!this._isAttached) {\n            const body = this._document.body;\n            /** @breaking-change 14.0.0 _ngZone will be required. */\n            if (this._ngZone) {\n                this._ngZone.runOutsideAngular(() => this._addEventListeners(body));\n            }\n            else {\n                this._addEventListeners(body);\n            }\n            // click event is not fired on iOS. To make element \"clickable\" we are\n            // setting the cursor to pointer\n            if (this._platform.IOS && !this._cursorStyleIsSet) {\n                this._cursorOriginalValue = body.style.cursor;\n                body.style.cursor = 'pointer';\n                this._cursorStyleIsSet = true;\n            }\n            this._isAttached = true;\n        }\n    }\n    /** Detaches the global keyboard event listener. */\n    detach() {\n        if (this._isAttached) {\n            const body = this._document.body;\n            body.removeEventListener('pointerdown', this._pointerDownListener, true);\n            body.removeEventListener('click', this._clickListener, true);\n            body.removeEventListener('auxclick', this._clickListener, true);\n            body.removeEventListener('contextmenu', this._clickListener, true);\n            if (this._platform.IOS && this._cursorStyleIsSet) {\n                body.style.cursor = this._cursorOriginalValue;\n                this._cursorStyleIsSet = false;\n            }\n            this._isAttached = false;\n        }\n    }\n    _addEventListeners(body) {\n        body.addEventListener('pointerdown', this._pointerDownListener, true);\n        body.addEventListener('click', this._clickListener, true);\n        body.addEventListener('auxclick', this._clickListener, true);\n        body.addEventListener('contextmenu', this._clickListener, true);\n    }\n    /** Store pointerdown event target to track origin of click. */\n    _pointerDownListener = (event) => {\n        this._pointerDownEventTarget = _getEventTarget(event);\n    };\n    /** Click event listener that will be attached to the body propagate phase. */\n    _clickListener = (event) => {\n        const target = _getEventTarget(event);\n        // In case of a click event, we want to check the origin of the click\n        // (e.g. in case where a user starts a click inside the overlay and\n        // releases the click outside of it).\n        // This is done by using the event target of the preceding pointerdown event.\n        // Every click event caused by a pointer device has a preceding pointerdown\n        // event, unless the click was programmatically triggered (e.g. in a unit test).\n        const origin = event.type === 'click' && this._pointerDownEventTarget\n            ? this._pointerDownEventTarget\n            : target;\n        // Reset the stored pointerdown event target, to avoid having it interfere\n        // in subsequent events.\n        this._pointerDownEventTarget = null;\n        // We copy the array because the original may be modified asynchronously if the\n        // outsidePointerEvents listener decides to detach overlays resulting in index errors inside\n        // the for loop.\n        const overlays = this._attachedOverlays.slice();\n        // Dispatch the mouse event to the top overlay which has subscribers to its mouse events.\n        // We want to target all overlays for which the click could be considered as outside click.\n        // As soon as we reach an overlay for which the click is not outside click we break off\n        // the loop.\n        for (let i = overlays.length - 1; i > -1; i--) {\n            const overlayRef = overlays[i];\n            if (overlayRef._outsidePointerEvents.observers.length < 1 || !overlayRef.hasAttached()) {\n                continue;\n            }\n            // If it's a click inside the overlay, just break - we should do nothing\n            // If it's an outside click (both origin and target of the click) dispatch the mouse event,\n            // and proceed with the next overlay\n            if (containsPierceShadowDom(overlayRef.overlayElement, target) ||\n                containsPierceShadowDom(overlayRef.overlayElement, origin)) {\n                break;\n            }\n            const outsidePointerEvents = overlayRef._outsidePointerEvents;\n            /** @breaking-change 14.0.0 _ngZone will be required. */\n            if (this._ngZone) {\n                this._ngZone.run(() => outsidePointerEvents.next(event));\n            }\n            else {\n                outsidePointerEvents.next(event);\n            }\n        }\n    };\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayOutsideClickDispatcher, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayOutsideClickDispatcher, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayOutsideClickDispatcher, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n/** Version of `Element.contains` that transcends shadow DOM boundaries. */\nfunction containsPierceShadowDom(parent, child) {\n    const supportsShadowRoot = typeof ShadowRoot !== 'undefined' && ShadowRoot;\n    let current = child;\n    while (current) {\n        if (current === parent) {\n            return true;\n        }\n        current =\n            supportsShadowRoot && current instanceof ShadowRoot ? current.host : current.parentNode;\n    }\n    return false;\n}\n\nclass _CdkOverlayStyleLoader {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _CdkOverlayStyleLoader, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: _CdkOverlayStyleLoader, isStandalone: true, selector: \"ng-component\", host: { attributes: { \"cdk-overlay-style-loader\": \"\" } }, ngImport: i0, template: '', isInline: true, styles: [\".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _CdkOverlayStyleLoader, decorators: [{\n            type: Component,\n            args: [{ template: '', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'cdk-overlay-style-loader': '' }, styles: [\".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}\"] }]\n        }] });\n/** Container inside which all overlays will render. */\nclass OverlayContainer {\n    _platform = inject(Platform);\n    _containerElement;\n    _document = inject(DOCUMENT);\n    _styleLoader = inject(_CdkPrivateStyleLoader);\n    constructor() { }\n    ngOnDestroy() {\n        this._containerElement?.remove();\n    }\n    /**\n     * This method returns the overlay container element. It will lazily\n     * create the element the first time it is called to facilitate using\n     * the container in non-browser environments.\n     * @returns the container element\n     */\n    getContainerElement() {\n        this._loadStyles();\n        if (!this._containerElement) {\n            this._createContainer();\n        }\n        return this._containerElement;\n    }\n    /**\n     * Create the overlay container element, which is simply a div\n     * with the 'cdk-overlay-container' class on the document body.\n     */\n    _createContainer() {\n        const containerClass = 'cdk-overlay-container';\n        // TODO(crisbeto): remove the testing check once we have an overlay testing\n        // module or Angular starts tearing down the testing `NgModule`. See:\n        // https://github.com/angular/angular/issues/18831\n        if (this._platform.isBrowser || _isTestEnvironment()) {\n            const oppositePlatformContainers = this._document.querySelectorAll(`.${containerClass}[platform=\"server\"], ` + `.${containerClass}[platform=\"test\"]`);\n            // Remove any old containers from the opposite platform.\n            // This can happen when transitioning from the server to the client.\n            for (let i = 0; i < oppositePlatformContainers.length; i++) {\n                oppositePlatformContainers[i].remove();\n            }\n        }\n        const container = this._document.createElement('div');\n        container.classList.add(containerClass);\n        // A long time ago we kept adding new overlay containers whenever a new app was instantiated,\n        // but at some point we added logic which clears the duplicate ones in order to avoid leaks.\n        // The new logic was a little too aggressive since it was breaking some legitimate use cases.\n        // To mitigate the problem we made it so that only containers from a different platform are\n        // cleared, but the side-effect was that people started depending on the overly-aggressive\n        // logic to clean up their tests for them. Until we can introduce an overlay-specific testing\n        // module which does the cleanup, we try to detect that we're in a test environment and we\n        // always clear the container. See #17006.\n        // TODO(crisbeto): remove the test environment check once we have an overlay testing module.\n        if (_isTestEnvironment()) {\n            container.setAttribute('platform', 'test');\n        }\n        else if (!this._platform.isBrowser) {\n            container.setAttribute('platform', 'server');\n        }\n        this._document.body.appendChild(container);\n        this._containerElement = container;\n    }\n    /** Loads the structural styles necessary for the overlay to work. */\n    _loadStyles() {\n        this._styleLoader.load(_CdkOverlayStyleLoader);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayContainer, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayContainer, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\n/**\n * Reference to an overlay that has been created with the Overlay service.\n * Used to manipulate or dispose of said overlay.\n */\nclass OverlayRef {\n    _portalOutlet;\n    _host;\n    _pane;\n    _config;\n    _ngZone;\n    _keyboardDispatcher;\n    _document;\n    _location;\n    _outsideClickDispatcher;\n    _animationsDisabled;\n    _injector;\n    _renderer;\n    _backdropElement = null;\n    _backdropTimeout;\n    _backdropClick = new Subject();\n    _attachments = new Subject();\n    _detachments = new Subject();\n    _positionStrategy;\n    _scrollStrategy;\n    _locationChanges = Subscription.EMPTY;\n    _cleanupBackdropClick;\n    _cleanupBackdropTransitionEnd;\n    /**\n     * Reference to the parent of the `_host` at the time it was detached. Used to restore\n     * the `_host` to its original position in the DOM when it gets re-attached.\n     */\n    _previousHostParent;\n    /** Stream of keydown events dispatched to this overlay. */\n    _keydownEvents = new Subject();\n    /** Stream of mouse outside events dispatched to this overlay. */\n    _outsidePointerEvents = new Subject();\n    _renders = new Subject();\n    _afterRenderRef;\n    /** Reference to the currently-running `afterNextRender` call. */\n    _afterNextRenderRef;\n    constructor(_portalOutlet, _host, _pane, _config, _ngZone, _keyboardDispatcher, _document, _location, _outsideClickDispatcher, _animationsDisabled = false, _injector, _renderer) {\n        this._portalOutlet = _portalOutlet;\n        this._host = _host;\n        this._pane = _pane;\n        this._config = _config;\n        this._ngZone = _ngZone;\n        this._keyboardDispatcher = _keyboardDispatcher;\n        this._document = _document;\n        this._location = _location;\n        this._outsideClickDispatcher = _outsideClickDispatcher;\n        this._animationsDisabled = _animationsDisabled;\n        this._injector = _injector;\n        this._renderer = _renderer;\n        if (_config.scrollStrategy) {\n            this._scrollStrategy = _config.scrollStrategy;\n            this._scrollStrategy.attach(this);\n        }\n        this._positionStrategy = _config.positionStrategy;\n        // Users could open the overlay from an `effect`, in which case we need to\n        // run the `afterRender` as `untracked`. We don't recommend that users do\n        // this, but we also don't want to break users who are doing it.\n        this._afterRenderRef = untracked(() => afterRender(() => {\n            this._renders.next();\n        }, { injector: this._injector }));\n    }\n    /** The overlay's HTML element */\n    get overlayElement() {\n        return this._pane;\n    }\n    /** The overlay's backdrop HTML element. */\n    get backdropElement() {\n        return this._backdropElement;\n    }\n    /**\n     * Wrapper around the panel element. Can be used for advanced\n     * positioning where a wrapper with specific styling is\n     * required around the overlay pane.\n     */\n    get hostElement() {\n        return this._host;\n    }\n    /**\n     * Attaches content, given via a Portal, to the overlay.\n     * If the overlay is configured to have a backdrop, it will be created.\n     *\n     * @param portal Portal instance to which to attach the overlay.\n     * @returns The portal attachment result.\n     */\n    attach(portal) {\n        // Insert the host into the DOM before attaching the portal, otherwise\n        // the animations module will skip animations on repeat attachments.\n        if (!this._host.parentElement && this._previousHostParent) {\n            this._previousHostParent.appendChild(this._host);\n        }\n        const attachResult = this._portalOutlet.attach(portal);\n        if (this._positionStrategy) {\n            this._positionStrategy.attach(this);\n        }\n        this._updateStackingOrder();\n        this._updateElementSize();\n        this._updateElementDirection();\n        if (this._scrollStrategy) {\n            this._scrollStrategy.enable();\n        }\n        // We need to clean this up ourselves, because we're passing in an\n        // `EnvironmentInjector` below which won't ever be destroyed.\n        // Otherwise it causes some callbacks to be retained (see #29696).\n        this._afterNextRenderRef?.destroy();\n        // Update the position once the overlay is fully rendered before attempting to position it,\n        // as the position may depend on the size of the rendered content.\n        this._afterNextRenderRef = afterNextRender(() => {\n            // The overlay could've been detached before the callback executed.\n            if (this.hasAttached()) {\n                this.updatePosition();\n            }\n        }, { injector: this._injector });\n        // Enable pointer events for the overlay pane element.\n        this._togglePointerEvents(true);\n        if (this._config.hasBackdrop) {\n            this._attachBackdrop();\n        }\n        if (this._config.panelClass) {\n            this._toggleClasses(this._pane, this._config.panelClass, true);\n        }\n        // Only emit the `attachments` event once all other setup is done.\n        this._attachments.next();\n        // Track this overlay by the keyboard dispatcher\n        this._keyboardDispatcher.add(this);\n        if (this._config.disposeOnNavigation) {\n            this._locationChanges = this._location.subscribe(() => this.dispose());\n        }\n        this._outsideClickDispatcher.add(this);\n        // TODO(crisbeto): the null check is here, because the portal outlet returns `any`.\n        // We should be guaranteed for the result to be `ComponentRef | EmbeddedViewRef`, but\n        // `instanceof EmbeddedViewRef` doesn't appear to work at the moment.\n        if (typeof attachResult?.onDestroy === 'function') {\n            // In most cases we control the portal and we know when it is being detached so that\n            // we can finish the disposal process. The exception is if the user passes in a custom\n            // `ViewContainerRef` that isn't destroyed through the overlay API. Note that we use\n            // `detach` here instead of `dispose`, because we don't know if the user intends to\n            // reattach the overlay at a later point. It also has the advantage of waiting for animations.\n            attachResult.onDestroy(() => {\n                if (this.hasAttached()) {\n                    // We have to delay the `detach` call, because detaching immediately prevents\n                    // other destroy hooks from running. This is likely a framework bug similar to\n                    // https://github.com/angular/angular/issues/46119\n                    this._ngZone.runOutsideAngular(() => Promise.resolve().then(() => this.detach()));\n                }\n            });\n        }\n        return attachResult;\n    }\n    /**\n     * Detaches an overlay from a portal.\n     * @returns The portal detachment result.\n     */\n    detach() {\n        if (!this.hasAttached()) {\n            return;\n        }\n        this.detachBackdrop();\n        // When the overlay is detached, the pane element should disable pointer events.\n        // This is necessary because otherwise the pane element will cover the page and disable\n        // pointer events therefore. Depends on the position strategy and the applied pane boundaries.\n        this._togglePointerEvents(false);\n        if (this._positionStrategy && this._positionStrategy.detach) {\n            this._positionStrategy.detach();\n        }\n        if (this._scrollStrategy) {\n            this._scrollStrategy.disable();\n        }\n        const detachmentResult = this._portalOutlet.detach();\n        // Only emit after everything is detached.\n        this._detachments.next();\n        // Remove this overlay from keyboard dispatcher tracking.\n        this._keyboardDispatcher.remove(this);\n        // Keeping the host element in the DOM can cause scroll jank, because it still gets\n        // rendered, even though it's transparent and unclickable which is why we remove it.\n        this._detachContentWhenEmpty();\n        this._locationChanges.unsubscribe();\n        this._outsideClickDispatcher.remove(this);\n        return detachmentResult;\n    }\n    /** Cleans up the overlay from the DOM. */\n    dispose() {\n        const isAttached = this.hasAttached();\n        if (this._positionStrategy) {\n            this._positionStrategy.dispose();\n        }\n        this._disposeScrollStrategy();\n        this._disposeBackdrop(this._backdropElement);\n        this._locationChanges.unsubscribe();\n        this._keyboardDispatcher.remove(this);\n        this._portalOutlet.dispose();\n        this._attachments.complete();\n        this._backdropClick.complete();\n        this._keydownEvents.complete();\n        this._outsidePointerEvents.complete();\n        this._outsideClickDispatcher.remove(this);\n        this._host?.remove();\n        this._afterNextRenderRef?.destroy();\n        this._previousHostParent = this._pane = this._host = null;\n        if (isAttached) {\n            this._detachments.next();\n        }\n        this._detachments.complete();\n        this._afterRenderRef.destroy();\n        this._renders.complete();\n    }\n    /** Whether the overlay has attached content. */\n    hasAttached() {\n        return this._portalOutlet.hasAttached();\n    }\n    /** Gets an observable that emits when the backdrop has been clicked. */\n    backdropClick() {\n        return this._backdropClick;\n    }\n    /** Gets an observable that emits when the overlay has been attached. */\n    attachments() {\n        return this._attachments;\n    }\n    /** Gets an observable that emits when the overlay has been detached. */\n    detachments() {\n        return this._detachments;\n    }\n    /** Gets an observable of keydown events targeted to this overlay. */\n    keydownEvents() {\n        return this._keydownEvents;\n    }\n    /** Gets an observable of pointer events targeted outside this overlay. */\n    outsidePointerEvents() {\n        return this._outsidePointerEvents;\n    }\n    /** Gets the current overlay configuration, which is immutable. */\n    getConfig() {\n        return this._config;\n    }\n    /** Updates the position of the overlay based on the position strategy. */\n    updatePosition() {\n        if (this._positionStrategy) {\n            this._positionStrategy.apply();\n        }\n    }\n    /** Switches to a new position strategy and updates the overlay position. */\n    updatePositionStrategy(strategy) {\n        if (strategy === this._positionStrategy) {\n            return;\n        }\n        if (this._positionStrategy) {\n            this._positionStrategy.dispose();\n        }\n        this._positionStrategy = strategy;\n        if (this.hasAttached()) {\n            strategy.attach(this);\n            this.updatePosition();\n        }\n    }\n    /** Update the size properties of the overlay. */\n    updateSize(sizeConfig) {\n        this._config = { ...this._config, ...sizeConfig };\n        this._updateElementSize();\n    }\n    /** Sets the LTR/RTL direction for the overlay. */\n    setDirection(dir) {\n        this._config = { ...this._config, direction: dir };\n        this._updateElementDirection();\n    }\n    /** Add a CSS class or an array of classes to the overlay pane. */\n    addPanelClass(classes) {\n        if (this._pane) {\n            this._toggleClasses(this._pane, classes, true);\n        }\n    }\n    /** Remove a CSS class or an array of classes from the overlay pane. */\n    removePanelClass(classes) {\n        if (this._pane) {\n            this._toggleClasses(this._pane, classes, false);\n        }\n    }\n    /**\n     * Returns the layout direction of the overlay panel.\n     */\n    getDirection() {\n        const direction = this._config.direction;\n        if (!direction) {\n            return 'ltr';\n        }\n        return typeof direction === 'string' ? direction : direction.value;\n    }\n    /** Switches to a new scroll strategy. */\n    updateScrollStrategy(strategy) {\n        if (strategy === this._scrollStrategy) {\n            return;\n        }\n        this._disposeScrollStrategy();\n        this._scrollStrategy = strategy;\n        if (this.hasAttached()) {\n            strategy.attach(this);\n            strategy.enable();\n        }\n    }\n    /** Updates the text direction of the overlay panel. */\n    _updateElementDirection() {\n        this._host.setAttribute('dir', this.getDirection());\n    }\n    /** Updates the size of the overlay element based on the overlay config. */\n    _updateElementSize() {\n        if (!this._pane) {\n            return;\n        }\n        const style = this._pane.style;\n        style.width = coerceCssPixelValue(this._config.width);\n        style.height = coerceCssPixelValue(this._config.height);\n        style.minWidth = coerceCssPixelValue(this._config.minWidth);\n        style.minHeight = coerceCssPixelValue(this._config.minHeight);\n        style.maxWidth = coerceCssPixelValue(this._config.maxWidth);\n        style.maxHeight = coerceCssPixelValue(this._config.maxHeight);\n    }\n    /** Toggles the pointer events for the overlay pane element. */\n    _togglePointerEvents(enablePointer) {\n        this._pane.style.pointerEvents = enablePointer ? '' : 'none';\n    }\n    /** Attaches a backdrop for this overlay. */\n    _attachBackdrop() {\n        const showingClass = 'cdk-overlay-backdrop-showing';\n        this._backdropElement = this._document.createElement('div');\n        this._backdropElement.classList.add('cdk-overlay-backdrop');\n        if (this._animationsDisabled) {\n            this._backdropElement.classList.add('cdk-overlay-backdrop-noop-animation');\n        }\n        if (this._config.backdropClass) {\n            this._toggleClasses(this._backdropElement, this._config.backdropClass, true);\n        }\n        // Insert the backdrop before the pane in the DOM order,\n        // in order to handle stacked overlays properly.\n        this._host.parentElement.insertBefore(this._backdropElement, this._host);\n        // Forward backdrop clicks such that the consumer of the overlay can perform whatever\n        // action desired when such a click occurs (usually closing the overlay).\n        this._cleanupBackdropClick?.();\n        this._cleanupBackdropClick = this._renderer.listen(this._backdropElement, 'click', (event) => this._backdropClick.next(event));\n        // Add class to fade-in the backdrop after one frame.\n        if (!this._animationsDisabled && typeof requestAnimationFrame !== 'undefined') {\n            this._ngZone.runOutsideAngular(() => {\n                requestAnimationFrame(() => {\n                    if (this._backdropElement) {\n                        this._backdropElement.classList.add(showingClass);\n                    }\n                });\n            });\n        }\n        else {\n            this._backdropElement.classList.add(showingClass);\n        }\n    }\n    /**\n     * Updates the stacking order of the element, moving it to the top if necessary.\n     * This is required in cases where one overlay was detached, while another one,\n     * that should be behind it, was destroyed. The next time both of them are opened,\n     * the stacking will be wrong, because the detached element's pane will still be\n     * in its original DOM position.\n     */\n    _updateStackingOrder() {\n        if (this._host.nextSibling) {\n            this._host.parentNode.appendChild(this._host);\n        }\n    }\n    /** Detaches the backdrop (if any) associated with the overlay. */\n    detachBackdrop() {\n        const backdropToDetach = this._backdropElement;\n        if (!backdropToDetach) {\n            return;\n        }\n        if (this._animationsDisabled) {\n            this._disposeBackdrop(backdropToDetach);\n            return;\n        }\n        backdropToDetach.classList.remove('cdk-overlay-backdrop-showing');\n        this._ngZone.runOutsideAngular(() => {\n            this._cleanupBackdropTransitionEnd?.();\n            this._cleanupBackdropTransitionEnd = this._renderer.listen(backdropToDetach, 'transitionend', (event) => {\n                this._disposeBackdrop(event.target);\n            });\n        });\n        // If the backdrop doesn't have a transition, the `transitionend` event won't fire.\n        // In this case we make it unclickable and we try to remove it after a delay.\n        backdropToDetach.style.pointerEvents = 'none';\n        // Run this outside the Angular zone because there's nothing that Angular cares about.\n        // If it were to run inside the Angular zone, every test that used Overlay would have to be\n        // either async or fakeAsync.\n        this._backdropTimeout = this._ngZone.runOutsideAngular(() => setTimeout(() => {\n            this._disposeBackdrop(backdropToDetach);\n        }, 500));\n    }\n    /** Toggles a single CSS class or an array of classes on an element. */\n    _toggleClasses(element, cssClasses, isAdd) {\n        const classes = coerceArray(cssClasses || []).filter(c => !!c);\n        if (classes.length) {\n            isAdd ? element.classList.add(...classes) : element.classList.remove(...classes);\n        }\n    }\n    /** Detaches the overlay content next time the zone stabilizes. */\n    _detachContentWhenEmpty() {\n        // Normally we wouldn't have to explicitly run this outside the `NgZone`, however\n        // if the consumer is using `zone-patch-rxjs`, the `Subscription.unsubscribe` call will\n        // be patched to run inside the zone, which will throw us into an infinite loop.\n        this._ngZone.runOutsideAngular(() => {\n            // We can't remove the host here immediately, because the overlay pane's content\n            // might still be animating. This stream helps us avoid interrupting the animation\n            // by waiting for the pane to become empty.\n            const subscription = this._renders\n                .pipe(takeUntil(merge(this._attachments, this._detachments)))\n                .subscribe(() => {\n                // Needs a couple of checks for the pane and host, because\n                // they may have been removed by the time the zone stabilizes.\n                if (!this._pane || !this._host || this._pane.children.length === 0) {\n                    if (this._pane && this._config.panelClass) {\n                        this._toggleClasses(this._pane, this._config.panelClass, false);\n                    }\n                    if (this._host && this._host.parentElement) {\n                        this._previousHostParent = this._host.parentElement;\n                        this._host.remove();\n                    }\n                    subscription.unsubscribe();\n                }\n            });\n        });\n    }\n    /** Disposes of a scroll strategy. */\n    _disposeScrollStrategy() {\n        const scrollStrategy = this._scrollStrategy;\n        if (scrollStrategy) {\n            scrollStrategy.disable();\n            if (scrollStrategy.detach) {\n                scrollStrategy.detach();\n            }\n        }\n    }\n    /** Removes a backdrop element from the DOM. */\n    _disposeBackdrop(backdrop) {\n        this._cleanupBackdropClick?.();\n        this._cleanupBackdropTransitionEnd?.();\n        if (backdrop) {\n            backdrop.remove();\n            // It is possible that a new portal has been attached to this overlay since we started\n            // removing the backdrop. If that is the case, only clear the backdrop reference if it\n            // is still the same instance that we started to remove.\n            if (this._backdropElement === backdrop) {\n                this._backdropElement = null;\n            }\n        }\n        if (this._backdropTimeout) {\n            clearTimeout(this._backdropTimeout);\n            this._backdropTimeout = undefined;\n        }\n    }\n}\n\n// TODO: refactor clipping detection into a separate thing (part of scrolling module)\n// TODO: doesn't handle both flexible width and height when it has to scroll along both axis.\n/** Class to be added to the overlay bounding box. */\nconst boundingBoxClass = 'cdk-overlay-connected-position-bounding-box';\n/** Regex used to split a string on its CSS units. */\nconst cssUnitPattern = /([A-Za-z%]+)$/;\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * implicit position relative some origin element. The relative position is defined in terms of\n * a point on the origin element that is connected to a point on the overlay element. For example,\n * a basic dropdown is connecting the bottom-left corner of the origin to the top-left corner\n * of the overlay.\n */\nclass FlexibleConnectedPositionStrategy {\n    _viewportRuler;\n    _document;\n    _platform;\n    _overlayContainer;\n    /** The overlay to which this strategy is attached. */\n    _overlayRef;\n    /** Whether we're performing the very first positioning of the overlay. */\n    _isInitialRender;\n    /** Last size used for the bounding box. Used to avoid resizing the overlay after open. */\n    _lastBoundingBoxSize = { width: 0, height: 0 };\n    /** Whether the overlay was pushed in a previous positioning. */\n    _isPushed = false;\n    /** Whether the overlay can be pushed on-screen on the initial open. */\n    _canPush = true;\n    /** Whether the overlay can grow via flexible width/height after the initial open. */\n    _growAfterOpen = false;\n    /** Whether the overlay's width and height can be constrained to fit within the viewport. */\n    _hasFlexibleDimensions = true;\n    /** Whether the overlay position is locked. */\n    _positionLocked = false;\n    /** Cached origin dimensions */\n    _originRect;\n    /** Cached overlay dimensions */\n    _overlayRect;\n    /** Cached viewport dimensions */\n    _viewportRect;\n    /** Cached container dimensions */\n    _containerRect;\n    /** Amount of space that must be maintained between the overlay and the edge of the viewport. */\n    _viewportMargin = 0;\n    /** The Scrollable containers used to check scrollable view properties on position change. */\n    _scrollables = [];\n    /** Ordered list of preferred positions, from most to least desirable. */\n    _preferredPositions = [];\n    /** The origin element against which the overlay will be positioned. */\n    _origin;\n    /** The overlay pane element. */\n    _pane;\n    /** Whether the strategy has been disposed of already. */\n    _isDisposed;\n    /**\n     * Parent element for the overlay panel used to constrain the overlay panel's size to fit\n     * within the viewport.\n     */\n    _boundingBox;\n    /** The last position to have been calculated as the best fit position. */\n    _lastPosition;\n    /** The last calculated scroll visibility. Only tracked  */\n    _lastScrollVisibility;\n    /** Subject that emits whenever the position changes. */\n    _positionChanges = new Subject();\n    /** Subscription to viewport size changes. */\n    _resizeSubscription = Subscription.EMPTY;\n    /** Default offset for the overlay along the x axis. */\n    _offsetX = 0;\n    /** Default offset for the overlay along the y axis. */\n    _offsetY = 0;\n    /** Selector to be used when finding the elements on which to set the transform origin. */\n    _transformOriginSelector;\n    /** Keeps track of the CSS classes that the position strategy has applied on the overlay panel. */\n    _appliedPanelClasses = [];\n    /** Amount by which the overlay was pushed in each axis during the last time it was positioned. */\n    _previousPushAmount;\n    /** Observable sequence of position changes. */\n    positionChanges = this._positionChanges;\n    /** Ordered list of preferred positions, from most to least desirable. */\n    get positions() {\n        return this._preferredPositions;\n    }\n    constructor(connectedTo, _viewportRuler, _document, _platform, _overlayContainer) {\n        this._viewportRuler = _viewportRuler;\n        this._document = _document;\n        this._platform = _platform;\n        this._overlayContainer = _overlayContainer;\n        this.setOrigin(connectedTo);\n    }\n    /** Attaches this position strategy to an overlay. */\n    attach(overlayRef) {\n        if (this._overlayRef &&\n            overlayRef !== this._overlayRef &&\n            (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error('This position strategy is already attached to an overlay');\n        }\n        this._validatePositions();\n        overlayRef.hostElement.classList.add(boundingBoxClass);\n        this._overlayRef = overlayRef;\n        this._boundingBox = overlayRef.hostElement;\n        this._pane = overlayRef.overlayElement;\n        this._isDisposed = false;\n        this._isInitialRender = true;\n        this._lastPosition = null;\n        this._resizeSubscription.unsubscribe();\n        this._resizeSubscription = this._viewportRuler.change().subscribe(() => {\n            // When the window is resized, we want to trigger the next reposition as if it\n            // was an initial render, in order for the strategy to pick a new optimal position,\n            // otherwise position locking will cause it to stay at the old one.\n            this._isInitialRender = true;\n            this.apply();\n        });\n    }\n    /**\n     * Updates the position of the overlay element, using whichever preferred position relative\n     * to the origin best fits on-screen.\n     *\n     * The selection of a position goes as follows:\n     *  - If any positions fit completely within the viewport as-is,\n     *      choose the first position that does so.\n     *  - If flexible dimensions are enabled and at least one satisfies the given minimum width/height,\n     *      choose the position with the greatest available size modified by the positions' weight.\n     *  - If pushing is enabled, take the position that went off-screen the least and push it\n     *      on-screen.\n     *  - If none of the previous criteria were met, use the position that goes off-screen the least.\n     * @docs-private\n     */\n    apply() {\n        // We shouldn't do anything if the strategy was disposed or we're on the server.\n        if (this._isDisposed || !this._platform.isBrowser) {\n            return;\n        }\n        // If the position has been applied already (e.g. when the overlay was opened) and the\n        // consumer opted into locking in the position, re-use the old position, in order to\n        // prevent the overlay from jumping around.\n        if (!this._isInitialRender && this._positionLocked && this._lastPosition) {\n            this.reapplyLastPosition();\n            return;\n        }\n        this._clearPanelClasses();\n        this._resetOverlayElementStyles();\n        this._resetBoundingBoxStyles();\n        // We need the bounding rects for the origin, the overlay and the container to determine how to position\n        // the overlay relative to the origin.\n        // We use the viewport rect to determine whether a position would go off-screen.\n        this._viewportRect = this._getNarrowedViewportRect();\n        this._originRect = this._getOriginRect();\n        this._overlayRect = this._pane.getBoundingClientRect();\n        this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect();\n        const originRect = this._originRect;\n        const overlayRect = this._overlayRect;\n        const viewportRect = this._viewportRect;\n        const containerRect = this._containerRect;\n        // Positions where the overlay will fit with flexible dimensions.\n        const flexibleFits = [];\n        // Fallback if none of the preferred positions fit within the viewport.\n        let fallback;\n        // Go through each of the preferred positions looking for a good fit.\n        // If a good fit is found, it will be applied immediately.\n        for (let pos of this._preferredPositions) {\n            // Get the exact (x, y) coordinate for the point-of-origin on the origin element.\n            let originPoint = this._getOriginPoint(originRect, containerRect, pos);\n            // From that point-of-origin, get the exact (x, y) coordinate for the top-left corner of the\n            // overlay in this position. We use the top-left corner for calculations and later translate\n            // this into an appropriate (top, left, bottom, right) style.\n            let overlayPoint = this._getOverlayPoint(originPoint, overlayRect, pos);\n            // Calculate how well the overlay would fit into the viewport with this point.\n            let overlayFit = this._getOverlayFit(overlayPoint, overlayRect, viewportRect, pos);\n            // If the overlay, without any further work, fits into the viewport, use this position.\n            if (overlayFit.isCompletelyWithinViewport) {\n                this._isPushed = false;\n                this._applyPosition(pos, originPoint);\n                return;\n            }\n            // If the overlay has flexible dimensions, we can use this position\n            // so long as there's enough space for the minimum dimensions.\n            if (this._canFitWithFlexibleDimensions(overlayFit, overlayPoint, viewportRect)) {\n                // Save positions where the overlay will fit with flexible dimensions. We will use these\n                // if none of the positions fit *without* flexible dimensions.\n                flexibleFits.push({\n                    position: pos,\n                    origin: originPoint,\n                    overlayRect,\n                    boundingBoxRect: this._calculateBoundingBoxRect(originPoint, pos),\n                });\n                continue;\n            }\n            // If the current preferred position does not fit on the screen, remember the position\n            // if it has more visible area on-screen than we've seen and move onto the next preferred\n            // position.\n            if (!fallback || fallback.overlayFit.visibleArea < overlayFit.visibleArea) {\n                fallback = { overlayFit, overlayPoint, originPoint, position: pos, overlayRect };\n            }\n        }\n        // If there are any positions where the overlay would fit with flexible dimensions, choose the\n        // one that has the greatest area available modified by the position's weight\n        if (flexibleFits.length) {\n            let bestFit = null;\n            let bestScore = -1;\n            for (const fit of flexibleFits) {\n                const score = fit.boundingBoxRect.width * fit.boundingBoxRect.height * (fit.position.weight || 1);\n                if (score > bestScore) {\n                    bestScore = score;\n                    bestFit = fit;\n                }\n            }\n            this._isPushed = false;\n            this._applyPosition(bestFit.position, bestFit.origin);\n            return;\n        }\n        // When none of the preferred positions fit within the viewport, take the position\n        // that went off-screen the least and attempt to push it on-screen.\n        if (this._canPush) {\n            // TODO(jelbourn): after pushing, the opening \"direction\" of the overlay might not make sense.\n            this._isPushed = true;\n            this._applyPosition(fallback.position, fallback.originPoint);\n            return;\n        }\n        // All options for getting the overlay within the viewport have been exhausted, so go with the\n        // position that went off-screen the least.\n        this._applyPosition(fallback.position, fallback.originPoint);\n    }\n    detach() {\n        this._clearPanelClasses();\n        this._lastPosition = null;\n        this._previousPushAmount = null;\n        this._resizeSubscription.unsubscribe();\n    }\n    /** Cleanup after the element gets destroyed. */\n    dispose() {\n        if (this._isDisposed) {\n            return;\n        }\n        // We can't use `_resetBoundingBoxStyles` here, because it resets\n        // some properties to zero, rather than removing them.\n        if (this._boundingBox) {\n            extendStyles(this._boundingBox.style, {\n                top: '',\n                left: '',\n                right: '',\n                bottom: '',\n                height: '',\n                width: '',\n                alignItems: '',\n                justifyContent: '',\n            });\n        }\n        if (this._pane) {\n            this._resetOverlayElementStyles();\n        }\n        if (this._overlayRef) {\n            this._overlayRef.hostElement.classList.remove(boundingBoxClass);\n        }\n        this.detach();\n        this._positionChanges.complete();\n        this._overlayRef = this._boundingBox = null;\n        this._isDisposed = true;\n    }\n    /**\n     * This re-aligns the overlay element with the trigger in its last calculated position,\n     * even if a position higher in the \"preferred positions\" list would now fit. This\n     * allows one to re-align the panel without changing the orientation of the panel.\n     */\n    reapplyLastPosition() {\n        if (this._isDisposed || !this._platform.isBrowser) {\n            return;\n        }\n        const lastPosition = this._lastPosition;\n        if (lastPosition) {\n            this._originRect = this._getOriginRect();\n            this._overlayRect = this._pane.getBoundingClientRect();\n            this._viewportRect = this._getNarrowedViewportRect();\n            this._containerRect = this._overlayContainer.getContainerElement().getBoundingClientRect();\n            const originPoint = this._getOriginPoint(this._originRect, this._containerRect, lastPosition);\n            this._applyPosition(lastPosition, originPoint);\n        }\n        else {\n            this.apply();\n        }\n    }\n    /**\n     * Sets the list of Scrollable containers that host the origin element so that\n     * on reposition we can evaluate if it or the overlay has been clipped or outside view. Every\n     * Scrollable must be an ancestor element of the strategy's origin element.\n     */\n    withScrollableContainers(scrollables) {\n        this._scrollables = scrollables;\n        return this;\n    }\n    /**\n     * Adds new preferred positions.\n     * @param positions List of positions options for this overlay.\n     */\n    withPositions(positions) {\n        this._preferredPositions = positions;\n        // If the last calculated position object isn't part of the positions anymore, clear\n        // it in order to avoid it being picked up if the consumer tries to re-apply.\n        if (positions.indexOf(this._lastPosition) === -1) {\n            this._lastPosition = null;\n        }\n        this._validatePositions();\n        return this;\n    }\n    /**\n     * Sets a minimum distance the overlay may be positioned to the edge of the viewport.\n     * @param margin Required margin between the overlay and the viewport edge in pixels.\n     */\n    withViewportMargin(margin) {\n        this._viewportMargin = margin;\n        return this;\n    }\n    /** Sets whether the overlay's width and height can be constrained to fit within the viewport. */\n    withFlexibleDimensions(flexibleDimensions = true) {\n        this._hasFlexibleDimensions = flexibleDimensions;\n        return this;\n    }\n    /** Sets whether the overlay can grow after the initial open via flexible width/height. */\n    withGrowAfterOpen(growAfterOpen = true) {\n        this._growAfterOpen = growAfterOpen;\n        return this;\n    }\n    /** Sets whether the overlay can be pushed on-screen if none of the provided positions fit. */\n    withPush(canPush = true) {\n        this._canPush = canPush;\n        return this;\n    }\n    /**\n     * Sets whether the overlay's position should be locked in after it is positioned\n     * initially. When an overlay is locked in, it won't attempt to reposition itself\n     * when the position is re-applied (e.g. when the user scrolls away).\n     * @param isLocked Whether the overlay should locked in.\n     */\n    withLockedPosition(isLocked = true) {\n        this._positionLocked = isLocked;\n        return this;\n    }\n    /**\n     * Sets the origin, relative to which to position the overlay.\n     * Using an element origin is useful for building components that need to be positioned\n     * relatively to a trigger (e.g. dropdown menus or tooltips), whereas using a point can be\n     * used for cases like contextual menus which open relative to the user's pointer.\n     * @param origin Reference to the new origin.\n     */\n    setOrigin(origin) {\n        this._origin = origin;\n        return this;\n    }\n    /**\n     * Sets the default offset for the overlay's connection point on the x-axis.\n     * @param offset New offset in the X axis.\n     */\n    withDefaultOffsetX(offset) {\n        this._offsetX = offset;\n        return this;\n    }\n    /**\n     * Sets the default offset for the overlay's connection point on the y-axis.\n     * @param offset New offset in the Y axis.\n     */\n    withDefaultOffsetY(offset) {\n        this._offsetY = offset;\n        return this;\n    }\n    /**\n     * Configures that the position strategy should set a `transform-origin` on some elements\n     * inside the overlay, depending on the current position that is being applied. This is\n     * useful for the cases where the origin of an animation can change depending on the\n     * alignment of the overlay.\n     * @param selector CSS selector that will be used to find the target\n     *    elements onto which to set the transform origin.\n     */\n    withTransformOriginOn(selector) {\n        this._transformOriginSelector = selector;\n        return this;\n    }\n    /**\n     * Gets the (x, y) coordinate of a connection point on the origin based on a relative position.\n     */\n    _getOriginPoint(originRect, containerRect, pos) {\n        let x;\n        if (pos.originX == 'center') {\n            // Note: when centering we should always use the `left`\n            // offset, otherwise the position will be wrong in RTL.\n            x = originRect.left + originRect.width / 2;\n        }\n        else {\n            const startX = this._isRtl() ? originRect.right : originRect.left;\n            const endX = this._isRtl() ? originRect.left : originRect.right;\n            x = pos.originX == 'start' ? startX : endX;\n        }\n        // When zooming in Safari the container rectangle contains negative values for the position\n        // and we need to re-add them to the calculated coordinates.\n        if (containerRect.left < 0) {\n            x -= containerRect.left;\n        }\n        let y;\n        if (pos.originY == 'center') {\n            y = originRect.top + originRect.height / 2;\n        }\n        else {\n            y = pos.originY == 'top' ? originRect.top : originRect.bottom;\n        }\n        // Normally the containerRect's top value would be zero, however when the overlay is attached to an input\n        // (e.g. in an autocomplete), mobile browsers will shift everything in order to put the input in the middle\n        // of the screen and to make space for the virtual keyboard. We need to account for this offset,\n        // otherwise our positioning will be thrown off.\n        // Additionally, when zooming in Safari this fixes the vertical position.\n        if (containerRect.top < 0) {\n            y -= containerRect.top;\n        }\n        return { x, y };\n    }\n    /**\n     * Gets the (x, y) coordinate of the top-left corner of the overlay given a given position and\n     * origin point to which the overlay should be connected.\n     */\n    _getOverlayPoint(originPoint, overlayRect, pos) {\n        // Calculate the (overlayStartX, overlayStartY), the start of the\n        // potential overlay position relative to the origin point.\n        let overlayStartX;\n        if (pos.overlayX == 'center') {\n            overlayStartX = -overlayRect.width / 2;\n        }\n        else if (pos.overlayX === 'start') {\n            overlayStartX = this._isRtl() ? -overlayRect.width : 0;\n        }\n        else {\n            overlayStartX = this._isRtl() ? 0 : -overlayRect.width;\n        }\n        let overlayStartY;\n        if (pos.overlayY == 'center') {\n            overlayStartY = -overlayRect.height / 2;\n        }\n        else {\n            overlayStartY = pos.overlayY == 'top' ? 0 : -overlayRect.height;\n        }\n        // The (x, y) coordinates of the overlay.\n        return {\n            x: originPoint.x + overlayStartX,\n            y: originPoint.y + overlayStartY,\n        };\n    }\n    /** Gets how well an overlay at the given point will fit within the viewport. */\n    _getOverlayFit(point, rawOverlayRect, viewport, position) {\n        // Round the overlay rect when comparing against the\n        // viewport, because the viewport is always rounded.\n        const overlay = getRoundedBoundingClientRect(rawOverlayRect);\n        let { x, y } = point;\n        let offsetX = this._getOffset(position, 'x');\n        let offsetY = this._getOffset(position, 'y');\n        // Account for the offsets since they could push the overlay out of the viewport.\n        if (offsetX) {\n            x += offsetX;\n        }\n        if (offsetY) {\n            y += offsetY;\n        }\n        // How much the overlay would overflow at this position, on each side.\n        let leftOverflow = 0 - x;\n        let rightOverflow = x + overlay.width - viewport.width;\n        let topOverflow = 0 - y;\n        let bottomOverflow = y + overlay.height - viewport.height;\n        // Visible parts of the element on each axis.\n        let visibleWidth = this._subtractOverflows(overlay.width, leftOverflow, rightOverflow);\n        let visibleHeight = this._subtractOverflows(overlay.height, topOverflow, bottomOverflow);\n        let visibleArea = visibleWidth * visibleHeight;\n        return {\n            visibleArea,\n            isCompletelyWithinViewport: overlay.width * overlay.height === visibleArea,\n            fitsInViewportVertically: visibleHeight === overlay.height,\n            fitsInViewportHorizontally: visibleWidth == overlay.width,\n        };\n    }\n    /**\n     * Whether the overlay can fit within the viewport when it may resize either its width or height.\n     * @param fit How well the overlay fits in the viewport at some position.\n     * @param point The (x, y) coordinates of the overlay at some position.\n     * @param viewport The geometry of the viewport.\n     */\n    _canFitWithFlexibleDimensions(fit, point, viewport) {\n        if (this._hasFlexibleDimensions) {\n            const availableHeight = viewport.bottom - point.y;\n            const availableWidth = viewport.right - point.x;\n            const minHeight = getPixelValue(this._overlayRef.getConfig().minHeight);\n            const minWidth = getPixelValue(this._overlayRef.getConfig().minWidth);\n            const verticalFit = fit.fitsInViewportVertically || (minHeight != null && minHeight <= availableHeight);\n            const horizontalFit = fit.fitsInViewportHorizontally || (minWidth != null && minWidth <= availableWidth);\n            return verticalFit && horizontalFit;\n        }\n        return false;\n    }\n    /**\n     * Gets the point at which the overlay can be \"pushed\" on-screen. If the overlay is larger than\n     * the viewport, the top-left corner will be pushed on-screen (with overflow occurring on the\n     * right and bottom).\n     *\n     * @param start Starting point from which the overlay is pushed.\n     * @param rawOverlayRect Dimensions of the overlay.\n     * @param scrollPosition Current viewport scroll position.\n     * @returns The point at which to position the overlay after pushing. This is effectively a new\n     *     originPoint.\n     */\n    _pushOverlayOnScreen(start, rawOverlayRect, scrollPosition) {\n        // If the position is locked and we've pushed the overlay already, reuse the previous push\n        // amount, rather than pushing it again. If we were to continue pushing, the element would\n        // remain in the viewport, which goes against the expectations when position locking is enabled.\n        if (this._previousPushAmount && this._positionLocked) {\n            return {\n                x: start.x + this._previousPushAmount.x,\n                y: start.y + this._previousPushAmount.y,\n            };\n        }\n        // Round the overlay rect when comparing against the\n        // viewport, because the viewport is always rounded.\n        const overlay = getRoundedBoundingClientRect(rawOverlayRect);\n        const viewport = this._viewportRect;\n        // Determine how much the overlay goes outside the viewport on each\n        // side, which we'll use to decide which direction to push it.\n        const overflowRight = Math.max(start.x + overlay.width - viewport.width, 0);\n        const overflowBottom = Math.max(start.y + overlay.height - viewport.height, 0);\n        const overflowTop = Math.max(viewport.top - scrollPosition.top - start.y, 0);\n        const overflowLeft = Math.max(viewport.left - scrollPosition.left - start.x, 0);\n        // Amount by which to push the overlay in each axis such that it remains on-screen.\n        let pushX = 0;\n        let pushY = 0;\n        // If the overlay fits completely within the bounds of the viewport, push it from whichever\n        // direction is goes off-screen. Otherwise, push the top-left corner such that its in the\n        // viewport and allow for the trailing end of the overlay to go out of bounds.\n        if (overlay.width <= viewport.width) {\n            pushX = overflowLeft || -overflowRight;\n        }\n        else {\n            pushX = start.x < this._viewportMargin ? viewport.left - scrollPosition.left - start.x : 0;\n        }\n        if (overlay.height <= viewport.height) {\n            pushY = overflowTop || -overflowBottom;\n        }\n        else {\n            pushY = start.y < this._viewportMargin ? viewport.top - scrollPosition.top - start.y : 0;\n        }\n        this._previousPushAmount = { x: pushX, y: pushY };\n        return {\n            x: start.x + pushX,\n            y: start.y + pushY,\n        };\n    }\n    /**\n     * Applies a computed position to the overlay and emits a position change.\n     * @param position The position preference\n     * @param originPoint The point on the origin element where the overlay is connected.\n     */\n    _applyPosition(position, originPoint) {\n        this._setTransformOrigin(position);\n        this._setOverlayElementStyles(originPoint, position);\n        this._setBoundingBoxStyles(originPoint, position);\n        if (position.panelClass) {\n            this._addPanelClasses(position.panelClass);\n        }\n        // Notify that the position has been changed along with its change properties.\n        // We only emit if we've got any subscriptions, because the scroll visibility\n        // calculations can be somewhat expensive.\n        if (this._positionChanges.observers.length) {\n            const scrollVisibility = this._getScrollVisibility();\n            // We're recalculating on scroll, but we only want to emit if anything\n            // changed since downstream code might be hitting the `NgZone`.\n            if (position !== this._lastPosition ||\n                !this._lastScrollVisibility ||\n                !compareScrollVisibility(this._lastScrollVisibility, scrollVisibility)) {\n                const changeEvent = new ConnectedOverlayPositionChange(position, scrollVisibility);\n                this._positionChanges.next(changeEvent);\n            }\n            this._lastScrollVisibility = scrollVisibility;\n        }\n        // Save the last connected position in case the position needs to be re-calculated.\n        this._lastPosition = position;\n        this._isInitialRender = false;\n    }\n    /** Sets the transform origin based on the configured selector and the passed-in position.  */\n    _setTransformOrigin(position) {\n        if (!this._transformOriginSelector) {\n            return;\n        }\n        const elements = this._boundingBox.querySelectorAll(this._transformOriginSelector);\n        let xOrigin;\n        let yOrigin = position.overlayY;\n        if (position.overlayX === 'center') {\n            xOrigin = 'center';\n        }\n        else if (this._isRtl()) {\n            xOrigin = position.overlayX === 'start' ? 'right' : 'left';\n        }\n        else {\n            xOrigin = position.overlayX === 'start' ? 'left' : 'right';\n        }\n        for (let i = 0; i < elements.length; i++) {\n            elements[i].style.transformOrigin = `${xOrigin} ${yOrigin}`;\n        }\n    }\n    /**\n     * Gets the position and size of the overlay's sizing container.\n     *\n     * This method does no measuring and applies no styles so that we can cheaply compute the\n     * bounds for all positions and choose the best fit based on these results.\n     */\n    _calculateBoundingBoxRect(origin, position) {\n        const viewport = this._viewportRect;\n        const isRtl = this._isRtl();\n        let height, top, bottom;\n        if (position.overlayY === 'top') {\n            // Overlay is opening \"downward\" and thus is bound by the bottom viewport edge.\n            top = origin.y;\n            height = viewport.height - top + this._viewportMargin;\n        }\n        else if (position.overlayY === 'bottom') {\n            // Overlay is opening \"upward\" and thus is bound by the top viewport edge. We need to add\n            // the viewport margin back in, because the viewport rect is narrowed down to remove the\n            // margin, whereas the `origin` position is calculated based on its `DOMRect`.\n            bottom = viewport.height - origin.y + this._viewportMargin * 2;\n            height = viewport.height - bottom + this._viewportMargin;\n        }\n        else {\n            // If neither top nor bottom, it means that the overlay is vertically centered on the\n            // origin point. Note that we want the position relative to the viewport, rather than\n            // the page, which is why we don't use something like `viewport.bottom - origin.y` and\n            // `origin.y - viewport.top`.\n            const smallestDistanceToViewportEdge = Math.min(viewport.bottom - origin.y + viewport.top, origin.y);\n            const previousHeight = this._lastBoundingBoxSize.height;\n            height = smallestDistanceToViewportEdge * 2;\n            top = origin.y - smallestDistanceToViewportEdge;\n            if (height > previousHeight && !this._isInitialRender && !this._growAfterOpen) {\n                top = origin.y - previousHeight / 2;\n            }\n        }\n        // The overlay is opening 'right-ward' (the content flows to the right).\n        const isBoundedByRightViewportEdge = (position.overlayX === 'start' && !isRtl) || (position.overlayX === 'end' && isRtl);\n        // The overlay is opening 'left-ward' (the content flows to the left).\n        const isBoundedByLeftViewportEdge = (position.overlayX === 'end' && !isRtl) || (position.overlayX === 'start' && isRtl);\n        let width, left, right;\n        if (isBoundedByLeftViewportEdge) {\n            right = viewport.width - origin.x + this._viewportMargin * 2;\n            width = origin.x - this._viewportMargin;\n        }\n        else if (isBoundedByRightViewportEdge) {\n            left = origin.x;\n            width = viewport.right - origin.x;\n        }\n        else {\n            // If neither start nor end, it means that the overlay is horizontally centered on the\n            // origin point. Note that we want the position relative to the viewport, rather than\n            // the page, which is why we don't use something like `viewport.right - origin.x` and\n            // `origin.x - viewport.left`.\n            const smallestDistanceToViewportEdge = Math.min(viewport.right - origin.x + viewport.left, origin.x);\n            const previousWidth = this._lastBoundingBoxSize.width;\n            width = smallestDistanceToViewportEdge * 2;\n            left = origin.x - smallestDistanceToViewportEdge;\n            if (width > previousWidth && !this._isInitialRender && !this._growAfterOpen) {\n                left = origin.x - previousWidth / 2;\n            }\n        }\n        return { top: top, left: left, bottom: bottom, right: right, width, height };\n    }\n    /**\n     * Sets the position and size of the overlay's sizing wrapper. The wrapper is positioned on the\n     * origin's connection point and stretches to the bounds of the viewport.\n     *\n     * @param origin The point on the origin element where the overlay is connected.\n     * @param position The position preference\n     */\n    _setBoundingBoxStyles(origin, position) {\n        const boundingBoxRect = this._calculateBoundingBoxRect(origin, position);\n        // It's weird if the overlay *grows* while scrolling, so we take the last size into account\n        // when applying a new size.\n        if (!this._isInitialRender && !this._growAfterOpen) {\n            boundingBoxRect.height = Math.min(boundingBoxRect.height, this._lastBoundingBoxSize.height);\n            boundingBoxRect.width = Math.min(boundingBoxRect.width, this._lastBoundingBoxSize.width);\n        }\n        const styles = {};\n        if (this._hasExactPosition()) {\n            styles.top = styles.left = '0';\n            styles.bottom = styles.right = styles.maxHeight = styles.maxWidth = '';\n            styles.width = styles.height = '100%';\n        }\n        else {\n            const maxHeight = this._overlayRef.getConfig().maxHeight;\n            const maxWidth = this._overlayRef.getConfig().maxWidth;\n            styles.height = coerceCssPixelValue(boundingBoxRect.height);\n            styles.top = coerceCssPixelValue(boundingBoxRect.top);\n            styles.bottom = coerceCssPixelValue(boundingBoxRect.bottom);\n            styles.width = coerceCssPixelValue(boundingBoxRect.width);\n            styles.left = coerceCssPixelValue(boundingBoxRect.left);\n            styles.right = coerceCssPixelValue(boundingBoxRect.right);\n            // Push the pane content towards the proper direction.\n            if (position.overlayX === 'center') {\n                styles.alignItems = 'center';\n            }\n            else {\n                styles.alignItems = position.overlayX === 'end' ? 'flex-end' : 'flex-start';\n            }\n            if (position.overlayY === 'center') {\n                styles.justifyContent = 'center';\n            }\n            else {\n                styles.justifyContent = position.overlayY === 'bottom' ? 'flex-end' : 'flex-start';\n            }\n            if (maxHeight) {\n                styles.maxHeight = coerceCssPixelValue(maxHeight);\n            }\n            if (maxWidth) {\n                styles.maxWidth = coerceCssPixelValue(maxWidth);\n            }\n        }\n        this._lastBoundingBoxSize = boundingBoxRect;\n        extendStyles(this._boundingBox.style, styles);\n    }\n    /** Resets the styles for the bounding box so that a new positioning can be computed. */\n    _resetBoundingBoxStyles() {\n        extendStyles(this._boundingBox.style, {\n            top: '0',\n            left: '0',\n            right: '0',\n            bottom: '0',\n            height: '',\n            width: '',\n            alignItems: '',\n            justifyContent: '',\n        });\n    }\n    /** Resets the styles for the overlay pane so that a new positioning can be computed. */\n    _resetOverlayElementStyles() {\n        extendStyles(this._pane.style, {\n            top: '',\n            left: '',\n            bottom: '',\n            right: '',\n            position: '',\n            transform: '',\n        });\n    }\n    /** Sets positioning styles to the overlay element. */\n    _setOverlayElementStyles(originPoint, position) {\n        const styles = {};\n        const hasExactPosition = this._hasExactPosition();\n        const hasFlexibleDimensions = this._hasFlexibleDimensions;\n        const config = this._overlayRef.getConfig();\n        if (hasExactPosition) {\n            const scrollPosition = this._viewportRuler.getViewportScrollPosition();\n            extendStyles(styles, this._getExactOverlayY(position, originPoint, scrollPosition));\n            extendStyles(styles, this._getExactOverlayX(position, originPoint, scrollPosition));\n        }\n        else {\n            styles.position = 'static';\n        }\n        // Use a transform to apply the offsets. We do this because the `center` positions rely on\n        // being in the normal flex flow and setting a `top` / `left` at all will completely throw\n        // off the position. We also can't use margins, because they won't have an effect in some\n        // cases where the element doesn't have anything to \"push off of\". Finally, this works\n        // better both with flexible and non-flexible positioning.\n        let transformString = '';\n        let offsetX = this._getOffset(position, 'x');\n        let offsetY = this._getOffset(position, 'y');\n        if (offsetX) {\n            transformString += `translateX(${offsetX}px) `;\n        }\n        if (offsetY) {\n            transformString += `translateY(${offsetY}px)`;\n        }\n        styles.transform = transformString.trim();\n        // If a maxWidth or maxHeight is specified on the overlay, we remove them. We do this because\n        // we need these values to both be set to \"100%\" for the automatic flexible sizing to work.\n        // The maxHeight and maxWidth are set on the boundingBox in order to enforce the constraint.\n        // Note that this doesn't apply when we have an exact position, in which case we do want to\n        // apply them because they'll be cleared from the bounding box.\n        if (config.maxHeight) {\n            if (hasExactPosition) {\n                styles.maxHeight = coerceCssPixelValue(config.maxHeight);\n            }\n            else if (hasFlexibleDimensions) {\n                styles.maxHeight = '';\n            }\n        }\n        if (config.maxWidth) {\n            if (hasExactPosition) {\n                styles.maxWidth = coerceCssPixelValue(config.maxWidth);\n            }\n            else if (hasFlexibleDimensions) {\n                styles.maxWidth = '';\n            }\n        }\n        extendStyles(this._pane.style, styles);\n    }\n    /** Gets the exact top/bottom for the overlay when not using flexible sizing or when pushing. */\n    _getExactOverlayY(position, originPoint, scrollPosition) {\n        // Reset any existing styles. This is necessary in case the\n        // preferred position has changed since the last `apply`.\n        let styles = { top: '', bottom: '' };\n        let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n        if (this._isPushed) {\n            overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n        }\n        // We want to set either `top` or `bottom` based on whether the overlay wants to appear\n        // above or below the origin and the direction in which the element will expand.\n        if (position.overlayY === 'bottom') {\n            // When using `bottom`, we adjust the y position such that it is the distance\n            // from the bottom of the viewport rather than the top.\n            const documentHeight = this._document.documentElement.clientHeight;\n            styles.bottom = `${documentHeight - (overlayPoint.y + this._overlayRect.height)}px`;\n        }\n        else {\n            styles.top = coerceCssPixelValue(overlayPoint.y);\n        }\n        return styles;\n    }\n    /** Gets the exact left/right for the overlay when not using flexible sizing or when pushing. */\n    _getExactOverlayX(position, originPoint, scrollPosition) {\n        // Reset any existing styles. This is necessary in case the preferred position has\n        // changed since the last `apply`.\n        let styles = { left: '', right: '' };\n        let overlayPoint = this._getOverlayPoint(originPoint, this._overlayRect, position);\n        if (this._isPushed) {\n            overlayPoint = this._pushOverlayOnScreen(overlayPoint, this._overlayRect, scrollPosition);\n        }\n        // We want to set either `left` or `right` based on whether the overlay wants to appear \"before\"\n        // or \"after\" the origin, which determines the direction in which the element will expand.\n        // For the horizontal axis, the meaning of \"before\" and \"after\" change based on whether the\n        // page is in RTL or LTR.\n        let horizontalStyleProperty;\n        if (this._isRtl()) {\n            horizontalStyleProperty = position.overlayX === 'end' ? 'left' : 'right';\n        }\n        else {\n            horizontalStyleProperty = position.overlayX === 'end' ? 'right' : 'left';\n        }\n        // When we're setting `right`, we adjust the x position such that it is the distance\n        // from the right edge of the viewport rather than the left edge.\n        if (horizontalStyleProperty === 'right') {\n            const documentWidth = this._document.documentElement.clientWidth;\n            styles.right = `${documentWidth - (overlayPoint.x + this._overlayRect.width)}px`;\n        }\n        else {\n            styles.left = coerceCssPixelValue(overlayPoint.x);\n        }\n        return styles;\n    }\n    /**\n     * Gets the view properties of the trigger and overlay, including whether they are clipped\n     * or completely outside the view of any of the strategy's scrollables.\n     */\n    _getScrollVisibility() {\n        // Note: needs fresh rects since the position could've changed.\n        const originBounds = this._getOriginRect();\n        const overlayBounds = this._pane.getBoundingClientRect();\n        // TODO(jelbourn): instead of needing all of the client rects for these scrolling containers\n        // every time, we should be able to use the scrollTop of the containers if the size of those\n        // containers hasn't changed.\n        const scrollContainerBounds = this._scrollables.map(scrollable => {\n            return scrollable.getElementRef().nativeElement.getBoundingClientRect();\n        });\n        return {\n            isOriginClipped: isElementClippedByScrolling(originBounds, scrollContainerBounds),\n            isOriginOutsideView: isElementScrolledOutsideView(originBounds, scrollContainerBounds),\n            isOverlayClipped: isElementClippedByScrolling(overlayBounds, scrollContainerBounds),\n            isOverlayOutsideView: isElementScrolledOutsideView(overlayBounds, scrollContainerBounds),\n        };\n    }\n    /** Subtracts the amount that an element is overflowing on an axis from its length. */\n    _subtractOverflows(length, ...overflows) {\n        return overflows.reduce((currentValue, currentOverflow) => {\n            return currentValue - Math.max(currentOverflow, 0);\n        }, length);\n    }\n    /** Narrows the given viewport rect by the current _viewportMargin. */\n    _getNarrowedViewportRect() {\n        // We recalculate the viewport rect here ourselves, rather than using the ViewportRuler,\n        // because we want to use the `clientWidth` and `clientHeight` as the base. The difference\n        // being that the client properties don't include the scrollbar, as opposed to `innerWidth`\n        // and `innerHeight` that do. This is necessary, because the overlay container uses\n        // 100% `width` and `height` which don't include the scrollbar either.\n        const width = this._document.documentElement.clientWidth;\n        const height = this._document.documentElement.clientHeight;\n        const scrollPosition = this._viewportRuler.getViewportScrollPosition();\n        return {\n            top: scrollPosition.top + this._viewportMargin,\n            left: scrollPosition.left + this._viewportMargin,\n            right: scrollPosition.left + width - this._viewportMargin,\n            bottom: scrollPosition.top + height - this._viewportMargin,\n            width: width - 2 * this._viewportMargin,\n            height: height - 2 * this._viewportMargin,\n        };\n    }\n    /** Whether the we're dealing with an RTL context */\n    _isRtl() {\n        return this._overlayRef.getDirection() === 'rtl';\n    }\n    /** Determines whether the overlay uses exact or flexible positioning. */\n    _hasExactPosition() {\n        return !this._hasFlexibleDimensions || this._isPushed;\n    }\n    /** Retrieves the offset of a position along the x or y axis. */\n    _getOffset(position, axis) {\n        if (axis === 'x') {\n            // We don't do something like `position['offset' + axis]` in\n            // order to avoid breaking minifiers that rename properties.\n            return position.offsetX == null ? this._offsetX : position.offsetX;\n        }\n        return position.offsetY == null ? this._offsetY : position.offsetY;\n    }\n    /** Validates that the current position match the expected values. */\n    _validatePositions() {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (!this._preferredPositions.length) {\n                throw Error('FlexibleConnectedPositionStrategy: At least one position is required.');\n            }\n            // TODO(crisbeto): remove these once Angular's template type\n            // checking is advanced enough to catch these cases.\n            this._preferredPositions.forEach(pair => {\n                validateHorizontalPosition('originX', pair.originX);\n                validateVerticalPosition('originY', pair.originY);\n                validateHorizontalPosition('overlayX', pair.overlayX);\n                validateVerticalPosition('overlayY', pair.overlayY);\n            });\n        }\n    }\n    /** Adds a single CSS class or an array of classes on the overlay panel. */\n    _addPanelClasses(cssClasses) {\n        if (this._pane) {\n            coerceArray(cssClasses).forEach(cssClass => {\n                if (cssClass !== '' && this._appliedPanelClasses.indexOf(cssClass) === -1) {\n                    this._appliedPanelClasses.push(cssClass);\n                    this._pane.classList.add(cssClass);\n                }\n            });\n        }\n    }\n    /** Clears the classes that the position strategy has applied from the overlay panel. */\n    _clearPanelClasses() {\n        if (this._pane) {\n            this._appliedPanelClasses.forEach(cssClass => {\n                this._pane.classList.remove(cssClass);\n            });\n            this._appliedPanelClasses = [];\n        }\n    }\n    /** Returns the DOMRect of the current origin. */\n    _getOriginRect() {\n        const origin = this._origin;\n        if (origin instanceof ElementRef) {\n            return origin.nativeElement.getBoundingClientRect();\n        }\n        // Check for Element so SVG elements are also supported.\n        if (origin instanceof Element) {\n            return origin.getBoundingClientRect();\n        }\n        const width = origin.width || 0;\n        const height = origin.height || 0;\n        // If the origin is a point, return a client rect as if it was a 0x0 element at the point.\n        return {\n            top: origin.y,\n            bottom: origin.y + height,\n            left: origin.x,\n            right: origin.x + width,\n            height,\n            width,\n        };\n    }\n}\n/** Shallow-extends a stylesheet object with another stylesheet object. */\nfunction extendStyles(destination, source) {\n    for (let key in source) {\n        if (source.hasOwnProperty(key)) {\n            destination[key] = source[key];\n        }\n    }\n    return destination;\n}\n/**\n * Extracts the pixel value as a number from a value, if it's a number\n * or a CSS pixel string (e.g. `1337px`). Otherwise returns null.\n */\nfunction getPixelValue(input) {\n    if (typeof input !== 'number' && input != null) {\n        const [value, units] = input.split(cssUnitPattern);\n        return !units || units === 'px' ? parseFloat(value) : null;\n    }\n    return input || null;\n}\n/**\n * Gets a version of an element's bounding `DOMRect` where all the values are rounded down to\n * the nearest pixel. This allows us to account for the cases where there may be sub-pixel\n * deviations in the `DOMRect` returned by the browser (e.g. when zoomed in with a percentage\n * size, see #21350).\n */\nfunction getRoundedBoundingClientRect(clientRect) {\n    return {\n        top: Math.floor(clientRect.top),\n        right: Math.floor(clientRect.right),\n        bottom: Math.floor(clientRect.bottom),\n        left: Math.floor(clientRect.left),\n        width: Math.floor(clientRect.width),\n        height: Math.floor(clientRect.height),\n    };\n}\n/** Returns whether two `ScrollingVisibility` objects are identical. */\nfunction compareScrollVisibility(a, b) {\n    if (a === b) {\n        return true;\n    }\n    return (a.isOriginClipped === b.isOriginClipped &&\n        a.isOriginOutsideView === b.isOriginOutsideView &&\n        a.isOverlayClipped === b.isOverlayClipped &&\n        a.isOverlayOutsideView === b.isOverlayOutsideView);\n}\nconst STANDARD_DROPDOWN_BELOW_POSITIONS = [\n    { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n    { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n    { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n    { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },\n];\nconst STANDARD_DROPDOWN_ADJACENT_POSITIONS = [\n    { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top' },\n    { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom' },\n    { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top' },\n    { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom' },\n];\n\n/** Class to be added to the overlay pane wrapper. */\nconst wrapperClass = 'cdk-global-overlay-wrapper';\n/**\n * A strategy for positioning overlays. Using this strategy, an overlay is given an\n * explicit position relative to the browser's viewport. We use flexbox, instead of\n * transforms, in order to avoid issues with subpixel rendering which can cause the\n * element to become blurry.\n */\nclass GlobalPositionStrategy {\n    /** The overlay to which this strategy is attached. */\n    _overlayRef;\n    _cssPosition = 'static';\n    _topOffset = '';\n    _bottomOffset = '';\n    _alignItems = '';\n    _xPosition = '';\n    _xOffset = '';\n    _width = '';\n    _height = '';\n    _isDisposed = false;\n    attach(overlayRef) {\n        const config = overlayRef.getConfig();\n        this._overlayRef = overlayRef;\n        if (this._width && !config.width) {\n            overlayRef.updateSize({ width: this._width });\n        }\n        if (this._height && !config.height) {\n            overlayRef.updateSize({ height: this._height });\n        }\n        overlayRef.hostElement.classList.add(wrapperClass);\n        this._isDisposed = false;\n    }\n    /**\n     * Sets the top position of the overlay. Clears any previously set vertical position.\n     * @param value New top offset.\n     */\n    top(value = '') {\n        this._bottomOffset = '';\n        this._topOffset = value;\n        this._alignItems = 'flex-start';\n        return this;\n    }\n    /**\n     * Sets the left position of the overlay. Clears any previously set horizontal position.\n     * @param value New left offset.\n     */\n    left(value = '') {\n        this._xOffset = value;\n        this._xPosition = 'left';\n        return this;\n    }\n    /**\n     * Sets the bottom position of the overlay. Clears any previously set vertical position.\n     * @param value New bottom offset.\n     */\n    bottom(value = '') {\n        this._topOffset = '';\n        this._bottomOffset = value;\n        this._alignItems = 'flex-end';\n        return this;\n    }\n    /**\n     * Sets the right position of the overlay. Clears any previously set horizontal position.\n     * @param value New right offset.\n     */\n    right(value = '') {\n        this._xOffset = value;\n        this._xPosition = 'right';\n        return this;\n    }\n    /**\n     * Sets the overlay to the start of the viewport, depending on the overlay direction.\n     * This will be to the left in LTR layouts and to the right in RTL.\n     * @param offset Offset from the edge of the screen.\n     */\n    start(value = '') {\n        this._xOffset = value;\n        this._xPosition = 'start';\n        return this;\n    }\n    /**\n     * Sets the overlay to the end of the viewport, depending on the overlay direction.\n     * This will be to the right in LTR layouts and to the left in RTL.\n     * @param offset Offset from the edge of the screen.\n     */\n    end(value = '') {\n        this._xOffset = value;\n        this._xPosition = 'end';\n        return this;\n    }\n    /**\n     * Sets the overlay width and clears any previously set width.\n     * @param value New width for the overlay\n     * @deprecated Pass the `width` through the `OverlayConfig`.\n     * @breaking-change 8.0.0\n     */\n    width(value = '') {\n        if (this._overlayRef) {\n            this._overlayRef.updateSize({ width: value });\n        }\n        else {\n            this._width = value;\n        }\n        return this;\n    }\n    /**\n     * Sets the overlay height and clears any previously set height.\n     * @param value New height for the overlay\n     * @deprecated Pass the `height` through the `OverlayConfig`.\n     * @breaking-change 8.0.0\n     */\n    height(value = '') {\n        if (this._overlayRef) {\n            this._overlayRef.updateSize({ height: value });\n        }\n        else {\n            this._height = value;\n        }\n        return this;\n    }\n    /**\n     * Centers the overlay horizontally with an optional offset.\n     * Clears any previously set horizontal position.\n     *\n     * @param offset Overlay offset from the horizontal center.\n     */\n    centerHorizontally(offset = '') {\n        this.left(offset);\n        this._xPosition = 'center';\n        return this;\n    }\n    /**\n     * Centers the overlay vertically with an optional offset.\n     * Clears any previously set vertical position.\n     *\n     * @param offset Overlay offset from the vertical center.\n     */\n    centerVertically(offset = '') {\n        this.top(offset);\n        this._alignItems = 'center';\n        return this;\n    }\n    /**\n     * Apply the position to the element.\n     * @docs-private\n     */\n    apply() {\n        // Since the overlay ref applies the strategy asynchronously, it could\n        // have been disposed before it ends up being applied. If that is the\n        // case, we shouldn't do anything.\n        if (!this._overlayRef || !this._overlayRef.hasAttached()) {\n            return;\n        }\n        const styles = this._overlayRef.overlayElement.style;\n        const parentStyles = this._overlayRef.hostElement.style;\n        const config = this._overlayRef.getConfig();\n        const { width, height, maxWidth, maxHeight } = config;\n        const shouldBeFlushHorizontally = (width === '100%' || width === '100vw') &&\n            (!maxWidth || maxWidth === '100%' || maxWidth === '100vw');\n        const shouldBeFlushVertically = (height === '100%' || height === '100vh') &&\n            (!maxHeight || maxHeight === '100%' || maxHeight === '100vh');\n        const xPosition = this._xPosition;\n        const xOffset = this._xOffset;\n        const isRtl = this._overlayRef.getConfig().direction === 'rtl';\n        let marginLeft = '';\n        let marginRight = '';\n        let justifyContent = '';\n        if (shouldBeFlushHorizontally) {\n            justifyContent = 'flex-start';\n        }\n        else if (xPosition === 'center') {\n            justifyContent = 'center';\n            if (isRtl) {\n                marginRight = xOffset;\n            }\n            else {\n                marginLeft = xOffset;\n            }\n        }\n        else if (isRtl) {\n            if (xPosition === 'left' || xPosition === 'end') {\n                justifyContent = 'flex-end';\n                marginLeft = xOffset;\n            }\n            else if (xPosition === 'right' || xPosition === 'start') {\n                justifyContent = 'flex-start';\n                marginRight = xOffset;\n            }\n        }\n        else if (xPosition === 'left' || xPosition === 'start') {\n            justifyContent = 'flex-start';\n            marginLeft = xOffset;\n        }\n        else if (xPosition === 'right' || xPosition === 'end') {\n            justifyContent = 'flex-end';\n            marginRight = xOffset;\n        }\n        styles.position = this._cssPosition;\n        styles.marginLeft = shouldBeFlushHorizontally ? '0' : marginLeft;\n        styles.marginTop = shouldBeFlushVertically ? '0' : this._topOffset;\n        styles.marginBottom = this._bottomOffset;\n        styles.marginRight = shouldBeFlushHorizontally ? '0' : marginRight;\n        parentStyles.justifyContent = justifyContent;\n        parentStyles.alignItems = shouldBeFlushVertically ? 'flex-start' : this._alignItems;\n    }\n    /**\n     * Cleans up the DOM changes from the position strategy.\n     * @docs-private\n     */\n    dispose() {\n        if (this._isDisposed || !this._overlayRef) {\n            return;\n        }\n        const styles = this._overlayRef.overlayElement.style;\n        const parent = this._overlayRef.hostElement;\n        const parentStyles = parent.style;\n        parent.classList.remove(wrapperClass);\n        parentStyles.justifyContent =\n            parentStyles.alignItems =\n                styles.marginTop =\n                    styles.marginBottom =\n                        styles.marginLeft =\n                            styles.marginRight =\n                                styles.position =\n                                    '';\n        this._overlayRef = null;\n        this._isDisposed = true;\n    }\n}\n\n/** Builder for overlay position strategy. */\nclass OverlayPositionBuilder {\n    _viewportRuler = inject(ViewportRuler);\n    _document = inject(DOCUMENT);\n    _platform = inject(Platform);\n    _overlayContainer = inject(OverlayContainer);\n    constructor() { }\n    /**\n     * Creates a global position strategy.\n     */\n    global() {\n        return new GlobalPositionStrategy();\n    }\n    /**\n     * Creates a flexible position strategy.\n     * @param origin Origin relative to which to position the overlay.\n     */\n    flexibleConnectedTo(origin) {\n        return new FlexibleConnectedPositionStrategy(origin, this._viewportRuler, this._document, this._platform, this._overlayContainer);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayPositionBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayPositionBuilder, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayPositionBuilder, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\n/**\n * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be\n * used as a low-level building block for other components. Dialogs, tooltips, menus,\n * selects, etc. can all be built using overlays. The service should primarily be used by authors\n * of re-usable components rather than developers building end-user applications.\n *\n * An overlay *is* a PortalOutlet, so any kind of Portal can be loaded into one.\n */\nclass Overlay {\n    scrollStrategies = inject(ScrollStrategyOptions);\n    _overlayContainer = inject(OverlayContainer);\n    _positionBuilder = inject(OverlayPositionBuilder);\n    _keyboardDispatcher = inject(OverlayKeyboardDispatcher);\n    _injector = inject(Injector);\n    _ngZone = inject(NgZone);\n    _document = inject(DOCUMENT);\n    _directionality = inject(Directionality);\n    _location = inject(Location);\n    _outsideClickDispatcher = inject(OverlayOutsideClickDispatcher);\n    _animationsModuleType = inject(ANIMATION_MODULE_TYPE, { optional: true });\n    _idGenerator = inject(_IdGenerator);\n    _renderer = inject(RendererFactory2).createRenderer(null, null);\n    _appRef;\n    _styleLoader = inject(_CdkPrivateStyleLoader);\n    constructor() { }\n    /**\n     * Creates an overlay.\n     * @param config Configuration applied to the overlay.\n     * @returns Reference to the created overlay.\n     */\n    create(config) {\n        // This is done in the overlay container as well, but we have it here\n        // since it's common to mock out the overlay container in tests.\n        this._styleLoader.load(_CdkOverlayStyleLoader);\n        const host = this._createHostElement();\n        const pane = this._createPaneElement(host);\n        const portalOutlet = this._createPortalOutlet(pane);\n        const overlayConfig = new OverlayConfig(config);\n        overlayConfig.direction = overlayConfig.direction || this._directionality.value;\n        return new OverlayRef(portalOutlet, host, pane, overlayConfig, this._ngZone, this._keyboardDispatcher, this._document, this._location, this._outsideClickDispatcher, this._animationsModuleType === 'NoopAnimations', this._injector.get(EnvironmentInjector), this._renderer);\n    }\n    /**\n     * Gets a position builder that can be used, via fluent API,\n     * to construct and configure a position strategy.\n     * @returns An overlay position builder.\n     */\n    position() {\n        return this._positionBuilder;\n    }\n    /**\n     * Creates the DOM element for an overlay and appends it to the overlay container.\n     * @returns Newly-created pane element\n     */\n    _createPaneElement(host) {\n        const pane = this._document.createElement('div');\n        pane.id = this._idGenerator.getId('cdk-overlay-');\n        pane.classList.add('cdk-overlay-pane');\n        host.appendChild(pane);\n        return pane;\n    }\n    /**\n     * Creates the host element that wraps around an overlay\n     * and can be used for advanced positioning.\n     * @returns Newly-create host element.\n     */\n    _createHostElement() {\n        const host = this._document.createElement('div');\n        this._overlayContainer.getContainerElement().appendChild(host);\n        return host;\n    }\n    /**\n     * Create a DomPortalOutlet into which the overlay content can be loaded.\n     * @param pane The DOM element to turn into a portal outlet.\n     * @returns A portal outlet for the given DOM element.\n     */\n    _createPortalOutlet(pane) {\n        // We have to resolve the ApplicationRef later in order to allow people\n        // to use overlay-based providers during app initialization.\n        if (!this._appRef) {\n            this._appRef = this._injector.get(ApplicationRef);\n        }\n        return new DomPortalOutlet(pane, null, this._appRef, this._injector, this._document);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Overlay, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Overlay, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Overlay, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\n/** Default set of positions for the overlay. Follows the behavior of a dropdown. */\nconst defaultPositionList = [\n    {\n        originX: 'start',\n        originY: 'bottom',\n        overlayX: 'start',\n        overlayY: 'top',\n    },\n    {\n        originX: 'start',\n        originY: 'top',\n        overlayX: 'start',\n        overlayY: 'bottom',\n    },\n    {\n        originX: 'end',\n        originY: 'top',\n        overlayX: 'end',\n        overlayY: 'bottom',\n    },\n    {\n        originX: 'end',\n        originY: 'bottom',\n        overlayX: 'end',\n        overlayY: 'top',\n    },\n];\n/** Injection token that determines the scroll handling while the connected overlay is open. */\nconst CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY = new InjectionToken('cdk-connected-overlay-scroll-strategy', {\n    providedIn: 'root',\n    factory: () => {\n        const overlay = inject(Overlay);\n        return () => overlay.scrollStrategies.reposition();\n    },\n});\n/**\n * Directive applied to an element to make it usable as an origin for an Overlay using a\n * ConnectedPositionStrategy.\n */\nclass CdkOverlayOrigin {\n    elementRef = inject(ElementRef);\n    constructor() { }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkOverlayOrigin, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkOverlayOrigin, isStandalone: true, selector: \"[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]\", exportAs: [\"cdkOverlayOrigin\"], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkOverlayOrigin, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]',\n                    exportAs: 'cdkOverlayOrigin',\n                }]\n        }], ctorParameters: () => [] });\n/**\n * Directive to facilitate declarative creation of an\n * Overlay using a FlexibleConnectedPositionStrategy.\n */\nclass CdkConnectedOverlay {\n    _overlay = inject(Overlay);\n    _dir = inject(Directionality, { optional: true });\n    _overlayRef;\n    _templatePortal;\n    _backdropSubscription = Subscription.EMPTY;\n    _attachSubscription = Subscription.EMPTY;\n    _detachSubscription = Subscription.EMPTY;\n    _positionSubscription = Subscription.EMPTY;\n    _offsetX;\n    _offsetY;\n    _position;\n    _scrollStrategyFactory = inject(CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY);\n    _disposeOnNavigation = false;\n    _ngZone = inject(NgZone);\n    /** Origin for the connected overlay. */\n    origin;\n    /** Registered connected position pairs. */\n    positions;\n    /**\n     * This input overrides the positions input if specified. It lets users pass\n     * in arbitrary positioning strategies.\n     */\n    positionStrategy;\n    /** The offset in pixels for the overlay connection point on the x-axis */\n    get offsetX() {\n        return this._offsetX;\n    }\n    set offsetX(offsetX) {\n        this._offsetX = offsetX;\n        if (this._position) {\n            this._updatePositionStrategy(this._position);\n        }\n    }\n    /** The offset in pixels for the overlay connection point on the y-axis */\n    get offsetY() {\n        return this._offsetY;\n    }\n    set offsetY(offsetY) {\n        this._offsetY = offsetY;\n        if (this._position) {\n            this._updatePositionStrategy(this._position);\n        }\n    }\n    /** The width of the overlay panel. */\n    width;\n    /** The height of the overlay panel. */\n    height;\n    /** The min width of the overlay panel. */\n    minWidth;\n    /** The min height of the overlay panel. */\n    minHeight;\n    /** The custom class to be set on the backdrop element. */\n    backdropClass;\n    /** The custom class to add to the overlay pane element. */\n    panelClass;\n    /** Margin between the overlay and the viewport edges. */\n    viewportMargin = 0;\n    /** Strategy to be used when handling scroll events while the overlay is open. */\n    scrollStrategy;\n    /** Whether the overlay is open. */\n    open = false;\n    /** Whether the overlay can be closed by user interaction. */\n    disableClose = false;\n    /** CSS selector which to set the transform origin. */\n    transformOriginSelector;\n    /** Whether or not the overlay should attach a backdrop. */\n    hasBackdrop = false;\n    /** Whether or not the overlay should be locked when scrolling. */\n    lockPosition = false;\n    /** Whether the overlay's width and height can be constrained to fit within the viewport. */\n    flexibleDimensions = false;\n    /** Whether the overlay can grow after the initial open when flexible positioning is turned on. */\n    growAfterOpen = false;\n    /** Whether the overlay can be pushed on-screen if none of the provided positions fit. */\n    push = false;\n    /** Whether the overlay should be disposed of when the user goes backwards/forwards in history. */\n    get disposeOnNavigation() {\n        return this._disposeOnNavigation;\n    }\n    set disposeOnNavigation(value) {\n        this._disposeOnNavigation = value;\n    }\n    /** Event emitted when the backdrop is clicked. */\n    backdropClick = new EventEmitter();\n    /** Event emitted when the position has changed. */\n    positionChange = new EventEmitter();\n    /** Event emitted when the overlay has been attached. */\n    attach = new EventEmitter();\n    /** Event emitted when the overlay has been detached. */\n    detach = new EventEmitter();\n    /** Emits when there are keyboard events that are targeted at the overlay. */\n    overlayKeydown = new EventEmitter();\n    /** Emits when there are mouse outside click events that are targeted at the overlay. */\n    overlayOutsideClick = new EventEmitter();\n    // TODO(jelbourn): inputs for size, scroll behavior, animation, etc.\n    constructor() {\n        const templateRef = inject(TemplateRef);\n        const viewContainerRef = inject(ViewContainerRef);\n        this._templatePortal = new TemplatePortal(templateRef, viewContainerRef);\n        this.scrollStrategy = this._scrollStrategyFactory();\n    }\n    /** The associated overlay reference. */\n    get overlayRef() {\n        return this._overlayRef;\n    }\n    /** The element's layout direction. */\n    get dir() {\n        return this._dir ? this._dir.value : 'ltr';\n    }\n    ngOnDestroy() {\n        this._attachSubscription.unsubscribe();\n        this._detachSubscription.unsubscribe();\n        this._backdropSubscription.unsubscribe();\n        this._positionSubscription.unsubscribe();\n        if (this._overlayRef) {\n            this._overlayRef.dispose();\n        }\n    }\n    ngOnChanges(changes) {\n        if (this._position) {\n            this._updatePositionStrategy(this._position);\n            this._overlayRef.updateSize({\n                width: this.width,\n                minWidth: this.minWidth,\n                height: this.height,\n                minHeight: this.minHeight,\n            });\n            if (changes['origin'] && this.open) {\n                this._position.apply();\n            }\n        }\n        if (changes['open']) {\n            this.open ? this._attachOverlay() : this._detachOverlay();\n        }\n    }\n    /** Creates an overlay */\n    _createOverlay() {\n        if (!this.positions || !this.positions.length) {\n            this.positions = defaultPositionList;\n        }\n        const overlayRef = (this._overlayRef = this._overlay.create(this._buildConfig()));\n        this._attachSubscription = overlayRef.attachments().subscribe(() => this.attach.emit());\n        this._detachSubscription = overlayRef.detachments().subscribe(() => this.detach.emit());\n        overlayRef.keydownEvents().subscribe((event) => {\n            this.overlayKeydown.next(event);\n            if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n                event.preventDefault();\n                this._detachOverlay();\n            }\n        });\n        this._overlayRef.outsidePointerEvents().subscribe((event) => {\n            const origin = this._getOriginElement();\n            const target = _getEventTarget(event);\n            if (!origin || (origin !== target && !origin.contains(target))) {\n                this.overlayOutsideClick.next(event);\n            }\n        });\n    }\n    /** Builds the overlay config based on the directive's inputs */\n    _buildConfig() {\n        const positionStrategy = (this._position =\n            this.positionStrategy || this._createPositionStrategy());\n        const overlayConfig = new OverlayConfig({\n            direction: this._dir || 'ltr',\n            positionStrategy,\n            scrollStrategy: this.scrollStrategy,\n            hasBackdrop: this.hasBackdrop,\n            disposeOnNavigation: this.disposeOnNavigation,\n        });\n        if (this.width || this.width === 0) {\n            overlayConfig.width = this.width;\n        }\n        if (this.height || this.height === 0) {\n            overlayConfig.height = this.height;\n        }\n        if (this.minWidth || this.minWidth === 0) {\n            overlayConfig.minWidth = this.minWidth;\n        }\n        if (this.minHeight || this.minHeight === 0) {\n            overlayConfig.minHeight = this.minHeight;\n        }\n        if (this.backdropClass) {\n            overlayConfig.backdropClass = this.backdropClass;\n        }\n        if (this.panelClass) {\n            overlayConfig.panelClass = this.panelClass;\n        }\n        return overlayConfig;\n    }\n    /** Updates the state of a position strategy, based on the values of the directive inputs. */\n    _updatePositionStrategy(positionStrategy) {\n        const positions = this.positions.map(currentPosition => ({\n            originX: currentPosition.originX,\n            originY: currentPosition.originY,\n            overlayX: currentPosition.overlayX,\n            overlayY: currentPosition.overlayY,\n            offsetX: currentPosition.offsetX || this.offsetX,\n            offsetY: currentPosition.offsetY || this.offsetY,\n            panelClass: currentPosition.panelClass || undefined,\n        }));\n        return positionStrategy\n            .setOrigin(this._getOrigin())\n            .withPositions(positions)\n            .withFlexibleDimensions(this.flexibleDimensions)\n            .withPush(this.push)\n            .withGrowAfterOpen(this.growAfterOpen)\n            .withViewportMargin(this.viewportMargin)\n            .withLockedPosition(this.lockPosition)\n            .withTransformOriginOn(this.transformOriginSelector);\n    }\n    /** Returns the position strategy of the overlay to be set on the overlay config */\n    _createPositionStrategy() {\n        const strategy = this._overlay.position().flexibleConnectedTo(this._getOrigin());\n        this._updatePositionStrategy(strategy);\n        return strategy;\n    }\n    _getOrigin() {\n        if (this.origin instanceof CdkOverlayOrigin) {\n            return this.origin.elementRef;\n        }\n        else {\n            return this.origin;\n        }\n    }\n    _getOriginElement() {\n        if (this.origin instanceof CdkOverlayOrigin) {\n            return this.origin.elementRef.nativeElement;\n        }\n        if (this.origin instanceof ElementRef) {\n            return this.origin.nativeElement;\n        }\n        if (typeof Element !== 'undefined' && this.origin instanceof Element) {\n            return this.origin;\n        }\n        return null;\n    }\n    /** Attaches the overlay and subscribes to backdrop clicks if backdrop exists */\n    _attachOverlay() {\n        if (!this._overlayRef) {\n            this._createOverlay();\n        }\n        else {\n            // Update the overlay size, in case the directive's inputs have changed\n            this._overlayRef.getConfig().hasBackdrop = this.hasBackdrop;\n        }\n        if (!this._overlayRef.hasAttached()) {\n            this._overlayRef.attach(this._templatePortal);\n        }\n        if (this.hasBackdrop) {\n            this._backdropSubscription = this._overlayRef.backdropClick().subscribe(event => {\n                this.backdropClick.emit(event);\n            });\n        }\n        else {\n            this._backdropSubscription.unsubscribe();\n        }\n        this._positionSubscription.unsubscribe();\n        // Only subscribe to `positionChanges` if requested, because putting\n        // together all the information for it can be expensive.\n        if (this.positionChange.observers.length > 0) {\n            this._positionSubscription = this._position.positionChanges\n                .pipe(takeWhile(() => this.positionChange.observers.length > 0))\n                .subscribe(position => {\n                this._ngZone.run(() => this.positionChange.emit(position));\n                if (this.positionChange.observers.length === 0) {\n                    this._positionSubscription.unsubscribe();\n                }\n            });\n        }\n    }\n    /** Detaches the overlay and unsubscribes to backdrop clicks if backdrop exists */\n    _detachOverlay() {\n        if (this._overlayRef) {\n            this._overlayRef.detach();\n        }\n        this._backdropSubscription.unsubscribe();\n        this._positionSubscription.unsubscribe();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkConnectedOverlay, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: CdkConnectedOverlay, isStandalone: true, selector: \"[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]\", inputs: { origin: [\"cdkConnectedOverlayOrigin\", \"origin\"], positions: [\"cdkConnectedOverlayPositions\", \"positions\"], positionStrategy: [\"cdkConnectedOverlayPositionStrategy\", \"positionStrategy\"], offsetX: [\"cdkConnectedOverlayOffsetX\", \"offsetX\"], offsetY: [\"cdkConnectedOverlayOffsetY\", \"offsetY\"], width: [\"cdkConnectedOverlayWidth\", \"width\"], height: [\"cdkConnectedOverlayHeight\", \"height\"], minWidth: [\"cdkConnectedOverlayMinWidth\", \"minWidth\"], minHeight: [\"cdkConnectedOverlayMinHeight\", \"minHeight\"], backdropClass: [\"cdkConnectedOverlayBackdropClass\", \"backdropClass\"], panelClass: [\"cdkConnectedOverlayPanelClass\", \"panelClass\"], viewportMargin: [\"cdkConnectedOverlayViewportMargin\", \"viewportMargin\"], scrollStrategy: [\"cdkConnectedOverlayScrollStrategy\", \"scrollStrategy\"], open: [\"cdkConnectedOverlayOpen\", \"open\"], disableClose: [\"cdkConnectedOverlayDisableClose\", \"disableClose\"], transformOriginSelector: [\"cdkConnectedOverlayTransformOriginOn\", \"transformOriginSelector\"], hasBackdrop: [\"cdkConnectedOverlayHasBackdrop\", \"hasBackdrop\", booleanAttribute], lockPosition: [\"cdkConnectedOverlayLockPosition\", \"lockPosition\", booleanAttribute], flexibleDimensions: [\"cdkConnectedOverlayFlexibleDimensions\", \"flexibleDimensions\", booleanAttribute], growAfterOpen: [\"cdkConnectedOverlayGrowAfterOpen\", \"growAfterOpen\", booleanAttribute], push: [\"cdkConnectedOverlayPush\", \"push\", booleanAttribute], disposeOnNavigation: [\"cdkConnectedOverlayDisposeOnNavigation\", \"disposeOnNavigation\", booleanAttribute] }, outputs: { backdropClick: \"backdropClick\", positionChange: \"positionChange\", attach: \"attach\", detach: \"detach\", overlayKeydown: \"overlayKeydown\", overlayOutsideClick: \"overlayOutsideClick\" }, exportAs: [\"cdkConnectedOverlay\"], usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkConnectedOverlay, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]',\n                    exportAs: 'cdkConnectedOverlay',\n                }]\n        }], ctorParameters: () => [], propDecorators: { origin: [{\n                type: Input,\n                args: ['cdkConnectedOverlayOrigin']\n            }], positions: [{\n                type: Input,\n                args: ['cdkConnectedOverlayPositions']\n            }], positionStrategy: [{\n                type: Input,\n                args: ['cdkConnectedOverlayPositionStrategy']\n            }], offsetX: [{\n                type: Input,\n                args: ['cdkConnectedOverlayOffsetX']\n            }], offsetY: [{\n                type: Input,\n                args: ['cdkConnectedOverlayOffsetY']\n            }], width: [{\n                type: Input,\n                args: ['cdkConnectedOverlayWidth']\n            }], height: [{\n                type: Input,\n                args: ['cdkConnectedOverlayHeight']\n            }], minWidth: [{\n                type: Input,\n                args: ['cdkConnectedOverlayMinWidth']\n            }], minHeight: [{\n                type: Input,\n                args: ['cdkConnectedOverlayMinHeight']\n            }], backdropClass: [{\n                type: Input,\n                args: ['cdkConnectedOverlayBackdropClass']\n            }], panelClass: [{\n                type: Input,\n                args: ['cdkConnectedOverlayPanelClass']\n            }], viewportMargin: [{\n                type: Input,\n                args: ['cdkConnectedOverlayViewportMargin']\n            }], scrollStrategy: [{\n                type: Input,\n                args: ['cdkConnectedOverlayScrollStrategy']\n            }], open: [{\n                type: Input,\n                args: ['cdkConnectedOverlayOpen']\n            }], disableClose: [{\n                type: Input,\n                args: ['cdkConnectedOverlayDisableClose']\n            }], transformOriginSelector: [{\n                type: Input,\n                args: ['cdkConnectedOverlayTransformOriginOn']\n            }], hasBackdrop: [{\n                type: Input,\n                args: [{ alias: 'cdkConnectedOverlayHasBackdrop', transform: booleanAttribute }]\n            }], lockPosition: [{\n                type: Input,\n                args: [{ alias: 'cdkConnectedOverlayLockPosition', transform: booleanAttribute }]\n            }], flexibleDimensions: [{\n                type: Input,\n                args: [{ alias: 'cdkConnectedOverlayFlexibleDimensions', transform: booleanAttribute }]\n            }], growAfterOpen: [{\n                type: Input,\n                args: [{ alias: 'cdkConnectedOverlayGrowAfterOpen', transform: booleanAttribute }]\n            }], push: [{\n                type: Input,\n                args: [{ alias: 'cdkConnectedOverlayPush', transform: booleanAttribute }]\n            }], disposeOnNavigation: [{\n                type: Input,\n                args: [{ alias: 'cdkConnectedOverlayDisposeOnNavigation', transform: booleanAttribute }]\n            }], backdropClick: [{\n                type: Output\n            }], positionChange: [{\n                type: Output\n            }], attach: [{\n                type: Output\n            }], detach: [{\n                type: Output\n            }], overlayKeydown: [{\n                type: Output\n            }], overlayOutsideClick: [{\n                type: Output\n            }] } });\n/** @docs-private */\nfunction CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n    return () => overlay.scrollStrategies.reposition();\n}\n/** @docs-private */\nconst CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER = {\n    provide: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY,\n    deps: [Overlay],\n    useFactory: CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\nclass OverlayModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayModule, imports: [BidiModule, PortalModule, ScrollingModule, CdkConnectedOverlay, CdkOverlayOrigin], exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayModule, providers: [Overlay, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER], imports: [BidiModule, PortalModule, ScrollingModule, ScrollingModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: OverlayModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [BidiModule, PortalModule, ScrollingModule, CdkConnectedOverlay, CdkOverlayOrigin],\n                    exports: [CdkConnectedOverlay, CdkOverlayOrigin, ScrollingModule],\n                    providers: [Overlay, CDK_CONNECTED_OVERLAY_SCROLL_STRATEGY_PROVIDER],\n                }]\n        }] });\n\n/**\n * Alternative to OverlayContainer that supports correct displaying of overlay elements in\n * Fullscreen mode\n * https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen\n *\n * Should be provided in the root component.\n */\nclass FullscreenOverlayContainer extends OverlayContainer {\n    _renderer = inject(RendererFactory2).createRenderer(null, null);\n    _fullScreenEventName;\n    _cleanupFullScreenListener;\n    constructor() {\n        super();\n    }\n    ngOnDestroy() {\n        super.ngOnDestroy();\n        this._cleanupFullScreenListener?.();\n    }\n    _createContainer() {\n        const eventName = this._getEventName();\n        super._createContainer();\n        this._adjustParentForFullscreenChange();\n        if (eventName) {\n            this._cleanupFullScreenListener?.();\n            this._cleanupFullScreenListener = this._renderer.listen('document', eventName, () => {\n                this._adjustParentForFullscreenChange();\n            });\n        }\n    }\n    _adjustParentForFullscreenChange() {\n        if (this._containerElement) {\n            const fullscreenElement = this.getFullscreenElement();\n            const parent = fullscreenElement || this._document.body;\n            parent.appendChild(this._containerElement);\n        }\n    }\n    _getEventName() {\n        if (!this._fullScreenEventName) {\n            const _document = this._document;\n            if (_document.fullscreenEnabled) {\n                this._fullScreenEventName = 'fullscreenchange';\n            }\n            else if (_document.webkitFullscreenEnabled) {\n                this._fullScreenEventName = 'webkitfullscreenchange';\n            }\n            else if (_document.mozFullScreenEnabled) {\n                this._fullScreenEventName = 'mozfullscreenchange';\n            }\n            else if (_document.msFullscreenEnabled) {\n                this._fullScreenEventName = 'MSFullscreenChange';\n            }\n        }\n        return this._fullScreenEventName;\n    }\n    /**\n     * When the page is put into fullscreen mode, a specific element is specified.\n     * Only that element and its children are visible when in fullscreen mode.\n     */\n    getFullscreenElement() {\n        const _document = this._document;\n        return (_document.fullscreenElement ||\n            _document.webkitFullscreenElement ||\n            _document.mozFullScreenElement ||\n            _document.msFullscreenElement ||\n            null);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FullscreenOverlayContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FullscreenOverlayContainer, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FullscreenOverlayContainer, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BlockScrollStrategy, CdkConnectedOverlay, CdkOverlayOrigin, CloseScrollStrategy, ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy, FullscreenOverlayContainer, GlobalPositionStrategy, NoopScrollStrategy, Overlay, OverlayConfig, OverlayContainer, OverlayKeyboardDispatcher, OverlayModule, OverlayOutsideClickDispatcher, OverlayPositionBuilder, OverlayRef, RepositionScrollStrategy, STANDARD_DROPDOWN_ADJACENT_POSITIONS, STANDARD_DROPDOWN_BELOW_POSITIONS, ScrollStrategyOptions, ScrollingVisibility, validateHorizontalPosition, validateVerticalPosition };\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive = false) {\n    return operate((source, subscriber) => {\n        let index = 0;\n        source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n            const result = predicate(value, index++);\n            (result || inclusive) && subscriber.next(value);\n            !result && subscriber.complete();\n        }));\n    });\n}\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Directive, inject, Component, ViewEncapsulation, ChangeDetectionStrategy, NgZone, ElementRef, ChangeDetectorRef, ViewChild, Injector, TemplateRef, Injectable, NgModule } from '@angular/core';\nimport { MatButton, MatButtonModule } from '@angular/material/button';\nimport { Subject } from 'rxjs';\nimport { DOCUMENT } from '@angular/common';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport { _IdGenerator, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { Platform } from '@angular/cdk/platform';\nimport { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';\nimport { takeUntil } from 'rxjs/operators';\nimport { MatCommonModule } from '@angular/material/core';\n\n/** Maximum amount of milliseconds that can be passed into setTimeout. */\nconst MAX_TIMEOUT = Math.pow(2, 31) - 1;\n/**\n * Reference to a snack bar dispatched from the snack bar service.\n */\nclass MatSnackBarRef {\n    _overlayRef;\n    /** The instance of the component making up the content of the snack bar. */\n    instance;\n    /**\n     * The instance of the component making up the content of the snack bar.\n     * @docs-private\n     */\n    containerInstance;\n    /** Subject for notifying the user that the snack bar has been dismissed. */\n    _afterDismissed = new Subject();\n    /** Subject for notifying the user that the snack bar has opened and appeared. */\n    _afterOpened = new Subject();\n    /** Subject for notifying the user that the snack bar action was called. */\n    _onAction = new Subject();\n    /**\n     * Timeout ID for the duration setTimeout call. Used to clear the timeout if the snackbar is\n     * dismissed before the duration passes.\n     */\n    _durationTimeoutId;\n    /** Whether the snack bar was dismissed using the action button. */\n    _dismissedByAction = false;\n    constructor(containerInstance, _overlayRef) {\n        this._overlayRef = _overlayRef;\n        this.containerInstance = containerInstance;\n        containerInstance._onExit.subscribe(() => this._finishDismiss());\n    }\n    /** Dismisses the snack bar. */\n    dismiss() {\n        if (!this._afterDismissed.closed) {\n            this.containerInstance.exit();\n        }\n        clearTimeout(this._durationTimeoutId);\n    }\n    /** Marks the snackbar action clicked. */\n    dismissWithAction() {\n        if (!this._onAction.closed) {\n            this._dismissedByAction = true;\n            this._onAction.next();\n            this._onAction.complete();\n            this.dismiss();\n        }\n        clearTimeout(this._durationTimeoutId);\n    }\n    /**\n     * Marks the snackbar action clicked.\n     * @deprecated Use `dismissWithAction` instead.\n     * @breaking-change 8.0.0\n     */\n    closeWithAction() {\n        this.dismissWithAction();\n    }\n    /** Dismisses the snack bar after some duration */\n    _dismissAfter(duration) {\n        // Note that we need to cap the duration to the maximum value for setTimeout, because\n        // it'll revert to 1 if somebody passes in something greater (e.g. `Infinity`). See #17234.\n        this._durationTimeoutId = setTimeout(() => this.dismiss(), Math.min(duration, MAX_TIMEOUT));\n    }\n    /** Marks the snackbar as opened */\n    _open() {\n        if (!this._afterOpened.closed) {\n            this._afterOpened.next();\n            this._afterOpened.complete();\n        }\n    }\n    /** Cleans up the DOM after closing. */\n    _finishDismiss() {\n        this._overlayRef.dispose();\n        if (!this._onAction.closed) {\n            this._onAction.complete();\n        }\n        this._afterDismissed.next({ dismissedByAction: this._dismissedByAction });\n        this._afterDismissed.complete();\n        this._dismissedByAction = false;\n    }\n    /** Gets an observable that is notified when the snack bar is finished closing. */\n    afterDismissed() {\n        return this._afterDismissed;\n    }\n    /** Gets an observable that is notified when the snack bar has opened and appeared. */\n    afterOpened() {\n        return this.containerInstance._onEnter;\n    }\n    /** Gets an observable that is notified when the snack bar action is called. */\n    onAction() {\n        return this._onAction;\n    }\n}\n\n/** Injection token that can be used to access the data that was passed in to a snack bar. */\nconst MAT_SNACK_BAR_DATA = new InjectionToken('MatSnackBarData');\n/**\n * Configuration used when opening a snack-bar.\n */\nclass MatSnackBarConfig {\n    /** The politeness level for the MatAriaLiveAnnouncer announcement. */\n    politeness = 'assertive';\n    /**\n     * Message to be announced by the LiveAnnouncer. When opening a snackbar without a custom\n     * component or template, the announcement message will default to the specified message.\n     */\n    announcementMessage = '';\n    /**\n     * The view container that serves as the parent for the snackbar for the purposes of dependency\n     * injection. Note: this does not affect where the snackbar is inserted in the DOM.\n     */\n    viewContainerRef;\n    /** The length of time in milliseconds to wait before automatically dismissing the snack bar. */\n    duration = 0;\n    /** Extra CSS classes to be added to the snack bar container. */\n    panelClass;\n    /** Text layout direction for the snack bar. */\n    direction;\n    /** Data being injected into the child component. */\n    data = null;\n    /** The horizontal position to place the snack bar. */\n    horizontalPosition = 'center';\n    /** The vertical position to place the snack bar. */\n    verticalPosition = 'bottom';\n}\n\n/** Directive that should be applied to the text element to be rendered in the snack bar. */\nclass MatSnackBarLabel {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBarLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatSnackBarLabel, isStandalone: true, selector: \"[matSnackBarLabel]\", host: { classAttribute: \"mat-mdc-snack-bar-label mdc-snackbar__label\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBarLabel, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: `[matSnackBarLabel]`,\n                    host: {\n                        'class': 'mat-mdc-snack-bar-label mdc-snackbar__label',\n                    },\n                }]\n        }] });\n/** Directive that should be applied to the element containing the snack bar's action buttons. */\nclass MatSnackBarActions {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBarActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatSnackBarActions, isStandalone: true, selector: \"[matSnackBarActions]\", host: { classAttribute: \"mat-mdc-snack-bar-actions mdc-snackbar__actions\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBarActions, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: `[matSnackBarActions]`,\n                    host: {\n                        'class': 'mat-mdc-snack-bar-actions mdc-snackbar__actions',\n                    },\n                }]\n        }] });\n/** Directive that should be applied to each of the snack bar's action buttons. */\nclass MatSnackBarAction {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBarAction, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatSnackBarAction, isStandalone: true, selector: \"[matSnackBarAction]\", host: { classAttribute: \"mat-mdc-snack-bar-action mdc-snackbar__action\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBarAction, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: `[matSnackBarAction]`,\n                    host: {\n                        'class': 'mat-mdc-snack-bar-action mdc-snackbar__action',\n                    },\n                }]\n        }] });\n\nclass SimpleSnackBar {\n    snackBarRef = inject(MatSnackBarRef);\n    data = inject(MAT_SNACK_BAR_DATA);\n    constructor() { }\n    /** Performs the action on the snack bar. */\n    action() {\n        this.snackBarRef.dismissWithAction();\n    }\n    /** If the action button should be shown. */\n    get hasAction() {\n        return !!this.data.action;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: SimpleSnackBar, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"19.0.0\", type: SimpleSnackBar, isStandalone: true, selector: \"simple-snack-bar\", host: { classAttribute: \"mat-mdc-simple-snack-bar\" }, exportAs: [\"matSnackBar\"], ngImport: i0, template: \"<div matSnackBarLabel>\\n  {{data.message}}\\n</div>\\n\\n@if (hasAction) {\\n  <div matSnackBarActions>\\n    <button mat-button matSnackBarAction (click)=\\\"action()\\\">\\n      {{data.action}}\\n    </button>\\n  </div>\\n}\\n\", styles: [\".mat-mdc-simple-snack-bar{display:flex}\"], dependencies: [{ kind: \"component\", type: MatButton, selector: \"    button[mat-button], button[mat-raised-button], button[mat-flat-button],    button[mat-stroked-button]  \", exportAs: [\"matButton\"] }, { kind: \"directive\", type: MatSnackBarLabel, selector: \"[matSnackBarLabel]\" }, { kind: \"directive\", type: MatSnackBarActions, selector: \"[matSnackBarActions]\" }, { kind: \"directive\", type: MatSnackBarAction, selector: \"[matSnackBarAction]\" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: SimpleSnackBar, decorators: [{\n            type: Component,\n            args: [{ selector: 'simple-snack-bar', exportAs: 'matSnackBar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButton, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction], host: {\n                        'class': 'mat-mdc-simple-snack-bar',\n                    }, template: \"<div matSnackBarLabel>\\n  {{data.message}}\\n</div>\\n\\n@if (hasAction) {\\n  <div matSnackBarActions>\\n    <button mat-button matSnackBarAction (click)=\\\"action()\\\">\\n      {{data.action}}\\n    </button>\\n  </div>\\n}\\n\", styles: [\".mat-mdc-simple-snack-bar{display:flex}\"] }]\n        }], ctorParameters: () => [] });\n\n/**\n * Animations used by the Material snack bar.\n * @docs-private\n */\nconst matSnackBarAnimations = {\n    /** Animation that shows and hides a snack bar. */\n    snackBarState: trigger('state', [\n        state('void, hidden', style({\n            transform: 'scale(0.8)',\n            opacity: 0,\n        })),\n        state('visible', style({\n            transform: 'scale(1)',\n            opacity: 1,\n        })),\n        transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n        transition('* => void, * => hidden', animate('75ms cubic-bezier(0.4, 0.0, 1, 1)', style({\n            opacity: 0,\n        }))),\n    ]),\n};\n\n/**\n * Internal component that wraps user-provided snack bar content.\n * @docs-private\n */\nclass MatSnackBarContainer extends BasePortalOutlet {\n    _ngZone = inject(NgZone);\n    _elementRef = inject(ElementRef);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _platform = inject(Platform);\n    snackBarConfig = inject(MatSnackBarConfig);\n    _document = inject(DOCUMENT);\n    _trackedModals = new Set();\n    /** The number of milliseconds to wait before announcing the snack bar's content. */\n    _announceDelay = 150;\n    /** The timeout for announcing the snack bar's content. */\n    _announceTimeoutId;\n    /** Whether the component has been destroyed. */\n    _destroyed = false;\n    /** The portal outlet inside of this container into which the snack bar content will be loaded. */\n    _portalOutlet;\n    /** Subject for notifying that the snack bar has announced to screen readers. */\n    _onAnnounce = new Subject();\n    /** Subject for notifying that the snack bar has exited from view. */\n    _onExit = new Subject();\n    /** Subject for notifying that the snack bar has finished entering the view. */\n    _onEnter = new Subject();\n    /** The state of the snack bar animations. */\n    _animationState = 'void';\n    /** aria-live value for the live region. */\n    _live;\n    /**\n     * Element that will have the `mdc-snackbar__label` class applied if the attached component\n     * or template does not have it. This ensures that the appropriate structure, typography, and\n     * color is applied to the attached view.\n     */\n    _label;\n    /**\n     * Role of the live region. This is only for Firefox as there is a known issue where Firefox +\n     * JAWS does not read out aria-live message.\n     */\n    _role;\n    /** Unique ID of the aria-live element. */\n    _liveElementId = inject(_IdGenerator).getId('mat-snack-bar-container-live-');\n    constructor() {\n        super();\n        const config = this.snackBarConfig;\n        // Use aria-live rather than a live role like 'alert' or 'status'\n        // because NVDA and JAWS have show inconsistent behavior with live roles.\n        if (config.politeness === 'assertive' && !config.announcementMessage) {\n            this._live = 'assertive';\n        }\n        else if (config.politeness === 'off') {\n            this._live = 'off';\n        }\n        else {\n            this._live = 'polite';\n        }\n        // Only set role for Firefox. Set role based on aria-live because setting role=\"alert\" implies\n        // aria-live=\"assertive\" which may cause issues if aria-live is set to \"polite\" above.\n        if (this._platform.FIREFOX) {\n            if (this._live === 'polite') {\n                this._role = 'status';\n            }\n            if (this._live === 'assertive') {\n                this._role = 'alert';\n            }\n        }\n    }\n    /** Attach a component portal as content to this snack bar container. */\n    attachComponentPortal(portal) {\n        this._assertNotAttached();\n        const result = this._portalOutlet.attachComponentPortal(portal);\n        this._afterPortalAttached();\n        return result;\n    }\n    /** Attach a template portal as content to this snack bar container. */\n    attachTemplatePortal(portal) {\n        this._assertNotAttached();\n        const result = this._portalOutlet.attachTemplatePortal(portal);\n        this._afterPortalAttached();\n        return result;\n    }\n    /**\n     * Attaches a DOM portal to the snack bar container.\n     * @deprecated To be turned into a method.\n     * @breaking-change 10.0.0\n     */\n    attachDomPortal = (portal) => {\n        this._assertNotAttached();\n        const result = this._portalOutlet.attachDomPortal(portal);\n        this._afterPortalAttached();\n        return result;\n    };\n    /** Handle end of animations, updating the state of the snackbar. */\n    onAnimationEnd(event) {\n        const { fromState, toState } = event;\n        if ((toState === 'void' && fromState !== 'void') || toState === 'hidden') {\n            this._completeExit();\n        }\n        if (toState === 'visible') {\n            // Note: we shouldn't use `this` inside the zone callback,\n            // because it can cause a memory leak.\n            const onEnter = this._onEnter;\n            this._ngZone.run(() => {\n                onEnter.next();\n                onEnter.complete();\n            });\n        }\n    }\n    /** Begin animation of snack bar entrance into view. */\n    enter() {\n        if (!this._destroyed) {\n            this._animationState = 'visible';\n            // _animationState lives in host bindings and `detectChanges` does not refresh host bindings\n            // so we have to call `markForCheck` to ensure the host view is refreshed eventually.\n            this._changeDetectorRef.markForCheck();\n            this._changeDetectorRef.detectChanges();\n            this._screenReaderAnnounce();\n        }\n    }\n    /** Begin animation of the snack bar exiting from view. */\n    exit() {\n        // It's common for snack bars to be opened by random outside calls like HTTP requests or\n        // errors. Run inside the NgZone to ensure that it functions correctly.\n        this._ngZone.run(() => {\n            // Note: this one transitions to `hidden`, rather than `void`, in order to handle the case\n            // where multiple snack bars are opened in quick succession (e.g. two consecutive calls to\n            // `MatSnackBar.open`).\n            this._animationState = 'hidden';\n            this._changeDetectorRef.markForCheck();\n            // Mark this element with an 'exit' attribute to indicate that the snackbar has\n            // been dismissed and will soon be removed from the DOM. This is used by the snackbar\n            // test harness.\n            this._elementRef.nativeElement.setAttribute('mat-exit', '');\n            // If the snack bar hasn't been announced by the time it exits it wouldn't have been open\n            // long enough to visually read it either, so clear the timeout for announcing.\n            clearTimeout(this._announceTimeoutId);\n        });\n        return this._onExit;\n    }\n    /** Makes sure the exit callbacks have been invoked when the element is destroyed. */\n    ngOnDestroy() {\n        this._destroyed = true;\n        this._clearFromModals();\n        this._completeExit();\n    }\n    /**\n     * Removes the element in a microtask. Helps prevent errors where we end up\n     * removing an element which is in the middle of an animation.\n     */\n    _completeExit() {\n        queueMicrotask(() => {\n            this._onExit.next();\n            this._onExit.complete();\n        });\n    }\n    /**\n     * Called after the portal contents have been attached. Can be\n     * used to modify the DOM once it's guaranteed to be in place.\n     */\n    _afterPortalAttached() {\n        const element = this._elementRef.nativeElement;\n        const panelClasses = this.snackBarConfig.panelClass;\n        if (panelClasses) {\n            if (Array.isArray(panelClasses)) {\n                // Note that we can't use a spread here, because IE doesn't support multiple arguments.\n                panelClasses.forEach(cssClass => element.classList.add(cssClass));\n            }\n            else {\n                element.classList.add(panelClasses);\n            }\n        }\n        this._exposeToModals();\n        // Check to see if the attached component or template uses the MDC template structure,\n        // specifically the MDC label. If not, the container should apply the MDC label class to this\n        // component's label container, which will apply MDC's label styles to the attached view.\n        const label = this._label.nativeElement;\n        const labelClass = 'mdc-snackbar__label';\n        label.classList.toggle(labelClass, !label.querySelector(`.${labelClass}`));\n    }\n    /**\n     * Some browsers won't expose the accessibility node of the live element if there is an\n     * `aria-modal` and the live element is outside of it. This method works around the issue by\n     * pointing the `aria-owns` of all modals to the live element.\n     */\n    _exposeToModals() {\n        // TODO(http://github.com/angular/components/issues/26853): consider de-duplicating this with the\n        // `LiveAnnouncer` and any other usages.\n        //\n        // Note that the selector here is limited to CDK overlays at the moment in order to reduce the\n        // section of the DOM we need to look through. This should cover all the cases we support, but\n        // the selector can be expanded if it turns out to be too narrow.\n        const id = this._liveElementId;\n        const modals = this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal=\"true\"]');\n        for (let i = 0; i < modals.length; i++) {\n            const modal = modals[i];\n            const ariaOwns = modal.getAttribute('aria-owns');\n            this._trackedModals.add(modal);\n            if (!ariaOwns) {\n                modal.setAttribute('aria-owns', id);\n            }\n            else if (ariaOwns.indexOf(id) === -1) {\n                modal.setAttribute('aria-owns', ariaOwns + ' ' + id);\n            }\n        }\n    }\n    /** Clears the references to the live element from any modals it was added to. */\n    _clearFromModals() {\n        this._trackedModals.forEach(modal => {\n            const ariaOwns = modal.getAttribute('aria-owns');\n            if (ariaOwns) {\n                const newValue = ariaOwns.replace(this._liveElementId, '').trim();\n                if (newValue.length > 0) {\n                    modal.setAttribute('aria-owns', newValue);\n                }\n                else {\n                    modal.removeAttribute('aria-owns');\n                }\n            }\n        });\n        this._trackedModals.clear();\n    }\n    /** Asserts that no content is already attached to the container. */\n    _assertNotAttached() {\n        if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error('Attempting to attach snack bar content after content is already attached');\n        }\n    }\n    /**\n     * Starts a timeout to move the snack bar content to the live region so screen readers will\n     * announce it.\n     */\n    _screenReaderAnnounce() {\n        if (!this._announceTimeoutId) {\n            this._ngZone.runOutsideAngular(() => {\n                this._announceTimeoutId = setTimeout(() => {\n                    const inertElement = this._elementRef.nativeElement.querySelector('[aria-hidden]');\n                    const liveElement = this._elementRef.nativeElement.querySelector('[aria-live]');\n                    if (inertElement && liveElement) {\n                        // If an element in the snack bar content is focused before being moved\n                        // track it and restore focus after moving to the live region.\n                        let focusedElement = null;\n                        if (this._platform.isBrowser &&\n                            document.activeElement instanceof HTMLElement &&\n                            inertElement.contains(document.activeElement)) {\n                            focusedElement = document.activeElement;\n                        }\n                        inertElement.removeAttribute('aria-hidden');\n                        liveElement.appendChild(inertElement);\n                        focusedElement?.focus();\n                        this._onAnnounce.next();\n                        this._onAnnounce.complete();\n                    }\n                }, this._announceDelay);\n            });\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBarContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatSnackBarContainer, isStandalone: true, selector: \"mat-snack-bar-container\", host: { listeners: { \"@state.done\": \"onAnimationEnd($event)\" }, properties: { \"@state\": \"_animationState\" }, classAttribute: \"mdc-snackbar mat-mdc-snack-bar-container\" }, viewQueries: [{ propertyName: \"_portalOutlet\", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }, { propertyName: \"_label\", first: true, predicate: [\"label\"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"<div class=\\\"mdc-snackbar__surface mat-mdc-snackbar-surface\\\">\\n  <!--\\n    This outer label wrapper will have the class `mdc-snackbar__label` applied if\\n    the attached template/component does not contain it.\\n  -->\\n  <div class=\\\"mat-mdc-snack-bar-label\\\" #label>\\n    <!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\\n    <div aria-hidden=\\\"true\\\">\\n      <ng-template cdkPortalOutlet />\\n    </div>\\n\\n    <!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\\n    <div [attr.aria-live]=\\\"_live\\\" [attr.role]=\\\"_role\\\" [attr.id]=\\\"_liveElementId\\\"></div>\\n  </div>\\n</div>\\n\", styles: [\".mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mdc-snackbar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mdc-snackbar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mdc-snackbar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mdc-snackbar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mdc-snackbar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mdc-snackbar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mdc-snackbar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}\"], dependencies: [{ kind: \"directive\", type: CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }], animations: [matSnackBarAnimations.snackBarState], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBarContainer, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-snack-bar-container', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, animations: [matSnackBarAnimations.snackBarState], imports: [CdkPortalOutlet], host: {\n                        'class': 'mdc-snackbar mat-mdc-snack-bar-container',\n                        '[@state]': '_animationState',\n                        '(@state.done)': 'onAnimationEnd($event)',\n                    }, template: \"<div class=\\\"mdc-snackbar__surface mat-mdc-snackbar-surface\\\">\\n  <!--\\n    This outer label wrapper will have the class `mdc-snackbar__label` applied if\\n    the attached template/component does not contain it.\\n  -->\\n  <div class=\\\"mat-mdc-snack-bar-label\\\" #label>\\n    <!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\\n    <div aria-hidden=\\\"true\\\">\\n      <ng-template cdkPortalOutlet />\\n    </div>\\n\\n    <!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\\n    <div [attr.aria-live]=\\\"_live\\\" [attr.role]=\\\"_role\\\" [attr.id]=\\\"_liveElementId\\\"></div>\\n  </div>\\n</div>\\n\", styles: [\".mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mdc-snackbar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mdc-snackbar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mdc-snackbar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mdc-snackbar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mdc-snackbar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mdc-snackbar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mdc-snackbar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}\"] }]\n        }], ctorParameters: () => [], propDecorators: { _portalOutlet: [{\n                type: ViewChild,\n                args: [CdkPortalOutlet, { static: true }]\n            }], _label: [{\n                type: ViewChild,\n                args: ['label', { static: true }]\n            }] } });\n\n/** @docs-private */\nfunction MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY() {\n    return new MatSnackBarConfig();\n}\n/** Injection token that can be used to specify default snack bar. */\nconst MAT_SNACK_BAR_DEFAULT_OPTIONS = new InjectionToken('mat-snack-bar-default-options', {\n    providedIn: 'root',\n    factory: MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY,\n});\n/**\n * Service to dispatch Material Design snack bar messages.\n */\nclass MatSnackBar {\n    _overlay = inject(Overlay);\n    _live = inject(LiveAnnouncer);\n    _injector = inject(Injector);\n    _breakpointObserver = inject(BreakpointObserver);\n    _parentSnackBar = inject(MatSnackBar, { optional: true, skipSelf: true });\n    _defaultConfig = inject(MAT_SNACK_BAR_DEFAULT_OPTIONS);\n    /**\n     * Reference to the current snack bar in the view *at this level* (in the Angular injector tree).\n     * If there is a parent snack-bar service, all operations should delegate to that parent\n     * via `_openedSnackBarRef`.\n     */\n    _snackBarRefAtThisLevel = null;\n    /** The component that should be rendered as the snack bar's simple component. */\n    simpleSnackBarComponent = SimpleSnackBar;\n    /** The container component that attaches the provided template or component. */\n    snackBarContainerComponent = MatSnackBarContainer;\n    /** The CSS class to apply for handset mode. */\n    handsetCssClass = 'mat-mdc-snack-bar-handset';\n    /** Reference to the currently opened snackbar at *any* level. */\n    get _openedSnackBarRef() {\n        const parent = this._parentSnackBar;\n        return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;\n    }\n    set _openedSnackBarRef(value) {\n        if (this._parentSnackBar) {\n            this._parentSnackBar._openedSnackBarRef = value;\n        }\n        else {\n            this._snackBarRefAtThisLevel = value;\n        }\n    }\n    constructor() { }\n    /**\n     * Creates and dispatches a snack bar with a custom component for the content, removing any\n     * currently opened snack bars.\n     *\n     * @param component Component to be instantiated.\n     * @param config Extra configuration for the snack bar.\n     */\n    openFromComponent(component, config) {\n        return this._attach(component, config);\n    }\n    /**\n     * Creates and dispatches a snack bar with a custom template for the content, removing any\n     * currently opened snack bars.\n     *\n     * @param template Template to be instantiated.\n     * @param config Extra configuration for the snack bar.\n     */\n    openFromTemplate(template, config) {\n        return this._attach(template, config);\n    }\n    /**\n     * Opens a snackbar with a message and an optional action.\n     * @param message The message to show in the snackbar.\n     * @param action The label for the snackbar action.\n     * @param config Additional configuration options for the snackbar.\n     */\n    open(message, action = '', config) {\n        const _config = { ...this._defaultConfig, ...config };\n        // Since the user doesn't have access to the component, we can\n        // override the data to pass in our own message and action.\n        _config.data = { message, action };\n        // Since the snack bar has `role=\"alert\"`, we don't\n        // want to announce the same message twice.\n        if (_config.announcementMessage === message) {\n            _config.announcementMessage = undefined;\n        }\n        return this.openFromComponent(this.simpleSnackBarComponent, _config);\n    }\n    /**\n     * Dismisses the currently-visible snack bar.\n     */\n    dismiss() {\n        if (this._openedSnackBarRef) {\n            this._openedSnackBarRef.dismiss();\n        }\n    }\n    ngOnDestroy() {\n        // Only dismiss the snack bar at the current level on destroy.\n        if (this._snackBarRefAtThisLevel) {\n            this._snackBarRefAtThisLevel.dismiss();\n        }\n    }\n    /**\n     * Attaches the snack bar container component to the overlay.\n     */\n    _attachSnackBarContainer(overlayRef, config) {\n        const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n        const injector = Injector.create({\n            parent: userInjector || this._injector,\n            providers: [{ provide: MatSnackBarConfig, useValue: config }],\n        });\n        const containerPortal = new ComponentPortal(this.snackBarContainerComponent, config.viewContainerRef, injector);\n        const containerRef = overlayRef.attach(containerPortal);\n        containerRef.instance.snackBarConfig = config;\n        return containerRef.instance;\n    }\n    /**\n     * Places a new component or a template as the content of the snack bar container.\n     */\n    _attach(content, userConfig) {\n        const config = { ...new MatSnackBarConfig(), ...this._defaultConfig, ...userConfig };\n        const overlayRef = this._createOverlay(config);\n        const container = this._attachSnackBarContainer(overlayRef, config);\n        const snackBarRef = new MatSnackBarRef(container, overlayRef);\n        if (content instanceof TemplateRef) {\n            const portal = new TemplatePortal(content, null, {\n                $implicit: config.data,\n                snackBarRef,\n            });\n            snackBarRef.instance = container.attachTemplatePortal(portal);\n        }\n        else {\n            const injector = this._createInjector(config, snackBarRef);\n            const portal = new ComponentPortal(content, undefined, injector);\n            const contentRef = container.attachComponentPortal(portal);\n            // We can't pass this via the injector, because the injector is created earlier.\n            snackBarRef.instance = contentRef.instance;\n        }\n        // Subscribe to the breakpoint observer and attach the mat-snack-bar-handset class as\n        // appropriate. This class is applied to the overlay element because the overlay must expand to\n        // fill the width of the screen for full width snackbars.\n        this._breakpointObserver\n            .observe(Breakpoints.HandsetPortrait)\n            .pipe(takeUntil(overlayRef.detachments()))\n            .subscribe(state => {\n            overlayRef.overlayElement.classList.toggle(this.handsetCssClass, state.matches);\n        });\n        if (config.announcementMessage) {\n            // Wait until the snack bar contents have been announced then deliver this message.\n            container._onAnnounce.subscribe(() => {\n                this._live.announce(config.announcementMessage, config.politeness);\n            });\n        }\n        this._animateSnackBar(snackBarRef, config);\n        this._openedSnackBarRef = snackBarRef;\n        return this._openedSnackBarRef;\n    }\n    /** Animates the old snack bar out and the new one in. */\n    _animateSnackBar(snackBarRef, config) {\n        // When the snackbar is dismissed, clear the reference to it.\n        snackBarRef.afterDismissed().subscribe(() => {\n            // Clear the snackbar ref if it hasn't already been replaced by a newer snackbar.\n            if (this._openedSnackBarRef == snackBarRef) {\n                this._openedSnackBarRef = null;\n            }\n            if (config.announcementMessage) {\n                this._live.clear();\n            }\n        });\n        if (this._openedSnackBarRef) {\n            // If a snack bar is already in view, dismiss it and enter the\n            // new snack bar after exit animation is complete.\n            this._openedSnackBarRef.afterDismissed().subscribe(() => {\n                snackBarRef.containerInstance.enter();\n            });\n            this._openedSnackBarRef.dismiss();\n        }\n        else {\n            // If no snack bar is in view, enter the new snack bar.\n            snackBarRef.containerInstance.enter();\n        }\n        // If a dismiss timeout is provided, set up dismiss based on after the snackbar is opened.\n        if (config.duration && config.duration > 0) {\n            snackBarRef.afterOpened().subscribe(() => snackBarRef._dismissAfter(config.duration));\n        }\n    }\n    /**\n     * Creates a new overlay and places it in the correct location.\n     * @param config The user-specified snack bar config.\n     */\n    _createOverlay(config) {\n        const overlayConfig = new OverlayConfig();\n        overlayConfig.direction = config.direction;\n        let positionStrategy = this._overlay.position().global();\n        // Set horizontal position.\n        const isRtl = config.direction === 'rtl';\n        const isLeft = config.horizontalPosition === 'left' ||\n            (config.horizontalPosition === 'start' && !isRtl) ||\n            (config.horizontalPosition === 'end' && isRtl);\n        const isRight = !isLeft && config.horizontalPosition !== 'center';\n        if (isLeft) {\n            positionStrategy.left('0');\n        }\n        else if (isRight) {\n            positionStrategy.right('0');\n        }\n        else {\n            positionStrategy.centerHorizontally();\n        }\n        // Set horizontal position.\n        if (config.verticalPosition === 'top') {\n            positionStrategy.top('0');\n        }\n        else {\n            positionStrategy.bottom('0');\n        }\n        overlayConfig.positionStrategy = positionStrategy;\n        return this._overlay.create(overlayConfig);\n    }\n    /**\n     * Creates an injector to be used inside of a snack bar component.\n     * @param config Config that was used to create the snack bar.\n     * @param snackBarRef Reference to the snack bar.\n     */\n    _createInjector(config, snackBarRef) {\n        const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n        return Injector.create({\n            parent: userInjector || this._injector,\n            providers: [\n                { provide: MatSnackBarRef, useValue: snackBarRef },\n                { provide: MAT_SNACK_BAR_DATA, useValue: config.data },\n            ],\n        });\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBar, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBar, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBar, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\nconst DIRECTIVES = [MatSnackBarContainer, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction];\nclass MatSnackBarModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBarModule, imports: [OverlayModule,\n            PortalModule,\n            MatButtonModule,\n            MatCommonModule,\n            SimpleSnackBar, MatSnackBarContainer, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction], exports: [MatCommonModule, MatSnackBarContainer, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBarModule, providers: [MatSnackBar], imports: [OverlayModule,\n            PortalModule,\n            MatButtonModule,\n            MatCommonModule,\n            SimpleSnackBar, MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSnackBarModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [\n                        OverlayModule,\n                        PortalModule,\n                        MatButtonModule,\n                        MatCommonModule,\n                        SimpleSnackBar,\n                        ...DIRECTIVES,\n                    ],\n                    exports: [MatCommonModule, ...DIRECTIVES],\n                    providers: [MatSnackBar],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_SNACK_BAR_DATA, MAT_SNACK_BAR_DEFAULT_OPTIONS, MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY, MatSnackBar, MatSnackBarAction, MatSnackBarActions, MatSnackBarConfig, MatSnackBarContainer, MatSnackBarLabel, MatSnackBarModule, MatSnackBarRef, SimpleSnackBar, matSnackBarAnimations };\n","import { createErrorClass } from './createErrorClass';\nexport const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() {\n    _super(this);\n    this.name = 'EmptyError';\n    this.message = 'no elements in sequence';\n});\n","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nexport function defer(observableFactory) {\n    return new Observable((subscriber) => {\n        innerFrom(observableFactory()).subscribe(subscriber);\n    });\n}\n","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nexport function throwError(errorOrErrorFactory, scheduler) {\n    const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory;\n    const init = (subscriber) => subscriber.error(errorFactory());\n    return new Observable(scheduler ? (subscriber) => scheduler.schedule(init, 0, subscriber) : init);\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function refCount() {\n    return operate((source, subscriber) => {\n        let connection = null;\n        source._refCount++;\n        const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => {\n            if (!source || source._refCount <= 0 || 0 < --source._refCount) {\n                connection = null;\n                return;\n            }\n            const sharedConnection = source._connection;\n            const conn = connection;\n            connection = null;\n            if (sharedConnection && (!conn || sharedConnection === conn)) {\n                sharedConnection.unsubscribe();\n            }\n            subscriber.unsubscribe();\n        });\n        source.subscribe(refCounter);\n        if (!refCounter.closed) {\n            connection = source.connect();\n        }\n    });\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\nexport class ConnectableObservable extends Observable {\n    constructor(source, subjectFactory) {\n        super();\n        this.source = source;\n        this.subjectFactory = subjectFactory;\n        this._subject = null;\n        this._refCount = 0;\n        this._connection = null;\n        if (hasLift(source)) {\n            this.lift = source.lift;\n        }\n    }\n    _subscribe(subscriber) {\n        return this.getSubject().subscribe(subscriber);\n    }\n    getSubject() {\n        const subject = this._subject;\n        if (!subject || subject.isStopped) {\n            this._subject = this.subjectFactory();\n        }\n        return this._subject;\n    }\n    _teardown() {\n        this._refCount = 0;\n        const { _connection } = this;\n        this._subject = this._connection = null;\n        _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();\n    }\n    connect() {\n        let connection = this._connection;\n        if (!connection) {\n            connection = this._connection = new Subscription();\n            const subject = this.getSubject();\n            connection.add(this.source.subscribe(createOperatorSubscriber(subject, undefined, () => {\n                this._teardown();\n                subject.complete();\n            }, (err) => {\n                this._teardown();\n                subject.error(err);\n            }, () => this._teardown())));\n            if (connection.closed) {\n                this._connection = null;\n                connection = Subscription.EMPTY;\n            }\n        }\n        return connection;\n    }\n    refCount() {\n        return higherOrderRefCount()(this);\n    }\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n    return operate((source, subscriber) => {\n        let innerSubscriber = null;\n        let index = 0;\n        let isComplete = false;\n        const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n        source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n            innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n            let innerIndex = 0;\n            const outerIndex = index++;\n            innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {\n                innerSubscriber = null;\n                checkComplete();\n            })));\n        }, () => {\n            isComplete = true;\n            checkComplete();\n        }));\n    });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n    return operate((source, subscriber) => {\n        let hasValue = false;\n        source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n            hasValue = true;\n            subscriber.next(value);\n        }, () => {\n            if (!hasValue) {\n                subscriber.next(defaultValue);\n            }\n            subscriber.complete();\n        }));\n    });\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n    return operate((source, subscriber) => {\n        let hasValue = false;\n        source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n            hasValue = true;\n            subscriber.next(value);\n        }, () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory()))));\n    });\n}\nfunction defaultErrorFactory() {\n    return new EmptyError();\n}\n","import { 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    const hasDefaultValue = arguments.length >= 2;\n    return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n    return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n    return operate((source, subscriber) => {\n        let innerSub = null;\n        let syncUnsub = false;\n        let handledResult;\n        innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => {\n            handledResult = innerFrom(selector(err, catchError(selector)(source)));\n            if (innerSub) {\n                innerSub.unsubscribe();\n                innerSub = null;\n                handledResult.subscribe(subscriber);\n            }\n            else {\n                syncUnsub = true;\n            }\n        }));\n        if (syncUnsub) {\n            innerSub.unsubscribe();\n            innerSub = null;\n            handledResult.subscribe(subscriber);\n        }\n    });\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeLast(count) {\n    return count <= 0\n        ? () => EMPTY\n        : operate((source, subscriber) => {\n            let buffer = [];\n            source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n                buffer.push(value);\n                count < buffer.length && buffer.shift();\n            }, () => {\n                for (const value of buffer) {\n                    subscriber.next(value);\n                }\n                subscriber.complete();\n            }, undefined, () => {\n                buffer = null;\n            }));\n        });\n}\n","import { map } from './map';\nexport function mapTo(value) {\n    return map(() => value);\n}\n","import { operate } from '../util/lift';\nexport function finalize(callback) {\n    return operate((source, subscriber) => {\n        try {\n            source.subscribe(subscriber);\n        }\n        finally {\n            subscriber.add(callback);\n        }\n    });\n}\n","/**\n * @license Angular v19.0.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { ɵisPromise, ɵRuntimeError, Injectable, createEnvironmentInjector, ɵisNgModule, isStandalone, InjectionToken, EventEmitter, input, inject, ViewContainerRef, ChangeDetectorRef, Directive, Input, Output, reflectComponentType, ɵisInjectable, runInInjectionContext, Component, Compiler, NgModuleFactory, NgZone, afterNextRender, EnvironmentInjector, ɵConsole, ɵPendingTasksInternal, ɵɵsanitizeUrlOrResourceUrl, booleanAttribute, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, InjectFlags, APP_INITIALIZER, SkipSelf, NgModule, Inject, Version, ɵpublishExternalGlobalUtil } from '@angular/core';\nimport { isObservable, from, of, BehaviorSubject, combineLatest, EmptyError, concat, defer, pipe, throwError, EMPTY, ConnectableObservable, Subject, Subscription } from 'rxjs';\nimport * as i3 from '@angular/common';\nimport { DOCUMENT, Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';\nimport { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, defaultIfEmpty, last as last$1, takeLast, mapTo, finalize, refCount, takeUntil, mergeAll } from 'rxjs/operators';\nimport * as i1 from '@angular/platform-browser';\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nconst PRIMARY_OUTLET = 'primary';\n/**\n * A private symbol used to store the value of `Route.title` inside the `Route.data` if it is a\n * static string or `Route.resolve` if anything else. This allows us to reuse the existing route\n * data/resolvers to support the title feature without new instrumentation in the `Router` pipeline.\n */\nconst RouteTitleKey = /* @__PURE__ */ Symbol('RouteTitle');\nclass ParamsAsMap {\n    params;\n    constructor(params) {\n        this.params = params || {};\n    }\n    has(name) {\n        return Object.prototype.hasOwnProperty.call(this.params, name);\n    }\n    get(name) {\n        if (this.has(name)) {\n            const v = this.params[name];\n            return Array.isArray(v) ? v[0] : v;\n        }\n        return null;\n    }\n    getAll(name) {\n        if (this.has(name)) {\n            const v = this.params[name];\n            return Array.isArray(v) ? v : [v];\n        }\n        return [];\n    }\n    get keys() {\n        return Object.keys(this.params);\n    }\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}\n/**\n * Matches the route configuration (`route`) against the actual URL (`segments`).\n *\n * When no matcher is defined on a `Route`, this is the matcher used by the Router by default.\n *\n * @param segments The remaining unmatched segments in the current navigation\n * @param segmentGroup The current segment group being matched\n * @param route The `Route` to match against.\n *\n * @see {@link UrlMatchResult}\n * @see {@link Route}\n *\n * @returns The resulting match information or `null` if the `route` should not match.\n * @publicApi\n */\nfunction defaultUrlMatcher(segments, segmentGroup, route) {\n    const 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    const posParams = {};\n    // Check each config part against the actual URL\n    for (let index = 0; index < parts.length; index++) {\n        const part = parts[index];\n        const segment = segments[index];\n        const isParameter = part[0] === ':';\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 };\n}\n\nfunction shallowEqualArrays(a, b) {\n    if (a.length !== b.length)\n        return false;\n    for (let 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    // While `undefined` should never be possible, it would sometimes be the case in IE 11\n    // and pre-chromium Edge. The check below accounts for this edge case.\n    const k1 = a ? getDataKeys(a) : undefined;\n    const k2 = b ? getDataKeys(b) : undefined;\n    if (!k1 || !k2 || k1.length != k2.length) {\n        return false;\n    }\n    let key;\n    for (let 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 * Gets the keys of an object, including `symbol` keys.\n */\nfunction getDataKeys(obj) {\n    return [...Object.keys(obj), ...Object.getOwnPropertySymbols(obj)];\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        const aSorted = [...a].sort();\n        const bSorted = [...b].sort();\n        return aSorted.every((val, index) => bSorted[index] === val);\n    }\n    else {\n        return a === b;\n    }\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}\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\nconst pathCompareMap = {\n    'exact': equalSegmentGroups,\n    'subset': containsSegmentGroup,\n};\nconst paramCompareMap = {\n    'exact': equalParams,\n    'subset': containsParams,\n    'ignored': () => true,\n};\nfunction containsTree(container, containee, options) {\n    return (pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) &&\n        paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) &&\n        !(options.fragment === 'exact' && container.fragment !== containee.fragment));\n}\nfunction equalParams(container, containee) {\n    // TODO: This does not handle array params correctly.\n    return shallowEqual(container, containee);\n}\nfunction equalSegmentGroups(container, containee, matrixParams) {\n    if (!equalPath(container.segments, containee.segments))\n        return false;\n    if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n        return false;\n    }\n    if (container.numberOfChildren !== containee.numberOfChildren)\n        return false;\n    for (const c in containee.children) {\n        if (!container.children[c])\n            return false;\n        if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))\n            return false;\n    }\n    return true;\n}\nfunction containsParams(container, containee) {\n    return (Object.keys(containee).length <= Object.keys(container).length &&\n        Object.keys(containee).every((key) => equalArraysOrString(container[key], containee[key])));\n}\nfunction containsSegmentGroup(container, containee, matrixParams) {\n    return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\nfunction containsSegmentGroupHelper(container, containee, containeePaths, matrixParams) {\n    if (container.segments.length > containeePaths.length) {\n        const current = container.segments.slice(0, containeePaths.length);\n        if (!equalPath(current, containeePaths))\n            return false;\n        if (containee.hasChildren())\n            return false;\n        if (!matrixParamsMatch(current, containeePaths, matrixParams))\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        if (!matrixParamsMatch(container.segments, containeePaths, matrixParams))\n            return false;\n        for (const c in containee.children) {\n            if (!container.children[c])\n                return false;\n            if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n                return false;\n            }\n        }\n        return true;\n    }\n    else {\n        const current = containeePaths.slice(0, container.segments.length);\n        const next = containeePaths.slice(container.segments.length);\n        if (!equalPath(container.segments, current))\n            return false;\n        if (!matrixParamsMatch(container.segments, current, matrixParams))\n            return false;\n        if (!container.children[PRIMARY_OUTLET])\n            return false;\n        return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n    }\n}\nfunction matrixParamsMatch(containerPaths, containeePaths, options) {\n    return containeePaths.every((containeeSegment, i) => {\n        return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\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 * ```ts\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 */\nclass UrlTree {\n    root;\n    queryParams;\n    fragment;\n    /** @internal */\n    _queryParamMap;\n    constructor(\n    /** The root segment group of the URL tree */\n    root = new UrlSegmentGroup([], {}), \n    /** The query params of the URL */\n    queryParams = {}, \n    /** The fragment of the URL */\n    fragment = null) {\n        this.root = root;\n        this.queryParams = queryParams;\n        this.fragment = fragment;\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (root.segments.length > 0) {\n                throw new ɵRuntimeError(4015 /* RuntimeErrorCode.INVALID_ROOT_URL_SEGMENT */, 'The root `UrlSegmentGroup` should not contain `segments`. ' +\n                    'Instead, these segments belong in the `children` so they can be associated with a named outlet.');\n            }\n        }\n    }\n    get queryParamMap() {\n        this._queryParamMap ??= convertToParamMap(this.queryParams);\n        return this._queryParamMap;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return DEFAULT_SERIALIZER.serialize(this);\n    }\n}\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nclass UrlSegmentGroup {\n    segments;\n    children;\n    /** The parent node in the url tree */\n    parent = null;\n    constructor(\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        this.segments = segments;\n        this.children = children;\n        Object.values(children).forEach((v) => (v.parent = this));\n    }\n    /** Whether the segment has child segments */\n    hasChildren() {\n        return this.numberOfChildren > 0;\n    }\n    /** Number of child segments */\n    get numberOfChildren() {\n        return Object.keys(this.children).length;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return serializePaths(this);\n    }\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 * ```ts\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 */\nclass UrlSegment {\n    path;\n    parameters;\n    /** @internal */\n    _parameterMap;\n    constructor(\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    get parameterMap() {\n        this._parameterMap ??= convertToParamMap(this.parameters);\n        return this._parameterMap;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return serializePath(this);\n    }\n}\nfunction equalSegments(as, bs) {\n    return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\nfunction equalPath(as, bs) {\n    if (as.length !== bs.length)\n        return false;\n    return as.every((a, i) => a.path === bs[i].path);\n}\nfunction mapChildrenIntoArray(segment, fn) {\n    let res = [];\n    Object.entries(segment.children).forEach(([childOutlet, child]) => {\n        if (childOutlet === PRIMARY_OUTLET) {\n            res = res.concat(fn(child, childOutlet));\n        }\n    });\n    Object.entries(segment.children).forEach(([childOutlet, child]) => {\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 */\nclass UrlSerializer {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: UrlSerializer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: UrlSerializer, providedIn: 'root', useFactory: () => new DefaultUrlSerializer() });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: UrlSerializer, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root', useFactory: () => new DefaultUrlSerializer() }]\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 */\nclass DefaultUrlSerializer {\n    /** Parses a url into a `UrlTree` */\n    parse(url) {\n        const p = new UrlParser(url);\n        return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n    }\n    /** Converts a `UrlTree` into a url */\n    serialize(tree) {\n        const segment = `/${serializeSegment(tree.root, true)}`;\n        const query = serializeQueryParams(tree.queryParams);\n        const fragment = typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n        return `${segment}${query}${fragment}`;\n    }\n}\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\nfunction serializePaths(segment) {\n    return segment.segments.map((p) => serializePath(p)).join('/');\n}\nfunction serializeSegment(segment, root) {\n    if (!segment.hasChildren()) {\n        return serializePaths(segment);\n    }\n    if (root) {\n        const primary = segment.children[PRIMARY_OUTLET]\n            ? serializeSegment(segment.children[PRIMARY_OUTLET], false)\n            : '';\n        const children = [];\n        Object.entries(segment.children).forEach(([k, v]) => {\n            if (k !== PRIMARY_OUTLET) {\n                children.push(`${k}:${serializeSegment(v, false)}`);\n            }\n        });\n        return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n    }\n    else {\n        const children = mapChildrenIntoArray(segment, (v, k) => {\n            if (k === PRIMARY_OUTLET) {\n                return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n            }\n            return [`${k}:${serializeSegment(v, false)}`];\n        });\n        // use no parenthesis if the only child is a primary outlet route\n        if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n            return `${serializePaths(segment)}/${children[0]}`;\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.entries(params)\n        .map(([key, value]) => `;${encodeUriSegment(key)}=${encodeUriSegment(value)}`)\n        .join('');\n}\nfunction serializeQueryParams(params) {\n    const strParams = Object.entries(params)\n        .map(([name, value]) => {\n        return Array.isArray(value)\n            ? value.map((v) => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&')\n            : `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n    })\n        .filter((s) => s);\n    return strParams.length ? `?${strParams.join('&')}` : '';\n}\nconst SEGMENT_RE = /^[^\\/()?;#]+/;\nfunction matchSegments(str) {\n    const match = str.match(SEGMENT_RE);\n    return match ? match[0] : '';\n}\nconst MATRIX_PARAM_SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchMatrixKeySegments(str) {\n    const match = str.match(MATRIX_PARAM_SEGMENT_RE);\n    return match ? match[0] : '';\n}\nconst 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    const match = str.match(QUERY_PARAM_RE);\n    return match ? match[0] : '';\n}\nconst 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    const match = str.match(QUERY_PARAM_VALUE_RE);\n    return match ? match[0] : '';\n}\nclass UrlParser {\n    url;\n    remaining;\n    constructor(url) {\n        this.url = url;\n        this.remaining = url;\n    }\n    parseRootSegment() {\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    parseQueryParams() {\n        const params = {};\n        if (this.consumeOptional('?')) {\n            do {\n                this.parseQueryParam(params);\n            } while (this.consumeOptional('&'));\n        }\n        return params;\n    }\n    parseFragment() {\n        return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n    }\n    parseChildren() {\n        if (this.remaining === '') {\n            return {};\n        }\n        this.consumeOptional('/');\n        const 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        let children = {};\n        if (this.peekStartsWith('/(')) {\n            this.capture('/');\n            children = this.parseParens(true);\n        }\n        let 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    parseSegment() {\n        const path = matchSegments(this.remaining);\n        if (path === '' && this.peekStartsWith(';')) {\n            throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                `Empty path url segment cannot have parameters: '${this.remaining}'.`);\n        }\n        this.capture(path);\n        return new UrlSegment(decode(path), this.parseMatrixParams());\n    }\n    parseMatrixParams() {\n        const params = {};\n        while (this.consumeOptional(';')) {\n            this.parseParam(params);\n        }\n        return params;\n    }\n    parseParam(params) {\n        const key = matchMatrixKeySegments(this.remaining);\n        if (!key) {\n            return;\n        }\n        this.capture(key);\n        let value = '';\n        if (this.consumeOptional('=')) {\n            const 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    parseQueryParam(params) {\n        const key = matchQueryParams(this.remaining);\n        if (!key) {\n            return;\n        }\n        this.capture(key);\n        let value = '';\n        if (this.consumeOptional('=')) {\n            const valueMatch = matchUrlQueryParamValue(this.remaining);\n            if (valueMatch) {\n                value = valueMatch;\n                this.capture(value);\n            }\n        }\n        const decodedKey = decodeQuery(key);\n        const decodedVal = decodeQuery(value);\n        if (params.hasOwnProperty(decodedKey)) {\n            // Append to existing values\n            let 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    parseParens(allowPrimary) {\n        const segments = {};\n        this.capture('(');\n        while (!this.consumeOptional(')') && this.remaining.length > 0) {\n            const path = matchSegments(this.remaining);\n            const 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 ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot parse url '${this.url}'`);\n            }\n            let outletName = undefined;\n            if (path.indexOf(':') > -1) {\n                outletName = path.slice(0, path.indexOf(':'));\n                this.capture(outletName);\n                this.capture(':');\n            }\n            else if (allowPrimary) {\n                outletName = PRIMARY_OUTLET;\n            }\n            const children = this.parseChildren();\n            segments[outletName] =\n                Object.keys(children).length === 1\n                    ? children[PRIMARY_OUTLET]\n                    : new UrlSegmentGroup([], children);\n            this.consumeOptional('//');\n        }\n        return segments;\n    }\n    peekStartsWith(str) {\n        return this.remaining.startsWith(str);\n    }\n    // Consumes the prefix when it is present and returns whether it has been consumed\n    consumeOptional(str) {\n        if (this.peekStartsWith(str)) {\n            this.remaining = this.remaining.substring(str.length);\n            return true;\n        }\n        return false;\n    }\n    capture(str) {\n        if (!this.consumeOptional(str)) {\n            throw new ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Expected \"${str}\".`);\n        }\n    }\n}\nfunction createRoot(rootCandidate) {\n    return rootCandidate.segments.length > 0\n        ? new UrlSegmentGroup([], { [PRIMARY_OUTLET]: rootCandidate })\n        : rootCandidate;\n}\n/**\n * Recursively\n * - merges primary segment children into their parents\n * - drops empty children (those which have no segments and no children themselves). This latter\n * prevents serializing a group into something like `/a(aux:)`, where `aux` is an empty child\n * segment.\n * - merges named outlets without a primary segment sibling into the children. This prevents\n * serializing a URL like `//(a:a)(b:b) instead of `/(a:a//b:b)` when the aux b route lives on the\n * root but the `a` route lives under an empty path primary route.\n */\nfunction squashSegmentGroup(segmentGroup) {\n    const newChildren = {};\n    for (const [childOutlet, child] of Object.entries(segmentGroup.children)) {\n        const childCandidate = squashSegmentGroup(child);\n        // moves named children in an empty path primary child into this group\n        if (childOutlet === PRIMARY_OUTLET &&\n            childCandidate.segments.length === 0 &&\n            childCandidate.hasChildren()) {\n            for (const [grandChildOutlet, grandChild] of Object.entries(childCandidate.children)) {\n                newChildren[grandChildOutlet] = grandChild;\n            }\n        } // don't add empty children\n        else if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n            newChildren[childOutlet] = childCandidate;\n        }\n    }\n    const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n    return mergeTrivialChildren(s);\n}\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s) {\n    if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n        const c = s.children[PRIMARY_OUTLET];\n        return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n    }\n    return s;\n}\nfunction isUrlTree(v) {\n    return v instanceof UrlTree;\n}\n\n/**\n * Creates a `UrlTree` relative to an `ActivatedRouteSnapshot`.\n *\n * @publicApi\n *\n *\n * @param relativeTo The `ActivatedRouteSnapshot` to apply the commands to\n * @param commands An array of URL fragments with which to construct the new URL tree.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the one provided in the `relativeTo` parameter.\n * @param queryParams The query parameters for the `UrlTree`. `null` if the `UrlTree` does not have\n *     any query parameters.\n * @param fragment The fragment for the `UrlTree`. `null` if the `UrlTree` does not have a fragment.\n *\n * @usageNotes\n *\n * ```ts\n * // create /team/33/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/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 * createUrlTreeFromSnapshot(snapshot, ['/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 * createUrlTreeFromSnapshot(snapshot, [{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right:\n * 'chat'}}], null, null);\n *\n * // remove the right secondary node\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // For the examples below, assume the current URL is for the `/team/33/user/11` and the\n * `ActivatedRouteSnapshot` points to `user/11`:\n *\n * // navigate to /team/33/user/11/details\n * createUrlTreeFromSnapshot(snapshot, ['details']);\n *\n * // navigate to /team/33/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../22']);\n *\n * // navigate to /team/44/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../../team/44/user/22']);\n * ```\n */\nfunction createUrlTreeFromSnapshot(relativeTo, commands, queryParams = null, fragment = null) {\n    const relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeTo);\n    return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);\n}\nfunction createSegmentGroupFromRoute(route) {\n    let targetGroup;\n    function createSegmentGroupFromRouteRecursive(currentRoute) {\n        const childOutlets = {};\n        for (const childSnapshot of currentRoute.children) {\n            const root = createSegmentGroupFromRouteRecursive(childSnapshot);\n            childOutlets[childSnapshot.outlet] = root;\n        }\n        const segmentGroup = new UrlSegmentGroup(currentRoute.url, childOutlets);\n        if (currentRoute === route) {\n            targetGroup = segmentGroup;\n        }\n        return segmentGroup;\n    }\n    const rootCandidate = createSegmentGroupFromRouteRecursive(route.root);\n    const rootSegmentGroup = createRoot(rootCandidate);\n    return targetGroup ?? rootSegmentGroup;\n}\nfunction createUrlTreeFromSegmentGroup(relativeTo, commands, queryParams, fragment) {\n    let root = relativeTo;\n    while (root.parent) {\n        root = root.parent;\n    }\n    // There are no commands so the `UrlTree` goes to the same path as the one created from the\n    // `UrlSegmentGroup`. All we need to do is update the `queryParams` and `fragment` without\n    // applying any other logic.\n    if (commands.length === 0) {\n        return tree(root, root, root, queryParams, fragment);\n    }\n    const nav = computeNavigation(commands);\n    if (nav.toRoot()) {\n        return tree(root, root, new UrlSegmentGroup([], {}), queryParams, fragment);\n    }\n    const position = findStartingPositionForTargetGroup(nav, root, relativeTo);\n    const newSegmentGroup = position.processChildren\n        ? updateSegmentGroupChildren(position.segmentGroup, position.index, nav.commands)\n        : updateSegmentGroup(position.segmentGroup, position.index, nav.commands);\n    return tree(root, position.segmentGroup, newSegmentGroup, queryParams, fragment);\n}\nfunction isMatrixParams(command) {\n    return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command) {\n    return typeof command === 'object' && command != null && command.outlets;\n}\nfunction tree(oldRoot, oldSegmentGroup, newSegmentGroup, queryParams, fragment) {\n    let qp = {};\n    if (queryParams) {\n        Object.entries(queryParams).forEach(([name, value]) => {\n            qp[name] = Array.isArray(value) ? value.map((v) => `${v}`) : `${value}`;\n        });\n    }\n    let rootCandidate;\n    if (oldRoot === oldSegmentGroup) {\n        rootCandidate = newSegmentGroup;\n    }\n    else {\n        rootCandidate = replaceSegment(oldRoot, oldSegmentGroup, newSegmentGroup);\n    }\n    const newRoot = createRoot(squashSegmentGroup(rootCandidate));\n    return new UrlTree(newRoot, qp, fragment);\n}\n/**\n * Replaces the `oldSegment` which is located in some child of the `current` with the `newSegment`.\n * This also has the effect of creating new `UrlSegmentGroup` copies to update references. This\n * shouldn't be necessary but the fallback logic for an invalid ActivatedRoute in the creation uses\n * the Router's current url tree. If we don't create new segment groups, we end up modifying that\n * value.\n */\nfunction replaceSegment(current, oldSegment, newSegment) {\n    const children = {};\n    Object.entries(current.children).forEach(([outletName, c]) => {\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}\nclass Navigation {\n    isAbsolute;\n    numberOfDoubleDots;\n    commands;\n    constructor(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 ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                'Root segment cannot have matrix parameters');\n        }\n        const cmdWithOutlet = commands.find(isCommandWithOutlets);\n        if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n            throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                '{outlets:{}} has to be the last command');\n        }\n    }\n    toRoot() {\n        return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n    }\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    let numberOfDoubleDots = 0;\n    let isAbsolute = false;\n    const res = commands.reduce((res, cmd, cmdIdx) => {\n        if (typeof cmd === 'object' && cmd != null) {\n            if (cmd.outlets) {\n                const outlets = {};\n                Object.entries(cmd.outlets).forEach(([name, commands]) => {\n                    outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n                });\n                return [...res, { outlets }];\n            }\n            if (cmd.segmentPath) {\n                return [...res, cmd.segmentPath];\n            }\n        }\n        if (!(typeof cmd === 'string')) {\n            return [...res, cmd];\n        }\n        if (cmdIdx === 0) {\n            cmd.split('/').forEach((urlPart, partIndex) => {\n                if (partIndex == 0 && urlPart === '.') {\n                    // skip './a'\n                }\n                else if (partIndex == 0 && urlPart === '') {\n                    //  '/a'\n                    isAbsolute = true;\n                }\n                else if (urlPart === '..') {\n                    //  '../a'\n                    numberOfDoubleDots++;\n                }\n                else if (urlPart != '') {\n                    res.push(urlPart);\n                }\n            });\n            return res;\n        }\n        return [...res, cmd];\n    }, []);\n    return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\nclass Position {\n    segmentGroup;\n    processChildren;\n    index;\n    constructor(segmentGroup, processChildren, index) {\n        this.segmentGroup = segmentGroup;\n        this.processChildren = processChildren;\n        this.index = index;\n    }\n}\nfunction findStartingPositionForTargetGroup(nav, root, target) {\n    if (nav.isAbsolute) {\n        return new Position(root, true, 0);\n    }\n    if (!target) {\n        // `NaN` is used only to maintain backwards compatibility with incorrectly mocked\n        // `ActivatedRouteSnapshot` in tests. In prior versions of this code, the position here was\n        // determined based on an internal property that was rarely mocked, resulting in `NaN`. In\n        // reality, this code path should _never_ be touched since `target` is not allowed to be falsey.\n        return new Position(root, false, NaN);\n    }\n    if (target.parent === null) {\n        return new Position(target, true, 0);\n    }\n    const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n    const index = target.segments.length - 1 + modifier;\n    return createPositionApplyingDoubleDots(target, index, nav.numberOfDoubleDots);\n}\nfunction createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {\n    let g = group;\n    let ci = index;\n    let dd = numberOfDoubleDots;\n    while (dd > ci) {\n        dd -= ci;\n        g = g.parent;\n        if (!g) {\n            throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, (typeof ngDevMode === 'undefined' || ngDevMode) && \"Invalid number of '../'\");\n        }\n        ci = g.segments.length;\n    }\n    return new Position(g, false, ci - dd);\n}\nfunction getOutlets(commands) {\n    if (isCommandWithOutlets(commands[0])) {\n        return commands[0].outlets;\n    }\n    return { [PRIMARY_OUTLET]: commands };\n}\nfunction updateSegmentGroup(segmentGroup, startIndex, commands) {\n    segmentGroup ??= new UrlSegmentGroup([], {});\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n        return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n    }\n    const m = prefixedWith(segmentGroup, startIndex, commands);\n    const slicedCommands = commands.slice(m.commandIndex);\n    if (m.match && m.pathIndex < segmentGroup.segments.length) {\n        const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n        g.children[PRIMARY_OUTLET] = 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        const outlets = getOutlets(commands);\n        const children = {};\n        // If the set of commands applies to anything other than the primary outlet and the child\n        // segment is an empty path primary segment on its own, we want to apply the commands to the\n        // empty child path rather than here. The outcome is that the empty primary child is effectively\n        // removed from the final output UrlTree. Imagine the following config:\n        //\n        // {path: '', children: [{path: '**', outlet: 'popup'}]}.\n        //\n        // Navigation to /(popup:a) will activate the child outlet correctly Given a follow-up\n        // navigation with commands\n        // ['/', {outlets: {'popup': 'b'}}], we _would not_ want to apply the outlet commands to the\n        // root segment because that would result in\n        // //(popup:a)(popup:b) since the outlet command got applied one level above where it appears in\n        // the `ActivatedRoute` rather than updating the existing one.\n        //\n        // Because empty paths do not appear in the URL segments and the fact that the segments used in\n        // the output `UrlTree` are squashed to eliminate these empty paths where possible\n        // https://github.com/angular/angular/blob/13f10de40e25c6900ca55bd83b36bd533dacfa9e/packages/router/src/url_tree.ts#L755\n        // it can be hard to determine what is the right thing to do when applying commands to a\n        // `UrlSegmentGroup` that is created from an \"unsquashed\"/expanded `ActivatedRoute` tree.\n        // This code effectively \"squashes\" empty path primary routes when they have no siblings on\n        // the same level of the tree.\n        if (Object.keys(outlets).some((o) => o !== PRIMARY_OUTLET) &&\n            segmentGroup.children[PRIMARY_OUTLET] &&\n            segmentGroup.numberOfChildren === 1 &&\n            segmentGroup.children[PRIMARY_OUTLET].segments.length === 0) {\n            const childrenOfEmptyChild = updateSegmentGroupChildren(segmentGroup.children[PRIMARY_OUTLET], startIndex, commands);\n            return new UrlSegmentGroup(segmentGroup.segments, childrenOfEmptyChild.children);\n        }\n        Object.entries(outlets).forEach(([outlet, commands]) => {\n            if (typeof commands === 'string') {\n                commands = [commands];\n            }\n            if (commands !== null) {\n                children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n            }\n        });\n        Object.entries(segmentGroup.children).forEach(([childOutlet, child]) => {\n            if (outlets[childOutlet] === undefined) {\n                children[childOutlet] = child;\n            }\n        });\n        return new UrlSegmentGroup(segmentGroup.segments, children);\n    }\n}\nfunction prefixedWith(segmentGroup, startIndex, commands) {\n    let currentCommandIndex = 0;\n    let currentPathIndex = startIndex;\n    const noMatch = { match: false, pathIndex: 0, commandIndex: 0 };\n    while (currentPathIndex < segmentGroup.segments.length) {\n        if (currentCommandIndex >= commands.length)\n            return noMatch;\n        const path = segmentGroup.segments[currentPathIndex];\n        const command = commands[currentCommandIndex];\n        // Do not try to consume command as part of the prefixing if it has outlets because it can\n        // contain outlets other than the one being processed. Consuming the outlets command would\n        // result in other outlets being ignored.\n        if (isCommandWithOutlets(command)) {\n            break;\n        }\n        const curr = `${command}`;\n        const 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    const paths = segmentGroup.segments.slice(0, startIndex);\n    let i = 0;\n    while (i < commands.length) {\n        const command = commands[i];\n        if (isCommandWithOutlets(command)) {\n            const children = createNewSegmentChildren(command.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            const p = segmentGroup.segments[startIndex];\n            paths.push(new UrlSegment(p.path, stringify(commands[0])));\n            i++;\n            continue;\n        }\n        const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n        const 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    const children = {};\n    Object.entries(outlets).forEach(([outlet, commands]) => {\n        if (typeof commands === 'string') {\n            commands = [commands];\n        }\n        if (commands !== null) {\n            children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n        }\n    });\n    return children;\n}\nfunction stringify(params) {\n    const res = {};\n    Object.entries(params).forEach(([k, v]) => (res[k] = `${v}`));\n    return res;\n}\nfunction compare(path, params, segment) {\n    return path == segment.path && shallowEqual(params, segment.parameters);\n}\n\nconst IMPERATIVE_NAVIGATION = 'imperative';\n/**\n * Identifies the type of a router event.\n *\n * @publicApi\n */\nvar EventType;\n(function (EventType) {\n    EventType[EventType[\"NavigationStart\"] = 0] = \"NavigationStart\";\n    EventType[EventType[\"NavigationEnd\"] = 1] = \"NavigationEnd\";\n    EventType[EventType[\"NavigationCancel\"] = 2] = \"NavigationCancel\";\n    EventType[EventType[\"NavigationError\"] = 3] = \"NavigationError\";\n    EventType[EventType[\"RoutesRecognized\"] = 4] = \"RoutesRecognized\";\n    EventType[EventType[\"ResolveStart\"] = 5] = \"ResolveStart\";\n    EventType[EventType[\"ResolveEnd\"] = 6] = \"ResolveEnd\";\n    EventType[EventType[\"GuardsCheckStart\"] = 7] = \"GuardsCheckStart\";\n    EventType[EventType[\"GuardsCheckEnd\"] = 8] = \"GuardsCheckEnd\";\n    EventType[EventType[\"RouteConfigLoadStart\"] = 9] = \"RouteConfigLoadStart\";\n    EventType[EventType[\"RouteConfigLoadEnd\"] = 10] = \"RouteConfigLoadEnd\";\n    EventType[EventType[\"ChildActivationStart\"] = 11] = \"ChildActivationStart\";\n    EventType[EventType[\"ChildActivationEnd\"] = 12] = \"ChildActivationEnd\";\n    EventType[EventType[\"ActivationStart\"] = 13] = \"ActivationStart\";\n    EventType[EventType[\"ActivationEnd\"] = 14] = \"ActivationEnd\";\n    EventType[EventType[\"Scroll\"] = 15] = \"Scroll\";\n    EventType[EventType[\"NavigationSkipped\"] = 16] = \"NavigationSkipped\";\n})(EventType || (EventType = {}));\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 * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n *   constructor(public router: Router) {\n *     router.events.pipe(\n *        filter((e: Event | RouterEvent): e is RouterEvent => e instanceof RouterEvent)\n *     ).subscribe((e: RouterEvent) => {\n *       // Do something\n *     });\n *   }\n * }\n * ```\n *\n * @see {@link Event}\n * @see [Router events summary](guide/routing/router-reference#router-events)\n * @publicApi\n */\nclass RouterEvent {\n    id;\n    url;\n    constructor(\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}\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nclass NavigationStart extends RouterEvent {\n    type = EventType.NavigationStart;\n    /**\n     * Identifies the call or event that triggered the navigation.\n     * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\n     *\n     * @see {@link NavigationEnd}\n     * @see {@link NavigationCancel}\n     * @see {@link NavigationError}\n     */\n    navigationTrigger;\n    /**\n     * The navigation state that was previously supplied to the `pushState` call,\n     * when the navigation is triggered by a `popstate` event. Otherwise null.\n     *\n     * The state object is defined by `NavigationExtras`, and contains any\n     * developer-defined state value, as well as a unique ID that\n     * the router assigns to every router transition/navigation.\n     *\n     * From the perspective of the router, the router never \"goes back\".\n     * When the user clicks on the back button in the browser,\n     * a new navigation ID is created.\n     *\n     * Use the ID in this previous-state object to differentiate between a newly created\n     * state and one returned to by a `popstate` event, so that you can restore some\n     * remembered state, such as scroll position.\n     *\n     */\n    restoredState;\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    navigationTrigger = 'imperative', \n    /** @docsNotRequired */\n    restoredState = null) {\n        super(id, url);\n        this.navigationTrigger = navigationTrigger;\n        this.restoredState = restoredState;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n    }\n}\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see {@link NavigationStart}\n * @see {@link NavigationCancel}\n * @see {@link NavigationError}\n *\n * @publicApi\n */\nclass NavigationEnd extends RouterEvent {\n    urlAfterRedirects;\n    type = EventType.NavigationEnd;\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    urlAfterRedirects) {\n        super(id, url);\n        this.urlAfterRedirects = urlAfterRedirects;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n    }\n}\n/**\n * A code for the `NavigationCancel` event of the `Router` to indicate the\n * reason a navigation failed.\n *\n * @publicApi\n */\nvar NavigationCancellationCode;\n(function (NavigationCancellationCode) {\n    /**\n     * A navigation failed because a guard returned a `UrlTree` to redirect.\n     */\n    NavigationCancellationCode[NavigationCancellationCode[\"Redirect\"] = 0] = \"Redirect\";\n    /**\n     * A navigation failed because a more recent navigation started.\n     */\n    NavigationCancellationCode[NavigationCancellationCode[\"SupersededByNewNavigation\"] = 1] = \"SupersededByNewNavigation\";\n    /**\n     * A navigation failed because one of the resolvers completed without emitting a value.\n     */\n    NavigationCancellationCode[NavigationCancellationCode[\"NoDataFromResolver\"] = 2] = \"NoDataFromResolver\";\n    /**\n     * A navigation failed because a guard returned `false`.\n     */\n    NavigationCancellationCode[NavigationCancellationCode[\"GuardRejected\"] = 3] = \"GuardRejected\";\n})(NavigationCancellationCode || (NavigationCancellationCode = {}));\n/**\n * A code for the `NavigationSkipped` event of the `Router` to indicate the\n * reason a navigation was skipped.\n *\n * @publicApi\n */\nvar NavigationSkippedCode;\n(function (NavigationSkippedCode) {\n    /**\n     * A navigation was skipped because the navigation URL was the same as the current Router URL.\n     */\n    NavigationSkippedCode[NavigationSkippedCode[\"IgnoredSameUrlNavigation\"] = 0] = \"IgnoredSameUrlNavigation\";\n    /**\n     * A navigation was skipped because the configured `UrlHandlingStrategy` return `false` for both\n     * the current Router URL and the target of the navigation.\n     *\n     * @see {@link UrlHandlingStrategy}\n     */\n    NavigationSkippedCode[NavigationSkippedCode[\"IgnoredByUrlHandlingStrategy\"] = 1] = \"IgnoredByUrlHandlingStrategy\";\n})(NavigationSkippedCode || (NavigationSkippedCode = {}));\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see {@link NavigationStart}\n * @see {@link NavigationEnd}\n * @see {@link NavigationError}\n *\n * @publicApi\n */\nclass NavigationCancel extends RouterEvent {\n    reason;\n    code;\n    type = EventType.NavigationCancel;\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /**\n     * A description of why the navigation was cancelled. For debug purposes only. Use `code`\n     * instead for a stable cancellation reason that can be used in production.\n     */\n    reason, \n    /**\n     * A code to indicate why the navigation was canceled. This cancellation code is stable for\n     * the reason and can be relied on whereas the `reason` string could change and should not be\n     * used in production.\n     */\n    code) {\n        super(id, url);\n        this.reason = reason;\n        this.code = code;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n    }\n}\n/**\n * An event triggered when a navigation is skipped.\n * This can happen for a couple reasons including onSameUrlHandling\n * is set to `ignore` and the navigation URL is not different than the\n * current state.\n *\n * @publicApi\n */\nclass NavigationSkipped extends RouterEvent {\n    reason;\n    code;\n    type = EventType.NavigationSkipped;\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /**\n     * A description of why the navigation was skipped. For debug purposes only. Use `code`\n     * instead for a stable skipped reason that can be used in production.\n     */\n    reason, \n    /**\n     * A code to indicate why the navigation was skipped. This code is stable for\n     * the reason and can be relied on whereas the `reason` string could change and should not be\n     * used in production.\n     */\n    code) {\n        super(id, url);\n        this.reason = reason;\n        this.code = code;\n    }\n}\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see {@link NavigationStart}\n * @see {@link NavigationEnd}\n * @see {@link NavigationCancel}\n *\n * @publicApi\n */\nclass NavigationError extends RouterEvent {\n    error;\n    target;\n    type = EventType.NavigationError;\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    error, \n    /**\n     * The target of the navigation when the error occurred.\n     *\n     * Note that this can be `undefined` because an error could have occurred before the\n     * `RouterStateSnapshot` was created for the navigation.\n     */\n    target) {\n        super(id, url);\n        this.error = error;\n        this.target = target;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n    }\n}\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nclass RoutesRecognized extends RouterEvent {\n    urlAfterRedirects;\n    state;\n    type = EventType.RoutesRecognized;\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    urlAfterRedirects, \n    /** @docsNotRequired */\n    state) {\n        super(id, url);\n        this.urlAfterRedirects = urlAfterRedirects;\n        this.state = state;\n    }\n    /** @docsNotRequired */\n    toString() {\n        return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n    }\n}\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see {@link GuardsCheckEnd}\n *\n * @publicApi\n */\nclass GuardsCheckStart extends RouterEvent {\n    urlAfterRedirects;\n    state;\n    type = EventType.GuardsCheckStart;\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    urlAfterRedirects, \n    /** @docsNotRequired */\n    state) {\n        super(id, url);\n        this.urlAfterRedirects = urlAfterRedirects;\n        this.state = state;\n    }\n    toString() {\n        return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n    }\n}\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see {@link GuardsCheckStart}\n *\n * @publicApi\n */\nclass GuardsCheckEnd extends RouterEvent {\n    urlAfterRedirects;\n    state;\n    shouldActivate;\n    type = EventType.GuardsCheckEnd;\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    urlAfterRedirects, \n    /** @docsNotRequired */\n    state, \n    /** @docsNotRequired */\n    shouldActivate) {\n        super(id, url);\n        this.urlAfterRedirects = urlAfterRedirects;\n        this.state = state;\n        this.shouldActivate = shouldActivate;\n    }\n    toString() {\n        return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n    }\n}\n/**\n * An event triggered at 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 * @see {@link ResolveEnd}\n *\n * @publicApi\n */\nclass ResolveStart extends RouterEvent {\n    urlAfterRedirects;\n    state;\n    type = EventType.ResolveStart;\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    urlAfterRedirects, \n    /** @docsNotRequired */\n    state) {\n        super(id, url);\n        this.urlAfterRedirects = urlAfterRedirects;\n        this.state = state;\n    }\n    toString() {\n        return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n    }\n}\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nclass ResolveEnd extends RouterEvent {\n    urlAfterRedirects;\n    state;\n    type = EventType.ResolveEnd;\n    constructor(\n    /** @docsNotRequired */\n    id, \n    /** @docsNotRequired */\n    url, \n    /** @docsNotRequired */\n    urlAfterRedirects, \n    /** @docsNotRequired */\n    state) {\n        super(id, url);\n        this.urlAfterRedirects = urlAfterRedirects;\n        this.state = state;\n    }\n    toString() {\n        return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n    }\n}\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see {@link RouteConfigLoadEnd}\n *\n * @publicApi\n */\nclass RouteConfigLoadStart {\n    route;\n    type = EventType.RouteConfigLoadStart;\n    constructor(\n    /** @docsNotRequired */\n    route) {\n        this.route = route;\n    }\n    toString() {\n        return `RouteConfigLoadStart(path: ${this.route.path})`;\n    }\n}\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see {@link RouteConfigLoadStart}\n *\n * @publicApi\n */\nclass RouteConfigLoadEnd {\n    route;\n    type = EventType.RouteConfigLoadEnd;\n    constructor(\n    /** @docsNotRequired */\n    route) {\n        this.route = route;\n    }\n    toString() {\n        return `RouteConfigLoadEnd(path: ${this.route.path})`;\n    }\n}\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see {@link ChildActivationEnd}\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nclass ChildActivationStart {\n    snapshot;\n    type = EventType.ChildActivationStart;\n    constructor(\n    /** @docsNotRequired */\n    snapshot) {\n        this.snapshot = snapshot;\n    }\n    toString() {\n        const path = (this.snapshot.routeConfig && this.snapshot.routeConfig.path) || '';\n        return `ChildActivationStart(path: '${path}')`;\n    }\n}\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see {@link ChildActivationStart}\n * @see {@link ResolveStart}\n * @publicApi\n */\nclass ChildActivationEnd {\n    snapshot;\n    type = EventType.ChildActivationEnd;\n    constructor(\n    /** @docsNotRequired */\n    snapshot) {\n        this.snapshot = snapshot;\n    }\n    toString() {\n        const path = (this.snapshot.routeConfig && this.snapshot.routeConfig.path) || '';\n        return `ChildActivationEnd(path: '${path}')`;\n    }\n}\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see {@link ActivationEnd}\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nclass ActivationStart {\n    snapshot;\n    type = EventType.ActivationStart;\n    constructor(\n    /** @docsNotRequired */\n    snapshot) {\n        this.snapshot = snapshot;\n    }\n    toString() {\n        const path = (this.snapshot.routeConfig && this.snapshot.routeConfig.path) || '';\n        return `ActivationStart(path: '${path}')`;\n    }\n}\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see {@link ActivationStart}\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nclass ActivationEnd {\n    snapshot;\n    type = EventType.ActivationEnd;\n    constructor(\n    /** @docsNotRequired */\n    snapshot) {\n        this.snapshot = snapshot;\n    }\n    toString() {\n        const path = (this.snapshot.routeConfig && this.snapshot.routeConfig.path) || '';\n        return `ActivationEnd(path: '${path}')`;\n    }\n}\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nclass Scroll {\n    routerEvent;\n    position;\n    anchor;\n    type = EventType.Scroll;\n    constructor(\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    toString() {\n        const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n        return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n    }\n}\nclass BeforeActivateRoutes {\n}\nclass RedirectRequest {\n    url;\n    navigationBehaviorOptions;\n    constructor(url, navigationBehaviorOptions) {\n        this.url = url;\n        this.navigationBehaviorOptions = navigationBehaviorOptions;\n    }\n}\nfunction stringifyEvent(routerEvent) {\n    switch (routerEvent.type) {\n        case EventType.ActivationEnd:\n            return `ActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n        case EventType.ActivationStart:\n            return `ActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n        case EventType.ChildActivationEnd:\n            return `ChildActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n        case EventType.ChildActivationStart:\n            return `ChildActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n        case EventType.GuardsCheckEnd:\n            return `GuardsCheckEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state}, shouldActivate: ${routerEvent.shouldActivate})`;\n        case EventType.GuardsCheckStart:\n            return `GuardsCheckStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n        case EventType.NavigationCancel:\n            return `NavigationCancel(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n        case EventType.NavigationSkipped:\n            return `NavigationSkipped(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n        case EventType.NavigationEnd:\n            return `NavigationEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}')`;\n        case EventType.NavigationError:\n            return `NavigationError(id: ${routerEvent.id}, url: '${routerEvent.url}', error: ${routerEvent.error})`;\n        case EventType.NavigationStart:\n            return `NavigationStart(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n        case EventType.ResolveEnd:\n            return `ResolveEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n        case EventType.ResolveStart:\n            return `ResolveStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n        case EventType.RouteConfigLoadEnd:\n            return `RouteConfigLoadEnd(path: ${routerEvent.route.path})`;\n        case EventType.RouteConfigLoadStart:\n            return `RouteConfigLoadStart(path: ${routerEvent.route.path})`;\n        case EventType.RoutesRecognized:\n            return `RoutesRecognized(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n        case EventType.Scroll:\n            const pos = routerEvent.position\n                ? `${routerEvent.position[0]}, ${routerEvent.position[1]}`\n                : null;\n            return `Scroll(anchor: '${routerEvent.anchor}', position: '${pos}')`;\n    }\n}\n\n/**\n * Creates an `EnvironmentInjector` if the `Route` has providers and one does not already exist\n * and returns the injector. Otherwise, if the `Route` does not have `providers`, returns the\n * `currentInjector`.\n *\n * @param route The route that might have providers\n * @param currentInjector The parent injector of the `Route`\n */\nfunction getOrCreateRouteInjectorIfNeeded(route, currentInjector) {\n    if (route.providers && !route._injector) {\n        route._injector = createEnvironmentInjector(route.providers, currentInjector, `Route: ${route.path}`);\n    }\n    return route._injector ?? currentInjector;\n}\nfunction getLoadedRoutes$1(route) {\n    return route._loadedRoutes;\n}\nfunction getLoadedInjector(route) {\n    return route._loadedInjector;\n}\nfunction getLoadedComponent(route) {\n    return route._loadedComponent;\n}\nfunction getProvidersInjector(route) {\n    return route._injector;\n}\nfunction validateConfig(config, parentPath = '', requireStandaloneComponents = false) {\n    // forEach doesn't iterate undefined values\n    for (let i = 0; i < config.length; i++) {\n        const route = config[i];\n        const fullPath = getFullPath(parentPath, route);\n        validateNode(route, fullPath, requireStandaloneComponents);\n    }\n}\nfunction assertStandalone(fullPath, component) {\n    if (component && ɵisNgModule(component)) {\n        throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` +\n            `but it must be used with standalone components. Use 'loadChildren' instead.`);\n    }\n    else if (component && !isStandalone(component)) {\n        throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);\n    }\n}\nfunction validateNode(route, fullPath, requireStandaloneComponents) {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        if (!route) {\n            throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `\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 ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': Array cannot be specified`);\n        }\n        if (!route.redirectTo &&\n            !route.component &&\n            !route.loadComponent &&\n            !route.children &&\n            !route.loadChildren &&\n            route.outlet &&\n            route.outlet !== PRIMARY_OUTLET) {\n            throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `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 ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n        }\n        if (route.redirectTo && route.loadChildren) {\n            throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n        }\n        if (route.children && route.loadChildren) {\n            throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n        }\n        if (route.redirectTo && (route.component || route.loadComponent)) {\n            throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and component/loadComponent cannot be used together`);\n        }\n        if (route.component && route.loadComponent) {\n            throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': component and loadComponent cannot be used together`);\n        }\n        if (route.redirectTo && route.canActivate) {\n            throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` +\n                `so canActivate will never be executed.`);\n        }\n        if (route.path && route.matcher) {\n            throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n        }\n        if (route.redirectTo === void 0 &&\n            !route.component &&\n            !route.loadComponent &&\n            !route.children &&\n            !route.loadChildren) {\n            throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, loadComponent, redirectTo, children or loadChildren`);\n        }\n        if (route.path === void 0 && route.matcher === void 0) {\n            throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `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 ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `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            const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n            throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n        }\n        if (requireStandaloneComponents) {\n            assertStandalone(fullPath, route.component);\n        }\n    }\n    if (route.children) {\n        validateConfig(route.children, fullPath, requireStandaloneComponents);\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/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nfunction getOutlet(route) {\n    return route.outlet || PRIMARY_OUTLET;\n}\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nfunction sortByMatchingOutlets(routes, outletName) {\n    const sortedConfig = routes.filter((r) => getOutlet(r) === outletName);\n    sortedConfig.push(...routes.filter((r) => getOutlet(r) !== outletName));\n    return sortedConfig;\n}\n/**\n * Gets the first injector in the snapshot's parent tree.\n *\n * If the `Route` has a static list of providers, the returned injector will be the one created from\n * those. If it does not exist, the returned injector may come from the parents, which may be from a\n * loaded config or their static providers.\n *\n * Returns `null` if there is neither this nor any parents have a stored injector.\n *\n * Generally used for retrieving the injector to use for getting tokens for guards/resolvers and\n * also used for getting the correct injector to use for creating components.\n */\nfunction getClosestRouteInjector(snapshot) {\n    if (!snapshot)\n        return null;\n    // If the current route has its own injector, which is created from the static providers on the\n    // route itself, we should use that. Otherwise, we start at the parent since we do not want to\n    // include the lazy loaded injector from this route.\n    if (snapshot.routeConfig?._injector) {\n        return snapshot.routeConfig._injector;\n    }\n    for (let s = snapshot.parent; s; s = s.parent) {\n        const route = s.routeConfig;\n        // Note that the order here is important. `_loadedInjector` stored on the route with\n        // `loadChildren: () => NgModule` so it applies to child routes with priority. The `_injector`\n        // is created from the static providers on that parent route, so it applies to the children as\n        // well, but only if there is no lazy loaded NgModuleRef injector.\n        if (route?._loadedInjector)\n            return route._loadedInjector;\n        if (route?._injector)\n            return route._injector;\n    }\n    return null;\n}\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nclass OutletContext {\n    rootInjector;\n    outlet = null;\n    route = null;\n    children;\n    attachRef = null;\n    get injector() {\n        return getClosestRouteInjector(this.route?.snapshot) ?? this.rootInjector;\n    }\n    constructor(rootInjector) {\n        this.rootInjector = rootInjector;\n        this.children = new ChildrenOutletContexts(this.rootInjector);\n    }\n}\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nclass ChildrenOutletContexts {\n    rootInjector;\n    // contexts for child outlets, by name.\n    contexts = new Map();\n    /** @nodoc */\n    constructor(rootInjector) {\n        this.rootInjector = rootInjector;\n    }\n    /** Called when a `RouterOutlet` directive is instantiated */\n    onChildOutletCreated(childName, outlet) {\n        const 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    onChildOutletDestroyed(childName) {\n        const context = this.getContext(childName);\n        if (context) {\n            context.outlet = null;\n            context.attachRef = 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    onOutletDeactivated() {\n        const contexts = this.contexts;\n        this.contexts = new Map();\n        return contexts;\n    }\n    onOutletReAttached(contexts) {\n        this.contexts = contexts;\n    }\n    getOrCreateContext(childName) {\n        let context = this.getContext(childName);\n        if (!context) {\n            context = new OutletContext(this.rootInjector);\n            this.contexts.set(childName, context);\n        }\n        return context;\n    }\n    getContext(childName) {\n        return this.contexts.get(childName) || null;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ChildrenOutletContexts, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ChildrenOutletContexts, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ChildrenOutletContexts, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [{ type: i0.EnvironmentInjector }] });\n\nclass Tree {\n    /** @internal */\n    _root;\n    constructor(root) {\n        this._root = root;\n    }\n    get root() {\n        return this._root.value;\n    }\n    /**\n     * @internal\n     */\n    parent(t) {\n        const p = this.pathFromRoot(t);\n        return p.length > 1 ? p[p.length - 2] : null;\n    }\n    /**\n     * @internal\n     */\n    children(t) {\n        const n = findNode(t, this._root);\n        return n ? n.children.map((t) => t.value) : [];\n    }\n    /**\n     * @internal\n     */\n    firstChild(t) {\n        const n = findNode(t, this._root);\n        return n && n.children.length > 0 ? n.children[0].value : null;\n    }\n    /**\n     * @internal\n     */\n    siblings(t) {\n        const p = findPath(t, this._root);\n        if (p.length < 2)\n            return [];\n        const c = p[p.length - 2].children.map((c) => c.value);\n        return c.filter((cc) => cc !== t);\n    }\n    /**\n     * @internal\n     */\n    pathFromRoot(t) {\n        return findPath(t, this._root).map((s) => s.value);\n    }\n}\n// DFS for the node matching the value\nfunction findNode(value, node) {\n    if (value === node.value)\n        return node;\n    for (const child of node.children) {\n        const node = findNode(value, child);\n        if (node)\n            return node;\n    }\n    return null;\n}\n// Return the path to the node with the given value using DFS\nfunction findPath(value, node) {\n    if (value === node.value)\n        return [node];\n    for (const child of node.children) {\n        const path = findPath(value, child);\n        if (path.length) {\n            path.unshift(node);\n            return path;\n        }\n    }\n    return [];\n}\nclass TreeNode {\n    value;\n    children;\n    constructor(value, children) {\n        this.value = value;\n        this.children = children;\n    }\n    toString() {\n        return `TreeNode(${this.value})`;\n    }\n}\n// Return the list of T indexed by outlet name\nfunction nodeChildrenAsMap(node) {\n    const map = {};\n    if (node) {\n        node.children.forEach((child) => (map[child.value.outlet] = child));\n    }\n    return map;\n}\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 * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```ts\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<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @see {@link ActivatedRoute}\n * @see [Getting route information](guide/routing/common-router-tasks#getting-route-information)\n *\n * @publicApi\n */\nclass RouterState extends Tree {\n    snapshot;\n    /** @internal */\n    constructor(root, \n    /** The current snapshot of the router state */\n    snapshot) {\n        super(root);\n        this.snapshot = snapshot;\n        setRouterState(this, root);\n    }\n    toString() {\n        return this.snapshot.toString();\n    }\n}\nfunction createEmptyState(rootComponent) {\n    const snapshot = createEmptyStateSnapshot(rootComponent);\n    const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n    const emptyParams = new BehaviorSubject({});\n    const emptyData = new BehaviorSubject({});\n    const emptyQueryParams = new BehaviorSubject({});\n    const fragment = new BehaviorSubject('');\n    const 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(rootComponent) {\n    const emptyParams = {};\n    const emptyData = {};\n    const emptyQueryParams = {};\n    const fragment = '';\n    const activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, {});\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 * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n *     header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/routing/common-router-tasks#getting-route-information)\n *\n * @publicApi\n */\nclass ActivatedRoute {\n    urlSubject;\n    paramsSubject;\n    queryParamsSubject;\n    fragmentSubject;\n    dataSubject;\n    outlet;\n    component;\n    /** The current snapshot of this route */\n    snapshot;\n    /** @internal */\n    _futureSnapshot;\n    /** @internal */\n    _routerState;\n    /** @internal */\n    _paramMap;\n    /** @internal */\n    _queryParamMap;\n    /** An Observable of the resolved route title */\n    title;\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    /** @internal */\n    constructor(\n    /** @internal */\n    urlSubject, \n    /** @internal */\n    paramsSubject, \n    /** @internal */\n    queryParamsSubject, \n    /** @internal */\n    fragmentSubject, \n    /** @internal */\n    dataSubject, \n    /** The outlet name of the route, a constant. */\n    outlet, \n    /** The component of the route, a constant. */\n    component, futureSnapshot) {\n        this.urlSubject = urlSubject;\n        this.paramsSubject = paramsSubject;\n        this.queryParamsSubject = queryParamsSubject;\n        this.fragmentSubject = fragmentSubject;\n        this.dataSubject = dataSubject;\n        this.outlet = outlet;\n        this.component = component;\n        this._futureSnapshot = futureSnapshot;\n        this.title = this.dataSubject?.pipe(map((d) => d[RouteTitleKey])) ?? of(undefined);\n        // TODO(atscott): Verify that these can be changed to `.asObservable()` with TGP.\n        this.url = urlSubject;\n        this.params = paramsSubject;\n        this.queryParams = queryParamsSubject;\n        this.fragment = fragmentSubject;\n        this.data = dataSubject;\n    }\n    /** The configuration used to match this route. */\n    get routeConfig() {\n        return this._futureSnapshot.routeConfig;\n    }\n    /** The root of the router state. */\n    get root() {\n        return this._routerState.root;\n    }\n    /** The parent of this route in the router state tree. */\n    get parent() {\n        return this._routerState.parent(this);\n    }\n    /** The first child of this route in the router state tree. */\n    get firstChild() {\n        return this._routerState.firstChild(this);\n    }\n    /** The children of this route in the router state tree. */\n    get children() {\n        return this._routerState.children(this);\n    }\n    /** The path from the root of the router state tree to this route. */\n    get pathFromRoot() {\n        return this._routerState.pathFromRoot(this);\n    }\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 paramMap() {\n        this._paramMap ??= this.params.pipe(map((p) => convertToParamMap(p)));\n        return this._paramMap;\n    }\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 queryParamMap() {\n        this._queryParamMap ??= this.queryParams.pipe(map((p) => convertToParamMap(p)));\n        return this._queryParamMap;\n    }\n    toString() {\n        return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n    }\n}\n/**\n * Returns the inherited params, data, and resolve for a given route.\n *\n * By default, we do not inherit parent data unless the current route is path-less or the parent\n * route is component-less.\n */\nfunction getInherited(route, parent, paramsInheritanceStrategy = 'emptyOnly') {\n    let inherited;\n    const { routeConfig } = route;\n    if (parent !== null &&\n        (paramsInheritanceStrategy === 'always' ||\n            // inherit parent data if route is empty path\n            routeConfig?.path === '' ||\n            // inherit parent data if parent was componentless\n            (!parent.component && !parent.routeConfig?.loadComponent))) {\n        inherited = {\n            params: { ...parent.params, ...route.params },\n            data: { ...parent.data, ...route.data },\n            resolve: {\n                // Snapshots are created with data inherited from parent and guards (i.e. canActivate) can\n                // change data because it's not frozen...\n                // This first line could be deleted chose to break/disallow mutating the `data` object in\n                // guards.\n                // Note that data from parents still override this mutated data so anyone relying on this\n                // might be surprised that it doesn't work if parent data is inherited but otherwise does.\n                ...route.data,\n                // Ensure inherited resolved data overrides inherited static data\n                ...parent.data,\n                // static data from the current route overrides any inherited data\n                ...routeConfig?.data,\n                // resolved data from current route overrides everything\n                ...route._resolvedData,\n            },\n        };\n    }\n    else {\n        inherited = {\n            params: { ...route.params },\n            data: { ...route.data },\n            resolve: { ...route.data, ...(route._resolvedData ?? {}) },\n        };\n    }\n    if (routeConfig && hasStaticTitle(routeConfig)) {\n        inherited.resolve[RouteTitleKey] = routeConfig.title;\n    }\n    return inherited;\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 * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```ts\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 */\nclass ActivatedRouteSnapshot {\n    url;\n    params;\n    queryParams;\n    fragment;\n    data;\n    outlet;\n    component;\n    /** The configuration used to match this route **/\n    routeConfig;\n    /** @internal */\n    _resolve;\n    /** @internal */\n    _resolvedData;\n    /** @internal */\n    _routerState;\n    /** @internal */\n    _paramMap;\n    /** @internal */\n    _queryParamMap;\n    /** The resolved route title */\n    get title() {\n        // Note: This _must_ be a getter because the data is mutated in the resolvers. Title will not be\n        // available at the time of class instantiation.\n        return this.data?.[RouteTitleKey];\n    }\n    /** @internal */\n    constructor(\n    /** The URL segments matched by this route */\n    url, \n    /**\n     *  The matrix parameters scoped to this route.\n     *\n     *  You can compute all params (or data) in the router state or to get params outside\n     *  of an activated component by traversing the `RouterState` tree as in the following\n     *  example:\n     *  ```\n     *  collectRouteParams(router: Router) {\n     *    let params = {};\n     *    let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n     *    while (stack.length > 0) {\n     *      const route = stack.pop()!;\n     *      params = {...params, ...route.params};\n     *      stack.push(...route.children);\n     *    }\n     *    return params;\n     *  }\n     *  ```\n     */\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, 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._resolve = resolve;\n    }\n    /** The root of the router state */\n    get root() {\n        return this._routerState.root;\n    }\n    /** The parent of this route in the router state tree */\n    get parent() {\n        return this._routerState.parent(this);\n    }\n    /** The first child of this route in the router state tree */\n    get firstChild() {\n        return this._routerState.firstChild(this);\n    }\n    /** The children of this route in the router state tree */\n    get children() {\n        return this._routerState.children(this);\n    }\n    /** The path from the root of the router state tree to this route */\n    get pathFromRoot() {\n        return this._routerState.pathFromRoot(this);\n    }\n    get paramMap() {\n        this._paramMap ??= convertToParamMap(this.params);\n        return this._paramMap;\n    }\n    get queryParamMap() {\n        this._queryParamMap ??= convertToParamMap(this.queryParams);\n        return this._queryParamMap;\n    }\n    toString() {\n        const url = this.url.map((segment) => segment.toString()).join('/');\n        const matched = this.routeConfig ? this.routeConfig.path : '';\n        return `Route(url:'${url}', path:'${matched}')`;\n    }\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 * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```ts\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<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nclass RouterStateSnapshot extends Tree {\n    url;\n    /** @internal */\n    constructor(\n    /** The url from which this snapshot was created */\n    url, root) {\n        super(root);\n        this.url = url;\n        setRouterState(this, root);\n    }\n    toString() {\n        return serializeNode(this._root);\n    }\n}\nfunction setRouterState(state, node) {\n    node.value._routerState = state;\n    node.children.forEach((c) => setRouterState(state, c));\n}\nfunction serializeNode(node) {\n    const 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        const currentSnapshot = route.snapshot;\n        const nextSnapshot = route._futureSnapshot;\n        route.snapshot = nextSnapshot;\n        if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n            route.queryParamsSubject.next(nextSnapshot.queryParams);\n        }\n        if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n            route.fragmentSubject.next(nextSnapshot.fragment);\n        }\n        if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n            route.paramsSubject.next(nextSnapshot.params);\n        }\n        if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n            route.urlSubject.next(nextSnapshot.url);\n        }\n        if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n            route.dataSubject.next(nextSnapshot.data);\n        }\n    }\n    else {\n        route.snapshot = route._futureSnapshot;\n        // this is for resolved data\n        route.dataSubject.next(route._futureSnapshot.data);\n    }\n}\nfunction equalParamsAndUrlSegments(a, b) {\n    const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n    const parentsMismatch = !a.parent !== !b.parent;\n    return (equalUrlParams &&\n        !parentsMismatch &&\n        (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent)));\n}\nfunction hasStaticTitle(config) {\n    return typeof config.title === 'string' || config.title === null;\n}\n\n/**\n * An `InjectionToken` provided by the `RouterOutlet` and can be set using the `routerOutletData`\n * input.\n *\n * When unset, this value is `null` by default.\n *\n * @usageNotes\n *\n * To set the data from the template of the component with `router-outlet`:\n * ```html\n * <router-outlet [routerOutletData]=\"{name: 'Angular'}\" />\n * ```\n *\n * To read the data in the routed component:\n * ```ts\n * data = inject(ROUTER_OUTLET_DATA) as Signal<{name: string}>;\n * ```\n *\n * @publicApi\n */\nconst ROUTER_OUTLET_DATA = new InjectionToken(ngDevMode ? 'RouterOutlet data' : '');\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 * ```html\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * deactivate event when a component is destroyed.\n * An attached event emits when the `RouteReuseStrategy` instructs the outlet to reattach the\n * subtree, and the detached event emits when the `RouteReuseStrategy` instructs the outlet to\n * detach the subtree.\n *\n * ```html\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'\n *   (attach)='onAttach($event)'\n *   (detach)='onDetach($event)'></router-outlet>\n * ```\n *\n * @see {@link RouterLink}\n * @see {@link Route}\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterOutlet {\n    activated = null;\n    /** @internal */\n    get activatedComponentRef() {\n        return this.activated;\n    }\n    _activatedRoute = null;\n    /**\n     * The name of the outlet\n     *\n     */\n    name = PRIMARY_OUTLET;\n    activateEvents = new EventEmitter();\n    deactivateEvents = new EventEmitter();\n    /**\n     * Emits an attached component instance when the `RouteReuseStrategy` instructs to re-attach a\n     * previously detached subtree.\n     **/\n    attachEvents = new EventEmitter();\n    /**\n     * Emits a detached component instance when the `RouteReuseStrategy` instructs to detach the\n     * subtree.\n     */\n    detachEvents = new EventEmitter();\n    /**\n     * Data that will be provided to the child injector through the `ROUTER_OUTLET_DATA` token.\n     *\n     * When unset, the value of the token is `undefined` by default.\n     */\n    routerOutletData = input(undefined);\n    parentContexts = inject(ChildrenOutletContexts);\n    location = inject(ViewContainerRef);\n    changeDetector = inject(ChangeDetectorRef);\n    inputBinder = inject(INPUT_BINDER, { optional: true });\n    /** @nodoc */\n    supportsBindingToComponentInputs = true;\n    /** @nodoc */\n    ngOnChanges(changes) {\n        if (changes['name']) {\n            const { firstChange, previousValue } = changes['name'];\n            if (firstChange) {\n                // The first change is handled by ngOnInit. Because ngOnChanges doesn't get called when no\n                // input is set at all, we need to centrally handle the first change there.\n                return;\n            }\n            // unregister with the old name\n            if (this.isTrackedInParentContexts(previousValue)) {\n                this.deactivate();\n                this.parentContexts.onChildOutletDestroyed(previousValue);\n            }\n            // register the new name\n            this.initializeOutletWithName();\n        }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        // Ensure that the registered outlet is this one before removing it on the context.\n        if (this.isTrackedInParentContexts(this.name)) {\n            this.parentContexts.onChildOutletDestroyed(this.name);\n        }\n        this.inputBinder?.unsubscribeFromRouteData(this);\n    }\n    isTrackedInParentContexts(outletName) {\n        return this.parentContexts.getContext(outletName)?.outlet === this;\n    }\n    /** @nodoc */\n    ngOnInit() {\n        this.initializeOutletWithName();\n    }\n    initializeOutletWithName() {\n        this.parentContexts.onChildOutletCreated(this.name, this);\n        if (this.activated) {\n            return;\n        }\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        const context = this.parentContexts.getContext(this.name);\n        if (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.injector);\n            }\n        }\n    }\n    get isActivated() {\n        return !!this.activated;\n    }\n    /**\n     * @returns The currently activated component instance.\n     * @throws An error if the outlet is not activated.\n     */\n    get component() {\n        if (!this.activated)\n            throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');\n        return this.activated.instance;\n    }\n    get activatedRoute() {\n        if (!this.activated)\n            throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');\n        return this._activatedRoute;\n    }\n    get activatedRouteData() {\n        if (this._activatedRoute) {\n            return this._activatedRoute.snapshot.data;\n        }\n        return {};\n    }\n    /**\n     * Called when the `RouteReuseStrategy` instructs to detach the subtree\n     */\n    detach() {\n        if (!this.activated)\n            throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');\n        this.location.detach();\n        const cmp = this.activated;\n        this.activated = null;\n        this._activatedRoute = null;\n        this.detachEvents.emit(cmp.instance);\n        return cmp;\n    }\n    /**\n     * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n     */\n    attach(ref, activatedRoute) {\n        this.activated = ref;\n        this._activatedRoute = activatedRoute;\n        this.location.insert(ref.hostView);\n        this.inputBinder?.bindActivatedRouteToOutletComponent(this);\n        this.attachEvents.emit(ref.instance);\n    }\n    deactivate() {\n        if (this.activated) {\n            const c = this.component;\n            this.activated.destroy();\n            this.activated = null;\n            this._activatedRoute = null;\n            this.deactivateEvents.emit(c);\n        }\n    }\n    activateWith(activatedRoute, environmentInjector) {\n        if (this.isActivated) {\n            throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                'Cannot activate an already activated outlet');\n        }\n        this._activatedRoute = activatedRoute;\n        const location = this.location;\n        const snapshot = activatedRoute.snapshot;\n        const component = snapshot.component;\n        const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n        const injector = new OutletInjector(activatedRoute, childContexts, location.injector, this.routerOutletData);\n        this.activated = location.createComponent(component, {\n            index: location.length,\n            injector,\n            environmentInjector: environmentInjector,\n        });\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.inputBinder?.bindActivatedRouteToOutletComponent(this);\n        this.activateEvents.emit(this.activated.instance);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"17.1.0\", version: \"19.0.5\", type: RouterOutlet, isStandalone: true, selector: \"router-outlet\", inputs: { name: { classPropertyName: \"name\", publicName: \"name\", isSignal: false, isRequired: false, transformFunction: null }, routerOutletData: { classPropertyName: \"routerOutletData\", publicName: \"routerOutletData\", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activateEvents: \"activate\", deactivateEvents: \"deactivate\", attachEvents: \"attach\", detachEvents: \"detach\" }, exportAs: [\"outlet\"], usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterOutlet, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'router-outlet',\n                    exportAs: 'outlet',\n                }]\n        }], propDecorators: { name: [{\n                type: Input\n            }], activateEvents: [{\n                type: Output,\n                args: ['activate']\n            }], deactivateEvents: [{\n                type: Output,\n                args: ['deactivate']\n            }], attachEvents: [{\n                type: Output,\n                args: ['attach']\n            }], detachEvents: [{\n                type: Output,\n                args: ['detach']\n            }] } });\nclass OutletInjector {\n    route;\n    childContexts;\n    parent;\n    outletData;\n    /**\n     * This injector has a special handing for the `ActivatedRoute` and\n     * `ChildrenOutletContexts` tokens: it returns corresponding values for those\n     * tokens dynamically. This behavior is different from the regular injector logic,\n     * when we initialize and store a value, which is later returned for all inject\n     * requests.\n     *\n     * In some cases (e.g. when using `@defer`), this dynamic behavior requires special\n     * handling. This function allows to identify an instance of the `OutletInjector` and\n     * create an instance of it without referring to the class itself (so this logic can\n     * be invoked from the `core` package). This helps to retain dynamic behavior for the\n     * mentioned tokens.\n     *\n     * Note: it's a temporary solution and we should explore how to support this case better.\n     */\n    __ngOutletInjector(parentInjector) {\n        return new OutletInjector(this.route, this.childContexts, parentInjector, this.outletData);\n    }\n    constructor(route, childContexts, parent, outletData) {\n        this.route = route;\n        this.childContexts = childContexts;\n        this.parent = parent;\n        this.outletData = outletData;\n    }\n    get(token, notFoundValue) {\n        if (token === ActivatedRoute) {\n            return this.route;\n        }\n        if (token === ChildrenOutletContexts) {\n            return this.childContexts;\n        }\n        if (token === ROUTER_OUTLET_DATA) {\n            return this.outletData;\n        }\n        return this.parent.get(token, notFoundValue);\n    }\n}\nconst INPUT_BINDER = new InjectionToken('');\n/**\n * Injectable used as a tree-shakable provider for opting in to binding router data to component\n * inputs.\n *\n * The RouterOutlet registers itself with this service when an `ActivatedRoute` is attached or\n * activated. When this happens, the service subscribes to the `ActivatedRoute` observables (params,\n * queryParams, data) and sets the inputs of the component using `ComponentRef.setInput`.\n * Importantly, when an input does not have an item in the route data with a matching key, this\n * input is set to `undefined`. If it were not done this way, the previous information would be\n * retained if the data got removed from the route (i.e. if a query parameter is removed).\n *\n * The `RouterOutlet` should unregister itself when destroyed via `unsubscribeFromRouteData` so that\n * the subscriptions are cleaned up.\n */\nclass RoutedComponentInputBinder {\n    outletDataSubscriptions = new Map();\n    bindActivatedRouteToOutletComponent(outlet) {\n        this.unsubscribeFromRouteData(outlet);\n        this.subscribeToRouteData(outlet);\n    }\n    unsubscribeFromRouteData(outlet) {\n        this.outletDataSubscriptions.get(outlet)?.unsubscribe();\n        this.outletDataSubscriptions.delete(outlet);\n    }\n    subscribeToRouteData(outlet) {\n        const { activatedRoute } = outlet;\n        const dataSubscription = combineLatest([\n            activatedRoute.queryParams,\n            activatedRoute.params,\n            activatedRoute.data,\n        ])\n            .pipe(switchMap(([queryParams, params, data], index) => {\n            data = { ...queryParams, ...params, ...data };\n            // Get the first result from the data subscription synchronously so it's available to\n            // the component as soon as possible (and doesn't require a second change detection).\n            if (index === 0) {\n                return of(data);\n            }\n            // Promise.resolve is used to avoid synchronously writing the wrong data when\n            // two of the Observables in the `combineLatest` stream emit one after\n            // another.\n            return Promise.resolve(data);\n        }))\n            .subscribe((data) => {\n            // Outlet may have been deactivated or changed names to be associated with a different\n            // route\n            if (!outlet.isActivated ||\n                !outlet.activatedComponentRef ||\n                outlet.activatedRoute !== activatedRoute ||\n                activatedRoute.component === null) {\n                this.unsubscribeFromRouteData(outlet);\n                return;\n            }\n            const mirror = reflectComponentType(activatedRoute.component);\n            if (!mirror) {\n                this.unsubscribeFromRouteData(outlet);\n                return;\n            }\n            for (const { templateName } of mirror.inputs) {\n                outlet.activatedComponentRef.setInput(templateName, data[templateName]);\n            }\n        });\n        this.outletDataSubscriptions.set(outlet, dataSubscription);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RoutedComponentInputBinder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RoutedComponentInputBinder });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RoutedComponentInputBinder, decorators: [{\n            type: Injectable\n        }] });\n\nfunction createRouterState(routeReuseStrategy, curr, prevState) {\n    const 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        const value = prevState.value;\n        value._futureSnapshot = curr.value;\n        const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n        return new TreeNode(value, children);\n    }\n    else {\n        if (routeReuseStrategy.shouldAttach(curr.value)) {\n            // retrieve an activated route that is used to be displayed, but is not currently displayed\n            const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n            if (detachedRouteHandle !== null) {\n                const tree = detachedRouteHandle.route;\n                tree.value._futureSnapshot = curr.value;\n                tree.children = curr.children.map((c) => createNode(routeReuseStrategy, c));\n                return tree;\n            }\n        }\n        const value = createActivatedRoute(curr.value);\n        const children = curr.children.map((c) => createNode(routeReuseStrategy, c));\n        return new TreeNode(value, children);\n    }\n}\nfunction createOrReuseChildren(routeReuseStrategy, curr, prevState) {\n    return curr.children.map((child) => {\n        for (const p of prevState.children) {\n            if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n                return createNode(routeReuseStrategy, child, p);\n            }\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 * Can be returned by a `Router` guard to instruct the `Router` to redirect rather than continue\n * processing the path of the in-flight navigation. The `redirectTo` indicates _where_ the new\n * navigation should go to and the optional `navigationBehaviorOptions` can provide more information\n * about _how_ to perform the navigation.\n *\n * ```ts\n * const route: Route = {\n *   path: \"user/:userId\",\n *   component: User,\n *   canActivate: [\n *     () => {\n *       const router = inject(Router);\n *       const authService = inject(AuthenticationService);\n *\n *       if (!authService.isLoggedIn()) {\n *         const loginPath = router.parseUrl(\"/login\");\n *         return new RedirectCommand(loginPath, {\n *           skipLocationChange: \"true\",\n *         });\n *       }\n *\n *       return true;\n *     },\n *   ],\n * };\n * ```\n * @see [Routing guide](guide/routing/common-router-tasks#preventing-unauthorized-access)\n *\n * @publicApi\n */\nclass RedirectCommand {\n    redirectTo;\n    navigationBehaviorOptions;\n    constructor(redirectTo, navigationBehaviorOptions) {\n        this.redirectTo = redirectTo;\n        this.navigationBehaviorOptions = navigationBehaviorOptions;\n    }\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\nfunction redirectingNavigationError(urlSerializer, redirect) {\n    const { redirectTo, navigationBehaviorOptions } = isUrlTree(redirect)\n        ? { redirectTo: redirect, navigationBehaviorOptions: undefined }\n        : redirect;\n    const error = navigationCancelingError(ngDevMode && `Redirecting to \"${urlSerializer.serialize(redirectTo)}\"`, NavigationCancellationCode.Redirect);\n    error.url = redirectTo;\n    error.navigationBehaviorOptions = navigationBehaviorOptions;\n    return error;\n}\nfunction navigationCancelingError(message, code) {\n    const error = new Error(`NavigationCancelingError: ${message || ''}`);\n    error[NAVIGATION_CANCELING_ERROR] = true;\n    error.cancellationCode = code;\n    return error;\n}\nfunction isRedirectingNavigationCancelingError(error) {\n    return (isNavigationCancelingError(error) &&\n        isUrlTree(error.url));\n}\nfunction isNavigationCancelingError(error) {\n    return !!error && error[NAVIGATION_CANCELING_ERROR];\n}\n\nlet warnedAboutUnsupportedInputBinding = false;\nconst activateRoutes = (rootContexts, routeReuseStrategy, forwardEvent, inputBindingEnabled) => map((t) => {\n    new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent, inputBindingEnabled).activate(rootContexts);\n    return t;\n});\nclass ActivateRoutes {\n    routeReuseStrategy;\n    futureState;\n    currState;\n    forwardEvent;\n    inputBindingEnabled;\n    constructor(routeReuseStrategy, futureState, currState, forwardEvent, inputBindingEnabled) {\n        this.routeReuseStrategy = routeReuseStrategy;\n        this.futureState = futureState;\n        this.currState = currState;\n        this.forwardEvent = forwardEvent;\n        this.inputBindingEnabled = inputBindingEnabled;\n    }\n    activate(parentContexts) {\n        const futureRoot = this.futureState._root;\n        const 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    deactivateChildRoutes(futureNode, currNode, contexts) {\n        const children = nodeChildrenAsMap(currNode);\n        // Recurse on the routes active in the future state to de-activate deeper children\n        futureNode.children.forEach((futureChild) => {\n            const 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        Object.values(children).forEach((v) => {\n            this.deactivateRouteAndItsChildren(v, contexts);\n        });\n    }\n    deactivateRoutes(futureNode, currNode, parentContext) {\n        const future = futureNode.value;\n        const 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                const 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    deactivateRouteAndItsChildren(route, parentContexts) {\n        // If there is no component, the Route is never attached to an outlet (because there is no\n        // component to attach).\n        if (route.value.component && this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n            this.detachAndStoreRouteSubtree(route, parentContexts);\n        }\n        else {\n            this.deactivateRouteAndOutlet(route, parentContexts);\n        }\n    }\n    detachAndStoreRouteSubtree(route, parentContexts) {\n        const context = parentContexts.getContext(route.value.outlet);\n        const contexts = context && route.value.component ? context.children : parentContexts;\n        const children = nodeChildrenAsMap(route);\n        for (const treeNode of Object.values(children)) {\n            this.deactivateRouteAndItsChildren(treeNode, contexts);\n        }\n        if (context && context.outlet) {\n            const componentRef = context.outlet.detach();\n            const contexts = context.children.onOutletDeactivated();\n            this.routeReuseStrategy.store(route.value.snapshot, { componentRef, route, contexts });\n        }\n    }\n    deactivateRouteAndOutlet(route, parentContexts) {\n        const context = parentContexts.getContext(route.value.outlet);\n        // The context could be `null` if we are on a componentless route but there may still be\n        // children that need deactivating.\n        const contexts = context && route.value.component ? context.children : parentContexts;\n        const children = nodeChildrenAsMap(route);\n        for (const treeNode of Object.values(children)) {\n            this.deactivateRouteAndItsChildren(treeNode, contexts);\n        }\n        if (context) {\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            // Clear the information about the attached component on the context but keep the reference to\n            // the outlet. Clear even if outlet was not yet activated to avoid activating later with old\n            // info\n            context.attachRef = null;\n            context.route = null;\n        }\n    }\n    activateChildRoutes(futureNode, currNode, contexts) {\n        const children = nodeChildrenAsMap(currNode);\n        futureNode.children.forEach((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(futureNode, currNode, parentContexts) {\n        const future = futureNode.value;\n        const 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                const 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                const context = parentContexts.getOrCreateContext(future.outlet);\n                if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n                    const 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                    advanceActivatedRoute(stored.route.value);\n                    this.activateChildRoutes(futureNode, null, context.children);\n                }\n                else {\n                    context.attachRef = null;\n                    context.route = future;\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, context.injector);\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        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            const context = parentContexts.getOrCreateContext(future.outlet);\n            const outlet = context.outlet;\n            if (outlet &&\n                this.inputBindingEnabled &&\n                !outlet.supportsBindingToComponentInputs &&\n                !warnedAboutUnsupportedInputBinding) {\n                console.warn(`'withComponentInputBinding' feature is enabled but ` +\n                    `this application is using an outlet that may not support binding to component inputs.`);\n                warnedAboutUnsupportedInputBinding = true;\n            }\n        }\n    }\n}\n\nclass CanActivate {\n    path;\n    route;\n    constructor(path) {\n        this.path = path;\n        this.route = this.path[this.path.length - 1];\n    }\n}\nclass CanDeactivate {\n    component;\n    route;\n    constructor(component, route) {\n        this.component = component;\n        this.route = route;\n    }\n}\nfunction getAllRouteGuards(future, curr, parentContexts) {\n    const futureRoot = future._root;\n    const currRoot = curr ? curr._root : null;\n    return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\nfunction getCanActivateChild(p) {\n    const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n    if (!canActivateChild || canActivateChild.length === 0)\n        return null;\n    return { node: p, guards: canActivateChild };\n}\nfunction getTokenOrFunctionIdentity(tokenOrFunction, injector) {\n    const NOT_FOUND = Symbol();\n    const result = injector.get(tokenOrFunction, NOT_FOUND);\n    if (result === NOT_FOUND) {\n        if (typeof tokenOrFunction === 'function' && !ɵisInjectable(tokenOrFunction)) {\n            // We think the token is just a function so return it as-is\n            return tokenOrFunction;\n        }\n        else {\n            // This will throw the not found error\n            return injector.get(tokenOrFunction);\n        }\n    }\n    return result;\n}\nfunction getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks = {\n    canDeactivateChecks: [],\n    canActivateChecks: [],\n}) {\n    const prevChildren = nodeChildrenAsMap(currNode);\n    // Process the children of the future route\n    futureNode.children.forEach((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    Object.entries(prevChildren).forEach(([k, v]) => deactivateRouteAndItsChildren(v, contexts.getContext(k), checks));\n    return checks;\n}\nfunction getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks = {\n    canDeactivateChecks: [],\n    canActivateChecks: [],\n}) {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n    const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n    // reusing the node\n    if (curr && future.routeConfig === curr.routeConfig) {\n        const 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 && context && context.outlet && context.outlet.isActivated) {\n            checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.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) || !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    const children = nodeChildrenAsMap(route);\n    const r = route.value;\n    Object.entries(children).forEach(([childName, node]) => {\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 * 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<product>(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 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}\nfunction isCanMatch(guard) {\n    return guard && isFunction(guard.canMatch);\n}\nfunction isEmptyError(e) {\n    return e instanceof EmptyError || e?.name === 'EmptyError';\n}\n\nconst INITIAL_VALUE = /* @__PURE__ */ Symbol('INITIAL_VALUE');\nfunction prioritizedGuardValue() {\n    return switchMap((obs) => {\n        return combineLatest(obs.map((o) => o.pipe(take(1), startWith(INITIAL_VALUE)))).pipe(map((results) => {\n            for (const result of results) {\n                if (result === true) {\n                    // If result is true, check the next one\n                    continue;\n                }\n                else if (result === INITIAL_VALUE) {\n                    // If guard has not finished, we need to stop processing.\n                    return INITIAL_VALUE;\n                }\n                else if (result === false || isRedirect(result)) {\n                    // Result finished and was not true. Return the result.\n                    // Note that we only allow false/UrlTree/RedirectCommand. Other values are considered invalid and\n                    // ignored.\n                    return result;\n                }\n            }\n            // Everything resolved to true. Return true.\n            return true;\n        }), filter((item) => item !== INITIAL_VALUE), take(1));\n    });\n}\nfunction isRedirect(val) {\n    return isUrlTree(val) || val instanceof RedirectCommand;\n}\n\nfunction checkGuards(injector, forwardEvent) {\n    return mergeMap((t) => {\n        const { targetSnapshot, currentSnapshot, guards: { canActivateChecks, canDeactivateChecks }, } = t;\n        if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n            return of({ ...t, guardsResult: true });\n        }\n        return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, injector).pipe(mergeMap((canDeactivate) => {\n            return canDeactivate && isBoolean(canDeactivate)\n                ? runCanActivateChecks(targetSnapshot, canActivateChecks, injector, forwardEvent)\n                : of(canDeactivate);\n        }), map((guardsResult) => ({ ...t, guardsResult })));\n    });\n}\nfunction runCanDeactivateChecks(checks, futureRSS, currRSS, injector) {\n    return from(checks).pipe(mergeMap((check) => runCanDeactivate(check.component, check.route, currRSS, futureRSS, injector)), first((result) => {\n        return result !== true;\n    }, true));\n}\nfunction runCanActivateChecks(futureSnapshot, checks, injector, forwardEvent) {\n    return from(checks).pipe(concatMap((check) => {\n        return concat(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, injector), runCanActivate(futureSnapshot, check.route, injector));\n    }), first((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, injector) {\n    const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n    if (!canActivate || canActivate.length === 0)\n        return of(true);\n    const canActivateObservables = canActivate.map((canActivate) => {\n        return defer(() => {\n            const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n            const guard = getTokenOrFunctionIdentity(canActivate, closestInjector);\n            const guardVal = isCanActivate(guard)\n                ? guard.canActivate(futureARS, futureRSS)\n                : runInInjectionContext(closestInjector, () => guard(futureARS, futureRSS));\n            return wrapIntoObservable(guardVal).pipe(first());\n        });\n    });\n    return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanActivateChild(futureRSS, path, injector) {\n    const futureARS = path[path.length - 1];\n    const canActivateChildGuards = path\n        .slice(0, path.length - 1)\n        .reverse()\n        .map((p) => getCanActivateChild(p))\n        .filter((_) => _ !== null);\n    const canActivateChildGuardsMapped = canActivateChildGuards.map((d) => {\n        return defer(() => {\n            const guardsMapped = d.guards.map((canActivateChild) => {\n                const closestInjector = getClosestRouteInjector(d.node) ?? injector;\n                const guard = getTokenOrFunctionIdentity(canActivateChild, closestInjector);\n                const guardVal = isCanActivateChild(guard)\n                    ? guard.canActivateChild(futureARS, futureRSS)\n                    : runInInjectionContext(closestInjector, () => guard(futureARS, futureRSS));\n                return wrapIntoObservable(guardVal).pipe(first());\n            });\n            return of(guardsMapped).pipe(prioritizedGuardValue());\n        });\n    });\n    return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\nfunction runCanDeactivate(component, currARS, currRSS, futureRSS, injector) {\n    const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n    if (!canDeactivate || canDeactivate.length === 0)\n        return of(true);\n    const canDeactivateObservables = canDeactivate.map((c) => {\n        const closestInjector = getClosestRouteInjector(currARS) ?? injector;\n        const guard = getTokenOrFunctionIdentity(c, closestInjector);\n        const guardVal = isCanDeactivate(guard)\n            ? guard.canDeactivate(component, currARS, currRSS, futureRSS)\n            : runInInjectionContext(closestInjector, () => guard(component, currARS, currRSS, futureRSS));\n        return wrapIntoObservable(guardVal).pipe(first());\n    });\n    return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanLoadGuards(injector, route, segments, urlSerializer) {\n    const canLoad = route.canLoad;\n    if (canLoad === undefined || canLoad.length === 0) {\n        return of(true);\n    }\n    const canLoadObservables = canLoad.map((injectionToken) => {\n        const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n        const guardVal = isCanLoad(guard)\n            ? guard.canLoad(route, segments)\n            : runInInjectionContext(injector, () => guard(route, segments));\n        return wrapIntoObservable(guardVal);\n    });\n    return of(canLoadObservables).pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\nfunction redirectIfUrlTree(urlSerializer) {\n    return pipe(tap((result) => {\n        if (typeof result === 'boolean')\n            return;\n        throw redirectingNavigationError(urlSerializer, result);\n    }), map((result) => result === true));\n}\nfunction runCanMatchGuards(injector, route, segments, urlSerializer) {\n    const canMatch = route.canMatch;\n    if (!canMatch || canMatch.length === 0)\n        return of(true);\n    const canMatchObservables = canMatch.map((injectionToken) => {\n        const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n        const guardVal = isCanMatch(guard)\n            ? guard.canMatch(route, segments)\n            : runInInjectionContext(injector, () => guard(route, segments));\n        return wrapIntoObservable(guardVal);\n    });\n    return of(canMatchObservables).pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\n\nclass NoMatch {\n    segmentGroup;\n    constructor(segmentGroup) {\n        this.segmentGroup = segmentGroup || null;\n    }\n}\nclass AbsoluteRedirect extends Error {\n    urlTree;\n    constructor(urlTree) {\n        super();\n        this.urlTree = urlTree;\n    }\n}\nfunction noMatch$1(segmentGroup) {\n    return throwError(new NoMatch(segmentGroup));\n}\nfunction absoluteRedirect(newTree) {\n    return throwError(new AbsoluteRedirect(newTree));\n}\nfunction namedOutletsRedirect(redirectTo) {\n    return throwError(new ɵRuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n        `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`));\n}\nfunction canLoadFails(route) {\n    return throwError(navigationCancelingError((typeof ngDevMode === 'undefined' || ngDevMode) &&\n        `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`, NavigationCancellationCode.GuardRejected));\n}\nclass ApplyRedirects {\n    urlSerializer;\n    urlTree;\n    constructor(urlSerializer, urlTree) {\n        this.urlSerializer = urlSerializer;\n        this.urlTree = urlTree;\n    }\n    lineralizeSegments(route, urlTree) {\n        let res = [];\n        let 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    applyRedirectCommands(segments, redirectTo, posParams, currentSnapshot, injector) {\n        if (typeof redirectTo !== 'string') {\n            const redirectToFn = redirectTo;\n            const { queryParams, fragment, routeConfig, url, outlet, params, data, title } = currentSnapshot;\n            const newRedirect = runInInjectionContext(injector, () => redirectToFn({ params, data, queryParams, fragment, routeConfig, url, outlet, title }));\n            if (newRedirect instanceof UrlTree) {\n                throw new AbsoluteRedirect(newRedirect);\n            }\n            redirectTo = newRedirect;\n        }\n        const newTree = this.applyRedirectCreateUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n        if (redirectTo[0] === '/') {\n            throw new AbsoluteRedirect(newTree);\n        }\n        return newTree;\n    }\n    applyRedirectCreateUrlTree(redirectTo, urlTree, segments, posParams) {\n        const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n        return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);\n    }\n    createQueryParams(redirectToParams, actualParams) {\n        const res = {};\n        Object.entries(redirectToParams).forEach(([k, v]) => {\n            const copySourceValue = typeof v === 'string' && v[0] === ':';\n            if (copySourceValue) {\n                const sourceName = v.substring(1);\n                res[k] = actualParams[sourceName];\n            }\n            else {\n                res[k] = v;\n            }\n        });\n        return res;\n    }\n    createSegmentGroup(redirectTo, group, segments, posParams) {\n        const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n        let children = {};\n        Object.entries(group.children).forEach(([name, child]) => {\n            children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n        });\n        return new UrlSegmentGroup(updatedSegments, children);\n    }\n    createSegments(redirectTo, redirectToSegments, actualSegments, posParams) {\n        return redirectToSegments.map((s) => s.path[0] === ':'\n            ? this.findPosParam(redirectTo, s, posParams)\n            : this.findOrReturn(s, actualSegments));\n    }\n    findPosParam(redirectTo, redirectToUrlSegment, posParams) {\n        const pos = posParams[redirectToUrlSegment.path.substring(1)];\n        if (!pos)\n            throw new ɵRuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n        return pos;\n    }\n    findOrReturn(redirectToUrlSegment, actualSegments) {\n        let idx = 0;\n        for (const s of actualSegments) {\n            if (s.path === redirectToUrlSegment.path) {\n                actualSegments.splice(idx);\n                return s;\n            }\n            idx++;\n        }\n        return redirectToUrlSegment;\n    }\n}\n\nconst noMatch = {\n    matched: false,\n    consumedSegments: [],\n    remainingSegments: [],\n    parameters: {},\n    positionalParamSegments: {},\n};\nfunction matchWithChecks(segmentGroup, route, segments, injector, urlSerializer) {\n    const result = match(segmentGroup, route, segments);\n    if (!result.matched) {\n        return of(result);\n    }\n    // Only create the Route's `EnvironmentInjector` if it matches the attempted\n    // navigation\n    injector = getOrCreateRouteInjectorIfNeeded(route, injector);\n    return runCanMatchGuards(injector, route, segments, urlSerializer).pipe(map((v) => (v === true ? result : { ...noMatch })));\n}\nfunction match(segmentGroup, route, segments) {\n    if (route.path === '**') {\n        return createWildcardMatchResult(segments);\n    }\n    if (route.path === '') {\n        if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n            return { ...noMatch };\n        }\n        return {\n            matched: true,\n            consumedSegments: [],\n            remainingSegments: segments,\n            parameters: {},\n            positionalParamSegments: {},\n        };\n    }\n    const matcher = route.matcher || defaultUrlMatcher;\n    const res = matcher(segments, segmentGroup, route);\n    if (!res)\n        return { ...noMatch };\n    const posParams = {};\n    Object.entries(res.posParams ?? {}).forEach(([k, v]) => {\n        posParams[k] = v.path;\n    });\n    const parameters = res.consumed.length > 0\n        ? { ...posParams, ...res.consumed[res.consumed.length - 1].parameters }\n        : posParams;\n    return {\n        matched: true,\n        consumedSegments: res.consumed,\n        remainingSegments: segments.slice(res.consumed.length),\n        // TODO(atscott): investigate combining parameters and positionalParamSegments\n        parameters,\n        positionalParamSegments: res.posParams ?? {},\n    };\n}\nfunction createWildcardMatchResult(segments) {\n    return {\n        matched: true,\n        parameters: segments.length > 0 ? last(segments).parameters : {},\n        consumedSegments: segments,\n        remainingSegments: [],\n        positionalParamSegments: {},\n    };\n}\nfunction split(segmentGroup, consumedSegments, slicedSegments, config) {\n    if (slicedSegments.length > 0 &&\n        containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n        const s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n        return { segmentGroup: s, slicedSegments: [] };\n    }\n    if (slicedSegments.length === 0 &&\n        containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n        const s = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, slicedSegments, config, segmentGroup.children));\n        return { segmentGroup: s, slicedSegments };\n    }\n    const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n    return { segmentGroup: s, slicedSegments };\n}\nfunction addEmptyPathsToChildrenIfNeeded(segmentGroup, slicedSegments, routes, children) {\n    const res = {};\n    for (const r of routes) {\n        if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n            const s = new UrlSegmentGroup([], {});\n            res[getOutlet(r)] = s;\n        }\n    }\n    return { ...children, ...res };\n}\nfunction createChildrenForEmptyPaths(routes, primarySegment) {\n    const res = {};\n    res[PRIMARY_OUTLET] = primarySegment;\n    for (const r of routes) {\n        if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n            const s = new UrlSegmentGroup([], {});\n            res[getOutlet(r)] = s;\n        }\n    }\n    return res;\n}\nfunction containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {\n    return routes.some((r) => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\nfunction containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {\n    return routes.some((r) => 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 === '';\n}\nfunction noLeftoversInUrl(segmentGroup, segments, outlet) {\n    return segments.length === 0 && !segmentGroup.children[outlet];\n}\n\n/**\n * Class used to indicate there were no additional route config matches but that all segments of\n * the URL were consumed during matching so the route was URL matched. When this happens, we still\n * try to match child configs in case there are empty path children.\n */\nclass NoLeftoversInUrl {\n}\nfunction recognize$1(injector, configLoader, rootComponentType, config, urlTree, urlSerializer, paramsInheritanceStrategy = 'emptyOnly') {\n    return new Recognizer(injector, configLoader, rootComponentType, config, urlTree, paramsInheritanceStrategy, urlSerializer).recognize();\n}\nconst MAX_ALLOWED_REDIRECTS = 31;\nclass Recognizer {\n    injector;\n    configLoader;\n    rootComponentType;\n    config;\n    urlTree;\n    paramsInheritanceStrategy;\n    urlSerializer;\n    applyRedirects;\n    absoluteRedirectCount = 0;\n    allowRedirects = true;\n    constructor(injector, configLoader, rootComponentType, config, urlTree, paramsInheritanceStrategy, urlSerializer) {\n        this.injector = injector;\n        this.configLoader = configLoader;\n        this.rootComponentType = rootComponentType;\n        this.config = config;\n        this.urlTree = urlTree;\n        this.paramsInheritanceStrategy = paramsInheritanceStrategy;\n        this.urlSerializer = urlSerializer;\n        this.applyRedirects = new ApplyRedirects(this.urlSerializer, this.urlTree);\n    }\n    noMatchError(e) {\n        return new ɵRuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, typeof ngDevMode === 'undefined' || ngDevMode\n            ? `Cannot match any routes. URL Segment: '${e.segmentGroup}'`\n            : `'${e.segmentGroup}'`);\n    }\n    recognize() {\n        const rootSegmentGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n        return this.match(rootSegmentGroup).pipe(map(({ children, rootSnapshot }) => {\n            const rootNode = new TreeNode(rootSnapshot, children);\n            const routeState = new RouterStateSnapshot('', rootNode);\n            const tree = createUrlTreeFromSnapshot(rootSnapshot, [], this.urlTree.queryParams, this.urlTree.fragment);\n            // https://github.com/angular/angular/issues/47307\n            // Creating the tree stringifies the query params\n            // We don't want to do this here so reassign them to the original.\n            tree.queryParams = this.urlTree.queryParams;\n            routeState.url = this.urlSerializer.serialize(tree);\n            return { state: routeState, tree };\n        }));\n    }\n    match(rootSegmentGroup) {\n        // Use Object.freeze to prevent readers of the Router state from modifying it outside\n        // of a navigation, resulting in the router being out of sync with the browser.\n        const rootSnapshot = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze({ ...this.urlTree.queryParams }), this.urlTree.fragment, Object.freeze({}), PRIMARY_OUTLET, this.rootComponentType, null, {});\n        return this.processSegmentGroup(this.injector, this.config, rootSegmentGroup, PRIMARY_OUTLET, rootSnapshot).pipe(map((children) => {\n            return { children, rootSnapshot };\n        }), catchError((e) => {\n            if (e instanceof AbsoluteRedirect) {\n                this.urlTree = e.urlTree;\n                return this.match(e.urlTree.root);\n            }\n            if (e instanceof NoMatch) {\n                throw this.noMatchError(e);\n            }\n            throw e;\n        }));\n    }\n    processSegmentGroup(injector, config, segmentGroup, outlet, parentRoute) {\n        if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n            return this.processChildren(injector, config, segmentGroup, parentRoute);\n        }\n        return this.processSegment(injector, config, segmentGroup, segmentGroup.segments, outlet, true, parentRoute).pipe(map((child) => (child instanceof TreeNode ? [child] : [])));\n    }\n    /**\n     * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n     * we cannot find a match for _any_ of the children.\n     *\n     * @param config - The `Routes` to match against\n     * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n     *     config.\n     */\n    processChildren(injector, config, segmentGroup, parentRoute) {\n        // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n        // because an absolute redirect from the primary outlet takes precedence.\n        const childOutlets = [];\n        for (const child of Object.keys(segmentGroup.children)) {\n            if (child === 'primary') {\n                childOutlets.unshift(child);\n            }\n            else {\n                childOutlets.push(child);\n            }\n        }\n        return from(childOutlets).pipe(concatMap((childOutlet) => {\n            const child = segmentGroup.children[childOutlet];\n            // Sort the config so that routes with outlets that match the one being activated\n            // appear first, followed by routes for other outlets, which might match if they have\n            // an empty path.\n            const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n            return this.processSegmentGroup(injector, sortedConfig, child, childOutlet, parentRoute);\n        }), scan((children, outletChildren) => {\n            children.push(...outletChildren);\n            return children;\n        }), defaultIfEmpty(null), last$1(), mergeMap((children) => {\n            if (children === null)\n                return noMatch$1(segmentGroup);\n            // Because we may have matched two outlets to the same empty path segment, we can have\n            // multiple activated results for the same outlet. We should merge the children of\n            // these results so the final return value is only one `TreeNode` per outlet.\n            const mergedChildren = mergeEmptyPathMatches(children);\n            if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                // This should really never happen - we are only taking the first match for each\n                // outlet and merge the empty path matches.\n                checkOutletNameUniqueness(mergedChildren);\n            }\n            sortActivatedRouteSnapshots(mergedChildren);\n            return of(mergedChildren);\n        }));\n    }\n    processSegment(injector, routes, segmentGroup, segments, outlet, allowRedirects, parentRoute) {\n        return from(routes).pipe(concatMap((r) => {\n            return this.processSegmentAgainstRoute(r._injector ?? injector, routes, r, segmentGroup, segments, outlet, allowRedirects, parentRoute).pipe(catchError((e) => {\n                if (e instanceof NoMatch) {\n                    return of(null);\n                }\n                throw e;\n            }));\n        }), first((x) => !!x), catchError((e) => {\n            if (isEmptyError(e)) {\n                if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n                    return of(new NoLeftoversInUrl());\n                }\n                return noMatch$1(segmentGroup);\n            }\n            throw e;\n        }));\n    }\n    processSegmentAgainstRoute(injector, routes, route, rawSegment, segments, outlet, allowRedirects, parentRoute) {\n        // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n        // a config like\n        // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n        // or even\n        // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n        //\n        // The exception here is when the segment outlet is for the primary outlet. This would\n        // result in a match inside the named outlet because all children there are written as primary\n        // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n        // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n        // This should only match if the url is `/(x:b)`.\n        if (getOutlet(route) !== outlet &&\n            (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n            return noMatch$1(rawSegment);\n        }\n        if (route.redirectTo === undefined) {\n            return this.matchSegmentAgainstRoute(injector, rawSegment, route, segments, outlet, parentRoute);\n        }\n        if (this.allowRedirects && allowRedirects) {\n            return this.expandSegmentAgainstRouteUsingRedirect(injector, rawSegment, routes, route, segments, outlet, parentRoute);\n        }\n        return noMatch$1(rawSegment);\n    }\n    expandSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet, parentRoute) {\n        const { matched, parameters, consumedSegments, positionalParamSegments, remainingSegments } = match(segmentGroup, route, segments);\n        if (!matched)\n            return noMatch$1(segmentGroup);\n        // TODO(atscott): Move all of this under an if(ngDevMode) as a breaking change and allow stack\n        // size exceeded in production\n        if (typeof route.redirectTo === 'string' && route.redirectTo[0] === '/') {\n            this.absoluteRedirectCount++;\n            if (this.absoluteRedirectCount > MAX_ALLOWED_REDIRECTS) {\n                if (ngDevMode) {\n                    throw new ɵRuntimeError(4016 /* RuntimeErrorCode.INFINITE_REDIRECT */, `Detected possible infinite redirect when redirecting from '${this.urlTree}' to '${route.redirectTo}'.\\n` +\n                        `This is currently a dev mode only error but will become a` +\n                        ` call stack size exceeded error in production in a future major version.`);\n                }\n                this.allowRedirects = false;\n            }\n        }\n        const currentSnapshot = new ActivatedRouteSnapshot(segments, parameters, Object.freeze({ ...this.urlTree.queryParams }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getResolve(route));\n        const inherited = getInherited(currentSnapshot, parentRoute, this.paramsInheritanceStrategy);\n        currentSnapshot.params = Object.freeze(inherited.params);\n        currentSnapshot.data = Object.freeze(inherited.data);\n        const newTree = this.applyRedirects.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments, currentSnapshot, injector);\n        return this.applyRedirects.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments) => {\n            return this.processSegment(injector, routes, segmentGroup, newSegments.concat(remainingSegments), outlet, false, parentRoute);\n        }));\n    }\n    matchSegmentAgainstRoute(injector, rawSegment, route, segments, outlet, parentRoute) {\n        const matchResult = matchWithChecks(rawSegment, route, segments, injector, this.urlSerializer);\n        if (route.path === '**') {\n            // Prior versions of the route matching algorithm would stop matching at the wildcard route.\n            // We should investigate a better strategy for any existing children. Otherwise, these\n            // child segments are silently dropped from the navigation.\n            // https://github.com/angular/angular/issues/40089\n            rawSegment.children = {};\n        }\n        return matchResult.pipe(switchMap((result) => {\n            if (!result.matched) {\n                return noMatch$1(rawSegment);\n            }\n            // If the route has an injector created from providers, we should start using that.\n            injector = route._injector ?? injector;\n            return this.getChildConfig(injector, route, segments).pipe(switchMap(({ routes: childConfig }) => {\n                const childInjector = route._loadedInjector ?? injector;\n                const { parameters, consumedSegments, remainingSegments } = result;\n                const snapshot = new ActivatedRouteSnapshot(consumedSegments, parameters, Object.freeze({ ...this.urlTree.queryParams }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getResolve(route));\n                const inherited = getInherited(snapshot, parentRoute, this.paramsInheritanceStrategy);\n                snapshot.params = Object.freeze(inherited.params);\n                snapshot.data = Object.freeze(inherited.data);\n                const { segmentGroup, slicedSegments } = split(rawSegment, consumedSegments, remainingSegments, childConfig);\n                if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n                    return this.processChildren(childInjector, childConfig, segmentGroup, snapshot).pipe(map((children) => {\n                        return new TreeNode(snapshot, children);\n                    }));\n                }\n                if (childConfig.length === 0 && slicedSegments.length === 0) {\n                    return of(new TreeNode(snapshot, []));\n                }\n                const matchedOnOutlet = getOutlet(route) === outlet;\n                // If we matched a config due to empty path match on a different outlet, we need to\n                // continue passing the current outlet for the segment rather than switch to PRIMARY.\n                // Note that we switch to primary when we have a match because outlet configs look like\n                // this: {path: 'a', outlet: 'a', children: [\n                //  {path: 'b', component: B},\n                //  {path: 'c', component: C},\n                // ]}\n                // Notice that the children of the named outlet are configured with the primary outlet\n                return this.processSegment(childInjector, childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet, true, snapshot).pipe(map((child) => {\n                    return new TreeNode(snapshot, child instanceof TreeNode ? [child] : []);\n                }));\n            }));\n        }));\n    }\n    getChildConfig(injector, route, segments) {\n        if (route.children) {\n            // The children belong to the same module\n            return of({ routes: route.children, injector });\n        }\n        if (route.loadChildren) {\n            // lazy children belong to the loaded module\n            if (route._loadedRoutes !== undefined) {\n                return of({ routes: route._loadedRoutes, injector: route._loadedInjector });\n            }\n            return runCanLoadGuards(injector, route, segments, this.urlSerializer).pipe(mergeMap((shouldLoadResult) => {\n                if (shouldLoadResult) {\n                    return this.configLoader.loadChildren(injector, route).pipe(tap((cfg) => {\n                        route._loadedRoutes = cfg.routes;\n                        route._loadedInjector = cfg.injector;\n                    }));\n                }\n                return canLoadFails(route);\n            }));\n        }\n        return of({ routes: [], injector });\n    }\n}\nfunction sortActivatedRouteSnapshots(nodes) {\n    nodes.sort((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 hasEmptyPathConfig(node) {\n    const config = node.value.routeConfig;\n    return config && config.path === '';\n}\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with\n * the children from each duplicate. This is necessary because different outlets can match a\n * single empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes) {\n    const result = [];\n    // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n    const mergedNodes = new Set();\n    for (const node of nodes) {\n        if (!hasEmptyPathConfig(node)) {\n            result.push(node);\n            continue;\n        }\n        const duplicateEmptyPathNode = result.find((resultNode) => node.value.routeConfig === resultNode.value.routeConfig);\n        if (duplicateEmptyPathNode !== undefined) {\n            duplicateEmptyPathNode.children.push(...node.children);\n            mergedNodes.add(duplicateEmptyPathNode);\n        }\n        else {\n            result.push(node);\n        }\n    }\n    // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n    // by also merging those children. This is necessary when there are multiple empty path configs\n    // in a row. Put another way: whenever we combine children of two nodes, we need to also check\n    // if any of those children can be combined into a single node as well.\n    for (const mergedNode of mergedNodes) {\n        const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n        result.push(new TreeNode(mergedNode.value, mergedChildren));\n    }\n    return result.filter((n) => !mergedNodes.has(n));\n}\nfunction checkOutletNameUniqueness(nodes) {\n    const names = {};\n    nodes.forEach((n) => {\n        const routeWithSameOutletName = names[n.value.outlet];\n        if (routeWithSameOutletName) {\n            const p = routeWithSameOutletName.url.map((s) => s.toString()).join('/');\n            const c = n.value.url.map((s) => s.toString()).join('/');\n            throw new ɵRuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                `Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n        }\n        names[n.value.outlet] = n.value;\n    });\n}\nfunction getData(route) {\n    return route.data || {};\n}\nfunction getResolve(route) {\n    return route.resolve || {};\n}\n\nfunction recognize(injector, configLoader, rootComponentType, config, serializer, paramsInheritanceStrategy) {\n    return mergeMap((t) => recognize$1(injector, configLoader, rootComponentType, config, t.extractedUrl, serializer, paramsInheritanceStrategy).pipe(map(({ state: targetSnapshot, tree: urlAfterRedirects }) => {\n        return { ...t, targetSnapshot, urlAfterRedirects };\n    })));\n}\n\nfunction resolveData(paramsInheritanceStrategy, injector) {\n    return mergeMap((t) => {\n        const { targetSnapshot, guards: { canActivateChecks }, } = t;\n        if (!canActivateChecks.length) {\n            return of(t);\n        }\n        // Iterating a Set in javascript  happens in insertion order so it is safe to use a `Set` to\n        // preserve the correct order that the resolvers should run in.\n        // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#description\n        const routesWithResolversToRun = new Set(canActivateChecks.map((check) => check.route));\n        const routesNeedingDataUpdates = new Set();\n        for (const route of routesWithResolversToRun) {\n            if (routesNeedingDataUpdates.has(route)) {\n                continue;\n            }\n            // All children under the route with a resolver to run need to recompute inherited data.\n            for (const newRoute of flattenRouteTree(route)) {\n                routesNeedingDataUpdates.add(newRoute);\n            }\n        }\n        let routesProcessed = 0;\n        return from(routesNeedingDataUpdates).pipe(concatMap((route) => {\n            if (routesWithResolversToRun.has(route)) {\n                return runResolve(route, targetSnapshot, paramsInheritanceStrategy, injector);\n            }\n            else {\n                route.data = getInherited(route, route.parent, paramsInheritanceStrategy).resolve;\n                return of(void 0);\n            }\n        }), tap(() => routesProcessed++), takeLast(1), mergeMap((_) => (routesProcessed === routesNeedingDataUpdates.size ? of(t) : EMPTY)));\n    });\n}\n/**\n *  Returns the `ActivatedRouteSnapshot` tree as an array, using DFS to traverse the route tree.\n */\nfunction flattenRouteTree(route) {\n    const descendants = route.children.map((child) => flattenRouteTree(child)).flat();\n    return [route, ...descendants];\n}\nfunction runResolve(futureARS, futureRSS, paramsInheritanceStrategy, injector) {\n    const config = futureARS.routeConfig;\n    const resolve = futureARS._resolve;\n    if (config?.title !== undefined && !hasStaticTitle(config)) {\n        resolve[RouteTitleKey] = config.title;\n    }\n    return resolveNode(resolve, futureARS, futureRSS, injector).pipe(map((resolvedData) => {\n        futureARS._resolvedData = resolvedData;\n        futureARS.data = getInherited(futureARS, futureARS.parent, paramsInheritanceStrategy).resolve;\n        return null;\n    }));\n}\nfunction resolveNode(resolve, futureARS, futureRSS, injector) {\n    const keys = getDataKeys(resolve);\n    if (keys.length === 0) {\n        return of({});\n    }\n    const data = {};\n    return from(keys).pipe(mergeMap((key) => getResolver(resolve[key], futureARS, futureRSS, injector).pipe(first(), tap((value) => {\n        if (value instanceof RedirectCommand) {\n            throw redirectingNavigationError(new DefaultUrlSerializer(), value);\n        }\n        data[key] = value;\n    }))), takeLast(1), mapTo(data), catchError((e) => (isEmptyError(e) ? EMPTY : throwError(e))));\n}\nfunction getResolver(injectionToken, futureARS, futureRSS, injector) {\n    const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n    const resolver = getTokenOrFunctionIdentity(injectionToken, closestInjector);\n    const resolverValue = resolver.resolve\n        ? resolver.resolve(futureARS, futureRSS)\n        : runInInjectionContext(closestInjector, () => resolver(futureARS, futureRSS));\n    return wrapIntoObservable(resolverValue);\n}\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 switchMap((v) => {\n        const nextResult = next(v);\n        if (nextResult) {\n            return from(nextResult).pipe(map(() => v));\n        }\n        return of(v);\n    });\n}\n\n/**\n * Provides a strategy for setting the page title after a router navigation.\n *\n * The built-in implementation traverses the router state snapshot and finds the deepest primary\n * outlet with `title` property. Given the `Routes` below, navigating to\n * `/base/child(popup:aux)` would result in the document title being set to \"child\".\n * ```ts\n * [\n *   {path: 'base', title: 'base', children: [\n *     {path: 'child', title: 'child'},\n *   ],\n *   {path: 'aux', outlet: 'popup', title: 'popupTitle'}\n * ]\n * ```\n *\n * This class can be used as a base class for custom title strategies. That is, you can create your\n * own class that extends the `TitleStrategy`. Note that in the above example, the `title`\n * from the named outlet is never used. However, a custom strategy might be implemented to\n * incorporate titles in named outlets.\n *\n * @publicApi\n * @see [Page title guide](guide/routing/common-router-tasks#setting-the-page-title)\n */\nclass TitleStrategy {\n    /**\n     * @returns The `title` of the deepest primary route.\n     */\n    buildTitle(snapshot) {\n        let pageTitle;\n        let route = snapshot.root;\n        while (route !== undefined) {\n            pageTitle = this.getResolvedTitleForRoute(route) ?? pageTitle;\n            route = route.children.find((child) => child.outlet === PRIMARY_OUTLET);\n        }\n        return pageTitle;\n    }\n    /**\n     * Given an `ActivatedRouteSnapshot`, returns the final value of the\n     * `Route.title` property, which can either be a static string or a resolved value.\n     */\n    getResolvedTitleForRoute(snapshot) {\n        return snapshot.data[RouteTitleKey];\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: TitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: TitleStrategy, providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: TitleStrategy, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root', useFactory: () => inject(DefaultTitleStrategy) }]\n        }] });\n/**\n * The default `TitleStrategy` used by the router that updates the title using the `Title` service.\n */\nclass DefaultTitleStrategy extends TitleStrategy {\n    title;\n    constructor(title) {\n        super();\n        this.title = title;\n    }\n    /**\n     * Sets the title of the browser to the given value.\n     *\n     * @param title The `pageTitle` from the deepest primary route.\n     */\n    updateTitle(snapshot) {\n        const title = this.buildTitle(snapshot);\n        if (title !== undefined) {\n            this.title.setTitle(title);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DefaultTitleStrategy, deps: [{ token: i1.Title }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DefaultTitleStrategy, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DefaultTitleStrategy, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [{ type: i1.Title }] });\n\n/**\n * A DI token for the router service.\n *\n * @publicApi\n */\nconst ROUTER_CONFIGURATION = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'router config' : '', {\n    providedIn: 'root',\n    factory: () => ({}),\n});\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 */\nclass ɵEmptyOutletComponent {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ɵEmptyOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.5\", type: ɵEmptyOutletComponent, isStandalone: true, selector: \"ng-component\", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, dependencies: [{ kind: \"directive\", type: RouterOutlet, selector: \"router-outlet\", inputs: [\"name\", \"routerOutletData\"], outputs: [\"activate\", \"deactivate\", \"attach\", \"detach\"], exportAs: [\"outlet\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ɵEmptyOutletComponent, decorators: [{\n            type: Component,\n            args: [{\n                    template: `<router-outlet></router-outlet>`,\n                    imports: [RouterOutlet],\n                }]\n        }] });\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nfunction standardizeConfig(r) {\n    const children = r.children && r.children.map(standardizeConfig);\n    const c = children ? { ...r, children } : { ...r };\n    if (!c.component &&\n        !c.loadComponent &&\n        (children || c.loadChildren) &&\n        c.outlet &&\n        c.outlet !== PRIMARY_OUTLET) {\n        c.component = ɵEmptyOutletComponent;\n    }\n    return c;\n}\n\n/**\n * The DI token for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `provideRouter`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nconst ROUTES = new InjectionToken(ngDevMode ? 'ROUTES' : '');\nclass RouterConfigLoader {\n    componentLoaders = new WeakMap();\n    childrenLoaders = new WeakMap();\n    onLoadStartListener;\n    onLoadEndListener;\n    compiler = inject(Compiler);\n    loadComponent(route) {\n        if (this.componentLoaders.get(route)) {\n            return this.componentLoaders.get(route);\n        }\n        else if (route._loadedComponent) {\n            return of(route._loadedComponent);\n        }\n        if (this.onLoadStartListener) {\n            this.onLoadStartListener(route);\n        }\n        const loadRunner = wrapIntoObservable(route.loadComponent()).pipe(map(maybeUnwrapDefaultExport), tap((component) => {\n            if (this.onLoadEndListener) {\n                this.onLoadEndListener(route);\n            }\n            (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                assertStandalone(route.path ?? '', component);\n            route._loadedComponent = component;\n        }), finalize(() => {\n            this.componentLoaders.delete(route);\n        }));\n        // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n        const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());\n        this.componentLoaders.set(route, loader);\n        return loader;\n    }\n    loadChildren(parentInjector, route) {\n        if (this.childrenLoaders.get(route)) {\n            return this.childrenLoaders.get(route);\n        }\n        else if (route._loadedRoutes) {\n            return of({ routes: route._loadedRoutes, injector: route._loadedInjector });\n        }\n        if (this.onLoadStartListener) {\n            this.onLoadStartListener(route);\n        }\n        const moduleFactoryOrRoutes$ = loadChildren(route, this.compiler, parentInjector, this.onLoadEndListener);\n        const loadRunner = moduleFactoryOrRoutes$.pipe(finalize(() => {\n            this.childrenLoaders.delete(route);\n        }));\n        // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n        const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());\n        this.childrenLoaders.set(route, loader);\n        return loader;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterConfigLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterConfigLoader, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterConfigLoader, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n/**\n * Executes a `route.loadChildren` callback and converts the result to an array of child routes and\n * an injector if that callback returned a module.\n *\n * This function is used for the route discovery during prerendering\n * in @angular-devkit/build-angular. If there are any updates to the contract here, it will require\n * an update to the extractor.\n */\nfunction loadChildren(route, compiler, parentInjector, onLoadEndListener) {\n    return wrapIntoObservable(route.loadChildren()).pipe(map(maybeUnwrapDefaultExport), mergeMap((t) => {\n        if (t instanceof NgModuleFactory || Array.isArray(t)) {\n            return of(t);\n        }\n        else {\n            return from(compiler.compileModuleAsync(t));\n        }\n    }), map((factoryOrRoutes) => {\n        if (onLoadEndListener) {\n            onLoadEndListener(route);\n        }\n        // This injector comes from the `NgModuleRef` when lazy loading an `NgModule`. There is\n        // no injector associated with lazy loading a `Route` array.\n        let injector;\n        let rawRoutes;\n        let requireStandaloneComponents = false;\n        if (Array.isArray(factoryOrRoutes)) {\n            rawRoutes = factoryOrRoutes;\n            requireStandaloneComponents = true;\n        }\n        else {\n            injector = factoryOrRoutes.create(parentInjector).injector;\n            // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n            // will get stuck in an infinite loop. The child module's Injector will look to\n            // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n            // for it's parent module instead.\n            rawRoutes = injector.get(ROUTES, [], { optional: true, self: true }).flat();\n        }\n        const routes = rawRoutes.map(standardizeConfig);\n        (typeof ngDevMode === 'undefined' || ngDevMode) &&\n            validateConfig(routes, route.path, requireStandaloneComponents);\n        return { routes, injector };\n    }));\n}\nfunction isWrappedDefaultExport(value) {\n    // We use `in` here with a string key `'default'`, because we expect `DefaultExport` objects to be\n    // dynamically imported ES modules with a spec-mandated `default` key. Thus we don't expect that\n    // `default` will be a renamed property.\n    return value && typeof value === 'object' && 'default' in value;\n}\nfunction maybeUnwrapDefaultExport(input) {\n    // As per `isWrappedDefaultExport`, the `default` key here is generated by the browser and not\n    // subject to property renaming, so we reference it with bracket access.\n    return isWrappedDefaultExport(input) ? input['default'] : input;\n}\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nclass UrlHandlingStrategy {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: UrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: UrlHandlingStrategy, providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: UrlHandlingStrategy, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root', useFactory: () => inject(DefaultUrlHandlingStrategy) }]\n        }] });\n/**\n * @publicApi\n */\nclass DefaultUrlHandlingStrategy {\n    shouldProcessUrl(url) {\n        return true;\n    }\n    extract(url) {\n        return url;\n    }\n    merge(newUrlPart, wholeUrl) {\n        return newUrlPart;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DefaultUrlHandlingStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DefaultUrlHandlingStrategy, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DefaultUrlHandlingStrategy, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n\n/// <reference types=\"dom-view-transitions\" />\nconst CREATE_VIEW_TRANSITION = new InjectionToken(ngDevMode ? 'view transition helper' : '');\nconst VIEW_TRANSITION_OPTIONS = new InjectionToken(ngDevMode ? 'view transition options' : '');\n/**\n * A helper function for using browser view transitions. This function skips the call to\n * `startViewTransition` if the browser does not support it.\n *\n * @returns A Promise that resolves when the view transition callback begins.\n */\nfunction createViewTransition(injector, from, to) {\n    const transitionOptions = injector.get(VIEW_TRANSITION_OPTIONS);\n    const document = injector.get(DOCUMENT);\n    // Create promises outside the Angular zone to avoid causing extra change detections\n    return injector.get(NgZone).runOutsideAngular(() => {\n        if (!document.startViewTransition || transitionOptions.skipNextTransition) {\n            transitionOptions.skipNextTransition = false;\n            // The timing of `startViewTransition` is closer to a macrotask. It won't be called\n            // until the current event loop exits so we use a promise resolved in a timeout instead\n            // of Promise.resolve().\n            return new Promise((resolve) => setTimeout(resolve));\n        }\n        let resolveViewTransitionStarted;\n        const viewTransitionStarted = new Promise((resolve) => {\n            resolveViewTransitionStarted = resolve;\n        });\n        const transition = document.startViewTransition(() => {\n            resolveViewTransitionStarted();\n            // We don't actually update dom within the transition callback. The resolving of the above\n            // promise unblocks the Router navigation, which synchronously activates and deactivates\n            // routes (the DOM update). This view transition waits for the next change detection to\n            // complete (below), which includes the update phase of the routed components.\n            return createRenderPromise(injector);\n        });\n        const { onViewTransitionCreated } = transitionOptions;\n        if (onViewTransitionCreated) {\n            runInInjectionContext(injector, () => onViewTransitionCreated({ transition, from, to }));\n        }\n        return viewTransitionStarted;\n    });\n}\n/**\n * Creates a promise that resolves after next render.\n */\nfunction createRenderPromise(injector) {\n    return new Promise((resolve) => {\n        // Wait for the microtask queue to empty after the next render happens (by waiting a macrotask).\n        // This ensures any follow-up renders in the microtask queue are completed before the\n        // view transition starts animating.\n        afterNextRender({ read: () => setTimeout(resolve) }, { injector });\n    });\n}\n\nconst NAVIGATION_ERROR_HANDLER = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'navigation error handler' : '');\nclass NavigationTransitions {\n    currentNavigation = null;\n    currentTransition = null;\n    lastSuccessfulNavigation = null;\n    /**\n     * These events are used to communicate back to the Router about the state of the transition. The\n     * Router wants to respond to these events in various ways. Because the `NavigationTransition`\n     * class is not public, this event subject is not publicly exposed.\n     */\n    events = new Subject();\n    /**\n     * Used to abort the current transition with an error.\n     */\n    transitionAbortSubject = new Subject();\n    configLoader = inject(RouterConfigLoader);\n    environmentInjector = inject(EnvironmentInjector);\n    urlSerializer = inject(UrlSerializer);\n    rootContexts = inject(ChildrenOutletContexts);\n    location = inject(Location);\n    inputBindingEnabled = inject(INPUT_BINDER, { optional: true }) !== null;\n    titleStrategy = inject(TitleStrategy);\n    options = inject(ROUTER_CONFIGURATION, { optional: true }) || {};\n    paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';\n    urlHandlingStrategy = inject(UrlHandlingStrategy);\n    createViewTransition = inject(CREATE_VIEW_TRANSITION, { optional: true });\n    navigationErrorHandler = inject(NAVIGATION_ERROR_HANDLER, { optional: true });\n    navigationId = 0;\n    get hasRequestedNavigation() {\n        return this.navigationId !== 0;\n    }\n    transitions;\n    /**\n     * Hook that enables you to pause navigation after the preactivation phase.\n     * Used by `RouterModule`.\n     *\n     * @internal\n     */\n    afterPreactivation = () => of(void 0);\n    /** @internal */\n    rootComponentType = null;\n    constructor() {\n        const onLoadStart = (r) => this.events.next(new RouteConfigLoadStart(r));\n        const onLoadEnd = (r) => this.events.next(new RouteConfigLoadEnd(r));\n        this.configLoader.onLoadEndListener = onLoadEnd;\n        this.configLoader.onLoadStartListener = onLoadStart;\n    }\n    complete() {\n        this.transitions?.complete();\n    }\n    handleNavigationRequest(request) {\n        const id = ++this.navigationId;\n        this.transitions?.next({ ...this.transitions.value, ...request, id });\n    }\n    setupNavigations(router, initialUrlTree, initialRouterState) {\n        this.transitions = new BehaviorSubject({\n            id: 0,\n            currentUrlTree: initialUrlTree,\n            currentRawUrl: initialUrlTree,\n            extractedUrl: this.urlHandlingStrategy.extract(initialUrlTree),\n            urlAfterRedirects: this.urlHandlingStrategy.extract(initialUrlTree),\n            rawUrl: initialUrlTree,\n            extras: {},\n            resolve: () => { },\n            reject: () => { },\n            promise: Promise.resolve(true),\n            source: IMPERATIVE_NAVIGATION,\n            restoredState: null,\n            currentSnapshot: initialRouterState.snapshot,\n            targetSnapshot: null,\n            currentRouterState: initialRouterState,\n            targetRouterState: null,\n            guards: { canActivateChecks: [], canDeactivateChecks: [] },\n            guardsResult: null,\n        });\n        return this.transitions.pipe(filter((t) => t.id !== 0), \n        // Extract URL\n        map((t) => ({\n            ...t,\n            extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl),\n        })), \n        // Using switchMap so we cancel executing navigations when a new one comes in\n        switchMap((overallTransitionState) => {\n            let completed = false;\n            let errored = false;\n            return of(overallTransitionState).pipe(switchMap((t) => {\n                // It is possible that `switchMap` fails to cancel previous navigations if a new one happens synchronously while the operator\n                // is processing the `next` notification of that previous navigation. This can happen when a new navigation (say 2) cancels a\n                // previous one (1) and yet another navigation (3) happens synchronously in response to the `NavigationCancel` event for (1).\n                // https://github.com/ReactiveX/rxjs/issues/7455\n                if (this.navigationId > overallTransitionState.id) {\n                    const cancellationReason = typeof ngDevMode === 'undefined' || ngDevMode\n                        ? `Navigation ID ${overallTransitionState.id} is not equal to the current navigation id ${this.navigationId}`\n                        : '';\n                    this.cancelNavigationTransition(overallTransitionState, cancellationReason, NavigationCancellationCode.SupersededByNewNavigation);\n                    return EMPTY;\n                }\n                this.currentTransition = overallTransitionState;\n                // Store the Navigation object\n                this.currentNavigation = {\n                    id: t.id,\n                    initialUrl: t.rawUrl,\n                    extractedUrl: t.extractedUrl,\n                    targetBrowserUrl: typeof t.extras.browserUrl === 'string'\n                        ? this.urlSerializer.parse(t.extras.browserUrl)\n                        : t.extras.browserUrl,\n                    trigger: t.source,\n                    extras: t.extras,\n                    previousNavigation: !this.lastSuccessfulNavigation\n                        ? null\n                        : {\n                            ...this.lastSuccessfulNavigation,\n                            previousNavigation: null,\n                        },\n                };\n                const urlTransition = !router.navigated || this.isUpdatingInternalState() || this.isUpdatedBrowserUrl();\n                const onSameUrlNavigation = t.extras.onSameUrlNavigation ?? router.onSameUrlNavigation;\n                if (!urlTransition && onSameUrlNavigation !== 'reload') {\n                    const reason = typeof ngDevMode === 'undefined' || ngDevMode\n                        ? `Navigation to ${t.rawUrl} was ignored because it is the same as the current Router URL.`\n                        : '';\n                    this.events.next(new NavigationSkipped(t.id, this.urlSerializer.serialize(t.rawUrl), reason, NavigationSkippedCode.IgnoredSameUrlNavigation));\n                    t.resolve(false);\n                    return EMPTY;\n                }\n                if (this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl)) {\n                    return of(t).pipe(\n                    // Fire NavigationStart event\n                    switchMap((t) => {\n                        const transition = this.transitions?.getValue();\n                        this.events.next(new NavigationStart(t.id, this.urlSerializer.serialize(t.extractedUrl), t.source, t.restoredState));\n                        if (transition !== this.transitions?.getValue()) {\n                            return EMPTY;\n                        }\n                        // This delay is required to match old behavior that forced\n                        // navigation to always be async\n                        return Promise.resolve(t);\n                    }), \n                    // Recognize\n                    recognize(this.environmentInjector, this.configLoader, this.rootComponentType, router.config, this.urlSerializer, this.paramsInheritanceStrategy), \n                    // Update URL if in `eager` update mode\n                    tap((t) => {\n                        overallTransitionState.targetSnapshot = t.targetSnapshot;\n                        overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;\n                        this.currentNavigation = {\n                            ...this.currentNavigation,\n                            finalUrl: t.urlAfterRedirects,\n                        };\n                        // Fire RoutesRecognized\n                        const routesRecognized = new RoutesRecognized(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n                        this.events.next(routesRecognized);\n                    }));\n                }\n                else if (urlTransition &&\n                    this.urlHandlingStrategy.shouldProcessUrl(t.currentRawUrl)) {\n                    /* When the current URL shouldn't be processed, but the previous one\n                     * was, we handle this \"error condition\" by navigating to the\n                     * previously successful URL, but leaving the URL intact.*/\n                    const { id, extractedUrl, source, restoredState, extras } = t;\n                    const navStart = new NavigationStart(id, this.urlSerializer.serialize(extractedUrl), source, restoredState);\n                    this.events.next(navStart);\n                    const targetSnapshot = createEmptyState(this.rootComponentType).snapshot;\n                    this.currentTransition = overallTransitionState = {\n                        ...t,\n                        targetSnapshot,\n                        urlAfterRedirects: extractedUrl,\n                        extras: { ...extras, skipLocationChange: false, replaceUrl: false },\n                    };\n                    this.currentNavigation.finalUrl = extractedUrl;\n                    return of(overallTransitionState);\n                }\n                else {\n                    /* When neither the current or previous URL can be processed, do\n                     * nothing other than update router's internal reference to the\n                     * current \"settled\" URL. This way the next navigation will be coming\n                     * from the current URL in the browser.\n                     */\n                    const reason = typeof ngDevMode === 'undefined' || ngDevMode\n                        ? `Navigation was ignored because the UrlHandlingStrategy` +\n                            ` indicated neither the current URL ${t.currentRawUrl} nor target URL ${t.rawUrl} should be processed.`\n                        : '';\n                    this.events.next(new NavigationSkipped(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, NavigationSkippedCode.IgnoredByUrlHandlingStrategy));\n                    t.resolve(false);\n                    return EMPTY;\n                }\n            }), \n            // --- GUARDS ---\n            tap((t) => {\n                const guardsStart = new GuardsCheckStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n                this.events.next(guardsStart);\n            }), map((t) => {\n                this.currentTransition = overallTransitionState = {\n                    ...t,\n                    guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts),\n                };\n                return overallTransitionState;\n            }), checkGuards(this.environmentInjector, (evt) => this.events.next(evt)), tap((t) => {\n                overallTransitionState.guardsResult = t.guardsResult;\n                if (t.guardsResult && typeof t.guardsResult !== 'boolean') {\n                    throw redirectingNavigationError(this.urlSerializer, t.guardsResult);\n                }\n                const guardsEnd = new GuardsCheckEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);\n                this.events.next(guardsEnd);\n            }), filter((t) => {\n                if (!t.guardsResult) {\n                    this.cancelNavigationTransition(t, '', NavigationCancellationCode.GuardRejected);\n                    return false;\n                }\n                return true;\n            }), \n            // --- RESOLVE ---\n            switchTap((t) => {\n                if (t.guards.canActivateChecks.length) {\n                    return of(t).pipe(tap((t) => {\n                        const resolveStart = new ResolveStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n                        this.events.next(resolveStart);\n                    }), switchMap((t) => {\n                        let dataResolved = false;\n                        return of(t).pipe(resolveData(this.paramsInheritanceStrategy, this.environmentInjector), tap({\n                            next: () => (dataResolved = true),\n                            complete: () => {\n                                if (!dataResolved) {\n                                    this.cancelNavigationTransition(t, typeof ngDevMode === 'undefined' || ngDevMode\n                                        ? `At least one route resolver didn't emit any value.`\n                                        : '', NavigationCancellationCode.NoDataFromResolver);\n                                }\n                            },\n                        }));\n                    }), tap((t) => {\n                        const resolveEnd = new ResolveEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n                        this.events.next(resolveEnd);\n                    }));\n                }\n                return undefined;\n            }), \n            // --- LOAD COMPONENTS ---\n            switchTap((t) => {\n                const loadComponents = (route) => {\n                    const loaders = [];\n                    if (route.routeConfig?.loadComponent && !route.routeConfig._loadedComponent) {\n                        loaders.push(this.configLoader.loadComponent(route.routeConfig).pipe(tap((loadedComponent) => {\n                            route.component = loadedComponent;\n                        }), map(() => void 0)));\n                    }\n                    for (const child of route.children) {\n                        loaders.push(...loadComponents(child));\n                    }\n                    return loaders;\n                };\n                return combineLatest(loadComponents(t.targetSnapshot.root)).pipe(defaultIfEmpty(null), take(1));\n            }), switchTap(() => this.afterPreactivation()), switchMap(() => {\n                const { currentSnapshot, targetSnapshot } = overallTransitionState;\n                const viewTransitionStarted = this.createViewTransition?.(this.environmentInjector, currentSnapshot.root, targetSnapshot.root);\n                // If view transitions are enabled, block the navigation until the view\n                // transition callback starts. Otherwise, continue immediately.\n                return viewTransitionStarted\n                    ? from(viewTransitionStarted).pipe(map(() => overallTransitionState))\n                    : of(overallTransitionState);\n            }), map((t) => {\n                const targetRouterState = createRouterState(router.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);\n                this.currentTransition = overallTransitionState = { ...t, targetRouterState };\n                this.currentNavigation.targetRouterState = targetRouterState;\n                return overallTransitionState;\n            }), tap(() => {\n                this.events.next(new BeforeActivateRoutes());\n            }), activateRoutes(this.rootContexts, router.routeReuseStrategy, (evt) => this.events.next(evt), this.inputBindingEnabled), \n            // Ensure that if some observable used to drive the transition doesn't\n            // complete, the navigation still finalizes This should never happen, but\n            // this is done as a safety measure to avoid surfacing this error (#49567).\n            take(1), tap({\n                next: (t) => {\n                    completed = true;\n                    this.lastSuccessfulNavigation = this.currentNavigation;\n                    this.events.next(new NavigationEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects)));\n                    this.titleStrategy?.updateTitle(t.targetRouterState.snapshot);\n                    t.resolve(true);\n                },\n                complete: () => {\n                    completed = true;\n                },\n            }), \n            // There used to be a lot more logic happening directly within the\n            // transition Observable. Some of this logic has been refactored out to\n            // other places but there may still be errors that happen there. This gives\n            // us a way to cancel the transition from the outside. This may also be\n            // required in the future to support something like the abort signal of the\n            // Navigation API where the navigation gets aborted from outside the\n            // transition.\n            takeUntil(this.transitionAbortSubject.pipe(tap((err) => {\n                throw err;\n            }))), finalize(() => {\n                /* When the navigation stream finishes either through error or success,\n                 * we set the `completed` or `errored` flag. However, there are some\n                 * situations where we could get here without either of those being set.\n                 * For instance, a redirect during NavigationStart. Therefore, this is a\n                 * catch-all to make sure the NavigationCancel event is fired when a\n                 * navigation gets cancelled but not caught by other means. */\n                if (!completed && !errored) {\n                    const cancelationReason = typeof ngDevMode === 'undefined' || ngDevMode\n                        ? `Navigation ID ${overallTransitionState.id} is not equal to the current navigation id ${this.navigationId}`\n                        : '';\n                    this.cancelNavigationTransition(overallTransitionState, cancelationReason, NavigationCancellationCode.SupersededByNewNavigation);\n                }\n                // Only clear current navigation if it is still set to the one that\n                // finalized.\n                if (this.currentTransition?.id === overallTransitionState.id) {\n                    this.currentNavigation = null;\n                    this.currentTransition = null;\n                }\n            }), catchError((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                    this.events.next(new NavigationCancel(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e.message, e.cancellationCode));\n                    // When redirecting, we need to delay resolving the navigation\n                    // promise and push it to the redirect navigation\n                    if (!isRedirectingNavigationCancelingError(e)) {\n                        overallTransitionState.resolve(false);\n                    }\n                    else {\n                        this.events.next(new RedirectRequest(e.url, e.navigationBehaviorOptions));\n                    }\n                    /* All other errors should reset to the router's internal URL reference\n                     * to the pre-error state. */\n                }\n                else {\n                    const navigationError = new NavigationError(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);\n                    try {\n                        const navigationErrorHandlerResult = runInInjectionContext(this.environmentInjector, () => this.navigationErrorHandler?.(navigationError));\n                        if (navigationErrorHandlerResult instanceof RedirectCommand) {\n                            const { message, cancellationCode } = redirectingNavigationError(this.urlSerializer, navigationErrorHandlerResult);\n                            this.events.next(new NavigationCancel(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), message, cancellationCode));\n                            this.events.next(new RedirectRequest(navigationErrorHandlerResult.redirectTo, navigationErrorHandlerResult.navigationBehaviorOptions));\n                        }\n                        else {\n                            this.events.next(navigationError);\n                            throw e;\n                        }\n                    }\n                    catch (ee) {\n                        // TODO(atscott): consider flipping the default behavior of\n                        // resolveNavigationPromiseOnError to be `resolve(false)` when\n                        // undefined. This is the most sane thing to do given that\n                        // applications very rarely handle the promise rejection and, as a\n                        // result, would get \"unhandled promise rejection\" console logs.\n                        // The vast majority of applications would not be affected by this\n                        // change so omitting a migration seems reasonable. Instead,\n                        // applications that rely on rejection can specifically opt-in to the\n                        // old behavior.\n                        if (this.options.resolveNavigationPromiseOnError) {\n                            overallTransitionState.resolve(false);\n                        }\n                        else {\n                            overallTransitionState.reject(ee);\n                        }\n                    }\n                }\n                return EMPTY;\n            }));\n            // casting because `pipe` returns observable({}) when called with 8+ arguments\n        }));\n    }\n    cancelNavigationTransition(t, reason, code) {\n        const navCancel = new NavigationCancel(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, code);\n        this.events.next(navCancel);\n        t.resolve(false);\n    }\n    /**\n     * @returns Whether we're navigating to somewhere that is not what the Router is\n     * currently set to.\n     */\n    isUpdatingInternalState() {\n        // TODO(atscott): The serializer should likely be used instead of\n        // `UrlTree.toString()`. Custom serializers are often written to handle\n        // things better than the default one (objects, for example will be\n        // [Object object] with the custom serializer and be \"the same\" when they\n        // aren't).\n        // (Same for isUpdatedBrowserUrl)\n        return (this.currentTransition?.extractedUrl.toString() !==\n            this.currentTransition?.currentUrlTree.toString());\n    }\n    /**\n     * @returns Whether we're updating the browser URL to something new (navigation is going\n     * to somewhere not displayed in the URL bar and we will update the URL\n     * bar if navigation succeeds).\n     */\n    isUpdatedBrowserUrl() {\n        // The extracted URL is the part of the URL that this application cares about. `extract` may\n        // return only part of the browser URL and that part may have not changed even if some other\n        // portion of the URL did.\n        const currentBrowserUrl = this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(true)));\n        const targetBrowserUrl = this.currentNavigation?.targetBrowserUrl ?? this.currentNavigation?.extractedUrl;\n        return (currentBrowserUrl.toString() !== targetBrowserUrl?.toString() &&\n            !this.currentNavigation?.extras.skipLocationChange);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NavigationTransitions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NavigationTransitions, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NavigationTransitions, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\nfunction isBrowserTriggeredNavigation(source) {\n    return source !== IMPERATIVE_NAVIGATION;\n}\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nclass RouteReuseStrategy {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouteReuseStrategy, providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouteReuseStrategy, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root', useFactory: () => inject(DefaultRouteReuseStrategy) }]\n        }] });\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the route parameters, query parameters or fragment change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nclass BaseRouteReuseStrategy {\n    /**\n     * Whether the given route should detach for later reuse.\n     * Always returns false for `BaseRouteReuseStrategy`.\n     * */\n    shouldDetach(route) {\n        return false;\n    }\n    /**\n     * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n     */\n    store(route, detachedTree) { }\n    /** Returns `false`, meaning the route (and its subtree) is never reattached */\n    shouldAttach(route) {\n        return false;\n    }\n    /** Returns `null` because this strategy does not store routes for later re-use. */\n    retrieve(route) {\n        return null;\n    }\n    /**\n     * Determines if a route should be reused.\n     * This strategy returns `true` when the future route config and current route config are\n     * identical.\n     */\n    shouldReuseRoute(future, curr) {\n        return future.routeConfig === curr.routeConfig;\n    }\n}\nclass DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DefaultRouteReuseStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DefaultRouteReuseStrategy, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DefaultRouteReuseStrategy, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n\nclass StateManager {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: StateManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: StateManager, providedIn: 'root', useFactory: () => inject(HistoryStateManager) });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: StateManager, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root', useFactory: () => inject(HistoryStateManager) }]\n        }] });\nclass HistoryStateManager extends StateManager {\n    location = inject(Location);\n    urlSerializer = inject(UrlSerializer);\n    options = inject(ROUTER_CONFIGURATION, { optional: true }) || {};\n    canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';\n    urlHandlingStrategy = inject(UrlHandlingStrategy);\n    urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';\n    currentUrlTree = new UrlTree();\n    getCurrentUrlTree() {\n        return this.currentUrlTree;\n    }\n    rawUrlTree = this.currentUrlTree;\n    getRawUrlTree() {\n        return this.rawUrlTree;\n    }\n    /**\n     * The id of the currently active page in the router.\n     * Updated to the transition's target id on a successful navigation.\n     *\n     * This is used to track what page the router last activated. When an attempted navigation fails,\n     * the router can then use this to compute how to restore the state back to the previously active\n     * page.\n     */\n    currentPageId = 0;\n    lastSuccessfulId = -1;\n    restoredState() {\n        return this.location.getState();\n    }\n    /**\n     * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n     * important for computing the target page id for new navigations because we need to ensure each\n     * page id in the browser history is 1 more than the previous entry.\n     */\n    get browserPageId() {\n        if (this.canceledNavigationResolution !== 'computed') {\n            return this.currentPageId;\n        }\n        return this.restoredState()?.ɵrouterPageId ?? this.currentPageId;\n    }\n    routerState = createEmptyState(null);\n    getRouterState() {\n        return this.routerState;\n    }\n    stateMemento = this.createStateMemento();\n    createStateMemento() {\n        return {\n            rawUrlTree: this.rawUrlTree,\n            currentUrlTree: this.currentUrlTree,\n            routerState: this.routerState,\n        };\n    }\n    registerNonRouterCurrentEntryChangeListener(listener) {\n        return this.location.subscribe((event) => {\n            if (event['type'] === 'popstate') {\n                listener(event['url'], event.state);\n            }\n        });\n    }\n    handleRouterEvent(e, currentTransition) {\n        if (e instanceof NavigationStart) {\n            this.stateMemento = this.createStateMemento();\n        }\n        else if (e instanceof NavigationSkipped) {\n            this.rawUrlTree = currentTransition.initialUrl;\n        }\n        else if (e instanceof RoutesRecognized) {\n            if (this.urlUpdateStrategy === 'eager') {\n                if (!currentTransition.extras.skipLocationChange) {\n                    const rawUrl = this.urlHandlingStrategy.merge(currentTransition.finalUrl, currentTransition.initialUrl);\n                    this.setBrowserUrl(currentTransition.targetBrowserUrl ?? rawUrl, currentTransition);\n                }\n            }\n        }\n        else if (e instanceof BeforeActivateRoutes) {\n            this.currentUrlTree = currentTransition.finalUrl;\n            this.rawUrlTree = this.urlHandlingStrategy.merge(currentTransition.finalUrl, currentTransition.initialUrl);\n            this.routerState = currentTransition.targetRouterState;\n            if (this.urlUpdateStrategy === 'deferred' && !currentTransition.extras.skipLocationChange) {\n                this.setBrowserUrl(currentTransition.targetBrowserUrl ?? this.rawUrlTree, currentTransition);\n            }\n        }\n        else if (e instanceof NavigationCancel &&\n            (e.code === NavigationCancellationCode.GuardRejected ||\n                e.code === NavigationCancellationCode.NoDataFromResolver)) {\n            this.restoreHistory(currentTransition);\n        }\n        else if (e instanceof NavigationError) {\n            this.restoreHistory(currentTransition, true);\n        }\n        else if (e instanceof NavigationEnd) {\n            this.lastSuccessfulId = e.id;\n            this.currentPageId = this.browserPageId;\n        }\n    }\n    setBrowserUrl(url, transition) {\n        const path = url instanceof UrlTree ? this.urlSerializer.serialize(url) : url;\n        if (this.location.isCurrentPathEqualTo(path) || !!transition.extras.replaceUrl) {\n            // replacements do not update the target page\n            const currentBrowserPageId = this.browserPageId;\n            const state = {\n                ...transition.extras.state,\n                ...this.generateNgRouterState(transition.id, currentBrowserPageId),\n            };\n            this.location.replaceState(path, '', state);\n        }\n        else {\n            const state = {\n                ...transition.extras.state,\n                ...this.generateNgRouterState(transition.id, this.browserPageId + 1),\n            };\n            this.location.go(path, '', state);\n        }\n    }\n    /**\n     * Performs the necessary rollback action to restore the browser URL to the\n     * state before the transition.\n     */\n    restoreHistory(navigation, restoringFromCaughtError = false) {\n        if (this.canceledNavigationResolution === 'computed') {\n            const currentBrowserPageId = this.browserPageId;\n            const targetPagePosition = this.currentPageId - currentBrowserPageId;\n            if (targetPagePosition !== 0) {\n                this.location.historyGo(targetPagePosition);\n            }\n            else if (this.currentUrlTree === navigation.finalUrl && targetPagePosition === 0) {\n                // We got to the activation stage (where currentUrlTree is set to the navigation's\n                // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n                // We still need to reset the router state back to what it was when the navigation started.\n                this.resetState(navigation);\n                this.resetUrlToCurrentUrlTree();\n            }\n            else {\n                // The browser URL and router state was not updated before the navigation cancelled so\n                // there's no restoration needed.\n            }\n        }\n        else if (this.canceledNavigationResolution === 'replace') {\n            // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n            // for `deferred` navigations that haven't change the internal state yet because guards\n            // reject. For 'eager' navigations, it seems like we also really should reset the state\n            // because the navigation was cancelled. Investigate if this can be done by running TGP.\n            if (restoringFromCaughtError) {\n                this.resetState(navigation);\n            }\n            this.resetUrlToCurrentUrlTree();\n        }\n    }\n    resetState(navigation) {\n        this.routerState = this.stateMemento.routerState;\n        this.currentUrlTree = this.stateMemento.currentUrlTree;\n        // Note here that we use the urlHandlingStrategy to get the reset `rawUrlTree` because it may be\n        // configured to handle only part of the navigation URL. This means we would only want to reset\n        // the part of the navigation handled by the Angular router rather than the whole URL. In\n        // addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL\n        // when merging, such as the query params so they are not lost on a refresh.\n        this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, navigation.finalUrl ?? this.rawUrlTree);\n    }\n    resetUrlToCurrentUrlTree() {\n        this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n    }\n    generateNgRouterState(navigationId, routerPageId) {\n        if (this.canceledNavigationResolution === 'computed') {\n            return { navigationId, ɵrouterPageId: routerPageId };\n        }\n        return { navigationId };\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HistoryStateManager, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HistoryStateManager, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HistoryStateManager, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n\nvar NavigationResult;\n(function (NavigationResult) {\n    NavigationResult[NavigationResult[\"COMPLETE\"] = 0] = \"COMPLETE\";\n    NavigationResult[NavigationResult[\"FAILED\"] = 1] = \"FAILED\";\n    NavigationResult[NavigationResult[\"REDIRECTING\"] = 2] = \"REDIRECTING\";\n})(NavigationResult || (NavigationResult = {}));\n/**\n * Performs the given action once the router finishes its next/current navigation.\n *\n * The navigation is considered complete under the following conditions:\n * - `NavigationCancel` event emits and the code is not `NavigationCancellationCode.Redirect` or\n * `NavigationCancellationCode.SupersededByNewNavigation`. In these cases, the\n * redirecting/superseding navigation must finish.\n * - `NavigationError`, `NavigationEnd`, or `NavigationSkipped` event emits\n */\nfunction afterNextNavigation(router, action) {\n    router.events\n        .pipe(filter((e) => e instanceof NavigationEnd ||\n        e instanceof NavigationCancel ||\n        e instanceof NavigationError ||\n        e instanceof NavigationSkipped), map((e) => {\n        if (e instanceof NavigationEnd || e instanceof NavigationSkipped) {\n            return NavigationResult.COMPLETE;\n        }\n        const redirecting = e instanceof NavigationCancel\n            ? e.code === NavigationCancellationCode.Redirect ||\n                e.code === NavigationCancellationCode.SupersededByNewNavigation\n            : false;\n        return redirecting ? NavigationResult.REDIRECTING : NavigationResult.FAILED;\n    }), filter((result) => result !== NavigationResult.REDIRECTING), take(1))\n        .subscribe(() => {\n        action();\n    });\n}\n\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nconst exactMatchOptions = {\n    paths: 'exact',\n    fragment: 'ignored',\n    matrixParams: 'ignored',\n    queryParams: 'exact',\n};\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nconst subsetMatchOptions = {\n    paths: 'subset',\n    fragment: 'ignored',\n    matrixParams: 'ignored',\n    queryParams: 'subset',\n};\n/**\n * @description\n *\n * A service that facilitates navigation among views and URL manipulation capabilities.\n * This service is provided in the root scope and configured with [provideRouter](api/router/provideRouter).\n *\n * @see {@link Route}\n * @see {@link provideRouter}\n * @see [Routing and Navigation Guide](guide/routing/common-router-tasks).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass Router {\n    get currentUrlTree() {\n        return this.stateManager.getCurrentUrlTree();\n    }\n    get rawUrlTree() {\n        return this.stateManager.getRawUrlTree();\n    }\n    disposed = false;\n    nonRouterCurrentEntryChangeSubscription;\n    console = inject(ɵConsole);\n    stateManager = inject(StateManager);\n    options = inject(ROUTER_CONFIGURATION, { optional: true }) || {};\n    pendingTasks = inject(ɵPendingTasksInternal);\n    urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';\n    navigationTransitions = inject(NavigationTransitions);\n    urlSerializer = inject(UrlSerializer);\n    location = inject(Location);\n    urlHandlingStrategy = inject(UrlHandlingStrategy);\n    /**\n     * The private `Subject` type for the public events exposed in the getter. This is used internally\n     * to push events to. The separate field allows us to expose separate types in the public API\n     * (i.e., an Observable rather than the Subject).\n     */\n    _events = new Subject();\n    /**\n     * An event stream for routing events.\n     */\n    get events() {\n        // TODO(atscott): This _should_ be events.asObservable(). However, this change requires internal\n        // cleanup: tests are doing `(route.events as Subject<Event>).next(...)`. This isn't\n        // allowed/supported but we still have to fix these or file bugs against the teams before making\n        // the change.\n        return this._events;\n    }\n    /**\n     * The current state of routing in this NgModule.\n     */\n    get routerState() {\n        return this.stateManager.getRouterState();\n    }\n    /**\n     * True if at least one navigation event has occurred,\n     * false otherwise.\n     */\n    navigated = false;\n    /**\n     * A strategy for re-using routes.\n     *\n     * @deprecated Configure using `providers` instead:\n     *   `{provide: RouteReuseStrategy, useClass: MyStrategy}`.\n     */\n    routeReuseStrategy = inject(RouteReuseStrategy);\n    /**\n     * How to handle a navigation request to the current URL.\n     *\n     *\n     * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n     * @see {@link withRouterConfig}\n     * @see {@link provideRouter}\n     * @see {@link RouterModule}\n     */\n    onSameUrlNavigation = this.options.onSameUrlNavigation || 'ignore';\n    config = inject(ROUTES, { optional: true })?.flat() ?? [];\n    /**\n     * Indicates whether the application has opted in to binding Router data to component inputs.\n     *\n     * This option is enabled by the `withComponentInputBinding` feature of `provideRouter` or\n     * `bindToComponentInputs` in the `ExtraOptions` of `RouterModule.forRoot`.\n     */\n    componentInputBindingEnabled = !!inject(INPUT_BINDER, { optional: true });\n    constructor() {\n        this.resetConfig(this.config);\n        this.navigationTransitions\n            .setupNavigations(this, this.currentUrlTree, this.routerState)\n            .subscribe({\n            error: (e) => {\n                this.console.warn(ngDevMode ? `Unhandled Navigation Error: ${e}` : e);\n            },\n        });\n        this.subscribeToNavigationEvents();\n    }\n    eventsSubscription = new Subscription();\n    subscribeToNavigationEvents() {\n        const subscription = this.navigationTransitions.events.subscribe((e) => {\n            try {\n                const currentTransition = this.navigationTransitions.currentTransition;\n                const currentNavigation = this.navigationTransitions.currentNavigation;\n                if (currentTransition !== null && currentNavigation !== null) {\n                    this.stateManager.handleRouterEvent(e, currentNavigation);\n                    if (e instanceof NavigationCancel &&\n                        e.code !== NavigationCancellationCode.Redirect &&\n                        e.code !== NavigationCancellationCode.SupersededByNewNavigation) {\n                        // It seems weird that `navigated` is set to `true` when the navigation is rejected,\n                        // however it's how things were written initially. Investigation would need to be done\n                        // to determine if this can be removed.\n                        this.navigated = true;\n                    }\n                    else if (e instanceof NavigationEnd) {\n                        this.navigated = true;\n                    }\n                    else if (e instanceof RedirectRequest) {\n                        const opts = e.navigationBehaviorOptions;\n                        const mergedTree = this.urlHandlingStrategy.merge(e.url, currentTransition.currentRawUrl);\n                        const extras = {\n                            browserUrl: currentTransition.extras.browserUrl,\n                            info: currentTransition.extras.info,\n                            skipLocationChange: currentTransition.extras.skipLocationChange,\n                            // The URL is already updated at this point if we have 'eager' URL\n                            // updates or if the navigation was triggered by the browser (back\n                            // button, URL bar, etc). We want to replace that item in history\n                            // if the navigation is rejected.\n                            replaceUrl: currentTransition.extras.replaceUrl ||\n                                this.urlUpdateStrategy === 'eager' ||\n                                isBrowserTriggeredNavigation(currentTransition.source),\n                            // allow developer to override default options with RedirectCommand\n                            ...opts,\n                        };\n                        this.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, null, extras, {\n                            resolve: currentTransition.resolve,\n                            reject: currentTransition.reject,\n                            promise: currentTransition.promise,\n                        });\n                    }\n                }\n                // Note that it's important to have the Router process the events _before_ the event is\n                // pushed through the public observable. This ensures the correct router state is in place\n                // before applications observe the events.\n                if (isPublicRouterEvent(e)) {\n                    this._events.next(e);\n                }\n            }\n            catch (e) {\n                this.navigationTransitions.transitionAbortSubject.next(e);\n            }\n        });\n        this.eventsSubscription.add(subscription);\n    }\n    /** @internal */\n    resetRootComponentType(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 = rootComponentType;\n        this.navigationTransitions.rootComponentType = rootComponentType;\n    }\n    /**\n     * Sets up the location change listener and performs the initial navigation.\n     */\n    initialNavigation() {\n        this.setUpLocationChangeListener();\n        if (!this.navigationTransitions.hasRequestedNavigation) {\n            this.navigateToSyncWithBrowser(this.location.path(true), IMPERATIVE_NAVIGATION, this.stateManager.restoredState());\n        }\n    }\n    /**\n     * Sets up the location change listener. This listener detects navigations triggered from outside\n     * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n     * navigation so that the correct events, guards, etc. are triggered.\n     */\n    setUpLocationChangeListener() {\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        this.nonRouterCurrentEntryChangeSubscription ??=\n            this.stateManager.registerNonRouterCurrentEntryChangeListener((url, state) => {\n                // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n                // hybrid apps.\n                setTimeout(() => {\n                    this.navigateToSyncWithBrowser(url, 'popstate', state);\n                }, 0);\n            });\n    }\n    /**\n     * Schedules a router navigation to synchronize Router state with the browser state.\n     *\n     * This is done as a response to a popstate event and the initial navigation. These\n     * two scenarios represent times when the browser URL/state has been updated and\n     * the Router needs to respond to ensure its internal state matches.\n     */\n    navigateToSyncWithBrowser(url, source, state) {\n        const extras = { replaceUrl: true };\n        // TODO: restoredState should always include the entire state, regardless\n        // of navigationId. This requires a breaking change to update the type on\n        // NavigationStart’s restoredState, which currently requires navigationId\n        // to always be present. The Router used to only restore history state if\n        // a navigationId was present.\n        // The stored navigationId is used by the RouterScroller to retrieve the scroll\n        // position for the page.\n        const restoredState = state?.navigationId ? state : null;\n        // Separate to NavigationStart.restoredState, we must also restore the state to\n        // history.state and generate a new navigationId, since it will be overwritten\n        if (state) {\n            const stateCopy = { ...state };\n            delete stateCopy.navigationId;\n            delete stateCopy.ɵrouterPageId;\n            if (Object.keys(stateCopy).length !== 0) {\n                extras.state = stateCopy;\n            }\n        }\n        const urlTree = this.parseUrl(url);\n        this.scheduleNavigation(urlTree, source, restoredState, extras);\n    }\n    /** The current URL. */\n    get url() {\n        return this.serializeUrl(this.currentUrlTree);\n    }\n    /**\n     * Returns the current `Navigation` object when the router is navigating,\n     * and `null` when idle.\n     */\n    getCurrentNavigation() {\n        return this.navigationTransitions.currentNavigation;\n    }\n    /**\n     * The `Navigation` object of the most recent navigation to succeed and `null` if there\n     *     has not been a successful navigation yet.\n     */\n    get lastSuccessfulNavigation() {\n        return this.navigationTransitions.lastSuccessfulNavigation;\n    }\n    /**\n     * Resets the route 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    resetConfig(config) {\n        (typeof ngDevMode === 'undefined' || ngDevMode) && validateConfig(config);\n        this.config = config.map(standardizeConfig);\n        this.navigated = false;\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        this.dispose();\n    }\n    /** Disposes of the router. */\n    dispose() {\n        this.navigationTransitions.complete();\n        if (this.nonRouterCurrentEntryChangeSubscription) {\n            this.nonRouterCurrentEntryChangeSubscription.unsubscribe();\n            this.nonRouterCurrentEntryChangeSubscription = undefined;\n        }\n        this.disposed = true;\n        this.eventsSubscription.unsubscribe();\n    }\n    /**\n     * Appends URL segments to the current URL tree to create a new URL tree.\n     *\n     * @param commands An array of URL fragments with which to construct the new URL tree.\n     * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n     * segments, followed by the parameters for each segment.\n     * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`\n     * property of the options object, if supplied.\n     * @param navigationExtras Options that control the navigation strategy.\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     * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n     * tree should be created relative to the root.\n     * ```\n     */\n    createUrlTree(commands, navigationExtras = {}) {\n        const { relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment } = navigationExtras;\n        const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n        let q = null;\n        switch (queryParamsHandling ?? this.options.defaultQueryParamsHandling) {\n            case 'merge':\n                q = { ...this.currentUrlTree.queryParams, ...queryParams };\n                break;\n            case 'preserve':\n                q = this.currentUrlTree.queryParams;\n                break;\n            default:\n                q = queryParams || null;\n        }\n        if (q !== null) {\n            q = this.removeEmptyProps(q);\n        }\n        let relativeToUrlSegmentGroup;\n        try {\n            const relativeToSnapshot = relativeTo ? relativeTo.snapshot : this.routerState.snapshot.root;\n            relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeToSnapshot);\n        }\n        catch (e) {\n            // This is strictly for backwards compatibility with tests that create\n            // invalid `ActivatedRoute` mocks.\n            // Note: the difference between having this fallback for invalid `ActivatedRoute` setups and\n            // just throwing is ~500 test failures. Fixing all of those tests by hand is not feasible at\n            // the moment.\n            if (typeof commands[0] !== 'string' || commands[0][0] !== '/') {\n                // Navigations that were absolute in the old way of creating UrlTrees\n                // would still work because they wouldn't attempt to match the\n                // segments in the `ActivatedRoute` to the `currentUrlTree` but\n                // instead just replace the root segment with the navigation result.\n                // Non-absolute navigations would fail to apply the commands because\n                // the logic could not find the segment to replace (so they'd act like there were no\n                // commands).\n                commands = [];\n            }\n            relativeToUrlSegmentGroup = this.currentUrlTree.root;\n        }\n        return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, q, f ?? null);\n    }\n    /**\n     * Navigates to a view using an absolute route path.\n     *\n     * @param url An absolute path for a defined route. The function does not apply any delta to the\n     *     current URL.\n     * @param extras An object containing properties that modify the navigation strategy.\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     * The following calls request navigation to an absolute path.\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     * @see [Routing and Navigation guide](guide/routing/common-router-tasks)\n     *\n     */\n    navigateByUrl(url, extras = {\n        skipLocationChange: false,\n    }) {\n        const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n        const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n        return this.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, 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     * @param commands An array of URL fragments with which to construct the target URL.\n     * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n     * segments, followed by the parameters for each segment.\n     * The fragments are applied to the current URL or the one provided  in the `relativeTo` property\n     * of the options object, if supplied.\n     * @param extras An options object that determines how the URL should be constructed or\n     *     interpreted.\n     *\n     * @returns A Promise that resolves to `true` when navigation succeeds, or `false` when navigation\n     *     fails. The Promise is rejected when an error occurs if `resolveNavigationPromiseOnError` is\n     * not `true`.\n     *\n     * @usageNotes\n     *\n     * The following calls request navigation to a dynamic route path relative to the current URL.\n     *\n     * ```\n     * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n     *\n     * // Navigate without updating the URL, overriding the default behavior\n     * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n     * ```\n     *\n     * @see [Routing and Navigation guide](guide/routing/common-router-tasks)\n     *\n     */\n    navigate(commands, extras = { skipLocationChange: false }) {\n        validateCommands(commands);\n        return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n    }\n    /** Serializes a `UrlTree` into a string */\n    serializeUrl(url) {\n        return this.urlSerializer.serialize(url);\n    }\n    /** Parses a string into a `UrlTree` */\n    parseUrl(url) {\n        try {\n            return this.urlSerializer.parse(url);\n        }\n        catch {\n            return this.urlSerializer.parse('/');\n        }\n    }\n    isActive(url, matchOptions) {\n        let options;\n        if (matchOptions === true) {\n            options = { ...exactMatchOptions };\n        }\n        else if (matchOptions === false) {\n            options = { ...subsetMatchOptions };\n        }\n        else {\n            options = matchOptions;\n        }\n        if (isUrlTree(url)) {\n            return containsTree(this.currentUrlTree, url, options);\n        }\n        const urlTree = this.parseUrl(url);\n        return containsTree(this.currentUrlTree, urlTree, options);\n    }\n    removeEmptyProps(params) {\n        return Object.entries(params).reduce((result, [key, value]) => {\n            if (value !== null && value !== undefined) {\n                result[key] = value;\n            }\n            return result;\n        }, {});\n    }\n    scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) {\n        if (this.disposed) {\n            return Promise.resolve(false);\n        }\n        let resolve;\n        let reject;\n        let promise;\n        if (priorPromise) {\n            resolve = priorPromise.resolve;\n            reject = priorPromise.reject;\n            promise = priorPromise.promise;\n        }\n        else {\n            promise = new Promise((res, rej) => {\n                resolve = res;\n                reject = rej;\n            });\n        }\n        // Indicate that the navigation is happening.\n        const taskId = this.pendingTasks.add();\n        afterNextNavigation(this, () => {\n            // Remove pending task in a microtask to allow for cancelled\n            // initial navigations and redirects within the same task.\n            queueMicrotask(() => this.pendingTasks.remove(taskId));\n        });\n        this.navigationTransitions.handleNavigationRequest({\n            source,\n            restoredState,\n            currentUrlTree: this.currentUrlTree,\n            currentRawUrl: this.currentUrlTree,\n            rawUrl,\n            extras,\n            resolve: resolve,\n            reject: reject,\n            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((e) => {\n            return Promise.reject(e);\n        });\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: Router, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: Router, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: Router, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\nfunction validateCommands(commands) {\n    for (let i = 0; i < commands.length; i++) {\n        const cmd = commands[i];\n        if (cmd == null) {\n            throw new ɵRuntimeError(4008 /* RuntimeErrorCode.NULLISH_COMMAND */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                `The requested path contains ${cmd} segment at index ${i}`);\n        }\n    }\n}\nfunction isPublicRouterEvent(e) {\n    return !(e instanceof BeforeActivateRoutes) && !(e instanceof RedirectRequest);\n}\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segments.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks 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\n *   looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```html\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```html\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * `queryParams`, `fragment`, `queryParamsHandling`, `preserveFragment`, and `relativeTo`\n * cannot be used when the `routerLink` input is a `UrlTree`.\n *\n * See {@link UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```html\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```ts\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 * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterLink {\n    router;\n    route;\n    tabIndexAttribute;\n    renderer;\n    el;\n    locationStrategy;\n    /**\n     * Represents an `href` attribute value applied to a host element,\n     * when a host element is `<a>`. For other tags, the value is `null`.\n     */\n    href = null;\n    /**\n     * Represents the `target` attribute on a host element.\n     * This is only used when the host element is an `<a>` tag.\n     */\n    target;\n    /**\n     * Passed to {@link Router#createUrlTree} as part of the\n     * `UrlCreationOptions`.\n     * @see {@link UrlCreationOptions#queryParams}\n     * @see {@link Router#createUrlTree}\n     */\n    queryParams;\n    /**\n     * Passed to {@link Router#createUrlTree} as part of the\n     * `UrlCreationOptions`.\n     * @see {@link UrlCreationOptions#fragment}\n     * @see {@link Router#createUrlTree}\n     */\n    fragment;\n    /**\n     * Passed to {@link Router#createUrlTree} as part of the\n     * `UrlCreationOptions`.\n     * @see {@link UrlCreationOptions#queryParamsHandling}\n     * @see {@link Router#createUrlTree}\n     */\n    queryParamsHandling;\n    /**\n     * Passed to {@link Router#navigateByUrl} as part of the\n     * `NavigationBehaviorOptions`.\n     * @see {@link NavigationBehaviorOptions#state}\n     * @see {@link Router#navigateByUrl}\n     */\n    state;\n    /**\n     * Passed to {@link Router#navigateByUrl} as part of the\n     * `NavigationBehaviorOptions`.\n     * @see {@link NavigationBehaviorOptions#info}\n     * @see {@link Router#navigateByUrl}\n     */\n    info;\n    /**\n     * Passed to {@link Router#createUrlTree} as part of the\n     * `UrlCreationOptions`.\n     * Specify a value here when you do not want to use the default value\n     * for `routerLink`, which is the current activated route.\n     * Note that a value of `undefined` here will use the `routerLink` default.\n     * @see {@link UrlCreationOptions#relativeTo}\n     * @see {@link Router#createUrlTree}\n     */\n    relativeTo;\n    /** Whether a host element is an `<a>` tag. */\n    isAnchorElement;\n    subscription;\n    /** @internal */\n    onChanges = new Subject();\n    constructor(router, route, tabIndexAttribute, renderer, el, locationStrategy) {\n        this.router = router;\n        this.route = route;\n        this.tabIndexAttribute = tabIndexAttribute;\n        this.renderer = renderer;\n        this.el = el;\n        this.locationStrategy = locationStrategy;\n        const tagName = el.nativeElement.tagName?.toLowerCase();\n        this.isAnchorElement = tagName === 'a' || tagName === 'area';\n        if (this.isAnchorElement) {\n            this.subscription = router.events.subscribe((s) => {\n                if (s instanceof NavigationEnd) {\n                    this.updateHref();\n                }\n            });\n        }\n        else {\n            this.setTabIndexIfNotOnNativeEl('0');\n        }\n    }\n    /**\n     * Passed to {@link Router#createUrlTree} as part of the\n     * `UrlCreationOptions`.\n     * @see {@link UrlCreationOptions#preserveFragment}\n     * @see {@link Router#createUrlTree}\n     */\n    preserveFragment = false;\n    /**\n     * Passed to {@link Router#navigateByUrl} as part of the\n     * `NavigationBehaviorOptions`.\n     * @see {@link NavigationBehaviorOptions#skipLocationChange}\n     * @see {@link Router#navigateByUrl}\n     */\n    skipLocationChange = false;\n    /**\n     * Passed to {@link Router#navigateByUrl} as part of the\n     * `NavigationBehaviorOptions`.\n     * @see {@link NavigationBehaviorOptions#replaceUrl}\n     * @see {@link Router#navigateByUrl}\n     */\n    replaceUrl = false;\n    /**\n     * Modifies the tab index if there was not a tabindex attribute on the element during\n     * instantiation.\n     */\n    setTabIndexIfNotOnNativeEl(newTabIndex) {\n        if (this.tabIndexAttribute != null /* both `null` and `undefined` */ || this.isAnchorElement) {\n            return;\n        }\n        this.applyAttributeValue('tabindex', newTabIndex);\n    }\n    /** @nodoc */\n    // TODO(atscott): Remove changes parameter in major version as a breaking change.\n    ngOnChanges(changes) {\n        if (ngDevMode &&\n            isUrlTree(this.routerLinkInput) &&\n            (this.fragment !== undefined ||\n                this.queryParams ||\n                this.queryParamsHandling ||\n                this.preserveFragment ||\n                this.relativeTo)) {\n            throw new ɵRuntimeError(4016 /* RuntimeErrorCode.INVALID_ROUTER_LINK_INPUTS */, 'Cannot configure queryParams or fragment when using a UrlTree as the routerLink input value.');\n        }\n        if (this.isAnchorElement) {\n            this.updateHref();\n        }\n        // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n        // to the RouterLinks it's tracking.\n        this.onChanges.next(this);\n    }\n    routerLinkInput = null;\n    /**\n     * Commands to pass to {@link Router#createUrlTree} or a `UrlTree`.\n     *   - **array**: commands to pass to {@link Router#createUrlTree}.\n     *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n     *   - **UrlTree**: a `UrlTree` for this link rather than creating one from the commands\n     *     and other inputs that correspond to properties of `UrlCreationOptions`.\n     *   - **null|undefined**: effectively disables the `routerLink`\n     * @see {@link Router#createUrlTree}\n     */\n    set routerLink(commandsOrUrlTree) {\n        if (commandsOrUrlTree == null) {\n            this.routerLinkInput = null;\n            this.setTabIndexIfNotOnNativeEl(null);\n        }\n        else {\n            if (isUrlTree(commandsOrUrlTree)) {\n                this.routerLinkInput = commandsOrUrlTree;\n            }\n            else {\n                this.routerLinkInput = Array.isArray(commandsOrUrlTree)\n                    ? commandsOrUrlTree\n                    : [commandsOrUrlTree];\n            }\n            this.setTabIndexIfNotOnNativeEl('0');\n        }\n    }\n    /** @nodoc */\n    onClick(button, ctrlKey, shiftKey, altKey, metaKey) {\n        const urlTree = this.urlTree;\n        if (urlTree === null) {\n            return true;\n        }\n        if (this.isAnchorElement) {\n            if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n                return true;\n            }\n            if (typeof this.target === 'string' && this.target != '_self') {\n                return true;\n            }\n        }\n        const extras = {\n            skipLocationChange: this.skipLocationChange,\n            replaceUrl: this.replaceUrl,\n            state: this.state,\n            info: this.info,\n        };\n        this.router.navigateByUrl(urlTree, extras);\n        // Return `false` for `<a>` elements to prevent default action\n        // and cancel the native behavior, since the navigation is handled\n        // by the Router.\n        return !this.isAnchorElement;\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        this.subscription?.unsubscribe();\n    }\n    updateHref() {\n        const urlTree = this.urlTree;\n        this.href =\n            urlTree !== null && this.locationStrategy\n                ? this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(urlTree))\n                : null;\n        const sanitizedValue = this.href === null\n            ? null\n            : // This class represents a directive that can be added to both `<a>` elements,\n                // as well as other elements. As a result, we can't define security context at\n                // compile time. So the security context is deferred to runtime.\n                // The `ɵɵsanitizeUrlOrResourceUrl` selects the necessary sanitizer function\n                // based on the tag and property names. The logic mimics the one from\n                // `packages/compiler/src/schema/dom_security_schema.ts`, which is used at compile time.\n                //\n                // Note: we should investigate whether we can switch to using `@HostBinding('attr.href')`\n                // instead of applying a value via a renderer, after a final merge of the\n                // `RouterLinkWithHref` directive.\n                ɵɵsanitizeUrlOrResourceUrl(this.href, this.el.nativeElement.tagName.toLowerCase(), 'href');\n        this.applyAttributeValue('href', sanitizedValue);\n    }\n    applyAttributeValue(attrName, attrValue) {\n        const renderer = this.renderer;\n        const nativeElement = this.el.nativeElement;\n        if (attrValue !== null) {\n            renderer.setAttribute(nativeElement, attrName, attrValue);\n        }\n        else {\n            renderer.removeAttribute(nativeElement, attrName);\n        }\n    }\n    get urlTree() {\n        if (this.routerLinkInput === null) {\n            return null;\n        }\n        else if (isUrlTree(this.routerLinkInput)) {\n            return this.routerLinkInput;\n        }\n        return this.router.createUrlTree(this.routerLinkInput, {\n            // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n            // Otherwise, we should use the value provided by the user in the input.\n            relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n            queryParams: this.queryParams,\n            fragment: this.fragment,\n            queryParamsHandling: this.queryParamsHandling,\n            preserveFragment: this.preserveFragment,\n        });\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterLink, deps: [{ token: Router }, { token: ActivatedRoute }, { token: 'tabindex', attribute: true }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i3.LocationStrategy }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.5\", type: RouterLink, isStandalone: true, selector: \"[routerLink]\", inputs: { target: \"target\", queryParams: \"queryParams\", fragment: \"fragment\", queryParamsHandling: \"queryParamsHandling\", state: \"state\", info: \"info\", relativeTo: \"relativeTo\", preserveFragment: [\"preserveFragment\", \"preserveFragment\", booleanAttribute], skipLocationChange: [\"skipLocationChange\", \"skipLocationChange\", booleanAttribute], replaceUrl: [\"replaceUrl\", \"replaceUrl\", booleanAttribute], routerLink: \"routerLink\" }, host: { listeners: { \"click\": \"onClick($event.button,$event.ctrlKey,$event.shiftKey,$event.altKey,$event.metaKey)\" }, properties: { \"attr.target\": \"this.target\" } }, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterLink, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[routerLink]',\n                }]\n        }], ctorParameters: () => [{ type: Router }, { type: ActivatedRoute }, { type: undefined, decorators: [{\n                    type: Attribute,\n                    args: ['tabindex']\n                }] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i3.LocationStrategy }], propDecorators: { 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            }], state: [{\n                type: Input\n            }], info: [{\n                type: Input\n            }], relativeTo: [{\n                type: Input\n            }], preserveFragment: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], skipLocationChange: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], replaceUrl: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], routerLink: [{\n                type: Input\n            }], onClick: [{\n                type: HostListener,\n                args: ['click', [\n                        '$event.button',\n                        '$event.ctrlKey',\n                        '$event.shiftKey',\n                        '$event.altKey',\n                        '$event.metaKey',\n                    ]]\n            }] } });\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```html\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```html\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```html\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```html\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```html\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * The `RouterLinkActive` directive can also be used to set the aria-current attribute\n * to provide an alternative distinction for active elements to visually impaired users.\n *\n * For example, the following code adds the 'active' class to the Home Page link when it is\n * indeed active and in such case also sets its aria-current attribute to 'page':\n *\n * ```html\n * <a routerLink=\"/\" routerLinkActive=\"active\" ariaCurrentWhenActive=\"page\">Home Page</a>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nclass RouterLinkActive {\n    router;\n    element;\n    renderer;\n    cdr;\n    link;\n    links;\n    classes = [];\n    routerEventsSubscription;\n    linkInputChangesSubscription;\n    _isActive = false;\n    get isActive() {\n        return this._isActive;\n    }\n    /**\n     * Options to configure how to determine if the router link is active.\n     *\n     * These options are passed to the `Router.isActive()` function.\n     *\n     * @see {@link Router#isActive}\n     */\n    routerLinkActiveOptions = { exact: false };\n    /**\n     * Aria-current attribute to apply when the router link is active.\n     *\n     * Possible values: `'page'` | `'step'` | `'location'` | `'date'` | `'time'` | `true` | `false`.\n     *\n     * @see {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current}\n     */\n    ariaCurrentWhenActive;\n    /**\n     *\n     * You can use the output `isActiveChange` to get notified each time the link becomes\n     * active or inactive.\n     *\n     * Emits:\n     * true  -> Route is active\n     * false -> Route is inactive\n     *\n     * ```\n     * <a\n     *  routerLink=\"/user/bob\"\n     *  routerLinkActive=\"active-link\"\n     *  (isActiveChange)=\"this.onRouterLinkActive($event)\">Bob</a>\n     * ```\n     */\n    isActiveChange = new EventEmitter();\n    constructor(router, element, renderer, cdr, link) {\n        this.router = router;\n        this.element = element;\n        this.renderer = renderer;\n        this.cdr = cdr;\n        this.link = link;\n        this.routerEventsSubscription = router.events.subscribe((s) => {\n            if (s instanceof NavigationEnd) {\n                this.update();\n            }\n        });\n    }\n    /** @nodoc */\n    ngAfterContentInit() {\n        // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n        of(this.links.changes, of(null))\n            .pipe(mergeAll())\n            .subscribe((_) => {\n            this.update();\n            this.subscribeToEachLinkOnChanges();\n        });\n    }\n    subscribeToEachLinkOnChanges() {\n        this.linkInputChangesSubscription?.unsubscribe();\n        const allLinkChanges = [...this.links.toArray(), this.link]\n            .filter((link) => !!link)\n            .map((link) => link.onChanges);\n        this.linkInputChangesSubscription = from(allLinkChanges)\n            .pipe(mergeAll())\n            .subscribe((link) => {\n            if (this._isActive !== this.isLinkActive(this.router)(link)) {\n                this.update();\n            }\n        });\n    }\n    set routerLinkActive(data) {\n        const classes = Array.isArray(data) ? data : data.split(' ');\n        this.classes = classes.filter((c) => !!c);\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        this.update();\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        this.routerEventsSubscription.unsubscribe();\n        this.linkInputChangesSubscription?.unsubscribe();\n    }\n    update() {\n        if (!this.links || !this.router.navigated)\n            return;\n        queueMicrotask(() => {\n            const hasActiveLinks = this.hasActiveLinks();\n            this.classes.forEach((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            if (hasActiveLinks && this.ariaCurrentWhenActive !== undefined) {\n                this.renderer.setAttribute(this.element.nativeElement, 'aria-current', this.ariaCurrentWhenActive.toString());\n            }\n            else {\n                this.renderer.removeAttribute(this.element.nativeElement, 'aria-current');\n            }\n            // Only emit change if the active state changed.\n            if (this._isActive !== hasActiveLinks) {\n                this._isActive = hasActiveLinks;\n                this.cdr.markForCheck();\n                // Emit on isActiveChange after classes are updated\n                this.isActiveChange.emit(hasActiveLinks);\n            }\n        });\n    }\n    isLinkActive(router) {\n        const options = isActiveMatchOptions(this.routerLinkActiveOptions)\n            ? this.routerLinkActiveOptions\n            : // While the types should disallow `undefined` here, it's possible without strict inputs\n                this.routerLinkActiveOptions.exact || false;\n        return (link) => {\n            const urlTree = link.urlTree;\n            return urlTree ? router.isActive(urlTree, options) : false;\n        };\n    }\n    hasActiveLinks() {\n        const isActiveCheckFn = this.isLinkActive(this.router);\n        return (this.link && isActiveCheckFn(this.link)) || this.links.some(isActiveCheckFn);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterLinkActive, deps: [{ token: Router }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: RouterLinkActive, isStandalone: true, selector: \"[routerLinkActive]\", inputs: { routerLinkActiveOptions: \"routerLinkActiveOptions\", ariaCurrentWhenActive: \"ariaCurrentWhenActive\", routerLinkActive: \"routerLinkActive\" }, outputs: { isActiveChange: \"isActiveChange\" }, queries: [{ propertyName: \"links\", predicate: RouterLink, descendants: true }], exportAs: [\"routerLinkActive\"], usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterLinkActive, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[routerLinkActive]',\n                    exportAs: 'routerLinkActive',\n                }]\n        }], ctorParameters: () => [{ type: Router }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: RouterLink, decorators: [{\n                    type: Optional\n                }] }], propDecorators: { links: [{\n                type: ContentChildren,\n                args: [RouterLink, { descendants: true }]\n            }], routerLinkActiveOptions: [{\n                type: Input\n            }], ariaCurrentWhenActive: [{\n                type: Input\n            }], isActiveChange: [{\n                type: Output\n            }], routerLinkActive: [{\n                type: Input\n            }] } });\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options) {\n    return !!options.paths;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nclass PreloadingStrategy {\n}\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```ts\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nclass PreloadAllModules {\n    preload(route, fn) {\n        return fn().pipe(catchError(() => of(null)));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PreloadAllModules, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PreloadAllModules, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PreloadAllModules, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\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 */\nclass NoPreloading {\n    preload(route, fn) {\n        return of(null);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NoPreloading, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NoPreloading, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NoPreloading, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\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 */\nclass RouterPreloader {\n    router;\n    injector;\n    preloadingStrategy;\n    loader;\n    subscription;\n    constructor(router, compiler, injector, preloadingStrategy, loader) {\n        this.router = router;\n        this.injector = injector;\n        this.preloadingStrategy = preloadingStrategy;\n        this.loader = loader;\n    }\n    setUpPreloading() {\n        this.subscription = this.router.events\n            .pipe(filter((e) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n            .subscribe(() => { });\n    }\n    preload() {\n        return this.processRoutes(this.injector, this.router.config);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this.subscription) {\n            this.subscription.unsubscribe();\n        }\n    }\n    processRoutes(injector, routes) {\n        const res = [];\n        for (const route of routes) {\n            if (route.providers && !route._injector) {\n                route._injector = createEnvironmentInjector(route.providers, injector, `Route: ${route.path}`);\n            }\n            const injectorForCurrentRoute = route._injector ?? injector;\n            const injectorForChildren = route._loadedInjector ?? injectorForCurrentRoute;\n            // Note that `canLoad` is only checked as a condition that prevents `loadChildren` and not\n            // `loadComponent`. `canLoad` guards only block loading of child routes by design. This\n            // happens as a consequence of needing to descend into children for route matching immediately\n            // while component loading is deferred until route activation. Because `canLoad` guards can\n            // have side effects, we cannot execute them here so we instead skip preloading altogether\n            // when present. Lastly, it remains to be decided whether `canLoad` should behave this way\n            // at all. Code splitting and lazy loading is separate from client-side authorization checks\n            // and should not be used as a security measure to prevent loading of code.\n            if ((route.loadChildren && !route._loadedRoutes && route.canLoad === undefined) ||\n                (route.loadComponent && !route._loadedComponent)) {\n                res.push(this.preloadConfig(injectorForCurrentRoute, route));\n            }\n            if (route.children || route._loadedRoutes) {\n                res.push(this.processRoutes(injectorForChildren, (route.children ?? route._loadedRoutes)));\n            }\n        }\n        return from(res).pipe(mergeAll());\n    }\n    preloadConfig(injector, route) {\n        return this.preloadingStrategy.preload(route, () => {\n            let loadedChildren$;\n            if (route.loadChildren && route.canLoad === undefined) {\n                loadedChildren$ = this.loader.loadChildren(injector, route);\n            }\n            else {\n                loadedChildren$ = of(null);\n            }\n            const recursiveLoadChildren$ = loadedChildren$.pipe(mergeMap((config) => {\n                if (config === null) {\n                    return of(void 0);\n                }\n                route._loadedRoutes = config.routes;\n                route._loadedInjector = config.injector;\n                // If the loaded config was a module, use that as the module/module injector going\n                // forward. Otherwise, continue using the current module/module injector.\n                return this.processRoutes(config.injector ?? injector, config.routes);\n            }));\n            if (route.loadComponent && !route._loadedComponent) {\n                const loadComponent$ = this.loader.loadComponent(route);\n                return from([recursiveLoadChildren$, loadComponent$]).pipe(mergeAll());\n            }\n            else {\n                return recursiveLoadChildren$;\n            }\n        });\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterPreloader, deps: [{ token: Router }, { token: i0.Compiler }, { token: i0.EnvironmentInjector }, { token: PreloadingStrategy }, { token: RouterConfigLoader }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterPreloader, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterPreloader, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [{ type: Router }, { type: i0.Compiler }, { type: i0.EnvironmentInjector }, { type: PreloadingStrategy }, { type: RouterConfigLoader }] });\n\nconst ROUTER_SCROLLER = new InjectionToken('');\nclass RouterScroller {\n    urlSerializer;\n    transitions;\n    viewportScroller;\n    zone;\n    options;\n    routerEventsSubscription;\n    scrollEventsSubscription;\n    lastId = 0;\n    lastSource = 'imperative';\n    restoredId = 0;\n    store = {};\n    /** @nodoc */\n    constructor(urlSerializer, transitions, viewportScroller, zone, options = {}) {\n        this.urlSerializer = urlSerializer;\n        this.transitions = transitions;\n        this.viewportScroller = viewportScroller;\n        this.zone = zone;\n        this.options = options;\n        // Default both options to 'disabled'\n        options.scrollPositionRestoration ||= 'disabled';\n        options.anchorScrolling ||= 'disabled';\n    }\n    init() {\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    createScrollEvents() {\n        return this.transitions.events.subscribe((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.urlSerializer.parse(e.urlAfterRedirects).fragment);\n            }\n            else if (e instanceof NavigationSkipped &&\n                e.code === NavigationSkippedCode.IgnoredSameUrlNavigation) {\n                this.lastSource = undefined;\n                this.restoredId = 0;\n                this.scheduleScrollEvent(e, this.urlSerializer.parse(e.url).fragment);\n            }\n        });\n    }\n    consumeScrollEvents() {\n        return this.transitions.events.subscribe((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    scheduleScrollEvent(routerEvent, anchor) {\n        this.zone.runOutsideAngular(() => {\n            // The scroll event needs to be delayed until after change detection. Otherwise, we may\n            // attempt to restore the scroll position before the router outlet has fully rendered the\n            // component by executing its update block of the template function.\n            setTimeout(() => {\n                this.zone.run(() => {\n                    this.transitions.events.next(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n                });\n            }, 0);\n        });\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        this.routerEventsSubscription?.unsubscribe();\n        this.scrollEventsSubscription?.unsubscribe();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterScroller, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterScroller });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterScroller, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: UrlSerializer }, { type: NavigationTransitions }, { type: i3.ViewportScroller }, { type: i0.NgZone }, { type: undefined }] });\n\n/**\n * Sets up providers necessary to enable `Router` functionality for the application.\n * Allows to configure a set of routes as well as extra features that should be enabled.\n *\n * @usageNotes\n *\n * Basic example of how you can add a Router to your application:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent, {\n *   providers: [provideRouter(appRoutes)]\n * });\n * ```\n *\n * You can also enable optional features in the Router by adding functions from the `RouterFeatures`\n * type:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes,\n *         withDebugTracing(),\n *         withRouterConfig({paramsInheritanceStrategy: 'always'}))\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link RouterFeatures}\n *\n * @publicApi\n * @param routes A set of `Route`s to use for the application routing table.\n * @param features Optional features to configure additional router behaviors.\n * @returns A set of providers to setup a Router.\n */\nfunction provideRouter(routes, ...features) {\n    return makeEnvironmentProviders([\n        { provide: ROUTES, multi: true, useValue: routes },\n        typeof ngDevMode === 'undefined' || ngDevMode\n            ? { provide: ROUTER_IS_PROVIDED, useValue: true }\n            : [],\n        { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },\n        { provide: APP_BOOTSTRAP_LISTENER, multi: true, useFactory: getBootstrapListener },\n        features.map((feature) => feature.ɵproviders),\n    ]);\n}\nfunction rootRoute(router) {\n    return router.routerState.root;\n}\n/**\n * Helper function to create an object that represents a Router feature.\n */\nfunction routerFeature(kind, providers) {\n    return { ɵkind: kind, ɵproviders: providers };\n}\n/**\n * An Injection token used to indicate whether `provideRouter` or `RouterModule.forRoot` was ever\n * called.\n */\nconst ROUTER_IS_PROVIDED = new InjectionToken('', {\n    providedIn: 'root',\n    factory: () => false,\n});\nconst routerIsProvidedDevModeCheck = {\n    provide: ENVIRONMENT_INITIALIZER,\n    multi: true,\n    useFactory() {\n        return () => {\n            if (!inject(ROUTER_IS_PROVIDED)) {\n                console.warn('`provideRoutes` was called without `provideRouter` or `RouterModule.forRoot`. ' +\n                    'This is likely a mistake.');\n            }\n        };\n    },\n};\n/**\n * Registers a DI provider for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```ts\n * @NgModule({\n *   providers: [provideRoutes(ROUTES)]\n * })\n * class LazyLoadedChildModule {}\n * ```\n *\n * @deprecated If necessary, provide routes using the `ROUTES` `InjectionToken`.\n * @see {@link ROUTES}\n * @publicApi\n */\nfunction provideRoutes(routes) {\n    return [\n        { provide: ROUTES, multi: true, useValue: routes },\n        typeof ngDevMode === 'undefined' || ngDevMode ? routerIsProvidedDevModeCheck : [],\n    ];\n}\n/**\n * Enables customizable scrolling behavior for router navigations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable scrolling feature:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withInMemoryScrolling())\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n * @see {@link ViewportScroller}\n *\n * @publicApi\n * @param options Set of configuration parameters to customize scrolling behavior, see\n *     `InMemoryScrollingOptions` for additional information.\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withInMemoryScrolling(options = {}) {\n    const providers = [\n        {\n            provide: ROUTER_SCROLLER,\n            useFactory: () => {\n                const viewportScroller = inject(ViewportScroller);\n                const zone = inject(NgZone);\n                const transitions = inject(NavigationTransitions);\n                const urlSerializer = inject(UrlSerializer);\n                return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, options);\n            },\n        },\n    ];\n    return routerFeature(4 /* RouterFeatureKind.InMemoryScrollingFeature */, providers);\n}\nfunction getBootstrapListener() {\n    const injector = inject(Injector);\n    return (bootstrappedComponentRef) => {\n        const ref = injector.get(ApplicationRef);\n        if (bootstrappedComponentRef !== ref.components[0]) {\n            return;\n        }\n        const router = injector.get(Router);\n        const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n        if (injector.get(INITIAL_NAVIGATION) === 1 /* InitialNavigation.EnabledNonBlocking */) {\n            router.initialNavigation();\n        }\n        injector.get(ROUTER_PRELOADER, null, InjectFlags.Optional)?.setUpPreloading();\n        injector.get(ROUTER_SCROLLER, null, InjectFlags.Optional)?.init();\n        router.resetRootComponentType(ref.componentTypes[0]);\n        if (!bootstrapDone.closed) {\n            bootstrapDone.next();\n            bootstrapDone.complete();\n            bootstrapDone.unsubscribe();\n        }\n    };\n}\n/**\n * A subject used to indicate that the bootstrapping phase is done. When initial navigation is\n * `enabledBlocking`, the first navigation waits until bootstrapping is finished before continuing\n * to the activation phase.\n */\nconst BOOTSTRAP_DONE = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'bootstrap done indicator' : '', {\n    factory: () => {\n        return new Subject();\n    },\n});\nconst INITIAL_NAVIGATION = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'initial navigation' : '', { providedIn: 'root', factory: () => 1 /* InitialNavigation.EnabledNonBlocking */ });\n/**\n * Configures initial navigation to start before the root component is created.\n *\n * The bootstrap is blocked until the initial navigation is complete. This should be set in case\n * you use [server-side rendering](guide/ssr), but do not enable [hydration](guide/hydration) for\n * your application.\n *\n * @usageNotes\n *\n * Basic example of how you can enable this navigation behavior:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withEnabledBlockingInitialNavigation())\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @publicApi\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withEnabledBlockingInitialNavigation() {\n    const providers = [\n        { provide: INITIAL_NAVIGATION, useValue: 0 /* InitialNavigation.EnabledBlocking */ },\n        {\n            provide: APP_INITIALIZER,\n            multi: true,\n            deps: [Injector],\n            useFactory: (injector) => {\n                const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve());\n                return () => {\n                    return locationInitialized.then(() => {\n                        return new Promise((resolve) => {\n                            const router = injector.get(Router);\n                            const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n                            afterNextNavigation(router, () => {\n                                // Unblock APP_INITIALIZER in case the initial navigation was canceled or errored\n                                // without a redirect.\n                                resolve(true);\n                            });\n                            injector.get(NavigationTransitions).afterPreactivation = () => {\n                                // Unblock APP_INITIALIZER once we get to `afterPreactivation`. At this point, we\n                                // assume activation will complete successfully (even though this is not\n                                // guaranteed).\n                                resolve(true);\n                                return bootstrapDone.closed ? of(void 0) : bootstrapDone;\n                            };\n                            router.initialNavigation();\n                        });\n                    });\n                };\n            },\n        },\n    ];\n    return routerFeature(2 /* RouterFeatureKind.EnabledBlockingInitialNavigationFeature */, providers);\n}\n/**\n * Disables initial navigation.\n *\n * Use if there is a reason to have more control over when the router starts its initial navigation\n * due to some complex initialization logic.\n *\n * @usageNotes\n *\n * Basic example of how you can disable initial navigation:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withDisabledInitialNavigation())\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withDisabledInitialNavigation() {\n    const providers = [\n        {\n            provide: APP_INITIALIZER,\n            multi: true,\n            useFactory: () => {\n                const router = inject(Router);\n                return () => {\n                    router.setUpLocationChangeListener();\n                };\n            },\n        },\n        { provide: INITIAL_NAVIGATION, useValue: 2 /* InitialNavigation.Disabled */ },\n    ];\n    return routerFeature(3 /* RouterFeatureKind.DisabledInitialNavigationFeature */, providers);\n}\n/**\n * Enables logging of all internal navigation events to the console.\n * Extra logging might be useful for debugging purposes to inspect Router event sequence.\n *\n * @usageNotes\n *\n * Basic example of how you can enable debug tracing:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withDebugTracing())\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withDebugTracing() {\n    let providers = [];\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        providers = [\n            {\n                provide: ENVIRONMENT_INITIALIZER,\n                multi: true,\n                useFactory: () => {\n                    const router = inject(Router);\n                    return () => router.events.subscribe((e) => {\n                        // tslint:disable:no-console\n                        console.group?.(`Router Event: ${e.constructor.name}`);\n                        console.log(stringifyEvent(e));\n                        console.log(e);\n                        console.groupEnd?.();\n                        // tslint:enable:no-console\n                    });\n                },\n            },\n        ];\n    }\n    else {\n        providers = [];\n    }\n    return routerFeature(1 /* RouterFeatureKind.DebugTracingFeature */, providers);\n}\nconst ROUTER_PRELOADER = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'router preloader' : '');\n/**\n * Allows to configure a preloading strategy to use. The strategy is configured by providing a\n * reference to a class that implements a `PreloadingStrategy`.\n *\n * @usageNotes\n *\n * Basic example of how you can configure preloading:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withPreloading(PreloadAllModules))\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @param preloadingStrategy A reference to a class that implements a `PreloadingStrategy` that\n *     should be used.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withPreloading(preloadingStrategy) {\n    const providers = [\n        { provide: ROUTER_PRELOADER, useExisting: RouterPreloader },\n        { provide: PreloadingStrategy, useExisting: preloadingStrategy },\n    ];\n    return routerFeature(0 /* RouterFeatureKind.PreloadingFeature */, providers);\n}\n/**\n * Allows to provide extra parameters to configure Router.\n *\n * @usageNotes\n *\n * Basic example of how you can provide extra configuration options:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withRouterConfig({\n *          onSameUrlNavigation: 'reload'\n *       }))\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @param options A set of parameters to configure Router, see `RouterConfigOptions` for\n *     additional information.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withRouterConfig(options) {\n    const providers = [{ provide: ROUTER_CONFIGURATION, useValue: options }];\n    return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);\n}\n/**\n * Provides the location strategy that uses the URL fragment instead of the history API.\n *\n * @usageNotes\n *\n * Basic example of how you can use the hash location option:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withHashLocation())\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link provideRouter}\n * @see {@link HashLocationStrategy}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withHashLocation() {\n    const providers = [{ provide: LocationStrategy, useClass: HashLocationStrategy }];\n    return routerFeature(6 /* RouterFeatureKind.RouterHashLocationFeature */, providers);\n}\n/**\n * Provides a function which is called when a navigation error occurs.\n *\n * This function is run inside application's [injection context](guide/di/dependency-injection-context)\n * so you can use the [`inject`](api/core/inject) function.\n *\n * This function can return a `RedirectCommand` to convert the error to a redirect, similar to returning\n * a `UrlTree` or `RedirectCommand` from a guard. This will also prevent the `Router` from emitting\n * `NavigationError`; it will instead emit `NavigationCancel` with code NavigationCancellationCode.Redirect.\n * Return values other than `RedirectCommand` are ignored and do not change any behavior with respect to\n * how the `Router` handles the error.\n *\n * @usageNotes\n *\n * Basic example of how you can use the error handler option:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withNavigationErrorHandler((e: NavigationError) =>\n * inject(MyErrorTracker).trackError(e)))\n *     ]\n *   }\n * );\n * ```\n *\n * @see {@link NavigationError}\n * @see {@link core/inject}\n * @see {@link runInInjectionContext}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withNavigationErrorHandler(handler) {\n    const providers = [\n        {\n            provide: NAVIGATION_ERROR_HANDLER,\n            useValue: handler,\n        },\n    ];\n    return routerFeature(7 /* RouterFeatureKind.NavigationErrorHandlerFeature */, providers);\n}\n/**\n * Enables binding information from the `Router` state directly to the inputs of the component in\n * `Route` configurations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable the feature:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withComponentInputBinding())\n *     ]\n *   }\n * );\n * ```\n *\n * The router bindings information from any of the following sources:\n *\n *  - query parameters\n *  - path and matrix parameters\n *  - static route data\n *  - data from resolvers\n *\n * Duplicate keys are resolved in the same order from above, from least to greatest,\n * meaning that resolvers have the highest precedence and override any of the other information\n * from the route.\n *\n * Importantly, when an input does not have an item in the route data with a matching key, this\n * input is set to `undefined`. This prevents previous information from being\n * retained if the data got removed from the route (i.e. if a query parameter is removed).\n * Default values can be provided with a resolver on the route to ensure the value is always present\n * or an input and use an input transform in the component.\n *\n * @see {@link guide/components/inputs#input-transforms input transforms}\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withComponentInputBinding() {\n    const providers = [\n        RoutedComponentInputBinder,\n        { provide: INPUT_BINDER, useExisting: RoutedComponentInputBinder },\n    ];\n    return routerFeature(8 /* RouterFeatureKind.ComponentInputBindingFeature */, providers);\n}\n/**\n * Enables view transitions in the Router by running the route activation and deactivation inside of\n * `document.startViewTransition`.\n *\n * Note: The View Transitions API is not available in all browsers. If the browser does not support\n * view transitions, the Router will not attempt to start a view transition and continue processing\n * the navigation as usual.\n *\n * @usageNotes\n *\n * Basic example of how you can enable the feature:\n * ```ts\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n *   {\n *     providers: [\n *       provideRouter(appRoutes, withViewTransitions())\n *     ]\n *   }\n * );\n * ```\n *\n * @returns A set of providers for use with `provideRouter`.\n * @see https://developer.chrome.com/docs/web-platform/view-transitions/\n * @see https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API\n * @developerPreview\n */\nfunction withViewTransitions(options) {\n    const providers = [\n        { provide: CREATE_VIEW_TRANSITION, useValue: createViewTransition },\n        {\n            provide: VIEW_TRANSITION_OPTIONS,\n            useValue: { skipNextTransition: !!options?.skipInitialTransition, ...options },\n        },\n    ];\n    return routerFeature(9 /* RouterFeatureKind.ViewTransitionsFeature */, providers);\n}\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent];\n/**\n * @docsNotRequired\n */\nconst ROUTER_FORROOT_GUARD = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode\n    ? 'router duplicate forRoot guard'\n    : 'ROUTER_FORROOT_GUARD');\n// TODO(atscott): All of these except `ActivatedRoute` are `providedIn: 'root'`. They are only kept\n// here to avoid a breaking change whereby the provider order matters based on where the\n// `RouterModule`/`RouterTestingModule` is imported. These can/should be removed as a \"breaking\"\n// change in a major version.\nconst ROUTER_PROVIDERS = [\n    Location,\n    { provide: UrlSerializer, useClass: DefaultUrlSerializer },\n    Router,\n    ChildrenOutletContexts,\n    { provide: ActivatedRoute, useFactory: rootRoute, deps: [Router] },\n    RouterConfigLoader,\n    // Only used to warn when `provideRoutes` is used without `RouterModule` or `provideRouter`. Can\n    // be removed when `provideRoutes` is removed.\n    typeof ngDevMode === 'undefined' || ngDevMode\n        ? { provide: ROUTER_IS_PROVIDED, useValue: true }\n        : [],\n];\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\nclass RouterModule {\n    constructor(guard) { }\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     * When registering the NgModule at the root, import as follows:\n     *\n     * ```\n     * @NgModule({\n     *   imports: [RouterModule.forRoot(ROUTES)]\n     * })\n     * class MyNgModule {}\n     * ```\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 `NgModule`.\n     *\n     */\n    static forRoot(routes, config) {\n        return {\n            ngModule: RouterModule,\n            providers: [\n                ROUTER_PROVIDERS,\n                typeof ngDevMode === 'undefined' || ngDevMode\n                    ? config?.enableTracing\n                        ? withDebugTracing().ɵproviders\n                        : []\n                    : [],\n                { provide: ROUTES, multi: true, useValue: routes },\n                {\n                    provide: ROUTER_FORROOT_GUARD,\n                    useFactory: provideForRootGuard,\n                    deps: [[Router, new Optional(), new SkipSelf()]],\n                },\n                config?.errorHandler\n                    ? {\n                        provide: NAVIGATION_ERROR_HANDLER,\n                        useValue: config.errorHandler,\n                    }\n                    : [],\n                { provide: ROUTER_CONFIGURATION, useValue: config ? config : {} },\n                config?.useHash ? provideHashLocationStrategy() : providePathLocationStrategy(),\n                provideRouterScroller(),\n                config?.preloadingStrategy ? withPreloading(config.preloadingStrategy).ɵproviders : [],\n                config?.initialNavigation ? provideInitialNavigation(config) : [],\n                config?.bindToComponentInputs ? withComponentInputBinding().ɵproviders : [],\n                config?.enableViewTransitions ? withViewTransitions().ɵproviders : [],\n                provideRouterInitializer(),\n            ],\n        };\n    }\n    /**\n     * Creates a module with all the router directives and a provider registering routes,\n     * without creating a new Router service.\n     * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n     *\n     * ```\n     * @NgModule({\n     *   imports: [RouterModule.forChild(ROUTES)]\n     * })\n     * class MyNgModule {}\n     * ```\n     *\n     * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n     * @return The new NgModule.\n     *\n     */\n    static forChild(routes) {\n        return {\n            ngModule: RouterModule,\n            providers: [{ provide: ROUTES, multi: true, useValue: routes }],\n        };\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterModule, deps: [{ token: ROUTER_FORROOT_GUARD, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterModule, imports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent], exports: [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RouterModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: ROUTER_DIRECTIVES,\n                    exports: ROUTER_DIRECTIVES,\n                }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [ROUTER_FORROOT_GUARD]\n                }] }] });\n/**\n * For internal use by `RouterModule` only. Note that this differs from `withInMemoryRouterScroller`\n * because it reads from the `ExtraOptions` which should not be used in the standalone world.\n */\nfunction provideRouterScroller() {\n    return {\n        provide: ROUTER_SCROLLER,\n        useFactory: () => {\n            const viewportScroller = inject(ViewportScroller);\n            const zone = inject(NgZone);\n            const config = inject(ROUTER_CONFIGURATION);\n            const transitions = inject(NavigationTransitions);\n            const urlSerializer = inject(UrlSerializer);\n            if (config.scrollOffset) {\n                viewportScroller.setOffset(config.scrollOffset);\n            }\n            return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, config);\n        },\n    };\n}\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` should\n// provide hash location directly via `{provide: LocationStrategy, useClass: HashLocationStrategy}`.\nfunction provideHashLocationStrategy() {\n    return { provide: LocationStrategy, useClass: HashLocationStrategy };\n}\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` does not\n// need this at all because `PathLocationStrategy` is the default factory for `LocationStrategy`.\nfunction providePathLocationStrategy() {\n    return { provide: LocationStrategy, useClass: PathLocationStrategy };\n}\nfunction provideForRootGuard(router) {\n    if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n        throw new ɵRuntimeError(4007 /* RuntimeErrorCode.FOR_ROOT_CALLED_TWICE */, `The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector.` +\n            ` Lazy loaded modules should use RouterModule.forChild() instead.`);\n    }\n    return 'guarded';\n}\n// Note: For internal use only with `RouterModule`. Standalone router setup with `provideRouter`\n// users call `withXInitialNavigation` directly.\nfunction provideInitialNavigation(config) {\n    return [\n        config.initialNavigation === 'disabled' ? withDisabledInitialNavigation().ɵproviders : [],\n        config.initialNavigation === 'enabledBlocking'\n            ? withEnabledBlockingInitialNavigation().ɵproviders\n            : [],\n    ];\n}\n// TODO(atscott): This should not be in the public API\n/**\n * A DI token for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nconst ROUTER_INITIALIZER = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'Router Initializer' : '');\nfunction provideRouterInitializer() {\n    return [\n        // ROUTER_INITIALIZER token should be removed. It's public API but shouldn't be. We can just\n        // have `getBootstrapListener` directly attached to APP_BOOTSTRAP_LISTENER.\n        { provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener },\n        { provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER },\n    ];\n}\n\n/**\n * Maps an array of injectable classes with canMatch functions to an array of equivalent\n * `CanMatchFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToCanMatch(providers) {\n    return providers.map((provider) => (...params) => inject(provider).canMatch(...params));\n}\n/**\n * Maps an array of injectable classes with canActivate functions to an array of equivalent\n * `CanActivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToCanActivate(providers) {\n    return providers.map((provider) => (...params) => inject(provider).canActivate(...params));\n}\n/**\n * Maps an array of injectable classes with canActivateChild functions to an array of equivalent\n * `CanActivateChildFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToCanActivateChild(providers) {\n    return providers.map((provider) => (...params) => inject(provider).canActivateChild(...params));\n}\n/**\n * Maps an array of injectable classes with canDeactivate functions to an array of equivalent\n * `CanDeactivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToCanDeactivate(providers) {\n    return providers.map((provider) => (...params) => inject(provider).canDeactivate(...params));\n}\n/**\n * Maps an injectable class with a resolve function to an equivalent `ResolveFn`\n * for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='Resolve'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToResolve(provider) {\n    return (...params) => inject(provider).resolve(...params);\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('19.0.5');\n\nfunction getLoadedRoutes(route) {\n    return route._loadedRoutes;\n}\nɵpublishExternalGlobalUtil('ɵgetLoadedRoutes', getLoadedRoutes);\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, EventType, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationError, NavigationSkipped, NavigationSkippedCode, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTER_OUTLET_DATA, ROUTES, RedirectCommand, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, mapToCanActivate, mapToCanActivateChild, mapToCanDeactivate, mapToCanMatch, mapToResolve, provideRouter, provideRoutes, withComponentInputBinding, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, withViewTransitions, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, afterNextNavigation as ɵafterNextNavigation, loadChildren as ɵloadChildren };\n","import { Observable } from '../Observable';\nimport { isFunction } from './isFunction';\nexport function isObservable(obj) {\n    return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe)));\n}\n","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n    return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n    return (source, subscriber) => {\n        let hasState = hasSeed;\n        let state = seed;\n        let index = 0;\n        source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n            const i = index++;\n            state = hasState\n                ?\n                    accumulator(state, value, i)\n                :\n                    ((hasState = true), value);\n            emitOnNext && subscriber.next(state);\n        }, emitBeforeComplete &&\n            (() => {\n                hasState && subscriber.next(state);\n                subscriber.complete();\n            })));\n    };\n}\n","import { 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    const hasDefaultValue = arguments.length >= 2;\n    return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","/**\n * @license Angular v19.0.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { Injectable, inject, NgZone, runInInjectionContext, InjectionToken, ɵPendingTasksInternal, PLATFORM_ID, ɵConsole, ɵformatRuntimeError, Inject, ɵRuntimeError, makeEnvironmentProviders, NgModule, TransferState, makeStateKey, ɵperformanceMarkFeature, APP_BOOTSTRAP_LISTENER, ApplicationRef, ɵtruncateMiddle } from '@angular/core';\nimport { of, Observable, from } from 'rxjs';\nimport { concatMap, filter, map, finalize, switchMap, tap } from 'rxjs/operators';\nimport * as i1 from '@angular/common';\nimport { isPlatformServer, DOCUMENT, ɵparseCookieValue } from '@angular/common';\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 */\nclass 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 */\nclass HttpBackend {\n}\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 */\nclass HttpHeaders {\n    /**\n     * Internal map of lowercase header names to values.\n     */\n    // TODO(issue/24571): remove '!'.\n    headers;\n    /**\n     * Internal map of lowercased header names to the normalized\n     * form of the name (the form seen first).\n     */\n    normalizedNames = new Map();\n    /**\n     * Complete the lazy initialization of this object (needed before reading).\n     */\n    lazyInit;\n    /**\n     * Queued updates to be materialized the next initialization.\n     */\n    lazyUpdate = null;\n    /**  Constructs a new HTTP header object with the given values.*/\n    constructor(headers) {\n        if (!headers) {\n            this.headers = new Map();\n        }\n        else if (typeof headers === 'string') {\n            this.lazyInit = () => {\n                this.headers = new Map();\n                headers.split('\\n').forEach((line) => {\n                    const index = line.indexOf(':');\n                    if (index > 0) {\n                        const name = line.slice(0, index);\n                        const value = line.slice(index + 1).trim();\n                        this.addHeaderEntry(name, value);\n                    }\n                });\n            };\n        }\n        else if (typeof Headers !== 'undefined' && headers instanceof Headers) {\n            this.headers = new Map();\n            headers.forEach((value, name) => {\n                this.addHeaderEntry(name, value);\n            });\n        }\n        else {\n            this.lazyInit = () => {\n                if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                    assertValidHeaders(headers);\n                }\n                this.headers = new Map();\n                Object.entries(headers).forEach(([name, values]) => {\n                    this.setHeaderEntries(name, values);\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    has(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    get(name) {\n        this.init();\n        const 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    keys() {\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    getAll(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    append(name, value) {\n        return this.clone({ name, 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 override for the given header.\n     *\n     * @returns A clone of the HTTP headers object with the newly set header value.\n     */\n    set(name, value) {\n        return this.clone({ name, 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    delete(name, value) {\n        return this.clone({ name, value, op: 'd' });\n    }\n    maybeSetNormalizedName(name, lcName) {\n        if (!this.normalizedNames.has(lcName)) {\n            this.normalizedNames.set(lcName, name);\n        }\n    }\n    init() {\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((update) => this.applyUpdate(update));\n                this.lazyUpdate = null;\n            }\n        }\n    }\n    copyFrom(other) {\n        other.init();\n        Array.from(other.headers.keys()).forEach((key) => {\n            this.headers.set(key, other.headers.get(key));\n            this.normalizedNames.set(key, other.normalizedNames.get(key));\n        });\n    }\n    clone(update) {\n        const clone = new HttpHeaders();\n        clone.lazyInit = !!this.lazyInit && this.lazyInit instanceof HttpHeaders ? this.lazyInit : this;\n        clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);\n        return clone;\n    }\n    applyUpdate(update) {\n        const key = update.name.toLowerCase();\n        switch (update.op) {\n            case 'a':\n            case 's':\n                let 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                const base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];\n                base.push(...value);\n                this.headers.set(key, base);\n                break;\n            case 'd':\n                const toDelete = update.value;\n                if (!toDelete) {\n                    this.headers.delete(key);\n                    this.normalizedNames.delete(key);\n                }\n                else {\n                    let existing = this.headers.get(key);\n                    if (!existing) {\n                        return;\n                    }\n                    existing = existing.filter((value) => toDelete.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    addHeaderEntry(name, value) {\n        const key = name.toLowerCase();\n        this.maybeSetNormalizedName(name, 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    setHeaderEntries(name, values) {\n        const headerValues = (Array.isArray(values) ? values : [values]).map((value) => value.toString());\n        const key = name.toLowerCase();\n        this.headers.set(key, headerValues);\n        this.maybeSetNormalizedName(name, key);\n    }\n    /**\n     * @internal\n     */\n    forEach(fn) {\n        this.init();\n        Array.from(this.normalizedNames.keys()).forEach((key) => fn(this.normalizedNames.get(key), this.headers.get(key)));\n    }\n}\n/**\n * Verifies that the headers object has the right shape: the values\n * must be either strings, numbers or arrays. Throws an error if an invalid\n * header value is present.\n */\nfunction assertValidHeaders(headers) {\n    for (const [key, value] of Object.entries(headers)) {\n        if (!(typeof value === 'string' || typeof value === 'number') && !Array.isArray(value)) {\n            throw new Error(`Unexpected value of the \\`${key}\\` header provided. ` +\n                `Expecting either a string, a number or an array, but got: \\`${value}\\`.`);\n        }\n    }\n}\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 */\nclass HttpUrlEncodingCodec {\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    encodeKey(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    encodeValue(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    decodeKey(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    decodeValue(value) {\n        return decodeURIComponent(value);\n    }\n}\nfunction paramParser(rawParams, codec) {\n    const map = new Map();\n    if (rawParams.length > 0) {\n        // The `window.location.search` can be used while creating an instance of the `HttpParams` class\n        // (e.g. `new HttpParams({ fromString: window.location.search })`). The `window.location.search`\n        // may start with the `?` char, so we strip it if it's present.\n        const params = rawParams.replace(/^\\?/, '').split('&');\n        params.forEach((param) => {\n            const eqIdx = param.indexOf('=');\n            const [key, val] = eqIdx == -1\n                ? [codec.decodeKey(param), '']\n                : [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))];\n            const list = map.get(key) || [];\n            list.push(val);\n            map.set(key, list);\n        });\n    }\n    return map;\n}\n/**\n * Encode input string with standard encodeURIComponent and then un-encode specific characters.\n */\nconst STANDARD_ENCODING_REGEX = /%(\\d[a-f0-9])/gi;\nconst STANDARD_ENCODING_REPLACEMENTS = {\n    '40': '@',\n    '3A': ':',\n    '24': '$',\n    '2C': ',',\n    '3B': ';',\n    '3D': '=',\n    '3F': '?',\n    '2F': '/',\n};\nfunction standardEncoding(v) {\n    return encodeURIComponent(v).replace(STANDARD_ENCODING_REGEX, (s, t) => STANDARD_ENCODING_REPLACEMENTS[t] ?? s);\n}\nfunction valueToString(value) {\n    return `${value}`;\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 */\nclass HttpParams {\n    map;\n    encoder;\n    updates = null;\n    cloneFrom = null;\n    constructor(options = {}) {\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((key) => {\n                const value = options.fromObject[key];\n                // convert the values to strings\n                const values = Array.isArray(value) ? value.map(valueToString) : [valueToString(value)];\n                this.map.set(key, values);\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    has(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    get(param) {\n        this.init();\n        const 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    getAll(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    keys() {\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    append(param, value) {\n        return this.clone({ param, value, op: 'a' });\n    }\n    /**\n     * Constructs a new body with appended values for the given parameter name.\n     * @param params parameters and values\n     * @return A new body with the new value.\n     */\n    appendAll(params) {\n        const updates = [];\n        Object.keys(params).forEach((param) => {\n            const value = params[param];\n            if (Array.isArray(value)) {\n                value.forEach((_value) => {\n                    updates.push({ param, value: _value, op: 'a' });\n                });\n            }\n            else {\n                updates.push({ param, value: value, op: 'a' });\n            }\n        });\n        return this.clone(updates);\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    set(param, value) {\n        return this.clone({ param, 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    delete(param, value) {\n        return this.clone({ param, 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    toString() {\n        this.init();\n        return (this.keys()\n            .map((key) => {\n            const 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)\n                .map((value) => 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((param) => param !== '')\n            .join('&'));\n    }\n    clone(update) {\n        const clone = new HttpParams({ encoder: this.encoder });\n        clone.cloneFrom = this.cloneFrom || this;\n        clone.updates = (this.updates || []).concat(update);\n        return clone;\n    }\n    init() {\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((key) => this.map.set(key, this.cloneFrom.map.get(key)));\n            this.updates.forEach((update) => {\n                switch (update.op) {\n                    case 'a':\n                    case 's':\n                        const base = (update.op === 'a' ? this.map.get(update.param) : undefined) || [];\n                        base.push(valueToString(update.value));\n                        this.map.set(update.param, base);\n                        break;\n                    case 'd':\n                        if (update.value !== undefined) {\n                            let base = this.map.get(update.param) || [];\n                            const idx = base.indexOf(valueToString(update.value));\n                            if (idx !== -1) {\n                                base.splice(idx, 1);\n                            }\n                            if (base.length > 0) {\n                                this.map.set(update.param, base);\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}\n\n/**\n * A token used to manipulate and access values stored in `HttpContext`.\n *\n * @publicApi\n */\nclass HttpContextToken {\n    defaultValue;\n    constructor(defaultValue) {\n        this.defaultValue = defaultValue;\n    }\n}\n/**\n * Http context stores arbitrary user defined values and ensures type safety without\n * actually knowing the types. It is backed by a `Map` and guarantees that keys do not clash.\n *\n * This context is mutable and is shared between cloned requests unless explicitly specified.\n *\n * @usageNotes\n *\n * ### Usage Example\n *\n * ```ts\n * // inside cache.interceptors.ts\n * export const IS_CACHE_ENABLED = new HttpContextToken<boolean>(() => false);\n *\n * export class CacheInterceptor implements HttpInterceptor {\n *\n *   intercept(req: HttpRequest<any>, delegate: HttpHandler): Observable<HttpEvent<any>> {\n *     if (req.context.get(IS_CACHE_ENABLED) === true) {\n *       return ...;\n *     }\n *     return delegate.handle(req);\n *   }\n * }\n *\n * // inside a service\n *\n * this.httpClient.get('/api/weather', {\n *   context: new HttpContext().set(IS_CACHE_ENABLED, true)\n * }).subscribe(...);\n * ```\n *\n * @publicApi\n */\nclass HttpContext {\n    map = new Map();\n    /**\n     * Store a value in the context. If a value is already present it will be overwritten.\n     *\n     * @param token The reference to an instance of `HttpContextToken`.\n     * @param value The value to store.\n     *\n     * @returns A reference to itself for easy chaining.\n     */\n    set(token, value) {\n        this.map.set(token, value);\n        return this;\n    }\n    /**\n     * Retrieve the value associated with the given token.\n     *\n     * @param token The reference to an instance of `HttpContextToken`.\n     *\n     * @returns The stored value or default if one is defined.\n     */\n    get(token) {\n        if (!this.map.has(token)) {\n            this.map.set(token, token.defaultValue());\n        }\n        return this.map.get(token);\n    }\n    /**\n     * Delete the value associated with the given token.\n     *\n     * @param token The reference to an instance of `HttpContextToken`.\n     *\n     * @returns A reference to itself for easy chaining.\n     */\n    delete(token) {\n        this.map.delete(token);\n        return this;\n    }\n    /**\n     * Checks for existence of a given token.\n     *\n     * @param token The reference to an instance of `HttpContextToken`.\n     *\n     * @returns True if the token exists, false otherwise.\n     */\n    has(token) {\n        return this.map.has(token);\n    }\n    /**\n     * @returns a list of tokens currently stored in the context.\n     */\n    keys() {\n        return this.map.keys();\n    }\n}\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 * Safely assert whether the given value is a URLSearchParams instance.\n *\n * In some execution environments URLSearchParams is not defined.\n */\nfunction isUrlSearchParams(value) {\n    return typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams;\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 */\nclass HttpRequest {\n    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    body = null;\n    /**\n     * Outgoing headers for this request.\n     */\n    // TODO(issue/24571): remove '!'.\n    headers;\n    /**\n     * Shared and mutable context that can be used by interceptors\n     */\n    context;\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     * Note: The `FetchBackend` doesn't support progress report on uploads.\n     */\n    reportProgress = false;\n    /**\n     * Whether this request should be sent with outgoing credentials (cookies).\n     */\n    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    responseType = 'json';\n    /**\n     * The outgoing HTTP request method.\n     */\n    method;\n    /**\n     * Outgoing URL parameters.\n     *\n     * To pass a string representation of HTTP parameters in the URL-query-string format,\n     * the `HttpParamsOptions`' `fromString` may be used. For example:\n     *\n     * ```\n     * new HttpParams({fromString: 'angular=awesome'})\n     * ```\n     */\n    // TODO(issue/24571): remove '!'.\n    params;\n    /**\n     * The outgoing URL with all URL parameters set.\n     */\n    urlWithParams;\n    /**\n     * The HttpTransferCache option for the request\n     */\n    transferCache;\n    constructor(method, url, third, fourth) {\n        this.url = url;\n        this.method = method.toUpperCase();\n        // Next, need to figure out which argument holds the HttpRequestInit\n        // options, if any.\n        let 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.context) {\n                this.context = options.context;\n            }\n            if (!!options.params) {\n                this.params = options.params;\n            }\n            // We do want to assign transferCache even if it's falsy (false is valid value)\n            this.transferCache = options.transferCache;\n        }\n        // If no headers have been passed in, construct a new HttpHeaders instance.\n        this.headers ??= new HttpHeaders();\n        // If no context have been passed in, construct a new HttpContext instance.\n        this.context ??= new HttpContext();\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            const 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                const 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                const 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    serializeBody() {\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 (typeof this.body === 'string' ||\n            isArrayBuffer(this.body) ||\n            isBlob(this.body) ||\n            isFormData(this.body) ||\n            isUrlSearchParams(this.body)) {\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' ||\n            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    detectContentTypeHeader() {\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, boolean and numbers will be encoded as JSON.\n        if (typeof this.body === 'object' ||\n            typeof this.body === 'number' ||\n            typeof this.body === 'boolean') {\n            return 'application/json';\n        }\n        // No type could be inferred.\n        return null;\n    }\n    clone(update = {}) {\n        // For method, url, and responseType, take the current value unless\n        // it is overridden in the update hash.\n        const method = update.method || this.method;\n        const url = update.url || this.url;\n        const responseType = update.responseType || this.responseType;\n        // Carefully handle the transferCache to differentiate between\n        // `false` and `undefined` in the update args.\n        const transferCache = update.transferCache ?? this.transferCache;\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        const 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        const withCredentials = update.withCredentials ?? this.withCredentials;\n        const reportProgress = update.reportProgress ?? this.reportProgress;\n        // Headers and params may be appended to if `setHeaders` or\n        // `setParams` are used.\n        let headers = update.headers || this.headers;\n        let params = update.params || this.params;\n        // Pass on context if needed\n        const context = update.context ?? this.context;\n        // Check whether the caller has asked to add headers.\n        if (update.setHeaders !== undefined) {\n            // Set every requested header.\n            headers = Object.keys(update.setHeaders).reduce((headers, name) => 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).reduce((params, param) => 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,\n            headers,\n            context,\n            reportProgress,\n            responseType,\n            withCredentials,\n            transferCache,\n        });\n    }\n}\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     * Note: The `FetchBackend` doesn't support progress report on uploads.\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 */\nclass HttpResponseBase {\n    /**\n     * All response headers.\n     */\n    headers;\n    /**\n     * Response status code.\n     */\n    status;\n    /**\n     * Textual description of response status code, defaults to OK.\n     *\n     * Do not depend on this.\n     */\n    statusText;\n    /**\n     * URL of the resource retrieved, or null if not available.\n     */\n    url;\n    /**\n     * Whether the status code falls in the 2xx range.\n     */\n    ok;\n    /**\n     * Type of the response, narrowed to either the full response or the header.\n     */\n    // TODO(issue/24571): remove '!'.\n    type;\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    constructor(init, defaultStatus = 200, 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}\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 */\nclass HttpHeaderResponse extends HttpResponseBase {\n    /**\n     * Create a new `HttpHeaderResponse` with the given parameters.\n     */\n    constructor(init = {}) {\n        super(init);\n    }\n    type = HttpEventType.ResponseHeader;\n    /**\n     * Copy this `HttpHeaderResponse`, overriding its contents with the\n     * given parameter hash.\n     */\n    clone(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}\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 */\nclass HttpResponse extends HttpResponseBase {\n    /**\n     * The response body, or `null` if one was not returned.\n     */\n    body;\n    /**\n     * Construct a new `HttpResponse`.\n     */\n    constructor(init = {}) {\n        super(init);\n        this.body = init.body !== undefined ? init.body : null;\n    }\n    type = HttpEventType.Response;\n    clone(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}\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 */\nclass HttpErrorResponse extends HttpResponseBase {\n    name = 'HttpErrorResponse';\n    message;\n    error;\n    /**\n     * Errors are never okay, even when the status code is in the 2xx success range.\n     */\n    ok = false;\n    constructor(init) {\n        // Initialize with a default status of 0 / Unknown Error.\n        super(init, 0, 'Unknown Error');\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    }\n}\n/**\n * We use these constant to prevent pulling the whole HttpStatusCode enum\n * Those are the only ones referenced directly by the framework\n */\nconst HTTP_STATUS_CODE_OK = 200;\nconst HTTP_STATUS_CODE_NO_CONTENT = 204;\n/**\n * Http status codes.\n * As per https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n * @publicApi\n */\nvar HttpStatusCode;\n(function (HttpStatusCode) {\n    HttpStatusCode[HttpStatusCode[\"Continue\"] = 100] = \"Continue\";\n    HttpStatusCode[HttpStatusCode[\"SwitchingProtocols\"] = 101] = \"SwitchingProtocols\";\n    HttpStatusCode[HttpStatusCode[\"Processing\"] = 102] = \"Processing\";\n    HttpStatusCode[HttpStatusCode[\"EarlyHints\"] = 103] = \"EarlyHints\";\n    HttpStatusCode[HttpStatusCode[\"Ok\"] = 200] = \"Ok\";\n    HttpStatusCode[HttpStatusCode[\"Created\"] = 201] = \"Created\";\n    HttpStatusCode[HttpStatusCode[\"Accepted\"] = 202] = \"Accepted\";\n    HttpStatusCode[HttpStatusCode[\"NonAuthoritativeInformation\"] = 203] = \"NonAuthoritativeInformation\";\n    HttpStatusCode[HttpStatusCode[\"NoContent\"] = 204] = \"NoContent\";\n    HttpStatusCode[HttpStatusCode[\"ResetContent\"] = 205] = \"ResetContent\";\n    HttpStatusCode[HttpStatusCode[\"PartialContent\"] = 206] = \"PartialContent\";\n    HttpStatusCode[HttpStatusCode[\"MultiStatus\"] = 207] = \"MultiStatus\";\n    HttpStatusCode[HttpStatusCode[\"AlreadyReported\"] = 208] = \"AlreadyReported\";\n    HttpStatusCode[HttpStatusCode[\"ImUsed\"] = 226] = \"ImUsed\";\n    HttpStatusCode[HttpStatusCode[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n    HttpStatusCode[HttpStatusCode[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n    HttpStatusCode[HttpStatusCode[\"Found\"] = 302] = \"Found\";\n    HttpStatusCode[HttpStatusCode[\"SeeOther\"] = 303] = \"SeeOther\";\n    HttpStatusCode[HttpStatusCode[\"NotModified\"] = 304] = \"NotModified\";\n    HttpStatusCode[HttpStatusCode[\"UseProxy\"] = 305] = \"UseProxy\";\n    HttpStatusCode[HttpStatusCode[\"Unused\"] = 306] = \"Unused\";\n    HttpStatusCode[HttpStatusCode[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n    HttpStatusCode[HttpStatusCode[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n    HttpStatusCode[HttpStatusCode[\"BadRequest\"] = 400] = \"BadRequest\";\n    HttpStatusCode[HttpStatusCode[\"Unauthorized\"] = 401] = \"Unauthorized\";\n    HttpStatusCode[HttpStatusCode[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n    HttpStatusCode[HttpStatusCode[\"Forbidden\"] = 403] = \"Forbidden\";\n    HttpStatusCode[HttpStatusCode[\"NotFound\"] = 404] = \"NotFound\";\n    HttpStatusCode[HttpStatusCode[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n    HttpStatusCode[HttpStatusCode[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n    HttpStatusCode[HttpStatusCode[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n    HttpStatusCode[HttpStatusCode[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n    HttpStatusCode[HttpStatusCode[\"Conflict\"] = 409] = \"Conflict\";\n    HttpStatusCode[HttpStatusCode[\"Gone\"] = 410] = \"Gone\";\n    HttpStatusCode[HttpStatusCode[\"LengthRequired\"] = 411] = \"LengthRequired\";\n    HttpStatusCode[HttpStatusCode[\"PreconditionFailed\"] = 412] = \"PreconditionFailed\";\n    HttpStatusCode[HttpStatusCode[\"PayloadTooLarge\"] = 413] = \"PayloadTooLarge\";\n    HttpStatusCode[HttpStatusCode[\"UriTooLong\"] = 414] = \"UriTooLong\";\n    HttpStatusCode[HttpStatusCode[\"UnsupportedMediaType\"] = 415] = \"UnsupportedMediaType\";\n    HttpStatusCode[HttpStatusCode[\"RangeNotSatisfiable\"] = 416] = \"RangeNotSatisfiable\";\n    HttpStatusCode[HttpStatusCode[\"ExpectationFailed\"] = 417] = \"ExpectationFailed\";\n    HttpStatusCode[HttpStatusCode[\"ImATeapot\"] = 418] = \"ImATeapot\";\n    HttpStatusCode[HttpStatusCode[\"MisdirectedRequest\"] = 421] = \"MisdirectedRequest\";\n    HttpStatusCode[HttpStatusCode[\"UnprocessableEntity\"] = 422] = \"UnprocessableEntity\";\n    HttpStatusCode[HttpStatusCode[\"Locked\"] = 423] = \"Locked\";\n    HttpStatusCode[HttpStatusCode[\"FailedDependency\"] = 424] = \"FailedDependency\";\n    HttpStatusCode[HttpStatusCode[\"TooEarly\"] = 425] = \"TooEarly\";\n    HttpStatusCode[HttpStatusCode[\"UpgradeRequired\"] = 426] = \"UpgradeRequired\";\n    HttpStatusCode[HttpStatusCode[\"PreconditionRequired\"] = 428] = \"PreconditionRequired\";\n    HttpStatusCode[HttpStatusCode[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n    HttpStatusCode[HttpStatusCode[\"RequestHeaderFieldsTooLarge\"] = 431] = \"RequestHeaderFieldsTooLarge\";\n    HttpStatusCode[HttpStatusCode[\"UnavailableForLegalReasons\"] = 451] = \"UnavailableForLegalReasons\";\n    HttpStatusCode[HttpStatusCode[\"InternalServerError\"] = 500] = \"InternalServerError\";\n    HttpStatusCode[HttpStatusCode[\"NotImplemented\"] = 501] = \"NotImplemented\";\n    HttpStatusCode[HttpStatusCode[\"BadGateway\"] = 502] = \"BadGateway\";\n    HttpStatusCode[HttpStatusCode[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n    HttpStatusCode[HttpStatusCode[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n    HttpStatusCode[HttpStatusCode[\"HttpVersionNotSupported\"] = 505] = \"HttpVersionNotSupported\";\n    HttpStatusCode[HttpStatusCode[\"VariantAlsoNegotiates\"] = 506] = \"VariantAlsoNegotiates\";\n    HttpStatusCode[HttpStatusCode[\"InsufficientStorage\"] = 507] = \"InsufficientStorage\";\n    HttpStatusCode[HttpStatusCode[\"LoopDetected\"] = 508] = \"LoopDetected\";\n    HttpStatusCode[HttpStatusCode[\"NotExtended\"] = 510] = \"NotExtended\";\n    HttpStatusCode[HttpStatusCode[\"NetworkAuthenticationRequired\"] = 511] = \"NetworkAuthenticationRequired\";\n})(HttpStatusCode || (HttpStatusCode = {}));\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,\n        headers: options.headers,\n        context: options.context,\n        observe: options.observe,\n        params: options.params,\n        reportProgress: options.reportProgress,\n        responseType: options.responseType,\n        withCredentials: options.withCredentials,\n        transferCache: options.transferCache,\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 * TODO(adev): review\n * @usageNotes\n *\n * ### HTTP Request Example\n *\n * ```ts\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 *\n * Alternatively, the parameter string can be used without invoking HttpParams\n * by directly joining to the URL.\n * ```ts\n * this.httpClient.request('GET', this.heroesUrl + '?' + 'name=term', {responseType:'json'});\n * ```\n *\n *\n * ### JSONP Example\n * ```ts\n * requestJsonp(url, callback = 'callback') {\n *  return this.httpClient.jsonp(this.heroesURL, callback);\n * }\n * ```\n *\n * ### PATCH Example\n * ```ts\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 * @see [HTTP Request](api/common/http/HttpRequest)\n *\n * @publicApi\n */\nclass HttpClient {\n    handler;\n    constructor(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    request(first, url, options = {}) {\n        let 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            let 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            let 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,\n                context: options.context,\n                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                transferCache: options.transferCache,\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        const events$ = of(req).pipe(concatMap((req) => 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        const res$ = (events$.pipe(filter((event) => 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((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((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((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((res) => 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    delete(url, 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    get(url, 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    head(url, 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    jsonp(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 capabilities of an endpoint,\n     * without implying a resource action. See the individual overloads for\n     * details on the return type.\n     */\n    options(url, 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    patch(url, body, 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    post(url, body, 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    put(url, body, options = {}) {\n        return this.request('PUT', url, addBody(options, body));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClient, deps: [{ token: HttpHandler }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClient });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClient, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: HttpHandler }] });\n\nconst XSSI_PREFIX$1 = /^\\)\\]\\}',?\\n/;\nconst REQUEST_URL_HEADER = `X-Request-URL`;\n/**\n * Determine an appropriate URL for the response, by checking either\n * response url or the X-Request-URL header.\n */\nfunction getResponseUrl$1(response) {\n    if (response.url) {\n        return response.url;\n    }\n    // stored as lowercase in the map\n    const xRequestUrl = REQUEST_URL_HEADER.toLocaleLowerCase();\n    return response.headers.get(xRequestUrl);\n}\n/**\n * Uses `fetch` to send requests to a backend server.\n *\n * This `FetchBackend` requires the support of the\n * [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) which is available on all\n * supported browsers and on Node.js v18 or later.\n *\n * @see {@link HttpHandler}\n *\n * @publicApi\n */\nclass FetchBackend {\n    // We use an arrow function to always reference the current global implementation of `fetch`.\n    // This is helpful for cases when the global `fetch` implementation is modified by external code,\n    // see https://github.com/angular/angular/issues/57527.\n    fetchImpl = inject(FetchFactory, { optional: true })?.fetch ?? ((...args) => globalThis.fetch(...args));\n    ngZone = inject(NgZone);\n    handle(request) {\n        return new Observable((observer) => {\n            const aborter = new AbortController();\n            this.doRequest(request, aborter.signal, observer).then(noop, (error) => observer.error(new HttpErrorResponse({ error })));\n            return () => aborter.abort();\n        });\n    }\n    async doRequest(request, signal, observer) {\n        const init = this.createRequestInit(request);\n        let response;\n        try {\n            // Run fetch outside of Angular zone.\n            // This is due to Node.js fetch implementation (Undici) which uses a number of setTimeouts to check if\n            // the response should eventually timeout which causes extra CD cycles every 500ms\n            const fetchPromise = this.ngZone.runOutsideAngular(() => this.fetchImpl(request.urlWithParams, { signal, ...init }));\n            // Make sure Zone.js doesn't trigger false-positive unhandled promise\n            // error in case the Promise is rejected synchronously. See function\n            // description for additional information.\n            silenceSuperfluousUnhandledPromiseRejection(fetchPromise);\n            // Send the `Sent` event before awaiting the response.\n            observer.next({ type: HttpEventType.Sent });\n            response = await fetchPromise;\n        }\n        catch (error) {\n            observer.error(new HttpErrorResponse({\n                error,\n                status: error.status ?? 0,\n                statusText: error.statusText,\n                url: request.urlWithParams,\n                headers: error.headers,\n            }));\n            return;\n        }\n        const headers = new HttpHeaders(response.headers);\n        const statusText = response.statusText;\n        const url = getResponseUrl$1(response) ?? request.urlWithParams;\n        let status = response.status;\n        let body = null;\n        if (request.reportProgress) {\n            observer.next(new HttpHeaderResponse({ headers, status, statusText, url }));\n        }\n        if (response.body) {\n            // Read Progress\n            const contentLength = response.headers.get('content-length');\n            const chunks = [];\n            const reader = response.body.getReader();\n            let receivedLength = 0;\n            let decoder;\n            let partialText;\n            // We have to check whether the Zone is defined in the global scope because this may be called\n            // when the zone is nooped.\n            const reqZone = typeof Zone !== 'undefined' && Zone.current;\n            // Perform response processing outside of Angular zone to\n            // ensure no excessive change detection runs are executed\n            // Here calling the async ReadableStreamDefaultReader.read() is responsible for triggering CD\n            await this.ngZone.runOutsideAngular(async () => {\n                while (true) {\n                    const { done, value } = await reader.read();\n                    if (done) {\n                        break;\n                    }\n                    chunks.push(value);\n                    receivedLength += value.length;\n                    if (request.reportProgress) {\n                        partialText =\n                            request.responseType === 'text'\n                                ? (partialText ?? '') +\n                                    (decoder ??= new TextDecoder()).decode(value, { stream: true })\n                                : undefined;\n                        const reportProgress = () => observer.next({\n                            type: HttpEventType.DownloadProgress,\n                            total: contentLength ? +contentLength : undefined,\n                            loaded: receivedLength,\n                            partialText,\n                        });\n                        reqZone ? reqZone.run(reportProgress) : reportProgress();\n                    }\n                }\n            });\n            // Combine all chunks.\n            const chunksAll = this.concatChunks(chunks, receivedLength);\n            try {\n                const contentType = response.headers.get('Content-Type') ?? '';\n                body = this.parseBody(request, chunksAll, contentType);\n            }\n            catch (error) {\n                // Body loading or parsing failed\n                observer.error(new HttpErrorResponse({\n                    error,\n                    headers: new HttpHeaders(response.headers),\n                    status: response.status,\n                    statusText: response.statusText,\n                    url: getResponseUrl$1(response) ?? request.urlWithParams,\n                }));\n                return;\n            }\n        }\n        // Same behavior as the XhrBackend\n        if (status === 0) {\n            status = body ? HTTP_STATUS_CODE_OK : 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        const ok = status >= 200 && status < 300;\n        if (ok) {\n            observer.next(new HttpResponse({\n                body,\n                headers,\n                status,\n                statusText,\n                url,\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            observer.error(new HttpErrorResponse({\n                error: body,\n                headers,\n                status,\n                statusText,\n                url,\n            }));\n        }\n    }\n    parseBody(request, binContent, contentType) {\n        switch (request.responseType) {\n            case 'json':\n                // stripping the XSSI when present\n                const text = new TextDecoder().decode(binContent).replace(XSSI_PREFIX$1, '');\n                return text === '' ? null : JSON.parse(text);\n            case 'text':\n                return new TextDecoder().decode(binContent);\n            case 'blob':\n                return new Blob([binContent], { type: contentType });\n            case 'arraybuffer':\n                return binContent.buffer;\n        }\n    }\n    createRequestInit(req) {\n        // We could share some of this logic with the XhrBackend\n        const headers = {};\n        const credentials = req.withCredentials ? 'include' : undefined;\n        // Setting all the requested headers.\n        req.headers.forEach((name, values) => (headers[name] = values.join(',')));\n        // Add an Accept header if one isn't present already.\n        if (!req.headers.has('Accept')) {\n            headers['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            const detectedType = req.detectContentTypeHeader();\n            // Sometimes Content-Type detection fails.\n            if (detectedType !== null) {\n                headers['Content-Type'] = detectedType;\n            }\n        }\n        return {\n            body: req.serializeBody(),\n            method: req.method,\n            headers,\n            credentials,\n        };\n    }\n    concatChunks(chunks, totalLength) {\n        const chunksAll = new Uint8Array(totalLength);\n        let position = 0;\n        for (const chunk of chunks) {\n            chunksAll.set(chunk, position);\n            position += chunk.length;\n        }\n        return chunksAll;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FetchBackend, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FetchBackend });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FetchBackend, decorators: [{\n            type: Injectable\n        }] });\n/**\n * Abstract class to provide a mocked implementation of `fetch()`\n */\nclass FetchFactory {\n}\nfunction noop() { }\n/**\n * Zone.js treats a rejected promise that has not yet been awaited\n * as an unhandled error. This function adds a noop `.then` to make\n * sure that Zone.js doesn't throw an error if the Promise is rejected\n * synchronously.\n */\nfunction silenceSuperfluousUnhandledPromiseRejection(promise) {\n    promise.then(noop, noop);\n}\n\nfunction interceptorChainEndFn(req, finalHandlerFn) {\n    return finalHandlerFn(req);\n}\n/**\n * Constructs a `ChainedInterceptorFn` which adapts a legacy `HttpInterceptor` to the\n * `ChainedInterceptorFn` interface.\n */\nfunction adaptLegacyInterceptorToChain(chainTailFn, interceptor) {\n    return (initialRequest, finalHandlerFn) => interceptor.intercept(initialRequest, {\n        handle: (downstreamRequest) => chainTailFn(downstreamRequest, finalHandlerFn),\n    });\n}\n/**\n * Constructs a `ChainedInterceptorFn` which wraps and invokes a functional interceptor in the given\n * injector.\n */\nfunction chainedInterceptorFn(chainTailFn, interceptorFn, injector) {\n    return (initialRequest, finalHandlerFn) => runInInjectionContext(injector, () => interceptorFn(initialRequest, (downstreamRequest) => chainTailFn(downstreamRequest, finalHandlerFn)));\n}\n/**\n * A multi-provider token that represents the array of registered\n * `HttpInterceptor` objects.\n *\n * @publicApi\n */\nconst HTTP_INTERCEPTORS = new InjectionToken(ngDevMode ? 'HTTP_INTERCEPTORS' : '');\n/**\n * A multi-provided token of `HttpInterceptorFn`s.\n */\nconst HTTP_INTERCEPTOR_FNS = new InjectionToken(ngDevMode ? 'HTTP_INTERCEPTOR_FNS' : '');\n/**\n * A multi-provided token of `HttpInterceptorFn`s that are only set in root.\n */\nconst HTTP_ROOT_INTERCEPTOR_FNS = new InjectionToken(ngDevMode ? 'HTTP_ROOT_INTERCEPTOR_FNS' : '');\n// TODO(atscott): We need a larger discussion about stability and what should contribute to stability.\n// Should the whole interceptor chain contribute to stability or just the backend request #55075?\n// Should HttpClient contribute to stability automatically at all?\nconst REQUESTS_CONTRIBUTE_TO_STABILITY = new InjectionToken(ngDevMode ? 'REQUESTS_CONTRIBUTE_TO_STABILITY' : '', { providedIn: 'root', factory: () => true });\n/**\n * Creates an `HttpInterceptorFn` which lazily initializes an interceptor chain from the legacy\n * class-based interceptors and runs the request through it.\n */\nfunction legacyInterceptorFnFactory() {\n    let chain = null;\n    return (req, handler) => {\n        if (chain === null) {\n            const interceptors = inject(HTTP_INTERCEPTORS, { optional: true }) ?? [];\n            // Note: interceptors are wrapped right-to-left so that final execution order is\n            // left-to-right. That is, if `interceptors` is the array `[a, b, c]`, we want to\n            // produce a chain that is conceptually `c(b(a(end)))`, which we build from the inside\n            // out.\n            chain = interceptors.reduceRight(adaptLegacyInterceptorToChain, interceptorChainEndFn);\n        }\n        const pendingTasks = inject(ɵPendingTasksInternal);\n        const contributeToStability = inject(REQUESTS_CONTRIBUTE_TO_STABILITY);\n        if (contributeToStability) {\n            const taskId = pendingTasks.add();\n            return chain(req, handler).pipe(finalize(() => pendingTasks.remove(taskId)));\n        }\n        else {\n            return chain(req, handler);\n        }\n    };\n}\nlet fetchBackendWarningDisplayed = false;\n/** Internal function to reset the flag in tests */\nfunction resetFetchBackendWarningFlag() {\n    fetchBackendWarningDisplayed = false;\n}\nclass HttpInterceptorHandler extends HttpHandler {\n    backend;\n    injector;\n    chain = null;\n    pendingTasks = inject(ɵPendingTasksInternal);\n    contributeToStability = inject(REQUESTS_CONTRIBUTE_TO_STABILITY);\n    constructor(backend, injector) {\n        super();\n        this.backend = backend;\n        this.injector = injector;\n        // We strongly recommend using fetch backend for HTTP calls when SSR is used\n        // for an application. The logic below checks if that's the case and produces\n        // a warning otherwise.\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && !fetchBackendWarningDisplayed) {\n            const isServer = isPlatformServer(injector.get(PLATFORM_ID));\n            // This flag is necessary because provideHttpClientTesting() overrides the backend\n            // even if `withFetch()` is used within the test. When the testing HTTP backend is provided,\n            // no HTTP calls are actually performed during the test, so producing a warning would be\n            // misleading.\n            const isTestingBackend = this.backend.isTestingBackend;\n            if (isServer && !(this.backend instanceof FetchBackend) && !isTestingBackend) {\n                fetchBackendWarningDisplayed = true;\n                injector\n                    .get(ɵConsole)\n                    .warn(ɵformatRuntimeError(2801 /* RuntimeErrorCode.NOT_USING_FETCH_BACKEND_IN_SSR */, 'Angular detected that `HttpClient` is not configured ' +\n                    \"to use `fetch` APIs. It's strongly recommended to \" +\n                    'enable `fetch` for applications that use Server-Side Rendering ' +\n                    'for better performance and compatibility. ' +\n                    'To enable `fetch`, add the `withFetch()` to the `provideHttpClient()` ' +\n                    'call at the root of the application.'));\n            }\n        }\n    }\n    handle(initialRequest) {\n        if (this.chain === null) {\n            const dedupedInterceptorFns = Array.from(new Set([\n                ...this.injector.get(HTTP_INTERCEPTOR_FNS),\n                ...this.injector.get(HTTP_ROOT_INTERCEPTOR_FNS, []),\n            ]));\n            // Note: interceptors are wrapped right-to-left so that final execution order is\n            // left-to-right. That is, if `dedupedInterceptorFns` is the array `[a, b, c]`, we want to\n            // produce a chain that is conceptually `c(b(a(end)))`, which we build from the inside\n            // out.\n            this.chain = dedupedInterceptorFns.reduceRight((nextSequencedFn, interceptorFn) => chainedInterceptorFn(nextSequencedFn, interceptorFn, this.injector), interceptorChainEndFn);\n        }\n        if (this.contributeToStability) {\n            const taskId = this.pendingTasks.add();\n            return this.chain(initialRequest, (downstreamRequest) => this.backend.handle(downstreamRequest)).pipe(finalize(() => this.pendingTasks.remove(taskId)));\n        }\n        else {\n            return this.chain(initialRequest, (downstreamRequest) => this.backend.handle(downstreamRequest));\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpInterceptorHandler, deps: [{ token: HttpBackend }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpInterceptorHandler });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpInterceptorHandler, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: HttpBackend }, { type: i0.EnvironmentInjector }] });\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.\nlet nextRequestId = 0;\n/**\n * When a pending <script> is unsubscribed we'll move it to this document, so it won't be\n * executed.\n */\nlet foreignDocument;\n// Error text given when a JSONP script is injected, but doesn't invoke the callback\n// passed in its URL.\nconst 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.\nconst JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.';\nconst JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.';\n// Error text given when a request is passed to the JsonpClientBackend that has\n// headers set\nconst JSONP_ERR_HEADERS_NOT_SUPPORTED = 'JSONP requests do not support headers.';\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 */\nclass JsonpCallbackContext {\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 * Processes an `HttpRequest` with the JSONP method,\n * by performing JSONP style requests.\n * @see {@link HttpHandler}\n * @see {@link HttpXhrBackend}\n *\n * @publicApi\n */\nclass JsonpClientBackend {\n    callbackMap;\n    document;\n    /**\n     * A resolved promise that can be used to schedule microtasks in the event handlers.\n     */\n    resolvedPromise = Promise.resolve();\n    constructor(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    nextCallback() {\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    handle(req) {\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        // Check the request headers. JSONP doesn't support headers and\n        // cannot set any that were supplied.\n        if (req.headers.keys().length > 0) {\n            throw new Error(JSONP_ERR_HEADERS_NOT_SUPPORTED);\n        }\n        // Everything else happens inside the Observable boundary.\n        return new Observable((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            const callback = this.nextCallback();\n            const url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, `=${callback}$1`);\n            // Construct the <script> tag and point it at the URL.\n            const 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            let body = null;\n            // Whether the response callback has been called.\n            let finished = 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] = (data) => {\n                // Data has been received from the JSONP script. Firstly, delete this callback.\n                delete this.callbackMap[callback];\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            const cleanup = () => {\n                node.removeEventListener('load', onLoad);\n                node.removeEventListener('error', onError);\n                // Remove the <script> tag if it's still on the page.\n                node.remove();\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            const onLoad = (event) => {\n                // We wrap it in an extra Promise, to ensure the microtask\n                // is scheduled after the loaded endpoint has executed any potential microtask itself,\n                // which is not guaranteed in Internet Explorer and EdgeHTML. See issue #39496\n                this.resolvedPromise.then(() => {\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,\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,\n                        status: HTTP_STATUS_CODE_OK,\n                        statusText: 'OK',\n                        url,\n                    }));\n                    // Complete the stream, the response is over.\n                    observer.complete();\n                });\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            const onError = (error) => {\n                cleanup();\n                // Wrap the error in a HttpErrorResponse.\n                observer.error(new HttpErrorResponse({\n                    error,\n                    status: 0,\n                    statusText: 'JSONP Error',\n                    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 () => {\n                if (!finished) {\n                    this.removeListeners(node);\n                }\n                // And finally, clean up the page.\n                cleanup();\n            };\n        });\n    }\n    removeListeners(script) {\n        // Issue #34818\n        // Changing <script>'s ownerDocument will prevent it from execution.\n        // https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block\n        foreignDocument ??= this.document.implementation.createHTMLDocument();\n        foreignDocument.adoptNode(script);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: JsonpClientBackend, deps: [{ token: JsonpCallbackContext }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: JsonpClientBackend });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: JsonpClientBackend, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: JsonpCallbackContext }, { type: undefined, decorators: [{\n                    type: Inject,\n                    args: [DOCUMENT]\n                }] }] });\n/**\n * Identifies requests with the method JSONP and shifts them to the `JsonpClientBackend`.\n */\nfunction jsonpInterceptorFn(req, next) {\n    if (req.method === 'JSONP') {\n        return inject(JsonpClientBackend).handle(req);\n    }\n    // Fall through for normal HTTP requests.\n    return next(req);\n}\n/**\n * Identifies requests with the method JSONP and\n * shifts them to the `JsonpClientBackend`.\n *\n * @see {@link HttpInterceptor}\n *\n * @publicApi\n */\nclass JsonpInterceptor {\n    injector;\n    constructor(injector) {\n        this.injector = injector;\n    }\n    /**\n     * Identifies and handles a given JSONP request.\n     * @param initialRequest 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    intercept(initialRequest, next) {\n        return runInInjectionContext(this.injector, () => jsonpInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: JsonpInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: JsonpInterceptor });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: JsonpInterceptor, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: i0.EnvironmentInjector }] });\n\nconst 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 * Uses `XMLHttpRequest` to send requests to a backend server.\n * @see {@link HttpHandler}\n * @see {@link JsonpClientBackend}\n *\n * @publicApi\n */\nclass HttpXhrBackend {\n    xhrFactory;\n    constructor(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    handle(req) {\n        // Quick check to give a better error message when a user attempts to use\n        // HttpClient.jsonp() without installing the HttpClientJsonpModule\n        if (req.method === 'JSONP') {\n            throw new ɵRuntimeError(-2800 /* RuntimeErrorCode.MISSING_JSONP_MODULE */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                `Cannot make a JSONP request without JSONP support. To fix the problem, either add the \\`withJsonpSupport()\\` call (if \\`provideHttpClient()\\` is used) or import the \\`HttpClientJsonpModule\\` in the root NgModule.`);\n        }\n        // Check whether this factory has a special function to load an XHR implementation\n        // for various non-browser environments. We currently limit it to only `ServerXhr`\n        // class, which needs to load an XHR implementation.\n        const xhrFactory = this.xhrFactory;\n        const source = xhrFactory.ɵloadImpl\n            ? from(xhrFactory.ɵloadImpl())\n            : of(null);\n        return source.pipe(switchMap(() => {\n            // Everything happens on Observable subscription.\n            return new Observable((observer) => {\n                // Start by setting up the XHR object with request method, URL, and withCredentials\n                // flag.\n                const xhr = 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((name, values) => 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                    const 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                    const 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                const 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                let headerResponse = null;\n                // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest\n                // state, and memoizes it into headerResponse.\n                const partialFromXhr = () => {\n                    if (headerResponse !== null) {\n                        return headerResponse;\n                    }\n                    const statusText = xhr.statusText || 'OK';\n                    // Parse headers from XMLHttpRequest - this step is lazy.\n                    const headers = new HttpHeaders(xhr.getAllResponseHeaders());\n                    // Read the response URL from the XMLHttpResponse instance and fall back on the\n                    // request URL.\n                    const url = getResponseUrl(xhr) || req.url;\n                    // Construct the HttpHeaderResponse and memoize it.\n                    headerResponse = new HttpHeaderResponse({ headers, status: xhr.status, statusText, 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                const onLoad = () => {\n                    // Read response state from the memoized partial data.\n                    let { headers, status, statusText, url } = partialFromXhr();\n                    // The body will be read out if present.\n                    let body = null;\n                    if (status !== HTTP_STATUS_CODE_NO_CONTENT) {\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 ? HTTP_STATUS_CODE_OK : 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                    let 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                        const 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\n                            // 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\n                            // been a JSON response. Restore the original body (including any XSSI prefix)\n                            // to deliver a better error response.\n                            body = originalBody;\n                            // If this was an error request to begin with, leave it as a string, it\n                            // probably 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, 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,\n                            headers,\n                            status,\n                            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,\n                            status,\n                            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                const onError = (error) => {\n                    const { url } = partialFromXhr();\n                    const res = new HttpErrorResponse({\n                        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                // progress event.\n                let sentHeaders = false;\n                // The download progress event handler, which is only registered if\n                // progress events are enabled.\n                const onDownProgress = (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                    let 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                const onUpProgress = (event) => {\n                    // Upload progress events are simpler. Begin building the progress\n                    // event.\n                    let 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                xhr.addEventListener('timeout', onError);\n                xhr.addEventListener('abort', 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 () => {\n                    // On a cancellation, remove all registered event listeners.\n                    xhr.removeEventListener('error', onError);\n                    xhr.removeEventListener('abort', onError);\n                    xhr.removeEventListener('load', onLoad);\n                    xhr.removeEventListener('timeout', onError);\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                    if (xhr.readyState !== xhr.DONE) {\n                        xhr.abort();\n                    }\n                };\n            });\n        }));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpXhrBackend, deps: [{ token: i1.XhrFactory }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpXhrBackend });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpXhrBackend, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: i1.XhrFactory }] });\n\nconst XSRF_ENABLED = new InjectionToken(ngDevMode ? 'XSRF_ENABLED' : '');\nconst XSRF_DEFAULT_COOKIE_NAME = 'XSRF-TOKEN';\nconst XSRF_COOKIE_NAME = new InjectionToken(ngDevMode ? 'XSRF_COOKIE_NAME' : '', {\n    providedIn: 'root',\n    factory: () => XSRF_DEFAULT_COOKIE_NAME,\n});\nconst XSRF_DEFAULT_HEADER_NAME = 'X-XSRF-TOKEN';\nconst XSRF_HEADER_NAME = new InjectionToken(ngDevMode ? 'XSRF_HEADER_NAME' : '', {\n    providedIn: 'root',\n    factory: () => XSRF_DEFAULT_HEADER_NAME,\n});\n/**\n * Retrieves the current XSRF token to use with the next outgoing request.\n *\n * @publicApi\n */\nclass HttpXsrfTokenExtractor {\n}\n/**\n * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.\n */\nclass HttpXsrfCookieExtractor {\n    doc;\n    platform;\n    cookieName;\n    lastCookieString = '';\n    lastToken = null;\n    /**\n     * @internal for testing\n     */\n    parseCount = 0;\n    constructor(doc, platform, cookieName) {\n        this.doc = doc;\n        this.platform = platform;\n        this.cookieName = cookieName;\n    }\n    getToken() {\n        if (this.platform === 'server') {\n            return null;\n        }\n        const 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    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpXsrfCookieExtractor, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: XSRF_COOKIE_NAME }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpXsrfCookieExtractor });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpXsrfCookieExtractor, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Inject,\n                    args: [DOCUMENT]\n                }] }, { type: undefined, decorators: [{\n                    type: Inject,\n                    args: [PLATFORM_ID]\n                }] }, { type: undefined, decorators: [{\n                    type: Inject,\n                    args: [XSRF_COOKIE_NAME]\n                }] }] });\nfunction xsrfInterceptorFn(req, next) {\n    const 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 (!inject(XSRF_ENABLED) ||\n        req.method === 'GET' ||\n        req.method === 'HEAD' ||\n        lcUrl.startsWith('http://') ||\n        lcUrl.startsWith('https://')) {\n        return next(req);\n    }\n    const token = inject(HttpXsrfTokenExtractor).getToken();\n    const headerName = inject(XSRF_HEADER_NAME);\n    // Be careful not to overwrite an existing header of the same name.\n    if (token != null && !req.headers.has(headerName)) {\n        req = req.clone({ headers: req.headers.set(headerName, token) });\n    }\n    return next(req);\n}\n/**\n * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.\n */\nclass HttpXsrfInterceptor {\n    injector;\n    constructor(injector) {\n        this.injector = injector;\n    }\n    intercept(initialRequest, next) {\n        return runInInjectionContext(this.injector, () => xsrfInterceptorFn(initialRequest, (downstreamRequest) => next.handle(downstreamRequest)));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpXsrfInterceptor, deps: [{ token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpXsrfInterceptor });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpXsrfInterceptor, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: i0.EnvironmentInjector }] });\n\n/**\n * Identifies a particular kind of `HttpFeature`.\n *\n * @publicApi\n */\nvar HttpFeatureKind;\n(function (HttpFeatureKind) {\n    HttpFeatureKind[HttpFeatureKind[\"Interceptors\"] = 0] = \"Interceptors\";\n    HttpFeatureKind[HttpFeatureKind[\"LegacyInterceptors\"] = 1] = \"LegacyInterceptors\";\n    HttpFeatureKind[HttpFeatureKind[\"CustomXsrfConfiguration\"] = 2] = \"CustomXsrfConfiguration\";\n    HttpFeatureKind[HttpFeatureKind[\"NoXsrfProtection\"] = 3] = \"NoXsrfProtection\";\n    HttpFeatureKind[HttpFeatureKind[\"JsonpSupport\"] = 4] = \"JsonpSupport\";\n    HttpFeatureKind[HttpFeatureKind[\"RequestsMadeViaParent\"] = 5] = \"RequestsMadeViaParent\";\n    HttpFeatureKind[HttpFeatureKind[\"Fetch\"] = 6] = \"Fetch\";\n})(HttpFeatureKind || (HttpFeatureKind = {}));\nfunction makeHttpFeature(kind, providers) {\n    return {\n        ɵkind: kind,\n        ɵproviders: providers,\n    };\n}\n/**\n * Configures Angular's `HttpClient` service to be available for injection.\n *\n * By default, `HttpClient` will be configured for injection with its default options for XSRF\n * protection of outgoing requests. Additional configuration options can be provided by passing\n * feature functions to `provideHttpClient`. For example, HTTP interceptors can be added using the\n * `withInterceptors(...)` feature.\n *\n * <div class=\"docs-alert docs-alert-helpful\">\n *\n * It's strongly recommended to enable\n * [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) for applications that use\n * Server-Side Rendering for better performance and compatibility. To enable `fetch`, add\n * `withFetch()` feature to the `provideHttpClient()` call at the root of the application:\n *\n * ```ts\n * provideHttpClient(withFetch());\n * ```\n *\n * </div>\n *\n * @see {@link withInterceptors}\n * @see {@link withInterceptorsFromDi}\n * @see {@link withXsrfConfiguration}\n * @see {@link withNoXsrfProtection}\n * @see {@link withJsonpSupport}\n * @see {@link withRequestsMadeViaParent}\n * @see {@link withFetch}\n */\nfunction provideHttpClient(...features) {\n    if (ngDevMode) {\n        const featureKinds = new Set(features.map((f) => f.ɵkind));\n        if (featureKinds.has(HttpFeatureKind.NoXsrfProtection) &&\n            featureKinds.has(HttpFeatureKind.CustomXsrfConfiguration)) {\n            throw new Error(ngDevMode\n                ? `Configuration error: found both withXsrfConfiguration() and withNoXsrfProtection() in the same call to provideHttpClient(), which is a contradiction.`\n                : '');\n        }\n    }\n    const providers = [\n        HttpClient,\n        HttpXhrBackend,\n        HttpInterceptorHandler,\n        { provide: HttpHandler, useExisting: HttpInterceptorHandler },\n        {\n            provide: HttpBackend,\n            useFactory: () => {\n                return inject(FetchBackend, { optional: true }) ?? inject(HttpXhrBackend);\n            },\n        },\n        {\n            provide: HTTP_INTERCEPTOR_FNS,\n            useValue: xsrfInterceptorFn,\n            multi: true,\n        },\n        { provide: XSRF_ENABLED, useValue: true },\n        { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n    ];\n    for (const feature of features) {\n        providers.push(...feature.ɵproviders);\n    }\n    return makeEnvironmentProviders(providers);\n}\n/**\n * Adds one or more functional-style HTTP interceptors to the configuration of the `HttpClient`\n * instance.\n *\n * @see {@link HttpInterceptorFn}\n * @see {@link provideHttpClient}\n * @publicApi\n */\nfunction withInterceptors(interceptorFns) {\n    return makeHttpFeature(HttpFeatureKind.Interceptors, interceptorFns.map((interceptorFn) => {\n        return {\n            provide: HTTP_INTERCEPTOR_FNS,\n            useValue: interceptorFn,\n            multi: true,\n        };\n    }));\n}\nconst LEGACY_INTERCEPTOR_FN = new InjectionToken(ngDevMode ? 'LEGACY_INTERCEPTOR_FN' : '');\n/**\n * Includes class-based interceptors configured using a multi-provider in the current injector into\n * the configured `HttpClient` instance.\n *\n * Prefer `withInterceptors` and functional interceptors instead, as support for DI-provided\n * interceptors may be phased out in a later release.\n *\n * @see {@link HttpInterceptor}\n * @see {@link HTTP_INTERCEPTORS}\n * @see {@link provideHttpClient}\n */\nfunction withInterceptorsFromDi() {\n    // Note: the legacy interceptor function is provided here via an intermediate token\n    // (`LEGACY_INTERCEPTOR_FN`), using a pattern which guarantees that if these providers are\n    // included multiple times, all of the multi-provider entries will have the same instance of the\n    // interceptor function. That way, the `HttpINterceptorHandler` will dedup them and legacy\n    // interceptors will not run multiple times.\n    return makeHttpFeature(HttpFeatureKind.LegacyInterceptors, [\n        {\n            provide: LEGACY_INTERCEPTOR_FN,\n            useFactory: legacyInterceptorFnFactory,\n        },\n        {\n            provide: HTTP_INTERCEPTOR_FNS,\n            useExisting: LEGACY_INTERCEPTOR_FN,\n            multi: true,\n        },\n    ]);\n}\n/**\n * Customizes the XSRF protection for the configuration of the current `HttpClient` instance.\n *\n * This feature is incompatible with the `withNoXsrfProtection` feature.\n *\n * @see {@link provideHttpClient}\n */\nfunction withXsrfConfiguration({ cookieName, headerName, }) {\n    const providers = [];\n    if (cookieName !== undefined) {\n        providers.push({ provide: XSRF_COOKIE_NAME, useValue: cookieName });\n    }\n    if (headerName !== undefined) {\n        providers.push({ provide: XSRF_HEADER_NAME, useValue: headerName });\n    }\n    return makeHttpFeature(HttpFeatureKind.CustomXsrfConfiguration, providers);\n}\n/**\n * Disables XSRF protection in the configuration of the current `HttpClient` instance.\n *\n * This feature is incompatible with the `withXsrfConfiguration` feature.\n *\n * @see {@link provideHttpClient}\n */\nfunction withNoXsrfProtection() {\n    return makeHttpFeature(HttpFeatureKind.NoXsrfProtection, [\n        {\n            provide: XSRF_ENABLED,\n            useValue: false,\n        },\n    ]);\n}\n/**\n * Add JSONP support to the configuration of the current `HttpClient` instance.\n *\n * @see {@link provideHttpClient}\n */\nfunction withJsonpSupport() {\n    return makeHttpFeature(HttpFeatureKind.JsonpSupport, [\n        JsonpClientBackend,\n        { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n        { provide: HTTP_INTERCEPTOR_FNS, useValue: jsonpInterceptorFn, multi: true },\n    ]);\n}\n/**\n * Configures the current `HttpClient` instance to make requests via the parent injector's\n * `HttpClient` instead of directly.\n *\n * By default, `provideHttpClient` configures `HttpClient` in its injector to be an independent\n * instance. For example, even if `HttpClient` is configured in the parent injector with\n * one or more interceptors, they will not intercept requests made via this instance.\n *\n * With this option enabled, once the request has passed through the current injector's\n * interceptors, it will be delegated to the parent injector's `HttpClient` chain instead of\n * dispatched directly, and interceptors in the parent configuration will be applied to the request.\n *\n * If there are several `HttpClient` instances in the injector hierarchy, it's possible for\n * `withRequestsMadeViaParent` to be used at multiple levels, which will cause the request to\n * \"bubble up\" until either reaching the root level or an `HttpClient` which was not configured with\n * this option.\n *\n * @see {@link provideHttpClient}\n * @publicApi\n */\nfunction withRequestsMadeViaParent() {\n    return makeHttpFeature(HttpFeatureKind.RequestsMadeViaParent, [\n        {\n            provide: HttpBackend,\n            useFactory: () => {\n                const handlerFromParent = inject(HttpHandler, { skipSelf: true, optional: true });\n                if (ngDevMode && handlerFromParent === null) {\n                    throw new Error('withRequestsMadeViaParent() can only be used when the parent injector also configures HttpClient');\n                }\n                return handlerFromParent;\n            },\n        },\n    ]);\n}\n/**\n * Configures the current `HttpClient` instance to make requests using the fetch API.\n *\n * Note: The Fetch API doesn't support progress report on uploads.\n *\n * @publicApi\n */\nfunction withFetch() {\n    return makeHttpFeature(HttpFeatureKind.Fetch, [\n        FetchBackend,\n        { provide: HttpBackend, useExisting: FetchBackend },\n    ]);\n}\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 * @deprecated Use withXsrfConfiguration({cookieName: 'XSRF-TOKEN', headerName: 'X-XSRF-TOKEN'}) as\n *     providers instead or `withNoXsrfProtection` if you want to disabled XSRF protection.\n */\nclass HttpClientXsrfModule {\n    /**\n     * Disable the default XSRF protection.\n     */\n    static disable() {\n        return {\n            ngModule: HttpClientXsrfModule,\n            providers: [withNoXsrfProtection().ɵproviders],\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    static withOptions(options = {}) {\n        return {\n            ngModule: HttpClientXsrfModule,\n            providers: withXsrfConfiguration(options).ɵproviders,\n        };\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClientXsrfModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClientXsrfModule });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClientXsrfModule, providers: [\n            HttpXsrfInterceptor,\n            { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n            { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n            withXsrfConfiguration({\n                cookieName: XSRF_DEFAULT_COOKIE_NAME,\n                headerName: XSRF_DEFAULT_HEADER_NAME,\n            }).ɵproviders,\n            { provide: XSRF_ENABLED, useValue: true },\n        ] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClientXsrfModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    providers: [\n                        HttpXsrfInterceptor,\n                        { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n                        { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n                        withXsrfConfiguration({\n                            cookieName: XSRF_DEFAULT_COOKIE_NAME,\n                            headerName: XSRF_DEFAULT_HEADER_NAME,\n                        }).ɵproviders,\n                        { provide: XSRF_ENABLED, useValue: true },\n                    ],\n                }]\n        }] });\n/**\n * Configures the dependency 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 `HTTP_INTERCEPTORS`.\n *\n * @publicApi\n * @deprecated use `provideHttpClient(withInterceptorsFromDi())` as providers instead\n */\nclass HttpClientModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClientModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClientModule });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClientModule, providers: [provideHttpClient(withInterceptorsFromDi())] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClientModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    /**\n                     * Configures the dependency injector where it is imported\n                     * with supporting services for HTTP communications.\n                     */\n                    providers: [provideHttpClient(withInterceptorsFromDi())],\n                }]\n        }] });\n/**\n * Configures the dependency 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 * @publicApi\n * @deprecated `withJsonpSupport()` as providers instead\n */\nclass HttpClientJsonpModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClientJsonpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClientJsonpModule });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClientJsonpModule, providers: [withJsonpSupport().ɵproviders] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: HttpClientJsonpModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    providers: [withJsonpSupport().ɵproviders],\n                }]\n        }] });\n\n/**\n * If your application uses different HTTP origins to make API calls (via `HttpClient`) on the server and\n * on the client, the `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token allows you to establish a mapping\n * between those origins, so that `HttpTransferCache` feature can recognize those requests as the same\n * ones and reuse the data cached on the server during hydration on the client.\n *\n * **Important note**: the `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token should *only* be provided in\n * the *server* code of your application (typically in the `app.server.config.ts` script). Angular throws an\n * error if it detects that the token is defined while running on the client.\n *\n * @usageNotes\n *\n * When the same API endpoint is accessed via `http://internal-domain.com:8080` on the server and\n * via `https://external-domain.com` on the client, you can use the following configuration:\n * ```ts\n * // in app.server.config.ts\n * {\n *     provide: HTTP_TRANSFER_CACHE_ORIGIN_MAP,\n *     useValue: {\n *         'http://internal-domain.com:8080': 'https://external-domain.com'\n *     }\n * }\n * ```\n *\n * @publicApi\n */\nconst HTTP_TRANSFER_CACHE_ORIGIN_MAP = new InjectionToken(ngDevMode ? 'HTTP_TRANSFER_CACHE_ORIGIN_MAP' : '');\n/**\n * Keys within cached response data structure.\n */\nconst BODY = 'b';\nconst HEADERS = 'h';\nconst STATUS = 's';\nconst STATUS_TEXT = 'st';\nconst REQ_URL = 'u';\nconst RESPONSE_TYPE = 'rt';\nconst CACHE_OPTIONS = new InjectionToken(ngDevMode ? 'HTTP_TRANSFER_STATE_CACHE_OPTIONS' : '');\n/**\n * A list of allowed HTTP methods to cache.\n */\nconst ALLOWED_METHODS = ['GET', 'HEAD'];\nfunction transferCacheInterceptorFn(req, next) {\n    const { isCacheActive, ...globalOptions } = inject(CACHE_OPTIONS);\n    const { transferCache: requestOptions, method: requestMethod } = req;\n    // In the following situations we do not want to cache the request\n    if (!isCacheActive ||\n        requestOptions === false ||\n        // POST requests are allowed either globally or at request level\n        (requestMethod === 'POST' && !globalOptions.includePostRequests && !requestOptions) ||\n        (requestMethod !== 'POST' && !ALLOWED_METHODS.includes(requestMethod)) ||\n        // Do not cache request that require authorization when includeRequestsWithAuthHeaders is falsey\n        (!globalOptions.includeRequestsWithAuthHeaders && hasAuthHeaders(req)) ||\n        globalOptions.filter?.(req) === false) {\n        return next(req);\n    }\n    const transferState = inject(TransferState);\n    const originMap = inject(HTTP_TRANSFER_CACHE_ORIGIN_MAP, {\n        optional: true,\n    });\n    const isServer = isPlatformServer(inject(PLATFORM_ID));\n    if (originMap && !isServer) {\n        throw new ɵRuntimeError(2803 /* RuntimeErrorCode.HTTP_ORIGIN_MAP_USED_IN_CLIENT */, ngDevMode &&\n            'Angular detected that the `HTTP_TRANSFER_CACHE_ORIGIN_MAP` token is configured and ' +\n                'present in the client side code. Please ensure that this token is only provided in the ' +\n                'server code of the application.');\n    }\n    const requestUrl = isServer && originMap ? mapRequestOriginUrl(req.url, originMap) : req.url;\n    const storeKey = makeCacheKey(req, requestUrl);\n    const response = transferState.get(storeKey, null);\n    let headersToInclude = globalOptions.includeHeaders;\n    if (typeof requestOptions === 'object' && requestOptions.includeHeaders) {\n        // Request-specific config takes precedence over the global config.\n        headersToInclude = requestOptions.includeHeaders;\n    }\n    if (response) {\n        const { [BODY]: undecodedBody, [RESPONSE_TYPE]: responseType, [HEADERS]: httpHeaders, [STATUS]: status, [STATUS_TEXT]: statusText, [REQ_URL]: url, } = response;\n        // Request found in cache. Respond using it.\n        let body = undecodedBody;\n        switch (responseType) {\n            case 'arraybuffer':\n                body = new TextEncoder().encode(undecodedBody).buffer;\n                break;\n            case 'blob':\n                body = new Blob([undecodedBody]);\n                break;\n        }\n        // We want to warn users accessing a header provided from the cache\n        // That HttpTransferCache alters the headers\n        // The warning will be logged a single time by HttpHeaders instance\n        let headers = new HttpHeaders(httpHeaders);\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            // Append extra logic in dev mode to produce a warning when a header\n            // that was not transferred to the client is accessed in the code via `get`\n            // and `has` calls.\n            headers = appendMissingHeadersDetection(req.url, headers, headersToInclude ?? []);\n        }\n        return of(new HttpResponse({\n            body,\n            headers,\n            status,\n            statusText,\n            url,\n        }));\n    }\n    // Request not found in cache. Make the request and cache it if on the server.\n    return next(req).pipe(tap((event) => {\n        if (event instanceof HttpResponse && isServer) {\n            transferState.set(storeKey, {\n                [BODY]: event.body,\n                [HEADERS]: getFilteredHeaders(event.headers, headersToInclude),\n                [STATUS]: event.status,\n                [STATUS_TEXT]: event.statusText,\n                [REQ_URL]: requestUrl,\n                [RESPONSE_TYPE]: req.responseType,\n            });\n        }\n    }));\n}\n/** @returns true when the requests contains autorization related headers. */\nfunction hasAuthHeaders(req) {\n    return req.headers.has('authorization') || req.headers.has('proxy-authorization');\n}\nfunction getFilteredHeaders(headers, includeHeaders) {\n    if (!includeHeaders) {\n        return {};\n    }\n    const headersMap = {};\n    for (const key of includeHeaders) {\n        const values = headers.getAll(key);\n        if (values !== null) {\n            headersMap[key] = values;\n        }\n    }\n    return headersMap;\n}\nfunction sortAndConcatParams(params) {\n    return [...params.keys()]\n        .sort()\n        .map((k) => `${k}=${params.getAll(k)}`)\n        .join('&');\n}\nfunction makeCacheKey(request, mappedRequestUrl) {\n    // make the params encoded same as a url so it's easy to identify\n    const { params, method, responseType } = request;\n    const encodedParams = sortAndConcatParams(params);\n    let serializedBody = request.serializeBody();\n    if (serializedBody instanceof URLSearchParams) {\n        serializedBody = sortAndConcatParams(serializedBody);\n    }\n    else if (typeof serializedBody !== 'string') {\n        serializedBody = '';\n    }\n    const key = [method, responseType, mappedRequestUrl, serializedBody, encodedParams].join('|');\n    const hash = generateHash(key);\n    return makeStateKey(hash);\n}\n/**\n * A method that returns a hash representation of a string using a variant of DJB2 hash\n * algorithm.\n *\n * This is the same hashing logic that is used to generate component ids.\n */\nfunction generateHash(value) {\n    let hash = 0;\n    for (const char of value) {\n        hash = (Math.imul(31, hash) + char.charCodeAt(0)) << 0;\n    }\n    // Force positive number hash.\n    // 2147483647 = equivalent of Integer.MAX_VALUE.\n    hash += 2147483647 + 1;\n    return hash.toString();\n}\n/**\n * Returns the DI providers needed to enable HTTP transfer cache.\n *\n * By default, when using server rendering, requests are performed twice: once on the server and\n * other one on the browser.\n *\n * When these providers are added, requests performed on the server are cached and reused during the\n * bootstrapping of the application in the browser thus avoiding duplicate requests and reducing\n * load time.\n *\n */\nfunction withHttpTransferCache(cacheOptions) {\n    return [\n        {\n            provide: CACHE_OPTIONS,\n            useFactory: () => {\n                ɵperformanceMarkFeature('NgHttpTransferCache');\n                return { isCacheActive: true, ...cacheOptions };\n            },\n        },\n        {\n            provide: HTTP_ROOT_INTERCEPTOR_FNS,\n            useValue: transferCacheInterceptorFn,\n            multi: true,\n            deps: [TransferState, CACHE_OPTIONS],\n        },\n        {\n            provide: APP_BOOTSTRAP_LISTENER,\n            multi: true,\n            useFactory: () => {\n                const appRef = inject(ApplicationRef);\n                const cacheState = inject(CACHE_OPTIONS);\n                return () => {\n                    appRef.whenStable().then(() => {\n                        cacheState.isCacheActive = false;\n                    });\n                };\n            },\n        },\n    ];\n}\n/**\n * This function will add a proxy to an HttpHeader to intercept calls to get/has\n * and log a warning if the header entry requested has been removed\n */\nfunction appendMissingHeadersDetection(url, headers, headersToInclude) {\n    const warningProduced = new Set();\n    return new Proxy(headers, {\n        get(target, prop) {\n            const value = Reflect.get(target, prop);\n            const methods = new Set(['get', 'has', 'getAll']);\n            if (typeof value !== 'function' || !methods.has(prop)) {\n                return value;\n            }\n            return (headerName) => {\n                // We log when the key has been removed and a warning hasn't been produced for the header\n                const key = (prop + ':' + headerName).toLowerCase(); // e.g. `get:cache-control`\n                if (!headersToInclude.includes(headerName) && !warningProduced.has(key)) {\n                    warningProduced.add(key);\n                    const truncatedUrl = ɵtruncateMiddle(url);\n                    // TODO: create Error guide for this warning\n                    console.warn(ɵformatRuntimeError(2802 /* RuntimeErrorCode.HEADERS_ALTERED_BY_TRANSFER_CACHE */, `Angular detected that the \\`${headerName}\\` header is accessed, but the value of the header ` +\n                        `was not transferred from the server to the client by the HttpTransferCache. ` +\n                        `To include the value of the \\`${headerName}\\` header for the \\`${truncatedUrl}\\` request, ` +\n                        `use the \\`includeHeaders\\` list. The \\`includeHeaders\\` can be defined either ` +\n                        `on a request level by adding the \\`transferCache\\` parameter, or on an application ` +\n                        `level by adding the \\`httpCacheTransfer.includeHeaders\\` argument to the ` +\n                        `\\`provideClientHydration()\\` call. `));\n                }\n                // invoking the original method\n                return value.apply(target, [headerName]);\n            };\n        },\n    });\n}\nfunction mapRequestOriginUrl(url, originMap) {\n    const origin = new URL(url, 'resolve://').origin;\n    const mappedOrigin = originMap[origin];\n    if (!mappedOrigin) {\n        return url;\n    }\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        verifyMappedOrigin(mappedOrigin);\n    }\n    return url.replace(origin, mappedOrigin);\n}\nfunction verifyMappedOrigin(url) {\n    if (new URL(url, 'resolve://').pathname !== '/') {\n        throw new ɵRuntimeError(2804 /* RuntimeErrorCode.HTTP_ORIGIN_MAP_CONTAINS_PATH */, 'Angular detected a URL with a path segment in the value provided for the ' +\n            `\\`HTTP_TRANSFER_CACHE_ORIGIN_MAP\\` token: ${url}. The map should only contain origins ` +\n            'without any other segments.');\n    }\n}\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { FetchBackend, HTTP_INTERCEPTORS, HTTP_TRANSFER_CACHE_ORIGIN_MAP, HttpBackend, HttpClient, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, HttpContext, HttpContextToken, HttpErrorResponse, HttpEventType, HttpFeatureKind, HttpHandler, HttpHeaderResponse, HttpHeaders, HttpParams, HttpRequest, HttpResponse, HttpResponseBase, HttpStatusCode, HttpUrlEncodingCodec, HttpXhrBackend, HttpXsrfTokenExtractor, JsonpClientBackend, JsonpInterceptor, provideHttpClient, withFetch, withInterceptors, withInterceptorsFromDi, withJsonpSupport, withNoXsrfProtection, withRequestsMadeViaParent, withXsrfConfiguration, HTTP_ROOT_INTERCEPTOR_FNS as ɵHTTP_ROOT_INTERCEPTOR_FNS, HttpInterceptorHandler as ɵHttpInterceptingHandler, HttpInterceptorHandler as ɵHttpInterceptorHandler, REQUESTS_CONTRIBUTE_TO_STABILITY as ɵREQUESTS_CONTRIBUTE_TO_STABILITY, withHttpTransferCache as ɵwithHttpTransferCache };\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { AppState } from '../models/app-state.model';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class AppStateService {\r\n    private appState$ = new BehaviorSubject<AppState | null>(null);\r\n\r\n    public constructor() {\r\n        this.initializeState();\r\n    }\r\n\r\n    public getState$(): BehaviorSubject<AppState | null> {\r\n        return this.appState$;\r\n    }\r\n\r\n    public getState(): AppState | null {\r\n        return this.appState$.value;\r\n    }\r\n\r\n    public setState(newState: AppState): void {\r\n        this.appState$.next(newState);\r\n        localStorage.setItem('appState', JSON.stringify(newState));\r\n    }\r\n\r\n    public getProperty(propertyName: keyof AppState): any {\r\n        const state = this.getState();\r\n        if (state && propertyName in state) {\r\n            return state[propertyName];\r\n        }\r\n        return null;\r\n    }\r\n\r\n    public setProperty(propertyName: keyof AppState, value: any): void {\r\n        const state = this.getState();\r\n        if (state) {\r\n            const updatedState = {\r\n                ...state,\r\n                [propertyName]: value,\r\n            };\r\n            this.setState(updatedState);\r\n        } else {\r\n            const newState = { [propertyName]: value } as AppState;\r\n            this.setState(newState);\r\n        }\r\n    }\r\n\r\n    private initializeState(): void {\r\n        if (!this.getState()) {\r\n            const appStateJson = localStorage.getItem('appState');\r\n            if (appStateJson) {\r\n                const appState = JSON.parse(appStateJson) as AppState;\r\n                this.appState$.next({ ...appState });\r\n            } else {\r\n                this.appState$.next(null);\r\n            }\r\n        }\r\n    }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { AppStateService } from './app-state.service';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class SecurityService {\r\n    public constructor(private appStateService: AppStateService) {}\r\n\r\n    public getToken(): string | null {\r\n        return this.appStateService.getProperty('token') as string;\r\n    }\r\n\r\n    public setToken(token: string): void {\r\n        this.appStateService.setProperty('token', token);\r\n    }\r\n\r\n    public removeToken(): void {\r\n        this.appStateService.setProperty('token', null);\r\n    }\r\n\r\n    public isValidToken(): boolean {\r\n        const token = this.getToken();\r\n        if (token) {\r\n            const payload = JSON.parse(atob(token.split('.')[1]));\r\n            const currentTime = Date.now().valueOf() / 1000;\r\n\r\n            if (payload.exp < currentTime) {\r\n                return false;\r\n            }\r\n        }\r\n\r\n        return true;\r\n    }\r\n}\r\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from \"tslib\";\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\nexport function getPagedAsyncIterator(pagedResult) {\n    var _a;\n    const iter = getItemAsyncIterator(pagedResult);\n    return {\n        next() {\n            return iter.next();\n        },\n        [Symbol.asyncIterator]() {\n            return this;\n        },\n        byPage: (_a = pagedResult === null || pagedResult === void 0 ? void 0 : pagedResult.byPage) !== null && _a !== void 0 ? _a : ((settings) => {\n            const { continuationToken, maxPageSize } = settings !== null && settings !== void 0 ? settings : {};\n            return getPageAsyncIterator(pagedResult, {\n                pageLink: continuationToken,\n                maxPageSize,\n            });\n        }),\n    };\n}\nfunction getItemAsyncIterator(pagedResult) {\n    return __asyncGenerator(this, arguments, function* getItemAsyncIterator_1() {\n        var _a, e_1, _b, _c, _d, e_2, _e, _f;\n        const pages = getPageAsyncIterator(pagedResult);\n        const firstVal = yield __await(pages.next());\n        // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is\n        if (!Array.isArray(firstVal.value)) {\n            // can extract elements from this page\n            const { toElements } = pagedResult;\n            if (toElements) {\n                yield __await(yield* __asyncDelegator(__asyncValues(toElements(firstVal.value))));\n                try {\n                    for (var _g = true, pages_1 = __asyncValues(pages), pages_1_1; pages_1_1 = yield __await(pages_1.next()), _a = pages_1_1.done, !_a; _g = true) {\n                        _c = pages_1_1.value;\n                        _g = false;\n                        const page = _c;\n                        yield __await(yield* __asyncDelegator(__asyncValues(toElements(page))));\n                    }\n                }\n                catch (e_1_1) { e_1 = { error: e_1_1 }; }\n                finally {\n                    try {\n                        if (!_g && !_a && (_b = pages_1.return)) yield __await(_b.call(pages_1));\n                    }\n                    finally { if (e_1) throw e_1.error; }\n                }\n            }\n            else {\n                yield yield __await(firstVal.value);\n                // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case\n                yield __await(yield* __asyncDelegator(__asyncValues(pages)));\n            }\n        }\n        else {\n            yield __await(yield* __asyncDelegator(__asyncValues(firstVal.value)));\n            try {\n                for (var _h = true, pages_2 = __asyncValues(pages), pages_2_1; pages_2_1 = yield __await(pages_2.next()), _d = pages_2_1.done, !_d; _h = true) {\n                    _f = pages_2_1.value;\n                    _h = false;\n                    const page = _f;\n                    // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,\n                    // it must be the case that `TPage = TElement[]`\n                    yield __await(yield* __asyncDelegator(__asyncValues(page)));\n                }\n            }\n            catch (e_2_1) { e_2 = { error: e_2_1 }; }\n            finally {\n                try {\n                    if (!_h && !_d && (_e = pages_2.return)) yield __await(_e.call(pages_2));\n                }\n                finally { if (e_2) throw e_2.error; }\n            }\n        }\n    });\n}\nfunction getPageAsyncIterator(pagedResult, options = {}) {\n    return __asyncGenerator(this, arguments, function* getPageAsyncIterator_1() {\n        const { pageLink, maxPageSize } = options;\n        let response = yield __await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink, maxPageSize));\n        if (!response) {\n            return yield __await(void 0);\n        }\n        yield yield __await(response.page);\n        while (response.nextPageLink) {\n            response = yield __await(pagedResult.getPage(response.nextPageLink, maxPageSize));\n            if (!response) {\n                return yield __await(void 0);\n            }\n            yield yield __await(response.page);\n        }\n    });\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nconst ValidPhaseNames = new Set([\"Deserialize\", \"Serialize\", \"Retry\", \"Sign\"]);\n/**\n * A private implementation of Pipeline.\n * Do not export this class from the package.\n * @internal\n */\nclass HttpPipeline {\n    constructor(policies) {\n        var _a;\n        this._policies = [];\n        this._policies = (_a = policies === null || policies === void 0 ? void 0 : policies.slice(0)) !== null && _a !== void 0 ? _a : [];\n        this._orderedPolicies = undefined;\n    }\n    addPolicy(policy, options = {}) {\n        if (options.phase && options.afterPhase) {\n            throw new Error(\"Policies inside a phase cannot specify afterPhase.\");\n        }\n        if (options.phase && !ValidPhaseNames.has(options.phase)) {\n            throw new Error(`Invalid phase name: ${options.phase}`);\n        }\n        if (options.afterPhase && !ValidPhaseNames.has(options.afterPhase)) {\n            throw new Error(`Invalid afterPhase name: ${options.afterPhase}`);\n        }\n        this._policies.push({\n            policy,\n            options,\n        });\n        this._orderedPolicies = undefined;\n    }\n    removePolicy(options) {\n        const removedPolicies = [];\n        this._policies = this._policies.filter((policyDescriptor) => {\n            if ((options.name && policyDescriptor.policy.name === options.name) ||\n                (options.phase && policyDescriptor.options.phase === options.phase)) {\n                removedPolicies.push(policyDescriptor.policy);\n                return false;\n            }\n            else {\n                return true;\n            }\n        });\n        this._orderedPolicies = undefined;\n        return removedPolicies;\n    }\n    sendRequest(httpClient, request) {\n        const policies = this.getOrderedPolicies();\n        const pipeline = policies.reduceRight((next, policy) => {\n            return (req) => {\n                return policy.sendRequest(req, next);\n            };\n        }, (req) => httpClient.sendRequest(req));\n        return pipeline(request);\n    }\n    getOrderedPolicies() {\n        if (!this._orderedPolicies) {\n            this._orderedPolicies = this.orderPolicies();\n        }\n        return this._orderedPolicies;\n    }\n    clone() {\n        return new HttpPipeline(this._policies);\n    }\n    static create() {\n        return new HttpPipeline();\n    }\n    orderPolicies() {\n        /**\n         * The goal of this method is to reliably order pipeline policies\n         * based on their declared requirements when they were added.\n         *\n         * Order is first determined by phase:\n         *\n         * 1. Serialize Phase\n         * 2. Policies not in a phase\n         * 3. Deserialize Phase\n         * 4. Retry Phase\n         * 5. Sign Phase\n         *\n         * Within each phase, policies are executed in the order\n         * they were added unless they were specified to execute\n         * before/after other policies or after a particular phase.\n         *\n         * To determine the final order, we will walk the policy list\n         * in phase order multiple times until all dependencies are\n         * satisfied.\n         *\n         * `afterPolicies` are the set of policies that must be\n         * executed before a given policy. This requirement is\n         * considered satisfied when each of the listed policies\n         * have been scheduled.\n         *\n         * `beforePolicies` are the set of policies that must be\n         * executed after a given policy. Since this dependency\n         * can be expressed by converting it into a equivalent\n         * `afterPolicies` declarations, they are normalized\n         * into that form for simplicity.\n         *\n         * An `afterPhase` dependency is considered satisfied when all\n         * policies in that phase have scheduled.\n         *\n         */\n        const result = [];\n        // Track all policies we know about.\n        const policyMap = new Map();\n        function createPhase(name) {\n            return {\n                name,\n                policies: new Set(),\n                hasRun: false,\n                hasAfterPolicies: false,\n            };\n        }\n        // Track policies for each phase.\n        const serializePhase = createPhase(\"Serialize\");\n        const noPhase = createPhase(\"None\");\n        const deserializePhase = createPhase(\"Deserialize\");\n        const retryPhase = createPhase(\"Retry\");\n        const signPhase = createPhase(\"Sign\");\n        // a list of phases in order\n        const orderedPhases = [serializePhase, noPhase, deserializePhase, retryPhase, signPhase];\n        // Small helper function to map phase name to each Phase\n        function getPhase(phase) {\n            if (phase === \"Retry\") {\n                return retryPhase;\n            }\n            else if (phase === \"Serialize\") {\n                return serializePhase;\n            }\n            else if (phase === \"Deserialize\") {\n                return deserializePhase;\n            }\n            else if (phase === \"Sign\") {\n                return signPhase;\n            }\n            else {\n                return noPhase;\n            }\n        }\n        // First walk each policy and create a node to track metadata.\n        for (const descriptor of this._policies) {\n            const policy = descriptor.policy;\n            const options = descriptor.options;\n            const policyName = policy.name;\n            if (policyMap.has(policyName)) {\n                throw new Error(\"Duplicate policy names not allowed in pipeline\");\n            }\n            const node = {\n                policy,\n                dependsOn: new Set(),\n                dependants: new Set(),\n            };\n            if (options.afterPhase) {\n                node.afterPhase = getPhase(options.afterPhase);\n                node.afterPhase.hasAfterPolicies = true;\n            }\n            policyMap.set(policyName, node);\n            const phase = getPhase(options.phase);\n            phase.policies.add(node);\n        }\n        // Now that each policy has a node, connect dependency references.\n        for (const descriptor of this._policies) {\n            const { policy, options } = descriptor;\n            const policyName = policy.name;\n            const node = policyMap.get(policyName);\n            if (!node) {\n                throw new Error(`Missing node for policy ${policyName}`);\n            }\n            if (options.afterPolicies) {\n                for (const afterPolicyName of options.afterPolicies) {\n                    const afterNode = policyMap.get(afterPolicyName);\n                    if (afterNode) {\n                        // Linking in both directions helps later\n                        // when we want to notify dependants.\n                        node.dependsOn.add(afterNode);\n                        afterNode.dependants.add(node);\n                    }\n                }\n            }\n            if (options.beforePolicies) {\n                for (const beforePolicyName of options.beforePolicies) {\n                    const beforeNode = policyMap.get(beforePolicyName);\n                    if (beforeNode) {\n                        // To execute before another node, make it\n                        // depend on the current node.\n                        beforeNode.dependsOn.add(node);\n                        node.dependants.add(beforeNode);\n                    }\n                }\n            }\n        }\n        function walkPhase(phase) {\n            phase.hasRun = true;\n            // Sets iterate in insertion order\n            for (const node of phase.policies) {\n                if (node.afterPhase && (!node.afterPhase.hasRun || node.afterPhase.policies.size)) {\n                    // If this node is waiting on a phase to complete,\n                    // we need to skip it for now.\n                    // Even if the phase is empty, we should wait for it\n                    // to be walked to avoid re-ordering policies.\n                    continue;\n                }\n                if (node.dependsOn.size === 0) {\n                    // If there's nothing else we're waiting for, we can\n                    // add this policy to the result list.\n                    result.push(node.policy);\n                    // Notify anything that depends on this policy that\n                    // the policy has been scheduled.\n                    for (const dependant of node.dependants) {\n                        dependant.dependsOn.delete(node);\n                    }\n                    policyMap.delete(node.policy.name);\n                    phase.policies.delete(node);\n                }\n            }\n        }\n        function walkPhases() {\n            for (const phase of orderedPhases) {\n                walkPhase(phase);\n                // if the phase isn't complete\n                if (phase.policies.size > 0 && phase !== noPhase) {\n                    if (!noPhase.hasRun) {\n                        // Try running noPhase to see if that unblocks this phase next tick.\n                        // This can happen if a phase that happens before noPhase\n                        // is waiting on a noPhase policy to complete.\n                        walkPhase(noPhase);\n                    }\n                    // Don't proceed to the next phase until this phase finishes.\n                    return;\n                }\n                if (phase.hasAfterPolicies) {\n                    // Run any policies unblocked by this phase\n                    walkPhase(noPhase);\n                }\n            }\n        }\n        // Iterate until we've put every node in the result list.\n        let iteration = 0;\n        while (policyMap.size > 0) {\n            iteration++;\n            const initialResultLength = result.length;\n            // Keep walking each phase in order until we can order every node.\n            walkPhases();\n            // The result list *should* get at least one larger each time\n            // after the first full pass.\n            // Otherwise, we're going to loop forever.\n            if (result.length <= initialResultLength && iteration > 1) {\n                throw new Error(\"Cannot satisfy policy dependencies due to requirements cycle.\");\n            }\n        }\n        return result;\n    }\n}\n/**\n * Creates a totally empty pipeline.\n * Useful for testing or creating a custom one.\n */\nexport function createEmptyPipeline() {\n    return HttpPipeline.create();\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { log } from \"./log.js\";\nconst debugEnvVariable = (typeof process !== \"undefined\" && process.env && process.env.DEBUG) || undefined;\nlet enabledString;\nlet enabledNamespaces = [];\nlet skippedNamespaces = [];\nconst debuggers = [];\nif (debugEnvVariable) {\n    enable(debugEnvVariable);\n}\nconst debugObj = Object.assign((namespace) => {\n    return createDebugger(namespace);\n}, {\n    enable,\n    enabled,\n    disable,\n    log,\n});\nfunction enable(namespaces) {\n    enabledString = namespaces;\n    enabledNamespaces = [];\n    skippedNamespaces = [];\n    const wildcard = /\\*/g;\n    const namespaceList = namespaces.split(\",\").map((ns) => ns.trim().replace(wildcard, \".*?\"));\n    for (const ns of namespaceList) {\n        if (ns.startsWith(\"-\")) {\n            skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`));\n        }\n        else {\n            enabledNamespaces.push(new RegExp(`^${ns}$`));\n        }\n    }\n    for (const instance of debuggers) {\n        instance.enabled = enabled(instance.namespace);\n    }\n}\nfunction enabled(namespace) {\n    if (namespace.endsWith(\"*\")) {\n        return true;\n    }\n    for (const skipped of skippedNamespaces) {\n        if (skipped.test(namespace)) {\n            return false;\n        }\n    }\n    for (const enabledNamespace of enabledNamespaces) {\n        if (enabledNamespace.test(namespace)) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction disable() {\n    const result = enabledString || \"\";\n    enable(\"\");\n    return result;\n}\nfunction createDebugger(namespace) {\n    const newDebugger = Object.assign(debug, {\n        enabled: enabled(namespace),\n        destroy,\n        log: debugObj.log,\n        namespace,\n        extend,\n    });\n    function debug(...args) {\n        if (!newDebugger.enabled) {\n            return;\n        }\n        if (args.length > 0) {\n            args[0] = `${namespace} ${args[0]}`;\n        }\n        newDebugger.log(...args);\n    }\n    debuggers.push(newDebugger);\n    return newDebugger;\n}\nfunction destroy() {\n    const index = debuggers.indexOf(this);\n    if (index >= 0) {\n        debuggers.splice(index, 1);\n        return true;\n    }\n    return false;\n}\nfunction extend(namespace) {\n    const newDebugger = createDebugger(`${this.namespace}:${namespace}`);\n    newDebugger.log = this.log;\n    return newDebugger;\n}\nexport default debugObj;\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport function log(...args) {\n    if (args.length > 0) {\n        const firstArg = String(args[0]);\n        if (firstArg.includes(\":error\")) {\n            console.error(...args);\n        }\n        else if (firstArg.includes(\":warning\")) {\n            console.warn(...args);\n        }\n        else if (firstArg.includes(\":info\")) {\n            console.info(...args);\n        }\n        else if (firstArg.includes(\":verbose\")) {\n            console.debug(...args);\n        }\n        else {\n            console.debug(...args);\n        }\n    }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport debug from \"./debug.js\";\nconst registeredLoggers = new Set();\nconst logLevelFromEnv = (typeof process !== \"undefined\" && process.env && process.env.AZURE_LOG_LEVEL) || undefined;\nlet azureLogLevel;\n/**\n * The AzureLogger provides a mechanism for overriding where logs are output to.\n * By default, logs are sent to stderr.\n * Override the `log` method to redirect logs to another location.\n */\nexport const AzureLogger = debug(\"azure\");\nAzureLogger.log = (...args) => {\n    debug.log(...args);\n};\nconst AZURE_LOG_LEVELS = [\"verbose\", \"info\", \"warning\", \"error\"];\nif (logLevelFromEnv) {\n    // avoid calling setLogLevel because we don't want a mis-set environment variable to crash\n    if (isAzureLogLevel(logLevelFromEnv)) {\n        setLogLevel(logLevelFromEnv);\n    }\n    else {\n        console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(\", \")}.`);\n    }\n}\n/**\n * Immediately enables logging at the specified log level. If no level is specified, logging is disabled.\n * @param level - The log level to enable for logging.\n * Options from most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nexport function setLogLevel(level) {\n    if (level && !isAzureLogLevel(level)) {\n        throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(\",\")}`);\n    }\n    azureLogLevel = level;\n    const enabledNamespaces = [];\n    for (const logger of registeredLoggers) {\n        if (shouldEnable(logger)) {\n            enabledNamespaces.push(logger.namespace);\n        }\n    }\n    debug.enable(enabledNamespaces.join(\",\"));\n}\n/**\n * Retrieves the currently specified log level.\n */\nexport function getLogLevel() {\n    return azureLogLevel;\n}\nconst levelMap = {\n    verbose: 400,\n    info: 300,\n    warning: 200,\n    error: 100,\n};\n/**\n * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.\n * @param namespace - The name of the SDK package.\n * @hidden\n */\nexport function createClientLogger(namespace) {\n    const clientRootLogger = AzureLogger.extend(namespace);\n    patchLogMethod(AzureLogger, clientRootLogger);\n    return {\n        error: createLogger(clientRootLogger, \"error\"),\n        warning: createLogger(clientRootLogger, \"warning\"),\n        info: createLogger(clientRootLogger, \"info\"),\n        verbose: createLogger(clientRootLogger, \"verbose\"),\n    };\n}\nfunction patchLogMethod(parent, child) {\n    child.log = (...args) => {\n        parent.log(...args);\n    };\n}\nfunction createLogger(parent, level) {\n    const logger = Object.assign(parent.extend(level), {\n        level,\n    });\n    patchLogMethod(parent, logger);\n    if (shouldEnable(logger)) {\n        const enabledNamespaces = debug.disable();\n        debug.enable(enabledNamespaces + \",\" + logger.namespace);\n    }\n    registeredLoggers.add(logger);\n    return logger;\n}\nfunction shouldEnable(logger) {\n    return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]);\n}\nfunction isAzureLogLevel(logLevel) {\n    return AZURE_LOG_LEVELS.includes(logLevel);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"core-rest-pipeline\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n *   doAsyncWork(controller.signal)\n * } catch (e) {\n *   if (e.name === 'AbortError') {\n *     // handle abort error here.\n *   }\n * }\n * ```\n */\nexport class AbortError extends Error {\n    constructor(message) {\n        super(message);\n        this.name = \"AbortError\";\n    }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Returns a random integer value between a lower and upper bound,\n * inclusive of both bounds.\n * Note that this uses Math.random and isn't secure. If you need to use\n * this for any kind of security purpose, find a better source of random.\n * @param min - The smallest integer value allowed.\n * @param max - The largest integer value allowed.\n */\nexport function getRandomIntegerInclusive(min, max) {\n    // Make sure inputs are integers.\n    min = Math.ceil(min);\n    max = Math.floor(max);\n    // Pick a random offset from zero to the size of the range.\n    // Since Math.random() can never return 1, we have to make the range one larger\n    // in order to be inclusive of the maximum value after we take the floor.\n    const offset = Math.floor(Math.random() * (max - min + 1));\n    return offset + min;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createAbortablePromise } from \"./createAbortablePromise.js\";\nimport { getRandomIntegerInclusive } from \"./random.js\";\nconst StandardAbortMessage = \"The delay was aborted.\";\n/**\n * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds.\n * @param timeInMs - The number of milliseconds to be delayed.\n * @param options - The options for delay - currently abort options\n * @returns Promise that is resolved after timeInMs\n */\nexport function delay(timeInMs, options) {\n    let token;\n    const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {};\n    return createAbortablePromise((resolve) => {\n        token = setTimeout(resolve, timeInMs);\n    }, {\n        cleanupBeforeAbort: () => clearTimeout(token),\n        abortSignal,\n        abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage,\n    });\n}\n/**\n * Calculates the delay interval for retry attempts using exponential delay with jitter.\n * @param retryAttempt - The current retry attempt number.\n * @param config - The exponential retry configuration.\n * @returns An object containing the calculated retry delay.\n */\nexport function calculateRetryDelay(retryAttempt, config) {\n    // Exponentially increase the delay each time\n    const exponentialDelay = config.retryDelayInMs * Math.pow(2, retryAttempt);\n    // Don't let the delay exceed the maximum\n    const clampedDelay = Math.min(config.maxRetryDelayInMs, exponentialDelay);\n    // Allow the final value to have some \"jitter\" (within 50% of the delay size) so\n    // that retries across multiple clients don't occur simultaneously.\n    const retryAfterInMs = clampedDelay / 2 + getRandomIntegerInclusive(0, clampedDelay / 2);\n    return { retryAfterInMs };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { AbortError } from \"@azure/abort-controller\";\n/**\n * Creates an abortable promise.\n * @param buildPromise - A function that takes the resolve and reject functions as parameters.\n * @param options - The options for the abortable promise.\n * @returns A promise that can be aborted.\n */\nexport function createAbortablePromise(buildPromise, options) {\n    const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {};\n    return new Promise((resolve, reject) => {\n        function rejectOnAbort() {\n            reject(new AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : \"The operation was aborted.\"));\n        }\n        function removeListeners() {\n            abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener(\"abort\", onAbort);\n        }\n        function onAbort() {\n            cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort();\n            removeListeners();\n            rejectOnAbort();\n        }\n        if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {\n            return rejectOnAbort();\n        }\n        try {\n            buildPromise((x) => {\n                removeListeners();\n                resolve(x);\n            }, (x) => {\n                removeListeners();\n                reject(x);\n            });\n        }\n        catch (err) {\n            reject(err);\n        }\n        abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener(\"abort\", onAbort);\n    });\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Helper to determine when an input is a generic JS object.\n * @returns true when input is an object type that is not null, Array, RegExp, or Date.\n */\nexport function isObject(input) {\n    return (typeof input === \"object\" &&\n        input !== null &&\n        !Array.isArray(input) &&\n        !(input instanceof RegExp) &&\n        !(input instanceof Date));\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { isObject } from \"./object.js\";\n/**\n * Typeguard for an error object shape (has name and message)\n * @param e - Something caught by a catch clause.\n */\nexport function isError(e) {\n    if (isObject(e)) {\n        const hasName = typeof e.name === \"string\";\n        const hasMessage = typeof e.message === \"string\";\n        return hasName && hasMessage;\n    }\n    return false;\n}\n/**\n * Given what is thought to be an error object, return the message if possible.\n * If the message is missing, returns a stringified version of the input.\n * @param e - Something thrown from a try block\n * @returns The error message or a string of the input\n */\nexport function getErrorMessage(e) {\n    if (isError(e)) {\n        return e.message;\n    }\n    else {\n        let stringified;\n        try {\n            if (typeof e === \"object\" && e) {\n                stringified = JSON.stringify(e);\n            }\n            else {\n                stringified = String(e);\n            }\n        }\n        catch (err) {\n            stringified = \"[unable to stringify input]\";\n        }\n        return `Unknown error ${stringified}`;\n    }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * The helper that transforms bytes with specific character encoding into string\n * @param bytes - the uint8array bytes\n * @param format - the format we use to encode the byte\n * @returns a string of the encoded string\n */\nexport function uint8ArrayToString(bytes, format) {\n    switch (format) {\n        case \"utf-8\":\n            return uint8ArrayToUtf8String(bytes);\n        case \"base64\":\n            return uint8ArrayToBase64(bytes);\n        case \"base64url\":\n            return uint8ArrayToBase64Url(bytes);\n        case \"hex\":\n            return uint8ArrayToHexString(bytes);\n    }\n}\n/**\n * The helper that transforms string to specific character encoded bytes array.\n * @param value - the string to be converted\n * @param format - the format we use to decode the value\n * @returns a uint8array\n */\nexport function stringToUint8Array(value, format) {\n    switch (format) {\n        case \"utf-8\":\n            return utf8StringToUint8Array(value);\n        case \"base64\":\n            return base64ToUint8Array(value);\n        case \"base64url\":\n            return base64UrlToUint8Array(value);\n        case \"hex\":\n            return hexStringToUint8Array(value);\n    }\n}\n/**\n * Decodes a Uint8Array into a Base64 string.\n * @internal\n */\nexport function uint8ArrayToBase64(bytes) {\n    return btoa([...bytes].map((x) => String.fromCharCode(x)).join(\"\"));\n}\n/**\n * Decodes a Uint8Array into a Base64Url string.\n * @internal\n */\nexport function uint8ArrayToBase64Url(bytes) {\n    return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\n/**\n * Decodes a Uint8Array into a javascript string.\n * @internal\n */\nexport function uint8ArrayToUtf8String(bytes) {\n    const decoder = new TextDecoder();\n    const dataString = decoder.decode(bytes);\n    return dataString;\n}\n/**\n * Decodes a Uint8Array into a hex string\n * @internal\n */\nexport function uint8ArrayToHexString(bytes) {\n    return [...bytes].map((x) => x.toString(16).padStart(2, \"0\")).join(\"\");\n}\n/**\n * Encodes a JavaScript string into a Uint8Array.\n * @internal\n */\nexport function utf8StringToUint8Array(value) {\n    return new TextEncoder().encode(value);\n}\n/**\n * Encodes a Base64 string into a Uint8Array.\n * @internal\n */\nexport function base64ToUint8Array(value) {\n    return new Uint8Array([...atob(value)].map((x) => x.charCodeAt(0)));\n}\n/**\n * Encodes a Base64Url string into a Uint8Array.\n * @internal\n */\nexport function base64UrlToUint8Array(value) {\n    const base64String = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n    return base64ToUint8Array(base64String);\n}\nconst hexDigits = new Set(\"0123456789abcdefABCDEF\");\n/**\n * Encodes a hex string into a Uint8Array\n * @internal\n */\nexport function hexStringToUint8Array(value) {\n    // If value has odd length, the last character will be ignored, consistent with NodeJS Buffer behavior\n    const bytes = new Uint8Array(value.length / 2);\n    for (let i = 0; i < value.length / 2; ++i) {\n        const highNibble = value[2 * i];\n        const lowNibble = value[2 * i + 1];\n        if (!hexDigits.has(highNibble) || !hexDigits.has(lowNibble)) {\n            // Replicate Node Buffer behavior by exiting early when we encounter an invalid byte\n            return bytes.slice(0, i);\n        }\n        bytes[i] = parseInt(`${highNibble}${lowNibble}`, 16);\n    }\n    return bytes;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { stringToUint8Array, uint8ArrayToString } from \"./bytesEncoding.js\";\nlet subtleCrypto;\n/**\n * Returns a cached reference to the Web API crypto.subtle object.\n * @internal\n */\nfunction getCrypto() {\n    if (subtleCrypto) {\n        return subtleCrypto;\n    }\n    if (!self.crypto || !self.crypto.subtle) {\n        throw new Error(\"Your browser environment does not support cryptography functions.\");\n    }\n    subtleCrypto = self.crypto.subtle;\n    return subtleCrypto;\n}\n/**\n * Generates a SHA-256 HMAC signature.\n * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash.\n * @param stringToSign - The data to be signed.\n * @param encoding - The textual encoding to use for the returned HMAC digest.\n */\nexport async function computeSha256Hmac(key, stringToSign, encoding) {\n    const crypto = getCrypto();\n    const keyBytes = stringToUint8Array(key, \"base64\");\n    const stringToSignBytes = stringToUint8Array(stringToSign, \"utf-8\");\n    const cryptoKey = await crypto.importKey(\"raw\", keyBytes, {\n        name: \"HMAC\",\n        hash: { name: \"SHA-256\" },\n    }, false, [\"sign\"]);\n    const signature = await crypto.sign({\n        name: \"HMAC\",\n        hash: { name: \"SHA-256\" },\n    }, cryptoKey, stringToSignBytes);\n    return uint8ArrayToString(new Uint8Array(signature), encoding);\n}\n/**\n * Generates a SHA-256 hash.\n * @param content - The data to be included in the hash.\n * @param encoding - The textual encoding to use for the returned hash.\n */\nexport async function computeSha256Hash(content, encoding) {\n    const contentBytes = stringToUint8Array(content, \"utf-8\");\n    const digest = await getCrypto().digest({ name: \"SHA-256\" }, contentBytes);\n    return uint8ArrayToString(new Uint8Array(digest), encoding);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Helper TypeGuard that checks if something is defined or not.\n * @param thing - Anything\n */\nexport function isDefined(thing) {\n    return typeof thing !== \"undefined\" && thing !== null;\n}\n/**\n * Helper TypeGuard that checks if the input is an object with the specified properties.\n * @param thing - Anything.\n * @param properties - The name of the properties that should appear in the object.\n */\nexport function isObjectWithProperties(thing, properties) {\n    if (!isDefined(thing) || typeof thing !== \"object\") {\n        return false;\n    }\n    for (const property of properties) {\n        if (!objectHasProperty(thing, property)) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Helper TypeGuard that checks if the input is an object with the specified property.\n * @param thing - Any object.\n * @param property - The name of the property that should appear in the object.\n */\nexport function objectHasProperty(thing, property) {\n    return (isDefined(thing) && typeof thing === \"object\" && property in thing);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nvar _a;\nimport { generateUUID } from \"./uuidUtils.common.js\";\n// NOTE: This could be undefined if not used in a secure context\nconst uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === \"function\"\n    ? globalThis.crypto.randomUUID.bind(globalThis.crypto)\n    : generateUUID;\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID() {\n    return uuidFunction();\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function generateUUID() {\n    let uuid = \"\";\n    for (let i = 0; i < 32; i++) {\n        // Generate a random number between 0 and 15\n        const randomNumber = Math.floor(Math.random() * 16);\n        // Set the UUID version to 4 in the 13th position\n        if (i === 12) {\n            uuid += \"4\";\n        }\n        else if (i === 16) {\n            // Set the UUID variant to \"10\" in the 17th position\n            uuid += (randomNumber & 0x3) | 0x8;\n        }\n        else {\n            // Add a random hexadecimal digit to the UUID string\n            uuid += randomNumber.toString(16);\n        }\n        // Add hyphens to the UUID string at the appropriate positions\n        if (i === 7 || i === 11 || i === 15 || i === 19) {\n            uuid += \"-\";\n        }\n    }\n    return uuid;\n}\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID() {\n    return generateUUID();\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nvar _a, _b, _c, _d;\n/**\n * A constant that indicates whether the environment the code is running is a Web Browser.\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-no-window\nexport const isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n/**\n * A constant that indicates whether the environment the code is running is a Web Worker.\n */\nexport const isWebWorker = typeof self === \"object\" &&\n    typeof (self === null || self === void 0 ? void 0 : self.importScripts) === \"function\" &&\n    (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === \"DedicatedWorkerGlobalScope\" ||\n        ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === \"ServiceWorkerGlobalScope\" ||\n        ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === \"SharedWorkerGlobalScope\");\n/**\n * A constant that indicates whether the environment the code is running is Deno.\n */\nexport const isDeno = typeof Deno !== \"undefined\" &&\n    typeof Deno.version !== \"undefined\" &&\n    typeof Deno.version.deno !== \"undefined\";\n/**\n * A constant that indicates whether the environment the code is running is Bun.sh.\n */\nexport const isBun = typeof Bun !== \"undefined\" && typeof Bun.version !== \"undefined\";\n/**\n * A constant that indicates whether the environment the code is running is a Node.js compatible environment.\n */\nexport const isNodeLike = typeof globalThis.process !== \"undefined\" &&\n    Boolean(globalThis.process.version) &&\n    Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node);\n/**\n * A constant that indicates whether the environment the code is running is a Node.js compatible environment.\n * @deprecated Use `isNodeLike` instead.\n */\nexport const isNode = isNodeLike;\n/**\n * A constant that indicates whether the environment the code is running is Node.JS.\n */\nexport const isNodeRuntime = isNodeLike && !isBun && !isDeno;\n/**\n * A constant that indicates whether the environment the code is running is in React-Native.\n */\n// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js\nexport const isReactNative = typeof navigator !== \"undefined\" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === \"ReactNative\";\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { isObject } from \"@azure/core-util\";\nconst RedactedString = \"REDACTED\";\n// Make sure this list is up-to-date with the one under core/logger/Readme#Keyconcepts\nconst defaultAllowedHeaderNames = [\n    \"x-ms-client-request-id\",\n    \"x-ms-return-client-request-id\",\n    \"x-ms-useragent\",\n    \"x-ms-correlation-request-id\",\n    \"x-ms-request-id\",\n    \"client-request-id\",\n    \"ms-cv\",\n    \"return-client-request-id\",\n    \"traceparent\",\n    \"Access-Control-Allow-Credentials\",\n    \"Access-Control-Allow-Headers\",\n    \"Access-Control-Allow-Methods\",\n    \"Access-Control-Allow-Origin\",\n    \"Access-Control-Expose-Headers\",\n    \"Access-Control-Max-Age\",\n    \"Access-Control-Request-Headers\",\n    \"Access-Control-Request-Method\",\n    \"Origin\",\n    \"Accept\",\n    \"Accept-Encoding\",\n    \"Cache-Control\",\n    \"Connection\",\n    \"Content-Length\",\n    \"Content-Type\",\n    \"Date\",\n    \"ETag\",\n    \"Expires\",\n    \"If-Match\",\n    \"If-Modified-Since\",\n    \"If-None-Match\",\n    \"If-Unmodified-Since\",\n    \"Last-Modified\",\n    \"Pragma\",\n    \"Request-Id\",\n    \"Retry-After\",\n    \"Server\",\n    \"Transfer-Encoding\",\n    \"User-Agent\",\n    \"WWW-Authenticate\",\n];\nconst defaultAllowedQueryParameters = [\"api-version\"];\n/**\n * @internal\n */\nexport class Sanitizer {\n    constructor({ additionalAllowedHeaderNames: allowedHeaderNames = [], additionalAllowedQueryParameters: allowedQueryParameters = [], } = {}) {\n        allowedHeaderNames = defaultAllowedHeaderNames.concat(allowedHeaderNames);\n        allowedQueryParameters = defaultAllowedQueryParameters.concat(allowedQueryParameters);\n        this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase()));\n        this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase()));\n    }\n    sanitize(obj) {\n        const seen = new Set();\n        return JSON.stringify(obj, (key, value) => {\n            // Ensure Errors include their interesting non-enumerable members\n            if (value instanceof Error) {\n                return Object.assign(Object.assign({}, value), { name: value.name, message: value.message });\n            }\n            if (key === \"headers\") {\n                return this.sanitizeHeaders(value);\n            }\n            else if (key === \"url\") {\n                return this.sanitizeUrl(value);\n            }\n            else if (key === \"query\") {\n                return this.sanitizeQuery(value);\n            }\n            else if (key === \"body\") {\n                // Don't log the request body\n                return undefined;\n            }\n            else if (key === \"response\") {\n                // Don't log response again\n                return undefined;\n            }\n            else if (key === \"operationSpec\") {\n                // When using sendOperationRequest, the request carries a massive\n                // field with the autorest spec. No need to log it.\n                return undefined;\n            }\n            else if (Array.isArray(value) || isObject(value)) {\n                if (seen.has(value)) {\n                    return \"[Circular]\";\n                }\n                seen.add(value);\n            }\n            return value;\n        }, 2);\n    }\n    sanitizeUrl(value) {\n        if (typeof value !== \"string\" || value === null || value === \"\") {\n            return value;\n        }\n        const url = new URL(value);\n        if (!url.search) {\n            return value;\n        }\n        for (const [key] of url.searchParams) {\n            if (!this.allowedQueryParameters.has(key.toLowerCase())) {\n                url.searchParams.set(key, RedactedString);\n            }\n        }\n        return url.toString();\n    }\n    sanitizeHeaders(obj) {\n        const sanitized = {};\n        for (const key of Object.keys(obj)) {\n            if (this.allowedHeaderNames.has(key.toLowerCase())) {\n                sanitized[key] = obj[key];\n            }\n            else {\n                sanitized[key] = RedactedString;\n            }\n        }\n        return sanitized;\n    }\n    sanitizeQuery(value) {\n        if (typeof value !== \"object\" || value === null) {\n            return value;\n        }\n        const sanitized = {};\n        for (const k of Object.keys(value)) {\n            if (this.allowedQueryParameters.has(k.toLowerCase())) {\n                sanitized[k] = value[k];\n            }\n            else {\n                sanitized[k] = RedactedString;\n            }\n        }\n        return sanitized;\n    }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * The programmatic identifier of the redirectPolicy.\n */\nexport const redirectPolicyName = \"redirectPolicy\";\n/**\n * Methods that are allowed to follow redirects 301 and 302\n */\nconst allowedRedirect = [\"GET\", \"HEAD\"];\n/**\n * A policy to follow Location headers from the server in order\n * to support server-side redirection.\n * In the browser, this policy is not used.\n * @param options - Options to control policy behavior.\n */\nexport function redirectPolicy(options = {}) {\n    const { maxRetries = 20 } = options;\n    return {\n        name: redirectPolicyName,\n        async sendRequest(request, next) {\n            const response = await next(request);\n            return handleRedirect(next, response, maxRetries);\n        },\n    };\n}\nasync function handleRedirect(next, response, maxRetries, currentRetries = 0) {\n    const { request, status, headers } = response;\n    const locationHeader = headers.get(\"location\");\n    if (locationHeader &&\n        (status === 300 ||\n            (status === 301 && allowedRedirect.includes(request.method)) ||\n            (status === 302 && allowedRedirect.includes(request.method)) ||\n            (status === 303 && request.method === \"POST\") ||\n            status === 307) &&\n        currentRetries < maxRetries) {\n        const url = new URL(locationHeader, request.url);\n        request.url = url.toString();\n        // POST request with Status code 303 should be converted into a\n        // redirected GET request if the redirect url is present in the location header\n        if (status === 303) {\n            request.method = \"GET\";\n            request.headers.delete(\"Content-Length\");\n            delete request.body;\n        }\n        request.headers.delete(\"Authorization\");\n        const res = await next(request);\n        return handleRedirect(next, res, maxRetries, currentRetries + 1);\n    }\n    return response;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @internal\n */\nexport function getHeaderName() {\n    return \"x-ms-useragent\";\n}\nfunction getBrowserInfo(userAgent) {\n    const browserRegexes = [\n        { name: \"Firefox\", regex: /Firefox\\/([\\d.]+)/ },\n        { name: \"Safari\", regex: /Version\\/([\\d.]+).*Safari/ },\n    ];\n    for (const browser of browserRegexes) {\n        const match = userAgent.match(browser.regex);\n        if (match) {\n            return { brand: browser.name, version: match[1] };\n        }\n    }\n    return undefined;\n}\nfunction getBrandVersionString(brands) {\n    const brandOrder = [\"Google Chrome\", \"Microsoft Edge\", \"Opera\", \"Brave\", \"Chromium\"];\n    for (const brand of brandOrder) {\n        const foundBrand = brands.find((b) => b.brand === brand);\n        if (foundBrand) {\n            return foundBrand;\n        }\n    }\n    return undefined;\n}\n/**\n * @internal\n */\nexport async function setPlatformSpecificData(map) {\n    const localNavigator = globalThis.navigator;\n    let osPlatform = \"unknown\";\n    if (localNavigator === null || localNavigator === void 0 ? void 0 : localNavigator.userAgentData) {\n        const entropyValues = await localNavigator.userAgentData.getHighEntropyValues([\n            \"architecture\",\n            \"platformVersion\",\n        ]);\n        osPlatform = `${entropyValues.architecture}-${entropyValues.platform}-${entropyValues.platformVersion}`;\n        // Get the brand and version\n        const brand = getBrandVersionString(localNavigator.userAgentData.brands);\n        if (brand) {\n            map.set(brand.brand, brand.version);\n        }\n    }\n    else if (localNavigator === null || localNavigator === void 0 ? void 0 : localNavigator.platform) {\n        osPlatform = localNavigator.platform;\n        const brand = getBrowserInfo(localNavigator.userAgent);\n        if (brand) {\n            map.set(brand.brand, brand.version);\n        }\n    }\n    else if (typeof globalThis.EdgeRuntime === \"string\") {\n        map.set(\"EdgeRuntime\", globalThis.EdgeRuntime);\n    }\n    map.set(\"OS\", osPlatform);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getHeaderName, setPlatformSpecificData } from \"./userAgentPlatform.js\";\nimport { SDK_VERSION } from \"../constants.js\";\nfunction getUserAgentString(telemetryInfo) {\n    const parts = [];\n    for (const [key, value] of telemetryInfo) {\n        const token = value ? `${key}/${value}` : key;\n        parts.push(token);\n    }\n    return parts.join(\" \");\n}\n/**\n * @internal\n */\nexport function getUserAgentHeaderName() {\n    return getHeaderName();\n}\n/**\n * @internal\n */\nexport async function getUserAgentValue(prefix) {\n    const runtimeInfo = new Map();\n    runtimeInfo.set(\"core-rest-pipeline\", SDK_VERSION);\n    await setPlatformSpecificData(runtimeInfo);\n    const defaultAgent = getUserAgentString(runtimeInfo);\n    const userAgentValue = prefix ? `${prefix} ${defaultAgent}` : defaultAgent;\n    return userAgentValue;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport const SDK_VERSION = \"1.19.1\";\nexport const DEFAULT_RETRY_POLICY_COUNT = 3;\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getUserAgentHeaderName, getUserAgentValue } from \"../util/userAgent.js\";\nconst UserAgentHeaderName = getUserAgentHeaderName();\n/**\n * The programmatic identifier of the userAgentPolicy.\n */\nexport const userAgentPolicyName = \"userAgentPolicy\";\n/**\n * A policy that sets the User-Agent header (or equivalent) to reflect\n * the library version.\n * @param options - Options to customize the user agent value.\n */\nexport function userAgentPolicy(options = {}) {\n    const userAgentValue = getUserAgentValue(options.userAgentPrefix);\n    return {\n        name: userAgentPolicyName,\n        async sendRequest(request, next) {\n            if (!request.headers.has(UserAgentHeaderName)) {\n                request.headers.set(UserAgentHeaderName, await userAgentValue);\n            }\n            return next(request);\n        },\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { isNodeLike } from \"@azure/core-util\";\nimport { isNodeReadableStream } from \"./typeGuards.js\";\nconst unimplementedMethods = {\n    arrayBuffer: () => {\n        throw new Error(\"Not implemented\");\n    },\n    bytes: () => {\n        throw new Error(\"Not implemented\");\n    },\n    slice: () => {\n        throw new Error(\"Not implemented\");\n    },\n    text: () => {\n        throw new Error(\"Not implemented\");\n    },\n};\n/**\n * Private symbol used as key on objects created using createFile containing the\n * original source of the file object.\n *\n * This is used in Node to access the original Node stream without using Blob#stream, which\n * returns a web stream. This is done to avoid a couple of bugs to do with Blob#stream and\n * Readable#to/fromWeb in Node versions we support:\n * - https://github.com/nodejs/node/issues/42694 (fixed in Node 18.14)\n * - https://github.com/nodejs/node/issues/48916 (fixed in Node 20.6)\n *\n * Once these versions are no longer supported, we may be able to stop doing this.\n *\n * @internal\n */\nconst rawContent = Symbol(\"rawContent\");\nfunction hasRawContent(x) {\n    return typeof x[rawContent] === \"function\";\n}\n/**\n * Extract the raw content from a given blob-like object. If the input was created using createFile\n * or createFileFromStream, the exact content passed into createFile/createFileFromStream will be used.\n * For true instances of Blob and File, returns the blob's content as a Web ReadableStream<Uint8Array>.\n *\n * @internal\n */\nexport function getRawContent(blob) {\n    if (hasRawContent(blob)) {\n        return blob[rawContent]();\n    }\n    else {\n        return blob.stream();\n    }\n}\n/**\n * Create an object that implements the File interface. This object is intended to be\n * passed into RequestBodyType.formData, and is not guaranteed to work as expected in\n * other situations.\n *\n * Use this function to:\n * - Create a File object for use in RequestBodyType.formData in environments where the\n *   global File object is unavailable.\n * - Create a File-like object from a readable stream without reading the stream into memory.\n *\n * @param stream - the content of the file as a callback returning a stream. When a File object made using createFile is\n *                  passed in a request's form data map, the stream will not be read into memory\n *                  and instead will be streamed when the request is made. In the event of a retry, the\n *                  stream needs to be read again, so this callback SHOULD return a fresh stream if possible.\n * @param name - the name of the file.\n * @param options - optional metadata about the file, e.g. file name, file size, MIME type.\n */\nexport function createFileFromStream(stream, name, options = {}) {\n    var _a, _b, _c, _d;\n    return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : \"\", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : \"\", size: (_d = options.size) !== null && _d !== void 0 ? _d : -1, name, stream: () => {\n            const s = stream();\n            if (isNodeReadableStream(s)) {\n                throw new Error(\"Not supported: a Node stream was provided as input to createFileFromStream.\");\n            }\n            return s;\n        }, [rawContent]: stream });\n}\n/**\n * Create an object that implements the File interface. This object is intended to be\n * passed into RequestBodyType.formData, and is not guaranteed to work as expected in\n * other situations.\n *\n * Use this function create a File object for use in RequestBodyType.formData in environments where the global File object is unavailable.\n *\n * @param content - the content of the file as a Uint8Array in memory.\n * @param name - the name of the file.\n * @param options - optional metadata about the file, e.g. file name, file size, MIME type.\n */\nexport function createFile(content, name, options = {}) {\n    var _a, _b, _c;\n    if (isNodeLike) {\n        return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a = options.type) !== null && _a !== void 0 ? _a : \"\", lastModified: (_b = options.lastModified) !== null && _b !== void 0 ? _b : new Date().getTime(), webkitRelativePath: (_c = options.webkitRelativePath) !== null && _c !== void 0 ? _c : \"\", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content });\n    }\n    else {\n        return new File([content], name, options);\n    }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport function isNodeReadableStream(x) {\n    return Boolean(x && typeof x[\"pipe\"] === \"function\");\n}\nexport function isWebReadableStream(x) {\n    return Boolean(x &&\n        typeof x.getReader === \"function\" &&\n        typeof x.tee === \"function\");\n}\nexport function isReadableStream(x) {\n    return isNodeReadableStream(x) || isWebReadableStream(x);\n}\nexport function isBlob(x) {\n    return typeof x.stream === \"function\";\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getRawContent } from \"./file.js\";\nimport { isNodeReadableStream, isWebReadableStream } from \"./typeGuards.js\";\n/**\n * Drain the content of the given ReadableStream into a Blob.\n * The blob's content may end up in memory or on disk dependent on size.\n */\nfunction drain(stream) {\n    return new Response(stream).blob();\n}\nasync function toBlobPart(source) {\n    if (source instanceof Blob || source instanceof Uint8Array) {\n        return source;\n    }\n    if (isWebReadableStream(source)) {\n        return drain(source);\n    }\n    // If it's not a true Blob, and it's not a Uint8Array, we can assume the source\n    // is a fake File created by createFileFromStream and we can get the original stream\n    // using getRawContent.\n    const rawContent = getRawContent(source);\n    // Shouldn't happen but guard for it anyway\n    if (isNodeReadableStream(rawContent)) {\n        throw new Error(\"Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.\");\n    }\n    return toBlobPart(rawContent);\n}\n/**\n * Utility function that concatenates a set of binary inputs into one combined output.\n *\n * @param sources - array of sources for the concatenation\n * @returns - in Node, a (() =\\> NodeJS.ReadableStream) which, when read, produces a concatenation of all the inputs.\n *           In browser, returns a `Blob` representing all the concatenated inputs.\n *\n * @internal\n */\nexport async function concat(sources) {\n    const parts = [];\n    for (const source of sources) {\n        parts.push(await toBlobPart(typeof source === \"function\" ? source() : source));\n    }\n    return new Blob(parts);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { randomUUID, stringToUint8Array } from \"@azure/core-util\";\nimport { concat } from \"../util/concat.js\";\nimport { isBlob } from \"../util/typeGuards.js\";\nfunction generateBoundary() {\n    return `----AzSDKFormBoundary${randomUUID()}`;\n}\nfunction encodeHeaders(headers) {\n    let result = \"\";\n    for (const [key, value] of headers) {\n        result += `${key}: ${value}\\r\\n`;\n    }\n    return result;\n}\nfunction getLength(source) {\n    if (source instanceof Uint8Array) {\n        return source.byteLength;\n    }\n    else if (isBlob(source)) {\n        // if was created using createFile then -1 means we have an unknown size\n        return source.size === -1 ? undefined : source.size;\n    }\n    else {\n        return undefined;\n    }\n}\nfunction getTotalLength(sources) {\n    let total = 0;\n    for (const source of sources) {\n        const partLength = getLength(source);\n        if (partLength === undefined) {\n            return undefined;\n        }\n        else {\n            total += partLength;\n        }\n    }\n    return total;\n}\nasync function buildRequestBody(request, parts, boundary) {\n    const sources = [\n        stringToUint8Array(`--${boundary}`, \"utf-8\"),\n        ...parts.flatMap((part) => [\n            stringToUint8Array(\"\\r\\n\", \"utf-8\"),\n            stringToUint8Array(encodeHeaders(part.headers), \"utf-8\"),\n            stringToUint8Array(\"\\r\\n\", \"utf-8\"),\n            part.body,\n            stringToUint8Array(`\\r\\n--${boundary}`, \"utf-8\"),\n        ]),\n        stringToUint8Array(\"--\\r\\n\\r\\n\", \"utf-8\"),\n    ];\n    const contentLength = getTotalLength(sources);\n    if (contentLength) {\n        request.headers.set(\"Content-Length\", contentLength);\n    }\n    request.body = await concat(sources);\n}\n/**\n * Name of multipart policy\n */\nexport const multipartPolicyName = \"multipartPolicy\";\nconst maxBoundaryLength = 70;\nconst validBoundaryCharacters = new Set(`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?`);\nfunction assertValidBoundary(boundary) {\n    if (boundary.length > maxBoundaryLength) {\n        throw new Error(`Multipart boundary \"${boundary}\" exceeds maximum length of 70 characters`);\n    }\n    if (Array.from(boundary).some((x) => !validBoundaryCharacters.has(x))) {\n        throw new Error(`Multipart boundary \"${boundary}\" contains invalid characters`);\n    }\n}\n/**\n * Pipeline policy for multipart requests\n */\nexport function multipartPolicy() {\n    return {\n        name: multipartPolicyName,\n        async sendRequest(request, next) {\n            var _a;\n            if (!request.multipartBody) {\n                return next(request);\n            }\n            if (request.body) {\n                throw new Error(\"multipartBody and regular body cannot be set at the same time\");\n            }\n            let boundary = request.multipartBody.boundary;\n            const contentTypeHeader = (_a = request.headers.get(\"Content-Type\")) !== null && _a !== void 0 ? _a : \"multipart/mixed\";\n            const parsedHeader = contentTypeHeader.match(/^(multipart\\/[^ ;]+)(?:; *boundary=(.+))?$/);\n            if (!parsedHeader) {\n                throw new Error(`Got multipart request body, but content-type header was not multipart: ${contentTypeHeader}`);\n            }\n            const [, contentType, parsedBoundary] = parsedHeader;\n            if (parsedBoundary && boundary && parsedBoundary !== boundary) {\n                throw new Error(`Multipart boundary was specified as ${parsedBoundary} in the header, but got ${boundary} in the request body`);\n            }\n            boundary !== null && boundary !== void 0 ? boundary : (boundary = parsedBoundary);\n            if (boundary) {\n                assertValidBoundary(boundary);\n            }\n            else {\n                boundary = generateBoundary();\n            }\n            request.headers.set(\"Content-Type\", `${contentType}; boundary=${boundary}`);\n            await buildRequestBody(request, request.multipartBody.parts, boundary);\n            request.multipartBody = undefined;\n            return next(request);\n        },\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { AbortError } from \"@azure/abort-controller\";\nconst StandardAbortMessage = \"The operation was aborted.\";\n/**\n * A wrapper for setTimeout that resolves a promise after delayInMs milliseconds.\n * @param delayInMs - The number of milliseconds to be delayed.\n * @param value - The value to be resolved with after a timeout of t milliseconds.\n * @param options - The options for delay - currently abort options\n *                  - abortSignal - The abortSignal associated with containing operation.\n *                  - abortErrorMsg - The abort error message associated with containing operation.\n * @returns Resolved promise\n */\nexport function delay(delayInMs, value, options) {\n    return new Promise((resolve, reject) => {\n        let timer = undefined;\n        let onAborted = undefined;\n        const rejectOnAbort = () => {\n            return reject(new AbortError((options === null || options === void 0 ? void 0 : options.abortErrorMsg) ? options === null || options === void 0 ? void 0 : options.abortErrorMsg : StandardAbortMessage));\n        };\n        const removeListeners = () => {\n            if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) {\n                options.abortSignal.removeEventListener(\"abort\", onAborted);\n            }\n        };\n        onAborted = () => {\n            if (timer) {\n                clearTimeout(timer);\n            }\n            removeListeners();\n            return rejectOnAbort();\n        };\n        if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) {\n            return rejectOnAbort();\n        }\n        timer = setTimeout(() => {\n            removeListeners();\n            resolve(value);\n        }, delayInMs);\n        if (options === null || options === void 0 ? void 0 : options.abortSignal) {\n            options.abortSignal.addEventListener(\"abort\", onAborted);\n        }\n    });\n}\n/**\n * @internal\n * @returns the parsed value or undefined if the parsed value is invalid.\n */\nexport function parseHeaderValueAsNumber(response, headerName) {\n    const value = response.headers.get(headerName);\n    if (!value)\n        return;\n    const valueAsNum = Number(value);\n    if (Number.isNaN(valueAsNum))\n        return;\n    return valueAsNum;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { parseHeaderValueAsNumber } from \"../util/helpers.js\";\n/**\n * The header that comes back from Azure services representing\n * the amount of time (minimum) to wait to retry (in seconds or timestamp after which we can retry).\n */\nconst RetryAfterHeader = \"Retry-After\";\n/**\n * The headers that come back from Azure services representing\n * the amount of time (minimum) to wait to retry.\n *\n * \"retry-after-ms\", \"x-ms-retry-after-ms\" : milliseconds\n * \"Retry-After\" : seconds or timestamp\n */\nconst AllRetryAfterHeaders = [\"retry-after-ms\", \"x-ms-retry-after-ms\", RetryAfterHeader];\n/**\n * A response is a throttling retry response if it has a throttling status code (429 or 503),\n * as long as one of the [ \"Retry-After\" or \"retry-after-ms\" or \"x-ms-retry-after-ms\" ] headers has a valid value.\n *\n * Returns the `retryAfterInMs` value if the response is a throttling retry response.\n * If not throttling retry response, returns `undefined`.\n *\n * @internal\n */\nfunction getRetryAfterInMs(response) {\n    if (!(response && [429, 503].includes(response.status)))\n        return undefined;\n    try {\n        // Headers: \"retry-after-ms\", \"x-ms-retry-after-ms\", \"Retry-After\"\n        for (const header of AllRetryAfterHeaders) {\n            const retryAfterValue = parseHeaderValueAsNumber(response, header);\n            if (retryAfterValue === 0 || retryAfterValue) {\n                // \"Retry-After\" header ==> seconds\n                // \"retry-after-ms\", \"x-ms-retry-after-ms\" headers ==> milli-seconds\n                const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1;\n                return retryAfterValue * multiplyingFactor; // in milli-seconds\n            }\n        }\n        // RetryAfterHeader (\"Retry-After\") has a special case where it might be formatted as a date instead of a number of seconds\n        const retryAfterHeader = response.headers.get(RetryAfterHeader);\n        if (!retryAfterHeader)\n            return;\n        const date = Date.parse(retryAfterHeader);\n        const diff = date - Date.now();\n        // negative diff would mean a date in the past, so retry asap with 0 milliseconds\n        return Number.isFinite(diff) ? Math.max(0, diff) : undefined;\n    }\n    catch (_a) {\n        return undefined;\n    }\n}\n/**\n * A response is a retry response if it has a throttling status code (429 or 503),\n * as long as one of the [ \"Retry-After\" or \"retry-after-ms\" or \"x-ms-retry-after-ms\" ] headers has a valid value.\n */\nexport function isThrottlingRetryResponse(response) {\n    return Number.isFinite(getRetryAfterInMs(response));\n}\nexport function throttlingRetryStrategy() {\n    return {\n        name: \"throttlingRetryStrategy\",\n        retry({ response }) {\n            const retryAfterInMs = getRetryAfterInMs(response);\n            if (!Number.isFinite(retryAfterInMs)) {\n                return { skipStrategy: true };\n            }\n            return {\n                retryAfterInMs,\n            };\n        },\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { calculateRetryDelay } from \"@azure/core-util\";\nimport { isThrottlingRetryResponse } from \"./throttlingRetryStrategy.js\";\n// intervals are in milliseconds\nconst DEFAULT_CLIENT_RETRY_INTERVAL = 1000;\nconst DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 64;\n/**\n * A retry strategy that retries with an exponentially increasing delay in these two cases:\n * - When there are errors in the underlying transport layer (e.g. DNS lookup failures).\n * - Or otherwise if the outgoing request fails (408, greater or equal than 500, except for 501 and 505).\n */\nexport function exponentialRetryStrategy(options = {}) {\n    var _a, _b;\n    const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL;\n    const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n    return {\n        name: \"exponentialRetryStrategy\",\n        retry({ retryCount, response, responseError }) {\n            const matchedSystemError = isSystemError(responseError);\n            const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors;\n            const isExponential = isExponentialRetryResponse(response);\n            const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes;\n            const unknownResponse = response && (isThrottlingRetryResponse(response) || !isExponential);\n            if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) {\n                return { skipStrategy: true };\n            }\n            if (responseError && !matchedSystemError && !isExponential) {\n                return { errorToThrow: responseError };\n            }\n            return calculateRetryDelay(retryCount, {\n                retryDelayInMs: retryInterval,\n                maxRetryDelayInMs: maxRetryInterval,\n            });\n        },\n    };\n}\n/**\n * A response is a retry response if it has status codes:\n * - 408, or\n * - Greater or equal than 500, except for 501 and 505.\n */\nexport function isExponentialRetryResponse(response) {\n    return Boolean(response &&\n        response.status !== undefined &&\n        (response.status >= 500 || response.status === 408) &&\n        response.status !== 501 &&\n        response.status !== 505);\n}\n/**\n * Determines whether an error from a pipeline response was triggered in the network layer.\n */\nexport function isSystemError(err) {\n    if (!err) {\n        return false;\n    }\n    return (err.code === \"ETIMEDOUT\" ||\n        err.code === \"ESOCKETTIMEDOUT\" ||\n        err.code === \"ECONNREFUSED\" ||\n        err.code === \"ECONNRESET\" ||\n        err.code === \"ENOENT\" ||\n        err.code === \"ENOTFOUND\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { delay } from \"../util/helpers.js\";\nimport { createClientLogger } from \"@azure/logger\";\nimport { AbortError } from \"@azure/abort-controller\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants.js\";\nconst retryPolicyLogger = createClientLogger(\"core-rest-pipeline retryPolicy\");\n/**\n * The programmatic identifier of the retryPolicy.\n */\nconst retryPolicyName = \"retryPolicy\";\n/**\n * retryPolicy is a generic policy to enable retrying requests when certain conditions are met\n */\nexport function retryPolicy(strategies, options = { maxRetries: DEFAULT_RETRY_POLICY_COUNT }) {\n    const logger = options.logger || retryPolicyLogger;\n    return {\n        name: retryPolicyName,\n        async sendRequest(request, next) {\n            var _a, _b;\n            let response;\n            let responseError;\n            let retryCount = -1;\n            retryRequest: while (true) {\n                retryCount += 1;\n                response = undefined;\n                responseError = undefined;\n                try {\n                    logger.info(`Retry ${retryCount}: Attempting to send request`, request.requestId);\n                    response = await next(request);\n                    logger.info(`Retry ${retryCount}: Received a response from request`, request.requestId);\n                }\n                catch (e) {\n                    logger.error(`Retry ${retryCount}: Received an error from request`, request.requestId);\n                    // RestErrors are valid targets for the retry strategies.\n                    // If none of the retry strategies can work with them, they will be thrown later in this policy.\n                    // If the received error is not a RestError, it is immediately thrown.\n                    responseError = e;\n                    if (!e || responseError.name !== \"RestError\") {\n                        throw e;\n                    }\n                    response = responseError.response;\n                }\n                if ((_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {\n                    logger.error(`Retry ${retryCount}: Request aborted.`);\n                    const abortError = new AbortError();\n                    throw abortError;\n                }\n                if (retryCount >= ((_b = options.maxRetries) !== null && _b !== void 0 ? _b : DEFAULT_RETRY_POLICY_COUNT)) {\n                    logger.info(`Retry ${retryCount}: Maximum retries reached. Returning the last received response, or throwing the last received error.`);\n                    if (responseError) {\n                        throw responseError;\n                    }\n                    else if (response) {\n                        return response;\n                    }\n                    else {\n                        throw new Error(\"Maximum retries reached with no response or error to throw\");\n                    }\n                }\n                logger.info(`Retry ${retryCount}: Processing ${strategies.length} retry strategies.`);\n                strategiesLoop: for (const strategy of strategies) {\n                    const strategyLogger = strategy.logger || retryPolicyLogger;\n                    strategyLogger.info(`Retry ${retryCount}: Processing retry strategy ${strategy.name}.`);\n                    const modifiers = strategy.retry({\n                        retryCount,\n                        response,\n                        responseError,\n                    });\n                    if (modifiers.skipStrategy) {\n                        strategyLogger.info(`Retry ${retryCount}: Skipped.`);\n                        continue strategiesLoop;\n                    }\n                    const { errorToThrow, retryAfterInMs, redirectTo } = modifiers;\n                    if (errorToThrow) {\n                        strategyLogger.error(`Retry ${retryCount}: Retry strategy ${strategy.name} throws error:`, errorToThrow);\n                        throw errorToThrow;\n                    }\n                    if (retryAfterInMs || retryAfterInMs === 0) {\n                        strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} retries after ${retryAfterInMs}`);\n                        await delay(retryAfterInMs, undefined, { abortSignal: request.abortSignal });\n                        continue retryRequest;\n                    }\n                    if (redirectTo) {\n                        strategyLogger.info(`Retry ${retryCount}: Retry strategy ${strategy.name} redirects to ${redirectTo}`);\n                        request.url = redirectTo;\n                        continue retryRequest;\n                    }\n                }\n                if (responseError) {\n                    logger.info(`None of the retry strategies could work with the received error. Throwing it.`);\n                    throw responseError;\n                }\n                if (response) {\n                    logger.info(`None of the retry strategies could work with the received response. Returning it.`);\n                    return response;\n                }\n                // If all the retries skip and there's no response,\n                // we're still in the retry loop, so a new request will be sent\n                // until `maxRetries` is reached.\n            }\n        },\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nfunction normalizeName(name) {\n    return name.toLowerCase();\n}\nfunction* headerIterator(map) {\n    for (const entry of map.values()) {\n        yield [entry.name, entry.value];\n    }\n}\nclass HttpHeadersImpl {\n    constructor(rawHeaders) {\n        this._headersMap = new Map();\n        if (rawHeaders) {\n            for (const headerName of Object.keys(rawHeaders)) {\n                this.set(headerName, rawHeaders[headerName]);\n            }\n        }\n    }\n    /**\n     * Set a header in this collection with the provided name and value. The name is\n     * case-insensitive.\n     * @param name - The name of the header to set. This value is case-insensitive.\n     * @param value - The value of the header to set.\n     */\n    set(name, value) {\n        this._headersMap.set(normalizeName(name), { name, value: String(value).trim() });\n    }\n    /**\n     * Get the header value for the provided header name, or undefined if no header exists in this\n     * collection with the provided name.\n     * @param name - The name of the header. This value is case-insensitive.\n     */\n    get(name) {\n        var _a;\n        return (_a = this._headersMap.get(normalizeName(name))) === null || _a === void 0 ? void 0 : _a.value;\n    }\n    /**\n     * Get whether or not this header collection contains a header entry for the provided header name.\n     * @param name - The name of the header to set. This value is case-insensitive.\n     */\n    has(name) {\n        return this._headersMap.has(normalizeName(name));\n    }\n    /**\n     * Remove the header with the provided headerName.\n     * @param name - The name of the header to remove.\n     */\n    delete(name) {\n        this._headersMap.delete(normalizeName(name));\n    }\n    /**\n     * Get the JSON object representation of this HTTP header collection.\n     */\n    toJSON(options = {}) {\n        const result = {};\n        if (options.preserveCase) {\n            for (const entry of this._headersMap.values()) {\n                result[entry.name] = entry.value;\n            }\n        }\n        else {\n            for (const [normalizedName, entry] of this._headersMap) {\n                result[normalizedName] = entry.value;\n            }\n        }\n        return result;\n    }\n    /**\n     * Get the string representation of this HTTP header collection.\n     */\n    toString() {\n        return JSON.stringify(this.toJSON({ preserveCase: true }));\n    }\n    /**\n     * Iterate over tuples of header [name, value] pairs.\n     */\n    [Symbol.iterator]() {\n        return headerIterator(this._headersMap);\n    }\n}\n/**\n * Creates an object that satisfies the `HttpHeaders` interface.\n * @param rawHeaders - A simple object representing initial headers\n */\nexport function createHttpHeaders(rawHeaders) {\n    return new HttpHeadersImpl(rawHeaders);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { isNodeLike, stringToUint8Array } from \"@azure/core-util\";\nimport { createHttpHeaders } from \"../httpHeaders.js\";\n/**\n * The programmatic identifier of the formDataPolicy.\n */\nexport const formDataPolicyName = \"formDataPolicy\";\nfunction formDataToFormDataMap(formData) {\n    var _a;\n    const formDataMap = {};\n    for (const [key, value] of formData.entries()) {\n        (_a = formDataMap[key]) !== null && _a !== void 0 ? _a : (formDataMap[key] = []);\n        formDataMap[key].push(value);\n    }\n    return formDataMap;\n}\n/**\n * A policy that encodes FormData on the request into the body.\n */\nexport function formDataPolicy() {\n    return {\n        name: formDataPolicyName,\n        async sendRequest(request, next) {\n            if (isNodeLike && typeof FormData !== \"undefined\" && request.body instanceof FormData) {\n                request.formData = formDataToFormDataMap(request.body);\n                request.body = undefined;\n            }\n            if (request.formData) {\n                const contentType = request.headers.get(\"Content-Type\");\n                if (contentType && contentType.indexOf(\"application/x-www-form-urlencoded\") !== -1) {\n                    request.body = wwwFormUrlEncode(request.formData);\n                }\n                else {\n                    await prepareFormData(request.formData, request);\n                }\n                request.formData = undefined;\n            }\n            return next(request);\n        },\n    };\n}\nfunction wwwFormUrlEncode(formData) {\n    const urlSearchParams = new URLSearchParams();\n    for (const [key, value] of Object.entries(formData)) {\n        if (Array.isArray(value)) {\n            for (const subValue of value) {\n                urlSearchParams.append(key, subValue.toString());\n            }\n        }\n        else {\n            urlSearchParams.append(key, value.toString());\n        }\n    }\n    return urlSearchParams.toString();\n}\nasync function prepareFormData(formData, request) {\n    // validate content type (multipart/form-data)\n    const contentType = request.headers.get(\"Content-Type\");\n    if (contentType && !contentType.startsWith(\"multipart/form-data\")) {\n        // content type is specified and is not multipart/form-data. Exit.\n        return;\n    }\n    request.headers.set(\"Content-Type\", contentType !== null && contentType !== void 0 ? contentType : \"multipart/form-data\");\n    // set body to MultipartRequestBody using content from FormDataMap\n    const parts = [];\n    for (const [fieldName, values] of Object.entries(formData)) {\n        for (const value of Array.isArray(values) ? values : [values]) {\n            if (typeof value === \"string\") {\n                parts.push({\n                    headers: createHttpHeaders({\n                        \"Content-Disposition\": `form-data; name=\"${fieldName}\"`,\n                    }),\n                    body: stringToUint8Array(value, \"utf-8\"),\n                });\n            }\n            else if (value === undefined || value === null || typeof value !== \"object\") {\n                throw new Error(`Unexpected value for key ${fieldName}: ${value}. Value should be serialized to string first.`);\n            }\n            else {\n                // using || instead of ?? here since if value.name is empty we should create a file name\n                const fileName = value.name || \"blob\";\n                const headers = createHttpHeaders();\n                headers.set(\"Content-Disposition\", `form-data; name=\"${fieldName}\"; filename=\"${fileName}\"`);\n                // again, || is used since an empty value.type means the content type is unset\n                headers.set(\"Content-Type\", value.type || \"application/octet-stream\");\n                parts.push({\n                    headers,\n                    body: value,\n                });\n            }\n        }\n    }\n    request.multipartBody = { parts };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport const proxyPolicyName = \"proxyPolicy\";\nconst errorMessage = \"proxyPolicy is not supported in browser environment\";\nexport function getDefaultProxySettings() {\n    throw new Error(errorMessage);\n}\n/**\n * proxyPolicy is not supported in the browser and attempting\n * to use it will raise an error.\n */\nexport function proxyPolicy() {\n    throw new Error(errorMessage);\n}\n/**\n * A function to reset the cached agents.\n * proxyPolicy is not supported in the browser and attempting\n * to use it will raise an error.\n * @internal\n */\nexport function resetCachedProxyAgents() {\n    throw new Error(errorMessage);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/** @internal */\nexport const knownContextKeys = {\n    span: Symbol.for(\"@azure/core-tracing span\"),\n    namespace: Symbol.for(\"@azure/core-tracing namespace\"),\n};\n/**\n * Creates a new {@link TracingContext} with the given options.\n * @param options - A set of known keys that may be set on the context.\n * @returns A new {@link TracingContext} with the given options.\n *\n * @internal\n */\nexport function createTracingContext(options = {}) {\n    let context = new TracingContextImpl(options.parentContext);\n    if (options.span) {\n        context = context.setValue(knownContextKeys.span, options.span);\n    }\n    if (options.namespace) {\n        context = context.setValue(knownContextKeys.namespace, options.namespace);\n    }\n    return context;\n}\n/** @internal */\nexport class TracingContextImpl {\n    constructor(initialContext) {\n        this._contextMap =\n            initialContext instanceof TracingContextImpl\n                ? new Map(initialContext._contextMap)\n                : new Map();\n    }\n    setValue(key, value) {\n        const newContext = new TracingContextImpl(this);\n        newContext._contextMap.set(key, value);\n        return newContext;\n    }\n    getValue(key) {\n        return this._contextMap.get(key);\n    }\n    deleteValue(key) {\n        const newContext = new TracingContextImpl(this);\n        newContext._contextMap.delete(key);\n        return newContext;\n    }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Browser-only implementation of the module's state. The browser esm variant will not load the commonjs state, so we do not need to share state between the two.\n */\nexport const state = {\n    instrumenterImplementation: undefined,\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createTracingContext } from \"./tracingContext.js\";\nimport { state } from \"./state.js\";\nexport function createDefaultTracingSpan() {\n    return {\n        end: () => {\n            // noop\n        },\n        isRecording: () => false,\n        recordException: () => {\n            // noop\n        },\n        setAttribute: () => {\n            // noop\n        },\n        setStatus: () => {\n            // noop\n        },\n        addEvent: () => {\n            // noop\n        },\n    };\n}\nexport function createDefaultInstrumenter() {\n    return {\n        createRequestHeaders: () => {\n            return {};\n        },\n        parseTraceparentHeader: () => {\n            return undefined;\n        },\n        startSpan: (_name, spanOptions) => {\n            return {\n                span: createDefaultTracingSpan(),\n                tracingContext: createTracingContext({ parentContext: spanOptions.tracingContext }),\n            };\n        },\n        withContext(_context, callback, ...callbackArgs) {\n            return callback(...callbackArgs);\n        },\n    };\n}\n/**\n * Extends the Azure SDK with support for a given instrumenter implementation.\n *\n * @param instrumenter - The instrumenter implementation to use.\n */\nexport function useInstrumenter(instrumenter) {\n    state.instrumenterImplementation = instrumenter;\n}\n/**\n * Gets the currently set instrumenter, a No-Op instrumenter by default.\n *\n * @returns The currently set instrumenter\n */\nexport function getInstrumenter() {\n    if (!state.instrumenterImplementation) {\n        state.instrumenterImplementation = createDefaultInstrumenter();\n    }\n    return state.instrumenterImplementation;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getInstrumenter } from \"./instrumenter.js\";\nimport { knownContextKeys } from \"./tracingContext.js\";\n/**\n * Creates a new tracing client.\n *\n * @param options - Options used to configure the tracing client.\n * @returns - An instance of {@link TracingClient}.\n */\nexport function createTracingClient(options) {\n    const { namespace, packageName, packageVersion } = options;\n    function startSpan(name, operationOptions, spanOptions) {\n        var _a;\n        const startSpanResult = getInstrumenter().startSpan(name, Object.assign(Object.assign({}, spanOptions), { packageName: packageName, packageVersion: packageVersion, tracingContext: (_a = operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) === null || _a === void 0 ? void 0 : _a.tracingContext }));\n        let tracingContext = startSpanResult.tracingContext;\n        const span = startSpanResult.span;\n        if (!tracingContext.getValue(knownContextKeys.namespace)) {\n            tracingContext = tracingContext.setValue(knownContextKeys.namespace, namespace);\n        }\n        span.setAttribute(\"az.namespace\", tracingContext.getValue(knownContextKeys.namespace));\n        const updatedOptions = Object.assign({}, operationOptions, {\n            tracingOptions: Object.assign(Object.assign({}, operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions), { tracingContext }),\n        });\n        return {\n            span,\n            updatedOptions,\n        };\n    }\n    async function withSpan(name, operationOptions, callback, spanOptions) {\n        const { span, updatedOptions } = startSpan(name, operationOptions, spanOptions);\n        try {\n            const result = await withContext(updatedOptions.tracingOptions.tracingContext, () => Promise.resolve(callback(updatedOptions, span)));\n            span.setStatus({ status: \"success\" });\n            return result;\n        }\n        catch (err) {\n            span.setStatus({ status: \"error\", error: err });\n            throw err;\n        }\n        finally {\n            span.end();\n        }\n    }\n    function withContext(context, callback, ...callbackArgs) {\n        return getInstrumenter().withContext(context, callback, ...callbackArgs);\n    }\n    /**\n     * Parses a traceparent header value into a span identifier.\n     *\n     * @param traceparentHeader - The traceparent header to parse.\n     * @returns An implementation-specific identifier for the span.\n     */\n    function parseTraceparentHeader(traceparentHeader) {\n        return getInstrumenter().parseTraceparentHeader(traceparentHeader);\n    }\n    /**\n     * Creates a set of request headers to propagate tracing information to a backend.\n     *\n     * @param tracingContext - The context containing the span to serialize.\n     * @returns The set of headers to add to a request.\n     */\n    function createRequestHeaders(tracingContext) {\n        return getInstrumenter().createRequestHeaders(tracingContext);\n    }\n    return {\n        startSpan,\n        withSpan,\n        withContext,\n        parseTraceparentHeader,\n        createRequestHeaders,\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport const custom = {};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { isError } from \"@azure/core-util\";\nimport { custom } from \"./util/inspect.js\";\nimport { Sanitizer } from \"./util/sanitizer.js\";\nconst errorSanitizer = new Sanitizer();\n/**\n * A custom error type for failed pipeline requests.\n */\nexport class RestError extends Error {\n    constructor(message, options = {}) {\n        super(message);\n        this.name = \"RestError\";\n        this.code = options.code;\n        this.statusCode = options.statusCode;\n        // The request and response may contain sensitive information in the headers or body.\n        // To help prevent this sensitive information being accidentally logged, the request and response\n        // properties are marked as non-enumerable here. This prevents them showing up in the output of\n        // JSON.stringify and console.log.\n        Object.defineProperty(this, \"request\", { value: options.request, enumerable: false });\n        Object.defineProperty(this, \"response\", { value: options.response, enumerable: false });\n        Object.setPrototypeOf(this, RestError.prototype);\n    }\n    /**\n     * Logging method for util.inspect in Node\n     */\n    [custom]() {\n        // Extract non-enumerable properties and add them back. This is OK since in this output the request and\n        // response get sanitized.\n        return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`;\n    }\n}\n/**\n * Something went wrong when making the request.\n * This means the actual request failed for some reason,\n * such as a DNS issue or the connection being lost.\n */\nRestError.REQUEST_SEND_ERROR = \"REQUEST_SEND_ERROR\";\n/**\n * This means that parsing the response from the server failed.\n * It may have been malformed.\n */\nRestError.PARSE_ERROR = \"PARSE_ERROR\";\n/**\n * Typeguard for RestError\n * @param e - Something caught by a catch clause.\n */\nexport function isRestError(e) {\n    if (e instanceof RestError) {\n        return true;\n    }\n    return isError(e) && e.name === \"RestError\";\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { logPolicy } from \"./policies/logPolicy.js\";\nimport { createEmptyPipeline } from \"./pipeline.js\";\nimport { redirectPolicy } from \"./policies/redirectPolicy.js\";\nimport { userAgentPolicy } from \"./policies/userAgentPolicy.js\";\nimport { multipartPolicy, multipartPolicyName } from \"./policies/multipartPolicy.js\";\nimport { decompressResponsePolicy } from \"./policies/decompressResponsePolicy.js\";\nimport { defaultRetryPolicy } from \"./policies/defaultRetryPolicy.js\";\nimport { formDataPolicy } from \"./policies/formDataPolicy.js\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport { proxyPolicy } from \"./policies/proxyPolicy.js\";\nimport { setClientRequestIdPolicy } from \"./policies/setClientRequestIdPolicy.js\";\nimport { agentPolicy } from \"./policies/agentPolicy.js\";\nimport { tlsPolicy } from \"./policies/tlsPolicy.js\";\nimport { tracingPolicy } from \"./policies/tracingPolicy.js\";\n/**\n * Create a new pipeline with a default set of customizable policies.\n * @param options - Options to configure a custom pipeline.\n */\nexport function createPipelineFromOptions(options) {\n    var _a;\n    const pipeline = createEmptyPipeline();\n    if (isNodeLike) {\n        if (options.agent) {\n            pipeline.addPolicy(agentPolicy(options.agent));\n        }\n        if (options.tlsOptions) {\n            pipeline.addPolicy(tlsPolicy(options.tlsOptions));\n        }\n        pipeline.addPolicy(proxyPolicy(options.proxyOptions));\n        pipeline.addPolicy(decompressResponsePolicy());\n    }\n    pipeline.addPolicy(formDataPolicy(), { beforePolicies: [multipartPolicyName] });\n    pipeline.addPolicy(userAgentPolicy(options.userAgentOptions));\n    pipeline.addPolicy(setClientRequestIdPolicy((_a = options.telemetryOptions) === null || _a === void 0 ? void 0 : _a.clientRequestIdHeaderName));\n    // The multipart policy is added after policies with no phase, so that\n    // policies can be added between it and formDataPolicy to modify\n    // properties (e.g., making the boundary constant in recorded tests).\n    pipeline.addPolicy(multipartPolicy(), { afterPhase: \"Deserialize\" });\n    pipeline.addPolicy(defaultRetryPolicy(options.retryOptions), { phase: \"Retry\" });\n    pipeline.addPolicy(tracingPolicy(Object.assign(Object.assign({}, options.userAgentOptions), options.loggingOptions)), {\n        afterPhase: \"Retry\",\n    });\n    if (isNodeLike) {\n        // Both XHR and Fetch expect to handle redirects automatically,\n        // so only include this policy when we're in Node.\n        pipeline.addPolicy(redirectPolicy(options.redirectOptions), { afterPhase: \"Retry\" });\n    }\n    pipeline.addPolicy(logPolicy(options.loggingOptions), { afterPhase: \"Sign\" });\n    return pipeline;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Name of the Agent Policy\n */\nexport const agentPolicyName = \"agentPolicy\";\n/**\n * Gets a pipeline policy that sets http.agent\n */\nexport function agentPolicy(agent) {\n    return {\n        name: agentPolicyName,\n        sendRequest: async (req, next) => {\n            // Users may define an agent on the request, honor it over the client level one\n            if (!req.agent) {\n                req.agent = agent;\n            }\n            return next(req);\n        },\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Name of the TLS Policy\n */\nexport const tlsPolicyName = \"tlsPolicy\";\n/**\n * Gets a pipeline policy that adds the client certificate to the HttpClient agent for authentication.\n */\nexport function tlsPolicy(tlsSettings) {\n    return {\n        name: tlsPolicyName,\n        sendRequest: async (req, next) => {\n            // Users may define a request tlsSettings, honor those over the client level one\n            if (!req.tlsSettings) {\n                req.tlsSettings = tlsSettings;\n            }\n            return next(req);\n        },\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/*\n * NOTE: When moving this file, please update \"browser\" section in package.json\n */\nexport const decompressResponsePolicyName = \"decompressResponsePolicy\";\n/**\n * decompressResponsePolicy is not supported in the browser and attempting\n * to use it will raise an error.\n */\nexport function decompressResponsePolicy() {\n    throw new Error(\"decompressResponsePolicy is not supported in browser environment\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * The programmatic identifier of the setClientRequestIdPolicy.\n */\nexport const setClientRequestIdPolicyName = \"setClientRequestIdPolicy\";\n/**\n * Each PipelineRequest gets a unique id upon creation.\n * This policy passes that unique id along via an HTTP header to enable better\n * telemetry and tracing.\n * @param requestIdHeaderName - The name of the header to pass the request ID to.\n */\nexport function setClientRequestIdPolicy(requestIdHeaderName = \"x-ms-client-request-id\") {\n    return {\n        name: setClientRequestIdPolicyName,\n        async sendRequest(request, next) {\n            if (!request.headers.has(requestIdHeaderName)) {\n                request.headers.set(requestIdHeaderName, request.requestId);\n            }\n            return next(request);\n        },\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { exponentialRetryStrategy } from \"../retryStrategies/exponentialRetryStrategy.js\";\nimport { throttlingRetryStrategy } from \"../retryStrategies/throttlingRetryStrategy.js\";\nimport { retryPolicy } from \"./retryPolicy.js\";\nimport { DEFAULT_RETRY_POLICY_COUNT } from \"../constants.js\";\n/**\n * Name of the {@link defaultRetryPolicy}\n */\nexport const defaultRetryPolicyName = \"defaultRetryPolicy\";\n/**\n * A policy that retries according to three strategies:\n * - When the server sends a 429 response with a Retry-After header.\n * - When there are errors in the underlying transport layer (e.g. DNS lookup failures).\n * - Or otherwise if the outgoing request fails, it will retry with an exponentially increasing delay.\n */\nexport function defaultRetryPolicy(options = {}) {\n    var _a;\n    return {\n        name: defaultRetryPolicyName,\n        sendRequest: retryPolicy([throttlingRetryStrategy(), exponentialRetryStrategy(options)], {\n            maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : DEFAULT_RETRY_POLICY_COUNT,\n        }).sendRequest,\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createTracingClient, } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"../constants.js\";\nimport { getUserAgentValue } from \"../util/userAgent.js\";\nimport { logger } from \"../log.js\";\nimport { getErrorMessage, isError } from \"@azure/core-util\";\nimport { isRestError } from \"../restError.js\";\nimport { Sanitizer } from \"../util/sanitizer.js\";\n/**\n * The programmatic identifier of the tracingPolicy.\n */\nexport const tracingPolicyName = \"tracingPolicy\";\n/**\n * A simple policy to create OpenTelemetry Spans for each request made by the pipeline\n * that has SpanOptions with a parent.\n * Requests made without a parent Span will not be recorded.\n * @param options - Options to configure the telemetry logged by the tracing policy.\n */\nexport function tracingPolicy(options = {}) {\n    const userAgentPromise = getUserAgentValue(options.userAgentPrefix);\n    const sanitizer = new Sanitizer({\n        additionalAllowedQueryParameters: options.additionalAllowedQueryParameters,\n    });\n    const tracingClient = tryCreateTracingClient();\n    return {\n        name: tracingPolicyName,\n        async sendRequest(request, next) {\n            var _a;\n            if (!tracingClient) {\n                return next(request);\n            }\n            const userAgent = await userAgentPromise;\n            const spanAttributes = {\n                \"http.url\": sanitizer.sanitizeUrl(request.url),\n                \"http.method\": request.method,\n                \"http.user_agent\": userAgent,\n                requestId: request.requestId,\n            };\n            if (userAgent) {\n                spanAttributes[\"http.user_agent\"] = userAgent;\n            }\n            const { span, tracingContext } = (_a = tryCreateSpan(tracingClient, request, spanAttributes)) !== null && _a !== void 0 ? _a : {};\n            if (!span || !tracingContext) {\n                return next(request);\n            }\n            try {\n                const response = await tracingClient.withContext(tracingContext, next, request);\n                tryProcessResponse(span, response);\n                return response;\n            }\n            catch (err) {\n                tryProcessError(span, err);\n                throw err;\n            }\n        },\n    };\n}\nfunction tryCreateTracingClient() {\n    try {\n        return createTracingClient({\n            namespace: \"\",\n            packageName: \"@azure/core-rest-pipeline\",\n            packageVersion: SDK_VERSION,\n        });\n    }\n    catch (e) {\n        logger.warning(`Error when creating the TracingClient: ${getErrorMessage(e)}`);\n        return undefined;\n    }\n}\nfunction tryCreateSpan(tracingClient, request, spanAttributes) {\n    try {\n        // As per spec, we do not need to differentiate between HTTP and HTTPS in span name.\n        const { span, updatedOptions } = tracingClient.startSpan(`HTTP ${request.method}`, { tracingOptions: request.tracingOptions }, {\n            spanKind: \"client\",\n            spanAttributes,\n        });\n        // If the span is not recording, don't do any more work.\n        if (!span.isRecording()) {\n            span.end();\n            return undefined;\n        }\n        // set headers\n        const headers = tracingClient.createRequestHeaders(updatedOptions.tracingOptions.tracingContext);\n        for (const [key, value] of Object.entries(headers)) {\n            request.headers.set(key, value);\n        }\n        return { span, tracingContext: updatedOptions.tracingOptions.tracingContext };\n    }\n    catch (e) {\n        logger.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(e)}`);\n        return undefined;\n    }\n}\nfunction tryProcessError(span, error) {\n    try {\n        span.setStatus({\n            status: \"error\",\n            error: isError(error) ? error : undefined,\n        });\n        if (isRestError(error) && error.statusCode) {\n            span.setAttribute(\"http.status_code\", error.statusCode);\n        }\n        span.end();\n    }\n    catch (e) {\n        logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`);\n    }\n}\nfunction tryProcessResponse(span, response) {\n    try {\n        span.setAttribute(\"http.status_code\", response.status);\n        const serviceRequestId = response.headers.get(\"x-ms-request-id\");\n        if (serviceRequestId) {\n            span.setAttribute(\"serviceRequestId\", serviceRequestId);\n        }\n        // Per semantic conventions, only set the status to error if the status code is 4xx or 5xx.\n        // Otherwise, the status MUST remain unset.\n        // https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status\n        if (response.status >= 400) {\n            span.setStatus({\n                status: \"error\",\n            });\n        }\n        span.end();\n    }\n    catch (e) {\n        logger.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(e)}`);\n    }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { logger as coreLogger } from \"../log.js\";\nimport { Sanitizer } from \"../util/sanitizer.js\";\n/**\n * The programmatic identifier of the logPolicy.\n */\nexport const logPolicyName = \"logPolicy\";\n/**\n * A policy that logs all requests and responses.\n * @param options - Options to configure logPolicy.\n */\nexport function logPolicy(options = {}) {\n    var _a;\n    const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : coreLogger.info;\n    const sanitizer = new Sanitizer({\n        additionalAllowedHeaderNames: options.additionalAllowedHeaderNames,\n        additionalAllowedQueryParameters: options.additionalAllowedQueryParameters,\n    });\n    return {\n        name: logPolicyName,\n        async sendRequest(request, next) {\n            if (!logger.enabled) {\n                return next(request);\n            }\n            logger(`Request: ${sanitizer.sanitize(request)}`);\n            const response = await next(request);\n            logger(`Response status code: ${response.status}`);\n            logger(`Headers: ${sanitizer.sanitize(response.headers)}`);\n            return response;\n        },\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { AbortError } from \"@azure/abort-controller\";\nimport { RestError } from \"./restError.js\";\nimport { createHttpHeaders } from \"./httpHeaders.js\";\nimport { isNodeReadableStream, isWebReadableStream } from \"./util/typeGuards.js\";\n/**\n * Checks if the body is a Blob or Blob-like\n */\nfunction isBlob(body) {\n    // File objects count as a type of Blob, so we want to use instanceof explicitly\n    return (typeof Blob === \"function\" || typeof Blob === \"object\") && body instanceof Blob;\n}\n/**\n * A HttpClient implementation that uses window.fetch to send HTTP requests.\n * @internal\n */\nclass FetchHttpClient {\n    /**\n     * Makes a request over an underlying transport layer and returns the response.\n     * @param request - The request to be made.\n     */\n    async sendRequest(request) {\n        const url = new URL(request.url);\n        const isInsecure = url.protocol !== \"https:\";\n        if (isInsecure && !request.allowInsecureConnection) {\n            throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`);\n        }\n        if (request.proxySettings) {\n            throw new Error(\"HTTP proxy is not supported in browser environment\");\n        }\n        try {\n            return await makeRequest(request);\n        }\n        catch (e) {\n            throw getError(e, request);\n        }\n    }\n}\n/**\n * Sends a request\n */\nasync function makeRequest(request) {\n    const { abortController, abortControllerCleanup } = setupAbortSignal(request);\n    try {\n        const headers = buildFetchHeaders(request.headers);\n        const { streaming, body: requestBody } = buildRequestBody(request);\n        const requestInit = Object.assign(Object.assign({ body: requestBody, method: request.method, headers: headers, signal: abortController.signal }, (\"credentials\" in Request.prototype\n            ? { credentials: request.withCredentials ? \"include\" : \"same-origin\" }\n            : {})), (\"cache\" in Request.prototype ? { cache: \"no-store\" } : {}));\n        // According to https://fetch.spec.whatwg.org/#fetch-method,\n        // init.duplex must be set when body is a ReadableStream object.\n        // currently \"half\" is the only valid value.\n        if (streaming) {\n            requestInit.duplex = \"half\";\n        }\n        /**\n         * Developers of the future:\n         * Do not set redirect: \"manual\" as part\n         * of request options.\n         * It will not work as you expect.\n         */\n        const response = await fetch(request.url, requestInit);\n        // If we're uploading a blob, we need to fire the progress event manually\n        if (isBlob(request.body) && request.onUploadProgress) {\n            request.onUploadProgress({ loadedBytes: request.body.size });\n        }\n        return buildPipelineResponse(response, request, abortControllerCleanup);\n    }\n    catch (e) {\n        abortControllerCleanup === null || abortControllerCleanup === void 0 ? void 0 : abortControllerCleanup();\n        throw e;\n    }\n}\n/**\n * Creates a pipeline response from a Fetch response;\n */\nasync function buildPipelineResponse(httpResponse, request, abortControllerCleanup) {\n    var _a, _b;\n    const headers = buildPipelineHeaders(httpResponse);\n    const response = {\n        request,\n        headers,\n        status: httpResponse.status,\n    };\n    const bodyStream = isWebReadableStream(httpResponse.body)\n        ? buildBodyStream(httpResponse.body, {\n            onProgress: request.onDownloadProgress,\n            onEnd: abortControllerCleanup,\n        })\n        : httpResponse.body;\n    if (\n    // Value of POSITIVE_INFINITY in streamResponseStatusCodes is considered as any status code\n    ((_a = request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(Number.POSITIVE_INFINITY)) ||\n        ((_b = request.streamResponseStatusCodes) === null || _b === void 0 ? void 0 : _b.has(response.status))) {\n        if (request.enableBrowserStreams) {\n            response.browserStreamBody = bodyStream !== null && bodyStream !== void 0 ? bodyStream : undefined;\n        }\n        else {\n            const responseStream = new Response(bodyStream);\n            response.blobBody = responseStream.blob();\n            abortControllerCleanup === null || abortControllerCleanup === void 0 ? void 0 : abortControllerCleanup();\n        }\n    }\n    else {\n        const responseStream = new Response(bodyStream);\n        response.bodyAsText = await responseStream.text();\n        abortControllerCleanup === null || abortControllerCleanup === void 0 ? void 0 : abortControllerCleanup();\n    }\n    return response;\n}\nfunction setupAbortSignal(request) {\n    const abortController = new AbortController();\n    // Cleanup function\n    let abortControllerCleanup;\n    /**\n     * Attach an abort listener to the request\n     */\n    let abortListener;\n    if (request.abortSignal) {\n        if (request.abortSignal.aborted) {\n            throw new AbortError(\"The operation was aborted. Request has already been canceled.\");\n        }\n        abortListener = (event) => {\n            if (event.type === \"abort\") {\n                abortController.abort();\n            }\n        };\n        request.abortSignal.addEventListener(\"abort\", abortListener);\n        abortControllerCleanup = () => {\n            var _a;\n            if (abortListener) {\n                (_a = request.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener(\"abort\", abortListener);\n            }\n        };\n    }\n    // If a timeout was passed, call the abort signal once the time elapses\n    if (request.timeout > 0) {\n        setTimeout(() => {\n            abortController.abort();\n        }, request.timeout);\n    }\n    return { abortController, abortControllerCleanup };\n}\n/**\n * Gets the specific error\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\nfunction getError(e, request) {\n    var _a;\n    if (e && (e === null || e === void 0 ? void 0 : e.name) === \"AbortError\") {\n        return e;\n    }\n    else {\n        return new RestError(`Error sending request: ${e.message}`, {\n            code: (_a = e === null || e === void 0 ? void 0 : e.code) !== null && _a !== void 0 ? _a : RestError.REQUEST_SEND_ERROR,\n            request,\n        });\n    }\n}\n/**\n * Converts PipelineRequest headers to Fetch headers\n */\nfunction buildFetchHeaders(pipelineHeaders) {\n    const headers = new Headers();\n    for (const [name, value] of pipelineHeaders) {\n        headers.append(name, value);\n    }\n    return headers;\n}\nfunction buildPipelineHeaders(httpResponse) {\n    const responseHeaders = createHttpHeaders();\n    for (const [name, value] of httpResponse.headers) {\n        responseHeaders.set(name, value);\n    }\n    return responseHeaders;\n}\nfunction buildRequestBody(request) {\n    const body = typeof request.body === \"function\" ? request.body() : request.body;\n    if (isNodeReadableStream(body)) {\n        throw new Error(\"Node streams are not supported in browser environment.\");\n    }\n    return isWebReadableStream(body)\n        ? { streaming: true, body: buildBodyStream(body, { onProgress: request.onUploadProgress }) }\n        : { streaming: false, body };\n}\n/**\n * Reads the request/response original stream and stream it through a new\n * ReadableStream, this is done to be able to report progress in a way that\n * all modern browsers support. TransformStreams would be an alternative,\n * however they are not yet supported by all browsers i.e Firefox\n */\nfunction buildBodyStream(readableStream, options = {}) {\n    let loadedBytes = 0;\n    const { onProgress, onEnd } = options;\n    // If the current browser supports pipeThrough we use a TransformStream\n    // to report progress\n    if (isTransformStreamSupported(readableStream)) {\n        return readableStream.pipeThrough(new TransformStream({\n            transform(chunk, controller) {\n                if (chunk === null) {\n                    controller.terminate();\n                    return;\n                }\n                controller.enqueue(chunk);\n                loadedBytes += chunk.length;\n                if (onProgress) {\n                    onProgress({ loadedBytes });\n                }\n            },\n            flush() {\n                onEnd === null || onEnd === void 0 ? void 0 : onEnd();\n            },\n        }));\n    }\n    else {\n        // If we can't use transform streams, wrap the original stream in a new readable stream\n        // and use pull to enqueue each chunk and report progress.\n        const reader = readableStream.getReader();\n        return new ReadableStream({\n            async pull(controller) {\n                var _a;\n                const { done, value } = await reader.read();\n                // When no more data needs to be consumed, break the reading\n                if (done || !value) {\n                    onEnd === null || onEnd === void 0 ? void 0 : onEnd();\n                    // Close the stream\n                    controller.close();\n                    reader.releaseLock();\n                    return;\n                }\n                loadedBytes += (_a = value === null || value === void 0 ? void 0 : value.length) !== null && _a !== void 0 ? _a : 0;\n                // Enqueue the next data chunk into our target stream\n                controller.enqueue(value);\n                if (onProgress) {\n                    onProgress({ loadedBytes });\n                }\n            },\n            cancel(reason) {\n                onEnd === null || onEnd === void 0 ? void 0 : onEnd();\n                return reader.cancel(reason);\n            },\n        });\n    }\n}\n/**\n * Create a new HttpClient instance for the browser environment.\n * @internal\n */\nexport function createFetchHttpClient() {\n    return new FetchHttpClient();\n}\nfunction isTransformStreamSupported(readableStream) {\n    return readableStream.pipeThrough !== undefined && self.TransformStream !== undefined;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createHttpHeaders } from \"./httpHeaders.js\";\nimport { randomUUID } from \"@azure/core-util\";\nclass PipelineRequestImpl {\n    constructor(options) {\n        var _a, _b, _c, _d, _e, _f, _g;\n        this.url = options.url;\n        this.body = options.body;\n        this.headers = (_a = options.headers) !== null && _a !== void 0 ? _a : createHttpHeaders();\n        this.method = (_b = options.method) !== null && _b !== void 0 ? _b : \"GET\";\n        this.timeout = (_c = options.timeout) !== null && _c !== void 0 ? _c : 0;\n        this.multipartBody = options.multipartBody;\n        this.formData = options.formData;\n        this.disableKeepAlive = (_d = options.disableKeepAlive) !== null && _d !== void 0 ? _d : false;\n        this.proxySettings = options.proxySettings;\n        this.streamResponseStatusCodes = options.streamResponseStatusCodes;\n        this.withCredentials = (_e = options.withCredentials) !== null && _e !== void 0 ? _e : false;\n        this.abortSignal = options.abortSignal;\n        this.tracingOptions = options.tracingOptions;\n        this.onUploadProgress = options.onUploadProgress;\n        this.onDownloadProgress = options.onDownloadProgress;\n        this.requestId = options.requestId || randomUUID();\n        this.allowInsecureConnection = (_f = options.allowInsecureConnection) !== null && _f !== void 0 ? _f : false;\n        this.enableBrowserStreams = (_g = options.enableBrowserStreams) !== null && _g !== void 0 ? _g : false;\n        this.agent = options.agent;\n        this.tlsSettings = options.tlsSettings;\n    }\n}\n/**\n * Creates a new pipeline request with the given options.\n * This method is to allow for the easy setting of default values and not required.\n * @param options - The options to create the request with.\n */\nexport function createPipelineRequest(options) {\n    return new PipelineRequestImpl(options);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { delay } from \"./helpers.js\";\n// Default options for the cycler if none are provided\nexport const DEFAULT_CYCLER_OPTIONS = {\n    forcedRefreshWindowInMs: 1000, // Force waiting for a refresh 1s before the token expires\n    retryIntervalInMs: 3000, // Allow refresh attempts every 3s\n    refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry\n};\n/**\n * Converts an an unreliable access token getter (which may resolve with null)\n * into an AccessTokenGetter by retrying the unreliable getter in a regular\n * interval.\n *\n * @param getAccessToken - A function that produces a promise of an access token that may fail by returning null.\n * @param retryIntervalInMs - The time (in milliseconds) to wait between retry attempts.\n * @param refreshTimeout - The timestamp after which the refresh attempt will fail, throwing an exception.\n * @returns - A promise that, if it resolves, will resolve with an access token.\n */\nasync function beginRefresh(getAccessToken, retryIntervalInMs, refreshTimeout) {\n    // This wrapper handles exceptions gracefully as long as we haven't exceeded\n    // the timeout.\n    async function tryGetAccessToken() {\n        if (Date.now() < refreshTimeout) {\n            try {\n                return await getAccessToken();\n            }\n            catch (_a) {\n                return null;\n            }\n        }\n        else {\n            const finalToken = await getAccessToken();\n            // Timeout is up, so throw if it's still null\n            if (finalToken === null) {\n                throw new Error(\"Failed to refresh access token.\");\n            }\n            return finalToken;\n        }\n    }\n    let token = await tryGetAccessToken();\n    while (token === null) {\n        await delay(retryIntervalInMs);\n        token = await tryGetAccessToken();\n    }\n    return token;\n}\n/**\n * Creates a token cycler from a credential, scopes, and optional settings.\n *\n * A token cycler represents a way to reliably retrieve a valid access token\n * from a TokenCredential. It will handle initializing the token, refreshing it\n * when it nears expiration, and synchronizes refresh attempts to avoid\n * concurrency hazards.\n *\n * @param credential - the underlying TokenCredential that provides the access\n * token\n * @param tokenCyclerOptions - optionally override default settings for the cycler\n *\n * @returns - a function that reliably produces a valid access token\n */\nexport function createTokenCycler(credential, tokenCyclerOptions) {\n    let refreshWorker = null;\n    let token = null;\n    let tenantId;\n    const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);\n    /**\n     * This little holder defines several predicates that we use to construct\n     * the rules of refreshing the token.\n     */\n    const cycler = {\n        /**\n         * Produces true if a refresh job is currently in progress.\n         */\n        get isRefreshing() {\n            return refreshWorker !== null;\n        },\n        /**\n         * Produces true if the cycler SHOULD refresh (we are within the refresh\n         * window and not already refreshing)\n         */\n        get shouldRefresh() {\n            var _a;\n            if (cycler.isRefreshing) {\n                return false;\n            }\n            if ((token === null || token === void 0 ? void 0 : token.refreshAfterTimestamp) && token.refreshAfterTimestamp < Date.now()) {\n                return true;\n            }\n            return ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now();\n        },\n        /**\n         * Produces true if the cycler MUST refresh (null or nearly-expired\n         * token).\n         */\n        get mustRefresh() {\n            return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());\n        },\n    };\n    /**\n     * Starts a refresh job or returns the existing job if one is already\n     * running.\n     */\n    function refresh(scopes, getTokenOptions) {\n        var _a;\n        if (!cycler.isRefreshing) {\n            // We bind `scopes` here to avoid passing it around a lot\n            const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);\n            // Take advantage of promise chaining to insert an assignment to `token`\n            // before the refresh can be considered done.\n            refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, \n            // If we don't have a token, then we should timeout immediately\n            (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())\n                .then((_token) => {\n                refreshWorker = null;\n                token = _token;\n                tenantId = getTokenOptions.tenantId;\n                return token;\n            })\n                .catch((reason) => {\n                // We also should reset the refresher if we enter a failed state.  All\n                // existing awaiters will throw, but subsequent requests will start a\n                // new retry chain.\n                refreshWorker = null;\n                token = null;\n                tenantId = undefined;\n                throw reason;\n            });\n        }\n        return refreshWorker;\n    }\n    return async (scopes, tokenOptions) => {\n        //\n        // Simple rules:\n        // - If we MUST refresh, then return the refresh task, blocking\n        //   the pipeline until a token is available.\n        // - If we SHOULD refresh, then run refresh but don't return it\n        //   (we can still use the cached token).\n        // - Return the token, since it's fine if we didn't return in\n        //   step 1.\n        //\n        const hasClaimChallenge = Boolean(tokenOptions.claims);\n        const tenantIdChanged = tenantId !== tokenOptions.tenantId;\n        if (hasClaimChallenge) {\n            // If we've received a claim, we know the existing token isn't valid\n            // We want to clear it so that that refresh worker won't use the old expiration time as a timeout\n            token = null;\n        }\n        // If the tenantId passed in token options is different to the one we have\n        // Or if we are in claim challenge and the token was rejected and a new access token need to be issued, we need to\n        // refresh the token with the new tenantId or token.\n        const mustRefresh = tenantIdChanged || hasClaimChallenge || cycler.mustRefresh;\n        if (mustRefresh) {\n            return refresh(scopes, tokenOptions);\n        }\n        if (cycler.shouldRefresh) {\n            refresh(scopes, tokenOptions);\n        }\n        return token;\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createTokenCycler } from \"../util/tokenCycler.js\";\nimport { logger as coreLogger } from \"../log.js\";\nimport { isRestError } from \"../restError.js\";\n/**\n * The programmatic identifier of the bearerTokenAuthenticationPolicy.\n */\nexport const bearerTokenAuthenticationPolicyName = \"bearerTokenAuthenticationPolicy\";\n/**\n * Try to send the given request.\n *\n * When a response is received, returns a tuple of the response received and, if the response was received\n * inside a thrown RestError, the RestError that was thrown.\n *\n * Otherwise, if an error was thrown while sending the request that did not provide an underlying response, it\n * will be rethrown.\n */\nasync function trySendRequest(request, next) {\n    try {\n        return [await next(request), undefined];\n    }\n    catch (e) {\n        if (isRestError(e) && e.response) {\n            return [e.response, e];\n        }\n        else {\n            throw e;\n        }\n    }\n}\n/**\n * Default authorize request handler\n */\nasync function defaultAuthorizeRequest(options) {\n    const { scopes, getAccessToken, request } = options;\n    // Enable CAE true by default\n    const getTokenOptions = {\n        abortSignal: request.abortSignal,\n        tracingOptions: request.tracingOptions,\n        enableCae: true,\n    };\n    const accessToken = await getAccessToken(scopes, getTokenOptions);\n    if (accessToken) {\n        options.request.headers.set(\"Authorization\", `Bearer ${accessToken.token}`);\n    }\n}\n/**\n * We will retrieve the challenge only if the response status code was 401,\n * and if the response contained the header \"WWW-Authenticate\" with a non-empty value.\n */\nfunction isChallengeResponse(response) {\n    return response.status === 401 && response.headers.has(\"WWW-Authenticate\");\n}\n/**\n * Re-authorize the request for CAE challenge.\n * The response containing the challenge is `options.response`.\n * If this method returns true, the underlying request will be sent once again.\n */\nasync function authorizeRequestOnCaeChallenge(onChallengeOptions, caeClaims) {\n    var _a;\n    const { scopes } = onChallengeOptions;\n    const accessToken = await onChallengeOptions.getAccessToken(scopes, {\n        enableCae: true,\n        claims: caeClaims,\n    });\n    if (!accessToken) {\n        return false;\n    }\n    onChallengeOptions.request.headers.set(\"Authorization\", `${(_a = accessToken.tokenType) !== null && _a !== void 0 ? _a : \"Bearer\"} ${accessToken.token}`);\n    return true;\n}\n/**\n * A policy that can request a token from a TokenCredential implementation and\n * then apply it to the Authorization header of a request as a Bearer token.\n */\nexport function bearerTokenAuthenticationPolicy(options) {\n    var _a, _b, _c;\n    const { credential, scopes, challengeCallbacks } = options;\n    const logger = options.logger || coreLogger;\n    const callbacks = {\n        authorizeRequest: (_b = (_a = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequest) === null || _a === void 0 ? void 0 : _a.bind(challengeCallbacks)) !== null && _b !== void 0 ? _b : defaultAuthorizeRequest,\n        authorizeRequestOnChallenge: (_c = challengeCallbacks === null || challengeCallbacks === void 0 ? void 0 : challengeCallbacks.authorizeRequestOnChallenge) === null || _c === void 0 ? void 0 : _c.bind(challengeCallbacks),\n    };\n    // This function encapsulates the entire process of reliably retrieving the token\n    // The options are left out of the public API until there's demand to configure this.\n    // Remember to extend `BearerTokenAuthenticationPolicyOptions` with `TokenCyclerOptions`\n    // in order to pass through the `options` object.\n    const getAccessToken = credential\n        ? createTokenCycler(credential /* , options */)\n        : () => Promise.resolve(null);\n    return {\n        name: bearerTokenAuthenticationPolicyName,\n        /**\n         * If there's no challenge parameter:\n         * - It will try to retrieve the token using the cache, or the credential's getToken.\n         * - Then it will try the next policy with or without the retrieved token.\n         *\n         * It uses the challenge parameters to:\n         * - Skip a first attempt to get the token from the credential if there's no cached token,\n         *   since it expects the token to be retrievable only after the challenge.\n         * - Prepare the outgoing request if the `prepareRequest` method has been provided.\n         * - Send an initial request to receive the challenge if it fails.\n         * - Process a challenge if the response contains it.\n         * - Retrieve a token with the challenge information, then re-send the request.\n         */\n        async sendRequest(request, next) {\n            if (!request.url.toLowerCase().startsWith(\"https://\")) {\n                throw new Error(\"Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.\");\n            }\n            await callbacks.authorizeRequest({\n                scopes: Array.isArray(scopes) ? scopes : [scopes],\n                request,\n                getAccessToken,\n                logger,\n            });\n            let response;\n            let error;\n            let shouldSendRequest;\n            [response, error] = await trySendRequest(request, next);\n            if (isChallengeResponse(response)) {\n                let claims = getCaeChallengeClaims(response.headers.get(\"WWW-Authenticate\"));\n                // Handle CAE by default when receive CAE claim\n                if (claims) {\n                    let parsedClaim;\n                    // Return the response immediately if claims is not a valid base64 encoded string\n                    try {\n                        parsedClaim = atob(claims);\n                    }\n                    catch (e) {\n                        logger.warning(`The WWW-Authenticate header contains \"claims\" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`);\n                        return response;\n                    }\n                    shouldSendRequest = await authorizeRequestOnCaeChallenge({\n                        scopes: Array.isArray(scopes) ? scopes : [scopes],\n                        response,\n                        request,\n                        getAccessToken,\n                        logger,\n                    }, parsedClaim);\n                    // Send updated request and handle response for RestError\n                    if (shouldSendRequest) {\n                        [response, error] = await trySendRequest(request, next);\n                    }\n                }\n                else if (callbacks.authorizeRequestOnChallenge) {\n                    // Handle custom challenges when client provides custom callback\n                    shouldSendRequest = await callbacks.authorizeRequestOnChallenge({\n                        scopes: Array.isArray(scopes) ? scopes : [scopes],\n                        request,\n                        response,\n                        getAccessToken,\n                        logger,\n                    });\n                    // Send updated request and handle response for RestError\n                    if (shouldSendRequest) {\n                        [response, error] = await trySendRequest(request, next);\n                    }\n                    // If we get another CAE Claim, we will handle it by default and return whatever value we receive for this\n                    if (isChallengeResponse(response)) {\n                        claims = getCaeChallengeClaims(response.headers.get(\"WWW-Authenticate\"));\n                        if (claims) {\n                            let parsedClaim;\n                            try {\n                                parsedClaim = atob(claims);\n                            }\n                            catch (e) {\n                                logger.warning(`The WWW-Authenticate header contains \"claims\" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${claims}`);\n                                return response;\n                            }\n                            shouldSendRequest = await authorizeRequestOnCaeChallenge({\n                                scopes: Array.isArray(scopes) ? scopes : [scopes],\n                                response,\n                                request,\n                                getAccessToken,\n                                logger,\n                            }, parsedClaim);\n                            // Send updated request and handle response for RestError\n                            if (shouldSendRequest) {\n                                [response, error] = await trySendRequest(request, next);\n                            }\n                        }\n                    }\n                }\n            }\n            if (error) {\n                throw error;\n            }\n            else {\n                return response;\n            }\n        },\n    };\n}\n/**\n * Converts: `Bearer a=\"b\", c=\"d\", Pop e=\"f\", g=\"h\"`.\n * Into: `[ { scheme: 'Bearer', params: { a: 'b', c: 'd' } }, { scheme: 'Pop', params: { e: 'f', g: 'h' } } ]`.\n *\n * @internal\n */\nexport function parseChallenges(challenges) {\n    // Challenge regex seperates the string to individual challenges with different schemes in the format `Scheme a=\"b\", c=d`\n    // The challenge regex captures parameteres with either quotes values or unquoted values\n    const challengeRegex = /(\\w+)\\s+((?:\\w+=(?:\"[^\"]*\"|[^,]*),?\\s*)+)/g;\n    // Parameter regex captures the claims group removed from the scheme in the format `a=\"b\"` and `c=\"d\"`\n    // CAE challenge always have quoted parameters. For more reference, https://learn.microsoft.com/entra/identity-platform/claims-challenge\n    const paramRegex = /(\\w+)=\"([^\"]*)\"/g;\n    const parsedChallenges = [];\n    let match;\n    // Iterate over each challenge match\n    while ((match = challengeRegex.exec(challenges)) !== null) {\n        const scheme = match[1];\n        const paramsString = match[2];\n        const params = {};\n        let paramMatch;\n        // Iterate over each parameter match\n        while ((paramMatch = paramRegex.exec(paramsString)) !== null) {\n            params[paramMatch[1]] = paramMatch[2];\n        }\n        parsedChallenges.push({ scheme, params });\n    }\n    return parsedChallenges;\n}\n/**\n * Parse a pipeline response and look for a CAE challenge with \"Bearer\" scheme\n * Return the value in the header without parsing the challenge\n * @internal\n */\nfunction getCaeChallengeClaims(challenges) {\n    var _a;\n    if (!challenges) {\n        return;\n    }\n    // Find all challenges present in the header\n    const parsedChallenges = parseChallenges(challenges);\n    return (_a = parsedChallenges.find((x) => x.scheme === \"Bearer\" && x.params.claims && x.params.error === \"insufficient_claims\")) === null || _a === void 0 ? void 0 : _a.params.claims;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createClientLogger } from \"@azure/logger\";\n/**\n * The `@azure/logger` configuration for this package.\n * @internal\n */\nexport const logger = createClientLogger(\"app-config\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { logger } from \"../logger.js\";\n/**\n * The sync token header, as described here:\n * https://docs.microsoft.com/azure/azure-app-configuration/rest-api-consistency\n * @internal\n */\nexport const SyncTokenHeaderName = \"sync-token\";\n/**\n * A policy factory for injecting sync tokens properly into outgoing requests.\n * @param syncTokens - the sync tokens store to be used across requests.\n * @internal\n */\nexport function syncTokenPolicy(syncTokens) {\n    return {\n        name: \"Sync Token Policy\",\n        async sendRequest(request, next) {\n            const syncTokenHeaderValue = syncTokens.getSyncTokenHeaderValue();\n            if (syncTokenHeaderValue) {\n                logger.info(\"[syncTokenPolicy] Setting headers with ${SyncTokenHeaderName} and ${syncTokenHeaderValue}\");\n                request.headers.set(SyncTokenHeaderName, syncTokenHeaderValue);\n            }\n            const response = await next(request);\n            syncTokens.addSyncTokenFromHeaderValue(response.headers.get(SyncTokenHeaderName));\n            return response;\n        },\n    };\n}\n/**\n * Sync token tracker (allows for real-time consistency, even in the face of\n * caching and load balancing within App Configuration).\n *\n * (protocol and format described here)\n * https://docs.microsoft.com/azure/azure-app-configuration/rest-api-consistency\n *\n * @internal\n */\nexport class SyncTokens {\n    constructor() {\n        this._currentSyncTokens = new Map();\n    }\n    /**\n     * Takes the value from the header named after the constant `SyncTokenHeaderName`\n     * and adds it to our list of accumulated sync tokens.\n     *\n     * If given an empty value (or undefined) it clears the current list of sync tokens.\n     * (indicates the service has properly absorbed values into the cluster).\n     *\n     * @param syncTokenHeaderValue - The full value of the sync token header.\n     */\n    addSyncTokenFromHeaderValue(syncTokenHeaderValue) {\n        if (syncTokenHeaderValue == null || syncTokenHeaderValue === \"\") {\n            // eventually everything gets synced up and we don't have to track\n            // these headers anymore\n            this._currentSyncTokens.clear();\n            return;\n        }\n        const newTokens = syncTokenHeaderValue.split(\",\").map(parseSyncToken);\n        for (const newToken of newTokens) {\n            const existingToken = this._currentSyncTokens.get(newToken.id);\n            if (!existingToken || existingToken.sequenceNumber < newToken.sequenceNumber) {\n                this._currentSyncTokens.set(newToken.id, newToken);\n                continue;\n            }\n        }\n    }\n    /**\n     * Gets a properly formatted SyncToken header value.\n     */\n    getSyncTokenHeaderValue() {\n        if (this._currentSyncTokens.size === 0) {\n            return undefined;\n        }\n        const syncTokenStrings = [];\n        for (const syncToken of this._currentSyncTokens.values()) {\n            // note that you don't include the 'sn' field here - that's only\n            // used for internal tracking of the 'version' for the token itself\n            syncTokenStrings.push(`${syncToken.id}=${syncToken.value}`);\n        }\n        return syncTokenStrings.join(\",\");\n    }\n}\n// An example sync token (from their documentation):\n//\n// jtqGc1I4=MDoyOA==;sn=28\n//\n// Which breaks down to:\n// id: jtqGc1I4\n// value: MDoyOA==\n// sequence number: 28\nconst syncTokenRegex = /^([^=]+)=([^;]+);sn=(\\d+)$/;\n/**\n * Parses a single sync token into it's constituent parts.\n *\n * @param syncToken - A single sync token.\n *\n * @internal\n */\nexport function parseSyncToken(syncToken) {\n    const matches = syncToken.match(syncTokenRegex);\n    if (matches == null) {\n        throw new Error(`Failed to parse sync token '${syncToken}' with regex ${syncTokenRegex.source}`);\n    }\n    const sequenceNumber = parseInt(matches[3], 10);\n    if (isNaN(sequenceNumber)) {\n        // this should be impossible since our regex restricts to just digits\n        // but there's nothing wrong with being thorough.\n        throw new Error(`${syncToken}: The sequence number value '${matches[3]}' wasn't a number`);\n    }\n    return {\n        id: matches[1],\n        value: matches[2],\n        sequenceNumber,\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { logger } from \"./logger.js\";\n/**\n * The prefix for feature flags.\n */\nexport const featureFlagPrefix = \".appconfig.featureflag/\";\n/**\n * The content type for a FeatureFlag\n */\nexport const featureFlagContentType = \"application/vnd.microsoft.appconfig.ff+json;charset=utf-8\";\n/**\n * @internal\n */\nexport const FeatureFlagHelper = {\n    /**\n     * Takes the FeatureFlag (JSON) and returns a ConfigurationSetting (with the props encodeed in the value).\n     */\n    toConfigurationSettingParam: (featureFlag) => {\n        var _a;\n        logger.info(\"Encoding FeatureFlag value in a ConfigurationSetting:\", featureFlag);\n        if (!featureFlag.value) {\n            logger.error(\"FeatureFlag has an unexpected value\", featureFlag);\n            throw new TypeError(`FeatureFlag has an unexpected value - ${featureFlag.value}`);\n        }\n        let key = featureFlag.key;\n        if (typeof featureFlag.key === \"string\" && !featureFlag.key.startsWith(featureFlagPrefix)) {\n            key = featureFlagPrefix + featureFlag.key;\n        }\n        const jsonFeatureFlagValue = {\n            id: (_a = featureFlag.value.id) !== null && _a !== void 0 ? _a : key.replace(featureFlagPrefix, \"\"),\n            enabled: featureFlag.value.enabled,\n            description: featureFlag.value.description,\n            conditions: {\n                client_filters: featureFlag.value.conditions.clientFilters,\n            },\n            display_name: featureFlag.value.displayName,\n        };\n        const configSetting = Object.assign(Object.assign({}, featureFlag), { key, value: JSON.stringify(jsonFeatureFlagValue) });\n        return configSetting;\n    },\n};\n/**\n * Takes the ConfigurationSetting as input and returns the ConfigurationSetting<FeatureFlagValue> by parsing the value string.\n */\nexport function parseFeatureFlag(setting) {\n    logger.info(\"Parsing the value to return the FeatureFlagValue\", setting);\n    if (!isFeatureFlag(setting)) {\n        logger.error(\"Invalid FeatureFlag input\", setting);\n        throw TypeError(`Setting with key ${setting.key} is not a valid FeatureFlag, make sure to have the correct content-type and a valid non-null value.`);\n    }\n    const jsonFeatureFlagValue = JSON.parse(setting.value);\n    let key = setting.key;\n    if (typeof setting.key === \"string\" && !setting.key.startsWith(featureFlagPrefix)) {\n        key = featureFlagPrefix + setting.key;\n    }\n    const featureflag = Object.assign(Object.assign({}, setting), { value: {\n            id: jsonFeatureFlagValue.id,\n            enabled: jsonFeatureFlagValue.enabled,\n            description: jsonFeatureFlagValue.description,\n            displayName: jsonFeatureFlagValue.display_name,\n            conditions: { clientFilters: jsonFeatureFlagValue.conditions.client_filters },\n        }, key, contentType: featureFlagContentType });\n    return featureflag;\n}\n/**\n * Lets you know if the ConfigurationSetting is a feature flag.\n *\n * [Checks if the content type is featureFlagContentType `\"application/vnd.microsoft.appconfig.ff+json;charset=utf-8\"`]\n */\nexport function isFeatureFlag(setting) {\n    return (setting && setting.contentType === featureFlagContentType && typeof setting.value === \"string\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { __rest } from \"tslib\";\nimport { FeatureFlagHelper, featureFlagContentType } from \"../featureFlag.js\";\nimport { SecretReferenceHelper, secretReferenceContentType } from \"../secretReference.js\";\nimport { isDefined } from \"@azure/core-util\";\nimport { logger } from \"../logger.js\";\n/**\n * Formats the etag so it can be used with a If-Match/If-None-Match header\n * @internal\n */\nexport function quoteETag(etag) {\n    // https://tools.ietf.org/html/rfc7232#section-3.1\n    if (etag === undefined || etag === \"*\") {\n        return etag;\n    }\n    if (etag.startsWith('\"') && etag.endsWith('\"')) {\n        return etag;\n    }\n    if (etag.startsWith(\"'\") && etag.endsWith(\"'\")) {\n        return etag;\n    }\n    return `\"${etag}\"`;\n}\n/**\n * Checks the onlyIfChanged/onlyIfUnchanged properties to make sure we haven't specified both\n * and throws an Error. Otherwise, returns the properties properly quoted.\n * @param options - An options object with onlyIfChanged/onlyIfUnchanged fields\n * @internal\n */\nexport function checkAndFormatIfAndIfNoneMatch(objectWithEtag, options) {\n    if (options.onlyIfChanged && options.onlyIfUnchanged) {\n        logger.error(\"onlyIfChanged and onlyIfUnchanged are both specified\", options.onlyIfChanged, options.onlyIfUnchanged);\n        throw new Error(\"onlyIfChanged and onlyIfUnchanged are mutually-exclusive\");\n    }\n    let ifMatch;\n    let ifNoneMatch;\n    if (options.onlyIfUnchanged) {\n        ifMatch = quoteETag(objectWithEtag.etag);\n    }\n    if (options.onlyIfChanged) {\n        ifNoneMatch = quoteETag(objectWithEtag.etag);\n    }\n    return {\n        ifMatch: ifMatch,\n        ifNoneMatch: ifNoneMatch,\n    };\n}\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions and ListRevisionsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatFiltersAndSelect(listConfigOptions) {\n    let acceptDatetime = undefined;\n    if (listConfigOptions.acceptDateTime) {\n        acceptDatetime = listConfigOptions.acceptDateTime.toISOString();\n    }\n    return {\n        key: listConfigOptions.keyFilter,\n        label: listConfigOptions.labelFilter,\n        tags: listConfigOptions.tagsFilter,\n        acceptDatetime,\n        select: formatFieldsForSelect(listConfigOptions.fields),\n    };\n}\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter, labelFilter, snapshotName are moved to key, label, and snapshot respectively.\n *\n * @internal\n */\nexport function formatConfigurationSettingsFiltersAndSelect(listConfigOptions) {\n    const { snapshotName: snapshot } = listConfigOptions, options = __rest(listConfigOptions, [\"snapshotName\"]);\n    return Object.assign(Object.assign({}, formatFiltersAndSelect(options)), { snapshot });\n}\n/**\n * Transforms some of the key fields in ListSnapshotsOptions\n * so they can be added to a request using AppConfigurationGetSnapshotsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatSnapshotFiltersAndSelect(listSnapshotOptions) {\n    return {\n        name: listSnapshotOptions.nameFilter,\n        status: listSnapshotOptions.statusFilter,\n        select: listSnapshotOptions.fields,\n    };\n}\n/**\n * Transforms some of the key fields in ListLabelsOptions\n * so they can be added to a request using AppConfigurationGetLabelsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - `nameFilter` are moved to name\n *\n * @internal\n */\nexport function formatLabelsFiltersAndSelect(listLabelsOptions) {\n    return {\n        name: listLabelsOptions.nameFilter,\n        select: listLabelsOptions.fields,\n    };\n}\n/**\n * Handles translating a Date acceptDateTime into a string as needed by the API\n * @param newOptions - A newer style options with acceptDateTime as a date (and with proper casing!)\n * @internal\n */\nexport function formatAcceptDateTime(newOptions) {\n    return {\n        acceptDatetime: newOptions.acceptDateTime && newOptions.acceptDateTime.toISOString(),\n    };\n}\n/**\n * Take the URL that gets returned from next link and extract the 'after' token needed\n * to get the next page of results.\n * @internal\n */\nexport function extractAfterTokenFromNextLink(nextLink) {\n    const searchParams = new URLSearchParams(nextLink);\n    const afterToken = searchParams.get(\"after\");\n    if (afterToken == null || Array.isArray(afterToken)) {\n        logger.error(\"Invalid nextLink - invalid after token\", afterToken, Array.isArray(afterToken));\n        throw new Error(\"Invalid nextLink - invalid after token\");\n    }\n    return decodeURIComponent(afterToken);\n}\n/**\n * Take the header link that gets returned from 304 response and extract the 'after' token needed\n * to get the next page of results.\n *\n * @internal\n */\nexport function extractAfterTokenFromLinkHeader(link) {\n    // Example transformation of the link header\n    // link:\n    // '</kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>; rel=\"next\"'\n    //\n    // linkValue:\n    // </kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>\n    //\n    // nextLink:\n    // /kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4\n    const linkValue = link.split(\";\")[0];\n    const nextLink = linkValue.substring(1, linkValue.length - 1);\n    return extractAfterTokenFromNextLink(nextLink);\n}\n/**\n * Makes a ConfigurationSetting-based response throw for all of the data members. Used primarily\n * to prevent possible errors by the user in accessing a model that is uninitialized. This can happen\n * in cases like HTTP status code 204 or 304, which return an empty response body.\n *\n * @param configurationSetting - The configuration setting to alter\n */\nexport function makeConfigurationSettingEmpty(configurationSetting) {\n    const names = [\n        \"contentType\",\n        \"etag\",\n        \"label\",\n        \"lastModified\",\n        \"isReadOnly\",\n        \"tags\",\n        \"value\",\n    ];\n    for (const name of names) {\n        configurationSetting[name] = undefined;\n    }\n}\n/**\n * @internal\n */\nexport function transformKeyValue(kvp) {\n    const setting = Object.assign(Object.assign({ value: undefined }, kvp), { isReadOnly: !!kvp.locked });\n    delete setting.locked;\n    if (!setting.label) {\n        delete setting.label;\n    }\n    if (!setting.contentType) {\n        delete setting.contentType;\n    }\n    return setting;\n}\n/**\n * @internal\n */\nfunction isConfigSettingWithSecretReferenceValue(setting) {\n    return (setting.contentType === secretReferenceContentType &&\n        isDefined(setting.value) &&\n        typeof setting.value !== \"string\");\n}\n/**\n * @internal\n */\nfunction isConfigSettingWithFeatureFlagValue(setting) {\n    return (setting.contentType === featureFlagContentType &&\n        isDefined(setting.value) &&\n        typeof setting.value !== \"string\");\n}\n/**\n * @internal\n */\nfunction isSimpleConfigSetting(setting) {\n    return typeof setting.value === \"string\" || !isDefined(setting.value);\n}\n/**\n * @internal\n */\nexport function serializeAsConfigurationSettingParam(setting) {\n    if (isSimpleConfigSetting(setting)) {\n        return setting;\n    }\n    try {\n        if (isConfigSettingWithFeatureFlagValue(setting)) {\n            return FeatureFlagHelper.toConfigurationSettingParam(setting);\n        }\n        if (isConfigSettingWithSecretReferenceValue(setting)) {\n            return SecretReferenceHelper.toConfigurationSettingParam(setting);\n        }\n    }\n    catch (error) {\n        return setting;\n    }\n    logger.error(\"Unable to serialize to a configuration setting\", setting);\n    throw new TypeError(`Unable to serialize the setting with key \"${setting.key}\" as a configuration setting`);\n}\n/**\n * @internal\n */\nexport function transformKeyValueResponseWithStatusCode(kvp, status) {\n    const response = Object.assign(Object.assign({}, transformKeyValue(kvp)), { statusCode: status !== null && status !== void 0 ? status : -1 });\n    if (hasUnderscoreResponse(kvp)) {\n        Object.defineProperty(response, \"_response\", {\n            enumerable: false,\n            value: kvp._response,\n        });\n    }\n    return response;\n}\n/**\n * @internal\n */\nexport function transformKeyValueResponse(kvp) {\n    const setting = transformKeyValue(kvp);\n    if (hasUnderscoreResponse(kvp)) {\n        Object.defineProperty(setting, \"_response\", {\n            enumerable: false,\n            value: kvp._response,\n        });\n    }\n    delete setting.eTag;\n    return setting;\n}\n/**\n * @internal\n */\nexport function transformSnapshotResponse(snapshot) {\n    if (hasUnderscoreResponse(snapshot)) {\n        Object.defineProperty(snapshot, \"_response\", {\n            enumerable: false,\n            value: snapshot._response,\n        });\n    }\n    return snapshot;\n}\n/**\n * Translates user-facing field names into their `select` equivalents (these can be\n * seen in the `KnownEnum5`)\n *\n * @param fieldNames - fieldNames from users.\n * @returns The field names translated into the `select` field equivalents.\n *\n * @internal\n */\nexport function formatFieldsForSelect(fieldNames) {\n    if (fieldNames == null) {\n        return undefined;\n    }\n    const mappedFieldNames = fieldNames.map((fn) => {\n        switch (fn) {\n            case \"lastModified\":\n                return \"last_modified\";\n            case \"contentType\":\n                return \"content_type\";\n            case \"isReadOnly\":\n                return \"locked\";\n            default:\n                return fn;\n        }\n    });\n    return mappedFieldNames;\n}\n/**\n * @internal\n */\nexport function errorMessageForUnexpectedSetting(key, expectedType) {\n    return `Setting with key ${key} is not a valid ${expectedType}, make sure to have the correct content-type and a valid non-null value.`;\n}\nexport function assertResponse(result) {\n    if (!hasUnderscoreResponse(result)) {\n        Object.defineProperty(result, \"_response\", {\n            enumerable: false,\n            value: \"Something went wrong, _response(raw response) is supposed to be part of the response. Please file a bug at https://github.com/Azure/azure-sdk-for-js\",\n        });\n    }\n}\nexport function hasUnderscoreResponse(result) {\n    return Object.prototype.hasOwnProperty.call(result, \"_response\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { logger } from \"./logger.js\";\n/**\n * content-type for the secret reference.\n */\nexport const secretReferenceContentType = \"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8\";\n/**\n * @internal\n */\nexport const SecretReferenceHelper = {\n    /**\n     * Takes the SecretReference (JSON) and returns a ConfigurationSetting (with the props encodeed in the value).\n     */\n    toConfigurationSettingParam: (secretReference) => {\n        logger.info(\"Encoding SecretReference value in a ConfigurationSetting:\", secretReference);\n        if (!secretReference.value) {\n            logger.error(`SecretReference has an unexpected value`, secretReference);\n            throw new TypeError(`SecretReference has an unexpected value - ${secretReference.value}`);\n        }\n        const jsonSecretReferenceValue = {\n            uri: secretReference.value.secretId,\n        };\n        const configSetting = Object.assign(Object.assign({}, secretReference), { value: JSON.stringify(jsonSecretReferenceValue) });\n        return configSetting;\n    },\n};\n/**\n * Takes the ConfigurationSetting as input and returns the ConfigurationSetting<SecretReferenceValue> by parsing the value string.\n */\nexport function parseSecretReference(setting) {\n    logger.info(\"[parseSecretReference] Parsing the value to return the SecretReferenceValue\", setting);\n    if (!isSecretReference(setting)) {\n        logger.error(\"Invalid SecretReference input\", setting);\n        throw TypeError(`Setting with key ${setting.key} is not a valid SecretReference, make sure to have the correct content-type and a valid non-null value.`);\n    }\n    const jsonSecretReferenceValue = JSON.parse(setting.value);\n    const secretReference = Object.assign(Object.assign({}, setting), { value: { secretId: jsonSecretReferenceValue.uri } });\n    return secretReference;\n}\n/**\n * Lets you know if the ConfigurationSetting is a secret reference.\n *\n * [Checks if the content type is secretReferenceContentType `\"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8\"`]\n */\nexport function isSecretReference(setting) {\n    return (setting &&\n        setting.contentType === secretReferenceContentType &&\n        typeof setting.value === \"string\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Encodes a string in base64 format.\n * @param value - the string to encode\n * @internal\n */\nexport function encodeString(value) {\n    return btoa(value);\n}\n/**\n * Encodes a byte array in base64 format.\n * @param value - the Uint8Aray to encode\n * @internal\n */\nexport function encodeByteArray(value) {\n    let str = \"\";\n    for (let i = 0; i < value.length; i++) {\n        str += String.fromCharCode(value[i]);\n    }\n    return btoa(str);\n}\n/**\n * Decodes a base64 string into a byte array.\n * @param value - the base64 string to decode\n * @internal\n */\nexport function decodeString(value) {\n    const byteString = atob(value);\n    const arr = new Uint8Array(byteString.length);\n    for (let i = 0; i < byteString.length; i++) {\n        arr[i] = byteString.charCodeAt(i);\n    }\n    return arr;\n}\n/**\n * Decodes a base64 string into a string.\n * @param value - the base64 string to decode\n * @internal\n */\nexport function decodeStringToString(value) {\n    return atob(value);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Default key used to access the XML attributes.\n */\nexport const XML_ATTRKEY = \"$\";\n/**\n * Default key used to access the XML value content.\n */\nexport const XML_CHARKEY = \"_\";\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * A type guard for a primitive response body.\n * @param value - Value to test\n *\n * @internal\n */\nexport function isPrimitiveBody(value, mapperTypeName) {\n    return (mapperTypeName !== \"Composite\" &&\n        mapperTypeName !== \"Dictionary\" &&\n        (typeof value === \"string\" ||\n            typeof value === \"number\" ||\n            typeof value === \"boolean\" ||\n            (mapperTypeName === null || mapperTypeName === void 0 ? void 0 : mapperTypeName.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)) !==\n                null ||\n            value === undefined ||\n            value === null));\n}\nconst validateISODuration = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n/**\n * Returns true if the given string is in ISO 8601 format.\n * @param value - The value to be validated for ISO 8601 duration format.\n * @internal\n */\nexport function isDuration(value) {\n    return validateISODuration.test(value);\n}\nconst validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;\n/**\n * Returns true if the provided uuid is valid.\n *\n * @param uuid - The uuid that needs to be validated.\n *\n * @internal\n */\nexport function isValidUuid(uuid) {\n    return validUuidRegex.test(uuid);\n}\n/**\n * Maps the response as follows:\n * - wraps the response body if needed (typically if its type is primitive).\n * - returns null if the combination of the headers and the body is empty.\n * - otherwise, returns the combination of the headers and the body.\n *\n * @param responseObject - a representation of the parsed response\n * @returns the response that will be returned to the user which can be null and/or wrapped\n *\n * @internal\n */\nfunction handleNullableResponseAndWrappableBody(responseObject) {\n    const combinedHeadersAndBody = Object.assign(Object.assign({}, responseObject.headers), responseObject.body);\n    if (responseObject.hasNullableType &&\n        Object.getOwnPropertyNames(combinedHeadersAndBody).length === 0) {\n        return responseObject.shouldWrapBody ? { body: null } : null;\n    }\n    else {\n        return responseObject.shouldWrapBody\n            ? Object.assign(Object.assign({}, responseObject.headers), { body: responseObject.body }) : combinedHeadersAndBody;\n    }\n}\n/**\n * Take a `FullOperationResponse` and turn it into a flat\n * response object to hand back to the consumer.\n * @param fullResponse - The processed response from the operation request\n * @param responseSpec - The response map from the OperationSpec\n *\n * @internal\n */\nexport function flattenResponse(fullResponse, responseSpec) {\n    var _a, _b;\n    const parsedHeaders = fullResponse.parsedHeaders;\n    // head methods never have a body, but we return a boolean set to body property\n    // to indicate presence/absence of the resource\n    if (fullResponse.request.method === \"HEAD\") {\n        return Object.assign(Object.assign({}, parsedHeaders), { body: fullResponse.parsedBody });\n    }\n    const bodyMapper = responseSpec && responseSpec.bodyMapper;\n    const isNullable = Boolean(bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.nullable);\n    const expectedBodyTypeName = bodyMapper === null || bodyMapper === void 0 ? void 0 : bodyMapper.type.name;\n    /** If the body is asked for, we look at the expected body type to handle it */\n    if (expectedBodyTypeName === \"Stream\") {\n        return Object.assign(Object.assign({}, parsedHeaders), { blobBody: fullResponse.blobBody, readableStreamBody: fullResponse.readableStreamBody });\n    }\n    const modelProperties = (expectedBodyTypeName === \"Composite\" &&\n        bodyMapper.type.modelProperties) ||\n        {};\n    const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === \"\");\n    if (expectedBodyTypeName === \"Sequence\" || isPageableResponse) {\n        const arrayResponse = (_a = fullResponse.parsedBody) !== null && _a !== void 0 ? _a : [];\n        for (const key of Object.keys(modelProperties)) {\n            if (modelProperties[key].serializedName) {\n                arrayResponse[key] = (_b = fullResponse.parsedBody) === null || _b === void 0 ? void 0 : _b[key];\n            }\n        }\n        if (parsedHeaders) {\n            for (const key of Object.keys(parsedHeaders)) {\n                arrayResponse[key] = parsedHeaders[key];\n            }\n        }\n        return isNullable &&\n            !fullResponse.parsedBody &&\n            !parsedHeaders &&\n            Object.getOwnPropertyNames(modelProperties).length === 0\n            ? null\n            : arrayResponse;\n    }\n    return handleNullableResponseAndWrappableBody({\n        body: fullResponse.parsedBody,\n        headers: parsedHeaders,\n        hasNullableType: isNullable,\n        shouldWrapBody: isPrimitiveBody(fullResponse.parsedBody, expectedBodyTypeName),\n    });\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport * as base64 from \"./base64.js\";\nimport { XML_ATTRKEY, XML_CHARKEY } from \"./interfaces.js\";\nimport { isDuration, isValidUuid } from \"./utils.js\";\nclass SerializerImpl {\n    constructor(modelMappers = {}, isXML = false) {\n        this.modelMappers = modelMappers;\n        this.isXML = isXML;\n    }\n    /**\n     * @deprecated Removing the constraints validation on client side.\n     */\n    validateConstraints(mapper, value, objectName) {\n        const failValidation = (constraintName, constraintValue) => {\n            throw new Error(`\"${objectName}\" with value \"${value}\" should satisfy the constraint \"${constraintName}\": ${constraintValue}.`);\n        };\n        if (mapper.constraints && value !== undefined && value !== null) {\n            const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems, } = mapper.constraints;\n            if (ExclusiveMaximum !== undefined && value >= ExclusiveMaximum) {\n                failValidation(\"ExclusiveMaximum\", ExclusiveMaximum);\n            }\n            if (ExclusiveMinimum !== undefined && value <= ExclusiveMinimum) {\n                failValidation(\"ExclusiveMinimum\", ExclusiveMinimum);\n            }\n            if (InclusiveMaximum !== undefined && value > InclusiveMaximum) {\n                failValidation(\"InclusiveMaximum\", InclusiveMaximum);\n            }\n            if (InclusiveMinimum !== undefined && value < InclusiveMinimum) {\n                failValidation(\"InclusiveMinimum\", InclusiveMinimum);\n            }\n            if (MaxItems !== undefined && value.length > MaxItems) {\n                failValidation(\"MaxItems\", MaxItems);\n            }\n            if (MaxLength !== undefined && value.length > MaxLength) {\n                failValidation(\"MaxLength\", MaxLength);\n            }\n            if (MinItems !== undefined && value.length < MinItems) {\n                failValidation(\"MinItems\", MinItems);\n            }\n            if (MinLength !== undefined && value.length < MinLength) {\n                failValidation(\"MinLength\", MinLength);\n            }\n            if (MultipleOf !== undefined && value % MultipleOf !== 0) {\n                failValidation(\"MultipleOf\", MultipleOf);\n            }\n            if (Pattern) {\n                const pattern = typeof Pattern === \"string\" ? new RegExp(Pattern) : Pattern;\n                if (typeof value !== \"string\" || value.match(pattern) === null) {\n                    failValidation(\"Pattern\", Pattern);\n                }\n            }\n            if (UniqueItems &&\n                value.some((item, i, ar) => ar.indexOf(item) !== i)) {\n                failValidation(\"UniqueItems\", UniqueItems);\n            }\n        }\n    }\n    /**\n     * Serialize the given object based on its metadata defined in the mapper\n     *\n     * @param mapper - The mapper which defines the metadata of the serializable object\n     *\n     * @param object - A valid Javascript object to be serialized\n     *\n     * @param objectName - Name of the serialized object\n     *\n     * @param options - additional options to serialization\n     *\n     * @returns A valid serialized Javascript object\n     */\n    serialize(mapper, object, objectName, options = { xml: {} }) {\n        var _a, _b, _c;\n        const updatedOptions = {\n            xml: {\n                rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : \"\",\n                includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false,\n                xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,\n            },\n        };\n        let payload = {};\n        const mapperType = mapper.type.name;\n        if (!objectName) {\n            objectName = mapper.serializedName;\n        }\n        if (mapperType.match(/^Sequence$/i) !== null) {\n            payload = [];\n        }\n        if (mapper.isConstant) {\n            object = mapper.defaultValue;\n        }\n        // This table of allowed values should help explain\n        // the mapper.required and mapper.nullable properties.\n        // X means \"neither undefined or null are allowed\".\n        //           || required\n        //           || true      | false\n        //  nullable || ==========================\n        //      true || null      | undefined/null\n        //     false || X         | undefined\n        // undefined || X         | undefined/null\n        const { required, nullable } = mapper;\n        if (required && nullable && object === undefined) {\n            throw new Error(`${objectName} cannot be undefined.`);\n        }\n        if (required && !nullable && (object === undefined || object === null)) {\n            throw new Error(`${objectName} cannot be null or undefined.`);\n        }\n        if (!required && nullable === false && object === null) {\n            throw new Error(`${objectName} cannot be null.`);\n        }\n        if (object === undefined || object === null) {\n            payload = object;\n        }\n        else {\n            if (mapperType.match(/^any$/i) !== null) {\n                payload = object;\n            }\n            else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) {\n                payload = serializeBasicTypes(mapperType, objectName, object);\n            }\n            else if (mapperType.match(/^Enum$/i) !== null) {\n                const enumMapper = mapper;\n                payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object);\n            }\n            else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) {\n                payload = serializeDateTypes(mapperType, object, objectName);\n            }\n            else if (mapperType.match(/^ByteArray$/i) !== null) {\n                payload = serializeByteArrayType(objectName, object);\n            }\n            else if (mapperType.match(/^Base64Url$/i) !== null) {\n                payload = serializeBase64UrlType(objectName, object);\n            }\n            else if (mapperType.match(/^Sequence$/i) !== null) {\n                payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions);\n            }\n            else if (mapperType.match(/^Dictionary$/i) !== null) {\n                payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions);\n            }\n            else if (mapperType.match(/^Composite$/i) !== null) {\n                payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions);\n            }\n        }\n        return payload;\n    }\n    /**\n     * Deserialize the given object based on its metadata defined in the mapper\n     *\n     * @param mapper - The mapper which defines the metadata of the serializable object\n     *\n     * @param responseBody - A valid Javascript entity to be deserialized\n     *\n     * @param objectName - Name of the deserialized object\n     *\n     * @param options - Controls behavior of XML parser and builder.\n     *\n     * @returns A valid deserialized Javascript object\n     */\n    deserialize(mapper, responseBody, objectName, options = { xml: {} }) {\n        var _a, _b, _c, _d;\n        const updatedOptions = {\n            xml: {\n                rootName: (_a = options.xml.rootName) !== null && _a !== void 0 ? _a : \"\",\n                includeRoot: (_b = options.xml.includeRoot) !== null && _b !== void 0 ? _b : false,\n                xmlCharKey: (_c = options.xml.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,\n            },\n            ignoreUnknownProperties: (_d = options.ignoreUnknownProperties) !== null && _d !== void 0 ? _d : false,\n        };\n        if (responseBody === undefined || responseBody === null) {\n            if (this.isXML && mapper.type.name === \"Sequence\" && !mapper.xmlIsWrapped) {\n                // Edge case for empty XML non-wrapped lists. xml2js can't distinguish\n                // between the list being empty versus being missing,\n                // so let's do the more user-friendly thing and return an empty list.\n                responseBody = [];\n            }\n            // specifically check for undefined as default value can be a falsey value `0, \"\", false, null`\n            if (mapper.defaultValue !== undefined) {\n                responseBody = mapper.defaultValue;\n            }\n            return responseBody;\n        }\n        let payload;\n        const mapperType = mapper.type.name;\n        if (!objectName) {\n            objectName = mapper.serializedName;\n        }\n        if (mapperType.match(/^Composite$/i) !== null) {\n            payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions);\n        }\n        else {\n            if (this.isXML) {\n                const xmlCharKey = updatedOptions.xml.xmlCharKey;\n                /**\n                 * If the mapper specifies this as a non-composite type value but the responseBody contains\n                 * both header (\"$\" i.e., XML_ATTRKEY) and body (\"#\" i.e., XML_CHARKEY) properties,\n                 * then just reduce the responseBody value to the body (\"#\" i.e., XML_CHARKEY) property.\n                 */\n                if (responseBody[XML_ATTRKEY] !== undefined && responseBody[xmlCharKey] !== undefined) {\n                    responseBody = responseBody[xmlCharKey];\n                }\n            }\n            if (mapperType.match(/^Number$/i) !== null) {\n                payload = parseFloat(responseBody);\n                if (isNaN(payload)) {\n                    payload = responseBody;\n                }\n            }\n            else if (mapperType.match(/^Boolean$/i) !== null) {\n                if (responseBody === \"true\") {\n                    payload = true;\n                }\n                else if (responseBody === \"false\") {\n                    payload = false;\n                }\n                else {\n                    payload = responseBody;\n                }\n            }\n            else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) {\n                payload = responseBody;\n            }\n            else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) {\n                payload = new Date(responseBody);\n            }\n            else if (mapperType.match(/^UnixTime$/i) !== null) {\n                payload = unixTimeToDate(responseBody);\n            }\n            else if (mapperType.match(/^ByteArray$/i) !== null) {\n                payload = base64.decodeString(responseBody);\n            }\n            else if (mapperType.match(/^Base64Url$/i) !== null) {\n                payload = base64UrlToByteArray(responseBody);\n            }\n            else if (mapperType.match(/^Sequence$/i) !== null) {\n                payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions);\n            }\n            else if (mapperType.match(/^Dictionary$/i) !== null) {\n                payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions);\n            }\n        }\n        if (mapper.isConstant) {\n            payload = mapper.defaultValue;\n        }\n        return payload;\n    }\n}\n/**\n * Method that creates and returns a Serializer.\n * @param modelMappers - Known models to map\n * @param isXML - If XML should be supported\n */\nexport function createSerializer(modelMappers = {}, isXML = false) {\n    return new SerializerImpl(modelMappers, isXML);\n}\nfunction trimEnd(str, ch) {\n    let len = str.length;\n    while (len - 1 >= 0 && str[len - 1] === ch) {\n        --len;\n    }\n    return str.substr(0, len);\n}\nfunction bufferToBase64Url(buffer) {\n    if (!buffer) {\n        return undefined;\n    }\n    if (!(buffer instanceof Uint8Array)) {\n        throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`);\n    }\n    // Uint8Array to Base64.\n    const str = base64.encodeByteArray(buffer);\n    // Base64 to Base64Url.\n    return trimEnd(str, \"=\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\");\n}\nfunction base64UrlToByteArray(str) {\n    if (!str) {\n        return undefined;\n    }\n    if (str && typeof str.valueOf() !== \"string\") {\n        throw new Error(\"Please provide an input of type string for converting to Uint8Array\");\n    }\n    // Base64Url to Base64.\n    str = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n    // Base64 to Uint8Array.\n    return base64.decodeString(str);\n}\nfunction splitSerializeName(prop) {\n    const classes = [];\n    let partialclass = \"\";\n    if (prop) {\n        const subwords = prop.split(\".\");\n        for (const item of subwords) {\n            if (item.charAt(item.length - 1) === \"\\\\\") {\n                partialclass += item.substr(0, item.length - 1) + \".\";\n            }\n            else {\n                partialclass += item;\n                classes.push(partialclass);\n                partialclass = \"\";\n            }\n        }\n    }\n    return classes;\n}\nfunction dateToUnixTime(d) {\n    if (!d) {\n        return undefined;\n    }\n    if (typeof d.valueOf() === \"string\") {\n        d = new Date(d);\n    }\n    return Math.floor(d.getTime() / 1000);\n}\nfunction unixTimeToDate(n) {\n    if (!n) {\n        return undefined;\n    }\n    return new Date(n * 1000);\n}\nfunction serializeBasicTypes(typeName, objectName, value) {\n    if (value !== null && value !== undefined) {\n        if (typeName.match(/^Number$/i) !== null) {\n            if (typeof value !== \"number\") {\n                throw new Error(`${objectName} with value ${value} must be of type number.`);\n            }\n        }\n        else if (typeName.match(/^String$/i) !== null) {\n            if (typeof value.valueOf() !== \"string\") {\n                throw new Error(`${objectName} with value \"${value}\" must be of type string.`);\n            }\n        }\n        else if (typeName.match(/^Uuid$/i) !== null) {\n            if (!(typeof value.valueOf() === \"string\" && isValidUuid(value))) {\n                throw new Error(`${objectName} with value \"${value}\" must be of type string and a valid uuid.`);\n            }\n        }\n        else if (typeName.match(/^Boolean$/i) !== null) {\n            if (typeof value !== \"boolean\") {\n                throw new Error(`${objectName} with value ${value} must be of type boolean.`);\n            }\n        }\n        else if (typeName.match(/^Stream$/i) !== null) {\n            const objectType = typeof value;\n            if (objectType !== \"string\" &&\n                typeof value.pipe !== \"function\" && // NodeJS.ReadableStream\n                typeof value.tee !== \"function\" && // browser ReadableStream\n                !(value instanceof ArrayBuffer) &&\n                !ArrayBuffer.isView(value) &&\n                // File objects count as a type of Blob, so we want to use instanceof explicitly\n                !((typeof Blob === \"function\" || typeof Blob === \"object\") && value instanceof Blob) &&\n                objectType !== \"function\") {\n                throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`);\n            }\n        }\n    }\n    return value;\n}\nfunction serializeEnumType(objectName, allowedValues, value) {\n    if (!allowedValues) {\n        throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`);\n    }\n    const isPresent = allowedValues.some((item) => {\n        if (typeof item.valueOf() === \"string\") {\n            return item.toLowerCase() === value.toLowerCase();\n        }\n        return item === value;\n    });\n    if (!isPresent) {\n        throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`);\n    }\n    return value;\n}\nfunction serializeByteArrayType(objectName, value) {\n    if (value !== undefined && value !== null) {\n        if (!(value instanceof Uint8Array)) {\n            throw new Error(`${objectName} must be of type Uint8Array.`);\n        }\n        value = base64.encodeByteArray(value);\n    }\n    return value;\n}\nfunction serializeBase64UrlType(objectName, value) {\n    if (value !== undefined && value !== null) {\n        if (!(value instanceof Uint8Array)) {\n            throw new Error(`${objectName} must be of type Uint8Array.`);\n        }\n        value = bufferToBase64Url(value);\n    }\n    return value;\n}\nfunction serializeDateTypes(typeName, value, objectName) {\n    if (value !== undefined && value !== null) {\n        if (typeName.match(/^Date$/i) !== null) {\n            if (!(value instanceof Date ||\n                (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n                throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n            }\n            value =\n                value instanceof Date\n                    ? value.toISOString().substring(0, 10)\n                    : new Date(value).toISOString().substring(0, 10);\n        }\n        else if (typeName.match(/^DateTime$/i) !== null) {\n            if (!(value instanceof Date ||\n                (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n                throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n            }\n            value = value instanceof Date ? value.toISOString() : new Date(value).toISOString();\n        }\n        else if (typeName.match(/^DateTimeRfc1123$/i) !== null) {\n            if (!(value instanceof Date ||\n                (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n                throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`);\n            }\n            value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString();\n        }\n        else if (typeName.match(/^UnixTime$/i) !== null) {\n            if (!(value instanceof Date ||\n                (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n                throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` +\n                    `for it to be serialized in UnixTime/Epoch format.`);\n            }\n            value = dateToUnixTime(value);\n        }\n        else if (typeName.match(/^TimeSpan$/i) !== null) {\n            if (!isDuration(value)) {\n                throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was \"${value}\".`);\n            }\n        }\n    }\n    return value;\n}\nfunction serializeSequenceType(serializer, mapper, object, objectName, isXml, options) {\n    var _a;\n    if (!Array.isArray(object)) {\n        throw new Error(`${objectName} must be of type Array.`);\n    }\n    let elementType = mapper.type.element;\n    if (!elementType || typeof elementType !== \"object\") {\n        throw new Error(`element\" metadata for an Array must be defined in the ` +\n            `mapper and it must of type \"object\" in ${objectName}.`);\n    }\n    // Quirk: Composite mappers referenced by `element` might\n    // not have *all* properties declared (like uberParent),\n    // so let's try to look up the full definition by name.\n    if (elementType.type.name === \"Composite\" && elementType.type.className) {\n        elementType = (_a = serializer.modelMappers[elementType.type.className]) !== null && _a !== void 0 ? _a : elementType;\n    }\n    const tempArray = [];\n    for (let i = 0; i < object.length; i++) {\n        const serializedValue = serializer.serialize(elementType, object[i], objectName, options);\n        if (isXml && elementType.xmlNamespace) {\n            const xmlnsKey = elementType.xmlNamespacePrefix\n                ? `xmlns:${elementType.xmlNamespacePrefix}`\n                : \"xmlns\";\n            if (elementType.type.name === \"Composite\") {\n                tempArray[i] = Object.assign({}, serializedValue);\n                tempArray[i][XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace };\n            }\n            else {\n                tempArray[i] = {};\n                tempArray[i][options.xml.xmlCharKey] = serializedValue;\n                tempArray[i][XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace };\n            }\n        }\n        else {\n            tempArray[i] = serializedValue;\n        }\n    }\n    return tempArray;\n}\nfunction serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) {\n    if (typeof object !== \"object\") {\n        throw new Error(`${objectName} must be of type object.`);\n    }\n    const valueType = mapper.type.value;\n    if (!valueType || typeof valueType !== \"object\") {\n        throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n            `mapper and it must of type \"object\" in ${objectName}.`);\n    }\n    const tempDictionary = {};\n    for (const key of Object.keys(object)) {\n        const serializedValue = serializer.serialize(valueType, object[key], objectName, options);\n        // If the element needs an XML namespace we need to add it within the $ property\n        tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options);\n    }\n    // Add the namespace to the root element if needed\n    if (isXml && mapper.xmlNamespace) {\n        const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : \"xmlns\";\n        const result = tempDictionary;\n        result[XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace };\n        return result;\n    }\n    return tempDictionary;\n}\n/**\n * Resolves the additionalProperties property from a referenced mapper\n * @param serializer - the serializer containing the entire set of mappers\n * @param mapper - the composite mapper to resolve\n * @param objectName - name of the object being serialized\n */\nfunction resolveAdditionalProperties(serializer, mapper, objectName) {\n    const additionalProperties = mapper.type.additionalProperties;\n    if (!additionalProperties && mapper.type.className) {\n        const modelMapper = resolveReferencedMapper(serializer, mapper, objectName);\n        return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties;\n    }\n    return additionalProperties;\n}\n/**\n * Finds the mapper referenced by className\n * @param serializer - the serializer containing the entire set of mappers\n * @param mapper - the composite mapper to resolve\n * @param objectName - name of the object being serialized\n */\nfunction resolveReferencedMapper(serializer, mapper, objectName) {\n    const className = mapper.type.className;\n    if (!className) {\n        throw new Error(`Class name for model \"${objectName}\" is not provided in the mapper \"${JSON.stringify(mapper, undefined, 2)}\".`);\n    }\n    return serializer.modelMappers[className];\n}\n/**\n * Resolves a composite mapper's modelProperties.\n * @param serializer - the serializer containing the entire set of mappers\n * @param mapper - the composite mapper to resolve\n */\nfunction resolveModelProperties(serializer, mapper, objectName) {\n    let modelProps = mapper.type.modelProperties;\n    if (!modelProps) {\n        const modelMapper = resolveReferencedMapper(serializer, mapper, objectName);\n        if (!modelMapper) {\n            throw new Error(`mapper() cannot be null or undefined for model \"${mapper.type.className}\".`);\n        }\n        modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties;\n        if (!modelProps) {\n            throw new Error(`modelProperties cannot be null or undefined in the ` +\n                `mapper \"${JSON.stringify(modelMapper)}\" of type \"${mapper.type.className}\" for object \"${objectName}\".`);\n        }\n    }\n    return modelProps;\n}\nfunction serializeCompositeType(serializer, mapper, object, objectName, isXml, options) {\n    if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n        mapper = getPolymorphicMapper(serializer, mapper, object, \"clientName\");\n    }\n    if (object !== undefined && object !== null) {\n        const payload = {};\n        const modelProps = resolveModelProperties(serializer, mapper, objectName);\n        for (const key of Object.keys(modelProps)) {\n            const propertyMapper = modelProps[key];\n            if (propertyMapper.readOnly) {\n                continue;\n            }\n            let propName;\n            let parentObject = payload;\n            if (serializer.isXML) {\n                if (propertyMapper.xmlIsWrapped) {\n                    propName = propertyMapper.xmlName;\n                }\n                else {\n                    propName = propertyMapper.xmlElementName || propertyMapper.xmlName;\n                }\n            }\n            else {\n                const paths = splitSerializeName(propertyMapper.serializedName);\n                propName = paths.pop();\n                for (const pathName of paths) {\n                    const childObject = parentObject[pathName];\n                    if ((childObject === undefined || childObject === null) &&\n                        ((object[key] !== undefined && object[key] !== null) ||\n                            propertyMapper.defaultValue !== undefined)) {\n                        parentObject[pathName] = {};\n                    }\n                    parentObject = parentObject[pathName];\n                }\n            }\n            if (parentObject !== undefined && parentObject !== null) {\n                if (isXml && mapper.xmlNamespace) {\n                    const xmlnsKey = mapper.xmlNamespacePrefix\n                        ? `xmlns:${mapper.xmlNamespacePrefix}`\n                        : \"xmlns\";\n                    parentObject[XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace });\n                }\n                const propertyObjectName = propertyMapper.serializedName !== \"\"\n                    ? objectName + \".\" + propertyMapper.serializedName\n                    : objectName;\n                let toSerialize = object[key];\n                const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n                if (polymorphicDiscriminator &&\n                    polymorphicDiscriminator.clientName === key &&\n                    (toSerialize === undefined || toSerialize === null)) {\n                    toSerialize = mapper.serializedName;\n                }\n                const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options);\n                if (serializedValue !== undefined && propName !== undefined && propName !== null) {\n                    const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options);\n                    if (isXml && propertyMapper.xmlIsAttribute) {\n                        // XML_ATTRKEY, i.e., $ is the key attributes are kept under in xml2js.\n                        // This keeps things simple while preventing name collision\n                        // with names in user documents.\n                        parentObject[XML_ATTRKEY] = parentObject[XML_ATTRKEY] || {};\n                        parentObject[XML_ATTRKEY][propName] = serializedValue;\n                    }\n                    else if (isXml && propertyMapper.xmlIsWrapped) {\n                        parentObject[propName] = { [propertyMapper.xmlElementName]: value };\n                    }\n                    else {\n                        parentObject[propName] = value;\n                    }\n                }\n            }\n        }\n        const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName);\n        if (additionalPropertiesMapper) {\n            const propNames = Object.keys(modelProps);\n            for (const clientPropName in object) {\n                const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName);\n                if (isAdditionalProperty) {\n                    payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '[\"' + clientPropName + '\"]', options);\n                }\n            }\n        }\n        return payload;\n    }\n    return object;\n}\nfunction getXmlObjectValue(propertyMapper, serializedValue, isXml, options) {\n    if (!isXml || !propertyMapper.xmlNamespace) {\n        return serializedValue;\n    }\n    const xmlnsKey = propertyMapper.xmlNamespacePrefix\n        ? `xmlns:${propertyMapper.xmlNamespacePrefix}`\n        : \"xmlns\";\n    const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace };\n    if ([\"Composite\"].includes(propertyMapper.type.name)) {\n        if (serializedValue[XML_ATTRKEY]) {\n            return serializedValue;\n        }\n        else {\n            const result = Object.assign({}, serializedValue);\n            result[XML_ATTRKEY] = xmlNamespace;\n            return result;\n        }\n    }\n    const result = {};\n    result[options.xml.xmlCharKey] = serializedValue;\n    result[XML_ATTRKEY] = xmlNamespace;\n    return result;\n}\nfunction isSpecialXmlProperty(propertyName, options) {\n    return [XML_ATTRKEY, options.xml.xmlCharKey].includes(propertyName);\n}\nfunction deserializeCompositeType(serializer, mapper, responseBody, objectName, options) {\n    var _a, _b;\n    const xmlCharKey = (_a = options.xml.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY;\n    if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n        mapper = getPolymorphicMapper(serializer, mapper, responseBody, \"serializedName\");\n    }\n    const modelProps = resolveModelProperties(serializer, mapper, objectName);\n    let instance = {};\n    const handledPropertyNames = [];\n    for (const key of Object.keys(modelProps)) {\n        const propertyMapper = modelProps[key];\n        const paths = splitSerializeName(modelProps[key].serializedName);\n        handledPropertyNames.push(paths[0]);\n        const { serializedName, xmlName, xmlElementName } = propertyMapper;\n        let propertyObjectName = objectName;\n        if (serializedName !== \"\" && serializedName !== undefined) {\n            propertyObjectName = objectName + \".\" + serializedName;\n        }\n        const headerCollectionPrefix = propertyMapper.headerCollectionPrefix;\n        if (headerCollectionPrefix) {\n            const dictionary = {};\n            for (const headerKey of Object.keys(responseBody)) {\n                if (headerKey.startsWith(headerCollectionPrefix)) {\n                    dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options);\n                }\n                handledPropertyNames.push(headerKey);\n            }\n            instance[key] = dictionary;\n        }\n        else if (serializer.isXML) {\n            if (propertyMapper.xmlIsAttribute && responseBody[XML_ATTRKEY]) {\n                instance[key] = serializer.deserialize(propertyMapper, responseBody[XML_ATTRKEY][xmlName], propertyObjectName, options);\n            }\n            else if (propertyMapper.xmlIsMsText) {\n                if (responseBody[xmlCharKey] !== undefined) {\n                    instance[key] = responseBody[xmlCharKey];\n                }\n                else if (typeof responseBody === \"string\") {\n                    // The special case where xml parser parses \"<Name>content</Name>\" into JSON of\n                    //   `{ name: \"content\"}` instead of `{ name: { \"_\": \"content\" }}`\n                    instance[key] = responseBody;\n                }\n            }\n            else {\n                const propertyName = xmlElementName || xmlName || serializedName;\n                if (propertyMapper.xmlIsWrapped) {\n                    /* a list of <xmlElementName> wrapped by <xmlName>\n                      For the xml example below\n                        <Cors>\n                          <CorsRule>...</CorsRule>\n                          <CorsRule>...</CorsRule>\n                        </Cors>\n                      the responseBody has\n                        {\n                          Cors: {\n                            CorsRule: [{...}, {...}]\n                          }\n                        }\n                      xmlName is \"Cors\" and xmlElementName is\"CorsRule\".\n                    */\n                    const wrapped = responseBody[xmlName];\n                    const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : [];\n                    instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options);\n                    handledPropertyNames.push(xmlName);\n                }\n                else {\n                    const property = responseBody[propertyName];\n                    instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options);\n                    handledPropertyNames.push(propertyName);\n                }\n            }\n        }\n        else {\n            // deserialize the property if it is present in the provided responseBody instance\n            let propertyInstance;\n            let res = responseBody;\n            // traversing the object step by step.\n            let steps = 0;\n            for (const item of paths) {\n                if (!res)\n                    break;\n                steps++;\n                res = res[item];\n            }\n            // only accept null when reaching the last position of object otherwise it would be undefined\n            if (res === null && steps < paths.length) {\n                res = undefined;\n            }\n            propertyInstance = res;\n            const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator;\n            // checking that the model property name (key)(ex: \"fishtype\") and the\n            // clientName of the polymorphicDiscriminator {metadata} (ex: \"fishtype\")\n            // instead of the serializedName of the polymorphicDiscriminator (ex: \"fish.type\")\n            // is a better approach. The generator is not consistent with escaping '\\.' in the\n            // serializedName of the property (ex: \"fish\\.type\") that is marked as polymorphic discriminator\n            // and the serializedName of the metadata polymorphicDiscriminator (ex: \"fish.type\"). However,\n            // the clientName transformation of the polymorphicDiscriminator (ex: \"fishtype\") and\n            // the transformation of model property name (ex: \"fishtype\") is done consistently.\n            // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator.\n            if (polymorphicDiscriminator &&\n                key === polymorphicDiscriminator.clientName &&\n                (propertyInstance === undefined || propertyInstance === null)) {\n                propertyInstance = mapper.serializedName;\n            }\n            let serializedValue;\n            // paging\n            if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === \"\") {\n                propertyInstance = responseBody[key];\n                const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options);\n                // Copy over any properties that have already been added into the instance, where they do\n                // not exist on the newly de-serialized array\n                for (const [k, v] of Object.entries(instance)) {\n                    if (!Object.prototype.hasOwnProperty.call(arrayInstance, k)) {\n                        arrayInstance[k] = v;\n                    }\n                }\n                instance = arrayInstance;\n            }\n            else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) {\n                serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options);\n                instance[key] = serializedValue;\n            }\n        }\n    }\n    const additionalPropertiesMapper = mapper.type.additionalProperties;\n    if (additionalPropertiesMapper) {\n        const isAdditionalProperty = (responsePropName) => {\n            for (const clientPropName in modelProps) {\n                const paths = splitSerializeName(modelProps[clientPropName].serializedName);\n                if (paths[0] === responsePropName) {\n                    return false;\n                }\n            }\n            return true;\n        };\n        for (const responsePropName in responseBody) {\n            if (isAdditionalProperty(responsePropName)) {\n                instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '[\"' + responsePropName + '\"]', options);\n            }\n        }\n    }\n    else if (responseBody && !options.ignoreUnknownProperties) {\n        for (const key of Object.keys(responseBody)) {\n            if (instance[key] === undefined &&\n                !handledPropertyNames.includes(key) &&\n                !isSpecialXmlProperty(key, options)) {\n                instance[key] = responseBody[key];\n            }\n        }\n    }\n    return instance;\n}\nfunction deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) {\n    /* jshint validthis: true */\n    const value = mapper.type.value;\n    if (!value || typeof value !== \"object\") {\n        throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n            `mapper and it must of type \"object\" in ${objectName}`);\n    }\n    if (responseBody) {\n        const tempDictionary = {};\n        for (const key of Object.keys(responseBody)) {\n            tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options);\n        }\n        return tempDictionary;\n    }\n    return responseBody;\n}\nfunction deserializeSequenceType(serializer, mapper, responseBody, objectName, options) {\n    var _a;\n    let element = mapper.type.element;\n    if (!element || typeof element !== \"object\") {\n        throw new Error(`element\" metadata for an Array must be defined in the ` +\n            `mapper and it must of type \"object\" in ${objectName}`);\n    }\n    if (responseBody) {\n        if (!Array.isArray(responseBody)) {\n            // xml2js will interpret a single element array as just the element, so force it to be an array\n            responseBody = [responseBody];\n        }\n        // Quirk: Composite mappers referenced by `element` might\n        // not have *all* properties declared (like uberParent),\n        // so let's try to look up the full definition by name.\n        if (element.type.name === \"Composite\" && element.type.className) {\n            element = (_a = serializer.modelMappers[element.type.className]) !== null && _a !== void 0 ? _a : element;\n        }\n        const tempArray = [];\n        for (let i = 0; i < responseBody.length; i++) {\n            tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options);\n        }\n        return tempArray;\n    }\n    return responseBody;\n}\nfunction getIndexDiscriminator(discriminators, discriminatorValue, typeName) {\n    const typeNamesToCheck = [typeName];\n    while (typeNamesToCheck.length) {\n        const currentName = typeNamesToCheck.shift();\n        const indexDiscriminator = discriminatorValue === currentName\n            ? discriminatorValue\n            : currentName + \".\" + discriminatorValue;\n        if (Object.prototype.hasOwnProperty.call(discriminators, indexDiscriminator)) {\n            return discriminators[indexDiscriminator];\n        }\n        else {\n            for (const [name, mapper] of Object.entries(discriminators)) {\n                if (name.startsWith(currentName + \".\") &&\n                    mapper.type.uberParent === currentName &&\n                    mapper.type.className) {\n                    typeNamesToCheck.push(mapper.type.className);\n                }\n            }\n        }\n    }\n    return undefined;\n}\nfunction getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) {\n    var _a;\n    const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n    if (polymorphicDiscriminator) {\n        let discriminatorName = polymorphicDiscriminator[polymorphicPropertyName];\n        if (discriminatorName) {\n            // The serializedName might have \\\\, which we just want to ignore\n            if (polymorphicPropertyName === \"serializedName\") {\n                discriminatorName = discriminatorName.replace(/\\\\/gi, \"\");\n            }\n            const discriminatorValue = object[discriminatorName];\n            const typeName = (_a = mapper.type.uberParent) !== null && _a !== void 0 ? _a : mapper.type.className;\n            if (typeof discriminatorValue === \"string\" && typeName) {\n                const polymorphicMapper = getIndexDiscriminator(serializer.modelMappers.discriminators, discriminatorValue, typeName);\n                if (polymorphicMapper) {\n                    mapper = polymorphicMapper;\n                }\n            }\n        }\n    }\n    return mapper;\n}\nfunction getPolymorphicDiscriminatorRecursively(serializer, mapper) {\n    return (mapper.type.polymorphicDiscriminator ||\n        getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) ||\n        getPolymorphicDiscriminatorSafely(serializer, mapper.type.className));\n}\nfunction getPolymorphicDiscriminatorSafely(serializer, typeName) {\n    return (typeName &&\n        serializer.modelMappers[typeName] &&\n        serializer.modelMappers[typeName].type.polymorphicDiscriminator);\n}\n/**\n * Known types of Mappers\n */\nexport const MapperTypeNames = {\n    Base64Url: \"Base64Url\",\n    Boolean: \"Boolean\",\n    ByteArray: \"ByteArray\",\n    Composite: \"Composite\",\n    Date: \"Date\",\n    DateTime: \"DateTime\",\n    DateTimeRfc1123: \"DateTimeRfc1123\",\n    Dictionary: \"Dictionary\",\n    Enum: \"Enum\",\n    Number: \"Number\",\n    Object: \"Object\",\n    Sequence: \"Sequence\",\n    String: \"String\",\n    Stream: \"Stream\",\n    TimeSpan: \"TimeSpan\",\n    UnixTime: \"UnixTime\",\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * Browser-only implementation of the module's state. The browser esm variant will not load the commonjs state, so we do not need to share state between the two.\n */\nexport const state = {\n    operationRequestMap: new WeakMap(),\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { state } from \"./state.js\";\n/**\n * @internal\n * Retrieves the value to use for a given operation argument\n * @param operationArguments - The arguments passed from the generated client\n * @param parameter - The parameter description\n * @param fallbackObject - If something isn't found in the arguments bag, look here.\n *  Generally used to look at the service client properties.\n */\nexport function getOperationArgumentValueFromParameter(operationArguments, parameter, fallbackObject) {\n    let parameterPath = parameter.parameterPath;\n    const parameterMapper = parameter.mapper;\n    let value;\n    if (typeof parameterPath === \"string\") {\n        parameterPath = [parameterPath];\n    }\n    if (Array.isArray(parameterPath)) {\n        if (parameterPath.length > 0) {\n            if (parameterMapper.isConstant) {\n                value = parameterMapper.defaultValue;\n            }\n            else {\n                let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath);\n                if (!propertySearchResult.propertyFound && fallbackObject) {\n                    propertySearchResult = getPropertyFromParameterPath(fallbackObject, parameterPath);\n                }\n                let useDefaultValue = false;\n                if (!propertySearchResult.propertyFound) {\n                    useDefaultValue =\n                        parameterMapper.required ||\n                            (parameterPath[0] === \"options\" && parameterPath.length === 2);\n                }\n                value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue;\n            }\n        }\n    }\n    else {\n        if (parameterMapper.required) {\n            value = {};\n        }\n        for (const propertyName in parameterPath) {\n            const propertyMapper = parameterMapper.type.modelProperties[propertyName];\n            const propertyPath = parameterPath[propertyName];\n            const propertyValue = getOperationArgumentValueFromParameter(operationArguments, {\n                parameterPath: propertyPath,\n                mapper: propertyMapper,\n            }, fallbackObject);\n            if (propertyValue !== undefined) {\n                if (!value) {\n                    value = {};\n                }\n                value[propertyName] = propertyValue;\n            }\n        }\n    }\n    return value;\n}\nfunction getPropertyFromParameterPath(parent, parameterPath) {\n    const result = { propertyFound: false };\n    let i = 0;\n    for (; i < parameterPath.length; ++i) {\n        const parameterPathPart = parameterPath[i];\n        // Make sure to check inherited properties too, so don't use hasOwnProperty().\n        if (parent && parameterPathPart in parent) {\n            parent = parent[parameterPathPart];\n        }\n        else {\n            break;\n        }\n    }\n    if (i === parameterPath.length) {\n        result.propertyValue = parent;\n        result.propertyFound = true;\n    }\n    return result;\n}\nconst originalRequestSymbol = Symbol.for(\"@azure/core-client original request\");\nfunction hasOriginalRequest(request) {\n    return originalRequestSymbol in request;\n}\nexport function getOperationRequestInfo(request) {\n    if (hasOriginalRequest(request)) {\n        return getOperationRequestInfo(request[originalRequestSymbol]);\n    }\n    let info = state.operationRequestMap.get(request);\n    if (!info) {\n        info = {};\n        state.operationRequestMap.set(request, info);\n    }\n    return info;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { XML_CHARKEY } from \"./interfaces.js\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport { MapperTypeNames } from \"./serializer.js\";\nimport { getOperationRequestInfo } from \"./operationHelpers.js\";\nconst defaultJsonContentTypes = [\"application/json\", \"text/json\"];\nconst defaultXmlContentTypes = [\"application/xml\", \"application/atom+xml\"];\n/**\n * The programmatic identifier of the deserializationPolicy.\n */\nexport const deserializationPolicyName = \"deserializationPolicy\";\n/**\n * This policy handles parsing out responses according to OperationSpecs on the request.\n */\nexport function deserializationPolicy(options = {}) {\n    var _a, _b, _c, _d, _e, _f, _g;\n    const jsonContentTypes = (_b = (_a = options.expectedContentTypes) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : defaultJsonContentTypes;\n    const xmlContentTypes = (_d = (_c = options.expectedContentTypes) === null || _c === void 0 ? void 0 : _c.xml) !== null && _d !== void 0 ? _d : defaultXmlContentTypes;\n    const parseXML = options.parseXML;\n    const serializerOptions = options.serializerOptions;\n    const updatedOptions = {\n        xml: {\n            rootName: (_e = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _e !== void 0 ? _e : \"\",\n            includeRoot: (_f = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _f !== void 0 ? _f : false,\n            xmlCharKey: (_g = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _g !== void 0 ? _g : XML_CHARKEY,\n        },\n    };\n    return {\n        name: deserializationPolicyName,\n        async sendRequest(request, next) {\n            const response = await next(request);\n            return deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, updatedOptions, parseXML);\n        },\n    };\n}\nfunction getOperationResponseMap(parsedResponse) {\n    let result;\n    const request = parsedResponse.request;\n    const operationInfo = getOperationRequestInfo(request);\n    const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec;\n    if (operationSpec) {\n        if (!(operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter)) {\n            result = operationSpec.responses[parsedResponse.status];\n        }\n        else {\n            result = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationResponseGetter(operationSpec, parsedResponse);\n        }\n    }\n    return result;\n}\nfunction shouldDeserializeResponse(parsedResponse) {\n    const request = parsedResponse.request;\n    const operationInfo = getOperationRequestInfo(request);\n    const shouldDeserialize = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.shouldDeserialize;\n    let result;\n    if (shouldDeserialize === undefined) {\n        result = true;\n    }\n    else if (typeof shouldDeserialize === \"boolean\") {\n        result = shouldDeserialize;\n    }\n    else {\n        result = shouldDeserialize(parsedResponse);\n    }\n    return result;\n}\nasync function deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options, parseXML) {\n    const parsedResponse = await parse(jsonContentTypes, xmlContentTypes, response, options, parseXML);\n    if (!shouldDeserializeResponse(parsedResponse)) {\n        return parsedResponse;\n    }\n    const operationInfo = getOperationRequestInfo(parsedResponse.request);\n    const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec;\n    if (!operationSpec || !operationSpec.responses) {\n        return parsedResponse;\n    }\n    const responseSpec = getOperationResponseMap(parsedResponse);\n    const { error, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options);\n    if (error) {\n        throw error;\n    }\n    else if (shouldReturnResponse) {\n        return parsedResponse;\n    }\n    // An operation response spec does exist for current status code, so\n    // use it to deserialize the response.\n    if (responseSpec) {\n        if (responseSpec.bodyMapper) {\n            let valueToDeserialize = parsedResponse.parsedBody;\n            if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperTypeNames.Sequence) {\n                valueToDeserialize =\n                    typeof valueToDeserialize === \"object\"\n                        ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName]\n                        : [];\n            }\n            try {\n                parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, \"operationRes.parsedBody\", options);\n            }\n            catch (deserializeError) {\n                const restError = new RestError(`Error ${deserializeError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, {\n                    statusCode: parsedResponse.status,\n                    request: parsedResponse.request,\n                    response: parsedResponse,\n                });\n                throw restError;\n            }\n        }\n        else if (operationSpec.httpMethod === \"HEAD\") {\n            // head methods never have a body, but we return a boolean to indicate presence/absence of the resource\n            parsedResponse.parsedBody = response.status >= 200 && response.status < 300;\n        }\n        if (responseSpec.headersMapper) {\n            parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJSON(), \"operationRes.parsedHeaders\", { xml: {}, ignoreUnknownProperties: true });\n        }\n    }\n    return parsedResponse;\n}\nfunction isOperationSpecEmpty(operationSpec) {\n    const expectedStatusCodes = Object.keys(operationSpec.responses);\n    return (expectedStatusCodes.length === 0 ||\n        (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === \"default\"));\n}\nfunction handleErrorResponse(parsedResponse, operationSpec, responseSpec, options) {\n    var _a, _b, _c, _d, _e;\n    const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300;\n    const isExpectedStatusCode = isOperationSpecEmpty(operationSpec)\n        ? isSuccessByStatus\n        : !!responseSpec;\n    if (isExpectedStatusCode) {\n        if (responseSpec) {\n            if (!responseSpec.isError) {\n                return { error: null, shouldReturnResponse: false };\n            }\n        }\n        else {\n            return { error: null, shouldReturnResponse: false };\n        }\n    }\n    const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default;\n    const initialErrorMessage = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status))\n        ? `Unexpected status code: ${parsedResponse.status}`\n        : parsedResponse.bodyAsText;\n    const error = new RestError(initialErrorMessage, {\n        statusCode: parsedResponse.status,\n        request: parsedResponse.request,\n        response: parsedResponse,\n    });\n    // If the item failed but there's no error spec or default spec to deserialize the error,\n    // and the parsed body doesn't look like an error object,\n    // we should fail so we just throw the parsed response\n    if (!errorResponseSpec &&\n        !(((_c = (_b = parsedResponse.parsedBody) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.code) && ((_e = (_d = parsedResponse.parsedBody) === null || _d === void 0 ? void 0 : _d.error) === null || _e === void 0 ? void 0 : _e.message))) {\n        throw error;\n    }\n    const defaultBodyMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.bodyMapper;\n    const defaultHeadersMapper = errorResponseSpec === null || errorResponseSpec === void 0 ? void 0 : errorResponseSpec.headersMapper;\n    try {\n        // If error response has a body, try to deserialize it using default body mapper.\n        // Then try to extract error code & message from it\n        if (parsedResponse.parsedBody) {\n            const parsedBody = parsedResponse.parsedBody;\n            let deserializedError;\n            if (defaultBodyMapper) {\n                let valueToDeserialize = parsedBody;\n                if (operationSpec.isXML && defaultBodyMapper.type.name === MapperTypeNames.Sequence) {\n                    valueToDeserialize = [];\n                    const elementName = defaultBodyMapper.xmlElementName;\n                    if (typeof parsedBody === \"object\" && elementName) {\n                        valueToDeserialize = parsedBody[elementName];\n                    }\n                }\n                deserializedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, \"error.response.parsedBody\", options);\n            }\n            const internalError = parsedBody.error || deserializedError || parsedBody;\n            error.code = internalError.code;\n            if (internalError.message) {\n                error.message = internalError.message;\n            }\n            if (defaultBodyMapper) {\n                error.response.parsedBody = deserializedError;\n            }\n        }\n        // If error response has headers, try to deserialize it using default header mapper\n        if (parsedResponse.headers && defaultHeadersMapper) {\n            error.response.parsedHeaders =\n                operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJSON(), \"operationRes.parsedHeaders\");\n        }\n    }\n    catch (defaultError) {\n        error.message = `Error \"${defaultError.message}\" occurred in deserializing the responseBody - \"${parsedResponse.bodyAsText}\" for the default response.`;\n    }\n    return { error, shouldReturnResponse: false };\n}\nasync function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML) {\n    var _a;\n    if (!((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) &&\n        operationResponse.bodyAsText) {\n        const text = operationResponse.bodyAsText;\n        const contentType = operationResponse.headers.get(\"Content-Type\") || \"\";\n        const contentComponents = !contentType\n            ? []\n            : contentType.split(\";\").map((component) => component.toLowerCase());\n        try {\n            if (contentComponents.length === 0 ||\n                contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) {\n                operationResponse.parsedBody = JSON.parse(text);\n                return operationResponse;\n            }\n            else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) {\n                if (!parseXML) {\n                    throw new Error(\"Parsing XML not supported.\");\n                }\n                const body = await parseXML(text, opts.xml);\n                operationResponse.parsedBody = body;\n                return operationResponse;\n            }\n        }\n        catch (err) {\n            const msg = `Error \"${err}\" occurred while parsing the response body - ${operationResponse.bodyAsText}.`;\n            const errCode = err.code || RestError.PARSE_ERROR;\n            const e = new RestError(msg, {\n                code: errCode,\n                statusCode: operationResponse.status,\n                request: operationResponse.request,\n                response: operationResponse,\n            });\n            throw e;\n        }\n    }\n    return operationResponse;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { MapperTypeNames } from \"./serializer.js\";\n/**\n * Gets the list of status codes for streaming responses.\n * @internal\n */\nexport function getStreamingResponseStatusCodes(operationSpec) {\n    const result = new Set();\n    for (const statusCode in operationSpec.responses) {\n        const operationResponse = operationSpec.responses[statusCode];\n        if (operationResponse.bodyMapper &&\n            operationResponse.bodyMapper.type.name === MapperTypeNames.Stream) {\n            result.add(Number(statusCode));\n        }\n    }\n    return result;\n}\n/**\n * Get the path to this parameter's value as a dotted string (a.b.c).\n * @param parameter - The parameter to get the path string for.\n * @returns The path to this parameter's value as a dotted string.\n * @internal\n */\nexport function getPathStringFromParameter(parameter) {\n    const { parameterPath, mapper } = parameter;\n    let result;\n    if (typeof parameterPath === \"string\") {\n        result = parameterPath;\n    }\n    else if (Array.isArray(parameterPath)) {\n        result = parameterPath.join(\".\");\n    }\n    else {\n        result = mapper.serializedName;\n    }\n    return result;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createDefaultHttpClient } from \"@azure/core-rest-pipeline\";\nlet cachedHttpClient;\nexport function getCachedDefaultHttpClient() {\n    if (!cachedHttpClient) {\n        cachedHttpClient = createDefaultHttpClient();\n    }\n    return cachedHttpClient;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getOperationArgumentValueFromParameter } from \"./operationHelpers.js\";\nimport { getPathStringFromParameter } from \"./interfaceHelpers.js\";\nconst CollectionFormatToDelimiterMap = {\n    CSV: \",\",\n    SSV: \" \",\n    Multi: \"Multi\",\n    TSV: \"\\t\",\n    Pipes: \"|\",\n};\nexport function getRequestUrl(baseUri, operationSpec, operationArguments, fallbackObject) {\n    const urlReplacements = calculateUrlReplacements(operationSpec, operationArguments, fallbackObject);\n    let isAbsolutePath = false;\n    let requestUrl = replaceAll(baseUri, urlReplacements);\n    if (operationSpec.path) {\n        let path = replaceAll(operationSpec.path, urlReplacements);\n        // QUIRK: sometimes we get a path component like /{nextLink}\n        // which may be a fully formed URL with a leading /. In that case, we should\n        // remove the leading /\n        if (operationSpec.path === \"/{nextLink}\" && path.startsWith(\"/\")) {\n            path = path.substring(1);\n        }\n        // QUIRK: sometimes we get a path component like {nextLink}\n        // which may be a fully formed URL. In that case, we should\n        // ignore the baseUri.\n        if (isAbsoluteUrl(path)) {\n            requestUrl = path;\n            isAbsolutePath = true;\n        }\n        else {\n            requestUrl = appendPath(requestUrl, path);\n        }\n    }\n    const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject);\n    /**\n     * Notice that this call sets the `noOverwrite` parameter to true if the `requestUrl`\n     * is an absolute path. This ensures that existing query parameter values in `requestUrl`\n     * do not get overwritten. On the other hand when `requestUrl` is not absolute path, it\n     * is still being built so there is nothing to overwrite.\n     */\n    requestUrl = appendQueryParams(requestUrl, queryParams, sequenceParams, isAbsolutePath);\n    return requestUrl;\n}\nfunction replaceAll(input, replacements) {\n    let result = input;\n    for (const [searchValue, replaceValue] of replacements) {\n        result = result.split(searchValue).join(replaceValue);\n    }\n    return result;\n}\nfunction calculateUrlReplacements(operationSpec, operationArguments, fallbackObject) {\n    var _a;\n    const result = new Map();\n    if ((_a = operationSpec.urlParameters) === null || _a === void 0 ? void 0 : _a.length) {\n        for (const urlParameter of operationSpec.urlParameters) {\n            let urlParameterValue = getOperationArgumentValueFromParameter(operationArguments, urlParameter, fallbackObject);\n            const parameterPathString = getPathStringFromParameter(urlParameter);\n            urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, parameterPathString);\n            if (!urlParameter.skipEncoding) {\n                urlParameterValue = encodeURIComponent(urlParameterValue);\n            }\n            result.set(`{${urlParameter.mapper.serializedName || parameterPathString}}`, urlParameterValue);\n        }\n    }\n    return result;\n}\nfunction isAbsoluteUrl(url) {\n    return url.includes(\"://\");\n}\nfunction appendPath(url, pathToAppend) {\n    if (!pathToAppend) {\n        return url;\n    }\n    const parsedUrl = new URL(url);\n    let newPath = parsedUrl.pathname;\n    if (!newPath.endsWith(\"/\")) {\n        newPath = `${newPath}/`;\n    }\n    if (pathToAppend.startsWith(\"/\")) {\n        pathToAppend = pathToAppend.substring(1);\n    }\n    const searchStart = pathToAppend.indexOf(\"?\");\n    if (searchStart !== -1) {\n        const path = pathToAppend.substring(0, searchStart);\n        const search = pathToAppend.substring(searchStart + 1);\n        newPath = newPath + path;\n        if (search) {\n            parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search;\n        }\n    }\n    else {\n        newPath = newPath + pathToAppend;\n    }\n    parsedUrl.pathname = newPath;\n    return parsedUrl.toString();\n}\nfunction calculateQueryParameters(operationSpec, operationArguments, fallbackObject) {\n    var _a;\n    const result = new Map();\n    const sequenceParams = new Set();\n    if ((_a = operationSpec.queryParameters) === null || _a === void 0 ? void 0 : _a.length) {\n        for (const queryParameter of operationSpec.queryParameters) {\n            if (queryParameter.mapper.type.name === \"Sequence\" && queryParameter.mapper.serializedName) {\n                sequenceParams.add(queryParameter.mapper.serializedName);\n            }\n            let queryParameterValue = getOperationArgumentValueFromParameter(operationArguments, queryParameter, fallbackObject);\n            if ((queryParameterValue !== undefined && queryParameterValue !== null) ||\n                queryParameter.mapper.required) {\n                queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter));\n                const delimiter = queryParameter.collectionFormat\n                    ? CollectionFormatToDelimiterMap[queryParameter.collectionFormat]\n                    : \"\";\n                if (Array.isArray(queryParameterValue)) {\n                    // replace null and undefined\n                    queryParameterValue = queryParameterValue.map((item) => {\n                        if (item === null || item === undefined) {\n                            return \"\";\n                        }\n                        return item;\n                    });\n                }\n                if (queryParameter.collectionFormat === \"Multi\" && queryParameterValue.length === 0) {\n                    continue;\n                }\n                else if (Array.isArray(queryParameterValue) &&\n                    (queryParameter.collectionFormat === \"SSV\" || queryParameter.collectionFormat === \"TSV\")) {\n                    queryParameterValue = queryParameterValue.join(delimiter);\n                }\n                if (!queryParameter.skipEncoding) {\n                    if (Array.isArray(queryParameterValue)) {\n                        queryParameterValue = queryParameterValue.map((item) => {\n                            return encodeURIComponent(item);\n                        });\n                    }\n                    else {\n                        queryParameterValue = encodeURIComponent(queryParameterValue);\n                    }\n                }\n                // Join pipes and CSV *after* encoding, or the server will be upset.\n                if (Array.isArray(queryParameterValue) &&\n                    (queryParameter.collectionFormat === \"CSV\" || queryParameter.collectionFormat === \"Pipes\")) {\n                    queryParameterValue = queryParameterValue.join(delimiter);\n                }\n                result.set(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue);\n            }\n        }\n    }\n    return {\n        queryParams: result,\n        sequenceParams,\n    };\n}\nfunction simpleParseQueryParams(queryString) {\n    const result = new Map();\n    if (!queryString || queryString[0] !== \"?\") {\n        return result;\n    }\n    // remove the leading ?\n    queryString = queryString.slice(1);\n    const pairs = queryString.split(\"&\");\n    for (const pair of pairs) {\n        const [name, value] = pair.split(\"=\", 2);\n        const existingValue = result.get(name);\n        if (existingValue) {\n            if (Array.isArray(existingValue)) {\n                existingValue.push(value);\n            }\n            else {\n                result.set(name, [existingValue, value]);\n            }\n        }\n        else {\n            result.set(name, value);\n        }\n    }\n    return result;\n}\n/** @internal */\nexport function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) {\n    if (queryParams.size === 0) {\n        return url;\n    }\n    const parsedUrl = new URL(url);\n    // QUIRK: parsedUrl.searchParams will have their name/value pairs decoded, which\n    // can change their meaning to the server, such as in the case of a SAS signature.\n    // To avoid accidentally un-encoding a query param, we parse the key/values ourselves\n    const combinedParams = simpleParseQueryParams(parsedUrl.search);\n    for (const [name, value] of queryParams) {\n        const existingValue = combinedParams.get(name);\n        if (Array.isArray(existingValue)) {\n            if (Array.isArray(value)) {\n                existingValue.push(...value);\n                const valueSet = new Set(existingValue);\n                combinedParams.set(name, Array.from(valueSet));\n            }\n            else {\n                existingValue.push(value);\n            }\n        }\n        else if (existingValue) {\n            if (Array.isArray(value)) {\n                value.unshift(existingValue);\n            }\n            else if (sequenceParams.has(name)) {\n                combinedParams.set(name, [existingValue, value]);\n            }\n            if (!noOverwrite) {\n                combinedParams.set(name, value);\n            }\n        }\n        else {\n            combinedParams.set(name, value);\n        }\n    }\n    const searchPieces = [];\n    for (const [name, value] of combinedParams) {\n        if (typeof value === \"string\") {\n            searchPieces.push(`${name}=${value}`);\n        }\n        else if (Array.isArray(value)) {\n            // QUIRK: If we get an array of values, include multiple key/value pairs\n            for (const subValue of value) {\n                searchPieces.push(`${name}=${subValue}`);\n            }\n        }\n        else {\n            searchPieces.push(`${name}=${value}`);\n        }\n    }\n    // QUIRK: we have to set search manually as searchParams will encode comma when it shouldn't.\n    parsedUrl.search = searchPieces.length ? `?${searchPieces.join(\"&\")}` : \"\";\n    return parsedUrl.toString();\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"core-client\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createPipelineRequest } from \"@azure/core-rest-pipeline\";\nimport { createClientPipeline } from \"./pipeline.js\";\nimport { flattenResponse } from \"./utils.js\";\nimport { getCachedDefaultHttpClient } from \"./httpClientCache.js\";\nimport { getOperationRequestInfo } from \"./operationHelpers.js\";\nimport { getRequestUrl } from \"./urlHelpers.js\";\nimport { getStreamingResponseStatusCodes } from \"./interfaceHelpers.js\";\nimport { logger } from \"./log.js\";\n/**\n * Initializes a new instance of the ServiceClient.\n */\nexport class ServiceClient {\n    /**\n     * The ServiceClient constructor\n     * @param options - The service client options that govern the behavior of the client.\n     */\n    constructor(options = {}) {\n        var _a, _b;\n        this._requestContentType = options.requestContentType;\n        this._endpoint = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri;\n        if (options.baseUri) {\n            logger.warning(\"The baseUri option for SDK Clients has been deprecated, please use endpoint instead.\");\n        }\n        this._allowInsecureConnection = options.allowInsecureConnection;\n        this._httpClient = options.httpClient || getCachedDefaultHttpClient();\n        this.pipeline = options.pipeline || createDefaultPipeline(options);\n        if ((_b = options.additionalPolicies) === null || _b === void 0 ? void 0 : _b.length) {\n            for (const { policy, position } of options.additionalPolicies) {\n                // Sign happens after Retry and is commonly needed to occur\n                // before policies that intercept post-retry.\n                const afterPhase = position === \"perRetry\" ? \"Sign\" : undefined;\n                this.pipeline.addPolicy(policy, {\n                    afterPhase,\n                });\n            }\n        }\n    }\n    /**\n     * Send the provided httpRequest.\n     */\n    async sendRequest(request) {\n        return this.pipeline.sendRequest(this._httpClient, request);\n    }\n    /**\n     * Send an HTTP request that is populated using the provided OperationSpec.\n     * @typeParam T - The typed result of the request, based on the OperationSpec.\n     * @param operationArguments - The arguments that the HTTP request's templated values will be populated from.\n     * @param operationSpec - The OperationSpec to use to populate the httpRequest.\n     */\n    async sendOperationRequest(operationArguments, operationSpec) {\n        const endpoint = operationSpec.baseUrl || this._endpoint;\n        if (!endpoint) {\n            throw new Error(\"If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.\");\n        }\n        // Templatized URLs sometimes reference properties on the ServiceClient child class,\n        // so we have to pass `this` below in order to search these properties if they're\n        // not part of OperationArguments\n        const url = getRequestUrl(endpoint, operationSpec, operationArguments, this);\n        const request = createPipelineRequest({\n            url,\n        });\n        request.method = operationSpec.httpMethod;\n        const operationInfo = getOperationRequestInfo(request);\n        operationInfo.operationSpec = operationSpec;\n        operationInfo.operationArguments = operationArguments;\n        const contentType = operationSpec.contentType || this._requestContentType;\n        if (contentType && operationSpec.requestBody) {\n            request.headers.set(\"Content-Type\", contentType);\n        }\n        const options = operationArguments.options;\n        if (options) {\n            const requestOptions = options.requestOptions;\n            if (requestOptions) {\n                if (requestOptions.timeout) {\n                    request.timeout = requestOptions.timeout;\n                }\n                if (requestOptions.onUploadProgress) {\n                    request.onUploadProgress = requestOptions.onUploadProgress;\n                }\n                if (requestOptions.onDownloadProgress) {\n                    request.onDownloadProgress = requestOptions.onDownloadProgress;\n                }\n                if (requestOptions.shouldDeserialize !== undefined) {\n                    operationInfo.shouldDeserialize = requestOptions.shouldDeserialize;\n                }\n                if (requestOptions.allowInsecureConnection) {\n                    request.allowInsecureConnection = true;\n                }\n            }\n            if (options.abortSignal) {\n                request.abortSignal = options.abortSignal;\n            }\n            if (options.tracingOptions) {\n                request.tracingOptions = options.tracingOptions;\n            }\n        }\n        if (this._allowInsecureConnection) {\n            request.allowInsecureConnection = true;\n        }\n        if (request.streamResponseStatusCodes === undefined) {\n            request.streamResponseStatusCodes = getStreamingResponseStatusCodes(operationSpec);\n        }\n        try {\n            const rawResponse = await this.sendRequest(request);\n            const flatResponse = flattenResponse(rawResponse, operationSpec.responses[rawResponse.status]);\n            if (options === null || options === void 0 ? void 0 : options.onResponse) {\n                options.onResponse(rawResponse, flatResponse);\n            }\n            return flatResponse;\n        }\n        catch (error) {\n            if (typeof error === \"object\" && (error === null || error === void 0 ? void 0 : error.response)) {\n                const rawResponse = error.response;\n                const flatResponse = flattenResponse(rawResponse, operationSpec.responses[error.statusCode] || operationSpec.responses[\"default\"]);\n                error.details = flatResponse;\n                if (options === null || options === void 0 ? void 0 : options.onResponse) {\n                    options.onResponse(rawResponse, flatResponse, error);\n                }\n            }\n            throw error;\n        }\n    }\n}\nfunction createDefaultPipeline(options) {\n    const credentialScopes = getCredentialScopes(options);\n    const credentialOptions = options.credential && credentialScopes\n        ? { credentialScopes, credential: options.credential }\n        : undefined;\n    return createClientPipeline(Object.assign(Object.assign({}, options), { credentialOptions }));\n}\nfunction getCredentialScopes(options) {\n    if (options.credentialScopes) {\n        return options.credentialScopes;\n    }\n    if (options.endpoint) {\n        return `${options.endpoint}/.default`;\n    }\n    if (options.baseUri) {\n        return `${options.baseUri}/.default`;\n    }\n    if (options.credential && !options.credentialScopes) {\n        throw new Error(`When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy`);\n    }\n    return undefined;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createFetchHttpClient } from \"./fetchHttpClient.js\";\n/**\n * Create the correct HttpClient for the current environment.\n */\nexport function createDefaultHttpClient() {\n    return createFetchHttpClient();\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { deserializationPolicy } from \"./deserializationPolicy.js\";\nimport { bearerTokenAuthenticationPolicy, createPipelineFromOptions, } from \"@azure/core-rest-pipeline\";\nimport { serializationPolicy } from \"./serializationPolicy.js\";\n/**\n * Creates a new Pipeline for use with a Service Client.\n * Adds in deserializationPolicy by default.\n * Also adds in bearerTokenAuthenticationPolicy if passed a TokenCredential.\n * @param options - Options to customize the created pipeline.\n */\nexport function createClientPipeline(options = {}) {\n    const pipeline = createPipelineFromOptions(options !== null && options !== void 0 ? options : {});\n    if (options.credentialOptions) {\n        pipeline.addPolicy(bearerTokenAuthenticationPolicy({\n            credential: options.credentialOptions.credential,\n            scopes: options.credentialOptions.credentialScopes,\n        }));\n    }\n    pipeline.addPolicy(serializationPolicy(options.serializationOptions), { phase: \"Serialize\" });\n    pipeline.addPolicy(deserializationPolicy(options.deserializationOptions), {\n        phase: \"Deserialize\",\n    });\n    return pipeline;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { XML_ATTRKEY, XML_CHARKEY } from \"./interfaces.js\";\nimport { getOperationArgumentValueFromParameter, getOperationRequestInfo, } from \"./operationHelpers.js\";\nimport { MapperTypeNames } from \"./serializer.js\";\nimport { getPathStringFromParameter } from \"./interfaceHelpers.js\";\n/**\n * The programmatic identifier of the serializationPolicy.\n */\nexport const serializationPolicyName = \"serializationPolicy\";\n/**\n * This policy handles assembling the request body and headers using\n * an OperationSpec and OperationArguments on the request.\n */\nexport function serializationPolicy(options = {}) {\n    const stringifyXML = options.stringifyXML;\n    return {\n        name: serializationPolicyName,\n        async sendRequest(request, next) {\n            const operationInfo = getOperationRequestInfo(request);\n            const operationSpec = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationSpec;\n            const operationArguments = operationInfo === null || operationInfo === void 0 ? void 0 : operationInfo.operationArguments;\n            if (operationSpec && operationArguments) {\n                serializeHeaders(request, operationArguments, operationSpec);\n                serializeRequestBody(request, operationArguments, operationSpec, stringifyXML);\n            }\n            return next(request);\n        },\n    };\n}\n/**\n * @internal\n */\nexport function serializeHeaders(request, operationArguments, operationSpec) {\n    var _a, _b;\n    if (operationSpec.headerParameters) {\n        for (const headerParameter of operationSpec.headerParameters) {\n            let headerValue = getOperationArgumentValueFromParameter(operationArguments, headerParameter);\n            if ((headerValue !== null && headerValue !== undefined) || headerParameter.mapper.required) {\n                headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter));\n                const headerCollectionPrefix = headerParameter.mapper\n                    .headerCollectionPrefix;\n                if (headerCollectionPrefix) {\n                    for (const key of Object.keys(headerValue)) {\n                        request.headers.set(headerCollectionPrefix + key, headerValue[key]);\n                    }\n                }\n                else {\n                    request.headers.set(headerParameter.mapper.serializedName || getPathStringFromParameter(headerParameter), headerValue);\n                }\n            }\n        }\n    }\n    const customHeaders = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.requestOptions) === null || _b === void 0 ? void 0 : _b.customHeaders;\n    if (customHeaders) {\n        for (const customHeaderName of Object.keys(customHeaders)) {\n            request.headers.set(customHeaderName, customHeaders[customHeaderName]);\n        }\n    }\n}\n/**\n * @internal\n */\nexport function serializeRequestBody(request, operationArguments, operationSpec, stringifyXML = function () {\n    throw new Error(\"XML serialization unsupported!\");\n}) {\n    var _a, _b, _c, _d, _e;\n    const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions;\n    const updatedOptions = {\n        xml: {\n            rootName: (_b = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.rootName) !== null && _b !== void 0 ? _b : \"\",\n            includeRoot: (_c = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.includeRoot) !== null && _c !== void 0 ? _c : false,\n            xmlCharKey: (_d = serializerOptions === null || serializerOptions === void 0 ? void 0 : serializerOptions.xml.xmlCharKey) !== null && _d !== void 0 ? _d : XML_CHARKEY,\n        },\n    };\n    const xmlCharKey = updatedOptions.xml.xmlCharKey;\n    if (operationSpec.requestBody && operationSpec.requestBody.mapper) {\n        request.body = getOperationArgumentValueFromParameter(operationArguments, operationSpec.requestBody);\n        const bodyMapper = operationSpec.requestBody.mapper;\n        const { required, serializedName, xmlName, xmlElementName, xmlNamespace, xmlNamespacePrefix, nullable, } = bodyMapper;\n        const typeName = bodyMapper.type.name;\n        try {\n            if ((request.body !== undefined && request.body !== null) ||\n                (nullable && request.body === null) ||\n                required) {\n                const requestBodyParameterPathString = getPathStringFromParameter(operationSpec.requestBody);\n                request.body = operationSpec.serializer.serialize(bodyMapper, request.body, requestBodyParameterPathString, updatedOptions);\n                const isStream = typeName === MapperTypeNames.Stream;\n                if (operationSpec.isXML) {\n                    const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : \"xmlns\";\n                    const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, request.body, updatedOptions);\n                    if (typeName === MapperTypeNames.Sequence) {\n                        request.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), { rootName: xmlName || serializedName, xmlCharKey });\n                    }\n                    else if (!isStream) {\n                        request.body = stringifyXML(value, {\n                            rootName: xmlName || serializedName,\n                            xmlCharKey,\n                        });\n                    }\n                }\n                else if (typeName === MapperTypeNames.String &&\n                    (((_e = operationSpec.contentType) === null || _e === void 0 ? void 0 : _e.match(\"text/plain\")) || operationSpec.mediaType === \"text\")) {\n                    // the String serializer has validated that request body is a string\n                    // so just send the string.\n                    return;\n                }\n                else if (!isStream) {\n                    request.body = JSON.stringify(request.body);\n                }\n            }\n        }\n        catch (error) {\n            throw new Error(`Error \"${error.message}\" occurred in serializing the payload - ${JSON.stringify(serializedName, undefined, \"  \")}.`);\n        }\n    }\n    else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) {\n        request.formData = {};\n        for (const formDataParameter of operationSpec.formDataParameters) {\n            const formDataParameterValue = getOperationArgumentValueFromParameter(operationArguments, formDataParameter);\n            if (formDataParameterValue !== undefined && formDataParameterValue !== null) {\n                const formDataParameterPropertyName = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter);\n                request.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter), updatedOptions);\n            }\n        }\n    }\n}\n/**\n * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself\n */\nfunction getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) {\n    // Composite and Sequence schemas already got their root namespace set during serialization\n    // We just need to add xmlns to the other schema types\n    if (xmlNamespace && ![\"Composite\", \"Sequence\", \"Dictionary\"].includes(typeName)) {\n        const result = {};\n        result[options.xml.xmlCharKey] = serializedValue;\n        result[XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace };\n        return result;\n    }\n    return serializedValue;\n}\nfunction prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) {\n    if (!Array.isArray(obj)) {\n        obj = [obj];\n    }\n    if (!xmlNamespaceKey || !xmlNamespace) {\n        return { [elementName]: obj };\n    }\n    const result = { [elementName]: obj };\n    result[XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace };\n    return result;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nexport const disableKeepAlivePolicyName = \"DisableKeepAlivePolicy\";\nexport function createDisableKeepAlivePolicy() {\n    return {\n        name: disableKeepAlivePolicyName,\n        async sendRequest(request, next) {\n            request.disableKeepAlive = true;\n            return next(request);\n        },\n    };\n}\n/**\n * @internal\n */\nexport function pipelineContainsDisableKeepAlivePolicy(pipeline) {\n    return pipeline.getOrderedPolicies().some((policy) => policy.name === disableKeepAlivePolicyName);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createHttpHeaders, createPipelineRequest } from \"@azure/core-rest-pipeline\";\n// We use a custom symbol to cache a reference to the original request without\n// exposing it on the public interface.\nconst originalRequestSymbol = Symbol(\"Original PipelineRequest\");\n// Symbol.for() will return the same symbol if it's already been created\n// This particular one is used in core-client to handle the case of when a request is\n// cloned but we need to retrieve the OperationSpec and OperationArguments from the\n// original request.\nconst originalClientRequestSymbol = Symbol.for(\"@azure/core-client original request\");\nexport function toPipelineRequest(webResource, options = {}) {\n    const compatWebResource = webResource;\n    const request = compatWebResource[originalRequestSymbol];\n    const headers = createHttpHeaders(webResource.headers.toJson({ preserveCase: true }));\n    if (request) {\n        request.headers = headers;\n        return request;\n    }\n    else {\n        const newRequest = createPipelineRequest({\n            url: webResource.url,\n            method: webResource.method,\n            headers,\n            withCredentials: webResource.withCredentials,\n            timeout: webResource.timeout,\n            requestId: webResource.requestId,\n            abortSignal: webResource.abortSignal,\n            body: webResource.body,\n            formData: webResource.formData,\n            disableKeepAlive: !!webResource.keepAlive,\n            onDownloadProgress: webResource.onDownloadProgress,\n            onUploadProgress: webResource.onUploadProgress,\n            proxySettings: webResource.proxySettings,\n            streamResponseStatusCodes: webResource.streamResponseStatusCodes,\n            agent: webResource.agent,\n        });\n        if (options.originalRequest) {\n            newRequest[originalClientRequestSymbol] =\n                options.originalRequest;\n        }\n        return newRequest;\n    }\n}\nexport function toWebResourceLike(request, options) {\n    var _a;\n    const originalRequest = (_a = options === null || options === void 0 ? void 0 : options.originalRequest) !== null && _a !== void 0 ? _a : request;\n    const webResource = {\n        url: request.url,\n        method: request.method,\n        headers: toHttpHeadersLike(request.headers),\n        withCredentials: request.withCredentials,\n        timeout: request.timeout,\n        requestId: request.headers.get(\"x-ms-client-request-id\") || request.requestId,\n        abortSignal: request.abortSignal,\n        body: request.body,\n        formData: request.formData,\n        keepAlive: !!request.disableKeepAlive,\n        onDownloadProgress: request.onDownloadProgress,\n        onUploadProgress: request.onUploadProgress,\n        proxySettings: request.proxySettings,\n        streamResponseStatusCodes: request.streamResponseStatusCodes,\n        agent: request.agent,\n        clone() {\n            throw new Error(\"Cannot clone a non-proxied WebResourceLike\");\n        },\n        prepare() {\n            throw new Error(\"WebResourceLike.prepare() is not supported by @azure/core-http-compat\");\n        },\n        validateRequestProperties() {\n            /** do nothing */\n        },\n    };\n    if (options === null || options === void 0 ? void 0 : options.createProxy) {\n        return new Proxy(webResource, {\n            get(target, prop, receiver) {\n                if (prop === originalRequestSymbol) {\n                    return request;\n                }\n                else if (prop === \"clone\") {\n                    return () => {\n                        return toWebResourceLike(toPipelineRequest(webResource, { originalRequest }), {\n                            createProxy: true,\n                            originalRequest,\n                        });\n                    };\n                }\n                return Reflect.get(target, prop, receiver);\n            },\n            set(target, prop, value, receiver) {\n                if (prop === \"keepAlive\") {\n                    request.disableKeepAlive = !value;\n                }\n                const passThroughProps = [\n                    \"url\",\n                    \"method\",\n                    \"withCredentials\",\n                    \"timeout\",\n                    \"requestId\",\n                    \"abortSignal\",\n                    \"body\",\n                    \"formData\",\n                    \"onDownloadProgress\",\n                    \"onUploadProgress\",\n                    \"proxySettings\",\n                    \"streamResponseStatusCodes\",\n                    \"agent\",\n                ];\n                if (typeof prop === \"string\" && passThroughProps.includes(prop)) {\n                    request[prop] = value;\n                }\n                return Reflect.set(target, prop, value, receiver);\n            },\n        });\n    }\n    else {\n        return webResource;\n    }\n}\n/**\n * Converts HttpHeaders from core-rest-pipeline to look like\n * HttpHeaders from core-http.\n * @param headers - HttpHeaders from core-rest-pipeline\n * @returns HttpHeaders as they looked in core-http\n */\nexport function toHttpHeadersLike(headers) {\n    return new HttpHeaders(headers.toJSON({ preserveCase: true }));\n}\n/**\n * A collection of HttpHeaders that can be sent with a HTTP request.\n */\nfunction getHeaderKey(headerName) {\n    return headerName.toLowerCase();\n}\n/**\n * A collection of HTTP header key/value pairs.\n */\nexport class HttpHeaders {\n    constructor(rawHeaders) {\n        this._headersMap = {};\n        if (rawHeaders) {\n            for (const headerName in rawHeaders) {\n                this.set(headerName, rawHeaders[headerName]);\n            }\n        }\n    }\n    /**\n     * Set a header in this collection with the provided name and value. The name is\n     * case-insensitive.\n     * @param headerName - The name of the header to set. This value is case-insensitive.\n     * @param headerValue - The value of the header to set.\n     */\n    set(headerName, headerValue) {\n        this._headersMap[getHeaderKey(headerName)] = {\n            name: headerName,\n            value: headerValue.toString(),\n        };\n    }\n    /**\n     * Get the header value for the provided header name, or undefined if no header exists in this\n     * collection with the provided name.\n     * @param headerName - The name of the header.\n     */\n    get(headerName) {\n        const header = this._headersMap[getHeaderKey(headerName)];\n        return !header ? undefined : header.value;\n    }\n    /**\n     * Get whether or not this header collection contains a header entry for the provided header name.\n     */\n    contains(headerName) {\n        return !!this._headersMap[getHeaderKey(headerName)];\n    }\n    /**\n     * Remove the header with the provided headerName. Return whether or not the header existed and\n     * was removed.\n     * @param headerName - The name of the header to remove.\n     */\n    remove(headerName) {\n        const result = this.contains(headerName);\n        delete this._headersMap[getHeaderKey(headerName)];\n        return result;\n    }\n    /**\n     * Get the headers that are contained this collection as an object.\n     */\n    rawHeaders() {\n        return this.toJson({ preserveCase: true });\n    }\n    /**\n     * Get the headers that are contained in this collection as an array.\n     */\n    headersArray() {\n        const headers = [];\n        for (const headerKey in this._headersMap) {\n            headers.push(this._headersMap[headerKey]);\n        }\n        return headers;\n    }\n    /**\n     * Get the header names that are contained in this collection.\n     */\n    headerNames() {\n        const headerNames = [];\n        const headers = this.headersArray();\n        for (let i = 0; i < headers.length; ++i) {\n            headerNames.push(headers[i].name);\n        }\n        return headerNames;\n    }\n    /**\n     * Get the header values that are contained in this collection.\n     */\n    headerValues() {\n        const headerValues = [];\n        const headers = this.headersArray();\n        for (let i = 0; i < headers.length; ++i) {\n            headerValues.push(headers[i].value);\n        }\n        return headerValues;\n    }\n    /**\n     * Get the JSON object representation of this HTTP header collection.\n     */\n    toJson(options = {}) {\n        const result = {};\n        if (options.preserveCase) {\n            for (const headerKey in this._headersMap) {\n                const header = this._headersMap[headerKey];\n                result[header.name] = header.value;\n            }\n        }\n        else {\n            for (const headerKey in this._headersMap) {\n                const header = this._headersMap[headerKey];\n                result[getHeaderKey(header.name)] = header.value;\n            }\n        }\n        return result;\n    }\n    /**\n     * Get the string representation of this HTTP header collection.\n     */\n    toString() {\n        return JSON.stringify(this.toJson({ preserveCase: true }));\n    }\n    /**\n     * Create a deep clone/copy of this HttpHeaders collection.\n     */\n    clone() {\n        const resultPreservingCasing = {};\n        for (const headerKey in this._headersMap) {\n            const header = this._headersMap[headerKey];\n            resultPreservingCasing[header.name] = header.value;\n        }\n        return new HttpHeaders(resultPreservingCasing);\n    }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { toHttpHeadersLike, toPipelineRequest, toWebResourceLike } from \"./util.js\";\nconst originalResponse = Symbol(\"Original FullOperationResponse\");\n/**\n * A helper to convert response objects from the new pipeline back to the old one.\n * @param response - A response object from core-client.\n * @returns A response compatible with `HttpOperationResponse` from core-http.\n */\nexport function toCompatResponse(response, options) {\n    let request = toWebResourceLike(response.request);\n    let headers = toHttpHeadersLike(response.headers);\n    if (options === null || options === void 0 ? void 0 : options.createProxy) {\n        return new Proxy(response, {\n            get(target, prop, receiver) {\n                if (prop === \"headers\") {\n                    return headers;\n                }\n                else if (prop === \"request\") {\n                    return request;\n                }\n                else if (prop === originalResponse) {\n                    return response;\n                }\n                return Reflect.get(target, prop, receiver);\n            },\n            set(target, prop, value, receiver) {\n                if (prop === \"headers\") {\n                    headers = value;\n                }\n                else if (prop === \"request\") {\n                    request = value;\n                }\n                return Reflect.set(target, prop, value, receiver);\n            },\n        });\n    }\n    else {\n        return Object.assign(Object.assign({}, response), { request,\n            headers });\n    }\n}\n/**\n * A helper to convert back to a PipelineResponse\n * @param compatResponse - A response compatible with `HttpOperationResponse` from core-http.\n */\nexport function toPipelineResponse(compatResponse) {\n    const extendedCompatResponse = compatResponse;\n    const response = extendedCompatResponse[originalResponse];\n    const headers = createHttpHeaders(compatResponse.headers.toJson({ preserveCase: true }));\n    if (response) {\n        response.headers = headers;\n        return response;\n    }\n    else {\n        return Object.assign(Object.assign({}, compatResponse), { headers, request: toPipelineRequest(compatResponse.request) });\n    }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createDisableKeepAlivePolicy, pipelineContainsDisableKeepAlivePolicy, } from \"./policies/disableKeepAlivePolicy.js\";\nimport { redirectPolicyName } from \"@azure/core-rest-pipeline\";\nimport { ServiceClient } from \"@azure/core-client\";\nimport { toCompatResponse } from \"./response.js\";\n/**\n * Client to provide compatability between core V1 & V2.\n */\nexport class ExtendedServiceClient extends ServiceClient {\n    constructor(options) {\n        var _a, _b;\n        super(options);\n        if (((_a = options.keepAliveOptions) === null || _a === void 0 ? void 0 : _a.enable) === false &&\n            !pipelineContainsDisableKeepAlivePolicy(this.pipeline)) {\n            this.pipeline.addPolicy(createDisableKeepAlivePolicy());\n        }\n        if (((_b = options.redirectOptions) === null || _b === void 0 ? void 0 : _b.handleRedirects) === false) {\n            this.pipeline.removePolicy({\n                name: redirectPolicyName,\n            });\n        }\n    }\n    /**\n     * Compatible send operation request function.\n     *\n     * @param operationArguments - Operation arguments\n     * @param operationSpec - Operation Spec\n     * @returns\n     */\n    async sendOperationRequest(operationArguments, operationSpec) {\n        var _a;\n        const userProvidedCallBack = (_a = operationArguments === null || operationArguments === void 0 ? void 0 : operationArguments.options) === null || _a === void 0 ? void 0 : _a.onResponse;\n        let lastResponse;\n        function onResponse(rawResponse, flatResponse, error) {\n            lastResponse = rawResponse;\n            if (userProvidedCallBack) {\n                userProvidedCallBack(rawResponse, flatResponse, error);\n            }\n        }\n        operationArguments.options = Object.assign(Object.assign({}, operationArguments.options), { onResponse });\n        const result = await super.sendOperationRequest(operationArguments, operationSpec);\n        if (lastResponse) {\n            Object.defineProperty(result, \"_response\", {\n                value: toCompatResponse(lastResponse),\n            });\n        }\n        return result;\n    }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createClientLogger } from \"@azure/logger\";\n/**\n * The `@azure/logger` configuration for this package.\n * @internal\n */\nexport const logger = createClientLogger(\"core-lro\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * The default time interval to wait before sending the next polling request.\n */\nexport const POLL_INTERVAL_IN_MS = 2000;\n/**\n * The closed set of terminal states.\n */\nexport const terminalStates = [\"succeeded\", \"canceled\", \"failed\"];\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { logger } from \"../logger.js\";\nimport { terminalStates } from \"./constants.js\";\n/**\n * Deserializes the state\n */\nexport function deserializeState(serializedState) {\n    try {\n        return JSON.parse(serializedState).state;\n    }\n    catch (e) {\n        throw new Error(`Unable to deserialize input state: ${serializedState}`);\n    }\n}\nfunction setStateError(inputs) {\n    const { state, stateProxy, isOperationError } = inputs;\n    return (error) => {\n        if (isOperationError(error)) {\n            stateProxy.setError(state, error);\n            stateProxy.setFailed(state);\n        }\n        throw error;\n    };\n}\nfunction appendReadableErrorMessage(currentMessage, innerMessage) {\n    let message = currentMessage;\n    if (message.slice(-1) !== \".\") {\n        message = message + \".\";\n    }\n    return message + \" \" + innerMessage;\n}\nfunction simplifyError(err) {\n    let message = err.message;\n    let code = err.code;\n    let curErr = err;\n    while (curErr.innererror) {\n        curErr = curErr.innererror;\n        code = curErr.code;\n        message = appendReadableErrorMessage(message, curErr.message);\n    }\n    return {\n        code,\n        message,\n    };\n}\nfunction processOperationStatus(result) {\n    const { state, stateProxy, status, isDone, processResult, getError, response, setErrorAsResult } = result;\n    switch (status) {\n        case \"succeeded\": {\n            stateProxy.setSucceeded(state);\n            break;\n        }\n        case \"failed\": {\n            const err = getError === null || getError === void 0 ? void 0 : getError(response);\n            let postfix = \"\";\n            if (err) {\n                const { code, message } = simplifyError(err);\n                postfix = `. ${code}. ${message}`;\n            }\n            const errStr = `The long-running operation has failed${postfix}`;\n            stateProxy.setError(state, new Error(errStr));\n            stateProxy.setFailed(state);\n            logger.warning(errStr);\n            break;\n        }\n        case \"canceled\": {\n            stateProxy.setCanceled(state);\n            break;\n        }\n    }\n    if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) ||\n        (isDone === undefined &&\n            [\"succeeded\", \"canceled\"].concat(setErrorAsResult ? [] : [\"failed\"]).includes(status))) {\n        stateProxy.setResult(state, buildResult({\n            response,\n            state,\n            processResult,\n        }));\n    }\n}\nfunction buildResult(inputs) {\n    const { processResult, response, state } = inputs;\n    return processResult ? processResult(response, state) : response;\n}\n/**\n * Initiates the long-running operation.\n */\nexport async function initOperation(inputs) {\n    const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult, } = inputs;\n    const { operationLocation, resourceLocation, metadata, response } = await init();\n    if (operationLocation)\n        withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false);\n    const config = {\n        metadata,\n        operationLocation,\n        resourceLocation,\n    };\n    logger.verbose(`LRO: Operation description:`, config);\n    const state = stateProxy.initState(config);\n    const status = getOperationStatus({ response, state, operationLocation });\n    processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult });\n    return state;\n}\nasync function pollOperationHelper(inputs) {\n    const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options, } = inputs;\n    const response = await poll(operationLocation, options).catch(setStateError({\n        state,\n        stateProxy,\n        isOperationError,\n    }));\n    const status = getOperationStatus(response, state);\n    logger.verbose(`LRO: Status:\\n\\tPolling from: ${state.config.operationLocation}\\n\\tOperation status: ${status}\\n\\tPolling status: ${terminalStates.includes(status) ? \"Stopped\" : \"Running\"}`);\n    if (status === \"succeeded\") {\n        const resourceLocation = getResourceLocation(response, state);\n        if (resourceLocation !== undefined) {\n            return {\n                response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })),\n                status,\n            };\n        }\n    }\n    return { response, status };\n}\n/** Polls the long-running operation. */\nexport async function pollOperation(inputs) {\n    const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, getError, updateState, setDelay, isDone, setErrorAsResult, } = inputs;\n    const { operationLocation } = state.config;\n    if (operationLocation !== undefined) {\n        const { response, status } = await pollOperationHelper({\n            poll,\n            getOperationStatus,\n            state,\n            stateProxy,\n            operationLocation,\n            getResourceLocation,\n            isOperationError,\n            options,\n        });\n        processOperationStatus({\n            status,\n            response,\n            state,\n            stateProxy,\n            isDone,\n            processResult,\n            getError,\n            setErrorAsResult,\n        });\n        if (!terminalStates.includes(status)) {\n            const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response);\n            if (intervalInMs)\n                setDelay(intervalInMs);\n            const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state);\n            if (location !== undefined) {\n                const isUpdated = operationLocation !== location;\n                state.config.operationLocation = location;\n                withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated);\n            }\n            else\n                withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false);\n        }\n        updateState === null || updateState === void 0 ? void 0 : updateState(state, response);\n    }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { initOperation, pollOperation } from \"../poller/operation.js\";\nimport { logger } from \"../logger.js\";\nfunction getOperationLocationPollingUrl(inputs) {\n    const { azureAsyncOperation, operationLocation } = inputs;\n    return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation;\n}\nfunction getLocationHeader(rawResponse) {\n    return rawResponse.headers[\"location\"];\n}\nfunction getOperationLocationHeader(rawResponse) {\n    return rawResponse.headers[\"operation-location\"];\n}\nfunction getAzureAsyncOperationHeader(rawResponse) {\n    return rawResponse.headers[\"azure-asyncoperation\"];\n}\nfunction findResourceLocation(inputs) {\n    var _a;\n    const { location, requestMethod, requestPath, resourceLocationConfig } = inputs;\n    switch (requestMethod) {\n        case \"PUT\": {\n            return requestPath;\n        }\n        case \"DELETE\": {\n            return undefined;\n        }\n        case \"PATCH\": {\n            return (_a = getDefault()) !== null && _a !== void 0 ? _a : requestPath;\n        }\n        default: {\n            return getDefault();\n        }\n    }\n    function getDefault() {\n        switch (resourceLocationConfig) {\n            case \"azure-async-operation\": {\n                return undefined;\n            }\n            case \"original-uri\": {\n                return requestPath;\n            }\n            case \"location\":\n            default: {\n                return location;\n            }\n        }\n    }\n}\nexport function inferLroMode(inputs) {\n    const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs;\n    const operationLocation = getOperationLocationHeader(rawResponse);\n    const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse);\n    const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation });\n    const location = getLocationHeader(rawResponse);\n    const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase();\n    if (pollingUrl !== undefined) {\n        return {\n            mode: \"OperationLocation\",\n            operationLocation: pollingUrl,\n            resourceLocation: findResourceLocation({\n                requestMethod: normalizedRequestMethod,\n                location,\n                requestPath,\n                resourceLocationConfig,\n            }),\n        };\n    }\n    else if (location !== undefined) {\n        return {\n            mode: \"ResourceLocation\",\n            operationLocation: location,\n        };\n    }\n    else if (normalizedRequestMethod === \"PUT\" && requestPath) {\n        return {\n            mode: \"Body\",\n            operationLocation: requestPath,\n        };\n    }\n    else {\n        return undefined;\n    }\n}\nfunction transformStatus(inputs) {\n    const { status, statusCode } = inputs;\n    if (typeof status !== \"string\" && status !== undefined) {\n        throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);\n    }\n    switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) {\n        case undefined:\n            return toOperationStatus(statusCode);\n        case \"succeeded\":\n            return \"succeeded\";\n        case \"failed\":\n            return \"failed\";\n        case \"running\":\n        case \"accepted\":\n        case \"started\":\n        case \"canceling\":\n        case \"cancelling\":\n            return \"running\";\n        case \"canceled\":\n        case \"cancelled\":\n            return \"canceled\";\n        default: {\n            logger.verbose(`LRO: unrecognized operation status: ${status}`);\n            return status;\n        }\n    }\n}\nfunction getStatus(rawResponse) {\n    var _a;\n    const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};\n    return transformStatus({ status, statusCode: rawResponse.statusCode });\n}\nfunction getProvisioningState(rawResponse) {\n    var _a, _b;\n    const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};\n    const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState;\n    return transformStatus({ status, statusCode: rawResponse.statusCode });\n}\nfunction toOperationStatus(statusCode) {\n    if (statusCode === 202) {\n        return \"running\";\n    }\n    else if (statusCode < 300) {\n        return \"succeeded\";\n    }\n    else {\n        return \"failed\";\n    }\n}\nexport function parseRetryAfter({ rawResponse }) {\n    const retryAfter = rawResponse.headers[\"retry-after\"];\n    if (retryAfter !== undefined) {\n        // Retry-After header value is either in HTTP date format, or in seconds\n        const retryAfterInSeconds = parseInt(retryAfter);\n        return isNaN(retryAfterInSeconds)\n            ? calculatePollingIntervalFromDate(new Date(retryAfter))\n            : retryAfterInSeconds * 1000;\n    }\n    return undefined;\n}\nexport function getErrorFromResponse(response) {\n    const error = accessBodyProperty(response, \"error\");\n    if (!error) {\n        logger.warning(`The long-running operation failed but there is no error property in the response's body`);\n        return;\n    }\n    if (!error.code || !error.message) {\n        logger.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`);\n        return;\n    }\n    return error;\n}\nfunction calculatePollingIntervalFromDate(retryAfterDate) {\n    const timeNow = Math.floor(new Date().getTime());\n    const retryAfterTime = retryAfterDate.getTime();\n    if (timeNow < retryAfterTime) {\n        return retryAfterTime - timeNow;\n    }\n    return undefined;\n}\nexport function getStatusFromInitialResponse(inputs) {\n    const { response, state, operationLocation } = inputs;\n    function helper() {\n        var _a;\n        const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a[\"mode\"];\n        switch (mode) {\n            case undefined:\n                return toOperationStatus(response.rawResponse.statusCode);\n            case \"Body\":\n                return getOperationStatus(response, state);\n            default:\n                return \"running\";\n        }\n    }\n    const status = helper();\n    return status === \"running\" && operationLocation === undefined ? \"succeeded\" : status;\n}\n/**\n * Initiates the long-running operation.\n */\nexport async function initHttpOperation(inputs) {\n    const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs;\n    return initOperation({\n        init: async () => {\n            const response = await lro.sendInitialRequest();\n            const config = inferLroMode({\n                rawResponse: response.rawResponse,\n                requestPath: lro.requestPath,\n                requestMethod: lro.requestMethod,\n                resourceLocationConfig,\n            });\n            return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}));\n        },\n        stateProxy,\n        processResult: processResult\n            ? ({ flatResponse }, state) => processResult(flatResponse, state)\n            : ({ flatResponse }) => flatResponse,\n        getOperationStatus: getStatusFromInitialResponse,\n        setErrorAsResult,\n    });\n}\nexport function getOperationLocation({ rawResponse }, state) {\n    var _a;\n    const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a[\"mode\"];\n    switch (mode) {\n        case \"OperationLocation\": {\n            return getOperationLocationPollingUrl({\n                operationLocation: getOperationLocationHeader(rawResponse),\n                azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse),\n            });\n        }\n        case \"ResourceLocation\": {\n            return getLocationHeader(rawResponse);\n        }\n        case \"Body\":\n        default: {\n            return undefined;\n        }\n    }\n}\nexport function getOperationStatus({ rawResponse }, state) {\n    var _a;\n    const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a[\"mode\"];\n    switch (mode) {\n        case \"OperationLocation\": {\n            return getStatus(rawResponse);\n        }\n        case \"ResourceLocation\": {\n            return toOperationStatus(rawResponse.statusCode);\n        }\n        case \"Body\": {\n            return getProvisioningState(rawResponse);\n        }\n        default:\n            throw new Error(`Internal error: Unexpected operation mode: ${mode}`);\n    }\n}\nfunction accessBodyProperty({ flatResponse, rawResponse }, prop) {\n    var _a, _b;\n    return (_a = flatResponse === null || flatResponse === void 0 ? void 0 : flatResponse[prop]) !== null && _a !== void 0 ? _a : (_b = rawResponse.body) === null || _b === void 0 ? void 0 : _b[prop];\n}\nexport function getResourceLocation(res, state) {\n    const loc = accessBodyProperty(res, \"resourceLocation\");\n    if (loc && typeof loc === \"string\") {\n        state.config.resourceLocation = loc;\n    }\n    return state.config.resourceLocation;\n}\nexport function isOperationError(e) {\n    return e.name === \"RestError\";\n}\n/** Polls the long-running operation. */\nexport async function pollHttpOperation(inputs) {\n    const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult, } = inputs;\n    return pollOperation({\n        state,\n        stateProxy,\n        setDelay,\n        processResult: processResult\n            ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState)\n            : ({ flatResponse }) => flatResponse,\n        getError: getErrorFromResponse,\n        updateState,\n        getPollingInterval: parseRetryAfter,\n        getOperationLocation,\n        getOperationStatus,\n        isOperationError,\n        getResourceLocation,\n        options,\n        /**\n         * The expansion here is intentional because `lro` could be an object that\n         * references an inner this, so we need to preserve a reference to it.\n         */\n        poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions),\n        setErrorAsResult,\n    });\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { getErrorFromResponse, getOperationLocation, getOperationStatus, getResourceLocation, getStatusFromInitialResponse, inferLroMode, isOperationError, parseRetryAfter, } from \"./operation.js\";\nimport { buildCreatePoller } from \"../poller/poller.js\";\n/**\n * Creates a poller that can be used to poll a long-running operation.\n * @param lro - Description of the long-running operation\n * @param options - options to configure the poller\n * @returns an initialized poller\n */\nexport async function createHttpPoller(lro, options) {\n    const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false, } = options || {};\n    return buildCreatePoller({\n        getStatusFromInitialResponse,\n        getStatusFromPollResponse: getOperationStatus,\n        isOperationError,\n        getOperationLocation,\n        getResourceLocation,\n        getPollingInterval: parseRetryAfter,\n        getError: getErrorFromResponse,\n        resolveOnUnsuccessful,\n    })({\n        init: async () => {\n            const response = await lro.sendInitialRequest();\n            const config = inferLroMode({\n                rawResponse: response.rawResponse,\n                requestPath: lro.requestPath,\n                requestMethod: lro.requestMethod,\n                resourceLocationConfig,\n            });\n            return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}));\n        },\n        poll: lro.sendPollRequest,\n    }, {\n        intervalInMs,\n        withOperationLocation,\n        restoreFrom,\n        updateState,\n        processResult: processResult\n            ? ({ flatResponse }, state) => processResult(flatResponse, state)\n            : ({ flatResponse }) => flatResponse,\n    });\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { deserializeState, initOperation, pollOperation } from \"./operation.js\";\nimport { POLL_INTERVAL_IN_MS } from \"./constants.js\";\nimport { delay } from \"@azure/core-util\";\nconst createStateProxy = () => ({\n    /**\n     * The state at this point is created to be of type OperationState<TResult>.\n     * It will be updated later to be of type TState when the\n     * customer-provided callback, `updateState`, is called during polling.\n     */\n    initState: (config) => ({ status: \"running\", config }),\n    setCanceled: (state) => (state.status = \"canceled\"),\n    setError: (state, error) => (state.error = error),\n    setResult: (state, result) => (state.result = result),\n    setRunning: (state) => (state.status = \"running\"),\n    setSucceeded: (state) => (state.status = \"succeeded\"),\n    setFailed: (state) => (state.status = \"failed\"),\n    getError: (state) => state.error,\n    getResult: (state) => state.result,\n    isCanceled: (state) => state.status === \"canceled\",\n    isFailed: (state) => state.status === \"failed\",\n    isRunning: (state) => state.status === \"running\",\n    isSucceeded: (state) => state.status === \"succeeded\",\n});\n/**\n * Returns a poller factory.\n */\nexport function buildCreatePoller(inputs) {\n    const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, getError, resolveOnUnsuccessful, } = inputs;\n    return async ({ init, poll }, options) => {\n        const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom, } = options || {};\n        const stateProxy = createStateProxy();\n        const withOperationLocation = withOperationLocationCallback\n            ? (() => {\n                let called = false;\n                return (operationLocation, isUpdated) => {\n                    if (isUpdated)\n                        withOperationLocationCallback(operationLocation);\n                    else if (!called)\n                        withOperationLocationCallback(operationLocation);\n                    called = true;\n                };\n            })()\n            : undefined;\n        const state = restoreFrom\n            ? deserializeState(restoreFrom)\n            : await initOperation({\n                init,\n                stateProxy,\n                processResult,\n                getOperationStatus: getStatusFromInitialResponse,\n                withOperationLocation,\n                setErrorAsResult: !resolveOnUnsuccessful,\n            });\n        let resultPromise;\n        const abortController = new AbortController();\n        const handlers = new Map();\n        const handleProgressEvents = async () => handlers.forEach((h) => h(state));\n        const cancelErrMsg = \"Operation was canceled\";\n        let currentPollIntervalInMs = intervalInMs;\n        const poller = {\n            getOperationState: () => state,\n            getResult: () => state.result,\n            isDone: () => [\"succeeded\", \"failed\", \"canceled\"].includes(state.status),\n            isStopped: () => resultPromise === undefined,\n            stopPolling: () => {\n                abortController.abort();\n            },\n            toString: () => JSON.stringify({\n                state,\n            }),\n            onProgress: (callback) => {\n                const s = Symbol();\n                handlers.set(s, callback);\n                return () => handlers.delete(s);\n            },\n            pollUntilDone: (pollOptions) => (resultPromise !== null && resultPromise !== void 0 ? resultPromise : (resultPromise = (async () => {\n                const { abortSignal: inputAbortSignal } = pollOptions || {};\n                // In the future we can use AbortSignal.any() instead\n                function abortListener() {\n                    abortController.abort();\n                }\n                const abortSignal = abortController.signal;\n                if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) {\n                    abortController.abort();\n                }\n                else if (!abortSignal.aborted) {\n                    inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener(\"abort\", abortListener, { once: true });\n                }\n                try {\n                    if (!poller.isDone()) {\n                        await poller.poll({ abortSignal });\n                        while (!poller.isDone()) {\n                            await delay(currentPollIntervalInMs, { abortSignal });\n                            await poller.poll({ abortSignal });\n                        }\n                    }\n                }\n                finally {\n                    inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener(\"abort\", abortListener);\n                }\n                if (resolveOnUnsuccessful) {\n                    return poller.getResult();\n                }\n                else {\n                    switch (state.status) {\n                        case \"succeeded\":\n                            return poller.getResult();\n                        case \"canceled\":\n                            throw new Error(cancelErrMsg);\n                        case \"failed\":\n                            throw state.error;\n                        case \"notStarted\":\n                        case \"running\":\n                            throw new Error(`Polling completed without succeeding or failing`);\n                    }\n                }\n            })().finally(() => {\n                resultPromise = undefined;\n            }))),\n            async poll(pollOptions) {\n                if (resolveOnUnsuccessful) {\n                    if (poller.isDone())\n                        return;\n                }\n                else {\n                    switch (state.status) {\n                        case \"succeeded\":\n                            return;\n                        case \"canceled\":\n                            throw new Error(cancelErrMsg);\n                        case \"failed\":\n                            throw state.error;\n                    }\n                }\n                await pollOperation({\n                    poll,\n                    state,\n                    stateProxy,\n                    getOperationLocation,\n                    isOperationError,\n                    withOperationLocation,\n                    getPollingInterval,\n                    getOperationStatus: getStatusFromPollResponse,\n                    getResourceLocation,\n                    processResult,\n                    getError,\n                    updateState,\n                    options: pollOptions,\n                    setDelay: (pollIntervalInMs) => {\n                        currentPollIntervalInMs = pollIntervalInMs;\n                    },\n                    setErrorAsResult: !resolveOnUnsuccessful,\n                });\n                await handleProgressEvents();\n                if (!resolveOnUnsuccessful) {\n                    switch (state.status) {\n                        case \"canceled\":\n                            throw new Error(cancelErrMsg);\n                        case \"failed\":\n                            throw state.error;\n                    }\n                }\n            },\n        };\n        return poller;\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * When a poller is manually stopped through the `stopPolling` method,\n * the poller will be rejected with an instance of the PollerStoppedError.\n */\nexport class PollerStoppedError extends Error {\n    constructor(message) {\n        super(message);\n        this.name = \"PollerStoppedError\";\n        Object.setPrototypeOf(this, PollerStoppedError.prototype);\n    }\n}\n/**\n * When the operation is cancelled, the poller will be rejected with an instance\n * of the PollerCancelledError.\n */\nexport class PollerCancelledError extends Error {\n    constructor(message) {\n        super(message);\n        this.name = \"PollerCancelledError\";\n        Object.setPrototypeOf(this, PollerCancelledError.prototype);\n    }\n}\n/**\n * A class that represents the definition of a program that polls through consecutive requests\n * until it reaches a state of completion.\n *\n * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed.\n * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes.\n * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation.\n *\n * ```ts\n * const poller = new MyPoller();\n *\n * // Polling just once:\n * await poller.poll();\n *\n * // We can try to cancel the request here, by calling:\n * //\n * //     await poller.cancelOperation();\n * //\n *\n * // Getting the final result:\n * const result = await poller.pollUntilDone();\n * ```\n *\n * The Poller is defined by two types, a type representing the state of the poller, which\n * must include a basic set of properties from `PollOperationState<TResult>`,\n * and a return type defined by `TResult`, which can be anything.\n *\n * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having\n * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type.\n *\n * ```ts\n * class Client {\n *   public async makePoller: PollerLike<MyOperationState, MyResult> {\n *     const poller = new MyPoller({});\n *     // It might be preferred to return the poller after the first request is made,\n *     // so that some information can be obtained right away.\n *     await poller.poll();\n *     return poller;\n *   }\n * }\n *\n * const poller: PollerLike<MyOperationState, MyResult> = myClient.makePoller();\n * ```\n *\n * A poller can be created through its constructor, then it can be polled until it's completed.\n * At any point in time, the state of the poller can be obtained without delay through the getOperationState method.\n * At any point in time, the intermediate forms of the result type can be requested without delay.\n * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned.\n *\n * ```ts\n * const poller = myClient.makePoller();\n * const state: MyOperationState = poller.getOperationState();\n *\n * // The intermediate result can be obtained at any time.\n * const result: MyResult | undefined = poller.getResult();\n *\n * // The final result can only be obtained after the poller finishes.\n * const result: MyResult = await poller.pollUntilDone();\n * ```\n *\n */\n// eslint-disable-next-line no-use-before-define\nexport class Poller {\n    /**\n     * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation<TState, TResult>`.\n     *\n     * When writing an implementation of a Poller, this implementation needs to deal with the initialization\n     * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's\n     * operation has already been defined, at least its basic properties. The code below shows how to approach\n     * the definition of the constructor of a new custom poller.\n     *\n     * ```ts\n     * export class MyPoller extends Poller<MyOperationState, string> {\n     *   constructor({\n     *     // Anything you might need outside of the basics\n     *   }) {\n     *     let state: MyOperationState = {\n     *       privateProperty: private,\n     *       publicProperty: public,\n     *     };\n     *\n     *     const operation = {\n     *       state,\n     *       update,\n     *       cancel,\n     *       toString\n     *     }\n     *\n     *     // Sending the operation to the parent's constructor.\n     *     super(operation);\n     *\n     *     // You can assign more local properties here.\n     *   }\n     * }\n     * ```\n     *\n     * Inside of this constructor, a new promise is created. This will be used to\n     * tell the user when the poller finishes (see `pollUntilDone()`). The promise's\n     * resolve and reject methods are also used internally to control when to resolve\n     * or reject anyone waiting for the poller to finish.\n     *\n     * The constructor of a custom implementation of a poller is where any serialized version of\n     * a previous poller's operation should be deserialized into the operation sent to the\n     * base constructor. For example:\n     *\n     * ```ts\n     * export class MyPoller extends Poller<MyOperationState, string> {\n     *   constructor(\n     *     baseOperation: string | undefined\n     *   ) {\n     *     let state: MyOperationState = {};\n     *     if (baseOperation) {\n     *       state = {\n     *         ...JSON.parse(baseOperation).state,\n     *         ...state\n     *       };\n     *     }\n     *     const operation = {\n     *       state,\n     *       // ...\n     *     }\n     *     super(operation);\n     *   }\n     * }\n     * ```\n     *\n     * @param operation - Must contain the basic properties of `PollOperation<State, TResult>`.\n     */\n    constructor(operation) {\n        /** controls whether to throw an error if the operation failed or was canceled. */\n        this.resolveOnUnsuccessful = false;\n        this.stopped = true;\n        this.pollProgressCallbacks = [];\n        this.operation = operation;\n        this.promise = new Promise((resolve, reject) => {\n            this.resolve = resolve;\n            this.reject = reject;\n        });\n        // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown.\n        // The above warning would get thrown if `poller.poll` is called, it returns an error,\n        // and pullUntilDone did not have a .catch or await try/catch on it's return value.\n        this.promise.catch(() => {\n            /* intentionally blank */\n        });\n    }\n    /**\n     * Starts a loop that will break only if the poller is done\n     * or if the poller is stopped.\n     */\n    async startPolling(pollOptions = {}) {\n        if (this.stopped) {\n            this.stopped = false;\n        }\n        while (!this.isStopped() && !this.isDone()) {\n            await this.poll(pollOptions);\n            await this.delay();\n        }\n    }\n    /**\n     * pollOnce does one polling, by calling to the update method of the underlying\n     * poll operation to make any relevant change effective.\n     *\n     * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n     *\n     * @param options - Optional properties passed to the operation's update method.\n     */\n    async pollOnce(options = {}) {\n        if (!this.isDone()) {\n            this.operation = await this.operation.update({\n                abortSignal: options.abortSignal,\n                fireProgress: this.fireProgress.bind(this),\n            });\n        }\n        this.processUpdatedState();\n    }\n    /**\n     * fireProgress calls the functions passed in via onProgress the method of the poller.\n     *\n     * It loops over all of the callbacks received from onProgress, and executes them, sending them\n     * the current operation state.\n     *\n     * @param state - The current operation state.\n     */\n    fireProgress(state) {\n        for (const callback of this.pollProgressCallbacks) {\n            callback(state);\n        }\n    }\n    /**\n     * Invokes the underlying operation's cancel method.\n     */\n    async cancelOnce(options = {}) {\n        this.operation = await this.operation.cancel(options);\n    }\n    /**\n     * Returns a promise that will resolve once a single polling request finishes.\n     * It does this by calling the update method of the Poller's operation.\n     *\n     * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n     *\n     * @param options - Optional properties passed to the operation's update method.\n     */\n    poll(options = {}) {\n        if (!this.pollOncePromise) {\n            this.pollOncePromise = this.pollOnce(options);\n            const clearPollOncePromise = () => {\n                this.pollOncePromise = undefined;\n            };\n            this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject);\n        }\n        return this.pollOncePromise;\n    }\n    processUpdatedState() {\n        if (this.operation.state.error) {\n            this.stopped = true;\n            if (!this.resolveOnUnsuccessful) {\n                this.reject(this.operation.state.error);\n                throw this.operation.state.error;\n            }\n        }\n        if (this.operation.state.isCancelled) {\n            this.stopped = true;\n            if (!this.resolveOnUnsuccessful) {\n                const error = new PollerCancelledError(\"Operation was canceled\");\n                this.reject(error);\n                throw error;\n            }\n        }\n        if (this.isDone() && this.resolve) {\n            // If the poller has finished polling, this means we now have a result.\n            // However, it can be the case that TResult is instantiated to void, so\n            // we are not expecting a result anyway. To assert that we might not\n            // have a result eventually after finishing polling, we cast the result\n            // to TResult.\n            this.resolve(this.getResult());\n        }\n    }\n    /**\n     * Returns a promise that will resolve once the underlying operation is completed.\n     */\n    async pollUntilDone(pollOptions = {}) {\n        if (this.stopped) {\n            this.startPolling(pollOptions).catch(this.reject);\n        }\n        // This is needed because the state could have been updated by\n        // `cancelOperation`, e.g. the operation is canceled or an error occurred.\n        this.processUpdatedState();\n        return this.promise;\n    }\n    /**\n     * Invokes the provided callback after each polling is completed,\n     * sending the current state of the poller's operation.\n     *\n     * It returns a method that can be used to stop receiving updates on the given callback function.\n     */\n    onProgress(callback) {\n        this.pollProgressCallbacks.push(callback);\n        return () => {\n            this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback);\n        };\n    }\n    /**\n     * Returns true if the poller has finished polling.\n     */\n    isDone() {\n        const state = this.operation.state;\n        return Boolean(state.isCompleted || state.isCancelled || state.error);\n    }\n    /**\n     * Stops the poller from continuing to poll.\n     */\n    stopPolling() {\n        if (!this.stopped) {\n            this.stopped = true;\n            if (this.reject) {\n                this.reject(new PollerStoppedError(\"This poller is already stopped\"));\n            }\n        }\n    }\n    /**\n     * Returns true if the poller is stopped.\n     */\n    isStopped() {\n        return this.stopped;\n    }\n    /**\n     * Attempts to cancel the underlying operation.\n     *\n     * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n     *\n     * If it's called again before it finishes, it will throw an error.\n     *\n     * @param options - Optional properties passed to the operation's update method.\n     */\n    cancelOperation(options = {}) {\n        if (!this.cancelPromise) {\n            this.cancelPromise = this.cancelOnce(options);\n        }\n        else if (options.abortSignal) {\n            throw new Error(\"A cancel request is currently pending\");\n        }\n        return this.cancelPromise;\n    }\n    /**\n     * Returns the state of the operation.\n     *\n     * Even though TState will be the same type inside any of the methods of any extension of the Poller class,\n     * implementations of the pollers can customize what's shared with the public by writing their own\n     * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller\n     * and a public type representing a safe to share subset of the properties of the internal state.\n     * Their definition of getOperationState can then return their public type.\n     *\n     * Example:\n     *\n     * ```ts\n     * // Let's say we have our poller's operation state defined as:\n     * interface MyOperationState extends PollOperationState<ResultType> {\n     *   privateProperty?: string;\n     *   publicProperty?: string;\n     * }\n     *\n     * // To allow us to have a true separation of public and private state, we have to define another interface:\n     * interface PublicState extends PollOperationState<ResultType> {\n     *   publicProperty?: string;\n     * }\n     *\n     * // Then, we define our Poller as follows:\n     * export class MyPoller extends Poller<MyOperationState, ResultType> {\n     *   // ... More content is needed here ...\n     *\n     *   public getOperationState(): PublicState {\n     *     const state: PublicState = this.operation.state;\n     *     return {\n     *       // Properties from PollOperationState<TResult>\n     *       isStarted: state.isStarted,\n     *       isCompleted: state.isCompleted,\n     *       isCancelled: state.isCancelled,\n     *       error: state.error,\n     *       result: state.result,\n     *\n     *       // The only other property needed by PublicState.\n     *       publicProperty: state.publicProperty\n     *     }\n     *   }\n     * }\n     * ```\n     *\n     * You can see this in the tests of this repository, go to the file:\n     * `../test/utils/testPoller.ts`\n     * and look for the getOperationState implementation.\n     */\n    getOperationState() {\n        return this.operation.state;\n    }\n    /**\n     * Returns the result value of the operation,\n     * regardless of the state of the poller.\n     * It can return undefined or an incomplete form of the final TResult value\n     * depending on the implementation.\n     */\n    getResult() {\n        const state = this.operation.state;\n        return state.result;\n    }\n    /**\n     * Returns a serialized version of the poller's operation\n     * by invoking the operation's toString method.\n     */\n    toString() {\n        return this.operation.toString();\n    }\n}\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nexport const KeyListResult = {\n    type: {\n        name: \"Composite\",\n        className: \"KeyListResult\",\n        modelProperties: {\n            items: {\n                serializedName: \"items\",\n                type: {\n                    name: \"Sequence\",\n                    element: {\n                        type: {\n                            name: \"Composite\",\n                            className: \"Key\",\n                        },\n                    },\n                },\n            },\n            nextLink: {\n                serializedName: \"@nextLink\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const Key = {\n    type: {\n        name: \"Composite\",\n        className: \"Key\",\n        modelProperties: {\n            name: {\n                serializedName: \"name\",\n                readOnly: true,\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const ErrorModel = {\n    type: {\n        name: \"Composite\",\n        className: \"ErrorModel\",\n        modelProperties: {\n            type: {\n                serializedName: \"type\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            title: {\n                serializedName: \"title\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            name: {\n                serializedName: \"name\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            detail: {\n                serializedName: \"detail\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            status: {\n                serializedName: \"status\",\n                type: {\n                    name: \"Number\",\n                },\n            },\n        },\n    },\n};\nexport const KeyValueListResult = {\n    type: {\n        name: \"Composite\",\n        className: \"KeyValueListResult\",\n        modelProperties: {\n            items: {\n                serializedName: \"items\",\n                type: {\n                    name: \"Sequence\",\n                    element: {\n                        type: {\n                            name: \"Composite\",\n                            className: \"KeyValue\",\n                        },\n                    },\n                },\n            },\n            etag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            nextLink: {\n                serializedName: \"@nextLink\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const KeyValue = {\n    type: {\n        name: \"Composite\",\n        className: \"KeyValue\",\n        modelProperties: {\n            key: {\n                serializedName: \"key\",\n                required: true,\n                type: {\n                    name: \"String\",\n                },\n            },\n            label: {\n                serializedName: \"label\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            contentType: {\n                serializedName: \"content_type\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            value: {\n                serializedName: \"value\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            lastModified: {\n                serializedName: \"last_modified\",\n                type: {\n                    name: \"DateTime\",\n                },\n            },\n            tags: {\n                serializedName: \"tags\",\n                type: {\n                    name: \"Dictionary\",\n                    value: { type: { name: \"String\" } },\n                },\n            },\n            locked: {\n                serializedName: \"locked\",\n                type: {\n                    name: \"Boolean\",\n                },\n            },\n            etag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const SnapshotListResult = {\n    type: {\n        name: \"Composite\",\n        className: \"SnapshotListResult\",\n        modelProperties: {\n            items: {\n                serializedName: \"items\",\n                type: {\n                    name: \"Sequence\",\n                    element: {\n                        type: {\n                            name: \"Composite\",\n                            className: \"ConfigurationSnapshot\",\n                        },\n                    },\n                },\n            },\n            nextLink: {\n                serializedName: \"@nextLink\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const ConfigurationSnapshot = {\n    type: {\n        name: \"Composite\",\n        className: \"ConfigurationSnapshot\",\n        modelProperties: {\n            name: {\n                serializedName: \"name\",\n                required: true,\n                readOnly: true,\n                type: {\n                    name: \"String\",\n                },\n            },\n            status: {\n                serializedName: \"status\",\n                readOnly: true,\n                type: {\n                    name: \"String\",\n                },\n            },\n            filters: {\n                constraints: {\n                    MinItems: 1,\n                    MaxItems: 3,\n                },\n                serializedName: \"filters\",\n                required: true,\n                type: {\n                    name: \"Sequence\",\n                    element: {\n                        type: {\n                            name: \"Composite\",\n                            className: \"ConfigurationSettingsFilter\",\n                        },\n                    },\n                },\n            },\n            compositionType: {\n                serializedName: \"composition_type\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            createdOn: {\n                serializedName: \"created\",\n                readOnly: true,\n                type: {\n                    name: \"DateTime\",\n                },\n            },\n            expiresOn: {\n                serializedName: \"expires\",\n                readOnly: true,\n                type: {\n                    name: \"DateTime\",\n                },\n            },\n            retentionPeriodInSeconds: {\n                constraints: {\n                    InclusiveMaximum: 7776000,\n                    InclusiveMinimum: 3600,\n                },\n                serializedName: \"retention_period\",\n                type: {\n                    name: \"Number\",\n                },\n            },\n            sizeInBytes: {\n                serializedName: \"size\",\n                readOnly: true,\n                type: {\n                    name: \"Number\",\n                },\n            },\n            itemCount: {\n                serializedName: \"items_count\",\n                readOnly: true,\n                type: {\n                    name: \"Number\",\n                },\n            },\n            tags: {\n                serializedName: \"tags\",\n                type: {\n                    name: \"Dictionary\",\n                    value: { type: { name: \"String\" } },\n                },\n            },\n            etag: {\n                serializedName: \"etag\",\n                readOnly: true,\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const ConfigurationSettingsFilter = {\n    type: {\n        name: \"Composite\",\n        className: \"ConfigurationSettingsFilter\",\n        modelProperties: {\n            keyFilter: {\n                serializedName: \"key\",\n                required: true,\n                type: {\n                    name: \"String\",\n                },\n            },\n            labelFilter: {\n                serializedName: \"label\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            tagsFilter: {\n                constraints: {\n                    UniqueItems: true,\n                },\n                serializedName: \"tags\",\n                type: {\n                    name: \"Sequence\",\n                    element: {\n                        type: {\n                            name: \"String\",\n                        },\n                    },\n                },\n            },\n        },\n    },\n};\nexport const SnapshotUpdateParameters = {\n    type: {\n        name: \"Composite\",\n        className: \"SnapshotUpdateParameters\",\n        modelProperties: {\n            status: {\n                serializedName: \"status\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const LabelListResult = {\n    type: {\n        name: \"Composite\",\n        className: \"LabelListResult\",\n        modelProperties: {\n            items: {\n                serializedName: \"items\",\n                type: {\n                    name: \"Sequence\",\n                    element: {\n                        type: {\n                            name: \"Composite\",\n                            className: \"SettingLabel\",\n                        },\n                    },\n                },\n            },\n            nextLink: {\n                serializedName: \"@nextLink\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const SettingLabel = {\n    type: {\n        name: \"Composite\",\n        className: \"SettingLabel\",\n        modelProperties: {\n            name: {\n                serializedName: \"name\",\n                readOnly: true,\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const OperationDetails = {\n    type: {\n        name: \"Composite\",\n        className: \"OperationDetails\",\n        modelProperties: {\n            id: {\n                serializedName: \"id\",\n                required: true,\n                type: {\n                    name: \"String\",\n                },\n            },\n            status: {\n                serializedName: \"status\",\n                required: true,\n                type: {\n                    name: \"Enum\",\n                    allowedValues: [\n                        \"NotStarted\",\n                        \"Running\",\n                        \"Succeeded\",\n                        \"Failed\",\n                        \"Canceled\",\n                    ],\n                },\n            },\n            error: {\n                serializedName: \"error\",\n                type: {\n                    name: \"Composite\",\n                    className: \"ErrorDetail\",\n                },\n            },\n        },\n    },\n};\nexport const ErrorDetail = {\n    type: {\n        name: \"Composite\",\n        className: \"ErrorDetail\",\n        modelProperties: {\n            code: {\n                serializedName: \"code\",\n                required: true,\n                type: {\n                    name: \"String\",\n                },\n            },\n            message: {\n                serializedName: \"message\",\n                required: true,\n                type: {\n                    name: \"String\",\n                },\n            },\n            details: {\n                serializedName: \"details\",\n                type: {\n                    name: \"Sequence\",\n                    element: {\n                        type: {\n                            name: \"Composite\",\n                            className: \"ErrorDetail\",\n                        },\n                    },\n                },\n            },\n            innererror: {\n                serializedName: \"innererror\",\n                type: {\n                    name: \"Composite\",\n                    className: \"InnerError\",\n                },\n            },\n        },\n    },\n};\nexport const InnerError = {\n    type: {\n        name: \"Composite\",\n        className: \"InnerError\",\n        modelProperties: {\n            code: {\n                serializedName: \"code\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            innererror: {\n                serializedName: \"innererror\",\n                type: {\n                    name: \"Composite\",\n                    className: \"InnerError\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationGetKeysHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationGetKeysHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationCheckKeysHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationCheckKeysHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationGetKeyValuesHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationGetKeyValuesHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationCheckKeyValuesHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationCheckKeyValuesHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationGetKeyValueHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationGetKeyValueHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationPutKeyValueHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationPutKeyValueHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationDeleteKeyValueHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationDeleteKeyValueHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationCheckKeyValueHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationCheckKeyValueHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationGetSnapshotsHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationGetSnapshotsHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationCheckSnapshotsHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationCheckSnapshotsHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationGetSnapshotHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationGetSnapshotHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            link: {\n                serializedName: \"link\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationCreateSnapshotHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationCreateSnapshotHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            link: {\n                serializedName: \"link\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            operationLocation: {\n                serializedName: \"operation-location\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationUpdateSnapshotHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationUpdateSnapshotHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            link: {\n                serializedName: \"link\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationCheckSnapshotHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationCheckSnapshotHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            link: {\n                serializedName: \"link\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationGetLabelsHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationGetLabelsHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationCheckLabelsHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationCheckLabelsHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationPutLockHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationPutLockHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationDeleteLockHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationDeleteLockHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationGetRevisionsHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationGetRevisionsHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationCheckRevisionsHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationCheckRevisionsHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationGetKeysNextHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationGetKeysNextHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationGetKeyValuesNextHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationGetKeyValuesNextHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationGetSnapshotsNextHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationGetSnapshotsNextHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationGetLabelsNextHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationGetLabelsNextHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\nexport const AppConfigurationGetRevisionsNextHeaders = {\n    type: {\n        name: \"Composite\",\n        className: \"AppConfigurationGetRevisionsNextHeaders\",\n        modelProperties: {\n            syncToken: {\n                serializedName: \"sync-token\",\n                type: {\n                    name: \"String\",\n                },\n            },\n            eTag: {\n                serializedName: \"etag\",\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport { KeyValue as KeyValueMapper, ConfigurationSnapshot as ConfigurationSnapshotMapper, SnapshotUpdateParameters as SnapshotUpdateParametersMapper, } from \"../models/mappers.js\";\nexport const accept = {\n    parameterPath: \"accept\",\n    mapper: {\n        defaultValue: \"application/vnd.microsoft.appconfig.keyset+json, application/problem+json\",\n        isConstant: true,\n        serializedName: \"Accept\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const endpoint = {\n    parameterPath: \"endpoint\",\n    mapper: {\n        serializedName: \"endpoint\",\n        required: true,\n        type: {\n            name: \"String\",\n        },\n    },\n    skipEncoding: true,\n};\nexport const name = {\n    parameterPath: [\"options\", \"name\"],\n    mapper: {\n        serializedName: \"name\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const syncToken = {\n    parameterPath: \"syncToken\",\n    mapper: {\n        serializedName: \"Sync-Token\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const apiVersion = {\n    parameterPath: \"apiVersion\",\n    mapper: {\n        serializedName: \"api-version\",\n        required: true,\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const after = {\n    parameterPath: [\"options\", \"after\"],\n    mapper: {\n        serializedName: \"After\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const acceptDatetime = {\n    parameterPath: [\"options\", \"acceptDatetime\"],\n    mapper: {\n        serializedName: \"Accept-Datetime\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const accept1 = {\n    parameterPath: \"accept\",\n    mapper: {\n        defaultValue: \"application/vnd.microsoft.appconfig.kvset+json, application/problem+json\",\n        isConstant: true,\n        serializedName: \"Accept\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const key = {\n    parameterPath: [\"options\", \"key\"],\n    mapper: {\n        serializedName: \"key\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const label = {\n    parameterPath: [\"options\", \"label\"],\n    mapper: {\n        serializedName: \"label\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const select = {\n    parameterPath: [\"options\", \"select\"],\n    mapper: {\n        serializedName: \"$Select\",\n        type: {\n            name: \"Sequence\",\n            element: {\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n    collectionFormat: \"CSV\",\n};\nexport const snapshot = {\n    parameterPath: [\"options\", \"snapshot\"],\n    mapper: {\n        serializedName: \"snapshot\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const ifMatch = {\n    parameterPath: [\"options\", \"ifMatch\"],\n    mapper: {\n        serializedName: \"If-Match\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const ifNoneMatch = {\n    parameterPath: [\"options\", \"ifNoneMatch\"],\n    mapper: {\n        serializedName: \"If-None-Match\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const tags = {\n    parameterPath: [\"options\", \"tags\"],\n    mapper: {\n        constraints: {\n            UniqueItems: true,\n        },\n        serializedName: \"tags\",\n        type: {\n            name: \"Sequence\",\n            element: {\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n    collectionFormat: \"Multi\",\n};\nexport const accept2 = {\n    parameterPath: \"accept\",\n    mapper: {\n        defaultValue: \"application/vnd.microsoft.appconfig.kv+json, application/problem+json\",\n        isConstant: true,\n        serializedName: \"Accept\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const key1 = {\n    parameterPath: \"key\",\n    mapper: {\n        serializedName: \"key\",\n        required: true,\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const contentType = {\n    parameterPath: [\"options\", \"contentType\"],\n    mapper: {\n        defaultValue: \"application/vnd.microsoft.appconfig.kv+json\",\n        isConstant: true,\n        serializedName: \"Content-Type\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const entity = {\n    parameterPath: [\"options\", \"entity\"],\n    mapper: KeyValueMapper,\n};\nexport const accept3 = {\n    parameterPath: \"accept\",\n    mapper: {\n        defaultValue: \"application/vnd.microsoft.appconfig.snapshotset+json, application/problem+json\",\n        isConstant: true,\n        serializedName: \"Accept\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const select1 = {\n    parameterPath: [\"options\", \"select\"],\n    mapper: {\n        serializedName: \"$Select\",\n        type: {\n            name: \"Sequence\",\n            element: {\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n    collectionFormat: \"CSV\",\n};\nexport const status = {\n    parameterPath: [\"options\", \"status\"],\n    mapper: {\n        serializedName: \"status\",\n        type: {\n            name: \"Sequence\",\n            element: {\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n    collectionFormat: \"CSV\",\n};\nexport const accept4 = {\n    parameterPath: \"accept\",\n    mapper: {\n        defaultValue: \"application/vnd.microsoft.appconfig.snapshot+json, application/problem+json\",\n        isConstant: true,\n        serializedName: \"Accept\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const name1 = {\n    parameterPath: \"name\",\n    mapper: {\n        serializedName: \"name\",\n        required: true,\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const contentType1 = {\n    parameterPath: [\"options\", \"contentType\"],\n    mapper: {\n        defaultValue: \"application/vnd.microsoft.appconfig.snapshot+json\",\n        isConstant: true,\n        serializedName: \"Content-Type\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const entity1 = {\n    parameterPath: \"entity\",\n    mapper: ConfigurationSnapshotMapper,\n};\nexport const name2 = {\n    parameterPath: \"name\",\n    mapper: {\n        constraints: {\n            MaxLength: 256,\n        },\n        serializedName: \"name\",\n        required: true,\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const contentType2 = {\n    parameterPath: [\"options\", \"contentType\"],\n    mapper: {\n        defaultValue: \"application/json\",\n        isConstant: true,\n        serializedName: \"Content-Type\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const entity2 = {\n    parameterPath: \"entity\",\n    mapper: SnapshotUpdateParametersMapper,\n};\nexport const accept5 = {\n    parameterPath: \"accept\",\n    mapper: {\n        defaultValue: \"application/vnd.microsoft.appconfig.labelset+json, application/problem+json\",\n        isConstant: true,\n        serializedName: \"Accept\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const select2 = {\n    parameterPath: [\"options\", \"select\"],\n    mapper: {\n        serializedName: \"$Select\",\n        type: {\n            name: \"Sequence\",\n            element: {\n                type: {\n                    name: \"String\",\n                },\n            },\n        },\n    },\n    collectionFormat: \"CSV\",\n};\nexport const accept6 = {\n    parameterPath: \"accept\",\n    mapper: {\n        defaultValue: \"application/json\",\n        isConstant: true,\n        serializedName: \"Accept\",\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const snapshot1 = {\n    parameterPath: \"snapshot\",\n    mapper: {\n        serializedName: \"snapshot\",\n        required: true,\n        type: {\n            name: \"String\",\n        },\n    },\n};\nexport const nextLink = {\n    parameterPath: \"nextLink\",\n    mapper: {\n        serializedName: \"nextLink\",\n        required: true,\n        type: {\n            name: \"String\",\n        },\n    },\n    skipEncoding: true,\n};\n","/*\n* Copyright (c) Microsoft Corporation.\n* Licensed under the MIT License.\n*\n* Code generated by Microsoft (R) AutoRest Code Generator.\n* Changes may cause incorrect behavior and will be lost if the code is regenerated.\n*/\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreHttpCompat from \"@azure/core-http-compat\";\nimport { createHttpPoller, } from \"@azure/core-lro\";\nimport { createLroSpec } from \"./lroImpl.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\n/** @internal */\nexport class AppConfiguration extends coreHttpCompat.ExtendedServiceClient {\n    /**\n     * Initializes a new instance of the AppConfiguration class.\n     * @param endpoint The endpoint of the App Configuration instance to send requests to.\n     * @param apiVersion Api Version\n     * @param options The parameter options\n     */\n    constructor(endpoint, apiVersion, options) {\n        var _a, _b;\n        if (endpoint === undefined) {\n            throw new Error(\"'endpoint' cannot be null\");\n        }\n        if (apiVersion === undefined) {\n            throw new Error(\"'apiVersion' cannot be null\");\n        }\n        // Initializing default values for options\n        if (!options) {\n            options = {};\n        }\n        const defaults = {\n            requestContentType: \"application/json; charset=utf-8\",\n        };\n        const packageDetails = `azsdk-js-app-configuration/1.8.0`;\n        const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n            ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n            : `${packageDetails}`;\n        const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {\n                userAgentPrefix,\n            }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : \"{endpoint}\" });\n        super(optionsWithDefaults);\n        // Parameter assignments\n        this.endpoint = endpoint;\n        this.apiVersion = apiVersion;\n        this.addCustomApiVersionPolicy(apiVersion);\n    }\n    /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n    addCustomApiVersionPolicy(apiVersion) {\n        if (!apiVersion) {\n            return;\n        }\n        const apiVersionPolicy = {\n            name: \"CustomApiVersionPolicy\",\n            async sendRequest(request, next) {\n                const param = request.url.split(\"?\");\n                if (param.length > 1) {\n                    const newParams = param[1].split(\"&\").map((item) => {\n                        if (item.indexOf(\"api-version\") > -1) {\n                            return \"api-version=\" + apiVersion;\n                        }\n                        else {\n                            return item;\n                        }\n                    });\n                    request.url = param[0] + \"?\" + newParams.join(\"&\");\n                }\n                return next(request);\n            },\n        };\n        this.pipeline.addPolicy(apiVersionPolicy);\n    }\n    /**\n     * Gets a list of keys.\n     * @param options The options parameters.\n     */\n    getKeys(options) {\n        return this.sendOperationRequest({ options }, getKeysOperationSpec);\n    }\n    /**\n     * Requests the headers and status of the given resource.\n     * @param options The options parameters.\n     */\n    checkKeys(options) {\n        return this.sendOperationRequest({ options }, checkKeysOperationSpec);\n    }\n    /**\n     * Gets a list of key-values.\n     * @param options The options parameters.\n     */\n    getKeyValues(options) {\n        return this.sendOperationRequest({ options }, getKeyValuesOperationSpec);\n    }\n    /**\n     * Requests the headers and status of the given resource.\n     * @param options The options parameters.\n     */\n    checkKeyValues(options) {\n        return this.sendOperationRequest({ options }, checkKeyValuesOperationSpec);\n    }\n    /**\n     * Gets a single key-value.\n     * @param key The key of the key-value to retrieve.\n     * @param options The options parameters.\n     */\n    getKeyValue(key, options) {\n        return this.sendOperationRequest({ key, options }, getKeyValueOperationSpec);\n    }\n    /**\n     * Creates a key-value.\n     * @param key The key of the key-value to create.\n     * @param options The options parameters.\n     */\n    putKeyValue(key, options) {\n        return this.sendOperationRequest({ key, options }, putKeyValueOperationSpec);\n    }\n    /**\n     * Deletes a key-value.\n     * @param key The key of the key-value to delete.\n     * @param options The options parameters.\n     */\n    deleteKeyValue(key, options) {\n        return this.sendOperationRequest({ key, options }, deleteKeyValueOperationSpec);\n    }\n    /**\n     * Requests the headers and status of the given resource.\n     * @param key The key of the key-value to retrieve.\n     * @param options The options parameters.\n     */\n    checkKeyValue(key, options) {\n        return this.sendOperationRequest({ key, options }, checkKeyValueOperationSpec);\n    }\n    /**\n     * Gets a list of key-value snapshots.\n     * @param options The options parameters.\n     */\n    getSnapshots(options) {\n        return this.sendOperationRequest({ options }, getSnapshotsOperationSpec);\n    }\n    /**\n     * Requests the headers and status of the given resource.\n     * @param options The options parameters.\n     */\n    checkSnapshots(options) {\n        return this.sendOperationRequest({ options }, checkSnapshotsOperationSpec);\n    }\n    /**\n     * Gets a single key-value snapshot.\n     * @param name The name of the key-value snapshot to retrieve.\n     * @param options The options parameters.\n     */\n    getSnapshot(name, options) {\n        return this.sendOperationRequest({ name, options }, getSnapshotOperationSpec);\n    }\n    /**\n     * Creates a key-value snapshot.\n     * @param name The name of the key-value snapshot to create.\n     * @param entity The key-value snapshot to create.\n     * @param options The options parameters.\n     */\n    async beginCreateSnapshot(name, entity, options) {\n        const directSendOperation = async (args, spec) => {\n            return this.sendOperationRequest(args, spec);\n        };\n        const sendOperationFn = async (args, spec) => {\n            var _a;\n            let currentRawResponse = undefined;\n            const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;\n            const callback = (rawResponse, flatResponse) => {\n                currentRawResponse = rawResponse;\n                providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);\n            };\n            const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });\n            const flatResponse = await directSendOperation(updatedArgs, spec);\n            return {\n                flatResponse,\n                rawResponse: {\n                    statusCode: currentRawResponse.status,\n                    body: currentRawResponse.parsedBody,\n                    headers: currentRawResponse.headers.toJSON(),\n                },\n            };\n        };\n        const lro = createLroSpec({\n            sendOperationFn,\n            args: { name, entity, options },\n            spec: createSnapshotOperationSpec,\n        });\n        const poller = await createHttpPoller(lro, {\n            restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,\n            intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,\n        });\n        await poller.poll();\n        return poller;\n    }\n    /**\n     * Creates a key-value snapshot.\n     * @param name The name of the key-value snapshot to create.\n     * @param entity The key-value snapshot to create.\n     * @param options The options parameters.\n     */\n    async beginCreateSnapshotAndWait(name, entity, options) {\n        const poller = await this.beginCreateSnapshot(name, entity, options);\n        return poller.pollUntilDone();\n    }\n    /**\n     * Updates the state of a key-value snapshot.\n     * @param name The name of the key-value snapshot to update.\n     * @param entity The parameters used to update the snapshot.\n     * @param options The options parameters.\n     */\n    updateSnapshot(name, entity, options) {\n        return this.sendOperationRequest({ name, entity, options }, updateSnapshotOperationSpec);\n    }\n    /**\n     * Requests the headers and status of the given resource.\n     * @param name The name of the key-value snapshot to check.\n     * @param options The options parameters.\n     */\n    checkSnapshot(name, options) {\n        return this.sendOperationRequest({ name, options }, checkSnapshotOperationSpec);\n    }\n    /**\n     * Gets a list of labels.\n     * @param options The options parameters.\n     */\n    getLabels(options) {\n        return this.sendOperationRequest({ options }, getLabelsOperationSpec);\n    }\n    /**\n     * Requests the headers and status of the given resource.\n     * @param options The options parameters.\n     */\n    checkLabels(options) {\n        return this.sendOperationRequest({ options }, checkLabelsOperationSpec);\n    }\n    /**\n     * Locks a key-value.\n     * @param key The key of the key-value to lock.\n     * @param options The options parameters.\n     */\n    putLock(key, options) {\n        return this.sendOperationRequest({ key, options }, putLockOperationSpec);\n    }\n    /**\n     * Unlocks a key-value.\n     * @param key The key of the key-value to unlock.\n     * @param options The options parameters.\n     */\n    deleteLock(key, options) {\n        return this.sendOperationRequest({ key, options }, deleteLockOperationSpec);\n    }\n    /**\n     * Gets a list of key-value revisions.\n     * @param options The options parameters.\n     */\n    getRevisions(options) {\n        return this.sendOperationRequest({ options }, getRevisionsOperationSpec);\n    }\n    /**\n     * Requests the headers and status of the given resource.\n     * @param options The options parameters.\n     */\n    checkRevisions(options) {\n        return this.sendOperationRequest({ options }, checkRevisionsOperationSpec);\n    }\n    /**\n     * Gets the state of a long running operation.\n     * @param snapshot Snapshot identifier for the long running operation.\n     * @param options The options parameters.\n     */\n    getOperationDetails(snapshot, options) {\n        return this.sendOperationRequest({ snapshot, options }, getOperationDetailsOperationSpec);\n    }\n    /**\n     * GetKeysNext\n     * @param nextLink The nextLink from the previous successful call to the GetKeys method.\n     * @param options The options parameters.\n     */\n    getKeysNext(nextLink, options) {\n        return this.sendOperationRequest({ nextLink, options }, getKeysNextOperationSpec);\n    }\n    /**\n     * GetKeyValuesNext\n     * @param nextLink The nextLink from the previous successful call to the GetKeyValues method.\n     * @param options The options parameters.\n     */\n    getKeyValuesNext(nextLink, options) {\n        return this.sendOperationRequest({ nextLink, options }, getKeyValuesNextOperationSpec);\n    }\n    /**\n     * GetSnapshotsNext\n     * @param nextLink The nextLink from the previous successful call to the GetSnapshots method.\n     * @param options The options parameters.\n     */\n    getSnapshotsNext(nextLink, options) {\n        return this.sendOperationRequest({ nextLink, options }, getSnapshotsNextOperationSpec);\n    }\n    /**\n     * GetLabelsNext\n     * @param nextLink The nextLink from the previous successful call to the GetLabels method.\n     * @param options The options parameters.\n     */\n    getLabelsNext(nextLink, options) {\n        return this.sendOperationRequest({ nextLink, options }, getLabelsNextOperationSpec);\n    }\n    /**\n     * GetRevisionsNext\n     * @param nextLink The nextLink from the previous successful call to the GetRevisions method.\n     * @param options The options parameters.\n     */\n    getRevisionsNext(nextLink, options) {\n        return this.sendOperationRequest({ nextLink, options }, getRevisionsNextOperationSpec);\n    }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\nconst getKeysOperationSpec = {\n    path: \"/keys\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.KeyListResult,\n            headersMapper: Mappers.AppConfigurationGetKeysHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    queryParameters: [Parameters.name, Parameters.apiVersion, Parameters.after],\n    urlParameters: [Parameters.endpoint],\n    headerParameters: [\n        Parameters.accept,\n        Parameters.syncToken,\n        Parameters.acceptDatetime,\n    ],\n    serializer,\n};\nconst checkKeysOperationSpec = {\n    path: \"/keys\",\n    httpMethod: \"HEAD\",\n    responses: {\n        200: {\n            headersMapper: Mappers.AppConfigurationCheckKeysHeaders,\n        },\n        default: {},\n    },\n    queryParameters: [Parameters.name, Parameters.apiVersion, Parameters.after],\n    urlParameters: [Parameters.endpoint],\n    headerParameters: [Parameters.syncToken, Parameters.acceptDatetime],\n    serializer,\n};\nconst getKeyValuesOperationSpec = {\n    path: \"/kv\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.KeyValueListResult,\n            headersMapper: Mappers.AppConfigurationGetKeyValuesHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    queryParameters: [\n        Parameters.apiVersion,\n        Parameters.after,\n        Parameters.key,\n        Parameters.label,\n        Parameters.select,\n        Parameters.snapshot,\n        Parameters.tags,\n    ],\n    urlParameters: [Parameters.endpoint],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.acceptDatetime,\n        Parameters.accept1,\n        Parameters.ifMatch,\n        Parameters.ifNoneMatch,\n    ],\n    serializer,\n};\nconst checkKeyValuesOperationSpec = {\n    path: \"/kv\",\n    httpMethod: \"HEAD\",\n    responses: {\n        200: {\n            headersMapper: Mappers.AppConfigurationCheckKeyValuesHeaders,\n        },\n        default: {},\n    },\n    queryParameters: [\n        Parameters.apiVersion,\n        Parameters.after,\n        Parameters.key,\n        Parameters.label,\n        Parameters.select,\n        Parameters.snapshot,\n        Parameters.tags,\n    ],\n    urlParameters: [Parameters.endpoint],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.acceptDatetime,\n        Parameters.ifMatch,\n        Parameters.ifNoneMatch,\n    ],\n    serializer,\n};\nconst getKeyValueOperationSpec = {\n    path: \"/kv/{key}\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.KeyValue,\n            headersMapper: Mappers.AppConfigurationGetKeyValueHeaders,\n        },\n        304: {\n            headersMapper: Mappers.AppConfigurationGetKeyValueHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    queryParameters: [Parameters.apiVersion, Parameters.label, Parameters.select],\n    urlParameters: [Parameters.endpoint, Parameters.key1],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.acceptDatetime,\n        Parameters.ifMatch,\n        Parameters.ifNoneMatch,\n        Parameters.accept2,\n    ],\n    serializer,\n};\nconst putKeyValueOperationSpec = {\n    path: \"/kv/{key}\",\n    httpMethod: \"PUT\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.KeyValue,\n            headersMapper: Mappers.AppConfigurationPutKeyValueHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    requestBody: Parameters.entity,\n    queryParameters: [Parameters.apiVersion, Parameters.label],\n    urlParameters: [Parameters.endpoint, Parameters.key1],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.ifMatch,\n        Parameters.ifNoneMatch,\n        Parameters.accept2,\n        Parameters.contentType,\n    ],\n    mediaType: \"json\",\n    serializer,\n};\nconst deleteKeyValueOperationSpec = {\n    path: \"/kv/{key}\",\n    httpMethod: \"DELETE\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.KeyValue,\n            headersMapper: Mappers.AppConfigurationDeleteKeyValueHeaders,\n        },\n        204: {\n            headersMapper: Mappers.AppConfigurationDeleteKeyValueHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    queryParameters: [Parameters.apiVersion, Parameters.label],\n    urlParameters: [Parameters.endpoint, Parameters.key1],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.ifMatch,\n        Parameters.accept2,\n    ],\n    serializer,\n};\nconst checkKeyValueOperationSpec = {\n    path: \"/kv/{key}\",\n    httpMethod: \"HEAD\",\n    responses: {\n        200: {\n            headersMapper: Mappers.AppConfigurationCheckKeyValueHeaders,\n        },\n        304: {\n            headersMapper: Mappers.AppConfigurationCheckKeyValueHeaders,\n        },\n        default: {},\n    },\n    queryParameters: [Parameters.apiVersion, Parameters.label, Parameters.select],\n    urlParameters: [Parameters.endpoint, Parameters.key1],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.acceptDatetime,\n        Parameters.ifMatch,\n        Parameters.ifNoneMatch,\n    ],\n    serializer,\n};\nconst getSnapshotsOperationSpec = {\n    path: \"/snapshots\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.SnapshotListResult,\n            headersMapper: Mappers.AppConfigurationGetSnapshotsHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    queryParameters: [\n        Parameters.name,\n        Parameters.apiVersion,\n        Parameters.after,\n        Parameters.select1,\n        Parameters.status,\n    ],\n    urlParameters: [Parameters.endpoint],\n    headerParameters: [Parameters.syncToken, Parameters.accept3],\n    serializer,\n};\nconst checkSnapshotsOperationSpec = {\n    path: \"/snapshots\",\n    httpMethod: \"HEAD\",\n    responses: {\n        200: {\n            headersMapper: Mappers.AppConfigurationCheckSnapshotsHeaders,\n        },\n        default: {},\n    },\n    queryParameters: [Parameters.apiVersion, Parameters.after],\n    urlParameters: [Parameters.endpoint],\n    headerParameters: [Parameters.syncToken],\n    serializer,\n};\nconst getSnapshotOperationSpec = {\n    path: \"/snapshots/{name}\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.ConfigurationSnapshot,\n            headersMapper: Mappers.AppConfigurationGetSnapshotHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    queryParameters: [Parameters.apiVersion, Parameters.select1],\n    urlParameters: [Parameters.endpoint, Parameters.name1],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.ifMatch,\n        Parameters.ifNoneMatch,\n        Parameters.accept4,\n    ],\n    serializer,\n};\nconst createSnapshotOperationSpec = {\n    path: \"/snapshots/{name}\",\n    httpMethod: \"PUT\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.ConfigurationSnapshot,\n            headersMapper: Mappers.AppConfigurationCreateSnapshotHeaders,\n        },\n        201: {\n            bodyMapper: Mappers.ConfigurationSnapshot,\n            headersMapper: Mappers.AppConfigurationCreateSnapshotHeaders,\n        },\n        202: {\n            bodyMapper: Mappers.ConfigurationSnapshot,\n            headersMapper: Mappers.AppConfigurationCreateSnapshotHeaders,\n        },\n        204: {\n            bodyMapper: Mappers.ConfigurationSnapshot,\n            headersMapper: Mappers.AppConfigurationCreateSnapshotHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    requestBody: Parameters.entity1,\n    queryParameters: [Parameters.apiVersion],\n    urlParameters: [Parameters.endpoint, Parameters.name2],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.accept4,\n        Parameters.contentType1,\n    ],\n    mediaType: \"json\",\n    serializer,\n};\nconst updateSnapshotOperationSpec = {\n    path: \"/snapshots/{name}\",\n    httpMethod: \"PATCH\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.ConfigurationSnapshot,\n            headersMapper: Mappers.AppConfigurationUpdateSnapshotHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    requestBody: Parameters.entity2,\n    queryParameters: [Parameters.apiVersion],\n    urlParameters: [Parameters.endpoint, Parameters.name1],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.ifMatch,\n        Parameters.ifNoneMatch,\n        Parameters.accept4,\n        Parameters.contentType2,\n    ],\n    mediaType: \"json\",\n    serializer,\n};\nconst checkSnapshotOperationSpec = {\n    path: \"/snapshots/{name}\",\n    httpMethod: \"HEAD\",\n    responses: {\n        200: {\n            headersMapper: Mappers.AppConfigurationCheckSnapshotHeaders,\n        },\n        default: {},\n    },\n    queryParameters: [Parameters.apiVersion],\n    urlParameters: [Parameters.endpoint, Parameters.name1],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.ifMatch,\n        Parameters.ifNoneMatch,\n    ],\n    serializer,\n};\nconst getLabelsOperationSpec = {\n    path: \"/labels\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.LabelListResult,\n            headersMapper: Mappers.AppConfigurationGetLabelsHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    queryParameters: [\n        Parameters.name,\n        Parameters.apiVersion,\n        Parameters.after,\n        Parameters.select2,\n    ],\n    urlParameters: [Parameters.endpoint],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.acceptDatetime,\n        Parameters.accept5,\n    ],\n    serializer,\n};\nconst checkLabelsOperationSpec = {\n    path: \"/labels\",\n    httpMethod: \"HEAD\",\n    responses: {\n        200: {\n            headersMapper: Mappers.AppConfigurationCheckLabelsHeaders,\n        },\n        default: {},\n    },\n    queryParameters: [\n        Parameters.name,\n        Parameters.apiVersion,\n        Parameters.after,\n        Parameters.select2,\n    ],\n    urlParameters: [Parameters.endpoint],\n    headerParameters: [Parameters.syncToken, Parameters.acceptDatetime],\n    serializer,\n};\nconst putLockOperationSpec = {\n    path: \"/locks/{key}\",\n    httpMethod: \"PUT\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.KeyValue,\n            headersMapper: Mappers.AppConfigurationPutLockHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    queryParameters: [Parameters.apiVersion, Parameters.label],\n    urlParameters: [Parameters.endpoint, Parameters.key1],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.ifMatch,\n        Parameters.ifNoneMatch,\n        Parameters.accept2,\n    ],\n    serializer,\n};\nconst deleteLockOperationSpec = {\n    path: \"/locks/{key}\",\n    httpMethod: \"DELETE\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.KeyValue,\n            headersMapper: Mappers.AppConfigurationDeleteLockHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    queryParameters: [Parameters.apiVersion, Parameters.label],\n    urlParameters: [Parameters.endpoint, Parameters.key1],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.ifMatch,\n        Parameters.ifNoneMatch,\n        Parameters.accept2,\n    ],\n    serializer,\n};\nconst getRevisionsOperationSpec = {\n    path: \"/revisions\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.KeyValueListResult,\n            headersMapper: Mappers.AppConfigurationGetRevisionsHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    queryParameters: [\n        Parameters.apiVersion,\n        Parameters.after,\n        Parameters.key,\n        Parameters.label,\n        Parameters.select,\n        Parameters.tags,\n    ],\n    urlParameters: [Parameters.endpoint],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.acceptDatetime,\n        Parameters.accept1,\n    ],\n    serializer,\n};\nconst checkRevisionsOperationSpec = {\n    path: \"/revisions\",\n    httpMethod: \"HEAD\",\n    responses: {\n        200: {\n            headersMapper: Mappers.AppConfigurationCheckRevisionsHeaders,\n        },\n        default: {},\n    },\n    queryParameters: [\n        Parameters.apiVersion,\n        Parameters.after,\n        Parameters.key,\n        Parameters.label,\n        Parameters.select,\n        Parameters.tags,\n    ],\n    urlParameters: [Parameters.endpoint],\n    headerParameters: [Parameters.syncToken, Parameters.acceptDatetime],\n    serializer,\n};\nconst getOperationDetailsOperationSpec = {\n    path: \"/operations\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.OperationDetails,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    queryParameters: [Parameters.apiVersion, Parameters.snapshot1],\n    urlParameters: [Parameters.endpoint],\n    headerParameters: [Parameters.accept6],\n    serializer,\n};\nconst getKeysNextOperationSpec = {\n    path: \"{nextLink}\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.KeyListResult,\n            headersMapper: Mappers.AppConfigurationGetKeysNextHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    urlParameters: [Parameters.endpoint, Parameters.nextLink],\n    headerParameters: [\n        Parameters.accept,\n        Parameters.syncToken,\n        Parameters.acceptDatetime,\n    ],\n    serializer,\n};\nconst getKeyValuesNextOperationSpec = {\n    path: \"{nextLink}\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.KeyValueListResult,\n            headersMapper: Mappers.AppConfigurationGetKeyValuesNextHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    urlParameters: [Parameters.endpoint, Parameters.nextLink],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.acceptDatetime,\n        Parameters.accept1,\n        Parameters.ifMatch,\n        Parameters.ifNoneMatch,\n    ],\n    serializer,\n};\nconst getSnapshotsNextOperationSpec = {\n    path: \"{nextLink}\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.SnapshotListResult,\n            headersMapper: Mappers.AppConfigurationGetSnapshotsNextHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    urlParameters: [Parameters.endpoint, Parameters.nextLink],\n    headerParameters: [Parameters.syncToken, Parameters.accept3],\n    serializer,\n};\nconst getLabelsNextOperationSpec = {\n    path: \"{nextLink}\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.LabelListResult,\n            headersMapper: Mappers.AppConfigurationGetLabelsNextHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    urlParameters: [Parameters.endpoint, Parameters.nextLink],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.acceptDatetime,\n        Parameters.accept5,\n    ],\n    serializer,\n};\nconst getRevisionsNextOperationSpec = {\n    path: \"{nextLink}\",\n    httpMethod: \"GET\",\n    responses: {\n        200: {\n            bodyMapper: Mappers.KeyValueListResult,\n            headersMapper: Mappers.AppConfigurationGetRevisionsNextHeaders,\n        },\n        default: {\n            bodyMapper: Mappers.ErrorModel,\n        },\n    },\n    urlParameters: [Parameters.endpoint, Parameters.nextLink],\n    headerParameters: [\n        Parameters.syncToken,\n        Parameters.acceptDatetime,\n        Parameters.accept1,\n    ],\n    serializer,\n};\n","/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport { __rest } from \"tslib\";\nexport function createLroSpec(inputs) {\n    const { args, spec, sendOperationFn } = inputs;\n    return {\n        requestMethod: spec.httpMethod,\n        requestPath: spec.path,\n        sendInitialRequest: () => sendOperationFn(args, spec),\n        sendPollRequest: (path, options) => {\n            const { requestBody } = spec, restSpec = __rest(spec, [\"requestBody\"]);\n            return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: \"GET\", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));\n        },\n    };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @internal\n */\nexport const packageVersion = \"1.8.0\";\n/**\n * @internal\n */\nexport const appConfigurationApiVersion = \"2023-11-01\";\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { packageVersion } from \"./constants.js\";\n/** @internal */\nexport const tracingClient = createTracingClient({\n    namespace: \"Microsoft.AppConfiguration\",\n    packageName: \"@azure/app-configuration\",\n    packageVersion,\n});\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { getPagedAsyncIterator } from \"@azure/core-paging\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { SyncTokens, syncTokenPolicy } from \"./internal/synctokenpolicy.js\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { assertResponse, checkAndFormatIfAndIfNoneMatch, extractAfterTokenFromLinkHeader, extractAfterTokenFromNextLink, formatAcceptDateTime, formatConfigurationSettingsFiltersAndSelect, formatFieldsForSelect, formatFiltersAndSelect, formatLabelsFiltersAndSelect, formatSnapshotFiltersAndSelect, makeConfigurationSettingEmpty, serializeAsConfigurationSettingParam, transformKeyValue, transformKeyValueResponse, transformKeyValueResponseWithStatusCode, transformSnapshotResponse, } from \"./internal/helpers.js\";\nimport { AppConfiguration } from \"./generated/src/appConfiguration.js\";\nimport { appConfigKeyCredentialPolicy } from \"./appConfigCredential.js\";\nimport { tracingClient } from \"./internal/tracing.js\";\nimport { logger } from \"./logger.js\";\nimport { appConfigurationApiVersion } from \"./internal/constants.js\";\nconst ConnectionStringRegex = /Endpoint=(.*);Id=(.*);Secret=(.*)/;\nconst deserializationContentTypes = {\n    json: [\n        \"application/vnd.microsoft.appconfig.kvset+json\",\n        \"application/vnd.microsoft.appconfig.kv+json\",\n        \"application/vnd.microsoft.appconfig.kvs+json\",\n        \"application/vnd.microsoft.appconfig.keyset+json\",\n        \"application/vnd.microsoft.appconfig.revs+json\",\n        \"application/vnd.microsoft.appconfig.snapshotset+json\",\n        \"application/vnd.microsoft.appconfig.snapshot+json\",\n        \"application/vnd.microsoft.appconfig.labelset+json\",\n        \"application/json\",\n    ],\n};\n/**\n * Client for the Azure App Configuration service.\n */\nexport class AppConfigurationClient {\n    constructor(connectionStringOrEndpoint, tokenCredentialOrOptions, options) {\n        var _a;\n        let appConfigOptions = {};\n        let appConfigCredential;\n        let appConfigEndpoint;\n        let authPolicy;\n        if (isTokenCredential(tokenCredentialOrOptions)) {\n            appConfigOptions = options || {};\n            appConfigCredential = tokenCredentialOrOptions;\n            appConfigEndpoint = connectionStringOrEndpoint.endsWith(\"/\")\n                ? connectionStringOrEndpoint.slice(0, -1)\n                : connectionStringOrEndpoint;\n            authPolicy = bearerTokenAuthenticationPolicy({\n                scopes: `${appConfigEndpoint}/.default`,\n                credential: appConfigCredential,\n            });\n        }\n        else {\n            appConfigOptions = tokenCredentialOrOptions || {};\n            const regexMatch = connectionStringOrEndpoint === null || connectionStringOrEndpoint === void 0 ? void 0 : connectionStringOrEndpoint.match(ConnectionStringRegex);\n            if (regexMatch) {\n                appConfigEndpoint = regexMatch[1];\n                authPolicy = appConfigKeyCredentialPolicy(regexMatch[2], regexMatch[3]);\n            }\n            else {\n                throw new Error(`Invalid connection string. Valid connection strings should match the regex '${ConnectionStringRegex.source}'.` +\n                    ` To mitigate the issue, please refer to the troubleshooting guide here at https://aka.ms/azsdk/js/app-configuration/troubleshoot.`);\n            }\n        }\n        const internalClientPipelineOptions = Object.assign(Object.assign({}, appConfigOptions), { loggingOptions: {\n                logger: logger.info,\n            }, deserializationOptions: {\n                expectedContentTypes: deserializationContentTypes,\n            } });\n        this._syncTokens = appConfigOptions.syncTokens || new SyncTokens();\n        this.client = new AppConfiguration(appConfigEndpoint, (_a = options === null || options === void 0 ? void 0 : options.apiVersion) !== null && _a !== void 0 ? _a : appConfigurationApiVersion, internalClientPipelineOptions);\n        this.client.pipeline.addPolicy(authPolicy, { phase: \"Sign\" });\n        this.client.pipeline.addPolicy(syncTokenPolicy(this._syncTokens), { afterPhase: \"Retry\" });\n    }\n    /**\n     * Add a setting into the Azure App Configuration service, failing if it\n     * already exists.\n     *\n     * Example usage:\n     * ```ts\n     * const result = await client.addConfigurationSetting({ key: \"MyKey\", label: \"MyLabel\", value: \"MyValue\" });\n     * ```\n     * @param configurationSetting - A configuration setting.\n     * @param options - Optional parameters for the request.\n     */\n    addConfigurationSetting(configurationSetting, options = {}) {\n        return tracingClient.withSpan(\"AppConfigurationClient.addConfigurationSetting\", options, async (updatedOptions) => {\n            const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n            logger.info(\"[addConfigurationSetting] Creating a key value pair\");\n            try {\n                const originalResponse = await this.client.putKeyValue(configurationSetting.key, Object.assign({ ifNoneMatch: \"*\", label: configurationSetting.label, entity: keyValue }, updatedOptions));\n                const response = transformKeyValueResponse(originalResponse);\n                assertResponse(response);\n                return response;\n            }\n            catch (error) {\n                const err = error;\n                // Service does not return an error message. Raise a 412 error similar to .NET\n                if (err.statusCode === 412) {\n                    err.message = `Status 412: Setting was already present`;\n                }\n                throw err;\n            }\n            throw new Error(\"Unreachable code\");\n        });\n    }\n    /**\n     * Delete a setting from the Azure App Configuration service\n     *\n     * Example usage:\n     * ```ts\n     * const deletedSetting = await client.deleteConfigurationSetting({ key: \"MyKey\", label: \"MyLabel\" });\n     * ```\n     * @param id - The id of the configuration setting to delete.\n     * @param options - Optional parameters for the request (ex: etag, label)\n     */\n    deleteConfigurationSetting(id, options = {}) {\n        return tracingClient.withSpan(\"AppConfigurationClient.deleteConfigurationSetting\", options, async (updatedOptions) => {\n            let status;\n            logger.info(\"[deleteConfigurationSetting] Deleting key value pair\");\n            const originalResponse = await this.client.deleteKeyValue(id.key, Object.assign(Object.assign(Object.assign({ label: id.label }, updatedOptions), checkAndFormatIfAndIfNoneMatch(id, options)), { onResponse: (response) => {\n                    status = response.status;\n                } }));\n            const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n            assertResponse(response);\n            return response;\n        });\n    }\n    /**\n     * Gets a setting from the Azure App Configuration service.\n     *\n     * Example code:\n     * ```ts\n     * const setting = await client.getConfigurationSetting({ key: \"MyKey\", label: \"MyLabel\" });\n     * ```\n     * @param id - The id of the configuration setting to get.\n     * @param options - Optional parameters for the request.\n     */\n    async getConfigurationSetting(id, options = {}) {\n        return tracingClient.withSpan(\"AppConfigurationClient.getConfigurationSetting\", options, async (updatedOptions) => {\n            let status;\n            logger.info(\"[getConfigurationSetting] Getting key value pair\");\n            const originalResponse = await this.client.getKeyValue(id.key, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, updatedOptions), { label: id.label, select: formatFieldsForSelect(options.fields) }), formatAcceptDateTime(options)), checkAndFormatIfAndIfNoneMatch(id, options)), { onResponse: (response) => {\n                    status = response.status;\n                } }));\n            const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n            // 304 only comes back if the user has passed a conditional option in their\n            // request _and_ the remote object has the same etag as what the user passed.\n            if (response.statusCode === 304) {\n                // this is one of our few 'required' fields so we'll make sure it does get initialized\n                // with a value\n                response.key = id.key;\n                // and now we'll undefine all the other properties that are not HTTP related\n                makeConfigurationSettingEmpty(response);\n            }\n            assertResponse(response);\n            return response;\n        });\n    }\n    /**\n     * Lists settings from the Azure App Configuration service, optionally\n     * filtered by key names, labels and accept datetime.\n     *\n     * Example code:\n     * ```ts\n     * const allSettingsWithLabel = client.listConfigurationSettings({ labelFilter: \"MyLabel\" });\n     * ```\n     * @param options - Optional parameters for the request.\n     */\n    listConfigurationSettings(options = {}) {\n        const pageEtags = options.pageEtags ? [...options.pageEtags] : undefined;\n        delete options.pageEtags;\n        const pagedResult = {\n            firstPageLink: undefined,\n            getPage: async (pageLink) => {\n                var _a, _b, _c;\n                const etag = pageEtags === null || pageEtags === void 0 ? void 0 : pageEtags.shift();\n                try {\n                    const response = await this.sendConfigurationSettingsRequest(Object.assign(Object.assign({}, options), { etag }), pageLink);\n                    const currentResponse = Object.assign(Object.assign({}, response), { items: response.items != null ? (_a = response.items) === null || _a === void 0 ? void 0 : _a.map(transformKeyValue) : [], continuationToken: response.nextLink\n                            ? extractAfterTokenFromNextLink(response.nextLink)\n                            : undefined, _response: response._response });\n                    return {\n                        page: currentResponse,\n                        nextPageLink: currentResponse.continuationToken,\n                    };\n                }\n                catch (error) {\n                    const err = error;\n                    const link = (_c = (_b = err.response) === null || _b === void 0 ? void 0 : _b.headers) === null || _c === void 0 ? void 0 : _c.get(\"link\");\n                    const continuationToken = link ? extractAfterTokenFromLinkHeader(link) : undefined;\n                    if (err.statusCode === 304) {\n                        err.message = `Status 304: No updates for this page`;\n                        logger.info(`[listConfigurationSettings] No updates for this page. The current etag for the page is ${etag}`);\n                        return {\n                            page: {\n                                items: [],\n                                etag,\n                                _response: Object.assign(Object.assign({}, err.response), { status: 304 }),\n                            },\n                            nextPageLink: continuationToken,\n                        };\n                    }\n                    throw err;\n                }\n            },\n            toElements: (page) => page.items,\n        };\n        return getPagedAsyncIterator(pagedResult);\n    }\n    /**\n     * Lists settings from the Azure App Configuration service for snapshots based on name, optionally\n     * filtered by key names, labels and accept datetime.\n     *\n     * Example code:\n     * ```ts\n     * const allSettingsWithLabel = client.listConfigurationSettingsForSnashots({ snapshotName: \"MySnapshot\" });\n     * ```\n     * @param options - Optional parameters for the request.\n     */\n    listConfigurationSettingsForSnapshot(snapshotName, options = {}) {\n        const pagedResult = {\n            firstPageLink: undefined,\n            getPage: async (pageLink) => {\n                var _a;\n                const response = await this.sendConfigurationSettingsRequest(Object.assign({ snapshotName }, options), pageLink);\n                const currentResponse = Object.assign(Object.assign({}, response), { items: response.items != null ? (_a = response.items) === null || _a === void 0 ? void 0 : _a.map(transformKeyValue) : [], continuationToken: response.nextLink\n                        ? extractAfterTokenFromNextLink(response.nextLink)\n                        : undefined });\n                return {\n                    page: currentResponse,\n                    nextPageLink: currentResponse.continuationToken,\n                };\n            },\n            toElements: (page) => page.items,\n        };\n        return getPagedAsyncIterator(pagedResult);\n    }\n    /**\n     * Get a list of labels from the Azure App Configuration service\n     *\n     * Example code:\n     * ```ts\n     * const allSettingsWithLabel = client.listLabels({ nameFilter: \"prod*\" });\n     * ```\n     * @param options - Optional parameters for the request.\n     */\n    listLabels(options = {}) {\n        const pagedResult = {\n            firstPageLink: undefined,\n            getPage: async (pageLink) => {\n                var _a;\n                const response = await this.sendLabelsRequest(options, pageLink);\n                const currentResponse = Object.assign(Object.assign({}, response), { items: (_a = response.items) !== null && _a !== void 0 ? _a : [], continuationToken: response.nextLink\n                        ? extractAfterTokenFromNextLink(response.nextLink)\n                        : undefined, _response: response._response });\n                return {\n                    page: currentResponse,\n                    nextPageLink: currentResponse.continuationToken,\n                };\n            },\n            toElements: (page) => page.items,\n        };\n        return getPagedAsyncIterator(pagedResult);\n    }\n    async sendLabelsRequest(options = {}, pageLink) {\n        return tracingClient.withSpan(\"AppConfigurationClient.listConfigurationSettings\", options, async (updatedOptions) => {\n            const response = await this.client.getLabels(Object.assign(Object.assign(Object.assign(Object.assign({}, updatedOptions), formatAcceptDateTime(options)), formatLabelsFiltersAndSelect(options)), { after: pageLink }));\n            return response;\n        });\n    }\n    async sendConfigurationSettingsRequest(options = {}, pageLink) {\n        return tracingClient.withSpan(\"AppConfigurationClient.listConfigurationSettings\", options, async (updatedOptions) => {\n            const response = await this.client.getKeyValues(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, updatedOptions), formatAcceptDateTime(options)), formatConfigurationSettingsFiltersAndSelect(options)), checkAndFormatIfAndIfNoneMatch({ etag: options.etag }, { onlyIfChanged: true })), { after: pageLink }));\n            return response;\n        });\n    }\n    /**\n     * Lists revisions of a set of keys, optionally filtered by key names,\n     * labels and accept datetime.\n     *\n     * Example code:\n     * ```ts\n     * const revisionsIterator = client.listRevisions({ keys: [\"MyKey\"] });\n     * ```\n     * @param options - Optional parameters for the request.\n     */\n    listRevisions(options) {\n        const pagedResult = {\n            firstPageLink: undefined,\n            getPage: async (pageLink) => {\n                const response = await this.sendRevisionsRequest(options, pageLink);\n                const currentResponse = Object.assign(Object.assign({}, response), { items: response.items != null ? response.items.map(transformKeyValue) : [], continuationToken: response.nextLink\n                        ? extractAfterTokenFromNextLink(response.nextLink)\n                        : undefined });\n                // let itemList = currentResponse.items;\n                return {\n                    page: currentResponse,\n                    nextPageLink: currentResponse.continuationToken,\n                };\n            },\n            toElements: (page) => page.items,\n        };\n        return getPagedAsyncIterator(pagedResult);\n    }\n    async sendRevisionsRequest(options = {}, pageLink) {\n        return tracingClient.withSpan(\"AppConfigurationClient.listRevisions\", options, async (updatedOptions) => {\n            const response = await this.client.getRevisions(Object.assign(Object.assign(Object.assign(Object.assign({}, updatedOptions), formatAcceptDateTime(options)), formatFiltersAndSelect(updatedOptions)), { after: pageLink }));\n            return response;\n        });\n    }\n    /**\n     * Sets the value of a key in the Azure App Configuration service, allowing for an optional etag.\n     * @param key - The name of the key.\n     * @param configurationSetting - A configuration value.\n     * @param options - Optional parameters for the request.\n     *\n     * Example code:\n     * ```ts\n     * await client.setConfigurationSetting({ key: \"MyKey\", value: \"MyValue\" });\n     * ```\n     */\n    async setConfigurationSetting(configurationSetting, options = {}) {\n        return tracingClient.withSpan(\"AppConfigurationClient.setConfigurationSetting\", options, async (updatedOptions) => {\n            const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n            logger.info(\"[setConfigurationSetting] Setting new key value\");\n            const response = transformKeyValueResponse(await this.client.putKeyValue(configurationSetting.key, Object.assign(Object.assign(Object.assign({}, updatedOptions), { label: configurationSetting.label, entity: keyValue }), checkAndFormatIfAndIfNoneMatch(configurationSetting, options))));\n            assertResponse(response);\n            return response;\n        });\n    }\n    /**\n     * Sets or clears a key's read-only status.\n     * @param id - The id of the configuration setting to modify.\n     */\n    async setReadOnly(id, readOnly, options = {}) {\n        return tracingClient.withSpan(\"AppConfigurationClient.setReadOnly\", options, async (newOptions) => {\n            let response;\n            if (readOnly) {\n                logger.info(\"[setReadOnly] Setting read-only status to ${readOnly}\");\n                response = await this.client.putLock(id.key, Object.assign(Object.assign(Object.assign({}, newOptions), { label: id.label }), checkAndFormatIfAndIfNoneMatch(id, options)));\n            }\n            else {\n                logger.info(\"[setReadOnly] Deleting read-only lock\");\n                response = await this.client.deleteLock(id.key, Object.assign(Object.assign(Object.assign({}, newOptions), { label: id.label }), checkAndFormatIfAndIfNoneMatch(id, options)));\n            }\n            response = transformKeyValueResponse(response);\n            assertResponse(response);\n            return response;\n        });\n    }\n    /**\n     * Adds an external synchronization token to ensure service requests receive up-to-date values.\n     *\n     * @param syncToken - The synchronization token value.\n     */\n    updateSyncToken(syncToken) {\n        this._syncTokens.addSyncTokenFromHeaderValue(syncToken);\n    }\n    /**\n     * Begins creating a snapshot for Azure App Configuration service, fails if it\n     * already exists.\n     */\n    beginCreateSnapshot(snapshot, \n    // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n    options = {}) {\n        return tracingClient.withSpan(`${AppConfigurationClient.name}.beginCreateSnapshot`, options, (updatedOptions) => this.client.beginCreateSnapshot(snapshot.name, snapshot, Object.assign({}, updatedOptions)));\n    }\n    /**\n     * Begins creating a snapshot for Azure App Configuration service, waits until it is done,\n     * fails if it already exists.\n     */\n    beginCreateSnapshotAndWait(snapshot, \n    // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n    options = {}) {\n        return tracingClient.withSpan(`${AppConfigurationClient.name}.beginCreateSnapshotAndWait`, options, (updatedOptions) => this.client.beginCreateSnapshotAndWait(snapshot.name, snapshot, Object.assign({}, updatedOptions)));\n    }\n    /**\n     * Get a snapshot from Azure App Configuration service\n     *\n     * Example usage:\n     * ```ts\n     * const result = await client.getSnapshot(\"MySnapshot\");\n     * ```\n     * @param name - The name of the snapshot.\n     * @param options - Optional parameters for the request.\n     */\n    getSnapshot(name, options = {}) {\n        return tracingClient.withSpan(\"AppConfigurationClient.getSnapshot\", options, async (updatedOptions) => {\n            logger.info(\"[getSnapshot] Get a snapshot\");\n            const originalResponse = await this.client.getSnapshot(name, Object.assign({}, updatedOptions));\n            const response = transformSnapshotResponse(originalResponse);\n            assertResponse(response);\n            return response;\n        });\n    }\n    /**\n     * Recover an archived snapshot back to ready status\n     *\n     * Example usage:\n     * ```ts\n     * const result = await client.recoverSnapshot(\"MySnapshot\");\n     * ```\n     * @param name - The name of the snapshot.\n     * @param options - Optional parameters for the request.\n     */\n    recoverSnapshot(name, \n    // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n    options = {}) {\n        return tracingClient.withSpan(\"AppConfigurationClient.recoverSnapshot\", options, async (updatedOptions) => {\n            logger.info(\"[recoverSnapshot] Recover a snapshot\");\n            const originalResponse = await this.client.updateSnapshot(name, { status: \"ready\" }, Object.assign(Object.assign({}, updatedOptions), checkAndFormatIfAndIfNoneMatch({ etag: options.etag }, Object.assign({ onlyIfUnchanged: true }, options))));\n            const response = transformSnapshotResponse(originalResponse);\n            assertResponse(response);\n            return response;\n        });\n    }\n    /**\n     * Archive a ready snapshot\n     *\n     * Example usage:\n     * ```ts\n     * const result = await client.archiveSnapshot({name: \"MySnapshot\"});\n     * ```\n     * @param name - The name of the snapshot.\n     * @param options - Optional parameters for the request.\n     */\n    archiveSnapshot(name, \n    // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n    options = {}) {\n        return tracingClient.withSpan(\"AppConfigurationClient.archiveSnapshot\", options, async (updatedOptions) => {\n            logger.info(\"[archiveSnapshot] Archive a snapshot\");\n            const originalResponse = await this.client.updateSnapshot(name, { status: \"archived\" }, Object.assign(Object.assign({}, updatedOptions), checkAndFormatIfAndIfNoneMatch({ etag: options.etag }, Object.assign({ onlyIfUnchanged: true }, options))));\n            const response = transformSnapshotResponse(originalResponse);\n            assertResponse(response);\n            return response;\n        });\n    }\n    /**\n     * List all snapshots from Azure App Configuration service\n     *\n     * Example usage:\n     * ```ts\n     * const result = await client.listSnapshots();\n     * ```\n     * @param options - Optional parameters for the request.\n     */\n    listSnapshots(options = {}) {\n        const pagedResult = {\n            firstPageLink: undefined,\n            getPage: async (pageLink) => {\n                const response = await this.sendSnapShotsRequest(options, pageLink);\n                const currentResponse = Object.assign(Object.assign({}, response), { items: response.items != null ? response.items : [], continuationToken: response.nextLink\n                        ? extractAfterTokenFromNextLink(response.nextLink)\n                        : undefined });\n                return {\n                    page: currentResponse,\n                    nextPageLink: currentResponse.continuationToken,\n                };\n            },\n            toElements: (page) => page.items,\n        };\n        return getPagedAsyncIterator(pagedResult);\n    }\n    async sendSnapShotsRequest(options = {}, pageLink) {\n        return tracingClient.withSpan(\"AppConfigurationClient.listSnapshots\", options, async (updatedOptions) => {\n            const response = await this.client.getSnapshots(Object.assign(Object.assign(Object.assign({}, updatedOptions), formatSnapshotFiltersAndSelect(options)), { after: pageLink }));\n            return response;\n        });\n    }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/**\n * @internal\n * @param accessToken - Access token\n * @returns Whether a token is bearer type or not\n */\nexport function isBearerToken(accessToken) {\n    return !accessToken.tokenType || accessToken.tokenType === \"Bearer\";\n}\n/**\n * @internal\n * @param accessToken - Access token\n * @returns Whether a token is Pop token or not\n */\nexport function isPopToken(accessToken) {\n    return accessToken.tokenType === \"pop\";\n}\n/**\n * Tests an object to determine whether it implements TokenCredential.\n *\n * @param credential - The assumed TokenCredential to be tested.\n */\nexport function isTokenCredential(credential) {\n    // Check for an object with a 'getToken' function and possibly with\n    // a 'signRequest' function.  We do this check to make sure that\n    // a ServiceClientCredentials implementor (like TokenClientCredentials\n    // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if\n    // it doesn't actually implement TokenCredential also.\n    const castCredential = credential;\n    return (castCredential &&\n        typeof castCredential.getToken === \"function\" &&\n        (castCredential.signRequest === undefined || castCredential.getToken.length > 0));\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { computeSha256Hash, computeSha256Hmac } from \"@azure/core-util\";\nimport { logger } from \"./logger.js\";\n/**\n * Create an HTTP pipeline policy to authenticate a request\n * using an `AzureKeyCredential` for AppConfig.\n */\nexport function appConfigKeyCredentialPolicy(credential, secret) {\n    return {\n        name: \"AppConfigKeyCredentialPolicy\",\n        async sendRequest(request, next) {\n            var _a;\n            const verb = request.method;\n            const utcNow = new Date().toUTCString();\n            logger.info(\"[appConfigKeyCredentialPolicy] Computing SHA-256 from the request body\");\n            const contentHash = await computeSha256Hash(((_a = request.body) === null || _a === void 0 ? void 0 : _a.toString()) || \"\", \"base64\");\n            const signedHeaders = \"x-ms-date;host;x-ms-content-sha256\";\n            const url = new URL(request.url);\n            const query = url.search;\n            const urlPathAndQuery = query ? `${url.pathname}${query}` : url.pathname;\n            const stringToSign = `${verb}\\n${urlPathAndQuery}\\n${utcNow};${url.host};${contentHash}`;\n            logger.info(\"[appConfigKeyCredentialPolicy] Computing a SHA-256 Hmac signature\");\n            const signature = await computeSha256Hmac(secret, stringToSign, \"base64\");\n            request.headers.set(\"x-ms-date\", utcNow);\n            request.headers.set(\"x-ms-content-sha256\", contentHash);\n            // Syntax for Authorization header\n            // Reference - https://docs.microsoft.com/en-us/azure/azure-app-configuration/rest-api-authentication-hmac#syntax\n            request.headers.set(\"Authorization\", `HMAC-SHA256 Credential=${credential}&SignedHeaders=${signedHeaders}&Signature=${signature}`);\n            return next(request);\n        },\n    };\n}\n","import { Injectable } from '@angular/core';\r\nimport { AppConfigurationClient, ConfigurationSetting } from '@azure/app-configuration';\r\nimport { IConfiguration } from './IConfiguration';\r\nimport { environment } from '../../environments/environment';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class ConfigurationService {\r\n    private appConfiguration: IConfiguration | undefined;\r\n    private _listConfigurationSettings = new Array<ConfigurationSetting<string>>();\r\n\r\n    public get configuration(): IConfiguration {\r\n        return this.appConfiguration as IConfiguration;\r\n    }\r\n\r\n    public load(): Promise<void> {\r\n        // eslint-disable-next-line no-async-promise-executor\r\n        return new Promise<void>(async (resolveFn, rejectFn) => {\r\n            try {\r\n                const connectionString = '#{appConfigurationConnectionString}#';\r\n\r\n                if (connectionString.includes('appConfigurationConnectionString')) {\r\n                    this.buildJetfileConfigurationFromLocalFile();\r\n                } else {\r\n                    await this.buildJetfileConfigurationFromAzure(connectionString);\r\n                }\r\n                resolveFn();\r\n            } catch {\r\n                alert('Please try to refresh page or contact administrator.');\r\n                rejectFn();\r\n            }\r\n        });\r\n    }\r\n\r\n    private buildJetfileConfigurationFromLocalFile(): void {\r\n        this.appConfiguration = {\r\n            wugPortalApiUrl: environment.wugPortalApiUrl,\r\n        };\r\n    }\r\n\r\n    private async buildJetfileConfigurationFromAzure(\r\n        connectionString: string,\r\n    ): Promise<IConfiguration> {\r\n        const environmentAlias = '#{environmentAlias}#';\r\n\r\n        if (environmentAlias.includes('environmentAlias')) {\r\n            throw new Error('Environment alias is not defined');\r\n        }\r\n\r\n        await this.initListSettings(connectionString, environmentAlias);\r\n\r\n        this.appConfiguration = {\r\n            wugPortalApiUrl: this.getConfigurationSettingValue('wugPortalApiUrl'),\r\n        };\r\n\r\n        return Promise.resolve(this.appConfiguration);\r\n    }\r\n\r\n    private getConfigurationSettingValue(settingName: string): string {\r\n        const settingValue = this._listConfigurationSettings.find(\r\n            (x) => x.key === settingName,\r\n        )?.value;\r\n\r\n        if (!settingValue && settingValue !== '') {\r\n            throw new Error(\r\n                'setting - ' + nameOf(settingName) + ' is not configured for',\r\n            );\r\n        }\r\n\r\n        return settingValue;\r\n    }\r\n\r\n    private async initListSettings(\r\n        connectionString: string,\r\n        environmentAlias: string,\r\n    ): Promise<Array<ConfigurationSetting<string>>> {\r\n        const client = new AppConfigurationClient(connectionString);\r\n        let iterator = client\r\n            .listConfigurationSettings({ labelFilter: environmentAlias })\r\n            .byPage();\r\n        let response = await iterator.next();\r\n\r\n        if (response.done || !response.value.continuationToken) {\r\n            this._listConfigurationSettings = response.value.items;\r\n            return Promise.resolve(this._listConfigurationSettings);\r\n        }\r\n\r\n        for (let i = 1; i < 10; i++) {\r\n            const marker = response.value.continuationToken;\r\n            iterator = client\r\n                .listConfigurationSettings({ labelFilter: environmentAlias })\r\n                .byPage({\r\n                    continuationToken: marker,\r\n                });\r\n            response = await iterator.next();\r\n            this._listConfigurationSettings = this._listConfigurationSettings.concat(\r\n                response.value.items,\r\n            );\r\n\r\n            if (\r\n                response.done ||\r\n                !response.value.continuationToken ||\r\n                !response.value.items\r\n            ) {\r\n                return Promise.resolve(this._listConfigurationSettings);\r\n            }\r\n        }\r\n\r\n        throw new Error('Max request count to app configuration reached');\r\n    }\r\n}\r\n","export const environment = {\r\n    wugPortalApiUrl: 'https://localhost:62337',\r\n};\r\n","import { Injectable } from '@angular/core';\r\nimport { AppSessionState } from '../models/app-state.model';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class AppSessionStateService {\r\n    public getState(): AppSessionState | null {\r\n        const appSessionStateJson = sessionStorage.getItem('appSessionState');\r\n\r\n        if (appSessionStateJson) {\r\n            const appSessionState = JSON.parse(appSessionStateJson) as AppSessionState;\r\n\r\n            // handle timezone issue\r\n            if (appSessionState.effectiveDateTimestamp) {\r\n                appSessionState.effectiveDate = new Date(\r\n                    appSessionState.effectiveDateTimestamp,\r\n                );\r\n            }\r\n\r\n            if (appSessionState.expirationDateTimestamp) {\r\n                appSessionState.expirationDate = new Date(\r\n                    appSessionState.expirationDateTimestamp,\r\n                );\r\n            }\r\n\r\n            return appSessionState;\r\n        } else {\r\n            return null;\r\n        }\r\n    }\r\n\r\n    public setState(newState: AppSessionState): void {\r\n        // handle timezone issue\r\n        if (newState.effectiveDate) {\r\n            newState.effectiveDateTimestamp = new Date(newState.effectiveDate).getTime();\r\n        }\r\n\r\n        if (newState.expirationDate) {\r\n            newState.expirationDateTimestamp = new Date(\r\n                newState.expirationDate,\r\n            ).getTime();\r\n        }\r\n\r\n        sessionStorage.setItem('appSessionState', JSON.stringify(newState));\r\n    }\r\n\r\n    public getProperty(propertyName: keyof AppSessionState): any {\r\n        const state = this.getState();\r\n        if (state && propertyName in state) {\r\n            return state[propertyName];\r\n        }\r\n        return null;\r\n    }\r\n\r\n    public setProperty(propertyName: keyof AppSessionState, value: any): void {\r\n        const state = this.getState();\r\n        if (state) {\r\n            const updatedState = {\r\n                ...state,\r\n                [propertyName]: value,\r\n            };\r\n            this.setState(updatedState);\r\n        } else {\r\n            const newState = { [propertyName]: value } as AppSessionState;\r\n            this.setState(newState);\r\n        }\r\n    }\r\n\r\n    public clear(): void {\r\n        sessionStorage.removeItem('appSessionState');\r\n    }\r\n\r\n    public getEffectiveDateWithTimeShift(): Date {\r\n        const appState = this.getState();\r\n\r\n        if (!appState) {\r\n            return new Date();\r\n        }\r\n\r\n        const effectiveDate = new Date(appState.effectiveDate);\r\n        effectiveDate.setMinutes(\r\n            effectiveDate.getMinutes() - effectiveDate.getTimezoneOffset(),\r\n        );\r\n\r\n        return effectiveDate;\r\n    }\r\n\r\n    public getExpirationDateWithTimeShift(): Date {\r\n        const appState = this.getState();\r\n\r\n        if (!appState) {\r\n            return new Date();\r\n        }\r\n\r\n        const expirationDate = new Date(appState.expirationDate);\r\n        expirationDate.setMinutes(\r\n            expirationDate.getMinutes() - expirationDate.getTimezoneOffset(),\r\n        );\r\n\r\n        return expirationDate;\r\n    }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { AppSessionStateService } from './app-session-state.service';\r\nimport { AppStateService } from './app-state.service';\r\nimport { SecurityService } from './security.service';\r\nimport { ConfigurationService } from '../app-configuration/configurationService';\r\nimport { InsuredPrincipal } from '../models/insured-principal.model';\r\nimport { Insured } from '../models/insured.model';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class AuthService {\r\n    public constructor(\r\n        private http: HttpClient,\r\n        private securityService: SecurityService,\r\n        private configurationService: ConfigurationService,\r\n        private appStateService: AppStateService,\r\n        private appSessionStateService: AppSessionStateService,\r\n    ) {}\r\n\r\n    public login(email: string, password: string): Observable<InsuredPrincipal> {\r\n        return this.http.post<InsuredPrincipal>(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/login`,\r\n            { email, password },\r\n        );\r\n    }\r\n\r\n    public logOut(): void {\r\n        this.appStateService.setProperty('user', null);\r\n        this.securityService.removeToken();\r\n\r\n        const insured = this.appSessionStateService.getProperty('insured') as Insured;\r\n        insured.id = 0;\r\n        this.appSessionStateService.setProperty('insured', insured);\r\n    }\r\n\r\n    public setCurrentUser(user: InsuredPrincipal): void {\r\n        this.appStateService.setProperty('user', user);\r\n    }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class LoadingService {\r\n    public isLoading$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\r\n\r\n    public constructor() {}\r\n\r\n    public load(): void {\r\n        this.isLoading$.next(true);\r\n    }\r\n\r\n    public unload(): void {\r\n        this.isLoading$.next(false);\r\n    }\r\n}\r\n","export interface Notification {\r\n    message: string;\r\n    type: NotificationType;\r\n}\r\n\r\nexport enum NotificationType {\r\n    Error,\r\n    Information,\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\nimport { Notification, NotificationType } from '../models/notification.model';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class NotificationService {\r\n    public notifications$ = new Subject<Notification>();\r\n\r\n    public constructor() {}\r\n\r\n    public showInformation(message: string): void {\r\n        this.notifications$.next({\r\n            message,\r\n            type: NotificationType.Information,\r\n        } as Notification);\r\n    }\r\n\r\n    public showError(message: string): void {\r\n        this.notifications$.next({\r\n            message,\r\n            type: NotificationType.Error,\r\n        } as Notification);\r\n        console.log(message);\r\n    }\r\n}\r\n","<mat-progress-bar mode=\"indeterminate\" *ngIf=\"isLoading\"></mat-progress-bar>\r\n<router-outlet />\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';\r\nimport { Router, RouterOutlet } from '@angular/router';\r\nimport { AuthService } from './services/auth.service';\r\nimport { LoadingService } from './services/loading.service';\r\nimport { NotificationService } from './services/notification.service';\r\nimport { SecurityService } from './services/security.service';\r\n\r\n@Component({\r\n    selector: 'app-root',\r\n    imports: [RouterOutlet, MatProgressBarModule, MatSnackBarModule, CommonModule],\r\n    templateUrl: './app.component.html',\r\n    styleUrl: './app.component.scss',\r\n})\r\nexport class AppComponent implements OnInit {\r\n    public title = 'wug-repl-portal';\r\n\r\n    public isLoading = false;\r\n\r\n    public constructor(\r\n        private router: Router,\r\n        private authService: AuthService,\r\n        private loadingService: LoadingService,\r\n        private notificationService: NotificationService,\r\n        private securityService: SecurityService,\r\n        private snackBar: MatSnackBar,\r\n    ) {}\r\n\r\n    public ngOnInit(): void {\r\n        if (!this.securityService.isValidToken()) {\r\n            this.logOut();\r\n        }\r\n\r\n        this.loadingService.isLoading$.subscribe({\r\n            next: (value) => (this.isLoading = value),\r\n        });\r\n\r\n        this.notificationService.notifications$.subscribe({\r\n            next: (notification) =>\r\n                this.snackBar.open(notification.message, 'Dismiss', {\r\n                    duration: 5000,\r\n                }),\r\n        });\r\n    }\r\n\r\n    public logOut(): void {\r\n        this.authService.logOut();\r\n        this.router.navigate(['']);\r\n    }\r\n}\r\n","/**\n * @license Angular v19.0.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, ɵChangeDetectionScheduler, ɵRuntimeError, Injectable, InjectionToken, ɵperformanceMarkFeature, makeEnvironmentProviders, RendererFactory2, NgZone, ANIMATION_MODULE_TYPE } from '@angular/core';\nimport { ɵDomRendererFactory2 } from '@angular/platform-browser';\n\nconst ANIMATION_PREFIX = '@';\nclass AsyncAnimationRendererFactory {\n    doc;\n    delegate;\n    zone;\n    animationType;\n    moduleImpl;\n    _rendererFactoryPromise = null;\n    scheduler = inject(ɵChangeDetectionScheduler, { optional: true });\n    loadingSchedulerFn = inject(ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN, {\n        optional: true,\n    });\n    _engine;\n    /**\n     *\n     * @param moduleImpl allows to provide a mock implmentation (or will load the animation module)\n     */\n    constructor(doc, delegate, zone, animationType, moduleImpl) {\n        this.doc = doc;\n        this.delegate = delegate;\n        this.zone = zone;\n        this.animationType = animationType;\n        this.moduleImpl = moduleImpl;\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        // When the root view is removed, the renderer defers the actual work to the\n        // `TransitionAnimationEngine` to do this, and the `TransitionAnimationEngine` doesn't actually\n        // remove the DOM node, but just calls `markElementAsRemoved()`. The actual DOM node is not\n        // removed until `TransitionAnimationEngine` \"flushes\".\n        // Note: we already flush on destroy within the `InjectableAnimationEngine`. The injectable\n        // engine is not provided when async animations are used.\n        this._engine?.flush();\n    }\n    /**\n     * @internal\n     */\n    loadImpl() {\n        // Note on the `.then(m => m)` part below: Closure compiler optimizations in g3 require\n        // `.then` to be present for a dynamic import (or an import should be `await`ed) to detect\n        // the set of imported symbols.\n        const loadFn = () => this.moduleImpl ?? import('@angular/animations/browser').then((m) => m);\n        let moduleImplPromise;\n        if (this.loadingSchedulerFn) {\n            moduleImplPromise = this.loadingSchedulerFn(loadFn);\n        }\n        else {\n            moduleImplPromise = loadFn();\n        }\n        return moduleImplPromise\n            .catch((e) => {\n            throw new ɵRuntimeError(5300 /* RuntimeErrorCode.ANIMATION_RENDERER_ASYNC_LOADING_FAILURE */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                'Async loading for animations package was ' +\n                    'enabled, but loading failed. Angular falls back to using regular rendering. ' +\n                    \"No animations will be displayed and their styles won't be applied.\");\n        })\n            .then(({ ɵcreateEngine, ɵAnimationRendererFactory }) => {\n            // We can't create the renderer yet because we might need the hostElement and the type\n            // Both are provided in createRenderer().\n            this._engine = ɵcreateEngine(this.animationType, this.doc);\n            const rendererFactory = new ɵAnimationRendererFactory(this.delegate, this._engine, this.zone);\n            this.delegate = rendererFactory;\n            return rendererFactory;\n        });\n    }\n    /**\n     * This method is delegating the renderer creation to the factories.\n     * It uses default factory while the animation factory isn't loaded\n     * and will rely on the animation factory once it is loaded.\n     *\n     * Calling this method will trigger as side effect the loading of the animation module\n     * if the renderered component uses animations.\n     */\n    createRenderer(hostElement, rendererType) {\n        const renderer = this.delegate.createRenderer(hostElement, rendererType);\n        if (renderer.ɵtype === 0 /* AnimationRendererType.Regular */) {\n            // The factory is already loaded, this is an animation renderer\n            return renderer;\n        }\n        // We need to prevent the DomRenderer to throw an error because of synthetic properties\n        if (typeof renderer.throwOnSyntheticProps === 'boolean') {\n            renderer.throwOnSyntheticProps = false;\n        }\n        // Using a dynamic renderer to switch the renderer implementation once the module is loaded.\n        const dynamicRenderer = new DynamicDelegationRenderer(renderer);\n        // Kick off the module loading if the component uses animations but the module hasn't been\n        // loaded yet.\n        if (rendererType?.data?.['animation'] && !this._rendererFactoryPromise) {\n            this._rendererFactoryPromise = this.loadImpl();\n        }\n        this._rendererFactoryPromise\n            ?.then((animationRendererFactory) => {\n            const animationRenderer = animationRendererFactory.createRenderer(hostElement, rendererType);\n            dynamicRenderer.use(animationRenderer);\n            this.scheduler?.notify(11 /* NotificationSource.AsyncAnimationsLoaded */);\n        })\n            .catch((e) => {\n            // Permanently use regular renderer when loading fails.\n            dynamicRenderer.use(renderer);\n        });\n        return dynamicRenderer;\n    }\n    begin() {\n        this.delegate.begin?.();\n    }\n    end() {\n        this.delegate.end?.();\n    }\n    whenRenderingDone() {\n        return this.delegate.whenRenderingDone?.() ?? Promise.resolve();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: AsyncAnimationRendererFactory, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: AsyncAnimationRendererFactory });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: AsyncAnimationRendererFactory, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: Document }, { type: i0.RendererFactory2 }, { type: i0.NgZone }, { type: undefined }, { type: Promise }] });\n/**\n * The class allows to dynamicly switch between different renderer implementations\n * by changing the delegate renderer.\n */\nclass DynamicDelegationRenderer {\n    delegate;\n    // List of callbacks that need to be replayed on the animation renderer once its loaded\n    replay = [];\n    ɵtype = 1 /* AnimationRendererType.Delegated */;\n    constructor(delegate) {\n        this.delegate = delegate;\n    }\n    use(impl) {\n        this.delegate = impl;\n        if (this.replay !== null) {\n            // Replay queued actions using the animation renderer to apply\n            // all events and properties collected while loading was in progress.\n            for (const fn of this.replay) {\n                fn(impl);\n            }\n            // Set to `null` to indicate that the queue was processed\n            // and we no longer need to collect events and properties.\n            this.replay = null;\n        }\n    }\n    get data() {\n        return this.delegate.data;\n    }\n    destroy() {\n        this.replay = null;\n        this.delegate.destroy();\n    }\n    createElement(name, namespace) {\n        return this.delegate.createElement(name, namespace);\n    }\n    createComment(value) {\n        return this.delegate.createComment(value);\n    }\n    createText(value) {\n        return this.delegate.createText(value);\n    }\n    get destroyNode() {\n        return this.delegate.destroyNode;\n    }\n    appendChild(parent, newChild) {\n        this.delegate.appendChild(parent, newChild);\n    }\n    insertBefore(parent, newChild, refChild, isMove) {\n        this.delegate.insertBefore(parent, newChild, refChild, isMove);\n    }\n    removeChild(parent, oldChild, isHostElement) {\n        this.delegate.removeChild(parent, oldChild, isHostElement);\n    }\n    selectRootElement(selectorOrNode, preserveContent) {\n        return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n    }\n    parentNode(node) {\n        return this.delegate.parentNode(node);\n    }\n    nextSibling(node) {\n        return this.delegate.nextSibling(node);\n    }\n    setAttribute(el, name, value, namespace) {\n        this.delegate.setAttribute(el, name, value, namespace);\n    }\n    removeAttribute(el, name, namespace) {\n        this.delegate.removeAttribute(el, name, namespace);\n    }\n    addClass(el, name) {\n        this.delegate.addClass(el, name);\n    }\n    removeClass(el, name) {\n        this.delegate.removeClass(el, name);\n    }\n    setStyle(el, style, value, flags) {\n        this.delegate.setStyle(el, style, value, flags);\n    }\n    removeStyle(el, style, flags) {\n        this.delegate.removeStyle(el, style, flags);\n    }\n    setProperty(el, name, value) {\n        // We need to keep track of animation properties set on default renderer\n        // So we can also set them also on the animation renderer\n        if (this.shouldReplay(name)) {\n            this.replay.push((renderer) => renderer.setProperty(el, name, value));\n        }\n        this.delegate.setProperty(el, name, value);\n    }\n    setValue(node, value) {\n        this.delegate.setValue(node, value);\n    }\n    listen(target, eventName, callback) {\n        // We need to keep track of animation events registred by the default renderer\n        // So we can also register them against the animation renderer\n        if (this.shouldReplay(eventName)) {\n            this.replay.push((renderer) => renderer.listen(target, eventName, callback));\n        }\n        return this.delegate.listen(target, eventName, callback);\n    }\n    shouldReplay(propOrEventName) {\n        //`null` indicates that we no longer need to collect events and properties\n        return this.replay !== null && propOrEventName.startsWith(ANIMATION_PREFIX);\n    }\n}\n/**\n * Provides a custom scheduler function for the async loading of the animation package.\n *\n * Private token for investigation purposes\n */\nconst ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN = new InjectionToken(ngDevMode ? 'async_animation_loading_scheduler_fn' : '');\n\n/**\n * Returns the set of dependency-injection providers\n * to enable animations in an application. See [animations guide](guide/animations)\n * to learn more about animations in Angular.\n *\n * When you use this function instead of the eager `provideAnimations()`, animations won't be\n * rendered until the renderer is loaded.\n *\n * @usageNotes\n *\n * The function is useful when you want to enable animations in an application\n * bootstrapped using the `bootstrapApplication` function. In this scenario there\n * is no need to import the `BrowserAnimationsModule` NgModule at all, just add\n * providers returned by this function to the `providers` list as show below.\n *\n * ```ts\n * bootstrapApplication(RootComponent, {\n *   providers: [\n *     provideAnimationsAsync()\n *   ]\n * });\n * ```\n *\n * @param type pass `'noop'` as argument to disable animations.\n *\n * @publicApi\n */\nfunction provideAnimationsAsync(type = 'animations') {\n    ɵperformanceMarkFeature('NgAsyncAnimations');\n    return makeEnvironmentProviders([\n        {\n            provide: RendererFactory2,\n            useFactory: (doc, renderer, zone) => {\n                return new AsyncAnimationRendererFactory(doc, renderer, zone, type);\n            },\n            deps: [DOCUMENT, ɵDomRendererFactory2, NgZone],\n        },\n        {\n            provide: ANIMATION_MODULE_TYPE,\n            useValue: type === 'noop' ? 'NoopAnimations' : 'BrowserAnimations',\n        },\n    ]);\n}\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation browser package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { provideAnimationsAsync, ɵASYNC_ANIMATION_LOADING_SCHEDULER_FN, AsyncAnimationRendererFactory as ɵAsyncAnimationRendererFactory };\n","import { Injectable } from '@angular/core';\r\nimport { ConfigurationService } from './configurationService';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AppInitializer {\r\n    public constructor(private config: ConfigurationService) {}\r\n\r\n    public init(): Promise<void> {\r\n        return this.config.load();\r\n    }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Quoting } from '../models/quoting.model';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class QuotingService {\r\n    public getQuoting(): Quoting | null {\r\n        const appQuotingStateJson = sessionStorage.getItem('appQuotingState');\r\n\r\n        if (appQuotingStateJson) {\r\n            return JSON.parse(appQuotingStateJson) as Quoting;\r\n        } else {\r\n            return null;\r\n        }\r\n    }\r\n\r\n    public setQuoting(quoting: Quoting): void {\r\n        sessionStorage.setItem('appQuotingState', JSON.stringify(quoting));\r\n    }\r\n\r\n    public clear(): void {\r\n        sessionStorage.removeItem('appQuotingState');\r\n    }\r\n}\r\n","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { innerFrom } from './innerFrom';\nimport { popResultSelector } from '../util/args';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { createObject } from '../util/createObject';\nexport function forkJoin(...args) {\n    const resultSelector = popResultSelector(args);\n    const { args: sources, keys } = argsArgArrayOrObject(args);\n    const result = new Observable((subscriber) => {\n        const { length } = sources;\n        if (!length) {\n            subscriber.complete();\n            return;\n        }\n        const values = new Array(length);\n        let remainingCompletions = length;\n        let remainingEmissions = length;\n        for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) {\n            let hasValue = false;\n            innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => {\n                if (!hasValue) {\n                    hasValue = true;\n                    remainingEmissions--;\n                }\n                values[sourceIndex] = value;\n            }, () => remainingCompletions--, undefined, () => {\n                if (!remainingCompletions || !hasValue) {\n                    if (!remainingEmissions) {\n                        subscriber.next(keys ? createObject(keys, values) : values);\n                    }\n                    subscriber.complete();\n                }\n            }));\n        }\n    });\n    return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\n","/**\n * @license Angular v19.0.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { Directive, InjectionToken, forwardRef, Optional, Inject, ɵisPromise, ɵisSubscribable, ɵRuntimeError, Self, untracked, computed, signal, EventEmitter, Input, Host, SkipSelf, booleanAttribute, ChangeDetectorRef, Output, Injectable, inject, NgModule, Version } from '@angular/core';\nimport { ɵgetDOM } from '@angular/common';\nimport { from, forkJoin, Subject } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\n/**\n * Base class for all ControlValueAccessor classes defined in Forms package.\n * Contains common logic and utility functions.\n *\n * Note: this is an *internal-only* class and should not be extended or used directly in\n * applications code.\n */\nclass BaseControlValueAccessor {\n    _renderer;\n    _elementRef;\n    /**\n     * The registered callback function called when a change or input event occurs on the input\n     * element.\n     * @nodoc\n     */\n    onChange = (_) => { };\n    /**\n     * The registered callback function called when a blur event occurs on the input element.\n     * @nodoc\n     */\n    onTouched = () => { };\n    constructor(_renderer, _elementRef) {\n        this._renderer = _renderer;\n        this._elementRef = _elementRef;\n    }\n    /**\n     * Helper method that sets a property on a target element using the current Renderer\n     * implementation.\n     * @nodoc\n     */\n    setProperty(key, value) {\n        this._renderer.setProperty(this._elementRef.nativeElement, key, value);\n    }\n    /**\n     * Registers a function called when the control is touched.\n     * @nodoc\n     */\n    registerOnTouched(fn) {\n        this.onTouched = fn;\n    }\n    /**\n     * Registers a function called when the control value changes.\n     * @nodoc\n     */\n    registerOnChange(fn) {\n        this.onChange = fn;\n    }\n    /**\n     * Sets the \"disabled\" property on the range input element.\n     * @nodoc\n     */\n    setDisabledState(isDisabled) {\n        this.setProperty('disabled', isDisabled);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BaseControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: BaseControlValueAccessor, isStandalone: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BaseControlValueAccessor, decorators: [{\n            type: Directive\n        }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }] });\n/**\n * Base class for all built-in ControlValueAccessor classes (except DefaultValueAccessor, which is\n * used in case no other CVAs can be found). We use this class to distinguish between default CVA,\n * built-in CVAs and custom CVAs, so that Forms logic can recognize built-in CVAs and treat custom\n * ones with higher priority (when both built-in and custom CVAs are present).\n *\n * Note: this is an *internal-only* class and should not be extended or used directly in\n * applications code.\n */\nclass BuiltInControlValueAccessor extends BaseControlValueAccessor {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BuiltInControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: BuiltInControlValueAccessor, isStandalone: true, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BuiltInControlValueAccessor, decorators: [{\n            type: Directive\n        }] });\n/**\n * Used to provide a `ControlValueAccessor` for form controls.\n *\n * See `DefaultValueAccessor` for how to implement one.\n *\n * @publicApi\n */\nconst NG_VALUE_ACCESSOR = new InjectionToken(ngDevMode ? 'NgValueAccessor' : '');\n\nconst CHECKBOX_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => 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 * ```html\n * <input type=\"checkbox\" [formControl]=\"rememberLoginControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass CheckboxControlValueAccessor extends BuiltInControlValueAccessor {\n    /**\n     * Sets the \"checked\" property on the input element.\n     * @nodoc\n     */\n    writeValue(value) {\n        this.setProperty('checked', value);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: CheckboxControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: CheckboxControlValueAccessor, isStandalone: false, selector: \"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]\", host: { listeners: { \"change\": \"onChange($event.target.checked)\", \"blur\": \"onTouched()\" } }, providers: [CHECKBOX_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: CheckboxControlValueAccessor, decorators: [{\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                    standalone: false,\n                }]\n        }] });\n\nconst DEFAULT_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => 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    const 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 */\nconst COMPOSITION_BUFFER_MODE = new InjectionToken(ngDevMode ? 'CompositionEventMode' : '');\n/**\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 *\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 * ```html\n * <input type=\"text\" [formControl]=\"firstNameControl\">\n * ```\n *\n * This value accessor is used by default for `<input type=\"text\">` and `<textarea>` elements, but\n * you could also use it for custom components that have similar behavior and do not require special\n * processing. In order to attach the default value accessor to a custom element, add the\n * `ngDefaultControl` attribute as shown below.\n *\n * ```html\n * <custom-input-component ngDefaultControl [(ngModel)]=\"value\"></custom-input-component>\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass DefaultValueAccessor extends BaseControlValueAccessor {\n    _compositionMode;\n    /** Whether the user is creating a composition string (IME events). */\n    _composing = false;\n    constructor(renderer, elementRef, _compositionMode) {\n        super(renderer, elementRef);\n        this._compositionMode = _compositionMode;\n        if (this._compositionMode == null) {\n            this._compositionMode = !_isAndroid();\n        }\n    }\n    /**\n     * Sets the \"value\" property on the input element.\n     * @nodoc\n     */\n    writeValue(value) {\n        const normalizedValue = value == null ? '' : value;\n        this.setProperty('value', normalizedValue);\n    }\n    /** @internal */\n    _handleInput(value) {\n        if (!this._compositionMode || (this._compositionMode && !this._composing)) {\n            this.onChange(value);\n        }\n    }\n    /** @internal */\n    _compositionStart() {\n        this._composing = true;\n    }\n    /** @internal */\n    _compositionEnd(value) {\n        this._composing = false;\n        this._compositionMode && this.onChange(value);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DefaultValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: COMPOSITION_BUFFER_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: DefaultValueAccessor, isStandalone: false, selector: \"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]\", host: { listeners: { \"input\": \"$any(this)._handleInput($event.target.value)\", \"blur\": \"onTouched()\", \"compositionstart\": \"$any(this)._compositionStart()\", \"compositionend\": \"$any(this)._compositionEnd($event.target.value)\" } }, providers: [DEFAULT_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: DefaultValueAccessor, decorators: [{\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                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [COMPOSITION_BUFFER_MODE]\n                }] }] });\n\nfunction isEmptyInputValue(value) {\n    /**\n     * Check if the object is a string or array before evaluating the length attribute.\n     * This avoids falsely rejecting objects that contain a custom length attribute.\n     * For example, the object {id: 1, length: 0, width: 0} should not be returned as empty.\n     */\n    return (value == null || ((typeof value === 'string' || Array.isArray(value)) && value.length === 0));\n}\nfunction hasValidLength(value) {\n    // non-strict comparison is intentional, to check for both `null` and `undefined` values\n    return value != null && typeof value.length === 'number';\n}\n/**\n * @description\n * An `InjectionToken` for registering additional synchronous validators used with\n * `AbstractControl`s.\n *\n * @see {@link 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 * ```ts\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 */\nconst NG_VALIDATORS = new InjectionToken(ngDevMode ? 'NgValidators' : '');\n/**\n * @description\n * An `InjectionToken` for registering additional asynchronous validators used with\n * `AbstractControl`s.\n *\n * @see {@link NG_VALIDATORS}\n *\n * @usageNotes\n *\n * ### Provide a custom async validator directive\n *\n * The following example implements the `AsyncValidator` interface to create an\n * async validator directive with a custom error key.\n *\n * ```ts\n * @Directive({\n *   selector: '[customAsyncValidator]',\n *   providers: [{provide: NG_ASYNC_VALIDATORS, useExisting: CustomAsyncValidatorDirective, multi:\n * true}]\n * })\n * class CustomAsyncValidatorDirective implements AsyncValidator {\n *   validate(control: AbstractControl): Promise<ValidationErrors|null> {\n *     return Promise.resolve({'custom': true});\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nconst NG_ASYNC_VALIDATORS = new InjectionToken(ngDevMode ? '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 */\nconst 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/forms/form-validation)\n *\n * @publicApi\n */\nclass Validators {\n    /**\n     * @description\n     * Validator that requires the control's value to be greater than or equal to the provided number.\n     *\n     * @usageNotes\n     *\n     * ### Validate against a minimum of 3\n     *\n     * ```ts\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 {@link updateValueAndValidity()}\n     *\n     */\n    static min(min) {\n        return minValidator(min);\n    }\n    /**\n     * @description\n     * Validator that requires the control's value to be less than or equal to the provided number.\n     *\n     * @usageNotes\n     *\n     * ### Validate against a maximum of 15\n     *\n     * ```ts\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 {@link updateValueAndValidity()}\n     *\n     */\n    static max(max) {\n        return maxValidator(max);\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     * ```ts\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 {@link updateValueAndValidity()}\n     *\n     */\n    static required(control) {\n        return requiredValidator(control);\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     * ```ts\n     * const control = new FormControl('some value', 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 {@link updateValueAndValidity()}\n     *\n     */\n    static requiredTrue(control) {\n        return requiredTrueValidator(control);\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 use cases. 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     * ```ts\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 {@link updateValueAndValidity()}\n     *\n     */\n    static email(control) {\n        return emailValidator(control);\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     * ```ts\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` property if the validation check fails, otherwise `null`.\n     *\n     * @see {@link updateValueAndValidity()}\n     *\n     */\n    static minLength(minLength) {\n        return minLengthValidator(minLength);\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     * ```ts\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 {@link updateValueAndValidity()}\n     *\n     */\n    static maxLength(maxLength) {\n        return maxLengthValidator(maxLength);\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     * ```ts\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     * ### Pattern matching with the global or sticky flag\n     *\n     * `RegExp` objects created with the `g` or `y` flags that are passed into `Validators.pattern`\n     * can produce different results on the same input when validations are run consecutively. This is\n     * due to how the behavior of `RegExp.prototype.test` is\n     * specified in [ECMA-262](https://tc39.es/ecma262/#sec-regexpbuiltinexec)\n     * (`RegExp` preserves the index of the last match when the global or sticky flag is used).\n     * Due to this behavior, it is recommended that when using\n     * `Validators.pattern` you **do not** pass in a `RegExp` object with either the global or sticky\n     * flag enabled.\n     *\n     * ```ts\n     * // Not recommended (since the `g` flag is used)\n     * const controlOne = new FormControl('1', Validators.pattern(/foo/g));\n     *\n     * // Good\n     * const controlTwo = new FormControl('1', Validators.pattern(/foo/));\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 {@link updateValueAndValidity()}\n     *\n     */\n    static pattern(pattern) {\n        return patternValidator(pattern);\n    }\n    /**\n     * @description\n     * Validator that performs no operation.\n     *\n     * @see {@link updateValueAndValidity()}\n     *\n     */\n    static nullValidator(control) {\n        return nullValidator(control);\n    }\n    static compose(validators) {\n        return compose(validators);\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 {@link updateValueAndValidity()}\n     *\n     */\n    static composeAsync(validators) {\n        return composeAsync(validators);\n    }\n}\n/**\n * Validator that requires the control's value to be greater than or equal to the provided number.\n * See `Validators.min` for additional information.\n */\nfunction minValidator(min) {\n    return (control) => {\n        if (isEmptyInputValue(control.value) || isEmptyInputValue(min)) {\n            return null; // don't validate empty values to allow optional controls\n        }\n        const 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 * Validator that requires the control's value to be less than or equal to the provided number.\n * See `Validators.max` for additional information.\n */\nfunction maxValidator(max) {\n    return (control) => {\n        if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n            return null; // don't validate empty values to allow optional controls\n        }\n        const 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 * Validator that requires the control have a non-empty value.\n * See `Validators.required` for additional information.\n */\nfunction requiredValidator(control) {\n    return isEmptyInputValue(control.value) ? { 'required': true } : null;\n}\n/**\n * Validator that requires the control's value be true. This validator is commonly\n * used for required checkboxes.\n * See `Validators.requiredTrue` for additional information.\n */\nfunction requiredTrueValidator(control) {\n    return control.value === true ? null : { 'required': true };\n}\n/**\n * Validator that requires the control's value pass an email validation test.\n * See `Validators.email` for additional information.\n */\nfunction emailValidator(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 * Validator that requires the length of the control's value to be greater than or equal\n * to the provided minimum length. See `Validators.minLength` for additional information.\n */\nfunction minLengthValidator(minLength) {\n    return (control) => {\n        if (isEmptyInputValue(control.value) || !hasValidLength(control.value)) {\n            // don't validate empty values to allow optional controls\n            // don't validate values without `length` property\n            return null;\n        }\n        return control.value.length < minLength\n            ? { 'minlength': { 'requiredLength': minLength, 'actualLength': control.value.length } }\n            : null;\n    };\n}\n/**\n * Validator that requires the length of the control's value to be less than or equal\n * to the provided maximum length. See `Validators.maxLength` for additional information.\n */\nfunction maxLengthValidator(maxLength) {\n    return (control) => {\n        return hasValidLength(control.value) && control.value.length > maxLength\n            ? { 'maxlength': { 'requiredLength': maxLength, 'actualLength': control.value.length } }\n            : null;\n    };\n}\n/**\n * Validator that requires the control's value to match a regex pattern.\n * See `Validators.pattern` for additional information.\n */\nfunction patternValidator(pattern) {\n    if (!pattern)\n        return nullValidator;\n    let regex;\n    let 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 (control) => {\n        if (isEmptyInputValue(control.value)) {\n            return null; // don't validate empty values to allow optional controls\n        }\n        const value = control.value;\n        return regex.test(value)\n            ? null\n            : { 'pattern': { 'requiredPattern': regexStr, 'actualValue': value } };\n    };\n}\n/**\n * Function that has `ValidatorFn` shape, but performs no operation.\n */\nfunction nullValidator(control) {\n    return null;\n}\nfunction isPresent(o) {\n    return o != null;\n}\nfunction toObservable(value) {\n    const obs = ɵisPromise(value) ? from(value) : value;\n    if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ɵisSubscribable(obs)) {\n        let errorMessage = `Expected async validator to return Promise or Observable.`;\n        // A synchronous validator will return object or null.\n        if (typeof value === 'object') {\n            errorMessage +=\n                ' Are you using a synchronous validator where an async validator is expected?';\n        }\n        throw new ɵRuntimeError(-1101 /* RuntimeErrorCode.WRONG_VALIDATOR_RETURN_TYPE */, errorMessage);\n    }\n    return obs;\n}\nfunction mergeErrors(arrayOfErrors) {\n    let res = {};\n    arrayOfErrors.forEach((errors) => {\n        res = errors != null ? { ...res, ...errors } : res;\n    });\n    return Object.keys(res).length === 0 ? null : res;\n}\nfunction executeValidators(control, validators) {\n    return validators.map((validator) => validator(control));\n}\nfunction isValidatorFn(validator) {\n    return !validator.validate;\n}\n/**\n * Given the list of validators that may contain both functions as well as classes, return the list\n * of validator functions (convert validator classes into validator functions). This is needed to\n * have consistent structure in validators list before composing them.\n *\n * @param validators The set of validators that may contain validators both in plain function form\n *     as well as represented as a validator class.\n */\nfunction normalizeValidators(validators) {\n    return validators.map((validator) => {\n        return isValidatorFn(validator)\n            ? validator\n            : ((c) => validator.validate(c));\n    });\n}\n/**\n * Merges synchronous validators into a single validator function.\n * See `Validators.compose` for additional information.\n */\nfunction compose(validators) {\n    if (!validators)\n        return null;\n    const 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 * Accepts a list of validators of different possible shapes (`Validator` and `ValidatorFn`),\n * normalizes the list (converts everything to `ValidatorFn`) and merges them into a single\n * validator function.\n */\nfunction composeValidators(validators) {\n    return validators != null ? compose(normalizeValidators(validators)) : null;\n}\n/**\n * Merges asynchronous validators into a single validator function.\n * See `Validators.composeAsync` for additional information.\n */\nfunction composeAsync(validators) {\n    if (!validators)\n        return null;\n    const presentValidators = validators.filter(isPresent);\n    if (presentValidators.length == 0)\n        return null;\n    return function (control) {\n        const observables = executeValidators(control, presentValidators).map(toObservable);\n        return forkJoin(observables).pipe(map(mergeErrors));\n    };\n}\n/**\n * Accepts a list of async validators of different possible shapes (`AsyncValidator` and\n * `AsyncValidatorFn`), normalizes the list (converts everything to `AsyncValidatorFn`) and merges\n * them into a single validator function.\n */\nfunction composeAsyncValidators(validators) {\n    return validators != null\n        ? composeAsync(normalizeValidators(validators))\n        : null;\n}\n/**\n * Merges raw control validators with a given directive validator and returns the combined list of\n * validators as an array.\n */\nfunction mergeValidators(controlValidators, dirValidator) {\n    if (controlValidators === null)\n        return [dirValidator];\n    return Array.isArray(controlValidators)\n        ? [...controlValidators, dirValidator]\n        : [controlValidators, dirValidator];\n}\n/**\n * Retrieves the list of raw synchronous validators attached to a given control.\n */\nfunction getControlValidators(control) {\n    return control._rawValidators;\n}\n/**\n * Retrieves the list of raw asynchronous validators attached to a given control.\n */\nfunction getControlAsyncValidators(control) {\n    return control._rawAsyncValidators;\n}\n/**\n * Accepts a singleton validator, an array, or null, and returns an array type with the provided\n * validators.\n *\n * @param validators A validator, validators, or null.\n * @returns A validators array.\n */\nfunction makeValidatorsArray(validators) {\n    if (!validators)\n        return [];\n    return Array.isArray(validators) ? validators : [validators];\n}\n/**\n * Determines whether a validator or validators array has a given validator.\n *\n * @param validators The validator or validators to compare against.\n * @param validator The validator to check.\n * @returns Whether the validator is present.\n */\nfunction hasValidator(validators, validator) {\n    return Array.isArray(validators) ? validators.includes(validator) : validators === validator;\n}\n/**\n * Combines two arrays of validators into one. If duplicates are provided, only one will be added.\n *\n * @param validators The new validators.\n * @param currentValidators The base array of current validators.\n * @returns An array of validators.\n */\nfunction addValidators(validators, currentValidators) {\n    const current = makeValidatorsArray(currentValidators);\n    const validatorsToAdd = makeValidatorsArray(validators);\n    validatorsToAdd.forEach((v) => {\n        // Note: if there are duplicate entries in the new validators array,\n        // only the first one would be added to the current list of validators.\n        // Duplicate ones would be ignored since `hasValidator` would detect\n        // the presence of a validator function and we update the current list in place.\n        if (!hasValidator(current, v)) {\n            current.push(v);\n        }\n    });\n    return current;\n}\nfunction removeValidators(validators, currentValidators) {\n    return makeValidatorsArray(currentValidators).filter((v) => !hasValidator(validators, v));\n}\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 */\nclass AbstractControlDirective {\n    /**\n     * @description\n     * Reports the value of the control if it is present, otherwise null.\n     */\n    get value() {\n        return this.control ? this.control.value : null;\n    }\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 valid() {\n        return this.control ? this.control.valid : null;\n    }\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 invalid() {\n        return this.control ? this.control.invalid : null;\n    }\n    /**\n     * @description\n     * Reports whether a control is pending, meaning 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 pending() {\n        return this.control ? this.control.pending : null;\n    }\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 disabled() {\n        return this.control ? this.control.disabled : null;\n    }\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 enabled() {\n        return this.control ? this.control.enabled : null;\n    }\n    /**\n     * @description\n     * Reports the control's validation errors. If the control is not present, null is returned.\n     */\n    get errors() {\n        return this.control ? this.control.errors : null;\n    }\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 pristine() {\n        return this.control ? this.control.pristine : null;\n    }\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 dirty() {\n        return this.control ? this.control.dirty : null;\n    }\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 touched() {\n        return this.control ? this.control.touched : null;\n    }\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 status() {\n        return this.control ? this.control.status : null;\n    }\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 untouched() {\n        return this.control ? this.control.untouched : null;\n    }\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 statusChanges() {\n        return this.control ? this.control.statusChanges : null;\n    }\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 valueChanges() {\n        return this.control ? this.control.valueChanges : null;\n    }\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 path() {\n        return null;\n    }\n    /**\n     * Contains the result of merging synchronous validators into a single validator function\n     * (combined using `Validators.compose`).\n     */\n    _composedValidatorFn;\n    /**\n     * Contains the result of merging asynchronous validators into a single validator function\n     * (combined using `Validators.composeAsync`).\n     */\n    _composedAsyncValidatorFn;\n    /**\n     * Set of synchronous validators as they were provided while calling `setValidators` function.\n     * @internal\n     */\n    _rawValidators = [];\n    /**\n     * Set of asynchronous validators as they were provided while calling `setAsyncValidators`\n     * function.\n     * @internal\n     */\n    _rawAsyncValidators = [];\n    /**\n     * Sets synchronous validators for this directive.\n     * @internal\n     */\n    _setValidators(validators) {\n        this._rawValidators = validators || [];\n        this._composedValidatorFn = composeValidators(this._rawValidators);\n    }\n    /**\n     * Sets asynchronous validators for this directive.\n     * @internal\n     */\n    _setAsyncValidators(validators) {\n        this._rawAsyncValidators = validators || [];\n        this._composedAsyncValidatorFn = composeAsyncValidators(this._rawAsyncValidators);\n    }\n    /**\n     * @description\n     * Synchronous validator function composed of all the synchronous validators registered with this\n     * directive.\n     */\n    get validator() {\n        return this._composedValidatorFn || null;\n    }\n    /**\n     * @description\n     * Asynchronous validator function composed of all the asynchronous validators registered with\n     * this directive.\n     */\n    get asyncValidator() {\n        return this._composedAsyncValidatorFn || null;\n    }\n    /*\n     * The set of callbacks to be invoked when directive instance is being destroyed.\n     */\n    _onDestroyCallbacks = [];\n    /**\n     * Internal function to register callbacks that should be invoked\n     * when directive instance is being destroyed.\n     * @internal\n     */\n    _registerOnDestroy(fn) {\n        this._onDestroyCallbacks.push(fn);\n    }\n    /**\n     * Internal function to invoke all registered \"on destroy\" callbacks.\n     * Note: calling this function also clears the list of callbacks.\n     * @internal\n     */\n    _invokeOnDestroyCallbacks() {\n        this._onDestroyCallbacks.forEach((fn) => fn());\n        this._onDestroyCallbacks = [];\n    }\n    /**\n     * @description\n     * Resets the control with the provided value if the control is present.\n     */\n    reset(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    hasError(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    getError(errorCode, path) {\n        return this.control ? this.control.getError(errorCode, path) : null;\n    }\n}\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 */\nclass ControlContainer extends AbstractControlDirective {\n    /**\n     * @description\n     * The name for the control\n     */\n    // TODO(issue/24571): remove '!'.\n    name;\n    /**\n     * @description\n     * The top-level form directive for the control.\n     */\n    get formDirective() {\n        return null;\n    }\n    /**\n     * @description\n     * The path to this group.\n     */\n    get path() {\n        return null;\n    }\n}\n\n/**\n * @description\n * A base class that all `FormControl`-based directives extend. It binds a `FormControl`\n * object to a DOM element.\n *\n * @publicApi\n */\nclass NgControl extends AbstractControlDirective {\n    /**\n     * @description\n     * The parent form for the control.\n     *\n     * @internal\n     */\n    _parent = null;\n    /**\n     * @description\n     * The name for the control\n     */\n    name = null;\n    /**\n     * @description\n     * The value accessor for the control\n     */\n    valueAccessor = null;\n}\n\n// DO NOT REFACTOR!\n// Each status is represented by a separate function to make sure that\n// advanced Closure Compiler optimizations related to property renaming\n// can work correctly.\nclass AbstractControlStatus {\n    _cd;\n    constructor(cd) {\n        this._cd = cd;\n    }\n    get isTouched() {\n        // track the touched signal\n        this._cd?.control?._touched?.();\n        return !!this._cd?.control?.touched;\n    }\n    get isUntouched() {\n        return !!this._cd?.control?.untouched;\n    }\n    get isPristine() {\n        // track the pristine signal\n        this._cd?.control?._pristine?.();\n        return !!this._cd?.control?.pristine;\n    }\n    get isDirty() {\n        // pristine signal already tracked above\n        return !!this._cd?.control?.dirty;\n    }\n    get isValid() {\n        // track the status signal\n        this._cd?.control?._status?.();\n        return !!this._cd?.control?.valid;\n    }\n    get isInvalid() {\n        // status signal already tracked above\n        return !!this._cd?.control?.invalid;\n    }\n    get isPending() {\n        // status signal already tracked above\n        return !!this._cd?.control?.pending;\n    }\n    get isSubmitted() {\n        // track the submitted signal\n        this._cd?._submitted?.();\n        // We check for the `submitted` field from `NgForm` and `FormGroupDirective` classes, but\n        // we avoid instanceof checks to prevent non-tree-shakable references to those types.\n        return !!this._cd?.submitted;\n    }\n}\nconst ngControlStatusHost = {\n    '[class.ng-untouched]': 'isUntouched',\n    '[class.ng-touched]': 'isTouched',\n    '[class.ng-pristine]': 'isPristine',\n    '[class.ng-dirty]': 'isDirty',\n    '[class.ng-valid]': 'isValid',\n    '[class.ng-invalid]': 'isInvalid',\n    '[class.ng-pending]': 'isPending',\n};\nconst ngGroupStatusHost = {\n    ...ngControlStatusHost,\n    '[class.ng-submitted]': 'isSubmitted',\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 */\nclass NgControlStatus extends AbstractControlStatus {\n    constructor(cd) {\n        super(cd);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgControlStatus, deps: [{ token: NgControl, self: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgControlStatus, isStandalone: false, selector: \"[formControlName],[ngModel],[formControl]\", host: { properties: { \"class.ng-untouched\": \"isUntouched\", \"class.ng-touched\": \"isTouched\", \"class.ng-pristine\": \"isPristine\", \"class.ng-dirty\": \"isDirty\", \"class.ng-valid\": \"isValid\", \"class.ng-invalid\": \"isInvalid\", \"class.ng-pending\": \"isPending\" } }, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgControlStatus, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[formControlName],[ngModel],[formControl]',\n                    host: ngControlStatusHost,\n                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: NgControl, decorators: [{\n                    type: Self\n                }] }] });\n/**\n * @description\n * Directive automatically applied to Angular form groups that sets CSS classes\n * based on control status (valid/invalid/dirty/etc). On groups, this includes the additional\n * class ng-submitted.\n *\n * @see {@link NgControlStatus}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgControlStatusGroup extends AbstractControlStatus {\n    constructor(cd) {\n        super(cd);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgControlStatusGroup, deps: [{ token: ControlContainer, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgControlStatusGroup, isStandalone: false, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]\", host: { properties: { \"class.ng-untouched\": \"isUntouched\", \"class.ng-touched\": \"isTouched\", \"class.ng-pristine\": \"isPristine\", \"class.ng-dirty\": \"isDirty\", \"class.ng-valid\": \"isValid\", \"class.ng-invalid\": \"isInvalid\", \"class.ng-pending\": \"isPending\", \"class.ng-submitted\": \"isSubmitted\" } }, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgControlStatusGroup, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',\n                    host: ngGroupStatusHost,\n                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: ControlContainer, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }] }] });\n\nconst formControlNameExample = `\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  });`;\nconst formGroupNameExample = `\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  });`;\nconst formArrayNameExample = `\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  });`;\nconst ngModelGroupExample = `\n  <form>\n      <div ngModelGroup=\"person\">\n        <input [(ngModel)]=\"person.name\" name=\"firstName\">\n      </div>\n  </form>`;\nconst ngModelWithFormGroupExample = `\n  <div [formGroup]=\"myGroup\">\n      <input formControlName=\"firstName\">\n      <input [(ngModel)]=\"showMoreControls\" [ngModelOptions]=\"{standalone: true}\">\n  </div>\n`;\n\nfunction controlParentException(nameOrIndex) {\n    return new ɵRuntimeError(1050 /* RuntimeErrorCode.FORM_CONTROL_NAME_MISSING_PARENT */, `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      ${describeFormControl(nameOrIndex)}\n\n    Example:\n\n    ${formControlNameExample}`);\n}\nfunction describeFormControl(nameOrIndex) {\n    if (nameOrIndex == null || nameOrIndex === '') {\n        return '';\n    }\n    const valueType = typeof nameOrIndex === 'string' ? 'name' : 'index';\n    return `Affected Form Control ${valueType}: \"${nameOrIndex}\"`;\n}\nfunction ngModelGroupException() {\n    return new ɵRuntimeError(1051 /* RuntimeErrorCode.FORM_CONTROL_NAME_INSIDE_MODEL_GROUP */, `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      ${formGroupNameExample}\n\n      Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n      ${ngModelGroupExample}`);\n}\nfunction missingFormException() {\n    return new ɵRuntimeError(1052 /* RuntimeErrorCode.FORM_GROUP_MISSING_INSTANCE */, `formGroup expects a FormGroup instance. Please pass one in.\n\n      Example:\n\n      ${formControlNameExample}`);\n}\nfunction groupParentException() {\n    return new ɵRuntimeError(1053 /* RuntimeErrorCode.FORM_GROUP_NAME_MISSING_PARENT */, `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    ${formGroupNameExample}`);\n}\nfunction arrayParentException() {\n    return new ɵRuntimeError(1054 /* RuntimeErrorCode.FORM_ARRAY_NAME_MISSING_PARENT */, `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      ${formArrayNameExample}`);\n}\nconst disabledAttrWarning = `\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  // Specify the \\`disabled\\` property at control creation time:\n  form = new FormGroup({\n    first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n    last: new FormControl('Drew', Validators.required)\n  });\n\n  // Controls can also be enabled/disabled after creation:\n  form.get('first')?.enable();\n  form.get('last')?.disable();\n`;\nconst asyncValidatorsDroppedWithOptsWarning = `\n  It looks like you're constructing using a FormControl with both an options argument and an\n  async validators argument. Mixing these arguments will cause your async validators to be dropped.\n  You should either put all your validators in the options object, or in separate validators\n  arguments. For example:\n\n  // Using validators arguments\n  fc = new FormControl(42, Validators.required, myAsyncValidator);\n\n  // Using AbstractControlOptions\n  fc = new FormControl(42, {validators: Validators.required, asyncValidators: myAV});\n\n  // Do NOT mix them: async validators will be dropped!\n  fc = new FormControl(42, {validators: Validators.required}, /* Oops! */ myAsyncValidator);\n`;\nfunction ngModelWarning(directiveName) {\n    return `\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 a future version of Angular.\n\n  For more information on this, see our API docs here:\n  https://angular.io/api/forms/${directiveName === 'formControl' ? 'FormControlDirective' : 'FormControlName'}#use-with-ngmodel\n  `;\n}\nfunction describeKey(isFormGroup, key) {\n    return isFormGroup ? `with name: '${key}'` : `at index: ${key}`;\n}\nfunction noControlsError(isFormGroup) {\n    return `\n    There are no form controls registered with this ${isFormGroup ? 'group' : 'array'} yet. If you're using ngModel,\n    you may want to check next tick (e.g. use setTimeout).\n  `;\n}\nfunction missingControlError(isFormGroup, key) {\n    return `Cannot find form control ${describeKey(isFormGroup, key)}`;\n}\nfunction missingControlValueError(isFormGroup, key) {\n    return `Must supply a value for form control ${describeKey(isFormGroup, key)}`;\n}\n\n/**\n * Reports that a control is valid, meaning that no errors exist in the input value.\n *\n * @see {@link status}\n */\nconst VALID = 'VALID';\n/**\n * Reports that a control is invalid, meaning that an error exists in the input value.\n *\n * @see {@link status}\n */\nconst INVALID = 'INVALID';\n/**\n * Reports that a control is pending, meaning that async validation is occurring and\n * errors are not yet available for the input value.\n *\n * @see {@link markAsPending}\n * @see {@link status}\n */\nconst PENDING = 'PENDING';\n/**\n * Reports that a control is disabled, meaning that the control is exempt from ancestor\n * calculations of validity or value.\n *\n * @see {@link markAsDisabled}\n * @see {@link status}\n */\nconst DISABLED = 'DISABLED';\n/**\n * Base class for every event sent by `AbstractControl.events()`\n *\n * @publicApi\n */\nclass ControlEvent {\n}\n/**\n * Event fired when the value of a control changes.\n *\n * @publicApi\n */\nclass ValueChangeEvent extends ControlEvent {\n    value;\n    source;\n    constructor(value, source) {\n        super();\n        this.value = value;\n        this.source = source;\n    }\n}\n/**\n * Event fired when the control's pristine state changes (pristine <=> dirty).\n *\n * @publicApi */\nclass PristineChangeEvent extends ControlEvent {\n    pristine;\n    source;\n    constructor(pristine, source) {\n        super();\n        this.pristine = pristine;\n        this.source = source;\n    }\n}\n/**\n * Event fired when the control's touched status changes (touched <=> untouched).\n *\n * @publicApi\n */\nclass TouchedChangeEvent extends ControlEvent {\n    touched;\n    source;\n    constructor(touched, source) {\n        super();\n        this.touched = touched;\n        this.source = source;\n    }\n}\n/**\n * Event fired when the control's status changes.\n *\n * @publicApi\n */\nclass StatusChangeEvent extends ControlEvent {\n    status;\n    source;\n    constructor(status, source) {\n        super();\n        this.status = status;\n        this.source = source;\n    }\n}\n/**\n * Event fired when a form is submitted\n *\n * @publicApi\n */\nclass FormSubmittedEvent extends ControlEvent {\n    source;\n    constructor(source) {\n        super();\n        this.source = source;\n    }\n}\n/**\n * Event fired when a form is reset.\n *\n * @publicApi\n */\nclass FormResetEvent extends ControlEvent {\n    source;\n    constructor(source) {\n        super();\n        this.source = source;\n    }\n}\n/**\n * Gets validators from either an options object or given validators.\n */\nfunction pickValidators(validatorOrOpts) {\n    return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.validators : validatorOrOpts) || null;\n}\n/**\n * Creates validator function by combining provided validators.\n */\nfunction coerceToValidator(validator) {\n    return Array.isArray(validator) ? composeValidators(validator) : validator || null;\n}\n/**\n * Gets async validators from either an options object or given validators.\n */\nfunction pickAsyncValidators(asyncValidator, validatorOrOpts) {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        if (isOptionsObj(validatorOrOpts) && asyncValidator) {\n            console.warn(asyncValidatorsDroppedWithOptsWarning);\n        }\n    }\n    return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.asyncValidators : asyncValidator) || null;\n}\n/**\n * Creates async validator function by combining provided async validators.\n */\nfunction coerceToAsyncValidator(asyncValidator) {\n    return Array.isArray(asyncValidator)\n        ? composeAsyncValidators(asyncValidator)\n        : asyncValidator || null;\n}\nfunction isOptionsObj(validatorOrOpts) {\n    return (validatorOrOpts != null &&\n        !Array.isArray(validatorOrOpts) &&\n        typeof validatorOrOpts === 'object');\n}\nfunction assertControlPresent(parent, isGroup, key) {\n    const controls = parent.controls;\n    const collection = isGroup ? Object.keys(controls) : controls;\n    if (!collection.length) {\n        throw new ɵRuntimeError(1000 /* RuntimeErrorCode.NO_CONTROLS */, typeof ngDevMode === 'undefined' || ngDevMode ? noControlsError(isGroup) : '');\n    }\n    if (!controls[key]) {\n        throw new ɵRuntimeError(1001 /* RuntimeErrorCode.MISSING_CONTROL */, typeof ngDevMode === 'undefined' || ngDevMode ? missingControlError(isGroup, key) : '');\n    }\n}\nfunction assertAllValuesPresent(control, isGroup, value) {\n    control._forEachChild((_, key) => {\n        if (value[key] === undefined) {\n            throw new ɵRuntimeError(1002 /* RuntimeErrorCode.MISSING_CONTROL_VALUE */, typeof ngDevMode === 'undefined' || ngDevMode ? missingControlValueError(isGroup, key) : '');\n        }\n    });\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 * The first type parameter TValue represents the value type of the control (`control.value`).\n * The optional type parameter TRawValue  represents the raw value type (`control.getRawValue()`).\n *\n * @see [Forms Guide](guide/forms)\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n * @see [Dynamic Forms Guide](guide/forms/dynamic-forms)\n *\n * @publicApi\n */\nclass AbstractControl {\n    /** @internal */\n    _pendingDirty = false;\n    /**\n     * Indicates that a control has its own pending asynchronous validation in progress.\n     * It also stores if the control should emit events when the validation status changes.\n     *\n     * @internal\n     */\n    _hasOwnPendingAsyncValidator = null;\n    /** @internal */\n    _pendingTouched = false;\n    /** @internal */\n    _onCollectionChange = () => { };\n    /** @internal */\n    _updateOn;\n    _parent = null;\n    _asyncValidationSubscription;\n    /**\n     * Contains the result of merging synchronous validators into a single validator function\n     * (combined using `Validators.compose`).\n     *\n     * @internal\n     */\n    _composedValidatorFn;\n    /**\n     * Contains the result of merging asynchronous validators into a single validator function\n     * (combined using `Validators.composeAsync`).\n     *\n     * @internal\n     */\n    _composedAsyncValidatorFn;\n    /**\n     * Synchronous validators as they were provided:\n     *  - in `AbstractControl` constructor\n     *  - as an argument while calling `setValidators` function\n     *  - while calling the setter on the `validator` field (e.g. `control.validator = validatorFn`)\n     *\n     * @internal\n     */\n    _rawValidators;\n    /**\n     * Asynchronous validators as they were provided:\n     *  - in `AbstractControl` constructor\n     *  - as an argument while calling `setAsyncValidators` function\n     *  - while calling the setter on the `asyncValidator` field (e.g. `control.asyncValidator =\n     * asyncValidatorFn`)\n     *\n     * @internal\n     */\n    _rawAsyncValidators;\n    /**\n     * The current value of the control.\n     *\n     * * For a `FormControl`, the current value.\n     * * For an enabled `FormGroup`, the values of enabled controls as an object\n     * with a key-value pair for each member of the group.\n     * * For a disabled `FormGroup`, the values of all controls as an object\n     * with a key-value pair for each member of the group.\n     * * For a `FormArray`, the values of enabled controls as an array.\n     *\n     */\n    value;\n    /**\n     * Initialize the AbstractControl instance.\n     *\n     * @param validators The function or array of functions that is used to determine the validity of\n     *     this control synchronously.\n     * @param asyncValidators The function or array of functions that is used to determine validity of\n     *     this control asynchronously.\n     */\n    constructor(validators, asyncValidators) {\n        this._assignValidators(validators);\n        this._assignAsyncValidators(asyncValidators);\n    }\n    /**\n     * Returns the function that is used to determine the validity of this control synchronously.\n     * If multiple validators have been added, this will be a single composed function.\n     * See `Validators.compose()` for additional information.\n     */\n    get validator() {\n        return this._composedValidatorFn;\n    }\n    set validator(validatorFn) {\n        this._rawValidators = this._composedValidatorFn = validatorFn;\n    }\n    /**\n     * Returns the function that is used to determine the validity of this control asynchronously.\n     * If multiple validators have been added, this will be a single composed function.\n     * See `Validators.compose()` for additional information.\n     */\n    get asyncValidator() {\n        return this._composedAsyncValidatorFn;\n    }\n    set asyncValidator(asyncValidatorFn) {\n        this._rawAsyncValidators = this._composedAsyncValidatorFn = asyncValidatorFn;\n    }\n    /**\n     * The parent control.\n     */\n    get parent() {\n        return this._parent;\n    }\n    /**\n     * The validation status of the control.\n     *\n     * @see {@link FormControlStatus}\n     *\n     * These status values are mutually exclusive, so a control cannot be\n     * both valid AND invalid or invalid AND disabled.\n     */\n    get status() {\n        return untracked(this.statusReactive);\n    }\n    set status(v) {\n        untracked(() => this.statusReactive.set(v));\n    }\n    /** @internal */\n    _status = computed(() => this.statusReactive());\n    statusReactive = signal(undefined);\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 valid() {\n        return this.status === VALID;\n    }\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 invalid() {\n        return this.status === INVALID;\n    }\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 pending() {\n        return this.status == PENDING;\n    }\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 disabled() {\n        return this.status === DISABLED;\n    }\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 enabled() {\n        return this.status !== DISABLED;\n    }\n    /**\n     * An object containing any errors generated by failing validation,\n     * or null if there are no errors.\n     */\n    errors;\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    get pristine() {\n        return untracked(this.pristineReactive);\n    }\n    set pristine(v) {\n        untracked(() => this.pristineReactive.set(v));\n    }\n    /** @internal */\n    _pristine = computed(() => this.pristineReactive());\n    pristineReactive = signal(true);\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 dirty() {\n        return !this.pristine;\n    }\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    get touched() {\n        return untracked(this.touchedReactive);\n    }\n    set touched(v) {\n        untracked(() => this.touchedReactive.set(v));\n    }\n    /** @internal */\n    _touched = computed(() => this.touchedReactive());\n    touchedReactive = signal(false);\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 untouched() {\n        return !this.touched;\n    }\n    /**\n     * Exposed as observable, see below.\n     *\n     * @internal\n     */\n    _events = new Subject();\n    /**\n     * A multicasting observable that emits an event every time the state of the control changes.\n     * It emits for value, status, pristine or touched changes.\n     *\n     * **Note**: On value change, the emit happens right after a value of this control is updated. The\n     * value of a parent control (for example if this FormControl is a part of a FormGroup) is updated\n     * later, so accessing a value of a parent control (using the `value` property) from the callback\n     * of this event might result in getting a value that has not been updated yet. Subscribe to the\n     * `events` of the parent control instead.\n     * For other event types, the events are emitted after the parent control has been updated.\n     *\n     */\n    events = this._events.asObservable();\n    /**\n     * A multicasting observable that emits an event every time the value of the control changes, in\n     * the UI or programmatically. It also emits an event each time you call enable() or disable()\n     * without passing along {emitEvent: false} as a function argument.\n     *\n     * **Note**: the emit happens right after a value of this control is updated. The value of a\n     * parent control (for example if this FormControl is a part of a FormGroup) is updated later, so\n     * accessing a value of a parent control (using the `value` property) from the callback of this\n     * event might result in getting a value that has not been updated yet. Subscribe to the\n     * `valueChanges` event of the parent control instead.\n     *\n     * TODO: this should be piped from events() but is breaking in G3\n     */\n    valueChanges;\n    /**\n     * A multicasting observable that emits an event every time the validation `status` of the control\n     * recalculates.\n     *\n     * @see {@link FormControlStatus}\n     * @see {@link AbstractControl.status}\n     *\n     * TODO: this should be piped from events() but is breaking in G3\n     */\n    statusChanges;\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 updateOn() {\n        return this._updateOn ? this._updateOn : this.parent ? this.parent.updateOn : 'change';\n    }\n    /**\n     * Sets the synchronous validators that are active on this control.  Calling\n     * this overwrites any existing synchronous 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     * If you want to add a new validator without affecting existing ones, consider\n     * using `addValidators()` method instead.\n     */\n    setValidators(validators) {\n        this._assignValidators(validators);\n    }\n    /**\n     * Sets the asynchronous validators that are active on this control. Calling this\n     * overwrites any existing asynchronous 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     * If you want to add a new validator without affecting existing ones, consider\n     * using `addAsyncValidators()` method instead.\n     */\n    setAsyncValidators(validators) {\n        this._assignAsyncValidators(validators);\n    }\n    /**\n     * Add a synchronous validator or validators to this control, without affecting other 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     * Adding a validator that already exists will have no effect. If duplicate validator functions\n     * are present in the `validators` array, only the first instance would be added to a form\n     * control.\n     *\n     * @param validators The new validator function or functions to add to this control.\n     */\n    addValidators(validators) {\n        this.setValidators(addValidators(validators, this._rawValidators));\n    }\n    /**\n     * Add an asynchronous validator or validators to this control, without affecting other\n     * 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     * Adding a validator that already exists will have no effect.\n     *\n     * @param validators The new asynchronous validator function or functions to add to this control.\n     */\n    addAsyncValidators(validators) {\n        this.setAsyncValidators(addValidators(validators, this._rawAsyncValidators));\n    }\n    /**\n     * Remove a synchronous validator from this control, without affecting other validators.\n     * Validators are compared by function reference; you must pass a reference to the exact same\n     * validator function as the one that was originally set. If a provided validator is not found,\n     * it is ignored.\n     *\n     * @usageNotes\n     *\n     * ### Reference to a ValidatorFn\n     *\n     * ```\n     * // Reference to the RequiredValidator\n     * const ctrl = new FormControl<string | null>('', Validators.required);\n     * ctrl.removeValidators(Validators.required);\n     *\n     * // Reference to anonymous function inside MinValidator\n     * const minValidator = Validators.min(3);\n     * const ctrl = new FormControl<string | null>('', minValidator);\n     * expect(ctrl.hasValidator(minValidator)).toEqual(true)\n     * expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)\n     *\n     * ctrl.removeValidators(minValidator);\n     * ```\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     * @param validators The validator or validators to remove.\n     */\n    removeValidators(validators) {\n        this.setValidators(removeValidators(validators, this._rawValidators));\n    }\n    /**\n     * Remove an asynchronous validator from this control, without affecting other validators.\n     * Validators are compared by function reference; you must pass a reference to the exact same\n     * validator function as the one that was originally set. If a provided validator is not found, it\n     * is ignored.\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     * @param validators The asynchronous validator or validators to remove.\n     */\n    removeAsyncValidators(validators) {\n        this.setAsyncValidators(removeValidators(validators, this._rawAsyncValidators));\n    }\n    /**\n     * Check whether a synchronous validator function is present on this control. The provided\n     * validator must be a reference to the exact same function that was provided.\n     *\n     * @usageNotes\n     *\n     * ### Reference to a ValidatorFn\n     *\n     * ```\n     * // Reference to the RequiredValidator\n     * const ctrl = new FormControl<number | null>(0, Validators.required);\n     * expect(ctrl.hasValidator(Validators.required)).toEqual(true)\n     *\n     * // Reference to anonymous function inside MinValidator\n     * const minValidator = Validators.min(3);\n     * const ctrl = new FormControl<number | null>(0, minValidator);\n     * expect(ctrl.hasValidator(minValidator)).toEqual(true)\n     * expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)\n     * ```\n     *\n     * @param validator The validator to check for presence. Compared by function reference.\n     * @returns Whether the provided validator was found on this control.\n     */\n    hasValidator(validator) {\n        return hasValidator(this._rawValidators, validator);\n    }\n    /**\n     * Check whether an asynchronous validator function is present on this control. The provided\n     * validator must be a reference to the exact same function that was provided.\n     *\n     * @param validator The asynchronous validator to check for presence. Compared by function\n     *     reference.\n     * @returns Whether the provided asynchronous validator was found on this control.\n     */\n    hasAsyncValidator(validator) {\n        return hasValidator(this._rawAsyncValidators, validator);\n    }\n    /**\n     * Empties out the synchronous 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    clearValidators() {\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    clearAsyncValidators() {\n        this.asyncValidator = null;\n    }\n    markAsTouched(opts = {}) {\n        const changed = this.touched === false;\n        this.touched = true;\n        const sourceControl = opts.sourceControl ?? this;\n        if (this._parent && !opts.onlySelf) {\n            this._parent.markAsTouched({ ...opts, sourceControl });\n        }\n        if (changed && opts.emitEvent !== false) {\n            this._events.next(new TouchedChangeEvent(true, sourceControl));\n        }\n    }\n    /**\n     * Marks the control and all its descendant controls as `touched`.\n     * @see {@link markAsTouched()}\n     *\n     * @param opts Configuration options that determine how the control propagates changes\n     * and emits events after marking is applied.\n     * * `emitEvent`: When true or not supplied (the default), the `events`\n     * observable emits a `TouchedChangeEvent` with the `touched` property being `true`.\n     * When false, no events are emitted.\n     */\n    markAllAsTouched(opts = {}) {\n        this.markAsTouched({ onlySelf: true, emitEvent: opts.emitEvent, sourceControl: this });\n        this._forEachChild((control) => control.markAllAsTouched(opts));\n    }\n    markAsUntouched(opts = {}) {\n        const changed = this.touched === true;\n        this.touched = false;\n        this._pendingTouched = false;\n        const sourceControl = opts.sourceControl ?? this;\n        this._forEachChild((control) => {\n            control.markAsUntouched({ onlySelf: true, emitEvent: opts.emitEvent, sourceControl });\n        });\n        if (this._parent && !opts.onlySelf) {\n            this._parent._updateTouched(opts, sourceControl);\n        }\n        if (changed && opts.emitEvent !== false) {\n            this._events.next(new TouchedChangeEvent(false, sourceControl));\n        }\n    }\n    markAsDirty(opts = {}) {\n        const changed = this.pristine === true;\n        this.pristine = false;\n        const sourceControl = opts.sourceControl ?? this;\n        if (this._parent && !opts.onlySelf) {\n            this._parent.markAsDirty({ ...opts, sourceControl });\n        }\n        if (changed && opts.emitEvent !== false) {\n            this._events.next(new PristineChangeEvent(false, sourceControl));\n        }\n    }\n    markAsPristine(opts = {}) {\n        const changed = this.pristine === false;\n        this.pristine = true;\n        this._pendingDirty = false;\n        const sourceControl = opts.sourceControl ?? this;\n        this._forEachChild((control) => {\n            /** We don't propagate the source control downwards */\n            control.markAsPristine({ onlySelf: true, emitEvent: opts.emitEvent });\n        });\n        if (this._parent && !opts.onlySelf) {\n            this._parent._updatePristine(opts, sourceControl);\n        }\n        if (changed && opts.emitEvent !== false) {\n            this._events.next(new PristineChangeEvent(true, sourceControl));\n        }\n    }\n    markAsPending(opts = {}) {\n        this.status = PENDING;\n        const sourceControl = opts.sourceControl ?? this;\n        if (opts.emitEvent !== false) {\n            this._events.next(new StatusChangeEvent(this.status, sourceControl));\n            this.statusChanges.emit(this.status);\n        }\n        if (this._parent && !opts.onlySelf) {\n            this._parent.markAsPending({ ...opts, sourceControl });\n        }\n    }\n    disable(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        const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n        this.status = DISABLED;\n        this.errors = null;\n        this._forEachChild((control) => {\n            /** We don't propagate the source control downwards */\n            control.disable({ ...opts, onlySelf: true });\n        });\n        this._updateValue();\n        const sourceControl = opts.sourceControl ?? this;\n        if (opts.emitEvent !== false) {\n            this._events.next(new ValueChangeEvent(this.value, sourceControl));\n            this._events.next(new StatusChangeEvent(this.status, sourceControl));\n            this.valueChanges.emit(this.value);\n            this.statusChanges.emit(this.status);\n        }\n        this._updateAncestors({ ...opts, skipPristineCheck }, this);\n        this._onDisabledChange.forEach((changeFn) => 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), the `statusChanges`,\n     * `valueChanges` and `events`\n     * observables emit events with the latest status and value when the control is enabled.\n     * When false, no events are emitted.\n     */\n    enable(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        const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n        this.status = VALID;\n        this._forEachChild((control) => {\n            control.enable({ ...opts, onlySelf: true });\n        });\n        this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n        this._updateAncestors({ ...opts, skipPristineCheck }, this);\n        this._onDisabledChange.forEach((changeFn) => changeFn(false));\n    }\n    _updateAncestors(opts, sourceControl) {\n        if (this._parent && !opts.onlySelf) {\n            this._parent.updateValueAndValidity(opts);\n            if (!opts.skipPristineCheck) {\n                this._parent._updatePristine({}, sourceControl);\n            }\n            this._parent._updateTouched({}, sourceControl);\n        }\n    }\n    /**\n     * Sets the parent of the control\n     *\n     * @param parent The new parent.\n     */\n    setParent(parent) {\n        this._parent = parent;\n    }\n    /**\n     * The raw value of this control. For most control implementations, the raw value will include\n     * disabled children.\n     */\n    getRawValue() {\n        return this.value;\n    }\n    updateValueAndValidity(opts = {}) {\n        this._setInitialStatus();\n        this._updateValue();\n        if (this.enabled) {\n            const shouldHaveEmitted = this._cancelExistingSubscription();\n            this.errors = this._runValidator();\n            this.status = this._calculateStatus();\n            if (this.status === VALID || this.status === PENDING) {\n                // If the canceled subscription should have emitted\n                // we make sure the async validator emits the status change on completion\n                this._runAsyncValidator(shouldHaveEmitted, opts.emitEvent);\n            }\n        }\n        const sourceControl = opts.sourceControl ?? this;\n        if (opts.emitEvent !== false) {\n            this._events.next(new ValueChangeEvent(this.value, sourceControl));\n            this._events.next(new StatusChangeEvent(this.status, sourceControl));\n            this.valueChanges.emit(this.value);\n            this.statusChanges.emit(this.status);\n        }\n        if (this._parent && !opts.onlySelf) {\n            this._parent.updateValueAndValidity({ ...opts, sourceControl });\n        }\n    }\n    /** @internal */\n    _updateTreeValidity(opts = { emitEvent: true }) {\n        this._forEachChild((ctrl) => ctrl._updateTreeValidity(opts));\n        this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n    }\n    _setInitialStatus() {\n        this.status = this._allControlsDisabled() ? DISABLED : VALID;\n    }\n    _runValidator() {\n        return this.validator ? this.validator(this) : null;\n    }\n    _runAsyncValidator(shouldHaveEmitted, emitEvent) {\n        if (this.asyncValidator) {\n            this.status = PENDING;\n            this._hasOwnPendingAsyncValidator = { emitEvent: emitEvent !== false };\n            const obs = toObservable(this.asyncValidator(this));\n            this._asyncValidationSubscription = obs.subscribe((errors) => {\n                this._hasOwnPendingAsyncValidator = null;\n                // This will trigger the recalculation of the validation status, which depends on\n                // the state of the asynchronous validation (whether it is in progress or not). So, it is\n                // necessary that we have updated the `_hasOwnPendingAsyncValidator` boolean flag first.\n                this.setErrors(errors, { emitEvent, shouldHaveEmitted });\n            });\n        }\n    }\n    _cancelExistingSubscription() {\n        if (this._asyncValidationSubscription) {\n            this._asyncValidationSubscription.unsubscribe();\n            // we're cancelling the validator subscribtion, we keep if it should have emitted\n            // because we want to emit eventually if it was required at least once.\n            const shouldHaveEmitted = this._hasOwnPendingAsyncValidator?.emitEvent ?? false;\n            this._hasOwnPendingAsyncValidator = null;\n            return shouldHaveEmitted;\n        }\n        return false;\n    }\n    setErrors(errors, opts = {}) {\n        this.errors = errors;\n        this._updateControlsErrors(opts.emitEvent !== false, this, opts.shouldHaveEmitted);\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. If a string is provided, passing it as a string literal will result in improved type\n     * information. Likewise, if an array is provided, passing it `as const` will cause improved type\n     * information to be available.\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'] as const);` // `as const` gives improved typings\n     *\n     * ### Retrieve a control in a FormArray\n     *\n     * When accessing an element inside a FormArray, you can use an element index.\n     * For example, to get a `price` control from the first element in an `items` array you can use:\n     *\n     * * `this.form.get('items.0.price');`\n     *\n     * -OR-\n     *\n     * * `this.form.get(['items', 0, 'price']);`\n     */\n    get(path) {\n        let currPath = path;\n        if (currPath == null)\n            return null;\n        if (!Array.isArray(currPath))\n            currPath = currPath.split('.');\n        if (currPath.length === 0)\n            return null;\n        return currPath.reduce((control, name) => control && control._find(name), this);\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    getError(errorCode, path) {\n        const 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    hasError(errorCode, path) {\n        return !!this.getError(errorCode, path);\n    }\n    /**\n     * Retrieves the top-level ancestor of this control.\n     */\n    get root() {\n        let x = this;\n        while (x._parent) {\n            x = x._parent;\n        }\n        return x;\n    }\n    /** @internal */\n    _updateControlsErrors(emitEvent, changedControl, shouldHaveEmitted) {\n        this.status = this._calculateStatus();\n        if (emitEvent) {\n            this.statusChanges.emit(this.status);\n        }\n        // The Events Observable expose a slight different bevahior than the statusChanges obs\n        // An async validator will still emit a StatusChangeEvent is a previously cancelled\n        // async validator has emitEvent set to true\n        if (emitEvent || shouldHaveEmitted) {\n            this._events.next(new StatusChangeEvent(this.status, changedControl));\n        }\n        if (this._parent) {\n            this._parent._updateControlsErrors(emitEvent, changedControl, shouldHaveEmitted);\n        }\n    }\n    /** @internal */\n    _initObservables() {\n        this.valueChanges = new EventEmitter();\n        this.statusChanges = new EventEmitter();\n    }\n    _calculateStatus() {\n        if (this._allControlsDisabled())\n            return DISABLED;\n        if (this.errors)\n            return INVALID;\n        if (this._hasOwnPendingAsyncValidator || this._anyControlsHaveStatus(PENDING))\n            return PENDING;\n        if (this._anyControlsHaveStatus(INVALID))\n            return INVALID;\n        return VALID;\n    }\n    /** @internal */\n    _anyControlsHaveStatus(status) {\n        return this._anyControls((control) => control.status === status);\n    }\n    /** @internal */\n    _anyControlsDirty() {\n        return this._anyControls((control) => control.dirty);\n    }\n    /** @internal */\n    _anyControlsTouched() {\n        return this._anyControls((control) => control.touched);\n    }\n    /** @internal */\n    _updatePristine(opts, changedControl) {\n        const newPristine = !this._anyControlsDirty();\n        const changed = this.pristine !== newPristine;\n        this.pristine = newPristine;\n        if (this._parent && !opts.onlySelf) {\n            this._parent._updatePristine(opts, changedControl);\n        }\n        if (changed) {\n            this._events.next(new PristineChangeEvent(this.pristine, changedControl));\n        }\n    }\n    /** @internal */\n    _updateTouched(opts = {}, changedControl) {\n        this.touched = this._anyControlsTouched();\n        this._events.next(new TouchedChangeEvent(this.touched, changedControl));\n        if (this._parent && !opts.onlySelf) {\n            this._parent._updateTouched(opts, changedControl);\n        }\n    }\n    /** @internal */\n    _onDisabledChange = [];\n    /** @internal */\n    _registerOnCollectionChange(fn) {\n        this._onCollectionChange = fn;\n    }\n    /** @internal */\n    _setUpdateStrategy(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    _parentMarkedDirty(onlySelf) {\n        const parentDirty = this._parent && this._parent.dirty;\n        return !onlySelf && !!parentDirty && !this._parent._anyControlsDirty();\n    }\n    /** @internal */\n    _find(name) {\n        return null;\n    }\n    /**\n     * Internal implementation of the `setValidators` method. Needs to be separated out into a\n     * different method, because it is called in the constructor and it can break cases where\n     * a control is extended.\n     */\n    _assignValidators(validators) {\n        this._rawValidators = Array.isArray(validators) ? validators.slice() : validators;\n        this._composedValidatorFn = coerceToValidator(this._rawValidators);\n    }\n    /**\n     * Internal implementation of the `setAsyncValidators` method. Needs to be separated out into a\n     * different method, because it is called in the constructor and it can break cases where\n     * a control is extended.\n     */\n    _assignAsyncValidators(validators) {\n        this._rawAsyncValidators = Array.isArray(validators) ? validators.slice() : validators;\n        this._composedAsyncValidatorFn = coerceToAsyncValidator(this._rawAsyncValidators);\n    }\n}\n\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 four fundamental building blocks used to define forms in Angular,\n * along with `FormControl`, `FormArray`, and `FormRecord`.\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 * `FormGroup` is intended for use cases where the keys are known ahead of time.\n * If you need to dynamically add and remove controls, use {@link FormRecord} instead.\n *\n * `FormGroup` accepts an optional type parameter `TControl`, which is an object type with inner\n * control types as values.\n *\n * @usageNotes\n *\n * ### Create a form group with 2 controls\n *\n * ```ts\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 * ### The type argument, and optional controls\n *\n * `FormGroup` accepts one generic argument, which is an object containing its inner controls.\n * This type will usually be inferred automatically, but you can always specify it explicitly if you\n * wish.\n *\n * If you have controls that are optional (i.e. they can be removed, you can use the `?` in the\n * type):\n *\n * ```ts\n * const form = new FormGroup<{\n *   first: FormControl<string|null>,\n *   middle?: FormControl<string|null>, // Middle name is optional.\n *   last: FormControl<string|null>,\n * }>({\n *   first: new FormControl('Nancy'),\n *   last: new FormControl('Drew'),\n * });\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 * ```ts\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 * ```ts\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 * ### Using a FormGroup with optional controls\n *\n * It is possible to have optional controls in a FormGroup. An optional control can be removed later\n * using `removeControl`, and can be omitted when calling `reset`. Optional controls must be\n * declared optional in the group's type.\n *\n * ```ts\n * const c = new FormGroup<{one?: FormControl<string>}>({\n *   one: new FormControl('')\n * });\n * ```\n *\n * Notice that `c.value.one` has type `string|null|undefined`. This is because calling `c.reset({})`\n * without providing the optional key `one` will cause it to become `null`.\n *\n * @publicApi\n */\nclass FormGroup extends AbstractControl {\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    constructor(controls, validatorOrOpts, asyncValidator) {\n        super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n        (typeof ngDevMode === 'undefined' || ngDevMode) && validateFormGroupControls(controls);\n        this.controls = controls;\n        this._initObservables();\n        this._setUpdateStrategy(validatorOrOpts);\n        this._setUpControls();\n        this.updateValueAndValidity({\n            onlySelf: true,\n            // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n            // `VALID` or `INVALID`. The status should be broadcasted via the `statusChanges` observable,\n            // so we set `emitEvent` to `true` to allow that during the control creation process.\n            emitEvent: !!this.asyncValidator,\n        });\n    }\n    controls;\n    registerControl(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    addControl(name, control, options = {}) {\n        this.registerControl(name, control);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n        this._onCollectionChange();\n    }\n    /**\n     * Remove a control from this group. In a strongly-typed group, required controls cannot be\n     * removed.\n     *\n     * This method also updates the value and validity of the control.\n     *\n     * @param name The control name to remove from the collection\n     * @param options Specifies whether this FormGroup instance should emit events after a\n     *     control is removed.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * removed. When false, no events are emitted.\n     */\n    removeControl(name, options = {}) {\n        if (this.controls[name])\n            this.controls[name]._registerOnCollectionChange(() => { });\n        delete this.controls[name];\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n        this._onCollectionChange();\n    }\n    setControl(name, control, options = {}) {\n        if (this.controls[name])\n            this.controls[name]._registerOnCollectionChange(() => { });\n        delete this.controls[name];\n        if (control)\n            this.registerControl(name, control);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n        this._onCollectionChange();\n    }\n    contains(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    setValue(value, options = {}) {\n        assertAllValuesPresent(this, true, value);\n        Object.keys(value).forEach((name) => {\n            assertControlPresent(this, true, name);\n            this.controls[name].setValue(value[name], {\n                onlySelf: true,\n                emitEvent: options.emitEvent,\n            });\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` observables emit events with the latest status and value when the control value\n     * is updated. When false, no events are emitted. The configuration options are passed to\n     * the {@link AbstractControl#updateValueAndValidity updateValueAndValidity} method.\n     */\n    patchValue(value, options = {}) {\n        // Even though the `value` argument type doesn't allow `null` and `undefined` values, the\n        // `patchValue` can be called recursively and inner data structures might have these values, so\n        // we just ignore such cases when a field containing FormGroup instance receives `null` or\n        // `undefined` as a value.\n        if (value == null /* both `null` and `undefined` */)\n            return;\n        Object.keys(value).forEach((name) => {\n            // The compiler cannot see through the uninstantiated conditional type of `this.controls`, so\n            // `as any` is required.\n            const control = this.controls[name];\n            if (control) {\n                control.patchValue(\n                /* Guaranteed to be present, due to the outer forEach. */ value[name], { onlySelf: true, emitEvent: options.emitEvent });\n            }\n        });\n        this.updateValueAndValidity(options);\n    }\n    /**\n     * Resets the `FormGroup`, marks all descendants `pristine` and `untouched` and sets\n     * the value of all descendants to their default values, or null if no defaults were provided.\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(form.value);  // {last: 'last'}\n     * console.log(form.get('first').status);  // 'DISABLED'\n     * ```\n     */\n    reset(value = {}, options = {}) {\n        this._forEachChild((control, name) => {\n            control.reset(value ? value[name] : null, {\n                onlySelf: true,\n                emitEvent: options.emitEvent,\n            });\n        });\n        this._updatePristine(options, this);\n        this._updateTouched(options, this);\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     */\n    getRawValue() {\n        return this._reduceChildren({}, (acc, control, name) => {\n            acc[name] = control.getRawValue();\n            return acc;\n        });\n    }\n    /** @internal */\n    _syncPendingControls() {\n        let subtreeUpdated = this._reduceChildren(false, (updated, child) => {\n            return child._syncPendingControls() ? true : updated;\n        });\n        if (subtreeUpdated)\n            this.updateValueAndValidity({ onlySelf: true });\n        return subtreeUpdated;\n    }\n    /** @internal */\n    _forEachChild(cb) {\n        Object.keys(this.controls).forEach((key) => {\n            // The list of controls can change (for ex. controls might be removed) while the loop\n            // is running (as a result of invoking Forms API in `valueChanges` subscription), so we\n            // have to null check before invoking the callback.\n            const control = this.controls[key];\n            control && cb(control, key);\n        });\n    }\n    /** @internal */\n    _setUpControls() {\n        this._forEachChild((control) => {\n            control.setParent(this);\n            control._registerOnCollectionChange(this._onCollectionChange);\n        });\n    }\n    /** @internal */\n    _updateValue() {\n        this.value = this._reduceValue();\n    }\n    /** @internal */\n    _anyControls(condition) {\n        for (const [controlName, control] of Object.entries(this.controls)) {\n            if (this.contains(controlName) && condition(control)) {\n                return true;\n            }\n        }\n        return false;\n    }\n    /** @internal */\n    _reduceValue() {\n        let acc = {};\n        return this._reduceChildren(acc, (acc, control, name) => {\n            if (control.enabled || this.disabled) {\n                acc[name] = control.value;\n            }\n            return acc;\n        });\n    }\n    /** @internal */\n    _reduceChildren(initValue, fn) {\n        let res = initValue;\n        this._forEachChild((control, name) => {\n            res = fn(res, control, name);\n        });\n        return res;\n    }\n    /** @internal */\n    _allControlsDisabled() {\n        for (const controlName of Object.keys(this.controls)) {\n            if (this.controls[controlName].enabled) {\n                return false;\n            }\n        }\n        return Object.keys(this.controls).length > 0 || this.disabled;\n    }\n    /** @internal */\n    _find(name) {\n        return this.controls.hasOwnProperty(name)\n            ? this.controls[name]\n            : null;\n    }\n}\n/**\n * Will validate that none of the controls has a key with a dot\n * Throws other wise\n */\nfunction validateFormGroupControls(controls) {\n    const invalidKeys = Object.keys(controls).filter((key) => key.includes('.'));\n    if (invalidKeys.length > 0) {\n        // TODO: make this an error once there are no more uses in G3\n        console.warn(`FormGroup keys cannot include \\`.\\`, please replace the keys for: ${invalidKeys.join(',')}.`);\n    }\n}\nconst UntypedFormGroup = FormGroup;\n/**\n * @description\n * Asserts that the given control is an instance of `FormGroup`\n *\n * @publicApi\n */\nconst isFormGroup = (control) => control instanceof FormGroup;\n/**\n * Tracks the value and validity state of a collection of `FormControl` instances, each of which has\n * the same value type.\n *\n * `FormRecord` is very similar to {@link FormGroup}, except it can be used with a dynamic keys,\n * with controls added and removed as needed.\n *\n * `FormRecord` accepts one generic argument, which describes the type of the controls it contains.\n *\n * @usageNotes\n *\n * ```ts\n * let numbers = new FormRecord({bill: new FormControl('415-123-456')});\n * numbers.addControl('bob', new FormControl('415-234-567'));\n * numbers.removeControl('bill');\n * ```\n *\n * @publicApi\n */\nclass FormRecord extends FormGroup {\n}\n/**\n * @description\n * Asserts that the given control is an instance of `FormRecord`\n *\n * @publicApi\n */\nconst isFormRecord = (control) => control instanceof FormRecord;\n\n/**\n * Token to provide to allow SetDisabledState to always be called when a CVA is added, regardless of\n * whether the control is disabled or enabled.\n *\n * @see {@link FormsModule#withconfig}\n */\nconst CALL_SET_DISABLED_STATE = new InjectionToken('CallSetDisabledState', {\n    providedIn: 'root',\n    factory: () => setDisabledStateDefault,\n});\n/**\n * Whether to use the fixed setDisabledState behavior by default.\n */\nconst setDisabledStateDefault = 'always';\nfunction controlPath(name, parent) {\n    return [...parent.path, name];\n}\n/**\n * Links a Form control and a Form directive by setting up callbacks (such as `onChange`) on both\n * instances. This function is typically invoked when form directive is being initialized.\n *\n * @param control Form control instance that should be linked.\n * @param dir Directive that should be linked with a given control.\n */\nfunction setUpControl(control, dir, callSetDisabledState = setDisabledStateDefault) {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        if (!control)\n            _throwError(dir, 'Cannot find control with');\n        if (!dir.valueAccessor)\n            _throwMissingValueAccessorError(dir);\n    }\n    setUpValidators(control, dir);\n    dir.valueAccessor.writeValue(control.value);\n    // The legacy behavior only calls the CVA's `setDisabledState` if the control is disabled.\n    // If the `callSetDisabledState` option is set to `always`, then this bug is fixed and\n    // the method is always called.\n    if (control.disabled || callSetDisabledState === 'always') {\n        dir.valueAccessor.setDisabledState?.(control.disabled);\n    }\n    setUpViewChangePipeline(control, dir);\n    setUpModelChangePipeline(control, dir);\n    setUpBlurPipeline(control, dir);\n    setUpDisabledChangeHandler(control, dir);\n}\n/**\n * Reverts configuration performed by the `setUpControl` control function.\n * Effectively disconnects form control with a given form directive.\n * This function is typically invoked when corresponding form directive is being destroyed.\n *\n * @param control Form control which should be cleaned up.\n * @param dir Directive that should be disconnected from a given control.\n * @param validateControlPresenceOnChange Flag that indicates whether onChange handler should\n *     contain asserts to verify that it's not called once directive is destroyed. We need this flag\n *     to avoid potentially breaking changes caused by better control cleanup introduced in #39235.\n */\nfunction cleanUpControl(control, dir, validateControlPresenceOnChange = true) {\n    const noop = () => {\n        if (validateControlPresenceOnChange && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            _noControlError(dir);\n        }\n    };\n    // The `valueAccessor` field is typically defined on FromControl and FormControlName directive\n    // instances and there is a logic in `selectValueAccessor` function that throws if it's not the\n    // case. We still check the presence of `valueAccessor` before invoking its methods to make sure\n    // that cleanup works correctly if app code or tests are setup to ignore the error thrown from\n    // `selectValueAccessor`. See https://github.com/angular/angular/issues/40521.\n    if (dir.valueAccessor) {\n        dir.valueAccessor.registerOnChange(noop);\n        dir.valueAccessor.registerOnTouched(noop);\n    }\n    cleanUpValidators(control, dir);\n    if (control) {\n        dir._invokeOnDestroyCallbacks();\n        control._registerOnCollectionChange(() => { });\n    }\n}\nfunction registerOnValidatorChange(validators, onChange) {\n    validators.forEach((validator) => {\n        if (validator.registerOnValidatorChange)\n            validator.registerOnValidatorChange(onChange);\n    });\n}\n/**\n * Sets up disabled change handler function on a given form control if ControlValueAccessor\n * associated with a given directive instance supports the `setDisabledState` call.\n *\n * @param control Form control where disabled change handler should be setup.\n * @param dir Corresponding directive instance associated with this control.\n */\nfunction setUpDisabledChangeHandler(control, dir) {\n    if (dir.valueAccessor.setDisabledState) {\n        const onDisabledChange = (isDisabled) => {\n            dir.valueAccessor.setDisabledState(isDisabled);\n        };\n        control.registerOnDisabledChange(onDisabledChange);\n        // Register a callback function to cleanup disabled change handler\n        // from a control instance when a directive is destroyed.\n        dir._registerOnDestroy(() => {\n            control._unregisterOnDisabledChange(onDisabledChange);\n        });\n    }\n}\n/**\n * Sets up sync and async directive validators on provided form control.\n * This function merges validators from the directive into the validators of the control.\n *\n * @param control Form control where directive validators should be setup.\n * @param dir Directive instance that contains validators to be setup.\n */\nfunction setUpValidators(control, dir) {\n    const validators = getControlValidators(control);\n    if (dir.validator !== null) {\n        control.setValidators(mergeValidators(validators, dir.validator));\n    }\n    else if (typeof validators === 'function') {\n        // If sync validators are represented by a single validator function, we force the\n        // `Validators.compose` call to happen by executing the `setValidators` function with\n        // an array that contains that function. We need this to avoid possible discrepancies in\n        // validators behavior, so sync validators are always processed by the `Validators.compose`.\n        // Note: we should consider moving this logic inside the `setValidators` function itself, so we\n        // have consistent behavior on AbstractControl API level. The same applies to the async\n        // validators logic below.\n        control.setValidators([validators]);\n    }\n    const asyncValidators = getControlAsyncValidators(control);\n    if (dir.asyncValidator !== null) {\n        control.setAsyncValidators(mergeValidators(asyncValidators, dir.asyncValidator));\n    }\n    else if (typeof asyncValidators === 'function') {\n        control.setAsyncValidators([asyncValidators]);\n    }\n    // Re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4\n    const onValidatorChange = () => control.updateValueAndValidity();\n    registerOnValidatorChange(dir._rawValidators, onValidatorChange);\n    registerOnValidatorChange(dir._rawAsyncValidators, onValidatorChange);\n}\n/**\n * Cleans up sync and async directive validators on provided form control.\n * This function reverts the setup performed by the `setUpValidators` function, i.e.\n * removes directive-specific validators from a given control instance.\n *\n * @param control Form control from where directive validators should be removed.\n * @param dir Directive instance that contains validators to be removed.\n * @returns true if a control was updated as a result of this action.\n */\nfunction cleanUpValidators(control, dir) {\n    let isControlUpdated = false;\n    if (control !== null) {\n        if (dir.validator !== null) {\n            const validators = getControlValidators(control);\n            if (Array.isArray(validators) && validators.length > 0) {\n                // Filter out directive validator function.\n                const updatedValidators = validators.filter((validator) => validator !== dir.validator);\n                if (updatedValidators.length !== validators.length) {\n                    isControlUpdated = true;\n                    control.setValidators(updatedValidators);\n                }\n            }\n        }\n        if (dir.asyncValidator !== null) {\n            const asyncValidators = getControlAsyncValidators(control);\n            if (Array.isArray(asyncValidators) && asyncValidators.length > 0) {\n                // Filter out directive async validator function.\n                const updatedAsyncValidators = asyncValidators.filter((asyncValidator) => asyncValidator !== dir.asyncValidator);\n                if (updatedAsyncValidators.length !== asyncValidators.length) {\n                    isControlUpdated = true;\n                    control.setAsyncValidators(updatedAsyncValidators);\n                }\n            }\n        }\n    }\n    // Clear onValidatorChange callbacks by providing a noop function.\n    const noop = () => { };\n    registerOnValidatorChange(dir._rawValidators, noop);\n    registerOnValidatorChange(dir._rawAsyncValidators, noop);\n    return isControlUpdated;\n}\nfunction setUpViewChangePipeline(control, dir) {\n    dir.valueAccessor.registerOnChange((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(() => {\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    const onChange = (newValue, emitModelEvent) => {\n        // control -> view\n        dir.valueAccessor.writeValue(newValue);\n        // control -> ngModel\n        if (emitModelEvent)\n            dir.viewToModelUpdate(newValue);\n    };\n    control.registerOnChange(onChange);\n    // Register a callback function to cleanup onChange handler\n    // from a control instance when a directive is destroyed.\n    dir._registerOnDestroy(() => {\n        control._unregisterOnChange(onChange);\n    });\n}\n/**\n * Links a FormGroup or FormArray instance and corresponding Form directive by setting up validators\n * present in the view.\n *\n * @param control FormGroup or FormArray instance that should be linked.\n * @param dir Directive that provides view validators.\n */\nfunction setUpFormContainer(control, dir) {\n    if (control == null && (typeof ngDevMode === 'undefined' || ngDevMode))\n        _throwError(dir, 'Cannot find control with');\n    setUpValidators(control, dir);\n}\n/**\n * Reverts the setup performed by the `setUpFormContainer` function.\n *\n * @param control FormGroup or FormArray instance that should be cleaned up.\n * @param dir Directive that provided view validators.\n * @returns true if a control was updated as a result of this action.\n */\nfunction cleanUpFormContainer(control, dir) {\n    return cleanUpValidators(control, dir);\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    const messageEnd = _describeControlLocation(dir);\n    throw new Error(`${message} ${messageEnd}`);\n}\nfunction _describeControlLocation(dir) {\n    const path = dir.path;\n    if (path && path.length > 1)\n        return `path: '${path.join(' -> ')}'`;\n    if (path?.[0])\n        return `name: '${path}'`;\n    return 'unspecified name attribute';\n}\nfunction _throwMissingValueAccessorError(dir) {\n    const loc = _describeControlLocation(dir);\n    throw new ɵRuntimeError(-1203 /* RuntimeErrorCode.NG_MISSING_VALUE_ACCESSOR */, `No value accessor for form control ${loc}.`);\n}\nfunction _throwInvalidValueAccessorError(dir) {\n    const loc = _describeControlLocation(dir);\n    throw new ɵRuntimeError(1200 /* RuntimeErrorCode.NG_VALUE_ACCESSOR_NOT_PROVIDED */, `Value accessor was not provided as an array for form control with ${loc}. ` +\n        `Check that the \\`NG_VALUE_ACCESSOR\\` token is configured as a \\`multi: true\\` provider.`);\n}\nfunction isPropertyUpdated(changes, viewModel) {\n    if (!changes.hasOwnProperty('model'))\n        return false;\n    const change = changes['model'];\n    if (change.isFirstChange())\n        return true;\n    return !Object.is(viewModel, change.currentValue);\n}\nfunction isBuiltInAccessor(valueAccessor) {\n    // Check if a given value accessor is an instance of a class that directly extends\n    // `BuiltInControlValueAccessor` one.\n    return Object.getPrototypeOf(valueAccessor.constructor) === BuiltInControlValueAccessor;\n}\nfunction syncPendingControls(form, directives) {\n    form._syncPendingControls();\n    directives.forEach((dir) => {\n        const 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) && (typeof ngDevMode === 'undefined' || ngDevMode))\n        _throwInvalidValueAccessorError(dir);\n    let defaultAccessor = undefined;\n    let builtinAccessor = undefined;\n    let customAccessor = undefined;\n    valueAccessors.forEach((v) => {\n        if (v.constructor === DefaultValueAccessor) {\n            defaultAccessor = v;\n        }\n        else if (isBuiltInAccessor(v)) {\n            if (builtinAccessor && (typeof ngDevMode === 'undefined' || ngDevMode))\n                _throwError(dir, 'More than one built-in value accessor matches form control with');\n            builtinAccessor = v;\n        }\n        else {\n            if (customAccessor && (typeof ngDevMode === 'undefined' || ngDevMode))\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    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        _throwError(dir, 'No valid value accessor for form control with');\n    }\n    return null;\n}\nfunction removeListItem$1(list, el) {\n    const 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 (warningConfig === 'never')\n        return;\n    if (((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce) ||\n        (warningConfig === 'always' && !instance._ngModelWarningSent)) {\n        console.warn(ngModelWarning(name));\n        type._ngModelWarningSentOnce = true;\n        instance._ngModelWarningSent = true;\n    }\n}\n\nconst formDirectiveProvider$1 = {\n    provide: ControlContainer,\n    useExisting: forwardRef(() => NgForm),\n};\nconst resolvedPromise$1 = (() => Promise.resolve())();\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 */\nclass NgForm extends ControlContainer {\n    callSetDisabledState;\n    /**\n     * @description\n     * Returns whether the form submission has been triggered.\n     */\n    get submitted() {\n        return untracked(this.submittedReactive);\n    }\n    /** @internal */\n    _submitted = computed(() => this.submittedReactive());\n    submittedReactive = signal(false);\n    _directives = new Set();\n    /**\n     * @description\n     * The `FormGroup` instance created for this form.\n     */\n    form;\n    /**\n     * @description\n     * Event emitter for the \"ngSubmit\" event\n     */\n    ngSubmit = new EventEmitter();\n    /**\n     * @description\n     * Tracks options for the `NgForm` instance.\n     *\n     * **updateOn**: Sets the default `updateOn` value for all child `NgModels` below it\n     * unless explicitly set by a child `NgModel` using `ngModelOptions`). Defaults to 'change'.\n     * Possible values: `'change'` | `'blur'` | `'submit'`.\n     *\n     */\n    // TODO(issue/24571): remove '!'.\n    options;\n    constructor(validators, asyncValidators, callSetDisabledState) {\n        super();\n        this.callSetDisabledState = callSetDisabledState;\n        this.form = new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));\n    }\n    /** @nodoc */\n    ngAfterViewInit() {\n        this._setUpdateStrategy();\n    }\n    /**\n     * @description\n     * The directive instance.\n     */\n    get formDirective() {\n        return this;\n    }\n    /**\n     * @description\n     * The internal `FormGroup` instance.\n     */\n    get control() {\n        return this.form;\n    }\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 path() {\n        return [];\n    }\n    /**\n     * @description\n     * Returns a map of the controls in this group.\n     */\n    get controls() {\n        return this.form.controls;\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    addControl(dir) {\n        resolvedPromise$1.then(() => {\n            const container = this._findContainer(dir.path);\n            dir.control = (container.registerControl(dir.name, dir.control));\n            setUpControl(dir.control, dir, this.callSetDisabledState);\n            dir.control.updateValueAndValidity({ emitEvent: false });\n            this._directives.add(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    getControl(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    removeControl(dir) {\n        resolvedPromise$1.then(() => {\n            const container = this._findContainer(dir.path);\n            if (container) {\n                container.removeControl(dir.name);\n            }\n            this._directives.delete(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    addFormGroup(dir) {\n        resolvedPromise$1.then(() => {\n            const container = this._findContainer(dir.path);\n            const 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    removeFormGroup(dir) {\n        resolvedPromise$1.then(() => {\n            const 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    getFormGroup(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    updateModel(dir, value) {\n        resolvedPromise$1.then(() => {\n            const 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    setValue(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    onSubmit($event) {\n        this.submittedReactive.set(true);\n        syncPendingControls(this.form, this._directives);\n        this.ngSubmit.emit($event);\n        // Forms with `method=\"dialog\"` have some special behavior\n        // that won't reload the page and that shouldn't be prevented.\n        return $event?.target?.method === 'dialog';\n    }\n    /**\n     * @description\n     * Method called when the \"reset\" event is triggered on the form.\n     */\n    onReset() {\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    resetForm(value = undefined) {\n        this.form.reset(value);\n        this.submittedReactive.set(false);\n    }\n    _setUpdateStrategy() {\n        if (this.options && this.options.updateOn != null) {\n            this.form._updateOn = this.options.updateOn;\n        }\n    }\n    _findContainer(path) {\n        path.pop();\n        return path.length ? this.form.get(path) : this.form;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgForm, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgForm, isStandalone: false, selector: \"form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]\", inputs: { options: [\"ngFormOptions\", \"options\"] }, outputs: { ngSubmit: \"ngSubmit\" }, host: { listeners: { \"submit\": \"onSubmit($event)\", \"reset\": \"onReset()\" } }, providers: [formDirectiveProvider$1], exportAs: [\"ngForm\"], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgForm, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]',\n                    providers: [formDirectiveProvider$1],\n                    host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n                    outputs: ['ngSubmit'],\n                    exportAs: 'ngForm',\n                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_ASYNC_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [CALL_SET_DISABLED_STATE]\n                }] }], propDecorators: { options: [{\n                type: Input,\n                args: ['ngFormOptions']\n            }] } });\n\nfunction removeListItem(list, el) {\n    const index = list.indexOf(el);\n    if (index > -1)\n        list.splice(index, 1);\n}\n\nfunction isFormControlState(formState) {\n    return (typeof formState === 'object' &&\n        formState !== null &&\n        Object.keys(formState).length === 2 &&\n        'value' in formState &&\n        'disabled' in formState);\n}\nconst FormControl = class FormControl extends AbstractControl {\n    /** @publicApi */\n    defaultValue = null;\n    /** @internal */\n    _onChange = [];\n    /** @internal */\n    _pendingValue;\n    /** @internal */\n    _pendingChange = false;\n    constructor(\n    // formState and defaultValue will only be null if T is nullable\n    formState = null, validatorOrOpts, asyncValidator) {\n        super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n        this._applyFormState(formState);\n        this._setUpdateStrategy(validatorOrOpts);\n        this._initObservables();\n        this.updateValueAndValidity({\n            onlySelf: true,\n            // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n            // `VALID` or `INVALID`.\n            // The status should be broadcasted via the `statusChanges` observable, so we set\n            // `emitEvent` to `true` to allow that during the control creation process.\n            emitEvent: !!this.asyncValidator,\n        });\n        if (isOptionsObj(validatorOrOpts) &&\n            (validatorOrOpts.nonNullable || validatorOrOpts.initialValueIsDefault)) {\n            if (isFormControlState(formState)) {\n                this.defaultValue = formState.value;\n            }\n            else {\n                this.defaultValue = formState;\n            }\n        }\n    }\n    setValue(value, options = {}) {\n        this.value = this._pendingValue = value;\n        if (this._onChange.length && options.emitModelToViewChange !== false) {\n            this._onChange.forEach((changeFn) => changeFn(this.value, options.emitViewToModelChange !== false));\n        }\n        this.updateValueAndValidity(options);\n    }\n    patchValue(value, options = {}) {\n        this.setValue(value, options);\n    }\n    reset(formState = this.defaultValue, 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    /**  @internal */\n    _updateValue() { }\n    /**  @internal */\n    _anyControls(condition) {\n        return false;\n    }\n    /**  @internal */\n    _allControlsDisabled() {\n        return this.disabled;\n    }\n    registerOnChange(fn) {\n        this._onChange.push(fn);\n    }\n    /** @internal */\n    _unregisterOnChange(fn) {\n        removeListItem(this._onChange, fn);\n    }\n    registerOnDisabledChange(fn) {\n        this._onDisabledChange.push(fn);\n    }\n    /** @internal */\n    _unregisterOnDisabledChange(fn) {\n        removeListItem(this._onDisabledChange, fn);\n    }\n    /** @internal */\n    _forEachChild(cb) { }\n    /** @internal */\n    _syncPendingControls() {\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    _applyFormState(formState) {\n        if (isFormControlState(formState)) {\n            this.value = this._pendingValue = formState.value;\n            formState.disabled\n                ? 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};\nconst UntypedFormControl = FormControl;\n/**\n * @description\n * Asserts that the given control is an instance of `FormControl`\n *\n * @publicApi\n */\nconst isFormControl = (control) => control instanceof FormControl;\n\n/**\n * @description\n * A base class for code shared between the `NgModelGroup` and `FormGroupName` directives.\n *\n * @publicApi\n */\nclass AbstractFormGroupDirective extends ControlContainer {\n    /**\n     * @description\n     * The parent control for the group\n     *\n     * @internal\n     */\n    // TODO(issue/24571): remove '!'.\n    _parent;\n    /** @nodoc */\n    ngOnInit() {\n        this._checkParentType();\n        // Register the group with its parent group.\n        this.formDirective.addFormGroup(this);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this.formDirective) {\n            // Remove the group from its parent group.\n            this.formDirective.removeFormGroup(this);\n        }\n    }\n    /**\n     * @description\n     * The `FormGroup` bound to this directive.\n     */\n    get control() {\n        return this.formDirective.getFormGroup(this);\n    }\n    /**\n     * @description\n     * The path to this group from the top-level directive.\n     */\n    get path() {\n        return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n    }\n    /**\n     * @description\n     * The top-level directive for this group if present, otherwise null.\n     */\n    get formDirective() {\n        return this._parent ? this._parent.formDirective : null;\n    }\n    /** @internal */\n    _checkParentType() { }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: AbstractFormGroupDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: AbstractFormGroupDirective, isStandalone: false, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: AbstractFormGroupDirective, decorators: [{\n            type: Directive,\n            args: [{\n                    standalone: false,\n                }]\n        }] });\n\nfunction modelParentException() {\n    return new ɵRuntimeError(1350 /* RuntimeErrorCode.NGMODEL_IN_FORM_GROUP */, `\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    ${formControlNameExample}\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    ${ngModelWithFormGroupExample}`);\n}\nfunction formGroupNameException() {\n    return new ɵRuntimeError(1351 /* RuntimeErrorCode.NGMODEL_IN_FORM_GROUP_NAME */, `\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    ${formGroupNameExample}\n\n    Option 2:  Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n    ${ngModelGroupExample}`);\n}\nfunction missingNameException() {\n    return new ɵRuntimeError(1352 /* RuntimeErrorCode.NGMODEL_WITHOUT_NAME */, `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}\nfunction modelGroupParentException() {\n    return new ɵRuntimeError(1353 /* RuntimeErrorCode.NGMODELGROUP_IN_FORM_GROUP */, `\n    ngModelGroup cannot be used with a parent formGroup directive.\n\n    Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n    ${formGroupNameExample}\n\n    Option 2:  Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n    ${ngModelGroupExample}`);\n}\n\nconst modelGroupProvider = {\n    provide: ControlContainer,\n    useExisting: forwardRef(() => 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 */\nclass NgModelGroup extends AbstractFormGroupDirective {\n    /**\n     * @description\n     * Tracks the name of the `NgModelGroup` bound to the directive. The name corresponds\n     * to a key in the parent `NgForm`.\n     */\n    name = '';\n    constructor(parent, validators, asyncValidators) {\n        super();\n        this._parent = parent;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n    }\n    /** @internal */\n    _checkParentType() {\n        if (!(this._parent instanceof NgModelGroup) &&\n            !(this._parent instanceof NgForm) &&\n            (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw modelGroupParentException();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgModelGroup, deps: [{ token: ControlContainer, host: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgModelGroup, isStandalone: false, selector: \"[ngModelGroup]\", inputs: { name: [\"ngModelGroup\", \"name\"] }, providers: [modelGroupProvider], exportAs: [\"ngModelGroup\"], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgModelGroup, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngModelGroup]',\n                    providers: [modelGroupProvider],\n                    exportAs: 'ngModelGroup',\n                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: ControlContainer, decorators: [{\n                    type: Host\n                }, {\n                    type: SkipSelf\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_ASYNC_VALIDATORS]\n                }] }], propDecorators: { name: [{\n                type: Input,\n                args: ['ngModelGroup']\n            }] } });\n\nconst formControlBinding$1 = {\n    provide: NgControl,\n    useExisting: forwardRef(() => NgModel),\n};\n/**\n * `ngModel` forces an additional change detection run when its inputs change:\n * E.g.:\n * ```html\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 an 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`s have been changed.\n * - this is a general problem when using `exportAs` for directives!\n */\nconst resolvedPromise = (() => Promise.resolve())();\n/**\n * @description\n * Creates a `FormControl` instance from a [domain\n * model](https://en.wikipedia.org/wiki/Domain_model) and binds it 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 domain model's value 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-in-a-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 the validity state),\n * export the directive into a local template variable using `ngModel` as the key (ex:\n * `#myVar=\"ngModel\"`). You can then access the control using the directive's `control` property.\n * However, the most commonly used properties (like `valid` and `dirty`) also exist on the control\n * for direct access. See a full list of properties directly available in\n * `AbstractControlDirective`.\n *\n * @see {@link RadioControlValueAccessor}\n * @see {@link 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. Here,\n * an attribute identified as name is used within a custom form control component. To still be able\n * to specify the NgModel's name, you must specify it using the `ngModelOptions` input instead.\n *\n * ```html\n * <form>\n *   <my-custom-form-control name=\"Nancy\" ngModel [ngModelOptions]=\"{name: 'user'}\">\n *   </my-custom-form-control>\n * </form>\n * <!-- form value: {user: ''} -->\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgModel extends NgControl {\n    _changeDetectorRef;\n    callSetDisabledState;\n    control = new FormControl();\n    // At runtime we coerce arbitrary values assigned to the \"disabled\" input to a \"boolean\".\n    // This is not reflected in the type of the property because outside of templates, consumers\n    // should only deal with booleans. In templates, a string is allowed for convenience and to\n    // match the native \"disabled attribute\" semantics which can be observed on input elements.\n    // This static member tells the compiler that values of type \"string\" can also be assigned\n    // to the input in a template.\n    /** @nodoc */\n    static ngAcceptInputType_isDisabled;\n    /** @internal */\n    _registered = false;\n    /**\n     * Internal reference to the view model value.\n     * @nodoc\n     */\n    viewModel;\n    /**\n     * @description\n     * Tracks the name bound to the directive. If a parent form exists, it\n     * uses this name as a key to retrieve this control's value.\n     */\n    name = '';\n    /**\n     * @description\n     * Tracks whether the control is disabled.\n     */\n    // TODO(issue/24571): remove '!'.\n    isDisabled;\n    /**\n     * @description\n     * Tracks the value bound to this directive.\n     */\n    model;\n    /**\n     * @description\n     * Tracks the configuration options for this `ngModel` instance.\n     *\n     * **name**: An alternative to setting the name attribute on the form control element. See\n     * the [example](api/forms/NgModel#using-ngmodel-on-a-standalone-control) for using `NgModel`\n     * as a standalone control.\n     *\n     * **standalone**: When set to true, the `ngModel` will not register itself with its parent form,\n     * and acts as if it's not in the form. Defaults to false. If no parent form exists, this option\n     * has no effect.\n     *\n     * **updateOn**: Defines the event upon which the form control value and validity update.\n     * Defaults to 'change'. Possible values: `'change'` | `'blur'` | `'submit'`.\n     *\n     */\n    // TODO(issue/24571): remove '!'.\n    options;\n    /**\n     * @description\n     * Event emitter for producing the `ngModelChange` event after\n     * the view model updates.\n     */\n    update = new EventEmitter();\n    constructor(parent, validators, asyncValidators, valueAccessors, _changeDetectorRef, callSetDisabledState) {\n        super();\n        this._changeDetectorRef = _changeDetectorRef;\n        this.callSetDisabledState = callSetDisabledState;\n        this._parent = parent;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n        this.valueAccessor = selectValueAccessor(this, valueAccessors);\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        this._checkForErrors();\n        if (!this._registered || 'name' in changes) {\n            if (this._registered) {\n                this._checkName();\n                if (this.formDirective) {\n                    // We can't call `formDirective.removeControl(this)`, because the `name` has already been\n                    // changed. We also can't reset the name temporarily since the logic in `removeControl`\n                    // is inside a promise and it won't run immediately. We work around it by giving it an\n                    // object with the same shape instead.\n                    const oldName = changes['name'].previousValue;\n                    this.formDirective.removeControl({ name: oldName, path: this._getPath(oldName) });\n                }\n            }\n            this._setUpControl();\n        }\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    /** @nodoc */\n    ngOnDestroy() {\n        this.formDirective && this.formDirective.removeControl(this);\n    }\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 path() {\n        return this._getPath(this.name);\n    }\n    /**\n     * @description\n     * The top-level directive for this control if present, otherwise null.\n     */\n    get formDirective() {\n        return this._parent ? this._parent.formDirective : null;\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    viewToModelUpdate(newValue) {\n        this.viewModel = newValue;\n        this.update.emit(newValue);\n    }\n    _setUpControl() {\n        this._setUpdateStrategy();\n        this._isStandalone() ? this._setUpStandalone() : this.formDirective.addControl(this);\n        this._registered = true;\n    }\n    _setUpdateStrategy() {\n        if (this.options && this.options.updateOn != null) {\n            this.control._updateOn = this.options.updateOn;\n        }\n    }\n    _isStandalone() {\n        return !this._parent || !!(this.options && this.options.standalone);\n    }\n    _setUpStandalone() {\n        setUpControl(this.control, this, this.callSetDisabledState);\n        this.control.updateValueAndValidity({ emitEvent: false });\n    }\n    _checkForErrors() {\n        if (!this._isStandalone()) {\n            this._checkParentType();\n        }\n        this._checkName();\n    }\n    _checkParentType() {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (!(this._parent instanceof NgModelGroup) &&\n                this._parent instanceof AbstractFormGroupDirective) {\n                throw formGroupNameException();\n            }\n            else if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n                throw modelParentException();\n            }\n        }\n    }\n    _checkName() {\n        if (this.options && this.options.name)\n            this.name = this.options.name;\n        if (!this._isStandalone() && !this.name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw missingNameException();\n        }\n    }\n    _updateValue(value) {\n        resolvedPromise.then(() => {\n            this.control.setValue(value, { emitViewToModelChange: false });\n            this._changeDetectorRef?.markForCheck();\n        });\n    }\n    _updateDisabled(changes) {\n        const disabledValue = changes['isDisabled'].currentValue;\n        // checking for 0 to avoid breaking change\n        const isDisabled = disabledValue !== 0 && booleanAttribute(disabledValue);\n        resolvedPromise.then(() => {\n            if (isDisabled && !this.control.disabled) {\n                this.control.disable();\n            }\n            else if (!isDisabled && this.control.disabled) {\n                this.control.enable();\n            }\n            this._changeDetectorRef?.markForCheck();\n        });\n    }\n    _getPath(controlName) {\n        return this._parent ? controlPath(controlName, this._parent) : [controlName];\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgModel, deps: [{ token: ControlContainer, host: true, optional: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: ChangeDetectorRef, optional: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgModel, isStandalone: false, selector: \"[ngModel]:not([formControlName]):not([formControl])\", inputs: { name: \"name\", isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"], options: [\"ngModelOptions\", \"options\"] }, outputs: { update: \"ngModelChange\" }, providers: [formControlBinding$1], exportAs: [\"ngModel\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgModel, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[ngModel]:not([formControlName]):not([formControl])',\n                    providers: [formControlBinding$1],\n                    exportAs: 'ngModel',\n                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: ControlContainer, decorators: [{\n                    type: Optional\n                }, {\n                    type: Host\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_ASYNC_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_VALUE_ACCESSOR]\n                }] }, { type: i0.ChangeDetectorRef, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [ChangeDetectorRef]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [CALL_SET_DISABLED_STATE]\n                }] }], propDecorators: { 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\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 * ```html\n * <form ngNativeValidate></form>\n * ```\n *\n * @publicApi\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n */\nclass ɵNgNoValidate {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ɵNgNoValidate, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: ɵNgNoValidate, isStandalone: false, selector: \"form:not([ngNoForm]):not([ngNativeValidate])\", host: { attributes: { \"novalidate\": \"\" } }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ɵNgNoValidate, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n                    host: { 'novalidate': '' },\n                    standalone: false,\n                }]\n        }] });\n\nconst NUMBER_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => 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 * ```html\n * <input type=\"number\" [formControl]=\"totalCountControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NumberValueAccessor extends BuiltInControlValueAccessor {\n    /**\n     * Sets the \"value\" property on the input element.\n     * @nodoc\n     */\n    writeValue(value) {\n        // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n        const normalizedValue = value == null ? '' : value;\n        this.setProperty('value', normalizedValue);\n    }\n    /**\n     * Registers a function called when the control value changes.\n     * @nodoc\n     */\n    registerOnChange(fn) {\n        this.onChange = (value) => {\n            fn(value == '' ? null : parseFloat(value));\n        };\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NumberValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NumberValueAccessor, isStandalone: false, selector: \"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]\", host: { listeners: { \"input\": \"onChange($event.target.value)\", \"blur\": \"onTouched()\" } }, providers: [NUMBER_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NumberValueAccessor, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',\n                    host: { '(input)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },\n                    providers: [NUMBER_VALUE_ACCESSOR],\n                    standalone: false,\n                }]\n        }] });\n\nconst RADIO_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => RadioControlValueAccessor),\n    multi: true,\n};\nfunction throwNameError() {\n    throw new ɵRuntimeError(1202 /* RuntimeErrorCode.NAME_AND_FORM_CONTROL_NAME_MUST_MATCH */, `\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/**\n * @description\n * Class used by Angular to track radio buttons. For internal use only.\n */\nclass RadioControlRegistry {\n    _accessors = [];\n    /**\n     * @description\n     * Adds a control to the internal registry. For internal use only.\n     */\n    add(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    remove(accessor) {\n        for (let 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    select(accessor) {\n        this._accessors.forEach((c) => {\n            if (this._isSameGroup(c, accessor) && c[1] !== accessor) {\n                c[1].fireUncheck(accessor.value);\n            }\n        });\n    }\n    _isSameGroup(controlPair, accessor) {\n        if (!controlPair[0].control)\n            return false;\n        return (controlPair[0]._parent === accessor._control._parent && controlPair[1].name === accessor.name);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RadioControlRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RadioControlRegistry, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RadioControlRegistry, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\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 */\nclass RadioControlValueAccessor extends BuiltInControlValueAccessor {\n    _registry;\n    _injector;\n    /** @internal */\n    // TODO(issue/24571): remove '!'.\n    _state;\n    /** @internal */\n    // TODO(issue/24571): remove '!'.\n    _control;\n    /** @internal */\n    // TODO(issue/24571): remove '!'.\n    _fn;\n    setDisabledStateFired = false;\n    /**\n     * The registered callback function called when a change event occurs on the input element.\n     * Note: we declare `onChange` here (also used as host listener) as a function with no arguments\n     * to override the `onChange` function (which expects 1 argument) in the parent\n     * `BaseControlValueAccessor` class.\n     * @nodoc\n     */\n    onChange = () => { };\n    /**\n     * @description\n     * Tracks the name of the radio input element.\n     */\n    // TODO(issue/24571): remove '!'.\n    name;\n    /**\n     * @description\n     * Tracks the name of the `FormControl` bound to the directive. The name corresponds\n     * to a key in the parent `FormGroup` or `FormArray`.\n     */\n    // TODO(issue/24571): remove '!'.\n    formControlName;\n    /**\n     * @description\n     * Tracks the value of the radio input element\n     */\n    value;\n    callSetDisabledState = inject(CALL_SET_DISABLED_STATE, { optional: true }) ?? setDisabledStateDefault;\n    constructor(renderer, elementRef, _registry, _injector) {\n        super(renderer, elementRef);\n        this._registry = _registry;\n        this._injector = _injector;\n    }\n    /** @nodoc */\n    ngOnInit() {\n        this._control = this._injector.get(NgControl);\n        this._checkName();\n        this._registry.add(this._control, this);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        this._registry.remove(this);\n    }\n    /**\n     * Sets the \"checked\" property value on the radio input element.\n     * @nodoc\n     */\n    writeValue(value) {\n        this._state = value === this.value;\n        this.setProperty('checked', this._state);\n    }\n    /**\n     * Registers a function called when the control value changes.\n     * @nodoc\n     */\n    registerOnChange(fn) {\n        this._fn = fn;\n        this.onChange = () => {\n            fn(this.value);\n            this._registry.select(this);\n        };\n    }\n    /** @nodoc */\n    setDisabledState(isDisabled) {\n        /**\n         * `setDisabledState` is supposed to be called whenever the disabled state of a control changes,\n         * including upon control creation. However, a longstanding bug caused the method to not fire\n         * when an *enabled* control was attached. This bug was fixed in v15 in #47576.\n         *\n         * This had a side effect: previously, it was possible to instantiate a reactive form control\n         * with `[attr.disabled]=true`, even though the corresponding control was enabled in the\n         * model. This resulted in a mismatch between the model and the DOM. Now, because\n         * `setDisabledState` is always called, the value in the DOM will be immediately overwritten\n         * with the \"correct\" enabled value.\n         *\n         * However, the fix also created an exceptional case: radio buttons. Because Reactive Forms\n         * models the entire group of radio buttons as a single `FormControl`, there is no way to\n         * control the disabled state for individual radios, so they can no longer be configured as\n         * disabled. Thus, we keep the old behavior for radio buttons, so that `[attr.disabled]`\n         * continues to work. Specifically, we drop the first call to `setDisabledState` if `disabled`\n         * is `false`, and we are not in legacy mode.\n         */\n        if (this.setDisabledStateFired ||\n            isDisabled ||\n            this.callSetDisabledState === 'whenDisabledForLegacyCode') {\n            this.setProperty('disabled', isDisabled);\n        }\n        this.setDisabledStateFired = true;\n    }\n    /**\n     * Sets the \"value\" on the radio input element and unchecks it.\n     *\n     * @param value\n     */\n    fireUncheck(value) {\n        this.writeValue(value);\n    }\n    _checkName() {\n        if (this.name &&\n            this.formControlName &&\n            this.name !== this.formControlName &&\n            (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throwNameError();\n        }\n        if (!this.name && this.formControlName)\n            this.name = this.formControlName;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RadioControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: RadioControlRegistry }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: RadioControlValueAccessor, isStandalone: false, selector: \"input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]\", inputs: { name: \"name\", formControlName: \"formControlName\", value: \"value\" }, host: { listeners: { \"change\": \"onChange()\", \"blur\": \"onTouched()\" } }, providers: [RADIO_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RadioControlValueAccessor, decorators: [{\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                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: RadioControlRegistry }, { type: i0.Injector }], propDecorators: { name: [{\n                type: Input\n            }], formControlName: [{\n                type: Input\n            }], value: [{\n                type: Input\n            }] } });\n\nconst RANGE_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => 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 * ```html\n * <input type=\"range\" [formControl]=\"ageControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass RangeValueAccessor extends BuiltInControlValueAccessor {\n    /**\n     * Sets the \"value\" property on the input element.\n     * @nodoc\n     */\n    writeValue(value) {\n        this.setProperty('value', parseFloat(value));\n    }\n    /**\n     * Registers a function called when the control value changes.\n     * @nodoc\n     */\n    registerOnChange(fn) {\n        this.onChange = (value) => {\n            fn(value == '' ? null : parseFloat(value));\n        };\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RangeValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: RangeValueAccessor, isStandalone: false, selector: \"input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]\", host: { listeners: { \"change\": \"onChange($event.target.value)\", \"input\": \"onChange($event.target.value)\", \"blur\": \"onTouched()\" } }, providers: [RANGE_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RangeValueAccessor, decorators: [{\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                    standalone: false,\n                }]\n        }] });\n\n/**\n * Token to provide to turn off the ngModel warning on formControl and formControlName.\n */\nconst NG_MODEL_WITH_FORM_CONTROL_WARNING = new InjectionToken(ngDevMode ? 'NgModelWithFormControlWarning' : '');\nconst formControlBinding = {\n    provide: NgControl,\n    useExisting: forwardRef(() => 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 *\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n * @see {@link FormControl}\n * @see {@link 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 */\nclass FormControlDirective extends NgControl {\n    _ngModelWarningConfig;\n    callSetDisabledState;\n    /**\n     * Internal reference to the view model value.\n     * @nodoc\n     */\n    viewModel;\n    /**\n     * @description\n     * Tracks the `FormControl` instance bound to the directive.\n     */\n    // TODO(issue/24571): remove '!'.\n    form;\n    /**\n     * @description\n     * Triggers a warning in dev mode that this input should not be used with reactive forms.\n     */\n    set isDisabled(isDisabled) {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            console.warn(disabledAttrWarning);\n        }\n    }\n    // TODO(kara): remove next 4 properties once deprecation period is over\n    /** @deprecated as of v6 */\n    model;\n    /** @deprecated as of v6 */\n    update = new EventEmitter();\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    static _ngModelWarningSentOnce = false;\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    _ngModelWarningSent = false;\n    constructor(validators, asyncValidators, valueAccessors, _ngModelWarningConfig, callSetDisabledState) {\n        super();\n        this._ngModelWarningConfig = _ngModelWarningConfig;\n        this.callSetDisabledState = callSetDisabledState;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n        this.valueAccessor = selectValueAccessor(this, valueAccessors);\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        if (this._isControlChanged(changes)) {\n            const previousForm = changes['form'].previousValue;\n            if (previousForm) {\n                cleanUpControl(previousForm, this, /* validateControlPresenceOnChange */ false);\n            }\n            setUpControl(this.form, this, this.callSetDisabledState);\n            this.form.updateValueAndValidity({ emitEvent: false });\n        }\n        if (isPropertyUpdated(changes, this.viewModel)) {\n            if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                _ngModelWarning('formControl', FormControlDirective, this, this._ngModelWarningConfig);\n            }\n            this.form.setValue(this.model);\n            this.viewModel = this.model;\n        }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this.form) {\n            cleanUpControl(this.form, this, /* validateControlPresenceOnChange */ false);\n        }\n    }\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 path() {\n        return [];\n    }\n    /**\n     * @description\n     * The `FormControl` bound to this directive.\n     */\n    get control() {\n        return this.form;\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    viewToModelUpdate(newValue) {\n        this.viewModel = newValue;\n        this.update.emit(newValue);\n    }\n    _isControlChanged(changes) {\n        return changes.hasOwnProperty('form');\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormControlDirective, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: NG_MODEL_WITH_FORM_CONTROL_WARNING, optional: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: FormControlDirective, isStandalone: false, selector: \"[formControl]\", inputs: { form: [\"formControl\", \"form\"], isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"] }, outputs: { update: \"ngModelChange\" }, providers: [formControlBinding], exportAs: [\"ngForm\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormControlDirective, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[formControl]',\n                    providers: [formControlBinding],\n                    exportAs: 'ngForm',\n                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_ASYNC_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_VALUE_ACCESSOR]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [CALL_SET_DISABLED_STATE]\n                }] }], propDecorators: { form: [{\n                type: Input,\n                args: ['formControl']\n            }], isDisabled: [{\n                type: Input,\n                args: ['disabled']\n            }], model: [{\n                type: Input,\n                args: ['ngModel']\n            }], update: [{\n                type: Output,\n                args: ['ngModelChange']\n            }] } });\n\nconst formDirectiveProvider = {\n    provide: ControlContainer,\n    useExisting: forwardRef(() => FormGroupDirective),\n};\n/**\n * @description\n *\n * Binds an existing `FormGroup` or `FormRecord` 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`/`FormRecord`,\n * and `FormArray` instances to child `FormControlName`, `FormGroupName`,\n * and `FormArrayName` directives.\n *\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n * @see {@link AbstractControl}\n *\n * @usageNotes\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 */\nclass FormGroupDirective extends ControlContainer {\n    callSetDisabledState;\n    /**\n     * @description\n     * Reports whether the form submission has been triggered.\n     */\n    get submitted() {\n        return untracked(this._submittedReactive);\n    }\n    // TODO(atscott): Remove once invalid API usage is cleaned up internally\n    set submitted(value) {\n        this._submittedReactive.set(value);\n    }\n    /** @internal */\n    _submitted = computed(() => this._submittedReactive());\n    _submittedReactive = signal(false);\n    /**\n     * Reference to an old form group input value, which is needed to cleanup\n     * old instance in case it was replaced with a new one.\n     */\n    _oldForm;\n    /**\n     * Callback that should be invoked when controls in FormGroup or FormArray collection change\n     * (added or removed). This callback triggers corresponding DOM updates.\n     */\n    _onCollectionChange = () => this._updateDomValue();\n    /**\n     * @description\n     * Tracks the list of added `FormControlName` instances\n     */\n    directives = [];\n    /**\n     * @description\n     * Tracks the `FormGroup` bound to this directive.\n     */\n    form = null;\n    /**\n     * @description\n     * Emits an event when the form submission has been triggered.\n     */\n    ngSubmit = new EventEmitter();\n    constructor(validators, asyncValidators, callSetDisabledState) {\n        super();\n        this.callSetDisabledState = callSetDisabledState;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        this._checkFormPresent();\n        if (changes.hasOwnProperty('form')) {\n            this._updateValidators();\n            this._updateDomValue();\n            this._updateRegistrations();\n            this._oldForm = this.form;\n        }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this.form) {\n            cleanUpValidators(this.form, this);\n            // Currently the `onCollectionChange` callback is rewritten each time the\n            // `_registerOnCollectionChange` function is invoked. The implication is that cleanup should\n            // happen *only* when the `onCollectionChange` callback was set by this directive instance.\n            // Otherwise it might cause overriding a callback of some other directive instances. We should\n            // consider updating this logic later to make it similar to how `onChange` callbacks are\n            // handled, see https://github.com/angular/angular/issues/39732 for additional info.\n            if (this.form._onCollectionChange === this._onCollectionChange) {\n                this.form._registerOnCollectionChange(() => { });\n            }\n        }\n    }\n    /**\n     * @description\n     * Returns this directive's instance.\n     */\n    get formDirective() {\n        return this;\n    }\n    /**\n     * @description\n     * Returns the `FormGroup` bound to this directive.\n     */\n    get control() {\n        return this.form;\n    }\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 path() {\n        return [];\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    addControl(dir) {\n        const ctrl = this.form.get(dir.path);\n        setUpControl(ctrl, dir, this.callSetDisabledState);\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    getControl(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    removeControl(dir) {\n        cleanUpControl(dir.control || null, dir, /* validateControlPresenceOnChange */ false);\n        removeListItem$1(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    addFormGroup(dir) {\n        this._setUpFormContainer(dir);\n    }\n    /**\n     * Performs the necessary cleanup when a `FormGroupName` directive instance is removed from the\n     * view.\n     *\n     * @param dir The `FormGroupName` directive instance.\n     */\n    removeFormGroup(dir) {\n        this._cleanUpFormContainer(dir);\n    }\n    /**\n     * @description\n     * Retrieves the `FormGroup` for a provided `FormGroupName` directive instance\n     *\n     * @param dir The `FormGroupName` directive instance.\n     */\n    getFormGroup(dir) {\n        return this.form.get(dir.path);\n    }\n    /**\n     * Performs the necessary setup when a `FormArrayName` directive instance is added to the view.\n     *\n     * @param dir The `FormArrayName` directive instance.\n     */\n    addFormArray(dir) {\n        this._setUpFormContainer(dir);\n    }\n    /**\n     * Performs the necessary cleanup when a `FormArrayName` directive instance is removed from the\n     * view.\n     *\n     * @param dir The `FormArrayName` directive instance.\n     */\n    removeFormArray(dir) {\n        this._cleanUpFormContainer(dir);\n    }\n    /**\n     * @description\n     * Retrieves the `FormArray` for a provided `FormArrayName` directive instance.\n     *\n     * @param dir The `FormArrayName` directive instance.\n     */\n    getFormArray(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    updateModel(dir, value) {\n        const 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    onSubmit($event) {\n        this._submittedReactive.set(true);\n        syncPendingControls(this.form, this.directives);\n        this.ngSubmit.emit($event);\n        this.form._events.next(new FormSubmittedEvent(this.control));\n        // Forms with `method=\"dialog\"` have some special behavior that won't reload the page and that\n        // shouldn't be prevented. Note that we need to null check the `event` and the `target`, because\n        // some internal apps call this method directly with the wrong arguments.\n        return $event?.target?.method === 'dialog';\n    }\n    /**\n     * @description\n     * Method called when the \"reset\" event is triggered on the form.\n     */\n    onReset() {\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    resetForm(value = undefined) {\n        this.form.reset(value);\n        this._submittedReactive.set(false);\n        this.form._events.next(new FormResetEvent(this.form));\n    }\n    /** @internal */\n    _updateDomValue() {\n        this.directives.forEach((dir) => {\n            const oldCtrl = dir.control;\n            const newCtrl = this.form.get(dir.path);\n            if (oldCtrl !== newCtrl) {\n                // Note: the value of the `dir.control` may not be defined, for example when it's a first\n                // `FormControl` that is added to a `FormGroup` instance (via `addControl` call).\n                cleanUpControl(oldCtrl || null, dir);\n                // Check whether new control at the same location inside the corresponding `FormGroup` is an\n                // instance of `FormControl` and perform control setup only if that's the case.\n                // Note: we don't need to clear the list of directives (`this.directives`) here, it would be\n                // taken care of in the `removeControl` method invoked when corresponding `formControlName`\n                // directive instance is being removed (invoked from `FormControlName.ngOnDestroy`).\n                if (isFormControl(newCtrl)) {\n                    setUpControl(newCtrl, dir, this.callSetDisabledState);\n                    dir.control = newCtrl;\n                }\n            }\n        });\n        this.form._updateTreeValidity({ emitEvent: false });\n    }\n    _setUpFormContainer(dir) {\n        const ctrl = this.form.get(dir.path);\n        setUpFormContainer(ctrl, dir);\n        // NOTE: this operation looks unnecessary in case no new validators were added in\n        // `setUpFormContainer` call. Consider updating this code to match the logic in\n        // `_cleanUpFormContainer` function.\n        ctrl.updateValueAndValidity({ emitEvent: false });\n    }\n    _cleanUpFormContainer(dir) {\n        if (this.form) {\n            const ctrl = this.form.get(dir.path);\n            if (ctrl) {\n                const isControlUpdated = cleanUpFormContainer(ctrl, dir);\n                if (isControlUpdated) {\n                    // Run validity check only in case a control was updated (i.e. view validators were\n                    // removed) as removing view validators might cause validity to change.\n                    ctrl.updateValueAndValidity({ emitEvent: false });\n                }\n            }\n        }\n    }\n    _updateRegistrations() {\n        this.form._registerOnCollectionChange(this._onCollectionChange);\n        if (this._oldForm) {\n            this._oldForm._registerOnCollectionChange(() => { });\n        }\n    }\n    _updateValidators() {\n        setUpValidators(this.form, this);\n        if (this._oldForm) {\n            cleanUpValidators(this._oldForm, this);\n        }\n    }\n    _checkFormPresent() {\n        if (!this.form && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw missingFormException();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormGroupDirective, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: FormGroupDirective, isStandalone: false, selector: \"[formGroup]\", inputs: { form: [\"formGroup\", \"form\"] }, outputs: { ngSubmit: \"ngSubmit\" }, host: { listeners: { \"submit\": \"onSubmit($event)\", \"reset\": \"onReset()\" } }, providers: [formDirectiveProvider], exportAs: [\"ngForm\"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormGroupDirective, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[formGroup]',\n                    providers: [formDirectiveProvider],\n                    host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n                    exportAs: 'ngForm',\n                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_ASYNC_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [CALL_SET_DISABLED_STATE]\n                }] }], propDecorators: { form: [{\n                type: Input,\n                args: ['formGroup']\n            }], ngSubmit: [{\n                type: Output\n            }] } });\n\nconst formGroupNameProvider = {\n    provide: ControlContainer,\n    useExisting: forwardRef(() => FormGroupName),\n};\n/**\n * @description\n *\n * Syncs a nested `FormGroup` or `FormRecord` 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` or `FormRecord` to link, and\n * looks for a `FormGroup` or `FormRecord` 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/forms/reactive-forms)\n *\n * @usageNotes\n *\n * ### Access the group by name\n *\n * The following example uses the `AbstractControl.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 `AbstractControl.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 */\nclass FormGroupName extends AbstractFormGroupDirective {\n    /**\n     * @description\n     * Tracks the name of the `FormGroup` bound to the directive. The name corresponds\n     * to a key in the parent `FormGroup` or `FormArray`.\n     * Accepts a name as a string or a number.\n     * The name in the form of a string is useful for individual forms,\n     * while the numerical form allows for form groups to be bound\n     * to indices when iterating over groups in a `FormArray`.\n     */\n    name = null;\n    constructor(parent, validators, asyncValidators) {\n        super();\n        this._parent = parent;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n    }\n    /** @internal */\n    _checkParentType() {\n        if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw groupParentException();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormGroupName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: FormGroupName, isStandalone: false, selector: \"[formGroupName]\", inputs: { name: [\"formGroupName\", \"name\"] }, providers: [formGroupNameProvider], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormGroupName, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[formGroupName]',\n                    providers: [formGroupNameProvider],\n                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: ControlContainer, decorators: [{\n                    type: Optional\n                }, {\n                    type: Host\n                }, {\n                    type: SkipSelf\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_ASYNC_VALIDATORS]\n                }] }], propDecorators: { name: [{\n                type: Input,\n                args: ['formGroupName']\n            }] } });\nconst formArrayNameProvider = {\n    provide: ControlContainer,\n    useExisting: forwardRef(() => 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/forms/reactive-forms)\n * @see {@link 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 */\nclass FormArrayName extends ControlContainer {\n    /** @internal */\n    _parent;\n    /**\n     * @description\n     * Tracks the name of the `FormArray` bound to the directive. The name corresponds\n     * to a key in the parent `FormGroup` or `FormArray`.\n     * Accepts a name as a string or a number.\n     * The name in the form of a string is useful for individual forms,\n     * while the numerical form allows for form arrays to be bound\n     * to indices when iterating over arrays in a `FormArray`.\n     */\n    name = null;\n    constructor(parent, validators, asyncValidators) {\n        super();\n        this._parent = parent;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n    }\n    /**\n     * A lifecycle method called when the directive's inputs are initialized. For internal use only.\n     * @throws If the directive does not have a valid parent.\n     * @nodoc\n     */\n    ngOnInit() {\n        this._checkParentType();\n        this.formDirective.addFormArray(this);\n    }\n    /**\n     * A lifecycle method called before the directive's instance is destroyed. For internal use only.\n     * @nodoc\n     */\n    ngOnDestroy() {\n        if (this.formDirective) {\n            this.formDirective.removeFormArray(this);\n        }\n    }\n    /**\n     * @description\n     * The `FormArray` bound to this directive.\n     */\n    get control() {\n        return this.formDirective.getFormArray(this);\n    }\n    /**\n     * @description\n     * The top-level directive for this group if present, otherwise null.\n     */\n    get formDirective() {\n        return this._parent ? this._parent.formDirective : null;\n    }\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 path() {\n        return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n    }\n    _checkParentType() {\n        if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw arrayParentException();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormArrayName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: FormArrayName, isStandalone: false, selector: \"[formArrayName]\", inputs: { name: [\"formArrayName\", \"name\"] }, providers: [formArrayNameProvider], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormArrayName, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[formArrayName]',\n                    providers: [formArrayNameProvider],\n                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: ControlContainer, decorators: [{\n                    type: Optional\n                }, {\n                    type: Host\n                }, {\n                    type: SkipSelf\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_ASYNC_VALIDATORS]\n                }] }], propDecorators: { name: [{\n                type: Input,\n                args: ['formArrayName']\n            }] } });\nfunction _hasInvalidParent(parent) {\n    return (!(parent instanceof FormGroupName) &&\n        !(parent instanceof FormGroupDirective) &&\n        !(parent instanceof FormArrayName));\n}\n\nconst controlNameBinding = {\n    provide: NgControl,\n    useExisting: forwardRef(() => 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/forms/reactive-forms)\n * @see {@link FormControl}\n * @see {@link 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 * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass FormControlName extends NgControl {\n    _ngModelWarningConfig;\n    _added = false;\n    /**\n     * Internal reference to the view model value.\n     * @internal\n     */\n    viewModel;\n    /**\n     * @description\n     * Tracks the `FormControl` instance bound to the directive.\n     */\n    // TODO(issue/24571): remove '!'.\n    control;\n    /**\n     * @description\n     * Tracks the name of the `FormControl` bound to the directive. The name corresponds\n     * to a key in the parent `FormGroup` or `FormArray`.\n     * Accepts a name as a string or a number.\n     * The name in the form of a string is useful for individual forms,\n     * while the numerical form allows for form controls to be bound\n     * to indices when iterating over controls in a `FormArray`.\n     */\n    name = null;\n    /**\n     * @description\n     * Triggers a warning in dev mode that this input should not be used with reactive forms.\n     */\n    set isDisabled(isDisabled) {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            console.warn(disabledAttrWarning);\n        }\n    }\n    // TODO(kara): remove next 4 properties once deprecation period is over\n    /** @deprecated as of v6 */\n    model;\n    /** @deprecated as of v6 */\n    update = new EventEmitter();\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    static _ngModelWarningSentOnce = false;\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    _ngModelWarningSent = false;\n    constructor(parent, validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {\n        super();\n        this._ngModelWarningConfig = _ngModelWarningConfig;\n        this._parent = parent;\n        this._setValidators(validators);\n        this._setAsyncValidators(asyncValidators);\n        this.valueAccessor = selectValueAccessor(this, valueAccessors);\n    }\n    /** @nodoc */\n    ngOnChanges(changes) {\n        if (!this._added)\n            this._setUpControl();\n        if (isPropertyUpdated(changes, this.viewModel)) {\n            if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                _ngModelWarning('formControlName', FormControlName, this, this._ngModelWarningConfig);\n            }\n            this.viewModel = this.model;\n            this.formDirective.updateModel(this, this.model);\n        }\n    }\n    /** @nodoc */\n    ngOnDestroy() {\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    viewToModelUpdate(newValue) {\n        this.viewModel = newValue;\n        this.update.emit(newValue);\n    }\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 path() {\n        return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n    }\n    /**\n     * @description\n     * The top-level directive for this group if present, otherwise null.\n     */\n    get formDirective() {\n        return this._parent ? this._parent.formDirective : null;\n    }\n    _checkParentType() {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (!(this._parent instanceof FormGroupName) &&\n                this._parent instanceof AbstractFormGroupDirective) {\n                throw ngModelGroupException();\n            }\n            else if (!(this._parent instanceof FormGroupName) &&\n                !(this._parent instanceof FormGroupDirective) &&\n                !(this._parent instanceof FormArrayName)) {\n                throw controlParentException(this.name);\n            }\n        }\n    }\n    _setUpControl() {\n        this._checkParentType();\n        this.control = this.formDirective.addControl(this);\n        this._added = true;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormControlName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: NG_MODEL_WITH_FORM_CONTROL_WARNING, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: FormControlName, isStandalone: false, selector: \"[formControlName]\", inputs: { name: [\"formControlName\", \"name\"], isDisabled: [\"disabled\", \"isDisabled\"], model: [\"ngModel\", \"model\"] }, outputs: { update: \"ngModelChange\" }, providers: [controlNameBinding], usesInheritance: true, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormControlName, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[formControlName]',\n                    providers: [controlNameBinding],\n                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: ControlContainer, decorators: [{\n                    type: Optional\n                }, {\n                    type: Host\n                }, {\n                    type: SkipSelf\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_ASYNC_VALIDATORS]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Self\n                }, {\n                    type: Inject,\n                    args: [NG_VALUE_ACCESSOR]\n                }] }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]\n                }] }], propDecorators: { name: [{\n                type: Input,\n                args: ['formControlName']\n            }], isDisabled: [{\n                type: Input,\n                args: ['disabled']\n            }], model: [{\n                type: Input,\n                args: ['ngModel']\n            }], update: [{\n                type: Output,\n                args: ['ngModelChange']\n            }] } });\n\nconst SELECT_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => SelectControlValueAccessor),\n    multi: true,\n};\nfunction _buildValueString$1(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$1(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 * ```html\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 IE, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event#browser_compatibility\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass SelectControlValueAccessor extends BuiltInControlValueAccessor {\n    /** @nodoc */\n    value;\n    /** @internal */\n    _optionMap = new Map();\n    /** @internal */\n    _idCounter = 0;\n    /**\n     * @description\n     * Tracks the option comparison algorithm for tracking identities when\n     * checking for changes.\n     */\n    set compareWith(fn) {\n        if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw new ɵRuntimeError(1201 /* RuntimeErrorCode.COMPAREWITH_NOT_A_FN */, `compareWith must be a function, but received ${JSON.stringify(fn)}`);\n        }\n        this._compareWith = fn;\n    }\n    _compareWith = Object.is;\n    /**\n     * Sets the \"value\" property on the select element.\n     * @nodoc\n     */\n    writeValue(value) {\n        this.value = value;\n        const id = this._getOptionId(value);\n        const valueString = _buildValueString$1(id, value);\n        this.setProperty('value', valueString);\n    }\n    /**\n     * Registers a function called when the control value changes.\n     * @nodoc\n     */\n    registerOnChange(fn) {\n        this.onChange = (valueString) => {\n            this.value = this._getOptionValue(valueString);\n            fn(this.value);\n        };\n    }\n    /** @internal */\n    _registerOption() {\n        return (this._idCounter++).toString();\n    }\n    /** @internal */\n    _getOptionId(value) {\n        for (const id of this._optionMap.keys()) {\n            if (this._compareWith(this._optionMap.get(id), value))\n                return id;\n        }\n        return null;\n    }\n    /** @internal */\n    _getOptionValue(valueString) {\n        const id = _extractId$1(valueString);\n        return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: SelectControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: SelectControlValueAccessor, isStandalone: false, selector: \"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]\", inputs: { compareWith: \"compareWith\" }, host: { listeners: { \"change\": \"onChange($event.target.value)\", \"blur\": \"onTouched()\" } }, providers: [SELECT_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: SelectControlValueAccessor, decorators: [{\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                    standalone: false,\n                }]\n        }], propDecorators: { compareWith: [{\n                type: Input\n            }] } });\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see {@link SelectControlValueAccessor}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass NgSelectOption {\n    _element;\n    _renderer;\n    _select;\n    /**\n     * @description\n     * ID of the option element\n     */\n    // TODO(issue/24571): remove '!'.\n    id;\n    constructor(_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    /**\n     * @description\n     * Tracks the value bound to the option element. Unlike the value binding,\n     * ngValue supports binding to objects.\n     */\n    set ngValue(value) {\n        if (this._select == null)\n            return;\n        this._select._optionMap.set(this.id, value);\n        this._setElementValue(_buildValueString$1(this.id, value));\n        this._select.writeValue(this._select.value);\n    }\n    /**\n     * @description\n     * Tracks simple string values bound to the option element.\n     * For objects, use the `ngValue` input binding.\n     */\n    set value(value) {\n        this._setElementValue(value);\n        if (this._select)\n            this._select.writeValue(this._select.value);\n    }\n    /** @internal */\n    _setElementValue(value) {\n        this._renderer.setProperty(this._element.nativeElement, 'value', value);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this._select) {\n            this._select._optionMap.delete(this.id);\n            this._select.writeValue(this._select.value);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgSelectOption, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SelectControlValueAccessor, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: NgSelectOption, isStandalone: false, selector: \"option\", inputs: { ngValue: \"ngValue\", value: \"value\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NgSelectOption, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'option',\n                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SelectControlValueAccessor, decorators: [{\n                    type: Optional\n                }, {\n                    type: Host\n                }] }], propDecorators: { ngValue: [{\n                type: Input,\n                args: ['ngValue']\n            }], value: [{\n                type: Input,\n                args: ['value']\n            }] } });\n\nconst SELECT_MULTIPLE_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => SelectMultipleControlValueAccessor),\n    multi: true,\n};\nfunction _buildValueString(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(valueString) {\n    return valueString.split(':')[0];\n}\n/** Mock interface for HTMLCollection */\nclass HTMLCollection {\n    // TODO(issue/24571): remove '!'.\n    length;\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 {@link 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 * ```html\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 */\nclass SelectMultipleControlValueAccessor extends BuiltInControlValueAccessor {\n    /**\n     * The current value.\n     * @nodoc\n     */\n    value;\n    /** @internal */\n    _optionMap = new Map();\n    /** @internal */\n    _idCounter = 0;\n    /**\n     * @description\n     * Tracks the option comparison algorithm for tracking identities when\n     * checking for changes.\n     */\n    set compareWith(fn) {\n        if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw new ɵRuntimeError(1201 /* RuntimeErrorCode.COMPAREWITH_NOT_A_FN */, `compareWith must be a function, but received ${JSON.stringify(fn)}`);\n        }\n        this._compareWith = fn;\n    }\n    _compareWith = Object.is;\n    /**\n     * Sets the \"value\" property on one or of more of the select's options.\n     * @nodoc\n     */\n    writeValue(value) {\n        this.value = value;\n        let optionSelectedStateSetter;\n        if (Array.isArray(value)) {\n            // convert values to ids\n            const ids = value.map((v) => this._getOptionId(v));\n            optionSelectedStateSetter = (opt, o) => {\n                opt._setSelected(ids.indexOf(o.toString()) > -1);\n            };\n        }\n        else {\n            optionSelectedStateSetter = (opt, o) => {\n                opt._setSelected(false);\n            };\n        }\n        this._optionMap.forEach(optionSelectedStateSetter);\n    }\n    /**\n     * Registers a function called when the control value changes\n     * and writes an array of the selected options.\n     * @nodoc\n     */\n    registerOnChange(fn) {\n        this.onChange = (element) => {\n            const selected = [];\n            const selectedOptions = element.selectedOptions;\n            if (selectedOptions !== undefined) {\n                const options = selectedOptions;\n                for (let i = 0; i < options.length; i++) {\n                    const opt = options[i];\n                    const val = this._getOptionValue(opt.value);\n                    selected.push(val);\n                }\n            }\n            // Degrade to use `options` when `selectedOptions` property is not available.\n            // Note: the `selectedOptions` is available in all supported browsers, but the Domino lib\n            // doesn't have it currently, see https://github.com/fgnass/domino/issues/177.\n            else {\n                const options = element.options;\n                for (let i = 0; i < options.length; i++) {\n                    const opt = options[i];\n                    if (opt.selected) {\n                        const val = this._getOptionValue(opt.value);\n                        selected.push(val);\n                    }\n                }\n            }\n            this.value = selected;\n            fn(selected);\n        };\n    }\n    /** @internal */\n    _registerOption(value) {\n        const id = (this._idCounter++).toString();\n        this._optionMap.set(id, value);\n        return id;\n    }\n    /** @internal */\n    _getOptionId(value) {\n        for (const id of this._optionMap.keys()) {\n            if (this._compareWith(this._optionMap.get(id)._value, value))\n                return id;\n        }\n        return null;\n    }\n    /** @internal */\n    _getOptionValue(valueString) {\n        const id = _extractId(valueString);\n        return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: SelectMultipleControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: SelectMultipleControlValueAccessor, isStandalone: false, selector: \"select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]\", inputs: { compareWith: \"compareWith\" }, host: { listeners: { \"change\": \"onChange($event.target)\", \"blur\": \"onTouched()\" } }, providers: [SELECT_MULTIPLE_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: SelectMultipleControlValueAccessor, decorators: [{\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                    standalone: false,\n                }]\n        }], propDecorators: { compareWith: [{\n                type: Input\n            }] } });\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see {@link SelectMultipleControlValueAccessor}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass ɵNgSelectMultipleOption {\n    _element;\n    _renderer;\n    _select;\n    // TODO(issue/24571): remove '!'.\n    id;\n    /** @internal */\n    _value;\n    constructor(_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    /**\n     * @description\n     * Tracks the value bound to the option element. Unlike the value binding,\n     * ngValue supports binding to objects.\n     */\n    set ngValue(value) {\n        if (this._select == null)\n            return;\n        this._value = value;\n        this._setElementValue(_buildValueString(this.id, value));\n        this._select.writeValue(this._select.value);\n    }\n    /**\n     * @description\n     * Tracks simple string values bound to the option element.\n     * For objects, use the `ngValue` input binding.\n     */\n    set value(value) {\n        if (this._select) {\n            this._value = value;\n            this._setElementValue(_buildValueString(this.id, value));\n            this._select.writeValue(this._select.value);\n        }\n        else {\n            this._setElementValue(value);\n        }\n    }\n    /** @internal */\n    _setElementValue(value) {\n        this._renderer.setProperty(this._element.nativeElement, 'value', value);\n    }\n    /** @internal */\n    _setSelected(selected) {\n        this._renderer.setProperty(this._element.nativeElement, 'selected', selected);\n    }\n    /** @nodoc */\n    ngOnDestroy() {\n        if (this._select) {\n            this._select._optionMap.delete(this.id);\n            this._select.writeValue(this._select.value);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ɵNgSelectMultipleOption, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SelectMultipleControlValueAccessor, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: ɵNgSelectMultipleOption, isStandalone: false, selector: \"option\", inputs: { ngValue: \"ngValue\", value: \"value\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ɵNgSelectMultipleOption, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'option',\n                    standalone: false,\n                }]\n        }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SelectMultipleControlValueAccessor, decorators: [{\n                    type: Optional\n                }, {\n                    type: Host\n                }] }], propDecorators: { ngValue: [{\n                type: Input,\n                args: ['ngValue']\n            }], value: [{\n                type: Input,\n                args: ['value']\n            }] } });\n\n/**\n * Method that updates string to integer if not already a number\n *\n * @param value The value to convert to integer.\n * @returns value of parameter converted to number or integer.\n */\nfunction toInteger(value) {\n    return typeof value === 'number' ? value : parseInt(value, 10);\n}\n/**\n * Method that ensures that provided value is a float (and converts it to float if needed).\n *\n * @param value The value to convert to float.\n * @returns value of parameter converted to number or float.\n */\nfunction toFloat(value) {\n    return typeof value === 'number' ? value : parseFloat(value);\n}\n/**\n * A base class for Validator-based Directives. The class contains common logic shared across such\n * Directives.\n *\n * For internal use only, this class is not intended for use outside of the Forms package.\n */\nclass AbstractValidatorDirective {\n    _validator = nullValidator;\n    _onChange;\n    /**\n     * A flag that tracks whether this validator is enabled.\n     *\n     * Marking it `internal` (vs `protected`), so that this flag can be used in host bindings of\n     * directive classes that extend this base class.\n     * @internal\n     */\n    _enabled;\n    /** @nodoc */\n    ngOnChanges(changes) {\n        if (this.inputName in changes) {\n            const input = this.normalizeInput(changes[this.inputName].currentValue);\n            this._enabled = this.enabled(input);\n            this._validator = this._enabled ? this.createValidator(input) : nullValidator;\n            if (this._onChange) {\n                this._onChange();\n            }\n        }\n    }\n    /** @nodoc */\n    validate(control) {\n        return this._validator(control);\n    }\n    /** @nodoc */\n    registerOnValidatorChange(fn) {\n        this._onChange = fn;\n    }\n    /**\n     * @description\n     * Determines whether this validator should be active or not based on an input.\n     * Base class implementation checks whether an input is defined (if the value is different from\n     * `null` and `undefined`). Validator classes that extend this base class can override this\n     * function with the logic specific to a particular validator directive.\n     */\n    enabled(input) {\n        return input != null /* both `null` and `undefined` */;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: AbstractValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: AbstractValidatorDirective, isStandalone: true, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: AbstractValidatorDirective, decorators: [{\n            type: Directive\n        }] });\n/**\n * @description\n * Provider which adds `MaxValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MAX_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => MaxValidator),\n    multi: true,\n};\n/**\n * A directive which installs the {@link MaxValidator} for any `formControlName`,\n * `formControl`, or control with `ngModel` that also has a `max` attribute.\n *\n * @see [Form Validation](guide/forms/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a max validator\n *\n * The following example shows how to add a max validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input type=\"number\" ngModel max=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MaxValidator extends AbstractValidatorDirective {\n    /**\n     * @description\n     * Tracks changes to the max bound to this directive.\n     */\n    max;\n    /** @internal */\n    inputName = 'max';\n    /** @internal */\n    normalizeInput = (input) => toFloat(input);\n    /** @internal */\n    createValidator = (max) => maxValidator(max);\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: MaxValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: MaxValidator, isStandalone: false, selector: \"input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]\", inputs: { max: \"max\" }, host: { properties: { \"attr.max\": \"_enabled ? max : null\" } }, providers: [MAX_VALIDATOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: MaxValidator, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]',\n                    providers: [MAX_VALIDATOR],\n                    host: { '[attr.max]': '_enabled ? max : null' },\n                    standalone: false,\n                }]\n        }], propDecorators: { max: [{\n                type: Input\n            }] } });\n/**\n * @description\n * Provider which adds `MinValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MIN_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => MinValidator),\n    multi: true,\n};\n/**\n * A directive which installs the {@link MinValidator} for any `formControlName`,\n * `formControl`, or control with `ngModel` that also has a `min` attribute.\n *\n * @see [Form Validation](guide/forms/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a min validator\n *\n * The following example shows how to add a min validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input type=\"number\" ngModel min=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\nclass MinValidator extends AbstractValidatorDirective {\n    /**\n     * @description\n     * Tracks changes to the min bound to this directive.\n     */\n    min;\n    /** @internal */\n    inputName = 'min';\n    /** @internal */\n    normalizeInput = (input) => toFloat(input);\n    /** @internal */\n    createValidator = (min) => minValidator(min);\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: MinValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: MinValidator, isStandalone: false, selector: \"input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]\", inputs: { min: \"min\" }, host: { properties: { \"attr.min\": \"_enabled ? min : null\" } }, providers: [MIN_VALIDATOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: MinValidator, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]',\n                    providers: [MIN_VALIDATOR],\n                    host: { '[attr.min]': '_enabled ? min : null' },\n                    standalone: false,\n                }]\n        }], propDecorators: { min: [{\n                type: Input\n            }] } });\n/**\n * @description\n * Provider which adds `RequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst REQUIRED_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => RequiredValidator),\n    multi: true,\n};\n/**\n * @description\n * Provider which adds `CheckboxRequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst CHECKBOX_REQUIRED_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => 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/forms/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required validator using template-driven forms\n *\n * ```html\n * <input name=\"fullName\" ngModel required>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\nclass RequiredValidator extends AbstractValidatorDirective {\n    /**\n     * @description\n     * Tracks changes to the required attribute bound to this directive.\n     */\n    required;\n    /** @internal */\n    inputName = 'required';\n    /** @internal */\n    normalizeInput = booleanAttribute;\n    /** @internal */\n    createValidator = (input) => requiredValidator;\n    /** @nodoc */\n    enabled(input) {\n        return input;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: RequiredValidator, isStandalone: false, selector: \":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]\", inputs: { required: \"required\" }, host: { properties: { \"attr.required\": \"_enabled ? \\\"\\\" : null\" } }, providers: [REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: RequiredValidator, decorators: [{\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]': '_enabled ? \"\" : null' },\n                    standalone: false,\n                }]\n        }], propDecorators: { required: [{\n                type: Input\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/forms/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 * ```html\n * <input type=\"checkbox\" name=\"active\" ngModel required>\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\nclass CheckboxRequiredValidator extends RequiredValidator {\n    /** @internal */\n    createValidator = (input) => requiredTrueValidator;\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: CheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: CheckboxRequiredValidator, isStandalone: false, selector: \"input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]\", host: { properties: { \"attr.required\": \"_enabled ? \\\"\\\" : null\" } }, providers: [CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: CheckboxRequiredValidator, decorators: [{\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]': '_enabled ? \"\" : null' },\n                    standalone: false,\n                }]\n        }] });\n/**\n * @description\n * Provider which adds `EmailValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst EMAIL_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => 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 * The email validation is based on the WHATWG HTML specification with some enhancements to\n * incorporate more RFC rules. More information can be found on the [Validators.email\n * page](api/forms/Validators#email).\n *\n * @see [Form Validation](guide/forms/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 * ```html\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 */\nclass EmailValidator extends AbstractValidatorDirective {\n    /**\n     * @description\n     * Tracks changes to the email attribute bound to this directive.\n     */\n    email;\n    /** @internal */\n    inputName = 'email';\n    /** @internal */\n    normalizeInput = booleanAttribute;\n    /** @internal */\n    createValidator = (input) => emailValidator;\n    /** @nodoc */\n    enabled(input) {\n        return input;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: EmailValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: EmailValidator, isStandalone: false, selector: \"[email][formControlName],[email][formControl],[email][ngModel]\", inputs: { email: \"email\" }, providers: [EMAIL_VALIDATOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: EmailValidator, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n                    providers: [EMAIL_VALIDATOR],\n                    standalone: false,\n                }]\n        }], propDecorators: { email: [{\n                type: Input\n            }] } });\n/**\n * @description\n * Provider which adds `MinLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MIN_LENGTH_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => 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/forms/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 */\nclass MinLengthValidator extends AbstractValidatorDirective {\n    /**\n     * @description\n     * Tracks changes to the minimum length bound to this directive.\n     */\n    minlength;\n    /** @internal */\n    inputName = 'minlength';\n    /** @internal */\n    normalizeInput = (input) => toInteger(input);\n    /** @internal */\n    createValidator = (minlength) => minLengthValidator(minlength);\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: MinLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: MinLengthValidator, isStandalone: false, selector: \"[minlength][formControlName],[minlength][formControl],[minlength][ngModel]\", inputs: { minlength: \"minlength\" }, host: { properties: { \"attr.minlength\": \"_enabled ? minlength : null\" } }, providers: [MIN_LENGTH_VALIDATOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: MinLengthValidator, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',\n                    providers: [MIN_LENGTH_VALIDATOR],\n                    host: { '[attr.minlength]': '_enabled ? minlength : null' },\n                    standalone: false,\n                }]\n        }], propDecorators: { minlength: [{\n                type: Input\n            }] } });\n/**\n * @description\n * Provider which adds `MaxLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst MAX_LENGTH_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => MaxLengthValidator),\n    multi: true,\n};\n/**\n * A directive that adds maximum 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/forms/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 */\nclass MaxLengthValidator extends AbstractValidatorDirective {\n    /**\n     * @description\n     * Tracks changes to the maximum length bound to this directive.\n     */\n    maxlength;\n    /** @internal */\n    inputName = 'maxlength';\n    /** @internal */\n    normalizeInput = (input) => toInteger(input);\n    /** @internal */\n    createValidator = (maxlength) => maxLengthValidator(maxlength);\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: MaxLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: MaxLengthValidator, isStandalone: false, selector: \"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]\", inputs: { maxlength: \"maxlength\" }, host: { properties: { \"attr.maxlength\": \"_enabled ? maxlength : null\" } }, providers: [MAX_LENGTH_VALIDATOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: MaxLengthValidator, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',\n                    providers: [MAX_LENGTH_VALIDATOR],\n                    host: { '[attr.maxlength]': '_enabled ? maxlength : null' },\n                    standalone: false,\n                }]\n        }], propDecorators: { maxlength: [{\n                type: Input\n            }] } });\n/**\n * @description\n * Provider which adds `PatternValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nconst PATTERN_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => 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/forms/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 */\nclass PatternValidator extends AbstractValidatorDirective {\n    /**\n     * @description\n     * Tracks changes to the pattern bound to this directive.\n     */\n    pattern; // This input is always defined, since the name matches selector.\n    /** @internal */\n    inputName = 'pattern';\n    /** @internal */\n    normalizeInput = (input) => input;\n    /** @internal */\n    createValidator = (input) => patternValidator(input);\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PatternValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.5\", type: PatternValidator, isStandalone: false, selector: \"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]\", inputs: { pattern: \"pattern\" }, host: { properties: { \"attr.pattern\": \"_enabled ? pattern : null\" } }, providers: [PATTERN_VALIDATOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: PatternValidator, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n                    providers: [PATTERN_VALIDATOR],\n                    host: { '[attr.pattern]': '_enabled ? pattern : null' },\n                    standalone: false,\n                }]\n        }], propDecorators: { pattern: [{\n                type: Input\n            }] } });\n\nconst 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    MinValidator,\n    MaxValidator,\n];\nconst TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm];\nconst REACTIVE_DRIVEN_DIRECTIVES = [\n    FormControlDirective,\n    FormGroupDirective,\n    FormControlName,\n    FormGroupName,\n    FormArrayName,\n];\n/**\n * Internal module used for sharing directives between FormsModule and ReactiveFormsModule\n */\nclass ɵInternalFormsSharedModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ɵInternalFormsSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: ɵ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,\n            MinValidator,\n            MaxValidator], 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            MinValidator,\n            MaxValidator] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ɵInternalFormsSharedModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ɵInternalFormsSharedModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    declarations: SHARED_FORM_DIRECTIVES,\n                    exports: SHARED_FORM_DIRECTIVES,\n                }]\n        }] });\n\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` accepts one generic argument, which is the type of the controls inside.\n * If you need a heterogenous array, use {@link UntypedFormArray}.\n *\n * `FormArray` is one of the four fundamental building blocks used to define forms in Angular,\n * along with `FormControl`, `FormGroup`, and `FormRecord`.\n *\n * @usageNotes\n *\n * ### Create an array of form controls\n *\n * ```ts\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 * ```ts\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 */\nclass FormArray extends AbstractControl {\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    constructor(controls, validatorOrOpts, asyncValidator) {\n        super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n        this.controls = controls;\n        this._initObservables();\n        this._setUpdateStrategy(validatorOrOpts);\n        this._setUpControls();\n        this.updateValueAndValidity({\n            onlySelf: true,\n            // If `asyncValidator` is present, it will trigger control status change from `PENDING` to\n            // `VALID` or `INVALID`.\n            // The status should be broadcasted via the `statusChanges` observable, so we set `emitEvent`\n            // to `true` to allow that during the control creation process.\n            emitEvent: !!this.asyncValidator,\n        });\n    }\n    controls;\n    /**\n     * Get the `AbstractControl` at the given `index` in the array.\n     *\n     * @param index Index in the array to retrieve the control. If `index` is negative, it will wrap\n     *     around from the back, and if index is greatly negative (less than `-length`), the result is\n     * undefined. This behavior is the same as `Array.at(index)`.\n     */\n    at(index) {\n        return this.controls[this._adjustIndex(index)];\n    }\n    /**\n     * Insert a new `AbstractControl` at the end of the array.\n     *\n     * @param control Form control to be inserted\n     * @param options Specifies whether this FormArray instance should emit events after a new\n     *     control is added.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * inserted. When false, no events are emitted.\n     */\n    push(control, options = {}) {\n        this.controls.push(control);\n        this._registerControl(control);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\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. If `index` is negative, wraps around\n     *     from the back. If `index` is greatly negative (less than `-length`), prepends to the array.\n     * This behavior is the same as `Array.splice(index, 0, control)`.\n     * @param control Form control to be inserted\n     * @param options Specifies whether this FormArray instance should emit events after a new\n     *     control is inserted.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * inserted. When false, no events are emitted.\n     */\n    insert(index, control, options = {}) {\n        this.controls.splice(index, 0, control);\n        this._registerControl(control);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\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.  If `index` is negative, wraps around\n     *     from the back. If `index` is greatly negative (less than `-length`), removes the first\n     *     element. This behavior is the same as `Array.splice(index, 1)`.\n     * @param options Specifies whether this FormArray instance should emit events after a\n     *     control is removed.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * removed. When false, no events are emitted.\n     */\n    removeAt(index, options = {}) {\n        // Adjust the index, then clamp it at no less than 0 to prevent undesired underflows.\n        let adjustedIndex = this._adjustIndex(index);\n        if (adjustedIndex < 0)\n            adjustedIndex = 0;\n        if (this.controls[adjustedIndex])\n            this.controls[adjustedIndex]._registerOnCollectionChange(() => { });\n        this.controls.splice(adjustedIndex, 1);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n    }\n    /**\n     * Replace an existing control.\n     *\n     * @param index Index in the array to replace the control. If `index` is negative, wraps around\n     *     from the back. If `index` is greatly negative (less than `-length`), replaces the first\n     *     element. This behavior is the same as `Array.splice(index, 1, control)`.\n     * @param control The `AbstractControl` control to replace the existing control\n     * @param options Specifies whether this FormArray instance should emit events after an\n     *     existing control is replaced with a new one.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when the control is\n     * replaced with a new one. When false, no events are emitted.\n     */\n    setControl(index, control, options = {}) {\n        // Adjust the index, then clamp it at no less than 0 to prevent undesired underflows.\n        let adjustedIndex = this._adjustIndex(index);\n        if (adjustedIndex < 0)\n            adjustedIndex = 0;\n        if (this.controls[adjustedIndex])\n            this.controls[adjustedIndex]._registerOnCollectionChange(() => { });\n        this.controls.splice(adjustedIndex, 1);\n        if (control) {\n            this.controls.splice(adjustedIndex, 0, control);\n            this._registerControl(control);\n        }\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n        this._onCollectionChange();\n    }\n    /**\n     * Length of the control array.\n     */\n    get length() {\n        return this.controls.length;\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    setValue(value, options = {}) {\n        assertAllValuesPresent(this, false, value);\n        value.forEach((newValue, index) => {\n            assertControlPresent(this, false, 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` observables emit events with the latest status and value when the control\n     * value is updated. When false, no events are emitted. The configuration options are passed to\n     * the {@link AbstractControl#updateValueAndValidity updateValueAndValidity} method.\n     */\n    patchValue(value, options = {}) {\n        // Even though the `value` argument type doesn't allow `null` and `undefined` values, the\n        // `patchValue` can be called recursively and inner data structures might have these values,\n        // so we just ignore such cases when a field containing FormArray instance receives `null` or\n        // `undefined` as a value.\n        if (value == null /* both `null` and `undefined` */)\n            return;\n        value.forEach((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(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     * arr.reset([\n     *   {value: 'name', disabled: true},\n     *   'last'\n     * ]);\n     *\n     * console.log(arr.value);  // ['last']\n     * console.log(arr.at(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    reset(value = [], options = {}) {\n        this._forEachChild((control, index) => {\n            control.reset(value[index], { onlySelf: true, emitEvent: options.emitEvent });\n        });\n        this._updatePristine(options, this);\n        this._updateTouched(options, this);\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     */\n    getRawValue() {\n        return this.controls.map((control) => control.getRawValue());\n    }\n    /**\n     * Remove all controls in the `FormArray`.\n     *\n     * @param options Specifies whether this FormArray instance should emit events after all\n     *     controls are removed.\n     * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n     * `valueChanges` observables emit events with the latest status and value when all controls\n     * in this FormArray instance are removed. When false, no events are emitted.\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    clear(options = {}) {\n        if (this.controls.length < 1)\n            return;\n        this._forEachChild((control) => control._registerOnCollectionChange(() => { }));\n        this.controls.splice(0);\n        this.updateValueAndValidity({ emitEvent: options.emitEvent });\n    }\n    /**\n     * Adjusts a negative index by summing it with the length of the array. For very negative\n     * indices, the result may remain negative.\n     * @internal\n     */\n    _adjustIndex(index) {\n        return index < 0 ? index + this.length : index;\n    }\n    /** @internal */\n    _syncPendingControls() {\n        let subtreeUpdated = this.controls.reduce((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    _forEachChild(cb) {\n        this.controls.forEach((control, index) => {\n            cb(control, index);\n        });\n    }\n    /** @internal */\n    _updateValue() {\n        this.value = this.controls\n            .filter((control) => control.enabled || this.disabled)\n            .map((control) => control.value);\n    }\n    /** @internal */\n    _anyControls(condition) {\n        return this.controls.some((control) => control.enabled && condition(control));\n    }\n    /** @internal */\n    _setUpControls() {\n        this._forEachChild((control) => this._registerControl(control));\n    }\n    /** @internal */\n    _allControlsDisabled() {\n        for (const control of this.controls) {\n            if (control.enabled)\n                return false;\n        }\n        return this.controls.length > 0 || this.disabled;\n    }\n    _registerControl(control) {\n        control.setParent(this);\n        control._registerOnCollectionChange(this._onCollectionChange);\n    }\n    /** @internal */\n    _find(name) {\n        return this.at(name) ?? null;\n    }\n}\nconst UntypedFormArray = FormArray;\n/**\n * @description\n * Asserts that the given control is an instance of `FormArray`\n *\n * @publicApi\n */\nconst isFormArray = (control) => control instanceof FormArray;\n\nfunction isAbstractControlOptions(options) {\n    return (!!options &&\n        (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\n * `FormControl`, `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to\n * build complex forms.\n *\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n *\n * @publicApi\n */\nclass FormBuilder {\n    useNonNullable = false;\n    /**\n     * @description\n     * Returns a FormBuilder in which automatically constructed `FormControl` elements\n     * have `{nonNullable: true}` and are non-nullable.\n     *\n     * **Constructing non-nullable controls**\n     *\n     * When constructing a control, it will be non-nullable, and will reset to its initial value.\n     *\n     * ```ts\n     * let nnfb = new FormBuilder().nonNullable;\n     * let name = nnfb.control('Alex'); // FormControl<string>\n     * name.reset();\n     * console.log(name); // 'Alex'\n     * ```\n     *\n     * **Constructing non-nullable groups or arrays**\n     *\n     * When constructing a group or array, all automatically created inner controls will be\n     * non-nullable, and will reset to their initial values.\n     *\n     * ```ts\n     * let nnfb = new FormBuilder().nonNullable;\n     * let name = nnfb.group({who: 'Alex'}); // FormGroup<{who: FormControl<string>}>\n     * name.reset();\n     * console.log(name); // {who: 'Alex'}\n     * ```\n     * **Constructing *nullable* fields on groups or arrays**\n     *\n     * It is still possible to have a nullable field. In particular, any `FormControl` which is\n     * *already* constructed will not be altered. For example:\n     *\n     * ```ts\n     * let nnfb = new FormBuilder().nonNullable;\n     * // FormGroup<{who: FormControl<string|null>}>\n     * let name = nnfb.group({who: new FormControl('Alex')});\n     * name.reset(); console.log(name); // {who: null}\n     * ```\n     *\n     * Because the inner control is constructed explicitly by the caller, the builder has\n     * no control over how it is created, and cannot exclude the `null`.\n     */\n    get nonNullable() {\n        const nnfb = new FormBuilder();\n        nnfb.useNonNullable = true;\n        return nnfb;\n    }\n    group(controls, options = null) {\n        const reducedControls = this._reduceControls(controls);\n        let newOptions = {};\n        if (isAbstractControlOptions(options)) {\n            // `options` are `AbstractControlOptions`\n            newOptions = options;\n        }\n        else if (options !== null) {\n            // `options` are legacy form group options\n            newOptions.validators = options.validator;\n            newOptions.asyncValidators = options.asyncValidator;\n        }\n        return new FormGroup(reducedControls, newOptions);\n    }\n    /**\n     * @description\n     * Constructs a new `FormRecord` instance. Accepts a single generic argument, which is an object\n     * containing all the keys and corresponding inner control types.\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 options Configuration options object for the `FormRecord`. The object should have the\n     * `AbstractControlOptions` type and might contain the following fields:\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    record(controls, options = null) {\n        const reducedControls = this._reduceControls(controls);\n        // Cast to `any` because the inferred types are not as specific as Element.\n        return new FormRecord(reducedControls, options);\n    }\n    /**\n     * @description\n     * Constructs a new `FormControl` with the given state, validators and options. Sets\n     * `{nonNullable: true}` in the options to get a non-nullable control. Otherwise, the\n     * control will be nullable. Accepts a single generic argument, which is the type  of the\n     * control's value.\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 a `FormControlOptions` 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     * {@example forms/ts/formBuilder/form_builder_example.ts region='disabled-control'}\n     */\n    control(formState, validatorOrOpts, asyncValidator) {\n        let newOptions = {};\n        if (!this.useNonNullable) {\n            return new FormControl(formState, validatorOrOpts, asyncValidator);\n        }\n        if (isAbstractControlOptions(validatorOrOpts)) {\n            // If the second argument is options, then they are copied.\n            newOptions = validatorOrOpts;\n        }\n        else {\n            // If the other arguments are validators, they are copied into an options object.\n            newOptions.validators = validatorOrOpts;\n            newOptions.asyncValidators = asyncValidator;\n        }\n        return new FormControl(formState, { ...newOptions, nonNullable: true });\n    }\n    /**\n     * Constructs a new `FormArray` from the given array of configurations,\n     * validators and options. Accepts a single generic argument, which is the type of each control\n     * inside the array.\n     *\n     * @param controls An array of child controls or control configs. Each child control is given an\n     *     index when it is registered.\n     *\n     * @param validatorOrOpts A synchronous validator function, or an array of such functions, or an\n     *     `AbstractControlOptions` object that contains\n     * validation functions and a validation trigger.\n     *\n     * @param asyncValidator A single async validator or array of async validator functions.\n     */\n    array(controls, validatorOrOpts, asyncValidator) {\n        const createdControls = controls.map((c) => this._createControl(c));\n        // Cast to `any` because the inferred types are not as specific as Element.\n        return new FormArray(createdControls, validatorOrOpts, asyncValidator);\n    }\n    /** @internal */\n    _reduceControls(controls) {\n        const createdControls = {};\n        Object.keys(controls).forEach((controlName) => {\n            createdControls[controlName] = this._createControl(controls[controlName]);\n        });\n        return createdControls;\n    }\n    /** @internal */\n    _createControl(controls) {\n        if (controls instanceof FormControl) {\n            return controls;\n        }\n        else if (controls instanceof AbstractControl) {\n            // A control; just return it\n            return controls;\n        }\n        else if (Array.isArray(controls)) {\n            // ControlConfig Tuple\n            const value = controls[0];\n            const validator = controls.length > 1 ? controls[1] : null;\n            const asyncValidator = controls.length > 2 ? controls[2] : null;\n            return this.control(value, validator, asyncValidator);\n        }\n        else {\n            // T or FormControlState<T>\n            return this.control(controls);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormBuilder, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormBuilder, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n/**\n * @description\n * `NonNullableFormBuilder` is similar to {@link FormBuilder}, but automatically constructed\n * {@link FormControl} elements have `{nonNullable: true}` and are non-nullable.\n *\n * @publicApi\n */\nclass NonNullableFormBuilder {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NonNullableFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NonNullableFormBuilder, providedIn: 'root', useFactory: () => inject(FormBuilder).nonNullable });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: NonNullableFormBuilder, decorators: [{\n            type: Injectable,\n            args: [{\n                    providedIn: 'root',\n                    useFactory: () => inject(FormBuilder).nonNullable,\n                }]\n        }] });\n/**\n * UntypedFormBuilder is the same as `FormBuilder`, but it provides untyped controls.\n */\nclass UntypedFormBuilder extends FormBuilder {\n    group(controlsConfig, options = null) {\n        return super.group(controlsConfig, options);\n    }\n    /**\n     * Like `FormBuilder#control`, except the resulting control is untyped.\n     */\n    control(formState, validatorOrOpts, asyncValidator) {\n        return super.control(formState, validatorOrOpts, asyncValidator);\n    }\n    /**\n     * Like `FormBuilder#array`, except the resulting array is untyped.\n     */\n    array(controlsConfig, validatorOrOpts, asyncValidator) {\n        return super.array(controlsConfig, validatorOrOpts, asyncValidator);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: UntypedFormBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: UntypedFormBuilder, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: UntypedFormBuilder, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the forms package.\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('19.0.5');\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)\n * @see [Template-driven Forms Guide](guide/forms)\n *\n * @publicApi\n */\nclass FormsModule {\n    /**\n     * @description\n     * Provides options for configuring the forms module.\n     *\n     * @param opts An object of configuration options\n     * * `callSetDisabledState` Configures whether to `always` call `setDisabledState`, which is more\n     * correct, or to only call it `whenDisabled`, which is the legacy behavior.\n     */\n    static withConfig(opts) {\n        return {\n            ngModule: FormsModule,\n            providers: [\n                {\n                    provide: CALL_SET_DISABLED_STATE,\n                    useValue: opts.callSetDisabledState ?? setDisabledStateDefault,\n                },\n            ],\n        };\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: FormsModule, declarations: [NgModel, NgModelGroup, NgForm], exports: [ɵInternalFormsSharedModule, NgModel, NgModelGroup, NgForm] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormsModule, imports: [ɵInternalFormsSharedModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: FormsModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n                    exports: [ɵInternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES],\n                }]\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)\n * @see [Reactive Forms Guide](guide/forms/reactive-forms)\n *\n * @publicApi\n */\nclass 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     * * `callSetDisabledState` Configures whether to `always` call `setDisabledState`, which is more\n     * correct, or to only call it `whenDisabled`, which is the legacy behavior.\n     */\n    static withConfig(opts) {\n        return {\n            ngModule: ReactiveFormsModule,\n            providers: [\n                {\n                    provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,\n                    useValue: opts.warnOnNgModelWithFormControl ?? 'always',\n                },\n                {\n                    provide: CALL_SET_DISABLED_STATE,\n                    useValue: opts.callSetDisabledState ?? setDisabledStateDefault,\n                },\n            ],\n        };\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ReactiveFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.5\", ngImport: i0, type: ReactiveFormsModule, declarations: [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName], exports: [ɵInternalFormsSharedModule, FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ReactiveFormsModule, imports: [ɵInternalFormsSharedModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: ReactiveFormsModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n                    exports: [ɵInternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES],\n                }]\n        }] });\n\n/**\n * @module\n * @description\n * This module is used for handling user input, by defining and building a `FormGroup` that\n * consists of `FormControl` objects, and mapping them onto the DOM. `FormControl`\n * objects can then be used to read information from the form DOM elements.\n *\n * Forms providers are not included in default providers; you must import these providers\n * explicitly.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractControl, AbstractControlDirective, AbstractFormGroupDirective, COMPOSITION_BUFFER_MODE, CheckboxControlValueAccessor, CheckboxRequiredValidator, ControlContainer, ControlEvent, DefaultValueAccessor, EmailValidator, FormArray, FormArrayName, FormBuilder, FormControl, FormControlDirective, FormControlName, FormGroup, FormGroupDirective, FormGroupName, FormRecord, FormResetEvent, FormSubmittedEvent, FormsModule, MaxLengthValidator, MaxValidator, MinLengthValidator, MinValidator, NG_ASYNC_VALIDATORS, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, NgSelectOption, NonNullableFormBuilder, NumberValueAccessor, PatternValidator, PristineChangeEvent, RadioControlValueAccessor, RangeValueAccessor, ReactiveFormsModule, RequiredValidator, SelectControlValueAccessor, SelectMultipleControlValueAccessor, StatusChangeEvent, TouchedChangeEvent, UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, VERSION, Validators, ValueChangeEvent, isFormArray, isFormControl, isFormGroup, isFormRecord, ɵInternalFormsSharedModule, ɵNgNoValidate, ɵNgSelectMultipleOption };\n","import { _IdGenerator } from '@angular/cdk/a11y';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, inject, ElementRef, ChangeDetectorRef, NgZone, ANIMATION_MODULE_TYPE, EventEmitter, HostAttributeToken, booleanAttribute, numberAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, ViewChild, Directive, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator } from '@angular/forms';\nimport { _StructuralStylesLoader, MatRipple, _MatInternalFormField, MatCommonModule } from '@angular/material/core';\nimport { _CdkPrivateStyleLoader } from '@angular/cdk/private';\n\n/** Injection token to be used to override the default options for `mat-checkbox`. */\nconst MAT_CHECKBOX_DEFAULT_OPTIONS = new InjectionToken('mat-checkbox-default-options', {\n    providedIn: 'root',\n    factory: MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY() {\n    return {\n        color: 'accent',\n        clickAction: 'check-indeterminate',\n        disabledInteractive: false,\n    };\n}\n\n/**\n * Represents the different states that require custom transitions between them.\n * @docs-private\n */\nvar TransitionCheckState;\n(function (TransitionCheckState) {\n    /** The initial state of the component before any user interaction. */\n    TransitionCheckState[TransitionCheckState[\"Init\"] = 0] = \"Init\";\n    /** The state representing the component when it's becoming checked. */\n    TransitionCheckState[TransitionCheckState[\"Checked\"] = 1] = \"Checked\";\n    /** The state representing the component when it's becoming unchecked. */\n    TransitionCheckState[TransitionCheckState[\"Unchecked\"] = 2] = \"Unchecked\";\n    /** The state representing the component when it's becoming indeterminate. */\n    TransitionCheckState[TransitionCheckState[\"Indeterminate\"] = 3] = \"Indeterminate\";\n})(TransitionCheckState || (TransitionCheckState = {}));\n/**\n * @deprecated Will stop being exported.\n * @breaking-change 19.0.0\n */\nconst MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => MatCheckbox),\n    multi: true,\n};\n/** Change event object emitted by checkbox. */\nclass MatCheckboxChange {\n    /** The source checkbox of the event. */\n    source;\n    /** The new `checked` value of the checkbox. */\n    checked;\n}\n// Default checkbox configuration.\nconst defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY();\nclass MatCheckbox {\n    _elementRef = inject(ElementRef);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _ngZone = inject(NgZone);\n    _animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });\n    _options = inject(MAT_CHECKBOX_DEFAULT_OPTIONS, {\n        optional: true,\n    });\n    /** Focuses the checkbox. */\n    focus() {\n        this._inputElement.nativeElement.focus();\n    }\n    /** Creates the change event that will be emitted by the checkbox. */\n    _createChangeEvent(isChecked) {\n        const event = new MatCheckboxChange();\n        event.source = this;\n        event.checked = isChecked;\n        return event;\n    }\n    /** Gets the element on which to add the animation CSS classes. */\n    _getAnimationTargetElement() {\n        return this._inputElement?.nativeElement;\n    }\n    /** CSS classes to add when transitioning between the different checkbox states. */\n    _animationClasses = {\n        uncheckedToChecked: 'mdc-checkbox--anim-unchecked-checked',\n        uncheckedToIndeterminate: 'mdc-checkbox--anim-unchecked-indeterminate',\n        checkedToUnchecked: 'mdc-checkbox--anim-checked-unchecked',\n        checkedToIndeterminate: 'mdc-checkbox--anim-checked-indeterminate',\n        indeterminateToChecked: 'mdc-checkbox--anim-indeterminate-checked',\n        indeterminateToUnchecked: 'mdc-checkbox--anim-indeterminate-unchecked',\n    };\n    /**\n     * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n     * take precedence so this may be omitted.\n     */\n    ariaLabel = '';\n    /**\n     * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n     */\n    ariaLabelledby = null;\n    /** The 'aria-describedby' attribute is read after the element's label and field type. */\n    ariaDescribedby;\n    /**\n     * Users can specify the `aria-expanded` attribute which will be forwarded to the input element\n     */\n    ariaExpanded;\n    /**\n     * Users can specify the `aria-controls` attribute which will be forwarded to the input element\n     */\n    ariaControls;\n    /** Users can specify the `aria-owns` attribute which will be forwarded to the input element */\n    ariaOwns;\n    _uniqueId;\n    /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n    id;\n    /** Returns the unique id for the visual hidden input. */\n    get inputId() {\n        return `${this.id || this._uniqueId}-input`;\n    }\n    /** Whether the checkbox is required. */\n    required;\n    /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n    labelPosition = 'after';\n    /** Name value will be applied to the input element if present */\n    name = null;\n    /** Event emitted when the checkbox's `checked` value changes. */\n    change = new EventEmitter();\n    /** Event emitted when the checkbox's `indeterminate` value changes. */\n    indeterminateChange = new EventEmitter();\n    /** The value attribute of the native input element */\n    value;\n    /** Whether the checkbox has a ripple. */\n    disableRipple;\n    /** The native `<input type=\"checkbox\">` element */\n    _inputElement;\n    /** The native `<label>` element */\n    _labelElement;\n    /** Tabindex for the checkbox. */\n    tabIndex;\n    // TODO(crisbeto): this should be a ThemePalette, but some internal apps were abusing\n    // the lack of type checking previously and assigning random strings.\n    /**\n     * Theme color of the checkbox. This API is supported in M2 themes only, it\n     * has no effect in M3 themes.\n     *\n     * For information on applying color variants in M3, see\n     * https://material.angular.io/guide/theming#using-component-color-variants.\n     */\n    color;\n    /** Whether the checkbox should remain interactive when it is disabled. */\n    disabledInteractive;\n    /**\n     * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n     * @docs-private\n     */\n    _onTouched = () => { };\n    _currentAnimationClass = '';\n    _currentCheckState = TransitionCheckState.Init;\n    _controlValueAccessorChangeFn = () => { };\n    _validatorChangeFn = () => { };\n    constructor() {\n        inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n        const tabIndex = inject(new HostAttributeToken('tabindex'), { optional: true });\n        this._options = this._options || defaults;\n        this.color = this._options.color || defaults.color;\n        this.tabIndex = tabIndex == null ? 0 : parseInt(tabIndex) || 0;\n        this.id = this._uniqueId = inject(_IdGenerator).getId('mat-mdc-checkbox-');\n        this.disabledInteractive = this._options?.disabledInteractive ?? false;\n    }\n    ngOnChanges(changes) {\n        if (changes['required']) {\n            this._validatorChangeFn();\n        }\n    }\n    ngAfterViewInit() {\n        this._syncIndeterminate(this._indeterminate);\n    }\n    /** Whether the checkbox is checked. */\n    get checked() {\n        return this._checked;\n    }\n    set checked(value) {\n        if (value != this.checked) {\n            this._checked = value;\n            this._changeDetectorRef.markForCheck();\n        }\n    }\n    _checked = false;\n    /** Whether the checkbox is disabled. */\n    get disabled() {\n        return this._disabled;\n    }\n    set disabled(value) {\n        if (value !== this.disabled) {\n            this._disabled = value;\n            this._changeDetectorRef.markForCheck();\n        }\n    }\n    _disabled = false;\n    /**\n     * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n     * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n     * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n     * set to false.\n     */\n    get indeterminate() {\n        return this._indeterminate;\n    }\n    set indeterminate(value) {\n        const changed = value != this._indeterminate;\n        this._indeterminate = value;\n        if (changed) {\n            if (this._indeterminate) {\n                this._transitionCheckState(TransitionCheckState.Indeterminate);\n            }\n            else {\n                this._transitionCheckState(this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n            }\n            this.indeterminateChange.emit(this._indeterminate);\n        }\n        this._syncIndeterminate(this._indeterminate);\n    }\n    _indeterminate = false;\n    _isRippleDisabled() {\n        return this.disableRipple || this.disabled;\n    }\n    /** Method being called whenever the label text changes. */\n    _onLabelTextChange() {\n        // Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox\n        // component will be only marked for check, but no actual change detection runs automatically.\n        // Instead of going back into the zone in order to trigger a change detection which causes\n        // *all* components to be checked (if explicitly marked or not using OnPush), we only trigger\n        // an explicit change detection for the checkbox view and its children.\n        this._changeDetectorRef.detectChanges();\n    }\n    // Implemented as part of ControlValueAccessor.\n    writeValue(value) {\n        this.checked = !!value;\n    }\n    // Implemented as part of ControlValueAccessor.\n    registerOnChange(fn) {\n        this._controlValueAccessorChangeFn = fn;\n    }\n    // Implemented as part of ControlValueAccessor.\n    registerOnTouched(fn) {\n        this._onTouched = fn;\n    }\n    // Implemented as part of ControlValueAccessor.\n    setDisabledState(isDisabled) {\n        this.disabled = isDisabled;\n    }\n    // Implemented as a part of Validator.\n    validate(control) {\n        return this.required && control.value !== true ? { 'required': true } : null;\n    }\n    // Implemented as a part of Validator.\n    registerOnValidatorChange(fn) {\n        this._validatorChangeFn = fn;\n    }\n    _transitionCheckState(newState) {\n        let oldState = this._currentCheckState;\n        let element = this._getAnimationTargetElement();\n        if (oldState === newState || !element) {\n            return;\n        }\n        if (this._currentAnimationClass) {\n            element.classList.remove(this._currentAnimationClass);\n        }\n        this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(oldState, newState);\n        this._currentCheckState = newState;\n        if (this._currentAnimationClass.length > 0) {\n            element.classList.add(this._currentAnimationClass);\n            // Remove the animation class to avoid animation when the checkbox is moved between containers\n            const animationClass = this._currentAnimationClass;\n            this._ngZone.runOutsideAngular(() => {\n                setTimeout(() => {\n                    element.classList.remove(animationClass);\n                }, 1000);\n            });\n        }\n    }\n    _emitChangeEvent() {\n        this._controlValueAccessorChangeFn(this.checked);\n        this.change.emit(this._createChangeEvent(this.checked));\n        // Assigning the value again here is redundant, but we have to do it in case it was\n        // changed inside the `change` listener which will cause the input to be out of sync.\n        if (this._inputElement) {\n            this._inputElement.nativeElement.checked = this.checked;\n        }\n    }\n    /** Toggles the `checked` state of the checkbox. */\n    toggle() {\n        this.checked = !this.checked;\n        this._controlValueAccessorChangeFn(this.checked);\n    }\n    _handleInputClick() {\n        const clickAction = this._options?.clickAction;\n        // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n        if (!this.disabled && clickAction !== 'noop') {\n            // When user manually click on the checkbox, `indeterminate` is set to false.\n            if (this.indeterminate && clickAction !== 'check') {\n                Promise.resolve().then(() => {\n                    this._indeterminate = false;\n                    this.indeterminateChange.emit(this._indeterminate);\n                });\n            }\n            this._checked = !this._checked;\n            this._transitionCheckState(this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n            // Emit our custom change event if the native input emitted one.\n            // It is important to only emit it, if the native input triggered one, because\n            // we don't want to trigger a change event, when the `checked` variable changes for example.\n            this._emitChangeEvent();\n        }\n        else if ((this.disabled && this.disabledInteractive) ||\n            (!this.disabled && clickAction === 'noop')) {\n            // Reset native input when clicked with noop. The native checkbox becomes checked after\n            // click, reset it to be align with `checked` value of `mat-checkbox`.\n            this._inputElement.nativeElement.checked = this.checked;\n            this._inputElement.nativeElement.indeterminate = this.indeterminate;\n        }\n    }\n    _onInteractionEvent(event) {\n        // We always have to stop propagation on the change event.\n        // Otherwise the change event, from the input element, will bubble up and\n        // emit its event object to the `change` output.\n        event.stopPropagation();\n    }\n    _onBlur() {\n        // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n        // Angular does not expect events to be raised during change detection, so any state change\n        // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n        // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n        // telling the form control it has been touched until the next tick.\n        Promise.resolve().then(() => {\n            this._onTouched();\n            this._changeDetectorRef.markForCheck();\n        });\n    }\n    _getAnimationClassForCheckStateTransition(oldState, newState) {\n        // Don't transition if animations are disabled.\n        if (this._animationMode === 'NoopAnimations') {\n            return '';\n        }\n        switch (oldState) {\n            case TransitionCheckState.Init:\n                // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or\n                // [checked] bound to it.\n                if (newState === TransitionCheckState.Checked) {\n                    return this._animationClasses.uncheckedToChecked;\n                }\n                else if (newState == TransitionCheckState.Indeterminate) {\n                    return this._checked\n                        ? this._animationClasses.checkedToIndeterminate\n                        : this._animationClasses.uncheckedToIndeterminate;\n                }\n                break;\n            case TransitionCheckState.Unchecked:\n                return newState === TransitionCheckState.Checked\n                    ? this._animationClasses.uncheckedToChecked\n                    : this._animationClasses.uncheckedToIndeterminate;\n            case TransitionCheckState.Checked:\n                return newState === TransitionCheckState.Unchecked\n                    ? this._animationClasses.checkedToUnchecked\n                    : this._animationClasses.checkedToIndeterminate;\n            case TransitionCheckState.Indeterminate:\n                return newState === TransitionCheckState.Checked\n                    ? this._animationClasses.indeterminateToChecked\n                    : this._animationClasses.indeterminateToUnchecked;\n        }\n        return '';\n    }\n    /**\n     * Syncs the indeterminate value with the checkbox DOM node.\n     *\n     * We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a\n     * property is supported on an element boils down to `if (propName in element)`. Domino's\n     * HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during\n     * server-side rendering.\n     */\n    _syncIndeterminate(value) {\n        const nativeCheckbox = this._inputElement;\n        if (nativeCheckbox) {\n            nativeCheckbox.nativeElement.indeterminate = value;\n        }\n    }\n    _onInputClick() {\n        this._handleInputClick();\n    }\n    _onTouchTargetClick() {\n        this._handleInputClick();\n        if (!this.disabled) {\n            // Normally the input should be focused already, but if the click\n            // comes from the touch target, then we might have to focus it ourselves.\n            this._inputElement.nativeElement.focus();\n        }\n    }\n    /**\n     *  Prevent click events that come from the `<label/>` element from bubbling. This prevents the\n     *  click handler on the host from triggering twice when clicking on the `<label/>` element. After\n     *  the click event on the `<label/>` propagates, the browsers dispatches click on the associated\n     *  `<input/>`. By preventing clicks on the label by bubbling, we ensure only one click event\n     *  bubbles when the label is clicked.\n     */\n    _preventBubblingFromLabel(event) {\n        if (!!event.target && this._labelElement.nativeElement.contains(event.target)) {\n            event.stopPropagation();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatCheckbox, isStandalone: true, selector: \"mat-checkbox\", inputs: { ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], ariaDescribedby: [\"aria-describedby\", \"ariaDescribedby\"], ariaExpanded: [\"aria-expanded\", \"ariaExpanded\", booleanAttribute], ariaControls: [\"aria-controls\", \"ariaControls\"], ariaOwns: [\"aria-owns\", \"ariaOwns\"], id: \"id\", required: [\"required\", \"required\", booleanAttribute], labelPosition: \"labelPosition\", name: \"name\", value: \"value\", disableRipple: [\"disableRipple\", \"disableRipple\", booleanAttribute], tabIndex: [\"tabIndex\", \"tabIndex\", (value) => (value == null ? undefined : numberAttribute(value))], color: \"color\", disabledInteractive: [\"disabledInteractive\", \"disabledInteractive\", booleanAttribute], checked: [\"checked\", \"checked\", booleanAttribute], disabled: [\"disabled\", \"disabled\", booleanAttribute], indeterminate: [\"indeterminate\", \"indeterminate\", booleanAttribute] }, outputs: { change: \"change\", indeterminateChange: \"indeterminateChange\" }, host: { properties: { \"attr.tabindex\": \"null\", \"attr.aria-label\": \"null\", \"attr.aria-labelledby\": \"null\", \"class._mat-animation-noopable\": \"_animationMode === 'NoopAnimations'\", \"class.mdc-checkbox--disabled\": \"disabled\", \"id\": \"id\", \"class.mat-mdc-checkbox-disabled\": \"disabled\", \"class.mat-mdc-checkbox-checked\": \"checked\", \"class.mat-mdc-checkbox-disabled-interactive\": \"disabledInteractive\", \"class\": \"color ? \\\"mat-\\\" + color : \\\"mat-accent\\\"\" }, classAttribute: \"mat-mdc-checkbox\" }, providers: [\n            MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR,\n            {\n                provide: NG_VALIDATORS,\n                useExisting: MatCheckbox,\n                multi: true,\n            },\n        ], viewQueries: [{ propertyName: \"_inputElement\", first: true, predicate: [\"input\"], descendants: true }, { propertyName: \"_labelElement\", first: true, predicate: [\"label\"], descendants: true }], exportAs: [\"matCheckbox\"], usesOnChanges: true, ngImport: i0, template: \"<div mat-internal-form-field [labelPosition]=\\\"labelPosition\\\" (click)=\\\"_preventBubblingFromLabel($event)\\\">\\n  <div #checkbox class=\\\"mdc-checkbox\\\">\\n    <!-- Render this element first so the input is on top. -->\\n    <div class=\\\"mat-mdc-checkbox-touch-target\\\" (click)=\\\"_onTouchTargetClick()\\\"></div>\\n    <input #input\\n           type=\\\"checkbox\\\"\\n           class=\\\"mdc-checkbox__native-control\\\"\\n           [class.mdc-checkbox--selected]=\\\"checked\\\"\\n           [attr.aria-label]=\\\"ariaLabel || null\\\"\\n           [attr.aria-labelledby]=\\\"ariaLabelledby\\\"\\n           [attr.aria-describedby]=\\\"ariaDescribedby\\\"\\n           [attr.aria-checked]=\\\"indeterminate ? 'mixed' : null\\\"\\n           [attr.aria-controls]=\\\"ariaControls\\\"\\n           [attr.aria-disabled]=\\\"disabled && disabledInteractive ? true : null\\\"\\n           [attr.aria-expanded]=\\\"ariaExpanded\\\"\\n           [attr.aria-owns]=\\\"ariaOwns\\\"\\n           [attr.name]=\\\"name\\\"\\n           [attr.value]=\\\"value\\\"\\n           [checked]=\\\"checked\\\"\\n           [indeterminate]=\\\"indeterminate\\\"\\n           [disabled]=\\\"disabled && !disabledInteractive\\\"\\n           [id]=\\\"inputId\\\"\\n           [required]=\\\"required\\\"\\n           [tabIndex]=\\\"disabled && !disabledInteractive ? -1 : tabIndex\\\"\\n           (blur)=\\\"_onBlur()\\\"\\n           (click)=\\\"_onInputClick()\\\"\\n           (change)=\\\"_onInteractionEvent($event)\\\"/>\\n    <div class=\\\"mdc-checkbox__ripple\\\"></div>\\n    <div class=\\\"mdc-checkbox__background\\\">\\n      <svg class=\\\"mdc-checkbox__checkmark\\\"\\n           focusable=\\\"false\\\"\\n           viewBox=\\\"0 0 24 24\\\"\\n           aria-hidden=\\\"true\\\">\\n        <path class=\\\"mdc-checkbox__checkmark-path\\\"\\n              fill=\\\"none\\\"\\n              d=\\\"M1.73,12.91 8.1,19.28 22.79,4.59\\\"/>\\n      </svg>\\n      <div class=\\\"mdc-checkbox__mixedmark\\\"></div>\\n    </div>\\n    <div class=\\\"mat-mdc-checkbox-ripple mat-focus-indicator\\\" mat-ripple\\n      [matRippleTrigger]=\\\"checkbox\\\"\\n      [matRippleDisabled]=\\\"disableRipple || disabled\\\"\\n      [matRippleCentered]=\\\"true\\\"></div>\\n  </div>\\n  <!--\\n    Avoid putting a click handler on the <label/> to fix duplicate navigation stop on Talk Back\\n    (#14385). Putting a click handler on the <label/> caused this bug because the browser produced\\n    an unnecessary accessibility tree node.\\n  -->\\n  <label class=\\\"mdc-label\\\" #label [for]=\\\"inputId\\\">\\n    <ng-content></ng-content>\\n  </label>\\n</div>\\n\", styles: [\".mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mdc-checkbox__ripple{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}@media(forced-colors: active){.mdc-checkbox--disabled{opacity:.5}}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);-webkit-print-color-adjust:exact;color-adjust:exact;border-color:var(--mdc-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mat-sys-primary));background-color:var(--mdc-checkbox-selected-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mat-sys-on-surface));background-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-sys-primary));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-sys-primary))}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-sys-primary));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover .mdc-checkbox__native-control~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *,.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-checkbox-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-checkbox-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-checkbox-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-checkbox-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-checkbox-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive{pointer-events:auto}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive input{cursor:default}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox .mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox .mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display, block)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-focus-indicator::before{content:\\\"\\\"}\"], dependencies: [{ kind: \"directive\", type: MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }, { kind: \"component\", type: _MatInternalFormField, selector: \"div[mat-internal-form-field]\", inputs: [\"labelPosition\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCheckbox, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-checkbox', host: {\n                        'class': 'mat-mdc-checkbox',\n                        '[attr.tabindex]': 'null',\n                        '[attr.aria-label]': 'null',\n                        '[attr.aria-labelledby]': 'null',\n                        '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n                        '[class.mdc-checkbox--disabled]': 'disabled',\n                        '[id]': 'id',\n                        // Add classes that users can use to more easily target disabled or checked checkboxes.\n                        '[class.mat-mdc-checkbox-disabled]': 'disabled',\n                        '[class.mat-mdc-checkbox-checked]': 'checked',\n                        '[class.mat-mdc-checkbox-disabled-interactive]': 'disabledInteractive',\n                        '[class]': 'color ? \"mat-\" + color : \"mat-accent\"',\n                    }, providers: [\n                        MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR,\n                        {\n                            provide: NG_VALIDATORS,\n                            useExisting: MatCheckbox,\n                            multi: true,\n                        },\n                    ], exportAs: 'matCheckbox', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatRipple, _MatInternalFormField], template: \"<div mat-internal-form-field [labelPosition]=\\\"labelPosition\\\" (click)=\\\"_preventBubblingFromLabel($event)\\\">\\n  <div #checkbox class=\\\"mdc-checkbox\\\">\\n    <!-- Render this element first so the input is on top. -->\\n    <div class=\\\"mat-mdc-checkbox-touch-target\\\" (click)=\\\"_onTouchTargetClick()\\\"></div>\\n    <input #input\\n           type=\\\"checkbox\\\"\\n           class=\\\"mdc-checkbox__native-control\\\"\\n           [class.mdc-checkbox--selected]=\\\"checked\\\"\\n           [attr.aria-label]=\\\"ariaLabel || null\\\"\\n           [attr.aria-labelledby]=\\\"ariaLabelledby\\\"\\n           [attr.aria-describedby]=\\\"ariaDescribedby\\\"\\n           [attr.aria-checked]=\\\"indeterminate ? 'mixed' : null\\\"\\n           [attr.aria-controls]=\\\"ariaControls\\\"\\n           [attr.aria-disabled]=\\\"disabled && disabledInteractive ? true : null\\\"\\n           [attr.aria-expanded]=\\\"ariaExpanded\\\"\\n           [attr.aria-owns]=\\\"ariaOwns\\\"\\n           [attr.name]=\\\"name\\\"\\n           [attr.value]=\\\"value\\\"\\n           [checked]=\\\"checked\\\"\\n           [indeterminate]=\\\"indeterminate\\\"\\n           [disabled]=\\\"disabled && !disabledInteractive\\\"\\n           [id]=\\\"inputId\\\"\\n           [required]=\\\"required\\\"\\n           [tabIndex]=\\\"disabled && !disabledInteractive ? -1 : tabIndex\\\"\\n           (blur)=\\\"_onBlur()\\\"\\n           (click)=\\\"_onInputClick()\\\"\\n           (change)=\\\"_onInteractionEvent($event)\\\"/>\\n    <div class=\\\"mdc-checkbox__ripple\\\"></div>\\n    <div class=\\\"mdc-checkbox__background\\\">\\n      <svg class=\\\"mdc-checkbox__checkmark\\\"\\n           focusable=\\\"false\\\"\\n           viewBox=\\\"0 0 24 24\\\"\\n           aria-hidden=\\\"true\\\">\\n        <path class=\\\"mdc-checkbox__checkmark-path\\\"\\n              fill=\\\"none\\\"\\n              d=\\\"M1.73,12.91 8.1,19.28 22.79,4.59\\\"/>\\n      </svg>\\n      <div class=\\\"mdc-checkbox__mixedmark\\\"></div>\\n    </div>\\n    <div class=\\\"mat-mdc-checkbox-ripple mat-focus-indicator\\\" mat-ripple\\n      [matRippleTrigger]=\\\"checkbox\\\"\\n      [matRippleDisabled]=\\\"disableRipple || disabled\\\"\\n      [matRippleCentered]=\\\"true\\\"></div>\\n  </div>\\n  <!--\\n    Avoid putting a click handler on the <label/> to fix duplicate navigation stop on Talk Back\\n    (#14385). Putting a click handler on the <label/> caused this bug because the browser produced\\n    an unnecessary accessibility tree node.\\n  -->\\n  <label class=\\\"mdc-label\\\" #label [for]=\\\"inputId\\\">\\n    <ng-content></ng-content>\\n  </label>\\n</div>\\n\", styles: [\".mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mdc-checkbox__ripple{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}@media(forced-colors: active){.mdc-checkbox--disabled{opacity:.5}}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);-webkit-print-color-adjust:exact;color-adjust:exact;border-color:var(--mdc-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mat-sys-primary));background-color:var(--mdc-checkbox-selected-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mat-sys-on-surface));background-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-sys-primary));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-sys-primary))}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-sys-primary));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover .mdc-checkbox__native-control~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *,.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-checkbox-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-checkbox-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-checkbox-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-checkbox-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-checkbox-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive{pointer-events:auto}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive input{cursor:default}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox .mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox .mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display, block)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-focus-indicator::before{content:\\\"\\\"}\"] }]\n        }], ctorParameters: () => [], propDecorators: { ariaLabel: [{\n                type: Input,\n                args: ['aria-label']\n            }], ariaLabelledby: [{\n                type: Input,\n                args: ['aria-labelledby']\n            }], ariaDescribedby: [{\n                type: Input,\n                args: ['aria-describedby']\n            }], ariaExpanded: [{\n                type: Input,\n                args: [{ alias: 'aria-expanded', transform: booleanAttribute }]\n            }], ariaControls: [{\n                type: Input,\n                args: ['aria-controls']\n            }], ariaOwns: [{\n                type: Input,\n                args: ['aria-owns']\n            }], id: [{\n                type: Input\n            }], required: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], labelPosition: [{\n                type: Input\n            }], name: [{\n                type: Input\n            }], change: [{\n                type: Output\n            }], indeterminateChange: [{\n                type: Output\n            }], value: [{\n                type: Input\n            }], disableRipple: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], _inputElement: [{\n                type: ViewChild,\n                args: ['input']\n            }], _labelElement: [{\n                type: ViewChild,\n                args: ['label']\n            }], tabIndex: [{\n                type: Input,\n                args: [{ transform: (value) => (value == null ? undefined : numberAttribute(value)) }]\n            }], color: [{\n                type: Input\n            }], disabledInteractive: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], checked: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], disabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], indeterminate: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }] } });\n\n/**\n * @deprecated No longer used, `MatCheckbox` implements required validation directly.\n * @breaking-change 19.0.0\n */\nconst MAT_CHECKBOX_REQUIRED_VALIDATOR = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => MatCheckboxRequiredValidator),\n    multi: true,\n};\n/**\n * Validator for Material checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `mat-checkbox`.\n *\n * @deprecated No longer used, `MatCheckbox` implements required validation directly.\n * @breaking-change 19.0.0\n */\nclass MatCheckboxRequiredValidator extends CheckboxRequiredValidator {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatCheckboxRequiredValidator, isStandalone: true, selector: \"mat-checkbox[required][formControlName],\\n             mat-checkbox[required][formControl], mat-checkbox[required][ngModel]\", providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCheckboxRequiredValidator, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: `mat-checkbox[required][formControlName],\n             mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,\n                    providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],\n                }]\n        }] });\n\n/**\n * @deprecated No longer used, `MatCheckbox` implements required validation directly.\n * @breaking-change 19.0.0\n */\nclass _MatCheckboxRequiredValidatorModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _MatCheckboxRequiredValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: _MatCheckboxRequiredValidatorModule, imports: [MatCheckboxRequiredValidator], exports: [MatCheckboxRequiredValidator] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _MatCheckboxRequiredValidatorModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _MatCheckboxRequiredValidatorModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [MatCheckboxRequiredValidator],\n                    exports: [MatCheckboxRequiredValidator],\n                }]\n        }] });\nclass MatCheckboxModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCheckboxModule, imports: [MatCheckbox, MatCommonModule], exports: [MatCheckbox, MatCommonModule] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCheckboxModule, imports: [MatCheckbox, MatCommonModule, MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCheckboxModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [MatCheckbox, MatCommonModule],\n                    exports: [MatCheckbox, MatCommonModule],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR, MAT_CHECKBOX_DEFAULT_OPTIONS, MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY, MAT_CHECKBOX_REQUIRED_VALIDATOR, MatCheckbox, MatCheckboxChange, MatCheckboxModule, MatCheckboxRequiredValidator, TransitionCheckState, _MatCheckboxRequiredValidatorModule };\n","import { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class ReplaySubject extends Subject {\n    constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) {\n        super();\n        this._bufferSize = _bufferSize;\n        this._windowTime = _windowTime;\n        this._timestampProvider = _timestampProvider;\n        this._buffer = [];\n        this._infiniteTimeWindow = true;\n        this._infiniteTimeWindow = _windowTime === Infinity;\n        this._bufferSize = Math.max(1, _bufferSize);\n        this._windowTime = Math.max(1, _windowTime);\n    }\n    next(value) {\n        const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n        if (!isStopped) {\n            _buffer.push(value);\n            !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n        }\n        this._trimBuffer();\n        super.next(value);\n    }\n    _subscribe(subscriber) {\n        this._throwIfClosed();\n        this._trimBuffer();\n        const subscription = this._innerSubscribe(subscriber);\n        const { _infiniteTimeWindow, _buffer } = this;\n        const copy = _buffer.slice();\n        for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n            subscriber.next(copy[i]);\n        }\n        this._checkFinalizedStatuses(subscriber);\n        return subscription;\n    }\n    _trimBuffer() {\n        const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n        const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n        _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n        if (!_infiniteTimeWindow) {\n            const now = _timestampProvider.now();\n            let last = 0;\n            for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n                last = i;\n            }\n            last && _buffer.splice(0, last + 1);\n        }\n    }\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options = {}) {\n    const { connector = () => new Subject(), resetOnError = true, resetOnComplete = true, resetOnRefCountZero = true } = options;\n    return (wrapperSource) => {\n        let connection;\n        let resetConnection;\n        let subject;\n        let refCount = 0;\n        let hasCompleted = false;\n        let hasErrored = false;\n        const cancelReset = () => {\n            resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n            resetConnection = undefined;\n        };\n        const reset = () => {\n            cancelReset();\n            connection = subject = undefined;\n            hasCompleted = hasErrored = false;\n        };\n        const resetAndUnsubscribe = () => {\n            const conn = connection;\n            reset();\n            conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n        };\n        return operate((source, subscriber) => {\n            refCount++;\n            if (!hasErrored && !hasCompleted) {\n                cancelReset();\n            }\n            const dest = (subject = subject !== null && subject !== void 0 ? subject : connector());\n            subscriber.add(() => {\n                refCount--;\n                if (refCount === 0 && !hasErrored && !hasCompleted) {\n                    resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n                }\n            });\n            dest.subscribe(subscriber);\n            if (!connection &&\n                refCount > 0) {\n                connection = new SafeSubscriber({\n                    next: (value) => dest.next(value),\n                    error: (err) => {\n                        hasErrored = true;\n                        cancelReset();\n                        resetConnection = handleReset(reset, resetOnError, err);\n                        dest.error(err);\n                    },\n                    complete: () => {\n                        hasCompleted = true;\n                        cancelReset();\n                        resetConnection = handleReset(reset, resetOnComplete);\n                        dest.complete();\n                    },\n                });\n                innerFrom(source).subscribe(connection);\n            }\n        })(wrapperSource);\n    };\n}\nfunction handleReset(reset, on, ...args) {\n    if (on === true) {\n        reset();\n        return;\n    }\n    if (on === false) {\n        return;\n    }\n    const onSubscriber = new SafeSubscriber({\n        next: () => {\n            onSubscriber.unsubscribe();\n            reset();\n        },\n    });\n    return innerFrom(on(...args)).subscribe(onSubscriber);\n}\n","import * as i0 from '@angular/core';\nimport { inject, NgZone, RendererFactory2, Injectable } from '@angular/core';\nimport { Subject, Observable } from 'rxjs';\nimport { filter, shareReplay, takeUntil } from 'rxjs/operators';\n\n/**\n * Handler that logs \"ResizeObserver loop limit exceeded\" errors.\n * These errors are not shown in the Chrome console, so we log them to ensure developers are aware.\n * @param e The error\n */\nconst loopLimitExceededErrorHandler = (e) => {\n    if (e instanceof ErrorEvent && e.message === 'ResizeObserver loop limit exceeded') {\n        console.error(`${e.message}. This could indicate a performance issue with your app. See https://github.com/WICG/resize-observer/blob/master/explainer.md#error-handling`);\n    }\n};\n/**\n * A shared ResizeObserver to be used for a particular box type (content-box, border-box, or\n * device-pixel-content-box)\n */\nclass SingleBoxSharedResizeObserver {\n    _box;\n    /** Stream that emits when the shared observer is destroyed. */\n    _destroyed = new Subject();\n    /** Stream of all events from the ResizeObserver. */\n    _resizeSubject = new Subject();\n    /** ResizeObserver used to observe element resize events. */\n    _resizeObserver;\n    /** A map of elements to streams of their resize events. */\n    _elementObservables = new Map();\n    constructor(\n    /** The box type to observe for resizes. */\n    _box) {\n        this._box = _box;\n        if (typeof ResizeObserver !== 'undefined') {\n            this._resizeObserver = new ResizeObserver(entries => this._resizeSubject.next(entries));\n        }\n    }\n    /**\n     * Gets a stream of resize events for the given element.\n     * @param target The element to observe.\n     * @return The stream of resize events for the element.\n     */\n    observe(target) {\n        if (!this._elementObservables.has(target)) {\n            this._elementObservables.set(target, new Observable(observer => {\n                const subscription = this._resizeSubject.subscribe(observer);\n                this._resizeObserver?.observe(target, { box: this._box });\n                return () => {\n                    this._resizeObserver?.unobserve(target);\n                    subscription.unsubscribe();\n                    this._elementObservables.delete(target);\n                };\n            }).pipe(filter(entries => entries.some(entry => entry.target === target)), \n            // Share a replay of the last event so that subsequent calls to observe the same element\n            // receive initial sizing info like the first one. Also enable ref counting so the\n            // element will be automatically unobserved when there are no more subscriptions.\n            shareReplay({ bufferSize: 1, refCount: true }), takeUntil(this._destroyed)));\n        }\n        return this._elementObservables.get(target);\n    }\n    /** Destroys this instance. */\n    destroy() {\n        this._destroyed.next();\n        this._destroyed.complete();\n        this._resizeSubject.complete();\n        this._elementObservables.clear();\n    }\n}\n/**\n * Allows observing resize events on multiple elements using a shared set of ResizeObserver.\n * Sharing a ResizeObserver instance is recommended for better performance (see\n * https://github.com/WICG/resize-observer/issues/59).\n *\n * Rather than share a single `ResizeObserver`, this class creates one `ResizeObserver` per type\n * of observed box ('content-box', 'border-box', and 'device-pixel-content-box'). This avoids\n * later calls to `observe` with a different box type from influencing the events dispatched to\n * earlier calls.\n */\nclass SharedResizeObserver {\n    _cleanupErrorListener;\n    /** Map of box type to shared resize observer. */\n    _observers = new Map();\n    /** The Angular zone. */\n    _ngZone = inject(NgZone);\n    constructor() {\n        if (typeof ResizeObserver !== 'undefined' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            this._ngZone.runOutsideAngular(() => {\n                const renderer = inject(RendererFactory2).createRenderer(null, null);\n                this._cleanupErrorListener = renderer.listen('window', 'error', loopLimitExceededErrorHandler);\n            });\n        }\n    }\n    ngOnDestroy() {\n        for (const [, observer] of this._observers) {\n            observer.destroy();\n        }\n        this._observers.clear();\n        this._cleanupErrorListener?.();\n    }\n    /**\n     * Gets a stream of resize events for the given target element and box type.\n     * @param target The element to observe for resizes.\n     * @param options Options to pass to the `ResizeObserver`\n     * @return The stream of resize events for the element.\n     */\n    observe(target, options) {\n        const box = options?.box || 'content-box';\n        if (!this._observers.has(box)) {\n            this._observers.set(box, new SingleBoxSharedResizeObserver(box));\n        }\n        return this._observers.get(box).observe(target);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: SharedResizeObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: SharedResizeObserver, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: SharedResizeObserver, decorators: [{\n            type: Injectable,\n            args: [{\n                    providedIn: 'root',\n                }]\n        }], ctorParameters: () => [] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { SharedResizeObserver };\n","import { ReplaySubject } from '../ReplaySubject';\nimport { share } from './share';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n    let bufferSize;\n    let refCount = false;\n    if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n        ({ bufferSize = Infinity, windowTime = Infinity, refCount = false, scheduler } = configOrBufferSize);\n    }\n    else {\n        bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity);\n    }\n    return share({\n        connector: () => new ReplaySubject(bufferSize, windowTime, scheduler),\n        resetOnError: true,\n        resetOnComplete: false,\n        resetOnRefCountZero: refCount,\n    });\n}\n","import * as i0 from '@angular/core';\nimport { Directive, InjectionToken, inject, HostAttributeToken, ElementRef, Input, NgZone, Renderer2, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, ChangeDetectorRef, ANIMATION_MODULE_TYPE, contentChild, Injector, computed, afterRender, ContentChild, ContentChildren, NgModule } from '@angular/core';\nimport { _IdGenerator } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Platform } from '@angular/cdk/platform';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { Subscription, Subject, merge } from 'rxjs';\nimport { startWith, map, pairwise, filter, takeUntil } from 'rxjs/operators';\nimport { SharedResizeObserver } from '@angular/cdk/observers/private';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport { MatCommonModule } from '@angular/material/core';\n\n/** The floating label for a `mat-form-field`. */\nclass MatLabel {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatLabel, isStandalone: true, selector: \"mat-label\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatLabel, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-label',\n                }]\n        }] });\n\n/**\n * Injection token that can be used to reference instances of `MatError`. It serves as\n * alternative token to the actual `MatError` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_ERROR = new InjectionToken('MatError');\n/** Single error message to be shown underneath the form-field. */\nclass MatError {\n    id = inject(_IdGenerator).getId('mat-mdc-error-');\n    constructor() {\n        const ariaLive = inject(new HostAttributeToken('aria-live'), { optional: true });\n        // If no aria-live value is set add 'polite' as a default. This is preferred over setting\n        // role='alert' so that screen readers do not interrupt the current task to read this aloud.\n        if (!ariaLive) {\n            const elementRef = inject(ElementRef);\n            elementRef.nativeElement.setAttribute('aria-live', 'polite');\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatError, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatError, isStandalone: true, selector: \"mat-error, [matError]\", inputs: { id: \"id\" }, host: { attributes: { \"aria-atomic\": \"true\" }, properties: { \"id\": \"id\" }, classAttribute: \"mat-mdc-form-field-error mat-mdc-form-field-bottom-align\" }, providers: [{ provide: MAT_ERROR, useExisting: MatError }], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatError, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-error, [matError]',\n                    host: {\n                        'class': 'mat-mdc-form-field-error mat-mdc-form-field-bottom-align',\n                        'aria-atomic': 'true',\n                        '[id]': 'id',\n                    },\n                    providers: [{ provide: MAT_ERROR, useExisting: MatError }],\n                }]\n        }], ctorParameters: () => [], propDecorators: { id: [{\n                type: Input\n            }] } });\n\n/** Hint text to be shown underneath the form field control. */\nclass MatHint {\n    /** Whether to align the hint label at the start or end of the line. */\n    align = 'start';\n    /** Unique ID for the hint. Used for the aria-describedby on the form field control. */\n    id = inject(_IdGenerator).getId('mat-mdc-hint-');\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatHint, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatHint, isStandalone: true, selector: \"mat-hint\", inputs: { align: \"align\", id: \"id\" }, host: { properties: { \"class.mat-mdc-form-field-hint-end\": \"align === \\\"end\\\"\", \"id\": \"id\", \"attr.align\": \"null\" }, classAttribute: \"mat-mdc-form-field-hint mat-mdc-form-field-bottom-align\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatHint, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-hint',\n                    host: {\n                        'class': 'mat-mdc-form-field-hint mat-mdc-form-field-bottom-align',\n                        '[class.mat-mdc-form-field-hint-end]': 'align === \"end\"',\n                        '[id]': 'id',\n                        // Remove align attribute to prevent it from interfering with layout.\n                        '[attr.align]': 'null',\n                    },\n                }]\n        }], propDecorators: { align: [{\n                type: Input\n            }], id: [{\n                type: Input\n            }] } });\n\n/**\n * Injection token that can be used to reference instances of `MatPrefix`. It serves as\n * alternative token to the actual `MatPrefix` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_PREFIX = new InjectionToken('MatPrefix');\n/** Prefix to be placed in front of the form field. */\nclass MatPrefix {\n    set _isTextSelector(value) {\n        this._isText = true;\n    }\n    _isText = false;\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatPrefix, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatPrefix, isStandalone: true, selector: \"[matPrefix], [matIconPrefix], [matTextPrefix]\", inputs: { _isTextSelector: [\"matTextPrefix\", \"_isTextSelector\"] }, providers: [{ provide: MAT_PREFIX, useExisting: MatPrefix }], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatPrefix, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matPrefix], [matIconPrefix], [matTextPrefix]',\n                    providers: [{ provide: MAT_PREFIX, useExisting: MatPrefix }],\n                }]\n        }], propDecorators: { _isTextSelector: [{\n                type: Input,\n                args: ['matTextPrefix']\n            }] } });\n\n/**\n * Injection token that can be used to reference instances of `MatSuffix`. It serves as\n * alternative token to the actual `MatSuffix` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_SUFFIX = new InjectionToken('MatSuffix');\n/** Suffix to be placed at the end of the form field. */\nclass MatSuffix {\n    set _isTextSelector(value) {\n        this._isText = true;\n    }\n    _isText = false;\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSuffix, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatSuffix, isStandalone: true, selector: \"[matSuffix], [matIconSuffix], [matTextSuffix]\", inputs: { _isTextSelector: [\"matTextSuffix\", \"_isTextSelector\"] }, providers: [{ provide: MAT_SUFFIX, useExisting: MatSuffix }], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSuffix, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matSuffix], [matIconSuffix], [matTextSuffix]',\n                    providers: [{ provide: MAT_SUFFIX, useExisting: MatSuffix }],\n                }]\n        }], propDecorators: { _isTextSelector: [{\n                type: Input,\n                args: ['matTextSuffix']\n            }] } });\n\n/** An injion token for the parent form-field. */\nconst FLOATING_LABEL_PARENT = new InjectionToken('FloatingLabelParent');\n/**\n * Internal directive that maintains a MDC floating label. This directive does not\n * use the `MDCFloatingLabelFoundation` class, as it is not worth the size cost of\n * including it just to measure the label width and toggle some classes.\n *\n * The use of a directive allows us to conditionally render a floating label in the\n * template without having to manually manage instantiation and destruction of the\n * floating label component based on.\n *\n * The component is responsible for setting up the floating label styles, measuring label\n * width for the outline notch, and providing inputs that can be used to toggle the\n * label's floating or required state.\n */\nclass MatFormFieldFloatingLabel {\n    _elementRef = inject(ElementRef);\n    /** Whether the label is floating. */\n    get floating() {\n        return this._floating;\n    }\n    set floating(value) {\n        this._floating = value;\n        if (this.monitorResize) {\n            this._handleResize();\n        }\n    }\n    _floating = false;\n    /** Whether to monitor for resize events on the floating label. */\n    get monitorResize() {\n        return this._monitorResize;\n    }\n    set monitorResize(value) {\n        this._monitorResize = value;\n        if (this._monitorResize) {\n            this._subscribeToResize();\n        }\n        else {\n            this._resizeSubscription.unsubscribe();\n        }\n    }\n    _monitorResize = false;\n    /** The shared ResizeObserver. */\n    _resizeObserver = inject(SharedResizeObserver);\n    /** The Angular zone. */\n    _ngZone = inject(NgZone);\n    /** The parent form-field. */\n    _parent = inject(FLOATING_LABEL_PARENT);\n    /** The current resize event subscription. */\n    _resizeSubscription = new Subscription();\n    constructor() { }\n    ngOnDestroy() {\n        this._resizeSubscription.unsubscribe();\n    }\n    /** Gets the width of the label. Used for the outline notch. */\n    getWidth() {\n        return estimateScrollWidth(this._elementRef.nativeElement);\n    }\n    /** Gets the HTML element for the floating label. */\n    get element() {\n        return this._elementRef.nativeElement;\n    }\n    /** Handles resize events from the ResizeObserver. */\n    _handleResize() {\n        // In the case where the label grows in size, the following sequence of events occurs:\n        // 1. The label grows by 1px triggering the ResizeObserver\n        // 2. The notch is expanded to accommodate the entire label\n        // 3. The label expands to its full width, triggering the ResizeObserver again\n        //\n        // This is expected, but If we allow this to all happen within the same macro task it causes an\n        // error: `ResizeObserver loop limit exceeded`. Therefore we push the notch resize out until\n        // the next macro task.\n        setTimeout(() => this._parent._handleLabelResized());\n    }\n    /** Subscribes to resize events. */\n    _subscribeToResize() {\n        this._resizeSubscription.unsubscribe();\n        this._ngZone.runOutsideAngular(() => {\n            this._resizeSubscription = this._resizeObserver\n                .observe(this._elementRef.nativeElement, { box: 'border-box' })\n                .subscribe(() => this._handleResize());\n        });\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormFieldFloatingLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatFormFieldFloatingLabel, isStandalone: true, selector: \"label[matFormFieldFloatingLabel]\", inputs: { floating: \"floating\", monitorResize: \"monitorResize\" }, host: { properties: { \"class.mdc-floating-label--float-above\": \"floating\" }, classAttribute: \"mdc-floating-label mat-mdc-floating-label\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormFieldFloatingLabel, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'label[matFormFieldFloatingLabel]',\n                    host: {\n                        'class': 'mdc-floating-label mat-mdc-floating-label',\n                        '[class.mdc-floating-label--float-above]': 'floating',\n                    },\n                }]\n        }], ctorParameters: () => [], propDecorators: { floating: [{\n                type: Input\n            }], monitorResize: [{\n                type: Input\n            }] } });\n/**\n * Estimates the scroll width of an element.\n * via https://github.com/material-components/material-components-web/blob/c0a11ef0d000a098fd0c372be8f12d6a99302855/packages/mdc-dom/ponyfill.ts\n */\nfunction estimateScrollWidth(element) {\n    // Check the offsetParent. If the element inherits display: none from any\n    // parent, the offsetParent property will be null (see\n    // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent).\n    // This check ensures we only clone the node when necessary.\n    const htmlEl = element;\n    if (htmlEl.offsetParent !== null) {\n        return htmlEl.scrollWidth;\n    }\n    const clone = htmlEl.cloneNode(true);\n    clone.style.setProperty('position', 'absolute');\n    clone.style.setProperty('transform', 'translate(-9999px, -9999px)');\n    document.documentElement.appendChild(clone);\n    const scrollWidth = clone.scrollWidth;\n    clone.remove();\n    return scrollWidth;\n}\n\n/** Class added when the line ripple is active. */\nconst ACTIVATE_CLASS = 'mdc-line-ripple--active';\n/** Class added when the line ripple is being deactivated. */\nconst DEACTIVATING_CLASS = 'mdc-line-ripple--deactivating';\n/**\n * Internal directive that creates an instance of the MDC line-ripple component. Using a\n * directive allows us to conditionally render a line-ripple in the template without having\n * to manually create and destroy the `MDCLineRipple` component whenever the condition changes.\n *\n * The directive sets up the styles for the line-ripple and provides an API for activating\n * and deactivating the line-ripple.\n */\nclass MatFormFieldLineRipple {\n    _elementRef = inject(ElementRef);\n    _cleanupTransitionEnd;\n    constructor() {\n        const ngZone = inject(NgZone);\n        const renderer = inject(Renderer2);\n        ngZone.runOutsideAngular(() => {\n            this._cleanupTransitionEnd = renderer.listen(this._elementRef.nativeElement, 'transitionend', this._handleTransitionEnd);\n        });\n    }\n    activate() {\n        const classList = this._elementRef.nativeElement.classList;\n        classList.remove(DEACTIVATING_CLASS);\n        classList.add(ACTIVATE_CLASS);\n    }\n    deactivate() {\n        this._elementRef.nativeElement.classList.add(DEACTIVATING_CLASS);\n    }\n    _handleTransitionEnd = (event) => {\n        const classList = this._elementRef.nativeElement.classList;\n        const isDeactivating = classList.contains(DEACTIVATING_CLASS);\n        if (event.propertyName === 'opacity' && isDeactivating) {\n            classList.remove(ACTIVATE_CLASS, DEACTIVATING_CLASS);\n        }\n    };\n    ngOnDestroy() {\n        this._cleanupTransitionEnd();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormFieldLineRipple, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatFormFieldLineRipple, isStandalone: true, selector: \"div[matFormFieldLineRipple]\", host: { classAttribute: \"mdc-line-ripple\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormFieldLineRipple, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'div[matFormFieldLineRipple]',\n                    host: {\n                        'class': 'mdc-line-ripple',\n                    },\n                }]\n        }], ctorParameters: () => [] });\n\n/**\n * Internal component that creates an instance of the MDC notched-outline component.\n *\n * The component sets up the HTML structure and styles for the notched-outline. It provides\n * inputs to toggle the notch state and width.\n */\nclass MatFormFieldNotchedOutline {\n    _elementRef = inject(ElementRef);\n    _ngZone = inject(NgZone);\n    /** Whether the notch should be opened. */\n    open = false;\n    _notch;\n    constructor() { }\n    ngAfterViewInit() {\n        const label = this._elementRef.nativeElement.querySelector('.mdc-floating-label');\n        if (label) {\n            this._elementRef.nativeElement.classList.add('mdc-notched-outline--upgraded');\n            if (typeof requestAnimationFrame === 'function') {\n                label.style.transitionDuration = '0s';\n                this._ngZone.runOutsideAngular(() => {\n                    requestAnimationFrame(() => (label.style.transitionDuration = ''));\n                });\n            }\n        }\n        else {\n            this._elementRef.nativeElement.classList.add('mdc-notched-outline--no-label');\n        }\n    }\n    _setNotchWidth(labelWidth) {\n        if (!this.open || !labelWidth) {\n            this._notch.nativeElement.style.width = '';\n        }\n        else {\n            const NOTCH_ELEMENT_PADDING = 8;\n            const NOTCH_ELEMENT_BORDER = 1;\n            this._notch.nativeElement.style.width = `calc(${labelWidth}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + ${NOTCH_ELEMENT_PADDING + NOTCH_ELEMENT_BORDER}px)`;\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormFieldNotchedOutline, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatFormFieldNotchedOutline, isStandalone: true, selector: \"div[matFormFieldNotchedOutline]\", inputs: { open: [\"matFormFieldNotchedOutlineOpen\", \"open\"] }, host: { properties: { \"class.mdc-notched-outline--notched\": \"open\" }, classAttribute: \"mdc-notched-outline\" }, viewQueries: [{ propertyName: \"_notch\", first: true, predicate: [\"notch\"], descendants: true }], ngImport: i0, template: \"<div class=\\\"mat-mdc-notch-piece mdc-notched-outline__leading\\\"></div>\\n<div class=\\\"mat-mdc-notch-piece mdc-notched-outline__notch\\\" #notch>\\n  <ng-content></ng-content>\\n</div>\\n<div class=\\\"mat-mdc-notch-piece mdc-notched-outline__trailing\\\"></div>\\n\", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormFieldNotchedOutline, decorators: [{\n            type: Component,\n            args: [{ selector: 'div[matFormFieldNotchedOutline]', host: {\n                        'class': 'mdc-notched-outline',\n                        // Besides updating the notch state through the MDC component, we toggle this class through\n                        // a host binding in order to ensure that the notched-outline renders correctly on the server.\n                        '[class.mdc-notched-outline--notched]': 'open',\n                    }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: \"<div class=\\\"mat-mdc-notch-piece mdc-notched-outline__leading\\\"></div>\\n<div class=\\\"mat-mdc-notch-piece mdc-notched-outline__notch\\\" #notch>\\n  <ng-content></ng-content>\\n</div>\\n<div class=\\\"mat-mdc-notch-piece mdc-notched-outline__trailing\\\"></div>\\n\" }]\n        }], ctorParameters: () => [], propDecorators: { open: [{\n                type: Input,\n                args: ['matFormFieldNotchedOutlineOpen']\n            }], _notch: [{\n                type: ViewChild,\n                args: ['notch']\n            }] } });\n\n/**\n * Animations used by the MatFormField.\n * @docs-private\n */\nconst matFormFieldAnimations = {\n    /** Animation that transitions the form field's error and hint messages. */\n    transitionMessages: trigger('transitionMessages', [\n        // TODO(mmalerba): Use angular animations for label animation as well.\n        state('enter', style({ opacity: 1, transform: 'translateY(0%)' })),\n        transition('void => enter', [\n            style({ opacity: 0, transform: 'translateY(-5px)' }),\n            animate('300ms cubic-bezier(0.55, 0, 0.55, 0.2)'),\n        ]),\n    ]),\n};\n\n/** An interface which allows a control to work inside of a `MatFormField`. */\nclass MatFormFieldControl {\n    /** The value of the control. */\n    value;\n    /**\n     * Stream that emits whenever the state of the control changes such that the parent `MatFormField`\n     * needs to run change detection.\n     */\n    stateChanges;\n    /** The element ID for this control. */\n    id;\n    /** The placeholder for this control. */\n    placeholder;\n    /** Gets the AbstractControlDirective for this control. */\n    ngControl;\n    /** Whether the control is focused. */\n    focused;\n    /** Whether the control is empty. */\n    empty;\n    /** Whether the `MatFormField` label should try to float. */\n    shouldLabelFloat;\n    /** Whether the control is required. */\n    required;\n    /** Whether the control is disabled. */\n    disabled;\n    /** Whether the control is in an error state. */\n    errorState;\n    /**\n     * An optional name for the control type that can be used to distinguish `mat-form-field` elements\n     * based on their control type. The form field will add a class,\n     * `mat-form-field-type-{{controlType}}` to its root element.\n     */\n    controlType;\n    /**\n     * Whether the input is currently in an autofilled state. If property is not present on the\n     * control it is assumed to be false.\n     */\n    autofilled;\n    /**\n     * Value of `aria-describedby` that should be merged with the described-by ids\n     * which are set by the form-field.\n     */\n    userAriaDescribedBy;\n    /**\n     * Whether to automatically assign the ID of the form field as the `for` attribute\n     * on the `<label>` inside the form field. Set this to true to prevent the form\n     * field from associating the label with non-native elements.\n     */\n    disableAutomaticLabeling;\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormFieldControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatFormFieldControl, isStandalone: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormFieldControl, decorators: [{\n            type: Directive\n        }] });\n\n/** @docs-private */\nfunction getMatFormFieldPlaceholderConflictError() {\n    return Error('Placeholder attribute and child element were both specified.');\n}\n/** @docs-private */\nfunction getMatFormFieldDuplicatedHintError(align) {\n    return Error(`A hint was already declared for 'align=\"${align}\"'.`);\n}\n/** @docs-private */\nfunction getMatFormFieldMissingControlError() {\n    return Error('mat-form-field must contain a MatFormFieldControl.');\n}\n\n/**\n * Injection token that can be used to inject an instances of `MatFormField`. It serves\n * as alternative token to the actual `MatFormField` class which would cause unnecessary\n * retention of the `MatFormField` class and its component metadata.\n */\nconst MAT_FORM_FIELD = new InjectionToken('MatFormField');\n/**\n * Injection token that can be used to configure the\n * default options for all form field within an app.\n */\nconst MAT_FORM_FIELD_DEFAULT_OPTIONS = new InjectionToken('MAT_FORM_FIELD_DEFAULT_OPTIONS');\n/** Default appearance used by the form field. */\nconst DEFAULT_APPEARANCE = 'fill';\n/**\n * Whether the label for form fields should by default float `always`,\n * `never`, or `auto`.\n */\nconst DEFAULT_FLOAT_LABEL = 'auto';\n/** Default way that the subscript element height is set. */\nconst DEFAULT_SUBSCRIPT_SIZING = 'fixed';\n/**\n * Default transform for docked floating labels in a MDC text-field. This value has been\n * extracted from the MDC text-field styles because we programmatically modify the docked\n * label transform, but do not want to accidentally discard the default label transform.\n */\nconst FLOATING_LABEL_DEFAULT_DOCKED_TRANSFORM = `translateY(-50%)`;\n/** Container for form controls that applies Material Design styling and behavior. */\nclass MatFormField {\n    _elementRef = inject(ElementRef);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _dir = inject(Directionality);\n    _platform = inject(Platform);\n    _idGenerator = inject(_IdGenerator);\n    _defaults = inject(MAT_FORM_FIELD_DEFAULT_OPTIONS, {\n        optional: true,\n    });\n    _animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });\n    _textField;\n    _iconPrefixContainer;\n    _textPrefixContainer;\n    _iconSuffixContainer;\n    _textSuffixContainer;\n    _floatingLabel;\n    _notchedOutline;\n    _lineRipple;\n    _formFieldControl;\n    _prefixChildren;\n    _suffixChildren;\n    _errorChildren;\n    _hintChildren;\n    _labelChild = contentChild(MatLabel);\n    /** Whether the required marker should be hidden. */\n    get hideRequiredMarker() {\n        return this._hideRequiredMarker;\n    }\n    set hideRequiredMarker(value) {\n        this._hideRequiredMarker = coerceBooleanProperty(value);\n    }\n    _hideRequiredMarker = false;\n    /**\n     * Theme color of the form field. This API is supported in M2 themes only, it\n     * has no effect in M3 themes.\n     *\n     * For information on applying color variants in M3, see\n     * https://material.angular.io/guide/theming#using-component-color-variants.\n     */\n    color = 'primary';\n    /** Whether the label should always float or float as the user types. */\n    get floatLabel() {\n        return this._floatLabel || this._defaults?.floatLabel || DEFAULT_FLOAT_LABEL;\n    }\n    set floatLabel(value) {\n        if (value !== this._floatLabel) {\n            this._floatLabel = value;\n            // For backwards compatibility. Custom form field controls or directives might set\n            // the \"floatLabel\" input and expect the form field view to be updated automatically.\n            // e.g. autocomplete trigger. Ideally we'd get rid of this and the consumers would just\n            // emit the \"stateChanges\" observable. TODO(devversion): consider removing.\n            this._changeDetectorRef.markForCheck();\n        }\n    }\n    _floatLabel;\n    /** The form field appearance style. */\n    get appearance() {\n        return this._appearance;\n    }\n    set appearance(value) {\n        const oldValue = this._appearance;\n        const newAppearance = value || this._defaults?.appearance || DEFAULT_APPEARANCE;\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (newAppearance !== 'fill' && newAppearance !== 'outline') {\n                throw new Error(`MatFormField: Invalid appearance \"${newAppearance}\", valid values are \"fill\" or \"outline\".`);\n            }\n        }\n        this._appearance = newAppearance;\n        if (this._appearance === 'outline' && this._appearance !== oldValue) {\n            // If the appearance has been switched to `outline`, the label offset needs to be updated.\n            // The update can happen once the view has been re-checked, but not immediately because\n            // the view has not been updated and the notched-outline floating label is not present.\n            this._needsOutlineLabelOffsetUpdate = true;\n        }\n    }\n    _appearance = DEFAULT_APPEARANCE;\n    /**\n     * Whether the form field should reserve space for one line of hint/error text (default)\n     * or to have the spacing grow from 0px as needed based on the size of the hint/error content.\n     * Note that when using dynamic sizing, layout shifts will occur when hint/error text changes.\n     */\n    get subscriptSizing() {\n        return this._subscriptSizing || this._defaults?.subscriptSizing || DEFAULT_SUBSCRIPT_SIZING;\n    }\n    set subscriptSizing(value) {\n        this._subscriptSizing = value || this._defaults?.subscriptSizing || DEFAULT_SUBSCRIPT_SIZING;\n    }\n    _subscriptSizing = null;\n    /** Text for the form field hint. */\n    get hintLabel() {\n        return this._hintLabel;\n    }\n    set hintLabel(value) {\n        this._hintLabel = value;\n        this._processHints();\n    }\n    _hintLabel = '';\n    _hasIconPrefix = false;\n    _hasTextPrefix = false;\n    _hasIconSuffix = false;\n    _hasTextSuffix = false;\n    // Unique id for the internal form field label.\n    _labelId = this._idGenerator.getId('mat-mdc-form-field-label-');\n    // Unique id for the hint label.\n    _hintLabelId = this._idGenerator.getId('mat-mdc-hint-');\n    /** State of the mat-hint and mat-error animations. */\n    _subscriptAnimationState = '';\n    /** Gets the current form field control */\n    get _control() {\n        return this._explicitFormFieldControl || this._formFieldControl;\n    }\n    set _control(value) {\n        this._explicitFormFieldControl = value;\n    }\n    _destroyed = new Subject();\n    _isFocused = null;\n    _explicitFormFieldControl;\n    _needsOutlineLabelOffsetUpdate = false;\n    _previousControl = null;\n    _stateChanges;\n    _valueChanges;\n    _describedByChanges;\n    _injector = inject(Injector);\n    constructor() {\n        const defaults = this._defaults;\n        if (defaults) {\n            if (defaults.appearance) {\n                this.appearance = defaults.appearance;\n            }\n            this._hideRequiredMarker = Boolean(defaults?.hideRequiredMarker);\n            if (defaults.color) {\n                this.color = defaults.color;\n            }\n        }\n    }\n    ngAfterViewInit() {\n        // Initial focus state sync. This happens rarely, but we want to account for\n        // it in case the form field control has \"focused\" set to true on init.\n        this._updateFocusState();\n        // Enable animations now. This ensures we don't animate on initial render.\n        this._subscriptAnimationState = 'enter';\n        // Because the above changes a value used in the template after it was checked, we need\n        // to trigger CD or the change might not be reflected if there is no other CD scheduled.\n        this._changeDetectorRef.detectChanges();\n    }\n    ngAfterContentInit() {\n        this._assertFormFieldControl();\n        this._initializeSubscript();\n        this._initializePrefixAndSuffix();\n        this._initializeOutlineLabelOffsetSubscriptions();\n    }\n    ngAfterContentChecked() {\n        this._assertFormFieldControl();\n        if (this._control !== this._previousControl) {\n            this._initializeControl(this._previousControl);\n            this._previousControl = this._control;\n        }\n    }\n    ngOnDestroy() {\n        this._stateChanges?.unsubscribe();\n        this._valueChanges?.unsubscribe();\n        this._describedByChanges?.unsubscribe();\n        this._destroyed.next();\n        this._destroyed.complete();\n    }\n    /**\n     * Gets the id of the label element. If no label is present, returns `null`.\n     */\n    getLabelId = computed(() => (this._hasFloatingLabel() ? this._labelId : null));\n    /**\n     * Gets an ElementRef for the element that a overlay attached to the form field\n     * should be positioned relative to.\n     */\n    getConnectedOverlayOrigin() {\n        return this._textField || this._elementRef;\n    }\n    /** Animates the placeholder up and locks it in position. */\n    _animateAndLockLabel() {\n        // This is for backwards compatibility only. Consumers of the form field might use\n        // this method. e.g. the autocomplete trigger. This method has been added to the non-MDC\n        // form field because setting \"floatLabel\" to \"always\" caused the label to float without\n        // animation. This is different in MDC where the label always animates, so this method\n        // is no longer necessary. There doesn't seem any benefit in adding logic to allow changing\n        // the floating label state without animations. The non-MDC implementation was inconsistent\n        // because it always animates if \"floatLabel\" is set away from \"always\".\n        // TODO(devversion): consider removing this method when releasing the MDC form field.\n        if (this._hasFloatingLabel()) {\n            this.floatLabel = 'always';\n        }\n    }\n    /** Initializes the registered form field control. */\n    _initializeControl(previousControl) {\n        const control = this._control;\n        const classPrefix = 'mat-mdc-form-field-type-';\n        if (previousControl) {\n            this._elementRef.nativeElement.classList.remove(classPrefix + previousControl.controlType);\n        }\n        if (control.controlType) {\n            this._elementRef.nativeElement.classList.add(classPrefix + control.controlType);\n        }\n        // Subscribe to changes in the child control state in order to update the form field UI.\n        this._stateChanges?.unsubscribe();\n        this._stateChanges = control.stateChanges.subscribe(() => {\n            this._updateFocusState();\n            this._changeDetectorRef.markForCheck();\n        });\n        // Updating the `aria-describedby` touches the DOM. Only do it if it actually needs to change.\n        this._describedByChanges?.unsubscribe();\n        this._describedByChanges = control.stateChanges\n            .pipe(startWith([undefined, undefined]), map(() => [control.errorState, control.userAriaDescribedBy]), pairwise(), filter(([[prevErrorState, prevDescribedBy], [currentErrorState, currentDescribedBy]]) => {\n            return prevErrorState !== currentErrorState || prevDescribedBy !== currentDescribedBy;\n        }))\n            .subscribe(() => this._syncDescribedByIds());\n        this._valueChanges?.unsubscribe();\n        // Run change detection if the value changes.\n        if (control.ngControl && control.ngControl.valueChanges) {\n            this._valueChanges = control.ngControl.valueChanges\n                .pipe(takeUntil(this._destroyed))\n                .subscribe(() => this._changeDetectorRef.markForCheck());\n        }\n    }\n    _checkPrefixAndSuffixTypes() {\n        this._hasIconPrefix = !!this._prefixChildren.find(p => !p._isText);\n        this._hasTextPrefix = !!this._prefixChildren.find(p => p._isText);\n        this._hasIconSuffix = !!this._suffixChildren.find(s => !s._isText);\n        this._hasTextSuffix = !!this._suffixChildren.find(s => s._isText);\n    }\n    /** Initializes the prefix and suffix containers. */\n    _initializePrefixAndSuffix() {\n        this._checkPrefixAndSuffixTypes();\n        // Mark the form field as dirty whenever the prefix or suffix children change. This\n        // is necessary because we conditionally display the prefix/suffix containers based\n        // on whether there is projected content.\n        merge(this._prefixChildren.changes, this._suffixChildren.changes).subscribe(() => {\n            this._checkPrefixAndSuffixTypes();\n            this._changeDetectorRef.markForCheck();\n        });\n    }\n    /**\n     * Initializes the subscript by validating hints and synchronizing \"aria-describedby\" ids\n     * with the custom form field control. Also subscribes to hint and error changes in order\n     * to be able to validate and synchronize ids on change.\n     */\n    _initializeSubscript() {\n        // Re-validate when the number of hints changes.\n        this._hintChildren.changes.subscribe(() => {\n            this._processHints();\n            this._changeDetectorRef.markForCheck();\n        });\n        // Update the aria-described by when the number of errors changes.\n        this._errorChildren.changes.subscribe(() => {\n            this._syncDescribedByIds();\n            this._changeDetectorRef.markForCheck();\n        });\n        // Initial mat-hint validation and subscript describedByIds sync.\n        this._validateHints();\n        this._syncDescribedByIds();\n    }\n    /** Throws an error if the form field's control is missing. */\n    _assertFormFieldControl() {\n        if (!this._control && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getMatFormFieldMissingControlError();\n        }\n    }\n    _updateFocusState() {\n        // Usually the MDC foundation would call \"activateFocus\" and \"deactivateFocus\" whenever\n        // certain DOM events are emitted. This is not possible in our implementation of the\n        // form field because we support abstract form field controls which are not necessarily\n        // of type input, nor do we have a reference to a native form field control element. Instead\n        // we handle the focus by checking if the abstract form field control focused state changes.\n        if (this._control.focused && !this._isFocused) {\n            this._isFocused = true;\n            this._lineRipple?.activate();\n        }\n        else if (!this._control.focused && (this._isFocused || this._isFocused === null)) {\n            this._isFocused = false;\n            this._lineRipple?.deactivate();\n        }\n        this._textField?.nativeElement.classList.toggle('mdc-text-field--focused', this._control.focused);\n    }\n    /**\n     * The floating label in the docked state needs to account for prefixes. The horizontal offset\n     * is calculated whenever the appearance changes to `outline`, the prefixes change, or when the\n     * form field is added to the DOM. This method sets up all subscriptions which are needed to\n     * trigger the label offset update.\n     */\n    _initializeOutlineLabelOffsetSubscriptions() {\n        // Whenever the prefix changes, schedule an update of the label offset.\n        // TODO(mmalerba): Use ResizeObserver to better support dynamically changing prefix content.\n        this._prefixChildren.changes.subscribe(() => (this._needsOutlineLabelOffsetUpdate = true));\n        // TODO(mmalerba): Split this into separate `afterRender` calls using the `EarlyRead` and\n        //  `Write` phases.\n        afterRender(() => {\n            if (this._needsOutlineLabelOffsetUpdate) {\n                this._needsOutlineLabelOffsetUpdate = false;\n                this._updateOutlineLabelOffset();\n            }\n        }, {\n            injector: this._injector,\n        });\n        this._dir.change\n            .pipe(takeUntil(this._destroyed))\n            .subscribe(() => (this._needsOutlineLabelOffsetUpdate = true));\n    }\n    /** Whether the floating label should always float or not. */\n    _shouldAlwaysFloat() {\n        return this.floatLabel === 'always';\n    }\n    _hasOutline() {\n        return this.appearance === 'outline';\n    }\n    /**\n     * Whether the label should display in the infix. Labels in the outline appearance are\n     * displayed as part of the notched-outline and are horizontally offset to account for\n     * form field prefix content. This won't work in server side rendering since we cannot\n     * measure the width of the prefix container. To make the docked label appear as if the\n     * right offset has been calculated, we forcibly render the label inside the infix. Since\n     * the label is part of the infix, the label cannot overflow the prefix content.\n     */\n    _forceDisplayInfixLabel() {\n        return !this._platform.isBrowser && this._prefixChildren.length && !this._shouldLabelFloat();\n    }\n    _hasFloatingLabel = computed(() => !!this._labelChild());\n    _shouldLabelFloat() {\n        if (!this._hasFloatingLabel()) {\n            return false;\n        }\n        return this._control.shouldLabelFloat || this._shouldAlwaysFloat();\n    }\n    /**\n     * Determines whether a class from the AbstractControlDirective\n     * should be forwarded to the host element.\n     */\n    _shouldForward(prop) {\n        const control = this._control ? this._control.ngControl : null;\n        return control && control[prop];\n    }\n    /** Determines whether to display hints or errors. */\n    _getDisplayedMessages() {\n        return this._errorChildren && this._errorChildren.length > 0 && this._control.errorState\n            ? 'error'\n            : 'hint';\n    }\n    /** Handle label resize events. */\n    _handleLabelResized() {\n        this._refreshOutlineNotchWidth();\n    }\n    /** Refreshes the width of the outline-notch, if present. */\n    _refreshOutlineNotchWidth() {\n        if (!this._hasOutline() || !this._floatingLabel || !this._shouldLabelFloat()) {\n            this._notchedOutline?._setNotchWidth(0);\n        }\n        else {\n            this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());\n        }\n    }\n    /** Does any extra processing that is required when handling the hints. */\n    _processHints() {\n        this._validateHints();\n        this._syncDescribedByIds();\n    }\n    /**\n     * Ensure that there is a maximum of one of each \"mat-hint\" alignment specified. The hint\n     * label specified set through the input is being considered as \"start\" aligned.\n     *\n     * This method is a noop if Angular runs in production mode.\n     */\n    _validateHints() {\n        if (this._hintChildren && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            let startHint;\n            let endHint;\n            this._hintChildren.forEach((hint) => {\n                if (hint.align === 'start') {\n                    if (startHint || this.hintLabel) {\n                        throw getMatFormFieldDuplicatedHintError('start');\n                    }\n                    startHint = hint;\n                }\n                else if (hint.align === 'end') {\n                    if (endHint) {\n                        throw getMatFormFieldDuplicatedHintError('end');\n                    }\n                    endHint = hint;\n                }\n            });\n        }\n    }\n    /**\n     * Sets the list of element IDs that describe the child control. This allows the control to update\n     * its `aria-describedby` attribute accordingly.\n     */\n    _syncDescribedByIds() {\n        if (this._control) {\n            let ids = [];\n            // TODO(wagnermaciel): Remove the type check when we find the root cause of this bug.\n            if (this._control.userAriaDescribedBy &&\n                typeof this._control.userAriaDescribedBy === 'string') {\n                ids.push(...this._control.userAriaDescribedBy.split(' '));\n            }\n            if (this._getDisplayedMessages() === 'hint') {\n                const startHint = this._hintChildren\n                    ? this._hintChildren.find(hint => hint.align === 'start')\n                    : null;\n                const endHint = this._hintChildren\n                    ? this._hintChildren.find(hint => hint.align === 'end')\n                    : null;\n                if (startHint) {\n                    ids.push(startHint.id);\n                }\n                else if (this._hintLabel) {\n                    ids.push(this._hintLabelId);\n                }\n                if (endHint) {\n                    ids.push(endHint.id);\n                }\n            }\n            else if (this._errorChildren) {\n                ids.push(...this._errorChildren.map(error => error.id));\n            }\n            this._control.setDescribedByIds(ids);\n        }\n    }\n    /**\n     * Updates the horizontal offset of the label in the outline appearance. In the outline\n     * appearance, the notched-outline and label are not relative to the infix container because\n     * the outline intends to surround prefixes, suffixes and the infix. This means that the\n     * floating label by default overlaps prefixes in the docked state. To avoid this, we need to\n     * horizontally offset the label by the width of the prefix container. The MDC text-field does\n     * not need to do this because they use a fixed width for prefixes. Hence, they can simply\n     * incorporate the horizontal offset into their default text-field styles.\n     */\n    _updateOutlineLabelOffset() {\n        if (!this._hasOutline() || !this._floatingLabel) {\n            return;\n        }\n        const floatingLabel = this._floatingLabel.element;\n        // If no prefix is displayed, reset the outline label offset from potential\n        // previous label offset updates.\n        if (!(this._iconPrefixContainer || this._textPrefixContainer)) {\n            floatingLabel.style.transform = '';\n            return;\n        }\n        // If the form field is not attached to the DOM yet (e.g. in a tab), we defer\n        // the label offset update until the zone stabilizes.\n        if (!this._isAttachedToDom()) {\n            this._needsOutlineLabelOffsetUpdate = true;\n            return;\n        }\n        const iconPrefixContainer = this._iconPrefixContainer?.nativeElement;\n        const textPrefixContainer = this._textPrefixContainer?.nativeElement;\n        const iconSuffixContainer = this._iconSuffixContainer?.nativeElement;\n        const textSuffixContainer = this._textSuffixContainer?.nativeElement;\n        const iconPrefixContainerWidth = iconPrefixContainer?.getBoundingClientRect().width ?? 0;\n        const textPrefixContainerWidth = textPrefixContainer?.getBoundingClientRect().width ?? 0;\n        const iconSuffixContainerWidth = iconSuffixContainer?.getBoundingClientRect().width ?? 0;\n        const textSuffixContainerWidth = textSuffixContainer?.getBoundingClientRect().width ?? 0;\n        // If the directionality is RTL, the x-axis transform needs to be inverted. This\n        // is because `transformX` does not change based on the page directionality.\n        const negate = this._dir.value === 'rtl' ? '-1' : '1';\n        const prefixWidth = `${iconPrefixContainerWidth + textPrefixContainerWidth}px`;\n        const labelOffset = `var(--mat-mdc-form-field-label-offset-x, 0px)`;\n        const labelHorizontalOffset = `calc(${negate} * (${prefixWidth} + ${labelOffset}))`;\n        // Update the translateX of the floating label to account for the prefix container,\n        // but allow the CSS to override this setting via a CSS variable when the label is\n        // floating.\n        floatingLabel.style.transform = `var(\n        --mat-mdc-form-field-label-transform,\n        ${FLOATING_LABEL_DEFAULT_DOCKED_TRANSFORM} translateX(${labelHorizontalOffset})\n    )`;\n        // Prevent the label from overlapping the suffix when in resting position.\n        const prefixAndSuffixWidth = iconPrefixContainerWidth +\n            textPrefixContainerWidth +\n            iconSuffixContainerWidth +\n            textSuffixContainerWidth;\n        this._elementRef.nativeElement.style.setProperty('--mat-form-field-notch-max-width', `calc(100% - ${prefixAndSuffixWidth}px)`);\n    }\n    /** Checks whether the form field is attached to the DOM. */\n    _isAttachedToDom() {\n        const element = this._elementRef.nativeElement;\n        if (element.getRootNode) {\n            const rootNode = element.getRootNode();\n            // If the element is inside the DOM the root node will be either the document\n            // or the closest shadow root, otherwise it'll be the element itself.\n            return rootNode && rootNode !== element;\n        }\n        // Otherwise fall back to checking if it's in the document. This doesn't account for\n        // shadow DOM, however browser that support shadow DOM should support `getRootNode` as well.\n        return document.documentElement.contains(element);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormField, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"19.0.0\", type: MatFormField, isStandalone: true, selector: \"mat-form-field\", inputs: { hideRequiredMarker: \"hideRequiredMarker\", color: \"color\", floatLabel: \"floatLabel\", appearance: \"appearance\", subscriptSizing: \"subscriptSizing\", hintLabel: \"hintLabel\" }, host: { properties: { \"class.mat-mdc-form-field-label-always-float\": \"_shouldAlwaysFloat()\", \"class.mat-mdc-form-field-has-icon-prefix\": \"_hasIconPrefix\", \"class.mat-mdc-form-field-has-icon-suffix\": \"_hasIconSuffix\", \"class.mat-form-field-invalid\": \"_control.errorState\", \"class.mat-form-field-disabled\": \"_control.disabled\", \"class.mat-form-field-autofilled\": \"_control.autofilled\", \"class.mat-form-field-no-animations\": \"_animationMode === \\\"NoopAnimations\\\"\", \"class.mat-form-field-appearance-fill\": \"appearance == \\\"fill\\\"\", \"class.mat-form-field-appearance-outline\": \"appearance == \\\"outline\\\"\", \"class.mat-form-field-hide-placeholder\": \"_hasFloatingLabel() && !_shouldLabelFloat()\", \"class.mat-focused\": \"_control.focused\", \"class.mat-primary\": \"color !== \\\"accent\\\" && color !== \\\"warn\\\"\", \"class.mat-accent\": \"color === \\\"accent\\\"\", \"class.mat-warn\": \"color === \\\"warn\\\"\", \"class.ng-untouched\": \"_shouldForward(\\\"untouched\\\")\", \"class.ng-touched\": \"_shouldForward(\\\"touched\\\")\", \"class.ng-pristine\": \"_shouldForward(\\\"pristine\\\")\", \"class.ng-dirty\": \"_shouldForward(\\\"dirty\\\")\", \"class.ng-valid\": \"_shouldForward(\\\"valid\\\")\", \"class.ng-invalid\": \"_shouldForward(\\\"invalid\\\")\", \"class.ng-pending\": \"_shouldForward(\\\"pending\\\")\" }, classAttribute: \"mat-mdc-form-field\" }, providers: [\n            { provide: MAT_FORM_FIELD, useExisting: MatFormField },\n            { provide: FLOATING_LABEL_PARENT, useExisting: MatFormField },\n        ], queries: [{ propertyName: \"_labelChild\", first: true, predicate: MatLabel, descendants: true, isSignal: true }, { propertyName: \"_formFieldControl\", first: true, predicate: MatFormFieldControl, descendants: true }, { propertyName: \"_prefixChildren\", predicate: MAT_PREFIX, descendants: true }, { propertyName: \"_suffixChildren\", predicate: MAT_SUFFIX, descendants: true }, { propertyName: \"_errorChildren\", predicate: MAT_ERROR, descendants: true }, { propertyName: \"_hintChildren\", predicate: MatHint, descendants: true }], viewQueries: [{ propertyName: \"_textField\", first: true, predicate: [\"textField\"], descendants: true }, { propertyName: \"_iconPrefixContainer\", first: true, predicate: [\"iconPrefixContainer\"], descendants: true }, { propertyName: \"_textPrefixContainer\", first: true, predicate: [\"textPrefixContainer\"], descendants: true }, { propertyName: \"_iconSuffixContainer\", first: true, predicate: [\"iconSuffixContainer\"], descendants: true }, { propertyName: \"_textSuffixContainer\", first: true, predicate: [\"textSuffixContainer\"], descendants: true }, { propertyName: \"_floatingLabel\", first: true, predicate: MatFormFieldFloatingLabel, descendants: true }, { propertyName: \"_notchedOutline\", first: true, predicate: MatFormFieldNotchedOutline, descendants: true }, { propertyName: \"_lineRipple\", first: true, predicate: MatFormFieldLineRipple, descendants: true }], exportAs: [\"matFormField\"], ngImport: i0, template: \"<ng-template #labelTemplate>\\n  <!--\\n    MDC recommends that the text-field is a `<label>` element. This rather complicates the\\n    setup because it would require every form-field control to explicitly set `aria-labelledby`.\\n    This is because the `<label>` itself contains more than the actual label (e.g. prefix, suffix\\n    or other projected content), and screen readers could potentially read out undesired content.\\n    Excluding elements from being printed out requires them to be marked with `aria-hidden`, or\\n    the form control is set to a scoped element for the label (using `aria-labelledby`). Both of\\n    these options seem to complicate the setup because we know exactly what content is rendered\\n    as part of the label, and we don't want to spend resources on walking through projected content\\n    to set `aria-hidden`. Nor do we want to set `aria-labelledby` on every form control if we could\\n    simply link the label to the control using the label `for` attribute.\\n  -->\\n  @if (_hasFloatingLabel()) {\\n    <label\\n      matFormFieldFloatingLabel\\n      [floating]=\\\"_shouldLabelFloat()\\\"\\n      [monitorResize]=\\\"_hasOutline()\\\"\\n      [id]=\\\"_labelId\\\"\\n      [attr.for]=\\\"_control.disableAutomaticLabeling ? null : _control.id\\\"\\n    >\\n      <ng-content select=\\\"mat-label\\\"></ng-content>\\n      <!--\\n        We set the required marker as a separate element, in order to make it easier to target if\\n        apps want to override it and to be able to set `aria-hidden` so that screen readers don't\\n        pick it up.\\n       -->\\n      @if (!hideRequiredMarker && _control.required) {\\n        <span\\n          aria-hidden=\\\"true\\\"\\n          class=\\\"mat-mdc-form-field-required-marker mdc-floating-label--required\\\"\\n        ></span>\\n      }\\n    </label>\\n  }\\n</ng-template>\\n\\n<div\\n  class=\\\"mat-mdc-text-field-wrapper mdc-text-field\\\"\\n  #textField\\n  [class.mdc-text-field--filled]=\\\"!_hasOutline()\\\"\\n  [class.mdc-text-field--outlined]=\\\"_hasOutline()\\\"\\n  [class.mdc-text-field--no-label]=\\\"!_hasFloatingLabel()\\\"\\n  [class.mdc-text-field--disabled]=\\\"_control.disabled\\\"\\n  [class.mdc-text-field--invalid]=\\\"_control.errorState\\\"\\n  (click)=\\\"_control.onContainerClick($event)\\\"\\n>\\n  @if (!_hasOutline() && !_control.disabled) {\\n    <div class=\\\"mat-mdc-form-field-focus-overlay\\\"></div>\\n  }\\n  <div class=\\\"mat-mdc-form-field-flex\\\">\\n    @if (_hasOutline()) {\\n      <div matFormFieldNotchedOutline [matFormFieldNotchedOutlineOpen]=\\\"_shouldLabelFloat()\\\">\\n        @if (!_forceDisplayInfixLabel()) {\\n          <ng-template [ngTemplateOutlet]=\\\"labelTemplate\\\"></ng-template>\\n        }\\n      </div>\\n    }\\n\\n    @if (_hasIconPrefix) {\\n      <div class=\\\"mat-mdc-form-field-icon-prefix\\\" #iconPrefixContainer>\\n        <ng-content select=\\\"[matPrefix], [matIconPrefix]\\\"></ng-content>\\n      </div>\\n    }\\n\\n    @if (_hasTextPrefix) {\\n      <div class=\\\"mat-mdc-form-field-text-prefix\\\" #textPrefixContainer>\\n        <ng-content select=\\\"[matTextPrefix]\\\"></ng-content>\\n      </div>\\n    }\\n\\n    <div class=\\\"mat-mdc-form-field-infix\\\">\\n      @if (!_hasOutline() || _forceDisplayInfixLabel()) {\\n        <ng-template [ngTemplateOutlet]=\\\"labelTemplate\\\"></ng-template>\\n      }\\n\\n      <ng-content></ng-content>\\n    </div>\\n\\n    @if (_hasTextSuffix) {\\n      <div class=\\\"mat-mdc-form-field-text-suffix\\\" #textSuffixContainer>\\n        <ng-content select=\\\"[matTextSuffix]\\\"></ng-content>\\n      </div>\\n    }\\n\\n    @if (_hasIconSuffix) {\\n      <div class=\\\"mat-mdc-form-field-icon-suffix\\\" #iconSuffixContainer>\\n        <ng-content select=\\\"[matSuffix], [matIconSuffix]\\\"></ng-content>\\n      </div>\\n    }\\n  </div>\\n\\n  @if (!_hasOutline()) {\\n    <div matFormFieldLineRipple></div>\\n  }\\n</div>\\n\\n<div\\n  class=\\\"mat-mdc-form-field-subscript-wrapper mat-mdc-form-field-bottom-align\\\"\\n  [class.mat-mdc-form-field-subscript-dynamic-size]=\\\"subscriptSizing === 'dynamic'\\\"\\n>\\n  @switch (_getDisplayedMessages()) {\\n    @case ('error') {\\n      <div\\n        class=\\\"mat-mdc-form-field-error-wrapper\\\"\\n        [@transitionMessages]=\\\"_subscriptAnimationState\\\"\\n      >\\n        <ng-content select=\\\"mat-error, [matError]\\\"></ng-content>\\n      </div>\\n    }\\n\\n    @case ('hint') {\\n      <div class=\\\"mat-mdc-form-field-hint-wrapper\\\" [@transitionMessages]=\\\"_subscriptAnimationState\\\">\\n        @if (hintLabel) {\\n          <mat-hint [id]=\\\"_hintLabelId\\\">{{hintLabel}}</mat-hint>\\n        }\\n        <ng-content select=\\\"mat-hint:not([align='end'])\\\"></ng-content>\\n        <div class=\\\"mat-mdc-form-field-hint-spacer\\\"></div>\\n        <ng-content select=\\\"mat-hint[align='end']\\\"></ng-content>\\n      </div>\\n    }\\n  }\\n</div>\\n\", styles: [\".mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-filled-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-outlined-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-filled-text-field-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-filled-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-filled-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-filled-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-filled-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-filled-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-outlined-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-outlined-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-outlined-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-outlined-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-outlined-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:\\\"*\\\"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-outline-color, var(--mat-sys-outline));border-width:var(--mdc-outlined-text-field-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mdc-outlined-text-field-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),100% - max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))*2)}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none;--mat-form-field-notch-max-width: 100%}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:\\\"\\\"}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mdc-filled-text-field-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:\\\"\\\";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:\\\"\\\";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}\"], dependencies: [{ kind: \"directive\", type: MatFormFieldFloatingLabel, selector: \"label[matFormFieldFloatingLabel]\", inputs: [\"floating\", \"monitorResize\"] }, { kind: \"component\", type: MatFormFieldNotchedOutline, selector: \"div[matFormFieldNotchedOutline]\", inputs: [\"matFormFieldNotchedOutlineOpen\"] }, { kind: \"directive\", type: NgTemplateOutlet, selector: \"[ngTemplateOutlet]\", inputs: [\"ngTemplateOutletContext\", \"ngTemplateOutlet\", \"ngTemplateOutletInjector\"] }, { kind: \"directive\", type: MatFormFieldLineRipple, selector: \"div[matFormFieldLineRipple]\" }, { kind: \"directive\", type: MatHint, selector: \"mat-hint\", inputs: [\"align\", \"id\"] }], animations: [matFormFieldAnimations.transitionMessages], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormField, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-form-field', exportAs: 'matFormField', animations: [matFormFieldAnimations.transitionMessages], host: {\n                        'class': 'mat-mdc-form-field',\n                        '[class.mat-mdc-form-field-label-always-float]': '_shouldAlwaysFloat()',\n                        '[class.mat-mdc-form-field-has-icon-prefix]': '_hasIconPrefix',\n                        '[class.mat-mdc-form-field-has-icon-suffix]': '_hasIconSuffix',\n                        // Note that these classes reuse the same names as the non-MDC version, because they can be\n                        // considered a public API since custom form controls may use them to style themselves.\n                        // See https://github.com/angular/components/pull/20502#discussion_r486124901.\n                        '[class.mat-form-field-invalid]': '_control.errorState',\n                        '[class.mat-form-field-disabled]': '_control.disabled',\n                        '[class.mat-form-field-autofilled]': '_control.autofilled',\n                        '[class.mat-form-field-no-animations]': '_animationMode === \"NoopAnimations\"',\n                        '[class.mat-form-field-appearance-fill]': 'appearance == \"fill\"',\n                        '[class.mat-form-field-appearance-outline]': 'appearance == \"outline\"',\n                        '[class.mat-form-field-hide-placeholder]': '_hasFloatingLabel() && !_shouldLabelFloat()',\n                        '[class.mat-focused]': '_control.focused',\n                        '[class.mat-primary]': 'color !== \"accent\" && color !== \"warn\"',\n                        '[class.mat-accent]': 'color === \"accent\"',\n                        '[class.mat-warn]': 'color === \"warn\"',\n                        '[class.ng-untouched]': '_shouldForward(\"untouched\")',\n                        '[class.ng-touched]': '_shouldForward(\"touched\")',\n                        '[class.ng-pristine]': '_shouldForward(\"pristine\")',\n                        '[class.ng-dirty]': '_shouldForward(\"dirty\")',\n                        '[class.ng-valid]': '_shouldForward(\"valid\")',\n                        '[class.ng-invalid]': '_shouldForward(\"invalid\")',\n                        '[class.ng-pending]': '_shouldForward(\"pending\")',\n                    }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [\n                        { provide: MAT_FORM_FIELD, useExisting: MatFormField },\n                        { provide: FLOATING_LABEL_PARENT, useExisting: MatFormField },\n                    ], imports: [\n                        MatFormFieldFloatingLabel,\n                        MatFormFieldNotchedOutline,\n                        NgTemplateOutlet,\n                        MatFormFieldLineRipple,\n                        MatHint,\n                    ], template: \"<ng-template #labelTemplate>\\n  <!--\\n    MDC recommends that the text-field is a `<label>` element. This rather complicates the\\n    setup because it would require every form-field control to explicitly set `aria-labelledby`.\\n    This is because the `<label>` itself contains more than the actual label (e.g. prefix, suffix\\n    or other projected content), and screen readers could potentially read out undesired content.\\n    Excluding elements from being printed out requires them to be marked with `aria-hidden`, or\\n    the form control is set to a scoped element for the label (using `aria-labelledby`). Both of\\n    these options seem to complicate the setup because we know exactly what content is rendered\\n    as part of the label, and we don't want to spend resources on walking through projected content\\n    to set `aria-hidden`. Nor do we want to set `aria-labelledby` on every form control if we could\\n    simply link the label to the control using the label `for` attribute.\\n  -->\\n  @if (_hasFloatingLabel()) {\\n    <label\\n      matFormFieldFloatingLabel\\n      [floating]=\\\"_shouldLabelFloat()\\\"\\n      [monitorResize]=\\\"_hasOutline()\\\"\\n      [id]=\\\"_labelId\\\"\\n      [attr.for]=\\\"_control.disableAutomaticLabeling ? null : _control.id\\\"\\n    >\\n      <ng-content select=\\\"mat-label\\\"></ng-content>\\n      <!--\\n        We set the required marker as a separate element, in order to make it easier to target if\\n        apps want to override it and to be able to set `aria-hidden` so that screen readers don't\\n        pick it up.\\n       -->\\n      @if (!hideRequiredMarker && _control.required) {\\n        <span\\n          aria-hidden=\\\"true\\\"\\n          class=\\\"mat-mdc-form-field-required-marker mdc-floating-label--required\\\"\\n        ></span>\\n      }\\n    </label>\\n  }\\n</ng-template>\\n\\n<div\\n  class=\\\"mat-mdc-text-field-wrapper mdc-text-field\\\"\\n  #textField\\n  [class.mdc-text-field--filled]=\\\"!_hasOutline()\\\"\\n  [class.mdc-text-field--outlined]=\\\"_hasOutline()\\\"\\n  [class.mdc-text-field--no-label]=\\\"!_hasFloatingLabel()\\\"\\n  [class.mdc-text-field--disabled]=\\\"_control.disabled\\\"\\n  [class.mdc-text-field--invalid]=\\\"_control.errorState\\\"\\n  (click)=\\\"_control.onContainerClick($event)\\\"\\n>\\n  @if (!_hasOutline() && !_control.disabled) {\\n    <div class=\\\"mat-mdc-form-field-focus-overlay\\\"></div>\\n  }\\n  <div class=\\\"mat-mdc-form-field-flex\\\">\\n    @if (_hasOutline()) {\\n      <div matFormFieldNotchedOutline [matFormFieldNotchedOutlineOpen]=\\\"_shouldLabelFloat()\\\">\\n        @if (!_forceDisplayInfixLabel()) {\\n          <ng-template [ngTemplateOutlet]=\\\"labelTemplate\\\"></ng-template>\\n        }\\n      </div>\\n    }\\n\\n    @if (_hasIconPrefix) {\\n      <div class=\\\"mat-mdc-form-field-icon-prefix\\\" #iconPrefixContainer>\\n        <ng-content select=\\\"[matPrefix], [matIconPrefix]\\\"></ng-content>\\n      </div>\\n    }\\n\\n    @if (_hasTextPrefix) {\\n      <div class=\\\"mat-mdc-form-field-text-prefix\\\" #textPrefixContainer>\\n        <ng-content select=\\\"[matTextPrefix]\\\"></ng-content>\\n      </div>\\n    }\\n\\n    <div class=\\\"mat-mdc-form-field-infix\\\">\\n      @if (!_hasOutline() || _forceDisplayInfixLabel()) {\\n        <ng-template [ngTemplateOutlet]=\\\"labelTemplate\\\"></ng-template>\\n      }\\n\\n      <ng-content></ng-content>\\n    </div>\\n\\n    @if (_hasTextSuffix) {\\n      <div class=\\\"mat-mdc-form-field-text-suffix\\\" #textSuffixContainer>\\n        <ng-content select=\\\"[matTextSuffix]\\\"></ng-content>\\n      </div>\\n    }\\n\\n    @if (_hasIconSuffix) {\\n      <div class=\\\"mat-mdc-form-field-icon-suffix\\\" #iconSuffixContainer>\\n        <ng-content select=\\\"[matSuffix], [matIconSuffix]\\\"></ng-content>\\n      </div>\\n    }\\n  </div>\\n\\n  @if (!_hasOutline()) {\\n    <div matFormFieldLineRipple></div>\\n  }\\n</div>\\n\\n<div\\n  class=\\\"mat-mdc-form-field-subscript-wrapper mat-mdc-form-field-bottom-align\\\"\\n  [class.mat-mdc-form-field-subscript-dynamic-size]=\\\"subscriptSizing === 'dynamic'\\\"\\n>\\n  @switch (_getDisplayedMessages()) {\\n    @case ('error') {\\n      <div\\n        class=\\\"mat-mdc-form-field-error-wrapper\\\"\\n        [@transitionMessages]=\\\"_subscriptAnimationState\\\"\\n      >\\n        <ng-content select=\\\"mat-error, [matError]\\\"></ng-content>\\n      </div>\\n    }\\n\\n    @case ('hint') {\\n      <div class=\\\"mat-mdc-form-field-hint-wrapper\\\" [@transitionMessages]=\\\"_subscriptAnimationState\\\">\\n        @if (hintLabel) {\\n          <mat-hint [id]=\\\"_hintLabelId\\\">{{hintLabel}}</mat-hint>\\n        }\\n        <ng-content select=\\\"mat-hint:not([align='end'])\\\"></ng-content>\\n        <div class=\\\"mat-mdc-form-field-hint-spacer\\\"></div>\\n        <ng-content select=\\\"mat-hint[align='end']\\\"></ng-content>\\n      </div>\\n    }\\n  }\\n</div>\\n\", styles: [\".mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-filled-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-outlined-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-filled-text-field-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-filled-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-filled-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-filled-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-filled-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-filled-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-outlined-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-outlined-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-outlined-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-outlined-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-outlined-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:\\\"*\\\"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-outline-color, var(--mat-sys-outline));border-width:var(--mdc-outlined-text-field-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mdc-outlined-text-field-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),100% - max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))*2)}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none;--mat-form-field-notch-max-width: 100%}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:\\\"\\\"}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mdc-filled-text-field-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:\\\"\\\";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:\\\"\\\";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}\"] }]\n        }], ctorParameters: () => [], propDecorators: { _textField: [{\n                type: ViewChild,\n                args: ['textField']\n            }], _iconPrefixContainer: [{\n                type: ViewChild,\n                args: ['iconPrefixContainer']\n            }], _textPrefixContainer: [{\n                type: ViewChild,\n                args: ['textPrefixContainer']\n            }], _iconSuffixContainer: [{\n                type: ViewChild,\n                args: ['iconSuffixContainer']\n            }], _textSuffixContainer: [{\n                type: ViewChild,\n                args: ['textSuffixContainer']\n            }], _floatingLabel: [{\n                type: ViewChild,\n                args: [MatFormFieldFloatingLabel]\n            }], _notchedOutline: [{\n                type: ViewChild,\n                args: [MatFormFieldNotchedOutline]\n            }], _lineRipple: [{\n                type: ViewChild,\n                args: [MatFormFieldLineRipple]\n            }], _formFieldControl: [{\n                type: ContentChild,\n                args: [MatFormFieldControl]\n            }], _prefixChildren: [{\n                type: ContentChildren,\n                args: [MAT_PREFIX, { descendants: true }]\n            }], _suffixChildren: [{\n                type: ContentChildren,\n                args: [MAT_SUFFIX, { descendants: true }]\n            }], _errorChildren: [{\n                type: ContentChildren,\n                args: [MAT_ERROR, { descendants: true }]\n            }], _hintChildren: [{\n                type: ContentChildren,\n                args: [MatHint, { descendants: true }]\n            }], hideRequiredMarker: [{\n                type: Input\n            }], color: [{\n                type: Input\n            }], floatLabel: [{\n                type: Input\n            }], appearance: [{\n                type: Input\n            }], subscriptSizing: [{\n                type: Input\n            }], hintLabel: [{\n                type: Input\n            }] } });\n\nclass MatFormFieldModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormFieldModule, imports: [MatCommonModule,\n            ObserversModule,\n            MatFormField,\n            MatLabel,\n            MatError,\n            MatHint,\n            MatPrefix,\n            MatSuffix], exports: [MatFormField, MatLabel, MatHint, MatError, MatPrefix, MatSuffix, MatCommonModule] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormFieldModule, imports: [MatCommonModule,\n            ObserversModule, MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFormFieldModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [\n                        MatCommonModule,\n                        ObserversModule,\n                        MatFormField,\n                        MatLabel,\n                        MatError,\n                        MatHint,\n                        MatPrefix,\n                        MatSuffix,\n                    ],\n                    exports: [MatFormField, MatLabel, MatHint, MatError, MatPrefix, MatSuffix, MatCommonModule],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_ERROR, MAT_FORM_FIELD, MAT_FORM_FIELD_DEFAULT_OPTIONS, MAT_PREFIX, MAT_SUFFIX, MatError, MatFormField, MatFormFieldControl, MatFormFieldModule, MatHint, MatLabel, MatPrefix, MatSuffix, getMatFormFieldDuplicatedHintError, getMatFormFieldMissingControlError, getMatFormFieldPlaceholderConflictError, matFormFieldAnimations };\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function pairwise() {\n    return operate((source, subscriber) => {\n        let prev;\n        let hasPrev = false;\n        source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n            const p = prev;\n            prev = value;\n            hasPrev && subscriber.next([p, value]);\n            hasPrev = true;\n        }));\n    });\n}\n","import { normalizePassiveListenerOptions, Platform } from '@angular/cdk/platform';\nimport * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, inject, NgZone, Injectable, ElementRef, EventEmitter, Directive, Output, Renderer2, booleanAttribute, Input, NgModule } from '@angular/core';\nimport { _CdkPrivateStyleLoader } from '@angular/cdk/private';\nimport { coerceElement, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { EMPTY, Subject, fromEvent } from 'rxjs';\nimport { DOCUMENT } from '@angular/common';\nimport { auditTime, takeUntil } from 'rxjs/operators';\n\n/** Component used to load the structural styles of the text field. */\nclass _CdkTextFieldStyleLoader {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _CdkTextFieldStyleLoader, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: _CdkTextFieldStyleLoader, isStandalone: true, selector: \"ng-component\", host: { attributes: { \"cdk-text-field-style-loader\": \"\" } }, ngImport: i0, template: '', isInline: true, styles: [\"textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _CdkTextFieldStyleLoader, decorators: [{\n            type: Component,\n            args: [{ template: '', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'cdk-text-field-style-loader': '' }, styles: [\"textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}\"] }]\n        }] });\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = normalizePassiveListenerOptions({ passive: true });\n/**\n * An injectable service that can be used to monitor the autofill state of an input.\n * Based on the following blog post:\n * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n */\nclass AutofillMonitor {\n    _platform = inject(Platform);\n    _ngZone = inject(NgZone);\n    _styleLoader = inject(_CdkPrivateStyleLoader);\n    _monitoredElements = new Map();\n    constructor() { }\n    monitor(elementOrRef) {\n        if (!this._platform.isBrowser) {\n            return EMPTY;\n        }\n        this._styleLoader.load(_CdkTextFieldStyleLoader);\n        const element = coerceElement(elementOrRef);\n        const info = this._monitoredElements.get(element);\n        if (info) {\n            return info.subject;\n        }\n        const result = new Subject();\n        const cssClass = 'cdk-text-field-autofilled';\n        const listener = ((event) => {\n            // Animation events fire on initial element render, we check for the presence of the autofill\n            // CSS class to make sure this is a real change in state, not just the initial render before\n            // we fire off events.\n            if (event.animationName === 'cdk-text-field-autofill-start' &&\n                !element.classList.contains(cssClass)) {\n                element.classList.add(cssClass);\n                this._ngZone.run(() => result.next({ target: event.target, isAutofilled: true }));\n            }\n            else if (event.animationName === 'cdk-text-field-autofill-end' &&\n                element.classList.contains(cssClass)) {\n                element.classList.remove(cssClass);\n                this._ngZone.run(() => result.next({ target: event.target, isAutofilled: false }));\n            }\n        });\n        this._ngZone.runOutsideAngular(() => {\n            element.addEventListener('animationstart', listener, listenerOptions);\n            element.classList.add('cdk-text-field-autofill-monitored');\n        });\n        this._monitoredElements.set(element, {\n            subject: result,\n            unlisten: () => {\n                element.removeEventListener('animationstart', listener, listenerOptions);\n            },\n        });\n        return result;\n    }\n    stopMonitoring(elementOrRef) {\n        const element = coerceElement(elementOrRef);\n        const info = this._monitoredElements.get(element);\n        if (info) {\n            info.unlisten();\n            info.subject.complete();\n            element.classList.remove('cdk-text-field-autofill-monitored');\n            element.classList.remove('cdk-text-field-autofilled');\n            this._monitoredElements.delete(element);\n        }\n    }\n    ngOnDestroy() {\n        this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: AutofillMonitor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: AutofillMonitor, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: AutofillMonitor, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n/** A directive that can be used to monitor the autofill state of an input. */\nclass CdkAutofill {\n    _elementRef = inject(ElementRef);\n    _autofillMonitor = inject(AutofillMonitor);\n    /** Emits when the autofill state of the element changes. */\n    cdkAutofill = new EventEmitter();\n    constructor() { }\n    ngOnInit() {\n        this._autofillMonitor\n            .monitor(this._elementRef)\n            .subscribe(event => this.cdkAutofill.emit(event));\n    }\n    ngOnDestroy() {\n        this._autofillMonitor.stopMonitoring(this._elementRef);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkAutofill, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkAutofill, isStandalone: true, selector: \"[cdkAutofill]\", outputs: { cdkAutofill: \"cdkAutofill\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkAutofill, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkAutofill]',\n                }]\n        }], ctorParameters: () => [], propDecorators: { cdkAutofill: [{\n                type: Output\n            }] } });\n\n/** Directive to automatically resize a textarea to fit its content. */\nclass CdkTextareaAutosize {\n    _elementRef = inject(ElementRef);\n    _platform = inject(Platform);\n    _ngZone = inject(NgZone);\n    _renderer = inject(Renderer2);\n    /** Keep track of the previous textarea value to avoid resizing when the value hasn't changed. */\n    _previousValue;\n    _initialHeight;\n    _destroyed = new Subject();\n    _listenerCleanups;\n    _minRows;\n    _maxRows;\n    _enabled = true;\n    /**\n     * Value of minRows as of last resize. If the minRows has decreased, the\n     * height of the textarea needs to be recomputed to reflect the new minimum. The maxHeight\n     * does not have the same problem because it does not affect the textarea's scrollHeight.\n     */\n    _previousMinRows = -1;\n    _textareaElement;\n    /** Minimum amount of rows in the textarea. */\n    get minRows() {\n        return this._minRows;\n    }\n    set minRows(value) {\n        this._minRows = coerceNumberProperty(value);\n        this._setMinHeight();\n    }\n    /** Maximum amount of rows in the textarea. */\n    get maxRows() {\n        return this._maxRows;\n    }\n    set maxRows(value) {\n        this._maxRows = coerceNumberProperty(value);\n        this._setMaxHeight();\n    }\n    /** Whether autosizing is enabled or not */\n    get enabled() {\n        return this._enabled;\n    }\n    set enabled(value) {\n        // Only act if the actual value changed. This specifically helps to not run\n        // resizeToFitContent too early (i.e. before ngAfterViewInit)\n        if (this._enabled !== value) {\n            (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();\n        }\n    }\n    get placeholder() {\n        return this._textareaElement.placeholder;\n    }\n    set placeholder(value) {\n        this._cachedPlaceholderHeight = undefined;\n        if (value) {\n            this._textareaElement.setAttribute('placeholder', value);\n        }\n        else {\n            this._textareaElement.removeAttribute('placeholder');\n        }\n        this._cacheTextareaPlaceholderHeight();\n    }\n    /** Cached height of a textarea with a single row. */\n    _cachedLineHeight;\n    /** Cached height of a textarea with only the placeholder. */\n    _cachedPlaceholderHeight;\n    /** Used to reference correct document/window */\n    _document = inject(DOCUMENT, { optional: true });\n    _hasFocus;\n    _isViewInited = false;\n    constructor() {\n        const styleLoader = inject(_CdkPrivateStyleLoader);\n        styleLoader.load(_CdkTextFieldStyleLoader);\n        this._textareaElement = this._elementRef.nativeElement;\n    }\n    /** Sets the minimum height of the textarea as determined by minRows. */\n    _setMinHeight() {\n        const minHeight = this.minRows && this._cachedLineHeight ? `${this.minRows * this._cachedLineHeight}px` : null;\n        if (minHeight) {\n            this._textareaElement.style.minHeight = minHeight;\n        }\n    }\n    /** Sets the maximum height of the textarea as determined by maxRows. */\n    _setMaxHeight() {\n        const maxHeight = this.maxRows && this._cachedLineHeight ? `${this.maxRows * this._cachedLineHeight}px` : null;\n        if (maxHeight) {\n            this._textareaElement.style.maxHeight = maxHeight;\n        }\n    }\n    ngAfterViewInit() {\n        if (this._platform.isBrowser) {\n            // Remember the height which we started with in case autosizing is disabled\n            this._initialHeight = this._textareaElement.style.height;\n            this.resizeToFitContent();\n            this._ngZone.runOutsideAngular(() => {\n                const window = this._getWindow();\n                fromEvent(window, 'resize')\n                    .pipe(auditTime(16), takeUntil(this._destroyed))\n                    .subscribe(() => this.resizeToFitContent(true));\n                this._listenerCleanups = [\n                    this._renderer.listen(this._textareaElement, 'focus', this._handleFocusEvent),\n                    this._renderer.listen(this._textareaElement, 'blur', this._handleFocusEvent),\n                ];\n            });\n            this._isViewInited = true;\n            this.resizeToFitContent(true);\n        }\n    }\n    ngOnDestroy() {\n        this._listenerCleanups?.forEach(cleanup => cleanup());\n        this._destroyed.next();\n        this._destroyed.complete();\n    }\n    /**\n     * Cache the height of a single-row textarea if it has not already been cached.\n     *\n     * We need to know how large a single \"row\" of a textarea is in order to apply minRows and\n     * maxRows. For the initial version, we will assume that the height of a single line in the\n     * textarea does not ever change.\n     */\n    _cacheTextareaLineHeight() {\n        if (this._cachedLineHeight) {\n            return;\n        }\n        // Use a clone element because we have to override some styles.\n        let textareaClone = this._textareaElement.cloneNode(false);\n        textareaClone.rows = 1;\n        // Use `position: absolute` so that this doesn't cause a browser layout and use\n        // `visibility: hidden` so that nothing is rendered. Clear any other styles that\n        // would affect the height.\n        textareaClone.style.position = 'absolute';\n        textareaClone.style.visibility = 'hidden';\n        textareaClone.style.border = 'none';\n        textareaClone.style.padding = '0';\n        textareaClone.style.height = '';\n        textareaClone.style.minHeight = '';\n        textareaClone.style.maxHeight = '';\n        // In Firefox it happens that textarea elements are always bigger than the specified amount\n        // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.\n        // As a workaround that removes the extra space for the scrollbar, we can just set overflow\n        // to hidden. This ensures that there is no invalid calculation of the line height.\n        // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654\n        textareaClone.style.overflow = 'hidden';\n        this._textareaElement.parentNode.appendChild(textareaClone);\n        this._cachedLineHeight = textareaClone.clientHeight;\n        textareaClone.remove();\n        // Min and max heights have to be re-calculated if the cached line height changes\n        this._setMinHeight();\n        this._setMaxHeight();\n    }\n    _measureScrollHeight() {\n        const element = this._textareaElement;\n        const previousMargin = element.style.marginBottom || '';\n        const isFirefox = this._platform.FIREFOX;\n        const needsMarginFiller = isFirefox && this._hasFocus;\n        const measuringClass = isFirefox\n            ? 'cdk-textarea-autosize-measuring-firefox'\n            : 'cdk-textarea-autosize-measuring';\n        // In some cases the page might move around while we're measuring the `textarea` on Firefox. We\n        // work around it by assigning a temporary margin with the same height as the `textarea` so that\n        // it occupies the same amount of space. See #23233.\n        if (needsMarginFiller) {\n            element.style.marginBottom = `${element.clientHeight}px`;\n        }\n        // Reset the textarea height to auto in order to shrink back to its default size.\n        // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.\n        element.classList.add(measuringClass);\n        // The measuring class includes a 2px padding to workaround an issue with Chrome,\n        // so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n        const scrollHeight = element.scrollHeight - 4;\n        element.classList.remove(measuringClass);\n        if (needsMarginFiller) {\n            element.style.marginBottom = previousMargin;\n        }\n        return scrollHeight;\n    }\n    _cacheTextareaPlaceholderHeight() {\n        if (!this._isViewInited || this._cachedPlaceholderHeight != undefined) {\n            return;\n        }\n        if (!this.placeholder) {\n            this._cachedPlaceholderHeight = 0;\n            return;\n        }\n        const value = this._textareaElement.value;\n        this._textareaElement.value = this._textareaElement.placeholder;\n        this._cachedPlaceholderHeight = this._measureScrollHeight();\n        this._textareaElement.value = value;\n    }\n    /** Handles `focus` and `blur` events. */\n    _handleFocusEvent = (event) => {\n        this._hasFocus = event.type === 'focus';\n    };\n    ngDoCheck() {\n        if (this._platform.isBrowser) {\n            this.resizeToFitContent();\n        }\n    }\n    /**\n     * Resize the textarea to fit its content.\n     * @param force Whether to force a height recalculation. By default the height will be\n     *    recalculated only if the value changed since the last call.\n     */\n    resizeToFitContent(force = false) {\n        // If autosizing is disabled, just skip everything else\n        if (!this._enabled) {\n            return;\n        }\n        this._cacheTextareaLineHeight();\n        this._cacheTextareaPlaceholderHeight();\n        // If we haven't determined the line-height yet, we know we're still hidden and there's no point\n        // in checking the height of the textarea.\n        if (!this._cachedLineHeight) {\n            return;\n        }\n        const textarea = this._elementRef.nativeElement;\n        const value = textarea.value;\n        // Only resize if the value or minRows have changed since these calculations can be expensive.\n        if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {\n            return;\n        }\n        const scrollHeight = this._measureScrollHeight();\n        const height = Math.max(scrollHeight, this._cachedPlaceholderHeight || 0);\n        // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.\n        textarea.style.height = `${height}px`;\n        this._ngZone.runOutsideAngular(() => {\n            if (typeof requestAnimationFrame !== 'undefined') {\n                requestAnimationFrame(() => this._scrollToCaretPosition(textarea));\n            }\n            else {\n                setTimeout(() => this._scrollToCaretPosition(textarea));\n            }\n        });\n        this._previousValue = value;\n        this._previousMinRows = this._minRows;\n    }\n    /**\n     * Resets the textarea to its original size\n     */\n    reset() {\n        // Do not try to change the textarea, if the initialHeight has not been determined yet\n        // This might potentially remove styles when reset() is called before ngAfterViewInit\n        if (this._initialHeight !== undefined) {\n            this._textareaElement.style.height = this._initialHeight;\n        }\n    }\n    _noopInputHandler() {\n        // no-op handler that ensures we're running change detection on input events.\n    }\n    /** Access injected document if available or fallback to global document reference */\n    _getDocument() {\n        return this._document || document;\n    }\n    /** Use defaultView of injected document if available or fallback to global window reference */\n    _getWindow() {\n        const doc = this._getDocument();\n        return doc.defaultView || window;\n    }\n    /**\n     * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n     * prevent it from scrolling to the caret position. We need to re-set the selection\n     * in order for it to scroll to the proper position.\n     */\n    _scrollToCaretPosition(textarea) {\n        const { selectionStart, selectionEnd } = textarea;\n        // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n        // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n        // between the time we requested the animation frame and when it was executed.\n        // Also note that we have to assert that the textarea is focused before we set the\n        // selection range. Setting the selection range on a non-focused textarea will cause\n        // it to receive focus on IE and Edge.\n        if (!this._destroyed.isStopped && this._hasFocus) {\n            textarea.setSelectionRange(selectionStart, selectionEnd);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkTextareaAutosize, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: CdkTextareaAutosize, isStandalone: true, selector: \"textarea[cdkTextareaAutosize]\", inputs: { minRows: [\"cdkAutosizeMinRows\", \"minRows\"], maxRows: [\"cdkAutosizeMaxRows\", \"maxRows\"], enabled: [\"cdkTextareaAutosize\", \"enabled\", booleanAttribute], placeholder: \"placeholder\" }, host: { attributes: { \"rows\": \"1\" }, listeners: { \"input\": \"_noopInputHandler()\" }, classAttribute: \"cdk-textarea-autosize\" }, exportAs: [\"cdkTextareaAutosize\"], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkTextareaAutosize, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'textarea[cdkTextareaAutosize]',\n                    exportAs: 'cdkTextareaAutosize',\n                    host: {\n                        'class': 'cdk-textarea-autosize',\n                        // Textarea elements that have the directive applied should have a single row by default.\n                        // Browsers normally show two rows by default and therefore this limits the minRows binding.\n                        'rows': '1',\n                        '(input)': '_noopInputHandler()',\n                    },\n                }]\n        }], ctorParameters: () => [], propDecorators: { minRows: [{\n                type: Input,\n                args: ['cdkAutosizeMinRows']\n            }], maxRows: [{\n                type: Input,\n                args: ['cdkAutosizeMaxRows']\n            }], enabled: [{\n                type: Input,\n                args: [{ alias: 'cdkTextareaAutosize', transform: booleanAttribute }]\n            }], placeholder: [{\n                type: Input\n            }] } });\n\nclass TextFieldModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: TextFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: TextFieldModule, imports: [CdkAutofill, CdkTextareaAutosize], exports: [CdkAutofill, CdkTextareaAutosize] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: TextFieldModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: TextFieldModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [CdkAutofill, CdkTextareaAutosize],\n                    exports: [CdkAutofill, CdkTextareaAutosize],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AutofillMonitor, CdkAutofill, CdkTextareaAutosize, TextFieldModule };\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Platform, getSupportedInputTypes } from '@angular/cdk/platform';\nimport { AutofillMonitor, TextFieldModule } from '@angular/cdk/text-field';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, inject, ElementRef, NgZone, Renderer2, isSignal, effect, booleanAttribute, Directive, Input, NgModule } from '@angular/core';\nimport { _IdGenerator } from '@angular/cdk/a11y';\nimport { NgControl, Validators, NgForm, FormGroupDirective } from '@angular/forms';\nimport { ErrorStateMatcher, _ErrorStateTracker, MatCommonModule } from '@angular/material/core';\nimport { MAT_FORM_FIELD, MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nexport { MatError, MatFormField, MatHint, MatLabel, MatPrefix, MatSuffix } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\n\n/** @docs-private */\nfunction getMatInputUnsupportedTypeError(type) {\n    return Error(`Input type \"${type}\" isn't supported by matInput.`);\n}\n\n/**\n * This token is used to inject the object whose value should be set into `MatInput`. If none is\n * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide\n * themselves for this token, in order to make `MatInput` delegate the getting and setting of the\n * value to them.\n */\nconst MAT_INPUT_VALUE_ACCESSOR = new InjectionToken('MAT_INPUT_VALUE_ACCESSOR');\n\n// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.\nconst MAT_INPUT_INVALID_TYPES = [\n    'button',\n    'checkbox',\n    'file',\n    'hidden',\n    'image',\n    'radio',\n    'range',\n    'reset',\n    'submit',\n];\n/** Injection token that can be used to provide the default options for the input. */\nconst MAT_INPUT_CONFIG = new InjectionToken('MAT_INPUT_CONFIG');\nclass MatInput {\n    _elementRef = inject(ElementRef);\n    _platform = inject(Platform);\n    ngControl = inject(NgControl, { optional: true, self: true });\n    _autofillMonitor = inject(AutofillMonitor);\n    _ngZone = inject(NgZone);\n    _formField = inject(MAT_FORM_FIELD, { optional: true });\n    _renderer = inject(Renderer2);\n    _uid = inject(_IdGenerator).getId('mat-input-');\n    _previousNativeValue;\n    _inputValueAccessor;\n    _signalBasedValueAccessor;\n    _previousPlaceholder;\n    _errorStateTracker;\n    _config = inject(MAT_INPUT_CONFIG, { optional: true });\n    _cleanupIosKeyup;\n    _cleanupWebkitWheel;\n    /** `aria-describedby` IDs assigned by the form field. */\n    _formFieldDescribedBy;\n    /** Whether the component is being rendered on the server. */\n    _isServer;\n    /** Whether the component is a native html select. */\n    _isNativeSelect;\n    /** Whether the component is a textarea. */\n    _isTextarea;\n    /** Whether the input is inside of a form field. */\n    _isInFormField;\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    focused = false;\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    stateChanges = new Subject();\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    controlType = 'mat-input';\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    autofilled = false;\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    get disabled() {\n        return this._disabled;\n    }\n    set disabled(value) {\n        this._disabled = coerceBooleanProperty(value);\n        // Browsers may not fire the blur event if the input is disabled too quickly.\n        // Reset from here to ensure that the element doesn't become stuck.\n        if (this.focused) {\n            this.focused = false;\n            this.stateChanges.next();\n        }\n    }\n    _disabled = false;\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    get id() {\n        return this._id;\n    }\n    set id(value) {\n        this._id = value || this._uid;\n    }\n    _id;\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    placeholder;\n    /**\n     * Name of the input.\n     * @docs-private\n     */\n    name;\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    get required() {\n        return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n    }\n    set required(value) {\n        this._required = coerceBooleanProperty(value);\n    }\n    _required;\n    /** Input type of the element. */\n    get type() {\n        return this._type;\n    }\n    set type(value) {\n        const prevType = this._type;\n        this._type = value || 'text';\n        this._validateType();\n        // When using Angular inputs, developers are no longer able to set the properties on the native\n        // input element. To ensure that bindings for `type` work, we need to sync the setter\n        // with the native property. Textarea elements don't support the type property or attribute.\n        if (!this._isTextarea && getSupportedInputTypes().has(this._type)) {\n            this._elementRef.nativeElement.type = this._type;\n        }\n        if (this._type !== prevType) {\n            this._ensureWheelDefaultBehavior();\n        }\n    }\n    _type = 'text';\n    /** An object used to control when error messages are shown. */\n    get errorStateMatcher() {\n        return this._errorStateTracker.matcher;\n    }\n    set errorStateMatcher(value) {\n        this._errorStateTracker.matcher = value;\n    }\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    userAriaDescribedBy;\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    get value() {\n        return this._signalBasedValueAccessor\n            ? this._signalBasedValueAccessor.value()\n            : this._inputValueAccessor.value;\n    }\n    set value(value) {\n        if (value !== this.value) {\n            if (this._signalBasedValueAccessor) {\n                this._signalBasedValueAccessor.value.set(value);\n            }\n            else {\n                this._inputValueAccessor.value = value;\n            }\n            this.stateChanges.next();\n        }\n    }\n    /** Whether the element is readonly. */\n    get readonly() {\n        return this._readonly;\n    }\n    set readonly(value) {\n        this._readonly = coerceBooleanProperty(value);\n    }\n    _readonly = false;\n    /** Whether the input should remain interactive when it is disabled. */\n    disabledInteractive;\n    /** Whether the input is in an error state. */\n    get errorState() {\n        return this._errorStateTracker.errorState;\n    }\n    set errorState(value) {\n        this._errorStateTracker.errorState = value;\n    }\n    _neverEmptyInputTypes = [\n        'date',\n        'datetime',\n        'datetime-local',\n        'month',\n        'time',\n        'week',\n    ].filter(t => getSupportedInputTypes().has(t));\n    constructor() {\n        const parentForm = inject(NgForm, { optional: true });\n        const parentFormGroup = inject(FormGroupDirective, { optional: true });\n        const defaultErrorStateMatcher = inject(ErrorStateMatcher);\n        const accessor = inject(MAT_INPUT_VALUE_ACCESSOR, { optional: true, self: true });\n        const element = this._elementRef.nativeElement;\n        const nodeName = element.nodeName.toLowerCase();\n        if (accessor) {\n            if (isSignal(accessor.value)) {\n                this._signalBasedValueAccessor = accessor;\n            }\n            else {\n                this._inputValueAccessor = accessor;\n            }\n        }\n        else {\n            // If no input value accessor was explicitly specified, use the element as the input value\n            // accessor.\n            this._inputValueAccessor = element;\n        }\n        this._previousNativeValue = this.value;\n        // Force setter to be called in case id was not specified.\n        this.id = this.id;\n        // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n        // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n        // exists on iOS, we only bother to install the listener on iOS.\n        if (this._platform.IOS) {\n            this._ngZone.runOutsideAngular(() => {\n                this._cleanupIosKeyup = this._renderer.listen(element, 'keyup', this._iOSKeyupListener);\n            });\n        }\n        this._errorStateTracker = new _ErrorStateTracker(defaultErrorStateMatcher, this.ngControl, parentFormGroup, parentForm, this.stateChanges);\n        this._isServer = !this._platform.isBrowser;\n        this._isNativeSelect = nodeName === 'select';\n        this._isTextarea = nodeName === 'textarea';\n        this._isInFormField = !!this._formField;\n        this.disabledInteractive = this._config?.disabledInteractive || false;\n        if (this._isNativeSelect) {\n            this.controlType = element.multiple\n                ? 'mat-native-select-multiple'\n                : 'mat-native-select';\n        }\n        if (this._signalBasedValueAccessor) {\n            effect(() => {\n                // Read the value so the effect can register the dependency.\n                this._signalBasedValueAccessor.value();\n                this.stateChanges.next();\n            });\n        }\n    }\n    ngAfterViewInit() {\n        if (this._platform.isBrowser) {\n            this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {\n                this.autofilled = event.isAutofilled;\n                this.stateChanges.next();\n            });\n        }\n    }\n    ngOnChanges() {\n        this.stateChanges.next();\n    }\n    ngOnDestroy() {\n        this.stateChanges.complete();\n        if (this._platform.isBrowser) {\n            this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n        }\n        this._cleanupIosKeyup?.();\n        this._cleanupWebkitWheel?.();\n    }\n    ngDoCheck() {\n        if (this.ngControl) {\n            // We need to re-evaluate this on every change detection cycle, because there are some\n            // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n            // that whatever logic is in here has to be super lean or we risk destroying the performance.\n            this.updateErrorState();\n            // Since the input isn't a `ControlValueAccessor`, we don't have a good way of knowing when\n            // the disabled state has changed. We can't use the `ngControl.statusChanges`, because it\n            // won't fire if the input is disabled with `emitEvents = false`, despite the input becoming\n            // disabled.\n            if (this.ngControl.disabled !== null && this.ngControl.disabled !== this.disabled) {\n                this.disabled = this.ngControl.disabled;\n                this.stateChanges.next();\n            }\n        }\n        // We need to dirty-check the native element's value, because there are some cases where\n        // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n        // updating the value using `emitEvent: false`).\n        this._dirtyCheckNativeValue();\n        // We need to dirty-check and set the placeholder attribute ourselves, because whether it's\n        // present or not depends on a query which is prone to \"changed after checked\" errors.\n        this._dirtyCheckPlaceholder();\n    }\n    /** Focuses the input. */\n    focus(options) {\n        this._elementRef.nativeElement.focus(options);\n    }\n    /** Refreshes the error state of the input. */\n    updateErrorState() {\n        this._errorStateTracker.updateErrorState();\n    }\n    /** Callback for the cases where the focused state of the input changes. */\n    _focusChanged(isFocused) {\n        if (isFocused === this.focused) {\n            return;\n        }\n        if (!this._isNativeSelect && isFocused && this.disabled && this.disabledInteractive) {\n            const element = this._elementRef.nativeElement;\n            // Focusing an input that has text will cause all the text to be selected. Clear it since\n            // the user won't be able to change it. This is based on the internal implementation.\n            if (element.type === 'number') {\n                // setSelectionRange doesn't work on number inputs so it needs to be set briefly to text.\n                element.type = 'text';\n                element.setSelectionRange(0, 0);\n                element.type = 'number';\n            }\n            else {\n                element.setSelectionRange(0, 0);\n            }\n        }\n        this.focused = isFocused;\n        this.stateChanges.next();\n    }\n    _onInput() {\n        // This is a noop function and is used to let Angular know whenever the value changes.\n        // Angular will run a new change detection each time the `input` event has been dispatched.\n        // It's necessary that Angular recognizes the value change, because when floatingLabel\n        // is set to false and Angular forms aren't used, the placeholder won't recognize the\n        // value changes and will not disappear.\n        // Listening to the input event wouldn't be necessary when the input is using the\n        // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.\n    }\n    /** Does some manual dirty checking on the native input `value` property. */\n    _dirtyCheckNativeValue() {\n        const newValue = this._elementRef.nativeElement.value;\n        if (this._previousNativeValue !== newValue) {\n            this._previousNativeValue = newValue;\n            this.stateChanges.next();\n        }\n    }\n    /** Does some manual dirty checking on the native input `placeholder` attribute. */\n    _dirtyCheckPlaceholder() {\n        const placeholder = this._getPlaceholder();\n        if (placeholder !== this._previousPlaceholder) {\n            const element = this._elementRef.nativeElement;\n            this._previousPlaceholder = placeholder;\n            placeholder\n                ? element.setAttribute('placeholder', placeholder)\n                : element.removeAttribute('placeholder');\n        }\n    }\n    /** Gets the current placeholder of the form field. */\n    _getPlaceholder() {\n        return this.placeholder || null;\n    }\n    /** Make sure the input is a supported type. */\n    _validateType() {\n        if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1 &&\n            (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getMatInputUnsupportedTypeError(this._type);\n        }\n    }\n    /** Checks whether the input type is one of the types that are never empty. */\n    _isNeverEmpty() {\n        return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n    }\n    /** Checks whether the input is invalid based on the native validation. */\n    _isBadInput() {\n        // The `validity` property won't be present on platform-server.\n        let validity = this._elementRef.nativeElement.validity;\n        return validity && validity.badInput;\n    }\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    get empty() {\n        return (!this._isNeverEmpty() &&\n            !this._elementRef.nativeElement.value &&\n            !this._isBadInput() &&\n            !this.autofilled);\n    }\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    get shouldLabelFloat() {\n        if (this._isNativeSelect) {\n            // For a single-selection `<select>`, the label should float when the selected option has\n            // a non-empty display value. For a `<select multiple>`, the label *always* floats to avoid\n            // overlapping the label with the options.\n            const selectElement = this._elementRef.nativeElement;\n            const firstOption = selectElement.options[0];\n            // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be\n            // -1 if the `value` is set to something, that isn't in the list of options, at a later point.\n            return (this.focused ||\n                selectElement.multiple ||\n                !this.empty ||\n                !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label));\n        }\n        else {\n            return (this.focused && !this.disabled) || !this.empty;\n        }\n    }\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    setDescribedByIds(ids) {\n        const element = this._elementRef.nativeElement;\n        const existingDescribedBy = element.getAttribute('aria-describedby');\n        let toAssign;\n        // In some cases there might be some `aria-describedby` IDs that were assigned directly,\n        // like by the `AriaDescriber` (see #30011). Attempt to preserve them by taking the previous\n        // attribute value and filtering out the IDs that came from the previous `setDescribedByIds`\n        // call. Note the `|| ids` here allows us to avoid duplicating IDs on the first render.\n        if (existingDescribedBy) {\n            const exclude = this._formFieldDescribedBy || ids;\n            toAssign = ids.concat(existingDescribedBy.split(' ').filter(id => id && !exclude.includes(id)));\n        }\n        else {\n            toAssign = ids;\n        }\n        this._formFieldDescribedBy = ids;\n        if (toAssign.length) {\n            element.setAttribute('aria-describedby', toAssign.join(' '));\n        }\n        else {\n            element.removeAttribute('aria-describedby');\n        }\n    }\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    onContainerClick() {\n        // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n        // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n        // \"minutes\" field was actually clicked. See: https://github.com/angular/components/issues/12849\n        if (!this.focused) {\n            this.focus();\n        }\n    }\n    /** Whether the form control is a native select that is displayed inline. */\n    _isInlineSelect() {\n        const element = this._elementRef.nativeElement;\n        return this._isNativeSelect && (element.multiple || element.size > 1);\n    }\n    _iOSKeyupListener = (event) => {\n        const el = event.target;\n        // Note: We specifically check for 0, rather than `!el.selectionStart`, because the two\n        // indicate different things. If the value is 0, it means that the caret is at the start\n        // of the input, whereas a value of `null` means that the input doesn't support\n        // manipulating the selection range. Inputs that don't support setting the selection range\n        // will throw an error so we want to avoid calling `setSelectionRange` on them. See:\n        // https://html.spec.whatwg.org/multipage/input.html#do-not-apply\n        if (!el.value && el.selectionStart === 0 && el.selectionEnd === 0) {\n            // Note: Just setting `0, 0` doesn't fix the issue. Setting\n            // `1, 1` fixes it for the first time that you type text and\n            // then hold delete. Toggling to `1, 1` and then back to\n            // `0, 0` seems to completely fix it.\n            el.setSelectionRange(1, 1);\n            el.setSelectionRange(0, 0);\n        }\n    };\n    _webkitBlinkWheelListener = () => {\n        // This is a noop function and is used to enable mouse wheel input\n        // on number inputs\n        // on blink and webkit browsers.\n    };\n    /**\n     * In blink and webkit browsers a focused number input does not increment or decrement its value\n     * on mouse wheel interaction unless a wheel event listener is attached to it or one of its\n     * ancestors or a passive wheel listener is attached somewhere in the DOM. For example: Hitting\n     * a tooltip once enables the mouse wheel input for all number inputs as long as it exists. In\n     * order to get reliable and intuitive behavior we apply a wheel event on our own thus making\n     * sure increment and decrement by mouse wheel works every time.\n     * @docs-private\n     */\n    _ensureWheelDefaultBehavior() {\n        this._cleanupWebkitWheel?.();\n        if (this._type === 'number' && (this._platform.BLINK || this._platform.WEBKIT)) {\n            this._cleanupWebkitWheel = this._renderer.listen(this._elementRef.nativeElement, 'wheel', this._webkitBlinkWheelListener);\n        }\n    }\n    /** Gets the value to set on the `readonly` attribute. */\n    _getReadonlyAttribute() {\n        if (this._isNativeSelect) {\n            return null;\n        }\n        if (this.readonly || (this.disabled && this.disabledInteractive)) {\n            return 'true';\n        }\n        return null;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatInput, isStandalone: true, selector: \"input[matInput], textarea[matInput], select[matNativeControl],\\n      input[matNativeControl], textarea[matNativeControl]\", inputs: { disabled: \"disabled\", id: \"id\", placeholder: \"placeholder\", name: \"name\", required: \"required\", type: \"type\", errorStateMatcher: \"errorStateMatcher\", userAriaDescribedBy: [\"aria-describedby\", \"userAriaDescribedBy\"], value: \"value\", readonly: \"readonly\", disabledInteractive: [\"disabledInteractive\", \"disabledInteractive\", booleanAttribute] }, host: { listeners: { \"focus\": \"_focusChanged(true)\", \"blur\": \"_focusChanged(false)\", \"input\": \"_onInput()\" }, properties: { \"class.mat-input-server\": \"_isServer\", \"class.mat-mdc-form-field-textarea-control\": \"_isInFormField && _isTextarea\", \"class.mat-mdc-form-field-input-control\": \"_isInFormField\", \"class.mat-mdc-input-disabled-interactive\": \"disabledInteractive\", \"class.mdc-text-field__input\": \"_isInFormField\", \"class.mat-mdc-native-select-inline\": \"_isInlineSelect()\", \"id\": \"id\", \"disabled\": \"disabled && !disabledInteractive\", \"required\": \"required\", \"attr.name\": \"name || null\", \"attr.readonly\": \"_getReadonlyAttribute()\", \"attr.aria-disabled\": \"disabled && disabledInteractive ? \\\"true\\\" : null\", \"attr.aria-invalid\": \"(empty && required) ? null : errorState\", \"attr.aria-required\": \"required\", \"attr.id\": \"id\" }, classAttribute: \"mat-mdc-input-element\" }, providers: [{ provide: MatFormFieldControl, useExisting: MatInput }], exportAs: [\"matInput\"], usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatInput, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: `input[matInput], textarea[matInput], select[matNativeControl],\n      input[matNativeControl], textarea[matNativeControl]`,\n                    exportAs: 'matInput',\n                    host: {\n                        'class': 'mat-mdc-input-element',\n                        // The BaseMatInput parent class adds `mat-input-element`, `mat-form-field-control` and\n                        // `mat-form-field-autofill-control` to the CSS class list, but this should not be added for\n                        // this MDC equivalent input.\n                        '[class.mat-input-server]': '_isServer',\n                        '[class.mat-mdc-form-field-textarea-control]': '_isInFormField && _isTextarea',\n                        '[class.mat-mdc-form-field-input-control]': '_isInFormField',\n                        '[class.mat-mdc-input-disabled-interactive]': 'disabledInteractive',\n                        '[class.mdc-text-field__input]': '_isInFormField',\n                        '[class.mat-mdc-native-select-inline]': '_isInlineSelect()',\n                        // Native input properties that are overwritten by Angular inputs need to be synced with\n                        // the native input element. Otherwise property bindings for those don't work.\n                        '[id]': 'id',\n                        '[disabled]': 'disabled && !disabledInteractive',\n                        '[required]': 'required',\n                        '[attr.name]': 'name || null',\n                        '[attr.readonly]': '_getReadonlyAttribute()',\n                        '[attr.aria-disabled]': 'disabled && disabledInteractive ? \"true\" : null',\n                        // Only mark the input as invalid for assistive technology if it has a value since the\n                        // state usually overlaps with `aria-required` when the input is empty and can be redundant.\n                        '[attr.aria-invalid]': '(empty && required) ? null : errorState',\n                        '[attr.aria-required]': 'required',\n                        // Native input properties that are overwritten by Angular inputs need to be synced with\n                        // the native input element. Otherwise property bindings for those don't work.\n                        '[attr.id]': 'id',\n                        '(focus)': '_focusChanged(true)',\n                        '(blur)': '_focusChanged(false)',\n                        '(input)': '_onInput()',\n                    },\n                    providers: [{ provide: MatFormFieldControl, useExisting: MatInput }],\n                }]\n        }], ctorParameters: () => [], propDecorators: { disabled: [{\n                type: Input\n            }], id: [{\n                type: Input\n            }], placeholder: [{\n                type: Input\n            }], name: [{\n                type: Input\n            }], required: [{\n                type: Input\n            }], type: [{\n                type: Input\n            }], errorStateMatcher: [{\n                type: Input\n            }], userAriaDescribedBy: [{\n                type: Input,\n                args: ['aria-describedby']\n            }], value: [{\n                type: Input\n            }], readonly: [{\n                type: Input\n            }], disabledInteractive: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }] } });\n\nclass MatInputModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatInputModule, imports: [MatCommonModule, MatFormFieldModule, MatInput], exports: [MatInput, MatFormFieldModule, TextFieldModule, MatCommonModule] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatInputModule, imports: [MatCommonModule, MatFormFieldModule, MatFormFieldModule, TextFieldModule, MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatInputModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [MatCommonModule, MatFormFieldModule, MatInput],\n                    exports: [MatInput, MatFormFieldModule, TextFieldModule, MatCommonModule],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_INPUT_CONFIG, MAT_INPUT_VALUE_ACCESSOR, MatInput, MatInputModule, getMatInputUnsupportedTypeError };\n","import { _IdGenerator, CdkMonitorFocus, CdkTrapFocus, A11yModule } from '@angular/cdk/a11y';\nimport { Overlay, FlexibleConnectedPositionStrategy, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';\nimport { ComponentPortal, CdkPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport * as i0 from '@angular/core';\nimport { Injectable, inject, ElementRef, NgZone, EventEmitter, Injector, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Optional, SkipSelf, InjectionToken, ChangeDetectorRef, ViewChild, ViewContainerRef, booleanAttribute, Directive, forwardRef, signal, HostAttributeToken, ContentChild, TemplateRef, NgModule } from '@angular/core';\nimport { MatButton, MatIconButton, MatButtonModule } from '@angular/material/button';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport * as i1 from '@angular/material/core';\nimport { _StructuralStylesLoader, DateAdapter, MAT_DATE_FORMATS, ErrorStateMatcher, _ErrorStateTracker, MatCommonModule } from '@angular/material/core';\nimport { Subject, Subscription, merge, of } from 'rxjs';\nimport { ESCAPE, hasModifierKey, SPACE, ENTER, PAGE_DOWN, PAGE_UP, END, HOME, DOWN_ARROW, UP_ARROW, RIGHT_ARROW, LEFT_ARROW, BACKSPACE } from '@angular/cdk/keycodes';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { normalizePassiveListenerOptions, Platform, _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\nimport { NgClass, DOCUMENT } from '@angular/common';\nimport { _CdkPrivateStyleLoader, _VisuallyHiddenLoader } from '@angular/cdk/private';\nimport { startWith, take, filter } from 'rxjs/operators';\nimport { coerceStringArray } from '@angular/cdk/coercion';\nimport { trigger, transition, animate, keyframes, style, state } from '@angular/animations';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators, NgForm, FormGroupDirective, NgControl, ControlContainer } from '@angular/forms';\nimport { MAT_FORM_FIELD, MatFormFieldControl } from '@angular/material/form-field';\nimport { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';\n\n/** @docs-private */\nfunction createMissingDateImplError(provider) {\n    return Error(`MatDatepicker: No provider found for ${provider}. You must add one of the following ` +\n        `to your app config: provideNativeDateAdapter, provideDateFnsAdapter, ` +\n        `provideLuxonDateAdapter, provideMomentDateAdapter, or provide a custom implementation.`);\n}\n\n/** Datepicker data that requires internationalization. */\nclass MatDatepickerIntl {\n    /**\n     * Stream that emits whenever the labels here are changed. Use this to notify\n     * components if the labels have changed after initialization.\n     */\n    changes = new Subject();\n    /** A label for the calendar popup (used by screen readers). */\n    calendarLabel = 'Calendar';\n    /** A label for the button used to open the calendar popup (used by screen readers). */\n    openCalendarLabel = 'Open calendar';\n    /** Label for the button used to close the calendar popup. */\n    closeCalendarLabel = 'Close calendar';\n    /** A label for the previous month button (used by screen readers). */\n    prevMonthLabel = 'Previous month';\n    /** A label for the next month button (used by screen readers). */\n    nextMonthLabel = 'Next month';\n    /** A label for the previous year button (used by screen readers). */\n    prevYearLabel = 'Previous year';\n    /** A label for the next year button (used by screen readers). */\n    nextYearLabel = 'Next year';\n    /** A label for the previous multi-year button (used by screen readers). */\n    prevMultiYearLabel = 'Previous 24 years';\n    /** A label for the next multi-year button (used by screen readers). */\n    nextMultiYearLabel = 'Next 24 years';\n    /** A label for the 'switch to month view' button (used by screen readers). */\n    switchToMonthViewLabel = 'Choose date';\n    /** A label for the 'switch to year view' button (used by screen readers). */\n    switchToMultiYearViewLabel = 'Choose month and year';\n    /**\n     * A label for the first date of a range of dates (used by screen readers).\n     * @deprecated Provide your own internationalization string.\n     * @breaking-change 17.0.0\n     */\n    startDateLabel = 'Start date';\n    /**\n     * A label for the last date of a range of dates (used by screen readers).\n     * @deprecated Provide your own internationalization string.\n     * @breaking-change 17.0.0\n     */\n    endDateLabel = 'End date';\n    /**\n     * A label for the Comparison date of a range of dates (used by screen readers).\n     */\n    comparisonDateLabel = 'Comparison range';\n    /** Formats a range of years (used for visuals). */\n    formatYearRange(start, end) {\n        return `${start} \\u2013 ${end}`;\n    }\n    /** Formats a label for a range of years (used by screen readers). */\n    formatYearRangeLabel(start, end) {\n        return `${start} to ${end}`;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerIntl, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerIntl, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n\nlet uniqueIdCounter$1 = 0;\n/**\n * An internal class that represents the data corresponding to a single calendar cell.\n * @docs-private\n */\nclass MatCalendarCell {\n    value;\n    displayValue;\n    ariaLabel;\n    enabled;\n    cssClasses;\n    compareValue;\n    rawValue;\n    id = uniqueIdCounter$1++;\n    constructor(value, displayValue, ariaLabel, enabled, cssClasses = {}, compareValue = value, rawValue) {\n        this.value = value;\n        this.displayValue = displayValue;\n        this.ariaLabel = ariaLabel;\n        this.enabled = enabled;\n        this.cssClasses = cssClasses;\n        this.compareValue = compareValue;\n        this.rawValue = rawValue;\n    }\n}\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = normalizePassiveListenerOptions({\n    passive: false,\n    capture: true,\n});\n/** Event options that can be used to bind a passive, capturing event. */\nconst passiveCapturingEventOptions = normalizePassiveListenerOptions({\n    passive: true,\n    capture: true,\n});\n/** Event options that can be used to bind a passive, non-capturing event. */\nconst passiveEventOptions = normalizePassiveListenerOptions({ passive: true });\n/**\n * An internal component used to display calendar data in a table.\n * @docs-private\n */\nclass MatCalendarBody {\n    _elementRef = inject(ElementRef);\n    _ngZone = inject(NgZone);\n    _platform = inject(Platform);\n    _intl = inject(MatDatepickerIntl);\n    /**\n     * Used to skip the next focus event when rendering the preview range.\n     * We need a flag like this, because some browsers fire focus events asynchronously.\n     */\n    _skipNextFocus;\n    /**\n     * Used to focus the active cell after change detection has run.\n     */\n    _focusActiveCellAfterViewChecked = false;\n    /** The label for the table. (e.g. \"Jan 2017\"). */\n    label;\n    /** The cells to display in the table. */\n    rows;\n    /** The value in the table that corresponds to today. */\n    todayValue;\n    /** Start value of the selected date range. */\n    startValue;\n    /** End value of the selected date range. */\n    endValue;\n    /** The minimum number of free cells needed to fit the label in the first row. */\n    labelMinRequiredCells;\n    /** The number of columns in the table. */\n    numCols = 7;\n    /** The cell number of the active cell in the table. */\n    activeCell = 0;\n    ngAfterViewChecked() {\n        if (this._focusActiveCellAfterViewChecked) {\n            this._focusActiveCell();\n            this._focusActiveCellAfterViewChecked = false;\n        }\n    }\n    /** Whether a range is being selected. */\n    isRange = false;\n    /**\n     * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be\n     * maintained even as the table resizes.\n     */\n    cellAspectRatio = 1;\n    /** Start of the comparison range. */\n    comparisonStart;\n    /** End of the comparison range. */\n    comparisonEnd;\n    /** Start of the preview range. */\n    previewStart = null;\n    /** End of the preview range. */\n    previewEnd = null;\n    /** ARIA Accessible name of the `<input matStartDate/>` */\n    startDateAccessibleName;\n    /** ARIA Accessible name of the `<input matEndDate/>` */\n    endDateAccessibleName;\n    /** Emits when a new value is selected. */\n    selectedValueChange = new EventEmitter();\n    /** Emits when the preview has changed as a result of a user action. */\n    previewChange = new EventEmitter();\n    activeDateChange = new EventEmitter();\n    /** Emits the date at the possible start of a drag event. */\n    dragStarted = new EventEmitter();\n    /** Emits the date at the conclusion of a drag, or null if mouse was not released on a date. */\n    dragEnded = new EventEmitter();\n    /** The number of blank cells to put at the beginning for the first row. */\n    _firstRowOffset;\n    /** Padding for the individual date cells. */\n    _cellPadding;\n    /** Width of an individual cell. */\n    _cellWidth;\n    /** ID for the start date label. */\n    _startDateLabelId;\n    /** ID for the end date label. */\n    _endDateLabelId;\n    /** ID for the comparison start date label. */\n    _comparisonStartDateLabelId;\n    /** ID for the comparison end date label. */\n    _comparisonEndDateLabelId;\n    _didDragSinceMouseDown = false;\n    _injector = inject(Injector);\n    comparisonDateAccessibleName = this._intl.comparisonDateLabel;\n    /**\n     * Tracking function for rows based on their identity. Ideally we would use some sort of\n     * key on the row, but that would require a breaking change for the `rows` input. We don't\n     * use the built-in identity tracking, because it logs warnings.\n     */\n    _trackRow = (row) => row;\n    constructor() {\n        const idGenerator = inject(_IdGenerator);\n        this._startDateLabelId = idGenerator.getId('mat-calendar-body-start-');\n        this._endDateLabelId = idGenerator.getId('mat-calendar-body-end-');\n        this._comparisonStartDateLabelId = idGenerator.getId('mat-calendar-body-comparison-start-');\n        this._comparisonEndDateLabelId = idGenerator.getId('mat-calendar-body-comparison-end-');\n        inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n        this._ngZone.runOutsideAngular(() => {\n            const element = this._elementRef.nativeElement;\n            // `touchmove` is active since we need to call `preventDefault`.\n            element.addEventListener('touchmove', this._touchmoveHandler, activeCapturingEventOptions);\n            element.addEventListener('mouseenter', this._enterHandler, passiveCapturingEventOptions);\n            element.addEventListener('focus', this._enterHandler, passiveCapturingEventOptions);\n            element.addEventListener('mouseleave', this._leaveHandler, passiveCapturingEventOptions);\n            element.addEventListener('blur', this._leaveHandler, passiveCapturingEventOptions);\n            element.addEventListener('mousedown', this._mousedownHandler, passiveEventOptions);\n            element.addEventListener('touchstart', this._mousedownHandler, passiveEventOptions);\n            if (this._platform.isBrowser) {\n                window.addEventListener('mouseup', this._mouseupHandler);\n                window.addEventListener('touchend', this._touchendHandler);\n            }\n        });\n    }\n    /** Called when a cell is clicked. */\n    _cellClicked(cell, event) {\n        // Ignore \"clicks\" that are actually canceled drags (eg the user dragged\n        // off and then went back to this cell to undo).\n        if (this._didDragSinceMouseDown) {\n            return;\n        }\n        if (cell.enabled) {\n            this.selectedValueChange.emit({ value: cell.value, event });\n        }\n    }\n    _emitActiveDateChange(cell, event) {\n        if (cell.enabled) {\n            this.activeDateChange.emit({ value: cell.value, event });\n        }\n    }\n    /** Returns whether a cell should be marked as selected. */\n    _isSelected(value) {\n        return this.startValue === value || this.endValue === value;\n    }\n    ngOnChanges(changes) {\n        const columnChanges = changes['numCols'];\n        const { rows, numCols } = this;\n        if (changes['rows'] || columnChanges) {\n            this._firstRowOffset = rows && rows.length && rows[0].length ? numCols - rows[0].length : 0;\n        }\n        if (changes['cellAspectRatio'] || columnChanges || !this._cellPadding) {\n            this._cellPadding = `${(50 * this.cellAspectRatio) / numCols}%`;\n        }\n        if (columnChanges || !this._cellWidth) {\n            this._cellWidth = `${100 / numCols}%`;\n        }\n    }\n    ngOnDestroy() {\n        const element = this._elementRef.nativeElement;\n        element.removeEventListener('touchmove', this._touchmoveHandler, activeCapturingEventOptions);\n        element.removeEventListener('mouseenter', this._enterHandler, passiveCapturingEventOptions);\n        element.removeEventListener('focus', this._enterHandler, passiveCapturingEventOptions);\n        element.removeEventListener('mouseleave', this._leaveHandler, passiveCapturingEventOptions);\n        element.removeEventListener('blur', this._leaveHandler, passiveCapturingEventOptions);\n        element.removeEventListener('mousedown', this._mousedownHandler, passiveEventOptions);\n        element.removeEventListener('touchstart', this._mousedownHandler, passiveEventOptions);\n        if (this._platform.isBrowser) {\n            window.removeEventListener('mouseup', this._mouseupHandler);\n            window.removeEventListener('touchend', this._touchendHandler);\n        }\n    }\n    /** Returns whether a cell is active. */\n    _isActiveCell(rowIndex, colIndex) {\n        let cellNumber = rowIndex * this.numCols + colIndex;\n        // Account for the fact that the first row may not have as many cells.\n        if (rowIndex) {\n            cellNumber -= this._firstRowOffset;\n        }\n        return cellNumber == this.activeCell;\n    }\n    /**\n     * Focuses the active cell after the microtask queue is empty.\n     *\n     * Adding a 0ms setTimeout seems to fix Voiceover losing focus when pressing PageUp/PageDown\n     * (issue #24330).\n     *\n     * Determined a 0ms by gradually increasing duration from 0 and testing two use cases with screen\n     * reader enabled:\n     *\n     * 1. Pressing PageUp/PageDown repeatedly with pausing between each key press.\n     * 2. Pressing and holding the PageDown key with repeated keys enabled.\n     *\n     * Test 1 worked roughly 95-99% of the time with 0ms and got a little bit better as the duration\n     * increased. Test 2 got slightly better until the duration was long enough to interfere with\n     * repeated keys. If the repeated key speed was faster than the timeout duration, then pressing\n     * and holding pagedown caused the entire page to scroll.\n     *\n     * Since repeated key speed can verify across machines, determined that any duration could\n     * potentially interfere with repeated keys. 0ms would be best because it almost entirely\n     * eliminates the focus being lost in Voiceover (#24330) without causing unintended side effects.\n     * Adding delay also complicates writing tests.\n     */\n    _focusActiveCell(movePreview = true) {\n        afterNextRender(() => {\n            setTimeout(() => {\n                const activeCell = this._elementRef.nativeElement.querySelector('.mat-calendar-body-active');\n                if (activeCell) {\n                    if (!movePreview) {\n                        this._skipNextFocus = true;\n                    }\n                    activeCell.focus();\n                }\n            });\n        }, { injector: this._injector });\n    }\n    /** Focuses the active cell after change detection has run and the microtask queue is empty. */\n    _scheduleFocusActiveCellAfterViewChecked() {\n        this._focusActiveCellAfterViewChecked = true;\n    }\n    /** Gets whether a value is the start of the main range. */\n    _isRangeStart(value) {\n        return isStart(value, this.startValue, this.endValue);\n    }\n    /** Gets whether a value is the end of the main range. */\n    _isRangeEnd(value) {\n        return isEnd(value, this.startValue, this.endValue);\n    }\n    /** Gets whether a value is within the currently-selected range. */\n    _isInRange(value) {\n        return isInRange(value, this.startValue, this.endValue, this.isRange);\n    }\n    /** Gets whether a value is the start of the comparison range. */\n    _isComparisonStart(value) {\n        return isStart(value, this.comparisonStart, this.comparisonEnd);\n    }\n    /** Whether the cell is a start bridge cell between the main and comparison ranges. */\n    _isComparisonBridgeStart(value, rowIndex, colIndex) {\n        if (!this._isComparisonStart(value) || this._isRangeStart(value) || !this._isInRange(value)) {\n            return false;\n        }\n        let previousCell = this.rows[rowIndex][colIndex - 1];\n        if (!previousCell) {\n            const previousRow = this.rows[rowIndex - 1];\n            previousCell = previousRow && previousRow[previousRow.length - 1];\n        }\n        return previousCell && !this._isRangeEnd(previousCell.compareValue);\n    }\n    /** Whether the cell is an end bridge cell between the main and comparison ranges. */\n    _isComparisonBridgeEnd(value, rowIndex, colIndex) {\n        if (!this._isComparisonEnd(value) || this._isRangeEnd(value) || !this._isInRange(value)) {\n            return false;\n        }\n        let nextCell = this.rows[rowIndex][colIndex + 1];\n        if (!nextCell) {\n            const nextRow = this.rows[rowIndex + 1];\n            nextCell = nextRow && nextRow[0];\n        }\n        return nextCell && !this._isRangeStart(nextCell.compareValue);\n    }\n    /** Gets whether a value is the end of the comparison range. */\n    _isComparisonEnd(value) {\n        return isEnd(value, this.comparisonStart, this.comparisonEnd);\n    }\n    /** Gets whether a value is within the current comparison range. */\n    _isInComparisonRange(value) {\n        return isInRange(value, this.comparisonStart, this.comparisonEnd, this.isRange);\n    }\n    /**\n     * Gets whether a value is the same as the start and end of the comparison range.\n     * For context, the functions that we use to determine whether something is the start/end of\n     * a range don't allow for the start and end to be on the same day, because we'd have to use\n     * much more specific CSS selectors to style them correctly in all scenarios. This is fine for\n     * the regular range, because when it happens, the selected styles take over and still show where\n     * the range would've been, however we don't have these selected styles for a comparison range.\n     * This function is used to apply a class that serves the same purpose as the one for selected\n     * dates, but it only applies in the context of a comparison range.\n     */\n    _isComparisonIdentical(value) {\n        // Note that we don't need to null check the start/end\n        // here, because the `value` will always be defined.\n        return this.comparisonStart === this.comparisonEnd && value === this.comparisonStart;\n    }\n    /** Gets whether a value is the start of the preview range. */\n    _isPreviewStart(value) {\n        return isStart(value, this.previewStart, this.previewEnd);\n    }\n    /** Gets whether a value is the end of the preview range. */\n    _isPreviewEnd(value) {\n        return isEnd(value, this.previewStart, this.previewEnd);\n    }\n    /** Gets whether a value is inside the preview range. */\n    _isInPreview(value) {\n        return isInRange(value, this.previewStart, this.previewEnd, this.isRange);\n    }\n    /** Gets ids of aria descriptions for the start and end of a date range. */\n    _getDescribedby(value) {\n        if (!this.isRange) {\n            return null;\n        }\n        if (this.startValue === value && this.endValue === value) {\n            return `${this._startDateLabelId} ${this._endDateLabelId}`;\n        }\n        else if (this.startValue === value) {\n            return this._startDateLabelId;\n        }\n        else if (this.endValue === value) {\n            return this._endDateLabelId;\n        }\n        if (this.comparisonStart !== null && this.comparisonEnd !== null) {\n            if (value === this.comparisonStart && value === this.comparisonEnd) {\n                return `${this._comparisonStartDateLabelId} ${this._comparisonEndDateLabelId}`;\n            }\n            else if (value === this.comparisonStart) {\n                return this._comparisonStartDateLabelId;\n            }\n            else if (value === this.comparisonEnd) {\n                return this._comparisonEndDateLabelId;\n            }\n        }\n        return null;\n    }\n    /**\n     * Event handler for when the user enters an element\n     * inside the calendar body (e.g. by hovering in or focus).\n     */\n    _enterHandler = (event) => {\n        if (this._skipNextFocus && event.type === 'focus') {\n            this._skipNextFocus = false;\n            return;\n        }\n        // We only need to hit the zone when we're selecting a range.\n        if (event.target && this.isRange) {\n            const cell = this._getCellFromElement(event.target);\n            if (cell) {\n                this._ngZone.run(() => this.previewChange.emit({ value: cell.enabled ? cell : null, event }));\n            }\n        }\n    };\n    _touchmoveHandler = (event) => {\n        if (!this.isRange)\n            return;\n        const target = getActualTouchTarget(event);\n        const cell = target ? this._getCellFromElement(target) : null;\n        if (target !== event.target) {\n            this._didDragSinceMouseDown = true;\n        }\n        // If the initial target of the touch is a date cell, prevent default so\n        // that the move is not handled as a scroll.\n        if (getCellElement(event.target)) {\n            event.preventDefault();\n        }\n        this._ngZone.run(() => this.previewChange.emit({ value: cell?.enabled ? cell : null, event }));\n    };\n    /**\n     * Event handler for when the user's pointer leaves an element\n     * inside the calendar body (e.g. by hovering out or blurring).\n     */\n    _leaveHandler = (event) => {\n        // We only need to hit the zone when we're selecting a range.\n        if (this.previewEnd !== null && this.isRange) {\n            if (event.type !== 'blur') {\n                this._didDragSinceMouseDown = true;\n            }\n            // Only reset the preview end value when leaving cells. This looks better, because\n            // we have a gap between the cells and the rows and we don't want to remove the\n            // range just for it to show up again when the user moves a few pixels to the side.\n            if (event.target &&\n                this._getCellFromElement(event.target) &&\n                !(event.relatedTarget &&\n                    this._getCellFromElement(event.relatedTarget))) {\n                this._ngZone.run(() => this.previewChange.emit({ value: null, event }));\n            }\n        }\n    };\n    /**\n     * Triggered on mousedown or touchstart on a date cell.\n     * Respsonsible for starting a drag sequence.\n     */\n    _mousedownHandler = (event) => {\n        if (!this.isRange)\n            return;\n        this._didDragSinceMouseDown = false;\n        // Begin a drag if a cell within the current range was targeted.\n        const cell = event.target && this._getCellFromElement(event.target);\n        if (!cell || !this._isInRange(cell.compareValue)) {\n            return;\n        }\n        this._ngZone.run(() => {\n            this.dragStarted.emit({\n                value: cell.rawValue,\n                event,\n            });\n        });\n    };\n    /** Triggered on mouseup anywhere. Respsonsible for ending a drag sequence. */\n    _mouseupHandler = (event) => {\n        if (!this.isRange)\n            return;\n        const cellElement = getCellElement(event.target);\n        if (!cellElement) {\n            // Mouseup happened outside of datepicker. Cancel drag.\n            this._ngZone.run(() => {\n                this.dragEnded.emit({ value: null, event });\n            });\n            return;\n        }\n        if (cellElement.closest('.mat-calendar-body') !== this._elementRef.nativeElement) {\n            // Mouseup happened inside a different month instance.\n            // Allow it to handle the event.\n            return;\n        }\n        this._ngZone.run(() => {\n            const cell = this._getCellFromElement(cellElement);\n            this.dragEnded.emit({ value: cell?.rawValue ?? null, event });\n        });\n    };\n    /** Triggered on touchend anywhere. Respsonsible for ending a drag sequence. */\n    _touchendHandler = (event) => {\n        const target = getActualTouchTarget(event);\n        if (target) {\n            this._mouseupHandler({ target });\n        }\n    };\n    /** Finds the MatCalendarCell that corresponds to a DOM node. */\n    _getCellFromElement(element) {\n        const cell = getCellElement(element);\n        if (cell) {\n            const row = cell.getAttribute('data-mat-row');\n            const col = cell.getAttribute('data-mat-col');\n            if (row && col) {\n                return this.rows[parseInt(row)][parseInt(col)];\n            }\n        }\n        return null;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCalendarBody, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"19.0.0\", type: MatCalendarBody, isStandalone: true, selector: \"[mat-calendar-body]\", inputs: { label: \"label\", rows: \"rows\", todayValue: \"todayValue\", startValue: \"startValue\", endValue: \"endValue\", labelMinRequiredCells: \"labelMinRequiredCells\", numCols: \"numCols\", activeCell: \"activeCell\", isRange: \"isRange\", cellAspectRatio: \"cellAspectRatio\", comparisonStart: \"comparisonStart\", comparisonEnd: \"comparisonEnd\", previewStart: \"previewStart\", previewEnd: \"previewEnd\", startDateAccessibleName: \"startDateAccessibleName\", endDateAccessibleName: \"endDateAccessibleName\" }, outputs: { selectedValueChange: \"selectedValueChange\", previewChange: \"previewChange\", activeDateChange: \"activeDateChange\", dragStarted: \"dragStarted\", dragEnded: \"dragEnded\" }, host: { classAttribute: \"mat-calendar-body\" }, exportAs: [\"matCalendarBody\"], usesOnChanges: true, ngImport: i0, template: \"<!--\\n  If there's not enough space in the first row, create a separate label row. We mark this row as\\n  aria-hidden because we don't want it to be read out as one of the weeks in the month.\\n-->\\n@if (_firstRowOffset < labelMinRequiredCells) {\\n  <tr aria-hidden=\\\"true\\\">\\n    <td class=\\\"mat-calendar-body-label\\\"\\n        [attr.colspan]=\\\"numCols\\\"\\n        [style.paddingTop]=\\\"_cellPadding\\\"\\n        [style.paddingBottom]=\\\"_cellPadding\\\">\\n      {{label}}\\n    </td>\\n  </tr>\\n}\\n\\n<!-- Create the first row separately so we can include a special spacer cell. -->\\n@for (row of rows; track _trackRow(row); let rowIndex = $index) {\\n  <tr role=\\\"row\\\">\\n    <!--\\n      This cell is purely decorative, but we can't put `aria-hidden` or `role=\\\"presentation\\\"` on it,\\n      because it throws off the week days for the rest of the row on NVDA. The aspect ratio of the\\n      table cells is maintained by setting the top and bottom padding as a percentage of the width\\n      (a variant of the trick described here: https://www.w3schools.com/howto/howto_css_aspect_ratio.asp).\\n    -->\\n    @if (rowIndex === 0 && _firstRowOffset) {\\n      <td\\n        class=\\\"mat-calendar-body-label\\\"\\n        [attr.colspan]=\\\"_firstRowOffset\\\"\\n        [style.paddingTop]=\\\"_cellPadding\\\"\\n        [style.paddingBottom]=\\\"_cellPadding\\\">\\n        {{_firstRowOffset >= labelMinRequiredCells ? label : ''}}\\n      </td>\\n    }\\n    <!--\\n      Each gridcell in the calendar contains a button, which signals to assistive technology that the\\n      cell is interactable, as well as the selection state via `aria-pressed`. See #23476 for\\n      background.\\n    -->\\n    @for (item of row; track item.id; let colIndex = $index) {\\n      <td\\n        role=\\\"gridcell\\\"\\n        class=\\\"mat-calendar-body-cell-container\\\"\\n        [style.width]=\\\"_cellWidth\\\"\\n        [style.paddingTop]=\\\"_cellPadding\\\"\\n        [style.paddingBottom]=\\\"_cellPadding\\\"\\n        [attr.data-mat-row]=\\\"rowIndex\\\"\\n        [attr.data-mat-col]=\\\"colIndex\\\"\\n      >\\n        <button\\n            type=\\\"button\\\"\\n            class=\\\"mat-calendar-body-cell\\\"\\n            [ngClass]=\\\"item.cssClasses\\\"\\n            [tabindex]=\\\"_isActiveCell(rowIndex, colIndex) ? 0 : -1\\\"\\n            [class.mat-calendar-body-disabled]=\\\"!item.enabled\\\"\\n            [class.mat-calendar-body-active]=\\\"_isActiveCell(rowIndex, colIndex)\\\"\\n            [class.mat-calendar-body-range-start]=\\\"_isRangeStart(item.compareValue)\\\"\\n            [class.mat-calendar-body-range-end]=\\\"_isRangeEnd(item.compareValue)\\\"\\n            [class.mat-calendar-body-in-range]=\\\"_isInRange(item.compareValue)\\\"\\n            [class.mat-calendar-body-comparison-bridge-start]=\\\"_isComparisonBridgeStart(item.compareValue, rowIndex, colIndex)\\\"\\n            [class.mat-calendar-body-comparison-bridge-end]=\\\"_isComparisonBridgeEnd(item.compareValue, rowIndex, colIndex)\\\"\\n            [class.mat-calendar-body-comparison-start]=\\\"_isComparisonStart(item.compareValue)\\\"\\n            [class.mat-calendar-body-comparison-end]=\\\"_isComparisonEnd(item.compareValue)\\\"\\n            [class.mat-calendar-body-in-comparison-range]=\\\"_isInComparisonRange(item.compareValue)\\\"\\n            [class.mat-calendar-body-preview-start]=\\\"_isPreviewStart(item.compareValue)\\\"\\n            [class.mat-calendar-body-preview-end]=\\\"_isPreviewEnd(item.compareValue)\\\"\\n            [class.mat-calendar-body-in-preview]=\\\"_isInPreview(item.compareValue)\\\"\\n            [attr.aria-label]=\\\"item.ariaLabel\\\"\\n            [attr.aria-disabled]=\\\"!item.enabled || null\\\"\\n            [attr.aria-pressed]=\\\"_isSelected(item.compareValue)\\\"\\n            [attr.aria-current]=\\\"todayValue === item.compareValue ? 'date' : null\\\"\\n            [attr.aria-describedby]=\\\"_getDescribedby(item.compareValue)\\\"\\n            (click)=\\\"_cellClicked(item, $event)\\\"\\n            (focus)=\\\"_emitActiveDateChange(item, $event)\\\">\\n            <span class=\\\"mat-calendar-body-cell-content mat-focus-indicator\\\"\\n              [class.mat-calendar-body-selected]=\\\"_isSelected(item.compareValue)\\\"\\n              [class.mat-calendar-body-comparison-identical]=\\\"_isComparisonIdentical(item.compareValue)\\\"\\n              [class.mat-calendar-body-today]=\\\"todayValue === item.compareValue\\\">\\n              {{item.displayValue}}\\n            </span>\\n            <span class=\\\"mat-calendar-body-cell-preview\\\" aria-hidden=\\\"true\\\"></span>\\n        </button>\\n      </td>\\n    }\\n  </tr>\\n}\\n\\n<span [id]=\\\"_startDateLabelId\\\" class=\\\"mat-calendar-body-hidden-label\\\">\\n  {{startDateAccessibleName}}\\n</span>\\n<span [id]=\\\"_endDateLabelId\\\" class=\\\"mat-calendar-body-hidden-label\\\">\\n  {{endDateAccessibleName}}\\n</span>\\n<span [id]=\\\"_comparisonStartDateLabelId\\\" class=\\\"mat-calendar-body-hidden-label\\\">\\n  {{comparisonDateAccessibleName}} {{startDateAccessibleName}}\\n</span>\\n<span [id]=\\\"_comparisonEndDateLabelId\\\" class=\\\"mat-calendar-body-hidden-label\\\">\\n  {{comparisonDateAccessibleName}} {{endDateAccessibleName}}\\n</span>\\n\", styles: [\".mat-calendar-body{min-width:224px}.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:var(--mat-datepicker-calendar-date-today-outline-color, var(--mat-sys-primary))}.mat-calendar-body-label{height:0;line-height:0;text-align:start;padding-left:4.7142857143%;padding-right:4.7142857143%;font-size:var(--mat-datepicker-calendar-body-label-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-datepicker-calendar-body-label-text-weight, var(--mat-sys-title-small-weight));color:var(--mat-datepicker-calendar-body-label-text-color, var(--mat-sys-on-surface))}.mat-calendar-body-hidden-label{display:none}.mat-calendar-body-cell-container{position:relative;height:0;line-height:0}.mat-calendar-body-cell{position:absolute;top:0;left:0;width:100%;height:100%;background:none;text-align:center;outline:none;font-family:inherit;margin:0;font-family:var(--mat-datepicker-calendar-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-datepicker-calendar-text-size, var(--mat-sys-body-medium-size));-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-calendar-body-cell::-moz-focus-inner{border:0}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:\\\"\\\";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;display:block;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview{color:var(--mat-datepicker-calendar-date-preview-state-outline-color, var(--mat-sys-primary))}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-disabled>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){color:var(--mat-datepicker-calendar-date-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-calendar-body-disabled>.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:var(--mat-datepicker-calendar-date-today-disabled-state-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mat-calendar-body-disabled{opacity:.5}}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px;color:var(--mat-datepicker-calendar-date-text-color, var(--mat-sys-on-surface));border-color:var(--mat-datepicker-calendar-date-outline-color, transparent)}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}@media(forced-colors: active){.mat-calendar-body-cell-content{border:none}}.cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),.cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:var(--mat-datepicker-calendar-date-focus-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(hover: hover){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:var(--mat-datepicker-calendar-date-hover-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}}.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-state-background-color, var(--mat-sys-primary));color:var(--mat-datepicker-calendar-date-selected-state-text-color, var(--mat-sys-on-primary))}.mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-calendar-body-selected.mat-calendar-body-today{box-shadow:inset 0 0 0 1px var(--mat-datepicker-calendar-date-today-selected-state-outline-color, var(--mat-sys-primary))}.mat-calendar-body-in-range::before{background:var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-sys-primary-container))}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-sys-tertiary-container))}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-sys-tertiary-container))}.mat-calendar-body-comparison-bridge-start::before,[dir=rtl] .mat-calendar-body-comparison-bridge-end::before{background:linear-gradient(to right, var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-sys-primary-container)) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-sys-tertiary-container)) 50%)}.mat-calendar-body-comparison-bridge-end::before,[dir=rtl] .mat-calendar-body-comparison-bridge-start::before{background:linear-gradient(to left, var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-sys-primary-container)) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-sys-tertiary-container)) 50%)}.mat-calendar-body-in-range>.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range.mat-calendar-body-in-range::after{background:var(--mat-datepicker-calendar-date-in-overlap-range-state-background-color, var(--mat-sys-secondary-container))}.mat-calendar-body-comparison-identical.mat-calendar-body-selected,.mat-calendar-body-in-comparison-range>.mat-calendar-body-selected{background:var(--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color, var(--mat-sys-secondary))}@media(forced-colors: active){.mat-datepicker-popup:not(:empty),.mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.mat-calendar-body-today{outline:dotted 1px}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-selected{background:none}.mat-calendar-body-in-range::before,.mat-calendar-body-comparison-bridge-start::before,.mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}.mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}}\"], dependencies: [{ kind: \"directive\", type: NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCalendarBody, decorators: [{\n            type: Component,\n            args: [{ selector: '[mat-calendar-body]', host: {\n                        'class': 'mat-calendar-body',\n                    }, exportAs: 'matCalendarBody', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass], template: \"<!--\\n  If there's not enough space in the first row, create a separate label row. We mark this row as\\n  aria-hidden because we don't want it to be read out as one of the weeks in the month.\\n-->\\n@if (_firstRowOffset < labelMinRequiredCells) {\\n  <tr aria-hidden=\\\"true\\\">\\n    <td class=\\\"mat-calendar-body-label\\\"\\n        [attr.colspan]=\\\"numCols\\\"\\n        [style.paddingTop]=\\\"_cellPadding\\\"\\n        [style.paddingBottom]=\\\"_cellPadding\\\">\\n      {{label}}\\n    </td>\\n  </tr>\\n}\\n\\n<!-- Create the first row separately so we can include a special spacer cell. -->\\n@for (row of rows; track _trackRow(row); let rowIndex = $index) {\\n  <tr role=\\\"row\\\">\\n    <!--\\n      This cell is purely decorative, but we can't put `aria-hidden` or `role=\\\"presentation\\\"` on it,\\n      because it throws off the week days for the rest of the row on NVDA. The aspect ratio of the\\n      table cells is maintained by setting the top and bottom padding as a percentage of the width\\n      (a variant of the trick described here: https://www.w3schools.com/howto/howto_css_aspect_ratio.asp).\\n    -->\\n    @if (rowIndex === 0 && _firstRowOffset) {\\n      <td\\n        class=\\\"mat-calendar-body-label\\\"\\n        [attr.colspan]=\\\"_firstRowOffset\\\"\\n        [style.paddingTop]=\\\"_cellPadding\\\"\\n        [style.paddingBottom]=\\\"_cellPadding\\\">\\n        {{_firstRowOffset >= labelMinRequiredCells ? label : ''}}\\n      </td>\\n    }\\n    <!--\\n      Each gridcell in the calendar contains a button, which signals to assistive technology that the\\n      cell is interactable, as well as the selection state via `aria-pressed`. See #23476 for\\n      background.\\n    -->\\n    @for (item of row; track item.id; let colIndex = $index) {\\n      <td\\n        role=\\\"gridcell\\\"\\n        class=\\\"mat-calendar-body-cell-container\\\"\\n        [style.width]=\\\"_cellWidth\\\"\\n        [style.paddingTop]=\\\"_cellPadding\\\"\\n        [style.paddingBottom]=\\\"_cellPadding\\\"\\n        [attr.data-mat-row]=\\\"rowIndex\\\"\\n        [attr.data-mat-col]=\\\"colIndex\\\"\\n      >\\n        <button\\n            type=\\\"button\\\"\\n            class=\\\"mat-calendar-body-cell\\\"\\n            [ngClass]=\\\"item.cssClasses\\\"\\n            [tabindex]=\\\"_isActiveCell(rowIndex, colIndex) ? 0 : -1\\\"\\n            [class.mat-calendar-body-disabled]=\\\"!item.enabled\\\"\\n            [class.mat-calendar-body-active]=\\\"_isActiveCell(rowIndex, colIndex)\\\"\\n            [class.mat-calendar-body-range-start]=\\\"_isRangeStart(item.compareValue)\\\"\\n            [class.mat-calendar-body-range-end]=\\\"_isRangeEnd(item.compareValue)\\\"\\n            [class.mat-calendar-body-in-range]=\\\"_isInRange(item.compareValue)\\\"\\n            [class.mat-calendar-body-comparison-bridge-start]=\\\"_isComparisonBridgeStart(item.compareValue, rowIndex, colIndex)\\\"\\n            [class.mat-calendar-body-comparison-bridge-end]=\\\"_isComparisonBridgeEnd(item.compareValue, rowIndex, colIndex)\\\"\\n            [class.mat-calendar-body-comparison-start]=\\\"_isComparisonStart(item.compareValue)\\\"\\n            [class.mat-calendar-body-comparison-end]=\\\"_isComparisonEnd(item.compareValue)\\\"\\n            [class.mat-calendar-body-in-comparison-range]=\\\"_isInComparisonRange(item.compareValue)\\\"\\n            [class.mat-calendar-body-preview-start]=\\\"_isPreviewStart(item.compareValue)\\\"\\n            [class.mat-calendar-body-preview-end]=\\\"_isPreviewEnd(item.compareValue)\\\"\\n            [class.mat-calendar-body-in-preview]=\\\"_isInPreview(item.compareValue)\\\"\\n            [attr.aria-label]=\\\"item.ariaLabel\\\"\\n            [attr.aria-disabled]=\\\"!item.enabled || null\\\"\\n            [attr.aria-pressed]=\\\"_isSelected(item.compareValue)\\\"\\n            [attr.aria-current]=\\\"todayValue === item.compareValue ? 'date' : null\\\"\\n            [attr.aria-describedby]=\\\"_getDescribedby(item.compareValue)\\\"\\n            (click)=\\\"_cellClicked(item, $event)\\\"\\n            (focus)=\\\"_emitActiveDateChange(item, $event)\\\">\\n            <span class=\\\"mat-calendar-body-cell-content mat-focus-indicator\\\"\\n              [class.mat-calendar-body-selected]=\\\"_isSelected(item.compareValue)\\\"\\n              [class.mat-calendar-body-comparison-identical]=\\\"_isComparisonIdentical(item.compareValue)\\\"\\n              [class.mat-calendar-body-today]=\\\"todayValue === item.compareValue\\\">\\n              {{item.displayValue}}\\n            </span>\\n            <span class=\\\"mat-calendar-body-cell-preview\\\" aria-hidden=\\\"true\\\"></span>\\n        </button>\\n      </td>\\n    }\\n  </tr>\\n}\\n\\n<span [id]=\\\"_startDateLabelId\\\" class=\\\"mat-calendar-body-hidden-label\\\">\\n  {{startDateAccessibleName}}\\n</span>\\n<span [id]=\\\"_endDateLabelId\\\" class=\\\"mat-calendar-body-hidden-label\\\">\\n  {{endDateAccessibleName}}\\n</span>\\n<span [id]=\\\"_comparisonStartDateLabelId\\\" class=\\\"mat-calendar-body-hidden-label\\\">\\n  {{comparisonDateAccessibleName}} {{startDateAccessibleName}}\\n</span>\\n<span [id]=\\\"_comparisonEndDateLabelId\\\" class=\\\"mat-calendar-body-hidden-label\\\">\\n  {{comparisonDateAccessibleName}} {{endDateAccessibleName}}\\n</span>\\n\", styles: [\".mat-calendar-body{min-width:224px}.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:var(--mat-datepicker-calendar-date-today-outline-color, var(--mat-sys-primary))}.mat-calendar-body-label{height:0;line-height:0;text-align:start;padding-left:4.7142857143%;padding-right:4.7142857143%;font-size:var(--mat-datepicker-calendar-body-label-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-datepicker-calendar-body-label-text-weight, var(--mat-sys-title-small-weight));color:var(--mat-datepicker-calendar-body-label-text-color, var(--mat-sys-on-surface))}.mat-calendar-body-hidden-label{display:none}.mat-calendar-body-cell-container{position:relative;height:0;line-height:0}.mat-calendar-body-cell{position:absolute;top:0;left:0;width:100%;height:100%;background:none;text-align:center;outline:none;font-family:inherit;margin:0;font-family:var(--mat-datepicker-calendar-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-datepicker-calendar-text-size, var(--mat-sys-body-medium-size));-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-calendar-body-cell::-moz-focus-inner{border:0}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:\\\"\\\";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;display:block;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview{color:var(--mat-datepicker-calendar-date-preview-state-outline-color, var(--mat-sys-primary))}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-disabled>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){color:var(--mat-datepicker-calendar-date-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-calendar-body-disabled>.mat-calendar-body-today:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){border-color:var(--mat-datepicker-calendar-date-today-disabled-state-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mat-calendar-body-disabled{opacity:.5}}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px;color:var(--mat-datepicker-calendar-date-text-color, var(--mat-sys-on-surface));border-color:var(--mat-datepicker-calendar-date-outline-color, transparent)}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}@media(forced-colors: active){.mat-calendar-body-cell-content{border:none}}.cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical),.cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:var(--mat-datepicker-calendar-date-focus-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(hover: hover){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background-color:var(--mat-datepicker-calendar-date-hover-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}}.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-state-background-color, var(--mat-sys-primary));color:var(--mat-datepicker-calendar-date-selected-state-text-color, var(--mat-sys-on-primary))}.mat-calendar-body-disabled>.mat-calendar-body-selected{background-color:var(--mat-datepicker-calendar-date-selected-disabled-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-calendar-body-selected.mat-calendar-body-today{box-shadow:inset 0 0 0 1px var(--mat-datepicker-calendar-date-today-selected-state-outline-color, var(--mat-sys-primary))}.mat-calendar-body-in-range::before{background:var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-sys-primary-container))}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-sys-tertiary-container))}.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range::before{background:var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-sys-tertiary-container))}.mat-calendar-body-comparison-bridge-start::before,[dir=rtl] .mat-calendar-body-comparison-bridge-end::before{background:linear-gradient(to right, var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-sys-primary-container)) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-sys-tertiary-container)) 50%)}.mat-calendar-body-comparison-bridge-end::before,[dir=rtl] .mat-calendar-body-comparison-bridge-start::before{background:linear-gradient(to left, var(--mat-datepicker-calendar-date-in-range-state-background-color, var(--mat-sys-primary-container)) 50%, var(--mat-datepicker-calendar-date-in-comparison-range-state-background-color, var(--mat-sys-tertiary-container)) 50%)}.mat-calendar-body-in-range>.mat-calendar-body-comparison-identical,.mat-calendar-body-in-comparison-range.mat-calendar-body-in-range::after{background:var(--mat-datepicker-calendar-date-in-overlap-range-state-background-color, var(--mat-sys-secondary-container))}.mat-calendar-body-comparison-identical.mat-calendar-body-selected,.mat-calendar-body-in-comparison-range>.mat-calendar-body-selected{background:var(--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color, var(--mat-sys-secondary))}@media(forced-colors: active){.mat-datepicker-popup:not(:empty),.mat-calendar-body-cell:not(.mat-calendar-body-in-range) .mat-calendar-body-selected{outline:solid 1px}.mat-calendar-body-today{outline:dotted 1px}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-selected{background:none}.mat-calendar-body-in-range::before,.mat-calendar-body-comparison-bridge-start::before,.mat-calendar-body-comparison-bridge-end::before{border-top:solid 1px;border-bottom:solid 1px}.mat-calendar-body-range-start::before{border-left:solid 1px}[dir=rtl] .mat-calendar-body-range-start::before{border-left:0;border-right:solid 1px}.mat-calendar-body-range-end::before{border-right:solid 1px}[dir=rtl] .mat-calendar-body-range-end::before{border-right:0;border-left:solid 1px}.mat-calendar-body-in-comparison-range::before{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-comparison-start::before{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-comparison-start::before{border-left:0;border-right:dashed 1px}.mat-calendar-body-comparison-end::before{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-comparison-end::before{border-right:0;border-left:dashed 1px}}\"] }]\n        }], ctorParameters: () => [], propDecorators: { label: [{\n                type: Input\n            }], rows: [{\n                type: Input\n            }], todayValue: [{\n                type: Input\n            }], startValue: [{\n                type: Input\n            }], endValue: [{\n                type: Input\n            }], labelMinRequiredCells: [{\n                type: Input\n            }], numCols: [{\n                type: Input\n            }], activeCell: [{\n                type: Input\n            }], isRange: [{\n                type: Input\n            }], cellAspectRatio: [{\n                type: Input\n            }], comparisonStart: [{\n                type: Input\n            }], comparisonEnd: [{\n                type: Input\n            }], previewStart: [{\n                type: Input\n            }], previewEnd: [{\n                type: Input\n            }], startDateAccessibleName: [{\n                type: Input\n            }], endDateAccessibleName: [{\n                type: Input\n            }], selectedValueChange: [{\n                type: Output\n            }], previewChange: [{\n                type: Output\n            }], activeDateChange: [{\n                type: Output\n            }], dragStarted: [{\n                type: Output\n            }], dragEnded: [{\n                type: Output\n            }] } });\n/** Checks whether a node is a table cell element. */\nfunction isTableCell(node) {\n    return node?.nodeName === 'TD';\n}\n/**\n * Gets the date table cell element that is or contains the specified element.\n * Or returns null if element is not part of a date cell.\n */\nfunction getCellElement(element) {\n    let cell;\n    if (isTableCell(element)) {\n        cell = element;\n    }\n    else if (isTableCell(element.parentNode)) {\n        cell = element.parentNode;\n    }\n    else if (isTableCell(element.parentNode?.parentNode)) {\n        cell = element.parentNode.parentNode;\n    }\n    return cell?.getAttribute('data-mat-row') != null ? cell : null;\n}\n/** Checks whether a value is the start of a range. */\nfunction isStart(value, start, end) {\n    return end !== null && start !== end && value < end && value === start;\n}\n/** Checks whether a value is the end of a range. */\nfunction isEnd(value, start, end) {\n    return start !== null && start !== end && value >= start && value === end;\n}\n/** Checks whether a value is inside of a range. */\nfunction isInRange(value, start, end, rangeEnabled) {\n    return (rangeEnabled &&\n        start !== null &&\n        end !== null &&\n        start !== end &&\n        value >= start &&\n        value <= end);\n}\n/**\n * Extracts the element that actually corresponds to a touch event's location\n * (rather than the element that initiated the sequence of touch events).\n */\nfunction getActualTouchTarget(event) {\n    const touchLocation = event.changedTouches[0];\n    return document.elementFromPoint(touchLocation.clientX, touchLocation.clientY);\n}\n\n/** A class representing a range of dates. */\nclass DateRange {\n    start;\n    end;\n    /**\n     * Ensures that objects with a `start` and `end` property can't be assigned to a variable that\n     * expects a `DateRange`\n     */\n    // tslint:disable-next-line:no-unused-variable\n    _disableStructuralEquivalency;\n    constructor(\n    /** The start date of the range. */\n    start, \n    /** The end date of the range. */\n    end) {\n        this.start = start;\n        this.end = end;\n    }\n}\n/**\n * A selection model containing a date selection.\n * @docs-private\n */\nclass MatDateSelectionModel {\n    selection;\n    _adapter;\n    _selectionChanged = new Subject();\n    /** Emits when the selection has changed. */\n    selectionChanged = this._selectionChanged;\n    constructor(\n    /** The current selection. */\n    selection, _adapter) {\n        this.selection = selection;\n        this._adapter = _adapter;\n        this.selection = selection;\n    }\n    /**\n     * Updates the current selection in the model.\n     * @param value New selection that should be assigned.\n     * @param source Object that triggered the selection change.\n     */\n    updateSelection(value, source) {\n        const oldValue = this.selection;\n        this.selection = value;\n        this._selectionChanged.next({ selection: value, source, oldValue });\n    }\n    ngOnDestroy() {\n        this._selectionChanged.complete();\n    }\n    _isValidDateInstance(date) {\n        return this._adapter.isDateInstance(date) && this._adapter.isValid(date);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDateSelectionModel, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDateSelectionModel });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDateSelectionModel, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: undefined }, { type: i1.DateAdapter }] });\n/**\n * A selection model that contains a single date.\n * @docs-private\n */\nclass MatSingleDateSelectionModel extends MatDateSelectionModel {\n    constructor(adapter) {\n        super(null, adapter);\n    }\n    /**\n     * Adds a date to the current selection. In the case of a single date selection, the added date\n     * simply overwrites the previous selection\n     */\n    add(date) {\n        super.updateSelection(date, this);\n    }\n    /** Checks whether the current selection is valid. */\n    isValid() {\n        return this.selection != null && this._isValidDateInstance(this.selection);\n    }\n    /**\n     * Checks whether the current selection is complete. In the case of a single date selection, this\n     * is true if the current selection is not null.\n     */\n    isComplete() {\n        return this.selection != null;\n    }\n    /** Clones the selection model. */\n    clone() {\n        const clone = new MatSingleDateSelectionModel(this._adapter);\n        clone.updateSelection(this.selection, this);\n        return clone;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSingleDateSelectionModel, deps: [{ token: i1.DateAdapter }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSingleDateSelectionModel });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSingleDateSelectionModel, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: i1.DateAdapter }] });\n/**\n * A selection model that contains a date range.\n * @docs-private\n */\nclass MatRangeDateSelectionModel extends MatDateSelectionModel {\n    constructor(adapter) {\n        super(new DateRange(null, null), adapter);\n    }\n    /**\n     * Adds a date to the current selection. In the case of a date range selection, the added date\n     * fills in the next `null` value in the range. If both the start and the end already have a date,\n     * the selection is reset so that the given date is the new `start` and the `end` is null.\n     */\n    add(date) {\n        let { start, end } = this.selection;\n        if (start == null) {\n            start = date;\n        }\n        else if (end == null) {\n            end = date;\n        }\n        else {\n            start = date;\n            end = null;\n        }\n        super.updateSelection(new DateRange(start, end), this);\n    }\n    /** Checks whether the current selection is valid. */\n    isValid() {\n        const { start, end } = this.selection;\n        // Empty ranges are valid.\n        if (start == null && end == null) {\n            return true;\n        }\n        // Complete ranges are only valid if both dates are valid and the start is before the end.\n        if (start != null && end != null) {\n            return (this._isValidDateInstance(start) &&\n                this._isValidDateInstance(end) &&\n                this._adapter.compareDate(start, end) <= 0);\n        }\n        // Partial ranges are valid if the start/end is valid.\n        return ((start == null || this._isValidDateInstance(start)) &&\n            (end == null || this._isValidDateInstance(end)));\n    }\n    /**\n     * Checks whether the current selection is complete. In the case of a date range selection, this\n     * is true if the current selection has a non-null `start` and `end`.\n     */\n    isComplete() {\n        return this.selection.start != null && this.selection.end != null;\n    }\n    /** Clones the selection model. */\n    clone() {\n        const clone = new MatRangeDateSelectionModel(this._adapter);\n        clone.updateSelection(this.selection, this);\n        return clone;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRangeDateSelectionModel, deps: [{ token: i1.DateAdapter }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRangeDateSelectionModel });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRangeDateSelectionModel, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: i1.DateAdapter }] });\n/** @docs-private */\nfunction MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(parent, adapter) {\n    return parent || new MatSingleDateSelectionModel(adapter);\n}\n/**\n * Used to provide a single selection model to a component.\n * @docs-private\n */\nconst MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER = {\n    provide: MatDateSelectionModel,\n    deps: [[new Optional(), new SkipSelf(), MatDateSelectionModel], DateAdapter],\n    useFactory: MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY,\n};\n/** @docs-private */\nfunction MAT_RANGE_DATE_SELECTION_MODEL_FACTORY(parent, adapter) {\n    return parent || new MatRangeDateSelectionModel(adapter);\n}\n/**\n * Used to provide a range selection model to a component.\n * @docs-private\n */\nconst MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER = {\n    provide: MatDateSelectionModel,\n    deps: [[new Optional(), new SkipSelf(), MatDateSelectionModel], DateAdapter],\n    useFactory: MAT_RANGE_DATE_SELECTION_MODEL_FACTORY,\n};\n\n/** Injection token used to customize the date range selection behavior. */\nconst MAT_DATE_RANGE_SELECTION_STRATEGY = new InjectionToken('MAT_DATE_RANGE_SELECTION_STRATEGY');\n/** Provides the default date range selection behavior. */\nclass DefaultMatCalendarRangeStrategy {\n    _dateAdapter;\n    constructor(_dateAdapter) {\n        this._dateAdapter = _dateAdapter;\n    }\n    selectionFinished(date, currentRange) {\n        let { start, end } = currentRange;\n        if (start == null) {\n            start = date;\n        }\n        else if (end == null && date && this._dateAdapter.compareDate(date, start) >= 0) {\n            end = date;\n        }\n        else {\n            start = date;\n            end = null;\n        }\n        return new DateRange(start, end);\n    }\n    createPreview(activeDate, currentRange) {\n        let start = null;\n        let end = null;\n        if (currentRange.start && !currentRange.end && activeDate) {\n            start = currentRange.start;\n            end = activeDate;\n        }\n        return new DateRange(start, end);\n    }\n    createDrag(dragOrigin, originalRange, newDate) {\n        let start = originalRange.start;\n        let end = originalRange.end;\n        if (!start || !end) {\n            // Can't drag from an incomplete range.\n            return null;\n        }\n        const adapter = this._dateAdapter;\n        const isRange = adapter.compareDate(start, end) !== 0;\n        const diffYears = adapter.getYear(newDate) - adapter.getYear(dragOrigin);\n        const diffMonths = adapter.getMonth(newDate) - adapter.getMonth(dragOrigin);\n        const diffDays = adapter.getDate(newDate) - adapter.getDate(dragOrigin);\n        if (isRange && adapter.sameDate(dragOrigin, originalRange.start)) {\n            start = newDate;\n            if (adapter.compareDate(newDate, end) > 0) {\n                end = adapter.addCalendarYears(end, diffYears);\n                end = adapter.addCalendarMonths(end, diffMonths);\n                end = adapter.addCalendarDays(end, diffDays);\n            }\n        }\n        else if (isRange && adapter.sameDate(dragOrigin, originalRange.end)) {\n            end = newDate;\n            if (adapter.compareDate(newDate, start) < 0) {\n                start = adapter.addCalendarYears(start, diffYears);\n                start = adapter.addCalendarMonths(start, diffMonths);\n                start = adapter.addCalendarDays(start, diffDays);\n            }\n        }\n        else {\n            start = adapter.addCalendarYears(start, diffYears);\n            start = adapter.addCalendarMonths(start, diffMonths);\n            start = adapter.addCalendarDays(start, diffDays);\n            end = adapter.addCalendarYears(end, diffYears);\n            end = adapter.addCalendarMonths(end, diffMonths);\n            end = adapter.addCalendarDays(end, diffDays);\n        }\n        return new DateRange(start, end);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: DefaultMatCalendarRangeStrategy, deps: [{ token: i1.DateAdapter }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: DefaultMatCalendarRangeStrategy });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: DefaultMatCalendarRangeStrategy, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [{ type: i1.DateAdapter }] });\n/** @docs-private */\nfunction MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY(parent, adapter) {\n    return parent || new DefaultMatCalendarRangeStrategy(adapter);\n}\n/** @docs-private */\nconst MAT_CALENDAR_RANGE_STRATEGY_PROVIDER = {\n    provide: MAT_DATE_RANGE_SELECTION_STRATEGY,\n    deps: [[new Optional(), new SkipSelf(), MAT_DATE_RANGE_SELECTION_STRATEGY], DateAdapter],\n    useFactory: MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY,\n};\n\nconst DAYS_PER_WEEK = 7;\nlet uniqueIdCounter = 0;\n/**\n * An internal component used to display a single month in the datepicker.\n * @docs-private\n */\nclass MatMonthView {\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _dateFormats = inject(MAT_DATE_FORMATS, { optional: true });\n    _dateAdapter = inject(DateAdapter, { optional: true });\n    _dir = inject(Directionality, { optional: true });\n    _rangeStrategy = inject(MAT_DATE_RANGE_SELECTION_STRATEGY, { optional: true });\n    _rerenderSubscription = Subscription.EMPTY;\n    /** Flag used to filter out space/enter keyup events that originated outside of the view. */\n    _selectionKeyPressed;\n    /**\n     * The date to display in this month view (everything other than the month and year is ignored).\n     */\n    get activeDate() {\n        return this._activeDate;\n    }\n    set activeDate(value) {\n        const oldActiveDate = this._activeDate;\n        const validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) ||\n            this._dateAdapter.today();\n        this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n        if (!this._hasSameMonthAndYear(oldActiveDate, this._activeDate)) {\n            this._init();\n        }\n    }\n    _activeDate;\n    /** The currently selected date. */\n    get selected() {\n        return this._selected;\n    }\n    set selected(value) {\n        if (value instanceof DateRange) {\n            this._selected = value;\n        }\n        else {\n            this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n        }\n        this._setRanges(this._selected);\n    }\n    _selected;\n    /** The minimum selectable date. */\n    get minDate() {\n        return this._minDate;\n    }\n    set minDate(value) {\n        this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n    }\n    _minDate;\n    /** The maximum selectable date. */\n    get maxDate() {\n        return this._maxDate;\n    }\n    set maxDate(value) {\n        this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n    }\n    _maxDate;\n    /** Function used to filter which dates are selectable. */\n    dateFilter;\n    /** Function that can be used to add custom CSS classes to dates. */\n    dateClass;\n    /** Start of the comparison range. */\n    comparisonStart;\n    /** End of the comparison range. */\n    comparisonEnd;\n    /** ARIA Accessible name of the `<input matStartDate/>` */\n    startDateAccessibleName;\n    /** ARIA Accessible name of the `<input matEndDate/>` */\n    endDateAccessibleName;\n    /** Origin of active drag, or null when dragging is not active. */\n    activeDrag = null;\n    /** Emits when a new date is selected. */\n    selectedChange = new EventEmitter();\n    /** Emits when any date is selected. */\n    _userSelection = new EventEmitter();\n    /** Emits when the user initiates a date range drag via mouse or touch. */\n    dragStarted = new EventEmitter();\n    /**\n     * Emits when the user completes or cancels a date range drag.\n     * Emits null when the drag was canceled or the newly selected date range if completed.\n     */\n    dragEnded = new EventEmitter();\n    /** Emits when any date is activated. */\n    activeDateChange = new EventEmitter();\n    /** The body of calendar table */\n    _matCalendarBody;\n    /** The label for this month (e.g. \"January 2017\"). */\n    _monthLabel;\n    /** Grid of calendar cells representing the dates of the month. */\n    _weeks;\n    /** The number of blank cells in the first row before the 1st of the month. */\n    _firstWeekOffset;\n    /** Start value of the currently-shown date range. */\n    _rangeStart;\n    /** End value of the currently-shown date range. */\n    _rangeEnd;\n    /** Start value of the currently-shown comparison date range. */\n    _comparisonRangeStart;\n    /** End value of the currently-shown comparison date range. */\n    _comparisonRangeEnd;\n    /** Start of the preview range. */\n    _previewStart;\n    /** End of the preview range. */\n    _previewEnd;\n    /** Whether the user is currently selecting a range of dates. */\n    _isRange;\n    /** The date of the month that today falls on. Null if today is in another month. */\n    _todayDate;\n    /** The names of the weekdays. */\n    _weekdays;\n    constructor() {\n        inject(_CdkPrivateStyleLoader).load(_VisuallyHiddenLoader);\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (!this._dateAdapter) {\n                throw createMissingDateImplError('DateAdapter');\n            }\n            if (!this._dateFormats) {\n                throw createMissingDateImplError('MAT_DATE_FORMATS');\n            }\n        }\n        this._activeDate = this._dateAdapter.today();\n    }\n    ngAfterContentInit() {\n        this._rerenderSubscription = this._dateAdapter.localeChanges\n            .pipe(startWith(null))\n            .subscribe(() => this._init());\n    }\n    ngOnChanges(changes) {\n        const comparisonChange = changes['comparisonStart'] || changes['comparisonEnd'];\n        if (comparisonChange && !comparisonChange.firstChange) {\n            this._setRanges(this.selected);\n        }\n        if (changes['activeDrag'] && !this.activeDrag) {\n            this._clearPreview();\n        }\n    }\n    ngOnDestroy() {\n        this._rerenderSubscription.unsubscribe();\n    }\n    /** Handles when a new date is selected. */\n    _dateSelected(event) {\n        const date = event.value;\n        const selectedDate = this._getDateFromDayOfMonth(date);\n        let rangeStartDate;\n        let rangeEndDate;\n        if (this._selected instanceof DateRange) {\n            rangeStartDate = this._getDateInCurrentMonth(this._selected.start);\n            rangeEndDate = this._getDateInCurrentMonth(this._selected.end);\n        }\n        else {\n            rangeStartDate = rangeEndDate = this._getDateInCurrentMonth(this._selected);\n        }\n        if (rangeStartDate !== date || rangeEndDate !== date) {\n            this.selectedChange.emit(selectedDate);\n        }\n        this._userSelection.emit({ value: selectedDate, event: event.event });\n        this._clearPreview();\n        this._changeDetectorRef.markForCheck();\n    }\n    /**\n     * Takes the index of a calendar body cell wrapped in an event as argument. For the date that\n     * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with\n     * that date.\n     *\n     * This function is used to match each component's model of the active date with the calendar\n     * body cell that was focused. It updates its value of `activeDate` synchronously and updates the\n     * parent's value asynchronously via the `activeDateChange` event. The child component receives an\n     * updated value asynchronously via the `activeCell` Input.\n     */\n    _updateActiveDate(event) {\n        const month = event.value;\n        const oldActiveDate = this._activeDate;\n        this.activeDate = this._getDateFromDayOfMonth(month);\n        if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n            this.activeDateChange.emit(this._activeDate);\n        }\n    }\n    /** Handles keydown events on the calendar body when calendar is in month view. */\n    _handleCalendarBodyKeydown(event) {\n        // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent\n        // disabled ones from being selected. This may not be ideal, we should look into whether\n        // navigation should skip over disabled dates, and if so, how to implement that efficiently.\n        const oldActiveDate = this._activeDate;\n        const isRtl = this._isRtl();\n        switch (event.keyCode) {\n            case LEFT_ARROW:\n                this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? 1 : -1);\n                break;\n            case RIGHT_ARROW:\n                this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, isRtl ? -1 : 1);\n                break;\n            case UP_ARROW:\n                this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, -7);\n                break;\n            case DOWN_ARROW:\n                this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 7);\n                break;\n            case HOME:\n                this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, 1 - this._dateAdapter.getDate(this._activeDate));\n                break;\n            case END:\n                this.activeDate = this._dateAdapter.addCalendarDays(this._activeDate, this._dateAdapter.getNumDaysInMonth(this._activeDate) -\n                    this._dateAdapter.getDate(this._activeDate));\n                break;\n            case PAGE_UP:\n                this.activeDate = event.altKey\n                    ? this._dateAdapter.addCalendarYears(this._activeDate, -1)\n                    : this._dateAdapter.addCalendarMonths(this._activeDate, -1);\n                break;\n            case PAGE_DOWN:\n                this.activeDate = event.altKey\n                    ? this._dateAdapter.addCalendarYears(this._activeDate, 1)\n                    : this._dateAdapter.addCalendarMonths(this._activeDate, 1);\n                break;\n            case ENTER:\n            case SPACE:\n                this._selectionKeyPressed = true;\n                if (this._canSelect(this._activeDate)) {\n                    // Prevent unexpected default actions such as form submission.\n                    // Note that we only prevent the default action here while the selection happens in\n                    // `keyup` below. We can't do the selection here, because it can cause the calendar to\n                    // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`\n                    // because it's too late (see #23305).\n                    event.preventDefault();\n                }\n                return;\n            case ESCAPE:\n                // Abort the current range selection if the user presses escape mid-selection.\n                if (this._previewEnd != null && !hasModifierKey(event)) {\n                    this._clearPreview();\n                    // If a drag is in progress, cancel the drag without changing the\n                    // current selection.\n                    if (this.activeDrag) {\n                        this.dragEnded.emit({ value: null, event });\n                    }\n                    else {\n                        this.selectedChange.emit(null);\n                        this._userSelection.emit({ value: null, event });\n                    }\n                    event.preventDefault();\n                    event.stopPropagation(); // Prevents the overlay from closing.\n                }\n                return;\n            default:\n                // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n                return;\n        }\n        if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n            this.activeDateChange.emit(this.activeDate);\n            this._focusActiveCellAfterViewChecked();\n        }\n        // Prevent unexpected default actions such as form submission.\n        event.preventDefault();\n    }\n    /** Handles keyup events on the calendar body when calendar is in month view. */\n    _handleCalendarBodyKeyup(event) {\n        if (event.keyCode === SPACE || event.keyCode === ENTER) {\n            if (this._selectionKeyPressed && this._canSelect(this._activeDate)) {\n                this._dateSelected({ value: this._dateAdapter.getDate(this._activeDate), event });\n            }\n            this._selectionKeyPressed = false;\n        }\n    }\n    /** Initializes this month view. */\n    _init() {\n        this._setRanges(this.selected);\n        this._todayDate = this._getCellCompareValue(this._dateAdapter.today());\n        this._monthLabel = this._dateFormats.display.monthLabel\n            ? this._dateAdapter.format(this.activeDate, this._dateFormats.display.monthLabel)\n            : this._dateAdapter\n                .getMonthNames('short')[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();\n        let firstOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), 1);\n        this._firstWeekOffset =\n            (DAYS_PER_WEEK +\n                this._dateAdapter.getDayOfWeek(firstOfMonth) -\n                this._dateAdapter.getFirstDayOfWeek()) %\n                DAYS_PER_WEEK;\n        this._initWeekdays();\n        this._createWeekCells();\n        this._changeDetectorRef.markForCheck();\n    }\n    /** Focuses the active cell after the microtask queue is empty. */\n    _focusActiveCell(movePreview) {\n        this._matCalendarBody._focusActiveCell(movePreview);\n    }\n    /** Focuses the active cell after change detection has run and the microtask queue is empty. */\n    _focusActiveCellAfterViewChecked() {\n        this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked();\n    }\n    /** Called when the user has activated a new cell and the preview needs to be updated. */\n    _previewChanged({ event, value: cell }) {\n        if (this._rangeStrategy) {\n            // We can assume that this will be a range, because preview\n            // events aren't fired for single date selections.\n            const value = cell ? cell.rawValue : null;\n            const previewRange = this._rangeStrategy.createPreview(value, this.selected, event);\n            this._previewStart = this._getCellCompareValue(previewRange.start);\n            this._previewEnd = this._getCellCompareValue(previewRange.end);\n            if (this.activeDrag && value) {\n                const dragRange = this._rangeStrategy.createDrag?.(this.activeDrag.value, this.selected, value, event);\n                if (dragRange) {\n                    this._previewStart = this._getCellCompareValue(dragRange.start);\n                    this._previewEnd = this._getCellCompareValue(dragRange.end);\n                }\n            }\n            // Note that here we need to use `detectChanges`, rather than `markForCheck`, because\n            // the way `_focusActiveCell` is set up at the moment makes it fire at the wrong time\n            // when navigating one month back using the keyboard which will cause this handler\n            // to throw a \"changed after checked\" error when updating the preview state.\n            this._changeDetectorRef.detectChanges();\n        }\n    }\n    /**\n     * Called when the user has ended a drag. If the drag/drop was successful,\n     * computes and emits the new range selection.\n     */\n    _dragEnded(event) {\n        if (!this.activeDrag)\n            return;\n        if (event.value) {\n            // Propagate drag effect\n            const dragDropResult = this._rangeStrategy?.createDrag?.(this.activeDrag.value, this.selected, event.value, event.event);\n            this.dragEnded.emit({ value: dragDropResult ?? null, event: event.event });\n        }\n        else {\n            this.dragEnded.emit({ value: null, event: event.event });\n        }\n    }\n    /**\n     * Takes a day of the month and returns a new date in the same month and year as the currently\n     *  active date. The returned date will have the same day of the month as the argument date.\n     */\n    _getDateFromDayOfMonth(dayOfMonth) {\n        return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), dayOfMonth);\n    }\n    /** Initializes the weekdays. */\n    _initWeekdays() {\n        const firstDayOfWeek = this._dateAdapter.getFirstDayOfWeek();\n        const narrowWeekdays = this._dateAdapter.getDayOfWeekNames('narrow');\n        const longWeekdays = this._dateAdapter.getDayOfWeekNames('long');\n        // Rotate the labels for days of the week based on the configured first day of the week.\n        let weekdays = longWeekdays.map((long, i) => {\n            return { long, narrow: narrowWeekdays[i], id: uniqueIdCounter++ };\n        });\n        this._weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));\n    }\n    /** Creates MatCalendarCells for the dates in this month. */\n    _createWeekCells() {\n        const daysInMonth = this._dateAdapter.getNumDaysInMonth(this.activeDate);\n        const dateNames = this._dateAdapter.getDateNames();\n        this._weeks = [[]];\n        for (let i = 0, cell = this._firstWeekOffset; i < daysInMonth; i++, cell++) {\n            if (cell == DAYS_PER_WEEK) {\n                this._weeks.push([]);\n                cell = 0;\n            }\n            const date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), i + 1);\n            const enabled = this._shouldEnableDate(date);\n            const ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.dateA11yLabel);\n            const cellClasses = this.dateClass ? this.dateClass(date, 'month') : undefined;\n            this._weeks[this._weeks.length - 1].push(new MatCalendarCell(i + 1, dateNames[i], ariaLabel, enabled, cellClasses, this._getCellCompareValue(date), date));\n        }\n    }\n    /** Date filter for the month */\n    _shouldEnableDate(date) {\n        return (!!date &&\n            (!this.minDate || this._dateAdapter.compareDate(date, this.minDate) >= 0) &&\n            (!this.maxDate || this._dateAdapter.compareDate(date, this.maxDate) <= 0) &&\n            (!this.dateFilter || this.dateFilter(date)));\n    }\n    /**\n     * Gets the date in this month that the given Date falls on.\n     * Returns null if the given Date is in another month.\n     */\n    _getDateInCurrentMonth(date) {\n        return date && this._hasSameMonthAndYear(date, this.activeDate)\n            ? this._dateAdapter.getDate(date)\n            : null;\n    }\n    /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */\n    _hasSameMonthAndYear(d1, d2) {\n        return !!(d1 &&\n            d2 &&\n            this._dateAdapter.getMonth(d1) == this._dateAdapter.getMonth(d2) &&\n            this._dateAdapter.getYear(d1) == this._dateAdapter.getYear(d2));\n    }\n    /** Gets the value that will be used to one cell to another. */\n    _getCellCompareValue(date) {\n        if (date) {\n            // We use the time since the Unix epoch to compare dates in this view, rather than the\n            // cell values, because we need to support ranges that span across multiple months/years.\n            const year = this._dateAdapter.getYear(date);\n            const month = this._dateAdapter.getMonth(date);\n            const day = this._dateAdapter.getDate(date);\n            return new Date(year, month, day).getTime();\n        }\n        return null;\n    }\n    /** Determines whether the user has the RTL layout direction. */\n    _isRtl() {\n        return this._dir && this._dir.value === 'rtl';\n    }\n    /** Sets the current range based on a model value. */\n    _setRanges(selectedValue) {\n        if (selectedValue instanceof DateRange) {\n            this._rangeStart = this._getCellCompareValue(selectedValue.start);\n            this._rangeEnd = this._getCellCompareValue(selectedValue.end);\n            this._isRange = true;\n        }\n        else {\n            this._rangeStart = this._rangeEnd = this._getCellCompareValue(selectedValue);\n            this._isRange = false;\n        }\n        this._comparisonRangeStart = this._getCellCompareValue(this.comparisonStart);\n        this._comparisonRangeEnd = this._getCellCompareValue(this.comparisonEnd);\n    }\n    /** Gets whether a date can be selected in the month view. */\n    _canSelect(date) {\n        return !this.dateFilter || this.dateFilter(date);\n    }\n    /** Clears out preview state. */\n    _clearPreview() {\n        this._previewStart = this._previewEnd = null;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatMonthView, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"19.0.0\", type: MatMonthView, isStandalone: true, selector: \"mat-month-view\", inputs: { activeDate: \"activeDate\", selected: \"selected\", minDate: \"minDate\", maxDate: \"maxDate\", dateFilter: \"dateFilter\", dateClass: \"dateClass\", comparisonStart: \"comparisonStart\", comparisonEnd: \"comparisonEnd\", startDateAccessibleName: \"startDateAccessibleName\", endDateAccessibleName: \"endDateAccessibleName\", activeDrag: \"activeDrag\" }, outputs: { selectedChange: \"selectedChange\", _userSelection: \"_userSelection\", dragStarted: \"dragStarted\", dragEnded: \"dragEnded\", activeDateChange: \"activeDateChange\" }, viewQueries: [{ propertyName: \"_matCalendarBody\", first: true, predicate: MatCalendarBody, descendants: true }], exportAs: [\"matMonthView\"], usesOnChanges: true, ngImport: i0, template: \"<table class=\\\"mat-calendar-table\\\" role=\\\"grid\\\">\\n  <thead class=\\\"mat-calendar-table-header\\\">\\n    <tr>\\n      @for (day of _weekdays; track day.id) {\\n        <th scope=\\\"col\\\">\\n          <span class=\\\"cdk-visually-hidden\\\">{{day.long}}</span>\\n          <span aria-hidden=\\\"true\\\">{{day.narrow}}</span>\\n        </th>\\n      }\\n    </tr>\\n    <tr aria-hidden=\\\"true\\\"><th class=\\\"mat-calendar-table-header-divider\\\" colspan=\\\"7\\\"></th></tr>\\n  </thead>\\n  <tbody mat-calendar-body\\n         [label]=\\\"_monthLabel\\\"\\n         [rows]=\\\"_weeks\\\"\\n         [todayValue]=\\\"_todayDate!\\\"\\n         [startValue]=\\\"_rangeStart!\\\"\\n         [endValue]=\\\"_rangeEnd!\\\"\\n         [comparisonStart]=\\\"_comparisonRangeStart\\\"\\n         [comparisonEnd]=\\\"_comparisonRangeEnd\\\"\\n         [previewStart]=\\\"_previewStart\\\"\\n         [previewEnd]=\\\"_previewEnd\\\"\\n         [isRange]=\\\"_isRange\\\"\\n         [labelMinRequiredCells]=\\\"3\\\"\\n         [activeCell]=\\\"_dateAdapter.getDate(activeDate) - 1\\\"\\n         [startDateAccessibleName]=\\\"startDateAccessibleName\\\"\\n         [endDateAccessibleName]=\\\"endDateAccessibleName\\\"\\n         (selectedValueChange)=\\\"_dateSelected($event)\\\"\\n         (activeDateChange)=\\\"_updateActiveDate($event)\\\"\\n         (previewChange)=\\\"_previewChanged($event)\\\"\\n         (dragStarted)=\\\"dragStarted.emit($event)\\\"\\n         (dragEnded)=\\\"_dragEnded($event)\\\"\\n         (keyup)=\\\"_handleCalendarBodyKeyup($event)\\\"\\n         (keydown)=\\\"_handleCalendarBodyKeydown($event)\\\">\\n  </tbody>\\n</table>\\n\", dependencies: [{ kind: \"component\", type: MatCalendarBody, selector: \"[mat-calendar-body]\", inputs: [\"label\", \"rows\", \"todayValue\", \"startValue\", \"endValue\", \"labelMinRequiredCells\", \"numCols\", \"activeCell\", \"isRange\", \"cellAspectRatio\", \"comparisonStart\", \"comparisonEnd\", \"previewStart\", \"previewEnd\", \"startDateAccessibleName\", \"endDateAccessibleName\"], outputs: [\"selectedValueChange\", \"previewChange\", \"activeDateChange\", \"dragStarted\", \"dragEnded\"], exportAs: [\"matCalendarBody\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatMonthView, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-month-view', exportAs: 'matMonthView', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCalendarBody], template: \"<table class=\\\"mat-calendar-table\\\" role=\\\"grid\\\">\\n  <thead class=\\\"mat-calendar-table-header\\\">\\n    <tr>\\n      @for (day of _weekdays; track day.id) {\\n        <th scope=\\\"col\\\">\\n          <span class=\\\"cdk-visually-hidden\\\">{{day.long}}</span>\\n          <span aria-hidden=\\\"true\\\">{{day.narrow}}</span>\\n        </th>\\n      }\\n    </tr>\\n    <tr aria-hidden=\\\"true\\\"><th class=\\\"mat-calendar-table-header-divider\\\" colspan=\\\"7\\\"></th></tr>\\n  </thead>\\n  <tbody mat-calendar-body\\n         [label]=\\\"_monthLabel\\\"\\n         [rows]=\\\"_weeks\\\"\\n         [todayValue]=\\\"_todayDate!\\\"\\n         [startValue]=\\\"_rangeStart!\\\"\\n         [endValue]=\\\"_rangeEnd!\\\"\\n         [comparisonStart]=\\\"_comparisonRangeStart\\\"\\n         [comparisonEnd]=\\\"_comparisonRangeEnd\\\"\\n         [previewStart]=\\\"_previewStart\\\"\\n         [previewEnd]=\\\"_previewEnd\\\"\\n         [isRange]=\\\"_isRange\\\"\\n         [labelMinRequiredCells]=\\\"3\\\"\\n         [activeCell]=\\\"_dateAdapter.getDate(activeDate) - 1\\\"\\n         [startDateAccessibleName]=\\\"startDateAccessibleName\\\"\\n         [endDateAccessibleName]=\\\"endDateAccessibleName\\\"\\n         (selectedValueChange)=\\\"_dateSelected($event)\\\"\\n         (activeDateChange)=\\\"_updateActiveDate($event)\\\"\\n         (previewChange)=\\\"_previewChanged($event)\\\"\\n         (dragStarted)=\\\"dragStarted.emit($event)\\\"\\n         (dragEnded)=\\\"_dragEnded($event)\\\"\\n         (keyup)=\\\"_handleCalendarBodyKeyup($event)\\\"\\n         (keydown)=\\\"_handleCalendarBodyKeydown($event)\\\">\\n  </tbody>\\n</table>\\n\" }]\n        }], ctorParameters: () => [], propDecorators: { activeDate: [{\n                type: Input\n            }], selected: [{\n                type: Input\n            }], minDate: [{\n                type: Input\n            }], maxDate: [{\n                type: Input\n            }], dateFilter: [{\n                type: Input\n            }], dateClass: [{\n                type: Input\n            }], comparisonStart: [{\n                type: Input\n            }], comparisonEnd: [{\n                type: Input\n            }], startDateAccessibleName: [{\n                type: Input\n            }], endDateAccessibleName: [{\n                type: Input\n            }], activeDrag: [{\n                type: Input\n            }], selectedChange: [{\n                type: Output\n            }], _userSelection: [{\n                type: Output\n            }], dragStarted: [{\n                type: Output\n            }], dragEnded: [{\n                type: Output\n            }], activeDateChange: [{\n                type: Output\n            }], _matCalendarBody: [{\n                type: ViewChild,\n                args: [MatCalendarBody]\n            }] } });\n\nconst yearsPerPage = 24;\nconst yearsPerRow = 4;\n/**\n * An internal component used to display a year selector in the datepicker.\n * @docs-private\n */\nclass MatMultiYearView {\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _dateAdapter = inject(DateAdapter, { optional: true });\n    _dir = inject(Directionality, { optional: true });\n    _rerenderSubscription = Subscription.EMPTY;\n    /** Flag used to filter out space/enter keyup events that originated outside of the view. */\n    _selectionKeyPressed;\n    /** The date to display in this multi-year view (everything other than the year is ignored). */\n    get activeDate() {\n        return this._activeDate;\n    }\n    set activeDate(value) {\n        let oldActiveDate = this._activeDate;\n        const validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) ||\n            this._dateAdapter.today();\n        this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n        if (!isSameMultiYearView(this._dateAdapter, oldActiveDate, this._activeDate, this.minDate, this.maxDate)) {\n            this._init();\n        }\n    }\n    _activeDate;\n    /** The currently selected date. */\n    get selected() {\n        return this._selected;\n    }\n    set selected(value) {\n        if (value instanceof DateRange) {\n            this._selected = value;\n        }\n        else {\n            this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n        }\n        this._setSelectedYear(value);\n    }\n    _selected;\n    /** The minimum selectable date. */\n    get minDate() {\n        return this._minDate;\n    }\n    set minDate(value) {\n        this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n    }\n    _minDate;\n    /** The maximum selectable date. */\n    get maxDate() {\n        return this._maxDate;\n    }\n    set maxDate(value) {\n        this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n    }\n    _maxDate;\n    /** A function used to filter which dates are selectable. */\n    dateFilter;\n    /** Function that can be used to add custom CSS classes to date cells. */\n    dateClass;\n    /** Emits when a new year is selected. */\n    selectedChange = new EventEmitter();\n    /** Emits the selected year. This doesn't imply a change on the selected date */\n    yearSelected = new EventEmitter();\n    /** Emits when any date is activated. */\n    activeDateChange = new EventEmitter();\n    /** The body of calendar table */\n    _matCalendarBody;\n    /** Grid of calendar cells representing the currently displayed years. */\n    _years;\n    /** The year that today falls on. */\n    _todayYear;\n    /** The year of the selected date. Null if the selected date is null. */\n    _selectedYear;\n    constructor() {\n        if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw createMissingDateImplError('DateAdapter');\n        }\n        this._activeDate = this._dateAdapter.today();\n    }\n    ngAfterContentInit() {\n        this._rerenderSubscription = this._dateAdapter.localeChanges\n            .pipe(startWith(null))\n            .subscribe(() => this._init());\n    }\n    ngOnDestroy() {\n        this._rerenderSubscription.unsubscribe();\n    }\n    /** Initializes this multi-year view. */\n    _init() {\n        this._todayYear = this._dateAdapter.getYear(this._dateAdapter.today());\n        // We want a range years such that we maximize the number of\n        // enabled dates visible at once. This prevents issues where the minimum year\n        // is the last item of a page OR the maximum year is the first item of a page.\n        // The offset from the active year to the \"slot\" for the starting year is the\n        // *actual* first rendered year in the multi-year view.\n        const activeYear = this._dateAdapter.getYear(this._activeDate);\n        const minYearOfPage = activeYear - getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate);\n        this._years = [];\n        for (let i = 0, row = []; i < yearsPerPage; i++) {\n            row.push(minYearOfPage + i);\n            if (row.length == yearsPerRow) {\n                this._years.push(row.map(year => this._createCellForYear(year)));\n                row = [];\n            }\n        }\n        this._changeDetectorRef.markForCheck();\n    }\n    /** Handles when a new year is selected. */\n    _yearSelected(event) {\n        const year = event.value;\n        const selectedYear = this._dateAdapter.createDate(year, 0, 1);\n        const selectedDate = this._getDateFromYear(year);\n        this.yearSelected.emit(selectedYear);\n        this.selectedChange.emit(selectedDate);\n    }\n    /**\n     * Takes the index of a calendar body cell wrapped in an event as argument. For the date that\n     * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with\n     * that date.\n     *\n     * This function is used to match each component's model of the active date with the calendar\n     * body cell that was focused. It updates its value of `activeDate` synchronously and updates the\n     * parent's value asynchronously via the `activeDateChange` event. The child component receives an\n     * updated value asynchronously via the `activeCell` Input.\n     */\n    _updateActiveDate(event) {\n        const year = event.value;\n        const oldActiveDate = this._activeDate;\n        this.activeDate = this._getDateFromYear(year);\n        if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n            this.activeDateChange.emit(this.activeDate);\n        }\n    }\n    /** Handles keydown events on the calendar body when calendar is in multi-year view. */\n    _handleCalendarBodyKeydown(event) {\n        const oldActiveDate = this._activeDate;\n        const isRtl = this._isRtl();\n        switch (event.keyCode) {\n            case LEFT_ARROW:\n                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? 1 : -1);\n                break;\n            case RIGHT_ARROW:\n                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? -1 : 1);\n                break;\n            case UP_ARROW:\n                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -yearsPerRow);\n                break;\n            case DOWN_ARROW:\n                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, yearsPerRow);\n                break;\n            case HOME:\n                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, -getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate));\n                break;\n            case END:\n                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, yearsPerPage -\n                    getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate) -\n                    1);\n                break;\n            case PAGE_UP:\n                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? -yearsPerPage * 10 : -yearsPerPage);\n                break;\n            case PAGE_DOWN:\n                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? yearsPerPage * 10 : yearsPerPage);\n                break;\n            case ENTER:\n            case SPACE:\n                // Note that we only prevent the default action here while the selection happens in\n                // `keyup` below. We can't do the selection here, because it can cause the calendar to\n                // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`\n                // because it's too late (see #23305).\n                this._selectionKeyPressed = true;\n                break;\n            default:\n                // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n                return;\n        }\n        if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n            this.activeDateChange.emit(this.activeDate);\n        }\n        this._focusActiveCellAfterViewChecked();\n        // Prevent unexpected default actions such as form submission.\n        event.preventDefault();\n    }\n    /** Handles keyup events on the calendar body when calendar is in multi-year view. */\n    _handleCalendarBodyKeyup(event) {\n        if (event.keyCode === SPACE || event.keyCode === ENTER) {\n            if (this._selectionKeyPressed) {\n                this._yearSelected({ value: this._dateAdapter.getYear(this._activeDate), event });\n            }\n            this._selectionKeyPressed = false;\n        }\n    }\n    _getActiveCell() {\n        return getActiveOffset(this._dateAdapter, this.activeDate, this.minDate, this.maxDate);\n    }\n    /** Focuses the active cell after the microtask queue is empty. */\n    _focusActiveCell() {\n        this._matCalendarBody._focusActiveCell();\n    }\n    /** Focuses the active cell after change detection has run and the microtask queue is empty. */\n    _focusActiveCellAfterViewChecked() {\n        this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked();\n    }\n    /**\n     * Takes a year and returns a new date on the same day and month as the currently active date\n     *  The returned date will have the same year as the argument date.\n     */\n    _getDateFromYear(year) {\n        const activeMonth = this._dateAdapter.getMonth(this.activeDate);\n        const daysInMonth = this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(year, activeMonth, 1));\n        const normalizedDate = this._dateAdapter.createDate(year, activeMonth, Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth));\n        return normalizedDate;\n    }\n    /** Creates an MatCalendarCell for the given year. */\n    _createCellForYear(year) {\n        const date = this._dateAdapter.createDate(year, 0, 1);\n        const yearName = this._dateAdapter.getYearName(date);\n        const cellClasses = this.dateClass ? this.dateClass(date, 'multi-year') : undefined;\n        return new MatCalendarCell(year, yearName, yearName, this._shouldEnableYear(year), cellClasses);\n    }\n    /** Whether the given year is enabled. */\n    _shouldEnableYear(year) {\n        // disable if the year is greater than maxDate lower than minDate\n        if (year === undefined ||\n            year === null ||\n            (this.maxDate && year > this._dateAdapter.getYear(this.maxDate)) ||\n            (this.minDate && year < this._dateAdapter.getYear(this.minDate))) {\n            return false;\n        }\n        // enable if it reaches here and there's no filter defined\n        if (!this.dateFilter) {\n            return true;\n        }\n        const firstOfYear = this._dateAdapter.createDate(year, 0, 1);\n        // If any date in the year is enabled count the year as enabled.\n        for (let date = firstOfYear; this._dateAdapter.getYear(date) == year; date = this._dateAdapter.addCalendarDays(date, 1)) {\n            if (this.dateFilter(date)) {\n                return true;\n            }\n        }\n        return false;\n    }\n    /** Determines whether the user has the RTL layout direction. */\n    _isRtl() {\n        return this._dir && this._dir.value === 'rtl';\n    }\n    /** Sets the currently-highlighted year based on a model value. */\n    _setSelectedYear(value) {\n        this._selectedYear = null;\n        if (value instanceof DateRange) {\n            const displayValue = value.start || value.end;\n            if (displayValue) {\n                this._selectedYear = this._dateAdapter.getYear(displayValue);\n            }\n        }\n        else if (value) {\n            this._selectedYear = this._dateAdapter.getYear(value);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatMultiYearView, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatMultiYearView, isStandalone: true, selector: \"mat-multi-year-view\", inputs: { activeDate: \"activeDate\", selected: \"selected\", minDate: \"minDate\", maxDate: \"maxDate\", dateFilter: \"dateFilter\", dateClass: \"dateClass\" }, outputs: { selectedChange: \"selectedChange\", yearSelected: \"yearSelected\", activeDateChange: \"activeDateChange\" }, viewQueries: [{ propertyName: \"_matCalendarBody\", first: true, predicate: MatCalendarBody, descendants: true }], exportAs: [\"matMultiYearView\"], ngImport: i0, template: \"<table class=\\\"mat-calendar-table\\\" role=\\\"grid\\\">\\n  <thead aria-hidden=\\\"true\\\" class=\\\"mat-calendar-table-header\\\">\\n    <tr><th class=\\\"mat-calendar-table-header-divider\\\" colspan=\\\"4\\\"></th></tr>\\n  </thead>\\n  <tbody mat-calendar-body\\n         [rows]=\\\"_years\\\"\\n         [todayValue]=\\\"_todayYear\\\"\\n         [startValue]=\\\"_selectedYear!\\\"\\n         [endValue]=\\\"_selectedYear!\\\"\\n         [numCols]=\\\"4\\\"\\n         [cellAspectRatio]=\\\"4 / 7\\\"\\n         [activeCell]=\\\"_getActiveCell()\\\"\\n         (selectedValueChange)=\\\"_yearSelected($event)\\\"\\n         (activeDateChange)=\\\"_updateActiveDate($event)\\\"\\n         (keyup)=\\\"_handleCalendarBodyKeyup($event)\\\"\\n         (keydown)=\\\"_handleCalendarBodyKeydown($event)\\\">\\n  </tbody>\\n</table>\\n\", dependencies: [{ kind: \"component\", type: MatCalendarBody, selector: \"[mat-calendar-body]\", inputs: [\"label\", \"rows\", \"todayValue\", \"startValue\", \"endValue\", \"labelMinRequiredCells\", \"numCols\", \"activeCell\", \"isRange\", \"cellAspectRatio\", \"comparisonStart\", \"comparisonEnd\", \"previewStart\", \"previewEnd\", \"startDateAccessibleName\", \"endDateAccessibleName\"], outputs: [\"selectedValueChange\", \"previewChange\", \"activeDateChange\", \"dragStarted\", \"dragEnded\"], exportAs: [\"matCalendarBody\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatMultiYearView, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-multi-year-view', exportAs: 'matMultiYearView', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCalendarBody], template: \"<table class=\\\"mat-calendar-table\\\" role=\\\"grid\\\">\\n  <thead aria-hidden=\\\"true\\\" class=\\\"mat-calendar-table-header\\\">\\n    <tr><th class=\\\"mat-calendar-table-header-divider\\\" colspan=\\\"4\\\"></th></tr>\\n  </thead>\\n  <tbody mat-calendar-body\\n         [rows]=\\\"_years\\\"\\n         [todayValue]=\\\"_todayYear\\\"\\n         [startValue]=\\\"_selectedYear!\\\"\\n         [endValue]=\\\"_selectedYear!\\\"\\n         [numCols]=\\\"4\\\"\\n         [cellAspectRatio]=\\\"4 / 7\\\"\\n         [activeCell]=\\\"_getActiveCell()\\\"\\n         (selectedValueChange)=\\\"_yearSelected($event)\\\"\\n         (activeDateChange)=\\\"_updateActiveDate($event)\\\"\\n         (keyup)=\\\"_handleCalendarBodyKeyup($event)\\\"\\n         (keydown)=\\\"_handleCalendarBodyKeydown($event)\\\">\\n  </tbody>\\n</table>\\n\" }]\n        }], ctorParameters: () => [], propDecorators: { activeDate: [{\n                type: Input\n            }], selected: [{\n                type: Input\n            }], minDate: [{\n                type: Input\n            }], maxDate: [{\n                type: Input\n            }], dateFilter: [{\n                type: Input\n            }], dateClass: [{\n                type: Input\n            }], selectedChange: [{\n                type: Output\n            }], yearSelected: [{\n                type: Output\n            }], activeDateChange: [{\n                type: Output\n            }], _matCalendarBody: [{\n                type: ViewChild,\n                args: [MatCalendarBody]\n            }] } });\nfunction isSameMultiYearView(dateAdapter, date1, date2, minDate, maxDate) {\n    const year1 = dateAdapter.getYear(date1);\n    const year2 = dateAdapter.getYear(date2);\n    const startingYear = getStartingYear(dateAdapter, minDate, maxDate);\n    return (Math.floor((year1 - startingYear) / yearsPerPage) ===\n        Math.floor((year2 - startingYear) / yearsPerPage));\n}\n/**\n * When the multi-year view is first opened, the active year will be in view.\n * So we compute how many years are between the active year and the *slot* where our\n * \"startingYear\" will render when paged into view.\n */\nfunction getActiveOffset(dateAdapter, activeDate, minDate, maxDate) {\n    const activeYear = dateAdapter.getYear(activeDate);\n    return euclideanModulo(activeYear - getStartingYear(dateAdapter, minDate, maxDate), yearsPerPage);\n}\n/**\n * We pick a \"starting\" year such that either the maximum year would be at the end\n * or the minimum year would be at the beginning of a page.\n */\nfunction getStartingYear(dateAdapter, minDate, maxDate) {\n    let startingYear = 0;\n    if (maxDate) {\n        const maxYear = dateAdapter.getYear(maxDate);\n        startingYear = maxYear - yearsPerPage + 1;\n    }\n    else if (minDate) {\n        startingYear = dateAdapter.getYear(minDate);\n    }\n    return startingYear;\n}\n/** Gets remainder that is non-negative, even if first number is negative */\nfunction euclideanModulo(a, b) {\n    return ((a % b) + b) % b;\n}\n\n/**\n * An internal component used to display a single year in the datepicker.\n * @docs-private\n */\nclass MatYearView {\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _dateFormats = inject(MAT_DATE_FORMATS, { optional: true });\n    _dateAdapter = inject(DateAdapter, { optional: true });\n    _dir = inject(Directionality, { optional: true });\n    _rerenderSubscription = Subscription.EMPTY;\n    /** Flag used to filter out space/enter keyup events that originated outside of the view. */\n    _selectionKeyPressed;\n    /** The date to display in this year view (everything other than the year is ignored). */\n    get activeDate() {\n        return this._activeDate;\n    }\n    set activeDate(value) {\n        let oldActiveDate = this._activeDate;\n        const validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) ||\n            this._dateAdapter.today();\n        this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);\n        if (this._dateAdapter.getYear(oldActiveDate) !== this._dateAdapter.getYear(this._activeDate)) {\n            this._init();\n        }\n    }\n    _activeDate;\n    /** The currently selected date. */\n    get selected() {\n        return this._selected;\n    }\n    set selected(value) {\n        if (value instanceof DateRange) {\n            this._selected = value;\n        }\n        else {\n            this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n        }\n        this._setSelectedMonth(value);\n    }\n    _selected;\n    /** The minimum selectable date. */\n    get minDate() {\n        return this._minDate;\n    }\n    set minDate(value) {\n        this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n    }\n    _minDate;\n    /** The maximum selectable date. */\n    get maxDate() {\n        return this._maxDate;\n    }\n    set maxDate(value) {\n        this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n    }\n    _maxDate;\n    /** A function used to filter which dates are selectable. */\n    dateFilter;\n    /** Function that can be used to add custom CSS classes to date cells. */\n    dateClass;\n    /** Emits when a new month is selected. */\n    selectedChange = new EventEmitter();\n    /** Emits the selected month. This doesn't imply a change on the selected date */\n    monthSelected = new EventEmitter();\n    /** Emits when any date is activated. */\n    activeDateChange = new EventEmitter();\n    /** The body of calendar table */\n    _matCalendarBody;\n    /** Grid of calendar cells representing the months of the year. */\n    _months;\n    /** The label for this year (e.g. \"2017\"). */\n    _yearLabel;\n    /** The month in this year that today falls on. Null if today is in a different year. */\n    _todayMonth;\n    /**\n     * The month in this year that the selected Date falls on.\n     * Null if the selected Date is in a different year.\n     */\n    _selectedMonth;\n    constructor() {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (!this._dateAdapter) {\n                throw createMissingDateImplError('DateAdapter');\n            }\n            if (!this._dateFormats) {\n                throw createMissingDateImplError('MAT_DATE_FORMATS');\n            }\n        }\n        this._activeDate = this._dateAdapter.today();\n    }\n    ngAfterContentInit() {\n        this._rerenderSubscription = this._dateAdapter.localeChanges\n            .pipe(startWith(null))\n            .subscribe(() => this._init());\n    }\n    ngOnDestroy() {\n        this._rerenderSubscription.unsubscribe();\n    }\n    /** Handles when a new month is selected. */\n    _monthSelected(event) {\n        const month = event.value;\n        const selectedMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);\n        this.monthSelected.emit(selectedMonth);\n        const selectedDate = this._getDateFromMonth(month);\n        this.selectedChange.emit(selectedDate);\n    }\n    /**\n     * Takes the index of a calendar body cell wrapped in an event as argument. For the date that\n     * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with\n     * that date.\n     *\n     * This function is used to match each component's model of the active date with the calendar\n     * body cell that was focused. It updates its value of `activeDate` synchronously and updates the\n     * parent's value asynchronously via the `activeDateChange` event. The child component receives an\n     * updated value asynchronously via the `activeCell` Input.\n     */\n    _updateActiveDate(event) {\n        const month = event.value;\n        const oldActiveDate = this._activeDate;\n        this.activeDate = this._getDateFromMonth(month);\n        if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n            this.activeDateChange.emit(this.activeDate);\n        }\n    }\n    /** Handles keydown events on the calendar body when calendar is in year view. */\n    _handleCalendarBodyKeydown(event) {\n        // TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent\n        // disabled ones from being selected. This may not be ideal, we should look into whether\n        // navigation should skip over disabled dates, and if so, how to implement that efficiently.\n        const oldActiveDate = this._activeDate;\n        const isRtl = this._isRtl();\n        switch (event.keyCode) {\n            case LEFT_ARROW:\n                this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? 1 : -1);\n                break;\n            case RIGHT_ARROW:\n                this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, isRtl ? -1 : 1);\n                break;\n            case UP_ARROW:\n                this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -4);\n                break;\n            case DOWN_ARROW:\n                this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 4);\n                break;\n            case HOME:\n                this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, -this._dateAdapter.getMonth(this._activeDate));\n                break;\n            case END:\n                this.activeDate = this._dateAdapter.addCalendarMonths(this._activeDate, 11 - this._dateAdapter.getMonth(this._activeDate));\n                break;\n            case PAGE_UP:\n                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? -10 : -1);\n                break;\n            case PAGE_DOWN:\n                this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, event.altKey ? 10 : 1);\n                break;\n            case ENTER:\n            case SPACE:\n                // Note that we only prevent the default action here while the selection happens in\n                // `keyup` below. We can't do the selection here, because it can cause the calendar to\n                // reopen if focus is restored immediately. We also can't call `preventDefault` on `keyup`\n                // because it's too late (see #23305).\n                this._selectionKeyPressed = true;\n                break;\n            default:\n                // Don't prevent default or focus active cell on keys that we don't explicitly handle.\n                return;\n        }\n        if (this._dateAdapter.compareDate(oldActiveDate, this.activeDate)) {\n            this.activeDateChange.emit(this.activeDate);\n            this._focusActiveCellAfterViewChecked();\n        }\n        // Prevent unexpected default actions such as form submission.\n        event.preventDefault();\n    }\n    /** Handles keyup events on the calendar body when calendar is in year view. */\n    _handleCalendarBodyKeyup(event) {\n        if (event.keyCode === SPACE || event.keyCode === ENTER) {\n            if (this._selectionKeyPressed) {\n                this._monthSelected({ value: this._dateAdapter.getMonth(this._activeDate), event });\n            }\n            this._selectionKeyPressed = false;\n        }\n    }\n    /** Initializes this year view. */\n    _init() {\n        this._setSelectedMonth(this.selected);\n        this._todayMonth = this._getMonthInCurrentYear(this._dateAdapter.today());\n        this._yearLabel = this._dateAdapter.getYearName(this.activeDate);\n        let monthNames = this._dateAdapter.getMonthNames('short');\n        // First row of months only contains 5 elements so we can fit the year label on the same row.\n        this._months = [\n            [0, 1, 2, 3],\n            [4, 5, 6, 7],\n            [8, 9, 10, 11],\n        ].map(row => row.map(month => this._createCellForMonth(month, monthNames[month])));\n        this._changeDetectorRef.markForCheck();\n    }\n    /** Focuses the active cell after the microtask queue is empty. */\n    _focusActiveCell() {\n        this._matCalendarBody._focusActiveCell();\n    }\n    /** Schedules the matCalendarBody to focus the active cell after change detection has run */\n    _focusActiveCellAfterViewChecked() {\n        this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked();\n    }\n    /**\n     * Gets the month in this year that the given Date falls on.\n     * Returns null if the given Date is in another year.\n     */\n    _getMonthInCurrentYear(date) {\n        return date && this._dateAdapter.getYear(date) == this._dateAdapter.getYear(this.activeDate)\n            ? this._dateAdapter.getMonth(date)\n            : null;\n    }\n    /**\n     * Takes a month and returns a new date in the same day and year as the currently active date.\n     *  The returned date will have the same month as the argument date.\n     */\n    _getDateFromMonth(month) {\n        const normalizedDate = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);\n        const daysInMonth = this._dateAdapter.getNumDaysInMonth(normalizedDate);\n        return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, Math.min(this._dateAdapter.getDate(this.activeDate), daysInMonth));\n    }\n    /** Creates an MatCalendarCell for the given month. */\n    _createCellForMonth(month, monthName) {\n        const date = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), month, 1);\n        const ariaLabel = this._dateAdapter.format(date, this._dateFormats.display.monthYearA11yLabel);\n        const cellClasses = this.dateClass ? this.dateClass(date, 'year') : undefined;\n        return new MatCalendarCell(month, monthName.toLocaleUpperCase(), ariaLabel, this._shouldEnableMonth(month), cellClasses);\n    }\n    /** Whether the given month is enabled. */\n    _shouldEnableMonth(month) {\n        const activeYear = this._dateAdapter.getYear(this.activeDate);\n        if (month === undefined ||\n            month === null ||\n            this._isYearAndMonthAfterMaxDate(activeYear, month) ||\n            this._isYearAndMonthBeforeMinDate(activeYear, month)) {\n            return false;\n        }\n        if (!this.dateFilter) {\n            return true;\n        }\n        const firstOfMonth = this._dateAdapter.createDate(activeYear, month, 1);\n        // If any date in the month is enabled count the month as enabled.\n        for (let date = firstOfMonth; this._dateAdapter.getMonth(date) == month; date = this._dateAdapter.addCalendarDays(date, 1)) {\n            if (this.dateFilter(date)) {\n                return true;\n            }\n        }\n        return false;\n    }\n    /**\n     * Tests whether the combination month/year is after this.maxDate, considering\n     * just the month and year of this.maxDate\n     */\n    _isYearAndMonthAfterMaxDate(year, month) {\n        if (this.maxDate) {\n            const maxYear = this._dateAdapter.getYear(this.maxDate);\n            const maxMonth = this._dateAdapter.getMonth(this.maxDate);\n            return year > maxYear || (year === maxYear && month > maxMonth);\n        }\n        return false;\n    }\n    /**\n     * Tests whether the combination month/year is before this.minDate, considering\n     * just the month and year of this.minDate\n     */\n    _isYearAndMonthBeforeMinDate(year, month) {\n        if (this.minDate) {\n            const minYear = this._dateAdapter.getYear(this.minDate);\n            const minMonth = this._dateAdapter.getMonth(this.minDate);\n            return year < minYear || (year === minYear && month < minMonth);\n        }\n        return false;\n    }\n    /** Determines whether the user has the RTL layout direction. */\n    _isRtl() {\n        return this._dir && this._dir.value === 'rtl';\n    }\n    /** Sets the currently-selected month based on a model value. */\n    _setSelectedMonth(value) {\n        if (value instanceof DateRange) {\n            this._selectedMonth =\n                this._getMonthInCurrentYear(value.start) || this._getMonthInCurrentYear(value.end);\n        }\n        else {\n            this._selectedMonth = this._getMonthInCurrentYear(value);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatYearView, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatYearView, isStandalone: true, selector: \"mat-year-view\", inputs: { activeDate: \"activeDate\", selected: \"selected\", minDate: \"minDate\", maxDate: \"maxDate\", dateFilter: \"dateFilter\", dateClass: \"dateClass\" }, outputs: { selectedChange: \"selectedChange\", monthSelected: \"monthSelected\", activeDateChange: \"activeDateChange\" }, viewQueries: [{ propertyName: \"_matCalendarBody\", first: true, predicate: MatCalendarBody, descendants: true }], exportAs: [\"matYearView\"], ngImport: i0, template: \"<table class=\\\"mat-calendar-table\\\" role=\\\"grid\\\">\\n  <thead aria-hidden=\\\"true\\\" class=\\\"mat-calendar-table-header\\\">\\n    <tr><th class=\\\"mat-calendar-table-header-divider\\\" colspan=\\\"4\\\"></th></tr>\\n  </thead>\\n  <tbody mat-calendar-body\\n         [label]=\\\"_yearLabel\\\"\\n         [rows]=\\\"_months\\\"\\n         [todayValue]=\\\"_todayMonth!\\\"\\n         [startValue]=\\\"_selectedMonth!\\\"\\n         [endValue]=\\\"_selectedMonth!\\\"\\n         [labelMinRequiredCells]=\\\"2\\\"\\n         [numCols]=\\\"4\\\"\\n         [cellAspectRatio]=\\\"4 / 7\\\"\\n         [activeCell]=\\\"_dateAdapter.getMonth(activeDate)\\\"\\n         (selectedValueChange)=\\\"_monthSelected($event)\\\"\\n         (activeDateChange)=\\\"_updateActiveDate($event)\\\"\\n         (keyup)=\\\"_handleCalendarBodyKeyup($event)\\\"\\n         (keydown)=\\\"_handleCalendarBodyKeydown($event)\\\">\\n  </tbody>\\n</table>\\n\", dependencies: [{ kind: \"component\", type: MatCalendarBody, selector: \"[mat-calendar-body]\", inputs: [\"label\", \"rows\", \"todayValue\", \"startValue\", \"endValue\", \"labelMinRequiredCells\", \"numCols\", \"activeCell\", \"isRange\", \"cellAspectRatio\", \"comparisonStart\", \"comparisonEnd\", \"previewStart\", \"previewEnd\", \"startDateAccessibleName\", \"endDateAccessibleName\"], outputs: [\"selectedValueChange\", \"previewChange\", \"activeDateChange\", \"dragStarted\", \"dragEnded\"], exportAs: [\"matCalendarBody\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatYearView, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-year-view', exportAs: 'matYearView', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCalendarBody], template: \"<table class=\\\"mat-calendar-table\\\" role=\\\"grid\\\">\\n  <thead aria-hidden=\\\"true\\\" class=\\\"mat-calendar-table-header\\\">\\n    <tr><th class=\\\"mat-calendar-table-header-divider\\\" colspan=\\\"4\\\"></th></tr>\\n  </thead>\\n  <tbody mat-calendar-body\\n         [label]=\\\"_yearLabel\\\"\\n         [rows]=\\\"_months\\\"\\n         [todayValue]=\\\"_todayMonth!\\\"\\n         [startValue]=\\\"_selectedMonth!\\\"\\n         [endValue]=\\\"_selectedMonth!\\\"\\n         [labelMinRequiredCells]=\\\"2\\\"\\n         [numCols]=\\\"4\\\"\\n         [cellAspectRatio]=\\\"4 / 7\\\"\\n         [activeCell]=\\\"_dateAdapter.getMonth(activeDate)\\\"\\n         (selectedValueChange)=\\\"_monthSelected($event)\\\"\\n         (activeDateChange)=\\\"_updateActiveDate($event)\\\"\\n         (keyup)=\\\"_handleCalendarBodyKeyup($event)\\\"\\n         (keydown)=\\\"_handleCalendarBodyKeydown($event)\\\">\\n  </tbody>\\n</table>\\n\" }]\n        }], ctorParameters: () => [], propDecorators: { activeDate: [{\n                type: Input\n            }], selected: [{\n                type: Input\n            }], minDate: [{\n                type: Input\n            }], maxDate: [{\n                type: Input\n            }], dateFilter: [{\n                type: Input\n            }], dateClass: [{\n                type: Input\n            }], selectedChange: [{\n                type: Output\n            }], monthSelected: [{\n                type: Output\n            }], activeDateChange: [{\n                type: Output\n            }], _matCalendarBody: [{\n                type: ViewChild,\n                args: [MatCalendarBody]\n            }] } });\n\n/** Default header for MatCalendar */\nclass MatCalendarHeader {\n    _intl = inject(MatDatepickerIntl);\n    calendar = inject(MatCalendar);\n    _dateAdapter = inject(DateAdapter, { optional: true });\n    _dateFormats = inject(MAT_DATE_FORMATS, { optional: true });\n    constructor() {\n        inject(_CdkPrivateStyleLoader).load(_VisuallyHiddenLoader);\n        const changeDetectorRef = inject(ChangeDetectorRef);\n        this.calendar.stateChanges.subscribe(() => changeDetectorRef.markForCheck());\n    }\n    /** The display text for the current calendar view. */\n    get periodButtonText() {\n        if (this.calendar.currentView == 'month') {\n            return this._dateAdapter\n                .format(this.calendar.activeDate, this._dateFormats.display.monthYearLabel)\n                .toLocaleUpperCase();\n        }\n        if (this.calendar.currentView == 'year') {\n            return this._dateAdapter.getYearName(this.calendar.activeDate);\n        }\n        return this._intl.formatYearRange(...this._formatMinAndMaxYearLabels());\n    }\n    /** The aria description for the current calendar view. */\n    get periodButtonDescription() {\n        if (this.calendar.currentView == 'month') {\n            return this._dateAdapter\n                .format(this.calendar.activeDate, this._dateFormats.display.monthYearLabel)\n                .toLocaleUpperCase();\n        }\n        if (this.calendar.currentView == 'year') {\n            return this._dateAdapter.getYearName(this.calendar.activeDate);\n        }\n        // Format a label for the window of years displayed in the multi-year calendar view. Use\n        // `formatYearRangeLabel` because it is TTS friendly.\n        return this._intl.formatYearRangeLabel(...this._formatMinAndMaxYearLabels());\n    }\n    /** The `aria-label` for changing the calendar view. */\n    get periodButtonLabel() {\n        return this.calendar.currentView == 'month'\n            ? this._intl.switchToMultiYearViewLabel\n            : this._intl.switchToMonthViewLabel;\n    }\n    /** The label for the previous button. */\n    get prevButtonLabel() {\n        return {\n            'month': this._intl.prevMonthLabel,\n            'year': this._intl.prevYearLabel,\n            'multi-year': this._intl.prevMultiYearLabel,\n        }[this.calendar.currentView];\n    }\n    /** The label for the next button. */\n    get nextButtonLabel() {\n        return {\n            'month': this._intl.nextMonthLabel,\n            'year': this._intl.nextYearLabel,\n            'multi-year': this._intl.nextMultiYearLabel,\n        }[this.calendar.currentView];\n    }\n    /** Handles user clicks on the period label. */\n    currentPeriodClicked() {\n        this.calendar.currentView = this.calendar.currentView == 'month' ? 'multi-year' : 'month';\n    }\n    /** Handles user clicks on the previous button. */\n    previousClicked() {\n        this.calendar.activeDate =\n            this.calendar.currentView == 'month'\n                ? this._dateAdapter.addCalendarMonths(this.calendar.activeDate, -1)\n                : this._dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? -1 : -yearsPerPage);\n    }\n    /** Handles user clicks on the next button. */\n    nextClicked() {\n        this.calendar.activeDate =\n            this.calendar.currentView == 'month'\n                ? this._dateAdapter.addCalendarMonths(this.calendar.activeDate, 1)\n                : this._dateAdapter.addCalendarYears(this.calendar.activeDate, this.calendar.currentView == 'year' ? 1 : yearsPerPage);\n    }\n    /** Whether the previous period button is enabled. */\n    previousEnabled() {\n        if (!this.calendar.minDate) {\n            return true;\n        }\n        return (!this.calendar.minDate || !this._isSameView(this.calendar.activeDate, this.calendar.minDate));\n    }\n    /** Whether the next period button is enabled. */\n    nextEnabled() {\n        return (!this.calendar.maxDate || !this._isSameView(this.calendar.activeDate, this.calendar.maxDate));\n    }\n    /** Whether the two dates represent the same view in the current view mode (month or year). */\n    _isSameView(date1, date2) {\n        if (this.calendar.currentView == 'month') {\n            return (this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2) &&\n                this._dateAdapter.getMonth(date1) == this._dateAdapter.getMonth(date2));\n        }\n        if (this.calendar.currentView == 'year') {\n            return this._dateAdapter.getYear(date1) == this._dateAdapter.getYear(date2);\n        }\n        // Otherwise we are in 'multi-year' view.\n        return isSameMultiYearView(this._dateAdapter, date1, date2, this.calendar.minDate, this.calendar.maxDate);\n    }\n    /**\n     * Format two individual labels for the minimum year and maximum year available in the multi-year\n     * calendar view. Returns an array of two strings where the first string is the formatted label\n     * for the minimum year, and the second string is the formatted label for the maximum year.\n     */\n    _formatMinAndMaxYearLabels() {\n        // The offset from the active year to the \"slot\" for the starting year is the\n        // *actual* first rendered year in the multi-year view, and the last year is\n        // just yearsPerPage - 1 away.\n        const activeYear = this._dateAdapter.getYear(this.calendar.activeDate);\n        const minYearOfPage = activeYear -\n            getActiveOffset(this._dateAdapter, this.calendar.activeDate, this.calendar.minDate, this.calendar.maxDate);\n        const maxYearOfPage = minYearOfPage + yearsPerPage - 1;\n        const minYearLabel = this._dateAdapter.getYearName(this._dateAdapter.createDate(minYearOfPage, 0, 1));\n        const maxYearLabel = this._dateAdapter.getYearName(this._dateAdapter.createDate(maxYearOfPage, 0, 1));\n        return [minYearLabel, maxYearLabel];\n    }\n    _periodButtonLabelId = inject(_IdGenerator).getId('mat-calendar-period-label-');\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCalendarHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatCalendarHeader, isStandalone: true, selector: \"mat-calendar-header\", exportAs: [\"matCalendarHeader\"], ngImport: i0, template: \"<div class=\\\"mat-calendar-header\\\">\\n  <div class=\\\"mat-calendar-controls\\\">\\n    <!-- [Firefox Issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1880533]\\n      Relocated label next to related button and made visually hidden via cdk-visually-hidden\\n      to enable label to appear in a11y tree for SR when using Firefox -->\\n    <span [id]=\\\"_periodButtonLabelId\\\" class=\\\"cdk-visually-hidden\\\" aria-live=\\\"polite\\\">{{periodButtonDescription}}</span>\\n    <button mat-button type=\\\"button\\\" class=\\\"mat-calendar-period-button\\\"\\n            (click)=\\\"currentPeriodClicked()\\\" [attr.aria-label]=\\\"periodButtonLabel\\\"\\n            [attr.aria-describedby]=\\\"_periodButtonLabelId\\\">\\n      <span aria-hidden=\\\"true\\\">{{periodButtonText}}</span>\\n      <svg class=\\\"mat-calendar-arrow\\\" [class.mat-calendar-invert]=\\\"calendar.currentView !== 'month'\\\"\\n           viewBox=\\\"0 0 10 5\\\" focusable=\\\"false\\\" aria-hidden=\\\"true\\\">\\n           <polygon points=\\\"0,0 5,5 10,0\\\"/>\\n      </svg>\\n    </button>\\n\\n    <div class=\\\"mat-calendar-spacer\\\"></div>\\n\\n    <ng-content></ng-content>\\n\\n    <button mat-icon-button type=\\\"button\\\" class=\\\"mat-calendar-previous-button\\\"\\n            [disabled]=\\\"!previousEnabled()\\\" (click)=\\\"previousClicked()\\\"\\n            [attr.aria-label]=\\\"prevButtonLabel\\\">\\n      <svg viewBox=\\\"0 0 24 24\\\" focusable=\\\"false\\\" aria-hidden=\\\"true\\\">\\n        <path d=\\\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\\\"/>\\n       </svg>\\n    </button>\\n\\n    <button mat-icon-button type=\\\"button\\\" class=\\\"mat-calendar-next-button\\\"\\n            [disabled]=\\\"!nextEnabled()\\\" (click)=\\\"nextClicked()\\\"\\n            [attr.aria-label]=\\\"nextButtonLabel\\\">\\n      <svg viewBox=\\\"0 0 24 24\\\" focusable=\\\"false\\\" aria-hidden=\\\"true\\\">\\n        <path d=\\\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\\\"/>\\n      </svg>\\n    </button>\\n  </div>\\n</div>\\n\", dependencies: [{ kind: \"component\", type: MatButton, selector: \"    button[mat-button], button[mat-raised-button], button[mat-flat-button],    button[mat-stroked-button]  \", exportAs: [\"matButton\"] }, { kind: \"component\", type: MatIconButton, selector: \"button[mat-icon-button]\", exportAs: [\"matButton\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCalendarHeader, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-calendar-header', exportAs: 'matCalendarHeader', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButton, MatIconButton], template: \"<div class=\\\"mat-calendar-header\\\">\\n  <div class=\\\"mat-calendar-controls\\\">\\n    <!-- [Firefox Issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1880533]\\n      Relocated label next to related button and made visually hidden via cdk-visually-hidden\\n      to enable label to appear in a11y tree for SR when using Firefox -->\\n    <span [id]=\\\"_periodButtonLabelId\\\" class=\\\"cdk-visually-hidden\\\" aria-live=\\\"polite\\\">{{periodButtonDescription}}</span>\\n    <button mat-button type=\\\"button\\\" class=\\\"mat-calendar-period-button\\\"\\n            (click)=\\\"currentPeriodClicked()\\\" [attr.aria-label]=\\\"periodButtonLabel\\\"\\n            [attr.aria-describedby]=\\\"_periodButtonLabelId\\\">\\n      <span aria-hidden=\\\"true\\\">{{periodButtonText}}</span>\\n      <svg class=\\\"mat-calendar-arrow\\\" [class.mat-calendar-invert]=\\\"calendar.currentView !== 'month'\\\"\\n           viewBox=\\\"0 0 10 5\\\" focusable=\\\"false\\\" aria-hidden=\\\"true\\\">\\n           <polygon points=\\\"0,0 5,5 10,0\\\"/>\\n      </svg>\\n    </button>\\n\\n    <div class=\\\"mat-calendar-spacer\\\"></div>\\n\\n    <ng-content></ng-content>\\n\\n    <button mat-icon-button type=\\\"button\\\" class=\\\"mat-calendar-previous-button\\\"\\n            [disabled]=\\\"!previousEnabled()\\\" (click)=\\\"previousClicked()\\\"\\n            [attr.aria-label]=\\\"prevButtonLabel\\\">\\n      <svg viewBox=\\\"0 0 24 24\\\" focusable=\\\"false\\\" aria-hidden=\\\"true\\\">\\n        <path d=\\\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\\\"/>\\n       </svg>\\n    </button>\\n\\n    <button mat-icon-button type=\\\"button\\\" class=\\\"mat-calendar-next-button\\\"\\n            [disabled]=\\\"!nextEnabled()\\\" (click)=\\\"nextClicked()\\\"\\n            [attr.aria-label]=\\\"nextButtonLabel\\\">\\n      <svg viewBox=\\\"0 0 24 24\\\" focusable=\\\"false\\\" aria-hidden=\\\"true\\\">\\n        <path d=\\\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\\\"/>\\n      </svg>\\n    </button>\\n  </div>\\n</div>\\n\" }]\n        }], ctorParameters: () => [] });\n/** A calendar that is used as part of the datepicker. */\nclass MatCalendar {\n    _dateAdapter = inject(DateAdapter, { optional: true });\n    _dateFormats = inject(MAT_DATE_FORMATS, { optional: true });\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    /** An input indicating the type of the header component, if set. */\n    headerComponent;\n    /** A portal containing the header component type for this calendar. */\n    _calendarHeaderPortal;\n    _intlChanges;\n    /**\n     * Used for scheduling that focus should be moved to the active cell on the next tick.\n     * We need to schedule it, rather than do it immediately, because we have to wait\n     * for Angular to re-evaluate the view children.\n     */\n    _moveFocusOnNextTick = false;\n    /** A date representing the period (month or year) to start the calendar in. */\n    get startAt() {\n        return this._startAt;\n    }\n    set startAt(value) {\n        this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n    }\n    _startAt;\n    /** Whether the calendar should be started in month or year view. */\n    startView = 'month';\n    /** The currently selected date. */\n    get selected() {\n        return this._selected;\n    }\n    set selected(value) {\n        if (value instanceof DateRange) {\n            this._selected = value;\n        }\n        else {\n            this._selected = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n        }\n    }\n    _selected;\n    /** The minimum selectable date. */\n    get minDate() {\n        return this._minDate;\n    }\n    set minDate(value) {\n        this._minDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n    }\n    _minDate;\n    /** The maximum selectable date. */\n    get maxDate() {\n        return this._maxDate;\n    }\n    set maxDate(value) {\n        this._maxDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n    }\n    _maxDate;\n    /** Function used to filter which dates are selectable. */\n    dateFilter;\n    /** Function that can be used to add custom CSS classes to dates. */\n    dateClass;\n    /** Start of the comparison range. */\n    comparisonStart;\n    /** End of the comparison range. */\n    comparisonEnd;\n    /** ARIA Accessible name of the `<input matStartDate/>` */\n    startDateAccessibleName;\n    /** ARIA Accessible name of the `<input matEndDate/>` */\n    endDateAccessibleName;\n    /** Emits when the currently selected date changes. */\n    selectedChange = new EventEmitter();\n    /**\n     * Emits the year chosen in multiyear view.\n     * This doesn't imply a change on the selected date.\n     */\n    yearSelected = new EventEmitter();\n    /**\n     * Emits the month chosen in year view.\n     * This doesn't imply a change on the selected date.\n     */\n    monthSelected = new EventEmitter();\n    /**\n     * Emits when the current view changes.\n     */\n    viewChanged = new EventEmitter(true);\n    /** Emits when any date is selected. */\n    _userSelection = new EventEmitter();\n    /** Emits a new date range value when the user completes a drag drop operation. */\n    _userDragDrop = new EventEmitter();\n    /** Reference to the current month view component. */\n    monthView;\n    /** Reference to the current year view component. */\n    yearView;\n    /** Reference to the current multi-year view component. */\n    multiYearView;\n    /**\n     * The current active date. This determines which time period is shown and which date is\n     * highlighted when using keyboard navigation.\n     */\n    get activeDate() {\n        return this._clampedActiveDate;\n    }\n    set activeDate(value) {\n        this._clampedActiveDate = this._dateAdapter.clampDate(value, this.minDate, this.maxDate);\n        this.stateChanges.next();\n        this._changeDetectorRef.markForCheck();\n    }\n    _clampedActiveDate;\n    /** Whether the calendar is in month view. */\n    get currentView() {\n        return this._currentView;\n    }\n    set currentView(value) {\n        const viewChangedResult = this._currentView !== value ? value : null;\n        this._currentView = value;\n        this._moveFocusOnNextTick = true;\n        this._changeDetectorRef.markForCheck();\n        if (viewChangedResult) {\n            this.viewChanged.emit(viewChangedResult);\n        }\n    }\n    _currentView;\n    /** Origin of active drag, or null when dragging is not active. */\n    _activeDrag = null;\n    /**\n     * Emits whenever there is a state change that the header may need to respond to.\n     */\n    stateChanges = new Subject();\n    constructor() {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (!this._dateAdapter) {\n                throw createMissingDateImplError('DateAdapter');\n            }\n            if (!this._dateFormats) {\n                throw createMissingDateImplError('MAT_DATE_FORMATS');\n            }\n        }\n        this._intlChanges = inject(MatDatepickerIntl).changes.subscribe(() => {\n            this._changeDetectorRef.markForCheck();\n            this.stateChanges.next();\n        });\n    }\n    ngAfterContentInit() {\n        this._calendarHeaderPortal = new ComponentPortal(this.headerComponent || MatCalendarHeader);\n        this.activeDate = this.startAt || this._dateAdapter.today();\n        // Assign to the private property since we don't want to move focus on init.\n        this._currentView = this.startView;\n    }\n    ngAfterViewChecked() {\n        if (this._moveFocusOnNextTick) {\n            this._moveFocusOnNextTick = false;\n            this.focusActiveCell();\n        }\n    }\n    ngOnDestroy() {\n        this._intlChanges.unsubscribe();\n        this.stateChanges.complete();\n    }\n    ngOnChanges(changes) {\n        // Ignore date changes that are at a different time on the same day. This fixes issues where\n        // the calendar re-renders when there is no meaningful change to [minDate] or [maxDate]\n        // (#24435).\n        const minDateChange = changes['minDate'] &&\n            !this._dateAdapter.sameDate(changes['minDate'].previousValue, changes['minDate'].currentValue)\n            ? changes['minDate']\n            : undefined;\n        const maxDateChange = changes['maxDate'] &&\n            !this._dateAdapter.sameDate(changes['maxDate'].previousValue, changes['maxDate'].currentValue)\n            ? changes['maxDate']\n            : undefined;\n        const changeRequiringRerender = minDateChange || maxDateChange || changes['dateFilter'];\n        if (changeRequiringRerender && !changeRequiringRerender.firstChange) {\n            const view = this._getCurrentViewComponent();\n            if (view) {\n                // Schedule focus to be moved to the active date since re-rendering\n                // can blur the active cell. See #29265.\n                this._moveFocusOnNextTick = true;\n                // We need to `detectChanges` manually here, because the `minDate`, `maxDate` etc. are\n                // passed down to the view via data bindings which won't be up-to-date when we call `_init`.\n                this._changeDetectorRef.detectChanges();\n                view._init();\n            }\n        }\n        this.stateChanges.next();\n    }\n    /** Focuses the active date. */\n    focusActiveCell() {\n        this._getCurrentViewComponent()._focusActiveCell(false);\n    }\n    /** Updates today's date after an update of the active date */\n    updateTodaysDate() {\n        this._getCurrentViewComponent()._init();\n    }\n    /** Handles date selection in the month view. */\n    _dateSelected(event) {\n        const date = event.value;\n        if (this.selected instanceof DateRange ||\n            (date && !this._dateAdapter.sameDate(date, this.selected))) {\n            this.selectedChange.emit(date);\n        }\n        this._userSelection.emit(event);\n    }\n    /** Handles year selection in the multiyear view. */\n    _yearSelectedInMultiYearView(normalizedYear) {\n        this.yearSelected.emit(normalizedYear);\n    }\n    /** Handles month selection in the year view. */\n    _monthSelectedInYearView(normalizedMonth) {\n        this.monthSelected.emit(normalizedMonth);\n    }\n    /** Handles year/month selection in the multi-year/year views. */\n    _goToDateInView(date, view) {\n        this.activeDate = date;\n        this.currentView = view;\n    }\n    /** Called when the user starts dragging to change a date range. */\n    _dragStarted(event) {\n        this._activeDrag = event;\n    }\n    /**\n     * Called when a drag completes. It may end in cancelation or in the selection\n     * of a new range.\n     */\n    _dragEnded(event) {\n        if (!this._activeDrag)\n            return;\n        if (event.value) {\n            this._userDragDrop.emit(event);\n        }\n        this._activeDrag = null;\n    }\n    /** Returns the component instance that corresponds to the current calendar view. */\n    _getCurrentViewComponent() {\n        // The return type is explicitly written as a union to ensure that the Closure compiler does\n        // not optimize calls to _init(). Without the explicit return type, TypeScript narrows it to\n        // only the first component type. See https://github.com/angular/components/issues/22996.\n        return this.monthView || this.yearView || this.multiYearView;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"19.0.0\", type: MatCalendar, isStandalone: true, selector: \"mat-calendar\", inputs: { headerComponent: \"headerComponent\", startAt: \"startAt\", startView: \"startView\", selected: \"selected\", minDate: \"minDate\", maxDate: \"maxDate\", dateFilter: \"dateFilter\", dateClass: \"dateClass\", comparisonStart: \"comparisonStart\", comparisonEnd: \"comparisonEnd\", startDateAccessibleName: \"startDateAccessibleName\", endDateAccessibleName: \"endDateAccessibleName\" }, outputs: { selectedChange: \"selectedChange\", yearSelected: \"yearSelected\", monthSelected: \"monthSelected\", viewChanged: \"viewChanged\", _userSelection: \"_userSelection\", _userDragDrop: \"_userDragDrop\" }, host: { classAttribute: \"mat-calendar\" }, providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER], viewQueries: [{ propertyName: \"monthView\", first: true, predicate: MatMonthView, descendants: true }, { propertyName: \"yearView\", first: true, predicate: MatYearView, descendants: true }, { propertyName: \"multiYearView\", first: true, predicate: MatMultiYearView, descendants: true }], exportAs: [\"matCalendar\"], usesOnChanges: true, ngImport: i0, template: \"<ng-template [cdkPortalOutlet]=\\\"_calendarHeaderPortal\\\"></ng-template>\\n\\n<div class=\\\"mat-calendar-content\\\" cdkMonitorSubtreeFocus tabindex=\\\"-1\\\">\\n  @switch (currentView) {\\n    @case ('month') {\\n        <mat-month-view\\n            [(activeDate)]=\\\"activeDate\\\"\\n            [selected]=\\\"selected\\\"\\n            [dateFilter]=\\\"dateFilter\\\"\\n            [maxDate]=\\\"maxDate\\\"\\n            [minDate]=\\\"minDate\\\"\\n            [dateClass]=\\\"dateClass\\\"\\n            [comparisonStart]=\\\"comparisonStart\\\"\\n            [comparisonEnd]=\\\"comparisonEnd\\\"\\n            [startDateAccessibleName]=\\\"startDateAccessibleName\\\"\\n            [endDateAccessibleName]=\\\"endDateAccessibleName\\\"\\n            (_userSelection)=\\\"_dateSelected($event)\\\"\\n            (dragStarted)=\\\"_dragStarted($event)\\\"\\n            (dragEnded)=\\\"_dragEnded($event)\\\"\\n            [activeDrag]=\\\"_activeDrag\\\"></mat-month-view>\\n    }\\n\\n    @case ('year') {\\n        <mat-year-view\\n            [(activeDate)]=\\\"activeDate\\\"\\n            [selected]=\\\"selected\\\"\\n            [dateFilter]=\\\"dateFilter\\\"\\n            [maxDate]=\\\"maxDate\\\"\\n            [minDate]=\\\"minDate\\\"\\n            [dateClass]=\\\"dateClass\\\"\\n            (monthSelected)=\\\"_monthSelectedInYearView($event)\\\"\\n            (selectedChange)=\\\"_goToDateInView($event, 'month')\\\"></mat-year-view>\\n    }\\n\\n    @case ('multi-year') {\\n        <mat-multi-year-view\\n            [(activeDate)]=\\\"activeDate\\\"\\n            [selected]=\\\"selected\\\"\\n            [dateFilter]=\\\"dateFilter\\\"\\n            [maxDate]=\\\"maxDate\\\"\\n            [minDate]=\\\"minDate\\\"\\n            [dateClass]=\\\"dateClass\\\"\\n            (yearSelected)=\\\"_yearSelectedInMultiYearView($event)\\\"\\n            (selectedChange)=\\\"_goToDateInView($event, 'year')\\\"></mat-multi-year-view>\\n    }\\n  }\\n</div>\\n\", styles: [\".mat-calendar{display:block;line-height:normal;font-family:var(--mat-datepicker-calendar-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-datepicker-calendar-text-size, var(--mat-sys-body-medium-size))}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;align-items:center;margin:5% calc(4.7142857143% - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0;margin:0 8px;font-size:var(--mat-datepicker-calendar-period-button-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-datepicker-calendar-period-button-text-weight, var(--mat-sys-title-small-weight));--mdc-text-button-label-text-color:var(--mat-datepicker-calendar-period-button-text-color, var(--mat-sys-on-surface-variant))}.mat-calendar-arrow{display:inline-block;width:10px;height:5px;margin:0 0 0 5px;vertical-align:middle;fill:var(--mat-datepicker-calendar-period-button-icon-color, var(--mat-sys-on-surface-variant))}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}@media(forced-colors: active){.mat-calendar-arrow{fill:CanvasText}}.mat-datepicker-content .mat-calendar-previous-button:not(.mat-mdc-button-disabled),.mat-datepicker-content .mat-calendar-next-button:not(.mat-mdc-button-disabled){color:var(--mat-datepicker-calendar-navigation-button-icon-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0;color:var(--mat-datepicker-calendar-header-text-color, var(--mat-sys-on-surface-variant));font-size:var(--mat-datepicker-calendar-header-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-datepicker-calendar-header-text-weight, var(--mat-sys-title-small-weight))}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:\\\"\\\";position:absolute;top:0;left:-8px;right:-8px;height:1px;background:var(--mat-datepicker-calendar-header-divider-color, transparent)}.mat-calendar-body-cell-content::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}.mat-calendar-body-cell:focus .mat-focus-indicator::before{content:\\\"\\\"}\"], dependencies: [{ kind: \"directive\", type: CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }, { kind: \"directive\", type: CdkMonitorFocus, selector: \"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]\", outputs: [\"cdkFocusChange\"], exportAs: [\"cdkMonitorFocus\"] }, { kind: \"component\", type: MatMonthView, selector: \"mat-month-view\", inputs: [\"activeDate\", \"selected\", \"minDate\", \"maxDate\", \"dateFilter\", \"dateClass\", \"comparisonStart\", \"comparisonEnd\", \"startDateAccessibleName\", \"endDateAccessibleName\", \"activeDrag\"], outputs: [\"selectedChange\", \"_userSelection\", \"dragStarted\", \"dragEnded\", \"activeDateChange\"], exportAs: [\"matMonthView\"] }, { kind: \"component\", type: MatYearView, selector: \"mat-year-view\", inputs: [\"activeDate\", \"selected\", \"minDate\", \"maxDate\", \"dateFilter\", \"dateClass\"], outputs: [\"selectedChange\", \"monthSelected\", \"activeDateChange\"], exportAs: [\"matYearView\"] }, { kind: \"component\", type: MatMultiYearView, selector: \"mat-multi-year-view\", inputs: [\"activeDate\", \"selected\", \"minDate\", \"maxDate\", \"dateFilter\", \"dateClass\"], outputs: [\"selectedChange\", \"yearSelected\", \"activeDateChange\"], exportAs: [\"matMultiYearView\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCalendar, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-calendar', host: {\n                        'class': 'mat-calendar',\n                    }, exportAs: 'matCalendar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER], imports: [CdkPortalOutlet, CdkMonitorFocus, MatMonthView, MatYearView, MatMultiYearView], template: \"<ng-template [cdkPortalOutlet]=\\\"_calendarHeaderPortal\\\"></ng-template>\\n\\n<div class=\\\"mat-calendar-content\\\" cdkMonitorSubtreeFocus tabindex=\\\"-1\\\">\\n  @switch (currentView) {\\n    @case ('month') {\\n        <mat-month-view\\n            [(activeDate)]=\\\"activeDate\\\"\\n            [selected]=\\\"selected\\\"\\n            [dateFilter]=\\\"dateFilter\\\"\\n            [maxDate]=\\\"maxDate\\\"\\n            [minDate]=\\\"minDate\\\"\\n            [dateClass]=\\\"dateClass\\\"\\n            [comparisonStart]=\\\"comparisonStart\\\"\\n            [comparisonEnd]=\\\"comparisonEnd\\\"\\n            [startDateAccessibleName]=\\\"startDateAccessibleName\\\"\\n            [endDateAccessibleName]=\\\"endDateAccessibleName\\\"\\n            (_userSelection)=\\\"_dateSelected($event)\\\"\\n            (dragStarted)=\\\"_dragStarted($event)\\\"\\n            (dragEnded)=\\\"_dragEnded($event)\\\"\\n            [activeDrag]=\\\"_activeDrag\\\"></mat-month-view>\\n    }\\n\\n    @case ('year') {\\n        <mat-year-view\\n            [(activeDate)]=\\\"activeDate\\\"\\n            [selected]=\\\"selected\\\"\\n            [dateFilter]=\\\"dateFilter\\\"\\n            [maxDate]=\\\"maxDate\\\"\\n            [minDate]=\\\"minDate\\\"\\n            [dateClass]=\\\"dateClass\\\"\\n            (monthSelected)=\\\"_monthSelectedInYearView($event)\\\"\\n            (selectedChange)=\\\"_goToDateInView($event, 'month')\\\"></mat-year-view>\\n    }\\n\\n    @case ('multi-year') {\\n        <mat-multi-year-view\\n            [(activeDate)]=\\\"activeDate\\\"\\n            [selected]=\\\"selected\\\"\\n            [dateFilter]=\\\"dateFilter\\\"\\n            [maxDate]=\\\"maxDate\\\"\\n            [minDate]=\\\"minDate\\\"\\n            [dateClass]=\\\"dateClass\\\"\\n            (yearSelected)=\\\"_yearSelectedInMultiYearView($event)\\\"\\n            (selectedChange)=\\\"_goToDateInView($event, 'year')\\\"></mat-multi-year-view>\\n    }\\n  }\\n</div>\\n\", styles: [\".mat-calendar{display:block;line-height:normal;font-family:var(--mat-datepicker-calendar-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-datepicker-calendar-text-size, var(--mat-sys-body-medium-size))}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;align-items:center;margin:5% calc(4.7142857143% - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0;margin:0 8px;font-size:var(--mat-datepicker-calendar-period-button-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-datepicker-calendar-period-button-text-weight, var(--mat-sys-title-small-weight));--mdc-text-button-label-text-color:var(--mat-datepicker-calendar-period-button-text-color, var(--mat-sys-on-surface-variant))}.mat-calendar-arrow{display:inline-block;width:10px;height:5px;margin:0 0 0 5px;vertical-align:middle;fill:var(--mat-datepicker-calendar-period-button-icon-color, var(--mat-sys-on-surface-variant))}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}@media(forced-colors: active){.mat-calendar-arrow{fill:CanvasText}}.mat-datepicker-content .mat-calendar-previous-button:not(.mat-mdc-button-disabled),.mat-datepicker-content .mat-calendar-next-button:not(.mat-mdc-button-disabled){color:var(--mat-datepicker-calendar-navigation-button-icon-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0;color:var(--mat-datepicker-calendar-header-text-color, var(--mat-sys-on-surface-variant));font-size:var(--mat-datepicker-calendar-header-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-datepicker-calendar-header-text-weight, var(--mat-sys-title-small-weight))}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:\\\"\\\";position:absolute;top:0;left:-8px;right:-8px;height:1px;background:var(--mat-datepicker-calendar-header-divider-color, transparent)}.mat-calendar-body-cell-content::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}.mat-calendar-body-cell:focus .mat-focus-indicator::before{content:\\\"\\\"}\"] }]\n        }], ctorParameters: () => [], propDecorators: { headerComponent: [{\n                type: Input\n            }], startAt: [{\n                type: Input\n            }], startView: [{\n                type: Input\n            }], selected: [{\n                type: Input\n            }], minDate: [{\n                type: Input\n            }], maxDate: [{\n                type: Input\n            }], dateFilter: [{\n                type: Input\n            }], dateClass: [{\n                type: Input\n            }], comparisonStart: [{\n                type: Input\n            }], comparisonEnd: [{\n                type: Input\n            }], startDateAccessibleName: [{\n                type: Input\n            }], endDateAccessibleName: [{\n                type: Input\n            }], selectedChange: [{\n                type: Output\n            }], yearSelected: [{\n                type: Output\n            }], monthSelected: [{\n                type: Output\n            }], viewChanged: [{\n                type: Output\n            }], _userSelection: [{\n                type: Output\n            }], _userDragDrop: [{\n                type: Output\n            }], monthView: [{\n                type: ViewChild,\n                args: [MatMonthView]\n            }], yearView: [{\n                type: ViewChild,\n                args: [MatYearView]\n            }], multiYearView: [{\n                type: ViewChild,\n                args: [MatMultiYearView]\n            }] } });\n\n/**\n * Animations used by the Material datepicker.\n * @docs-private\n */\nconst matDatepickerAnimations = {\n    /** Transforms the height of the datepicker's calendar. */\n    transformPanel: trigger('transformPanel', [\n        transition('void => enter-dropdown', animate('120ms cubic-bezier(0, 0, 0.2, 1)', keyframes([\n            style({ opacity: 0, transform: 'scale(1, 0.8)' }),\n            style({ opacity: 1, transform: 'scale(1, 1)' }),\n        ]))),\n        transition('void => enter-dialog', animate('150ms cubic-bezier(0, 0, 0.2, 1)', keyframes([\n            style({ opacity: 0, transform: 'scale(0.7)' }),\n            style({ transform: 'none', opacity: 1 }),\n        ]))),\n        transition('* => void', animate('100ms linear', style({ opacity: 0 }))),\n    ]),\n    /** Fades in the content of the calendar. */\n    fadeInCalendar: trigger('fadeInCalendar', [\n        state('void', style({ opacity: 0 })),\n        state('enter', style({ opacity: 1 })),\n        // TODO(crisbeto): this animation should be removed since it isn't quite on spec, but we\n        // need to keep it until #12440 gets in, otherwise the exit animation will look glitchy.\n        transition('void => *', animate('120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')),\n    ]),\n};\n\n/** Injection token that determines the scroll handling while the calendar is open. */\nconst MAT_DATEPICKER_SCROLL_STRATEGY = new InjectionToken('mat-datepicker-scroll-strategy', {\n    providedIn: 'root',\n    factory: () => {\n        const overlay = inject(Overlay);\n        return () => overlay.scrollStrategies.reposition();\n    },\n});\n/** @docs-private */\nfunction MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay) {\n    return () => overlay.scrollStrategies.reposition();\n}\n/** @docs-private */\nconst MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n    provide: MAT_DATEPICKER_SCROLL_STRATEGY,\n    deps: [Overlay],\n    useFactory: MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY,\n};\n/**\n * Component used as the content for the datepicker overlay. We use this instead of using\n * MatCalendar directly as the content so we can control the initial focus. This also gives us a\n * place to put additional features of the overlay that are not part of the calendar itself in the\n * future. (e.g. confirmation buttons).\n * @docs-private\n */\nclass MatDatepickerContent {\n    _elementRef = inject(ElementRef);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _globalModel = inject(MatDateSelectionModel);\n    _dateAdapter = inject(DateAdapter);\n    _rangeSelectionStrategy = inject(MAT_DATE_RANGE_SELECTION_STRATEGY, { optional: true });\n    _subscriptions = new Subscription();\n    _model;\n    /** Reference to the internal calendar component. */\n    _calendar;\n    /**\n     * Theme color of the internal calendar. This API is supported in M2 themes\n     * only, it has no effect in M3 themes.\n     *\n     * For information on applying color variants in M3, see\n     * https://material.angular.io/guide/theming#using-component-color-variants.\n     */\n    color;\n    /** Reference to the datepicker that created the overlay. */\n    datepicker;\n    /** Start of the comparison range. */\n    comparisonStart;\n    /** End of the comparison range. */\n    comparisonEnd;\n    /** ARIA Accessible name of the `<input matStartDate/>` */\n    startDateAccessibleName;\n    /** ARIA Accessible name of the `<input matEndDate/>` */\n    endDateAccessibleName;\n    /** Whether the datepicker is above or below the input. */\n    _isAbove;\n    /** Current state of the animation. */\n    _animationState;\n    /** Emits when an animation has finished. */\n    _animationDone = new Subject();\n    /** Whether there is an in-progress animation. */\n    _isAnimating = false;\n    /** Text for the close button. */\n    _closeButtonText;\n    /** Whether the close button currently has focus. */\n    _closeButtonFocused;\n    /** Portal with projected action buttons. */\n    _actionsPortal = null;\n    /** Id of the label for the `role=\"dialog\"` element. */\n    _dialogLabelId;\n    constructor() {\n        inject(_CdkPrivateStyleLoader).load(_VisuallyHiddenLoader);\n        const intl = inject(MatDatepickerIntl);\n        this._closeButtonText = intl.closeCalendarLabel;\n    }\n    ngOnInit() {\n        this._animationState = this.datepicker.touchUi ? 'enter-dialog' : 'enter-dropdown';\n    }\n    ngAfterViewInit() {\n        this._subscriptions.add(this.datepicker.stateChanges.subscribe(() => {\n            this._changeDetectorRef.markForCheck();\n        }));\n        this._calendar.focusActiveCell();\n    }\n    ngOnDestroy() {\n        this._subscriptions.unsubscribe();\n        this._animationDone.complete();\n    }\n    _handleUserSelection(event) {\n        const selection = this._model.selection;\n        const value = event.value;\n        const isRange = selection instanceof DateRange;\n        // If we're selecting a range and we have a selection strategy, always pass the value through\n        // there. Otherwise don't assign null values to the model, unless we're selecting a range.\n        // A null value when picking a range means that the user cancelled the selection (e.g. by\n        // pressing escape), whereas when selecting a single value it means that the value didn't\n        // change. This isn't very intuitive, but it's here for backwards-compatibility.\n        if (isRange && this._rangeSelectionStrategy) {\n            const newSelection = this._rangeSelectionStrategy.selectionFinished(value, selection, event.event);\n            this._model.updateSelection(newSelection, this);\n        }\n        else if (value &&\n            (isRange || !this._dateAdapter.sameDate(value, selection))) {\n            this._model.add(value);\n        }\n        // Delegate closing the overlay to the actions.\n        if ((!this._model || this._model.isComplete()) && !this._actionsPortal) {\n            this.datepicker.close();\n        }\n    }\n    _handleUserDragDrop(event) {\n        this._model.updateSelection(event.value, this);\n    }\n    _startExitAnimation() {\n        this._animationState = 'void';\n        this._changeDetectorRef.markForCheck();\n    }\n    _handleAnimationEvent(event) {\n        this._isAnimating = event.phaseName === 'start';\n        if (!this._isAnimating) {\n            this._animationDone.next();\n        }\n    }\n    _getSelected() {\n        return this._model.selection;\n    }\n    /** Applies the current pending selection to the global model. */\n    _applyPendingSelection() {\n        if (this._model !== this._globalModel) {\n            this._globalModel.updateSelection(this._model.selection, this);\n        }\n    }\n    /**\n     * Assigns a new portal containing the datepicker actions.\n     * @param portal Portal with the actions to be assigned.\n     * @param forceRerender Whether a re-render of the portal should be triggered. This isn't\n     * necessary if the portal is assigned during initialization, but it may be required if it's\n     * added at a later point.\n     */\n    _assignActions(portal, forceRerender) {\n        // If we have actions, clone the model so that we have the ability to cancel the selection,\n        // otherwise update the global model directly. Note that we want to assign this as soon as\n        // possible, but `_actionsPortal` isn't available in the constructor so we do it in `ngOnInit`.\n        this._model = portal ? this._globalModel.clone() : this._globalModel;\n        this._actionsPortal = portal;\n        if (forceRerender) {\n            this._changeDetectorRef.detectChanges();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerContent, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDatepickerContent, isStandalone: true, selector: \"mat-datepicker-content\", inputs: { color: \"color\" }, host: { listeners: { \"@transformPanel.start\": \"_handleAnimationEvent($event)\", \"@transformPanel.done\": \"_handleAnimationEvent($event)\" }, properties: { \"class\": \"color ? \\\"mat-\\\" + color : \\\"\\\"\", \"@transformPanel\": \"_animationState\", \"class.mat-datepicker-content-touch\": \"datepicker.touchUi\" }, classAttribute: \"mat-datepicker-content\" }, viewQueries: [{ propertyName: \"_calendar\", first: true, predicate: MatCalendar, descendants: true }], exportAs: [\"matDatepickerContent\"], ngImport: i0, template: \"<div\\n  cdkTrapFocus\\n  role=\\\"dialog\\\"\\n  [attr.aria-modal]=\\\"true\\\"\\n  [attr.aria-labelledby]=\\\"_dialogLabelId ?? undefined\\\"\\n  class=\\\"mat-datepicker-content-container\\\"\\n  [class.mat-datepicker-content-container-with-custom-header]=\\\"datepicker.calendarHeaderComponent\\\"\\n  [class.mat-datepicker-content-container-with-actions]=\\\"_actionsPortal\\\">\\n  <mat-calendar\\n    [id]=\\\"datepicker.id\\\"\\n    [class]=\\\"datepicker.panelClass\\\"\\n    [startAt]=\\\"datepicker.startAt\\\"\\n    [startView]=\\\"datepicker.startView\\\"\\n    [minDate]=\\\"datepicker._getMinDate()\\\"\\n    [maxDate]=\\\"datepicker._getMaxDate()\\\"\\n    [dateFilter]=\\\"datepicker._getDateFilter()\\\"\\n    [headerComponent]=\\\"datepicker.calendarHeaderComponent\\\"\\n    [selected]=\\\"_getSelected()\\\"\\n    [dateClass]=\\\"datepicker.dateClass\\\"\\n    [comparisonStart]=\\\"comparisonStart\\\"\\n    [comparisonEnd]=\\\"comparisonEnd\\\"\\n    [@fadeInCalendar]=\\\"'enter'\\\"\\n    [startDateAccessibleName]=\\\"startDateAccessibleName\\\"\\n    [endDateAccessibleName]=\\\"endDateAccessibleName\\\"\\n    (yearSelected)=\\\"datepicker._selectYear($event)\\\"\\n    (monthSelected)=\\\"datepicker._selectMonth($event)\\\"\\n    (viewChanged)=\\\"datepicker._viewChanged($event)\\\"\\n    (_userSelection)=\\\"_handleUserSelection($event)\\\"\\n    (_userDragDrop)=\\\"_handleUserDragDrop($event)\\\"></mat-calendar>\\n\\n  <ng-template [cdkPortalOutlet]=\\\"_actionsPortal\\\"></ng-template>\\n\\n  <!-- Invisible close button for screen reader users. -->\\n  <button\\n    type=\\\"button\\\"\\n    mat-raised-button\\n    [color]=\\\"color || 'primary'\\\"\\n    class=\\\"mat-datepicker-close-button\\\"\\n    [class.cdk-visually-hidden]=\\\"!_closeButtonFocused\\\"\\n    (focus)=\\\"_closeButtonFocused = true\\\"\\n    (blur)=\\\"_closeButtonFocused = false\\\"\\n    (click)=\\\"datepicker.close()\\\">{{ _closeButtonText }}</button>\\n</div>\\n\", styles: [\".mat-datepicker-content{display:block;border-radius:4px;background-color:var(--mat-datepicker-calendar-container-background-color, var(--mat-sys-surface-container-high));color:var(--mat-datepicker-calendar-container-text-color, var(--mat-sys-on-surface));box-shadow:var(--mat-datepicker-calendar-container-elevation-shadow, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));border-radius:var(--mat-datepicker-calendar-container-shape, var(--mat-sys-corner-large))}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;box-shadow:var(--mat-datepicker-calendar-container-touch-elevation-shadow, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));border-radius:var(--mat-datepicker-calendar-container-touch-shape, var(--mat-sys-corner-extra-large));position:relative;overflow:visible}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}\"], dependencies: [{ kind: \"directive\", type: CdkTrapFocus, selector: \"[cdkTrapFocus]\", inputs: [\"cdkTrapFocus\", \"cdkTrapFocusAutoCapture\"], exportAs: [\"cdkTrapFocus\"] }, { kind: \"component\", type: MatCalendar, selector: \"mat-calendar\", inputs: [\"headerComponent\", \"startAt\", \"startView\", \"selected\", \"minDate\", \"maxDate\", \"dateFilter\", \"dateClass\", \"comparisonStart\", \"comparisonEnd\", \"startDateAccessibleName\", \"endDateAccessibleName\"], outputs: [\"selectedChange\", \"yearSelected\", \"monthSelected\", \"viewChanged\", \"_userSelection\", \"_userDragDrop\"], exportAs: [\"matCalendar\"] }, { kind: \"directive\", type: CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }, { kind: \"component\", type: MatButton, selector: \"    button[mat-button], button[mat-raised-button], button[mat-flat-button],    button[mat-stroked-button]  \", exportAs: [\"matButton\"] }], animations: [matDatepickerAnimations.transformPanel, matDatepickerAnimations.fadeInCalendar], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerContent, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-datepicker-content', host: {\n                        'class': 'mat-datepicker-content',\n                        '[class]': 'color ? \"mat-\" + color : \"\"',\n                        '[@transformPanel]': '_animationState',\n                        '(@transformPanel.start)': '_handleAnimationEvent($event)',\n                        '(@transformPanel.done)': '_handleAnimationEvent($event)',\n                        '[class.mat-datepicker-content-touch]': 'datepicker.touchUi',\n                    }, animations: [matDatepickerAnimations.transformPanel, matDatepickerAnimations.fadeInCalendar], exportAs: 'matDatepickerContent', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CdkTrapFocus, MatCalendar, CdkPortalOutlet, MatButton], template: \"<div\\n  cdkTrapFocus\\n  role=\\\"dialog\\\"\\n  [attr.aria-modal]=\\\"true\\\"\\n  [attr.aria-labelledby]=\\\"_dialogLabelId ?? undefined\\\"\\n  class=\\\"mat-datepicker-content-container\\\"\\n  [class.mat-datepicker-content-container-with-custom-header]=\\\"datepicker.calendarHeaderComponent\\\"\\n  [class.mat-datepicker-content-container-with-actions]=\\\"_actionsPortal\\\">\\n  <mat-calendar\\n    [id]=\\\"datepicker.id\\\"\\n    [class]=\\\"datepicker.panelClass\\\"\\n    [startAt]=\\\"datepicker.startAt\\\"\\n    [startView]=\\\"datepicker.startView\\\"\\n    [minDate]=\\\"datepicker._getMinDate()\\\"\\n    [maxDate]=\\\"datepicker._getMaxDate()\\\"\\n    [dateFilter]=\\\"datepicker._getDateFilter()\\\"\\n    [headerComponent]=\\\"datepicker.calendarHeaderComponent\\\"\\n    [selected]=\\\"_getSelected()\\\"\\n    [dateClass]=\\\"datepicker.dateClass\\\"\\n    [comparisonStart]=\\\"comparisonStart\\\"\\n    [comparisonEnd]=\\\"comparisonEnd\\\"\\n    [@fadeInCalendar]=\\\"'enter'\\\"\\n    [startDateAccessibleName]=\\\"startDateAccessibleName\\\"\\n    [endDateAccessibleName]=\\\"endDateAccessibleName\\\"\\n    (yearSelected)=\\\"datepicker._selectYear($event)\\\"\\n    (monthSelected)=\\\"datepicker._selectMonth($event)\\\"\\n    (viewChanged)=\\\"datepicker._viewChanged($event)\\\"\\n    (_userSelection)=\\\"_handleUserSelection($event)\\\"\\n    (_userDragDrop)=\\\"_handleUserDragDrop($event)\\\"></mat-calendar>\\n\\n  <ng-template [cdkPortalOutlet]=\\\"_actionsPortal\\\"></ng-template>\\n\\n  <!-- Invisible close button for screen reader users. -->\\n  <button\\n    type=\\\"button\\\"\\n    mat-raised-button\\n    [color]=\\\"color || 'primary'\\\"\\n    class=\\\"mat-datepicker-close-button\\\"\\n    [class.cdk-visually-hidden]=\\\"!_closeButtonFocused\\\"\\n    (focus)=\\\"_closeButtonFocused = true\\\"\\n    (blur)=\\\"_closeButtonFocused = false\\\"\\n    (click)=\\\"datepicker.close()\\\">{{ _closeButtonText }}</button>\\n</div>\\n\", styles: [\".mat-datepicker-content{display:block;border-radius:4px;background-color:var(--mat-datepicker-calendar-container-background-color, var(--mat-sys-surface-container-high));color:var(--mat-datepicker-calendar-container-text-color, var(--mat-sys-on-surface));box-shadow:var(--mat-datepicker-calendar-container-elevation-shadow, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));border-radius:var(--mat-datepicker-calendar-container-shape, var(--mat-sys-corner-large))}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;box-shadow:var(--mat-datepicker-calendar-container-touch-elevation-shadow, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));border-radius:var(--mat-datepicker-calendar-container-touch-shape, var(--mat-sys-corner-extra-large));position:relative;overflow:visible}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}\"] }]\n        }], ctorParameters: () => [], propDecorators: { _calendar: [{\n                type: ViewChild,\n                args: [MatCalendar]\n            }], color: [{\n                type: Input\n            }] } });\n/** Base class for a datepicker. */\nclass MatDatepickerBase {\n    _overlay = inject(Overlay);\n    _viewContainerRef = inject(ViewContainerRef);\n    _dateAdapter = inject(DateAdapter, { optional: true });\n    _dir = inject(Directionality, { optional: true });\n    _model = inject(MatDateSelectionModel);\n    _scrollStrategy = inject(MAT_DATEPICKER_SCROLL_STRATEGY);\n    _inputStateChanges = Subscription.EMPTY;\n    _document = inject(DOCUMENT);\n    /** An input indicating the type of the custom header component for the calendar, if set. */\n    calendarHeaderComponent;\n    /** The date to open the calendar to initially. */\n    get startAt() {\n        // If an explicit startAt is set we start there, otherwise we start at whatever the currently\n        // selected value is.\n        return this._startAt || (this.datepickerInput ? this.datepickerInput.getStartValue() : null);\n    }\n    set startAt(value) {\n        this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n    }\n    _startAt;\n    /** The view that the calendar should start in. */\n    startView = 'month';\n    /**\n     * Theme color of the datepicker's calendar. This API is supported in M2 themes only, it\n     * has no effect in M3 themes.\n     *\n     * For information on applying color variants in M3, see\n     * https://material.angular.io/guide/theming#using-component-color-variants.\n     */\n    get color() {\n        return (this._color || (this.datepickerInput ? this.datepickerInput.getThemePalette() : undefined));\n    }\n    set color(value) {\n        this._color = value;\n    }\n    _color;\n    /**\n     * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather\n     * than a dropdown and elements have more padding to allow for bigger touch targets.\n     */\n    touchUi = false;\n    /** Whether the datepicker pop-up should be disabled. */\n    get disabled() {\n        return this._disabled === undefined && this.datepickerInput\n            ? this.datepickerInput.disabled\n            : !!this._disabled;\n    }\n    set disabled(value) {\n        if (value !== this._disabled) {\n            this._disabled = value;\n            this.stateChanges.next(undefined);\n        }\n    }\n    _disabled;\n    /** Preferred position of the datepicker in the X axis. */\n    xPosition = 'start';\n    /** Preferred position of the datepicker in the Y axis. */\n    yPosition = 'below';\n    /**\n     * Whether to restore focus to the previously-focused element when the calendar is closed.\n     * Note that automatic focus restoration is an accessibility feature and it is recommended that\n     * you provide your own equivalent, if you decide to turn it off.\n     */\n    restoreFocus = true;\n    /**\n     * Emits selected year in multiyear view.\n     * This doesn't imply a change on the selected date.\n     */\n    yearSelected = new EventEmitter();\n    /**\n     * Emits selected month in year view.\n     * This doesn't imply a change on the selected date.\n     */\n    monthSelected = new EventEmitter();\n    /**\n     * Emits when the current view changes.\n     */\n    viewChanged = new EventEmitter(true);\n    /** Function that can be used to add custom CSS classes to dates. */\n    dateClass;\n    /** Emits when the datepicker has been opened. */\n    openedStream = new EventEmitter();\n    /** Emits when the datepicker has been closed. */\n    closedStream = new EventEmitter();\n    /** Classes to be passed to the date picker panel. */\n    get panelClass() {\n        return this._panelClass;\n    }\n    set panelClass(value) {\n        this._panelClass = coerceStringArray(value);\n    }\n    _panelClass;\n    /** Whether the calendar is open. */\n    get opened() {\n        return this._opened;\n    }\n    set opened(value) {\n        if (value) {\n            this.open();\n        }\n        else {\n            this.close();\n        }\n    }\n    _opened = false;\n    /** The id for the datepicker calendar. */\n    id = inject(_IdGenerator).getId('mat-datepicker-');\n    /** The minimum selectable date. */\n    _getMinDate() {\n        return this.datepickerInput && this.datepickerInput.min;\n    }\n    /** The maximum selectable date. */\n    _getMaxDate() {\n        return this.datepickerInput && this.datepickerInput.max;\n    }\n    _getDateFilter() {\n        return this.datepickerInput && this.datepickerInput.dateFilter;\n    }\n    /** A reference to the overlay into which we've rendered the calendar. */\n    _overlayRef;\n    /** Reference to the component instance rendered in the overlay. */\n    _componentRef;\n    /** The element that was focused before the datepicker was opened. */\n    _focusedElementBeforeOpen = null;\n    /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */\n    _backdropHarnessClass = `${this.id}-backdrop`;\n    /** Currently-registered actions portal. */\n    _actionsPortal;\n    /** The input element this datepicker is associated with. */\n    datepickerInput;\n    /** Emits when the datepicker's state changes. */\n    stateChanges = new Subject();\n    _injector = inject(Injector);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    constructor() {\n        if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw createMissingDateImplError('DateAdapter');\n        }\n        this._model.selectionChanged.subscribe(() => {\n            this._changeDetectorRef.markForCheck();\n        });\n    }\n    ngOnChanges(changes) {\n        const positionChange = changes['xPosition'] || changes['yPosition'];\n        if (positionChange && !positionChange.firstChange && this._overlayRef) {\n            const positionStrategy = this._overlayRef.getConfig().positionStrategy;\n            if (positionStrategy instanceof FlexibleConnectedPositionStrategy) {\n                this._setConnectedPositions(positionStrategy);\n                if (this.opened) {\n                    this._overlayRef.updatePosition();\n                }\n            }\n        }\n        this.stateChanges.next(undefined);\n    }\n    ngOnDestroy() {\n        this._destroyOverlay();\n        this.close();\n        this._inputStateChanges.unsubscribe();\n        this.stateChanges.complete();\n    }\n    /** Selects the given date */\n    select(date) {\n        this._model.add(date);\n    }\n    /** Emits the selected year in multiyear view */\n    _selectYear(normalizedYear) {\n        this.yearSelected.emit(normalizedYear);\n    }\n    /** Emits selected month in year view */\n    _selectMonth(normalizedMonth) {\n        this.monthSelected.emit(normalizedMonth);\n    }\n    /** Emits changed view */\n    _viewChanged(view) {\n        this.viewChanged.emit(view);\n    }\n    /**\n     * Register an input with this datepicker.\n     * @param input The datepicker input to register with this datepicker.\n     * @returns Selection model that the input should hook itself up to.\n     */\n    registerInput(input) {\n        if (this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error('A MatDatepicker can only be associated with a single input.');\n        }\n        this._inputStateChanges.unsubscribe();\n        this.datepickerInput = input;\n        this._inputStateChanges = input.stateChanges.subscribe(() => this.stateChanges.next(undefined));\n        return this._model;\n    }\n    /**\n     * Registers a portal containing action buttons with the datepicker.\n     * @param portal Portal to be registered.\n     */\n    registerActions(portal) {\n        if (this._actionsPortal && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error('A MatDatepicker can only be associated with a single actions row.');\n        }\n        this._actionsPortal = portal;\n        this._componentRef?.instance._assignActions(portal, true);\n    }\n    /**\n     * Removes a portal containing action buttons from the datepicker.\n     * @param portal Portal to be removed.\n     */\n    removeActions(portal) {\n        if (portal === this._actionsPortal) {\n            this._actionsPortal = null;\n            this._componentRef?.instance._assignActions(null, true);\n        }\n    }\n    /** Open the calendar. */\n    open() {\n        // Skip reopening if there's an in-progress animation to avoid overlapping\n        // sequences which can cause \"changed after checked\" errors. See #25837.\n        if (this._opened || this.disabled || this._componentRef?.instance._isAnimating) {\n            return;\n        }\n        if (!this.datepickerInput && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error('Attempted to open an MatDatepicker with no associated input.');\n        }\n        this._focusedElementBeforeOpen = _getFocusedElementPierceShadowDom();\n        this._openOverlay();\n        this._opened = true;\n        this.openedStream.emit();\n    }\n    /** Close the calendar. */\n    close() {\n        // Skip reopening if there's an in-progress animation to avoid overlapping\n        // sequences which can cause \"changed after checked\" errors. See #25837.\n        if (!this._opened || this._componentRef?.instance._isAnimating) {\n            return;\n        }\n        const canRestoreFocus = this.restoreFocus &&\n            this._focusedElementBeforeOpen &&\n            typeof this._focusedElementBeforeOpen.focus === 'function';\n        const completeClose = () => {\n            // The `_opened` could've been reset already if\n            // we got two events in quick succession.\n            if (this._opened) {\n                this._opened = false;\n                this.closedStream.emit();\n            }\n        };\n        if (this._componentRef) {\n            const { instance, location } = this._componentRef;\n            instance._startExitAnimation();\n            instance._animationDone.pipe(take(1)).subscribe(() => {\n                const activeElement = this._document.activeElement;\n                // Since we restore focus after the exit animation, we have to check that\n                // the user didn't move focus themselves inside the `close` handler.\n                if (canRestoreFocus &&\n                    (!activeElement ||\n                        activeElement === this._document.activeElement ||\n                        location.nativeElement.contains(activeElement))) {\n                    this._focusedElementBeforeOpen.focus();\n                }\n                this._focusedElementBeforeOpen = null;\n                this._destroyOverlay();\n            });\n        }\n        if (canRestoreFocus) {\n            // Because IE moves focus asynchronously, we can't count on it being restored before we've\n            // marked the datepicker as closed. If the event fires out of sequence and the element that\n            // we're refocusing opens the datepicker on focus, the user could be stuck with not being\n            // able to close the calendar at all. We work around it by making the logic, that marks\n            // the datepicker as closed, async as well.\n            setTimeout(completeClose);\n        }\n        else {\n            completeClose();\n        }\n    }\n    /** Applies the current pending selection on the overlay to the model. */\n    _applyPendingSelection() {\n        this._componentRef?.instance?._applyPendingSelection();\n    }\n    /** Forwards relevant values from the datepicker to the datepicker content inside the overlay. */\n    _forwardContentValues(instance) {\n        instance.datepicker = this;\n        instance.color = this.color;\n        instance._dialogLabelId = this.datepickerInput.getOverlayLabelId();\n        instance._assignActions(this._actionsPortal, false);\n    }\n    /** Opens the overlay with the calendar. */\n    _openOverlay() {\n        this._destroyOverlay();\n        const isDialog = this.touchUi;\n        const portal = new ComponentPortal(MatDatepickerContent, this._viewContainerRef);\n        const overlayRef = (this._overlayRef = this._overlay.create(new OverlayConfig({\n            positionStrategy: isDialog ? this._getDialogStrategy() : this._getDropdownStrategy(),\n            hasBackdrop: true,\n            backdropClass: [\n                isDialog ? 'cdk-overlay-dark-backdrop' : 'mat-overlay-transparent-backdrop',\n                this._backdropHarnessClass,\n            ],\n            direction: this._dir || 'ltr',\n            scrollStrategy: isDialog ? this._overlay.scrollStrategies.block() : this._scrollStrategy(),\n            panelClass: `mat-datepicker-${isDialog ? 'dialog' : 'popup'}`,\n        })));\n        this._getCloseStream(overlayRef).subscribe(event => {\n            if (event) {\n                event.preventDefault();\n            }\n            this.close();\n        });\n        // The `preventDefault` call happens inside the calendar as well, however focus moves into\n        // it inside a timeout which can give browsers a chance to fire off a keyboard event in-between\n        // that can scroll the page (see #24969). Always block default actions of arrow keys for the\n        // entire overlay so the page doesn't get scrolled by accident.\n        overlayRef.keydownEvents().subscribe(event => {\n            const keyCode = event.keyCode;\n            if (keyCode === UP_ARROW ||\n                keyCode === DOWN_ARROW ||\n                keyCode === LEFT_ARROW ||\n                keyCode === RIGHT_ARROW ||\n                keyCode === PAGE_UP ||\n                keyCode === PAGE_DOWN) {\n                event.preventDefault();\n            }\n        });\n        this._componentRef = overlayRef.attach(portal);\n        this._forwardContentValues(this._componentRef.instance);\n        // Update the position once the calendar has rendered. Only relevant in dropdown mode.\n        if (!isDialog) {\n            afterNextRender(() => {\n                overlayRef.updatePosition();\n            }, { injector: this._injector });\n        }\n    }\n    /** Destroys the current overlay. */\n    _destroyOverlay() {\n        if (this._overlayRef) {\n            this._overlayRef.dispose();\n            this._overlayRef = this._componentRef = null;\n        }\n    }\n    /** Gets a position strategy that will open the calendar as a dropdown. */\n    _getDialogStrategy() {\n        return this._overlay.position().global().centerHorizontally().centerVertically();\n    }\n    /** Gets a position strategy that will open the calendar as a dropdown. */\n    _getDropdownStrategy() {\n        const strategy = this._overlay\n            .position()\n            .flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin())\n            .withTransformOriginOn('.mat-datepicker-content')\n            .withFlexibleDimensions(false)\n            .withViewportMargin(8)\n            .withLockedPosition();\n        return this._setConnectedPositions(strategy);\n    }\n    /** Sets the positions of the datepicker in dropdown mode based on the current configuration. */\n    _setConnectedPositions(strategy) {\n        const primaryX = this.xPosition === 'end' ? 'end' : 'start';\n        const secondaryX = primaryX === 'start' ? 'end' : 'start';\n        const primaryY = this.yPosition === 'above' ? 'bottom' : 'top';\n        const secondaryY = primaryY === 'top' ? 'bottom' : 'top';\n        return strategy.withPositions([\n            {\n                originX: primaryX,\n                originY: secondaryY,\n                overlayX: primaryX,\n                overlayY: primaryY,\n            },\n            {\n                originX: primaryX,\n                originY: primaryY,\n                overlayX: primaryX,\n                overlayY: secondaryY,\n            },\n            {\n                originX: secondaryX,\n                originY: secondaryY,\n                overlayX: secondaryX,\n                overlayY: primaryY,\n            },\n            {\n                originX: secondaryX,\n                originY: primaryY,\n                overlayX: secondaryX,\n                overlayY: secondaryY,\n            },\n        ]);\n    }\n    /** Gets an observable that will emit when the overlay is supposed to be closed. */\n    _getCloseStream(overlayRef) {\n        const ctrlShiftMetaModifiers = ['ctrlKey', 'shiftKey', 'metaKey'];\n        return merge(overlayRef.backdropClick(), overlayRef.detachments(), overlayRef.keydownEvents().pipe(filter(event => {\n            // Closing on alt + up is only valid when there's an input associated with the datepicker.\n            return ((event.keyCode === ESCAPE && !hasModifierKey(event)) ||\n                (this.datepickerInput &&\n                    hasModifierKey(event, 'altKey') &&\n                    event.keyCode === UP_ARROW &&\n                    ctrlShiftMetaModifiers.every((modifier) => !hasModifierKey(event, modifier))));\n        })));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatDatepickerBase, isStandalone: true, inputs: { calendarHeaderComponent: \"calendarHeaderComponent\", startAt: \"startAt\", startView: \"startView\", color: \"color\", touchUi: [\"touchUi\", \"touchUi\", booleanAttribute], disabled: [\"disabled\", \"disabled\", booleanAttribute], xPosition: \"xPosition\", yPosition: \"yPosition\", restoreFocus: [\"restoreFocus\", \"restoreFocus\", booleanAttribute], dateClass: \"dateClass\", panelClass: \"panelClass\", opened: [\"opened\", \"opened\", booleanAttribute] }, outputs: { yearSelected: \"yearSelected\", monthSelected: \"monthSelected\", viewChanged: \"viewChanged\", openedStream: \"opened\", closedStream: \"closed\" }, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerBase, decorators: [{\n            type: Directive\n        }], ctorParameters: () => [], propDecorators: { calendarHeaderComponent: [{\n                type: Input\n            }], startAt: [{\n                type: Input\n            }], startView: [{\n                type: Input\n            }], color: [{\n                type: Input\n            }], touchUi: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], disabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], xPosition: [{\n                type: Input\n            }], yPosition: [{\n                type: Input\n            }], restoreFocus: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], yearSelected: [{\n                type: Output\n            }], monthSelected: [{\n                type: Output\n            }], viewChanged: [{\n                type: Output\n            }], dateClass: [{\n                type: Input\n            }], openedStream: [{\n                type: Output,\n                args: ['opened']\n            }], closedStream: [{\n                type: Output,\n                args: ['closed']\n            }], panelClass: [{\n                type: Input\n            }], opened: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }] } });\n\n// TODO(mmalerba): We use a component instead of a directive here so the user can use implicit\n// template reference variables (e.g. #d vs #d=\"matDatepicker\"). We can change this to a directive\n// if angular adds support for `exportAs: '$implicit'` on directives.\n/** Component responsible for managing the datepicker popup/dialog. */\nclass MatDatepicker extends MatDatepickerBase {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepicker, deps: null, target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDatepicker, isStandalone: true, selector: \"mat-datepicker\", providers: [\n            MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER,\n            { provide: MatDatepickerBase, useExisting: MatDatepicker },\n        ], exportAs: [\"matDatepicker\"], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepicker, decorators: [{\n            type: Component,\n            args: [{\n                    selector: 'mat-datepicker',\n                    template: '',\n                    exportAs: 'matDatepicker',\n                    changeDetection: ChangeDetectionStrategy.OnPush,\n                    encapsulation: ViewEncapsulation.None,\n                    providers: [\n                        MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER,\n                        { provide: MatDatepickerBase, useExisting: MatDatepicker },\n                    ],\n                }]\n        }] });\n\n/**\n * An event used for datepicker input and change events. We don't always have access to a native\n * input or change event because the event may have been triggered by the user clicking on the\n * calendar popup. For consistency, we always use MatDatepickerInputEvent instead.\n */\nclass MatDatepickerInputEvent {\n    target;\n    targetElement;\n    /** The new value for the target datepicker input. */\n    value;\n    constructor(\n    /** Reference to the datepicker input component that emitted the event. */\n    target, \n    /** Reference to the native input element associated with the datepicker input. */\n    targetElement) {\n        this.target = target;\n        this.targetElement = targetElement;\n        this.value = this.target.value;\n    }\n}\n/** Base class for datepicker inputs. */\nclass MatDatepickerInputBase {\n    _elementRef = inject(ElementRef);\n    _dateAdapter = inject(DateAdapter, { optional: true });\n    _dateFormats = inject(MAT_DATE_FORMATS, { optional: true });\n    /** Whether the component has been initialized. */\n    _isInitialized;\n    /** The value of the input. */\n    get value() {\n        return this._model ? this._getValueFromModel(this._model.selection) : this._pendingValue;\n    }\n    set value(value) {\n        this._assignValueProgrammatically(value);\n    }\n    _model;\n    /** Whether the datepicker-input is disabled. */\n    get disabled() {\n        return !!this._disabled || this._parentDisabled();\n    }\n    set disabled(value) {\n        const newValue = value;\n        const element = this._elementRef.nativeElement;\n        if (this._disabled !== newValue) {\n            this._disabled = newValue;\n            this.stateChanges.next(undefined);\n        }\n        // We need to null check the `blur` method, because it's undefined during SSR.\n        // In Ivy static bindings are invoked earlier, before the element is attached to the DOM.\n        // This can cause an error to be thrown in some browsers (IE/Edge) which assert that the\n        // element has been inserted.\n        if (newValue && this._isInitialized && element.blur) {\n            // Normally, native input elements automatically blur if they turn disabled. This behavior\n            // is problematic, because it would mean that it triggers another change detection cycle,\n            // which then causes a changed after checked error if the input element was focused before.\n            element.blur();\n        }\n    }\n    _disabled;\n    /** Emits when a `change` event is fired on this `<input>`. */\n    dateChange = new EventEmitter();\n    /** Emits when an `input` event is fired on this `<input>`. */\n    dateInput = new EventEmitter();\n    /** Emits when the internal state has changed */\n    stateChanges = new Subject();\n    _onTouched = () => { };\n    _validatorOnChange = () => { };\n    _cvaOnChange = () => { };\n    _valueChangesSubscription = Subscription.EMPTY;\n    _localeSubscription = Subscription.EMPTY;\n    /**\n     * Since the value is kept on the model which is assigned in an Input,\n     * we might get a value before we have a model. This property keeps track\n     * of the value until we have somewhere to assign it.\n     */\n    _pendingValue;\n    /** The form control validator for whether the input parses. */\n    _parseValidator = () => {\n        return this._lastValueValid\n            ? null\n            : { 'matDatepickerParse': { 'text': this._elementRef.nativeElement.value } };\n    };\n    /** The form control validator for the date filter. */\n    _filterValidator = (control) => {\n        const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n        return !controlValue || this._matchesFilter(controlValue)\n            ? null\n            : { 'matDatepickerFilter': true };\n    };\n    /** The form control validator for the min date. */\n    _minValidator = (control) => {\n        const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n        const min = this._getMinDate();\n        return !min || !controlValue || this._dateAdapter.compareDate(min, controlValue) <= 0\n            ? null\n            : { 'matDatepickerMin': { 'min': min, 'actual': controlValue } };\n    };\n    /** The form control validator for the max date. */\n    _maxValidator = (control) => {\n        const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n        const max = this._getMaxDate();\n        return !max || !controlValue || this._dateAdapter.compareDate(max, controlValue) >= 0\n            ? null\n            : { 'matDatepickerMax': { 'max': max, 'actual': controlValue } };\n    };\n    /** Gets the base validator functions. */\n    _getValidators() {\n        return [this._parseValidator, this._minValidator, this._maxValidator, this._filterValidator];\n    }\n    /** Registers a date selection model with the input. */\n    _registerModel(model) {\n        this._model = model;\n        this._valueChangesSubscription.unsubscribe();\n        if (this._pendingValue) {\n            this._assignValue(this._pendingValue);\n        }\n        this._valueChangesSubscription = this._model.selectionChanged.subscribe(event => {\n            if (this._shouldHandleChangeEvent(event)) {\n                const value = this._getValueFromModel(event.selection);\n                this._lastValueValid = this._isValidValue(value);\n                this._cvaOnChange(value);\n                this._onTouched();\n                this._formatValue(value);\n                this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n                this.dateChange.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n            }\n        });\n    }\n    /** Whether the last value set on the input was valid. */\n    _lastValueValid = false;\n    constructor() {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (!this._dateAdapter) {\n                throw createMissingDateImplError('DateAdapter');\n            }\n            if (!this._dateFormats) {\n                throw createMissingDateImplError('MAT_DATE_FORMATS');\n            }\n        }\n        // Update the displayed date when the locale changes.\n        this._localeSubscription = this._dateAdapter.localeChanges.subscribe(() => {\n            this._assignValueProgrammatically(this.value);\n        });\n    }\n    ngAfterViewInit() {\n        this._isInitialized = true;\n    }\n    ngOnChanges(changes) {\n        if (dateInputsHaveChanged(changes, this._dateAdapter)) {\n            this.stateChanges.next(undefined);\n        }\n    }\n    ngOnDestroy() {\n        this._valueChangesSubscription.unsubscribe();\n        this._localeSubscription.unsubscribe();\n        this.stateChanges.complete();\n    }\n    /** @docs-private */\n    registerOnValidatorChange(fn) {\n        this._validatorOnChange = fn;\n    }\n    /** @docs-private */\n    validate(c) {\n        return this._validator ? this._validator(c) : null;\n    }\n    // Implemented as part of ControlValueAccessor.\n    writeValue(value) {\n        this._assignValueProgrammatically(value);\n    }\n    // Implemented as part of ControlValueAccessor.\n    registerOnChange(fn) {\n        this._cvaOnChange = fn;\n    }\n    // Implemented as part of ControlValueAccessor.\n    registerOnTouched(fn) {\n        this._onTouched = fn;\n    }\n    // Implemented as part of ControlValueAccessor.\n    setDisabledState(isDisabled) {\n        this.disabled = isDisabled;\n    }\n    _onKeydown(event) {\n        const ctrlShiftMetaModifiers = ['ctrlKey', 'shiftKey', 'metaKey'];\n        const isAltDownArrow = hasModifierKey(event, 'altKey') &&\n            event.keyCode === DOWN_ARROW &&\n            ctrlShiftMetaModifiers.every((modifier) => !hasModifierKey(event, modifier));\n        if (isAltDownArrow && !this._elementRef.nativeElement.readOnly) {\n            this._openPopup();\n            event.preventDefault();\n        }\n    }\n    _onInput(value) {\n        const lastValueWasValid = this._lastValueValid;\n        let date = this._dateAdapter.parse(value, this._dateFormats.parse.dateInput);\n        this._lastValueValid = this._isValidValue(date);\n        date = this._dateAdapter.getValidDateOrNull(date);\n        const hasChanged = !this._dateAdapter.sameDate(date, this.value);\n        // We need to fire the CVA change event for all\n        // nulls, otherwise the validators won't run.\n        if (!date || hasChanged) {\n            this._cvaOnChange(date);\n        }\n        else {\n            // Call the CVA change handler for invalid values\n            // since this is what marks the control as dirty.\n            if (value && !this.value) {\n                this._cvaOnChange(date);\n            }\n            if (lastValueWasValid !== this._lastValueValid) {\n                this._validatorOnChange();\n            }\n        }\n        if (hasChanged) {\n            this._assignValue(date);\n            this.dateInput.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n        }\n    }\n    _onChange() {\n        this.dateChange.emit(new MatDatepickerInputEvent(this, this._elementRef.nativeElement));\n    }\n    /** Handles blur events on the input. */\n    _onBlur() {\n        // Reformat the input only if we have a valid value.\n        if (this.value) {\n            this._formatValue(this.value);\n        }\n        this._onTouched();\n    }\n    /** Formats a value and sets it on the input element. */\n    _formatValue(value) {\n        this._elementRef.nativeElement.value =\n            value != null ? this._dateAdapter.format(value, this._dateFormats.display.dateInput) : '';\n    }\n    /** Assigns a value to the model. */\n    _assignValue(value) {\n        // We may get some incoming values before the model was\n        // assigned. Save the value so that we can assign it later.\n        if (this._model) {\n            this._assignValueToModel(value);\n            this._pendingValue = null;\n        }\n        else {\n            this._pendingValue = value;\n        }\n    }\n    /** Whether a value is considered valid. */\n    _isValidValue(value) {\n        return !value || this._dateAdapter.isValid(value);\n    }\n    /**\n     * Checks whether a parent control is disabled. This is in place so that it can be overridden\n     * by inputs extending this one which can be placed inside of a group that can be disabled.\n     */\n    _parentDisabled() {\n        return false;\n    }\n    /** Programmatically assigns a value to the input. */\n    _assignValueProgrammatically(value) {\n        value = this._dateAdapter.deserialize(value);\n        this._lastValueValid = this._isValidValue(value);\n        value = this._dateAdapter.getValidDateOrNull(value);\n        this._assignValue(value);\n        this._formatValue(value);\n    }\n    /** Gets whether a value matches the current date filter. */\n    _matchesFilter(value) {\n        const filter = this._getDateFilter();\n        return !filter || filter(value);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerInputBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatDatepickerInputBase, isStandalone: true, inputs: { value: \"value\", disabled: [\"disabled\", \"disabled\", booleanAttribute] }, outputs: { dateChange: \"dateChange\", dateInput: \"dateInput\" }, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerInputBase, decorators: [{\n            type: Directive\n        }], ctorParameters: () => [], propDecorators: { value: [{\n                type: Input\n            }], disabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], dateChange: [{\n                type: Output\n            }], dateInput: [{\n                type: Output\n            }] } });\n/**\n * Checks whether the `SimpleChanges` object from an `ngOnChanges`\n * callback has any changes, accounting for date objects.\n */\nfunction dateInputsHaveChanged(changes, adapter) {\n    const keys = Object.keys(changes);\n    for (let key of keys) {\n        const { previousValue, currentValue } = changes[key];\n        if (adapter.isDateInstance(previousValue) && adapter.isDateInstance(currentValue)) {\n            if (!adapter.sameDate(previousValue, currentValue)) {\n                return true;\n            }\n        }\n        else {\n            return true;\n        }\n    }\n    return false;\n}\n\n/** @docs-private */\nconst MAT_DATEPICKER_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => MatDatepickerInput),\n    multi: true,\n};\n/** @docs-private */\nconst MAT_DATEPICKER_VALIDATORS = {\n    provide: NG_VALIDATORS,\n    useExisting: forwardRef(() => MatDatepickerInput),\n    multi: true,\n};\n/** Directive used to connect an input to a MatDatepicker. */\nclass MatDatepickerInput extends MatDatepickerInputBase {\n    _formField = inject(MAT_FORM_FIELD, { optional: true });\n    _closedSubscription = Subscription.EMPTY;\n    _openedSubscription = Subscription.EMPTY;\n    /** The datepicker that this input is associated with. */\n    set matDatepicker(datepicker) {\n        if (datepicker) {\n            this._datepicker = datepicker;\n            this._ariaOwns.set(datepicker.opened ? datepicker.id : null);\n            this._closedSubscription = datepicker.closedStream.subscribe(() => {\n                this._onTouched();\n                this._ariaOwns.set(null);\n            });\n            this._openedSubscription = datepicker.openedStream.subscribe(() => {\n                this._ariaOwns.set(datepicker.id);\n            });\n            this._registerModel(datepicker.registerInput(this));\n        }\n    }\n    _datepicker;\n    /** The id of the panel owned by this input. */\n    _ariaOwns = signal(null);\n    /** The minimum valid date. */\n    get min() {\n        return this._min;\n    }\n    set min(value) {\n        const validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n        if (!this._dateAdapter.sameDate(validValue, this._min)) {\n            this._min = validValue;\n            this._validatorOnChange();\n        }\n    }\n    _min;\n    /** The maximum valid date. */\n    get max() {\n        return this._max;\n    }\n    set max(value) {\n        const validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n        if (!this._dateAdapter.sameDate(validValue, this._max)) {\n            this._max = validValue;\n            this._validatorOnChange();\n        }\n    }\n    _max;\n    /** Function that can be used to filter out dates within the datepicker. */\n    get dateFilter() {\n        return this._dateFilter;\n    }\n    set dateFilter(value) {\n        const wasMatchingValue = this._matchesFilter(this.value);\n        this._dateFilter = value;\n        if (this._matchesFilter(this.value) !== wasMatchingValue) {\n            this._validatorOnChange();\n        }\n    }\n    _dateFilter;\n    /** The combined form control validator for this input. */\n    _validator;\n    constructor() {\n        super();\n        this._validator = Validators.compose(super._getValidators());\n    }\n    /**\n     * Gets the element that the datepicker popup should be connected to.\n     * @return The element to connect the popup to.\n     */\n    getConnectedOverlayOrigin() {\n        return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;\n    }\n    /** Gets the ID of an element that should be used a description for the calendar overlay. */\n    getOverlayLabelId() {\n        if (this._formField) {\n            return this._formField.getLabelId();\n        }\n        return this._elementRef.nativeElement.getAttribute('aria-labelledby');\n    }\n    /** Returns the palette used by the input's form field, if any. */\n    getThemePalette() {\n        return this._formField ? this._formField.color : undefined;\n    }\n    /** Gets the value at which the calendar should start. */\n    getStartValue() {\n        return this.value;\n    }\n    ngOnDestroy() {\n        super.ngOnDestroy();\n        this._closedSubscription.unsubscribe();\n        this._openedSubscription.unsubscribe();\n    }\n    /** Opens the associated datepicker. */\n    _openPopup() {\n        if (this._datepicker) {\n            this._datepicker.open();\n        }\n    }\n    _getValueFromModel(modelValue) {\n        return modelValue;\n    }\n    _assignValueToModel(value) {\n        if (this._model) {\n            this._model.updateSelection(value, this);\n        }\n    }\n    /** Gets the input's minimum date. */\n    _getMinDate() {\n        return this._min;\n    }\n    /** Gets the input's maximum date. */\n    _getMaxDate() {\n        return this._max;\n    }\n    /** Gets the input's date filtering function. */\n    _getDateFilter() {\n        return this._dateFilter;\n    }\n    _shouldHandleChangeEvent(event) {\n        return event.source !== this;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDatepickerInput, isStandalone: true, selector: \"input[matDatepicker]\", inputs: { matDatepicker: \"matDatepicker\", min: \"min\", max: \"max\", dateFilter: [\"matDatepickerFilter\", \"dateFilter\"] }, host: { listeners: { \"input\": \"_onInput($event.target.value)\", \"change\": \"_onChange()\", \"blur\": \"_onBlur()\", \"keydown\": \"_onKeydown($event)\" }, properties: { \"attr.aria-haspopup\": \"_datepicker ? \\\"dialog\\\" : null\", \"attr.aria-owns\": \"_ariaOwns()\", \"attr.min\": \"min ? _dateAdapter.toIso8601(min) : null\", \"attr.max\": \"max ? _dateAdapter.toIso8601(max) : null\", \"attr.data-mat-calendar\": \"_datepicker ? _datepicker.id : null\", \"disabled\": \"disabled\" }, classAttribute: \"mat-datepicker-input\" }, providers: [\n            MAT_DATEPICKER_VALUE_ACCESSOR,\n            MAT_DATEPICKER_VALIDATORS,\n            { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MatDatepickerInput },\n        ], exportAs: [\"matDatepickerInput\"], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerInput, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'input[matDatepicker]',\n                    providers: [\n                        MAT_DATEPICKER_VALUE_ACCESSOR,\n                        MAT_DATEPICKER_VALIDATORS,\n                        { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MatDatepickerInput },\n                    ],\n                    host: {\n                        'class': 'mat-datepicker-input',\n                        '[attr.aria-haspopup]': '_datepicker ? \"dialog\" : null',\n                        '[attr.aria-owns]': '_ariaOwns()',\n                        '[attr.min]': 'min ? _dateAdapter.toIso8601(min) : null',\n                        '[attr.max]': 'max ? _dateAdapter.toIso8601(max) : null',\n                        // Used by the test harness to tie this input to its calendar. We can't depend on\n                        // `aria-owns` for this, because it's only defined while the calendar is open.\n                        '[attr.data-mat-calendar]': '_datepicker ? _datepicker.id : null',\n                        '[disabled]': 'disabled',\n                        '(input)': '_onInput($event.target.value)',\n                        '(change)': '_onChange()',\n                        '(blur)': '_onBlur()',\n                        '(keydown)': '_onKeydown($event)',\n                    },\n                    exportAs: 'matDatepickerInput',\n                }]\n        }], ctorParameters: () => [], propDecorators: { matDatepicker: [{\n                type: Input\n            }], min: [{\n                type: Input\n            }], max: [{\n                type: Input\n            }], dateFilter: [{\n                type: Input,\n                args: ['matDatepickerFilter']\n            }] } });\n\n/** Can be used to override the icon of a `matDatepickerToggle`. */\nclass MatDatepickerToggleIcon {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerToggleIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDatepickerToggleIcon, isStandalone: true, selector: \"[matDatepickerToggleIcon]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerToggleIcon, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matDatepickerToggleIcon]',\n                }]\n        }] });\nclass MatDatepickerToggle {\n    _intl = inject(MatDatepickerIntl);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _stateChanges = Subscription.EMPTY;\n    /** Datepicker instance that the button will toggle. */\n    datepicker;\n    /** Tabindex for the toggle. */\n    tabIndex;\n    /** Screen-reader label for the button. */\n    ariaLabel;\n    /** Whether the toggle button is disabled. */\n    get disabled() {\n        if (this._disabled === undefined && this.datepicker) {\n            return this.datepicker.disabled;\n        }\n        return !!this._disabled;\n    }\n    set disabled(value) {\n        this._disabled = value;\n    }\n    _disabled;\n    /** Whether ripples on the toggle should be disabled. */\n    disableRipple;\n    /** Custom icon set by the consumer. */\n    _customIcon;\n    /** Underlying button element. */\n    _button;\n    constructor() {\n        const defaultTabIndex = inject(new HostAttributeToken('tabindex'), { optional: true });\n        const parsedTabIndex = Number(defaultTabIndex);\n        this.tabIndex = parsedTabIndex || parsedTabIndex === 0 ? parsedTabIndex : null;\n    }\n    ngOnChanges(changes) {\n        if (changes['datepicker']) {\n            this._watchStateChanges();\n        }\n    }\n    ngOnDestroy() {\n        this._stateChanges.unsubscribe();\n    }\n    ngAfterContentInit() {\n        this._watchStateChanges();\n    }\n    _open(event) {\n        if (this.datepicker && !this.disabled) {\n            this.datepicker.open();\n            event.stopPropagation();\n        }\n    }\n    _watchStateChanges() {\n        const datepickerStateChanged = this.datepicker ? this.datepicker.stateChanges : of();\n        const inputStateChanged = this.datepicker && this.datepicker.datepickerInput\n            ? this.datepicker.datepickerInput.stateChanges\n            : of();\n        const datepickerToggled = this.datepicker\n            ? merge(this.datepicker.openedStream, this.datepicker.closedStream)\n            : of();\n        this._stateChanges.unsubscribe();\n        this._stateChanges = merge(this._intl.changes, datepickerStateChanged, inputStateChanged, datepickerToggled).subscribe(() => this._changeDetectorRef.markForCheck());\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerToggle, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"19.0.0\", type: MatDatepickerToggle, isStandalone: true, selector: \"mat-datepicker-toggle\", inputs: { datepicker: [\"for\", \"datepicker\"], tabIndex: \"tabIndex\", ariaLabel: [\"aria-label\", \"ariaLabel\"], disabled: [\"disabled\", \"disabled\", booleanAttribute], disableRipple: \"disableRipple\" }, host: { listeners: { \"click\": \"_open($event)\" }, properties: { \"attr.tabindex\": \"null\", \"class.mat-datepicker-toggle-active\": \"datepicker && datepicker.opened\", \"class.mat-accent\": \"datepicker && datepicker.color === \\\"accent\\\"\", \"class.mat-warn\": \"datepicker && datepicker.color === \\\"warn\\\"\", \"attr.data-mat-calendar\": \"datepicker ? datepicker.id : null\" }, classAttribute: \"mat-datepicker-toggle\" }, queries: [{ propertyName: \"_customIcon\", first: true, predicate: MatDatepickerToggleIcon, descendants: true }], viewQueries: [{ propertyName: \"_button\", first: true, predicate: [\"button\"], descendants: true }], exportAs: [\"matDatepickerToggle\"], usesOnChanges: true, ngImport: i0, template: \"<button\\n  #button\\n  mat-icon-button\\n  type=\\\"button\\\"\\n  [attr.aria-haspopup]=\\\"datepicker ? 'dialog' : null\\\"\\n  [attr.aria-label]=\\\"ariaLabel || _intl.openCalendarLabel\\\"\\n  [attr.tabindex]=\\\"disabled ? -1 : tabIndex\\\"\\n  [disabled]=\\\"disabled\\\"\\n  [disableRipple]=\\\"disableRipple\\\">\\n\\n  @if (!_customIcon) {\\n    <svg\\n      class=\\\"mat-datepicker-toggle-default-icon\\\"\\n      viewBox=\\\"0 0 24 24\\\"\\n      width=\\\"24px\\\"\\n      height=\\\"24px\\\"\\n      fill=\\\"currentColor\\\"\\n      focusable=\\\"false\\\"\\n      aria-hidden=\\\"true\\\">\\n      <path d=\\\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\\\"/>\\n    </svg>\\n  }\\n\\n  <ng-content select=\\\"[matDatepickerToggleIcon]\\\"></ng-content>\\n</button>\\n\", styles: [\".mat-datepicker-toggle{pointer-events:auto;color:var(--mat-datepicker-toggle-icon-color, var(--mat-sys-on-surface-variant))}.mat-datepicker-toggle-active{color:var(--mat-datepicker-toggle-active-state-icon-color, var(--mat-sys-on-surface-variant))}@media(forced-colors: active){.mat-datepicker-toggle-default-icon{color:CanvasText}}\"], dependencies: [{ kind: \"component\", type: MatIconButton, selector: \"button[mat-icon-button]\", exportAs: [\"matButton\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerToggle, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-datepicker-toggle', host: {\n                        'class': 'mat-datepicker-toggle',\n                        '[attr.tabindex]': 'null',\n                        '[class.mat-datepicker-toggle-active]': 'datepicker && datepicker.opened',\n                        '[class.mat-accent]': 'datepicker && datepicker.color === \"accent\"',\n                        '[class.mat-warn]': 'datepicker && datepicker.color === \"warn\"',\n                        // Used by the test harness to tie this toggle to its datepicker.\n                        '[attr.data-mat-calendar]': 'datepicker ? datepicker.id : null',\n                        // Bind the `click` on the host, rather than the inner `button`, so that we can call\n                        // `stopPropagation` on it without affecting the user's `click` handlers. We need to stop\n                        // it so that the input doesn't get focused automatically by the form field (See #21836).\n                        '(click)': '_open($event)',\n                    }, exportAs: 'matDatepickerToggle', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconButton], template: \"<button\\n  #button\\n  mat-icon-button\\n  type=\\\"button\\\"\\n  [attr.aria-haspopup]=\\\"datepicker ? 'dialog' : null\\\"\\n  [attr.aria-label]=\\\"ariaLabel || _intl.openCalendarLabel\\\"\\n  [attr.tabindex]=\\\"disabled ? -1 : tabIndex\\\"\\n  [disabled]=\\\"disabled\\\"\\n  [disableRipple]=\\\"disableRipple\\\">\\n\\n  @if (!_customIcon) {\\n    <svg\\n      class=\\\"mat-datepicker-toggle-default-icon\\\"\\n      viewBox=\\\"0 0 24 24\\\"\\n      width=\\\"24px\\\"\\n      height=\\\"24px\\\"\\n      fill=\\\"currentColor\\\"\\n      focusable=\\\"false\\\"\\n      aria-hidden=\\\"true\\\">\\n      <path d=\\\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\\\"/>\\n    </svg>\\n  }\\n\\n  <ng-content select=\\\"[matDatepickerToggleIcon]\\\"></ng-content>\\n</button>\\n\", styles: [\".mat-datepicker-toggle{pointer-events:auto;color:var(--mat-datepicker-toggle-icon-color, var(--mat-sys-on-surface-variant))}.mat-datepicker-toggle-active{color:var(--mat-datepicker-toggle-active-state-icon-color, var(--mat-sys-on-surface-variant))}@media(forced-colors: active){.mat-datepicker-toggle-default-icon{color:CanvasText}}\"] }]\n        }], ctorParameters: () => [], propDecorators: { datepicker: [{\n                type: Input,\n                args: ['for']\n            }], tabIndex: [{\n                type: Input\n            }], ariaLabel: [{\n                type: Input,\n                args: ['aria-label']\n            }], disabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], disableRipple: [{\n                type: Input\n            }], _customIcon: [{\n                type: ContentChild,\n                args: [MatDatepickerToggleIcon]\n            }], _button: [{\n                type: ViewChild,\n                args: ['button']\n            }] } });\n\n// This file contains the `_computeAriaAccessibleName` function, which computes what the *expected*\n// ARIA accessible name would be for a given element. Implements a subset of ARIA specification\n// [Accessible Name and Description Computation 1.2](https://www.w3.org/TR/accname-1.2/).\n//\n// Specification accname-1.2 can be summarized by returning the result of the first method\n// available.\n//\n//  1. `aria-labelledby` attribute\n//     ```\n//       <!-- example using aria-labelledby-->\n//       <label id='label-id'>Start Date</label>\n//       <input aria-labelledby='label-id'/>\n//     ```\n//  2. `aria-label` attribute (e.g. `<input aria-label=\"Departure\"/>`)\n//  3. Label with `for`/`id`\n//     ```\n//       <!-- example using for/id -->\n//       <label for=\"current-node\">Label</label>\n//       <input id=\"current-node\"/>\n//     ```\n//  4. `placeholder` attribute (e.g. `<input placeholder=\"06/03/1990\"/>`)\n//  5. `title` attribute (e.g. `<input title=\"Check-In\"/>`)\n//  6. text content\n//     ```\n//       <!-- example using text content -->\n//       <label for=\"current-node\"><span>Departure</span> Date</label>\n//       <input id=\"current-node\"/>\n//     ```\n/**\n * Computes the *expected* ARIA accessible name for argument element based on [accname-1.2\n * specification](https://www.w3.org/TR/accname-1.2/). Implements a subset of accname-1.2,\n * and should only be used for the Datepicker's specific use case.\n *\n * Intended use:\n * This is not a general use implementation. Only implements the parts of accname-1.2 that are\n * required for the Datepicker's specific use case. This function is not intended for any other\n * use.\n *\n * Limitations:\n *  - Only covers the needs of `matStartDate` and `matEndDate`. Does not support other use cases.\n *  - See NOTES's in implementation for specific details on what parts of the accname-1.2\n *  specification are not implemented.\n *\n *  @param element {HTMLInputElement} native &lt;input/&gt; element of `matStartDate` or\n *  `matEndDate` component. Corresponds to the 'Root Element' from accname-1.2\n *\n *  @return expected ARIA accessible name of argument &lt;input/&gt;\n */\nfunction _computeAriaAccessibleName(element) {\n    return _computeAriaAccessibleNameInternal(element, true);\n}\n/**\n * Determine if argument node is an Element based on `nodeType` property. This function is safe to\n * use with server-side rendering.\n */\nfunction ssrSafeIsElement(node) {\n    return node.nodeType === Node.ELEMENT_NODE;\n}\n/**\n * Determine if argument node is an HTMLInputElement based on `nodeName` property. This funciton is\n * safe to use with server-side rendering.\n */\nfunction ssrSafeIsHTMLInputElement(node) {\n    return node.nodeName === 'INPUT';\n}\n/**\n * Determine if argument node is an HTMLTextAreaElement based on `nodeName` property. This\n * funciton is safe to use with server-side rendering.\n */\nfunction ssrSafeIsHTMLTextAreaElement(node) {\n    return node.nodeName === 'TEXTAREA';\n}\n/**\n * Calculate the expected ARIA accessible name for given DOM Node. Given DOM Node may be either the\n * \"Root node\" passed to `_computeAriaAccessibleName` or \"Current node\" as result of recursion.\n *\n * @return the accessible name of argument DOM Node\n *\n * @param currentNode node to determine accessible name of\n * @param isDirectlyReferenced true if `currentNode` is the root node to calculate ARIA accessible\n * name of. False if it is a result of recursion.\n */\nfunction _computeAriaAccessibleNameInternal(currentNode, isDirectlyReferenced) {\n    // NOTE: this differs from accname-1.2 specification.\n    //  - Does not implement Step 1. of accname-1.2: '''If `currentNode`'s role prohibits naming,\n    //    return the empty string (\"\")'''.\n    //  - Does not implement Step 2.A. of accname-1.2: '''if current node is hidden and not directly\n    //    referenced by aria-labelledby... return the empty string.'''\n    // acc-name-1.2 Step 2.B.: aria-labelledby\n    if (ssrSafeIsElement(currentNode) && isDirectlyReferenced) {\n        const labelledbyIds = currentNode.getAttribute?.('aria-labelledby')?.split(/\\s+/g) || [];\n        const validIdRefs = labelledbyIds.reduce((validIds, id) => {\n            const elem = document.getElementById(id);\n            if (elem) {\n                validIds.push(elem);\n            }\n            return validIds;\n        }, []);\n        if (validIdRefs.length) {\n            return validIdRefs\n                .map(idRef => {\n                return _computeAriaAccessibleNameInternal(idRef, false);\n            })\n                .join(' ');\n        }\n    }\n    // acc-name-1.2 Step 2.C.: aria-label\n    if (ssrSafeIsElement(currentNode)) {\n        const ariaLabel = currentNode.getAttribute('aria-label')?.trim();\n        if (ariaLabel) {\n            return ariaLabel;\n        }\n    }\n    // acc-name-1.2 Step 2.D. attribute or element that defines a text alternative\n    //\n    // NOTE: this differs from accname-1.2 specification.\n    // Only implements Step 2.D. for `<label>`,`<input/>`, and `<textarea/>` element. Does not\n    // implement other elements that have an attribute or element that defines a text alternative.\n    if (ssrSafeIsHTMLInputElement(currentNode) || ssrSafeIsHTMLTextAreaElement(currentNode)) {\n        // use label with a `for` attribute referencing the current node\n        if (currentNode.labels?.length) {\n            return Array.from(currentNode.labels)\n                .map(x => _computeAriaAccessibleNameInternal(x, false))\n                .join(' ');\n        }\n        // use placeholder if available\n        const placeholder = currentNode.getAttribute('placeholder')?.trim();\n        if (placeholder) {\n            return placeholder;\n        }\n        // use title if available\n        const title = currentNode.getAttribute('title')?.trim();\n        if (title) {\n            return title;\n        }\n    }\n    // NOTE: this differs from accname-1.2 specification.\n    //  - does not implement acc-name-1.2 Step 2.E.: '''if the current node is a control embedded\n    //     within the label... then include the embedded control as part of the text alternative in\n    //     the following manner...'''. Step 2E applies to embedded controls such as textbox, listbox,\n    //     range, etc.\n    //  - does not implement acc-name-1.2 step 2.F.: check that '''role allows name from content''',\n    //    which applies to `currentNode` and its children.\n    //  - does not implement acc-name-1.2 Step 2.F.ii.: '''Check for CSS generated textual content'''\n    //    (e.g. :before and :after).\n    //  - does not implement acc-name-1.2 Step 2.I.: '''if the current node has a Tooltip attribute,\n    //    return its value'''\n    // Return text content with whitespace collapsed into a single space character. Accomplish\n    // acc-name-1.2 steps 2F, 2G, and 2H.\n    return (currentNode.textContent || '').replace(/\\s+/g, ' ').trim();\n}\n\n/**\n * Used to provide the date range input wrapper component\n * to the parts without circular dependencies.\n */\nconst MAT_DATE_RANGE_INPUT_PARENT = new InjectionToken('MAT_DATE_RANGE_INPUT_PARENT');\n/**\n * Base class for the individual inputs that can be projected inside a `mat-date-range-input`.\n */\nclass MatDateRangeInputPartBase extends MatDatepickerInputBase {\n    _rangeInput = inject(MAT_DATE_RANGE_INPUT_PARENT);\n    _elementRef = inject(ElementRef);\n    _defaultErrorStateMatcher = inject(ErrorStateMatcher);\n    _injector = inject(Injector);\n    _parentForm = inject(NgForm, { optional: true });\n    _parentFormGroup = inject(FormGroupDirective, { optional: true });\n    /**\n     * Form control bound to this input part.\n     * @docs-private\n     */\n    ngControl;\n    _dir = inject(Directionality, { optional: true });\n    _errorStateTracker;\n    /** Object used to control when error messages are shown. */\n    get errorStateMatcher() {\n        return this._errorStateTracker.matcher;\n    }\n    set errorStateMatcher(value) {\n        this._errorStateTracker.matcher = value;\n    }\n    /** Whether the input is in an error state. */\n    get errorState() {\n        return this._errorStateTracker.errorState;\n    }\n    set errorState(value) {\n        this._errorStateTracker.errorState = value;\n    }\n    constructor() {\n        super();\n        this._errorStateTracker = new _ErrorStateTracker(this._defaultErrorStateMatcher, null, this._parentFormGroup, this._parentForm, this.stateChanges);\n    }\n    ngOnInit() {\n        // We need the date input to provide itself as a `ControlValueAccessor` and a `Validator`, while\n        // injecting its `NgControl` so that the error state is handled correctly. This introduces a\n        // circular dependency, because both `ControlValueAccessor` and `Validator` depend on the input\n        // itself. Usually we can work around it for the CVA, but there's no API to do it for the\n        // validator. We work around it here by injecting the `NgControl` in `ngOnInit`, after\n        // everything has been resolved.\n        const ngControl = this._injector.get(NgControl, null, { optional: true, self: true });\n        if (ngControl) {\n            this.ngControl = ngControl;\n            this._errorStateTracker.ngControl = ngControl;\n        }\n    }\n    ngDoCheck() {\n        if (this.ngControl) {\n            // We need to re-evaluate this on every change detection cycle, because there are some\n            // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n            // that whatever logic is in here has to be super lean or we risk destroying the performance.\n            this.updateErrorState();\n        }\n    }\n    /** Gets whether the input is empty. */\n    isEmpty() {\n        return this._elementRef.nativeElement.value.length === 0;\n    }\n    /** Gets the placeholder of the input. */\n    _getPlaceholder() {\n        return this._elementRef.nativeElement.placeholder;\n    }\n    /** Focuses the input. */\n    focus() {\n        this._elementRef.nativeElement.focus();\n    }\n    /** Gets the value that should be used when mirroring the input's size. */\n    getMirrorValue() {\n        const element = this._elementRef.nativeElement;\n        const value = element.value;\n        return value.length > 0 ? value : element.placeholder;\n    }\n    /** Refreshes the error state of the input. */\n    updateErrorState() {\n        this._errorStateTracker.updateErrorState();\n    }\n    /** Handles `input` events on the input element. */\n    _onInput(value) {\n        super._onInput(value);\n        this._rangeInput._handleChildValueChange();\n    }\n    /** Opens the datepicker associated with the input. */\n    _openPopup() {\n        this._rangeInput._openDatepicker();\n    }\n    /** Gets the minimum date from the range input. */\n    _getMinDate() {\n        return this._rangeInput.min;\n    }\n    /** Gets the maximum date from the range input. */\n    _getMaxDate() {\n        return this._rangeInput.max;\n    }\n    /** Gets the date filter function from the range input. */\n    _getDateFilter() {\n        return this._rangeInput.dateFilter;\n    }\n    _parentDisabled() {\n        return this._rangeInput._groupDisabled;\n    }\n    _shouldHandleChangeEvent({ source }) {\n        return source !== this._rangeInput._startInput && source !== this._rangeInput._endInput;\n    }\n    _assignValueProgrammatically(value) {\n        super._assignValueProgrammatically(value);\n        const opposite = (this === this._rangeInput._startInput\n            ? this._rangeInput._endInput\n            : this._rangeInput._startInput);\n        opposite?._validatorOnChange();\n    }\n    /** return the ARIA accessible name of the input element */\n    _getAccessibleName() {\n        return _computeAriaAccessibleName(this._elementRef.nativeElement);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDateRangeInputPartBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDateRangeInputPartBase, isStandalone: true, inputs: { errorStateMatcher: \"errorStateMatcher\" }, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDateRangeInputPartBase, decorators: [{\n            type: Directive\n        }], ctorParameters: () => [], propDecorators: { errorStateMatcher: [{\n                type: Input\n            }] } });\n/** Input for entering the start date in a `mat-date-range-input`. */\nclass MatStartDate extends MatDateRangeInputPartBase {\n    /** Validator that checks that the start date isn't after the end date. */\n    _startValidator = (control) => {\n        const start = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n        const end = this._model ? this._model.selection.end : null;\n        return !start || !end || this._dateAdapter.compareDate(start, end) <= 0\n            ? null\n            : { 'matStartDateInvalid': { 'end': end, 'actual': start } };\n    };\n    _validator = Validators.compose([...super._getValidators(), this._startValidator]);\n    _getValueFromModel(modelValue) {\n        return modelValue.start;\n    }\n    _shouldHandleChangeEvent(change) {\n        if (!super._shouldHandleChangeEvent(change)) {\n            return false;\n        }\n        else {\n            return !change.oldValue?.start\n                ? !!change.selection.start\n                : !change.selection.start ||\n                    !!this._dateAdapter.compareDate(change.oldValue.start, change.selection.start);\n        }\n    }\n    _assignValueToModel(value) {\n        if (this._model) {\n            const range = new DateRange(value, this._model.selection.end);\n            this._model.updateSelection(range, this);\n        }\n    }\n    _formatValue(value) {\n        super._formatValue(value);\n        // Any time the input value is reformatted we need to tell the parent.\n        this._rangeInput._handleChildValueChange();\n    }\n    _onKeydown(event) {\n        const endInput = this._rangeInput._endInput;\n        const element = this._elementRef.nativeElement;\n        const isLtr = this._dir?.value !== 'rtl';\n        // If the user hits RIGHT (LTR) when at the end of the input (and no\n        // selection), move the cursor to the start of the end input.\n        if (((event.keyCode === RIGHT_ARROW && isLtr) || (event.keyCode === LEFT_ARROW && !isLtr)) &&\n            element.selectionStart === element.value.length &&\n            element.selectionEnd === element.value.length) {\n            event.preventDefault();\n            endInput._elementRef.nativeElement.setSelectionRange(0, 0);\n            endInput.focus();\n        }\n        else {\n            super._onKeydown(event);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatStartDate, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatStartDate, isStandalone: true, selector: \"input[matStartDate]\", outputs: { dateChange: \"dateChange\", dateInput: \"dateInput\" }, host: { attributes: { \"type\": \"text\" }, listeners: { \"input\": \"_onInput($event.target.value)\", \"change\": \"_onChange()\", \"keydown\": \"_onKeydown($event)\", \"blur\": \"_onBlur()\" }, properties: { \"disabled\": \"disabled\", \"attr.aria-haspopup\": \"_rangeInput.rangePicker ? \\\"dialog\\\" : null\", \"attr.aria-owns\": \"_rangeInput._ariaOwns\\n        ? _rangeInput._ariaOwns()\\n        : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null\", \"attr.min\": \"_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null\", \"attr.max\": \"_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null\" }, classAttribute: \"mat-start-date mat-date-range-input-inner\" }, providers: [\n            { provide: NG_VALUE_ACCESSOR, useExisting: MatStartDate, multi: true },\n            { provide: NG_VALIDATORS, useExisting: MatStartDate, multi: true },\n        ], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatStartDate, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'input[matStartDate]',\n                    host: {\n                        'class': 'mat-start-date mat-date-range-input-inner',\n                        '[disabled]': 'disabled',\n                        '(input)': '_onInput($event.target.value)',\n                        '(change)': '_onChange()',\n                        '(keydown)': '_onKeydown($event)',\n                        '[attr.aria-haspopup]': '_rangeInput.rangePicker ? \"dialog\" : null',\n                        '[attr.aria-owns]': `_rangeInput._ariaOwns\n        ? _rangeInput._ariaOwns()\n        : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null`,\n                        '[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',\n                        '[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',\n                        '(blur)': '_onBlur()',\n                        'type': 'text',\n                    },\n                    providers: [\n                        { provide: NG_VALUE_ACCESSOR, useExisting: MatStartDate, multi: true },\n                        { provide: NG_VALIDATORS, useExisting: MatStartDate, multi: true },\n                    ],\n                    // These need to be specified explicitly, because some tooling doesn't\n                    // seem to pick them up from the base class. See #20932.\n                    outputs: ['dateChange', 'dateInput'],\n                }]\n        }] });\n/** Input for entering the end date in a `mat-date-range-input`. */\nclass MatEndDate extends MatDateRangeInputPartBase {\n    /** Validator that checks that the end date isn't before the start date. */\n    _endValidator = (control) => {\n        const end = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));\n        const start = this._model ? this._model.selection.start : null;\n        return !end || !start || this._dateAdapter.compareDate(end, start) >= 0\n            ? null\n            : { 'matEndDateInvalid': { 'start': start, 'actual': end } };\n    };\n    _validator = Validators.compose([...super._getValidators(), this._endValidator]);\n    _getValueFromModel(modelValue) {\n        return modelValue.end;\n    }\n    _shouldHandleChangeEvent(change) {\n        if (!super._shouldHandleChangeEvent(change)) {\n            return false;\n        }\n        else {\n            return !change.oldValue?.end\n                ? !!change.selection.end\n                : !change.selection.end ||\n                    !!this._dateAdapter.compareDate(change.oldValue.end, change.selection.end);\n        }\n    }\n    _assignValueToModel(value) {\n        if (this._model) {\n            const range = new DateRange(this._model.selection.start, value);\n            this._model.updateSelection(range, this);\n        }\n    }\n    _moveCaretToEndOfStartInput() {\n        const startInput = this._rangeInput._startInput._elementRef.nativeElement;\n        const value = startInput.value;\n        if (value.length > 0) {\n            startInput.setSelectionRange(value.length, value.length);\n        }\n        startInput.focus();\n    }\n    _onKeydown(event) {\n        const element = this._elementRef.nativeElement;\n        const isLtr = this._dir?.value !== 'rtl';\n        // If the user is pressing backspace on an empty end input, move focus back to the start.\n        if (event.keyCode === BACKSPACE && !element.value) {\n            this._moveCaretToEndOfStartInput();\n        }\n        // If the user hits LEFT (LTR) when at the start of the input (and no\n        // selection), move the cursor to the end of the start input.\n        else if (((event.keyCode === LEFT_ARROW && isLtr) || (event.keyCode === RIGHT_ARROW && !isLtr)) &&\n            element.selectionStart === 0 &&\n            element.selectionEnd === 0) {\n            event.preventDefault();\n            this._moveCaretToEndOfStartInput();\n        }\n        else {\n            super._onKeydown(event);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatEndDate, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatEndDate, isStandalone: true, selector: \"input[matEndDate]\", outputs: { dateChange: \"dateChange\", dateInput: \"dateInput\" }, host: { attributes: { \"type\": \"text\" }, listeners: { \"input\": \"_onInput($event.target.value)\", \"change\": \"_onChange()\", \"keydown\": \"_onKeydown($event)\", \"blur\": \"_onBlur()\" }, properties: { \"disabled\": \"disabled\", \"attr.aria-haspopup\": \"_rangeInput.rangePicker ? \\\"dialog\\\" : null\", \"attr.aria-owns\": \"_rangeInput._ariaOwns\\n        ? _rangeInput._ariaOwns()\\n        : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null\", \"attr.min\": \"_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null\", \"attr.max\": \"_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null\" }, classAttribute: \"mat-end-date mat-date-range-input-inner\" }, providers: [\n            { provide: NG_VALUE_ACCESSOR, useExisting: MatEndDate, multi: true },\n            { provide: NG_VALIDATORS, useExisting: MatEndDate, multi: true },\n        ], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatEndDate, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'input[matEndDate]',\n                    host: {\n                        'class': 'mat-end-date mat-date-range-input-inner',\n                        '[disabled]': 'disabled',\n                        '(input)': '_onInput($event.target.value)',\n                        '(change)': '_onChange()',\n                        '(keydown)': '_onKeydown($event)',\n                        '[attr.aria-haspopup]': '_rangeInput.rangePicker ? \"dialog\" : null',\n                        '[attr.aria-owns]': `_rangeInput._ariaOwns\n        ? _rangeInput._ariaOwns()\n        : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null`,\n                        '[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',\n                        '[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',\n                        '(blur)': '_onBlur()',\n                        'type': 'text',\n                    },\n                    providers: [\n                        { provide: NG_VALUE_ACCESSOR, useExisting: MatEndDate, multi: true },\n                        { provide: NG_VALIDATORS, useExisting: MatEndDate, multi: true },\n                    ],\n                    // These need to be specified explicitly, because some tooling doesn't\n                    // seem to pick them up from the base class. See #20932.\n                    outputs: ['dateChange', 'dateInput'],\n                }]\n        }] });\n\nclass MatDateRangeInput {\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _elementRef = inject(ElementRef);\n    _dateAdapter = inject(DateAdapter, { optional: true });\n    _formField = inject(MAT_FORM_FIELD, { optional: true });\n    _closedSubscription = Subscription.EMPTY;\n    _openedSubscription = Subscription.EMPTY;\n    /** Current value of the range input. */\n    get value() {\n        return this._model ? this._model.selection : null;\n    }\n    /** Unique ID for the group. */\n    id = inject(_IdGenerator).getId('mat-date-range-input-');\n    /** Whether the control is focused. */\n    focused = false;\n    /** Whether the control's label should float. */\n    get shouldLabelFloat() {\n        return this.focused || !this.empty;\n    }\n    /** Name of the form control. */\n    controlType = 'mat-date-range-input';\n    /**\n     * Implemented as a part of `MatFormFieldControl`.\n     * Set the placeholder attribute on `matStartDate` and `matEndDate`.\n     * @docs-private\n     */\n    get placeholder() {\n        const start = this._startInput?._getPlaceholder() || '';\n        const end = this._endInput?._getPlaceholder() || '';\n        return start || end ? `${start} ${this.separator} ${end}` : '';\n    }\n    /** The range picker that this input is associated with. */\n    get rangePicker() {\n        return this._rangePicker;\n    }\n    set rangePicker(rangePicker) {\n        if (rangePicker) {\n            this._model = rangePicker.registerInput(this);\n            this._rangePicker = rangePicker;\n            this._closedSubscription.unsubscribe();\n            this._openedSubscription.unsubscribe();\n            this._ariaOwns.set(this.rangePicker.opened ? rangePicker.id : null);\n            this._closedSubscription = rangePicker.closedStream.subscribe(() => {\n                this._startInput?._onTouched();\n                this._endInput?._onTouched();\n                this._ariaOwns.set(null);\n            });\n            this._openedSubscription = rangePicker.openedStream.subscribe(() => {\n                this._ariaOwns.set(rangePicker.id);\n            });\n            this._registerModel(this._model);\n        }\n    }\n    _rangePicker;\n    /** The id of the panel owned by this input. */\n    _ariaOwns = signal(null);\n    /** Whether the input is required. */\n    get required() {\n        return (this._required ??\n            (this._isTargetRequired(this) ||\n                this._isTargetRequired(this._startInput) ||\n                this._isTargetRequired(this._endInput)) ??\n            false);\n    }\n    set required(value) {\n        this._required = value;\n    }\n    _required;\n    /** Function that can be used to filter out dates within the date range picker. */\n    get dateFilter() {\n        return this._dateFilter;\n    }\n    set dateFilter(value) {\n        const start = this._startInput;\n        const end = this._endInput;\n        const wasMatchingStart = start && start._matchesFilter(start.value);\n        const wasMatchingEnd = end && end._matchesFilter(start.value);\n        this._dateFilter = value;\n        if (start && start._matchesFilter(start.value) !== wasMatchingStart) {\n            start._validatorOnChange();\n        }\n        if (end && end._matchesFilter(end.value) !== wasMatchingEnd) {\n            end._validatorOnChange();\n        }\n    }\n    _dateFilter;\n    /** The minimum valid date. */\n    get min() {\n        return this._min;\n    }\n    set min(value) {\n        const validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n        if (!this._dateAdapter.sameDate(validValue, this._min)) {\n            this._min = validValue;\n            this._revalidate();\n        }\n    }\n    _min;\n    /** The maximum valid date. */\n    get max() {\n        return this._max;\n    }\n    set max(value) {\n        const validValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));\n        if (!this._dateAdapter.sameDate(validValue, this._max)) {\n            this._max = validValue;\n            this._revalidate();\n        }\n    }\n    _max;\n    /** Whether the input is disabled. */\n    get disabled() {\n        return this._startInput && this._endInput\n            ? this._startInput.disabled && this._endInput.disabled\n            : this._groupDisabled;\n    }\n    set disabled(value) {\n        if (value !== this._groupDisabled) {\n            this._groupDisabled = value;\n            this.stateChanges.next(undefined);\n        }\n    }\n    _groupDisabled = false;\n    /** Whether the input is in an error state. */\n    get errorState() {\n        if (this._startInput && this._endInput) {\n            return this._startInput.errorState || this._endInput.errorState;\n        }\n        return false;\n    }\n    /** Whether the datepicker input is empty. */\n    get empty() {\n        const startEmpty = this._startInput ? this._startInput.isEmpty() : false;\n        const endEmpty = this._endInput ? this._endInput.isEmpty() : false;\n        return startEmpty && endEmpty;\n    }\n    /** Value for the `aria-describedby` attribute of the inputs. */\n    _ariaDescribedBy = null;\n    /** Date selection model currently registered with the input. */\n    _model;\n    /** Separator text to be shown between the inputs. */\n    separator = '–';\n    /** Start of the comparison range that should be shown in the calendar. */\n    comparisonStart = null;\n    /** End of the comparison range that should be shown in the calendar. */\n    comparisonEnd = null;\n    _startInput;\n    _endInput;\n    /**\n     * Implemented as a part of `MatFormFieldControl`.\n     * TODO(crisbeto): change type to `AbstractControlDirective` after #18206 lands.\n     * @docs-private\n     */\n    ngControl;\n    /** Emits when the input's state has changed. */\n    stateChanges = new Subject();\n    /**\n     * Disable the automatic labeling to avoid issues like #27241.\n     * @docs-private\n     */\n    disableAutomaticLabeling = true;\n    constructor() {\n        if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw createMissingDateImplError('DateAdapter');\n        }\n        // The datepicker module can be used both with MDC and non-MDC form fields. We have\n        // to conditionally add the MDC input class so that the range picker looks correctly.\n        if (this._formField?._elementRef.nativeElement.classList.contains('mat-mdc-form-field')) {\n            this._elementRef.nativeElement.classList.add('mat-mdc-input-element', 'mat-mdc-form-field-input-control', 'mdc-text-field__input');\n        }\n        // TODO(crisbeto): remove `as any` after #18206 lands.\n        this.ngControl = inject(ControlContainer, { optional: true, self: true });\n    }\n    /**\n     * Implemented as a part of `MatFormFieldControl`.\n     * @docs-private\n     */\n    setDescribedByIds(ids) {\n        this._ariaDescribedBy = ids.length ? ids.join(' ') : null;\n    }\n    /**\n     * Implemented as a part of `MatFormFieldControl`.\n     * @docs-private\n     */\n    onContainerClick() {\n        if (!this.focused && !this.disabled) {\n            if (!this._model || !this._model.selection.start) {\n                this._startInput.focus();\n            }\n            else {\n                this._endInput.focus();\n            }\n        }\n    }\n    ngAfterContentInit() {\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (!this._startInput) {\n                throw Error('mat-date-range-input must contain a matStartDate input');\n            }\n            if (!this._endInput) {\n                throw Error('mat-date-range-input must contain a matEndDate input');\n            }\n        }\n        if (this._model) {\n            this._registerModel(this._model);\n        }\n        // We don't need to unsubscribe from this, because we\n        // know that the input streams will be completed on destroy.\n        merge(this._startInput.stateChanges, this._endInput.stateChanges).subscribe(() => {\n            this.stateChanges.next(undefined);\n        });\n    }\n    ngOnChanges(changes) {\n        if (dateInputsHaveChanged(changes, this._dateAdapter)) {\n            this.stateChanges.next(undefined);\n        }\n    }\n    ngOnDestroy() {\n        this._closedSubscription.unsubscribe();\n        this._openedSubscription.unsubscribe();\n        this.stateChanges.complete();\n    }\n    /** Gets the date at which the calendar should start. */\n    getStartValue() {\n        return this.value ? this.value.start : null;\n    }\n    /** Gets the input's theme palette. */\n    getThemePalette() {\n        return this._formField ? this._formField.color : undefined;\n    }\n    /** Gets the element to which the calendar overlay should be attached. */\n    getConnectedOverlayOrigin() {\n        return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;\n    }\n    /** Gets the ID of an element that should be used a description for the calendar overlay. */\n    getOverlayLabelId() {\n        return this._formField ? this._formField.getLabelId() : null;\n    }\n    /** Gets the value that is used to mirror the state input. */\n    _getInputMirrorValue(part) {\n        const input = part === 'start' ? this._startInput : this._endInput;\n        return input ? input.getMirrorValue() : '';\n    }\n    /** Whether the input placeholders should be hidden. */\n    _shouldHidePlaceholders() {\n        return this._startInput ? !this._startInput.isEmpty() : false;\n    }\n    /** Handles the value in one of the child inputs changing. */\n    _handleChildValueChange() {\n        this.stateChanges.next(undefined);\n        this._changeDetectorRef.markForCheck();\n    }\n    /** Opens the date range picker associated with the input. */\n    _openDatepicker() {\n        if (this._rangePicker) {\n            this._rangePicker.open();\n        }\n    }\n    /** Whether the separate text should be hidden. */\n    _shouldHideSeparator() {\n        return ((!this._formField ||\n            (this._formField.getLabelId() && !this._formField._shouldLabelFloat())) &&\n            this.empty);\n    }\n    /** Gets the value for the `aria-labelledby` attribute of the inputs. */\n    _getAriaLabelledby() {\n        const formField = this._formField;\n        return formField && formField._hasFloatingLabel() ? formField._labelId : null;\n    }\n    _getStartDateAccessibleName() {\n        return this._startInput._getAccessibleName();\n    }\n    _getEndDateAccessibleName() {\n        return this._endInput._getAccessibleName();\n    }\n    /** Updates the focused state of the range input. */\n    _updateFocus(origin) {\n        this.focused = origin !== null;\n        this.stateChanges.next();\n    }\n    /** Re-runs the validators on the start/end inputs. */\n    _revalidate() {\n        if (this._startInput) {\n            this._startInput._validatorOnChange();\n        }\n        if (this._endInput) {\n            this._endInput._validatorOnChange();\n        }\n    }\n    /** Registers the current date selection model with the start/end inputs. */\n    _registerModel(model) {\n        if (this._startInput) {\n            this._startInput._registerModel(model);\n        }\n        if (this._endInput) {\n            this._endInput._registerModel(model);\n        }\n    }\n    /** Checks whether a specific range input directive is required. */\n    _isTargetRequired(target) {\n        return target?.ngControl?.control?.hasValidator(Validators.required);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDateRangeInput, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatDateRangeInput, isStandalone: true, selector: \"mat-date-range-input\", inputs: { rangePicker: \"rangePicker\", required: [\"required\", \"required\", booleanAttribute], dateFilter: \"dateFilter\", min: \"min\", max: \"max\", disabled: [\"disabled\", \"disabled\", booleanAttribute], separator: \"separator\", comparisonStart: \"comparisonStart\", comparisonEnd: \"comparisonEnd\" }, host: { attributes: { \"role\": \"group\" }, properties: { \"class.mat-date-range-input-hide-placeholders\": \"_shouldHidePlaceholders()\", \"class.mat-date-range-input-required\": \"required\", \"attr.id\": \"id\", \"attr.aria-labelledby\": \"_getAriaLabelledby()\", \"attr.aria-describedby\": \"_ariaDescribedBy\", \"attr.data-mat-calendar\": \"rangePicker ? rangePicker.id : null\" }, classAttribute: \"mat-date-range-input\" }, providers: [\n            { provide: MatFormFieldControl, useExisting: MatDateRangeInput },\n            { provide: MAT_DATE_RANGE_INPUT_PARENT, useExisting: MatDateRangeInput },\n        ], queries: [{ propertyName: \"_startInput\", first: true, predicate: MatStartDate, descendants: true }, { propertyName: \"_endInput\", first: true, predicate: MatEndDate, descendants: true }], exportAs: [\"matDateRangeInput\"], usesOnChanges: true, ngImport: i0, template: \"<div\\n  class=\\\"mat-date-range-input-container\\\"\\n  cdkMonitorSubtreeFocus\\n  (cdkFocusChange)=\\\"_updateFocus($event)\\\">\\n  <div class=\\\"mat-date-range-input-wrapper\\\">\\n    <ng-content select=\\\"input[matStartDate]\\\"></ng-content>\\n    <span\\n      class=\\\"mat-date-range-input-mirror\\\"\\n      aria-hidden=\\\"true\\\">{{_getInputMirrorValue('start')}}</span>\\n  </div>\\n\\n  <span\\n    class=\\\"mat-date-range-input-separator\\\"\\n    [class.mat-date-range-input-separator-hidden]=\\\"_shouldHideSeparator()\\\">{{separator}}</span>\\n\\n  <div class=\\\"mat-date-range-input-wrapper mat-date-range-input-end-wrapper\\\">\\n    <ng-content select=\\\"input[matEndDate]\\\"></ng-content>\\n    <span\\n      class=\\\"mat-date-range-input-mirror\\\"\\n      aria-hidden=\\\"true\\\">{{_getInputMirrorValue('end')}}</span>\\n  </div>\\n</div>\\n\\n\", styles: [\".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px;color:var(--mat-datepicker-range-input-separator-color, var(--mat-sys-on-surface))}.mat-form-field-disabled .mat-date-range-input-separator{color:var(--mat-datepicker-range-input-disabled-state-separator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}._mat-animation-noopable .mat-date-range-input-separator{transition:none}.mat-date-range-input-separator-hidden{-webkit-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-end-wrapper{flex-grow:1}.mat-date-range-input-inner{position:absolute;top:0;left:0;font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%;height:100%}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner[disabled]{color:var(--mat-datepicker-range-input-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}@media(forced-colors: active){.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{opacity:0}}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}@media(forced-colors: active){.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{opacity:0}}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}@media(forced-colors: active){.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{opacity:0}}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}@media(forced-colors: active){.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{opacity:0}}._mat-animation-noopable .mat-date-range-input-inner::placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-moz-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner:-ms-input-placeholder{transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-mdc-form-field-type-mat-date-range-input .mat-mdc-form-field-infix{width:200px}\"], dependencies: [{ kind: \"directive\", type: CdkMonitorFocus, selector: \"[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]\", outputs: [\"cdkFocusChange\"], exportAs: [\"cdkMonitorFocus\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDateRangeInput, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-date-range-input', exportAs: 'matDateRangeInput', host: {\n                        'class': 'mat-date-range-input',\n                        '[class.mat-date-range-input-hide-placeholders]': '_shouldHidePlaceholders()',\n                        '[class.mat-date-range-input-required]': 'required',\n                        '[attr.id]': 'id',\n                        'role': 'group',\n                        '[attr.aria-labelledby]': '_getAriaLabelledby()',\n                        '[attr.aria-describedby]': '_ariaDescribedBy',\n                        // Used by the test harness to tie this input to its calendar. We can't depend on\n                        // `aria-owns` for this, because it's only defined while the calendar is open.\n                        '[attr.data-mat-calendar]': 'rangePicker ? rangePicker.id : null',\n                    }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [\n                        { provide: MatFormFieldControl, useExisting: MatDateRangeInput },\n                        { provide: MAT_DATE_RANGE_INPUT_PARENT, useExisting: MatDateRangeInput },\n                    ], imports: [CdkMonitorFocus], template: \"<div\\n  class=\\\"mat-date-range-input-container\\\"\\n  cdkMonitorSubtreeFocus\\n  (cdkFocusChange)=\\\"_updateFocus($event)\\\">\\n  <div class=\\\"mat-date-range-input-wrapper\\\">\\n    <ng-content select=\\\"input[matStartDate]\\\"></ng-content>\\n    <span\\n      class=\\\"mat-date-range-input-mirror\\\"\\n      aria-hidden=\\\"true\\\">{{_getInputMirrorValue('start')}}</span>\\n  </div>\\n\\n  <span\\n    class=\\\"mat-date-range-input-separator\\\"\\n    [class.mat-date-range-input-separator-hidden]=\\\"_shouldHideSeparator()\\\">{{separator}}</span>\\n\\n  <div class=\\\"mat-date-range-input-wrapper mat-date-range-input-end-wrapper\\\">\\n    <ng-content select=\\\"input[matEndDate]\\\"></ng-content>\\n    <span\\n      class=\\\"mat-date-range-input-mirror\\\"\\n      aria-hidden=\\\"true\\\">{{_getInputMirrorValue('end')}}</span>\\n  </div>\\n</div>\\n\\n\", styles: [\".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px;color:var(--mat-datepicker-range-input-separator-color, var(--mat-sys-on-surface))}.mat-form-field-disabled .mat-date-range-input-separator{color:var(--mat-datepicker-range-input-disabled-state-separator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}._mat-animation-noopable .mat-date-range-input-separator{transition:none}.mat-date-range-input-separator-hidden{-webkit-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-end-wrapper{flex-grow:1}.mat-date-range-input-inner{position:absolute;top:0;left:0;font:inherit;background:rgba(0,0,0,0);color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%;height:100%}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner[disabled]{color:var(--mat-datepicker-range-input-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}@media(forced-colors: active){.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{opacity:0}}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}@media(forced-colors: active){.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{opacity:0}}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}@media(forced-colors: active){.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{opacity:0}}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;user-select:none;color:rgba(0,0,0,0) !important;-webkit-text-fill-color:rgba(0,0,0,0);transition:none}@media(forced-colors: active){.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{opacity:0}}._mat-animation-noopable .mat-date-range-input-inner::placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-moz-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner::-webkit-input-placeholder{transition:none}._mat-animation-noopable .mat-date-range-input-inner:-ms-input-placeholder{transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-mdc-form-field-type-mat-date-range-input .mat-mdc-form-field-infix{width:200px}\"] }]\n        }], ctorParameters: () => [], propDecorators: { rangePicker: [{\n                type: Input\n            }], required: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], dateFilter: [{\n                type: Input\n            }], min: [{\n                type: Input\n            }], max: [{\n                type: Input\n            }], disabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], separator: [{\n                type: Input\n            }], comparisonStart: [{\n                type: Input\n            }], comparisonEnd: [{\n                type: Input\n            }], _startInput: [{\n                type: ContentChild,\n                args: [MatStartDate]\n            }], _endInput: [{\n                type: ContentChild,\n                args: [MatEndDate]\n            }] } });\n\n// TODO(mmalerba): We use a component instead of a directive here so the user can use implicit\n// template reference variables (e.g. #d vs #d=\"matDateRangePicker\"). We can change this to a\n// directive if angular adds support for `exportAs: '$implicit'` on directives.\n/** Component responsible for managing the date range picker popup/dialog. */\nclass MatDateRangePicker extends MatDatepickerBase {\n    _forwardContentValues(instance) {\n        super._forwardContentValues(instance);\n        const input = this.datepickerInput;\n        if (input) {\n            instance.comparisonStart = input.comparisonStart;\n            instance.comparisonEnd = input.comparisonEnd;\n            instance.startDateAccessibleName = input._getStartDateAccessibleName();\n            instance.endDateAccessibleName = input._getEndDateAccessibleName();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDateRangePicker, deps: null, target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDateRangePicker, isStandalone: true, selector: \"mat-date-range-picker\", providers: [\n            MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,\n            MAT_CALENDAR_RANGE_STRATEGY_PROVIDER,\n            { provide: MatDatepickerBase, useExisting: MatDateRangePicker },\n        ], exportAs: [\"matDateRangePicker\"], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDateRangePicker, decorators: [{\n            type: Component,\n            args: [{\n                    selector: 'mat-date-range-picker',\n                    template: '',\n                    exportAs: 'matDateRangePicker',\n                    changeDetection: ChangeDetectionStrategy.OnPush,\n                    encapsulation: ViewEncapsulation.None,\n                    providers: [\n                        MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,\n                        MAT_CALENDAR_RANGE_STRATEGY_PROVIDER,\n                        { provide: MatDatepickerBase, useExisting: MatDateRangePicker },\n                    ],\n                }]\n        }] });\n\n/** Button that will close the datepicker and assign the current selection to the data model. */\nclass MatDatepickerApply {\n    _datepicker = inject(MatDatepickerBase);\n    constructor() { }\n    _applySelection() {\n        this._datepicker._applyPendingSelection();\n        this._datepicker.close();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerApply, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDatepickerApply, isStandalone: true, selector: \"[matDatepickerApply], [matDateRangePickerApply]\", host: { listeners: { \"click\": \"_applySelection()\" } }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerApply, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matDatepickerApply], [matDateRangePickerApply]',\n                    host: { '(click)': '_applySelection()' },\n                }]\n        }], ctorParameters: () => [] });\n/** Button that will close the datepicker and discard the current selection. */\nclass MatDatepickerCancel {\n    _datepicker = inject(MatDatepickerBase);\n    constructor() { }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerCancel, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDatepickerCancel, isStandalone: true, selector: \"[matDatepickerCancel], [matDateRangePickerCancel]\", host: { listeners: { \"click\": \"_datepicker.close()\" } }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerCancel, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matDatepickerCancel], [matDateRangePickerCancel]',\n                    host: { '(click)': '_datepicker.close()' },\n                }]\n        }], ctorParameters: () => [] });\n/**\n * Container that can be used to project a row of action buttons\n * to the bottom of a datepicker or date range picker.\n */\nclass MatDatepickerActions {\n    _datepicker = inject(MatDatepickerBase);\n    _viewContainerRef = inject(ViewContainerRef);\n    _template;\n    _portal;\n    constructor() { }\n    ngAfterViewInit() {\n        this._portal = new TemplatePortal(this._template, this._viewContainerRef);\n        this._datepicker.registerActions(this._portal);\n    }\n    ngOnDestroy() {\n        this._datepicker.removeActions(this._portal);\n        // Needs to be null checked since we initialize it in `ngAfterViewInit`.\n        if (this._portal && this._portal.isAttached) {\n            this._portal?.detach();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerActions, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDatepickerActions, isStandalone: true, selector: \"mat-datepicker-actions, mat-date-range-picker-actions\", viewQueries: [{ propertyName: \"_template\", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: `\n    <ng-template>\n      <div class=\"mat-datepicker-actions\">\n        <ng-content></ng-content>\n      </div>\n    </ng-template>\n  `, isInline: true, styles: [\".mat-datepicker-actions{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px 8px}.mat-datepicker-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-datepicker-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerActions, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-datepicker-actions, mat-date-range-picker-actions', template: `\n    <ng-template>\n      <div class=\"mat-datepicker-actions\">\n        <ng-content></ng-content>\n      </div>\n    </ng-template>\n  `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [\".mat-datepicker-actions{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px 8px}.mat-datepicker-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-datepicker-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\"] }]\n        }], ctorParameters: () => [], propDecorators: { _template: [{\n                type: ViewChild,\n                args: [TemplateRef]\n            }] } });\n\nclass MatDatepickerModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerModule, imports: [MatButtonModule,\n            OverlayModule,\n            A11yModule,\n            PortalModule,\n            MatCommonModule,\n            MatCalendar,\n            MatCalendarBody,\n            MatDatepicker,\n            MatDatepickerContent,\n            MatDatepickerInput,\n            MatDatepickerToggle,\n            MatDatepickerToggleIcon,\n            MatMonthView,\n            MatYearView,\n            MatMultiYearView,\n            MatCalendarHeader,\n            MatDateRangeInput,\n            MatStartDate,\n            MatEndDate,\n            MatDateRangePicker,\n            MatDatepickerActions,\n            MatDatepickerCancel,\n            MatDatepickerApply], exports: [CdkScrollableModule,\n            MatCalendar,\n            MatCalendarBody,\n            MatDatepicker,\n            MatDatepickerContent,\n            MatDatepickerInput,\n            MatDatepickerToggle,\n            MatDatepickerToggleIcon,\n            MatMonthView,\n            MatYearView,\n            MatMultiYearView,\n            MatCalendarHeader,\n            MatDateRangeInput,\n            MatStartDate,\n            MatEndDate,\n            MatDateRangePicker,\n            MatDatepickerActions,\n            MatDatepickerCancel,\n            MatDatepickerApply] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerModule, providers: [MatDatepickerIntl, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [MatButtonModule,\n            OverlayModule,\n            A11yModule,\n            PortalModule,\n            MatCommonModule,\n            MatDatepickerContent,\n            MatDatepickerToggle,\n            MatCalendarHeader, CdkScrollableModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDatepickerModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [\n                        MatButtonModule,\n                        OverlayModule,\n                        A11yModule,\n                        PortalModule,\n                        MatCommonModule,\n                        MatCalendar,\n                        MatCalendarBody,\n                        MatDatepicker,\n                        MatDatepickerContent,\n                        MatDatepickerInput,\n                        MatDatepickerToggle,\n                        MatDatepickerToggleIcon,\n                        MatMonthView,\n                        MatYearView,\n                        MatMultiYearView,\n                        MatCalendarHeader,\n                        MatDateRangeInput,\n                        MatStartDate,\n                        MatEndDate,\n                        MatDateRangePicker,\n                        MatDatepickerActions,\n                        MatDatepickerCancel,\n                        MatDatepickerApply,\n                    ],\n                    exports: [\n                        CdkScrollableModule,\n                        MatCalendar,\n                        MatCalendarBody,\n                        MatDatepicker,\n                        MatDatepickerContent,\n                        MatDatepickerInput,\n                        MatDatepickerToggle,\n                        MatDatepickerToggleIcon,\n                        MatMonthView,\n                        MatYearView,\n                        MatMultiYearView,\n                        MatCalendarHeader,\n                        MatDateRangeInput,\n                        MatStartDate,\n                        MatEndDate,\n                        MatDateRangePicker,\n                        MatDatepickerActions,\n                        MatDatepickerCancel,\n                        MatDatepickerApply,\n                    ],\n                    providers: [MatDatepickerIntl, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DateRange, DefaultMatCalendarRangeStrategy, MAT_DATEPICKER_SCROLL_STRATEGY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_DATEPICKER_VALIDATORS, MAT_DATEPICKER_VALUE_ACCESSOR, MAT_DATE_RANGE_SELECTION_STRATEGY, MAT_RANGE_DATE_SELECTION_MODEL_FACTORY, MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER, MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY, MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER, MatCalendar, MatCalendarBody, MatCalendarCell, MatCalendarHeader, MatDateRangeInput, MatDateRangePicker, MatDateSelectionModel, MatDatepicker, MatDatepickerActions, MatDatepickerApply, MatDatepickerCancel, MatDatepickerContent, MatDatepickerInput, MatDatepickerInputEvent, MatDatepickerIntl, MatDatepickerModule, MatDatepickerToggle, MatDatepickerToggleIcon, MatEndDate, MatMonthView, MatMultiYearView, MatRangeDateSelectionModel, MatSingleDateSelectionModel, MatStartDate, MatYearView, matDatepickerAnimations, yearsPerPage, yearsPerRow };\n","import { ConnectableObservable, isObservable, of, Subject } from 'rxjs';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Injectable } from '@angular/core';\n\nclass DataSource {\n}\n/** Checks whether an object is a data source. */\nfunction isDataSource(value) {\n    // Check if the value is a DataSource by observing if it has a connect function. Cannot\n    // be checked as an `instanceof DataSource` since people could create their own sources\n    // that match the interface, but don't extend DataSource. We also can't use `isObservable`\n    // here, because of some internal apps.\n    return value && typeof value.connect === 'function' && !(value instanceof ConnectableObservable);\n}\n\n/** DataSource wrapper for a native array. */\nclass ArrayDataSource extends DataSource {\n    _data;\n    constructor(_data) {\n        super();\n        this._data = _data;\n    }\n    connect() {\n        return isObservable(this._data) ? this._data : of(this._data);\n    }\n    disconnect() { }\n}\n\n/** Indicates how a view was changed by a {@link _ViewRepeater}. */\nvar _ViewRepeaterOperation;\n(function (_ViewRepeaterOperation) {\n    /** The content of an existing view was replaced with another item. */\n    _ViewRepeaterOperation[_ViewRepeaterOperation[\"REPLACED\"] = 0] = \"REPLACED\";\n    /** A new view was created with `createEmbeddedView`. */\n    _ViewRepeaterOperation[_ViewRepeaterOperation[\"INSERTED\"] = 1] = \"INSERTED\";\n    /** The position of a view changed, but the content remains the same. */\n    _ViewRepeaterOperation[_ViewRepeaterOperation[\"MOVED\"] = 2] = \"MOVED\";\n    /** A view was detached from the view container. */\n    _ViewRepeaterOperation[_ViewRepeaterOperation[\"REMOVED\"] = 3] = \"REMOVED\";\n})(_ViewRepeaterOperation || (_ViewRepeaterOperation = {}));\n/**\n * Injection token for {@link _ViewRepeater}. This token is for use by Angular Material only.\n * @docs-private\n */\nconst _VIEW_REPEATER_STRATEGY = new InjectionToken('_ViewRepeater');\n\n/**\n * A repeater that destroys views when they are removed from a\n * {@link ViewContainerRef}. When new items are inserted into the container,\n * the repeater will always construct a new embedded view for each item.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nclass _DisposeViewRepeaterStrategy {\n    applyChanges(changes, viewContainerRef, itemContextFactory, itemValueResolver, itemViewChanged) {\n        changes.forEachOperation((record, adjustedPreviousIndex, currentIndex) => {\n            let view;\n            let operation;\n            if (record.previousIndex == null) {\n                const insertContext = itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n                view = viewContainerRef.createEmbeddedView(insertContext.templateRef, insertContext.context, insertContext.index);\n                operation = _ViewRepeaterOperation.INSERTED;\n            }\n            else if (currentIndex == null) {\n                viewContainerRef.remove(adjustedPreviousIndex);\n                operation = _ViewRepeaterOperation.REMOVED;\n            }\n            else {\n                view = viewContainerRef.get(adjustedPreviousIndex);\n                viewContainerRef.move(view, currentIndex);\n                operation = _ViewRepeaterOperation.MOVED;\n            }\n            if (itemViewChanged) {\n                itemViewChanged({\n                    context: view?.context,\n                    operation,\n                    record,\n                });\n            }\n        });\n    }\n    detach() { }\n}\n\n/**\n * A repeater that caches views when they are removed from a\n * {@link ViewContainerRef}. When new items are inserted into the container,\n * the repeater will reuse one of the cached views instead of creating a new\n * embedded view. Recycling cached views reduces the quantity of expensive DOM\n * inserts.\n *\n * @template T The type for the embedded view's $implicit property.\n * @template R The type for the item in each IterableDiffer change record.\n * @template C The type for the context passed to each embedded view.\n */\nclass _RecycleViewRepeaterStrategy {\n    /**\n     * The size of the cache used to store unused views.\n     * Setting the cache size to `0` will disable caching. Defaults to 20 views.\n     */\n    viewCacheSize = 20;\n    /**\n     * View cache that stores embedded view instances that have been previously stamped out,\n     * but don't are not currently rendered. The view repeater will reuse these views rather than\n     * creating brand new ones.\n     *\n     * TODO(michaeljamesparsons) Investigate whether using a linked list would improve performance.\n     */\n    _viewCache = [];\n    /** Apply changes to the DOM. */\n    applyChanges(changes, viewContainerRef, itemContextFactory, itemValueResolver, itemViewChanged) {\n        // Rearrange the views to put them in the right location.\n        changes.forEachOperation((record, adjustedPreviousIndex, currentIndex) => {\n            let view;\n            let operation;\n            if (record.previousIndex == null) {\n                // Item added.\n                const viewArgsFactory = () => itemContextFactory(record, adjustedPreviousIndex, currentIndex);\n                view = this._insertView(viewArgsFactory, currentIndex, viewContainerRef, itemValueResolver(record));\n                operation = view ? _ViewRepeaterOperation.INSERTED : _ViewRepeaterOperation.REPLACED;\n            }\n            else if (currentIndex == null) {\n                // Item removed.\n                this._detachAndCacheView(adjustedPreviousIndex, viewContainerRef);\n                operation = _ViewRepeaterOperation.REMOVED;\n            }\n            else {\n                // Item moved.\n                view = this._moveView(adjustedPreviousIndex, currentIndex, viewContainerRef, itemValueResolver(record));\n                operation = _ViewRepeaterOperation.MOVED;\n            }\n            if (itemViewChanged) {\n                itemViewChanged({\n                    context: view?.context,\n                    operation,\n                    record,\n                });\n            }\n        });\n    }\n    detach() {\n        for (const view of this._viewCache) {\n            view.destroy();\n        }\n        this._viewCache = [];\n    }\n    /**\n     * Inserts a view for a new item, either from the cache or by creating a new\n     * one. Returns `undefined` if the item was inserted into a cached view.\n     */\n    _insertView(viewArgsFactory, currentIndex, viewContainerRef, value) {\n        const cachedView = this._insertViewFromCache(currentIndex, viewContainerRef);\n        if (cachedView) {\n            cachedView.context.$implicit = value;\n            return undefined;\n        }\n        const viewArgs = viewArgsFactory();\n        return viewContainerRef.createEmbeddedView(viewArgs.templateRef, viewArgs.context, viewArgs.index);\n    }\n    /** Detaches the view at the given index and inserts into the view cache. */\n    _detachAndCacheView(index, viewContainerRef) {\n        const detachedView = viewContainerRef.detach(index);\n        this._maybeCacheView(detachedView, viewContainerRef);\n    }\n    /** Moves view at the previous index to the current index. */\n    _moveView(adjustedPreviousIndex, currentIndex, viewContainerRef, value) {\n        const view = viewContainerRef.get(adjustedPreviousIndex);\n        viewContainerRef.move(view, currentIndex);\n        view.context.$implicit = value;\n        return view;\n    }\n    /**\n     * Cache the given detached view. If the cache is full, the view will be\n     * destroyed.\n     */\n    _maybeCacheView(view, viewContainerRef) {\n        if (this._viewCache.length < this.viewCacheSize) {\n            this._viewCache.push(view);\n        }\n        else {\n            const index = viewContainerRef.indexOf(view);\n            // The host component could remove views from the container outside of\n            // the view repeater. It's unlikely this will occur, but just in case,\n            // destroy the view on its own, otherwise destroy it through the\n            // container to ensure that all the references are removed.\n            if (index === -1) {\n                view.destroy();\n            }\n            else {\n                viewContainerRef.remove(index);\n            }\n        }\n    }\n    /** Inserts a recycled view from the cache at the given index. */\n    _insertViewFromCache(index, viewContainerRef) {\n        const cachedView = this._viewCache.pop();\n        if (cachedView) {\n            viewContainerRef.insert(cachedView, index);\n        }\n        return cachedView || null;\n    }\n}\n\n/**\n * Class to be used to power selecting one or more options from a list.\n */\nclass SelectionModel {\n    _multiple;\n    _emitChanges;\n    compareWith;\n    /** Currently-selected values. */\n    _selection = new Set();\n    /** Keeps track of the deselected options that haven't been emitted by the change event. */\n    _deselectedToEmit = [];\n    /** Keeps track of the selected options that haven't been emitted by the change event. */\n    _selectedToEmit = [];\n    /** Cache for the array value of the selected items. */\n    _selected;\n    /** Selected values. */\n    get selected() {\n        if (!this._selected) {\n            this._selected = Array.from(this._selection.values());\n        }\n        return this._selected;\n    }\n    /** Event emitted when the value has changed. */\n    changed = new Subject();\n    constructor(_multiple = false, initiallySelectedValues, _emitChanges = true, compareWith) {\n        this._multiple = _multiple;\n        this._emitChanges = _emitChanges;\n        this.compareWith = compareWith;\n        if (initiallySelectedValues && initiallySelectedValues.length) {\n            if (_multiple) {\n                initiallySelectedValues.forEach(value => this._markSelected(value));\n            }\n            else {\n                this._markSelected(initiallySelectedValues[0]);\n            }\n            // Clear the array in order to avoid firing the change event for preselected values.\n            this._selectedToEmit.length = 0;\n        }\n    }\n    /**\n     * Selects a value or an array of values.\n     * @param values The values to select\n     * @return Whether the selection changed as a result of this call\n     * @breaking-change 16.0.0 make return type boolean\n     */\n    select(...values) {\n        this._verifyValueAssignment(values);\n        values.forEach(value => this._markSelected(value));\n        const changed = this._hasQueuedChanges();\n        this._emitChangeEvent();\n        return changed;\n    }\n    /**\n     * Deselects a value or an array of values.\n     * @param values The values to deselect\n     * @return Whether the selection changed as a result of this call\n     * @breaking-change 16.0.0 make return type boolean\n     */\n    deselect(...values) {\n        this._verifyValueAssignment(values);\n        values.forEach(value => this._unmarkSelected(value));\n        const changed = this._hasQueuedChanges();\n        this._emitChangeEvent();\n        return changed;\n    }\n    /**\n     * Sets the selected values\n     * @param values The new selected values\n     * @return Whether the selection changed as a result of this call\n     * @breaking-change 16.0.0 make return type boolean\n     */\n    setSelection(...values) {\n        this._verifyValueAssignment(values);\n        const oldValues = this.selected;\n        const newSelectedSet = new Set(values);\n        values.forEach(value => this._markSelected(value));\n        oldValues\n            .filter(value => !newSelectedSet.has(this._getConcreteValue(value, newSelectedSet)))\n            .forEach(value => this._unmarkSelected(value));\n        const changed = this._hasQueuedChanges();\n        this._emitChangeEvent();\n        return changed;\n    }\n    /**\n     * Toggles a value between selected and deselected.\n     * @param value The value to toggle\n     * @return Whether the selection changed as a result of this call\n     * @breaking-change 16.0.0 make return type boolean\n     */\n    toggle(value) {\n        return this.isSelected(value) ? this.deselect(value) : this.select(value);\n    }\n    /**\n     * Clears all of the selected values.\n     * @param flushEvent Whether to flush the changes in an event.\n     *   If false, the changes to the selection will be flushed along with the next event.\n     * @return Whether the selection changed as a result of this call\n     * @breaking-change 16.0.0 make return type boolean\n     */\n    clear(flushEvent = true) {\n        this._unmarkAll();\n        const changed = this._hasQueuedChanges();\n        if (flushEvent) {\n            this._emitChangeEvent();\n        }\n        return changed;\n    }\n    /**\n     * Determines whether a value is selected.\n     */\n    isSelected(value) {\n        return this._selection.has(this._getConcreteValue(value));\n    }\n    /**\n     * Determines whether the model does not have a value.\n     */\n    isEmpty() {\n        return this._selection.size === 0;\n    }\n    /**\n     * Determines whether the model has a value.\n     */\n    hasValue() {\n        return !this.isEmpty();\n    }\n    /**\n     * Sorts the selected values based on a predicate function.\n     */\n    sort(predicate) {\n        if (this._multiple && this.selected) {\n            this._selected.sort(predicate);\n        }\n    }\n    /**\n     * Gets whether multiple values can be selected.\n     */\n    isMultipleSelection() {\n        return this._multiple;\n    }\n    /** Emits a change event and clears the records of selected and deselected values. */\n    _emitChangeEvent() {\n        // Clear the selected values so they can be re-cached.\n        this._selected = null;\n        if (this._selectedToEmit.length || this._deselectedToEmit.length) {\n            this.changed.next({\n                source: this,\n                added: this._selectedToEmit,\n                removed: this._deselectedToEmit,\n            });\n            this._deselectedToEmit = [];\n            this._selectedToEmit = [];\n        }\n    }\n    /** Selects a value. */\n    _markSelected(value) {\n        value = this._getConcreteValue(value);\n        if (!this.isSelected(value)) {\n            if (!this._multiple) {\n                this._unmarkAll();\n            }\n            if (!this.isSelected(value)) {\n                this._selection.add(value);\n            }\n            if (this._emitChanges) {\n                this._selectedToEmit.push(value);\n            }\n        }\n    }\n    /** Deselects a value. */\n    _unmarkSelected(value) {\n        value = this._getConcreteValue(value);\n        if (this.isSelected(value)) {\n            this._selection.delete(value);\n            if (this._emitChanges) {\n                this._deselectedToEmit.push(value);\n            }\n        }\n    }\n    /** Clears out the selected values. */\n    _unmarkAll() {\n        if (!this.isEmpty()) {\n            this._selection.forEach(value => this._unmarkSelected(value));\n        }\n    }\n    /**\n     * Verifies the value assignment and throws an error if the specified value array is\n     * including multiple values while the selection model is not supporting multiple values.\n     */\n    _verifyValueAssignment(values) {\n        if (values.length > 1 && !this._multiple && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getMultipleValuesInSingleSelectionError();\n        }\n    }\n    /** Whether there are queued up change to be emitted. */\n    _hasQueuedChanges() {\n        return !!(this._deselectedToEmit.length || this._selectedToEmit.length);\n    }\n    /** Returns a value that is comparable to inputValue by applying compareWith function, returns the same inputValue otherwise. */\n    _getConcreteValue(inputValue, selection) {\n        if (!this.compareWith) {\n            return inputValue;\n        }\n        else {\n            selection = selection ?? this._selection;\n            for (let selectedValue of selection) {\n                if (this.compareWith(inputValue, selectedValue)) {\n                    return selectedValue;\n                }\n            }\n            return inputValue;\n        }\n    }\n}\n/**\n * Returns an error that reports that multiple values are passed into a selection model\n * with a single value.\n * @docs-private\n */\nfunction getMultipleValuesInSingleSelectionError() {\n    return Error('Cannot pass multiple values into SelectionModel with single-value mode.');\n}\n\n/**\n * Class to coordinate unique selection based on name.\n * Intended to be consumed as an Angular service.\n * This service is needed because native radio change events are only fired on the item currently\n * being selected, and we still need to uncheck the previous selection.\n *\n * This service does not *store* any IDs and names because they may change at any time, so it is\n * less error-prone if they are simply passed through when the events occur.\n */\nclass UniqueSelectionDispatcher {\n    _listeners = [];\n    /**\n     * Notify other items that selection for the given name has been set.\n     * @param id ID of the item.\n     * @param name Name of the item.\n     */\n    notify(id, name) {\n        for (let listener of this._listeners) {\n            listener(id, name);\n        }\n    }\n    /**\n     * Listen for future changes to item selection.\n     * @return Function used to deregister listener\n     */\n    listen(listener) {\n        this._listeners.push(listener);\n        return () => {\n            this._listeners = this._listeners.filter((registered) => {\n                return listener !== registered;\n            });\n        };\n    }\n    ngOnDestroy() {\n        this._listeners = [];\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: UniqueSelectionDispatcher, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: UniqueSelectionDispatcher, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: UniqueSelectionDispatcher, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ArrayDataSource, DataSource, SelectionModel, UniqueSelectionDispatcher, _DisposeViewRepeaterStrategy, _RecycleViewRepeaterStrategy, _VIEW_REPEATER_STRATEGY, _ViewRepeaterOperation, getMultipleValuesInSingleSelectionError, isDataSource };\n","import { _IdGenerator, FocusMonitor } from '@angular/cdk/a11y';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport * as i0 from '@angular/core';\nimport { forwardRef, InjectionToken, inject, ChangeDetectorRef, EventEmitter, booleanAttribute, Directive, Output, ContentChildren, Input, ElementRef, NgZone, Renderer2, Injector, ANIMATION_MODULE_TYPE, HostAttributeToken, numberAttribute, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { _StructuralStylesLoader, MatRipple, _MatInternalFormField, MatCommonModule, MatRippleModule } from '@angular/material/core';\nimport { _CdkPrivateStyleLoader } from '@angular/cdk/private';\n\n/** Change event object emitted by radio button and radio group. */\nclass MatRadioChange {\n    source;\n    value;\n    constructor(\n    /** The radio button that emits the change event. */\n    source, \n    /** The value of the radio button. */\n    value) {\n        this.source = source;\n        this.value = value;\n    }\n}\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nconst MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => MatRadioGroup),\n    multi: true,\n};\n/**\n * Injection token that can be used to inject instances of `MatRadioGroup`. It serves as\n * alternative token to the actual `MatRadioGroup` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nconst MAT_RADIO_GROUP = new InjectionToken('MatRadioGroup');\nconst MAT_RADIO_DEFAULT_OPTIONS = new InjectionToken('mat-radio-default-options', {\n    providedIn: 'root',\n    factory: MAT_RADIO_DEFAULT_OPTIONS_FACTORY,\n});\nfunction MAT_RADIO_DEFAULT_OPTIONS_FACTORY() {\n    return {\n        color: 'accent',\n        disabledInteractive: false,\n    };\n}\n/**\n * A group of radio buttons. May contain one or more `<mat-radio-button>` elements.\n */\nclass MatRadioGroup {\n    _changeDetector = inject(ChangeDetectorRef);\n    /** Selected value for the radio group. */\n    _value = null;\n    /** The HTML name attribute applied to radio buttons in this group. */\n    _name = inject(_IdGenerator).getId('mat-radio-group-');\n    /** The currently selected radio button. Should match value. */\n    _selected = null;\n    /** Whether the `value` has been set to its initial value. */\n    _isInitialized = false;\n    /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n    _labelPosition = 'after';\n    /** Whether the radio group is disabled. */\n    _disabled = false;\n    /** Whether the radio group is required. */\n    _required = false;\n    /** Subscription to changes in amount of radio buttons. */\n    _buttonChanges;\n    /** The method to be called in order to update ngModel */\n    _controlValueAccessorChangeFn = () => { };\n    /**\n     * onTouch function registered via registerOnTouch (ControlValueAccessor).\n     * @docs-private\n     */\n    onTouched = () => { };\n    /**\n     * Event emitted when the group value changes.\n     * Change events are only emitted when the value changes due to user interaction with\n     * a radio button (the same behavior as `<input type-\"radio\">`).\n     */\n    change = new EventEmitter();\n    /** Child radio buttons. */\n    _radios;\n    /**\n     * Theme color of the radio buttons in the group. This API is supported in M2\n     * themes only, it has no effect in M3 themes.\n     *\n     * For information on applying color variants in M3, see\n     * https://material.angular.io/guide/theming#using-component-color-variants.\n     */\n    color;\n    /** Name of the radio button group. All radio buttons inside this group will use this name. */\n    get name() {\n        return this._name;\n    }\n    set name(value) {\n        this._name = value;\n        this._updateRadioButtonNames();\n    }\n    /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n    get labelPosition() {\n        return this._labelPosition;\n    }\n    set labelPosition(v) {\n        this._labelPosition = v === 'before' ? 'before' : 'after';\n        this._markRadiosForCheck();\n    }\n    /**\n     * Value for the radio-group. Should equal the value of the selected radio button if there is\n     * a corresponding radio button with a matching value. If there is not such a corresponding\n     * radio button, this value persists to be applied in case a new radio button is added with a\n     * matching value.\n     */\n    get value() {\n        return this._value;\n    }\n    set value(newValue) {\n        if (this._value !== newValue) {\n            // Set this before proceeding to ensure no circular loop occurs with selection.\n            this._value = newValue;\n            this._updateSelectedRadioFromValue();\n            this._checkSelectedRadioButton();\n        }\n    }\n    _checkSelectedRadioButton() {\n        if (this._selected && !this._selected.checked) {\n            this._selected.checked = true;\n        }\n    }\n    /**\n     * The currently selected radio button. If set to a new radio button, the radio group value\n     * will be updated to match the new selected button.\n     */\n    get selected() {\n        return this._selected;\n    }\n    set selected(selected) {\n        this._selected = selected;\n        this.value = selected ? selected.value : null;\n        this._checkSelectedRadioButton();\n    }\n    /** Whether the radio group is disabled */\n    get disabled() {\n        return this._disabled;\n    }\n    set disabled(value) {\n        this._disabled = value;\n        this._markRadiosForCheck();\n    }\n    /** Whether the radio group is required */\n    get required() {\n        return this._required;\n    }\n    set required(value) {\n        this._required = value;\n        this._markRadiosForCheck();\n    }\n    /** Whether buttons in the group should be interactive while they're disabled. */\n    get disabledInteractive() {\n        return this._disabledInteractive;\n    }\n    set disabledInteractive(value) {\n        this._disabledInteractive = value;\n        this._markRadiosForCheck();\n    }\n    _disabledInteractive = false;\n    constructor() { }\n    /**\n     * Initialize properties once content children are available.\n     * This allows us to propagate relevant attributes to associated buttons.\n     */\n    ngAfterContentInit() {\n        // Mark this component as initialized in AfterContentInit because the initial value can\n        // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n        // NgModel occurs *after* the OnInit of the MatRadioGroup.\n        this._isInitialized = true;\n        // Clear the `selected` button when it's destroyed since the tabindex of the rest of the\n        // buttons depends on it. Note that we don't clear the `value`, because the radio button\n        // may be swapped out with a similar one and there are some internal apps that depend on\n        // that behavior.\n        this._buttonChanges = this._radios.changes.subscribe(() => {\n            if (this.selected && !this._radios.find(radio => radio === this.selected)) {\n                this._selected = null;\n            }\n        });\n    }\n    ngOnDestroy() {\n        this._buttonChanges?.unsubscribe();\n    }\n    /**\n     * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n     * radio buttons upon their blur.\n     */\n    _touch() {\n        if (this.onTouched) {\n            this.onTouched();\n        }\n    }\n    _updateRadioButtonNames() {\n        if (this._radios) {\n            this._radios.forEach(radio => {\n                radio.name = this.name;\n                radio._markForCheck();\n            });\n        }\n    }\n    /** Updates the `selected` radio button from the internal _value state. */\n    _updateSelectedRadioFromValue() {\n        // If the value already matches the selected radio, do nothing.\n        const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n        if (this._radios && !isAlreadySelected) {\n            this._selected = null;\n            this._radios.forEach(radio => {\n                radio.checked = this.value === radio.value;\n                if (radio.checked) {\n                    this._selected = radio;\n                }\n            });\n        }\n    }\n    /** Dispatch change event with current selection and group value. */\n    _emitChangeEvent() {\n        if (this._isInitialized) {\n            this.change.emit(new MatRadioChange(this._selected, this._value));\n        }\n    }\n    _markRadiosForCheck() {\n        if (this._radios) {\n            this._radios.forEach(radio => radio._markForCheck());\n        }\n    }\n    /**\n     * Sets the model value. Implemented as part of ControlValueAccessor.\n     * @param value\n     */\n    writeValue(value) {\n        this.value = value;\n        this._changeDetector.markForCheck();\n    }\n    /**\n     * Registers a callback to be triggered when the model value changes.\n     * Implemented as part of ControlValueAccessor.\n     * @param fn Callback to be registered.\n     */\n    registerOnChange(fn) {\n        this._controlValueAccessorChangeFn = fn;\n    }\n    /**\n     * Registers a callback to be triggered when the control is touched.\n     * Implemented as part of ControlValueAccessor.\n     * @param fn Callback to be registered.\n     */\n    registerOnTouched(fn) {\n        this.onTouched = fn;\n    }\n    /**\n     * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n     * @param isDisabled Whether the control should be disabled.\n     */\n    setDisabledState(isDisabled) {\n        this.disabled = isDisabled;\n        this._changeDetector.markForCheck();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatRadioGroup, isStandalone: true, selector: \"mat-radio-group\", inputs: { color: \"color\", name: \"name\", labelPosition: \"labelPosition\", value: \"value\", selected: \"selected\", disabled: [\"disabled\", \"disabled\", booleanAttribute], required: [\"required\", \"required\", booleanAttribute], disabledInteractive: [\"disabledInteractive\", \"disabledInteractive\", booleanAttribute] }, outputs: { change: \"change\" }, host: { attributes: { \"role\": \"radiogroup\" }, classAttribute: \"mat-mdc-radio-group\" }, providers: [\n            MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,\n            { provide: MAT_RADIO_GROUP, useExisting: MatRadioGroup },\n        ], queries: [{ propertyName: \"_radios\", predicate: i0.forwardRef(() => MatRadioButton), descendants: true }], exportAs: [\"matRadioGroup\"], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRadioGroup, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-radio-group',\n                    exportAs: 'matRadioGroup',\n                    providers: [\n                        MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,\n                        { provide: MAT_RADIO_GROUP, useExisting: MatRadioGroup },\n                    ],\n                    host: {\n                        'role': 'radiogroup',\n                        'class': 'mat-mdc-radio-group',\n                    },\n                }]\n        }], ctorParameters: () => [], propDecorators: { change: [{\n                type: Output\n            }], _radios: [{\n                type: ContentChildren,\n                args: [forwardRef(() => MatRadioButton), { descendants: true }]\n            }], color: [{\n                type: Input\n            }], name: [{\n                type: Input\n            }], labelPosition: [{\n                type: Input\n            }], value: [{\n                type: Input\n            }], selected: [{\n                type: Input\n            }], disabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], required: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], disabledInteractive: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }] } });\nclass MatRadioButton {\n    _elementRef = inject(ElementRef);\n    _changeDetector = inject(ChangeDetectorRef);\n    _focusMonitor = inject(FocusMonitor);\n    _radioDispatcher = inject(UniqueSelectionDispatcher);\n    _defaultOptions = inject(MAT_RADIO_DEFAULT_OPTIONS, {\n        optional: true,\n    });\n    _ngZone = inject(NgZone);\n    _renderer = inject(Renderer2);\n    _uniqueId = inject(_IdGenerator).getId('mat-radio-');\n    _cleanupClick;\n    /** The unique ID for the radio button. */\n    id = this._uniqueId;\n    /** Analog to HTML 'name' attribute used to group radios for unique selection. */\n    name;\n    /** Used to set the 'aria-label' attribute on the underlying input element. */\n    ariaLabel;\n    /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */\n    ariaLabelledby;\n    /** The 'aria-describedby' attribute is read after the element's label and field type. */\n    ariaDescribedby;\n    /** Whether ripples are disabled inside the radio button */\n    disableRipple = false;\n    /** Tabindex of the radio button. */\n    tabIndex = 0;\n    /** Whether this radio button is checked. */\n    get checked() {\n        return this._checked;\n    }\n    set checked(value) {\n        if (this._checked !== value) {\n            this._checked = value;\n            if (value && this.radioGroup && this.radioGroup.value !== this.value) {\n                this.radioGroup.selected = this;\n            }\n            else if (!value && this.radioGroup && this.radioGroup.value === this.value) {\n                // When unchecking the selected radio button, update the selected radio\n                // property on the group.\n                this.radioGroup.selected = null;\n            }\n            if (value) {\n                // Notify all radio buttons with the same name to un-check.\n                this._radioDispatcher.notify(this.id, this.name);\n            }\n            this._changeDetector.markForCheck();\n        }\n    }\n    /** The value of this radio button. */\n    get value() {\n        return this._value;\n    }\n    set value(value) {\n        if (this._value !== value) {\n            this._value = value;\n            if (this.radioGroup !== null) {\n                if (!this.checked) {\n                    // Update checked when the value changed to match the radio group's value\n                    this.checked = this.radioGroup.value === value;\n                }\n                if (this.checked) {\n                    this.radioGroup.selected = this;\n                }\n            }\n        }\n    }\n    /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n    get labelPosition() {\n        return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';\n    }\n    set labelPosition(value) {\n        this._labelPosition = value;\n    }\n    _labelPosition;\n    /** Whether the radio button is disabled. */\n    get disabled() {\n        return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);\n    }\n    set disabled(value) {\n        this._setDisabled(value);\n    }\n    /** Whether the radio button is required. */\n    get required() {\n        return this._required || (this.radioGroup && this.radioGroup.required);\n    }\n    set required(value) {\n        this._required = value;\n    }\n    /**\n     * Theme color of the radio button. This API is supported in M2 themes only, it\n     * has no effect in M3 themes.\n     *\n     * For information on applying color variants in M3, see\n     * https://material.angular.io/guide/theming#using-component-color-variants.\n     */\n    get color() {\n        // As per M2 design specifications the selection control radio should use the accent color\n        // palette by default. https://m2.material.io/components/radio-buttons#specs\n        return (this._color ||\n            (this.radioGroup && this.radioGroup.color) ||\n            (this._defaultOptions && this._defaultOptions.color) ||\n            'accent');\n    }\n    set color(newValue) {\n        this._color = newValue;\n    }\n    _color;\n    /** Whether the radio button should remain interactive when it is disabled. */\n    get disabledInteractive() {\n        return (this._disabledInteractive || (this.radioGroup !== null && this.radioGroup.disabledInteractive));\n    }\n    set disabledInteractive(value) {\n        this._disabledInteractive = value;\n    }\n    _disabledInteractive;\n    /**\n     * Event emitted when the checked state of this radio button changes.\n     * Change events are only emitted when the value changes due to user interaction with\n     * the radio button (the same behavior as `<input type-\"radio\">`).\n     */\n    change = new EventEmitter();\n    /** The parent radio group. May or may not be present. */\n    radioGroup;\n    /** ID of the native input element inside `<mat-radio-button>` */\n    get inputId() {\n        return `${this.id || this._uniqueId}-input`;\n    }\n    /** Whether this radio is checked. */\n    _checked = false;\n    /** Whether this radio is disabled. */\n    _disabled;\n    /** Whether this radio is required. */\n    _required;\n    /** Value assigned to this radio. */\n    _value = null;\n    /** Unregister function for _radioDispatcher */\n    _removeUniqueSelectionListener = () => { };\n    /** Previous value of the input's tabindex. */\n    _previousTabIndex;\n    /** The native `<input type=radio>` element */\n    _inputElement;\n    /** Trigger elements for the ripple events. */\n    _rippleTrigger;\n    /** Whether animations are disabled. */\n    _noopAnimations;\n    _injector = inject(Injector);\n    constructor() {\n        inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n        const radioGroup = inject(MAT_RADIO_GROUP, { optional: true });\n        const animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });\n        const tabIndex = inject(new HostAttributeToken('tabindex'), { optional: true });\n        // Assertions. Ideally these should be stripped out by the compiler.\n        // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n        this.radioGroup = radioGroup;\n        this._noopAnimations = animationMode === 'NoopAnimations';\n        this._disabledInteractive = this._defaultOptions?.disabledInteractive ?? false;\n        if (tabIndex) {\n            this.tabIndex = numberAttribute(tabIndex, 0);\n        }\n    }\n    /** Focuses the radio button. */\n    focus(options, origin) {\n        if (origin) {\n            this._focusMonitor.focusVia(this._inputElement, origin, options);\n        }\n        else {\n            this._inputElement.nativeElement.focus(options);\n        }\n    }\n    /**\n     * Marks the radio button as needing checking for change detection.\n     * This method is exposed because the parent radio group will directly\n     * update bound properties of the radio button.\n     */\n    _markForCheck() {\n        // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n        // update radio button's status\n        this._changeDetector.markForCheck();\n    }\n    ngOnInit() {\n        if (this.radioGroup) {\n            // If the radio is inside a radio group, determine if it should be checked\n            this.checked = this.radioGroup.value === this._value;\n            if (this.checked) {\n                this.radioGroup.selected = this;\n            }\n            // Copy name from parent radio group\n            this.name = this.radioGroup.name;\n        }\n        this._removeUniqueSelectionListener = this._radioDispatcher.listen((id, name) => {\n            if (id !== this.id && name === this.name) {\n                this.checked = false;\n            }\n        });\n    }\n    ngDoCheck() {\n        this._updateTabIndex();\n    }\n    ngAfterViewInit() {\n        this._updateTabIndex();\n        this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n            if (!focusOrigin && this.radioGroup) {\n                this.radioGroup._touch();\n            }\n        });\n        // We bind this outside of the zone, because:\n        // 1. Its logic is completely DOM-related so we can avoid some change detections.\n        // 2. There appear to be some internal tests that break when this triggers a change detection.\n        this._ngZone.runOutsideAngular(() => {\n            this._cleanupClick = this._renderer.listen(this._inputElement.nativeElement, 'click', this._onInputClick);\n        });\n    }\n    ngOnDestroy() {\n        this._cleanupClick?.();\n        this._focusMonitor.stopMonitoring(this._elementRef);\n        this._removeUniqueSelectionListener();\n    }\n    /** Dispatch change event with current value. */\n    _emitChangeEvent() {\n        this.change.emit(new MatRadioChange(this, this._value));\n    }\n    _isRippleDisabled() {\n        return this.disableRipple || this.disabled;\n    }\n    /** Triggered when the radio button receives an interaction from the user. */\n    _onInputInteraction(event) {\n        // We always have to stop propagation on the change event.\n        // Otherwise the change event, from the input element, will bubble up and\n        // emit its event object to the `change` output.\n        event.stopPropagation();\n        if (!this.checked && !this.disabled) {\n            const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n            this.checked = true;\n            this._emitChangeEvent();\n            if (this.radioGroup) {\n                this.radioGroup._controlValueAccessorChangeFn(this.value);\n                if (groupValueChanged) {\n                    this.radioGroup._emitChangeEvent();\n                }\n            }\n        }\n    }\n    /** Triggered when the user clicks on the touch target. */\n    _onTouchTargetClick(event) {\n        this._onInputInteraction(event);\n        if (!this.disabled || this.disabledInteractive) {\n            // Normally the input should be focused already, but if the click\n            // comes from the touch target, then we might have to focus it ourselves.\n            this._inputElement?.nativeElement.focus();\n        }\n    }\n    /** Sets the disabled state and marks for check if a change occurred. */\n    _setDisabled(value) {\n        if (this._disabled !== value) {\n            this._disabled = value;\n            this._changeDetector.markForCheck();\n        }\n    }\n    /** Called when the input is clicked. */\n    _onInputClick = (event) => {\n        // If the input is disabled while interactive, we need to prevent the\n        // selection from happening in this event handler. Note that even though\n        // this happens on `click` events, the logic applies when the user is\n        // navigating with the keyboard as well. An alternative way of doing\n        // this is by resetting the `checked` state in the `change` callback but\n        // it isn't optimal, because it can allow a pre-checked disabled button\n        // to be un-checked. This approach seems to cover everything.\n        if (this.disabled && this.disabledInteractive) {\n            event.preventDefault();\n        }\n    };\n    /** Gets the tabindex for the underlying input element. */\n    _updateTabIndex() {\n        const group = this.radioGroup;\n        let value;\n        // Implement a roving tabindex if the button is inside a group. For most cases this isn't\n        // necessary, because the browser handles the tab order for inputs inside a group automatically,\n        // but we need an explicitly higher tabindex for the selected button in order for things like\n        // the focus trap to pick it up correctly.\n        if (!group || !group.selected || this.disabled) {\n            value = this.tabIndex;\n        }\n        else {\n            value = group.selected === this ? this.tabIndex : -1;\n        }\n        if (value !== this._previousTabIndex) {\n            // We have to set the tabindex directly on the DOM node, because it depends on\n            // the selected state which is prone to \"changed after checked errors\".\n            const input = this._inputElement?.nativeElement;\n            if (input) {\n                input.setAttribute('tabindex', value + '');\n                this._previousTabIndex = value;\n                // Wait for any pending tabindex changes to be applied\n                afterNextRender(() => {\n                    queueMicrotask(() => {\n                        // The radio group uses a \"selection follows focus\" pattern for tab management, so if this\n                        // radio button is currently focused and another radio button in the group becomes\n                        // selected, we should move focus to the newly selected radio button to maintain\n                        // consistency between the focused and selected states.\n                        if (group &&\n                            group.selected &&\n                            group.selected !== this &&\n                            document.activeElement === input) {\n                            group.selected?._inputElement.nativeElement.focus();\n                            // If this radio button still has focus, the selected one must be disabled. In this\n                            // case the radio group as a whole should lose focus.\n                            if (document.activeElement === input) {\n                                this._inputElement.nativeElement.blur();\n                            }\n                        }\n                    });\n                }, { injector: this._injector });\n            }\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRadioButton, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatRadioButton, isStandalone: true, selector: \"mat-radio-button\", inputs: { id: \"id\", name: \"name\", ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], ariaDescribedby: [\"aria-describedby\", \"ariaDescribedby\"], disableRipple: [\"disableRipple\", \"disableRipple\", booleanAttribute], tabIndex: [\"tabIndex\", \"tabIndex\", (value) => (value == null ? 0 : numberAttribute(value))], checked: [\"checked\", \"checked\", booleanAttribute], value: \"value\", labelPosition: \"labelPosition\", disabled: [\"disabled\", \"disabled\", booleanAttribute], required: [\"required\", \"required\", booleanAttribute], color: \"color\", disabledInteractive: [\"disabledInteractive\", \"disabledInteractive\", booleanAttribute] }, outputs: { change: \"change\" }, host: { listeners: { \"focus\": \"_inputElement.nativeElement.focus()\" }, properties: { \"attr.id\": \"id\", \"class.mat-primary\": \"color === \\\"primary\\\"\", \"class.mat-accent\": \"color === \\\"accent\\\"\", \"class.mat-warn\": \"color === \\\"warn\\\"\", \"class.mat-mdc-radio-checked\": \"checked\", \"class.mat-mdc-radio-disabled\": \"disabled\", \"class.mat-mdc-radio-disabled-interactive\": \"disabledInteractive\", \"class._mat-animation-noopable\": \"_noopAnimations\", \"attr.tabindex\": \"null\", \"attr.aria-label\": \"null\", \"attr.aria-labelledby\": \"null\", \"attr.aria-describedby\": \"null\" }, classAttribute: \"mat-mdc-radio-button\" }, viewQueries: [{ propertyName: \"_inputElement\", first: true, predicate: [\"input\"], descendants: true }, { propertyName: \"_rippleTrigger\", first: true, predicate: [\"formField\"], descendants: true, read: ElementRef, static: true }], exportAs: [\"matRadioButton\"], ngImport: i0, template: \"<div mat-internal-form-field [labelPosition]=\\\"labelPosition\\\" #formField>\\n  <div class=\\\"mdc-radio\\\" [class.mdc-radio--disabled]=\\\"disabled\\\">\\n    <!-- Render this element first so the input is on top. -->\\n    <div class=\\\"mat-mdc-radio-touch-target\\\" (click)=\\\"_onTouchTargetClick($event)\\\"></div>\\n    <input #input class=\\\"mdc-radio__native-control\\\" type=\\\"radio\\\"\\n           [id]=\\\"inputId\\\"\\n           [checked]=\\\"checked\\\"\\n           [disabled]=\\\"disabled && !disabledInteractive\\\"\\n           [attr.name]=\\\"name\\\"\\n           [attr.value]=\\\"value\\\"\\n           [required]=\\\"required\\\"\\n           [attr.aria-label]=\\\"ariaLabel\\\"\\n           [attr.aria-labelledby]=\\\"ariaLabelledby\\\"\\n           [attr.aria-describedby]=\\\"ariaDescribedby\\\"\\n           [attr.aria-disabled]=\\\"disabled && disabledInteractive ? 'true' : null\\\"\\n           (change)=\\\"_onInputInteraction($event)\\\">\\n    <div class=\\\"mdc-radio__background\\\">\\n      <div class=\\\"mdc-radio__outer-circle\\\"></div>\\n      <div class=\\\"mdc-radio__inner-circle\\\"></div>\\n    </div>\\n    <div mat-ripple class=\\\"mat-radio-ripple mat-focus-indicator\\\"\\n         [matRippleTrigger]=\\\"_rippleTrigger.nativeElement\\\"\\n         [matRippleDisabled]=\\\"_isRippleDisabled()\\\"\\n         [matRippleCentered]=\\\"true\\\">\\n      <div class=\\\"mat-ripple-element mat-radio-persistent-ripple\\\"></div>\\n    </div>\\n  </div>\\n  <label class=\\\"mdc-label\\\" [for]=\\\"inputId\\\">\\n    <ng-content></ng-content>\\n  </label>\\n</div>\\n\", styles: [\".mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px);top:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-sys-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display, block)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}\"], dependencies: [{ kind: \"directive\", type: MatRipple, selector: \"[mat-ripple], [matRipple]\", inputs: [\"matRippleColor\", \"matRippleUnbounded\", \"matRippleCentered\", \"matRippleRadius\", \"matRippleAnimation\", \"matRippleDisabled\", \"matRippleTrigger\"], exportAs: [\"matRipple\"] }, { kind: \"component\", type: _MatInternalFormField, selector: \"div[mat-internal-form-field]\", inputs: [\"labelPosition\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRadioButton, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-radio-button', host: {\n                        'class': 'mat-mdc-radio-button',\n                        '[attr.id]': 'id',\n                        '[class.mat-primary]': 'color === \"primary\"',\n                        '[class.mat-accent]': 'color === \"accent\"',\n                        '[class.mat-warn]': 'color === \"warn\"',\n                        '[class.mat-mdc-radio-checked]': 'checked',\n                        '[class.mat-mdc-radio-disabled]': 'disabled',\n                        '[class.mat-mdc-radio-disabled-interactive]': 'disabledInteractive',\n                        '[class._mat-animation-noopable]': '_noopAnimations',\n                        // Needs to be removed since it causes some a11y issues (see #21266).\n                        '[attr.tabindex]': 'null',\n                        '[attr.aria-label]': 'null',\n                        '[attr.aria-labelledby]': 'null',\n                        '[attr.aria-describedby]': 'null',\n                        // Note: under normal conditions focus shouldn't land on this element, however it may be\n                        // programmatically set, for example inside of a focus trap, in this case we want to forward\n                        // the focus to the native element.\n                        '(focus)': '_inputElement.nativeElement.focus()',\n                    }, exportAs: 'matRadioButton', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatRipple, _MatInternalFormField], template: \"<div mat-internal-form-field [labelPosition]=\\\"labelPosition\\\" #formField>\\n  <div class=\\\"mdc-radio\\\" [class.mdc-radio--disabled]=\\\"disabled\\\">\\n    <!-- Render this element first so the input is on top. -->\\n    <div class=\\\"mat-mdc-radio-touch-target\\\" (click)=\\\"_onTouchTargetClick($event)\\\"></div>\\n    <input #input class=\\\"mdc-radio__native-control\\\" type=\\\"radio\\\"\\n           [id]=\\\"inputId\\\"\\n           [checked]=\\\"checked\\\"\\n           [disabled]=\\\"disabled && !disabledInteractive\\\"\\n           [attr.name]=\\\"name\\\"\\n           [attr.value]=\\\"value\\\"\\n           [required]=\\\"required\\\"\\n           [attr.aria-label]=\\\"ariaLabel\\\"\\n           [attr.aria-labelledby]=\\\"ariaLabelledby\\\"\\n           [attr.aria-describedby]=\\\"ariaDescribedby\\\"\\n           [attr.aria-disabled]=\\\"disabled && disabledInteractive ? 'true' : null\\\"\\n           (change)=\\\"_onInputInteraction($event)\\\">\\n    <div class=\\\"mdc-radio__background\\\">\\n      <div class=\\\"mdc-radio__outer-circle\\\"></div>\\n      <div class=\\\"mdc-radio__inner-circle\\\"></div>\\n    </div>\\n    <div mat-ripple class=\\\"mat-radio-ripple mat-focus-indicator\\\"\\n         [matRippleTrigger]=\\\"_rippleTrigger.nativeElement\\\"\\n         [matRippleDisabled]=\\\"_isRippleDisabled()\\\"\\n         [matRippleCentered]=\\\"true\\\">\\n      <div class=\\\"mat-ripple-element mat-radio-persistent-ripple\\\"></div>\\n    </div>\\n  </div>\\n  <label class=\\\"mdc-label\\\" [for]=\\\"inputId\\\">\\n    <ng-content></ng-content>\\n  </label>\\n</div>\\n\", styles: [\".mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px);top:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-sys-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before{content:\\\"\\\"}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display, block)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}\"] }]\n        }], ctorParameters: () => [], propDecorators: { id: [{\n                type: Input\n            }], name: [{\n                type: Input\n            }], ariaLabel: [{\n                type: Input,\n                args: ['aria-label']\n            }], ariaLabelledby: [{\n                type: Input,\n                args: ['aria-labelledby']\n            }], ariaDescribedby: [{\n                type: Input,\n                args: ['aria-describedby']\n            }], disableRipple: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], tabIndex: [{\n                type: Input,\n                args: [{\n                        transform: (value) => (value == null ? 0 : numberAttribute(value)),\n                    }]\n            }], checked: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], value: [{\n                type: Input\n            }], labelPosition: [{\n                type: Input\n            }], disabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], required: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], color: [{\n                type: Input\n            }], disabledInteractive: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], change: [{\n                type: Output\n            }], _inputElement: [{\n                type: ViewChild,\n                args: ['input']\n            }], _rippleTrigger: [{\n                type: ViewChild,\n                args: ['formField', { read: ElementRef, static: true }]\n            }] } });\n\nclass MatRadioModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRadioModule, imports: [MatCommonModule, MatRippleModule, MatRadioGroup, MatRadioButton], exports: [MatCommonModule, MatRadioGroup, MatRadioButton] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRadioModule, imports: [MatCommonModule, MatRippleModule, MatRadioButton, MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRadioModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [MatCommonModule, MatRippleModule, MatRadioGroup, MatRadioButton],\n                    exports: [MatCommonModule, MatRadioGroup, MatRadioButton],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_RADIO_DEFAULT_OPTIONS, MAT_RADIO_DEFAULT_OPTIONS_FACTORY, MAT_RADIO_GROUP, MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR, MatRadioButton, MatRadioChange, MatRadioGroup, MatRadioModule };\n","import { Overlay, CdkOverlayOrigin, CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, inject, ChangeDetectorRef, ElementRef, EventEmitter, HostAttributeToken, booleanAttribute, numberAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChildren, ContentChild, Input, ViewChild, Output, Directive, NgModule } from '@angular/core';\nimport { _countGroupLabelsBeforeOption, _getOptionScrollPosition, ErrorStateMatcher, _ErrorStateTracker, MAT_OPTION_PARENT_COMPONENT, MatOption, MAT_OPTGROUP, MatOptionModule, MatCommonModule } from '@angular/material/core';\nexport { MatOptgroup, MatOption } from '@angular/material/core';\nimport { MAT_FORM_FIELD, MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nexport { MatError, MatFormField, MatHint, MatLabel, MatPrefix, MatSuffix } from '@angular/material/form-field';\nimport { ViewportRuler, CdkScrollableModule } from '@angular/cdk/scrolling';\nimport { _IdGenerator, LiveAnnouncer, removeAriaReferencedId, addAriaReferencedId, ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { SelectionModel } from '@angular/cdk/collections';\nimport { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, hasModifierKey, A } from '@angular/cdk/keycodes';\nimport { NgControl, Validators, NgForm, FormGroupDirective } from '@angular/forms';\nimport { Subject, defer, merge } from 'rxjs';\nimport { startWith, switchMap, filter, map, distinctUntilChanged, takeUntil, take } from 'rxjs/operators';\nimport { trigger, transition, query, animateChild, state, style, animate } from '@angular/animations';\nimport { NgClass } from '@angular/common';\n\n/**\n * The following are all the animations for the mat-select component, with each\n * const containing the metadata for one animation.\n *\n * The values below match the implementation of the AngularJS Material mat-select animation.\n * @docs-private\n */\nconst matSelectAnimations = {\n    /**\n     * This animation ensures the select's overlay panel animation (transformPanel) is called when\n     * closing the select.\n     * This is needed due to https://github.com/angular/angular/issues/23302\n     */\n    transformPanelWrap: trigger('transformPanelWrap', [\n        transition('* => void', query('@transformPanel', [animateChild()], { optional: true })),\n    ]),\n    /** This animation transforms the select's overlay panel on and off the page. */\n    transformPanel: trigger('transformPanel', [\n        state('void', style({\n            opacity: 0,\n            transform: 'scale(1, 0.8)',\n        })),\n        transition('void => showing', animate('120ms cubic-bezier(0, 0, 0.2, 1)', style({\n            opacity: 1,\n            transform: 'scale(1, 1)',\n        }))),\n        transition('* => void', animate('100ms linear', style({ opacity: 0 }))),\n    ]),\n};\n\n// Note that these have been copied over verbatim from\n// `material/select` so that we don't have to expose them publicly.\n/**\n * Returns an exception to be thrown when attempting to change a select's `multiple` option\n * after initialization.\n * @docs-private\n */\nfunction getMatSelectDynamicMultipleError() {\n    return Error('Cannot change `multiple` mode of select after initialization.');\n}\n/**\n * Returns an exception to be thrown when attempting to assign a non-array value to a select\n * in `multiple` mode. Note that `undefined` and `null` are still valid values to allow for\n * resetting the value.\n * @docs-private\n */\nfunction getMatSelectNonArrayValueError() {\n    return Error('Value must be an array in multiple-selection mode.');\n}\n/**\n * Returns an exception to be thrown when assigning a non-function value to the comparator\n * used to determine if a value corresponds to an option. Note that whether the function\n * actually takes two values and returns a boolean is not checked.\n */\nfunction getMatSelectNonFunctionValueError() {\n    return Error('`compareWith` must be a function.');\n}\n\n/** Injection token that determines the scroll handling while a select is open. */\nconst MAT_SELECT_SCROLL_STRATEGY = new InjectionToken('mat-select-scroll-strategy', {\n    providedIn: 'root',\n    factory: () => {\n        const overlay = inject(Overlay);\n        return () => overlay.scrollStrategies.reposition();\n    },\n});\n/** @docs-private */\nfunction MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n    return () => overlay.scrollStrategies.reposition();\n}\n/** Injection token that can be used to provide the default options the select module. */\nconst MAT_SELECT_CONFIG = new InjectionToken('MAT_SELECT_CONFIG');\n/** @docs-private */\nconst MAT_SELECT_SCROLL_STRATEGY_PROVIDER = {\n    provide: MAT_SELECT_SCROLL_STRATEGY,\n    deps: [Overlay],\n    useFactory: MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n/**\n * Injection token that can be used to reference instances of `MatSelectTrigger`. It serves as\n * alternative token to the actual `MatSelectTrigger` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_SELECT_TRIGGER = new InjectionToken('MatSelectTrigger');\n/** Change event object that is emitted when the select value has changed. */\nclass MatSelectChange {\n    source;\n    value;\n    constructor(\n    /** Reference to the select that emitted the change event. */\n    source, \n    /** Current value of the select that emitted the event. */\n    value) {\n        this.source = source;\n        this.value = value;\n    }\n}\nclass MatSelect {\n    _viewportRuler = inject(ViewportRuler);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _elementRef = inject(ElementRef);\n    _dir = inject(Directionality, { optional: true });\n    _idGenerator = inject(_IdGenerator);\n    _parentFormField = inject(MAT_FORM_FIELD, { optional: true });\n    ngControl = inject(NgControl, { self: true, optional: true });\n    _liveAnnouncer = inject(LiveAnnouncer);\n    _defaultOptions = inject(MAT_SELECT_CONFIG, { optional: true });\n    _initialized = new Subject();\n    /** All of the defined select options. */\n    options;\n    // TODO(crisbeto): this is only necessary for the non-MDC select, but it's technically a\n    // public API so we have to keep it. It should be deprecated and removed eventually.\n    /** All of the defined groups of options. */\n    optionGroups;\n    /** User-supplied override of the trigger element. */\n    customTrigger;\n    /**\n     * This position config ensures that the top \"start\" corner of the overlay\n     * is aligned with with the top \"start\" of the origin by default (overlapping\n     * the trigger completely). If the panel cannot fit below the trigger, it\n     * will fall back to a position above the trigger.\n     */\n    _positions = [\n        {\n            originX: 'start',\n            originY: 'bottom',\n            overlayX: 'start',\n            overlayY: 'top',\n        },\n        {\n            originX: 'end',\n            originY: 'bottom',\n            overlayX: 'end',\n            overlayY: 'top',\n        },\n        {\n            originX: 'start',\n            originY: 'top',\n            overlayX: 'start',\n            overlayY: 'bottom',\n            panelClass: 'mat-mdc-select-panel-above',\n        },\n        {\n            originX: 'end',\n            originY: 'top',\n            overlayX: 'end',\n            overlayY: 'bottom',\n            panelClass: 'mat-mdc-select-panel-above',\n        },\n    ];\n    /** Scrolls a particular option into the view. */\n    _scrollOptionIntoView(index) {\n        const option = this.options.toArray()[index];\n        if (option) {\n            const panel = this.panel.nativeElement;\n            const labelCount = _countGroupLabelsBeforeOption(index, this.options, this.optionGroups);\n            const element = option._getHostElement();\n            if (index === 0 && labelCount === 1) {\n                // If we've got one group label before the option and we're at the top option,\n                // scroll the list to the top. This is better UX than scrolling the list to the\n                // top of the option, because it allows the user to read the top group's label.\n                panel.scrollTop = 0;\n            }\n            else {\n                panel.scrollTop = _getOptionScrollPosition(element.offsetTop, element.offsetHeight, panel.scrollTop, panel.offsetHeight);\n            }\n        }\n    }\n    /** Called when the panel has been opened and the overlay has settled on its final position. */\n    _positioningSettled() {\n        this._scrollOptionIntoView(this._keyManager.activeItemIndex || 0);\n    }\n    /** Creates a change event object that should be emitted by the select. */\n    _getChangeEvent(value) {\n        return new MatSelectChange(this, value);\n    }\n    /** Factory function used to create a scroll strategy for this select. */\n    _scrollStrategyFactory = inject(MAT_SELECT_SCROLL_STRATEGY);\n    /** Whether or not the overlay panel is open. */\n    _panelOpen = false;\n    /** Comparison function to specify which option is displayed. Defaults to object equality. */\n    _compareWith = (o1, o2) => o1 === o2;\n    /** Unique id for this input. */\n    _uid = this._idGenerator.getId('mat-select-');\n    /** Current `aria-labelledby` value for the select trigger. */\n    _triggerAriaLabelledBy = null;\n    /**\n     * Keeps track of the previous form control assigned to the select.\n     * Used to detect if it has changed.\n     */\n    _previousControl;\n    /** Emits whenever the component is destroyed. */\n    _destroy = new Subject();\n    /** Tracks the error state of the select. */\n    _errorStateTracker;\n    /**\n     * Emits whenever the component state changes and should cause the parent\n     * form-field to update. Implemented as part of `MatFormFieldControl`.\n     * @docs-private\n     */\n    stateChanges = new Subject();\n    /**\n     * Disable the automatic labeling to avoid issues like #27241.\n     * @docs-private\n     */\n    disableAutomaticLabeling = true;\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    userAriaDescribedBy;\n    /** Deals with the selection logic. */\n    _selectionModel;\n    /** Manages keyboard events for options in the panel. */\n    _keyManager;\n    /** Ideal origin for the overlay panel. */\n    _preferredOverlayOrigin;\n    /** Width of the overlay panel. */\n    _overlayWidth;\n    /** `View -> model callback called when value changes` */\n    _onChange = () => { };\n    /** `View -> model callback called when select has been touched` */\n    _onTouched = () => { };\n    /** ID for the DOM node containing the select's value. */\n    _valueId = this._idGenerator.getId('mat-select-value-');\n    /** Emits when the panel element is finished transforming in. */\n    _panelDoneAnimatingStream = new Subject();\n    /** Strategy that will be used to handle scrolling while the select panel is open. */\n    _scrollStrategy;\n    _overlayPanelClass = this._defaultOptions?.overlayPanelClass || '';\n    /** Whether the select is focused. */\n    get focused() {\n        return this._focused || this._panelOpen;\n    }\n    _focused = false;\n    /** A name for this control that can be used by `mat-form-field`. */\n    controlType = 'mat-select';\n    /** Trigger that opens the select. */\n    trigger;\n    /** Panel containing the select options. */\n    panel;\n    /** Overlay pane containing the options. */\n    _overlayDir;\n    /** Classes to be passed to the select panel. Supports the same syntax as `ngClass`. */\n    panelClass;\n    /** Whether the select is disabled. */\n    disabled = false;\n    /** Whether ripples in the select are disabled. */\n    disableRipple = false;\n    /** Tab index of the select. */\n    tabIndex = 0;\n    /** Whether checkmark indicator for single-selection options is hidden. */\n    get hideSingleSelectionIndicator() {\n        return this._hideSingleSelectionIndicator;\n    }\n    set hideSingleSelectionIndicator(value) {\n        this._hideSingleSelectionIndicator = value;\n        this._syncParentProperties();\n    }\n    _hideSingleSelectionIndicator = this._defaultOptions?.hideSingleSelectionIndicator ?? false;\n    /** Placeholder to be shown if no value has been selected. */\n    get placeholder() {\n        return this._placeholder;\n    }\n    set placeholder(value) {\n        this._placeholder = value;\n        this.stateChanges.next();\n    }\n    _placeholder;\n    /** Whether the component is required. */\n    get required() {\n        return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n    }\n    set required(value) {\n        this._required = value;\n        this.stateChanges.next();\n    }\n    _required;\n    /** Whether the user should be allowed to select multiple options. */\n    get multiple() {\n        return this._multiple;\n    }\n    set multiple(value) {\n        if (this._selectionModel && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getMatSelectDynamicMultipleError();\n        }\n        this._multiple = value;\n    }\n    _multiple = false;\n    /** Whether to center the active option over the trigger. */\n    disableOptionCentering = this._defaultOptions?.disableOptionCentering ?? false;\n    /**\n     * Function to compare the option values with the selected values. The first argument\n     * is a value from an option. The second is a value from the selection. A boolean\n     * should be returned.\n     */\n    get compareWith() {\n        return this._compareWith;\n    }\n    set compareWith(fn) {\n        if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getMatSelectNonFunctionValueError();\n        }\n        this._compareWith = fn;\n        if (this._selectionModel) {\n            // A different comparator means the selection could change.\n            this._initializeSelection();\n        }\n    }\n    /** Value of the select control. */\n    get value() {\n        return this._value;\n    }\n    set value(newValue) {\n        const hasAssigned = this._assignValue(newValue);\n        if (hasAssigned) {\n            this._onChange(newValue);\n        }\n    }\n    _value;\n    /** Aria label of the select. */\n    ariaLabel = '';\n    /** Input that can be used to specify the `aria-labelledby` attribute. */\n    ariaLabelledby;\n    /** Object used to control when error messages are shown. */\n    get errorStateMatcher() {\n        return this._errorStateTracker.matcher;\n    }\n    set errorStateMatcher(value) {\n        this._errorStateTracker.matcher = value;\n    }\n    /** Time to wait in milliseconds after the last keystroke before moving focus to an item. */\n    typeaheadDebounceInterval;\n    /**\n     * Function used to sort the values in a select in multiple mode.\n     * Follows the same logic as `Array.prototype.sort`.\n     */\n    sortComparator;\n    /** Unique id of the element. */\n    get id() {\n        return this._id;\n    }\n    set id(value) {\n        this._id = value || this._uid;\n        this.stateChanges.next();\n    }\n    _id;\n    /** Whether the select is in an error state. */\n    get errorState() {\n        return this._errorStateTracker.errorState;\n    }\n    set errorState(value) {\n        this._errorStateTracker.errorState = value;\n    }\n    /**\n     * Width of the panel. If set to `auto`, the panel will match the trigger width.\n     * If set to null or an empty string, the panel will grow to match the longest option's text.\n     */\n    panelWidth = this._defaultOptions && typeof this._defaultOptions.panelWidth !== 'undefined'\n        ? this._defaultOptions.panelWidth\n        : 'auto';\n    /**\n     * By default selecting an option with a `null` or `undefined` value will reset the select's\n     * value. Enable this option if the reset behavior doesn't match your requirements and instead\n     * the nullable options should become selected. The value of this input can be controlled app-wide\n     * using the `MAT_SELECT_CONFIG` injection token.\n     */\n    canSelectNullableOptions = this._defaultOptions?.canSelectNullableOptions ?? false;\n    /** Combined stream of all of the child options' change events. */\n    optionSelectionChanges = defer(() => {\n        const options = this.options;\n        if (options) {\n            return options.changes.pipe(startWith(options), switchMap(() => merge(...options.map(option => option.onSelectionChange))));\n        }\n        return this._initialized.pipe(switchMap(() => this.optionSelectionChanges));\n    });\n    /** Event emitted when the select panel has been toggled. */\n    openedChange = new EventEmitter();\n    /** Event emitted when the select has been opened. */\n    _openedStream = this.openedChange.pipe(filter(o => o), map(() => { }));\n    /** Event emitted when the select has been closed. */\n    _closedStream = this.openedChange.pipe(filter(o => !o), map(() => { }));\n    /** Event emitted when the selected value has been changed by the user. */\n    selectionChange = new EventEmitter();\n    /**\n     * Event that emits whenever the raw value of the select changes. This is here primarily\n     * to facilitate the two-way binding for the `value` input.\n     * @docs-private\n     */\n    valueChange = new EventEmitter();\n    constructor() {\n        const defaultErrorStateMatcher = inject(ErrorStateMatcher);\n        const parentForm = inject(NgForm, { optional: true });\n        const parentFormGroup = inject(FormGroupDirective, { optional: true });\n        const tabIndex = inject(new HostAttributeToken('tabindex'), { optional: true });\n        if (this.ngControl) {\n            // Note: we provide the value accessor through here, instead of\n            // the `providers` to avoid running into a circular import.\n            this.ngControl.valueAccessor = this;\n        }\n        // Note that we only want to set this when the defaults pass it in, otherwise it should\n        // stay as `undefined` so that it falls back to the default in the key manager.\n        if (this._defaultOptions?.typeaheadDebounceInterval != null) {\n            this.typeaheadDebounceInterval = this._defaultOptions.typeaheadDebounceInterval;\n        }\n        this._errorStateTracker = new _ErrorStateTracker(defaultErrorStateMatcher, this.ngControl, parentFormGroup, parentForm, this.stateChanges);\n        this._scrollStrategy = this._scrollStrategyFactory();\n        this.tabIndex = tabIndex == null ? 0 : parseInt(tabIndex) || 0;\n        // Force setter to be called in case id was not specified.\n        this.id = this.id;\n    }\n    ngOnInit() {\n        this._selectionModel = new SelectionModel(this.multiple);\n        this.stateChanges.next();\n        // We need `distinctUntilChanged` here, because some browsers will\n        // fire the animation end event twice for the same animation. See:\n        // https://github.com/angular/angular/issues/24084\n        this._panelDoneAnimatingStream\n            .pipe(distinctUntilChanged(), takeUntil(this._destroy))\n            .subscribe(() => this._panelDoneAnimating(this.panelOpen));\n        this._viewportRuler\n            .change()\n            .pipe(takeUntil(this._destroy))\n            .subscribe(() => {\n            if (this.panelOpen) {\n                this._overlayWidth = this._getOverlayWidth(this._preferredOverlayOrigin);\n                this._changeDetectorRef.detectChanges();\n            }\n        });\n    }\n    ngAfterContentInit() {\n        this._initialized.next();\n        this._initialized.complete();\n        this._initKeyManager();\n        this._selectionModel.changed.pipe(takeUntil(this._destroy)).subscribe(event => {\n            event.added.forEach(option => option.select());\n            event.removed.forEach(option => option.deselect());\n        });\n        this.options.changes.pipe(startWith(null), takeUntil(this._destroy)).subscribe(() => {\n            this._resetOptions();\n            this._initializeSelection();\n        });\n    }\n    ngDoCheck() {\n        const newAriaLabelledby = this._getTriggerAriaLabelledby();\n        const ngControl = this.ngControl;\n        // We have to manage setting the `aria-labelledby` ourselves, because part of its value\n        // is computed as a result of a content query which can cause this binding to trigger a\n        // \"changed after checked\" error.\n        if (newAriaLabelledby !== this._triggerAriaLabelledBy) {\n            const element = this._elementRef.nativeElement;\n            this._triggerAriaLabelledBy = newAriaLabelledby;\n            if (newAriaLabelledby) {\n                element.setAttribute('aria-labelledby', newAriaLabelledby);\n            }\n            else {\n                element.removeAttribute('aria-labelledby');\n            }\n        }\n        if (ngControl) {\n            // The disabled state might go out of sync if the form group is swapped out. See #17860.\n            if (this._previousControl !== ngControl.control) {\n                if (this._previousControl !== undefined &&\n                    ngControl.disabled !== null &&\n                    ngControl.disabled !== this.disabled) {\n                    this.disabled = ngControl.disabled;\n                }\n                this._previousControl = ngControl.control;\n            }\n            this.updateErrorState();\n        }\n    }\n    ngOnChanges(changes) {\n        // Updating the disabled state is handled by the input, but we need to additionally let\n        // the parent form field know to run change detection when the disabled state changes.\n        if (changes['disabled'] || changes['userAriaDescribedBy']) {\n            this.stateChanges.next();\n        }\n        if (changes['typeaheadDebounceInterval'] && this._keyManager) {\n            this._keyManager.withTypeAhead(this.typeaheadDebounceInterval);\n        }\n    }\n    ngOnDestroy() {\n        this._keyManager?.destroy();\n        this._destroy.next();\n        this._destroy.complete();\n        this.stateChanges.complete();\n        this._clearFromModal();\n    }\n    /** Toggles the overlay panel open or closed. */\n    toggle() {\n        this.panelOpen ? this.close() : this.open();\n    }\n    /** Opens the overlay panel. */\n    open() {\n        if (!this._canOpen()) {\n            return;\n        }\n        // It's important that we read this as late as possible, because doing so earlier will\n        // return a different element since it's based on queries in the form field which may\n        // not have run yet. Also this needs to be assigned before we measure the overlay width.\n        if (this._parentFormField) {\n            this._preferredOverlayOrigin = this._parentFormField.getConnectedOverlayOrigin();\n        }\n        this._overlayWidth = this._getOverlayWidth(this._preferredOverlayOrigin);\n        this._applyModalPanelOwnership();\n        this._panelOpen = true;\n        this._keyManager.withHorizontalOrientation(null);\n        this._highlightCorrectOption();\n        this._changeDetectorRef.markForCheck();\n        // Required for the MDC form field to pick up when the overlay has been opened.\n        this.stateChanges.next();\n    }\n    /**\n     * Track which modal we have modified the `aria-owns` attribute of. When the combobox trigger is\n     * inside an aria-modal, we apply aria-owns to the parent modal with the `id` of the options\n     * panel. Track the modal we have changed so we can undo the changes on destroy.\n     */\n    _trackedModal = null;\n    /**\n     * If the autocomplete trigger is inside of an `aria-modal` element, connect\n     * that modal to the options panel with `aria-owns`.\n     *\n     * For some browser + screen reader combinations, when navigation is inside\n     * of an `aria-modal` element, the screen reader treats everything outside\n     * of that modal as hidden or invisible.\n     *\n     * This causes a problem when the combobox trigger is _inside_ of a modal, because the\n     * options panel is rendered _outside_ of that modal, preventing screen reader navigation\n     * from reaching the panel.\n     *\n     * We can work around this issue by applying `aria-owns` to the modal with the `id` of\n     * the options panel. This effectively communicates to assistive technology that the\n     * options panel is part of the same interaction as the modal.\n     *\n     * At time of this writing, this issue is present in VoiceOver.\n     * See https://github.com/angular/components/issues/20694\n     */\n    _applyModalPanelOwnership() {\n        // TODO(http://github.com/angular/components/issues/26853): consider de-duplicating this with\n        // the `LiveAnnouncer` and any other usages.\n        //\n        // Note that the selector here is limited to CDK overlays at the moment in order to reduce the\n        // section of the DOM we need to look through. This should cover all the cases we support, but\n        // the selector can be expanded if it turns out to be too narrow.\n        const modal = this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal=\"true\"]');\n        if (!modal) {\n            // Most commonly, the autocomplete trigger is not inside a modal.\n            return;\n        }\n        const panelId = `${this.id}-panel`;\n        if (this._trackedModal) {\n            removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\n        }\n        addAriaReferencedId(modal, 'aria-owns', panelId);\n        this._trackedModal = modal;\n    }\n    /** Clears the reference to the listbox overlay element from the modal it was added to. */\n    _clearFromModal() {\n        if (!this._trackedModal) {\n            // Most commonly, the autocomplete trigger is not used inside a modal.\n            return;\n        }\n        const panelId = `${this.id}-panel`;\n        removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\n        this._trackedModal = null;\n    }\n    /** Closes the overlay panel and focuses the host element. */\n    close() {\n        if (this._panelOpen) {\n            this._panelOpen = false;\n            this._keyManager.withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr');\n            this._changeDetectorRef.markForCheck();\n            this._onTouched();\n            // Required for the MDC form field to pick up when the overlay has been closed.\n            this.stateChanges.next();\n        }\n    }\n    /**\n     * Sets the select's value. Part of the ControlValueAccessor interface\n     * required to integrate with Angular's core forms API.\n     *\n     * @param value New value to be written to the model.\n     */\n    writeValue(value) {\n        this._assignValue(value);\n    }\n    /**\n     * Saves a callback function to be invoked when the select's value\n     * changes from user input. Part of the ControlValueAccessor interface\n     * required to integrate with Angular's core forms API.\n     *\n     * @param fn Callback to be triggered when the value changes.\n     */\n    registerOnChange(fn) {\n        this._onChange = fn;\n    }\n    /**\n     * Saves a callback function to be invoked when the select is blurred\n     * by the user. Part of the ControlValueAccessor interface required\n     * to integrate with Angular's core forms API.\n     *\n     * @param fn Callback to be triggered when the component has been touched.\n     */\n    registerOnTouched(fn) {\n        this._onTouched = fn;\n    }\n    /**\n     * Disables the select. Part of the ControlValueAccessor interface required\n     * to integrate with Angular's core forms API.\n     *\n     * @param isDisabled Sets whether the component is disabled.\n     */\n    setDisabledState(isDisabled) {\n        this.disabled = isDisabled;\n        this._changeDetectorRef.markForCheck();\n        this.stateChanges.next();\n    }\n    /** Whether or not the overlay panel is open. */\n    get panelOpen() {\n        return this._panelOpen;\n    }\n    /** The currently selected option. */\n    get selected() {\n        return this.multiple ? this._selectionModel?.selected || [] : this._selectionModel?.selected[0];\n    }\n    /** The value displayed in the trigger. */\n    get triggerValue() {\n        if (this.empty) {\n            return '';\n        }\n        if (this._multiple) {\n            const selectedOptions = this._selectionModel.selected.map(option => option.viewValue);\n            if (this._isRtl()) {\n                selectedOptions.reverse();\n            }\n            // TODO(crisbeto): delimiter should be configurable for proper localization.\n            return selectedOptions.join(', ');\n        }\n        return this._selectionModel.selected[0].viewValue;\n    }\n    /** Refreshes the error state of the select. */\n    updateErrorState() {\n        this._errorStateTracker.updateErrorState();\n    }\n    /** Whether the element is in RTL mode. */\n    _isRtl() {\n        return this._dir ? this._dir.value === 'rtl' : false;\n    }\n    /** Handles all keydown events on the select. */\n    _handleKeydown(event) {\n        if (!this.disabled) {\n            this.panelOpen ? this._handleOpenKeydown(event) : this._handleClosedKeydown(event);\n        }\n    }\n    /** Handles keyboard events while the select is closed. */\n    _handleClosedKeydown(event) {\n        const keyCode = event.keyCode;\n        const isArrowKey = keyCode === DOWN_ARROW ||\n            keyCode === UP_ARROW ||\n            keyCode === LEFT_ARROW ||\n            keyCode === RIGHT_ARROW;\n        const isOpenKey = keyCode === ENTER || keyCode === SPACE;\n        const manager = this._keyManager;\n        // Open the select on ALT + arrow key to match the native <select>\n        if ((!manager.isTyping() && isOpenKey && !hasModifierKey(event)) ||\n            ((this.multiple || event.altKey) && isArrowKey)) {\n            event.preventDefault(); // prevents the page from scrolling down when pressing space\n            this.open();\n        }\n        else if (!this.multiple) {\n            const previouslySelectedOption = this.selected;\n            manager.onKeydown(event);\n            const selectedOption = this.selected;\n            // Since the value has changed, we need to announce it ourselves.\n            if (selectedOption && previouslySelectedOption !== selectedOption) {\n                // We set a duration on the live announcement, because we want the live element to be\n                // cleared after a while so that users can't navigate to it using the arrow keys.\n                this._liveAnnouncer.announce(selectedOption.viewValue, 10000);\n            }\n        }\n    }\n    /** Handles keyboard events when the selected is open. */\n    _handleOpenKeydown(event) {\n        const manager = this._keyManager;\n        const keyCode = event.keyCode;\n        const isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW;\n        const isTyping = manager.isTyping();\n        if (isArrowKey && event.altKey) {\n            // Close the select on ALT + arrow key to match the native <select>\n            event.preventDefault();\n            this.close();\n            // Don't do anything in this case if the user is typing,\n            // because the typing sequence can include the space key.\n        }\n        else if (!isTyping &&\n            (keyCode === ENTER || keyCode === SPACE) &&\n            manager.activeItem &&\n            !hasModifierKey(event)) {\n            event.preventDefault();\n            manager.activeItem._selectViaInteraction();\n        }\n        else if (!isTyping && this._multiple && keyCode === A && event.ctrlKey) {\n            event.preventDefault();\n            const hasDeselectedOptions = this.options.some(opt => !opt.disabled && !opt.selected);\n            this.options.forEach(option => {\n                if (!option.disabled) {\n                    hasDeselectedOptions ? option.select() : option.deselect();\n                }\n            });\n        }\n        else {\n            const previouslyFocusedIndex = manager.activeItemIndex;\n            manager.onKeydown(event);\n            if (this._multiple &&\n                isArrowKey &&\n                event.shiftKey &&\n                manager.activeItem &&\n                manager.activeItemIndex !== previouslyFocusedIndex) {\n                manager.activeItem._selectViaInteraction();\n            }\n        }\n    }\n    _onFocus() {\n        if (!this.disabled) {\n            this._focused = true;\n            this.stateChanges.next();\n        }\n    }\n    /**\n     * Calls the touched callback only if the panel is closed. Otherwise, the trigger will\n     * \"blur\" to the panel when it opens, causing a false positive.\n     */\n    _onBlur() {\n        this._focused = false;\n        this._keyManager?.cancelTypeahead();\n        if (!this.disabled && !this.panelOpen) {\n            this._onTouched();\n            this._changeDetectorRef.markForCheck();\n            this.stateChanges.next();\n        }\n    }\n    /**\n     * Callback that is invoked when the overlay panel has been attached.\n     */\n    _onAttached() {\n        this._overlayDir.positionChange.pipe(take(1)).subscribe(() => {\n            this._changeDetectorRef.detectChanges();\n            this._positioningSettled();\n        });\n    }\n    /** Returns the theme to be used on the panel. */\n    _getPanelTheme() {\n        return this._parentFormField ? `mat-${this._parentFormField.color}` : '';\n    }\n    /** Whether the select has a value. */\n    get empty() {\n        return !this._selectionModel || this._selectionModel.isEmpty();\n    }\n    _initializeSelection() {\n        // Defer setting the value in order to avoid the \"Expression\n        // has changed after it was checked\" errors from Angular.\n        Promise.resolve().then(() => {\n            if (this.ngControl) {\n                this._value = this.ngControl.value;\n            }\n            this._setSelectionByValue(this._value);\n            this.stateChanges.next();\n        });\n    }\n    /**\n     * Sets the selected option based on a value. If no option can be\n     * found with the designated value, the select trigger is cleared.\n     */\n    _setSelectionByValue(value) {\n        this.options.forEach(option => option.setInactiveStyles());\n        this._selectionModel.clear();\n        if (this.multiple && value) {\n            if (!Array.isArray(value) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n                throw getMatSelectNonArrayValueError();\n            }\n            value.forEach((currentValue) => this._selectOptionByValue(currentValue));\n            this._sortValues();\n        }\n        else {\n            const correspondingOption = this._selectOptionByValue(value);\n            // Shift focus to the active item. Note that we shouldn't do this in multiple\n            // mode, because we don't know what option the user interacted with last.\n            if (correspondingOption) {\n                this._keyManager.updateActiveItem(correspondingOption);\n            }\n            else if (!this.panelOpen) {\n                // Otherwise reset the highlighted option. Note that we only want to do this while\n                // closed, because doing it while open can shift the user's focus unnecessarily.\n                this._keyManager.updateActiveItem(-1);\n            }\n        }\n        this._changeDetectorRef.markForCheck();\n    }\n    /**\n     * Finds and selects and option based on its value.\n     * @returns Option that has the corresponding value.\n     */\n    _selectOptionByValue(value) {\n        const correspondingOption = this.options.find((option) => {\n            // Skip options that are already in the model. This allows us to handle cases\n            // where the same primitive value is selected multiple times.\n            if (this._selectionModel.isSelected(option)) {\n                return false;\n            }\n            try {\n                // Treat null as a special reset value.\n                return ((option.value != null || this.canSelectNullableOptions) &&\n                    this._compareWith(option.value, value));\n            }\n            catch (error) {\n                if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                    // Notify developers of errors in their comparator.\n                    console.warn(error);\n                }\n                return false;\n            }\n        });\n        if (correspondingOption) {\n            this._selectionModel.select(correspondingOption);\n        }\n        return correspondingOption;\n    }\n    /** Assigns a specific value to the select. Returns whether the value has changed. */\n    _assignValue(newValue) {\n        // Always re-assign an array, because it might have been mutated.\n        if (newValue !== this._value || (this._multiple && Array.isArray(newValue))) {\n            if (this.options) {\n                this._setSelectionByValue(newValue);\n            }\n            this._value = newValue;\n            return true;\n        }\n        return false;\n    }\n    // `skipPredicate` determines if key manager should avoid putting a given option in the tab\n    // order. Allow disabled list items to receive focus via keyboard to align with WAI ARIA\n    // recommendation.\n    //\n    // Normally WAI ARIA's instructions are to exclude disabled items from the tab order, but it\n    // makes a few exceptions for compound widgets.\n    //\n    // From [Developing a Keyboard Interface](\n    // https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/):\n    //   \"For the following composite widget elements, keep them focusable when disabled: Options in a\n    //   Listbox...\"\n    //\n    // The user can focus disabled options using the keyboard, but the user cannot click disabled\n    // options.\n    _skipPredicate = (option) => {\n        if (this.panelOpen) {\n            // Support keyboard focusing disabled options in an ARIA listbox.\n            return false;\n        }\n        // When the panel is closed, skip over disabled options. Support options via the UP/DOWN arrow\n        // keys on a closed select. ARIA listbox interaction pattern is less relevant when the panel is\n        // closed.\n        return option.disabled;\n    };\n    /** Gets how wide the overlay panel should be. */\n    _getOverlayWidth(preferredOrigin) {\n        if (this.panelWidth === 'auto') {\n            const refToMeasure = preferredOrigin instanceof CdkOverlayOrigin\n                ? preferredOrigin.elementRef\n                : preferredOrigin || this._elementRef;\n            return refToMeasure.nativeElement.getBoundingClientRect().width;\n        }\n        return this.panelWidth === null ? '' : this.panelWidth;\n    }\n    /** Syncs the parent state with the individual options. */\n    _syncParentProperties() {\n        if (this.options) {\n            for (const option of this.options) {\n                option._changeDetectorRef.markForCheck();\n            }\n        }\n    }\n    /** Sets up a key manager to listen to keyboard events on the overlay panel. */\n    _initKeyManager() {\n        this._keyManager = new ActiveDescendantKeyManager(this.options)\n            .withTypeAhead(this.typeaheadDebounceInterval)\n            .withVerticalOrientation()\n            .withHorizontalOrientation(this._isRtl() ? 'rtl' : 'ltr')\n            .withHomeAndEnd()\n            .withPageUpDown()\n            .withAllowedModifierKeys(['shiftKey'])\n            .skipPredicate(this._skipPredicate);\n        this._keyManager.tabOut.subscribe(() => {\n            if (this.panelOpen) {\n                // Select the active item when tabbing away. This is consistent with how the native\n                // select behaves. Note that we only want to do this in single selection mode.\n                if (!this.multiple && this._keyManager.activeItem) {\n                    this._keyManager.activeItem._selectViaInteraction();\n                }\n                // Restore focus to the trigger before closing. Ensures that the focus\n                // position won't be lost if the user got focus into the overlay.\n                this.focus();\n                this.close();\n            }\n        });\n        this._keyManager.change.subscribe(() => {\n            if (this._panelOpen && this.panel) {\n                this._scrollOptionIntoView(this._keyManager.activeItemIndex || 0);\n            }\n            else if (!this._panelOpen && !this.multiple && this._keyManager.activeItem) {\n                this._keyManager.activeItem._selectViaInteraction();\n            }\n        });\n    }\n    /** Drops current option subscriptions and IDs and resets from scratch. */\n    _resetOptions() {\n        const changedOrDestroyed = merge(this.options.changes, this._destroy);\n        this.optionSelectionChanges.pipe(takeUntil(changedOrDestroyed)).subscribe(event => {\n            this._onSelect(event.source, event.isUserInput);\n            if (event.isUserInput && !this.multiple && this._panelOpen) {\n                this.close();\n                this.focus();\n            }\n        });\n        // Listen to changes in the internal state of the options and react accordingly.\n        // Handles cases like the labels of the selected options changing.\n        merge(...this.options.map(option => option._stateChanges))\n            .pipe(takeUntil(changedOrDestroyed))\n            .subscribe(() => {\n            // `_stateChanges` can fire as a result of a change in the label's DOM value which may\n            // be the result of an expression changing. We have to use `detectChanges` in order\n            // to avoid \"changed after checked\" errors (see #14793).\n            this._changeDetectorRef.detectChanges();\n            this.stateChanges.next();\n        });\n    }\n    /** Invoked when an option is clicked. */\n    _onSelect(option, isUserInput) {\n        const wasSelected = this._selectionModel.isSelected(option);\n        if (!this.canSelectNullableOptions && option.value == null && !this._multiple) {\n            option.deselect();\n            this._selectionModel.clear();\n            if (this.value != null) {\n                this._propagateChanges(option.value);\n            }\n        }\n        else {\n            if (wasSelected !== option.selected) {\n                option.selected\n                    ? this._selectionModel.select(option)\n                    : this._selectionModel.deselect(option);\n            }\n            if (isUserInput) {\n                this._keyManager.setActiveItem(option);\n            }\n            if (this.multiple) {\n                this._sortValues();\n                if (isUserInput) {\n                    // In case the user selected the option with their mouse, we\n                    // want to restore focus back to the trigger, in order to\n                    // prevent the select keyboard controls from clashing with\n                    // the ones from `mat-option`.\n                    this.focus();\n                }\n            }\n        }\n        if (wasSelected !== this._selectionModel.isSelected(option)) {\n            this._propagateChanges();\n        }\n        this.stateChanges.next();\n    }\n    /** Sorts the selected values in the selected based on their order in the panel. */\n    _sortValues() {\n        if (this.multiple) {\n            const options = this.options.toArray();\n            this._selectionModel.sort((a, b) => {\n                return this.sortComparator\n                    ? this.sortComparator(a, b, options)\n                    : options.indexOf(a) - options.indexOf(b);\n            });\n            this.stateChanges.next();\n        }\n    }\n    /** Emits change event to set the model value. */\n    _propagateChanges(fallbackValue) {\n        let valueToEmit;\n        if (this.multiple) {\n            valueToEmit = this.selected.map(option => option.value);\n        }\n        else {\n            valueToEmit = this.selected ? this.selected.value : fallbackValue;\n        }\n        this._value = valueToEmit;\n        this.valueChange.emit(valueToEmit);\n        this._onChange(valueToEmit);\n        this.selectionChange.emit(this._getChangeEvent(valueToEmit));\n        this._changeDetectorRef.markForCheck();\n    }\n    /**\n     * Highlights the selected item. If no option is selected, it will highlight\n     * the first *enabled* option.\n     */\n    _highlightCorrectOption() {\n        if (this._keyManager) {\n            if (this.empty) {\n                // Find the index of the first *enabled* option. Avoid calling `_keyManager.setActiveItem`\n                // because it activates the first option that passes the skip predicate, rather than the\n                // first *enabled* option.\n                let firstEnabledOptionIndex = -1;\n                for (let index = 0; index < this.options.length; index++) {\n                    const option = this.options.get(index);\n                    if (!option.disabled) {\n                        firstEnabledOptionIndex = index;\n                        break;\n                    }\n                }\n                this._keyManager.setActiveItem(firstEnabledOptionIndex);\n            }\n            else {\n                this._keyManager.setActiveItem(this._selectionModel.selected[0]);\n            }\n        }\n    }\n    /** Whether the panel is allowed to open. */\n    _canOpen() {\n        return !this._panelOpen && !this.disabled && this.options?.length > 0;\n    }\n    /** Focuses the select element. */\n    focus(options) {\n        this._elementRef.nativeElement.focus(options);\n    }\n    /** Gets the aria-labelledby for the select panel. */\n    _getPanelAriaLabelledby() {\n        if (this.ariaLabel) {\n            return null;\n        }\n        const labelId = this._parentFormField?.getLabelId() || null;\n        const labelExpression = labelId ? labelId + ' ' : '';\n        return this.ariaLabelledby ? labelExpression + this.ariaLabelledby : labelId;\n    }\n    /** Determines the `aria-activedescendant` to be set on the host. */\n    _getAriaActiveDescendant() {\n        if (this.panelOpen && this._keyManager && this._keyManager.activeItem) {\n            return this._keyManager.activeItem.id;\n        }\n        return null;\n    }\n    /** Gets the aria-labelledby of the select component trigger. */\n    _getTriggerAriaLabelledby() {\n        if (this.ariaLabel) {\n            return null;\n        }\n        const labelId = this._parentFormField?.getLabelId();\n        let value = (labelId ? labelId + ' ' : '') + this._valueId;\n        if (this.ariaLabelledby) {\n            value += ' ' + this.ariaLabelledby;\n        }\n        return value;\n    }\n    /** Called when the overlay panel is done animating. */\n    _panelDoneAnimating(isOpen) {\n        this.openedChange.emit(isOpen);\n    }\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    setDescribedByIds(ids) {\n        if (ids.length) {\n            this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));\n        }\n        else {\n            this._elementRef.nativeElement.removeAttribute('aria-describedby');\n        }\n    }\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    onContainerClick() {\n        this.focus();\n        this.open();\n    }\n    /**\n     * Implemented as part of MatFormFieldControl.\n     * @docs-private\n     */\n    get shouldLabelFloat() {\n        // Since the panel doesn't overlap the trigger, we\n        // want the label to only float when there's a value.\n        return this.panelOpen || !this.empty || (this.focused && !!this.placeholder);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"19.0.0\", type: MatSelect, isStandalone: true, selector: \"mat-select\", inputs: { userAriaDescribedBy: [\"aria-describedby\", \"userAriaDescribedBy\"], panelClass: \"panelClass\", disabled: [\"disabled\", \"disabled\", booleanAttribute], disableRipple: [\"disableRipple\", \"disableRipple\", booleanAttribute], tabIndex: [\"tabIndex\", \"tabIndex\", (value) => (value == null ? 0 : numberAttribute(value))], hideSingleSelectionIndicator: [\"hideSingleSelectionIndicator\", \"hideSingleSelectionIndicator\", booleanAttribute], placeholder: \"placeholder\", required: [\"required\", \"required\", booleanAttribute], multiple: [\"multiple\", \"multiple\", booleanAttribute], disableOptionCentering: [\"disableOptionCentering\", \"disableOptionCentering\", booleanAttribute], compareWith: \"compareWith\", value: \"value\", ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], errorStateMatcher: \"errorStateMatcher\", typeaheadDebounceInterval: [\"typeaheadDebounceInterval\", \"typeaheadDebounceInterval\", numberAttribute], sortComparator: \"sortComparator\", id: \"id\", panelWidth: \"panelWidth\", canSelectNullableOptions: [\"canSelectNullableOptions\", \"canSelectNullableOptions\", booleanAttribute] }, outputs: { openedChange: \"openedChange\", _openedStream: \"opened\", _closedStream: \"closed\", selectionChange: \"selectionChange\", valueChange: \"valueChange\" }, host: { attributes: { \"role\": \"combobox\", \"aria-haspopup\": \"listbox\" }, listeners: { \"keydown\": \"_handleKeydown($event)\", \"focus\": \"_onFocus()\", \"blur\": \"_onBlur()\" }, properties: { \"attr.id\": \"id\", \"attr.tabindex\": \"disabled ? -1 : tabIndex\", \"attr.aria-controls\": \"panelOpen ? id + \\\"-panel\\\" : null\", \"attr.aria-expanded\": \"panelOpen\", \"attr.aria-label\": \"ariaLabel || null\", \"attr.aria-required\": \"required.toString()\", \"attr.aria-disabled\": \"disabled.toString()\", \"attr.aria-invalid\": \"errorState\", \"attr.aria-activedescendant\": \"_getAriaActiveDescendant()\", \"class.mat-mdc-select-disabled\": \"disabled\", \"class.mat-mdc-select-invalid\": \"errorState\", \"class.mat-mdc-select-required\": \"required\", \"class.mat-mdc-select-empty\": \"empty\", \"class.mat-mdc-select-multiple\": \"multiple\" }, classAttribute: \"mat-mdc-select\" }, providers: [\n            { provide: MatFormFieldControl, useExisting: MatSelect },\n            { provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatSelect },\n        ], queries: [{ propertyName: \"customTrigger\", first: true, predicate: MAT_SELECT_TRIGGER, descendants: true }, { propertyName: \"options\", predicate: MatOption, descendants: true }, { propertyName: \"optionGroups\", predicate: MAT_OPTGROUP, descendants: true }], viewQueries: [{ propertyName: \"trigger\", first: true, predicate: [\"trigger\"], descendants: true }, { propertyName: \"panel\", first: true, predicate: [\"panel\"], descendants: true }, { propertyName: \"_overlayDir\", first: true, predicate: CdkConnectedOverlay, descendants: true }], exportAs: [\"matSelect\"], usesOnChanges: true, ngImport: i0, template: \"<div cdk-overlay-origin\\n     class=\\\"mat-mdc-select-trigger\\\"\\n     (click)=\\\"open()\\\"\\n     #fallbackOverlayOrigin=\\\"cdkOverlayOrigin\\\"\\n     #trigger>\\n\\n  <div class=\\\"mat-mdc-select-value\\\" [attr.id]=\\\"_valueId\\\">\\n    @if (empty) {\\n      <span class=\\\"mat-mdc-select-placeholder mat-mdc-select-min-line\\\">{{placeholder}}</span>\\n    } @else {\\n      <span class=\\\"mat-mdc-select-value-text\\\">\\n        @if (customTrigger) {\\n          <ng-content select=\\\"mat-select-trigger\\\"></ng-content>\\n        } @else {\\n          <span class=\\\"mat-mdc-select-min-line\\\">{{triggerValue}}</span>\\n        }\\n      </span>\\n    }\\n  </div>\\n\\n  <div class=\\\"mat-mdc-select-arrow-wrapper\\\">\\n    <div class=\\\"mat-mdc-select-arrow\\\">\\n      <!-- Use an inline SVG, because it works better than a CSS triangle in high contrast mode. -->\\n      <svg viewBox=\\\"0 0 24 24\\\" width=\\\"24px\\\" height=\\\"24px\\\" focusable=\\\"false\\\" aria-hidden=\\\"true\\\">\\n        <path d=\\\"M7 10l5 5 5-5z\\\"/>\\n      </svg>\\n    </div>\\n  </div>\\n</div>\\n\\n<ng-template\\n  cdk-connected-overlay\\n  cdkConnectedOverlayLockPosition\\n  cdkConnectedOverlayHasBackdrop\\n  cdkConnectedOverlayBackdropClass=\\\"cdk-overlay-transparent-backdrop\\\"\\n  [cdkConnectedOverlayPanelClass]=\\\"_overlayPanelClass\\\"\\n  [cdkConnectedOverlayScrollStrategy]=\\\"_scrollStrategy\\\"\\n  [cdkConnectedOverlayOrigin]=\\\"_preferredOverlayOrigin || fallbackOverlayOrigin\\\"\\n  [cdkConnectedOverlayOpen]=\\\"panelOpen\\\"\\n  [cdkConnectedOverlayPositions]=\\\"_positions\\\"\\n  [cdkConnectedOverlayWidth]=\\\"_overlayWidth\\\"\\n  (backdropClick)=\\\"close()\\\"\\n  (attach)=\\\"_onAttached()\\\"\\n  (detach)=\\\"close()\\\">\\n  <div\\n    #panel\\n    role=\\\"listbox\\\"\\n    tabindex=\\\"-1\\\"\\n    class=\\\"mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open {{ _getPanelTheme() }}\\\"\\n    [attr.id]=\\\"id + '-panel'\\\"\\n    [attr.aria-multiselectable]=\\\"multiple\\\"\\n    [attr.aria-label]=\\\"ariaLabel || null\\\"\\n    [attr.aria-labelledby]=\\\"_getPanelAriaLabelledby()\\\"\\n    [ngClass]=\\\"panelClass\\\"\\n    [@transformPanel]=\\\"'showing'\\\"\\n    (@transformPanel.done)=\\\"_panelDoneAnimatingStream.next($event.toState)\\\"\\n    (keydown)=\\\"_handleKeydown($event)\\\">\\n    <ng-content></ng-content>\\n  </div>\\n</ng-template>\\n\", styles: [\".mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}div.mat-mdc-select-panel .mat-mdc-option{--mdc-list-list-item-container-color: var(--mat-select-panel-background-color)}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:\\\" \\\";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))}\"], dependencies: [{ kind: \"directive\", type: CdkOverlayOrigin, selector: \"[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]\", exportAs: [\"cdkOverlayOrigin\"] }, { kind: \"directive\", type: CdkConnectedOverlay, selector: \"[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]\", inputs: [\"cdkConnectedOverlayOrigin\", \"cdkConnectedOverlayPositions\", \"cdkConnectedOverlayPositionStrategy\", \"cdkConnectedOverlayOffsetX\", \"cdkConnectedOverlayOffsetY\", \"cdkConnectedOverlayWidth\", \"cdkConnectedOverlayHeight\", \"cdkConnectedOverlayMinWidth\", \"cdkConnectedOverlayMinHeight\", \"cdkConnectedOverlayBackdropClass\", \"cdkConnectedOverlayPanelClass\", \"cdkConnectedOverlayViewportMargin\", \"cdkConnectedOverlayScrollStrategy\", \"cdkConnectedOverlayOpen\", \"cdkConnectedOverlayDisableClose\", \"cdkConnectedOverlayTransformOriginOn\", \"cdkConnectedOverlayHasBackdrop\", \"cdkConnectedOverlayLockPosition\", \"cdkConnectedOverlayFlexibleDimensions\", \"cdkConnectedOverlayGrowAfterOpen\", \"cdkConnectedOverlayPush\", \"cdkConnectedOverlayDisposeOnNavigation\"], outputs: [\"backdropClick\", \"positionChange\", \"attach\", \"detach\", \"overlayKeydown\", \"overlayOutsideClick\"], exportAs: [\"cdkConnectedOverlay\"] }, { kind: \"directive\", type: NgClass, selector: \"[ngClass]\", inputs: [\"class\", \"ngClass\"] }], animations: [matSelectAnimations.transformPanel], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSelect, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-select', exportAs: 'matSelect', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {\n                        'role': 'combobox',\n                        'aria-haspopup': 'listbox',\n                        'class': 'mat-mdc-select',\n                        '[attr.id]': 'id',\n                        '[attr.tabindex]': 'disabled ? -1 : tabIndex',\n                        '[attr.aria-controls]': 'panelOpen ? id + \"-panel\" : null',\n                        '[attr.aria-expanded]': 'panelOpen',\n                        '[attr.aria-label]': 'ariaLabel || null',\n                        '[attr.aria-required]': 'required.toString()',\n                        '[attr.aria-disabled]': 'disabled.toString()',\n                        '[attr.aria-invalid]': 'errorState',\n                        '[attr.aria-activedescendant]': '_getAriaActiveDescendant()',\n                        '[class.mat-mdc-select-disabled]': 'disabled',\n                        '[class.mat-mdc-select-invalid]': 'errorState',\n                        '[class.mat-mdc-select-required]': 'required',\n                        '[class.mat-mdc-select-empty]': 'empty',\n                        '[class.mat-mdc-select-multiple]': 'multiple',\n                        '(keydown)': '_handleKeydown($event)',\n                        '(focus)': '_onFocus()',\n                        '(blur)': '_onBlur()',\n                    }, animations: [matSelectAnimations.transformPanel], providers: [\n                        { provide: MatFormFieldControl, useExisting: MatSelect },\n                        { provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatSelect },\n                    ], imports: [CdkOverlayOrigin, CdkConnectedOverlay, NgClass], template: \"<div cdk-overlay-origin\\n     class=\\\"mat-mdc-select-trigger\\\"\\n     (click)=\\\"open()\\\"\\n     #fallbackOverlayOrigin=\\\"cdkOverlayOrigin\\\"\\n     #trigger>\\n\\n  <div class=\\\"mat-mdc-select-value\\\" [attr.id]=\\\"_valueId\\\">\\n    @if (empty) {\\n      <span class=\\\"mat-mdc-select-placeholder mat-mdc-select-min-line\\\">{{placeholder}}</span>\\n    } @else {\\n      <span class=\\\"mat-mdc-select-value-text\\\">\\n        @if (customTrigger) {\\n          <ng-content select=\\\"mat-select-trigger\\\"></ng-content>\\n        } @else {\\n          <span class=\\\"mat-mdc-select-min-line\\\">{{triggerValue}}</span>\\n        }\\n      </span>\\n    }\\n  </div>\\n\\n  <div class=\\\"mat-mdc-select-arrow-wrapper\\\">\\n    <div class=\\\"mat-mdc-select-arrow\\\">\\n      <!-- Use an inline SVG, because it works better than a CSS triangle in high contrast mode. -->\\n      <svg viewBox=\\\"0 0 24 24\\\" width=\\\"24px\\\" height=\\\"24px\\\" focusable=\\\"false\\\" aria-hidden=\\\"true\\\">\\n        <path d=\\\"M7 10l5 5 5-5z\\\"/>\\n      </svg>\\n    </div>\\n  </div>\\n</div>\\n\\n<ng-template\\n  cdk-connected-overlay\\n  cdkConnectedOverlayLockPosition\\n  cdkConnectedOverlayHasBackdrop\\n  cdkConnectedOverlayBackdropClass=\\\"cdk-overlay-transparent-backdrop\\\"\\n  [cdkConnectedOverlayPanelClass]=\\\"_overlayPanelClass\\\"\\n  [cdkConnectedOverlayScrollStrategy]=\\\"_scrollStrategy\\\"\\n  [cdkConnectedOverlayOrigin]=\\\"_preferredOverlayOrigin || fallbackOverlayOrigin\\\"\\n  [cdkConnectedOverlayOpen]=\\\"panelOpen\\\"\\n  [cdkConnectedOverlayPositions]=\\\"_positions\\\"\\n  [cdkConnectedOverlayWidth]=\\\"_overlayWidth\\\"\\n  (backdropClick)=\\\"close()\\\"\\n  (attach)=\\\"_onAttached()\\\"\\n  (detach)=\\\"close()\\\">\\n  <div\\n    #panel\\n    role=\\\"listbox\\\"\\n    tabindex=\\\"-1\\\"\\n    class=\\\"mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open {{ _getPanelTheme() }}\\\"\\n    [attr.id]=\\\"id + '-panel'\\\"\\n    [attr.aria-multiselectable]=\\\"multiple\\\"\\n    [attr.aria-label]=\\\"ariaLabel || null\\\"\\n    [attr.aria-labelledby]=\\\"_getPanelAriaLabelledby()\\\"\\n    [ngClass]=\\\"panelClass\\\"\\n    [@transformPanel]=\\\"'showing'\\\"\\n    (@transformPanel.done)=\\\"_panelDoneAnimatingStream.next($event.toState)\\\"\\n    (keydown)=\\\"_handleKeydown($event)\\\">\\n    <ng-content></ng-content>\\n  </div>\\n</ng-template>\\n\", styles: [\".mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}div.mat-mdc-select-panel .mat-mdc-option{--mdc-list-list-item-container-color: var(--mat-select-panel-background-color)}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:\\\" \\\";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))}\"] }]\n        }], ctorParameters: () => [], propDecorators: { options: [{\n                type: ContentChildren,\n                args: [MatOption, { descendants: true }]\n            }], optionGroups: [{\n                type: ContentChildren,\n                args: [MAT_OPTGROUP, { descendants: true }]\n            }], customTrigger: [{\n                type: ContentChild,\n                args: [MAT_SELECT_TRIGGER]\n            }], userAriaDescribedBy: [{\n                type: Input,\n                args: ['aria-describedby']\n            }], trigger: [{\n                type: ViewChild,\n                args: ['trigger']\n            }], panel: [{\n                type: ViewChild,\n                args: ['panel']\n            }], _overlayDir: [{\n                type: ViewChild,\n                args: [CdkConnectedOverlay]\n            }], panelClass: [{\n                type: Input\n            }], disabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], disableRipple: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], tabIndex: [{\n                type: Input,\n                args: [{\n                        transform: (value) => (value == null ? 0 : numberAttribute(value)),\n                    }]\n            }], hideSingleSelectionIndicator: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], placeholder: [{\n                type: Input\n            }], required: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], multiple: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], disableOptionCentering: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], compareWith: [{\n                type: Input\n            }], value: [{\n                type: Input\n            }], ariaLabel: [{\n                type: Input,\n                args: ['aria-label']\n            }], ariaLabelledby: [{\n                type: Input,\n                args: ['aria-labelledby']\n            }], errorStateMatcher: [{\n                type: Input\n            }], typeaheadDebounceInterval: [{\n                type: Input,\n                args: [{ transform: numberAttribute }]\n            }], sortComparator: [{\n                type: Input\n            }], id: [{\n                type: Input\n            }], panelWidth: [{\n                type: Input\n            }], canSelectNullableOptions: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], openedChange: [{\n                type: Output\n            }], _openedStream: [{\n                type: Output,\n                args: ['opened']\n            }], _closedStream: [{\n                type: Output,\n                args: ['closed']\n            }], selectionChange: [{\n                type: Output\n            }], valueChange: [{\n                type: Output\n            }] } });\n/**\n * Allows the user to customize the trigger that is displayed when the select has a value.\n */\nclass MatSelectTrigger {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSelectTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatSelectTrigger, isStandalone: true, selector: \"mat-select-trigger\", providers: [{ provide: MAT_SELECT_TRIGGER, useExisting: MatSelectTrigger }], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSelectTrigger, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-select-trigger',\n                    providers: [{ provide: MAT_SELECT_TRIGGER, useExisting: MatSelectTrigger }],\n                }]\n        }] });\n\nclass MatSelectModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSelectModule, imports: [OverlayModule, MatOptionModule, MatCommonModule, MatSelect, MatSelectTrigger], exports: [CdkScrollableModule,\n            MatFormFieldModule,\n            MatSelect,\n            MatSelectTrigger,\n            MatOptionModule,\n            MatCommonModule] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSelectModule, providers: [MAT_SELECT_SCROLL_STRATEGY_PROVIDER], imports: [OverlayModule, MatOptionModule, MatCommonModule, CdkScrollableModule,\n            MatFormFieldModule,\n            MatOptionModule,\n            MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatSelectModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [OverlayModule, MatOptionModule, MatCommonModule, MatSelect, MatSelectTrigger],\n                    exports: [\n                        CdkScrollableModule,\n                        MatFormFieldModule,\n                        MatSelect,\n                        MatSelectTrigger,\n                        MatOptionModule,\n                        MatCommonModule,\n                    ],\n                    providers: [MAT_SELECT_SCROLL_STRATEGY_PROVIDER],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_SELECT_CONFIG, MAT_SELECT_SCROLL_STRATEGY, MAT_SELECT_SCROLL_STRATEGY_PROVIDER, MAT_SELECT_SCROLL_STRATEGY_PROVIDER_FACTORY, MAT_SELECT_TRIGGER, MatSelect, MatSelectChange, MatSelectModule, MatSelectTrigger, matSelectAnimations };\n","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nimport { innerFrom } from '../observable/innerFrom';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n    if (subscriptionDelay) {\n        return (source) => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n    }\n    return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n    return operate((source, subscriber) => {\n        source.subscribe(createOperatorSubscriber(subscriber, noop));\n    });\n}\n","import * as i0 from '@angular/core';\nimport { InjectionToken, inject, ChangeDetectorRef, ElementRef, EventEmitter, booleanAttribute, TemplateRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, ContentChildren, Input, Output, Directive, forwardRef, Injector, ViewContainerRef, NgZone, Renderer2, afterNextRender, NgModule } from '@angular/core';\nimport { MAT_OPTION_PARENT_COMPONENT, MatOption, MAT_OPTGROUP, MatOptionSelectionChange, _countGroupLabelsBeforeOption, _getOptionScrollPosition, MatOptionModule, MatCommonModule } from '@angular/material/core';\nexport { MatOptgroup, MatOption } from '@angular/material/core';\nimport { ViewportRuler, CdkScrollableModule } from '@angular/cdk/scrolling';\nimport { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';\nimport { _IdGenerator, ActiveDescendantKeyManager, removeAriaReferencedId, addAriaReferencedId } from '@angular/cdk/a11y';\nimport { Platform, _getEventTarget } from '@angular/cdk/platform';\nimport { trigger, state, style, transition, group, animate } from '@angular/animations';\nimport { Subscription, Subject, merge, of, defer, Observable } from 'rxjs';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { hasModifierKey, ESCAPE, ENTER, UP_ARROW, DOWN_ARROW, TAB } from '@angular/cdk/keycodes';\nimport { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MAT_FORM_FIELD } from '@angular/material/form-field';\nimport { filter, map, startWith, switchMap, tap, delay, take } from 'rxjs/operators';\n\n// Animation values come from\n// TODO(mmalerba): Ideally find a way to import the values from MDC's code.\nconst panelAnimation = trigger('panelAnimation', [\n    state('void, hidden', style({\n        opacity: 0,\n        transform: 'scaleY(0.8)',\n    })),\n    transition(':enter, hidden => visible', [\n        group([\n            animate('0.03s linear', style({ opacity: 1 })),\n            animate('0.12s cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scaleY(1)' })),\n        ]),\n    ]),\n    transition(':leave, visible => hidden', [animate('0.075s linear', style({ opacity: 0 }))]),\n]);\n\n/** Event object that is emitted when an autocomplete option is selected. */\nclass MatAutocompleteSelectedEvent {\n    source;\n    option;\n    constructor(\n    /** Reference to the autocomplete panel that emitted the event. */\n    source, \n    /** Option that was selected. */\n    option) {\n        this.source = source;\n        this.option = option;\n    }\n}\n/** Injection token to be used to override the default options for `mat-autocomplete`. */\nconst MAT_AUTOCOMPLETE_DEFAULT_OPTIONS = new InjectionToken('mat-autocomplete-default-options', {\n    providedIn: 'root',\n    factory: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {\n    return {\n        autoActiveFirstOption: false,\n        autoSelectActiveOption: false,\n        hideSingleSelectionIndicator: false,\n        requireSelection: false,\n    };\n}\n/** Autocomplete component. */\nclass MatAutocomplete {\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _elementRef = inject(ElementRef);\n    _defaults = inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS);\n    _activeOptionChanges = Subscription.EMPTY;\n    /** Emits when the panel animation is done. Null if the panel doesn't animate. */\n    _animationDone = new EventEmitter();\n    /** Manages active item in option list based on key events. */\n    _keyManager;\n    /** Whether the autocomplete panel should be visible, depending on option length. */\n    showPanel = false;\n    /** Whether the autocomplete panel is open. */\n    get isOpen() {\n        return this._isOpen && this.showPanel;\n    }\n    _isOpen = false;\n    /** Latest trigger that opened the autocomplete. */\n    _latestOpeningTrigger;\n    /** @docs-private Sets the theme color of the panel. */\n    _setColor(value) {\n        this._color = value;\n        this._changeDetectorRef.markForCheck();\n    }\n    /** @docs-private theme color of the panel */\n    _color;\n    // The @ViewChild query for TemplateRef here needs to be static because some code paths\n    // lead to the overlay being created before change detection has finished for this component.\n    // Notably, another component may trigger `focus` on the autocomplete-trigger.\n    /** @docs-private */\n    template;\n    /** Element for the panel containing the autocomplete options. */\n    panel;\n    /** Reference to all options within the autocomplete. */\n    options;\n    /** Reference to all option groups within the autocomplete. */\n    optionGroups;\n    /** Aria label of the autocomplete. */\n    ariaLabel;\n    /** Input that can be used to specify the `aria-labelledby` attribute. */\n    ariaLabelledby;\n    /** Function that maps an option's control value to its display value in the trigger. */\n    displayWith = null;\n    /**\n     * Whether the first option should be highlighted when the autocomplete panel is opened.\n     * Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.\n     */\n    autoActiveFirstOption;\n    /** Whether the active option should be selected as the user is navigating. */\n    autoSelectActiveOption;\n    /**\n     * Whether the user is required to make a selection when they're interacting with the\n     * autocomplete. If the user moves away from the autocomplete without selecting an option from\n     * the list, the value will be reset. If the user opens the panel and closes it without\n     * interacting or selecting a value, the initial value will be kept.\n     */\n    requireSelection;\n    /**\n     * Specify the width of the autocomplete panel.  Can be any CSS sizing value, otherwise it will\n     * match the width of its host.\n     */\n    panelWidth;\n    /** Whether ripples are disabled within the autocomplete panel. */\n    disableRipple;\n    /** Event that is emitted whenever an option from the list is selected. */\n    optionSelected = new EventEmitter();\n    /** Event that is emitted when the autocomplete panel is opened. */\n    opened = new EventEmitter();\n    /** Event that is emitted when the autocomplete panel is closed. */\n    closed = new EventEmitter();\n    /** Emits whenever an option is activated. */\n    optionActivated = new EventEmitter();\n    /**\n     * Takes classes set on the host mat-autocomplete element and applies them to the panel\n     * inside the overlay container to allow for easy styling.\n     */\n    set classList(value) {\n        this._classList = value;\n        this._elementRef.nativeElement.className = '';\n    }\n    _classList;\n    /** Whether checkmark indicator for single-selection options is hidden. */\n    get hideSingleSelectionIndicator() {\n        return this._hideSingleSelectionIndicator;\n    }\n    set hideSingleSelectionIndicator(value) {\n        this._hideSingleSelectionIndicator = value;\n        this._syncParentProperties();\n    }\n    _hideSingleSelectionIndicator;\n    /** Syncs the parent state with the individual options. */\n    _syncParentProperties() {\n        if (this.options) {\n            for (const option of this.options) {\n                option._changeDetectorRef.markForCheck();\n            }\n        }\n    }\n    /** Unique ID to be used by autocomplete trigger's \"aria-owns\" property. */\n    id = inject(_IdGenerator).getId('mat-autocomplete-');\n    /**\n     * Tells any descendant `mat-optgroup` to use the inert a11y pattern.\n     * @docs-private\n     */\n    inertGroups;\n    constructor() {\n        const platform = inject(Platform);\n        // TODO(crisbeto): the problem that the `inertGroups` option resolves is only present on\n        // Safari using VoiceOver. We should occasionally check back to see whether the bug\n        // wasn't resolved in VoiceOver, and if it has, we can remove this and the `inertGroups`\n        // option altogether.\n        this.inertGroups = platform?.SAFARI || false;\n        this.autoActiveFirstOption = !!this._defaults.autoActiveFirstOption;\n        this.autoSelectActiveOption = !!this._defaults.autoSelectActiveOption;\n        this.requireSelection = !!this._defaults.requireSelection;\n        this._hideSingleSelectionIndicator = this._defaults.hideSingleSelectionIndicator ?? false;\n    }\n    ngAfterContentInit() {\n        this._keyManager = new ActiveDescendantKeyManager(this.options)\n            .withWrap()\n            .skipPredicate(this._skipPredicate);\n        this._activeOptionChanges = this._keyManager.change.subscribe(index => {\n            if (this.isOpen) {\n                this.optionActivated.emit({ source: this, option: this.options.toArray()[index] || null });\n            }\n        });\n        // Set the initial visibility state.\n        this._setVisibility();\n    }\n    ngOnDestroy() {\n        this._keyManager?.destroy();\n        this._activeOptionChanges.unsubscribe();\n        this._animationDone.complete();\n    }\n    /**\n     * Sets the panel scrollTop. This allows us to manually scroll to display options\n     * above or below the fold, as they are not actually being focused when active.\n     */\n    _setScrollTop(scrollTop) {\n        if (this.panel) {\n            this.panel.nativeElement.scrollTop = scrollTop;\n        }\n    }\n    /** Returns the panel's scrollTop. */\n    _getScrollTop() {\n        return this.panel ? this.panel.nativeElement.scrollTop : 0;\n    }\n    /** Panel should hide itself when the option list is empty. */\n    _setVisibility() {\n        this.showPanel = !!this.options.length;\n        this._changeDetectorRef.markForCheck();\n    }\n    /** Emits the `select` event. */\n    _emitSelectEvent(option) {\n        const event = new MatAutocompleteSelectedEvent(this, option);\n        this.optionSelected.emit(event);\n    }\n    /** Gets the aria-labelledby for the autocomplete panel. */\n    _getPanelAriaLabelledby(labelId) {\n        if (this.ariaLabel) {\n            return null;\n        }\n        const labelExpression = labelId ? labelId + ' ' : '';\n        return this.ariaLabelledby ? labelExpression + this.ariaLabelledby : labelId;\n    }\n    // `skipPredicate` determines if key manager should avoid putting a given option in the tab\n    // order. Allow disabled list items to receive focus via keyboard to align with WAI ARIA\n    // recommendation.\n    //\n    // Normally WAI ARIA's instructions are to exclude disabled items from the tab order, but it\n    // makes a few exceptions for compound widgets.\n    //\n    // From [Developing a Keyboard Interface](\n    // https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/):\n    //   \"For the following composite widget elements, keep them focusable when disabled: Options in a\n    //   Listbox...\"\n    //\n    // The user can focus disabled options using the keyboard, but the user cannot click disabled\n    // options.\n    _skipPredicate() {\n        return false;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAutocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatAutocomplete, isStandalone: true, selector: \"mat-autocomplete\", inputs: { ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], displayWith: \"displayWith\", autoActiveFirstOption: [\"autoActiveFirstOption\", \"autoActiveFirstOption\", booleanAttribute], autoSelectActiveOption: [\"autoSelectActiveOption\", \"autoSelectActiveOption\", booleanAttribute], requireSelection: [\"requireSelection\", \"requireSelection\", booleanAttribute], panelWidth: \"panelWidth\", disableRipple: [\"disableRipple\", \"disableRipple\", booleanAttribute], classList: [\"class\", \"classList\"], hideSingleSelectionIndicator: [\"hideSingleSelectionIndicator\", \"hideSingleSelectionIndicator\", booleanAttribute] }, outputs: { optionSelected: \"optionSelected\", opened: \"opened\", closed: \"closed\", optionActivated: \"optionActivated\" }, host: { classAttribute: \"mat-mdc-autocomplete\" }, providers: [{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete }], queries: [{ propertyName: \"options\", predicate: MatOption, descendants: true }, { propertyName: \"optionGroups\", predicate: MAT_OPTGROUP, descendants: true }], viewQueries: [{ propertyName: \"template\", first: true, predicate: TemplateRef, descendants: true, static: true }, { propertyName: \"panel\", first: true, predicate: [\"panel\"], descendants: true }], exportAs: [\"matAutocomplete\"], ngImport: i0, template: \"<ng-template let-formFieldId=\\\"id\\\">\\n  <div\\n    class=\\\"mat-mdc-autocomplete-panel mdc-menu-surface mdc-menu-surface--open\\\"\\n    role=\\\"listbox\\\"\\n    [id]=\\\"id\\\"\\n    [class]=\\\"_classList\\\"\\n    [class.mat-mdc-autocomplete-visible]=\\\"showPanel\\\"\\n    [class.mat-mdc-autocomplete-hidden]=\\\"!showPanel\\\"\\n    [class.mat-primary]=\\\"_color === 'primary'\\\"\\n    [class.mat-accent]=\\\"_color === 'accent'\\\"\\n    [class.mat-warn]=\\\"_color === 'warn'\\\"\\n    [attr.aria-label]=\\\"ariaLabel || null\\\"\\n    [attr.aria-labelledby]=\\\"_getPanelAriaLabelledby(formFieldId)\\\"\\n    [@panelAnimation]=\\\"isOpen ? 'visible' : 'hidden'\\\"\\n    (@panelAnimation.done)=\\\"_animationDone.next($event)\\\"\\n    #panel>\\n    <ng-content></ng-content>\\n  </div>\\n</ng-template>\\n\", styles: [\"div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}\"], animations: [panelAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAutocomplete, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-autocomplete', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'matAutocomplete', host: {\n                        'class': 'mat-mdc-autocomplete',\n                    }, providers: [{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete }], animations: [panelAnimation], template: \"<ng-template let-formFieldId=\\\"id\\\">\\n  <div\\n    class=\\\"mat-mdc-autocomplete-panel mdc-menu-surface mdc-menu-surface--open\\\"\\n    role=\\\"listbox\\\"\\n    [id]=\\\"id\\\"\\n    [class]=\\\"_classList\\\"\\n    [class.mat-mdc-autocomplete-visible]=\\\"showPanel\\\"\\n    [class.mat-mdc-autocomplete-hidden]=\\\"!showPanel\\\"\\n    [class.mat-primary]=\\\"_color === 'primary'\\\"\\n    [class.mat-accent]=\\\"_color === 'accent'\\\"\\n    [class.mat-warn]=\\\"_color === 'warn'\\\"\\n    [attr.aria-label]=\\\"ariaLabel || null\\\"\\n    [attr.aria-labelledby]=\\\"_getPanelAriaLabelledby(formFieldId)\\\"\\n    [@panelAnimation]=\\\"isOpen ? 'visible' : 'hidden'\\\"\\n    (@panelAnimation.done)=\\\"_animationDone.next($event)\\\"\\n    #panel>\\n    <ng-content></ng-content>\\n  </div>\\n</ng-template>\\n\", styles: [\"div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}\"] }]\n        }], ctorParameters: () => [], propDecorators: { template: [{\n                type: ViewChild,\n                args: [TemplateRef, { static: true }]\n            }], panel: [{\n                type: ViewChild,\n                args: ['panel']\n            }], options: [{\n                type: ContentChildren,\n                args: [MatOption, { descendants: true }]\n            }], optionGroups: [{\n                type: ContentChildren,\n                args: [MAT_OPTGROUP, { descendants: true }]\n            }], ariaLabel: [{\n                type: Input,\n                args: ['aria-label']\n            }], ariaLabelledby: [{\n                type: Input,\n                args: ['aria-labelledby']\n            }], displayWith: [{\n                type: Input\n            }], autoActiveFirstOption: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], autoSelectActiveOption: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], requireSelection: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], panelWidth: [{\n                type: Input\n            }], disableRipple: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], optionSelected: [{\n                type: Output\n            }], opened: [{\n                type: Output\n            }], closed: [{\n                type: Output\n            }], optionActivated: [{\n                type: Output\n            }], classList: [{\n                type: Input,\n                args: ['class']\n            }], hideSingleSelectionIndicator: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }] } });\n\n/**\n * Directive applied to an element to make it usable\n * as a connection point for an autocomplete panel.\n */\nclass MatAutocompleteOrigin {\n    elementRef = inject(ElementRef);\n    constructor() { }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAutocompleteOrigin, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatAutocompleteOrigin, isStandalone: true, selector: \"[matAutocompleteOrigin]\", exportAs: [\"matAutocompleteOrigin\"], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAutocompleteOrigin, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matAutocompleteOrigin]',\n                    exportAs: 'matAutocompleteOrigin',\n                }]\n        }], ctorParameters: () => [] });\n\n/**\n * Provider that allows the autocomplete to register as a ControlValueAccessor.\n * @docs-private\n */\nconst MAT_AUTOCOMPLETE_VALUE_ACCESSOR = {\n    provide: NG_VALUE_ACCESSOR,\n    useExisting: forwardRef(() => MatAutocompleteTrigger),\n    multi: true,\n};\n/**\n * Creates an error to be thrown when attempting to use an autocomplete trigger without a panel.\n * @docs-private\n */\nfunction getMatAutocompleteMissingPanelError() {\n    return Error('Attempting to open an undefined instance of `mat-autocomplete`. ' +\n        'Make sure that the id passed to the `matAutocomplete` is correct and that ' +\n        \"you're attempting to open it after the ngAfterContentInit hook.\");\n}\n/** Injection token that determines the scroll handling while the autocomplete panel is open. */\nconst MAT_AUTOCOMPLETE_SCROLL_STRATEGY = new InjectionToken('mat-autocomplete-scroll-strategy', {\n    providedIn: 'root',\n    factory: () => {\n        const overlay = inject(Overlay);\n        return () => overlay.scrollStrategies.reposition();\n    },\n});\n/** @docs-private */\nfunction MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(overlay) {\n    return () => overlay.scrollStrategies.reposition();\n}\n/** @docs-private */\nconst MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n    provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY,\n    deps: [Overlay],\n    useFactory: MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY,\n};\n/** Base class with all of the `MatAutocompleteTrigger` functionality. */\nclass MatAutocompleteTrigger {\n    _injector = inject(Injector);\n    _element = inject(ElementRef);\n    _overlay = inject(Overlay);\n    _viewContainerRef = inject(ViewContainerRef);\n    _zone = inject(NgZone);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _dir = inject(Directionality, { optional: true });\n    _formField = inject(MAT_FORM_FIELD, { optional: true, host: true });\n    _document = inject(DOCUMENT);\n    _viewportRuler = inject(ViewportRuler);\n    _scrollStrategy = inject(MAT_AUTOCOMPLETE_SCROLL_STRATEGY);\n    _renderer = inject(Renderer2);\n    _defaults = inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, { optional: true });\n    _overlayRef;\n    _portal;\n    _componentDestroyed = false;\n    _initialized = new Subject();\n    _keydownSubscription;\n    _outsideClickSubscription;\n    _cleanupWindowBlur;\n    /** Old value of the native input. Used to work around issues with the `input` event on IE. */\n    _previousValue;\n    /** Value of the input element when the panel was attached (even if there are no options). */\n    _valueOnAttach;\n    /** Value on the previous keydown event. */\n    _valueOnLastKeydown;\n    /** Strategy that is used to position the panel. */\n    _positionStrategy;\n    /** Whether or not the label state is being overridden. */\n    _manuallyFloatingLabel = false;\n    /** The subscription for closing actions (some are bound to document). */\n    _closingActionsSubscription;\n    /** Subscription to viewport size changes. */\n    _viewportSubscription = Subscription.EMPTY;\n    /** Implements BreakpointObserver to be used to detect handset landscape */\n    _breakpointObserver = inject(BreakpointObserver);\n    _handsetLandscapeSubscription = Subscription.EMPTY;\n    /**\n     * Whether the autocomplete can open the next time it is focused. Used to prevent a focused,\n     * closed autocomplete from being reopened if the user switches to another browser tab and then\n     * comes back.\n     */\n    _canOpenOnNextFocus = true;\n    /** Value inside the input before we auto-selected an option. */\n    _valueBeforeAutoSelection;\n    /**\n     * Current option that we have auto-selected as the user is navigating,\n     * but which hasn't been propagated to the model value yet.\n     */\n    _pendingAutoselectedOption;\n    /** Stream of keyboard events that can close the panel. */\n    _closeKeyEventStream = new Subject();\n    /**\n     * Event handler for when the window is blurred. Needs to be an\n     * arrow function in order to preserve the context.\n     */\n    _windowBlurHandler = () => {\n        // If the user blurred the window while the autocomplete is focused, it means that it'll be\n        // refocused when they come back. In this case we want to skip the first focus event, if the\n        // pane was closed, in order to avoid reopening it unintentionally.\n        this._canOpenOnNextFocus =\n            this._document.activeElement !== this._element.nativeElement || this.panelOpen;\n    };\n    /** `View -> model callback called when value changes` */\n    _onChange = () => { };\n    /** `View -> model callback called when autocomplete has been touched` */\n    _onTouched = () => { };\n    /** The autocomplete panel to be attached to this trigger. */\n    autocomplete;\n    /**\n     * Position of the autocomplete panel relative to the trigger element. A position of `auto`\n     * will render the panel underneath the trigger if there is enough space for it to fit in\n     * the viewport, otherwise the panel will be shown above it. If the position is set to\n     * `above` or `below`, the panel will always be shown above or below the trigger. no matter\n     * whether it fits completely in the viewport.\n     */\n    position = 'auto';\n    /**\n     * Reference relative to which to position the autocomplete panel.\n     * Defaults to the autocomplete trigger element.\n     */\n    connectedTo;\n    /**\n     * `autocomplete` attribute to be set on the input element.\n     * @docs-private\n     */\n    autocompleteAttribute = 'off';\n    /**\n     * Whether the autocomplete is disabled. When disabled, the element will\n     * act as a regular input and the user won't be able to open the panel.\n     */\n    autocompleteDisabled;\n    constructor() { }\n    /** Class to apply to the panel when it's above the input. */\n    _aboveClass = 'mat-mdc-autocomplete-panel-above';\n    ngAfterViewInit() {\n        this._initialized.next();\n        this._initialized.complete();\n        this._cleanupWindowBlur = this._renderer.listen('window', 'blur', this._windowBlurHandler);\n    }\n    ngOnChanges(changes) {\n        if (changes['position'] && this._positionStrategy) {\n            this._setStrategyPositions(this._positionStrategy);\n            if (this.panelOpen) {\n                this._overlayRef.updatePosition();\n            }\n        }\n    }\n    ngOnDestroy() {\n        this._cleanupWindowBlur?.();\n        this._handsetLandscapeSubscription.unsubscribe();\n        this._viewportSubscription.unsubscribe();\n        this._componentDestroyed = true;\n        this._destroyPanel();\n        this._closeKeyEventStream.complete();\n        this._clearFromModal();\n    }\n    /** Whether or not the autocomplete panel is open. */\n    get panelOpen() {\n        return this._overlayAttached && this.autocomplete.showPanel;\n    }\n    _overlayAttached = false;\n    /** Opens the autocomplete suggestion panel. */\n    openPanel() {\n        this._openPanelInternal();\n    }\n    /** Closes the autocomplete suggestion panel. */\n    closePanel() {\n        this._resetLabel();\n        if (!this._overlayAttached) {\n            return;\n        }\n        if (this.panelOpen) {\n            // Only emit if the panel was visible.\n            // `afterNextRender` always runs outside of the Angular zone, so all the subscriptions from\n            // `_subscribeToClosingActions()` are also outside of the Angular zone.\n            // We should manually run in Angular zone to update UI after panel closing.\n            this._zone.run(() => {\n                this.autocomplete.closed.emit();\n            });\n        }\n        // Only reset if this trigger is the latest one that opened the\n        // autocomplete since another may have taken it over.\n        if (this.autocomplete._latestOpeningTrigger === this) {\n            this.autocomplete._isOpen = false;\n            this.autocomplete._latestOpeningTrigger = null;\n        }\n        this._overlayAttached = false;\n        this._pendingAutoselectedOption = null;\n        if (this._overlayRef && this._overlayRef.hasAttached()) {\n            this._overlayRef.detach();\n            this._closingActionsSubscription.unsubscribe();\n        }\n        this._updatePanelState();\n        // Note that in some cases this can end up being called after the component is destroyed.\n        // Add a check to ensure that we don't try to run change detection on a destroyed view.\n        if (!this._componentDestroyed) {\n            // We need to trigger change detection manually, because\n            // `fromEvent` doesn't seem to do it at the proper time.\n            // This ensures that the label is reset when the\n            // user clicks outside.\n            this._changeDetectorRef.detectChanges();\n        }\n        // Remove aria-owns attribute when the autocomplete is no longer visible.\n        if (this._trackedModal) {\n            removeAriaReferencedId(this._trackedModal, 'aria-owns', this.autocomplete.id);\n        }\n    }\n    /**\n     * Updates the position of the autocomplete suggestion panel to ensure that it fits all options\n     * within the viewport.\n     */\n    updatePosition() {\n        if (this._overlayAttached) {\n            this._overlayRef.updatePosition();\n        }\n    }\n    /**\n     * A stream of actions that should close the autocomplete panel, including\n     * when an option is selected, on blur, and when TAB is pressed.\n     */\n    get panelClosingActions() {\n        return merge(this.optionSelections, this.autocomplete._keyManager.tabOut.pipe(filter(() => this._overlayAttached)), this._closeKeyEventStream, this._getOutsideClickStream(), this._overlayRef\n            ? this._overlayRef.detachments().pipe(filter(() => this._overlayAttached))\n            : of()).pipe(\n        // Normalize the output so we return a consistent type.\n        map(event => (event instanceof MatOptionSelectionChange ? event : null)));\n    }\n    /** Stream of changes to the selection state of the autocomplete options. */\n    optionSelections = defer(() => {\n        const options = this.autocomplete ? this.autocomplete.options : null;\n        if (options) {\n            return options.changes.pipe(startWith(options), switchMap(() => merge(...options.map(option => option.onSelectionChange))));\n        }\n        // If there are any subscribers before `ngAfterViewInit`, the `autocomplete` will be undefined.\n        // Return a stream that we'll replace with the real one once everything is in place.\n        return this._initialized.pipe(switchMap(() => this.optionSelections));\n    });\n    /** The currently active option, coerced to MatOption type. */\n    get activeOption() {\n        if (this.autocomplete && this.autocomplete._keyManager) {\n            return this.autocomplete._keyManager.activeItem;\n        }\n        return null;\n    }\n    /** Stream of clicks outside of the autocomplete panel. */\n    _getOutsideClickStream() {\n        return new Observable(observer => {\n            const listener = (event) => {\n                // If we're in the Shadow DOM, the event target will be the shadow root, so we have to\n                // fall back to check the first element in the path of the click event.\n                const clickTarget = _getEventTarget(event);\n                const formField = this._formField\n                    ? this._formField.getConnectedOverlayOrigin().nativeElement\n                    : null;\n                const customOrigin = this.connectedTo ? this.connectedTo.elementRef.nativeElement : null;\n                if (this._overlayAttached &&\n                    clickTarget !== this._element.nativeElement &&\n                    // Normally focus moves inside `mousedown` so this condition will almost always be\n                    // true. Its main purpose is to handle the case where the input is focused from an\n                    // outside click which propagates up to the `body` listener within the same sequence\n                    // and causes the panel to close immediately (see #3106).\n                    this._document.activeElement !== this._element.nativeElement &&\n                    (!formField || !formField.contains(clickTarget)) &&\n                    (!customOrigin || !customOrigin.contains(clickTarget)) &&\n                    !!this._overlayRef &&\n                    !this._overlayRef.overlayElement.contains(clickTarget)) {\n                    observer.next(event);\n                }\n            };\n            const cleanups = [\n                this._renderer.listen('document', 'click', listener),\n                this._renderer.listen('document', 'auxclick', listener),\n                this._renderer.listen('document', 'touchend', listener),\n            ];\n            return () => {\n                cleanups.forEach(current => current());\n            };\n        });\n    }\n    // Implemented as part of ControlValueAccessor.\n    writeValue(value) {\n        Promise.resolve(null).then(() => this._assignOptionValue(value));\n    }\n    // Implemented as part of ControlValueAccessor.\n    registerOnChange(fn) {\n        this._onChange = fn;\n    }\n    // Implemented as part of ControlValueAccessor.\n    registerOnTouched(fn) {\n        this._onTouched = fn;\n    }\n    // Implemented as part of ControlValueAccessor.\n    setDisabledState(isDisabled) {\n        this._element.nativeElement.disabled = isDisabled;\n    }\n    _handleKeydown(event) {\n        const keyCode = event.keyCode;\n        const hasModifier = hasModifierKey(event);\n        // Prevent the default action on all escape key presses. This is here primarily to bring IE\n        // in line with other browsers. By default, pressing escape on IE will cause it to revert\n        // the input value to the one that it had on focus, however it won't dispatch any events\n        // which means that the model value will be out of sync with the view.\n        if (keyCode === ESCAPE && !hasModifier) {\n            event.preventDefault();\n        }\n        this._valueOnLastKeydown = this._element.nativeElement.value;\n        if (this.activeOption && keyCode === ENTER && this.panelOpen && !hasModifier) {\n            this.activeOption._selectViaInteraction();\n            this._resetActiveItem();\n            event.preventDefault();\n        }\n        else if (this.autocomplete) {\n            const prevActiveItem = this.autocomplete._keyManager.activeItem;\n            const isArrowKey = keyCode === UP_ARROW || keyCode === DOWN_ARROW;\n            if (keyCode === TAB || (isArrowKey && !hasModifier && this.panelOpen)) {\n                this.autocomplete._keyManager.onKeydown(event);\n            }\n            else if (isArrowKey && this._canOpen()) {\n                this._openPanelInternal(this._valueOnLastKeydown);\n            }\n            if (isArrowKey || this.autocomplete._keyManager.activeItem !== prevActiveItem) {\n                this._scrollToOption(this.autocomplete._keyManager.activeItemIndex || 0);\n                if (this.autocomplete.autoSelectActiveOption && this.activeOption) {\n                    if (!this._pendingAutoselectedOption) {\n                        this._valueBeforeAutoSelection = this._valueOnLastKeydown;\n                    }\n                    this._pendingAutoselectedOption = this.activeOption;\n                    this._assignOptionValue(this.activeOption.value);\n                }\n            }\n        }\n    }\n    _handleInput(event) {\n        let target = event.target;\n        let value = target.value;\n        // Based on `NumberValueAccessor` from forms.\n        if (target.type === 'number') {\n            value = value == '' ? null : parseFloat(value);\n        }\n        // If the input has a placeholder, IE will fire the `input` event on page load,\n        // focus and blur, in addition to when the user actually changed the value. To\n        // filter out all of the extra events, we save the value on focus and between\n        // `input` events, and we check whether it changed.\n        // See: https://connect.microsoft.com/IE/feedback/details/885747/\n        if (this._previousValue !== value) {\n            this._previousValue = value;\n            this._pendingAutoselectedOption = null;\n            // If selection is required we don't write to the CVA while the user is typing.\n            // At the end of the selection either the user will have picked something\n            // or we'll reset the value back to null.\n            if (!this.autocomplete || !this.autocomplete.requireSelection) {\n                this._onChange(value);\n            }\n            if (!value) {\n                this._clearPreviousSelectedOption(null, false);\n            }\n            else if (this.panelOpen && !this.autocomplete.requireSelection) {\n                // Note that we don't reset this when `requireSelection` is enabled,\n                // because the option will be reset when the panel is closed.\n                const selectedOption = this.autocomplete.options?.find(option => option.selected);\n                if (selectedOption) {\n                    const display = this._getDisplayValue(selectedOption.value);\n                    if (value !== display) {\n                        selectedOption.deselect(false);\n                    }\n                }\n            }\n            if (this._canOpen() && this._document.activeElement === event.target) {\n                // When the `input` event fires, the input's value will have already changed. This means\n                // that if we take the `this._element.nativeElement.value` directly, it'll be one keystroke\n                // behind. This can be a problem when the user selects a value, changes a character while\n                // the input still has focus and then clicks away (see #28432). To work around it, we\n                // capture the value in `keydown` so we can use it here.\n                const valueOnAttach = this._valueOnLastKeydown ?? this._element.nativeElement.value;\n                this._valueOnLastKeydown = null;\n                this._openPanelInternal(valueOnAttach);\n            }\n        }\n    }\n    _handleFocus() {\n        if (!this._canOpenOnNextFocus) {\n            this._canOpenOnNextFocus = true;\n        }\n        else if (this._canOpen()) {\n            this._previousValue = this._element.nativeElement.value;\n            this._attachOverlay(this._previousValue);\n            this._floatLabel(true);\n        }\n    }\n    _handleClick() {\n        if (this._canOpen() && !this.panelOpen) {\n            this._openPanelInternal();\n        }\n    }\n    /**\n     * In \"auto\" mode, the label will animate down as soon as focus is lost.\n     * This causes the value to jump when selecting an option with the mouse.\n     * This method manually floats the label until the panel can be closed.\n     * @param shouldAnimate Whether the label should be animated when it is floated.\n     */\n    _floatLabel(shouldAnimate = false) {\n        if (this._formField && this._formField.floatLabel === 'auto') {\n            if (shouldAnimate) {\n                this._formField._animateAndLockLabel();\n            }\n            else {\n                this._formField.floatLabel = 'always';\n            }\n            this._manuallyFloatingLabel = true;\n        }\n    }\n    /** If the label has been manually elevated, return it to its normal state. */\n    _resetLabel() {\n        if (this._manuallyFloatingLabel) {\n            if (this._formField) {\n                this._formField.floatLabel = 'auto';\n            }\n            this._manuallyFloatingLabel = false;\n        }\n    }\n    /**\n     * This method listens to a stream of panel closing actions and resets the\n     * stream every time the option list changes.\n     */\n    _subscribeToClosingActions() {\n        const initialRender = new Observable(subscriber => {\n            afterNextRender(() => {\n                subscriber.next();\n            }, { injector: this._injector });\n        });\n        const optionChanges = this.autocomplete.options.changes.pipe(tap(() => this._positionStrategy.reapplyLastPosition()), \n        // Defer emitting to the stream until the next tick, because changing\n        // bindings in here will cause \"changed after checked\" errors.\n        delay(0));\n        // When the options are initially rendered, and when the option list changes...\n        return (merge(initialRender, optionChanges)\n            .pipe(\n        // create a new stream of panelClosingActions, replacing any previous streams\n        // that were created, and flatten it so our stream only emits closing events...\n        switchMap(() => this._zone.run(() => {\n            // `afterNextRender` always runs outside of the Angular zone, thus we have to re-enter\n            // the Angular zone. This will lead to change detection being called outside of the Angular\n            // zone and the `autocomplete.opened` will also emit outside of the Angular.\n            const wasOpen = this.panelOpen;\n            this._resetActiveItem();\n            this._updatePanelState();\n            this._changeDetectorRef.detectChanges();\n            if (this.panelOpen) {\n                this._overlayRef.updatePosition();\n            }\n            if (wasOpen !== this.panelOpen) {\n                // If the `panelOpen` state changed, we need to make sure to emit the `opened` or\n                // `closed` event, because we may not have emitted it. This can happen\n                // - if the users opens the panel and there are no options, but the\n                //   options come in slightly later or as a result of the value changing,\n                // - if the panel is closed after the user entered a string that did not match any\n                //   of the available options,\n                // - if a valid string is entered after an invalid one.\n                if (this.panelOpen) {\n                    this._emitOpened();\n                }\n                else {\n                    this.autocomplete.closed.emit();\n                }\n            }\n            return this.panelClosingActions;\n        })), \n        // when the first closing event occurs...\n        take(1))\n            // set the value, close the panel, and complete.\n            .subscribe(event => this._setValueAndClose(event)));\n    }\n    /**\n     * Emits the opened event once it's known that the panel will be shown and stores\n     * the state of the trigger right before the opening sequence was finished.\n     */\n    _emitOpened() {\n        this.autocomplete.opened.emit();\n    }\n    /** Destroys the autocomplete suggestion panel. */\n    _destroyPanel() {\n        if (this._overlayRef) {\n            this.closePanel();\n            this._overlayRef.dispose();\n            this._overlayRef = null;\n        }\n    }\n    /** Given a value, returns the string that should be shown within the input. */\n    _getDisplayValue(value) {\n        const autocomplete = this.autocomplete;\n        return autocomplete && autocomplete.displayWith ? autocomplete.displayWith(value) : value;\n    }\n    _assignOptionValue(value) {\n        const toDisplay = this._getDisplayValue(value);\n        if (value == null) {\n            this._clearPreviousSelectedOption(null, false);\n        }\n        // Simply falling back to an empty string if the display value is falsy does not work properly.\n        // The display value can also be the number zero and shouldn't fall back to an empty string.\n        this._updateNativeInputValue(toDisplay != null ? toDisplay : '');\n    }\n    _updateNativeInputValue(value) {\n        // If it's used within a `MatFormField`, we should set it through the property so it can go\n        // through change detection.\n        if (this._formField) {\n            this._formField._control.value = value;\n        }\n        else {\n            this._element.nativeElement.value = value;\n        }\n        this._previousValue = value;\n    }\n    /**\n     * This method closes the panel, and if a value is specified, also sets the associated\n     * control to that value. It will also mark the control as dirty if this interaction\n     * stemmed from the user.\n     */\n    _setValueAndClose(event) {\n        const panel = this.autocomplete;\n        const toSelect = event ? event.source : this._pendingAutoselectedOption;\n        if (toSelect) {\n            this._clearPreviousSelectedOption(toSelect);\n            this._assignOptionValue(toSelect.value);\n            // TODO(crisbeto): this should wait until the animation is done, otherwise the value\n            // gets reset while the panel is still animating which looks glitchy. It'll likely break\n            // some tests to change it at this point.\n            this._onChange(toSelect.value);\n            panel._emitSelectEvent(toSelect);\n            this._element.nativeElement.focus();\n        }\n        else if (panel.requireSelection &&\n            this._element.nativeElement.value !== this._valueOnAttach) {\n            this._clearPreviousSelectedOption(null);\n            this._assignOptionValue(null);\n            // Wait for the animation to finish before clearing the form control value, otherwise\n            // the options might change while the animation is running which looks glitchy.\n            if (panel._animationDone) {\n                panel._animationDone.pipe(take(1)).subscribe(() => this._onChange(null));\n            }\n            else {\n                this._onChange(null);\n            }\n        }\n        this.closePanel();\n    }\n    /**\n     * Clear any previous selected option and emit a selection change event for this option\n     */\n    _clearPreviousSelectedOption(skip, emitEvent) {\n        // Null checks are necessary here, because the autocomplete\n        // or its options may not have been assigned yet.\n        this.autocomplete?.options?.forEach(option => {\n            if (option !== skip && option.selected) {\n                option.deselect(emitEvent);\n            }\n        });\n    }\n    _openPanelInternal(valueOnAttach = this._element.nativeElement.value) {\n        this._attachOverlay(valueOnAttach);\n        this._floatLabel();\n        // Add aria-owns attribute when the autocomplete becomes visible.\n        if (this._trackedModal) {\n            const panelId = this.autocomplete.id;\n            addAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\n        }\n    }\n    _attachOverlay(valueOnAttach) {\n        if (!this.autocomplete && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getMatAutocompleteMissingPanelError();\n        }\n        let overlayRef = this._overlayRef;\n        if (!overlayRef) {\n            this._portal = new TemplatePortal(this.autocomplete.template, this._viewContainerRef, {\n                id: this._formField?.getLabelId(),\n            });\n            overlayRef = this._overlay.create(this._getOverlayConfig());\n            this._overlayRef = overlayRef;\n            this._viewportSubscription = this._viewportRuler.change().subscribe(() => {\n                if (this.panelOpen && overlayRef) {\n                    overlayRef.updateSize({ width: this._getPanelWidth() });\n                }\n            });\n            // Subscribe to the breakpoint events stream to detect when screen is in\n            // handsetLandscape.\n            this._handsetLandscapeSubscription = this._breakpointObserver\n                .observe(Breakpoints.HandsetLandscape)\n                .subscribe(result => {\n                const isHandsetLandscape = result.matches;\n                // Check if result.matches Breakpoints.HandsetLandscape. Apply HandsetLandscape\n                // settings to prevent overlay cutoff in that breakpoint. Fixes b/284148377\n                if (isHandsetLandscape) {\n                    this._positionStrategy\n                        .withFlexibleDimensions(true)\n                        .withGrowAfterOpen(true)\n                        .withViewportMargin(8);\n                }\n                else {\n                    this._positionStrategy\n                        .withFlexibleDimensions(false)\n                        .withGrowAfterOpen(false)\n                        .withViewportMargin(0);\n                }\n            });\n        }\n        else {\n            // Update the trigger, panel width and direction, in case anything has changed.\n            this._positionStrategy.setOrigin(this._getConnectedElement());\n            overlayRef.updateSize({ width: this._getPanelWidth() });\n        }\n        if (overlayRef && !overlayRef.hasAttached()) {\n            overlayRef.attach(this._portal);\n            this._valueOnAttach = valueOnAttach;\n            this._valueOnLastKeydown = null;\n            this._closingActionsSubscription = this._subscribeToClosingActions();\n        }\n        const wasOpen = this.panelOpen;\n        this.autocomplete._isOpen = this._overlayAttached = true;\n        this.autocomplete._latestOpeningTrigger = this;\n        this.autocomplete._setColor(this._formField?.color);\n        this._updatePanelState();\n        this._applyModalPanelOwnership();\n        // We need to do an extra `panelOpen` check in here, because the\n        // autocomplete won't be shown if there are no options.\n        if (this.panelOpen && wasOpen !== this.panelOpen) {\n            this._emitOpened();\n        }\n    }\n    /** Handles keyboard events coming from the overlay panel. */\n    _handlePanelKeydown = (event) => {\n        // Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines.\n        // See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction\n        if ((event.keyCode === ESCAPE && !hasModifierKey(event)) ||\n            (event.keyCode === UP_ARROW && hasModifierKey(event, 'altKey'))) {\n            // If the user had typed something in before we autoselected an option, and they decided\n            // to cancel the selection, restore the input value to the one they had typed in.\n            if (this._pendingAutoselectedOption) {\n                this._updateNativeInputValue(this._valueBeforeAutoSelection ?? '');\n                this._pendingAutoselectedOption = null;\n            }\n            this._closeKeyEventStream.next();\n            this._resetActiveItem();\n            // We need to stop propagation, otherwise the event will eventually\n            // reach the input itself and cause the overlay to be reopened.\n            event.stopPropagation();\n            event.preventDefault();\n        }\n    };\n    /** Updates the panel's visibility state and any trigger state tied to id. */\n    _updatePanelState() {\n        this.autocomplete._setVisibility();\n        // Note that here we subscribe and unsubscribe based on the panel's visiblity state,\n        // because the act of subscribing will prevent events from reaching other overlays and\n        // we don't want to block the events if there are no options.\n        if (this.panelOpen) {\n            const overlayRef = this._overlayRef;\n            if (!this._keydownSubscription) {\n                // Use the `keydownEvents` in order to take advantage of\n                // the overlay event targeting provided by the CDK overlay.\n                this._keydownSubscription = overlayRef.keydownEvents().subscribe(this._handlePanelKeydown);\n            }\n            if (!this._outsideClickSubscription) {\n                // Subscribe to the pointer events stream so that it doesn't get picked up by other overlays.\n                // TODO(crisbeto): we should switch `_getOutsideClickStream` eventually to use this stream,\n                // but the behvior isn't exactly the same and it ends up breaking some internal tests.\n                this._outsideClickSubscription = overlayRef.outsidePointerEvents().subscribe();\n            }\n        }\n        else {\n            this._keydownSubscription?.unsubscribe();\n            this._outsideClickSubscription?.unsubscribe();\n            this._keydownSubscription = this._outsideClickSubscription = null;\n        }\n    }\n    _getOverlayConfig() {\n        return new OverlayConfig({\n            positionStrategy: this._getOverlayPosition(),\n            scrollStrategy: this._scrollStrategy(),\n            width: this._getPanelWidth(),\n            direction: this._dir ?? undefined,\n            panelClass: this._defaults?.overlayPanelClass,\n        });\n    }\n    _getOverlayPosition() {\n        // Set default Overlay Position\n        const strategy = this._overlay\n            .position()\n            .flexibleConnectedTo(this._getConnectedElement())\n            .withFlexibleDimensions(false)\n            .withPush(false);\n        this._setStrategyPositions(strategy);\n        this._positionStrategy = strategy;\n        return strategy;\n    }\n    /** Sets the positions on a position strategy based on the directive's input state. */\n    _setStrategyPositions(positionStrategy) {\n        // Note that we provide horizontal fallback positions, even though by default the dropdown\n        // width matches the input, because consumers can override the width. See #18854.\n        const belowPositions = [\n            { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n            { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n        ];\n        // The overlay edge connected to the trigger should have squared corners, while\n        // the opposite end has rounded corners. We apply a CSS class to swap the\n        // border-radius based on the overlay position.\n        const panelClass = this._aboveClass;\n        const abovePositions = [\n            { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', panelClass },\n            { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', panelClass },\n        ];\n        let positions;\n        if (this.position === 'above') {\n            positions = abovePositions;\n        }\n        else if (this.position === 'below') {\n            positions = belowPositions;\n        }\n        else {\n            positions = [...belowPositions, ...abovePositions];\n        }\n        positionStrategy.withPositions(positions);\n    }\n    _getConnectedElement() {\n        if (this.connectedTo) {\n            return this.connectedTo.elementRef;\n        }\n        return this._formField ? this._formField.getConnectedOverlayOrigin() : this._element;\n    }\n    _getPanelWidth() {\n        return this.autocomplete.panelWidth || this._getHostWidth();\n    }\n    /** Returns the width of the input element, so the panel width can match it. */\n    _getHostWidth() {\n        return this._getConnectedElement().nativeElement.getBoundingClientRect().width;\n    }\n    /**\n     * Reset the active item to -1. This is so that pressing arrow keys will activate the correct\n     * option.\n     *\n     * If the consumer opted-in to automatically activatating the first option, activate the first\n     * *enabled* option.\n     */\n    _resetActiveItem() {\n        const autocomplete = this.autocomplete;\n        if (autocomplete.autoActiveFirstOption) {\n            // Find the index of the first *enabled* option. Avoid calling `_keyManager.setActiveItem`\n            // because it activates the first option that passes the skip predicate, rather than the\n            // first *enabled* option.\n            let firstEnabledOptionIndex = -1;\n            for (let index = 0; index < autocomplete.options.length; index++) {\n                const option = autocomplete.options.get(index);\n                if (!option.disabled) {\n                    firstEnabledOptionIndex = index;\n                    break;\n                }\n            }\n            autocomplete._keyManager.setActiveItem(firstEnabledOptionIndex);\n        }\n        else {\n            autocomplete._keyManager.setActiveItem(-1);\n        }\n    }\n    /** Determines whether the panel can be opened. */\n    _canOpen() {\n        const element = this._element.nativeElement;\n        return !element.readOnly && !element.disabled && !this.autocompleteDisabled;\n    }\n    /** Scrolls to a particular option in the list. */\n    _scrollToOption(index) {\n        // Given that we are not actually focusing active options, we must manually adjust scroll\n        // to reveal options below the fold. First, we find the offset of the option from the top\n        // of the panel. If that offset is below the fold, the new scrollTop will be the offset -\n        // the panel height + the option height, so the active option will be just visible at the\n        // bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop\n        // will become the offset. If that offset is visible within the panel already, the scrollTop is\n        // not adjusted.\n        const autocomplete = this.autocomplete;\n        const labelCount = _countGroupLabelsBeforeOption(index, autocomplete.options, autocomplete.optionGroups);\n        if (index === 0 && labelCount === 1) {\n            // If we've got one group label before the option and we're at the top option,\n            // scroll the list to the top. This is better UX than scrolling the list to the\n            // top of the option, because it allows the user to read the top group's label.\n            autocomplete._setScrollTop(0);\n        }\n        else if (autocomplete.panel) {\n            const option = autocomplete.options.toArray()[index];\n            if (option) {\n                const element = option._getHostElement();\n                const newScrollPosition = _getOptionScrollPosition(element.offsetTop, element.offsetHeight, autocomplete._getScrollTop(), autocomplete.panel.nativeElement.offsetHeight);\n                autocomplete._setScrollTop(newScrollPosition);\n            }\n        }\n    }\n    /**\n     * Track which modal we have modified the `aria-owns` attribute of. When the combobox trigger is\n     * inside an aria-modal, we apply aria-owns to the parent modal with the `id` of the options\n     * panel. Track the modal we have changed so we can undo the changes on destroy.\n     */\n    _trackedModal = null;\n    /**\n     * If the autocomplete trigger is inside of an `aria-modal` element, connect\n     * that modal to the options panel with `aria-owns`.\n     *\n     * For some browser + screen reader combinations, when navigation is inside\n     * of an `aria-modal` element, the screen reader treats everything outside\n     * of that modal as hidden or invisible.\n     *\n     * This causes a problem when the combobox trigger is _inside_ of a modal, because the\n     * options panel is rendered _outside_ of that modal, preventing screen reader navigation\n     * from reaching the panel.\n     *\n     * We can work around this issue by applying `aria-owns` to the modal with the `id` of\n     * the options panel. This effectively communicates to assistive technology that the\n     * options panel is part of the same interaction as the modal.\n     *\n     * At time of this writing, this issue is present in VoiceOver.\n     * See https://github.com/angular/components/issues/20694\n     */\n    _applyModalPanelOwnership() {\n        // TODO(http://github.com/angular/components/issues/26853): consider de-duplicating this with\n        // the `LiveAnnouncer` and any other usages.\n        //\n        // Note that the selector here is limited to CDK overlays at the moment in order to reduce the\n        // section of the DOM we need to look through. This should cover all the cases we support, but\n        // the selector can be expanded if it turns out to be too narrow.\n        const modal = this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal=\"true\"]');\n        if (!modal) {\n            // Most commonly, the autocomplete trigger is not inside a modal.\n            return;\n        }\n        const panelId = this.autocomplete.id;\n        if (this._trackedModal) {\n            removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\n        }\n        addAriaReferencedId(modal, 'aria-owns', panelId);\n        this._trackedModal = modal;\n    }\n    /** Clears the references to the listbox overlay element from the modal it was added to. */\n    _clearFromModal() {\n        if (this._trackedModal) {\n            const panelId = this.autocomplete.id;\n            removeAriaReferencedId(this._trackedModal, 'aria-owns', panelId);\n            this._trackedModal = null;\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAutocompleteTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatAutocompleteTrigger, isStandalone: true, selector: \"input[matAutocomplete], textarea[matAutocomplete]\", inputs: { autocomplete: [\"matAutocomplete\", \"autocomplete\"], position: [\"matAutocompletePosition\", \"position\"], connectedTo: [\"matAutocompleteConnectedTo\", \"connectedTo\"], autocompleteAttribute: [\"autocomplete\", \"autocompleteAttribute\"], autocompleteDisabled: [\"matAutocompleteDisabled\", \"autocompleteDisabled\", booleanAttribute] }, host: { listeners: { \"focusin\": \"_handleFocus()\", \"blur\": \"_onTouched()\", \"input\": \"_handleInput($event)\", \"keydown\": \"_handleKeydown($event)\", \"click\": \"_handleClick()\" }, properties: { \"attr.autocomplete\": \"autocompleteAttribute\", \"attr.role\": \"autocompleteDisabled ? null : \\\"combobox\\\"\", \"attr.aria-autocomplete\": \"autocompleteDisabled ? null : \\\"list\\\"\", \"attr.aria-activedescendant\": \"(panelOpen && activeOption) ? activeOption.id : null\", \"attr.aria-expanded\": \"autocompleteDisabled ? null : panelOpen.toString()\", \"attr.aria-controls\": \"(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id\", \"attr.aria-haspopup\": \"autocompleteDisabled ? null : \\\"listbox\\\"\" }, classAttribute: \"mat-mdc-autocomplete-trigger\" }, providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR], exportAs: [\"matAutocompleteTrigger\"], usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAutocompleteTrigger, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: `input[matAutocomplete], textarea[matAutocomplete]`,\n                    host: {\n                        'class': 'mat-mdc-autocomplete-trigger',\n                        '[attr.autocomplete]': 'autocompleteAttribute',\n                        '[attr.role]': 'autocompleteDisabled ? null : \"combobox\"',\n                        '[attr.aria-autocomplete]': 'autocompleteDisabled ? null : \"list\"',\n                        '[attr.aria-activedescendant]': '(panelOpen && activeOption) ? activeOption.id : null',\n                        '[attr.aria-expanded]': 'autocompleteDisabled ? null : panelOpen.toString()',\n                        '[attr.aria-controls]': '(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id',\n                        '[attr.aria-haspopup]': 'autocompleteDisabled ? null : \"listbox\"',\n                        // Note: we use `focusin`, as opposed to `focus`, in order to open the panel\n                        // a little earlier. This avoids issues where IE delays the focusing of the input.\n                        '(focusin)': '_handleFocus()',\n                        '(blur)': '_onTouched()',\n                        '(input)': '_handleInput($event)',\n                        '(keydown)': '_handleKeydown($event)',\n                        '(click)': '_handleClick()',\n                    },\n                    exportAs: 'matAutocompleteTrigger',\n                    providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR],\n                }]\n        }], ctorParameters: () => [], propDecorators: { autocomplete: [{\n                type: Input,\n                args: ['matAutocomplete']\n            }], position: [{\n                type: Input,\n                args: ['matAutocompletePosition']\n            }], connectedTo: [{\n                type: Input,\n                args: ['matAutocompleteConnectedTo']\n            }], autocompleteAttribute: [{\n                type: Input,\n                args: ['autocomplete']\n            }], autocompleteDisabled: [{\n                type: Input,\n                args: [{ alias: 'matAutocompleteDisabled', transform: booleanAttribute }]\n            }] } });\n\nclass MatAutocompleteModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAutocompleteModule, imports: [OverlayModule,\n            MatOptionModule,\n            MatCommonModule,\n            MatAutocomplete,\n            MatAutocompleteTrigger,\n            MatAutocompleteOrigin], exports: [CdkScrollableModule,\n            MatAutocomplete,\n            MatOptionModule,\n            MatCommonModule,\n            MatAutocompleteTrigger,\n            MatAutocompleteOrigin] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAutocompleteModule, providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [OverlayModule,\n            MatOptionModule,\n            MatCommonModule, CdkScrollableModule,\n            MatOptionModule,\n            MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAutocompleteModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [\n                        OverlayModule,\n                        MatOptionModule,\n                        MatCommonModule,\n                        MatAutocomplete,\n                        MatAutocompleteTrigger,\n                        MatAutocompleteOrigin,\n                    ],\n                    exports: [\n                        CdkScrollableModule,\n                        MatAutocomplete,\n                        MatOptionModule,\n                        MatCommonModule,\n                        MatAutocompleteTrigger,\n                        MatAutocompleteOrigin,\n                    ],\n                    providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_AUTOCOMPLETE_VALUE_ACCESSOR, MatAutocomplete, MatAutocompleteModule, MatAutocompleteOrigin, MatAutocompleteSelectedEvent, MatAutocompleteTrigger, getMatAutocompleteMissingPanelError };\n","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler = asyncScheduler) {\n    const duration = timer(due, scheduler);\n    return delayWhen(() => duration);\n}\n","import * as i0 from '@angular/core';\nimport { InjectionToken, inject, booleanAttribute, Directive, Input, ChangeDetectorRef, EventEmitter, Output, NgModule } from '@angular/core';\nimport { _IdGenerator } from '@angular/cdk/a11y';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport { Subject, Subscription } from 'rxjs';\n\n/**\n * Injection token that can be used to reference instances of `CdkAccordion`. It serves\n * as alternative token to the actual `CdkAccordion` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_ACCORDION = new InjectionToken('CdkAccordion');\n/**\n * Directive whose purpose is to manage the expanded state of CdkAccordionItem children.\n */\nclass CdkAccordion {\n    /** Emits when the state of the accordion changes */\n    _stateChanges = new Subject();\n    /** Stream that emits true/false when openAll/closeAll is triggered. */\n    _openCloseAllActions = new Subject();\n    /** A readonly id value to use for unique selection coordination. */\n    id = inject(_IdGenerator).getId('cdk-accordion-');\n    /** Whether the accordion should allow multiple expanded accordion items simultaneously. */\n    multi = false;\n    /** Opens all enabled accordion items in an accordion where multi is enabled. */\n    openAll() {\n        if (this.multi) {\n            this._openCloseAllActions.next(true);\n        }\n    }\n    /** Closes all enabled accordion items. */\n    closeAll() {\n        this._openCloseAllActions.next(false);\n    }\n    ngOnChanges(changes) {\n        this._stateChanges.next(changes);\n    }\n    ngOnDestroy() {\n        this._stateChanges.complete();\n        this._openCloseAllActions.complete();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkAccordion, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: CdkAccordion, isStandalone: true, selector: \"cdk-accordion, [cdkAccordion]\", inputs: { multi: [\"multi\", \"multi\", booleanAttribute] }, providers: [{ provide: CDK_ACCORDION, useExisting: CdkAccordion }], exportAs: [\"cdkAccordion\"], usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkAccordion, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'cdk-accordion, [cdkAccordion]',\n                    exportAs: 'cdkAccordion',\n                    providers: [{ provide: CDK_ACCORDION, useExisting: CdkAccordion }],\n                }]\n        }], propDecorators: { multi: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }] } });\n\n/**\n * A basic directive expected to be extended and decorated as a component.  Sets up all\n * events and attributes needed to be managed by a CdkAccordion parent.\n */\nclass CdkAccordionItem {\n    accordion = inject(CDK_ACCORDION, { optional: true, skipSelf: true });\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _expansionDispatcher = inject(UniqueSelectionDispatcher);\n    /** Subscription to openAll/closeAll events. */\n    _openCloseAllSubscription = Subscription.EMPTY;\n    /** Event emitted every time the AccordionItem is closed. */\n    closed = new EventEmitter();\n    /** Event emitted every time the AccordionItem is opened. */\n    opened = new EventEmitter();\n    /** Event emitted when the AccordionItem is destroyed. */\n    destroyed = new EventEmitter();\n    /**\n     * Emits whenever the expanded state of the accordion changes.\n     * Primarily used to facilitate two-way binding.\n     * @docs-private\n     */\n    expandedChange = new EventEmitter();\n    /** The unique AccordionItem id. */\n    id = inject(_IdGenerator).getId('cdk-accordion-child-');\n    /** Whether the AccordionItem is expanded. */\n    get expanded() {\n        return this._expanded;\n    }\n    set expanded(expanded) {\n        // Only emit events and update the internal value if the value changes.\n        if (this._expanded !== expanded) {\n            this._expanded = expanded;\n            this.expandedChange.emit(expanded);\n            if (expanded) {\n                this.opened.emit();\n                /**\n                 * In the unique selection dispatcher, the id parameter is the id of the CdkAccordionItem,\n                 * the name value is the id of the accordion.\n                 */\n                const accordionId = this.accordion ? this.accordion.id : this.id;\n                this._expansionDispatcher.notify(this.id, accordionId);\n            }\n            else {\n                this.closed.emit();\n            }\n            // Ensures that the animation will run when the value is set outside of an `@Input`.\n            // This includes cases like the open, close and toggle methods.\n            this._changeDetectorRef.markForCheck();\n        }\n    }\n    _expanded = false;\n    /** Whether the AccordionItem is disabled. */\n    disabled = false;\n    /** Unregister function for _expansionDispatcher. */\n    _removeUniqueSelectionListener = () => { };\n    constructor() { }\n    ngOnInit() {\n        this._removeUniqueSelectionListener = this._expansionDispatcher.listen((id, accordionId) => {\n            if (this.accordion &&\n                !this.accordion.multi &&\n                this.accordion.id === accordionId &&\n                this.id !== id) {\n                this.expanded = false;\n            }\n        });\n        // When an accordion item is hosted in an accordion, subscribe to open/close events.\n        if (this.accordion) {\n            this._openCloseAllSubscription = this._subscribeToOpenCloseAllActions();\n        }\n    }\n    /** Emits an event for the accordion item being destroyed. */\n    ngOnDestroy() {\n        this.opened.complete();\n        this.closed.complete();\n        this.destroyed.emit();\n        this.destroyed.complete();\n        this._removeUniqueSelectionListener();\n        this._openCloseAllSubscription.unsubscribe();\n    }\n    /** Toggles the expanded state of the accordion item. */\n    toggle() {\n        if (!this.disabled) {\n            this.expanded = !this.expanded;\n        }\n    }\n    /** Sets the expanded state of the accordion item to false. */\n    close() {\n        if (!this.disabled) {\n            this.expanded = false;\n        }\n    }\n    /** Sets the expanded state of the accordion item to true. */\n    open() {\n        if (!this.disabled) {\n            this.expanded = true;\n        }\n    }\n    _subscribeToOpenCloseAllActions() {\n        return this.accordion._openCloseAllActions.subscribe(expanded => {\n            // Only change expanded state if item is enabled\n            if (!this.disabled) {\n                this.expanded = expanded;\n            }\n        });\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkAccordionItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: CdkAccordionItem, isStandalone: true, selector: \"cdk-accordion-item, [cdkAccordionItem]\", inputs: { expanded: [\"expanded\", \"expanded\", booleanAttribute], disabled: [\"disabled\", \"disabled\", booleanAttribute] }, outputs: { closed: \"closed\", opened: \"opened\", destroyed: \"destroyed\", expandedChange: \"expandedChange\" }, providers: [\n            // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from\n            // registering to the same accordion.\n            { provide: CDK_ACCORDION, useValue: undefined },\n        ], exportAs: [\"cdkAccordionItem\"], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkAccordionItem, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'cdk-accordion-item, [cdkAccordionItem]',\n                    exportAs: 'cdkAccordionItem',\n                    providers: [\n                        // Provide `CDK_ACCORDION` as undefined to prevent nested accordion items from\n                        // registering to the same accordion.\n                        { provide: CDK_ACCORDION, useValue: undefined },\n                    ],\n                }]\n        }], ctorParameters: () => [], propDecorators: { closed: [{\n                type: Output\n            }], opened: [{\n                type: Output\n            }], destroyed: [{\n                type: Output\n            }], expandedChange: [{\n                type: Output\n            }], expanded: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], disabled: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }] } });\n\nclass CdkAccordionModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkAccordionModule, imports: [CdkAccordion, CdkAccordionItem], exports: [CdkAccordion, CdkAccordionItem] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkAccordionModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkAccordionModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [CdkAccordion, CdkAccordionItem],\n                    exports: [CdkAccordion, CdkAccordionItem],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CDK_ACCORDION, CdkAccordion, CdkAccordionItem, CdkAccordionModule };\n","import { CdkAccordionItem, CdkAccordion, CdkAccordionModule } from '@angular/cdk/accordion';\nimport { TemplatePortal, CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, inject, TemplateRef, Directive, ViewContainerRef, ANIMATION_MODULE_TYPE, NgZone, ElementRef, Renderer2, EventEmitter, booleanAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, ContentChild, ViewChild, ChangeDetectorRef, HostAttributeToken, numberAttribute, QueryList, ContentChildren, NgModule } from '@angular/core';\nimport { _StructuralStylesLoader, MatCommonModule } from '@angular/material/core';\nimport { _IdGenerator, FocusMonitor, FocusKeyManager } from '@angular/cdk/a11y';\nimport { startWith, filter, take } from 'rxjs/operators';\nimport { ENTER, hasModifierKey, SPACE } from '@angular/cdk/keycodes';\nimport { Subject, Subscription, EMPTY, merge } from 'rxjs';\nimport { UniqueSelectionDispatcher } from '@angular/cdk/collections';\nimport { DOCUMENT } from '@angular/common';\nimport { _CdkPrivateStyleLoader } from '@angular/cdk/private';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\n\n/**\n * Token used to provide a `MatAccordion` to `MatExpansionPanel`.\n * Used primarily to avoid circular imports between `MatAccordion` and `MatExpansionPanel`.\n */\nconst MAT_ACCORDION = new InjectionToken('MAT_ACCORDION');\n\n/**\n * Token used to provide a `MatExpansionPanel` to `MatExpansionPanelContent`.\n * Used to avoid circular imports between `MatExpansionPanel` and `MatExpansionPanelContent`.\n */\nconst MAT_EXPANSION_PANEL = new InjectionToken('MAT_EXPANSION_PANEL');\n\n/**\n * Expansion panel content that will be rendered lazily\n * after the panel is opened for the first time.\n */\nclass MatExpansionPanelContent {\n    _template = inject(TemplateRef);\n    _expansionPanel = inject(MAT_EXPANSION_PANEL, { optional: true });\n    constructor() { }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionPanelContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatExpansionPanelContent, isStandalone: true, selector: \"ng-template[matExpansionPanelContent]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionPanelContent, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'ng-template[matExpansionPanelContent]',\n                }]\n        }], ctorParameters: () => [] });\n\n/**\n * Injection token that can be used to configure the default\n * options for the expansion panel component.\n */\nconst MAT_EXPANSION_PANEL_DEFAULT_OPTIONS = new InjectionToken('MAT_EXPANSION_PANEL_DEFAULT_OPTIONS');\n/**\n * This component can be used as a single element to show expandable content, or as one of\n * multiple children of an element with the MatAccordion directive attached.\n */\nclass MatExpansionPanel extends CdkAccordionItem {\n    _viewContainerRef = inject(ViewContainerRef);\n    _animationsDisabled = inject(ANIMATION_MODULE_TYPE, { optional: true }) === 'NoopAnimations';\n    _document = inject(DOCUMENT);\n    _ngZone = inject(NgZone);\n    _elementRef = inject(ElementRef);\n    _renderer = inject(Renderer2);\n    _cleanupTransitionEnd;\n    /** Whether the toggle indicator should be hidden. */\n    get hideToggle() {\n        return this._hideToggle || (this.accordion && this.accordion.hideToggle);\n    }\n    set hideToggle(value) {\n        this._hideToggle = value;\n    }\n    _hideToggle = false;\n    /** The position of the expansion indicator. */\n    get togglePosition() {\n        return this._togglePosition || (this.accordion && this.accordion.togglePosition);\n    }\n    set togglePosition(value) {\n        this._togglePosition = value;\n    }\n    _togglePosition;\n    /** An event emitted after the body's expansion animation happens. */\n    afterExpand = new EventEmitter();\n    /** An event emitted after the body's collapse animation happens. */\n    afterCollapse = new EventEmitter();\n    /** Stream that emits for changes in `@Input` properties. */\n    _inputChanges = new Subject();\n    /** Optionally defined accordion the expansion panel belongs to. */\n    accordion = inject(MAT_ACCORDION, { optional: true, skipSelf: true });\n    /** Content that will be rendered lazily. */\n    _lazyContent;\n    /** Element containing the panel's user-provided content. */\n    _body;\n    /** Element wrapping the panel body. */\n    _bodyWrapper;\n    /** Portal holding the user's content. */\n    _portal;\n    /** ID for the associated header element. Used for a11y labelling. */\n    _headerId = inject(_IdGenerator).getId('mat-expansion-panel-header-');\n    constructor() {\n        super();\n        const defaultOptions = inject(MAT_EXPANSION_PANEL_DEFAULT_OPTIONS, { optional: true });\n        this._expansionDispatcher = inject(UniqueSelectionDispatcher);\n        if (defaultOptions) {\n            this.hideToggle = defaultOptions.hideToggle;\n        }\n    }\n    /** Determines whether the expansion panel should have spacing between it and its siblings. */\n    _hasSpacing() {\n        if (this.accordion) {\n            return this.expanded && this.accordion.displayMode === 'default';\n        }\n        return false;\n    }\n    /** Gets the expanded state string. */\n    _getExpandedState() {\n        return this.expanded ? 'expanded' : 'collapsed';\n    }\n    /** Toggles the expanded state of the expansion panel. */\n    toggle() {\n        this.expanded = !this.expanded;\n    }\n    /** Sets the expanded state of the expansion panel to false. */\n    close() {\n        this.expanded = false;\n    }\n    /** Sets the expanded state of the expansion panel to true. */\n    open() {\n        this.expanded = true;\n    }\n    ngAfterContentInit() {\n        if (this._lazyContent && this._lazyContent._expansionPanel === this) {\n            // Render the content as soon as the panel becomes open.\n            this.opened\n                .pipe(startWith(null), filter(() => this.expanded && !this._portal), take(1))\n                .subscribe(() => {\n                this._portal = new TemplatePortal(this._lazyContent._template, this._viewContainerRef);\n            });\n        }\n        this._setupAnimationEvents();\n    }\n    ngOnChanges(changes) {\n        this._inputChanges.next(changes);\n    }\n    ngOnDestroy() {\n        super.ngOnDestroy();\n        this._cleanupTransitionEnd?.();\n        this._inputChanges.complete();\n    }\n    /** Checks whether the expansion panel's content contains the currently-focused element. */\n    _containsFocus() {\n        if (this._body) {\n            const focusedElement = this._document.activeElement;\n            const bodyElement = this._body.nativeElement;\n            return focusedElement === bodyElement || bodyElement.contains(focusedElement);\n        }\n        return false;\n    }\n    _transitionEndListener = ({ target, propertyName }) => {\n        if (target === this._bodyWrapper?.nativeElement && propertyName === 'grid-template-rows') {\n            this._ngZone.run(() => {\n                if (this.expanded) {\n                    this.afterExpand.emit();\n                }\n                else {\n                    this.afterCollapse.emit();\n                }\n            });\n        }\n    };\n    _setupAnimationEvents() {\n        // This method is defined separately, because we need to\n        // disable this logic in some internal components.\n        this._ngZone.runOutsideAngular(() => {\n            if (this._animationsDisabled) {\n                this.opened.subscribe(() => this._ngZone.run(() => this.afterExpand.emit()));\n                this.closed.subscribe(() => this._ngZone.run(() => this.afterCollapse.emit()));\n            }\n            else {\n                setTimeout(() => {\n                    const element = this._elementRef.nativeElement;\n                    this._cleanupTransitionEnd = this._renderer.listen(element, 'transitionend', this._transitionEndListener);\n                    element.classList.add('mat-expansion-panel-animations-enabled');\n                }, 200);\n            }\n        });\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatExpansionPanel, isStandalone: true, selector: \"mat-expansion-panel\", inputs: { hideToggle: [\"hideToggle\", \"hideToggle\", booleanAttribute], togglePosition: \"togglePosition\" }, outputs: { afterExpand: \"afterExpand\", afterCollapse: \"afterCollapse\" }, host: { properties: { \"class.mat-expanded\": \"expanded\", \"class.mat-expansion-panel-spacing\": \"_hasSpacing()\" }, classAttribute: \"mat-expansion-panel\" }, providers: [\n            // Provide MatAccordion as undefined to prevent nested expansion panels from registering\n            // to the same accordion.\n            { provide: MAT_ACCORDION, useValue: undefined },\n            { provide: MAT_EXPANSION_PANEL, useExisting: MatExpansionPanel },\n        ], queries: [{ propertyName: \"_lazyContent\", first: true, predicate: MatExpansionPanelContent, descendants: true }], viewQueries: [{ propertyName: \"_body\", first: true, predicate: [\"body\"], descendants: true }, { propertyName: \"_bodyWrapper\", first: true, predicate: [\"bodyWrapper\"], descendants: true }], exportAs: [\"matExpansionPanel\"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: \"<ng-content select=\\\"mat-expansion-panel-header\\\"></ng-content>\\n<div class=\\\"mat-expansion-panel-content-wrapper\\\" [attr.inert]=\\\"expanded ? null : ''\\\" #bodyWrapper>\\n  <div class=\\\"mat-expansion-panel-content\\\"\\n       role=\\\"region\\\"\\n       [attr.aria-labelledby]=\\\"_headerId\\\"\\n       [id]=\\\"id\\\"\\n       #body>\\n    <div class=\\\"mat-expansion-panel-body\\\">\\n      <ng-content></ng-content>\\n      <ng-template [cdkPortalOutlet]=\\\"_portal\\\"></ng-template>\\n    </div>\\n    <ng-content select=\\\"mat-action-row\\\"></ng-content>\\n  </div>\\n</div>\\n\", styles: [\".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden;position:relative;background:var(--mat-expansion-container-background-color, var(--mat-sys-surface));color:var(--mat-expansion-container-text-color, var(--mat-sys-on-surface));border-radius:var(--mat-expansion-container-shape, 12px)}.mat-expansion-panel.mat-expansion-panel-animations-enabled{transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape, 12px);border-top-left-radius:var(--mat-expansion-container-shape, 12px)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape, 12px);border-bottom-left-radius:var(--mat-expansion-container-shape, 12px)}@media(forced-colors: active){.mat-expansion-panel{outline:solid 1px}}.mat-expansion-panel-content-wrapper{display:grid;grid-template-rows:0fr;grid-template-columns:100%}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content-wrapper{transition:grid-template-rows 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{grid-template-rows:1fr}@supports not (grid-template-rows: 0fr){.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;min-height:0;visibility:hidden;font-family:var(--mat-expansion-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-expansion-container-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-expansion-container-text-weight, var(--mat-sys-body-large-weight));line-height:var(--mat-expansion-container-text-line-height, var(--mat-sys-body-large-line-height));letter-spacing:var(--mat-expansion-container-text-tracking, var(--mat-sys-body-large-tracking))}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content{transition:visibility 190ms linear}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper>.mat-expansion-panel-content{visibility:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color, var(--mat-sys-outline))}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}\"], dependencies: [{ kind: \"directive\", type: CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionPanel, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-expansion-panel', exportAs: 'matExpansionPanel', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [\n                        // Provide MatAccordion as undefined to prevent nested expansion panels from registering\n                        // to the same accordion.\n                        { provide: MAT_ACCORDION, useValue: undefined },\n                        { provide: MAT_EXPANSION_PANEL, useExisting: MatExpansionPanel },\n                    ], host: {\n                        'class': 'mat-expansion-panel',\n                        '[class.mat-expanded]': 'expanded',\n                        '[class.mat-expansion-panel-spacing]': '_hasSpacing()',\n                    }, imports: [CdkPortalOutlet], template: \"<ng-content select=\\\"mat-expansion-panel-header\\\"></ng-content>\\n<div class=\\\"mat-expansion-panel-content-wrapper\\\" [attr.inert]=\\\"expanded ? null : ''\\\" #bodyWrapper>\\n  <div class=\\\"mat-expansion-panel-content\\\"\\n       role=\\\"region\\\"\\n       [attr.aria-labelledby]=\\\"_headerId\\\"\\n       [id]=\\\"id\\\"\\n       #body>\\n    <div class=\\\"mat-expansion-panel-body\\\">\\n      <ng-content></ng-content>\\n      <ng-template [cdkPortalOutlet]=\\\"_portal\\\"></ng-template>\\n    </div>\\n    <ng-content select=\\\"mat-action-row\\\"></ng-content>\\n  </div>\\n</div>\\n\", styles: [\".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden;position:relative;background:var(--mat-expansion-container-background-color, var(--mat-sys-surface));color:var(--mat-expansion-container-text-color, var(--mat-sys-on-surface));border-radius:var(--mat-expansion-container-shape, 12px)}.mat-expansion-panel.mat-expansion-panel-animations-enabled{transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape, 12px);border-top-left-radius:var(--mat-expansion-container-shape, 12px)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape, 12px);border-bottom-left-radius:var(--mat-expansion-container-shape, 12px)}@media(forced-colors: active){.mat-expansion-panel{outline:solid 1px}}.mat-expansion-panel-content-wrapper{display:grid;grid-template-rows:0fr;grid-template-columns:100%}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content-wrapper{transition:grid-template-rows 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{grid-template-rows:1fr}@supports not (grid-template-rows: 0fr){.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;min-height:0;visibility:hidden;font-family:var(--mat-expansion-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-expansion-container-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-expansion-container-text-weight, var(--mat-sys-body-large-weight));line-height:var(--mat-expansion-container-text-line-height, var(--mat-sys-body-large-line-height));letter-spacing:var(--mat-expansion-container-text-tracking, var(--mat-sys-body-large-tracking))}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content{transition:visibility 190ms linear}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper>.mat-expansion-panel-content{visibility:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color, var(--mat-sys-outline))}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}\"] }]\n        }], ctorParameters: () => [], propDecorators: { hideToggle: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], togglePosition: [{\n                type: Input\n            }], afterExpand: [{\n                type: Output\n            }], afterCollapse: [{\n                type: Output\n            }], _lazyContent: [{\n                type: ContentChild,\n                args: [MatExpansionPanelContent]\n            }], _body: [{\n                type: ViewChild,\n                args: ['body']\n            }], _bodyWrapper: [{\n                type: ViewChild,\n                args: ['bodyWrapper']\n            }] } });\n/**\n * Actions of a `<mat-expansion-panel>`.\n */\nclass MatExpansionPanelActionRow {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionPanelActionRow, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatExpansionPanelActionRow, isStandalone: true, selector: \"mat-action-row\", host: { classAttribute: \"mat-action-row\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionPanelActionRow, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-action-row',\n                    host: {\n                        class: 'mat-action-row',\n                    },\n                }]\n        }] });\n\n/**\n * Header element of a `<mat-expansion-panel>`.\n */\nclass MatExpansionPanelHeader {\n    panel = inject(MatExpansionPanel, { host: true });\n    _element = inject(ElementRef);\n    _focusMonitor = inject(FocusMonitor);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _parentChangeSubscription = Subscription.EMPTY;\n    constructor() {\n        inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);\n        const panel = this.panel;\n        const defaultOptions = inject(MAT_EXPANSION_PANEL_DEFAULT_OPTIONS, { optional: true });\n        const tabIndex = inject(new HostAttributeToken('tabindex'), { optional: true });\n        const accordionHideToggleChange = panel.accordion\n            ? panel.accordion._stateChanges.pipe(filter(changes => !!(changes['hideToggle'] || changes['togglePosition'])))\n            : EMPTY;\n        this.tabIndex = parseInt(tabIndex || '') || 0;\n        // Since the toggle state depends on an @Input on the panel, we\n        // need to subscribe and trigger change detection manually.\n        this._parentChangeSubscription = merge(panel.opened, panel.closed, accordionHideToggleChange, panel._inputChanges.pipe(filter(changes => {\n            return !!(changes['hideToggle'] || changes['disabled'] || changes['togglePosition']);\n        }))).subscribe(() => this._changeDetectorRef.markForCheck());\n        // Avoids focus being lost if the panel contained the focused element and was closed.\n        panel.closed\n            .pipe(filter(() => panel._containsFocus()))\n            .subscribe(() => this._focusMonitor.focusVia(this._element, 'program'));\n        if (defaultOptions) {\n            this.expandedHeight = defaultOptions.expandedHeight;\n            this.collapsedHeight = defaultOptions.collapsedHeight;\n        }\n    }\n    /** Height of the header while the panel is expanded. */\n    expandedHeight;\n    /** Height of the header while the panel is collapsed. */\n    collapsedHeight;\n    /** Tab index of the header. */\n    tabIndex = 0;\n    /**\n     * Whether the associated panel is disabled. Implemented as a part of `FocusableOption`.\n     * @docs-private\n     */\n    get disabled() {\n        return this.panel.disabled;\n    }\n    /** Toggles the expanded state of the panel. */\n    _toggle() {\n        if (!this.disabled) {\n            this.panel.toggle();\n        }\n    }\n    /** Gets whether the panel is expanded. */\n    _isExpanded() {\n        return this.panel.expanded;\n    }\n    /** Gets the expanded state string of the panel. */\n    _getExpandedState() {\n        return this.panel._getExpandedState();\n    }\n    /** Gets the panel id. */\n    _getPanelId() {\n        return this.panel.id;\n    }\n    /** Gets the toggle position for the header. */\n    _getTogglePosition() {\n        return this.panel.togglePosition;\n    }\n    /** Gets whether the expand indicator should be shown. */\n    _showToggle() {\n        return !this.panel.hideToggle && !this.panel.disabled;\n    }\n    /**\n     * Gets the current height of the header. Null if no custom height has been\n     * specified, and if the default height from the stylesheet should be used.\n     */\n    _getHeaderHeight() {\n        const isExpanded = this._isExpanded();\n        if (isExpanded && this.expandedHeight) {\n            return this.expandedHeight;\n        }\n        else if (!isExpanded && this.collapsedHeight) {\n            return this.collapsedHeight;\n        }\n        return null;\n    }\n    /** Handle keydown event calling to toggle() if appropriate. */\n    _keydown(event) {\n        switch (event.keyCode) {\n            // Toggle for space and enter keys.\n            case SPACE:\n            case ENTER:\n                if (!hasModifierKey(event)) {\n                    event.preventDefault();\n                    this._toggle();\n                }\n                break;\n            default:\n                if (this.panel.accordion) {\n                    this.panel.accordion._handleHeaderKeydown(event);\n                }\n                return;\n        }\n    }\n    /**\n     * Focuses the panel header. Implemented as a part of `FocusableOption`.\n     * @param origin Origin of the action that triggered the focus.\n     * @docs-private\n     */\n    focus(origin, options) {\n        if (origin) {\n            this._focusMonitor.focusVia(this._element, origin, options);\n        }\n        else {\n            this._element.nativeElement.focus(options);\n        }\n    }\n    ngAfterViewInit() {\n        this._focusMonitor.monitor(this._element).subscribe(origin => {\n            if (origin && this.panel.accordion) {\n                this.panel.accordion._handleHeaderFocus(this);\n            }\n        });\n    }\n    ngOnDestroy() {\n        this._parentChangeSubscription.unsubscribe();\n        this._focusMonitor.stopMonitoring(this._element);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionPanelHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"19.0.0\", type: MatExpansionPanelHeader, isStandalone: true, selector: \"mat-expansion-panel-header\", inputs: { expandedHeight: \"expandedHeight\", collapsedHeight: \"collapsedHeight\", tabIndex: [\"tabIndex\", \"tabIndex\", (value) => (value == null ? 0 : numberAttribute(value))] }, host: { attributes: { \"role\": \"button\" }, listeners: { \"click\": \"_toggle()\", \"keydown\": \"_keydown($event)\" }, properties: { \"attr.id\": \"panel._headerId\", \"attr.tabindex\": \"disabled ? -1 : tabIndex\", \"attr.aria-controls\": \"_getPanelId()\", \"attr.aria-expanded\": \"_isExpanded()\", \"attr.aria-disabled\": \"panel.disabled\", \"class.mat-expanded\": \"_isExpanded()\", \"class.mat-expansion-toggle-indicator-after\": \"_getTogglePosition() === 'after'\", \"class.mat-expansion-toggle-indicator-before\": \"_getTogglePosition() === 'before'\", \"style.height\": \"_getHeaderHeight()\" }, classAttribute: \"mat-expansion-panel-header mat-focus-indicator\" }, ngImport: i0, template: \"<span class=\\\"mat-content\\\" [class.mat-content-hide-toggle]=\\\"!_showToggle()\\\">\\n  <ng-content select=\\\"mat-panel-title\\\"></ng-content>\\n  <ng-content select=\\\"mat-panel-description\\\"></ng-content>\\n  <ng-content></ng-content>\\n</span>\\n\\n@if (_showToggle()) {\\n  <span class=\\\"mat-expansion-indicator\\\">\\n    <svg\\n      xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n      viewBox=\\\"0 -960 960 960\\\"\\n      aria-hidden=\\\"true\\\"\\n      focusable=\\\"false\\\">\\n      <path d=\\\"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z\\\"/>\\n    </svg>\\n  </span>\\n}\\n\", styles: [\".mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;height:var(--mat-expansion-header-collapsed-state-height, 48px);font-family:var(--mat-expansion-header-text-font, var(--mat-sys-title-medium-font));font-size:var(--mat-expansion-header-text-size, var(--mat-sys-title-medium-size));font-weight:var(--mat-expansion-header-text-weight, var(--mat-sys-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-sys-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-sys-title-medium-tracking))}.mat-expansion-panel-animations-enabled .mat-expansion-panel-header{transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height, 64px)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color, var(--mat-sys-surface))}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color, var(--mat-sys-on-surface))}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color, var(--mat-sys-on-surface-variant))}.mat-expansion-panel-animations-enabled .mat-expansion-indicator{transition:transform 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header.mat-expanded .mat-expansion-indicator{transform:rotate(180deg)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:\\\"\\\";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-legacy-header-indicator-display, none)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-header-indicator-display, inline-block)}@media(forced-colors: active){.mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionPanelHeader, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-expansion-panel-header', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {\n                        'class': 'mat-expansion-panel-header mat-focus-indicator',\n                        'role': 'button',\n                        '[attr.id]': 'panel._headerId',\n                        '[attr.tabindex]': 'disabled ? -1 : tabIndex',\n                        '[attr.aria-controls]': '_getPanelId()',\n                        '[attr.aria-expanded]': '_isExpanded()',\n                        '[attr.aria-disabled]': 'panel.disabled',\n                        '[class.mat-expanded]': '_isExpanded()',\n                        '[class.mat-expansion-toggle-indicator-after]': `_getTogglePosition() === 'after'`,\n                        '[class.mat-expansion-toggle-indicator-before]': `_getTogglePosition() === 'before'`,\n                        '[style.height]': '_getHeaderHeight()',\n                        '(click)': '_toggle()',\n                        '(keydown)': '_keydown($event)',\n                    }, template: \"<span class=\\\"mat-content\\\" [class.mat-content-hide-toggle]=\\\"!_showToggle()\\\">\\n  <ng-content select=\\\"mat-panel-title\\\"></ng-content>\\n  <ng-content select=\\\"mat-panel-description\\\"></ng-content>\\n  <ng-content></ng-content>\\n</span>\\n\\n@if (_showToggle()) {\\n  <span class=\\\"mat-expansion-indicator\\\">\\n    <svg\\n      xmlns=\\\"http://www.w3.org/2000/svg\\\"\\n      viewBox=\\\"0 -960 960 960\\\"\\n      aria-hidden=\\\"true\\\"\\n      focusable=\\\"false\\\">\\n      <path d=\\\"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z\\\"/>\\n    </svg>\\n  </span>\\n}\\n\", styles: [\".mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;height:var(--mat-expansion-header-collapsed-state-height, 48px);font-family:var(--mat-expansion-header-text-font, var(--mat-sys-title-medium-font));font-size:var(--mat-expansion-header-text-size, var(--mat-sys-title-medium-size));font-weight:var(--mat-expansion-header-text-weight, var(--mat-sys-title-medium-weight));line-height:var(--mat-expansion-header-text-line-height, var(--mat-sys-title-medium-line-height));letter-spacing:var(--mat-expansion-header-text-tracking, var(--mat-sys-title-medium-tracking))}.mat-expansion-panel-animations-enabled .mat-expansion-panel-header{transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height, 64px)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color, var(--mat-sys-surface))}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color, var(--mat-sys-on-surface))}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color, var(--mat-sys-on-surface-variant))}.mat-expansion-panel-animations-enabled .mat-expansion-indicator{transition:transform 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header.mat-expanded .mat-expansion-indicator{transform:rotate(180deg)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:\\\"\\\";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-legacy-header-indicator-display, none)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color, var(--mat-sys-on-surface-variant));display:var(--mat-expansion-header-indicator-display, inline-block)}@media(forced-colors: active){.mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}}\"] }]\n        }], ctorParameters: () => [], propDecorators: { expandedHeight: [{\n                type: Input\n            }], collapsedHeight: [{\n                type: Input\n            }], tabIndex: [{\n                type: Input,\n                args: [{\n                        transform: (value) => (value == null ? 0 : numberAttribute(value)),\n                    }]\n            }] } });\n/**\n * Description element of a `<mat-expansion-panel-header>`.\n */\nclass MatExpansionPanelDescription {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionPanelDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatExpansionPanelDescription, isStandalone: true, selector: \"mat-panel-description\", host: { classAttribute: \"mat-expansion-panel-header-description\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionPanelDescription, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-panel-description',\n                    host: {\n                        class: 'mat-expansion-panel-header-description',\n                    },\n                }]\n        }] });\n/**\n * Title element of a `<mat-expansion-panel-header>`.\n */\nclass MatExpansionPanelTitle {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionPanelTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatExpansionPanelTitle, isStandalone: true, selector: \"mat-panel-title\", host: { classAttribute: \"mat-expansion-panel-header-title\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionPanelTitle, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-panel-title',\n                    host: {\n                        class: 'mat-expansion-panel-header-title',\n                    },\n                }]\n        }] });\n\n/**\n * Directive for a Material Design Accordion.\n */\nclass MatAccordion extends CdkAccordion {\n    _keyManager;\n    /** Headers belonging to this accordion. */\n    _ownHeaders = new QueryList();\n    /** All headers inside the accordion. Includes headers inside nested accordions. */\n    _headers;\n    /** Whether the expansion indicator should be hidden. */\n    hideToggle = false;\n    /**\n     * Display mode used for all expansion panels in the accordion. Currently two display\n     * modes exist:\n     *  default - a gutter-like spacing is placed around any expanded panel, placing the expanded\n     *     panel at a different elevation from the rest of the accordion.\n     *  flat - no spacing is placed around expanded panels, showing all panels at the same\n     *     elevation.\n     */\n    displayMode = 'default';\n    /** The position of the expansion indicator. */\n    togglePosition = 'after';\n    ngAfterContentInit() {\n        this._headers.changes\n            .pipe(startWith(this._headers))\n            .subscribe((headers) => {\n            this._ownHeaders.reset(headers.filter(header => header.panel.accordion === this));\n            this._ownHeaders.notifyOnChanges();\n        });\n        this._keyManager = new FocusKeyManager(this._ownHeaders).withWrap().withHomeAndEnd();\n    }\n    /** Handles keyboard events coming in from the panel headers. */\n    _handleHeaderKeydown(event) {\n        this._keyManager.onKeydown(event);\n    }\n    _handleHeaderFocus(header) {\n        this._keyManager.updateActiveItem(header);\n    }\n    ngOnDestroy() {\n        super.ngOnDestroy();\n        this._keyManager?.destroy();\n        this._ownHeaders.destroy();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAccordion, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatAccordion, isStandalone: true, selector: \"mat-accordion\", inputs: { hideToggle: [\"hideToggle\", \"hideToggle\", booleanAttribute], displayMode: \"displayMode\", togglePosition: \"togglePosition\" }, host: { properties: { \"class.mat-accordion-multi\": \"this.multi\" }, classAttribute: \"mat-accordion\" }, providers: [\n            {\n                provide: MAT_ACCORDION,\n                useExisting: MatAccordion,\n            },\n        ], queries: [{ propertyName: \"_headers\", predicate: MatExpansionPanelHeader, descendants: true }], exportAs: [\"matAccordion\"], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatAccordion, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-accordion',\n                    exportAs: 'matAccordion',\n                    providers: [\n                        {\n                            provide: MAT_ACCORDION,\n                            useExisting: MatAccordion,\n                        },\n                    ],\n                    host: {\n                        class: 'mat-accordion',\n                        // Class binding which is only used by the test harness as there is no other\n                        // way for the harness to detect if multiple panel support is enabled.\n                        '[class.mat-accordion-multi]': 'this.multi',\n                    },\n                }]\n        }], propDecorators: { _headers: [{\n                type: ContentChildren,\n                args: [MatExpansionPanelHeader, { descendants: true }]\n            }], hideToggle: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], displayMode: [{\n                type: Input\n            }], togglePosition: [{\n                type: Input\n            }] } });\n\nclass MatExpansionModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionModule, imports: [MatCommonModule,\n            CdkAccordionModule,\n            PortalModule,\n            MatAccordion,\n            MatExpansionPanel,\n            MatExpansionPanelActionRow,\n            MatExpansionPanelHeader,\n            MatExpansionPanelTitle,\n            MatExpansionPanelDescription,\n            MatExpansionPanelContent], exports: [MatAccordion,\n            MatExpansionPanel,\n            MatExpansionPanelActionRow,\n            MatExpansionPanelHeader,\n            MatExpansionPanelTitle,\n            MatExpansionPanelDescription,\n            MatExpansionPanelContent] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionModule, imports: [MatCommonModule,\n            CdkAccordionModule,\n            PortalModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatExpansionModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [\n                        MatCommonModule,\n                        CdkAccordionModule,\n                        PortalModule,\n                        MatAccordion,\n                        MatExpansionPanel,\n                        MatExpansionPanelActionRow,\n                        MatExpansionPanelHeader,\n                        MatExpansionPanelTitle,\n                        MatExpansionPanelDescription,\n                        MatExpansionPanelContent,\n                    ],\n                    exports: [\n                        MatAccordion,\n                        MatExpansionPanel,\n                        MatExpansionPanelActionRow,\n                        MatExpansionPanelHeader,\n                        MatExpansionPanelTitle,\n                        MatExpansionPanelDescription,\n                        MatExpansionPanelContent,\n                    ],\n                }]\n        }] });\n\n/** Time and timing curve for expansion panel animations. */\n// Note: Keep this in sync with the Sass variable for the panel header animation.\nconst EXPANSION_PANEL_ANIMATION_TIMING = '225ms cubic-bezier(0.4,0.0,0.2,1)';\n/**\n * Animations used by the Material expansion panel.\n *\n * A bug in angular animation's `state` when ViewContainers are moved using ViewContainerRef.move()\n * causes the animation state of moved components to become `void` upon exit, and not update again\n * upon reentry into the DOM. This can lead a to situation for the expansion panel where the state\n * of the panel is `expanded` or `collapsed` but the animation state is `void`.\n *\n * To correctly handle animating to the next state, we animate between `void` and `collapsed` which\n * are defined to have the same styles. Since angular animates from the current styles to the\n * destination state's style definition, in situations where we are moving from `void`'s styles to\n * `collapsed` this acts a noop since no style values change.\n *\n * In the case where angular's animation state is out of sync with the expansion panel's state, the\n * expansion panel being `expanded` and angular animations being `void`, the animation from the\n * `expanded`'s effective styles (though in a `void` animation state) to the collapsed state will\n * occur as expected.\n *\n * Angular Bug: https://github.com/angular/angular/issues/18847\n *\n * @docs-private\n * @deprecated No longer being used, to be removed.\n * @breaking-change 21.0.0\n */\nconst matExpansionAnimations = {\n    /** Animation that rotates the indicator arrow. */\n    indicatorRotate: trigger('indicatorRotate', [\n        state('collapsed, void', style({ transform: 'rotate(0deg)' })),\n        state('expanded', style({ transform: 'rotate(180deg)' })),\n        transition('expanded <=> collapsed, void => collapsed', animate(EXPANSION_PANEL_ANIMATION_TIMING)),\n    ]),\n    /** Animation that expands and collapses the panel content. */\n    bodyExpansion: trigger('bodyExpansion', [\n        state('collapsed, void', style({ height: '0px', visibility: 'hidden' })),\n        // Clear the `visibility` while open, otherwise the content will be visible when placed in\n        // a parent that's `visibility: hidden`, because `visibility` doesn't apply to descendants\n        // that have a `visibility` of their own (see #27436).\n        state('expanded', style({ height: '*', visibility: '' })),\n        transition('expanded <=> collapsed, void => collapsed', animate(EXPANSION_PANEL_ANIMATION_TIMING)),\n    ]),\n};\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { EXPANSION_PANEL_ANIMATION_TIMING, MAT_ACCORDION, MAT_EXPANSION_PANEL, MAT_EXPANSION_PANEL_DEFAULT_OPTIONS, MatAccordion, MatExpansionModule, MatExpansionPanel, MatExpansionPanelActionRow, MatExpansionPanelContent, MatExpansionPanelDescription, MatExpansionPanelHeader, MatExpansionPanelTitle, matExpansionAnimations };\n","<mat-expansion-panel multi [expanded]=\"true\" [formGroup]=\"insuredForm\">\r\n    <mat-expansion-panel-header>\r\n        <mat-panel-title>Insured information</mat-panel-title>\r\n    </mat-expansion-panel-header>\r\n    <mat-radio-group\r\n        formControlName=\"id\"\r\n        (change)=\"onInsuredChange()\"\r\n        class=\"radio-group\"\r\n        [hidden]=\"!user\">\r\n        <mat-radio-button\r\n            [value]=\"insured.id\"\r\n            class=\"exist-insured-radio-button\"\r\n            *ngFor=\"let insured of user?.insureds\">\r\n            <strong>{{ insured.name }}</strong>\r\n            <p class=\"my-1\">{{ insured.address }}</p>\r\n            <p>{{ insured.city }}, {{ insured.state }} {{ insured.zipCode }}</p>\r\n        </mat-radio-button>\r\n\r\n        <mat-radio-button [value]=\"0\">\r\n            <strong>New Insured</strong>\r\n        </mat-radio-button>\r\n    </mat-radio-group>\r\n\r\n    <div class=\"d-flex justify-content-end\" *ngIf=\"insuredForm.get('secretaryOfStateId')\">\r\n        <a\r\n            mat-button\r\n            href=\"http://www.sos.state.co.us/biz/BusinessEntityCriteriaExt.do\"\r\n            target=\"_blank\"\r\n            class=\"text-right\"\r\n            >Look up your ID</a\r\n        >\r\n    </div>\r\n\r\n    <div class=\"row\">\r\n        <mat-form-field appearance=\"outline\" class=\"col-12 col-md-8\">\r\n            <mat-label>Insured Name</mat-label>\r\n            <input matInput formControlName=\"name\" />\r\n            <mat-error *ngIf=\"insuredForm.get('name')?.hasError('required')\">\r\n                Insured name is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n\r\n        <mat-form-field\r\n            appearance=\"outline\"\r\n            class=\"col-12 col-md-4\"\r\n            *ngIf=\"insuredForm.get('ssn')\">\r\n            <mat-label>Last 4 of SSN</mat-label>\r\n            <input matInput formControlName=\"ssn\" />\r\n            <mat-error\r\n                *ngIf=\"\r\n                    insuredForm.get('ssn')?.hasError('maxlength') &&\r\n                    !insuredForm.get('ssn')?.hasError('required')\r\n                \">\r\n                SSN cannot exceed 4 characters\r\n            </mat-error>\r\n            <mat-error *ngIf=\"insuredForm.get('ssn')?.hasError('required')\">\r\n                SSN is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n\r\n        <mat-form-field\r\n            appearance=\"outline\"\r\n            class=\"col-12 col-md-4\"\r\n            *ngIf=\"insuredForm.get('secretaryOfStateId')\">\r\n            <mat-label>Secretary of State ID #</mat-label>\r\n            <input matInput formControlName=\"secretaryOfStateId\" />\r\n            <mat-hint>Required by CREC</mat-hint>\r\n            <mat-error\r\n                *ngIf=\"insuredForm.get('secretaryOfStateId')?.hasError('required')\">\r\n                Secretary of State ID # is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n    </div>\r\n\r\n    <mat-form-field\r\n        appearance=\"outline\"\r\n        class=\"w-100\"\r\n        *ngIf=\"insuredForm.get('firmName')\">\r\n        <mat-label>Firm Name</mat-label>\r\n        <input matInput formControlName=\"firmName\" />\r\n    </mat-form-field>\r\n\r\n    <mat-form-field\r\n        appearance=\"outline\"\r\n        class=\"w-100\"\r\n        *ngIf=\"insuredForm.get('responsibleBrokerLastName')\">\r\n        <mat-label>Responsible Broker (Last Name)</mat-label>\r\n        <input matInput formControlName=\"responsibleBrokerLastName\" />\r\n        <mat-error\r\n            *ngIf=\"insuredForm.get('responsibleBrokerLastName')?.hasError('required')\">\r\n            Responsible Broker (Last Name) is <strong>required</strong>\r\n        </mat-error>\r\n    </mat-form-field>\r\n\r\n    <mat-form-field appearance=\"outline\" class=\"w-100\">\r\n        <mat-label>Address</mat-label>\r\n        <input matInput formControlName=\"address\" />\r\n        <mat-error *ngIf=\"insuredForm.get('address')?.hasError('required')\">\r\n            Address is <strong>required</strong>\r\n        </mat-error>\r\n    </mat-form-field>\r\n\r\n    <div class=\"row\">\r\n        <mat-form-field appearance=\"outline\" class=\"col-12 col-md-6\">\r\n            <mat-label>City</mat-label>\r\n            <input matInput formControlName=\"city\" />\r\n            <mat-error *ngIf=\"insuredForm.get('city')?.hasError('required')\">\r\n                City is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n\r\n        <mat-form-field appearance=\"outline\" class=\"col-12 col-md-3\">\r\n            <mat-label>State</mat-label>\r\n            <input matInput formControlName=\"state\" [matAutocomplete]=\"auto\" />\r\n            <mat-autocomplete #auto=\"matAutocomplete\">\r\n                @for (state of filteredStates | async; track state) {\r\n                    <mat-option [value]=\"state\">\r\n                        {{ state }}\r\n                    </mat-option>\r\n                }\r\n            </mat-autocomplete>\r\n            <mat-error *ngIf=\"insuredForm.get('state')?.hasError('required')\">\r\n                State is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n\r\n        <mat-form-field appearance=\"outline\" class=\"col-12 col-md-3\">\r\n            <mat-label>Zip</mat-label>\r\n            <input matInput formControlName=\"zipCode\" />\r\n            <mat-error\r\n                *ngIf=\"\r\n                    insuredForm.get('zipCode')?.hasError('pattern') &&\r\n                    !insuredForm.get('zipCode')?.hasError('required')\r\n                \">\r\n                Zip must be a 5-digit number.\r\n            </mat-error>\r\n            <mat-error *ngIf=\"insuredForm.get('zipCode')?.hasError('required')\">\r\n                Zip is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n    </div>\r\n</mat-expansion-panel>\r\n","import { AsyncPipe, CommonModule } from '@angular/common';\r\nimport { Component, Input, OnInit } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatRadioModule } from '@angular/material/radio';\r\nimport { map, Observable, startWith } from 'rxjs';\r\nimport { InsuredPrincipal } from '../../../models/insured-principal.model';\r\nimport { AppSessionStateService } from '../../../services/app-session-state.service';\r\n\r\n@Component({\r\n    selector: 'app-insured-information',\r\n    imports: [\r\n        MatInputModule,\r\n        MatRadioModule,\r\n        MatExpansionModule,\r\n        MatButtonModule,\r\n        MatAutocompleteModule,\r\n        ReactiveFormsModule,\r\n        CommonModule,\r\n        AsyncPipe,\r\n    ],\r\n    templateUrl: './insured-information.component.html',\r\n    styleUrl: './insured-information.component.scss',\r\n})\r\nexport class InsuredInformationComponent implements OnInit {\r\n    @Input() public insuredForm: FormGroup;\r\n    @Input() public user: InsuredPrincipal;\r\n\r\n    public states: string[] = [\r\n        'AL',\r\n        'AK',\r\n        'AZ',\r\n        'AR',\r\n        'CA',\r\n        'CO',\r\n        'CT',\r\n        'DE',\r\n        'FL',\r\n        'GA',\r\n        'HI',\r\n        'ID',\r\n        'IL',\r\n        'IN',\r\n        'IA',\r\n        'KS',\r\n        'KY',\r\n        'LA',\r\n        'ME',\r\n        'MD',\r\n        'MA',\r\n        'MI',\r\n        'MN',\r\n        'MS',\r\n        'MO',\r\n        'MT',\r\n        'NE',\r\n        'NV',\r\n        'NH',\r\n        'NJ',\r\n        'NM',\r\n        'NY',\r\n        'NC',\r\n        'ND',\r\n        'OH',\r\n        'OK',\r\n        'OR',\r\n        'PA',\r\n        'RI',\r\n        'SC',\r\n        'SD',\r\n        'TN',\r\n        'TX',\r\n        'UT',\r\n        'VT',\r\n        'VA',\r\n        'WA',\r\n        'WV',\r\n        'WI',\r\n        'WY',\r\n    ];\r\n\r\n    public filteredStates: Observable<string[]>;\r\n\r\n    public constructor(private appSessionStateService: AppSessionStateService) {}\r\n\r\n    public ngOnInit(): void {\r\n        const appSessionState = this.appSessionStateService.getState();\r\n\r\n        if (this.user) {\r\n            if (this.user.insureds.length === 0) {\r\n                this.insuredForm.get('id')?.setValue(0);\r\n            } else if (!appSessionState) {\r\n                this.insuredForm.get('id')?.setValue(this.user.insureds[0].id);\r\n            }\r\n        }\r\n\r\n        this.onInsuredChange();\r\n\r\n        const insuredStateControl = this.insuredForm.get('state');\r\n        if (insuredStateControl) {\r\n            this.filteredStates = insuredStateControl.valueChanges.pipe(\r\n                startWith(insuredStateControl.value || ''),\r\n                map((value) => this.filterStates(value || '')),\r\n            );\r\n        }\r\n\r\n        if (appSessionState?.insured) {\r\n            this.insuredForm.patchValue(appSessionState?.insured);\r\n        }\r\n    }\r\n\r\n    public onInsuredChange(): void {\r\n        const id = this.insuredForm.get('id')?.value;\r\n\r\n        if (id === 0) {\r\n            this.insuredForm.get('name')?.enable();\r\n            this.insuredForm.get('firmName')?.enable();\r\n            this.insuredForm.get('ssn')?.enable();\r\n            this.insuredForm.get('secretaryOfStateId')?.enable();\r\n            this.insuredForm.get('responsibleBrokerLastName')?.enable();\r\n            this.insuredForm.get('address')?.enable();\r\n            this.insuredForm.get('city')?.enable();\r\n            this.insuredForm.get('state')?.enable();\r\n            this.insuredForm.get('zipCode')?.enable();\r\n        } else {\r\n            this.insuredForm.get('name')?.reset();\r\n            this.insuredForm.get('firmName')?.reset();\r\n            this.insuredForm.get('ssn')?.reset();\r\n            this.insuredForm.get('secretaryOfStateId')?.reset();\r\n            this.insuredForm.get('responsibleBrokerLastName')?.reset();\r\n            this.insuredForm.get('address')?.reset();\r\n            this.insuredForm.get('city')?.reset();\r\n            this.insuredForm.get('state')?.reset();\r\n            this.insuredForm.get('zipCode')?.reset();\r\n\r\n            this.insuredForm.get('name')?.disable();\r\n            this.insuredForm.get('firmName')?.disable();\r\n            this.insuredForm.get('ssn')?.disable();\r\n            this.insuredForm.get('secretaryOfStateId')?.disable();\r\n            this.insuredForm.get('responsibleBrokerLastName')?.disable();\r\n            this.insuredForm.get('address')?.disable();\r\n            this.insuredForm.get('city')?.disable();\r\n            this.insuredForm.get('state')?.disable();\r\n            this.insuredForm.get('zipCode')?.disable();\r\n        }\r\n    }\r\n\r\n    private filterStates(value: string): string[] {\r\n        const filterValue = value.toLowerCase();\r\n        return this.states.filter((state) => state.toLowerCase().includes(filterValue));\r\n    }\r\n}\r\n","import { HttpClient, HttpParams } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { ConfigurationService } from '../app-configuration/configurationService';\r\nimport { RaterData } from '../models/rater-data.model';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class RaterDataService {\r\n    public constructor(\r\n        private http: HttpClient,\r\n        private configurationService: ConfigurationService,\r\n    ) {}\r\n\r\n    public getRaterData(effectiveDate: Date): Observable<RaterData> {\r\n        const params = new HttpParams().append(\r\n            'effectiveDate',\r\n            effectiveDate.toDateString(),\r\n        );\r\n\r\n        return this.http.get<RaterData>(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/rater-data`,\r\n            { params },\r\n        );\r\n    }\r\n}\r\n","<mat-expansion-panel multi [expanded]=\"true\" [formGroup]=\"licenseForm\">\r\n    <mat-expansion-panel-header>\r\n        <mat-panel-title>Real Estate License</mat-panel-title>\r\n    </mat-expansion-panel-header>\r\n\r\n    <div class=\"row align-items-center\">\r\n        <mat-checkbox formControlName=\"pendingLicense\" class=\"col-md-12 mb-3\">\r\n            Pending\r\n        </mat-checkbox>\r\n    </div>\r\n\r\n    <div class=\"row align-items-center\" *ngIf=\"!licenseForm.get('pendingLicense')?.value\">\r\n        <mat-form-field appearance=\"outline\" class=\"col-md-4\">\r\n            <mat-label>License #</mat-label>\r\n            <input matInput formControlName=\"licenseBody\" />\r\n            <mat-error\r\n                *ngIf=\"\r\n                    licenseForm.get('licenseBody')?.hasError('pattern') &&\r\n                    !licenseForm.get('licenseBody')?.hasError('required')\r\n                \">\r\n                License # must not contain spaces\r\n            </mat-error>\r\n            <mat-error *ngIf=\"licenseForm.get('licenseBody')?.hasError('required')\">\r\n                License # is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n        <mat-form-field appearance=\"outline\" class=\"col-md-4\">\r\n            <mat-label>License Prefix</mat-label>\r\n            <mat-select formControlName=\"licensePrefixId\">\r\n                @for (\r\n                    licensePrefixOption of licensePrefixOptions;\r\n                    track licensePrefixOption.id\r\n                ) {\r\n                    <mat-option [value]=\"licensePrefixOption.id\">{{\r\n                        licensePrefixOption.prefix\r\n                    }}</mat-option>\r\n                }\r\n            </mat-select>\r\n            <mat-error *ngIf=\"licenseForm.get('licensePrefixId')?.hasError('required')\">\r\n                License Prefix is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n        <mat-form-field\r\n            appearance=\"outline\"\r\n            class=\"col-md-4\"\r\n            *ngIf=\"licenseForm.get('licenseTypeId')\">\r\n            <mat-label>License Type</mat-label>\r\n            <mat-select formControlName=\"licenseTypeId\">\r\n                @for (\r\n                    licenseTypeOption of licenseTypeOptions;\r\n                    track licenseTypeOption.id\r\n                ) {\r\n                    <mat-option [value]=\"licenseTypeOption.id\">{{\r\n                        licenseTypeOption.type\r\n                    }}</mat-option>\r\n                }\r\n            </mat-select>\r\n            <mat-error *ngIf=\"licenseForm.get('licenseTypeId')?.hasError('required')\">\r\n                License Type is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n    </div>\r\n</mat-expansion-panel>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, Input, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { LicensePrefixOption, LicenseTypeOption } from '../../../models/rater-data.model';\r\nimport { RaterDataService } from '../../../services/rater-data.service';\r\n\r\n@Component({\r\n    selector: 'app-license-information',\r\n    imports: [\r\n        MatInputModule,\r\n        MatSelectModule,\r\n        MatCheckboxModule,\r\n        MatExpansionModule,\r\n        ReactiveFormsModule,\r\n        CommonModule,\r\n    ],\r\n    templateUrl: './license-information.component.html',\r\n    styleUrl: './license-information.component.scss',\r\n})\r\nexport class LicenseInformationComponent implements OnChanges {\r\n    @Input() public licenseForm: FormGroup;\r\n    @Input() public effectiveDate: Date | null;\r\n\r\n    public licensePrefixOptions: LicensePrefixOption[] = [];\r\n    public licenseTypeOptions: LicenseTypeOption[] = [];\r\n\r\n    public constructor(private raterDataService: RaterDataService) {}\r\n\r\n    public ngOnChanges(changes: SimpleChanges): void {\r\n        if (changes['effectiveDate'] && changes['effectiveDate'].currentValue) {\r\n            this.raterDataService\r\n                .getRaterData(changes['effectiveDate'].currentValue)\r\n                .subscribe((raterData) => {\r\n                    this.licensePrefixOptions = raterData.licensePrefixOptions;\r\n                    this.licenseTypeOptions = raterData.licenseTypeOptions;\r\n                });\r\n        }\r\n    }\r\n}\r\n","import { Component, Input } from '@angular/core';\r\nimport { FormGroup } from '@angular/forms';\r\nimport { InsuredPrincipal } from '../../../models/insured-principal.model';\r\nimport { InsuredInformationComponent } from '../insured-information/insured-information.component';\r\nimport { LicenseInformationComponent } from '../license-information/license-information.component';\r\n\r\n@Component({\r\n    selector: 'app-logged-in',\r\n    imports: [InsuredInformationComponent, LicenseInformationComponent],\r\n    templateUrl: './logged-in.component.html',\r\n    styleUrl: './logged-in.component.scss',\r\n})\r\nexport class LoggedInComponent {\r\n    @Input() public insuredForm: FormGroup;\r\n    @Input() public licenseForm: FormGroup;\r\n    @Input() public effectiveDate: Date | null;\r\n    @Input() public user: InsuredPrincipal;\r\n}\r\n","<div class=\"d-flex flex-column gap-3\">\r\n    <app-insured-information\r\n        [insuredForm]=\"insuredForm\"\r\n        [user]=\"user\"></app-insured-information>\r\n    <app-license-information\r\n        [licenseForm]=\"licenseForm\"\r\n        [effectiveDate]=\"effectiveDate\"></app-license-information>\r\n</div>\r\n","import * as i0 from '@angular/core';\nimport { SecurityContext, Injectable, Optional, Inject, SkipSelf, ErrorHandler, InjectionToken, inject, ElementRef, HostAttributeToken, booleanAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { DOCUMENT } from '@angular/common';\nimport { of, throwError, forkJoin, Subscription } from 'rxjs';\nimport { tap, map, catchError, finalize, share, take } from 'rxjs/operators';\nimport * as i1 from '@angular/common/http';\nimport { HttpClient } from '@angular/common/http';\nimport * as i2 from '@angular/platform-browser';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy() {\n    if (policy === undefined) {\n        policy = null;\n        if (typeof window !== 'undefined') {\n            const ttWindow = window;\n            if (ttWindow.trustedTypes !== undefined) {\n                policy = ttWindow.trustedTypes.createPolicy('angular#components', {\n                    createHTML: (s) => s,\n                });\n            }\n        }\n    }\n    return policy;\n}\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nfunction trustedHTMLFromString(html) {\n    return getPolicy()?.createHTML(html) || html;\n}\n\n/**\n * Returns an exception to be thrown in the case when attempting to\n * load an icon with a name that cannot be found.\n * @docs-private\n */\nfunction getMatIconNameNotFoundError(iconName) {\n    return Error(`Unable to find icon with the name \"${iconName}\"`);\n}\n/**\n * Returns an exception to be thrown when the consumer attempts to use\n * `<mat-icon>` without including @angular/common/http.\n * @docs-private\n */\nfunction getMatIconNoHttpProviderError() {\n    return Error('Could not find HttpClient for use with Angular Material icons. ' +\n        'Please add provideHttpClient() to your providers.');\n}\n/**\n * Returns an exception to be thrown when a URL couldn't be sanitized.\n * @param url URL that was attempted to be sanitized.\n * @docs-private\n */\nfunction getMatIconFailedToSanitizeUrlError(url) {\n    return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL ` +\n        `via Angular's DomSanitizer. Attempted URL was \"${url}\".`);\n}\n/**\n * Returns an exception to be thrown when a HTML string couldn't be sanitized.\n * @param literal HTML that was attempted to be sanitized.\n * @docs-private\n */\nfunction getMatIconFailedToSanitizeLiteralError(literal) {\n    return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by ` +\n        `Angular's DomSanitizer. Attempted literal was \"${literal}\".`);\n}\n/**\n * Configuration for an icon, including the URL and possibly the cached SVG element.\n * @docs-private\n */\nclass SvgIconConfig {\n    url;\n    svgText;\n    options;\n    svgElement;\n    constructor(url, svgText, options) {\n        this.url = url;\n        this.svgText = svgText;\n        this.options = options;\n    }\n}\n/**\n * Service to register and display icons used by the `<mat-icon>` component.\n * - Registers icon URLs by namespace and name.\n * - Registers icon set URLs by namespace.\n * - Registers aliases for CSS classes, for use with icon fonts.\n * - Loads icons from URLs and extracts individual icons from icon sets.\n */\nclass MatIconRegistry {\n    _httpClient;\n    _sanitizer;\n    _errorHandler;\n    _document;\n    /**\n     * URLs and cached SVG elements for individual icons. Keys are of the format \"[namespace]:[icon]\".\n     */\n    _svgIconConfigs = new Map();\n    /**\n     * SvgIconConfig objects and cached SVG elements for icon sets, keyed by namespace.\n     * Multiple icon sets can be registered under the same namespace.\n     */\n    _iconSetConfigs = new Map();\n    /** Cache for icons loaded by direct URLs. */\n    _cachedIconsByUrl = new Map();\n    /** In-progress icon fetches. Used to coalesce multiple requests to the same URL. */\n    _inProgressUrlFetches = new Map();\n    /** Map from font identifiers to their CSS class names. Used for icon fonts. */\n    _fontCssClassesByAlias = new Map();\n    /** Registered icon resolver functions. */\n    _resolvers = [];\n    /**\n     * The CSS classes to apply when an `<mat-icon>` component has no icon name, url, or font\n     * specified. The default 'material-icons' value assumes that the material icon font has been\n     * loaded as described at https://google.github.io/material-design-icons/#icon-font-for-the-web\n     */\n    _defaultFontSetClass = ['material-icons', 'mat-ligature-font'];\n    constructor(_httpClient, _sanitizer, document, _errorHandler) {\n        this._httpClient = _httpClient;\n        this._sanitizer = _sanitizer;\n        this._errorHandler = _errorHandler;\n        this._document = document;\n    }\n    /**\n     * Registers an icon by URL in the default namespace.\n     * @param iconName Name under which the icon should be registered.\n     * @param url\n     */\n    addSvgIcon(iconName, url, options) {\n        return this.addSvgIconInNamespace('', iconName, url, options);\n    }\n    /**\n     * Registers an icon using an HTML string in the default namespace.\n     * @param iconName Name under which the icon should be registered.\n     * @param literal SVG source of the icon.\n     */\n    addSvgIconLiteral(iconName, literal, options) {\n        return this.addSvgIconLiteralInNamespace('', iconName, literal, options);\n    }\n    /**\n     * Registers an icon by URL in the specified namespace.\n     * @param namespace Namespace in which the icon should be registered.\n     * @param iconName Name under which the icon should be registered.\n     * @param url\n     */\n    addSvgIconInNamespace(namespace, iconName, url, options) {\n        return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig(url, null, options));\n    }\n    /**\n     * Registers an icon resolver function with the registry. The function will be invoked with the\n     * name and namespace of an icon when the registry tries to resolve the URL from which to fetch\n     * the icon. The resolver is expected to return a `SafeResourceUrl` that points to the icon,\n     * an object with the icon URL and icon options, or `null` if the icon is not supported. Resolvers\n     * will be invoked in the order in which they have been registered.\n     * @param resolver Resolver function to be registered.\n     */\n    addSvgIconResolver(resolver) {\n        this._resolvers.push(resolver);\n        return this;\n    }\n    /**\n     * Registers an icon using an HTML string in the specified namespace.\n     * @param namespace Namespace in which the icon should be registered.\n     * @param iconName Name under which the icon should be registered.\n     * @param literal SVG source of the icon.\n     */\n    addSvgIconLiteralInNamespace(namespace, iconName, literal, options) {\n        const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n        // TODO: add an ngDevMode check\n        if (!cleanLiteral) {\n            throw getMatIconFailedToSanitizeLiteralError(literal);\n        }\n        // Security: The literal is passed in as SafeHtml, and is thus trusted.\n        const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n        return this._addSvgIconConfig(namespace, iconName, new SvgIconConfig('', trustedLiteral, options));\n    }\n    /**\n     * Registers an icon set by URL in the default namespace.\n     * @param url\n     */\n    addSvgIconSet(url, options) {\n        return this.addSvgIconSetInNamespace('', url, options);\n    }\n    /**\n     * Registers an icon set using an HTML string in the default namespace.\n     * @param literal SVG source of the icon set.\n     */\n    addSvgIconSetLiteral(literal, options) {\n        return this.addSvgIconSetLiteralInNamespace('', literal, options);\n    }\n    /**\n     * Registers an icon set by URL in the specified namespace.\n     * @param namespace Namespace in which to register the icon set.\n     * @param url\n     */\n    addSvgIconSetInNamespace(namespace, url, options) {\n        return this._addSvgIconSetConfig(namespace, new SvgIconConfig(url, null, options));\n    }\n    /**\n     * Registers an icon set using an HTML string in the specified namespace.\n     * @param namespace Namespace in which to register the icon set.\n     * @param literal SVG source of the icon set.\n     */\n    addSvgIconSetLiteralInNamespace(namespace, literal, options) {\n        const cleanLiteral = this._sanitizer.sanitize(SecurityContext.HTML, literal);\n        if (!cleanLiteral) {\n            throw getMatIconFailedToSanitizeLiteralError(literal);\n        }\n        // Security: The literal is passed in as SafeHtml, and is thus trusted.\n        const trustedLiteral = trustedHTMLFromString(cleanLiteral);\n        return this._addSvgIconSetConfig(namespace, new SvgIconConfig('', trustedLiteral, options));\n    }\n    /**\n     * Defines an alias for CSS class names to be used for icon fonts. Creating an matIcon\n     * component with the alias as the fontSet input will cause the class name to be applied\n     * to the `<mat-icon>` element.\n     *\n     * If the registered font is a ligature font, then don't forget to also include the special\n     * class `mat-ligature-font` to allow the usage via attribute. So register like this:\n     *\n     * ```ts\n     * iconRegistry.registerFontClassAlias('f1', 'font1 mat-ligature-font');\n     * ```\n     *\n     * And use like this:\n     *\n     * ```html\n     * <mat-icon fontSet=\"f1\" fontIcon=\"home\"></mat-icon>\n     * ```\n     *\n     * @param alias Alias for the font.\n     * @param classNames Class names override to be used instead of the alias.\n     */\n    registerFontClassAlias(alias, classNames = alias) {\n        this._fontCssClassesByAlias.set(alias, classNames);\n        return this;\n    }\n    /**\n     * Returns the CSS class name associated with the alias by a previous call to\n     * registerFontClassAlias. If no CSS class has been associated, returns the alias unmodified.\n     */\n    classNameForFontAlias(alias) {\n        return this._fontCssClassesByAlias.get(alias) || alias;\n    }\n    /**\n     * Sets the CSS classes to be used for icon fonts when an `<mat-icon>` component does not\n     * have a fontSet input value, and is not loading an icon by name or URL.\n     */\n    setDefaultFontSetClass(...classNames) {\n        this._defaultFontSetClass = classNames;\n        return this;\n    }\n    /**\n     * Returns the CSS classes to be used for icon fonts when an `<mat-icon>` component does not\n     * have a fontSet input value, and is not loading an icon by name or URL.\n     */\n    getDefaultFontSetClass() {\n        return this._defaultFontSetClass;\n    }\n    /**\n     * Returns an Observable that produces the icon (as an `<svg>` DOM element) from the given URL.\n     * The response from the URL may be cached so this will not always cause an HTTP request, but\n     * the produced element will always be a new copy of the originally fetched icon. (That is,\n     * it will not contain any modifications made to elements previously returned).\n     *\n     * @param safeUrl URL from which to fetch the SVG icon.\n     */\n    getSvgIconFromUrl(safeUrl) {\n        const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n        if (!url) {\n            throw getMatIconFailedToSanitizeUrlError(safeUrl);\n        }\n        const cachedIcon = this._cachedIconsByUrl.get(url);\n        if (cachedIcon) {\n            return of(cloneSvg(cachedIcon));\n        }\n        return this._loadSvgIconFromConfig(new SvgIconConfig(safeUrl, null)).pipe(tap(svg => this._cachedIconsByUrl.set(url, svg)), map(svg => cloneSvg(svg)));\n    }\n    /**\n     * Returns an Observable that produces the icon (as an `<svg>` DOM element) with the given name\n     * and namespace. The icon must have been previously registered with addIcon or addIconSet;\n     * if not, the Observable will throw an error.\n     *\n     * @param name Name of the icon to be retrieved.\n     * @param namespace Namespace in which to look for the icon.\n     */\n    getNamedSvgIcon(name, namespace = '') {\n        const key = iconKey(namespace, name);\n        let config = this._svgIconConfigs.get(key);\n        // Return (copy of) cached icon if possible.\n        if (config) {\n            return this._getSvgFromConfig(config);\n        }\n        // Otherwise try to resolve the config from one of the resolver functions.\n        config = this._getIconConfigFromResolvers(namespace, name);\n        if (config) {\n            this._svgIconConfigs.set(key, config);\n            return this._getSvgFromConfig(config);\n        }\n        // See if we have any icon sets registered for the namespace.\n        const iconSetConfigs = this._iconSetConfigs.get(namespace);\n        if (iconSetConfigs) {\n            return this._getSvgFromIconSetConfigs(name, iconSetConfigs);\n        }\n        return throwError(getMatIconNameNotFoundError(key));\n    }\n    ngOnDestroy() {\n        this._resolvers = [];\n        this._svgIconConfigs.clear();\n        this._iconSetConfigs.clear();\n        this._cachedIconsByUrl.clear();\n    }\n    /**\n     * Returns the cached icon for a SvgIconConfig if available, or fetches it from its URL if not.\n     */\n    _getSvgFromConfig(config) {\n        if (config.svgText) {\n            // We already have the SVG element for this icon, return a copy.\n            return of(cloneSvg(this._svgElementFromConfig(config)));\n        }\n        else {\n            // Fetch the icon from the config's URL, cache it, and return a copy.\n            return this._loadSvgIconFromConfig(config).pipe(map(svg => cloneSvg(svg)));\n        }\n    }\n    /**\n     * Attempts to find an icon with the specified name in any of the SVG icon sets.\n     * First searches the available cached icons for a nested element with a matching name, and\n     * if found copies the element to a new `<svg>` element. If not found, fetches all icon sets\n     * that have not been cached, and searches again after all fetches are completed.\n     * The returned Observable produces the SVG element if possible, and throws\n     * an error if no icon with the specified name can be found.\n     */\n    _getSvgFromIconSetConfigs(name, iconSetConfigs) {\n        // For all the icon set SVG elements we've fetched, see if any contain an icon with the\n        // requested name.\n        const namedIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n        if (namedIcon) {\n            // We could cache namedIcon in _svgIconConfigs, but since we have to make a copy every\n            // time anyway, there's probably not much advantage compared to just always extracting\n            // it from the icon set.\n            return of(namedIcon);\n        }\n        // Not found in any cached icon sets. If there are icon sets with URLs that we haven't\n        // fetched, fetch them now and look for iconName in the results.\n        const iconSetFetchRequests = iconSetConfigs\n            .filter(iconSetConfig => !iconSetConfig.svgText)\n            .map(iconSetConfig => {\n            return this._loadSvgIconSetFromConfig(iconSetConfig).pipe(catchError((err) => {\n                const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, iconSetConfig.url);\n                // Swallow errors fetching individual URLs so the\n                // combined Observable won't necessarily fail.\n                const errorMessage = `Loading icon set URL: ${url} failed: ${err.message}`;\n                this._errorHandler.handleError(new Error(errorMessage));\n                return of(null);\n            }));\n        });\n        // Fetch all the icon set URLs. When the requests complete, every IconSet should have a\n        // cached SVG element (unless the request failed), and we can check again for the icon.\n        return forkJoin(iconSetFetchRequests).pipe(map(() => {\n            const foundIcon = this._extractIconWithNameFromAnySet(name, iconSetConfigs);\n            // TODO: add an ngDevMode check\n            if (!foundIcon) {\n                throw getMatIconNameNotFoundError(name);\n            }\n            return foundIcon;\n        }));\n    }\n    /**\n     * Searches the cached SVG elements for the given icon sets for a nested icon element whose \"id\"\n     * tag matches the specified name. If found, copies the nested element to a new SVG element and\n     * returns it. Returns null if no matching element is found.\n     */\n    _extractIconWithNameFromAnySet(iconName, iconSetConfigs) {\n        // Iterate backwards, so icon sets added later have precedence.\n        for (let i = iconSetConfigs.length - 1; i >= 0; i--) {\n            const config = iconSetConfigs[i];\n            // Parsing the icon set's text into an SVG element can be expensive. We can avoid some of\n            // the parsing by doing a quick check using `indexOf` to see if there's any chance for the\n            // icon to be in the set. This won't be 100% accurate, but it should help us avoid at least\n            // some of the parsing.\n            if (config.svgText && config.svgText.toString().indexOf(iconName) > -1) {\n                const svg = this._svgElementFromConfig(config);\n                const foundIcon = this._extractSvgIconFromSet(svg, iconName, config.options);\n                if (foundIcon) {\n                    return foundIcon;\n                }\n            }\n        }\n        return null;\n    }\n    /**\n     * Loads the content of the icon URL specified in the SvgIconConfig and creates an SVG element\n     * from it.\n     */\n    _loadSvgIconFromConfig(config) {\n        return this._fetchIcon(config).pipe(tap(svgText => (config.svgText = svgText)), map(() => this._svgElementFromConfig(config)));\n    }\n    /**\n     * Loads the content of the icon set URL specified in the\n     * SvgIconConfig and attaches it to the config.\n     */\n    _loadSvgIconSetFromConfig(config) {\n        if (config.svgText) {\n            return of(null);\n        }\n        return this._fetchIcon(config).pipe(tap(svgText => (config.svgText = svgText)));\n    }\n    /**\n     * Searches the cached element of the given SvgIconConfig for a nested icon element whose \"id\"\n     * tag matches the specified name. If found, copies the nested element to a new SVG element and\n     * returns it. Returns null if no matching element is found.\n     */\n    _extractSvgIconFromSet(iconSet, iconName, options) {\n        // Use the `id=\"iconName\"` syntax in order to escape special\n        // characters in the ID (versus using the #iconName syntax).\n        const iconSource = iconSet.querySelector(`[id=\"${iconName}\"]`);\n        if (!iconSource) {\n            return null;\n        }\n        // Clone the element and remove the ID to prevent multiple elements from being added\n        // to the page with the same ID.\n        const iconElement = iconSource.cloneNode(true);\n        iconElement.removeAttribute('id');\n        // If the icon node is itself an <svg> node, clone and return it directly. If not, set it as\n        // the content of a new <svg> node.\n        if (iconElement.nodeName.toLowerCase() === 'svg') {\n            return this._setSvgAttributes(iconElement, options);\n        }\n        // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>. Note\n        // that the same could be achieved by referring to it via <use href=\"#id\">, however the <use>\n        // tag is problematic on Firefox, because it needs to include the current page path.\n        if (iconElement.nodeName.toLowerCase() === 'symbol') {\n            return this._setSvgAttributes(this._toSvgElement(iconElement), options);\n        }\n        // createElement('SVG') doesn't work as expected; the DOM ends up with\n        // the correct nodes, but the SVG content doesn't render. Instead we\n        // have to create an empty SVG node using innerHTML and append its content.\n        // Elements created using DOMParser.parseFromString have the same problem.\n        // http://stackoverflow.com/questions/23003278/svg-innerhtml-in-firefox-can-not-display\n        const svg = this._svgElementFromString(trustedHTMLFromString('<svg></svg>'));\n        // Clone the node so we don't remove it from the parent icon set element.\n        svg.appendChild(iconElement);\n        return this._setSvgAttributes(svg, options);\n    }\n    /**\n     * Creates a DOM element from the given SVG string.\n     */\n    _svgElementFromString(str) {\n        const div = this._document.createElement('DIV');\n        div.innerHTML = str;\n        const svg = div.querySelector('svg');\n        // TODO: add an ngDevMode check\n        if (!svg) {\n            throw Error('<svg> tag not found');\n        }\n        return svg;\n    }\n    /**\n     * Converts an element into an SVG node by cloning all of its children.\n     */\n    _toSvgElement(element) {\n        const svg = this._svgElementFromString(trustedHTMLFromString('<svg></svg>'));\n        const attributes = element.attributes;\n        // Copy over all the attributes from the `symbol` to the new SVG, except the id.\n        for (let i = 0; i < attributes.length; i++) {\n            const { name, value } = attributes[i];\n            if (name !== 'id') {\n                svg.setAttribute(name, value);\n            }\n        }\n        for (let i = 0; i < element.childNodes.length; i++) {\n            if (element.childNodes[i].nodeType === this._document.ELEMENT_NODE) {\n                svg.appendChild(element.childNodes[i].cloneNode(true));\n            }\n        }\n        return svg;\n    }\n    /**\n     * Sets the default attributes for an SVG element to be used as an icon.\n     */\n    _setSvgAttributes(svg, options) {\n        svg.setAttribute('fit', '');\n        svg.setAttribute('height', '100%');\n        svg.setAttribute('width', '100%');\n        svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');\n        svg.setAttribute('focusable', 'false'); // Disable IE11 default behavior to make SVGs focusable.\n        if (options && options.viewBox) {\n            svg.setAttribute('viewBox', options.viewBox);\n        }\n        return svg;\n    }\n    /**\n     * Returns an Observable which produces the string contents of the given icon. Results may be\n     * cached, so future calls with the same URL may not cause another HTTP request.\n     */\n    _fetchIcon(iconConfig) {\n        const { url: safeUrl, options } = iconConfig;\n        const withCredentials = options?.withCredentials ?? false;\n        if (!this._httpClient) {\n            throw getMatIconNoHttpProviderError();\n        }\n        // TODO: add an ngDevMode check\n        if (safeUrl == null) {\n            throw Error(`Cannot fetch icon from URL \"${safeUrl}\".`);\n        }\n        const url = this._sanitizer.sanitize(SecurityContext.RESOURCE_URL, safeUrl);\n        // TODO: add an ngDevMode check\n        if (!url) {\n            throw getMatIconFailedToSanitizeUrlError(safeUrl);\n        }\n        // Store in-progress fetches to avoid sending a duplicate request for a URL when there is\n        // already a request in progress for that URL. It's necessary to call share() on the\n        // Observable returned by http.get() so that multiple subscribers don't cause multiple XHRs.\n        const inProgressFetch = this._inProgressUrlFetches.get(url);\n        if (inProgressFetch) {\n            return inProgressFetch;\n        }\n        const req = this._httpClient.get(url, { responseType: 'text', withCredentials }).pipe(map(svg => {\n            // Security: This SVG is fetched from a SafeResourceUrl, and is thus\n            // trusted HTML.\n            return trustedHTMLFromString(svg);\n        }), finalize(() => this._inProgressUrlFetches.delete(url)), share());\n        this._inProgressUrlFetches.set(url, req);\n        return req;\n    }\n    /**\n     * Registers an icon config by name in the specified namespace.\n     * @param namespace Namespace in which to register the icon config.\n     * @param iconName Name under which to register the config.\n     * @param config Config to be registered.\n     */\n    _addSvgIconConfig(namespace, iconName, config) {\n        this._svgIconConfigs.set(iconKey(namespace, iconName), config);\n        return this;\n    }\n    /**\n     * Registers an icon set config in the specified namespace.\n     * @param namespace Namespace in which to register the icon config.\n     * @param config Config to be registered.\n     */\n    _addSvgIconSetConfig(namespace, config) {\n        const configNamespace = this._iconSetConfigs.get(namespace);\n        if (configNamespace) {\n            configNamespace.push(config);\n        }\n        else {\n            this._iconSetConfigs.set(namespace, [config]);\n        }\n        return this;\n    }\n    /** Parses a config's text into an SVG element. */\n    _svgElementFromConfig(config) {\n        if (!config.svgElement) {\n            const svg = this._svgElementFromString(config.svgText);\n            this._setSvgAttributes(svg, config.options);\n            config.svgElement = svg;\n        }\n        return config.svgElement;\n    }\n    /** Tries to create an icon config through the registered resolver functions. */\n    _getIconConfigFromResolvers(namespace, name) {\n        for (let i = 0; i < this._resolvers.length; i++) {\n            const result = this._resolvers[i](name, namespace);\n            if (result) {\n                return isSafeUrlWithOptions(result)\n                    ? new SvgIconConfig(result.url, null, result.options)\n                    : new SvgIconConfig(result, null);\n            }\n        }\n        return undefined;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIconRegistry, deps: [{ token: i1.HttpClient, optional: true }, { token: i2.DomSanitizer }, { token: DOCUMENT, optional: true }, { token: i0.ErrorHandler }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIconRegistry, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIconRegistry, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [{ type: i1.HttpClient, decorators: [{\n                    type: Optional\n                }] }, { type: i2.DomSanitizer }, { type: undefined, decorators: [{\n                    type: Optional\n                }, {\n                    type: Inject,\n                    args: [DOCUMENT]\n                }] }, { type: i0.ErrorHandler }] });\n/** @docs-private */\nfunction ICON_REGISTRY_PROVIDER_FACTORY(parentRegistry, httpClient, sanitizer, errorHandler, document) {\n    return parentRegistry || new MatIconRegistry(httpClient, sanitizer, document, errorHandler);\n}\n/** @docs-private */\nconst ICON_REGISTRY_PROVIDER = {\n    // If there is already an MatIconRegistry available, use that. Otherwise, provide a new one.\n    provide: MatIconRegistry,\n    deps: [\n        [new Optional(), new SkipSelf(), MatIconRegistry],\n        [new Optional(), HttpClient],\n        DomSanitizer,\n        ErrorHandler,\n        [new Optional(), DOCUMENT],\n    ],\n    useFactory: ICON_REGISTRY_PROVIDER_FACTORY,\n};\n/** Clones an SVGElement while preserving type information. */\nfunction cloneSvg(svg) {\n    return svg.cloneNode(true);\n}\n/** Returns the cache key to use for an icon namespace and name. */\nfunction iconKey(namespace, name) {\n    return namespace + ':' + name;\n}\nfunction isSafeUrlWithOptions(value) {\n    return !!(value.url && value.options);\n}\n\n/** Injection token to be used to override the default options for `mat-icon`. */\nconst MAT_ICON_DEFAULT_OPTIONS = new InjectionToken('MAT_ICON_DEFAULT_OPTIONS');\n/**\n * Injection token used to provide the current location to `MatIcon`.\n * Used to handle server-side rendering and to stub out during unit tests.\n * @docs-private\n */\nconst MAT_ICON_LOCATION = new InjectionToken('mat-icon-location', {\n    providedIn: 'root',\n    factory: MAT_ICON_LOCATION_FACTORY,\n});\n/** @docs-private */\nfunction MAT_ICON_LOCATION_FACTORY() {\n    const _document = inject(DOCUMENT);\n    const _location = _document ? _document.location : null;\n    return {\n        // Note that this needs to be a function, rather than a property, because Angular\n        // will only resolve it once, but we want the current path on each call.\n        getPathname: () => (_location ? _location.pathname + _location.search : ''),\n    };\n}\n/** SVG attributes that accept a FuncIRI (e.g. `url(<something>)`). */\nconst funcIriAttributes = [\n    'clip-path',\n    'color-profile',\n    'src',\n    'cursor',\n    'fill',\n    'filter',\n    'marker',\n    'marker-start',\n    'marker-mid',\n    'marker-end',\n    'mask',\n    'stroke',\n];\n/** Selector that can be used to find all elements that are using a `FuncIRI`. */\nconst funcIriAttributeSelector = funcIriAttributes.map(attr => `[${attr}]`).join(', ');\n/** Regex that can be used to extract the id out of a FuncIRI. */\nconst funcIriPattern = /^url\\(['\"]?#(.*?)['\"]?\\)$/;\n/**\n * Component to display an icon. It can be used in the following ways:\n *\n * - Specify the svgIcon input to load an SVG icon from a URL previously registered with the\n *   addSvgIcon, addSvgIconInNamespace, addSvgIconSet, or addSvgIconSetInNamespace methods of\n *   MatIconRegistry. If the svgIcon value contains a colon it is assumed to be in the format\n *   \"[namespace]:[name]\", if not the value will be the name of an icon in the default namespace.\n *   Examples:\n *     `<mat-icon svgIcon=\"left-arrow\"></mat-icon>\n *     <mat-icon svgIcon=\"animals:cat\"></mat-icon>`\n *\n * - Use a font ligature as an icon by putting the ligature text in the `fontIcon` attribute or the\n *   content of the `<mat-icon>` component. If you register a custom font class, don't forget to also\n *   include the special class `mat-ligature-font`. It is recommended to use the attribute alternative\n *   to prevent the ligature text to be selectable and to appear in search engine results.\n *   By default, the Material icons font is used as described at\n *   http://google.github.io/material-design-icons/#icon-font-for-the-web. You can specify an\n *   alternate font by setting the fontSet input to either the CSS class to apply to use the\n *   desired font, or to an alias previously registered with MatIconRegistry.registerFontClassAlias.\n *   Examples:\n *     `<mat-icon fontIcon=\"home\"></mat-icon>\n *     <mat-icon>home</mat-icon>\n *     <mat-icon fontSet=\"myfont\" fontIcon=\"sun\"></mat-icon>\n *     <mat-icon fontSet=\"myfont\">sun</mat-icon>`\n *\n * - Specify a font glyph to be included via CSS rules by setting the fontSet input to specify the\n *   font, and the fontIcon input to specify the icon. Typically the fontIcon will specify a\n *   CSS class which causes the glyph to be displayed via a :before selector, as in\n *   https://fontawesome-v4.github.io/examples/\n *   Example:\n *     `<mat-icon fontSet=\"fa\" fontIcon=\"alarm\"></mat-icon>`\n */\nclass MatIcon {\n    _elementRef = inject(ElementRef);\n    _iconRegistry = inject(MatIconRegistry);\n    _location = inject(MAT_ICON_LOCATION);\n    _errorHandler = inject(ErrorHandler);\n    _defaultColor;\n    /**\n     * Theme color of the icon. This API is supported in M2 themes only, it\n     * has no effect in M3 themes.\n     *\n     * For information on applying color variants in M3, see\n     * https://material.angular.io/guide/theming#using-component-color-variants.\n     */\n    get color() {\n        return this._color || this._defaultColor;\n    }\n    set color(value) {\n        this._color = value;\n    }\n    _color;\n    /**\n     * Whether the icon should be inlined, automatically sizing the icon to match the font size of\n     * the element the icon is contained in.\n     */\n    inline = false;\n    /** Name of the icon in the SVG icon set. */\n    get svgIcon() {\n        return this._svgIcon;\n    }\n    set svgIcon(value) {\n        if (value !== this._svgIcon) {\n            if (value) {\n                this._updateSvgIcon(value);\n            }\n            else if (this._svgIcon) {\n                this._clearSvgElement();\n            }\n            this._svgIcon = value;\n        }\n    }\n    _svgIcon;\n    /** Font set that the icon is a part of. */\n    get fontSet() {\n        return this._fontSet;\n    }\n    set fontSet(value) {\n        const newValue = this._cleanupFontValue(value);\n        if (newValue !== this._fontSet) {\n            this._fontSet = newValue;\n            this._updateFontIconClasses();\n        }\n    }\n    _fontSet;\n    /** Name of an icon within a font set. */\n    get fontIcon() {\n        return this._fontIcon;\n    }\n    set fontIcon(value) {\n        const newValue = this._cleanupFontValue(value);\n        if (newValue !== this._fontIcon) {\n            this._fontIcon = newValue;\n            this._updateFontIconClasses();\n        }\n    }\n    _fontIcon;\n    _previousFontSetClass = [];\n    _previousFontIconClass;\n    _svgName;\n    _svgNamespace;\n    /** Keeps track of the current page path. */\n    _previousPath;\n    /** Keeps track of the elements and attributes that we've prefixed with the current path. */\n    _elementsWithExternalReferences;\n    /** Subscription to the current in-progress SVG icon request. */\n    _currentIconFetch = Subscription.EMPTY;\n    constructor() {\n        const ariaHidden = inject(new HostAttributeToken('aria-hidden'), { optional: true });\n        const defaults = inject(MAT_ICON_DEFAULT_OPTIONS, { optional: true });\n        if (defaults) {\n            if (defaults.color) {\n                this.color = this._defaultColor = defaults.color;\n            }\n            if (defaults.fontSet) {\n                this.fontSet = defaults.fontSet;\n            }\n        }\n        // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is\n        // the right thing to do for the majority of icon use-cases.\n        if (!ariaHidden) {\n            this._elementRef.nativeElement.setAttribute('aria-hidden', 'true');\n        }\n    }\n    /**\n     * Splits an svgIcon binding value into its icon set and icon name components.\n     * Returns a 2-element array of [(icon set), (icon name)].\n     * The separator for the two fields is ':'. If there is no separator, an empty\n     * string is returned for the icon set and the entire value is returned for\n     * the icon name. If the argument is falsy, returns an array of two empty strings.\n     * Throws an error if the name contains two or more ':' separators.\n     * Examples:\n     *   `'social:cake' -> ['social', 'cake']\n     *   'penguin' -> ['', 'penguin']\n     *   null -> ['', '']\n     *   'a:b:c' -> (throws Error)`\n     */\n    _splitIconName(iconName) {\n        if (!iconName) {\n            return ['', ''];\n        }\n        const parts = iconName.split(':');\n        switch (parts.length) {\n            case 1:\n                return ['', parts[0]]; // Use default namespace.\n            case 2:\n                return parts;\n            default:\n                throw Error(`Invalid icon name: \"${iconName}\"`); // TODO: add an ngDevMode check\n        }\n    }\n    ngOnInit() {\n        // Update font classes because ngOnChanges won't be called if none of the inputs are present,\n        // e.g. <mat-icon>arrow</mat-icon> In this case we need to add a CSS class for the default font.\n        this._updateFontIconClasses();\n    }\n    ngAfterViewChecked() {\n        const cachedElements = this._elementsWithExternalReferences;\n        if (cachedElements && cachedElements.size) {\n            const newPath = this._location.getPathname();\n            // We need to check whether the URL has changed on each change detection since\n            // the browser doesn't have an API that will let us react on link clicks and\n            // we can't depend on the Angular router. The references need to be updated,\n            // because while most browsers don't care whether the URL is correct after\n            // the first render, Safari will break if the user navigates to a different\n            // page and the SVG isn't re-rendered.\n            if (newPath !== this._previousPath) {\n                this._previousPath = newPath;\n                this._prependPathToReferences(newPath);\n            }\n        }\n    }\n    ngOnDestroy() {\n        this._currentIconFetch.unsubscribe();\n        if (this._elementsWithExternalReferences) {\n            this._elementsWithExternalReferences.clear();\n        }\n    }\n    _usingFontIcon() {\n        return !this.svgIcon;\n    }\n    _setSvgElement(svg) {\n        this._clearSvgElement();\n        // Note: we do this fix here, rather than the icon registry, because the\n        // references have to point to the URL at the time that the icon was created.\n        const path = this._location.getPathname();\n        this._previousPath = path;\n        this._cacheChildrenWithExternalReferences(svg);\n        this._prependPathToReferences(path);\n        this._elementRef.nativeElement.appendChild(svg);\n    }\n    _clearSvgElement() {\n        const layoutElement = this._elementRef.nativeElement;\n        let childCount = layoutElement.childNodes.length;\n        if (this._elementsWithExternalReferences) {\n            this._elementsWithExternalReferences.clear();\n        }\n        // Remove existing non-element child nodes and SVGs, and add the new SVG element. Note that\n        // we can't use innerHTML, because IE will throw if the element has a data binding.\n        while (childCount--) {\n            const child = layoutElement.childNodes[childCount];\n            // 1 corresponds to Node.ELEMENT_NODE. We remove all non-element nodes in order to get rid\n            // of any loose text nodes, as well as any SVG elements in order to remove any old icons.\n            if (child.nodeType !== 1 || child.nodeName.toLowerCase() === 'svg') {\n                child.remove();\n            }\n        }\n    }\n    _updateFontIconClasses() {\n        if (!this._usingFontIcon()) {\n            return;\n        }\n        const elem = this._elementRef.nativeElement;\n        const fontSetClasses = (this.fontSet\n            ? this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/)\n            : this._iconRegistry.getDefaultFontSetClass()).filter(className => className.length > 0);\n        this._previousFontSetClass.forEach(className => elem.classList.remove(className));\n        fontSetClasses.forEach(className => elem.classList.add(className));\n        this._previousFontSetClass = fontSetClasses;\n        if (this.fontIcon !== this._previousFontIconClass &&\n            !fontSetClasses.includes('mat-ligature-font')) {\n            if (this._previousFontIconClass) {\n                elem.classList.remove(this._previousFontIconClass);\n            }\n            if (this.fontIcon) {\n                elem.classList.add(this.fontIcon);\n            }\n            this._previousFontIconClass = this.fontIcon;\n        }\n    }\n    /**\n     * Cleans up a value to be used as a fontIcon or fontSet.\n     * Since the value ends up being assigned as a CSS class, we\n     * have to trim the value and omit space-separated values.\n     */\n    _cleanupFontValue(value) {\n        return typeof value === 'string' ? value.trim().split(' ')[0] : value;\n    }\n    /**\n     * Prepends the current path to all elements that have an attribute pointing to a `FuncIRI`\n     * reference. This is required because WebKit browsers require references to be prefixed with\n     * the current path, if the page has a `base` tag.\n     */\n    _prependPathToReferences(path) {\n        const elements = this._elementsWithExternalReferences;\n        if (elements) {\n            elements.forEach((attrs, element) => {\n                attrs.forEach(attr => {\n                    element.setAttribute(attr.name, `url('${path}#${attr.value}')`);\n                });\n            });\n        }\n    }\n    /**\n     * Caches the children of an SVG element that have `url()`\n     * references that we need to prefix with the current path.\n     */\n    _cacheChildrenWithExternalReferences(element) {\n        const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);\n        const elements = (this._elementsWithExternalReferences =\n            this._elementsWithExternalReferences || new Map());\n        for (let i = 0; i < elementsWithFuncIri.length; i++) {\n            funcIriAttributes.forEach(attr => {\n                const elementWithReference = elementsWithFuncIri[i];\n                const value = elementWithReference.getAttribute(attr);\n                const match = value ? value.match(funcIriPattern) : null;\n                if (match) {\n                    let attributes = elements.get(elementWithReference);\n                    if (!attributes) {\n                        attributes = [];\n                        elements.set(elementWithReference, attributes);\n                    }\n                    attributes.push({ name: attr, value: match[1] });\n                }\n            });\n        }\n    }\n    /** Sets a new SVG icon with a particular name. */\n    _updateSvgIcon(rawName) {\n        this._svgNamespace = null;\n        this._svgName = null;\n        this._currentIconFetch.unsubscribe();\n        if (rawName) {\n            const [namespace, iconName] = this._splitIconName(rawName);\n            if (namespace) {\n                this._svgNamespace = namespace;\n            }\n            if (iconName) {\n                this._svgName = iconName;\n            }\n            this._currentIconFetch = this._iconRegistry\n                .getNamedSvgIcon(iconName, namespace)\n                .pipe(take(1))\n                .subscribe(svg => this._setSvgElement(svg), (err) => {\n                const errorMessage = `Error retrieving icon ${namespace}:${iconName}! ${err.message}`;\n                this._errorHandler.handleError(new Error(errorMessage));\n            });\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatIcon, isStandalone: true, selector: \"mat-icon\", inputs: { color: \"color\", inline: [\"inline\", \"inline\", booleanAttribute], svgIcon: \"svgIcon\", fontSet: \"fontSet\", fontIcon: \"fontIcon\" }, host: { attributes: { \"role\": \"img\" }, properties: { \"class\": \"color ? \\\"mat-\\\" + color : \\\"\\\"\", \"attr.data-mat-icon-type\": \"_usingFontIcon() ? \\\"font\\\" : \\\"svg\\\"\", \"attr.data-mat-icon-name\": \"_svgName || fontIcon\", \"attr.data-mat-icon-namespace\": \"_svgNamespace || fontSet\", \"attr.fontIcon\": \"_usingFontIcon() ? fontIcon : null\", \"class.mat-icon-inline\": \"inline\", \"class.mat-icon-no-color\": \"color !== \\\"primary\\\" && color !== \\\"accent\\\" && color !== \\\"warn\\\"\" }, classAttribute: \"mat-icon notranslate\" }, exportAs: [\"matIcon\"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [\"mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIcon, decorators: [{\n            type: Component,\n            args: [{ template: '<ng-content></ng-content>', selector: 'mat-icon', exportAs: 'matIcon', host: {\n                        'role': 'img',\n                        'class': 'mat-icon notranslate',\n                        '[class]': 'color ? \"mat-\" + color : \"\"',\n                        '[attr.data-mat-icon-type]': '_usingFontIcon() ? \"font\" : \"svg\"',\n                        '[attr.data-mat-icon-name]': '_svgName || fontIcon',\n                        '[attr.data-mat-icon-namespace]': '_svgNamespace || fontSet',\n                        '[attr.fontIcon]': '_usingFontIcon() ? fontIcon : null',\n                        '[class.mat-icon-inline]': 'inline',\n                        '[class.mat-icon-no-color]': 'color !== \"primary\" && color !== \"accent\" && color !== \"warn\"',\n                    }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [\"mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\"] }]\n        }], ctorParameters: () => [], propDecorators: { color: [{\n                type: Input\n            }], inline: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], svgIcon: [{\n                type: Input\n            }], fontSet: [{\n                type: Input\n            }], fontIcon: [{\n                type: Input\n            }] } });\n\nclass MatIconModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIconModule, imports: [MatCommonModule, MatIcon], exports: [MatIcon, MatCommonModule] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIconModule, imports: [MatCommonModule, MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatIconModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [MatCommonModule, MatIcon],\n                    exports: [MatIcon, MatCommonModule],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ICON_REGISTRY_PROVIDER, ICON_REGISTRY_PROVIDER_FACTORY, MAT_ICON_DEFAULT_OPTIONS, MAT_ICON_LOCATION, MAT_ICON_LOCATION_FACTORY, MatIcon, MatIconModule, MatIconRegistry, getMatIconFailedToSanitizeLiteralError, getMatIconFailedToSanitizeUrlError, getMatIconNameNotFoundError, getMatIconNoHttpProviderError };\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { ConfigurationService } from '../app-configuration/configurationService';\r\nimport { CreateInsured, Insured } from '../models/insured.model';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class InsuredService {\r\n    public constructor(\r\n        private http: HttpClient,\r\n        private configurationService: ConfigurationService,\r\n    ) {}\r\n\r\n    public getInsureds(userId: number): Observable<Insured[]> {\r\n        return this.http.get<Insured[]>(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/users/${userId}/insureds`,\r\n        );\r\n    }\r\n\r\n    public createInsured(insured: CreateInsured): Observable<number> {\r\n        return this.http.post<number>(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/insureds`,\r\n            insured,\r\n        );\r\n    }\r\n}\r\n","<mat-expansion-panel multi [expanded]=\"true\">\r\n    <mat-expansion-panel-header>\r\n        <mat-panel-title>\r\n            Have an account? Log in to use your stored information.</mat-panel-title\r\n        >\r\n    </mat-expansion-panel-header>\r\n\r\n    <form (ngSubmit)=\"login()\" [formGroup]=\"loginForm\">\r\n        <mat-form-field appearance=\"outline\" class=\"w-100\">\r\n            <mat-label>Email</mat-label>\r\n            <input\r\n                type=\"email\"\r\n                matInput\r\n                formControlName=\"email\"\r\n                placeholder=\"Ex. pat@example.com\" />\r\n            <mat-error\r\n                *ngIf=\"\r\n                    loginForm.controls.email.hasError('email') &&\r\n                    !loginForm.controls.email.hasError('required')\r\n                \">\r\n                Please enter a valid email address\r\n            </mat-error>\r\n            <mat-error *ngIf=\"loginForm.controls.email.hasError('required')\">\r\n                Email is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n\r\n        <mat-form-field appearance=\"outline\" class=\"w-100\">\r\n            <mat-label>Password</mat-label>\r\n            <input\r\n                [type]=\"hidePassword ? 'password' : 'text'\"\r\n                matInput\r\n                formControlName=\"password\" />\r\n            <mat-icon matSuffix (click)=\"hidePassword = !hidePassword\">{{\r\n                hidePassword ? 'visibility_off' : 'visibility'\r\n            }}</mat-icon>\r\n            <mat-error *ngIf=\"loginForm.controls.password.hasError('required')\">\r\n                Password is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n\r\n        <div class=\"d-flex justify-content-end\">\r\n            <a mat-button type=\"button\" [routerLink]=\"['/forgot-password']\"\r\n                >Forgot Password</a\r\n            >\r\n            <button\r\n                mat-flat-button\r\n                type=\"submit\"\r\n                [disabled]=\"loginForm.invalid || isRequestProcessing\">\r\n                Log in\r\n            </button>\r\n        </div>\r\n    </form>\r\n</mat-expansion-panel>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component } from '@angular/core';\r\nimport { FormGroup, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { RouterLink } from '@angular/router';\r\nimport { finalize, map, mergeMap } from 'rxjs';\r\nimport { AuthService } from '../../../services/auth.service';\r\nimport { InsuredService } from '../../../services/insured.service';\r\nimport { NotificationService } from '../../../services/notification.service';\r\nimport { SecurityService } from '../../../services/security.service';\r\n\r\n@Component({\r\n    selector: 'app-login',\r\n    imports: [\r\n        MatInputModule,\r\n        MatButtonModule,\r\n        MatIconModule,\r\n        MatExpansionModule,\r\n        ReactiveFormsModule,\r\n        CommonModule,\r\n        RouterLink,\r\n    ],\r\n    templateUrl: './login.component.html',\r\n    styleUrl: './login.component.scss',\r\n})\r\nexport class LoginComponent {\r\n    public loginForm = new FormGroup({\r\n        email: new FormControl('', [Validators.required, Validators.email]),\r\n        password: new FormControl('', [Validators.required]),\r\n    });\r\n\r\n    public hidePassword = true;\r\n    public isRequestProcessing = false;\r\n\r\n    public constructor(\r\n        private authService: AuthService,\r\n        private notificationService: NotificationService,\r\n        private securityService: SecurityService,\r\n        private insuredService: InsuredService,\r\n    ) {}\r\n\r\n    public login(): void {\r\n        this.isRequestProcessing = true;\r\n\r\n        if (\r\n            this.loginForm.valid &&\r\n            this.loginForm.value.email &&\r\n            this.loginForm.value.password\r\n        ) {\r\n            this.authService\r\n                .login(this.loginForm.value.email, this.loginForm.value.password)\r\n                .pipe(\r\n                    mergeMap((principal) => {\r\n                        this.securityService.setToken(principal.token);\r\n\r\n                        return this.insuredService\r\n                            .getInsureds(principal.identity.userId)\r\n                            .pipe(\r\n                                map((insureds) => {\r\n                                    principal.insureds = insureds;\r\n                                    return principal;\r\n                                }),\r\n                            );\r\n                    }),\r\n                    finalize(() => {\r\n                        this.isRequestProcessing = false;\r\n                    }),\r\n                )\r\n                .subscribe({\r\n                    next: (principal) => {\r\n                        this.authService.setCurrentUser(principal);\r\n                    },\r\n                    error: (err) => {\r\n                        this.notificationService.showError(err.error as string);\r\n                    },\r\n                });\r\n        }\r\n    }\r\n}\r\n","<mat-expansion-panel multi [expanded]=\"true\" [formGroup]=\"contactForm\">\r\n    <mat-expansion-panel-header>\r\n        <mat-panel-title>Contact information</mat-panel-title>\r\n    </mat-expansion-panel-header>\r\n\r\n    <mat-form-field appearance=\"outline\" class=\"w-100\">\r\n        <mat-label>Contact Name</mat-label>\r\n        <input matInput formControlName=\"name\" />\r\n        <mat-error *ngIf=\"contactForm.get('name')?.hasError('required')\">\r\n            Contact name is <strong>required</strong>\r\n        </mat-error>\r\n    </mat-form-field>\r\n\r\n    <mat-form-field appearance=\"outline\" class=\"w-100\">\r\n        <mat-label>Phone</mat-label>\r\n        <input matInput formControlName=\"phone\" />\r\n        <mat-error\r\n            *ngIf=\"\r\n                contactForm.get('phone')?.hasError('pattern') &&\r\n                !contactForm.get('phone')?.hasError('required')\r\n            \">\r\n            Invalid phone number format\r\n        </mat-error>\r\n        <mat-error *ngIf=\"contactForm.get('phone')?.hasError('required')\">\r\n            Phone is <strong>required</strong>\r\n        </mat-error>\r\n    </mat-form-field>\r\n\r\n    <mat-form-field appearance=\"outline\" class=\"w-100\">\r\n        <mat-label>Email</mat-label>\r\n        <input\r\n            type=\"email\"\r\n            matInput\r\n            formControlName=\"email\"\r\n            placeholder=\"Ex. pat@example.com\" />\r\n        <mat-error\r\n            *ngIf=\"\r\n                contactForm.get('email')?.hasError('email') &&\r\n                !contactForm.get('email')?.hasError('required')\r\n            \">\r\n            Please enter a valid email address\r\n        </mat-error>\r\n        <mat-error *ngIf=\"contactForm.get('email')?.hasError('required')\">\r\n            Email is <strong>required</strong>\r\n        </mat-error>\r\n    </mat-form-field>\r\n</mat-expansion-panel>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, Input } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatInputModule } from '@angular/material/input';\r\n\r\n@Component({\r\n    selector: 'app-contact-information',\r\n    imports: [MatInputModule, MatExpansionModule, ReactiveFormsModule, CommonModule],\r\n    templateUrl: './contact-information.component.html',\r\n    styleUrl: './contact-information.component.scss',\r\n})\r\nexport class ContactInformationComponent {\r\n    @Input() public contactForm: FormGroup;\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, Input } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { InsuredInformationComponent } from '../insured-information/insured-information.component';\r\nimport { ContactInformationComponent } from './contact-information/contact-information.component';\r\nimport { LicenseInformationComponent } from '../license-information/license-information.component';\r\n\r\n@Component({\r\n    selector: 'app-not-logged-in',\r\n    imports: [\r\n        MatInputModule,\r\n        ReactiveFormsModule,\r\n        CommonModule,\r\n        InsuredInformationComponent,\r\n        ContactInformationComponent,\r\n        LicenseInformationComponent,\r\n    ],\r\n    templateUrl: './not-logged-in.component.html',\r\n    styleUrl: './not-logged-in.component.scss',\r\n})\r\nexport class NotLoggedInComponent {\r\n    @Input() public insuredForm: FormGroup;\r\n    @Input() public contactForm: FormGroup;\r\n    @Input() public licenseForm: FormGroup;\r\n    @Input() public effectiveDate: Date | null;\r\n}\r\n","<div class=\"d-flex flex-column gap-3\">\r\n    <app-insured-information [insuredForm]=\"insuredForm\"></app-insured-information>\r\n    <app-contact-information [contactForm]=\"contactForm\"></app-contact-information>\r\n    <app-license-information\r\n        [licenseForm]=\"licenseForm\"\r\n        [effectiveDate]=\"effectiveDate\"></app-license-information>\r\n</div>\r\n","export interface RaterData {\r\n    coverageOptions: Coverage[];\r\n    additionalCoverageOptions: AdditionalCoverageOption[];\r\n    coverageToAdditionalCoverageOptions: CoverageToAdditionalCoverageOption[];\r\n    conformityOptions: ConformityOption[];\r\n    licensePrefixOptions: LicensePrefixOption[];\r\n    licenseTypeOptions: LicenseTypeOption[];\r\n}\r\n\r\nexport interface Coverage {\r\n    id: number;\r\n    basePremium: number;\r\n    deductible: number;\r\n    limits: string;\r\n    coverage: string;\r\n    isDefault: boolean;\r\n    isForFirm: boolean;\r\n    isForIndividual: boolean;\r\n}\r\n\r\nexport interface IncludedCoverageOption {\r\n    id: number;\r\n    basePremium: number;\r\n    deductible: number;\r\n    limits: string;\r\n    coverage: string;\r\n    requiresLicense: boolean;\r\n    isDefault: boolean;\r\n    isForFirm: boolean;\r\n    isForIndividual: boolean;\r\n}\r\n\r\nexport interface AdditionalCoverageOption {\r\n    id: number;\r\n    basePremium: number;\r\n    deductible: number;\r\n    limits: string;\r\n    coverage: string;\r\n    requiresLicense: boolean;\r\n    isDefault: boolean;\r\n    isForFirm: boolean;\r\n    isForIndividual: boolean;\r\n    invalidLicenseCharge: number;\r\n\r\n    // js\r\n    licenseNum: string;\r\n    isActiveMember: YesNoOption;\r\n    premiumText: string;\r\n}\r\n\r\nexport interface CoverageToAdditionalCoverageOption {\r\n    coverageOptionId: number;\r\n    additionalCoverageOptionId: number;\r\n    limits: string;\r\n    basePremium: string;\r\n}\r\n\r\nexport interface ConformityOption {\r\n    id: number;\r\n    state: string;\r\n    isForFirm: boolean;\r\n    isForIndividual: boolean;\r\n\r\n    // js\r\n    licenseNum: string;\r\n    pendingLicense: boolean;\r\n}\r\n\r\nexport interface LicensePrefixOption {\r\n    id: number;\r\n    prefix: string;\r\n}\r\n\r\nexport interface LicenseTypeOption {\r\n    id: number;\r\n    type: string;\r\n}\r\n\r\nexport enum FirmOption {\r\n    Firm = 'Firm',\r\n    Individual = 'Individual',\r\n}\r\n\r\nexport enum YesNoOption {\r\n    Yes = 'Yes',\r\n    No = 'No',\r\n}\r\n","<div class=\"container d-flex flex-column\">\r\n    <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"authForm\">\r\n        <div class=\"row align-items-center\">\r\n            <div class=\"col-md-12\">\r\n                <h6>Do you wish to enroll as an individual or firm?</h6>\r\n                <mat-radio-group formControlName=\"firmOption\" class=\"d-flex gap-3\">\r\n                    <mat-radio-button [value]=\"firmOption.Individual\"\r\n                        >Individual</mat-radio-button\r\n                    >\r\n                    <mat-radio-button [value]=\"firmOption.Firm\">Firm</mat-radio-button>\r\n                </mat-radio-group>\r\n            </div>\r\n        </div>\r\n        <div class=\"row align-items-center mt-3\">\r\n            <mat-form-field appearance=\"outline\" class=\"col-md-3\">\r\n                <mat-label>Policy Term</mat-label>\r\n                <mat-select formControlName=\"policyTerm\">\r\n                    <mat-option [value]=\"0\">Current Term (2025)</mat-option>\r\n                </mat-select>\r\n            </mat-form-field>\r\n            <mat-form-field appearance=\"outline\" class=\"col-md-3\">\r\n                <mat-label>Policy Effective Date</mat-label>\r\n                <input\r\n                    matInput\r\n                    [matDatepicker]=\"picker\"\r\n                    [min]=\"minEffectiveDate\"\r\n                    [max]=\"maxEffectiveDate\"\r\n                    formControlName=\"effectiveDate\" />\r\n                <mat-datepicker-toggle\r\n                    matIconSuffix\r\n                    [for]=\"picker\"></mat-datepicker-toggle>\r\n                <mat-datepicker #picker></mat-datepicker>\r\n                <mat-error *ngIf=\"authForm.get('effectiveDate')?.hasError('required')\">\r\n                    Effective date is <strong>required</strong>\r\n                </mat-error>\r\n            </mat-form-field>\r\n        </div>\r\n        <app-logged-in\r\n            *ngIf=\"user\"\r\n            [insuredForm]=\"authForm.controls.insuredForm\"\r\n            [licenseForm]=\"authForm.controls.licenseForm\"\r\n            [effectiveDate]=\"authForm.controls.effectiveDate.value\"\r\n            [user]=\"user\"></app-logged-in>\r\n        <div class=\"d-flex flex-column gap-3\">\r\n            <app-login *ngIf=\"!user\"></app-login>\r\n            <app-not-logged-in\r\n                *ngIf=\"!user\"\r\n                [insuredForm]=\"authForm.controls.insuredForm\"\r\n                [contactForm]=\"authForm.controls.contactForm\"\r\n                [licenseForm]=\"authForm.controls.licenseForm\"\r\n                [effectiveDate]=\"\r\n                    authForm.controls.effectiveDate.value\r\n                \"></app-not-logged-in>\r\n        </div>\r\n\r\n        <div class=\"d-flex justify-content-end mt-2\">\r\n            <button mat-flat-button type=\"submit\" [disabled]=\"authForm.invalid\">\r\n                Continue\r\n            </button>\r\n        </div>\r\n    </form>\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatRadioModule } from '@angular/material/radio';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { Router } from '@angular/router';\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs';\r\nimport { LoggedInComponent } from './logged-in/logged-in.component';\r\nimport { LoginComponent } from './login/login.component';\r\nimport { NotLoggedInComponent } from './not-logged-in/not-logged-in.component';\r\nimport { AppSessionState } from '../../models/app-state.model';\r\nimport { InsuredPrincipal } from '../../models/insured-principal.model';\r\nimport { Insured } from '../../models/insured.model';\r\nimport { FirmOption } from '../../models/rater-data.model';\r\nimport { CreateLicense } from '../../models/rater.model';\r\nimport { Contact } from '../../models/user.model';\r\nimport { AppSessionStateService } from '../../services/app-session-state.service';\r\nimport { AppStateService } from '../../services/app-state.service';\r\nimport { QuotingService } from '../../services/quoting.service';\r\n\r\n@Component({\r\n    selector: 'app-auth',\r\n    imports: [\r\n        LoginComponent,\r\n        LoggedInComponent,\r\n        NotLoggedInComponent,\r\n        MatInputModule,\r\n        MatRadioModule,\r\n        MatSelectModule,\r\n        MatCheckboxModule,\r\n        MatButtonModule,\r\n        MatDatepickerModule,\r\n        ReactiveFormsModule,\r\n        CommonModule,\r\n    ],\r\n    templateUrl: './auth.component.html',\r\n    styleUrl: './auth.component.scss',\r\n})\r\nexport class AuthComponent implements OnInit {\r\n    public authForm = new FormGroup({\r\n        firmOption: new FormControl(FirmOption.Individual, [Validators.required]),\r\n        policyTerm: new FormControl(0, [Validators.required]),\r\n        effectiveDate: new FormControl<Date | null>(null, [Validators.required]),\r\n        insuredForm: new FormGroup({\r\n            id: new FormControl(0, [Validators.required]),\r\n            name: new FormControl({ value: '', disabled: true }, [Validators.required]),\r\n            firmName: new FormControl({ value: '', disabled: true }),\r\n            ssn: new FormControl({ value: '', disabled: true }, [\r\n                Validators.required,\r\n                Validators.maxLength(4),\r\n            ]),\r\n            address: new FormControl({ value: '', disabled: true }, [\r\n                Validators.required,\r\n            ]),\r\n            city: new FormControl({ value: '', disabled: true }, [Validators.required]),\r\n            state: new FormControl({ value: '', disabled: true }, [Validators.required]),\r\n            zipCode: new FormControl({ value: '', disabled: true }, [\r\n                Validators.required,\r\n                Validators.pattern('^[0-9]{5}$'),\r\n            ]), // Ensure 5 digits\r\n        }),\r\n        contactForm: new FormGroup({\r\n            name: new FormControl('', [Validators.required]),\r\n            phone: new FormControl('', [\r\n                Validators.required,\r\n                Validators.pattern('^\\\\+?[\\\\d\\\\s\\\\-\\\\(\\\\)]{3,15}$'),\r\n            ]),\r\n            email: new FormControl('', [Validators.required, Validators.email]),\r\n        }),\r\n        licenseForm: new FormGroup({\r\n            pendingLicense: new FormControl(false),\r\n            licenseBody: new FormControl('', [\r\n                Validators.required,\r\n                Validators.pattern(/^\\S*$/),\r\n            ]),\r\n            licensePrefixId: new FormControl<number | null>(null, [Validators.required]),\r\n            licenseTypeId: new FormControl<number | null>(null, [Validators.required]),\r\n        }),\r\n    });\r\n    public firmOption = FirmOption;\r\n    public user: InsuredPrincipal;\r\n    public minEffectiveDate: Date;\r\n    public maxEffectiveDate: Date;\r\n    public appSessionState: AppSessionState | null;\r\n\r\n    public constructor(\r\n        private appStateService: AppStateService,\r\n        private appSessionStateService: AppSessionStateService,\r\n        private quotingService: QuotingService,\r\n        private router: Router,\r\n    ) {\r\n        this.initializeEffectiveDateRange();\r\n    }\r\n\r\n    public ngOnInit(): void {\r\n        this.appStateService.getState$().subscribe((appState) => {\r\n            if (appState?.user) {\r\n                this.user = appState?.user;\r\n\r\n                const contactFormGroup = this.authForm.get('contactForm') as FormGroup;\r\n\r\n                this.resetAndDisable(contactFormGroup);\r\n            }\r\n        });\r\n\r\n        this.onFirmOptionChange();\r\n        this.onInsuredNameChange();\r\n        this.onPendingLicenseChange();\r\n\r\n        this.appSessionState = this.appSessionStateService.getState();\r\n        if (this.appSessionState) {\r\n            this.authForm.patchValue({\r\n                firmOption: this.appSessionState.firmOption,\r\n                policyTerm: this.appSessionState.policyTerm,\r\n                effectiveDate: this.appSessionState.effectiveDate,\r\n                insuredForm: this.appSessionState.insured,\r\n                contactForm: this.appSessionState.contact,\r\n                licenseForm: this.appSessionState.license,\r\n            });\r\n        }\r\n    }\r\n\r\n    public onSubmit(): void {\r\n        if (this.authForm.valid) {\r\n            const expirationDate = new Date(\r\n                // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n                this.authForm.value.effectiveDate!.getFullYear() + 1,\r\n                0,\r\n                1,\r\n            );\r\n\r\n            const appSessionState = {\r\n                firmOption: this.authForm.value.firmOption,\r\n                policyTerm: this.authForm.value.policyTerm,\r\n                effectiveDate: this.authForm.value.effectiveDate,\r\n                expirationDate,\r\n                insured: this.authForm.value.insuredForm as Insured,\r\n                contact: this.authForm.value.contactForm as Contact,\r\n                license: this.authForm.value.licenseForm as CreateLicense,\r\n            } as AppSessionState;\r\n\r\n            this.appSessionStateService.setState(appSessionState);\r\n            this.router.navigate(['/quoting']);\r\n        }\r\n    }\r\n\r\n    private resetAndDisable(formGroup: FormGroup): void {\r\n        Object.keys(formGroup.controls).forEach((key) => {\r\n            const control = formGroup.get(key);\r\n            control?.reset();\r\n            control?.disable();\r\n        });\r\n    }\r\n\r\n    private initializeEffectiveDateRange(): void {\r\n        const today = new Date();\r\n        const currentYear = today.getFullYear();\r\n        const currentMonth = today.getMonth();\r\n\r\n        this.authForm.patchValue({\r\n            effectiveDate: new Date(currentYear, currentMonth, 1),\r\n        });\r\n\r\n        const minDate = new Date();\r\n        minDate.setDate(today.getDate() - 30);\r\n        this.minEffectiveDate = minDate;\r\n\r\n        const maxDate = new Date(currentYear, 11, 31);\r\n        this.maxEffectiveDate = maxDate;\r\n    }\r\n\r\n    private onFirmOptionChange(): void {\r\n        this.authForm.get('firmOption')?.valueChanges.subscribe((firmOption) => {\r\n            const previousFirmOption = this.appSessionState?.firmOption;\r\n\r\n            if (previousFirmOption !== firmOption) {\r\n                this.resetForm(firmOption);\r\n            }\r\n\r\n            const licenseFormGroup = this.authForm.get('licenseForm') as FormGroup;\r\n            const licenseTypeIdControl = licenseFormGroup.get('licenseTypeId');\r\n            const pendingLicense = licenseFormGroup.get('pendingLicense');\r\n\r\n            const insuredFormGroup = this.authForm.get('insuredForm') as FormGroup;\r\n            const firmNameControl = insuredFormGroup.get('firmName');\r\n            const ssnControl = insuredFormGroup.get('ssn');\r\n            const secretaryOfStateIdControl = insuredFormGroup.get('secretaryOfStateId');\r\n            const responsibleBrokerLastNameControl = insuredFormGroup.get(\r\n                'responsibleBrokerLastName',\r\n            );\r\n            const insuredFormDisabled = insuredFormGroup.get('id')?.value !== 0;\r\n\r\n            if (firmOption === FirmOption.Firm) {\r\n                if (licenseTypeIdControl) {\r\n                    licenseFormGroup.removeControl('licenseTypeId');\r\n                }\r\n                if (firmNameControl) {\r\n                    insuredFormGroup.removeControl('firmName');\r\n                }\r\n                if (ssnControl) {\r\n                    insuredFormGroup.removeControl('ssn');\r\n                }\r\n                if (!secretaryOfStateIdControl) {\r\n                    insuredFormGroup.addControl(\r\n                        'secretaryOfStateId',\r\n                        new FormControl({ value: '', disabled: insuredFormDisabled }, [\r\n                            Validators.required,\r\n                        ]),\r\n                    );\r\n                }\r\n                if (!responsibleBrokerLastNameControl) {\r\n                    insuredFormGroup.addControl(\r\n                        'responsibleBrokerLastName',\r\n                        new FormControl({ value: '', disabled: insuredFormDisabled }, [\r\n                            Validators.required,\r\n                        ]),\r\n                    );\r\n                }\r\n            } else if (firmOption === FirmOption.Individual) {\r\n                if (!licenseTypeIdControl) {\r\n                    if (pendingLicense?.value) {\r\n                        licenseFormGroup.addControl(\r\n                            'licenseTypeId',\r\n                            new FormControl(null),\r\n                        );\r\n                    } else {\r\n                        licenseFormGroup.addControl(\r\n                            'licenseTypeId',\r\n                            new FormControl(null, [Validators.required]),\r\n                        );\r\n                    }\r\n                }\r\n\r\n                if (!firmNameControl) {\r\n                    insuredFormGroup.addControl(\r\n                        'firmName',\r\n                        new FormControl({ value: '', disabled: insuredFormDisabled }),\r\n                    );\r\n                }\r\n                if (!ssnControl) {\r\n                    insuredFormGroup.addControl(\r\n                        'ssn',\r\n                        new FormControl({ value: '', disabled: insuredFormDisabled }, [\r\n                            Validators.required,\r\n                            Validators.maxLength(4),\r\n                        ]),\r\n                    );\r\n                }\r\n                if (secretaryOfStateIdControl) {\r\n                    insuredFormGroup.removeControl('secretaryOfStateId');\r\n                }\r\n                if (responsibleBrokerLastNameControl) {\r\n                    insuredFormGroup.removeControl('responsibleBrokerLastName');\r\n                }\r\n            }\r\n        });\r\n    }\r\n\r\n    private onInsuredNameChange(): void {\r\n        this.authForm\r\n            .get('insuredForm.name')\r\n            ?.valueChanges.pipe(debounceTime(3000), distinctUntilChanged())\r\n            .subscribe((insuredName) => {\r\n                if (!this.user) {\r\n                    const firmOption = this.authForm.get('firmOption')?.value;\r\n                    const contactNameControl = this.authForm.get('contactForm.name');\r\n\r\n                    if (\r\n                        firmOption === FirmOption.Individual &&\r\n                        !contactNameControl?.value\r\n                    ) {\r\n                        contactNameControl?.setValue(insuredName, { emitEvent: false });\r\n                    }\r\n                }\r\n            });\r\n    }\r\n\r\n    private onPendingLicenseChange(): void {\r\n        this.authForm\r\n            .get('licenseForm.pendingLicense')\r\n            ?.valueChanges.subscribe((isPending) => {\r\n                const licenseForm = this.authForm.get('licenseForm') as FormGroup;\r\n                const licenseTypeIdControl = licenseForm.get('licenseTypeId');\r\n\r\n                if (isPending) {\r\n                    licenseForm.get('licenseBody')?.setValue('Pending');\r\n                    licenseForm.get('licensePrefixId')?.setValue(1);\r\n                    licenseForm.get('licenseTypeId')?.setValue(null);\r\n\r\n                    licenseTypeIdControl?.removeValidators(Validators.required);\r\n                } else {\r\n                    licenseForm.get('licenseBody')?.setValue('');\r\n                    licenseForm.get('licensePrefixId')?.setValue(null);\r\n                    licenseForm.get('licenseTypeId')?.setValue(null);\r\n\r\n                    licenseTypeIdControl?.addValidators(Validators.required);\r\n                }\r\n\r\n                licenseTypeIdControl?.updateValueAndValidity();\r\n            });\r\n    }\r\n\r\n    private resetForm(firmOption: FirmOption | null): void {\r\n        this.quotingService.clear();\r\n        this.appSessionStateService.clear();\r\n\r\n        this.authForm.reset(\r\n            {\r\n                firmOption,\r\n                policyTerm: 0,\r\n                effectiveDate: null,\r\n                insuredForm: {\r\n                    id: 0,\r\n                    name: '',\r\n                    firmName: '',\r\n                    ssn: '',\r\n                    address: '',\r\n                    city: '',\r\n                    state: '',\r\n                    zipCode: '',\r\n                },\r\n                contactForm: {\r\n                    name: '',\r\n                    phone: '',\r\n                    email: '',\r\n                },\r\n                licenseForm: {\r\n                    pendingLicense: false,\r\n                    licenseBody: '',\r\n                    licensePrefixId: null,\r\n                    licenseTypeId: null,\r\n                },\r\n            },\r\n            { emitEvent: false },\r\n        );\r\n\r\n        this.initializeEffectiveDateRange();\r\n    }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { ConfigurationService } from '../app-configuration/configurationService';\r\nimport { Register, VerificationCodeResponse } from '../models/user.model';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class UserService {\r\n    public constructor(\r\n        private http: HttpClient,\r\n        private configurationService: ConfigurationService,\r\n    ) {}\r\n\r\n    public verificationCodeRequest(userEmail: string): Observable<void> {\r\n        return this.http.post<void>(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/verification-code-request`,\r\n            { userEmail },\r\n        );\r\n    }\r\n\r\n    public verificationCode(\r\n        userEmail: string,\r\n        verificationCode: string,\r\n    ): Observable<VerificationCodeResponse> {\r\n        return this.http.post<VerificationCodeResponse>(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/verification-code`,\r\n            { userEmail, verificationCode },\r\n        );\r\n    }\r\n\r\n    public register(register: Register): Observable<void> {\r\n        return this.http.post<void>(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/register`,\r\n            register,\r\n        );\r\n    }\r\n\r\n    public resetPasswordRequest(email: string): Observable<void> {\r\n        return this.http.post<void>(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/password-reset-request`,\r\n            { email },\r\n        );\r\n    }\r\n\r\n    public resetPassword(password: string, resetCode: string): Observable<void> {\r\n        return this.http.post<void>(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/password-reset`,\r\n            { password, resetCode },\r\n        );\r\n    }\r\n\r\n    public insuredPortalUrl(): Observable<string> {\r\n        return this.http.get(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/insured-portal-url`,\r\n            { responseType: 'text' },\r\n        );\r\n    }\r\n}\r\n","<div class=\"d-flex p-3 ml-33\">\r\n    <form (ngSubmit)=\"requestReset()\" [formGroup]=\"forgotPasswordForm\" class=\"w-50\">\r\n        <mat-form-field appearance=\"outline\">\r\n            <mat-label>Email</mat-label>\r\n            <input\r\n                type=\"email\"\r\n                matInput\r\n                formControlName=\"email\"\r\n                placeholder=\"Ex. pat@example.com\" />\r\n            <mat-hint\r\n                >Please enter your registered email address and we will email you\r\n                instructions on how to reset your password.</mat-hint\r\n            >\r\n            <mat-error\r\n                *ngIf=\"\r\n                    forgotPasswordForm.controls.email.hasError('email') &&\r\n                    !forgotPasswordForm.controls.email.hasError('required')\r\n                \">\r\n                Please enter a valid email address\r\n            </mat-error>\r\n            <mat-error *ngIf=\"forgotPasswordForm.controls.email.hasError('required')\">\r\n                Email is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n\r\n        <div class=\"d-flex justify-content-end mt-4\">\r\n            <button class=\"mx-1\" mat-raised-button [routerLink]=\"['/auth']\">Back</button>\r\n            <button\r\n                mat-flat-button\r\n                type=\"submit\"\r\n                [disabled]=\"forgotPasswordForm.invalid || isRequestProcessing\">\r\n                REQUEST RESET\r\n            </button>\r\n        </div>\r\n    </form>\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component } from '@angular/core';\r\nimport { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { Router, RouterLink } from '@angular/router';\r\nimport { finalize } from 'rxjs';\r\nimport { NotificationService } from '../../../../services/notification.service';\r\nimport { UserService } from '../../../../services/user.service';\r\n\r\n@Component({\r\n    selector: 'app-forgot-password',\r\n    imports: [\r\n        MatInputModule,\r\n        MatButtonModule,\r\n        ReactiveFormsModule,\r\n        CommonModule,\r\n        RouterLink,\r\n    ],\r\n    templateUrl: './forgot-password.component.html',\r\n    styleUrl: './forgot-password.component.scss',\r\n})\r\nexport class ForgotPasswordComponent {\r\n    public forgotPasswordForm = new FormGroup({\r\n        email: new FormControl('', [Validators.required, Validators.email]),\r\n    });\r\n\r\n    public isRequestProcessing = false;\r\n\r\n    public constructor(\r\n        private notificationService: NotificationService,\r\n        private userService: UserService,\r\n        private router: Router,\r\n    ) {}\r\n\r\n    public requestReset(): void {\r\n        this.isRequestProcessing = true;\r\n\r\n        if (this.forgotPasswordForm.valid && this.forgotPasswordForm.value.email) {\r\n            this.userService\r\n                .resetPasswordRequest(this.forgotPasswordForm.value.email)\r\n                .pipe(\r\n                    finalize(() => {\r\n                        this.isRequestProcessing = false;\r\n                    }),\r\n                )\r\n                .subscribe({\r\n                    next: () => {\r\n                        this.notificationService.showInformation(\r\n                            `Instructions have been sent to ${this.forgotPasswordForm.value.email}`,\r\n                        );\r\n                        this.router.navigate(['/auth']);\r\n                    },\r\n                    error: (err) => {\r\n                        this.notificationService.showError(err.error as string);\r\n                    },\r\n                });\r\n        }\r\n    }\r\n}\r\n","import { FormGroup } from '@angular/forms';\r\n\r\nexport function confirmPasswordValidator(\r\n    controlName: string,\r\n    matchingControlName: string,\r\n) {\r\n    return (formGroup: FormGroup): any => {\r\n        const control = formGroup.controls[controlName];\r\n\r\n        const matchingControl = formGroup.controls[matchingControlName];\r\n\r\n        if (matchingControl.errors && !matchingControl.errors['passwordNoMatch']) {\r\n            return;\r\n        }\r\n\r\n        if (control.value !== matchingControl.value) {\r\n            matchingControl.setErrors({ passwordNoMatch: true });\r\n        } else {\r\n            matchingControl.setErrors(null);\r\n        }\r\n    };\r\n}\r\n","<div class=\"d-flex p-3 ml-33\">\r\n    <form (ngSubmit)=\"reset()\" [formGroup]=\"resetPasswordForm\" class=\"w-50\">\r\n        <mat-form-field appearance=\"outline\">\r\n            <mat-label>Enter New Password</mat-label>\r\n            <input\r\n                [type]=\"hidePassword ? 'password' : 'text'\"\r\n                matInput\r\n                formControlName=\"newPassword\" />\r\n            <mat-icon matSuffix (click)=\"hidePassword = !hidePassword\">{{\r\n                hidePassword ? 'visibility_off' : 'visibility'\r\n            }}</mat-icon>\r\n            <mat-hint\r\n                >Password must have at least 8 characters that include at least 1\r\n                lowercase character, 1 uppercase character, 1 number and 1 special\r\n                character.</mat-hint\r\n            >\r\n            <mat-error\r\n                *ngIf=\"resetPasswordForm.controls.newPassword.hasError('required')\">\r\n                New password is <strong>required</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n\r\n        <mat-form-field appearance=\"outline\" class=\"mt-4\">\r\n            <mat-label>Confirm New Password</mat-label>\r\n            <input\r\n                [type]=\"hideConfirmPassword ? 'password' : 'text'\"\r\n                matInput\r\n                formControlName=\"confirmPassword\" />\r\n            <mat-icon matSuffix (click)=\"hideConfirmPassword = !hideConfirmPassword\">{{\r\n                hideConfirmPassword ? 'visibility_off' : 'visibility'\r\n            }}</mat-icon>\r\n            <mat-error\r\n                *ngIf=\"resetPasswordForm.controls.confirmPassword.hasError('required')\">\r\n                Confirm new password is <strong>required</strong>\r\n            </mat-error>\r\n            <mat-error\r\n                *ngIf=\"\r\n                    resetPasswordForm.controls.confirmPassword.hasError('passwordNoMatch')\r\n                \">\r\n                Passwords do not <strong>match</strong>\r\n            </mat-error>\r\n        </mat-form-field>\r\n\r\n        <div class=\"d-flex justify-content-end\">\r\n            <button\r\n                mat-flat-button\r\n                type=\"submit\"\r\n                [disabled]=\"resetPasswordForm.invalid || isRequestProcessing\">\r\n                RESET\r\n            </button>\r\n        </div>\r\n    </form>\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component } from '@angular/core';\r\nimport {\r\n    FormBuilder,\r\n    FormControl,\r\n    FormGroup,\r\n    ReactiveFormsModule,\r\n    Validators,\r\n} from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { finalize } from 'rxjs';\r\nimport { NotificationService } from '../../../../services/notification.service';\r\nimport { UserService } from '../../../../services/user.service';\r\nimport { confirmPasswordValidator } from '../../../../validators/confirm-password.validator';\r\n\r\n@Component({\r\n    selector: 'app-password-reset',\r\n    imports: [\r\n        MatInputModule,\r\n        MatButtonModule,\r\n        MatIconModule,\r\n        ReactiveFormsModule,\r\n        CommonModule,\r\n    ],\r\n    templateUrl: './password-reset.component.html',\r\n    styleUrl: './password-reset.component.scss',\r\n})\r\nexport class PasswordResetComponent {\r\n    public resetPasswordForm = new FormGroup({\r\n        newPassword: new FormControl('', [Validators.required]),\r\n        confirmPassword: new FormControl('', [Validators.required]),\r\n        resetCode: new FormControl('', [Validators.required]),\r\n    });\r\n\r\n    public hidePassword = true;\r\n    public hideConfirmPassword = true;\r\n    public isRequestProcessing = false;\r\n\r\n    public constructor(\r\n        formBuilder: FormBuilder,\r\n        route: ActivatedRoute,\r\n        private router: Router,\r\n        private userService: UserService,\r\n        private notificationService: NotificationService,\r\n    ) {\r\n        route.queryParams.subscribe((params) => {\r\n            this.resetPasswordForm = formBuilder.group(\r\n                {\r\n                    newPassword: new FormControl('', [Validators.required]),\r\n                    confirmPassword: new FormControl('', [Validators.required]),\r\n                    resetCode: new FormControl(params['code'], [Validators.required]),\r\n                },\r\n                {\r\n                    validator: confirmPasswordValidator('newPassword', 'confirmPassword'),\r\n                },\r\n            );\r\n        });\r\n    }\r\n\r\n    public reset(): void {\r\n        this.isRequestProcessing = true;\r\n\r\n        if (\r\n            this.resetPasswordForm.valid &&\r\n            this.resetPasswordForm.value.newPassword &&\r\n            this.resetPasswordForm.value.confirmPassword &&\r\n            this.resetPasswordForm.value.resetCode\r\n        ) {\r\n            this.userService\r\n                .resetPassword(\r\n                    this.resetPasswordForm.value.newPassword,\r\n                    this.resetPasswordForm.value.resetCode,\r\n                )\r\n                .pipe(\r\n                    finalize(() => {\r\n                        this.isRequestProcessing = false;\r\n                    }),\r\n                )\r\n                .subscribe({\r\n                    next: () => {\r\n                        this.notificationService.showInformation(\r\n                            'Password has been successfully changed.',\r\n                        );\r\n                        this.router.navigate(['/auth']);\r\n                    },\r\n                    error: (err) => {\r\n                        this.notificationService.showError(err.error as string);\r\n                    },\r\n                });\r\n        }\r\n    }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { ConfigurationService } from '../app-configuration/configurationService';\r\nimport {\r\n    CalculateRaterPremium,\r\n    CreateRater,\r\n    CreateRaterResponse,\r\n} from '../models/rater.model';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class RaterService {\r\n    public constructor(\r\n        private http: HttpClient,\r\n        private configurationService: ConfigurationService,\r\n    ) {}\r\n\r\n    public createRater(rater: CreateRater): Observable<CreateRaterResponse> {\r\n        return this.http.post<CreateRaterResponse>(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/rater`,\r\n            rater,\r\n        );\r\n    }\r\n\r\n    public calculateRaterPremium(rater: CalculateRaterPremium): Observable<number> {\r\n        return this.http.post<number>(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/rater/rate`,\r\n            rater,\r\n        );\r\n    }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { mergeMap, Observable, of, throwError } from 'rxjs';\r\nimport { AppSessionStateService } from './app-session-state.service';\r\nimport { InsuredService } from './insured.service';\r\nimport { QuotingService } from './quoting.service';\r\nimport { RaterService } from './rater.service';\r\nimport { AppSessionState } from '../models/app-state.model';\r\nimport { InsuredPrincipal } from '../models/insured-principal.model';\r\nimport { CreateInsured, Insured } from '../models/insured.model';\r\nimport { Quoting } from '../models/quoting.model';\r\nimport { FirmOption, YesNoOption } from '../models/rater-data.model';\r\nimport {\r\n    CreateAdditionalCoverageOption,\r\n    CreateConformityOption,\r\n    CreateRater,\r\n} from '../models/rater.model';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class InsuredRaterService {\r\n    public constructor(\r\n        private insuredService: InsuredService,\r\n        private raterService: RaterService,\r\n        private quotingService: QuotingService,\r\n        private appSessionStateService: AppSessionStateService,\r\n    ) {}\r\n\r\n    public createInsuredAndRater(\r\n        quoting: Quoting,\r\n        appSessionState: AppSessionState,\r\n        user: InsuredPrincipal,\r\n    ): Observable<Insured[]> {\r\n        let insuredNum$;\r\n        let insuredState;\r\n\r\n        const insured = appSessionState.insured;\r\n        const userId = user.identity.userId;\r\n\r\n        if (insured.id && insured.id !== 0) {\r\n            insuredState = user.insureds.find((x) => x.id === insured.id)?.state;\r\n            if (!insuredState) {\r\n                return throwError(() => new Error('Insured state is required.'));\r\n            }\r\n            insuredNum$ = of(insured.id);\r\n        } else {\r\n            const createInsured = {\r\n                name: insured.name,\r\n                address: insured.address,\r\n                city: insured.city,\r\n                state: insured.state,\r\n                zipCode: insured.zipCode,\r\n                userId,\r\n                firmName: insured.firmName ?? '',\r\n                ssn: insured.ssn ?? '',\r\n                secretaryOfStateId: insured.secretaryOfStateId ?? '',\r\n                responsibleBrokerLastName: insured.responsibleBrokerLastName ?? '',\r\n            } as CreateInsured;\r\n            insuredState = createInsured.state;\r\n            insuredNum$ = this.insuredService.createInsured(createInsured);\r\n        }\r\n\r\n        return insuredNum$.pipe(\r\n            mergeMap((insuredNum) => {\r\n                const createIncludedCoverageOptions = quoting.includedCoverageOptions.map(\r\n                    (x) =>\r\n                        ({\r\n                            id: x.id,\r\n                            licenseNum: 'Pending',\r\n                            invalidLicenseCharged: false,\r\n                        }) as CreateAdditionalCoverageOption,\r\n                );\r\n                const createAdditionalCoverageOptions =\r\n                    quoting.additionalCoverageOptions.map(\r\n                        (x) =>\r\n                            ({\r\n                                id: x.id,\r\n                                licenseNum: x.licenseNum ?? 'Pending',\r\n                                invalidLicenseCharged: x.isActiveMember\r\n                                    ? x.isActiveMember === YesNoOption.No\r\n                                    : false,\r\n                                hasActiveLicense: x.coverage.startsWith('Appraisal')\r\n                                    ? true\r\n                                    : null,\r\n                                isAppraiser: x.coverage.startsWith('Appraisal')\r\n                                    ? true\r\n                                    : null,\r\n                            }) as CreateAdditionalCoverageOption,\r\n                    );\r\n\r\n                const createRaterRequest = {\r\n                    insuredNum,\r\n                    insuredState,\r\n                    proposedEffectiveDate:\r\n                        this.appSessionStateService.getEffectiveDateWithTimeShift(),\r\n                    proposedExpirationDate:\r\n                        this.appSessionStateService.getExpirationDateWithTimeShift(),\r\n                    premium: quoting.premium,\r\n                    coverageOptionId: quoting.coverage.id,\r\n                    additionalCoverageOptions: createIncludedCoverageOptions.concat(\r\n                        createAdditionalCoverageOptions,\r\n                    ),\r\n                    conformityOptions: quoting.conformityOptions.map(\r\n                        (x) =>\r\n                            ({\r\n                                id: x.id,\r\n                                licenseNum: x.licenseNum ?? 'Pending',\r\n                            }) as CreateConformityOption,\r\n                    ),\r\n                    license: appSessionState.license,\r\n                    isForFirm: appSessionState.firmOption === FirmOption.Firm,\r\n                } as CreateRater;\r\n\r\n                return this.raterService.createRater(createRaterRequest);\r\n            }),\r\n            mergeMap((createRaterResponse) => {\r\n                quoting.qNum = createRaterResponse.qNum;\r\n                quoting.qSuffix = createRaterResponse.qSuffix;\r\n                quoting.premium = createRaterResponse.premium;\r\n                quoting.insuredNum = createRaterResponse.insuredNum;\r\n\r\n                this.quotingService.setQuoting(quoting);\r\n\r\n                if (!insured.id || insured.id === 0) {\r\n                    return this.insuredService.getInsureds(userId);\r\n                }\r\n                return of(user.insureds);\r\n            }),\r\n        );\r\n    }\r\n}\r\n","<div class=\"container d-flex flex-column\">\r\n    <h6>Create User Account to Continue</h6>\r\n    <div class=\"row mt-3\">\r\n        <p class=\"col-md-2 fs-7\">Insured Name:</p>\r\n        <p class=\"col-md-3 fs-7\">{{ appSessionState.insured.name }}</p>\r\n        <p class=\"col-md-2 fs-7\">Contact Name:</p>\r\n        <p class=\"col-md-3 fs-7\">{{ appSessionState.contact.name }}</p>\r\n    </div>\r\n    <div class=\"row\">\r\n        <p class=\"col-md-2 fs-7\">Address:</p>\r\n        <p class=\"col-md-3 fs-7\">{{ appSessionState.insured.address }}</p>\r\n        <p class=\"col-md-2 fs-7\">Email:</p>\r\n        <p class=\"col-md-3 fs-7\">{{ appSessionState.contact.email }}</p>\r\n    </div>\r\n    <div class=\"row\">\r\n        <p class=\"col-md-2 fs-7\">City/State/Zip:</p>\r\n        <p class=\"col-md-3 fs-7\">\r\n            {{ appSessionState.insured.city }}, {{ appSessionState.insured.state }}\r\n            {{ appSessionState.insured.zipCode }}\r\n        </p>\r\n        <p class=\"col-md-2 fs-7\">Phone:</p>\r\n        <p class=\"col-md-3 fs-7\">{{ appSessionState.contact.phone }}</p>\r\n    </div>\r\n    <div class=\"row\">\r\n        <p class=\"col-md-2 fs-7\">License #:</p>\r\n        <p class=\"col-md-3 fs-7\">{{ appSessionState.license.licenseBody }}</p>\r\n    </div>\r\n    <div class=\"row\">\r\n        <p class=\"col-md-2 fs-7\">License Prefix:</p>\r\n        <p class=\"col-md-3 fs-7\">{{ licensePrefix }}</p>\r\n    </div>\r\n    <div class=\"row\" *ngIf=\"licenseType\">\r\n        <p class=\"col-md-2 fs-7\">License Type:</p>\r\n        <p class=\"col-md-3 fs-7\">{{ licenseType }}</p>\r\n    </div>\r\n    <div class=\"row mb-3\">\r\n        <div class=\"col-md-3\">\r\n            <a mat-stroked-button type=\"button\" [routerLink]=\"['/auth']\"\r\n                >Go back and change</a\r\n            >\r\n        </div>\r\n    </div>\r\n\r\n    <ng-container *ngIf=\"!isEmailVerificationComplete\">\r\n        <h6>Email Verification</h6>\r\n        <p class=\"fs-7\">\r\n            We've sent a 6 digit code to your email at\r\n            <strong>{{ appSessionState.contact.email }}</strong>\r\n        </p>\r\n        <form\r\n            class=\"d-flex align-items-center gap-3\"\r\n            (ngSubmit)=\"verify()\"\r\n            [formGroup]=\"verifyForm\">\r\n            <mat-form-field appearance=\"outline\" class=\"w-25\">\r\n                <mat-label>Verification code</mat-label>\r\n                <input matInput formControlName=\"verificationCode\" />\r\n                <mat-error\r\n                    *ngIf=\"\r\n                        verifyForm.controls.verificationCode.hasError('pattern') &&\r\n                        !verifyForm.controls.verificationCode.hasError('required')\r\n                    \">\r\n                    Verification code must be exactly 6 digits.\r\n                </mat-error>\r\n                <mat-error\r\n                    *ngIf=\"verifyForm.controls.verificationCode.hasError('required')\">\r\n                    Verification code is <strong>required</strong>\r\n                </mat-error>\r\n            </mat-form-field>\r\n            <button\r\n                mat-flat-button\r\n                class=\"mb-3\"\r\n                type=\"submit\"\r\n                [disabled]=\"verifyForm.invalid || isRequestProcessing\">\r\n                Verify\r\n            </button>\r\n        </form>\r\n        <div class=\"d-flex align-items-center\">\r\n            <p class=\"mb-0 fs-7\">Didn't get a code? Verify your email address above.</p>\r\n            <button\r\n                mat-button\r\n                type=\"button\"\r\n                [disabled]=\"isRequestProcessing\"\r\n                (click)=\"verificationCodeRequest()\">\r\n                Click here to resend!\r\n            </button>\r\n        </div>\r\n    </ng-container>\r\n    <ng-container *ngIf=\"isEmailVerificationComplete\">\r\n        <h6>Create Password</h6>\r\n        <form (ngSubmit)=\"register()\" [formGroup]=\"registerForm\" class=\"w-35\">\r\n            <mat-form-field appearance=\"outline\" class=\"w-100\">\r\n                <mat-label>Password</mat-label>\r\n                <input\r\n                    [type]=\"hidePassword ? 'password' : 'text'\"\r\n                    matInput\r\n                    formControlName=\"password\" />\r\n                <mat-icon matSuffix (click)=\"hidePassword = !hidePassword\">{{\r\n                    hidePassword ? 'visibility_off' : 'visibility'\r\n                }}</mat-icon>\r\n                <mat-hint\r\n                    >Password must have at least 8 characters that include at least 1\r\n                    lowercase character, 1 uppercase character, 1 number and 1 special\r\n                    character.</mat-hint\r\n                >\r\n                <mat-error *ngIf=\"registerForm.get('password')?.hasError('required')\">\r\n                    Password is <strong>required</strong>\r\n                </mat-error>\r\n            </mat-form-field>\r\n\r\n            <mat-form-field appearance=\"outline\" class=\"mt-5 w-100\">\r\n                <mat-label>Confirm New Password</mat-label>\r\n                <input\r\n                    [type]=\"hideConfirmPassword ? 'password' : 'text'\"\r\n                    matInput\r\n                    formControlName=\"confirmPassword\" />\r\n                <mat-icon\r\n                    matSuffix\r\n                    (click)=\"hideConfirmPassword = !hideConfirmPassword\"\r\n                    >{{ hideConfirmPassword ? 'visibility_off' : 'visibility' }}</mat-icon\r\n                >\r\n                <mat-error\r\n                    *ngIf=\"registerForm.get('confirmPassword')?.hasError('required')\">\r\n                    Confirm new password is <strong>required</strong>\r\n                </mat-error>\r\n                <mat-error\r\n                    *ngIf=\"\r\n                        registerForm.get('confirmPassword')?.hasError('passwordNoMatch')\r\n                    \">\r\n                    Passwords do not <strong>match</strong>\r\n                </mat-error>\r\n            </mat-form-field>\r\n\r\n            <div class=\"d-flex justify-content-end\">\r\n                <button\r\n                    mat-flat-button\r\n                    type=\"submit\"\r\n                    [disabled]=\"registerForm.invalid || isRequestProcessing\">\r\n                    Continue\r\n                </button>\r\n            </div>\r\n        </form>\r\n    </ng-container>\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { HttpStatusCode } from '@angular/common/http';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport {\r\n    FormBuilder,\r\n    FormControl,\r\n    FormGroup,\r\n    ReactiveFormsModule,\r\n    Validators,\r\n} from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { Router, RouterLink } from '@angular/router';\r\nimport { finalize, mergeMap, of } from 'rxjs';\r\nimport { AppSessionState } from '../../../models/app-state.model';\r\nimport { InsuredPrincipal } from '../../../models/insured-principal.model';\r\nimport { Quoting } from '../../../models/quoting.model';\r\nimport { Register } from '../../../models/user.model';\r\nimport { AppSessionStateService } from '../../../services/app-session-state.service';\r\nimport { AuthService } from '../../../services/auth.service';\r\nimport { InsuredRaterService } from '../../../services/insured-rater.service';\r\nimport { InsuredService } from '../../../services/insured.service';\r\nimport { NotificationService } from '../../../services/notification.service';\r\nimport { QuotingService } from '../../../services/quoting.service';\r\nimport { RaterDataService } from '../../../services/rater-data.service';\r\nimport { SecurityService } from '../../../services/security.service';\r\nimport { UserService } from '../../../services/user.service';\r\nimport { confirmPasswordValidator } from '../../../validators/confirm-password.validator';\r\n\r\n@Component({\r\n    selector: 'app-register',\r\n    imports: [\r\n        MatInputModule,\r\n        MatButtonModule,\r\n        MatIconModule,\r\n        MatExpansionModule,\r\n        ReactiveFormsModule,\r\n        CommonModule,\r\n        RouterLink,\r\n    ],\r\n    templateUrl: './register.component.html',\r\n    styleUrl: './register.component.scss',\r\n})\r\nexport class RegisterComponent implements OnInit {\r\n    public verifyForm = new FormGroup({\r\n        verificationCode: new FormControl(null, [\r\n            Validators.required,\r\n            Validators.pattern(/^\\d{6}$/), // Ensures exactly 6 digits\r\n        ]),\r\n    });\r\n\r\n    public registerForm: FormGroup;\r\n\r\n    public appSessionState: AppSessionState;\r\n    public quoting: Quoting;\r\n    public licensePrefix: string;\r\n    public licenseType: string;\r\n\r\n    public hidePassword = true;\r\n    public hideConfirmPassword = true;\r\n    public isRequestProcessing = false;\r\n\r\n    public isEmailVerificationComplete = false;\r\n\r\n    private user: InsuredPrincipal;\r\n\r\n    public constructor(\r\n        private formBuilder: FormBuilder,\r\n        private notificationService: NotificationService,\r\n        private userService: UserService,\r\n        private appSessionStateService: AppSessionStateService,\r\n        private raterDataService: RaterDataService,\r\n        private securityService: SecurityService,\r\n        private insuredService: InsuredService,\r\n        private authService: AuthService,\r\n        private quotingService: QuotingService,\r\n        private insuredRaterService: InsuredRaterService,\r\n        private router: Router,\r\n    ) {\r\n        this.registerForm = formBuilder.group(\r\n            {\r\n                name: new FormControl('', [Validators.required]),\r\n                phone: new FormControl('', [Validators.required]),\r\n                password: new FormControl('', [Validators.required]),\r\n                confirmPassword: new FormControl('', [Validators.required]),\r\n                confirmationToken: new FormControl('', [Validators.required]),\r\n            },\r\n            {\r\n                validator: confirmPasswordValidator('password', 'confirmPassword'),\r\n            },\r\n        );\r\n    }\r\n\r\n    public ngOnInit(): void {\r\n        const appSessionState = this.appSessionStateService.getState();\r\n        if (!appSessionState) {\r\n            return;\r\n        }\r\n\r\n        this.appSessionState = appSessionState;\r\n\r\n        const quoting = this.quotingService.getQuoting();\r\n        if (!quoting) {\r\n            return;\r\n        }\r\n\r\n        this.quoting = quoting;\r\n\r\n        this.registerForm.patchValue({\r\n            name: this.appSessionState.contact.name,\r\n            phone: this.appSessionState.contact.phone,\r\n        });\r\n\r\n        this.raterDataService\r\n            .getRaterData(new Date(appSessionState.effectiveDate))\r\n            .subscribe({\r\n                next: (raterData) => {\r\n                    this.licensePrefix =\r\n                        raterData.licensePrefixOptions.find(\r\n                            (x) => x.id === appSessionState.license.licensePrefixId,\r\n                        )?.prefix ?? '';\r\n                    this.licenseType =\r\n                        raterData.licenseTypeOptions.find(\r\n                            (x) => x.id === appSessionState.license.licenseTypeId,\r\n                        )?.type ?? '';\r\n                },\r\n                error: (err) => {\r\n                    this.notificationService.showError(err.error as string);\r\n                },\r\n            });\r\n\r\n        this.verificationCodeRequest();\r\n    }\r\n\r\n    public verificationCodeRequest(): void {\r\n        this.isRequestProcessing = true;\r\n\r\n        this.userService\r\n            .verificationCodeRequest(this.appSessionState.contact.email)\r\n            .pipe(\r\n                finalize(() => {\r\n                    this.isRequestProcessing = false;\r\n                }),\r\n            )\r\n            .subscribe({\r\n                next: () => {\r\n                    this.notificationService.showInformation(\r\n                        `Verification code have been sent to ${this.appSessionState.contact.email}`,\r\n                    );\r\n                },\r\n                error: (err) => {\r\n                    if (\r\n                        err.status === HttpStatusCode.BadRequest &&\r\n                        err.error === 'ValidVerificationCodeAlreadyExist'\r\n                    ) {\r\n                        this.notificationService.showError(\r\n                            'You have to wait 5 minutes before you can send a new pin',\r\n                        );\r\n                    } else if (err.status === HttpStatusCode.TooManyRequests) {\r\n                        this.notificationService.showError(\r\n                            'Too many attempts. Wait 15 minutes to try again.',\r\n                        );\r\n                    } else {\r\n                        this.notificationService.showError(err.error as string);\r\n                    }\r\n                },\r\n            });\r\n    }\r\n\r\n    public verify(): void {\r\n        if (this.verifyForm.invalid || !this.verifyForm.value.verificationCode) {\r\n            return;\r\n        }\r\n\r\n        this.isRequestProcessing = true;\r\n\r\n        this.userService\r\n            .verificationCode(\r\n                this.appSessionState.contact.email,\r\n                this.verifyForm.value.verificationCode,\r\n            )\r\n            .pipe(\r\n                mergeMap((response) => {\r\n                    if (response.insuredPrincipal) {\r\n                        this.user = response.insuredPrincipal;\r\n                        this.securityService.setToken(this.user.token);\r\n\r\n                        return this.insuredService\r\n                            .getInsureds(this.user.identity.userId)\r\n                            .pipe(\r\n                                mergeMap((insureds) => {\r\n                                    this.user.insureds = insureds;\r\n\r\n                                    const existInsured = insureds.find(\r\n                                        (x) =>\r\n                                            x.name.toLowerCase() ===\r\n                                                this.appSessionState.insured.name.toLowerCase() &&\r\n                                            x.address.toLowerCase() ===\r\n                                                this.appSessionState.insured.address.toLowerCase() &&\r\n                                            x.city.toLowerCase() ===\r\n                                                this.appSessionState.insured.city.toLowerCase() &&\r\n                                            x.state.toLowerCase() ===\r\n                                                this.appSessionState.insured.state.toLowerCase() &&\r\n                                            x.zipCode.toLowerCase() ===\r\n                                                this.appSessionState.insured.zipCode.toLowerCase(),\r\n                                    );\r\n\r\n                                    if (existInsured) {\r\n                                        this.appSessionState.insured = existInsured;\r\n                                    }\r\n\r\n                                    return this.insuredRaterService.createInsuredAndRater(\r\n                                        this.quoting,\r\n                                        this.appSessionState,\r\n                                        this.user,\r\n                                    );\r\n                                }),\r\n                            );\r\n                    } else if (response.confirmationToken) {\r\n                        this.isEmailVerificationComplete = true;\r\n\r\n                        this.registerForm.patchValue({\r\n                            confirmationToken: response.confirmationToken,\r\n                        });\r\n                    }\r\n\r\n                    return of(null);\r\n                }),\r\n                finalize(() => {\r\n                    this.isRequestProcessing = false;\r\n                }),\r\n            )\r\n            .subscribe({\r\n                next: (insureds) => {\r\n                    if (insureds) {\r\n                        this.user.insureds = insureds;\r\n                    }\r\n\r\n                    this.appSessionStateService.setProperty(\r\n                        'insured',\r\n                        this.appSessionState.insured,\r\n                    );\r\n\r\n                    if (this.user) {\r\n                        this.authService.setCurrentUser(this.user);\r\n                        this.router.navigate(['/summary']);\r\n                    }\r\n                },\r\n                error: (err) => {\r\n                    if (\r\n                        err.status === HttpStatusCode.BadRequest &&\r\n                        err.error === 'InvalidVerificationCode'\r\n                    ) {\r\n                        this.notificationService.showError('Invalid verification code');\r\n                    } else if (err.status === HttpStatusCode.TooManyRequests) {\r\n                        this.notificationService.showError(\r\n                            'Too many attempts. Wait 15 minutes to try again.',\r\n                        );\r\n                    } else {\r\n                        this.notificationService.showError(err.error as string);\r\n                    }\r\n\r\n                    this.securityService.removeToken();\r\n                },\r\n            });\r\n    }\r\n\r\n    public register(): void {\r\n        this.isRequestProcessing = true;\r\n\r\n        if (this.registerForm.valid) {\r\n            const register = {\r\n                password: this.registerForm.value.password,\r\n                name: this.appSessionState.contact.name,\r\n                phone: this.appSessionState.contact.phone,\r\n                confirmationToken: this.registerForm.value.confirmationToken,\r\n            } as Register;\r\n\r\n            this.userService\r\n                .register(register)\r\n                .pipe(\r\n                    mergeMap(() => {\r\n                        return this.authService.login(\r\n                            this.appSessionState.contact.email,\r\n                            this.registerForm.value.password,\r\n                        );\r\n                    }),\r\n                    mergeMap((principal) => {\r\n                        this.user = principal;\r\n                        this.securityService.setToken(principal.token);\r\n\r\n                        return this.insuredService.getInsureds(this.user.identity.userId);\r\n                    }),\r\n                    mergeMap((insureds) => {\r\n                        this.user.insureds = insureds;\r\n\r\n                        return this.insuredRaterService.createInsuredAndRater(\r\n                            this.quoting,\r\n                            this.appSessionState,\r\n                            this.user,\r\n                        );\r\n                    }),\r\n                    finalize(() => {\r\n                        this.isRequestProcessing = false;\r\n                    }),\r\n                )\r\n                .subscribe({\r\n                    next: (insureds) => {\r\n                        if (insureds) {\r\n                            this.user.insureds = insureds;\r\n                        }\r\n                        this.authService.setCurrentUser(this.user);\r\n                        this.router.navigate(['/summary']);\r\n                    },\r\n                    error: (err) => {\r\n                        this.notificationService.showError(err.error as string);\r\n\r\n                        this.authService.logOut();\r\n                    },\r\n                });\r\n        }\r\n    }\r\n}\r\n","<div class=\"container-fluid d-flex vh-100\">\r\n    <div *ngIf=\"configMode; else landingContent\">\r\n        <div class=\"row flex-grow-1\">\r\n            <div\r\n                class=\"col-md-6 col-12 offset-md-3 d-flex flex-column align-items-center justify-content-center\">\r\n                <img src=\"wug_logo.png\" alt=\"Logo\" class=\"mx-5 img-fluid\" width=\"300\" />\r\n                <p>\r\n                    To better serve you, our online portal is temporarily offline\r\n                    undergoing upgrades. The online portal will be unavailable for a short\r\n                    period of time but will return very soon.\r\n                </p>\r\n                <p>\r\n                    Please note that once the upgraded online portal is up and running,\r\n                    any existing usernames and passwords will no longer be valid. We\r\n                    apologize for this inconvenience. We are working to build a better\r\n                    user experience for you, our customers, and provide you with\r\n                    additional options.\r\n                </p>\r\n                <p>\r\n                    New policy purchasers will need to create a username and password. Any\r\n                    existing or prior customers will be able to set up new username and\r\n                    passwords at Renewal time. Renewals for the 2026 policy period will be\r\n                    available in Fall 2025.\r\n                </p>\r\n                <p>\r\n                    In the meantime, if you have any questions, please do not hesitate to\r\n                    reach out to our office via email at\r\n                    <a href=\"mailto:wug@wugieo.com\">wugieo</a> or via phone at\r\n                    <a href=\"tel:(800) 222-4035\">(800) 222-4035</a>.\r\n                </p>\r\n            </div>\r\n        </div>\r\n    </div>\r\n    <ng-template #landingContent>\r\n        <div class=\"row flex-grow-1\">\r\n            <div\r\n                class=\"col-12 col-md-6 d-flex flex-column justify-content-center align-items-center position-relative bg-image pl-0\">\r\n                <img\r\n                    src=\"wug_logo_white.png\"\r\n                    alt=\"Logo\"\r\n                    class=\"position-absolute top-0 start-0 mx-5 my-3 img-fluid w-35\" />\r\n                <img\r\n                    src=\"landing_page.webp\"\r\n                    alt=\"Real Estate Meeting\"\r\n                    class=\"img-fluid h-100 w-100 object-fit-cover\" />\r\n            </div>\r\n\r\n            <div class=\"col-12 col-md-6 d-flex flex-column px-4 pt-4\">\r\n                <h2 class=\"fw-bold\">COLORADO</h2>\r\n                <h6>Real Estate Brokers Professional Liability</h6>\r\n                <div class=\"mt-auto\">\r\n                    <p class=\"fs-5\">\r\n                        Real Estate Licensee Errors and Omissions Enrollment\r\n                    </p>\r\n                    <p class=\"mt-3 fw-bold\">What You Will Need to Enroll Online:</p>\r\n                </div>\r\n                <ul class=\"small\">\r\n                    <li>\r\n                        <strong\r\n                            >An active Real Estate License number or applying for an\r\n                            active Real Estate License number</strong\r\n                        >\r\n                        <ul>\r\n                            <li>If you are a new licensee, you can choose “Pending”.</li>\r\n                        </ul>\r\n                    </li>\r\n                    <li>\r\n                        <strong>Responsible Broker Requirements</strong>\r\n                        <ul>\r\n                            <li>\r\n                                If you are the Responsible Broker of a Firm that is a\r\n                                Corporation, LLC, or Partnership with Licensees attached\r\n                                to your Firm, you must have\r\n                                <strong><u>both</u></strong> Individual and Entity\r\n                                coverage.\r\n                            </li>\r\n                            <li>\r\n                                If you are a Sole Proprietor / Trade Name, only coverage\r\n                                for your individual license is required.\r\n                            </li>\r\n                        </ul>\r\n                    </li>\r\n                    <li>\r\n                        <strong>Entity Real Estate License Number</strong>\r\n                        <ul>\r\n                            <li>\r\n                                Required if enrolling a Corporation, Partnership, or LLC\r\n                                (not Tax ID number).\r\n                            </li>\r\n                            <li>Secretary of State ID Number.</li>\r\n                        </ul>\r\n                    </li>\r\n                    <li>\r\n                        <strong>State Mandated Insurance Programs Certification</strong>\r\n                        <ul>\r\n                            <li>\r\n                                License Number(s) for each state if certification is\r\n                                required.\r\n                            </li>\r\n                        </ul>\r\n                    </li>\r\n                    <li>\r\n                        <strong>Payment Method</strong>\r\n                        <ul>\r\n                            <li>\r\n                                We accept Discover, MasterCard, Visa, or American Express\r\n                                with a $5.00 technology fee.\r\n                            </li>\r\n                            <li>\r\n                                We now accept ACH Payments with a $3.00 technology fee.\r\n                            </li>\r\n                        </ul>\r\n                    </li>\r\n                </ul>\r\n                <p class=\"small\"><strong>NOTICE:</strong></p>\r\n                <ul class=\"small\">\r\n                    <li>\r\n                        <strong>Non-Resident Licensees</strong>\r\n                        <ul>\r\n                            <li>\r\n                                Coverage under this program only applies to real estate\r\n                                activities, as defined in the policy, occurring in the\r\n                                mandated state program in which you are applying for\r\n                                coverage.\r\n                            </li>\r\n                        </ul>\r\n                    </li>\r\n                    <li>\r\n                        <strong>Appraisers</strong>\r\n                        <ul>\r\n                            <li>\r\n                                Individuals that only hold an Appraisers license are not\r\n                                eligible for coverage.\r\n                            </li>\r\n                        </ul>\r\n                    </li>\r\n                    <li>\r\n                        <strong>Premium Policy</strong>\r\n                        <ul>\r\n                            <li>\r\n                                Premium is fully earned when coverage goes into effect.\r\n                                There are no refunds.\r\n                            </li>\r\n                        </ul>\r\n                    </li>\r\n                </ul>\r\n\r\n                <div class=\"row align-items-center mb-3\">\r\n                    <mat-checkbox [(ngModel)]=\"termsAccepted\" class=\"col-md-12\">\r\n                        I have read the above and agree to the Terms Identified.\r\n                    </mat-checkbox>\r\n                </div>\r\n\r\n                <div class=\"row gap-3 mb-3\">\r\n                    <button\r\n                        mat-flat-button\r\n                        class=\"col-md-3\"\r\n                        color=\"primary\"\r\n                        [routerLink]=\"'/auth'\"\r\n                        [disabled]=\"!termsAccepted\">\r\n                        Enroll Now\r\n                    </button>\r\n                    <a\r\n                        mat-raised-button\r\n                        class=\"col-md-5\"\r\n                        color=\"primary\"\r\n                        [href]=\"insuredPortalUrl\"\r\n                        >Manage Existing Policies</a\r\n                    >\r\n                </div>\r\n\r\n                <div class=\"mt-auto small text-muted text-center row\">\r\n                    <p class=\"col-md-4 d-flex flex-column\">\r\n                        <span><strong>Street Address:</strong></span>\r\n                        <span>4211 Norbourne Blvd, Louisville, KY 40207</span>\r\n                    </p>\r\n                    <p class=\"col-md-4 d-flex flex-column\">\r\n                        <span><strong>Phone:</strong></span> <span>(800) 222-4035</span\r\n                        ><span>(502) 708-3157</span>\r\n                    </p>\r\n                    <p class=\"col-md-4 d-flex flex-column\">\r\n                        <span><strong>Email:</strong></span>\r\n                        <span>{{ 'wug@wugieo.com' }}</span>\r\n                    </p>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </ng-template>\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { RouterLink } from '@angular/router';\r\nimport { UserService } from '../../services/user.service';\r\n\r\n@Component({\r\n    selector: 'app-landing-page',\r\n    imports: [MatButtonModule, MatCheckboxModule, FormsModule, CommonModule, RouterLink],\r\n    templateUrl: './landing-page.component.html',\r\n    styleUrl: './landing-page.component.scss',\r\n})\r\nexport class LandingPageComponent implements OnInit {\r\n    public insuredPortalUrl: string;\r\n    public termsAccepted = false;\r\n    public configMode = true;\r\n\r\n    public constructor(private userService: UserService) {}\r\n\r\n    public ngOnInit(): void {\r\n        this.userService\r\n            .insuredPortalUrl()\r\n            .subscribe((url) => (this.insuredPortalUrl = url));\r\n    }\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { RouterOutlet } from '@angular/router';\r\n\r\n@Component({\r\n    selector: 'app-layout',\r\n    imports: [RouterOutlet],\r\n    templateUrl: './layout.component.html',\r\n    styleUrl: './layout.component.scss',\r\n})\r\nexport class LayoutComponent {}\r\n","<div class=\"container-fluid vh-100\">\r\n    <div class=\"row align-items-center\">\r\n        <div class=\"col-md-4 text-md-start text-center\">\r\n            <img src=\"wug_logo.png\" alt=\"logo\" class=\"img-fluid w-50\" />\r\n        </div>\r\n        <div class=\"offset-md-1 col-md-7 text-md-start text-center\">\r\n            <h1>COLORADO</h1>\r\n            <h6 class=\"mb-0\">Real Estate Brokers Professional Liability</h6>\r\n        </div>\r\n    </div>\r\n    <router-outlet></router-outlet>\r\n</div>\r\n","import { Directionality } from '@angular/cdk/bidi';\nimport { _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy, isDataSource, _ViewRepeaterOperation, _DisposeViewRepeaterStrategy } from '@angular/cdk/collections';\nexport { DataSource } from '@angular/cdk/collections';\nimport { Platform } from '@angular/cdk/platform';\nimport { ViewportRuler, ScrollingModule } from '@angular/cdk/scrolling';\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, inject, TemplateRef, Directive, booleanAttribute, Input, ContentChild, ElementRef, NgZone, Injectable, IterableDiffers, ViewContainerRef, Component, ChangeDetectionStrategy, ViewEncapsulation, EmbeddedViewRef, ChangeDetectorRef, EventEmitter, Injector, HostAttributeToken, afterNextRender, Output, ContentChildren, ViewChild, NgModule } from '@angular/core';\nimport { Subject, BehaviorSubject, isObservable, of } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\n\n/**\n * Used to provide a table to some of the sub-components without causing a circular dependency.\n * @docs-private\n */\nconst CDK_TABLE = new InjectionToken('CDK_TABLE');\n/** Injection token that can be used to specify the text column options. */\nconst TEXT_COLUMN_OPTIONS = new InjectionToken('text-column-options');\n\n/**\n * Cell definition for a CDK table.\n * Captures the template of a column's data row cell as well as cell-specific properties.\n */\nclass CdkCellDef {\n    /** @docs-private */\n    template = inject(TemplateRef);\n    constructor() { }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkCellDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkCellDef, isStandalone: true, selector: \"[cdkCellDef]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkCellDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkCellDef]',\n                }]\n        }], ctorParameters: () => [] });\n/**\n * Header cell definition for a CDK table.\n * Captures the template of a column's header cell and as well as cell-specific properties.\n */\nclass CdkHeaderCellDef {\n    /** @docs-private */\n    template = inject(TemplateRef);\n    constructor() { }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkHeaderCellDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkHeaderCellDef, isStandalone: true, selector: \"[cdkHeaderCellDef]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkHeaderCellDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkHeaderCellDef]',\n                }]\n        }], ctorParameters: () => [] });\n/**\n * Footer cell definition for a CDK table.\n * Captures the template of a column's footer cell and as well as cell-specific properties.\n */\nclass CdkFooterCellDef {\n    /** @docs-private */\n    template = inject(TemplateRef);\n    constructor() { }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkFooterCellDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkFooterCellDef, isStandalone: true, selector: \"[cdkFooterCellDef]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkFooterCellDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkFooterCellDef]',\n                }]\n        }], ctorParameters: () => [] });\n/**\n * Column definition for the CDK table.\n * Defines a set of cells available for a table column.\n */\nclass CdkColumnDef {\n    _table = inject(CDK_TABLE, { optional: true });\n    _hasStickyChanged = false;\n    /** Unique name for this column. */\n    get name() {\n        return this._name;\n    }\n    set name(name) {\n        this._setNameInput(name);\n    }\n    _name;\n    /** Whether the cell is sticky. */\n    get sticky() {\n        return this._sticky;\n    }\n    set sticky(value) {\n        if (value !== this._sticky) {\n            this._sticky = value;\n            this._hasStickyChanged = true;\n        }\n    }\n    _sticky = false;\n    /**\n     * Whether this column should be sticky positioned on the end of the row. Should make sure\n     * that it mimics the `CanStick` mixin such that `_hasStickyChanged` is set to true if the value\n     * has been changed.\n     */\n    get stickyEnd() {\n        return this._stickyEnd;\n    }\n    set stickyEnd(value) {\n        if (value !== this._stickyEnd) {\n            this._stickyEnd = value;\n            this._hasStickyChanged = true;\n        }\n    }\n    _stickyEnd = false;\n    /** @docs-private */\n    cell;\n    /** @docs-private */\n    headerCell;\n    /** @docs-private */\n    footerCell;\n    /**\n     * Transformed version of the column name that can be used as part of a CSS classname. Excludes\n     * all non-alphanumeric characters and the special characters '-' and '_'. Any characters that\n     * do not match are replaced by the '-' character.\n     */\n    cssClassFriendlyName;\n    /**\n     * Class name for cells in this column.\n     * @docs-private\n     */\n    _columnCssClassName;\n    constructor() { }\n    /** Whether the sticky state has changed. */\n    hasStickyChanged() {\n        const hasStickyChanged = this._hasStickyChanged;\n        this.resetStickyChanged();\n        return hasStickyChanged;\n    }\n    /** Resets the sticky changed state. */\n    resetStickyChanged() {\n        this._hasStickyChanged = false;\n    }\n    /**\n     * Overridable method that sets the css classes that will be added to every cell in this\n     * column.\n     * In the future, columnCssClassName will change from type string[] to string and this\n     * will set a single string value.\n     * @docs-private\n     */\n    _updateColumnCssClassName() {\n        this._columnCssClassName = [`cdk-column-${this.cssClassFriendlyName}`];\n    }\n    /**\n     * This has been extracted to a util because of TS 4 and VE.\n     * View Engine doesn't support property rename inheritance.\n     * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n     * @docs-private\n     */\n    _setNameInput(value) {\n        // If the directive is set without a name (updated programmatically), then this setter will\n        // trigger with an empty string and should not overwrite the programmatically set value.\n        if (value) {\n            this._name = value;\n            this.cssClassFriendlyName = value.replace(/[^a-z0-9_-]/gi, '-');\n            this._updateColumnCssClassName();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkColumnDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: CdkColumnDef, isStandalone: true, selector: \"[cdkColumnDef]\", inputs: { name: [\"cdkColumnDef\", \"name\"], sticky: [\"sticky\", \"sticky\", booleanAttribute], stickyEnd: [\"stickyEnd\", \"stickyEnd\", booleanAttribute] }, providers: [{ provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef }], queries: [{ propertyName: \"cell\", first: true, predicate: CdkCellDef, descendants: true }, { propertyName: \"headerCell\", first: true, predicate: CdkHeaderCellDef, descendants: true }, { propertyName: \"footerCell\", first: true, predicate: CdkFooterCellDef, descendants: true }], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkColumnDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkColumnDef]',\n                    providers: [{ provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef }],\n                }]\n        }], ctorParameters: () => [], propDecorators: { name: [{\n                type: Input,\n                args: ['cdkColumnDef']\n            }], sticky: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], stickyEnd: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], cell: [{\n                type: ContentChild,\n                args: [CdkCellDef]\n            }], headerCell: [{\n                type: ContentChild,\n                args: [CdkHeaderCellDef]\n            }], footerCell: [{\n                type: ContentChild,\n                args: [CdkFooterCellDef]\n            }] } });\n/** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */\nclass BaseCdkCell {\n    constructor(columnDef, elementRef) {\n        elementRef.nativeElement.classList.add(...columnDef._columnCssClassName);\n    }\n}\n/** Header cell template container that adds the right classes and role. */\nclass CdkHeaderCell extends BaseCdkCell {\n    constructor() {\n        super(inject(CdkColumnDef), inject(ElementRef));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkHeaderCell, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkHeaderCell, isStandalone: true, selector: \"cdk-header-cell, th[cdk-header-cell]\", host: { attributes: { \"role\": \"columnheader\" }, classAttribute: \"cdk-header-cell\" }, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkHeaderCell, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'cdk-header-cell, th[cdk-header-cell]',\n                    host: {\n                        'class': 'cdk-header-cell',\n                        'role': 'columnheader',\n                    },\n                }]\n        }], ctorParameters: () => [] });\n/** Footer cell template container that adds the right classes and role. */\nclass CdkFooterCell extends BaseCdkCell {\n    constructor() {\n        const columnDef = inject(CdkColumnDef);\n        const elementRef = inject(ElementRef);\n        super(columnDef, elementRef);\n        const role = columnDef._table?._getCellRole();\n        if (role) {\n            elementRef.nativeElement.setAttribute('role', role);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkFooterCell, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkFooterCell, isStandalone: true, selector: \"cdk-footer-cell, td[cdk-footer-cell]\", host: { classAttribute: \"cdk-footer-cell\" }, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkFooterCell, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'cdk-footer-cell, td[cdk-footer-cell]',\n                    host: {\n                        'class': 'cdk-footer-cell',\n                    },\n                }]\n        }], ctorParameters: () => [] });\n/** Cell template container that adds the right classes and role. */\nclass CdkCell extends BaseCdkCell {\n    constructor() {\n        const columnDef = inject(CdkColumnDef);\n        const elementRef = inject(ElementRef);\n        super(columnDef, elementRef);\n        const role = columnDef._table?._getCellRole();\n        if (role) {\n            elementRef.nativeElement.setAttribute('role', role);\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkCell, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkCell, isStandalone: true, selector: \"cdk-cell, td[cdk-cell]\", host: { classAttribute: \"cdk-cell\" }, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkCell, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'cdk-cell, td[cdk-cell]',\n                    host: {\n                        'class': 'cdk-cell',\n                    },\n                }]\n        }], ctorParameters: () => [] });\n\n/**\n * @docs-private\n */\nclass _Schedule {\n    tasks = [];\n    endTasks = [];\n}\n/** Injection token used to provide a coalesced style scheduler. */\nconst _COALESCED_STYLE_SCHEDULER = new InjectionToken('_COALESCED_STYLE_SCHEDULER');\n/**\n * Allows grouping up CSSDom mutations after the current execution context.\n * This can significantly improve performance when separate consecutive functions are\n * reading from the CSSDom and then mutating it.\n *\n * @docs-private\n */\nclass _CoalescedStyleScheduler {\n    _currentSchedule = null;\n    _ngZone = inject(NgZone);\n    constructor() { }\n    /**\n     * Schedules the specified task to run at the end of the current VM turn.\n     */\n    schedule(task) {\n        this._createScheduleIfNeeded();\n        this._currentSchedule.tasks.push(task);\n    }\n    /**\n     * Schedules the specified task to run after other scheduled tasks at the end of the current\n     * VM turn.\n     */\n    scheduleEnd(task) {\n        this._createScheduleIfNeeded();\n        this._currentSchedule.endTasks.push(task);\n    }\n    _createScheduleIfNeeded() {\n        if (this._currentSchedule) {\n            return;\n        }\n        this._currentSchedule = new _Schedule();\n        this._ngZone.runOutsideAngular(() => \n        // TODO(mmalerba): Scheduling this using something that runs less frequently\n        //  (e.g. requestAnimationFrame, setTimeout, etc.) causes noticeable jank with the column\n        //  resizer. We should audit the usages of schedule / scheduleEnd in that component and see\n        //  if we can refactor it so that we don't need to flush the tasks quite so frequently.\n        queueMicrotask(() => {\n            while (this._currentSchedule.tasks.length || this._currentSchedule.endTasks.length) {\n                const schedule = this._currentSchedule;\n                // Capture new tasks scheduled by the current set of tasks.\n                this._currentSchedule = new _Schedule();\n                for (const task of schedule.tasks) {\n                    task();\n                }\n                for (const task of schedule.endTasks) {\n                    task();\n                }\n            }\n            this._currentSchedule = null;\n        }));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _CoalescedStyleScheduler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _CoalescedStyleScheduler });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: _CoalescedStyleScheduler, decorators: [{\n            type: Injectable\n        }], ctorParameters: () => [] });\n\n/**\n * The row template that can be used by the mat-table. Should not be used outside of the\n * material library.\n */\nconst CDK_ROW_TEMPLATE = `<ng-container cdkCellOutlet></ng-container>`;\n/**\n * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs\n * for changes and notifying the table.\n */\nclass BaseRowDef {\n    template = inject(TemplateRef);\n    _differs = inject(IterableDiffers);\n    /** The columns to be displayed on this row. */\n    columns;\n    /** Differ used to check if any changes were made to the columns. */\n    _columnsDiffer;\n    constructor() { }\n    ngOnChanges(changes) {\n        // Create a new columns differ if one does not yet exist. Initialize it based on initial value\n        // of the columns property or an empty array if none is provided.\n        if (!this._columnsDiffer) {\n            const columns = (changes['columns'] && changes['columns'].currentValue) || [];\n            this._columnsDiffer = this._differs.find(columns).create();\n            this._columnsDiffer.diff(columns);\n        }\n    }\n    /**\n     * Returns the difference between the current columns and the columns from the last diff, or null\n     * if there is no difference.\n     */\n    getColumnsDiff() {\n        return this._columnsDiffer.diff(this.columns);\n    }\n    /** Gets this row def's relevant cell template from the provided column def. */\n    extractCellTemplate(column) {\n        if (this instanceof CdkHeaderRowDef) {\n            return column.headerCell.template;\n        }\n        if (this instanceof CdkFooterRowDef) {\n            return column.footerCell.template;\n        }\n        else {\n            return column.cell.template;\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: BaseRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: BaseRowDef, isStandalone: true, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: BaseRowDef, decorators: [{\n            type: Directive\n        }], ctorParameters: () => [] });\n/**\n * Header row definition for the CDK table.\n * Captures the header row's template and other header properties such as the columns to display.\n */\nclass CdkHeaderRowDef extends BaseRowDef {\n    _table = inject(CDK_TABLE, { optional: true });\n    _hasStickyChanged = false;\n    /** Whether the row is sticky. */\n    get sticky() {\n        return this._sticky;\n    }\n    set sticky(value) {\n        if (value !== this._sticky) {\n            this._sticky = value;\n            this._hasStickyChanged = true;\n        }\n    }\n    _sticky = false;\n    constructor() {\n        super(inject(TemplateRef), inject(IterableDiffers));\n    }\n    // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.\n    // Explicitly define it so that the method is called as part of the Angular lifecycle.\n    ngOnChanges(changes) {\n        super.ngOnChanges(changes);\n    }\n    /** Whether the sticky state has changed. */\n    hasStickyChanged() {\n        const hasStickyChanged = this._hasStickyChanged;\n        this.resetStickyChanged();\n        return hasStickyChanged;\n    }\n    /** Resets the sticky changed state. */\n    resetStickyChanged() {\n        this._hasStickyChanged = false;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkHeaderRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: CdkHeaderRowDef, isStandalone: true, selector: \"[cdkHeaderRowDef]\", inputs: { columns: [\"cdkHeaderRowDef\", \"columns\"], sticky: [\"cdkHeaderRowDefSticky\", \"sticky\", booleanAttribute] }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkHeaderRowDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkHeaderRowDef]',\n                    inputs: [{ name: 'columns', alias: 'cdkHeaderRowDef' }],\n                }]\n        }], ctorParameters: () => [], propDecorators: { sticky: [{\n                type: Input,\n                args: [{ alias: 'cdkHeaderRowDefSticky', transform: booleanAttribute }]\n            }] } });\n/**\n * Footer row definition for the CDK table.\n * Captures the footer row's template and other footer properties such as the columns to display.\n */\nclass CdkFooterRowDef extends BaseRowDef {\n    _table = inject(CDK_TABLE, { optional: true });\n    _hasStickyChanged = false;\n    /** Whether the row is sticky. */\n    get sticky() {\n        return this._sticky;\n    }\n    set sticky(value) {\n        if (value !== this._sticky) {\n            this._sticky = value;\n            this._hasStickyChanged = true;\n        }\n    }\n    _sticky = false;\n    constructor() {\n        super(inject(TemplateRef), inject(IterableDiffers));\n    }\n    // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.\n    // Explicitly define it so that the method is called as part of the Angular lifecycle.\n    ngOnChanges(changes) {\n        super.ngOnChanges(changes);\n    }\n    /** Whether the sticky state has changed. */\n    hasStickyChanged() {\n        const hasStickyChanged = this._hasStickyChanged;\n        this.resetStickyChanged();\n        return hasStickyChanged;\n    }\n    /** Resets the sticky changed state. */\n    resetStickyChanged() {\n        this._hasStickyChanged = false;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkFooterRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: CdkFooterRowDef, isStandalone: true, selector: \"[cdkFooterRowDef]\", inputs: { columns: [\"cdkFooterRowDef\", \"columns\"], sticky: [\"cdkFooterRowDefSticky\", \"sticky\", booleanAttribute] }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkFooterRowDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkFooterRowDef]',\n                    inputs: [{ name: 'columns', alias: 'cdkFooterRowDef' }],\n                }]\n        }], ctorParameters: () => [], propDecorators: { sticky: [{\n                type: Input,\n                args: [{ alias: 'cdkFooterRowDefSticky', transform: booleanAttribute }]\n            }] } });\n/**\n * Data row definition for the CDK table.\n * Captures the header row's template and other row properties such as the columns to display and\n * a when predicate that describes when this row should be used.\n */\nclass CdkRowDef extends BaseRowDef {\n    _table = inject(CDK_TABLE, { optional: true });\n    /**\n     * Function that should return true if this row template should be used for the provided index\n     * and row data. If left undefined, this row will be considered the default row template to use\n     * when no other when functions return true for the data.\n     * For every row, there must be at least one when function that passes or an undefined to default.\n     */\n    when;\n    constructor() {\n        // TODO(andrewseguin): Add an input for providing a switch function to determine\n        //   if this template should be used.\n        super(inject(TemplateRef), inject(IterableDiffers));\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkRowDef, isStandalone: true, selector: \"[cdkRowDef]\", inputs: { columns: [\"cdkRowDefColumns\", \"columns\"], when: [\"cdkRowDefWhen\", \"when\"] }, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkRowDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkRowDef]',\n                    inputs: [\n                        { name: 'columns', alias: 'cdkRowDefColumns' },\n                        { name: 'when', alias: 'cdkRowDefWhen' },\n                    ],\n                }]\n        }], ctorParameters: () => [] });\n/**\n * Outlet for rendering cells inside of a row or header row.\n * @docs-private\n */\nclass CdkCellOutlet {\n    _viewContainer = inject(ViewContainerRef);\n    /** The ordered list of cells to render within this outlet's view container */\n    cells;\n    /** The data context to be provided to each cell */\n    context;\n    /**\n     * Static property containing the latest constructed instance of this class.\n     * Used by the CDK table when each CdkHeaderRow and CdkRow component is created using\n     * createEmbeddedView. After one of these components are created, this property will provide\n     * a handle to provide that component's cells and context. After init, the CdkCellOutlet will\n     * construct the cells with the provided context.\n     */\n    static mostRecentCellOutlet = null;\n    constructor() {\n        CdkCellOutlet.mostRecentCellOutlet = this;\n    }\n    ngOnDestroy() {\n        // If this was the last outlet being rendered in the view, remove the reference\n        // from the static property after it has been destroyed to avoid leaking memory.\n        if (CdkCellOutlet.mostRecentCellOutlet === this) {\n            CdkCellOutlet.mostRecentCellOutlet = null;\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkCellOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkCellOutlet, isStandalone: true, selector: \"[cdkCellOutlet]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkCellOutlet, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[cdkCellOutlet]',\n                }]\n        }], ctorParameters: () => [] });\n/** Header template container that contains the cell outlet. Adds the right class and role. */\nclass CdkHeaderRow {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkHeaderRow, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkHeaderRow, isStandalone: true, selector: \"cdk-header-row, tr[cdk-header-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"cdk-header-row\" }, ngImport: i0, template: \"<ng-container cdkCellOutlet></ng-container>\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkHeaderRow, decorators: [{\n            type: Component,\n            args: [{\n                    selector: 'cdk-header-row, tr[cdk-header-row]',\n                    template: CDK_ROW_TEMPLATE,\n                    host: {\n                        'class': 'cdk-header-row',\n                        'role': 'row',\n                    },\n                    // See note on CdkTable for explanation on why this uses the default change detection strategy.\n                    // tslint:disable-next-line:validate-decorators\n                    changeDetection: ChangeDetectionStrategy.Default,\n                    encapsulation: ViewEncapsulation.None,\n                    imports: [CdkCellOutlet],\n                }]\n        }] });\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\nclass CdkFooterRow {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkFooterRow, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkFooterRow, isStandalone: true, selector: \"cdk-footer-row, tr[cdk-footer-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"cdk-footer-row\" }, ngImport: i0, template: \"<ng-container cdkCellOutlet></ng-container>\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkFooterRow, decorators: [{\n            type: Component,\n            args: [{\n                    selector: 'cdk-footer-row, tr[cdk-footer-row]',\n                    template: CDK_ROW_TEMPLATE,\n                    host: {\n                        'class': 'cdk-footer-row',\n                        'role': 'row',\n                    },\n                    // See note on CdkTable for explanation on why this uses the default change detection strategy.\n                    // tslint:disable-next-line:validate-decorators\n                    changeDetection: ChangeDetectionStrategy.Default,\n                    encapsulation: ViewEncapsulation.None,\n                    imports: [CdkCellOutlet],\n                }]\n        }] });\n/** Data row template container that contains the cell outlet. Adds the right class and role. */\nclass CdkRow {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkRow, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkRow, isStandalone: true, selector: \"cdk-row, tr[cdk-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"cdk-row\" }, ngImport: i0, template: \"<ng-container cdkCellOutlet></ng-container>\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkRow, decorators: [{\n            type: Component,\n            args: [{\n                    selector: 'cdk-row, tr[cdk-row]',\n                    template: CDK_ROW_TEMPLATE,\n                    host: {\n                        'class': 'cdk-row',\n                        'role': 'row',\n                    },\n                    // See note on CdkTable for explanation on why this uses the default change detection strategy.\n                    // tslint:disable-next-line:validate-decorators\n                    changeDetection: ChangeDetectionStrategy.Default,\n                    encapsulation: ViewEncapsulation.None,\n                    imports: [CdkCellOutlet],\n                }]\n        }] });\n/** Row that can be used to display a message when no data is shown in the table. */\nclass CdkNoDataRow {\n    templateRef = inject(TemplateRef);\n    _contentClassName = 'cdk-no-data-row';\n    constructor() { }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkNoDataRow, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkNoDataRow, isStandalone: true, selector: \"ng-template[cdkNoDataRow]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkNoDataRow, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'ng-template[cdkNoDataRow]',\n                }]\n        }], ctorParameters: () => [] });\n\n/**\n * List of all possible directions that can be used for sticky positioning.\n * @docs-private\n */\nconst STICKY_DIRECTIONS = ['top', 'bottom', 'left', 'right'];\n/**\n * Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.\n * @docs-private\n */\nclass StickyStyler {\n    _isNativeHtmlTable;\n    _stickCellCss;\n    direction;\n    _coalescedStyleScheduler;\n    _isBrowser;\n    _needsPositionStickyOnElement;\n    _positionListener;\n    _elemSizeCache = new WeakMap();\n    _resizeObserver = globalThis?.ResizeObserver\n        ? new globalThis.ResizeObserver(entries => this._updateCachedSizes(entries))\n        : null;\n    _updatedStickyColumnsParamsToReplay = [];\n    _stickyColumnsReplayTimeout = null;\n    _cachedCellWidths = [];\n    _borderCellCss;\n    /**\n     * @param _isNativeHtmlTable Whether the sticky logic should be based on a table\n     *     that uses the native `<table>` element.\n     * @param _stickCellCss The CSS class that will be applied to every row/cell that has\n     *     sticky positioning applied.\n     * @param direction The directionality context of the table (ltr/rtl); affects column positioning\n     *     by reversing left/right positions.\n     * @param _isBrowser Whether the table is currently being rendered on the server or the client.\n     * @param _needsPositionStickyOnElement Whether we need to specify position: sticky on cells\n     *     using inline styles. If false, it is assumed that position: sticky is included in\n     *     the component stylesheet for _stickCellCss.\n     * @param _positionListener A listener that is notified of changes to sticky rows/columns\n     *     and their dimensions.\n     */\n    constructor(_isNativeHtmlTable, _stickCellCss, direction, _coalescedStyleScheduler, _isBrowser = true, _needsPositionStickyOnElement = true, _positionListener) {\n        this._isNativeHtmlTable = _isNativeHtmlTable;\n        this._stickCellCss = _stickCellCss;\n        this.direction = direction;\n        this._coalescedStyleScheduler = _coalescedStyleScheduler;\n        this._isBrowser = _isBrowser;\n        this._needsPositionStickyOnElement = _needsPositionStickyOnElement;\n        this._positionListener = _positionListener;\n        this._borderCellCss = {\n            'top': `${_stickCellCss}-border-elem-top`,\n            'bottom': `${_stickCellCss}-border-elem-bottom`,\n            'left': `${_stickCellCss}-border-elem-left`,\n            'right': `${_stickCellCss}-border-elem-right`,\n        };\n    }\n    /**\n     * Clears the sticky positioning styles from the row and its cells by resetting the `position`\n     * style, setting the zIndex to 0, and unsetting each provided sticky direction.\n     * @param rows The list of rows that should be cleared from sticking in the provided directions\n     * @param stickyDirections The directions that should no longer be set as sticky on the rows.\n     */\n    clearStickyPositioning(rows, stickyDirections) {\n        if (stickyDirections.includes('left') || stickyDirections.includes('right')) {\n            this._removeFromStickyColumnReplayQueue(rows);\n        }\n        const elementsToClear = [];\n        for (const row of rows) {\n            // If the row isn't an element (e.g. if it's an `ng-container`),\n            // it won't have inline styles or `children` so we skip it.\n            if (row.nodeType !== row.ELEMENT_NODE) {\n                continue;\n            }\n            elementsToClear.push(row);\n            for (let i = 0; i < row.children.length; i++) {\n                elementsToClear.push(row.children[i]);\n            }\n        }\n        // Coalesce with sticky row/column updates (and potentially other changes like column resize).\n        this._coalescedStyleScheduler.schedule(() => {\n            for (const element of elementsToClear) {\n                this._removeStickyStyle(element, stickyDirections);\n            }\n        });\n    }\n    /**\n     * Applies sticky left and right positions to the cells of each row according to the sticky\n     * states of the rendered column definitions.\n     * @param rows The rows that should have its set of cells stuck according to the sticky states.\n     * @param stickyStartStates A list of boolean states where each state represents whether the cell\n     *     in this index position should be stuck to the start of the row.\n     * @param stickyEndStates A list of boolean states where each state represents whether the cell\n     *     in this index position should be stuck to the end of the row.\n     * @param recalculateCellWidths Whether the sticky styler should recalculate the width of each\n     *     column cell. If `false` cached widths will be used instead.\n     * @param replay Whether to enqueue this call for replay after a ResizeObserver update.\n     */\n    updateStickyColumns(rows, stickyStartStates, stickyEndStates, recalculateCellWidths = true, replay = true) {\n        if (replay) {\n            this._updateStickyColumnReplayQueue({\n                rows: [...rows],\n                stickyStartStates: [...stickyStartStates],\n                stickyEndStates: [...stickyEndStates],\n            });\n        }\n        if (!rows.length ||\n            !this._isBrowser ||\n            !(stickyStartStates.some(state => state) || stickyEndStates.some(state => state))) {\n            if (this._positionListener) {\n                this._positionListener.stickyColumnsUpdated({ sizes: [] });\n                this._positionListener.stickyEndColumnsUpdated({ sizes: [] });\n            }\n            return;\n        }\n        // Coalesce with sticky row updates (and potentially other changes like column resize).\n        this._coalescedStyleScheduler.schedule(() => {\n            const firstRow = rows[0];\n            const numCells = firstRow.children.length;\n            const cellWidths = this._getCellWidths(firstRow, recalculateCellWidths);\n            const startPositions = this._getStickyStartColumnPositions(cellWidths, stickyStartStates);\n            const endPositions = this._getStickyEndColumnPositions(cellWidths, stickyEndStates);\n            const lastStickyStart = stickyStartStates.lastIndexOf(true);\n            const firstStickyEnd = stickyEndStates.indexOf(true);\n            const isRtl = this.direction === 'rtl';\n            const start = isRtl ? 'right' : 'left';\n            const end = isRtl ? 'left' : 'right';\n            for (const row of rows) {\n                for (let i = 0; i < numCells; i++) {\n                    const cell = row.children[i];\n                    if (stickyStartStates[i]) {\n                        this._addStickyStyle(cell, start, startPositions[i], i === lastStickyStart);\n                    }\n                    if (stickyEndStates[i]) {\n                        this._addStickyStyle(cell, end, endPositions[i], i === firstStickyEnd);\n                    }\n                }\n            }\n            if (this._positionListener) {\n                this._positionListener.stickyColumnsUpdated({\n                    sizes: lastStickyStart === -1\n                        ? []\n                        : cellWidths\n                            .slice(0, lastStickyStart + 1)\n                            .map((width, index) => (stickyStartStates[index] ? width : null)),\n                });\n                this._positionListener.stickyEndColumnsUpdated({\n                    sizes: firstStickyEnd === -1\n                        ? []\n                        : cellWidths\n                            .slice(firstStickyEnd)\n                            .map((width, index) => (stickyEndStates[index + firstStickyEnd] ? width : null))\n                            .reverse(),\n                });\n            }\n        });\n    }\n    /**\n     * Applies sticky positioning to the row's cells if using the native table layout, and to the\n     * row itself otherwise.\n     * @param rowsToStick The list of rows that should be stuck according to their corresponding\n     *     sticky state and to the provided top or bottom position.\n     * @param stickyStates A list of boolean states where each state represents whether the row\n     *     should be stuck in the particular top or bottom position.\n     * @param position The position direction in which the row should be stuck if that row should be\n     *     sticky.\n     *\n     */\n    stickRows(rowsToStick, stickyStates, position) {\n        // Since we can't measure the rows on the server, we can't stick the rows properly.\n        if (!this._isBrowser) {\n            return;\n        }\n        // Coalesce with other sticky row updates (top/bottom), sticky columns updates\n        // (and potentially other changes like column resize).\n        this._coalescedStyleScheduler.schedule(() => {\n            // If positioning the rows to the bottom, reverse their order when evaluating the sticky\n            // position such that the last row stuck will be \"bottom: 0px\" and so on. Note that the\n            // sticky states need to be reversed as well.\n            const rows = position === 'bottom' ? rowsToStick.slice().reverse() : rowsToStick;\n            const states = position === 'bottom' ? stickyStates.slice().reverse() : stickyStates;\n            // Measure row heights all at once before adding sticky styles to reduce layout thrashing.\n            const stickyOffsets = [];\n            const stickyCellHeights = [];\n            const elementsToStick = [];\n            for (let rowIndex = 0, stickyOffset = 0; rowIndex < rows.length; rowIndex++) {\n                if (!states[rowIndex]) {\n                    continue;\n                }\n                stickyOffsets[rowIndex] = stickyOffset;\n                const row = rows[rowIndex];\n                elementsToStick[rowIndex] = this._isNativeHtmlTable\n                    ? Array.from(row.children)\n                    : [row];\n                const height = this._retrieveElementSize(row).height;\n                stickyOffset += height;\n                stickyCellHeights[rowIndex] = height;\n            }\n            const borderedRowIndex = states.lastIndexOf(true);\n            for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {\n                if (!states[rowIndex]) {\n                    continue;\n                }\n                const offset = stickyOffsets[rowIndex];\n                const isBorderedRowIndex = rowIndex === borderedRowIndex;\n                for (const element of elementsToStick[rowIndex]) {\n                    this._addStickyStyle(element, position, offset, isBorderedRowIndex);\n                }\n            }\n            if (position === 'top') {\n                this._positionListener?.stickyHeaderRowsUpdated({\n                    sizes: stickyCellHeights,\n                    offsets: stickyOffsets,\n                    elements: elementsToStick,\n                });\n            }\n            else {\n                this._positionListener?.stickyFooterRowsUpdated({\n                    sizes: stickyCellHeights,\n                    offsets: stickyOffsets,\n                    elements: elementsToStick,\n                });\n            }\n        });\n    }\n    /**\n     * When using the native table in Safari, sticky footer cells do not stick. The only way to stick\n     * footer rows is to apply sticky styling to the tfoot container. This should only be done if\n     * all footer rows are sticky. If not all footer rows are sticky, remove sticky positioning from\n     * the tfoot element.\n     */\n    updateStickyFooterContainer(tableElement, stickyStates) {\n        if (!this._isNativeHtmlTable) {\n            return;\n        }\n        // Coalesce with other sticky updates (and potentially other changes like column resize).\n        this._coalescedStyleScheduler.schedule(() => {\n            const tfoot = tableElement.querySelector('tfoot');\n            if (tfoot) {\n                if (stickyStates.some(state => !state)) {\n                    this._removeStickyStyle(tfoot, ['bottom']);\n                }\n                else {\n                    this._addStickyStyle(tfoot, 'bottom', 0, false);\n                }\n            }\n        });\n    }\n    /**\n     * Removes the sticky style on the element by removing the sticky cell CSS class, re-evaluating\n     * the zIndex, removing each of the provided sticky directions, and removing the\n     * sticky position if there are no more directions.\n     */\n    _removeStickyStyle(element, stickyDirections) {\n        for (const dir of stickyDirections) {\n            element.style[dir] = '';\n            element.classList.remove(this._borderCellCss[dir]);\n        }\n        // If the element no longer has any more sticky directions, remove sticky positioning and\n        // the sticky CSS class.\n        // Short-circuit checking element.style[dir] for stickyDirections as they\n        // were already removed above.\n        const hasDirection = STICKY_DIRECTIONS.some(dir => stickyDirections.indexOf(dir) === -1 && element.style[dir]);\n        if (hasDirection) {\n            element.style.zIndex = this._getCalculatedZIndex(element);\n        }\n        else {\n            // When not hasDirection, _getCalculatedZIndex will always return ''.\n            element.style.zIndex = '';\n            if (this._needsPositionStickyOnElement) {\n                element.style.position = '';\n            }\n            element.classList.remove(this._stickCellCss);\n        }\n    }\n    /**\n     * Adds the sticky styling to the element by adding the sticky style class, changing position\n     * to be sticky (and -webkit-sticky), setting the appropriate zIndex, and adding a sticky\n     * direction and value.\n     */\n    _addStickyStyle(element, dir, dirValue, isBorderElement) {\n        element.classList.add(this._stickCellCss);\n        if (isBorderElement) {\n            element.classList.add(this._borderCellCss[dir]);\n        }\n        element.style[dir] = `${dirValue}px`;\n        element.style.zIndex = this._getCalculatedZIndex(element);\n        if (this._needsPositionStickyOnElement) {\n            element.style.cssText += 'position: -webkit-sticky; position: sticky; ';\n        }\n    }\n    /**\n     * Calculate what the z-index should be for the element, depending on what directions (top,\n     * bottom, left, right) have been set. It should be true that elements with a top direction\n     * should have the highest index since these are elements like a table header. If any of those\n     * elements are also sticky in another direction, then they should appear above other elements\n     * that are only sticky top (e.g. a sticky column on a sticky header). Bottom-sticky elements\n     * (e.g. footer rows) should then be next in the ordering such that they are below the header\n     * but above any non-sticky elements. Finally, left/right sticky elements (e.g. sticky columns)\n     * should minimally increment so that they are above non-sticky elements but below top and bottom\n     * elements.\n     */\n    _getCalculatedZIndex(element) {\n        const zIndexIncrements = {\n            top: 100,\n            bottom: 10,\n            left: 1,\n            right: 1,\n        };\n        let zIndex = 0;\n        // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,\n        // loses the array generic type in the `for of`. But we *also* have to use `Array` because\n        // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`\n        for (const dir of STICKY_DIRECTIONS) {\n            if (element.style[dir]) {\n                zIndex += zIndexIncrements[dir];\n            }\n        }\n        return zIndex ? `${zIndex}` : '';\n    }\n    /** Gets the widths for each cell in the provided row. */\n    _getCellWidths(row, recalculateCellWidths = true) {\n        if (!recalculateCellWidths && this._cachedCellWidths.length) {\n            return this._cachedCellWidths;\n        }\n        const cellWidths = [];\n        const firstRowCells = row.children;\n        for (let i = 0; i < firstRowCells.length; i++) {\n            const cell = firstRowCells[i];\n            cellWidths.push(this._retrieveElementSize(cell).width);\n        }\n        this._cachedCellWidths = cellWidths;\n        return cellWidths;\n    }\n    /**\n     * Determines the left and right positions of each sticky column cell, which will be the\n     * accumulation of all sticky column cell widths to the left and right, respectively.\n     * Non-sticky cells do not need to have a value set since their positions will not be applied.\n     */\n    _getStickyStartColumnPositions(widths, stickyStates) {\n        const positions = [];\n        let nextPosition = 0;\n        for (let i = 0; i < widths.length; i++) {\n            if (stickyStates[i]) {\n                positions[i] = nextPosition;\n                nextPosition += widths[i];\n            }\n        }\n        return positions;\n    }\n    /**\n     * Determines the left and right positions of each sticky column cell, which will be the\n     * accumulation of all sticky column cell widths to the left and right, respectively.\n     * Non-sticky cells do not need to have a value set since their positions will not be applied.\n     */\n    _getStickyEndColumnPositions(widths, stickyStates) {\n        const positions = [];\n        let nextPosition = 0;\n        for (let i = widths.length; i > 0; i--) {\n            if (stickyStates[i]) {\n                positions[i] = nextPosition;\n                nextPosition += widths[i];\n            }\n        }\n        return positions;\n    }\n    /**\n     * Retreives the most recently observed size of the specified element from the cache, or\n     * meaures it directly if not yet cached.\n     */\n    _retrieveElementSize(element) {\n        const cachedSize = this._elemSizeCache.get(element);\n        if (cachedSize) {\n            return cachedSize;\n        }\n        const clientRect = element.getBoundingClientRect();\n        const size = { width: clientRect.width, height: clientRect.height };\n        if (!this._resizeObserver) {\n            return size;\n        }\n        this._elemSizeCache.set(element, size);\n        this._resizeObserver.observe(element, { box: 'border-box' });\n        return size;\n    }\n    /**\n     * Conditionally enqueue the requested sticky update and clear previously queued updates\n     * for the same rows.\n     */\n    _updateStickyColumnReplayQueue(params) {\n        this._removeFromStickyColumnReplayQueue(params.rows);\n        // No need to replay if a flush is pending.\n        if (this._stickyColumnsReplayTimeout) {\n            return;\n        }\n        this._updatedStickyColumnsParamsToReplay.push(params);\n    }\n    /** Remove updates for the specified rows from the queue. */\n    _removeFromStickyColumnReplayQueue(rows) {\n        const rowsSet = new Set(rows);\n        for (const update of this._updatedStickyColumnsParamsToReplay) {\n            update.rows = update.rows.filter(row => !rowsSet.has(row));\n        }\n        this._updatedStickyColumnsParamsToReplay = this._updatedStickyColumnsParamsToReplay.filter(update => !!update.rows.length);\n    }\n    /** Update _elemSizeCache with the observed sizes. */\n    _updateCachedSizes(entries) {\n        let needsColumnUpdate = false;\n        for (const entry of entries) {\n            const newEntry = entry.borderBoxSize?.length\n                ? {\n                    width: entry.borderBoxSize[0].inlineSize,\n                    height: entry.borderBoxSize[0].blockSize,\n                }\n                : {\n                    width: entry.contentRect.width,\n                    height: entry.contentRect.height,\n                };\n            if (newEntry.width !== this._elemSizeCache.get(entry.target)?.width &&\n                isCell(entry.target)) {\n                needsColumnUpdate = true;\n            }\n            this._elemSizeCache.set(entry.target, newEntry);\n        }\n        if (needsColumnUpdate && this._updatedStickyColumnsParamsToReplay.length) {\n            if (this._stickyColumnsReplayTimeout) {\n                clearTimeout(this._stickyColumnsReplayTimeout);\n            }\n            this._stickyColumnsReplayTimeout = setTimeout(() => {\n                for (const update of this._updatedStickyColumnsParamsToReplay) {\n                    this.updateStickyColumns(update.rows, update.stickyStartStates, update.stickyEndStates, true, false);\n                }\n                this._updatedStickyColumnsParamsToReplay = [];\n                this._stickyColumnsReplayTimeout = null;\n            }, 0);\n        }\n    }\n}\nfunction isCell(element) {\n    return ['cdk-cell', 'cdk-header-cell', 'cdk-footer-cell'].some(klass => element.classList.contains(klass));\n}\n\n/**\n * Returns an error to be thrown when attempting to find an nonexistent column.\n * @param id Id whose lookup failed.\n * @docs-private\n */\nfunction getTableUnknownColumnError(id) {\n    return Error(`Could not find column with id \"${id}\".`);\n}\n/**\n * Returns an error to be thrown when two column definitions have the same name.\n * @docs-private\n */\nfunction getTableDuplicateColumnNameError(name) {\n    return Error(`Duplicate column definition name provided: \"${name}\".`);\n}\n/**\n * Returns an error to be thrown when there are multiple rows that are missing a when function.\n * @docs-private\n */\nfunction getTableMultipleDefaultRowDefsError() {\n    return Error(`There can only be one default row without a when predicate function.`);\n}\n/**\n * Returns an error to be thrown when there are no matching row defs for a particular set of data.\n * @docs-private\n */\nfunction getTableMissingMatchingRowDefError(data) {\n    return Error(`Could not find a matching row definition for the` +\n        `provided row data: ${JSON.stringify(data)}`);\n}\n/**\n * Returns an error to be thrown when there is no row definitions present in the content.\n * @docs-private\n */\nfunction getTableMissingRowDefsError() {\n    return Error('Missing definitions for header, footer, and row; ' +\n        'cannot determine which columns should be rendered.');\n}\n/**\n * Returns an error to be thrown when the data source does not match the compatible types.\n * @docs-private\n */\nfunction getTableUnknownDataSourceError() {\n    return Error(`Provided data source did not match an array, Observable, or DataSource`);\n}\n/**\n * Returns an error to be thrown when the text column cannot find a parent table to inject.\n * @docs-private\n */\nfunction getTableTextColumnMissingParentTableError() {\n    return Error(`Text column could not find a parent table for registration.`);\n}\n/**\n * Returns an error to be thrown when a table text column doesn't have a name.\n * @docs-private\n */\nfunction getTableTextColumnMissingNameError() {\n    return Error(`Table text column must have a name.`);\n}\n\n/** The injection token used to specify the StickyPositioningListener. */\nconst STICKY_POSITIONING_LISTENER = new InjectionToken('CDK_SPL');\n\n/**\n * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with\n * tables that animate rows.\n */\nclass CdkRecycleRows {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkRecycleRows, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkRecycleRows, isStandalone: true, selector: \"cdk-table[recycleRows], table[cdk-table][recycleRows]\", providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkRecycleRows, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'cdk-table[recycleRows], table[cdk-table][recycleRows]',\n                    providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }],\n                }]\n        }] });\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert data rows.\n * @docs-private\n */\nclass DataRowOutlet {\n    viewContainer = inject(ViewContainerRef);\n    elementRef = inject(ElementRef);\n    constructor() {\n        const table = inject(CDK_TABLE);\n        table._rowOutlet = this;\n        table._outletAssigned();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: DataRowOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: DataRowOutlet, isStandalone: true, selector: \"[rowOutlet]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: DataRowOutlet, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[rowOutlet]',\n                }]\n        }], ctorParameters: () => [] });\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert the header.\n * @docs-private\n */\nclass HeaderRowOutlet {\n    viewContainer = inject(ViewContainerRef);\n    elementRef = inject(ElementRef);\n    constructor() {\n        const table = inject(CDK_TABLE);\n        table._headerRowOutlet = this;\n        table._outletAssigned();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: HeaderRowOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: HeaderRowOutlet, isStandalone: true, selector: \"[headerRowOutlet]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: HeaderRowOutlet, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[headerRowOutlet]',\n                }]\n        }], ctorParameters: () => [] });\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert the footer.\n * @docs-private\n */\nclass FooterRowOutlet {\n    viewContainer = inject(ViewContainerRef);\n    elementRef = inject(ElementRef);\n    constructor() {\n        const table = inject(CDK_TABLE);\n        table._footerRowOutlet = this;\n        table._outletAssigned();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FooterRowOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: FooterRowOutlet, isStandalone: true, selector: \"[footerRowOutlet]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: FooterRowOutlet, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[footerRowOutlet]',\n                }]\n        }], ctorParameters: () => [] });\n/**\n * Provides a handle for the table to grab the view\n * container's ng-container to insert the no data row.\n * @docs-private\n */\nclass NoDataRowOutlet {\n    viewContainer = inject(ViewContainerRef);\n    elementRef = inject(ElementRef);\n    constructor() {\n        const table = inject(CDK_TABLE);\n        table._noDataRowOutlet = this;\n        table._outletAssigned();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: NoDataRowOutlet, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: NoDataRowOutlet, isStandalone: true, selector: \"[noDataRowOutlet]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: NoDataRowOutlet, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[noDataRowOutlet]',\n                }]\n        }], ctorParameters: () => [] });\n/**\n * The table template that can be used by the mat-table. Should not be used outside of the\n * material library.\n * @docs-private\n */\nconst CDK_TABLE_TEMPLATE = \n// Note that according to MDN, the `caption` element has to be projected as the **first**\n// element in the table. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption\n`\n  <ng-content select=\"caption\"/>\n  <ng-content select=\"colgroup, col\"/>\n\n  <!--\n    Unprojected content throws a hydration error so we need this to capture it.\n    It gets removed on the client so it doesn't affect the layout.\n  -->\n  @if (_isServer) {\n    <ng-content/>\n  }\n\n  @if (_isNativeHtmlTable) {\n    <thead role=\"rowgroup\">\n      <ng-container headerRowOutlet/>\n    </thead>\n    <tbody role=\"rowgroup\">\n      <ng-container rowOutlet/>\n      <ng-container noDataRowOutlet/>\n    </tbody>\n    <tfoot role=\"rowgroup\">\n      <ng-container footerRowOutlet/>\n    </tfoot>\n  } @else {\n    <ng-container headerRowOutlet/>\n    <ng-container rowOutlet/>\n    <ng-container noDataRowOutlet/>\n    <ng-container footerRowOutlet/>\n  }\n`;\n/**\n * Class used to conveniently type the embedded view ref for rows with a context.\n * @docs-private\n */\nclass RowViewRef extends EmbeddedViewRef {\n}\n/**\n * A data table that can render a header row, data rows, and a footer row.\n * Uses the dataSource input to determine the data to be rendered. The data can be provided either\n * as a data array, an Observable stream that emits the data array to render, or a DataSource with a\n * connect function that will return an Observable stream that emits the data array to render.\n */\nclass CdkTable {\n    _differs = inject(IterableDiffers);\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _elementRef = inject(ElementRef);\n    _dir = inject(Directionality, { optional: true });\n    _platform = inject(Platform);\n    _viewRepeater = inject(_VIEW_REPEATER_STRATEGY);\n    _coalescedStyleScheduler = inject(_COALESCED_STYLE_SCHEDULER);\n    _viewportRuler = inject(ViewportRuler);\n    _stickyPositioningListener = inject(STICKY_POSITIONING_LISTENER, { optional: true, skipSelf: true });\n    _document = inject(DOCUMENT);\n    /** Latest data provided by the data source. */\n    _data;\n    /** Subject that emits when the component has been destroyed. */\n    _onDestroy = new Subject();\n    /** List of the rendered rows as identified by their `RenderRow` object. */\n    _renderRows;\n    /** Subscription that listens for the data provided by the data source. */\n    _renderChangeSubscription;\n    /**\n     * Map of all the user's defined columns (header, data, and footer cell template) identified by\n     * name. Collection populated by the column definitions gathered by `ContentChildren` as well as\n     * any custom column definitions added to `_customColumnDefs`.\n     */\n    _columnDefsByName = new Map();\n    /**\n     * Set of all row definitions that can be used by this table. Populated by the rows gathered by\n     * using `ContentChildren` as well as any custom row definitions added to `_customRowDefs`.\n     */\n    _rowDefs;\n    /**\n     * Set of all header row definitions that can be used by this table. Populated by the rows\n     * gathered by using `ContentChildren` as well as any custom row definitions added to\n     * `_customHeaderRowDefs`.\n     */\n    _headerRowDefs;\n    /**\n     * Set of all row definitions that can be used by this table. Populated by the rows gathered by\n     * using `ContentChildren` as well as any custom row definitions added to\n     * `_customFooterRowDefs`.\n     */\n    _footerRowDefs;\n    /** Differ used to find the changes in the data provided by the data source. */\n    _dataDiffer;\n    /** Stores the row definition that does not have a when predicate. */\n    _defaultRowDef;\n    /**\n     * Column definitions that were defined outside of the direct content children of the table.\n     * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n     * column definitions as *its* content child.\n     */\n    _customColumnDefs = new Set();\n    /**\n     * Data row definitions that were defined outside of the direct content children of the table.\n     * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n     * built-in data rows as *its* content child.\n     */\n    _customRowDefs = new Set();\n    /**\n     * Header row definitions that were defined outside of the direct content children of the table.\n     * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n     * built-in header rows as *its* content child.\n     */\n    _customHeaderRowDefs = new Set();\n    /**\n     * Footer row definitions that were defined outside of the direct content children of the table.\n     * These will be defined when, e.g., creating a wrapper around the cdkTable that has a\n     * built-in footer row as *its* content child.\n     */\n    _customFooterRowDefs = new Set();\n    /** No data row that was defined outside of the direct content children of the table. */\n    _customNoDataRow;\n    /**\n     * Whether the header row definition has been changed. Triggers an update to the header row after\n     * content is checked. Initialized as true so that the table renders the initial set of rows.\n     */\n    _headerRowDefChanged = true;\n    /**\n     * Whether the footer row definition has been changed. Triggers an update to the footer row after\n     * content is checked. Initialized as true so that the table renders the initial set of rows.\n     */\n    _footerRowDefChanged = true;\n    /**\n     * Whether the sticky column styles need to be updated. Set to `true` when the visible columns\n     * change.\n     */\n    _stickyColumnStylesNeedReset = true;\n    /**\n     * Whether the sticky styler should recalculate cell widths when applying sticky styles. If\n     * `false`, cached values will be used instead. This is only applicable to tables with\n     * {@link fixedLayout} enabled. For other tables, cell widths will always be recalculated.\n     */\n    _forceRecalculateCellWidths = true;\n    /**\n     * Cache of the latest rendered `RenderRow` objects as a map for easy retrieval when constructing\n     * a new list of `RenderRow` objects for rendering rows. Since the new list is constructed with\n     * the cached `RenderRow` objects when possible, the row identity is preserved when the data\n     * and row template matches, which allows the `IterableDiffer` to check rows by reference\n     * and understand which rows are added/moved/removed.\n     *\n     * Implemented as a map of maps where the first key is the `data: T` object and the second is the\n     * `CdkRowDef<T>` object. With the two keys, the cache points to a `RenderRow<T>` object that\n     * contains an array of created pairs. The array is necessary to handle cases where the data\n     * array contains multiple duplicate data objects and each instantiated `RenderRow` must be\n     * stored.\n     */\n    _cachedRenderRowsMap = new Map();\n    /** Whether the table is applied to a native `<table>`. */\n    _isNativeHtmlTable;\n    /**\n     * Utility class that is responsible for applying the appropriate sticky positioning styles to\n     * the table's rows and cells.\n     */\n    _stickyStyler;\n    /**\n     * CSS class added to any row or cell that has sticky positioning applied. May be overridden by\n     * table subclasses.\n     */\n    stickyCssClass = 'cdk-table-sticky';\n    /**\n     * Whether to manually add position: sticky to all sticky cell elements. Not needed if\n     * the position is set in a selector associated with the value of stickyCssClass. May be\n     * overridden by table subclasses\n     */\n    needsPositionStickyOnElement = true;\n    /** Whether the component is being rendered on the server. */\n    _isServer;\n    /** Whether the no data row is currently showing anything. */\n    _isShowingNoDataRow = false;\n    /** Whether the table has rendered out all the outlets for the first time. */\n    _hasAllOutlets = false;\n    /** Whether the table is done initializing. */\n    _hasInitialized = false;\n    /** Aria role to apply to the table's cells based on the table's own role. */\n    _getCellRole() {\n        // Perform this lazily in case the table's role was updated by a directive after construction.\n        if (this._cellRoleInternal === undefined) {\n            // Note that we set `role=\"cell\"` even on native `td` elements,\n            // because some browsers seem to require it. See #29784.\n            const tableRole = this._elementRef.nativeElement.getAttribute('role');\n            return tableRole === 'grid' || tableRole === 'treegrid' ? 'gridcell' : 'cell';\n        }\n        return this._cellRoleInternal;\n    }\n    _cellRoleInternal = undefined;\n    /**\n     * Tracking function that will be used to check the differences in data changes. Used similarly\n     * to `ngFor` `trackBy` function. Optimize row operations by identifying a row based on its data\n     * relative to the function to know if a row should be added/removed/moved.\n     * Accepts a function that takes two parameters, `index` and `item`.\n     */\n    get trackBy() {\n        return this._trackByFn;\n    }\n    set trackBy(fn) {\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') {\n            console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}.`);\n        }\n        this._trackByFn = fn;\n    }\n    _trackByFn;\n    /**\n     * The table's source of data, which can be provided in three ways (in order of complexity):\n     *   - Simple data array (each object represents one table row)\n     *   - Stream that emits a data array each time the array changes\n     *   - `DataSource` object that implements the connect/disconnect interface.\n     *\n     * If a data array is provided, the table must be notified when the array's objects are\n     * added, removed, or moved. This can be done by calling the `renderRows()` function which will\n     * render the diff since the last table render. If the data array reference is changed, the table\n     * will automatically trigger an update to the rows.\n     *\n     * When providing an Observable stream, the table will trigger an update automatically when the\n     * stream emits a new array of data.\n     *\n     * Finally, when providing a `DataSource` object, the table will use the Observable stream\n     * provided by the connect function and trigger updates when that stream emits new data array\n     * values. During the table's ngOnDestroy or when the data source is removed from the table, the\n     * table will call the DataSource's `disconnect` function (may be useful for cleaning up any\n     * subscriptions registered during the connect process).\n     */\n    get dataSource() {\n        return this._dataSource;\n    }\n    set dataSource(dataSource) {\n        if (this._dataSource !== dataSource) {\n            this._switchDataSource(dataSource);\n        }\n    }\n    _dataSource;\n    /**\n     * Whether to allow multiple rows per data object by evaluating which rows evaluate their 'when'\n     * predicate to true. If `multiTemplateDataRows` is false, which is the default value, then each\n     * dataobject will render the first row that evaluates its when predicate to true, in the order\n     * defined in the table, or otherwise the default row which does not have a when predicate.\n     */\n    get multiTemplateDataRows() {\n        return this._multiTemplateDataRows;\n    }\n    set multiTemplateDataRows(value) {\n        this._multiTemplateDataRows = value;\n        // In Ivy if this value is set via a static attribute (e.g. <table multiTemplateDataRows>),\n        // this setter will be invoked before the row outlet has been defined hence the null check.\n        if (this._rowOutlet && this._rowOutlet.viewContainer.length) {\n            this._forceRenderDataRows();\n            this.updateStickyColumnStyles();\n        }\n    }\n    _multiTemplateDataRows = false;\n    /**\n     * Whether to use a fixed table layout. Enabling this option will enforce consistent column widths\n     * and optimize rendering sticky styles for native tables. No-op for flex tables.\n     */\n    get fixedLayout() {\n        return this._fixedLayout;\n    }\n    set fixedLayout(value) {\n        this._fixedLayout = value;\n        // Toggling `fixedLayout` may change column widths. Sticky column styles should be recalculated.\n        this._forceRecalculateCellWidths = true;\n        this._stickyColumnStylesNeedReset = true;\n    }\n    _fixedLayout = false;\n    /**\n     * Emits when the table completes rendering a set of data rows based on the latest data from the\n     * data source, even if the set of rows is empty.\n     */\n    contentChanged = new EventEmitter();\n    // TODO(andrewseguin): Remove max value as the end index\n    //   and instead calculate the view on init and scroll.\n    /**\n     * Stream containing the latest information on what rows are being displayed on screen.\n     * Can be used by the data source to as a heuristic of what data should be provided.\n     *\n     * @docs-private\n     */\n    viewChange = new BehaviorSubject({\n        start: 0,\n        end: Number.MAX_VALUE,\n    });\n    // Outlets in the table's template where the header, data rows, and footer will be inserted.\n    _rowOutlet;\n    _headerRowOutlet;\n    _footerRowOutlet;\n    _noDataRowOutlet;\n    /**\n     * The column definitions provided by the user that contain what the header, data, and footer\n     * cells should render for each column.\n     */\n    _contentColumnDefs;\n    /** Set of data row definitions that were provided to the table as content children. */\n    _contentRowDefs;\n    /** Set of header row definitions that were provided to the table as content children. */\n    _contentHeaderRowDefs;\n    /** Set of footer row definitions that were provided to the table as content children. */\n    _contentFooterRowDefs;\n    /** Row definition that will only be rendered if there's no data in the table. */\n    _noDataRow;\n    _injector = inject(Injector);\n    constructor() {\n        const role = inject(new HostAttributeToken('role'), { optional: true });\n        if (!role) {\n            this._elementRef.nativeElement.setAttribute('role', 'table');\n        }\n        this._isServer = !this._platform.isBrowser;\n        this._isNativeHtmlTable = this._elementRef.nativeElement.nodeName === 'TABLE';\n    }\n    ngOnInit() {\n        this._setupStickyStyler();\n        // Set up the trackBy function so that it uses the `RenderRow` as its identity by default. If\n        // the user has provided a custom trackBy, return the result of that function as evaluated\n        // with the values of the `RenderRow`'s data and index.\n        this._dataDiffer = this._differs.find([]).create((_i, dataRow) => {\n            return this.trackBy ? this.trackBy(dataRow.dataIndex, dataRow.data) : dataRow;\n        });\n        this._viewportRuler\n            .change()\n            .pipe(takeUntil(this._onDestroy))\n            .subscribe(() => {\n            this._forceRecalculateCellWidths = true;\n        });\n    }\n    ngAfterContentInit() {\n        this._hasInitialized = true;\n    }\n    ngAfterContentChecked() {\n        // Only start re-rendering in `ngAfterContentChecked` after the first render.\n        if (this._canRender()) {\n            this._render();\n        }\n    }\n    ngOnDestroy() {\n        [\n            this._rowOutlet?.viewContainer,\n            this._headerRowOutlet?.viewContainer,\n            this._footerRowOutlet?.viewContainer,\n            this._cachedRenderRowsMap,\n            this._customColumnDefs,\n            this._customRowDefs,\n            this._customHeaderRowDefs,\n            this._customFooterRowDefs,\n            this._columnDefsByName,\n        ].forEach((def) => {\n            def?.clear();\n        });\n        this._headerRowDefs = [];\n        this._footerRowDefs = [];\n        this._defaultRowDef = null;\n        this._onDestroy.next();\n        this._onDestroy.complete();\n        if (isDataSource(this.dataSource)) {\n            this.dataSource.disconnect(this);\n        }\n    }\n    /**\n     * Renders rows based on the table's latest set of data, which was either provided directly as an\n     * input or retrieved through an Observable stream (directly or from a DataSource).\n     * Checks for differences in the data since the last diff to perform only the necessary\n     * changes (add/remove/move rows).\n     *\n     * If the table's data source is a DataSource or Observable, this will be invoked automatically\n     * each time the provided Observable stream emits a new data array. Otherwise if your data is\n     * an array, this function will need to be called to render any changes.\n     */\n    renderRows() {\n        this._renderRows = this._getAllRenderRows();\n        const changes = this._dataDiffer.diff(this._renderRows);\n        if (!changes) {\n            this._updateNoDataRow();\n            this.contentChanged.next();\n            return;\n        }\n        const viewContainer = this._rowOutlet.viewContainer;\n        this._viewRepeater.applyChanges(changes, viewContainer, (record, _adjustedPreviousIndex, currentIndex) => this._getEmbeddedViewArgs(record.item, currentIndex), record => record.item.data, (change) => {\n            if (change.operation === _ViewRepeaterOperation.INSERTED && change.context) {\n                this._renderCellTemplateForItem(change.record.item.rowDef, change.context);\n            }\n        });\n        // Update the meta context of a row's context data (index, count, first, last, ...)\n        this._updateRowIndexContext();\n        // Update rows that did not get added/removed/moved but may have had their identity changed,\n        // e.g. if trackBy matched data on some property but the actual data reference changed.\n        changes.forEachIdentityChange((record) => {\n            const rowView = viewContainer.get(record.currentIndex);\n            rowView.context.$implicit = record.item.data;\n        });\n        this._updateNoDataRow();\n        afterNextRender(() => {\n            this.updateStickyColumnStyles();\n        }, { injector: this._injector });\n        this.contentChanged.next();\n    }\n    /** Adds a column definition that was not included as part of the content children. */\n    addColumnDef(columnDef) {\n        this._customColumnDefs.add(columnDef);\n    }\n    /** Removes a column definition that was not included as part of the content children. */\n    removeColumnDef(columnDef) {\n        this._customColumnDefs.delete(columnDef);\n    }\n    /** Adds a row definition that was not included as part of the content children. */\n    addRowDef(rowDef) {\n        this._customRowDefs.add(rowDef);\n    }\n    /** Removes a row definition that was not included as part of the content children. */\n    removeRowDef(rowDef) {\n        this._customRowDefs.delete(rowDef);\n    }\n    /** Adds a header row definition that was not included as part of the content children. */\n    addHeaderRowDef(headerRowDef) {\n        this._customHeaderRowDefs.add(headerRowDef);\n        this._headerRowDefChanged = true;\n    }\n    /** Removes a header row definition that was not included as part of the content children. */\n    removeHeaderRowDef(headerRowDef) {\n        this._customHeaderRowDefs.delete(headerRowDef);\n        this._headerRowDefChanged = true;\n    }\n    /** Adds a footer row definition that was not included as part of the content children. */\n    addFooterRowDef(footerRowDef) {\n        this._customFooterRowDefs.add(footerRowDef);\n        this._footerRowDefChanged = true;\n    }\n    /** Removes a footer row definition that was not included as part of the content children. */\n    removeFooterRowDef(footerRowDef) {\n        this._customFooterRowDefs.delete(footerRowDef);\n        this._footerRowDefChanged = true;\n    }\n    /** Sets a no data row definition that was not included as a part of the content children. */\n    setNoDataRow(noDataRow) {\n        this._customNoDataRow = noDataRow;\n    }\n    /**\n     * Updates the header sticky styles. First resets all applied styles with respect to the cells\n     * sticking to the top. Then, evaluating which cells need to be stuck to the top. This is\n     * automatically called when the header row changes its displayed set of columns, or if its\n     * sticky input changes. May be called manually for cases where the cell content changes outside\n     * of these events.\n     */\n    updateStickyHeaderRowStyles() {\n        const headerRows = this._getRenderedRows(this._headerRowOutlet);\n        // Hide the thead element if there are no header rows. This is necessary to satisfy\n        // overzealous a11y checkers that fail because the `rowgroup` element does not contain\n        // required child `row`.\n        if (this._isNativeHtmlTable) {\n            const thead = closestTableSection(this._headerRowOutlet, 'thead');\n            if (thead) {\n                thead.style.display = headerRows.length ? '' : 'none';\n            }\n        }\n        const stickyStates = this._headerRowDefs.map(def => def.sticky);\n        this._stickyStyler.clearStickyPositioning(headerRows, ['top']);\n        this._stickyStyler.stickRows(headerRows, stickyStates, 'top');\n        // Reset the dirty state of the sticky input change since it has been used.\n        this._headerRowDefs.forEach(def => def.resetStickyChanged());\n    }\n    /**\n     * Updates the footer sticky styles. First resets all applied styles with respect to the cells\n     * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is\n     * automatically called when the footer row changes its displayed set of columns, or if its\n     * sticky input changes. May be called manually for cases where the cell content changes outside\n     * of these events.\n     */\n    updateStickyFooterRowStyles() {\n        const footerRows = this._getRenderedRows(this._footerRowOutlet);\n        // Hide the tfoot element if there are no footer rows. This is necessary to satisfy\n        // overzealous a11y checkers that fail because the `rowgroup` element does not contain\n        // required child `row`.\n        if (this._isNativeHtmlTable) {\n            const tfoot = closestTableSection(this._footerRowOutlet, 'tfoot');\n            if (tfoot) {\n                tfoot.style.display = footerRows.length ? '' : 'none';\n            }\n        }\n        const stickyStates = this._footerRowDefs.map(def => def.sticky);\n        this._stickyStyler.clearStickyPositioning(footerRows, ['bottom']);\n        this._stickyStyler.stickRows(footerRows, stickyStates, 'bottom');\n        this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement, stickyStates);\n        // Reset the dirty state of the sticky input change since it has been used.\n        this._footerRowDefs.forEach(def => def.resetStickyChanged());\n    }\n    /**\n     * Updates the column sticky styles. First resets all applied styles with respect to the cells\n     * sticking to the left and right. Then sticky styles are added for the left and right according\n     * to the column definitions for each cell in each row. This is automatically called when\n     * the data source provides a new set of data or when a column definition changes its sticky\n     * input. May be called manually for cases where the cell content changes outside of these events.\n     */\n    updateStickyColumnStyles() {\n        const headerRows = this._getRenderedRows(this._headerRowOutlet);\n        const dataRows = this._getRenderedRows(this._rowOutlet);\n        const footerRows = this._getRenderedRows(this._footerRowOutlet);\n        // For tables not using a fixed layout, the column widths may change when new rows are rendered.\n        // In a table using a fixed layout, row content won't affect column width, so sticky styles\n        // don't need to be cleared unless either the sticky column config changes or one of the row\n        // defs change.\n        if ((this._isNativeHtmlTable && !this._fixedLayout) || this._stickyColumnStylesNeedReset) {\n            // Clear the left and right positioning from all columns in the table across all rows since\n            // sticky columns span across all table sections (header, data, footer)\n            this._stickyStyler.clearStickyPositioning([...headerRows, ...dataRows, ...footerRows], ['left', 'right']);\n            this._stickyColumnStylesNeedReset = false;\n        }\n        // Update the sticky styles for each header row depending on the def's sticky state\n        headerRows.forEach((headerRow, i) => {\n            this._addStickyColumnStyles([headerRow], this._headerRowDefs[i]);\n        });\n        // Update the sticky styles for each data row depending on its def's sticky state\n        this._rowDefs.forEach(rowDef => {\n            // Collect all the rows rendered with this row definition.\n            const rows = [];\n            for (let i = 0; i < dataRows.length; i++) {\n                if (this._renderRows[i].rowDef === rowDef) {\n                    rows.push(dataRows[i]);\n                }\n            }\n            this._addStickyColumnStyles(rows, rowDef);\n        });\n        // Update the sticky styles for each footer row depending on the def's sticky state\n        footerRows.forEach((footerRow, i) => {\n            this._addStickyColumnStyles([footerRow], this._footerRowDefs[i]);\n        });\n        // Reset the dirty state of the sticky input change since it has been used.\n        Array.from(this._columnDefsByName.values()).forEach(def => def.resetStickyChanged());\n    }\n    /** Invoked whenever an outlet is created and has been assigned to the table. */\n    _outletAssigned() {\n        // Trigger the first render once all outlets have been assigned. We do it this way, as\n        // opposed to waiting for the next `ngAfterContentChecked`, because we don't know when\n        // the next change detection will happen.\n        // Also we can't use queries to resolve the outlets, because they're wrapped in a\n        // conditional, so we have to rely on them being assigned via DI.\n        if (!this._hasAllOutlets &&\n            this._rowOutlet &&\n            this._headerRowOutlet &&\n            this._footerRowOutlet &&\n            this._noDataRowOutlet) {\n            this._hasAllOutlets = true;\n            // In some setups this may fire before `ngAfterContentInit`\n            // so we need a check here. See #28538.\n            if (this._canRender()) {\n                this._render();\n            }\n        }\n    }\n    /** Whether the table has all the information to start rendering. */\n    _canRender() {\n        return this._hasAllOutlets && this._hasInitialized;\n    }\n    /** Renders the table if its state has changed. */\n    _render() {\n        // Cache the row and column definitions gathered by ContentChildren and programmatic injection.\n        this._cacheRowDefs();\n        this._cacheColumnDefs();\n        // Make sure that the user has at least added header, footer, or data row def.\n        if (!this._headerRowDefs.length &&\n            !this._footerRowDefs.length &&\n            !this._rowDefs.length &&\n            (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getTableMissingRowDefsError();\n        }\n        // Render updates if the list of columns have been changed for the header, row, or footer defs.\n        const columnsChanged = this._renderUpdatedColumns();\n        const rowDefsChanged = columnsChanged || this._headerRowDefChanged || this._footerRowDefChanged;\n        // Ensure sticky column styles are reset if set to `true` elsewhere.\n        this._stickyColumnStylesNeedReset = this._stickyColumnStylesNeedReset || rowDefsChanged;\n        this._forceRecalculateCellWidths = rowDefsChanged;\n        // If the header row definition has been changed, trigger a render to the header row.\n        if (this._headerRowDefChanged) {\n            this._forceRenderHeaderRows();\n            this._headerRowDefChanged = false;\n        }\n        // If the footer row definition has been changed, trigger a render to the footer row.\n        if (this._footerRowDefChanged) {\n            this._forceRenderFooterRows();\n            this._footerRowDefChanged = false;\n        }\n        // If there is a data source and row definitions, connect to the data source unless a\n        // connection has already been made.\n        if (this.dataSource && this._rowDefs.length > 0 && !this._renderChangeSubscription) {\n            this._observeRenderChanges();\n        }\n        else if (this._stickyColumnStylesNeedReset) {\n            // In the above case, _observeRenderChanges will result in updateStickyColumnStyles being\n            // called when it row data arrives. Otherwise, we need to call it proactively.\n            this.updateStickyColumnStyles();\n        }\n        this._checkStickyStates();\n    }\n    /**\n     * Get the list of RenderRow objects to render according to the current list of data and defined\n     * row definitions. If the previous list already contained a particular pair, it should be reused\n     * so that the differ equates their references.\n     */\n    _getAllRenderRows() {\n        const renderRows = [];\n        // Store the cache and create a new one. Any re-used RenderRow objects will be moved into the\n        // new cache while unused ones can be picked up by garbage collection.\n        const prevCachedRenderRows = this._cachedRenderRowsMap;\n        this._cachedRenderRowsMap = new Map();\n        // For each data object, get the list of rows that should be rendered, represented by the\n        // respective `RenderRow` object which is the pair of `data` and `CdkRowDef`.\n        for (let i = 0; i < this._data.length; i++) {\n            let data = this._data[i];\n            const renderRowsForData = this._getRenderRowsForData(data, i, prevCachedRenderRows.get(data));\n            if (!this._cachedRenderRowsMap.has(data)) {\n                this._cachedRenderRowsMap.set(data, new WeakMap());\n            }\n            for (let j = 0; j < renderRowsForData.length; j++) {\n                let renderRow = renderRowsForData[j];\n                const cache = this._cachedRenderRowsMap.get(renderRow.data);\n                if (cache.has(renderRow.rowDef)) {\n                    cache.get(renderRow.rowDef).push(renderRow);\n                }\n                else {\n                    cache.set(renderRow.rowDef, [renderRow]);\n                }\n                renderRows.push(renderRow);\n            }\n        }\n        return renderRows;\n    }\n    /**\n     * Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that\n     * should be rendered for this data. Reuses the cached RenderRow objects if they match the same\n     * `(T, CdkRowDef)` pair.\n     */\n    _getRenderRowsForData(data, dataIndex, cache) {\n        const rowDefs = this._getRowDefs(data, dataIndex);\n        return rowDefs.map(rowDef => {\n            const cachedRenderRows = cache && cache.has(rowDef) ? cache.get(rowDef) : [];\n            if (cachedRenderRows.length) {\n                const dataRow = cachedRenderRows.shift();\n                dataRow.dataIndex = dataIndex;\n                return dataRow;\n            }\n            else {\n                return { data, rowDef, dataIndex };\n            }\n        });\n    }\n    /** Update the map containing the content's column definitions. */\n    _cacheColumnDefs() {\n        this._columnDefsByName.clear();\n        const columnDefs = mergeArrayAndSet(this._getOwnDefs(this._contentColumnDefs), this._customColumnDefs);\n        columnDefs.forEach(columnDef => {\n            if (this._columnDefsByName.has(columnDef.name) &&\n                (typeof ngDevMode === 'undefined' || ngDevMode)) {\n                throw getTableDuplicateColumnNameError(columnDef.name);\n            }\n            this._columnDefsByName.set(columnDef.name, columnDef);\n        });\n    }\n    /** Update the list of all available row definitions that can be used. */\n    _cacheRowDefs() {\n        this._headerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentHeaderRowDefs), this._customHeaderRowDefs);\n        this._footerRowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentFooterRowDefs), this._customFooterRowDefs);\n        this._rowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentRowDefs), this._customRowDefs);\n        // After all row definitions are determined, find the row definition to be considered default.\n        const defaultRowDefs = this._rowDefs.filter(def => !def.when);\n        if (!this.multiTemplateDataRows &&\n            defaultRowDefs.length > 1 &&\n            (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getTableMultipleDefaultRowDefsError();\n        }\n        this._defaultRowDef = defaultRowDefs[0];\n    }\n    /**\n     * Check if the header, data, or footer rows have changed what columns they want to display or\n     * whether the sticky states have changed for the header or footer. If there is a diff, then\n     * re-render that section.\n     */\n    _renderUpdatedColumns() {\n        const columnsDiffReducer = (acc, def) => {\n            // The differ should be run for every column, even if `acc` is already\n            // true (see #29922)\n            const diff = !!def.getColumnsDiff();\n            return acc || diff;\n        };\n        // Force re-render data rows if the list of column definitions have changed.\n        const dataColumnsChanged = this._rowDefs.reduce(columnsDiffReducer, false);\n        if (dataColumnsChanged) {\n            this._forceRenderDataRows();\n        }\n        // Force re-render header/footer rows if the list of column definitions have changed.\n        const headerColumnsChanged = this._headerRowDefs.reduce(columnsDiffReducer, false);\n        if (headerColumnsChanged) {\n            this._forceRenderHeaderRows();\n        }\n        const footerColumnsChanged = this._footerRowDefs.reduce(columnsDiffReducer, false);\n        if (footerColumnsChanged) {\n            this._forceRenderFooterRows();\n        }\n        return dataColumnsChanged || headerColumnsChanged || footerColumnsChanged;\n    }\n    /**\n     * Switch to the provided data source by resetting the data and unsubscribing from the current\n     * render change subscription if one exists. If the data source is null, interpret this by\n     * clearing the row outlet. Otherwise start listening for new data.\n     */\n    _switchDataSource(dataSource) {\n        this._data = [];\n        if (isDataSource(this.dataSource)) {\n            this.dataSource.disconnect(this);\n        }\n        // Stop listening for data from the previous data source.\n        if (this._renderChangeSubscription) {\n            this._renderChangeSubscription.unsubscribe();\n            this._renderChangeSubscription = null;\n        }\n        if (!dataSource) {\n            if (this._dataDiffer) {\n                this._dataDiffer.diff([]);\n            }\n            if (this._rowOutlet) {\n                this._rowOutlet.viewContainer.clear();\n            }\n        }\n        this._dataSource = dataSource;\n    }\n    /** Set up a subscription for the data provided by the data source. */\n    _observeRenderChanges() {\n        // If no data source has been set, there is nothing to observe for changes.\n        if (!this.dataSource) {\n            return;\n        }\n        let dataStream;\n        if (isDataSource(this.dataSource)) {\n            dataStream = this.dataSource.connect(this);\n        }\n        else if (isObservable(this.dataSource)) {\n            dataStream = this.dataSource;\n        }\n        else if (Array.isArray(this.dataSource)) {\n            dataStream = of(this.dataSource);\n        }\n        if (dataStream === undefined && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getTableUnknownDataSourceError();\n        }\n        this._renderChangeSubscription = dataStream\n            .pipe(takeUntil(this._onDestroy))\n            .subscribe(data => {\n            this._data = data || [];\n            this.renderRows();\n        });\n    }\n    /**\n     * Clears any existing content in the header row outlet and creates a new embedded view\n     * in the outlet using the header row definition.\n     */\n    _forceRenderHeaderRows() {\n        // Clear the header row outlet if any content exists.\n        if (this._headerRowOutlet.viewContainer.length > 0) {\n            this._headerRowOutlet.viewContainer.clear();\n        }\n        this._headerRowDefs.forEach((def, i) => this._renderRow(this._headerRowOutlet, def, i));\n        this.updateStickyHeaderRowStyles();\n    }\n    /**\n     * Clears any existing content in the footer row outlet and creates a new embedded view\n     * in the outlet using the footer row definition.\n     */\n    _forceRenderFooterRows() {\n        // Clear the footer row outlet if any content exists.\n        if (this._footerRowOutlet.viewContainer.length > 0) {\n            this._footerRowOutlet.viewContainer.clear();\n        }\n        this._footerRowDefs.forEach((def, i) => this._renderRow(this._footerRowOutlet, def, i));\n        this.updateStickyFooterRowStyles();\n    }\n    /** Adds the sticky column styles for the rows according to the columns' stick states. */\n    _addStickyColumnStyles(rows, rowDef) {\n        const columnDefs = Array.from(rowDef.columns || []).map(columnName => {\n            const columnDef = this._columnDefsByName.get(columnName);\n            if (!columnDef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n                throw getTableUnknownColumnError(columnName);\n            }\n            return columnDef;\n        });\n        const stickyStartStates = columnDefs.map(columnDef => columnDef.sticky);\n        const stickyEndStates = columnDefs.map(columnDef => columnDef.stickyEnd);\n        this._stickyStyler.updateStickyColumns(rows, stickyStartStates, stickyEndStates, !this._fixedLayout || this._forceRecalculateCellWidths);\n    }\n    /** Gets the list of rows that have been rendered in the row outlet. */\n    _getRenderedRows(rowOutlet) {\n        const renderedRows = [];\n        for (let i = 0; i < rowOutlet.viewContainer.length; i++) {\n            const viewRef = rowOutlet.viewContainer.get(i);\n            renderedRows.push(viewRef.rootNodes[0]);\n        }\n        return renderedRows;\n    }\n    /**\n     * Get the matching row definitions that should be used for this row data. If there is only\n     * one row definition, it is returned. Otherwise, find the row definitions that has a when\n     * predicate that returns true with the data. If none return true, return the default row\n     * definition.\n     */\n    _getRowDefs(data, dataIndex) {\n        if (this._rowDefs.length == 1) {\n            return [this._rowDefs[0]];\n        }\n        let rowDefs = [];\n        if (this.multiTemplateDataRows) {\n            rowDefs = this._rowDefs.filter(def => !def.when || def.when(dataIndex, data));\n        }\n        else {\n            let rowDef = this._rowDefs.find(def => def.when && def.when(dataIndex, data)) || this._defaultRowDef;\n            if (rowDef) {\n                rowDefs.push(rowDef);\n            }\n        }\n        if (!rowDefs.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getTableMissingMatchingRowDefError(data);\n        }\n        return rowDefs;\n    }\n    _getEmbeddedViewArgs(renderRow, index) {\n        const rowDef = renderRow.rowDef;\n        const context = { $implicit: renderRow.data };\n        return {\n            templateRef: rowDef.template,\n            context,\n            index,\n        };\n    }\n    /**\n     * Creates a new row template in the outlet and fills it with the set of cell templates.\n     * Optionally takes a context to provide to the row and cells, as well as an optional index\n     * of where to place the new row template in the outlet.\n     */\n    _renderRow(outlet, rowDef, index, context = {}) {\n        // TODO(andrewseguin): enforce that one outlet was instantiated from createEmbeddedView\n        const view = outlet.viewContainer.createEmbeddedView(rowDef.template, context, index);\n        this._renderCellTemplateForItem(rowDef, context);\n        return view;\n    }\n    _renderCellTemplateForItem(rowDef, context) {\n        for (let cellTemplate of this._getCellTemplates(rowDef)) {\n            if (CdkCellOutlet.mostRecentCellOutlet) {\n                CdkCellOutlet.mostRecentCellOutlet._viewContainer.createEmbeddedView(cellTemplate, context);\n            }\n        }\n        this._changeDetectorRef.markForCheck();\n    }\n    /**\n     * Updates the index-related context for each row to reflect any changes in the index of the rows,\n     * e.g. first/last/even/odd.\n     */\n    _updateRowIndexContext() {\n        const viewContainer = this._rowOutlet.viewContainer;\n        for (let renderIndex = 0, count = viewContainer.length; renderIndex < count; renderIndex++) {\n            const viewRef = viewContainer.get(renderIndex);\n            const context = viewRef.context;\n            context.count = count;\n            context.first = renderIndex === 0;\n            context.last = renderIndex === count - 1;\n            context.even = renderIndex % 2 === 0;\n            context.odd = !context.even;\n            if (this.multiTemplateDataRows) {\n                context.dataIndex = this._renderRows[renderIndex].dataIndex;\n                context.renderIndex = renderIndex;\n            }\n            else {\n                context.index = this._renderRows[renderIndex].dataIndex;\n            }\n        }\n    }\n    /** Gets the column definitions for the provided row def. */\n    _getCellTemplates(rowDef) {\n        if (!rowDef || !rowDef.columns) {\n            return [];\n        }\n        return Array.from(rowDef.columns, columnId => {\n            const column = this._columnDefsByName.get(columnId);\n            if (!column && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n                throw getTableUnknownColumnError(columnId);\n            }\n            return rowDef.extractCellTemplate(column);\n        });\n    }\n    /**\n     * Forces a re-render of the data rows. Should be called in cases where there has been an input\n     * change that affects the evaluation of which rows should be rendered, e.g. toggling\n     * `multiTemplateDataRows` or adding/removing row definitions.\n     */\n    _forceRenderDataRows() {\n        this._dataDiffer.diff([]);\n        this._rowOutlet.viewContainer.clear();\n        this.renderRows();\n    }\n    /**\n     * Checks if there has been a change in sticky states since last check and applies the correct\n     * sticky styles. Since checking resets the \"dirty\" state, this should only be performed once\n     * during a change detection and after the inputs are settled (after content check).\n     */\n    _checkStickyStates() {\n        const stickyCheckReducer = (acc, d) => {\n            return acc || d.hasStickyChanged();\n        };\n        // Note that the check needs to occur for every definition since it notifies the definition\n        // that it can reset its dirty state. Using another operator like `some` may short-circuit\n        // remaining definitions and leave them in an unchecked state.\n        if (this._headerRowDefs.reduce(stickyCheckReducer, false)) {\n            this.updateStickyHeaderRowStyles();\n        }\n        if (this._footerRowDefs.reduce(stickyCheckReducer, false)) {\n            this.updateStickyFooterRowStyles();\n        }\n        if (Array.from(this._columnDefsByName.values()).reduce(stickyCheckReducer, false)) {\n            this._stickyColumnStylesNeedReset = true;\n            this.updateStickyColumnStyles();\n        }\n    }\n    /**\n     * Creates the sticky styler that will be used for sticky rows and columns. Listens\n     * for directionality changes and provides the latest direction to the styler. Re-applies column\n     * stickiness when directionality changes.\n     */\n    _setupStickyStyler() {\n        const direction = this._dir ? this._dir.value : 'ltr';\n        this._stickyStyler = new StickyStyler(this._isNativeHtmlTable, this.stickyCssClass, direction, this._coalescedStyleScheduler, this._platform.isBrowser, this.needsPositionStickyOnElement, this._stickyPositioningListener);\n        (this._dir ? this._dir.change : of())\n            .pipe(takeUntil(this._onDestroy))\n            .subscribe(value => {\n            this._stickyStyler.direction = value;\n            this.updateStickyColumnStyles();\n        });\n    }\n    /** Filters definitions that belong to this table from a QueryList. */\n    _getOwnDefs(items) {\n        return items.filter(item => !item._table || item._table === this);\n    }\n    /** Creates or removes the no data row, depending on whether any data is being shown. */\n    _updateNoDataRow() {\n        const noDataRow = this._customNoDataRow || this._noDataRow;\n        if (!noDataRow) {\n            return;\n        }\n        const shouldShow = this._rowOutlet.viewContainer.length === 0;\n        if (shouldShow === this._isShowingNoDataRow) {\n            return;\n        }\n        const container = this._noDataRowOutlet.viewContainer;\n        if (shouldShow) {\n            const view = container.createEmbeddedView(noDataRow.templateRef);\n            const rootNode = view.rootNodes[0];\n            // Only add the attributes if we have a single root node since it's hard\n            // to figure out which one to add it to when there are multiple.\n            if (view.rootNodes.length === 1 && rootNode?.nodeType === this._document.ELEMENT_NODE) {\n                rootNode.setAttribute('role', 'row');\n                rootNode.classList.add(noDataRow._contentClassName);\n            }\n        }\n        else {\n            container.clear();\n        }\n        this._isShowingNoDataRow = shouldShow;\n        this._changeDetectorRef.markForCheck();\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkTable, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"19.0.0\", type: CdkTable, isStandalone: true, selector: \"cdk-table, table[cdk-table]\", inputs: { trackBy: \"trackBy\", dataSource: \"dataSource\", multiTemplateDataRows: [\"multiTemplateDataRows\", \"multiTemplateDataRows\", booleanAttribute], fixedLayout: [\"fixedLayout\", \"fixedLayout\", booleanAttribute] }, outputs: { contentChanged: \"contentChanged\" }, host: { properties: { \"class.cdk-table-fixed-layout\": \"fixedLayout\" }, classAttribute: \"cdk-table\" }, providers: [\n            { provide: CDK_TABLE, useExisting: CdkTable },\n            { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n            { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n            // Prevent nested tables from seeing this table's StickyPositioningListener.\n            { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n        ], queries: [{ propertyName: \"_noDataRow\", first: true, predicate: CdkNoDataRow, descendants: true }, { propertyName: \"_contentColumnDefs\", predicate: CdkColumnDef, descendants: true }, { propertyName: \"_contentRowDefs\", predicate: CdkRowDef, descendants: true }, { propertyName: \"_contentHeaderRowDefs\", predicate: CdkHeaderRowDef, descendants: true }, { propertyName: \"_contentFooterRowDefs\", predicate: CdkFooterRowDef, descendants: true }], exportAs: [\"cdkTable\"], ngImport: i0, template: \"\\n  <ng-content select=\\\"caption\\\"/>\\n  <ng-content select=\\\"colgroup, col\\\"/>\\n\\n  <!--\\n    Unprojected content throws a hydration error so we need this to capture it.\\n    It gets removed on the client so it doesn't affect the layout.\\n  -->\\n  @if (_isServer) {\\n    <ng-content/>\\n  }\\n\\n  @if (_isNativeHtmlTable) {\\n    <thead role=\\\"rowgroup\\\">\\n      <ng-container headerRowOutlet/>\\n    </thead>\\n    <tbody role=\\\"rowgroup\\\">\\n      <ng-container rowOutlet/>\\n      <ng-container noDataRowOutlet/>\\n    </tbody>\\n    <tfoot role=\\\"rowgroup\\\">\\n      <ng-container footerRowOutlet/>\\n    </tfoot>\\n  } @else {\\n    <ng-container headerRowOutlet/>\\n    <ng-container rowOutlet/>\\n    <ng-container noDataRowOutlet/>\\n    <ng-container footerRowOutlet/>\\n  }\\n\", isInline: true, styles: [\".cdk-table-fixed-layout{table-layout:fixed}\"], dependencies: [{ kind: \"directive\", type: HeaderRowOutlet, selector: \"[headerRowOutlet]\" }, { kind: \"directive\", type: DataRowOutlet, selector: \"[rowOutlet]\" }, { kind: \"directive\", type: NoDataRowOutlet, selector: \"[noDataRowOutlet]\" }, { kind: \"directive\", type: FooterRowOutlet, selector: \"[footerRowOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkTable, decorators: [{\n            type: Component,\n            args: [{ selector: 'cdk-table, table[cdk-table]', exportAs: 'cdkTable', template: CDK_TABLE_TEMPLATE, host: {\n                        'class': 'cdk-table',\n                        '[class.cdk-table-fixed-layout]': 'fixedLayout',\n                    }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, providers: [\n                        { provide: CDK_TABLE, useExisting: CdkTable },\n                        { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n                        { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n                        // Prevent nested tables from seeing this table's StickyPositioningListener.\n                        { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n                    ], imports: [HeaderRowOutlet, DataRowOutlet, NoDataRowOutlet, FooterRowOutlet], styles: [\".cdk-table-fixed-layout{table-layout:fixed}\"] }]\n        }], ctorParameters: () => [], propDecorators: { trackBy: [{\n                type: Input\n            }], dataSource: [{\n                type: Input\n            }], multiTemplateDataRows: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], fixedLayout: [{\n                type: Input,\n                args: [{ transform: booleanAttribute }]\n            }], contentChanged: [{\n                type: Output\n            }], _contentColumnDefs: [{\n                type: ContentChildren,\n                args: [CdkColumnDef, { descendants: true }]\n            }], _contentRowDefs: [{\n                type: ContentChildren,\n                args: [CdkRowDef, { descendants: true }]\n            }], _contentHeaderRowDefs: [{\n                type: ContentChildren,\n                args: [CdkHeaderRowDef, {\n                        descendants: true,\n                    }]\n            }], _contentFooterRowDefs: [{\n                type: ContentChildren,\n                args: [CdkFooterRowDef, {\n                        descendants: true,\n                    }]\n            }], _noDataRow: [{\n                type: ContentChild,\n                args: [CdkNoDataRow]\n            }] } });\n/** Utility function that gets a merged list of the entries in an array and values of a Set. */\nfunction mergeArrayAndSet(array, set) {\n    return array.concat(Array.from(set));\n}\n/**\n * Finds the closest table section to an outlet. We can't use `HTMLElement.closest` for this,\n * because the node representing the outlet is a comment.\n */\nfunction closestTableSection(outlet, section) {\n    const uppercaseSection = section.toUpperCase();\n    let current = outlet.viewContainer.element.nativeElement;\n    while (current) {\n        // 1 is an element node.\n        const nodeName = current.nodeType === 1 ? current.nodeName : null;\n        if (nodeName === uppercaseSection) {\n            return current;\n        }\n        else if (nodeName === 'TABLE') {\n            // Stop traversing past the `table` node.\n            break;\n        }\n        current = current.parentNode;\n    }\n    return null;\n}\n\n/**\n * Column that simply shows text content for the header and row cells. Assumes that the table\n * is using the native table implementation (`<table>`).\n *\n * By default, the name of this column will be the header text and data property accessor.\n * The header text can be overridden with the `headerText` input. Cell values can be overridden with\n * the `dataAccessor` input. Change the text justification to the start or end using the `justify`\n * input.\n */\nclass CdkTextColumn {\n    _table = inject(CdkTable, { optional: true });\n    _options = inject(TEXT_COLUMN_OPTIONS, { optional: true });\n    /** Column name that should be used to reference this column. */\n    get name() {\n        return this._name;\n    }\n    set name(name) {\n        this._name = name;\n        // With Ivy, inputs can be initialized before static query results are\n        // available. In that case, we defer the synchronization until \"ngOnInit\" fires.\n        this._syncColumnDefName();\n    }\n    _name;\n    /**\n     * Text label that should be used for the column header. If this property is not\n     * set, the header text will default to the column name with its first letter capitalized.\n     */\n    headerText;\n    /**\n     * Accessor function to retrieve the data rendered for each cell. If this\n     * property is not set, the data cells will render the value found in the data's property matching\n     * the column's name. For example, if the column is named `id`, then the rendered value will be\n     * value defined by the data's `id` property.\n     */\n    dataAccessor;\n    /** Alignment of the cell values. */\n    justify = 'start';\n    /** @docs-private */\n    columnDef;\n    /**\n     * The column cell is provided to the column during `ngOnInit` with a static query.\n     * Normally, this will be retrieved by the column using `ContentChild`, but that assumes the\n     * column definition was provided in the same view as the table, which is not the case with this\n     * component.\n     * @docs-private\n     */\n    cell;\n    /**\n     * The column headerCell is provided to the column during `ngOnInit` with a static query.\n     * Normally, this will be retrieved by the column using `ContentChild`, but that assumes the\n     * column definition was provided in the same view as the table, which is not the case with this\n     * component.\n     * @docs-private\n     */\n    headerCell;\n    constructor() {\n        this._options = this._options || {};\n    }\n    ngOnInit() {\n        this._syncColumnDefName();\n        if (this.headerText === undefined) {\n            this.headerText = this._createDefaultHeaderText();\n        }\n        if (!this.dataAccessor) {\n            this.dataAccessor =\n                this._options.defaultDataAccessor || ((data, name) => data[name]);\n        }\n        if (this._table) {\n            // Provide the cell and headerCell directly to the table with the static `ViewChild` query,\n            // since the columnDef will not pick up its content by the time the table finishes checking\n            // its content and initializing the rows.\n            this.columnDef.cell = this.cell;\n            this.columnDef.headerCell = this.headerCell;\n            this._table.addColumnDef(this.columnDef);\n        }\n        else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            throw getTableTextColumnMissingParentTableError();\n        }\n    }\n    ngOnDestroy() {\n        if (this._table) {\n            this._table.removeColumnDef(this.columnDef);\n        }\n    }\n    /**\n     * Creates a default header text. Use the options' header text transformation function if one\n     * has been provided. Otherwise simply capitalize the column name.\n     */\n    _createDefaultHeaderText() {\n        const name = this.name;\n        if (!name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw getTableTextColumnMissingNameError();\n        }\n        if (this._options && this._options.defaultHeaderTextTransform) {\n            return this._options.defaultHeaderTextTransform(name);\n        }\n        return name[0].toUpperCase() + name.slice(1);\n    }\n    /** Synchronizes the column definition name with the text column name. */\n    _syncColumnDefName() {\n        if (this.columnDef) {\n            this.columnDef.name = this.name;\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkTextColumn, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkTextColumn, isStandalone: true, selector: \"cdk-text-column\", inputs: { name: \"name\", headerText: \"headerText\", dataAccessor: \"dataAccessor\", justify: \"justify\" }, viewQueries: [{ propertyName: \"columnDef\", first: true, predicate: CdkColumnDef, descendants: true, static: true }, { propertyName: \"cell\", first: true, predicate: CdkCellDef, descendants: true, static: true }, { propertyName: \"headerCell\", first: true, predicate: CdkHeaderCellDef, descendants: true, static: true }], ngImport: i0, template: `\n    <ng-container cdkColumnDef>\n      <th cdk-header-cell *cdkHeaderCellDef [style.text-align]=\"justify\">\n        {{headerText}}\n      </th>\n      <td cdk-cell *cdkCellDef=\"let data\" [style.text-align]=\"justify\">\n        {{dataAccessor(data, name)}}\n      </td>\n    </ng-container>\n  `, isInline: true, dependencies: [{ kind: \"directive\", type: CdkColumnDef, selector: \"[cdkColumnDef]\", inputs: [\"cdkColumnDef\", \"sticky\", \"stickyEnd\"] }, { kind: \"directive\", type: CdkHeaderCellDef, selector: \"[cdkHeaderCellDef]\" }, { kind: \"directive\", type: CdkHeaderCell, selector: \"cdk-header-cell, th[cdk-header-cell]\" }, { kind: \"directive\", type: CdkCellDef, selector: \"[cdkCellDef]\" }, { kind: \"directive\", type: CdkCell, selector: \"cdk-cell, td[cdk-cell]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkTextColumn, decorators: [{\n            type: Component,\n            args: [{\n                    selector: 'cdk-text-column',\n                    template: `\n    <ng-container cdkColumnDef>\n      <th cdk-header-cell *cdkHeaderCellDef [style.text-align]=\"justify\">\n        {{headerText}}\n      </th>\n      <td cdk-cell *cdkCellDef=\"let data\" [style.text-align]=\"justify\">\n        {{dataAccessor(data, name)}}\n      </td>\n    </ng-container>\n  `,\n                    encapsulation: ViewEncapsulation.None,\n                    // Change detection is intentionally not set to OnPush. This component's template will be provided\n                    // to the table to be inserted into its view. This is problematic when change detection runs since\n                    // the bindings in this template will be evaluated _after_ the table's view is evaluated, which\n                    // mean's the template in the table's view will not have the updated value (and in fact will cause\n                    // an ExpressionChangedAfterItHasBeenCheckedError).\n                    // tslint:disable-next-line:validate-decorators\n                    changeDetection: ChangeDetectionStrategy.Default,\n                    imports: [CdkColumnDef, CdkHeaderCellDef, CdkHeaderCell, CdkCellDef, CdkCell],\n                }]\n        }], ctorParameters: () => [], propDecorators: { name: [{\n                type: Input\n            }], headerText: [{\n                type: Input\n            }], dataAccessor: [{\n                type: Input\n            }], justify: [{\n                type: Input\n            }], columnDef: [{\n                type: ViewChild,\n                args: [CdkColumnDef, { static: true }]\n            }], cell: [{\n                type: ViewChild,\n                args: [CdkCellDef, { static: true }]\n            }], headerCell: [{\n                type: ViewChild,\n                args: [CdkHeaderCellDef, { static: true }]\n            }] } });\n\nconst EXPORTED_DECLARATIONS = [\n    CdkTable,\n    CdkRowDef,\n    CdkCellDef,\n    CdkCellOutlet,\n    CdkHeaderCellDef,\n    CdkFooterCellDef,\n    CdkColumnDef,\n    CdkCell,\n    CdkRow,\n    CdkHeaderCell,\n    CdkFooterCell,\n    CdkHeaderRow,\n    CdkHeaderRowDef,\n    CdkFooterRow,\n    CdkFooterRowDef,\n    DataRowOutlet,\n    HeaderRowOutlet,\n    FooterRowOutlet,\n    CdkTextColumn,\n    CdkNoDataRow,\n    CdkRecycleRows,\n    NoDataRowOutlet,\n];\nclass CdkTableModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkTableModule, imports: [ScrollingModule, CdkTable,\n            CdkRowDef,\n            CdkCellDef,\n            CdkCellOutlet,\n            CdkHeaderCellDef,\n            CdkFooterCellDef,\n            CdkColumnDef,\n            CdkCell,\n            CdkRow,\n            CdkHeaderCell,\n            CdkFooterCell,\n            CdkHeaderRow,\n            CdkHeaderRowDef,\n            CdkFooterRow,\n            CdkFooterRowDef,\n            DataRowOutlet,\n            HeaderRowOutlet,\n            FooterRowOutlet,\n            CdkTextColumn,\n            CdkNoDataRow,\n            CdkRecycleRows,\n            NoDataRowOutlet], exports: [CdkTable,\n            CdkRowDef,\n            CdkCellDef,\n            CdkCellOutlet,\n            CdkHeaderCellDef,\n            CdkFooterCellDef,\n            CdkColumnDef,\n            CdkCell,\n            CdkRow,\n            CdkHeaderCell,\n            CdkFooterCell,\n            CdkHeaderRow,\n            CdkHeaderRowDef,\n            CdkFooterRow,\n            CdkFooterRowDef,\n            DataRowOutlet,\n            HeaderRowOutlet,\n            FooterRowOutlet,\n            CdkTextColumn,\n            CdkNoDataRow,\n            CdkRecycleRows,\n            NoDataRowOutlet] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkTableModule, imports: [ScrollingModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkTableModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    exports: EXPORTED_DECLARATIONS,\n                    imports: [ScrollingModule, ...EXPORTED_DECLARATIONS],\n                }]\n        }] });\n\n/**\n * Mixin to provide a directive with a function that checks if the sticky input has been\n * changed since the last time the function was called. Essentially adds a dirty-check to the\n * sticky value.\n * @docs-private\n * @deprecated Implement the `CanStick` interface instead.\n * @breaking-change 19.0.0\n */\nfunction mixinHasStickyInput(base) {\n    return class extends base {\n        /** Whether sticky positioning should be applied. */\n        get sticky() {\n            return this._sticky;\n        }\n        set sticky(v) {\n            const prevValue = this._sticky;\n            this._sticky = coerceBooleanProperty(v);\n            this._hasStickyChanged = prevValue !== this._sticky;\n        }\n        _sticky = false;\n        /** Whether the sticky input has changed since it was last checked. */\n        _hasStickyChanged = false;\n        /** Whether the sticky value has changed since this was last called. */\n        hasStickyChanged() {\n            const hasStickyChanged = this._hasStickyChanged;\n            this._hasStickyChanged = false;\n            return hasStickyChanged;\n        }\n        /** Resets the dirty check for cases where the sticky state has been used without checking. */\n        resetStickyChanged() {\n            this._hasStickyChanged = false;\n        }\n        constructor(...args) {\n            super(...args);\n        }\n    };\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { BaseCdkCell, BaseRowDef, CDK_ROW_TEMPLATE, CDK_TABLE, CDK_TABLE_TEMPLATE, CdkCell, CdkCellDef, CdkCellOutlet, CdkColumnDef, CdkFooterCell, CdkFooterCellDef, CdkFooterRow, CdkFooterRowDef, CdkHeaderCell, CdkHeaderCellDef, CdkHeaderRow, CdkHeaderRowDef, CdkNoDataRow, CdkRecycleRows, CdkRow, CdkRowDef, CdkTable, CdkTableModule, CdkTextColumn, DataRowOutlet, FooterRowOutlet, HeaderRowOutlet, NoDataRowOutlet, STICKY_DIRECTIONS, STICKY_POSITIONING_LISTENER, StickyStyler, TEXT_COLUMN_OPTIONS, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, _Schedule, mixinHasStickyInput };\n","import * as i0 from '@angular/core';\nimport { Directive, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, booleanAttribute, NgModule } from '@angular/core';\nimport { CdkTable, CDK_TABLE, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, STICKY_POSITIONING_LISTENER, HeaderRowOutlet, DataRowOutlet, NoDataRowOutlet, FooterRowOutlet, CdkCellDef, CdkHeaderCellDef, CdkFooterCellDef, CdkColumnDef, CdkHeaderCell, CdkFooterCell, CdkCell, CdkHeaderRowDef, CdkFooterRowDef, CdkRowDef, CdkHeaderRow, CdkCellOutlet, CdkFooterRow, CdkRow, CdkNoDataRow, CdkTextColumn, CdkTableModule } from '@angular/cdk/table';\nimport { _VIEW_REPEATER_STRATEGY, _RecycleViewRepeaterStrategy, _DisposeViewRepeaterStrategy, DataSource } from '@angular/cdk/collections';\nimport { MatCommonModule } from '@angular/material/core';\nimport { BehaviorSubject, Subject, merge, of, combineLatest } from 'rxjs';\nimport { _isNumberValue } from '@angular/cdk/coercion';\nimport { map } from 'rxjs/operators';\n\n/**\n * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with\n * tables that animate rows.\n */\nclass MatRecycleRows {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRecycleRows, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatRecycleRows, isStandalone: true, selector: \"mat-table[recycleRows], table[mat-table][recycleRows]\", providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRecycleRows, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-table[recycleRows], table[mat-table][recycleRows]',\n                    providers: [{ provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy }],\n                }]\n        }] });\nclass MatTable extends CdkTable {\n    /** Overrides the sticky CSS class set by the `CdkTable`. */\n    stickyCssClass = 'mat-mdc-table-sticky';\n    /** Overrides the need to add position: sticky on every sticky cell element in `CdkTable`. */\n    needsPositionStickyOnElement = false;\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatTable, deps: null, target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"19.0.0\", type: MatTable, isStandalone: true, selector: \"mat-table, table[mat-table]\", host: { properties: { \"class.mdc-table-fixed-layout\": \"fixedLayout\" }, classAttribute: \"mat-mdc-table mdc-data-table__table\" }, providers: [\n            { provide: CdkTable, useExisting: MatTable },\n            { provide: CDK_TABLE, useExisting: MatTable },\n            { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n            // TODO(michaeljamesparsons) Abstract the view repeater strategy to a directive API so this code\n            //  is only included in the build if used.\n            { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n            // Prevent nested tables from seeing this table's StickyPositioningListener.\n            { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n        ], exportAs: [\"matTable\"], usesInheritance: true, ngImport: i0, template: `\n    <ng-content select=\"caption\"/>\n    <ng-content select=\"colgroup, col\"/>\n\n    <!--\n      Unprojected content throws a hydration error so we need this to capture it.\n      It gets removed on the client so it doesn't affect the layout.\n    -->\n    @if (_isServer) {\n      <ng-content/>\n    }\n\n    @if (_isNativeHtmlTable) {\n      <thead role=\"rowgroup\">\n        <ng-container headerRowOutlet/>\n      </thead>\n      <tbody class=\"mdc-data-table__content\" role=\"rowgroup\">\n        <ng-container rowOutlet/>\n        <ng-container noDataRowOutlet/>\n      </tbody>\n      <tfoot role=\"rowgroup\">\n        <ng-container footerRowOutlet/>\n      </tfoot>\n    } @else {\n      <ng-container headerRowOutlet/>\n      <ng-container rowOutlet/>\n      <ng-container noDataRowOutlet/>\n      <ng-container footerRowOutlet/>\n    }\n  `, isInline: true, styles: [\".mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-sys-surface))}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell{text-align:right}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-sys-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-sys-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-sys-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-sys-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mat-mdc-header-cell{text-align:right}.mdc-data-table__row:last-child>.mat-mdc-header-cell{border-bottom:none}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}\"], dependencies: [{ kind: \"directive\", type: HeaderRowOutlet, selector: \"[headerRowOutlet]\" }, { kind: \"directive\", type: DataRowOutlet, selector: \"[rowOutlet]\" }, { kind: \"directive\", type: NoDataRowOutlet, selector: \"[noDataRowOutlet]\" }, { kind: \"directive\", type: FooterRowOutlet, selector: \"[footerRowOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatTable, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-table, table[mat-table]', exportAs: 'matTable', template: `\n    <ng-content select=\"caption\"/>\n    <ng-content select=\"colgroup, col\"/>\n\n    <!--\n      Unprojected content throws a hydration error so we need this to capture it.\n      It gets removed on the client so it doesn't affect the layout.\n    -->\n    @if (_isServer) {\n      <ng-content/>\n    }\n\n    @if (_isNativeHtmlTable) {\n      <thead role=\"rowgroup\">\n        <ng-container headerRowOutlet/>\n      </thead>\n      <tbody class=\"mdc-data-table__content\" role=\"rowgroup\">\n        <ng-container rowOutlet/>\n        <ng-container noDataRowOutlet/>\n      </tbody>\n      <tfoot role=\"rowgroup\">\n        <ng-container footerRowOutlet/>\n      </tfoot>\n    } @else {\n      <ng-container headerRowOutlet/>\n      <ng-container rowOutlet/>\n      <ng-container noDataRowOutlet/>\n      <ng-container footerRowOutlet/>\n    }\n  `, host: {\n                        'class': 'mat-mdc-table mdc-data-table__table',\n                        '[class.mdc-table-fixed-layout]': 'fixedLayout',\n                    }, providers: [\n                        { provide: CdkTable, useExisting: MatTable },\n                        { provide: CDK_TABLE, useExisting: MatTable },\n                        { provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler },\n                        // TODO(michaeljamesparsons) Abstract the view repeater strategy to a directive API so this code\n                        //  is only included in the build if used.\n                        { provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy },\n                        // Prevent nested tables from seeing this table's StickyPositioningListener.\n                        { provide: STICKY_POSITIONING_LISTENER, useValue: null },\n                    ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, imports: [HeaderRowOutlet, DataRowOutlet, NoDataRowOutlet, FooterRowOutlet], styles: [\".mat-mdc-table-sticky{position:sticky !important}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{min-width:100%;border:0;border-spacing:0;table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color, var(--mat-sys-surface))}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell{text-align:right}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-header-headline-font, var(--mat-sys-title-small-font, Roboto, sans-serif));line-height:var(--mat-table-header-headline-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-table-header-headline-size, var(--mat-sys-title-small-size, 14px));font-weight:var(--mat-table-header-headline-weight, var(--mat-sys-title-small-weight, 500))}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-row-item-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-row-item-label-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-row-item-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-table-footer-supporting-text-font, var(--mat-sys-body-medium-font, Roboto, sans-serif));line-height:var(--mat-table-footer-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-table-footer-supporting-text-size, var(--mat-sys-body-medium-size, 14px));font-weight:var(--mat-table-footer-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-table-footer-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking, var(--mat-sys-title-small-tracking));font-weight:inherit;line-height:inherit;box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mat-mdc-header-cell{text-align:right}.mdc-data-table__row:last-child>.mat-mdc-header-cell{border-bottom:none}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.12)));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking));line-height:inherit}.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking, var(--mat-sys-body-medium-tracking))}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}\"] }]\n        }] });\n\n/**\n * Cell definition for the mat-table.\n * Captures the template of a column's data row cell as well as cell-specific properties.\n */\nclass MatCellDef extends CdkCellDef {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatCellDef, isStandalone: true, selector: \"[matCellDef]\", providers: [{ provide: CdkCellDef, useExisting: MatCellDef }], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCellDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matCellDef]',\n                    providers: [{ provide: CdkCellDef, useExisting: MatCellDef }],\n                }]\n        }] });\n/**\n * Header cell definition for the mat-table.\n * Captures the template of a column's header cell and as well as cell-specific properties.\n */\nclass MatHeaderCellDef extends CdkHeaderCellDef {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatHeaderCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatHeaderCellDef, isStandalone: true, selector: \"[matHeaderCellDef]\", providers: [{ provide: CdkHeaderCellDef, useExisting: MatHeaderCellDef }], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatHeaderCellDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matHeaderCellDef]',\n                    providers: [{ provide: CdkHeaderCellDef, useExisting: MatHeaderCellDef }],\n                }]\n        }] });\n/**\n * Footer cell definition for the mat-table.\n * Captures the template of a column's footer cell and as well as cell-specific properties.\n */\nclass MatFooterCellDef extends CdkFooterCellDef {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFooterCellDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatFooterCellDef, isStandalone: true, selector: \"[matFooterCellDef]\", providers: [{ provide: CdkFooterCellDef, useExisting: MatFooterCellDef }], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFooterCellDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matFooterCellDef]',\n                    providers: [{ provide: CdkFooterCellDef, useExisting: MatFooterCellDef }],\n                }]\n        }] });\n/**\n * Column definition for the mat-table.\n * Defines a set of cells available for a table column.\n */\nclass MatColumnDef extends CdkColumnDef {\n    /** Unique name for this column. */\n    get name() {\n        return this._name;\n    }\n    set name(name) {\n        this._setNameInput(name);\n    }\n    /**\n     * Add \"mat-column-\" prefix in addition to \"cdk-column-\" prefix.\n     * In the future, this will only add \"mat-column-\" and columnCssClassName\n     * will change from type string[] to string.\n     * @docs-private\n     */\n    _updateColumnCssClassName() {\n        super._updateColumnCssClassName();\n        this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatColumnDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatColumnDef, isStandalone: true, selector: \"[matColumnDef]\", inputs: { name: [\"matColumnDef\", \"name\"] }, providers: [\n            { provide: CdkColumnDef, useExisting: MatColumnDef },\n            { provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: MatColumnDef },\n        ], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatColumnDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matColumnDef]',\n                    providers: [\n                        { provide: CdkColumnDef, useExisting: MatColumnDef },\n                        { provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: MatColumnDef },\n                    ],\n                }]\n        }], propDecorators: { name: [{\n                type: Input,\n                args: ['matColumnDef']\n            }] } });\n/** Header cell template container that adds the right classes and role. */\nclass MatHeaderCell extends CdkHeaderCell {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatHeaderCell, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatHeaderCell, isStandalone: true, selector: \"mat-header-cell, th[mat-header-cell]\", host: { attributes: { \"role\": \"columnheader\" }, classAttribute: \"mat-mdc-header-cell mdc-data-table__header-cell\" }, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatHeaderCell, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-header-cell, th[mat-header-cell]',\n                    host: {\n                        'class': 'mat-mdc-header-cell mdc-data-table__header-cell',\n                        'role': 'columnheader',\n                    },\n                }]\n        }] });\n/** Footer cell template container that adds the right classes and role. */\nclass MatFooterCell extends CdkFooterCell {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFooterCell, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatFooterCell, isStandalone: true, selector: \"mat-footer-cell, td[mat-footer-cell]\", host: { classAttribute: \"mat-mdc-footer-cell mdc-data-table__cell\" }, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFooterCell, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-footer-cell, td[mat-footer-cell]',\n                    host: {\n                        'class': 'mat-mdc-footer-cell mdc-data-table__cell',\n                    },\n                }]\n        }] });\n/** Cell template container that adds the right classes and role. */\nclass MatCell extends CdkCell {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCell, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatCell, isStandalone: true, selector: \"mat-cell, td[mat-cell]\", host: { classAttribute: \"mat-mdc-cell mdc-data-table__cell\" }, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatCell, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'mat-cell, td[mat-cell]',\n                    host: {\n                        'class': 'mat-mdc-cell mdc-data-table__cell',\n                    },\n                }]\n        }] });\n\n// We can't reuse `CDK_ROW_TEMPLATE` because it's incompatible with local compilation mode.\nconst ROW_TEMPLATE = `<ng-container cdkCellOutlet></ng-container>`;\n/**\n * Header row definition for the mat-table.\n * Captures the header row's template and other header properties such as the columns to display.\n */\nclass MatHeaderRowDef extends CdkHeaderRowDef {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatHeaderRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatHeaderRowDef, isStandalone: true, selector: \"[matHeaderRowDef]\", inputs: { columns: [\"matHeaderRowDef\", \"columns\"], sticky: [\"matHeaderRowDefSticky\", \"sticky\", booleanAttribute] }, providers: [{ provide: CdkHeaderRowDef, useExisting: MatHeaderRowDef }], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatHeaderRowDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matHeaderRowDef]',\n                    providers: [{ provide: CdkHeaderRowDef, useExisting: MatHeaderRowDef }],\n                    inputs: [\n                        { name: 'columns', alias: 'matHeaderRowDef' },\n                        { name: 'sticky', alias: 'matHeaderRowDefSticky', transform: booleanAttribute },\n                    ],\n                }]\n        }] });\n/**\n * Footer row definition for the mat-table.\n * Captures the footer row's template and other footer properties such as the columns to display.\n */\nclass MatFooterRowDef extends CdkFooterRowDef {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFooterRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"19.0.0\", type: MatFooterRowDef, isStandalone: true, selector: \"[matFooterRowDef]\", inputs: { columns: [\"matFooterRowDef\", \"columns\"], sticky: [\"matFooterRowDefSticky\", \"sticky\", booleanAttribute] }, providers: [{ provide: CdkFooterRowDef, useExisting: MatFooterRowDef }], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFooterRowDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matFooterRowDef]',\n                    providers: [{ provide: CdkFooterRowDef, useExisting: MatFooterRowDef }],\n                    inputs: [\n                        { name: 'columns', alias: 'matFooterRowDef' },\n                        { name: 'sticky', alias: 'matFooterRowDefSticky', transform: booleanAttribute },\n                    ],\n                }]\n        }] });\n/**\n * Data row definition for the mat-table.\n * Captures the data row's template and other properties such as the columns to display and\n * a when predicate that describes when this row should be used.\n */\nclass MatRowDef extends CdkRowDef {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRowDef, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatRowDef, isStandalone: true, selector: \"[matRowDef]\", inputs: { columns: [\"matRowDefColumns\", \"columns\"], when: [\"matRowDefWhen\", \"when\"] }, providers: [{ provide: CdkRowDef, useExisting: MatRowDef }], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRowDef, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[matRowDef]',\n                    providers: [{ provide: CdkRowDef, useExisting: MatRowDef }],\n                    inputs: [\n                        { name: 'columns', alias: 'matRowDefColumns' },\n                        { name: 'when', alias: 'matRowDefWhen' },\n                    ],\n                }]\n        }] });\n/** Header template container that contains the cell outlet. Adds the right class and role. */\nclass MatHeaderRow extends CdkHeaderRow {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatHeaderRow, deps: null, target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatHeaderRow, isStandalone: true, selector: \"mat-header-row, tr[mat-header-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"mat-mdc-header-row mdc-data-table__header-row\" }, providers: [{ provide: CdkHeaderRow, useExisting: MatHeaderRow }], exportAs: [\"matHeaderRow\"], usesInheritance: true, ngImport: i0, template: \"<ng-container cdkCellOutlet></ng-container>\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatHeaderRow, decorators: [{\n            type: Component,\n            args: [{\n                    selector: 'mat-header-row, tr[mat-header-row]',\n                    template: ROW_TEMPLATE,\n                    host: {\n                        'class': 'mat-mdc-header-row mdc-data-table__header-row',\n                        'role': 'row',\n                    },\n                    // See note on CdkTable for explanation on why this uses the default change detection strategy.\n                    // tslint:disable-next-line:validate-decorators\n                    changeDetection: ChangeDetectionStrategy.Default,\n                    encapsulation: ViewEncapsulation.None,\n                    exportAs: 'matHeaderRow',\n                    providers: [{ provide: CdkHeaderRow, useExisting: MatHeaderRow }],\n                    imports: [CdkCellOutlet],\n                }]\n        }] });\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\nclass MatFooterRow extends CdkFooterRow {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFooterRow, deps: null, target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatFooterRow, isStandalone: true, selector: \"mat-footer-row, tr[mat-footer-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"mat-mdc-footer-row mdc-data-table__row\" }, providers: [{ provide: CdkFooterRow, useExisting: MatFooterRow }], exportAs: [\"matFooterRow\"], usesInheritance: true, ngImport: i0, template: \"<ng-container cdkCellOutlet></ng-container>\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatFooterRow, decorators: [{\n            type: Component,\n            args: [{\n                    selector: 'mat-footer-row, tr[mat-footer-row]',\n                    template: ROW_TEMPLATE,\n                    host: {\n                        'class': 'mat-mdc-footer-row mdc-data-table__row',\n                        'role': 'row',\n                    },\n                    // See note on CdkTable for explanation on why this uses the default change detection strategy.\n                    // tslint:disable-next-line:validate-decorators\n                    changeDetection: ChangeDetectionStrategy.Default,\n                    encapsulation: ViewEncapsulation.None,\n                    exportAs: 'matFooterRow',\n                    providers: [{ provide: CdkFooterRow, useExisting: MatFooterRow }],\n                    imports: [CdkCellOutlet],\n                }]\n        }] });\n/** Data row template container that contains the cell outlet. Adds the right class and role. */\nclass MatRow extends CdkRow {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRow, deps: null, target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatRow, isStandalone: true, selector: \"mat-row, tr[mat-row]\", host: { attributes: { \"role\": \"row\" }, classAttribute: \"mat-mdc-row mdc-data-table__row\" }, providers: [{ provide: CdkRow, useExisting: MatRow }], exportAs: [\"matRow\"], usesInheritance: true, ngImport: i0, template: \"<ng-container cdkCellOutlet></ng-container>\", isInline: true, dependencies: [{ kind: \"directive\", type: CdkCellOutlet, selector: \"[cdkCellOutlet]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatRow, decorators: [{\n            type: Component,\n            args: [{\n                    selector: 'mat-row, tr[mat-row]',\n                    template: ROW_TEMPLATE,\n                    host: {\n                        'class': 'mat-mdc-row mdc-data-table__row',\n                        'role': 'row',\n                    },\n                    // See note on CdkTable for explanation on why this uses the default change detection strategy.\n                    // tslint:disable-next-line:validate-decorators\n                    changeDetection: ChangeDetectionStrategy.Default,\n                    encapsulation: ViewEncapsulation.None,\n                    exportAs: 'matRow',\n                    providers: [{ provide: CdkRow, useExisting: MatRow }],\n                    imports: [CdkCellOutlet],\n                }]\n        }] });\n/** Row that can be used to display a message when no data is shown in the table. */\nclass MatNoDataRow extends CdkNoDataRow {\n    _contentClassName = 'mat-mdc-no-data-row';\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatNoDataRow, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatNoDataRow, isStandalone: true, selector: \"ng-template[matNoDataRow]\", providers: [{ provide: CdkNoDataRow, useExisting: MatNoDataRow }], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatNoDataRow, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: 'ng-template[matNoDataRow]',\n                    providers: [{ provide: CdkNoDataRow, useExisting: MatNoDataRow }],\n                }]\n        }] });\n\n/**\n * Column that simply shows text content for the header and row cells. Assumes that the table\n * is using the native table implementation (`<table>`).\n *\n * By default, the name of this column will be the header text and data property accessor.\n * The header text can be overridden with the `headerText` input. Cell values can be overridden with\n * the `dataAccessor` input. Change the text justification to the start or end using the `justify`\n * input.\n */\nclass MatTextColumn extends CdkTextColumn {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatTextColumn, deps: null, target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatTextColumn, isStandalone: true, selector: \"mat-text-column\", usesInheritance: true, ngImport: i0, template: `\n    <ng-container matColumnDef>\n      <th mat-header-cell *matHeaderCellDef [style.text-align]=\"justify\">\n        {{headerText}}\n      </th>\n      <td mat-cell *matCellDef=\"let data\" [style.text-align]=\"justify\">\n        {{dataAccessor(data, name)}}\n      </td>\n    </ng-container>\n  `, isInline: true, dependencies: [{ kind: \"directive\", type: MatColumnDef, selector: \"[matColumnDef]\", inputs: [\"matColumnDef\"] }, { kind: \"directive\", type: MatHeaderCellDef, selector: \"[matHeaderCellDef]\" }, { kind: \"directive\", type: MatHeaderCell, selector: \"mat-header-cell, th[mat-header-cell]\" }, { kind: \"directive\", type: MatCellDef, selector: \"[matCellDef]\" }, { kind: \"directive\", type: MatCell, selector: \"mat-cell, td[mat-cell]\" }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatTextColumn, decorators: [{\n            type: Component,\n            args: [{\n                    selector: 'mat-text-column',\n                    template: `\n    <ng-container matColumnDef>\n      <th mat-header-cell *matHeaderCellDef [style.text-align]=\"justify\">\n        {{headerText}}\n      </th>\n      <td mat-cell *matCellDef=\"let data\" [style.text-align]=\"justify\">\n        {{dataAccessor(data, name)}}\n      </td>\n    </ng-container>\n  `,\n                    encapsulation: ViewEncapsulation.None,\n                    // Change detection is intentionally not set to OnPush. This component's template will be provided\n                    // to the table to be inserted into its view. This is problematic when change detection runs since\n                    // the bindings in this template will be evaluated _after_ the table's view is evaluated, which\n                    // mean's the template in the table's view will not have the updated value (and in fact will cause\n                    // an ExpressionChangedAfterItHasBeenCheckedError).\n                    // tslint:disable-next-line:validate-decorators\n                    changeDetection: ChangeDetectionStrategy.Default,\n                    imports: [MatColumnDef, MatHeaderCellDef, MatHeaderCell, MatCellDef, MatCell],\n                }]\n        }] });\n\nconst EXPORTED_DECLARATIONS = [\n    // Table\n    MatTable,\n    MatRecycleRows,\n    // Template defs\n    MatHeaderCellDef,\n    MatHeaderRowDef,\n    MatColumnDef,\n    MatCellDef,\n    MatRowDef,\n    MatFooterCellDef,\n    MatFooterRowDef,\n    // Cell directives\n    MatHeaderCell,\n    MatCell,\n    MatFooterCell,\n    // Row directives\n    MatHeaderRow,\n    MatRow,\n    MatFooterRow,\n    MatNoDataRow,\n    MatTextColumn,\n];\nclass MatTableModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatTableModule, imports: [MatCommonModule, CdkTableModule, \n            // Table\n            MatTable,\n            MatRecycleRows,\n            // Template defs\n            MatHeaderCellDef,\n            MatHeaderRowDef,\n            MatColumnDef,\n            MatCellDef,\n            MatRowDef,\n            MatFooterCellDef,\n            MatFooterRowDef,\n            // Cell directives\n            MatHeaderCell,\n            MatCell,\n            MatFooterCell,\n            // Row directives\n            MatHeaderRow,\n            MatRow,\n            MatFooterRow,\n            MatNoDataRow,\n            MatTextColumn], exports: [MatCommonModule, \n            // Table\n            MatTable,\n            MatRecycleRows,\n            // Template defs\n            MatHeaderCellDef,\n            MatHeaderRowDef,\n            MatColumnDef,\n            MatCellDef,\n            MatRowDef,\n            MatFooterCellDef,\n            MatFooterRowDef,\n            // Cell directives\n            MatHeaderCell,\n            MatCell,\n            MatFooterCell,\n            // Row directives\n            MatHeaderRow,\n            MatRow,\n            MatFooterRow,\n            MatNoDataRow,\n            MatTextColumn] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatTableModule, imports: [MatCommonModule, CdkTableModule, MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatTableModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [MatCommonModule, CdkTableModule, ...EXPORTED_DECLARATIONS],\n                    exports: [MatCommonModule, EXPORTED_DECLARATIONS],\n                }]\n        }] });\n\n/**\n * Corresponds to `Number.MAX_SAFE_INTEGER`. Moved out into a variable here due to\n * flaky browser support and the value not being defined in Closure's typings.\n */\nconst MAX_SAFE_INTEGER = 9007199254740991;\n/**\n * Data source that accepts a client-side data array and includes native support of filtering,\n * sorting (using MatSort), and pagination (using MatPaginator).\n *\n * Allows for sort customization by overriding sortingDataAccessor, which defines how data\n * properties are accessed. Also allows for filter customization by overriding filterPredicate,\n * which defines how row data is converted to a string for filter matching.\n *\n * **Note:** This class is meant to be a simple data source to help you get started. As such\n * it isn't equipped to handle some more advanced cases like robust i18n support or server-side\n * interactions. If your app needs to support more advanced use cases, consider implementing your\n * own `DataSource`.\n */\nclass MatTableDataSource extends DataSource {\n    /** Stream that emits when a new data array is set on the data source. */\n    _data;\n    /** Stream emitting render data to the table (depends on ordered data changes). */\n    _renderData = new BehaviorSubject([]);\n    /** Stream that emits when a new filter string is set on the data source. */\n    _filter = new BehaviorSubject('');\n    /** Used to react to internal changes of the paginator that are made by the data source itself. */\n    _internalPageChanges = new Subject();\n    /**\n     * Subscription to the changes that should trigger an update to the table's rendered rows, such\n     * as filtering, sorting, pagination, or base data changes.\n     */\n    _renderChangesSubscription = null;\n    /**\n     * The filtered set of data that has been matched by the filter string, or all the data if there\n     * is no filter. Useful for knowing the set of data the table represents.\n     * For example, a 'selectAll()' function would likely want to select the set of filtered data\n     * shown to the user rather than all the data.\n     */\n    filteredData;\n    /** Array of data that should be rendered by the table, where each object represents one row. */\n    get data() {\n        return this._data.value;\n    }\n    set data(data) {\n        data = Array.isArray(data) ? data : [];\n        this._data.next(data);\n        // Normally the `filteredData` is updated by the re-render\n        // subscription, but that won't happen if it's inactive.\n        if (!this._renderChangesSubscription) {\n            this._filterData(data);\n        }\n    }\n    /**\n     * Filter term that should be used to filter out objects from the data array. To override how\n     * data objects match to this filter string, provide a custom function for filterPredicate.\n     */\n    get filter() {\n        return this._filter.value;\n    }\n    set filter(filter) {\n        this._filter.next(filter);\n        // Normally the `filteredData` is updated by the re-render\n        // subscription, but that won't happen if it's inactive.\n        if (!this._renderChangesSubscription) {\n            this._filterData(this.data);\n        }\n    }\n    /**\n     * Instance of the MatSort directive used by the table to control its sorting. Sort changes\n     * emitted by the MatSort will trigger an update to the table's rendered data.\n     */\n    get sort() {\n        return this._sort;\n    }\n    set sort(sort) {\n        this._sort = sort;\n        this._updateChangeSubscription();\n    }\n    _sort;\n    /**\n     * Instance of the paginator component used by the table to control what page of the data is\n     * displayed. Page changes emitted by the paginator will trigger an update to the\n     * table's rendered data.\n     *\n     * Note that the data source uses the paginator's properties to calculate which page of data\n     * should be displayed. If the paginator receives its properties as template inputs,\n     * e.g. `[pageLength]=100` or `[pageIndex]=1`, then be sure that the paginator's view has been\n     * initialized before assigning it to this data source.\n     */\n    get paginator() {\n        return this._paginator;\n    }\n    set paginator(paginator) {\n        this._paginator = paginator;\n        this._updateChangeSubscription();\n    }\n    _paginator;\n    /**\n     * Data accessor function that is used for accessing data properties for sorting through\n     * the default sortData function.\n     * This default function assumes that the sort header IDs (which defaults to the column name)\n     * matches the data's properties (e.g. column Xyz represents data['Xyz']).\n     * May be set to a custom function for different behavior.\n     * @param data Data object that is being accessed.\n     * @param sortHeaderId The name of the column that represents the data.\n     */\n    sortingDataAccessor = (data, sortHeaderId) => {\n        const value = data[sortHeaderId];\n        if (_isNumberValue(value)) {\n            const numberValue = Number(value);\n            // Numbers beyond `MAX_SAFE_INTEGER` can't be compared reliably so we leave them as strings.\n            // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER\n            return numberValue < MAX_SAFE_INTEGER ? numberValue : value;\n        }\n        return value;\n    };\n    /**\n     * Gets a sorted copy of the data array based on the state of the MatSort. Called\n     * after changes are made to the filtered data or when sort changes are emitted from MatSort.\n     * By default, the function retrieves the active sort and its direction and compares data\n     * by retrieving data using the sortingDataAccessor. May be overridden for a custom implementation\n     * of data ordering.\n     * @param data The array of data that should be sorted.\n     * @param sort The connected MatSort that holds the current sort state.\n     */\n    sortData = (data, sort) => {\n        const active = sort.active;\n        const direction = sort.direction;\n        if (!active || direction == '') {\n            return data;\n        }\n        return data.sort((a, b) => {\n            let valueA = this.sortingDataAccessor(a, active);\n            let valueB = this.sortingDataAccessor(b, active);\n            // If there are data in the column that can be converted to a number,\n            // it must be ensured that the rest of the data\n            // is of the same type so as not to order incorrectly.\n            const valueAType = typeof valueA;\n            const valueBType = typeof valueB;\n            if (valueAType !== valueBType) {\n                if (valueAType === 'number') {\n                    valueA += '';\n                }\n                if (valueBType === 'number') {\n                    valueB += '';\n                }\n            }\n            // If both valueA and valueB exist (truthy), then compare the two. Otherwise, check if\n            // one value exists while the other doesn't. In this case, existing value should come last.\n            // This avoids inconsistent results when comparing values to undefined/null.\n            // If neither value exists, return 0 (equal).\n            let comparatorResult = 0;\n            if (valueA != null && valueB != null) {\n                // Check if one value is greater than the other; if equal, comparatorResult should remain 0.\n                if (valueA > valueB) {\n                    comparatorResult = 1;\n                }\n                else if (valueA < valueB) {\n                    comparatorResult = -1;\n                }\n            }\n            else if (valueA != null) {\n                comparatorResult = 1;\n            }\n            else if (valueB != null) {\n                comparatorResult = -1;\n            }\n            return comparatorResult * (direction == 'asc' ? 1 : -1);\n        });\n    };\n    /**\n     * Checks if a data object matches the data source's filter string. By default, each data object\n     * is converted to a string of its properties and returns true if the filter has\n     * at least one occurrence in that string. By default, the filter string has its whitespace\n     * trimmed and the match is case-insensitive. May be overridden for a custom implementation of\n     * filter matching.\n     * @param data Data object used to check against the filter.\n     * @param filter Filter string that has been set on the data source.\n     * @returns Whether the filter matches against the data\n     */\n    filterPredicate = (data, filter) => {\n        // Transform the filter by converting it to lowercase and removing whitespace.\n        const transformedFilter = filter.trim().toLowerCase();\n        // Loops over the values in the array and returns true if any of them match the filter string\n        return Object.values(data).some(value => `${value}`.toLowerCase().includes(transformedFilter));\n    };\n    constructor(initialData = []) {\n        super();\n        this._data = new BehaviorSubject(initialData);\n        this._updateChangeSubscription();\n    }\n    /**\n     * Subscribe to changes that should trigger an update to the table's rendered rows. When the\n     * changes occur, process the current state of the filter, sort, and pagination along with\n     * the provided base data and send it to the table for rendering.\n     */\n    _updateChangeSubscription() {\n        // Sorting and/or pagination should be watched if sort and/or paginator are provided.\n        // The events should emit whenever the component emits a change or initializes, or if no\n        // component is provided, a stream with just a null event should be provided.\n        // The `sortChange` and `pageChange` acts as a signal to the combineLatests below so that the\n        // pipeline can progress to the next step. Note that the value from these streams are not used,\n        // they purely act as a signal to progress in the pipeline.\n        const sortChange = this._sort\n            ? merge(this._sort.sortChange, this._sort.initialized)\n            : of(null);\n        const pageChange = this._paginator\n            ? merge(this._paginator.page, this._internalPageChanges, this._paginator.initialized)\n            : of(null);\n        const dataStream = this._data;\n        // Watch for base data or filter changes to provide a filtered set of data.\n        const filteredData = combineLatest([dataStream, this._filter]).pipe(map(([data]) => this._filterData(data)));\n        // Watch for filtered data or sort changes to provide an ordered set of data.\n        const orderedData = combineLatest([filteredData, sortChange]).pipe(map(([data]) => this._orderData(data)));\n        // Watch for ordered data or page changes to provide a paged set of data.\n        const paginatedData = combineLatest([orderedData, pageChange]).pipe(map(([data]) => this._pageData(data)));\n        // Watched for paged data changes and send the result to the table to render.\n        this._renderChangesSubscription?.unsubscribe();\n        this._renderChangesSubscription = paginatedData.subscribe(data => this._renderData.next(data));\n    }\n    /**\n     * Returns a filtered data array where each filter object contains the filter string within\n     * the result of the filterPredicate function. If no filter is set, returns the data array\n     * as provided.\n     */\n    _filterData(data) {\n        // If there is a filter string, filter out data that does not contain it.\n        // Each data object is converted to a string using the function defined by filterPredicate.\n        // May be overridden for customization.\n        this.filteredData =\n            this.filter == null || this.filter === ''\n                ? data\n                : data.filter(obj => this.filterPredicate(obj, this.filter));\n        if (this.paginator) {\n            this._updatePaginator(this.filteredData.length);\n        }\n        return this.filteredData;\n    }\n    /**\n     * Returns a sorted copy of the data if MatSort has a sort applied, otherwise just returns the\n     * data array as provided. Uses the default data accessor for data lookup, unless a\n     * sortDataAccessor function is defined.\n     */\n    _orderData(data) {\n        // If there is no active sort or direction, return the data without trying to sort.\n        if (!this.sort) {\n            return data;\n        }\n        return this.sortData(data.slice(), this.sort);\n    }\n    /**\n     * Returns a paged slice of the provided data array according to the provided paginator's page\n     * index and length. If there is no paginator provided, returns the data array as provided.\n     */\n    _pageData(data) {\n        if (!this.paginator) {\n            return data;\n        }\n        const startIndex = this.paginator.pageIndex * this.paginator.pageSize;\n        return data.slice(startIndex, startIndex + this.paginator.pageSize);\n    }\n    /**\n     * Updates the paginator to reflect the length of the filtered data, and makes sure that the page\n     * index does not exceed the paginator's last page. Values are changed in a resolved promise to\n     * guard against making property changes within a round of change detection.\n     */\n    _updatePaginator(filteredDataLength) {\n        Promise.resolve().then(() => {\n            const paginator = this.paginator;\n            if (!paginator) {\n                return;\n            }\n            paginator.length = filteredDataLength;\n            // If the page index is set beyond the page, reduce it to the last page.\n            if (paginator.pageIndex > 0) {\n                const lastPageIndex = Math.ceil(paginator.length / paginator.pageSize) - 1 || 0;\n                const newPageIndex = Math.min(paginator.pageIndex, lastPageIndex);\n                if (newPageIndex !== paginator.pageIndex) {\n                    paginator.pageIndex = newPageIndex;\n                    // Since the paginator only emits after user-generated changes,\n                    // we need our own stream so we know to should re-render the data.\n                    this._internalPageChanges.next();\n                }\n            }\n        });\n    }\n    /**\n     * Used by the MatTable. Called when it connects to the data source.\n     * @docs-private\n     */\n    connect() {\n        if (!this._renderChangesSubscription) {\n            this._updateChangeSubscription();\n        }\n        return this._renderData;\n    }\n    /**\n     * Used by the MatTable. Called when it disconnects from the data source.\n     * @docs-private\n     */\n    disconnect() {\n        this._renderChangesSubscription?.unsubscribe();\n        this._renderChangesSubscription = null;\n    }\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MatCell, MatCellDef, MatColumnDef, MatFooterCell, MatFooterCellDef, MatFooterRow, MatFooterRowDef, MatHeaderCell, MatHeaderCellDef, MatHeaderRow, MatHeaderRowDef, MatNoDataRow, MatRecycleRows, MatRow, MatRowDef, MatTable, MatTableDataSource, MatTableModule, MatTextColumn };\n","import { FocusTrapFactory, InteractivityChecker, FocusMonitor, _IdGenerator, A11yModule } from '@angular/cdk/a11y';\nimport { OverlayRef, Overlay, OverlayContainer, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';\nimport { Platform, _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\nimport { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, ElementRef, NgZone, Renderer2, ChangeDetectorRef, Injector, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, InjectionToken, TemplateRef, Injectable, NgModule } from '@angular/core';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { Subject, defer, of } from 'rxjs';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { startWith } from 'rxjs/operators';\n\n/** Configuration for opening a modal dialog. */\nclass DialogConfig {\n    /**\n     * Where the attached component should live in Angular's *logical* component tree.\n     * This affects what is available for injection and the change detection order for the\n     * component instantiated inside of the dialog. This does not affect where the dialog\n     * content will be rendered.\n     */\n    viewContainerRef;\n    /**\n     * Injector used for the instantiation of the component to be attached. If provided,\n     * takes precedence over the injector indirectly provided by `ViewContainerRef`.\n     */\n    injector;\n    /** ID for the dialog. If omitted, a unique one will be generated. */\n    id;\n    /** The ARIA role of the dialog element. */\n    role = 'dialog';\n    /** Optional CSS class or classes applied to the overlay panel. */\n    panelClass = '';\n    /** Whether the dialog has a backdrop. */\n    hasBackdrop = true;\n    /** Optional CSS class or classes applied to the overlay backdrop. */\n    backdropClass = '';\n    /** Whether the dialog closes with the escape key or pointer events outside the panel element. */\n    disableClose = false;\n    /** Width of the dialog. */\n    width = '';\n    /** Height of the dialog. */\n    height = '';\n    /** Min-width of the dialog. If a number is provided, assumes pixel units. */\n    minWidth;\n    /** Min-height of the dialog. If a number is provided, assumes pixel units. */\n    minHeight;\n    /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */\n    maxWidth;\n    /** Max-height of the dialog. If a number is provided, assumes pixel units. */\n    maxHeight;\n    /** Strategy to use when positioning the dialog. Defaults to centering it on the page. */\n    positionStrategy;\n    /** Data being injected into the child component. */\n    data = null;\n    /** Layout direction for the dialog's content. */\n    direction;\n    /** ID of the element that describes the dialog. */\n    ariaDescribedBy = null;\n    /** ID of the element that labels the dialog. */\n    ariaLabelledBy = null;\n    /** Dialog label applied via `aria-label` */\n    ariaLabel = null;\n    /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */\n    ariaModal = true;\n    /**\n     * Where the dialog should focus on open.\n     * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n     * AutoFocusTarget instead.\n     */\n    autoFocus = 'first-tabbable';\n    /**\n     * Whether the dialog should restore focus to the previously-focused element upon closing.\n     * Has the following behavior based on the type that is passed in:\n     * - `boolean` - when true, will return focus to the element that was focused before the dialog\n     *    was opened, otherwise won't restore focus at all.\n     * - `string` - focus will be restored to the first element that matches the CSS selector.\n     * - `HTMLElement` - focus will be restored to the specific element.\n     */\n    restoreFocus = true;\n    /**\n     * Scroll strategy to be used for the dialog. This determines how\n     * the dialog responds to scrolling underneath the panel element.\n     */\n    scrollStrategy;\n    /**\n     * Whether the dialog should close when the user navigates backwards or forwards through browser\n     * history. This does not apply to navigation via anchor element unless using URL-hash based\n     * routing (`HashLocationStrategy` in the Angular router).\n     */\n    closeOnNavigation = true;\n    /**\n     * Whether the dialog should close when the dialog service is destroyed. This is useful if\n     * another service is wrapping the dialog and is managing the destruction instead.\n     */\n    closeOnDestroy = true;\n    /**\n     * Whether the dialog should close when the underlying overlay is detached. This is useful if\n     * another service is wrapping the dialog and is managing the destruction instead. E.g. an\n     * external detachment can happen as a result of a scroll strategy triggering it or when the\n     * browser location changes.\n     */\n    closeOnOverlayDetachments = true;\n    /**\n     * Alternate `ComponentFactoryResolver` to use when resolving the associated component.\n     * @deprecated No longer used. Will be removed.\n     * @breaking-change 20.0.0\n     */\n    componentFactoryResolver;\n    /**\n     * Providers that will be exposed to the contents of the dialog. Can also\n     * be provided as a function in order to generate the providers lazily.\n     */\n    providers;\n    /**\n     * Component into which the dialog content will be rendered. Defaults to `CdkDialogContainer`.\n     * A configuration object can be passed in to customize the providers that will be exposed\n     * to the dialog container.\n     */\n    container;\n    /**\n     * Context that will be passed to template-based dialogs.\n     * A function can be passed in to resolve the context lazily.\n     */\n    templateContext;\n}\n\nfunction throwDialogContentAlreadyAttachedError() {\n    throw Error('Attempting to attach dialog content after content is already attached');\n}\n/**\n * Internal component that wraps user-provided dialog content.\n * @docs-private\n */\nclass CdkDialogContainer extends BasePortalOutlet {\n    _elementRef = inject(ElementRef);\n    _focusTrapFactory = inject(FocusTrapFactory);\n    _config;\n    _interactivityChecker = inject(InteractivityChecker);\n    _ngZone = inject(NgZone);\n    _overlayRef = inject(OverlayRef);\n    _focusMonitor = inject(FocusMonitor);\n    _renderer = inject(Renderer2);\n    _platform = inject(Platform);\n    _document = inject(DOCUMENT, { optional: true });\n    /** The portal outlet inside of this container into which the dialog content will be loaded. */\n    _portalOutlet;\n    /** The class that traps and manages focus within the dialog. */\n    _focusTrap = null;\n    /** Element that was focused before the dialog was opened. Save this to restore upon close. */\n    _elementFocusedBeforeDialogWasOpened = null;\n    /**\n     * Type of interaction that led to the dialog being closed. This is used to determine\n     * whether the focus style will be applied when returning focus to its original location\n     * after the dialog is closed.\n     */\n    _closeInteractionType = null;\n    /**\n     * Queue of the IDs of the dialog's label element, based on their definition order. The first\n     * ID will be used as the `aria-labelledby` value. We use a queue here to handle the case\n     * where there are two or more titles in the DOM at a time and the first one is destroyed while\n     * the rest are present.\n     */\n    _ariaLabelledByQueue = [];\n    _changeDetectorRef = inject(ChangeDetectorRef);\n    _injector = inject(Injector);\n    _isDestroyed = false;\n    constructor() {\n        super();\n        // Callback is primarily for some internal tests\n        // that were instantiating the dialog container manually.\n        this._config = (inject(DialogConfig, { optional: true }) || new DialogConfig());\n        if (this._config.ariaLabelledBy) {\n            this._ariaLabelledByQueue.push(this._config.ariaLabelledBy);\n        }\n    }\n    _addAriaLabelledBy(id) {\n        this._ariaLabelledByQueue.push(id);\n        this._changeDetectorRef.markForCheck();\n    }\n    _removeAriaLabelledBy(id) {\n        const index = this._ariaLabelledByQueue.indexOf(id);\n        if (index > -1) {\n            this._ariaLabelledByQueue.splice(index, 1);\n            this._changeDetectorRef.markForCheck();\n        }\n    }\n    _contentAttached() {\n        this._initializeFocusTrap();\n        this._handleBackdropClicks();\n        this._captureInitialFocus();\n    }\n    /**\n     * Can be used by child classes to customize the initial focus\n     * capturing behavior (e.g. if it's tied to an animation).\n     */\n    _captureInitialFocus() {\n        this._trapFocus();\n    }\n    ngOnDestroy() {\n        this._isDestroyed = true;\n        this._restoreFocus();\n    }\n    /**\n     * Attach a ComponentPortal as content to this dialog container.\n     * @param portal Portal to be attached as the dialog content.\n     */\n    attachComponentPortal(portal) {\n        if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throwDialogContentAlreadyAttachedError();\n        }\n        const result = this._portalOutlet.attachComponentPortal(portal);\n        this._contentAttached();\n        return result;\n    }\n    /**\n     * Attach a TemplatePortal as content to this dialog container.\n     * @param portal Portal to be attached as the dialog content.\n     */\n    attachTemplatePortal(portal) {\n        if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throwDialogContentAlreadyAttachedError();\n        }\n        const result = this._portalOutlet.attachTemplatePortal(portal);\n        this._contentAttached();\n        return result;\n    }\n    /**\n     * Attaches a DOM portal to the dialog container.\n     * @param portal Portal to be attached.\n     * @deprecated To be turned into a method.\n     * @breaking-change 10.0.0\n     */\n    attachDomPortal = (portal) => {\n        if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throwDialogContentAlreadyAttachedError();\n        }\n        const result = this._portalOutlet.attachDomPortal(portal);\n        this._contentAttached();\n        return result;\n    };\n    // TODO(crisbeto): this shouldn't be exposed, but there are internal references to it.\n    /** Captures focus if it isn't already inside the dialog. */\n    _recaptureFocus() {\n        if (!this._containsFocus()) {\n            this._trapFocus();\n        }\n    }\n    /**\n     * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n     * attribute to forcefully focus it. The attribute is removed after focus is moved.\n     * @param element The element to focus.\n     */\n    _forceFocus(element, options) {\n        if (!this._interactivityChecker.isFocusable(element)) {\n            element.tabIndex = -1;\n            // The tabindex attribute should be removed to avoid navigating to that element again\n            this._ngZone.runOutsideAngular(() => {\n                const callback = () => {\n                    deregisterBlur();\n                    deregisterMousedown();\n                    element.removeAttribute('tabindex');\n                };\n                const deregisterBlur = this._renderer.listen(element, 'blur', callback);\n                const deregisterMousedown = this._renderer.listen(element, 'mousedown', callback);\n            });\n        }\n        element.focus(options);\n    }\n    /**\n     * Focuses the first element that matches the given selector within the focus trap.\n     * @param selector The CSS selector for the element to set focus to.\n     */\n    _focusByCssSelector(selector, options) {\n        let elementToFocus = this._elementRef.nativeElement.querySelector(selector);\n        if (elementToFocus) {\n            this._forceFocus(elementToFocus, options);\n        }\n    }\n    /**\n     * Moves the focus inside the focus trap. When autoFocus is not set to 'dialog', if focus\n     * cannot be moved then focus will go to the dialog container.\n     */\n    _trapFocus() {\n        if (this._isDestroyed) {\n            return;\n        }\n        // If were to attempt to focus immediately, then the content of the dialog would not yet be\n        // ready in instances where change detection has to run first. To deal with this, we simply\n        // wait until after the next render.\n        afterNextRender(() => {\n            const element = this._elementRef.nativeElement;\n            switch (this._config.autoFocus) {\n                case false:\n                case 'dialog':\n                    // Ensure that focus is on the dialog container. It's possible that a different\n                    // component tried to move focus while the open animation was running. See:\n                    // https://github.com/angular/components/issues/16215. Note that we only want to do this\n                    // if the focus isn't inside the dialog already, because it's possible that the consumer\n                    // turned off `autoFocus` in order to move focus themselves.\n                    if (!this._containsFocus()) {\n                        element.focus();\n                    }\n                    break;\n                case true:\n                case 'first-tabbable':\n                    const focusedSuccessfully = this._focusTrap?.focusInitialElement();\n                    // If we weren't able to find a focusable element in the dialog, then focus the dialog\n                    // container instead.\n                    if (!focusedSuccessfully) {\n                        this._focusDialogContainer();\n                    }\n                    break;\n                case 'first-heading':\n                    this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]');\n                    break;\n                default:\n                    this._focusByCssSelector(this._config.autoFocus);\n                    break;\n            }\n        }, { injector: this._injector });\n    }\n    /** Restores focus to the element that was focused before the dialog opened. */\n    _restoreFocus() {\n        const focusConfig = this._config.restoreFocus;\n        let focusTargetElement = null;\n        if (typeof focusConfig === 'string') {\n            focusTargetElement = this._document.querySelector(focusConfig);\n        }\n        else if (typeof focusConfig === 'boolean') {\n            focusTargetElement = focusConfig ? this._elementFocusedBeforeDialogWasOpened : null;\n        }\n        else if (focusConfig) {\n            focusTargetElement = focusConfig;\n        }\n        // We need the extra check, because IE can set the `activeElement` to null in some cases.\n        if (this._config.restoreFocus &&\n            focusTargetElement &&\n            typeof focusTargetElement.focus === 'function') {\n            const activeElement = _getFocusedElementPierceShadowDom();\n            const element = this._elementRef.nativeElement;\n            // Make sure that focus is still inside the dialog or is on the body (usually because a\n            // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n            // the consumer moved it themselves before the animation was done, in which case we shouldn't\n            // do anything.\n            if (!activeElement ||\n                activeElement === this._document.body ||\n                activeElement === element ||\n                element.contains(activeElement)) {\n                if (this._focusMonitor) {\n                    this._focusMonitor.focusVia(focusTargetElement, this._closeInteractionType);\n                    this._closeInteractionType = null;\n                }\n                else {\n                    focusTargetElement.focus();\n                }\n            }\n        }\n        if (this._focusTrap) {\n            this._focusTrap.destroy();\n        }\n    }\n    /** Focuses the dialog container. */\n    _focusDialogContainer() {\n        // Note that there is no focus method when rendering on the server.\n        if (this._elementRef.nativeElement.focus) {\n            this._elementRef.nativeElement.focus();\n        }\n    }\n    /** Returns whether focus is inside the dialog. */\n    _containsFocus() {\n        const element = this._elementRef.nativeElement;\n        const activeElement = _getFocusedElementPierceShadowDom();\n        return element === activeElement || element.contains(activeElement);\n    }\n    /** Sets up the focus trap. */\n    _initializeFocusTrap() {\n        if (this._platform.isBrowser) {\n            this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);\n            // Save the previously focused element. This element will be re-focused\n            // when the dialog closes.\n            if (this._document) {\n                this._elementFocusedBeforeDialogWasOpened = _getFocusedElementPierceShadowDom();\n            }\n        }\n    }\n    /** Sets up the listener that handles clicks on the dialog backdrop. */\n    _handleBackdropClicks() {\n        // Clicking on the backdrop will move focus out of dialog.\n        // Recapture it if closing via the backdrop is disabled.\n        this._overlayRef.backdropClick().subscribe(() => {\n            if (this._config.disableClose) {\n                this._recaptureFocus();\n            }\n        });\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkDialogContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: CdkDialogContainer, isStandalone: true, selector: \"cdk-dialog-container\", host: { attributes: { \"tabindex\": \"-1\" }, properties: { \"attr.id\": \"_config.id || null\", \"attr.role\": \"_config.role\", \"attr.aria-modal\": \"_config.ariaModal\", \"attr.aria-labelledby\": \"_config.ariaLabel ? null : _ariaLabelledByQueue[0]\", \"attr.aria-label\": \"_config.ariaLabel\", \"attr.aria-describedby\": \"_config.ariaDescribedBy || null\" }, classAttribute: \"cdk-dialog-container\" }, viewQueries: [{ propertyName: \"_portalOutlet\", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: \"<ng-template cdkPortalOutlet />\\n\", styles: [\".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}\"], dependencies: [{ kind: \"directive\", type: CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: CdkDialogContainer, decorators: [{\n            type: Component,\n            args: [{ selector: 'cdk-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, imports: [CdkPortalOutlet], host: {\n                        'class': 'cdk-dialog-container',\n                        'tabindex': '-1',\n                        '[attr.id]': '_config.id || null',\n                        '[attr.role]': '_config.role',\n                        '[attr.aria-modal]': '_config.ariaModal',\n                        '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',\n                        '[attr.aria-label]': '_config.ariaLabel',\n                        '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n                    }, template: \"<ng-template cdkPortalOutlet />\\n\", styles: [\".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}\"] }]\n        }], ctorParameters: () => [], propDecorators: { _portalOutlet: [{\n                type: ViewChild,\n                args: [CdkPortalOutlet, { static: true }]\n            }] } });\n\n/**\n * Reference to a dialog opened via the Dialog service.\n */\nclass DialogRef {\n    overlayRef;\n    config;\n    /**\n     * Instance of component opened into the dialog. Will be\n     * null when the dialog is opened using a `TemplateRef`.\n     */\n    componentInstance;\n    /**\n     * `ComponentRef` of the component opened into the dialog. Will be\n     * null when the dialog is opened using a `TemplateRef`.\n     */\n    componentRef;\n    /** Instance of the container that is rendering out the dialog content. */\n    containerInstance;\n    /** Whether the user is allowed to close the dialog. */\n    disableClose;\n    /** Emits when the dialog has been closed. */\n    closed = new Subject();\n    /** Emits when the backdrop of the dialog is clicked. */\n    backdropClick;\n    /** Emits when on keyboard events within the dialog. */\n    keydownEvents;\n    /** Emits on pointer events that happen outside of the dialog. */\n    outsidePointerEvents;\n    /** Unique ID for the dialog. */\n    id;\n    /** Subscription to external detachments of the dialog. */\n    _detachSubscription;\n    constructor(overlayRef, config) {\n        this.overlayRef = overlayRef;\n        this.config = config;\n        this.disableClose = config.disableClose;\n        this.backdropClick = overlayRef.backdropClick();\n        this.keydownEvents = overlayRef.keydownEvents();\n        this.outsidePointerEvents = overlayRef.outsidePointerEvents();\n        this.id = config.id; // By the time the dialog is created we are guaranteed to have an ID.\n        this.keydownEvents.subscribe(event => {\n            if (event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)) {\n                event.preventDefault();\n                this.close(undefined, { focusOrigin: 'keyboard' });\n            }\n        });\n        this.backdropClick.subscribe(() => {\n            if (!this.disableClose) {\n                this.close(undefined, { focusOrigin: 'mouse' });\n            }\n        });\n        this._detachSubscription = overlayRef.detachments().subscribe(() => {\n            // Check specifically for `false`, because we want `undefined` to be treated like `true`.\n            if (config.closeOnOverlayDetachments !== false) {\n                this.close();\n            }\n        });\n    }\n    /**\n     * Close the dialog.\n     * @param result Optional result to return to the dialog opener.\n     * @param options Additional options to customize the closing behavior.\n     */\n    close(result, options) {\n        if (this.containerInstance) {\n            const closedSubject = this.closed;\n            this.containerInstance._closeInteractionType = options?.focusOrigin || 'program';\n            // Drop the detach subscription first since it can be triggered by the\n            // `dispose` call and override the result of this closing sequence.\n            this._detachSubscription.unsubscribe();\n            this.overlayRef.dispose();\n            closedSubject.next(result);\n            closedSubject.complete();\n            this.componentInstance = this.containerInstance = null;\n        }\n    }\n    /** Updates the position of the dialog based on the current position strategy. */\n    updatePosition() {\n        this.overlayRef.updatePosition();\n        return this;\n    }\n    /**\n     * Updates the dialog's width and height.\n     * @param width New width of the dialog.\n     * @param height New height of the dialog.\n     */\n    updateSize(width = '', height = '') {\n        this.overlayRef.updateSize({ width, height });\n        return this;\n    }\n    /** Add a CSS class or an array of classes to the overlay pane. */\n    addPanelClass(classes) {\n        this.overlayRef.addPanelClass(classes);\n        return this;\n    }\n    /** Remove a CSS class or an array of classes from the overlay pane. */\n    removePanelClass(classes) {\n        this.overlayRef.removePanelClass(classes);\n        return this;\n    }\n}\n\n/** Injection token for the Dialog's ScrollStrategy. */\nconst DIALOG_SCROLL_STRATEGY = new InjectionToken('DialogScrollStrategy', {\n    providedIn: 'root',\n    factory: () => {\n        const overlay = inject(Overlay);\n        return () => overlay.scrollStrategies.block();\n    },\n});\n/** Injection token for the Dialog's Data. */\nconst DIALOG_DATA = new InjectionToken('DialogData');\n/** Injection token that can be used to provide default options for the dialog module. */\nconst DEFAULT_DIALOG_CONFIG = new InjectionToken('DefaultDialogConfig');\n/**\n * @docs-private\n * @deprecated No longer used. To be removed.\n * @breaking-change 19.0.0\n */\nfunction DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n    return () => overlay.scrollStrategies.block();\n}\n/**\n * @docs-private\n * @deprecated No longer used. To be removed.\n * @breaking-change 19.0.0\n */\nconst DIALOG_SCROLL_STRATEGY_PROVIDER = {\n    provide: DIALOG_SCROLL_STRATEGY,\n    deps: [Overlay],\n    useFactory: DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n\nclass Dialog {\n    _overlay = inject(Overlay);\n    _injector = inject(Injector);\n    _defaultOptions = inject(DEFAULT_DIALOG_CONFIG, { optional: true });\n    _parentDialog = inject(Dialog, { optional: true, skipSelf: true });\n    _overlayContainer = inject(OverlayContainer);\n    _idGenerator = inject(_IdGenerator);\n    _openDialogsAtThisLevel = [];\n    _afterAllClosedAtThisLevel = new Subject();\n    _afterOpenedAtThisLevel = new Subject();\n    _ariaHiddenElements = new Map();\n    _scrollStrategy = inject(DIALOG_SCROLL_STRATEGY);\n    /** Keeps track of the currently-open dialogs. */\n    get openDialogs() {\n        return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n    }\n    /** Stream that emits when a dialog has been opened. */\n    get afterOpened() {\n        return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n    }\n    /**\n     * Stream that emits when all open dialog have finished closing.\n     * Will emit on subscribe if there are no open dialogs to begin with.\n     */\n    afterAllClosed = defer(() => this.openDialogs.length\n        ? this._getAfterAllClosed()\n        : this._getAfterAllClosed().pipe(startWith(undefined)));\n    constructor() { }\n    open(componentOrTemplateRef, config) {\n        const defaults = (this._defaultOptions || new DialogConfig());\n        config = { ...defaults, ...config };\n        config.id = config.id || this._idGenerator.getId('cdk-dialog-');\n        if (config.id &&\n            this.getDialogById(config.id) &&\n            (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n        }\n        const overlayConfig = this._getOverlayConfig(config);\n        const overlayRef = this._overlay.create(overlayConfig);\n        const dialogRef = new DialogRef(overlayRef, config);\n        const dialogContainer = this._attachContainer(overlayRef, dialogRef, config);\n        dialogRef.containerInstance = dialogContainer;\n        this._attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config);\n        // If this is the first dialog that we're opening, hide all the non-overlay content.\n        if (!this.openDialogs.length) {\n            this._hideNonDialogContentFromAssistiveTechnology();\n        }\n        this.openDialogs.push(dialogRef);\n        dialogRef.closed.subscribe(() => this._removeOpenDialog(dialogRef, true));\n        this.afterOpened.next(dialogRef);\n        return dialogRef;\n    }\n    /**\n     * Closes all of the currently-open dialogs.\n     */\n    closeAll() {\n        reverseForEach(this.openDialogs, dialog => dialog.close());\n    }\n    /**\n     * Finds an open dialog by its id.\n     * @param id ID to use when looking up the dialog.\n     */\n    getDialogById(id) {\n        return this.openDialogs.find(dialog => dialog.id === id);\n    }\n    ngOnDestroy() {\n        // Make one pass over all the dialogs that need to be untracked, but should not be closed. We\n        // want to stop tracking the open dialog even if it hasn't been closed, because the tracking\n        // determines when `aria-hidden` is removed from elements outside the dialog.\n        reverseForEach(this._openDialogsAtThisLevel, dialog => {\n            // Check for `false` specifically since we want `undefined` to be interpreted as `true`.\n            if (dialog.config.closeOnDestroy === false) {\n                this._removeOpenDialog(dialog, false);\n            }\n        });\n        // Make a second pass and close the remaining dialogs. We do this second pass in order to\n        // correctly dispatch the `afterAllClosed` event in case we have a mixed array of dialogs\n        // that should be closed and dialogs that should not.\n        reverseForEach(this._openDialogsAtThisLevel, dialog => dialog.close());\n        this._afterAllClosedAtThisLevel.complete();\n        this._afterOpenedAtThisLevel.complete();\n        this._openDialogsAtThisLevel = [];\n    }\n    /**\n     * Creates an overlay config from a dialog config.\n     * @param config The dialog configuration.\n     * @returns The overlay configuration.\n     */\n    _getOverlayConfig(config) {\n        const state = new OverlayConfig({\n            positionStrategy: config.positionStrategy ||\n                this._overlay.position().global().centerHorizontally().centerVertically(),\n            scrollStrategy: config.scrollStrategy || this._scrollStrategy(),\n            panelClass: config.panelClass,\n            hasBackdrop: config.hasBackdrop,\n            direction: config.direction,\n            minWidth: config.minWidth,\n            minHeight: config.minHeight,\n            maxWidth: config.maxWidth,\n            maxHeight: config.maxHeight,\n            width: config.width,\n            height: config.height,\n            disposeOnNavigation: config.closeOnNavigation,\n        });\n        if (config.backdropClass) {\n            state.backdropClass = config.backdropClass;\n        }\n        return state;\n    }\n    /**\n     * Attaches a dialog container to a dialog's already-created overlay.\n     * @param overlay Reference to the dialog's underlying overlay.\n     * @param config The dialog configuration.\n     * @returns A promise resolving to a ComponentRef for the attached container.\n     */\n    _attachContainer(overlay, dialogRef, config) {\n        const userInjector = config.injector || config.viewContainerRef?.injector;\n        const providers = [\n            { provide: DialogConfig, useValue: config },\n            { provide: DialogRef, useValue: dialogRef },\n            { provide: OverlayRef, useValue: overlay },\n        ];\n        let containerType;\n        if (config.container) {\n            if (typeof config.container === 'function') {\n                containerType = config.container;\n            }\n            else {\n                containerType = config.container.type;\n                providers.push(...config.container.providers(config));\n            }\n        }\n        else {\n            containerType = CdkDialogContainer;\n        }\n        const containerPortal = new ComponentPortal(containerType, config.viewContainerRef, Injector.create({ parent: userInjector || this._injector, providers }));\n        const containerRef = overlay.attach(containerPortal);\n        return containerRef.instance;\n    }\n    /**\n     * Attaches the user-provided component to the already-created dialog container.\n     * @param componentOrTemplateRef The type of component being loaded into the dialog,\n     *     or a TemplateRef to instantiate as the content.\n     * @param dialogRef Reference to the dialog being opened.\n     * @param dialogContainer Component that is going to wrap the dialog content.\n     * @param config Configuration used to open the dialog.\n     */\n    _attachDialogContent(componentOrTemplateRef, dialogRef, dialogContainer, config) {\n        if (componentOrTemplateRef instanceof TemplateRef) {\n            const injector = this._createInjector(config, dialogRef, dialogContainer, undefined);\n            let context = { $implicit: config.data, dialogRef };\n            if (config.templateContext) {\n                context = {\n                    ...context,\n                    ...(typeof config.templateContext === 'function'\n                        ? config.templateContext()\n                        : config.templateContext),\n                };\n            }\n            dialogContainer.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef, null, context, injector));\n        }\n        else {\n            const injector = this._createInjector(config, dialogRef, dialogContainer, this._injector);\n            const contentRef = dialogContainer.attachComponentPortal(new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector));\n            dialogRef.componentRef = contentRef;\n            dialogRef.componentInstance = contentRef.instance;\n        }\n    }\n    /**\n     * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n     * of a dialog to close itself and, optionally, to return a value.\n     * @param config Config object that is used to construct the dialog.\n     * @param dialogRef Reference to the dialog being opened.\n     * @param dialogContainer Component that is going to wrap the dialog content.\n     * @param fallbackInjector Injector to use as a fallback when a lookup fails in the custom\n     * dialog injector, if the user didn't provide a custom one.\n     * @returns The custom injector that can be used inside the dialog.\n     */\n    _createInjector(config, dialogRef, dialogContainer, fallbackInjector) {\n        const userInjector = config.injector || config.viewContainerRef?.injector;\n        const providers = [\n            { provide: DIALOG_DATA, useValue: config.data },\n            { provide: DialogRef, useValue: dialogRef },\n        ];\n        if (config.providers) {\n            if (typeof config.providers === 'function') {\n                providers.push(...config.providers(dialogRef, config, dialogContainer));\n            }\n            else {\n                providers.push(...config.providers);\n            }\n        }\n        if (config.direction &&\n            (!userInjector ||\n                !userInjector.get(Directionality, null, { optional: true }))) {\n            providers.push({\n                provide: Directionality,\n                useValue: { value: config.direction, change: of() },\n            });\n        }\n        return Injector.create({ parent: userInjector || fallbackInjector, providers });\n    }\n    /**\n     * Removes a dialog from the array of open dialogs.\n     * @param dialogRef Dialog to be removed.\n     * @param emitEvent Whether to emit an event if this is the last dialog.\n     */\n    _removeOpenDialog(dialogRef, emitEvent) {\n        const index = this.openDialogs.indexOf(dialogRef);\n        if (index > -1) {\n            this.openDialogs.splice(index, 1);\n            // If all the dialogs were closed, remove/restore the `aria-hidden`\n            // to a the siblings and emit to the `afterAllClosed` stream.\n            if (!this.openDialogs.length) {\n                this._ariaHiddenElements.forEach((previousValue, element) => {\n                    if (previousValue) {\n                        element.setAttribute('aria-hidden', previousValue);\n                    }\n                    else {\n                        element.removeAttribute('aria-hidden');\n                    }\n                });\n                this._ariaHiddenElements.clear();\n                if (emitEvent) {\n                    this._getAfterAllClosed().next();\n                }\n            }\n        }\n    }\n    /** Hides all of the content that isn't an overlay from assistive technology. */\n    _hideNonDialogContentFromAssistiveTechnology() {\n        const overlayContainer = this._overlayContainer.getContainerElement();\n        // Ensure that the overlay container is attached to the DOM.\n        if (overlayContainer.parentElement) {\n            const siblings = overlayContainer.parentElement.children;\n            for (let i = siblings.length - 1; i > -1; i--) {\n                const sibling = siblings[i];\n                if (sibling !== overlayContainer &&\n                    sibling.nodeName !== 'SCRIPT' &&\n                    sibling.nodeName !== 'STYLE' &&\n                    !sibling.hasAttribute('aria-live')) {\n                    this._ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n                    sibling.setAttribute('aria-hidden', 'true');\n                }\n            }\n        }\n    }\n    _getAfterAllClosed() {\n        const parent = this._parentDialog;\n        return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Dialog, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Dialog, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: Dialog, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n/**\n * Executes a callback against all elements in an array while iterating in reverse.\n * Useful if the array is being modified as it is being iterated.\n */\nfunction reverseForEach(items, callback) {\n    let i = items.length;\n    while (i--) {\n        callback(items[i]);\n    }\n}\n\nclass DialogModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: DialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: DialogModule, imports: [OverlayModule, PortalModule, A11yModule, CdkDialogContainer], exports: [\n            // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n            // don't have to remember to import it or be faced with an unhelpful error.\n            PortalModule,\n            CdkDialogContainer] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: DialogModule, providers: [Dialog], imports: [OverlayModule, PortalModule, A11yModule, \n            // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n            // don't have to remember to import it or be faced with an unhelpful error.\n            PortalModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: DialogModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [OverlayModule, PortalModule, A11yModule, CdkDialogContainer],\n                    exports: [\n                        // Re-export the PortalModule so that people extending the `CdkDialogContainer`\n                        // don't have to remember to import it or be faced with an unhelpful error.\n                        PortalModule,\n                        CdkDialogContainer,\n                    ],\n                    providers: [Dialog],\n                }]\n        }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CdkDialogContainer, DEFAULT_DIALOG_CONFIG, DIALOG_DATA, DIALOG_SCROLL_STRATEGY, DIALOG_SCROLL_STRATEGY_PROVIDER, DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, Dialog, DialogConfig, DialogModule, DialogRef, throwDialogContentAlreadyAttachedError };\n","import { Overlay, OverlayModule } from '@angular/cdk/overlay';\nimport * as i0 from '@angular/core';\nimport { inject, ANIMATION_MODULE_TYPE, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, InjectionToken, Injectable, ElementRef, Directive, Input, NgModule } from '@angular/core';\nimport { CdkDialogContainer, Dialog, DialogConfig, DialogModule } from '@angular/cdk/dialog';\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';\nimport { Subject, merge, defer } from 'rxjs';\nimport { filter, take, startWith } from 'rxjs/operators';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { _IdGenerator } from '@angular/cdk/a11y';\nimport * as i1 from '@angular/cdk/scrolling';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport { MatCommonModule } from '@angular/material/core';\nimport { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';\n\n/**\n * Configuration for opening a modal dialog with the MatDialog service.\n */\nclass MatDialogConfig {\n    /**\n     * Where the attached component should live in Angular's *logical* component tree.\n     * This affects what is available for injection and the change detection order for the\n     * component instantiated inside of the dialog. This does not affect where the dialog\n     * content will be rendered.\n     */\n    viewContainerRef;\n    /**\n     * Injector used for the instantiation of the component to be attached. If provided,\n     * takes precedence over the injector indirectly provided by `ViewContainerRef`.\n     */\n    injector;\n    /** ID for the dialog. If omitted, a unique one will be generated. */\n    id;\n    /** The ARIA role of the dialog element. */\n    role = 'dialog';\n    /** Custom class for the overlay pane. */\n    panelClass = '';\n    /** Whether the dialog has a backdrop. */\n    hasBackdrop = true;\n    /** Custom class for the backdrop. */\n    backdropClass = '';\n    /** Whether the user can use escape or clicking on the backdrop to close the modal. */\n    disableClose = false;\n    /** Width of the dialog. */\n    width = '';\n    /** Height of the dialog. */\n    height = '';\n    /** Min-width of the dialog. If a number is provided, assumes pixel units. */\n    minWidth;\n    /** Min-height of the dialog. If a number is provided, assumes pixel units. */\n    minHeight;\n    /** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */\n    maxWidth;\n    /** Max-height of the dialog. If a number is provided, assumes pixel units. */\n    maxHeight;\n    /** Position overrides. */\n    position;\n    /** Data being injected into the child component. */\n    data = null;\n    /** Layout direction for the dialog's content. */\n    direction;\n    /** ID of the element that describes the dialog. */\n    ariaDescribedBy = null;\n    /** ID of the element that labels the dialog. */\n    ariaLabelledBy = null;\n    /** Aria label to assign to the dialog element. */\n    ariaLabel = null;\n    /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */\n    ariaModal = true;\n    /**\n     * Where the dialog should focus on open.\n     * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n     * AutoFocusTarget instead.\n     */\n    autoFocus = 'first-tabbable';\n    /**\n     * Whether the dialog should restore focus to the\n     * previously-focused element, after it's closed.\n     */\n    restoreFocus = true;\n    /** Whether to wait for the opening animation to finish before trapping focus. */\n    delayFocusTrap = true;\n    /** Scroll strategy to be used for the dialog. */\n    scrollStrategy;\n    /**\n     * Whether the dialog should close when the user goes backwards/forwards in history.\n     * Note that this usually doesn't include clicking on links (unless the user is using\n     * the `HashLocationStrategy`).\n     */\n    closeOnNavigation = true;\n    /**\n     * Alternate `ComponentFactoryResolver` to use when resolving the associated component.\n     * @deprecated No longer used. Will be removed.\n     * @breaking-change 20.0.0\n     */\n    componentFactoryResolver;\n    /**\n     * Duration of the enter animation in ms.\n     * Should be a number, string type is deprecated.\n     * @breaking-change 17.0.0 Remove string signature.\n     */\n    enterAnimationDuration;\n    /**\n     * Duration of the exit animation in ms.\n     * Should be a number, string type is deprecated.\n     * @breaking-change 17.0.0 Remove string signature.\n     */\n    exitAnimationDuration;\n}\n\n/** Class added when the dialog is open. */\nconst OPEN_CLASS = 'mdc-dialog--open';\n/** Class added while the dialog is opening. */\nconst OPENING_CLASS = 'mdc-dialog--opening';\n/** Class added while the dialog is closing. */\nconst CLOSING_CLASS = 'mdc-dialog--closing';\n/** Duration of the opening animation in milliseconds. */\nconst OPEN_ANIMATION_DURATION = 150;\n/** Duration of the closing animation in milliseconds. */\nconst CLOSE_ANIMATION_DURATION = 75;\nclass MatDialogContainer extends CdkDialogContainer {\n    _animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });\n    /** Emits when an animation state changes. */\n    _animationStateChanged = new EventEmitter();\n    /** Whether animations are enabled. */\n    _animationsEnabled = this._animationMode !== 'NoopAnimations';\n    /** Number of actions projected in the dialog. */\n    _actionSectionCount = 0;\n    /** Host element of the dialog container component. */\n    _hostElement = this._elementRef.nativeElement;\n    /** Duration of the dialog open animation. */\n    _enterAnimationDuration = this._animationsEnabled\n        ? parseCssTime(this._config.enterAnimationDuration) ?? OPEN_ANIMATION_DURATION\n        : 0;\n    /** Duration of the dialog close animation. */\n    _exitAnimationDuration = this._animationsEnabled\n        ? parseCssTime(this._config.exitAnimationDuration) ?? CLOSE_ANIMATION_DURATION\n        : 0;\n    /** Current timer for dialog animations. */\n    _animationTimer = null;\n    _contentAttached() {\n        // Delegate to the original dialog-container initialization (i.e. saving the\n        // previous element, setting up the focus trap and moving focus to the container).\n        super._contentAttached();\n        // Note: Usually we would be able to use the MDC dialog foundation here to handle\n        // the dialog animation for us, but there are a few reasons why we just leverage\n        // their styles and not use the runtime foundation code:\n        //   1. Foundation does not allow us to disable animations.\n        //   2. Foundation contains unnecessary features we don't need and aren't\n        //      tree-shakeable. e.g. background scrim, keyboard event handlers for ESC button.\n        this._startOpenAnimation();\n    }\n    /** Starts the dialog open animation if enabled. */\n    _startOpenAnimation() {\n        this._animationStateChanged.emit({ state: 'opening', totalTime: this._enterAnimationDuration });\n        if (this._animationsEnabled) {\n            this._hostElement.style.setProperty(TRANSITION_DURATION_PROPERTY, `${this._enterAnimationDuration}ms`);\n            // We need to give the `setProperty` call from above some time to be applied.\n            // One would expect that the open class is added once the animation finished, but MDC\n            // uses the open class in combination with the opening class to start the animation.\n            this._requestAnimationFrame(() => this._hostElement.classList.add(OPENING_CLASS, OPEN_CLASS));\n            this._waitForAnimationToComplete(this._enterAnimationDuration, this._finishDialogOpen);\n        }\n        else {\n            this._hostElement.classList.add(OPEN_CLASS);\n            // Note: We could immediately finish the dialog opening here with noop animations,\n            // but we defer until next tick so that consumers can subscribe to `afterOpened`.\n            // Executing this immediately would mean that `afterOpened` emits synchronously\n            // on `dialog.open` before the consumer had a change to subscribe to `afterOpened`.\n            Promise.resolve().then(() => this._finishDialogOpen());\n        }\n    }\n    /**\n     * Starts the exit animation of the dialog if enabled. This method is\n     * called by the dialog ref.\n     */\n    _startExitAnimation() {\n        this._animationStateChanged.emit({ state: 'closing', totalTime: this._exitAnimationDuration });\n        this._hostElement.classList.remove(OPEN_CLASS);\n        if (this._animationsEnabled) {\n            this._hostElement.style.setProperty(TRANSITION_DURATION_PROPERTY, `${this._exitAnimationDuration}ms`);\n            // We need to give the `setProperty` call from above some time to be applied.\n            this._requestAnimationFrame(() => this._hostElement.classList.add(CLOSING_CLASS));\n            this._waitForAnimationToComplete(this._exitAnimationDuration, this._finishDialogClose);\n        }\n        else {\n            // This subscription to the `OverlayRef#backdropClick` observable in the `DialogRef` is\n            // set up before any user can subscribe to the backdrop click. The subscription triggers\n            // the dialog close and this method synchronously. If we'd synchronously emit the `CLOSED`\n            // animation state event if animations are disabled, the overlay would be disposed\n            // immediately and all other subscriptions to `DialogRef#backdropClick` would be silently\n            // skipped. We work around this by waiting with the dialog close until the next tick when\n            // all subscriptions have been fired as expected. This is not an ideal solution, but\n            // there doesn't seem to be any other good way. Alternatives that have been considered:\n            //   1. Deferring `DialogRef.close`. This could be a breaking change due to a new microtask.\n            //      Also this issue is specific to the MDC implementation where the dialog could\n            //      technically be closed synchronously. In the non-MDC one, Angular animations are used\n            //      and closing always takes at least a tick.\n            //   2. Ensuring that user subscriptions to `backdropClick`, `keydownEvents` in the dialog\n            //      ref are first. This would solve the issue, but has the risk of memory leaks and also\n            //      doesn't solve the case where consumers call `DialogRef.close` in their subscriptions.\n            // Based on the fact that this is specific to the MDC-based implementation of the dialog\n            // animations, the defer is applied here.\n            Promise.resolve().then(() => this._finishDialogClose());\n        }\n    }\n    /**\n     * Updates the number action sections.\n     * @param delta Increase/decrease in the number of sections.\n     */\n    _updateActionSectionCount(delta) {\n        this._actionSectionCount += delta;\n        this._changeDetectorRef.markForCheck();\n    }\n    /**\n     * Completes the dialog open by clearing potential animation classes, trapping\n     * focus and emitting an opened event.\n     */\n    _finishDialogOpen = () => {\n        this._clearAnimationClasses();\n        this._openAnimationDone(this._enterAnimationDuration);\n    };\n    /**\n     * Completes the dialog close by clearing potential animation classes, restoring\n     * focus and emitting a closed event.\n     */\n    _finishDialogClose = () => {\n        this._clearAnimationClasses();\n        this._animationStateChanged.emit({ state: 'closed', totalTime: this._exitAnimationDuration });\n    };\n    /** Clears all dialog animation classes. */\n    _clearAnimationClasses() {\n        this._hostElement.classList.remove(OPENING_CLASS, CLOSING_CLASS);\n    }\n    _waitForAnimationToComplete(duration, callback) {\n        if (this._animationTimer !== null) {\n            clearTimeout(this._animationTimer);\n        }\n        // Note that we want this timer to run inside the NgZone, because we want\n        // the related events like `afterClosed` to be inside the zone as well.\n        this._animationTimer = setTimeout(callback, duration);\n    }\n    /** Runs a callback in `requestAnimationFrame`, if available. */\n    _requestAnimationFrame(callback) {\n        this._ngZone.runOutsideAngular(() => {\n            if (typeof requestAnimationFrame === 'function') {\n                requestAnimationFrame(callback);\n            }\n            else {\n                callback();\n            }\n        });\n    }\n    _captureInitialFocus() {\n        if (!this._config.delayFocusTrap) {\n            this._trapFocus();\n        }\n    }\n    /**\n     * Callback for when the open dialog animation has finished. Intended to\n     * be called by sub-classes that use different animation implementations.\n     */\n    _openAnimationDone(totalTime) {\n        if (this._config.delayFocusTrap) {\n            this._trapFocus();\n        }\n        this._animationStateChanged.next({ state: 'opened', totalTime });\n    }\n    ngOnDestroy() {\n        super.ngOnDestroy();\n        if (this._animationTimer !== null) {\n            clearTimeout(this._animationTimer);\n        }\n    }\n    attachComponentPortal(portal) {\n        // When a component is passed into the dialog, the host element interrupts\n        // the `display:flex` from affecting the dialog title, content, and\n        // actions. To fix this, we make the component host `display: contents` by\n        // marking its host with the `mat-mdc-dialog-component-host` class.\n        //\n        // Note that this problem does not exist when a template ref is used since\n        // the title, contents, and actions are then nested directly under the\n        // dialog surface.\n        const ref = super.attachComponentPortal(portal);\n        ref.location.nativeElement.classList.add('mat-mdc-dialog-component-host');\n        return ref;\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });\n    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDialogContainer, isStandalone: true, selector: \"mat-dialog-container\", host: { attributes: { \"tabindex\": \"-1\" }, properties: { \"attr.aria-modal\": \"_config.ariaModal\", \"id\": \"_config.id\", \"attr.role\": \"_config.role\", \"attr.aria-labelledby\": \"_config.ariaLabel ? null : _ariaLabelledByQueue[0]\", \"attr.aria-label\": \"_config.ariaLabel\", \"attr.aria-describedby\": \"_config.ariaDescribedBy || null\", \"class._mat-animation-noopable\": \"!_animationsEnabled\", \"class.mat-mdc-dialog-container-with-actions\": \"_actionSectionCount > 0\" }, classAttribute: \"mat-mdc-dialog-container mdc-dialog\" }, usesInheritance: true, ngImport: i0, template: \"<div class=\\\"mat-mdc-dialog-inner-container mdc-dialog__container\\\">\\n  <div class=\\\"mat-mdc-dialog-surface mdc-dialog__surface\\\">\\n    <ng-template cdkPortalOutlet />\\n  </div>\\n</div>\\n\", styles: [\".mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mdc-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:\\\"\\\";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}\"], dependencies: [{ kind: \"directive\", type: CdkPortalOutlet, selector: \"[cdkPortalOutlet]\", inputs: [\"cdkPortalOutlet\"], outputs: [\"attached\"], exportAs: [\"cdkPortalOutlet\"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogContainer, decorators: [{\n            type: Component,\n            args: [{ selector: 'mat-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, imports: [CdkPortalOutlet], host: {\n                        'class': 'mat-mdc-dialog-container mdc-dialog',\n                        'tabindex': '-1',\n                        '[attr.aria-modal]': '_config.ariaModal',\n                        '[id]': '_config.id',\n                        '[attr.role]': '_config.role',\n                        '[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',\n                        '[attr.aria-label]': '_config.ariaLabel',\n                        '[attr.aria-describedby]': '_config.ariaDescribedBy || null',\n                        '[class._mat-animation-noopable]': '!_animationsEnabled',\n                        '[class.mat-mdc-dialog-container-with-actions]': '_actionSectionCount > 0',\n                    }, template: \"<div class=\\\"mat-mdc-dialog-inner-container mdc-dialog__container\\\">\\n  <div class=\\\"mat-mdc-dialog-surface mdc-dialog__surface\\\">\\n    <ng-template cdkPortalOutlet />\\n  </div>\\n</div>\\n\", styles: [\".mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mdc-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:\\\"\\\";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}\"] }]\n        }] });\nconst TRANSITION_DURATION_PROPERTY = '--mat-dialog-transition-duration';\n// TODO(mmalerba): Remove this function after animation durations are required\n//  to be numbers.\n/**\n * Converts a CSS time string to a number in ms. If the given time is already a\n * number, it is assumed to be in ms.\n */\nfunction parseCssTime(time) {\n    if (time == null) {\n        return null;\n    }\n    if (typeof time === 'number') {\n        return time;\n    }\n    if (time.endsWith('ms')) {\n        return coerceNumberProperty(time.substring(0, time.length - 2));\n    }\n    if (time.endsWith('s')) {\n        return coerceNumberProperty(time.substring(0, time.length - 1)) * 1000;\n    }\n    if (time === '0') {\n        return 0;\n    }\n    return null; // anything else is invalid.\n}\n\nvar MatDialogState;\n(function (MatDialogState) {\n    MatDialogState[MatDialogState[\"OPEN\"] = 0] = \"OPEN\";\n    MatDialogState[MatDialogState[\"CLOSING\"] = 1] = \"CLOSING\";\n    MatDialogState[MatDialogState[\"CLOSED\"] = 2] = \"CLOSED\";\n})(MatDialogState || (MatDialogState = {}));\n/**\n * Reference to a dialog opened via the MatDialog service.\n */\nclass MatDialogRef {\n    _ref;\n    _containerInstance;\n    /** The instance of component opened into the dialog. */\n    componentInstance;\n    /**\n     * `ComponentRef` of the component opened into the dialog. Will be\n     * null when the dialog is opened using a `TemplateRef`.\n     */\n    componentRef;\n    /** Whether the user is allowed to close the dialog. */\n    disableClose;\n    /** Unique ID for the dialog. */\n    id;\n    /** Subject for notifying the user that the dialog has finished opening. */\n    _afterOpened = new Subject();\n    /** Subject for notifying the user that the dialog has started closing. */\n    _beforeClosed = new Subject();\n    /** Result to be passed to afterClosed. */\n    _result;\n    /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */\n    _closeFallbackTimeout;\n    /** Current state of the dialog. */\n    _state = MatDialogState.OPEN;\n    // TODO(crisbeto): we shouldn't have to declare this property, because `DialogRef.close`\n    // already has a second `options` parameter that we can use. The problem is that internal tests\n    // have assertions like `expect(MatDialogRef.close).toHaveBeenCalledWith(foo)` which will break,\n    // because it'll be called with two arguments by things like `MatDialogClose`.\n    /** Interaction that caused the dialog to close. */\n    _closeInteractionType;\n    constructor(_ref, config, _containerInstance) {\n        this._ref = _ref;\n        this._containerInstance = _containerInstance;\n        this.disableClose = config.disableClose;\n        this.id = _ref.id;\n        // Used to target panels specifically tied to dialogs.\n        _ref.addPanelClass('mat-mdc-dialog-panel');\n        // Emit when opening animation completes\n        _containerInstance._animationStateChanged\n            .pipe(filter(event => event.state === 'opened'), take(1))\n            .subscribe(() => {\n            this._afterOpened.next();\n            this._afterOpened.complete();\n        });\n        // Dispose overlay when closing animation is complete\n        _containerInstance._animationStateChanged\n            .pipe(filter(event => event.state === 'closed'), take(1))\n            .subscribe(() => {\n            clearTimeout(this._closeFallbackTimeout);\n            this._finishDialogClose();\n        });\n        _ref.overlayRef.detachments().subscribe(() => {\n            this._beforeClosed.next(this._result);\n            this._beforeClosed.complete();\n            this._finishDialogClose();\n        });\n        merge(this.backdropClick(), this.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)))).subscribe(event => {\n            if (!this.disableClose) {\n                event.preventDefault();\n                _closeDialogVia(this, event.type === 'keydown' ? 'keyboard' : 'mouse');\n            }\n        });\n    }\n    /**\n     * Close the dialog.\n     * @param dialogResult Optional result to return to the dialog opener.\n     */\n    close(dialogResult) {\n        this._result = dialogResult;\n        // Transition the backdrop in parallel to the dialog.\n        this._containerInstance._animationStateChanged\n            .pipe(filter(event => event.state === 'closing'), take(1))\n            .subscribe(event => {\n            this._beforeClosed.next(dialogResult);\n            this._beforeClosed.complete();\n            this._ref.overlayRef.detachBackdrop();\n            // The logic that disposes of the overlay depends on the exit animation completing, however\n            // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n            // timeout which will clean everything up if the animation hasn't fired within the specified\n            // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n            // vast majority of cases the timeout will have been cleared before it has the chance to fire.\n            this._closeFallbackTimeout = setTimeout(() => this._finishDialogClose(), event.totalTime + 100);\n        });\n        this._state = MatDialogState.CLOSING;\n        this._containerInstance._startExitAnimation();\n    }\n    /**\n     * Gets an observable that is notified when the dialog is finished opening.\n     */\n    afterOpened() {\n        return this._afterOpened;\n    }\n    /**\n     * Gets an observable that is notified when the dialog is finished closing.\n     */\n    afterClosed() {\n        return this._ref.closed;\n    }\n    /**\n     * Gets an observable that is notified when the dialog has started closing.\n     */\n    beforeClosed() {\n        return this._beforeClosed;\n    }\n    /**\n     * Gets an observable that emits when the overlay's backdrop has been clicked.\n     */\n    backdropClick() {\n        return this._ref.backdropClick;\n    }\n    /**\n     * Gets an observable that emits when keydown events are targeted on the overlay.\n     */\n    keydownEvents() {\n        return this._ref.keydownEvents;\n    }\n    /**\n     * Updates the dialog's position.\n     * @param position New dialog position.\n     */\n    updatePosition(position) {\n        let strategy = this._ref.config.positionStrategy;\n        if (position && (position.left || position.right)) {\n            position.left ? strategy.left(position.left) : strategy.right(position.right);\n        }\n        else {\n            strategy.centerHorizontally();\n        }\n        if (position && (position.top || position.bottom)) {\n            position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);\n        }\n        else {\n            strategy.centerVertically();\n        }\n        this._ref.updatePosition();\n        return this;\n    }\n    /**\n     * Updates the dialog's width and height.\n     * @param width New width of the dialog.\n     * @param height New height of the dialog.\n     */\n    updateSize(width = '', height = '') {\n        this._ref.updateSize(width, height);\n        return this;\n    }\n    /** Add a CSS class or an array of classes to the overlay pane. */\n    addPanelClass(classes) {\n        this._ref.addPanelClass(classes);\n        return this;\n    }\n    /** Remove a CSS class or an array of classes from the overlay pane. */\n    removePanelClass(classes) {\n        this._ref.removePanelClass(classes);\n        return this;\n    }\n    /** Gets the current state of the dialog's lifecycle. */\n    getState() {\n        return this._state;\n    }\n    /**\n     * Finishes the dialog close by updating the state of the dialog\n     * and disposing the overlay.\n     */\n    _finishDialogClose() {\n        this._state = MatDialogState.CLOSED;\n        this._ref.close(this._result, { focusOrigin: this._closeInteractionType });\n        this.componentInstance = null;\n    }\n}\n/**\n * Closes the dialog with the specified interaction type. This is currently not part of\n * `MatDialogRef` as that would conflict with custom dialog ref mocks provided in tests.\n * More details. See: https://github.com/angular/components/pull/9257#issuecomment-651342226.\n */\n// TODO: Move this back into `MatDialogRef` when we provide an official mock dialog ref.\nfunction _closeDialogVia(ref, interactionType, result) {\n    ref._closeInteractionType = interactionType;\n    return ref.close(result);\n}\n\n/** Injection token that can be used to access the data that was passed in to a dialog. */\nconst MAT_DIALOG_DATA = new InjectionToken('MatMdcDialogData');\n/** Injection token that can be used to specify default dialog options. */\nconst MAT_DIALOG_DEFAULT_OPTIONS = new InjectionToken('mat-mdc-dialog-default-options');\n/** Injection token that determines the scroll handling while the dialog is open. */\nconst MAT_DIALOG_SCROLL_STRATEGY = new InjectionToken('mat-mdc-dialog-scroll-strategy', {\n    providedIn: 'root',\n    factory: () => {\n        const overlay = inject(Overlay);\n        return () => overlay.scrollStrategies.block();\n    },\n});\n/**\n * @docs-private\n * @deprecated No longer used. To be removed.\n * @breaking-change 19.0.0\n */\nfunction MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {\n    return () => overlay.scrollStrategies.block();\n}\n/**\n * @docs-private\n * @deprecated No longer used. To be removed.\n * @breaking-change 19.0.0\n */\nconst MAT_DIALOG_SCROLL_STRATEGY_PROVIDER = {\n    provide: MAT_DIALOG_SCROLL_STRATEGY,\n    deps: [Overlay],\n    useFactory: MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,\n};\n/**\n * Service to open Material Design modal dialogs.\n */\nclass MatDialog {\n    _overlay = inject(Overlay);\n    _defaultOptions = inject(MAT_DIALOG_DEFAULT_OPTIONS, { optional: true });\n    _scrollStrategy = inject(MAT_DIALOG_SCROLL_STRATEGY);\n    _parentDialog = inject(MatDialog, { optional: true, skipSelf: true });\n    _idGenerator = inject(_IdGenerator);\n    _dialog = inject(Dialog);\n    _openDialogsAtThisLevel = [];\n    _afterAllClosedAtThisLevel = new Subject();\n    _afterOpenedAtThisLevel = new Subject();\n    dialogConfigClass = MatDialogConfig;\n    _dialogRefConstructor;\n    _dialogContainerType;\n    _dialogDataToken;\n    /** Keeps track of the currently-open dialogs. */\n    get openDialogs() {\n        return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n    }\n    /** Stream that emits when a dialog has been opened. */\n    get afterOpened() {\n        return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n    }\n    _getAfterAllClosed() {\n        const parent = this._parentDialog;\n        return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n    }\n    /**\n     * Stream that emits when all open dialog have finished closing.\n     * Will emit on subscribe if there are no open dialogs to begin with.\n     */\n    afterAllClosed = defer(() => this.openDialogs.length\n        ? this._getAfterAllClosed()\n        : this._getAfterAllClosed().pipe(startWith(undefined)));\n    constructor() {\n        this._dialogRefConstructor = MatDialogRef;\n        this._dialogContainerType = MatDialogContainer;\n        this._dialogDataToken = MAT_DIALOG_DATA;\n    }\n    open(componentOrTemplateRef, config) {\n        let dialogRef;\n        config = { ...(this._defaultOptions || new MatDialogConfig()), ...config };\n        config.id = config.id || this._idGenerator.getId('mat-mdc-dialog-');\n        config.scrollStrategy = config.scrollStrategy || this._scrollStrategy();\n        const cdkRef = this._dialog.open(componentOrTemplateRef, {\n            ...config,\n            positionStrategy: this._overlay.position().global().centerHorizontally().centerVertically(),\n            // Disable closing since we need to sync it up to the animation ourselves.\n            disableClose: true,\n            // Disable closing on destroy, because this service cleans up its open dialogs as well.\n            // We want to do the cleanup here, rather than the CDK service, because the CDK destroys\n            // the dialogs immediately whereas we want it to wait for the animations to finish.\n            closeOnDestroy: false,\n            // Disable closing on detachments so that we can sync up the animation.\n            // The Material dialog ref handles this manually.\n            closeOnOverlayDetachments: false,\n            container: {\n                type: this._dialogContainerType,\n                providers: () => [\n                    // Provide our config as the CDK config as well since it has the same interface as the\n                    // CDK one, but it contains the actual values passed in by the user for things like\n                    // `disableClose` which we disable for the CDK dialog since we handle it ourselves.\n                    { provide: this.dialogConfigClass, useValue: config },\n                    { provide: DialogConfig, useValue: config },\n                ],\n            },\n            templateContext: () => ({ dialogRef }),\n            providers: (ref, cdkConfig, dialogContainer) => {\n                dialogRef = new this._dialogRefConstructor(ref, config, dialogContainer);\n                dialogRef.updatePosition(config?.position);\n                return [\n                    { provide: this._dialogContainerType, useValue: dialogContainer },\n                    { provide: this._dialogDataToken, useValue: cdkConfig.data },\n                    { provide: this._dialogRefConstructor, useValue: dialogRef },\n                ];\n            },\n        });\n        // This can't be assigned in the `providers` callback, because\n        // the instance hasn't been assigned to the CDK ref yet.\n        dialogRef.componentRef = cdkRef.componentRef;\n        dialogRef.componentInstance = cdkRef.componentInstance;\n        this.openDialogs.push(dialogRef);\n        this.afterOpened.next(dialogRef);\n        dialogRef.afterClosed().subscribe(() => {\n            const index = this.openDialogs.indexOf(dialogRef);\n            if (index > -1) {\n                this.openDialogs.splice(index, 1);\n                if (!this.openDialogs.length) {\n                    this._getAfterAllClosed().next();\n                }\n            }\n        });\n        return dialogRef;\n    }\n    /**\n     * Closes all of the currently-open dialogs.\n     */\n    closeAll() {\n        this._closeDialogs(this.openDialogs);\n    }\n    /**\n     * Finds an open dialog by its id.\n     * @param id ID to use when looking up the dialog.\n     */\n    getDialogById(id) {\n        return this.openDialogs.find(dialog => dialog.id === id);\n    }\n    ngOnDestroy() {\n        // Only close the dialogs at this level on destroy\n        // since the parent service may still be active.\n        this._closeDialogs(this._openDialogsAtThisLevel);\n        this._afterAllClosedAtThisLevel.complete();\n        this._afterOpenedAtThisLevel.complete();\n    }\n    _closeDialogs(dialogs) {\n        let i = dialogs.length;\n        while (i--) {\n            dialogs[i].close();\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialog, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialog, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialog, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [] });\n\n/**\n * Button that will close the current dialog.\n */\nclass MatDialogClose {\n    dialogRef = inject(MatDialogRef, { optional: true });\n    _elementRef = inject(ElementRef);\n    _dialog = inject(MatDialog);\n    /** Screen-reader label for the button. */\n    ariaLabel;\n    /** Default to \"button\" to prevents accidental form submits. */\n    type = 'button';\n    /** Dialog close input. */\n    dialogResult;\n    _matDialogClose;\n    constructor() { }\n    ngOnInit() {\n        if (!this.dialogRef) {\n            // When this directive is included in a dialog via TemplateRef (rather than being\n            // in a Component), the DialogRef isn't available via injection because embedded\n            // views cannot be given a custom injector. Instead, we look up the DialogRef by\n            // ID. This must occur in `onInit`, as the ID binding for the dialog container won't\n            // be resolved at constructor time.\n            this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);\n        }\n    }\n    ngOnChanges(changes) {\n        const proxiedChange = changes['_matDialogClose'] || changes['_matDialogCloseResult'];\n        if (proxiedChange) {\n            this.dialogResult = proxiedChange.currentValue;\n        }\n    }\n    _onButtonClick(event) {\n        // Determinate the focus origin using the click event, because using the FocusMonitor will\n        // result in incorrect origins. Most of the time, close buttons will be auto focused in the\n        // dialog, and therefore clicking the button won't result in a focus change. This means that\n        // the FocusMonitor won't detect any origin change, and will always output `program`.\n        _closeDialogVia(this.dialogRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDialogClose, isStandalone: true, selector: \"[mat-dialog-close], [matDialogClose]\", inputs: { ariaLabel: [\"aria-label\", \"ariaLabel\"], type: \"type\", dialogResult: [\"mat-dialog-close\", \"dialogResult\"], _matDialogClose: [\"matDialogClose\", \"_matDialogClose\"] }, host: { listeners: { \"click\": \"_onButtonClick($event)\" }, properties: { \"attr.aria-label\": \"ariaLabel || null\", \"attr.type\": \"type\" } }, exportAs: [\"matDialogClose\"], usesOnChanges: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogClose, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[mat-dialog-close], [matDialogClose]',\n                    exportAs: 'matDialogClose',\n                    host: {\n                        '(click)': '_onButtonClick($event)',\n                        '[attr.aria-label]': 'ariaLabel || null',\n                        '[attr.type]': 'type',\n                    },\n                }]\n        }], ctorParameters: () => [], propDecorators: { ariaLabel: [{\n                type: Input,\n                args: ['aria-label']\n            }], type: [{\n                type: Input\n            }], dialogResult: [{\n                type: Input,\n                args: ['mat-dialog-close']\n            }], _matDialogClose: [{\n                type: Input,\n                args: ['matDialogClose']\n            }] } });\nclass MatDialogLayoutSection {\n    _dialogRef = inject(MatDialogRef, { optional: true });\n    _elementRef = inject(ElementRef);\n    _dialog = inject(MatDialog);\n    constructor() { }\n    ngOnInit() {\n        if (!this._dialogRef) {\n            this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);\n        }\n        if (this._dialogRef) {\n            Promise.resolve().then(() => {\n                this._onAdd();\n            });\n        }\n    }\n    ngOnDestroy() {\n        // Note: we null check because there are some internal\n        // tests that are mocking out `MatDialogRef` incorrectly.\n        const instance = this._dialogRef?._containerInstance;\n        if (instance) {\n            Promise.resolve().then(() => {\n                this._onRemove();\n            });\n        }\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogLayoutSection, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDialogLayoutSection, isStandalone: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogLayoutSection, decorators: [{\n            type: Directive\n        }], ctorParameters: () => [] });\n/**\n * Title of a dialog element. Stays fixed to the top of the dialog when scrolling.\n */\nclass MatDialogTitle extends MatDialogLayoutSection {\n    id = inject(_IdGenerator).getId('mat-mdc-dialog-title-');\n    _onAdd() {\n        // Note: we null check the queue, because there are some internal\n        // tests that are mocking out `MatDialogRef` incorrectly.\n        this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id);\n    }\n    _onRemove() {\n        this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogTitle, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDialogTitle, isStandalone: true, selector: \"[mat-dialog-title], [matDialogTitle]\", inputs: { id: \"id\" }, host: { properties: { \"id\": \"id\" }, classAttribute: \"mat-mdc-dialog-title mdc-dialog__title\" }, exportAs: [\"matDialogTitle\"], usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogTitle, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: '[mat-dialog-title], [matDialogTitle]',\n                    exportAs: 'matDialogTitle',\n                    host: {\n                        'class': 'mat-mdc-dialog-title mdc-dialog__title',\n                        '[id]': 'id',\n                    },\n                }]\n        }], propDecorators: { id: [{\n                type: Input\n            }] } });\n/**\n * Scrollable content container of a dialog.\n */\nclass MatDialogContent {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDialogContent, isStandalone: true, selector: \"[mat-dialog-content], mat-dialog-content, [matDialogContent]\", host: { classAttribute: \"mat-mdc-dialog-content mdc-dialog__content\" }, hostDirectives: [{ directive: i1.CdkScrollable }], ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogContent, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: `[mat-dialog-content], mat-dialog-content, [matDialogContent]`,\n                    host: { 'class': 'mat-mdc-dialog-content mdc-dialog__content' },\n                    hostDirectives: [CdkScrollable],\n                }]\n        }] });\n/**\n * Container for the bottom action buttons in a dialog.\n * Stays fixed to the bottom when scrolling.\n */\nclass MatDialogActions extends MatDialogLayoutSection {\n    /**\n     * Horizontal alignment of action buttons.\n     */\n    align;\n    _onAdd() {\n        this._dialogRef._containerInstance?._updateActionSectionCount?.(1);\n    }\n    _onRemove() {\n        this._dialogRef._containerInstance?._updateActionSectionCount?.(-1);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogActions, deps: null, target: i0.ɵɵFactoryTarget.Directive });\n    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"19.0.0\", type: MatDialogActions, isStandalone: true, selector: \"[mat-dialog-actions], mat-dialog-actions, [matDialogActions]\", inputs: { align: \"align\" }, host: { properties: { \"class.mat-mdc-dialog-actions-align-start\": \"align === \\\"start\\\"\", \"class.mat-mdc-dialog-actions-align-center\": \"align === \\\"center\\\"\", \"class.mat-mdc-dialog-actions-align-end\": \"align === \\\"end\\\"\" }, classAttribute: \"mat-mdc-dialog-actions mdc-dialog__actions\" }, usesInheritance: true, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogActions, decorators: [{\n            type: Directive,\n            args: [{\n                    selector: `[mat-dialog-actions], mat-dialog-actions, [matDialogActions]`,\n                    host: {\n                        'class': 'mat-mdc-dialog-actions mdc-dialog__actions',\n                        '[class.mat-mdc-dialog-actions-align-start]': 'align === \"start\"',\n                        '[class.mat-mdc-dialog-actions-align-center]': 'align === \"center\"',\n                        '[class.mat-mdc-dialog-actions-align-end]': 'align === \"end\"',\n                    },\n                }]\n        }], propDecorators: { align: [{\n                type: Input\n            }] } });\n/**\n * Finds the closest MatDialogRef to an element by looking at the DOM.\n * @param element Element relative to which to look for a dialog.\n * @param openDialogs References to the currently-open dialogs.\n */\nfunction getClosestDialog(element, openDialogs) {\n    let parent = element.nativeElement.parentElement;\n    while (parent && !parent.classList.contains('mat-mdc-dialog-container')) {\n        parent = parent.parentElement;\n    }\n    return parent ? openDialogs.find(dialog => dialog.id === parent.id) : null;\n}\n\nconst DIRECTIVES = [\n    MatDialogContainer,\n    MatDialogClose,\n    MatDialogTitle,\n    MatDialogActions,\n    MatDialogContent,\n];\nclass MatDialogModule {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogModule, imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatDialogContainer,\n            MatDialogClose,\n            MatDialogTitle,\n            MatDialogActions,\n            MatDialogContent], exports: [MatCommonModule, MatDialogContainer,\n            MatDialogClose,\n            MatDialogTitle,\n            MatDialogActions,\n            MatDialogContent] });\n    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogModule, providers: [MatDialog], imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatCommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.0\", ngImport: i0, type: MatDialogModule, decorators: [{\n            type: NgModule,\n            args: [{\n                    imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, ...DIRECTIVES],\n                    exports: [MatCommonModule, ...DIRECTIVES],\n                    providers: [MatDialog],\n                }]\n        }] });\n\n/**\n * Default parameters for the animation for backwards compatibility.\n * @docs-private\n */\nconst _defaultParams = {\n    params: { enterAnimationDuration: '150ms', exitAnimationDuration: '75ms' },\n};\n/**\n * Animations used by MatDialog.\n * @docs-private\n */\nconst matDialogAnimations = {\n    /** Animation that is applied on the dialog container by default. */\n    dialogContainer: trigger('dialogContainer', [\n        // Note: The `enter` animation transitions to `transform: none`, because for some reason\n        // specifying the transform explicitly, causes IE both to blur the dialog content and\n        // decimate the animation performance. Leaving it as `none` solves both issues.\n        state('void, exit', style({ opacity: 0, transform: 'scale(0.7)' })),\n        state('enter', style({ transform: 'none' })),\n        transition('* => enter', group([\n            animate('{{enterAnimationDuration}} cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'none', opacity: 1 })),\n            query('@*', animateChild(), { optional: true }),\n        ]), _defaultParams),\n        transition('* => void, * => exit', group([\n            animate('{{exitAnimationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)', style({ opacity: 0 })),\n            query('@*', animateChild(), { optional: true }),\n        ]), _defaultParams),\n    ]),\n};\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_DIALOG_DATA, MAT_DIALOG_DEFAULT_OPTIONS, MAT_DIALOG_SCROLL_STRATEGY, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, MatDialog, MatDialogActions, MatDialogClose, MatDialogConfig, MatDialogContainer, MatDialogContent, MatDialogModule, MatDialogRef, MatDialogState, MatDialogTitle, _closeDialogVia, _defaultParams, matDialogAnimations };\n","import { Component } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\n\r\n@Component({\r\n    selector: 'app-additional-coverage-nrds-dialog',\r\n    imports: [MatDialogModule, MatButtonModule],\r\n    templateUrl: './additional-coverage-nrds-dialog.component.html',\r\n    styleUrl: './additional-coverage-nrds-dialog.component.scss',\r\n})\r\nexport class AdditionalCoverageNrdsDialogComponent {}\r\n","<h2 mat-dialog-title>Why provide your NRDS ID?</h2>\r\n\r\n<mat-dialog-content>\r\n    <div class=\"dialog-container\">\r\n        <h3 class=\"dialog-subtitle\">NEW - Additional Coverages Endorsement</h3>\r\n\r\n        <p class=\"highlight\">\r\n            This endorsement is automatically included if you are a member of CAR and\r\n            provide your NRDS number.\r\n        </p>\r\n\r\n        <p>\r\n            <strong\r\n                >If you are not an active member of CAR this endorsement is available for\r\n                an additional premium charge of $40.00</strong\r\n            >.\r\n        </p>\r\n\r\n        <ul>\r\n            <li>Regulatory Complaints sublimit of $5,000/$10,000 for claim expenses</li>\r\n            <li>\r\n                Environmental Hazard sublimit of $10,000/$20,000 including mold/fungi for\r\n                damages and claim expenses\r\n            </li>\r\n            <li>Fair Housing limit of $50,000 for damages and claim expenses</li>\r\n            <li>Subpoena assistance coverage of $2,500 for all claims</li>\r\n            <li>Sale of residential investment property subject to certain conditions</li>\r\n            <li>Modified Defense and Settlement provisions</li>\r\n        </ul>\r\n    </div>\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions align=\"end\">\r\n    <button mat-stroked-button mat-dialog-close>Close</button>\r\n</mat-dialog-actions>\r\n","import { ValidatorFn, AbstractControl, ValidationErrors } from '@angular/forms';\r\n\r\nexport function validateYesNo(expectedValue: any): ValidatorFn {\r\n    return (control: AbstractControl): ValidationErrors | null => {\r\n        return control.value === expectedValue ? null : { invalidYesNoOption: true };\r\n    };\r\n}\r\n","<div class=\"container d-flex flex-column\">\r\n    <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"quotingForm\">\r\n        <div class=\"row\">\r\n            <div class=\"col-md-9\">\r\n                <div class=\"row align-items-center\">\r\n                    <p class=\"mb-0 fs-7\">\r\n                        Choose your Coverage Options. Then select any optional Additional\r\n                        Coverage Endorsements. Finally, select any Certification to Other\r\n                        States, and click Continue.\r\n                    </p>\r\n                </div>\r\n                <div class=\"d-flex align-items-center\">\r\n                    <h6 class=\"mt-1\">Coverage Options</h6>\r\n                    <a\r\n                        mat-button\r\n                        href=\"https://www.wugieo.com/-/media/Files/WUG/Resources/WUG-2025-CO-Brochure-Final.pdf\"\r\n                        target=\"_blank\"\r\n                        >What's this?</a\r\n                    >\r\n                </div>\r\n                <div class=\"row align-items-center\">\r\n                    <mat-form-field appearance=\"outline\" class=\"col-md-6 medium-input\">\r\n                        <mat-label>Requested Limits</mat-label>\r\n                        <mat-select formControlName=\"coverage\">\r\n                            @for (coverage of coverageOptions; track coverage.id) {\r\n                                <mat-option [value]=\"coverage\"\r\n                                    >{{ coverage.coverage }} - {{ coverage.limits }} - ${{\r\n                                        coverage.basePremium\r\n                                    }}</mat-option\r\n                                >\r\n                            }\r\n                        </mat-select>\r\n                        <mat-error\r\n                            *ngIf=\"quotingForm.get('coverage')?.hasError('required')\">\r\n                            Coverage is <strong>required</strong>\r\n                        </mat-error>\r\n                    </mat-form-field>\r\n                    <div class=\"col-md-3 mb-3 fs-6\">\r\n                        <span *ngIf=\"quotingForm.get('coverage')?.value\">\r\n                            {{\r\n                                quotingForm.get('coverage')!.value.deductible\r\n                                    | currency: 'USD' : 'symbol' : '1.0-0'\r\n                            }}\r\n                            Deductible\r\n                        </span>\r\n                    </div>\r\n                </div>\r\n\r\n                <div class=\"row align-items-center\">\r\n                    <h6 class=\"col-md-7\">Included Coverages</h6>\r\n                    <h6 class=\"col-md-3\">Limits</h6>\r\n                    <h6 class=\"col-md-2\">Deductible</h6>\r\n                </div>\r\n\r\n                @for (option of includedCoverageOptions; track option.id) {\r\n                    <div class=\"row align-items-center\">\r\n                        <div class=\"col-md-7\">\r\n                            <mat-checkbox\r\n                                [formControlName]=\"'additionalCoverage_' + option.id\"\r\n                                >{{ option.coverage }}</mat-checkbox\r\n                            >\r\n                        </div>\r\n                        <div class=\"col-md-3 fs-7\">\r\n                            {{ option.limits }}\r\n                        </div>\r\n                        <div class=\"col-md-2 fs-7\">\r\n                            {{ option.deductible | currency: 'USD' : 'symbol' : '1.0-0' }}\r\n                        </div>\r\n                    </div>\r\n                }\r\n\r\n                <div class=\"row align-items-center mt-3\">\r\n                    <div class=\"col-md-7 d-flex align-items-center\">\r\n                        <h6 class=\"mt-1\">Additional Coverages Endorsements</h6>\r\n                        <a\r\n                            mat-button\r\n                            href=\"https://www.wugieo.com/-/media/Files/WUG/Resources/WUG-2025-CO-Brochure-Final.pdf\"\r\n                            target=\"_blank\"\r\n                            >What's this?</a\r\n                        >\r\n                    </div>\r\n                    <h6 class=\"col-md-3\">Limits</h6>\r\n                    <h6 class=\"col-md-2\">Premium</h6>\r\n                </div>\r\n\r\n                @for (option of additionalCoverageOptions; track option.id) {\r\n                    <div class=\"row align-items-center\">\r\n                        <div class=\"col-md-7\">\r\n                            <mat-checkbox\r\n                                [formControlName]=\"'additionalCoverage_' + option.id\"\r\n                                >{{ option.coverage }}</mat-checkbox\r\n                            >\r\n                        </div>\r\n                        <div class=\"col-md-3 fs-7\">\r\n                            {{ getLimitsText(option) }}\r\n                        </div>\r\n                        <div class=\"col-md-2 fs-7\">\r\n                            {{ getPremiumText(option) }}\r\n                        </div>\r\n                    </div>\r\n                    <div\r\n                        *ngIf=\"\r\n                            quotingForm.get(\r\n                                'additionalCoverage_activeMember_' + option.id\r\n                            ) &&\r\n                            quotingForm.get('additionalCoverage_licenseNum_' + option.id)\r\n                        \"\r\n                        class=\"d-flex flex-column mx-md-5\">\r\n                        <p class=\"mb-0 fs-7\">\r\n                            Are you an active member in the Colorado Association of\r\n                            Realtors (CAR)?\r\n                        </p>\r\n                        <div class=\"d-flex align-items-center gap-3\">\r\n                            <mat-radio-group\r\n                                [formControlName]=\"\r\n                                    'additionalCoverage_activeMember_' + option.id\r\n                                \"\r\n                                class=\"d-flex gap-3\">\r\n                                <mat-radio-button [value]=\"yesNoOption.Yes\"\r\n                                    >Yes</mat-radio-button\r\n                                >\r\n                                <mat-radio-button [value]=\"yesNoOption.No\"\r\n                                    >No</mat-radio-button\r\n                                >\r\n                            </mat-radio-group>\r\n                            <mat-form-field appearance=\"outline\" class=\"small-input\">\r\n                                <mat-label>NRDS ID #</mat-label>\r\n                                <input\r\n                                    matInput\r\n                                    [formControlName]=\"\r\n                                        'additionalCoverage_licenseNum_' + option.id\r\n                                    \" />\r\n                                <mat-error\r\n                                    *ngIf=\"\r\n                                        quotingForm\r\n                                            .get(\r\n                                                'additionalCoverage_licenseNum_' +\r\n                                                    option.id\r\n                                            )\r\n                                            ?.hasError('maxlength')\r\n                                    \">\r\n                                    NRDS ID # cannot exceed 50 characters.\r\n                                </mat-error>\r\n                            </mat-form-field>\r\n                            <button mat-button type=\"button\" (click)=\"showNrdsPopup()\">\r\n                                What's this?\r\n                            </button>\r\n                        </div>\r\n                    </div>\r\n                    <div\r\n                        *ngIf=\"\r\n                            quotingForm.get(\r\n                                'additionalCoverage_certified_' + option.id\r\n                            ) && quotingForm.get('additionalCoverage_hold_' + option.id)\r\n                        \"\r\n                        class=\"d-flex flex-column mx-md-5\">\r\n                        <p class=\"mb-0 fs-7\">\r\n                            Are you a certified, registered, or licensed appraiser?\r\n                        </p>\r\n                        <div class=\"d-flex align-items-center gap-3\">\r\n                            <mat-radio-group\r\n                                [formControlName]=\"\r\n                                    'additionalCoverage_certified_' + option.id\r\n                                \"\r\n                                class=\"d-flex gap-3\">\r\n                                <mat-radio-button [value]=\"yesNoOption.Yes\"\r\n                                    >Yes</mat-radio-button\r\n                                >\r\n                                <mat-radio-button [value]=\"yesNoOption.No\"\r\n                                    >No</mat-radio-button\r\n                                >\r\n                            </mat-radio-group>\r\n                        </div>\r\n                        <p class=\"mb-0 fs-7\">\r\n                            Do you hold an active real estate license?\r\n                        </p>\r\n                        <div class=\"d-flex align-items-center gap-3\">\r\n                            <mat-radio-group\r\n                                [formControlName]=\"'additionalCoverage_hold_' + option.id\"\r\n                                class=\"d-flex gap-3\">\r\n                                <mat-radio-button [value]=\"yesNoOption.Yes\"\r\n                                    >Yes</mat-radio-button\r\n                                >\r\n                                <mat-radio-button [value]=\"yesNoOption.No\"\r\n                                    >No</mat-radio-button\r\n                                >\r\n                            </mat-radio-group>\r\n                            <mat-form-field\r\n                                appearance=\"outline\"\r\n                                class=\"small-input\"\r\n                                *ngIf=\"\r\n                                    quotingForm.get(\r\n                                        'additionalCoverage_licenseNum_' + option.id\r\n                                    )\r\n                                \">\r\n                                <mat-label>Appraiser License #</mat-label>\r\n                                <input\r\n                                    matInput\r\n                                    [formControlName]=\"\r\n                                        'additionalCoverage_licenseNum_' + option.id\r\n                                    \" />\r\n                                <mat-error\r\n                                    *ngIf=\"\r\n                                        quotingForm\r\n                                            .get(\r\n                                                'additionalCoverage_licenseNum_' +\r\n                                                    option.id\r\n                                            )\r\n                                            ?.hasError('maxlength')\r\n                                    \">\r\n                                    Appraiser License # cannot exceed 50 characters.\r\n                                </mat-error>\r\n                            </mat-form-field>\r\n                        </div>\r\n                        <p class=\"mb-0 fs-7 text-danger\">\r\n                            You must hold and maintain an ACTIVE Real Estate License to\r\n                            purchase this endorsement. If you do not hold and maintain an\r\n                            ACTIVE Real Estate License and are not a certified, licensed\r\n                            or registered appraiser you cannot purchase the Licensed\r\n                            Appraiser Endorsement\r\n                        </p>\r\n                    </div>\r\n                }\r\n\r\n                <h6 class=\"mt-3\">Certification to Other States</h6>\r\n                <p class=\"mb-0 fs-7\">\r\n                    Do you hold a license in another mandated state? (Check all that\r\n                    apply)\r\n                </p>\r\n                <div class=\"row align-items-center\">\r\n                    @for (option of conformityOptions; track option.id) {\r\n                        <div class=\"col-md-2\">\r\n                            <mat-checkbox [formControlName]=\"'conformity_' + option.id\">{{\r\n                                option.state\r\n                            }}</mat-checkbox>\r\n                        </div>\r\n                        <div class=\"col-md-2 ms-4 ms-md-0\">\r\n                            <mat-form-field\r\n                                *ngIf=\"\r\n                                    quotingForm.get('conformity_licenseNum' + option.id)\r\n                                \"\r\n                                appearance=\"outline\"\r\n                                class=\"small-input w-85\">\r\n                                <mat-label>License #</mat-label>\r\n                                <input\r\n                                    matInput\r\n                                    [formControlName]=\"\r\n                                        'conformity_licenseNum' + option.id\r\n                                    \" />\r\n                                <mat-error\r\n                                    *ngIf=\"\r\n                                        quotingForm\r\n                                            .get('conformity_licenseNum' + option.id)\r\n                                            ?.hasError('maxlength')\r\n                                    \">\r\n                                    License # cannot exceed 50 characters.\r\n                                </mat-error>\r\n                                <mat-error\r\n                                    *ngIf=\"\r\n                                        quotingForm\r\n                                            .get('conformity_licenseNum' + option.id)\r\n                                            ?.hasError('pattern') &&\r\n                                        !quotingForm\r\n                                            .get('conformity_licenseNum' + option.id)\r\n                                            ?.hasError('required')\r\n                                    \">\r\n                                    License # must not contain spaces\r\n                                </mat-error>\r\n                                <mat-error\r\n                                    *ngIf=\"\r\n                                        quotingForm\r\n                                            .get('conformity_licenseNum' + option.id)\r\n                                            ?.hasError('required')\r\n                                    \">\r\n                                    License # is <strong>required</strong>\r\n                                </mat-error>\r\n                            </mat-form-field>\r\n                        </div>\r\n                        <div class=\"col-md-2 ms-3 ms-md-0\">\r\n                            <mat-checkbox\r\n                                *ngIf=\"\r\n                                    quotingForm.get(\r\n                                        'conformity_pendingLicense' + option.id\r\n                                    )\r\n                                \"\r\n                                [formControlName]=\"\r\n                                    'conformity_pendingLicense' + option.id\r\n                                \"\r\n                                >Pending</mat-checkbox\r\n                            >\r\n                        </div>\r\n                    }\r\n                </div>\r\n            </div>\r\n\r\n            <div class=\"col-md-3 text-center\">\r\n                <h4 class=\"text-secondary mb-3\">PREMIUM</h4>\r\n                <div class=\"premium\">\r\n                    {{ premium | currency: 'USD' : 'symbol' : '1.0-0' }}\r\n                </div>\r\n                <button\r\n                    mat-flat-button\r\n                    color=\"primary\"\r\n                    type=\"submit\"\r\n                    [disabled]=\"quotingForm.invalid || isRequestProcessing\">\r\n                    Continue\r\n                </button>\r\n            </div>\r\n        </div>\r\n    </form>\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport {\r\n    FormBuilder,\r\n    FormControl,\r\n    FormGroup,\r\n    ReactiveFormsModule,\r\n    Validators,\r\n} from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCheckboxModule } from '@angular/material/checkbox';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatRadioModule } from '@angular/material/radio';\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { Router } from '@angular/router';\r\nimport { finalize } from 'rxjs';\r\nimport { AdditionalCoverageNrdsDialogComponent } from './additional-coverage-nrds-dialog/additional-coverage-nrds-dialog.component';\r\nimport { AppSessionState } from '../../models/app-state.model';\r\nimport { InsuredPrincipal } from '../../models/insured-principal.model';\r\nimport { Quoting } from '../../models/quoting.model';\r\nimport {\r\n    AdditionalCoverageOption,\r\n    ConformityOption,\r\n    Coverage,\r\n    CoverageToAdditionalCoverageOption,\r\n    FirmOption,\r\n    IncludedCoverageOption,\r\n    YesNoOption,\r\n} from '../../models/rater-data.model';\r\nimport {\r\n    CalculateAdditionalCoverageOption,\r\n    CalculateRaterPremium,\r\n} from '../../models/rater.model';\r\nimport { AppSessionStateService } from '../../services/app-session-state.service';\r\nimport { AppStateService } from '../../services/app-state.service';\r\nimport { AuthService } from '../../services/auth.service';\r\nimport { InsuredRaterService } from '../../services/insured-rater.service';\r\nimport { NotificationService } from '../../services/notification.service';\r\nimport { QuotingService } from '../../services/quoting.service';\r\nimport { RaterDataService } from '../../services/rater-data.service';\r\nimport { RaterService } from '../../services/rater.service';\r\nimport { validateYesNo } from '../../validators/yes-no.validator';\r\n\r\n@Component({\r\n    selector: 'app-quoting',\r\n    imports: [\r\n        MatButtonModule,\r\n        MatInputModule,\r\n        MatSelectModule,\r\n        MatCheckboxModule,\r\n        MatTableModule,\r\n        MatRadioModule,\r\n        CommonModule,\r\n        ReactiveFormsModule,\r\n    ],\r\n    templateUrl: './quoting.component.html',\r\n    styleUrl: './quoting.component.scss',\r\n})\r\nexport class QuotingComponent implements OnInit {\r\n    public quotingForm: FormGroup;\r\n\r\n    public coverageOptions: Coverage[] = [];\r\n    public includedCoverageOptions: IncludedCoverageOption[] = [];\r\n    public additionalCoverageOptions: AdditionalCoverageOption[] = [];\r\n    public coverageToAdditionalCoverageOptions: CoverageToAdditionalCoverageOption[] = [];\r\n    public conformityOptions: ConformityOption[] = [];\r\n    public premium = 0;\r\n    public yesNoOption = YesNoOption;\r\n\r\n    public isRequestProcessing = false;\r\n\r\n    private user: InsuredPrincipal;\r\n    private appSessionState: AppSessionState;\r\n    private additionalCoverageTitle = 'Additional Coverage';\r\n\r\n    public constructor(\r\n        private formBuilder: FormBuilder,\r\n        private raterDataService: RaterDataService,\r\n        private raterService: RaterService,\r\n        private quotingService: QuotingService,\r\n        private appStateService: AppStateService,\r\n        private appSessionStateService: AppSessionStateService,\r\n        private insuredRaterService: InsuredRaterService,\r\n        private authService: AuthService,\r\n        private notificationService: NotificationService,\r\n        private router: Router,\r\n        private dialog: MatDialog,\r\n    ) {\r\n        this.quotingForm = this.formBuilder.group({\r\n            coverage: new FormControl(null, [Validators.required]),\r\n        });\r\n    }\r\n\r\n    public ngOnInit(): void {\r\n        const appSessionState = this.appSessionStateService.getState();\r\n        if (!appSessionState) {\r\n            return;\r\n        }\r\n\r\n        this.appSessionState = appSessionState;\r\n\r\n        this.appStateService.getState$().subscribe((appState) => {\r\n            if (appState?.user) {\r\n                this.user = appState?.user;\r\n            }\r\n        });\r\n\r\n        this.quotingForm.get('coverage')?.valueChanges.subscribe((coverage) => {\r\n            if (coverage) {\r\n                this.calculateRater(coverage);\r\n            }\r\n        });\r\n\r\n        this.raterDataService\r\n            .getRaterData(new Date(appSessionState.effectiveDate))\r\n            .subscribe((raterData) => {\r\n                if (appSessionState.firmOption === FirmOption.Firm) {\r\n                    this.coverageOptions = raterData.coverageOptions.filter(\r\n                        (c) => c.isForFirm,\r\n                    );\r\n                    const firmOptions = raterData.additionalCoverageOptions.filter(\r\n                        (c) => c.isForFirm,\r\n                    );\r\n                    this.includedCoverageOptions = firmOptions.filter((x) => x.isDefault);\r\n                    this.additionalCoverageOptions = firmOptions.filter(\r\n                        (x) => !x.isDefault,\r\n                    );\r\n                    this.conformityOptions = raterData.conformityOptions\r\n                        .filter((c) => c.isForFirm)\r\n                        .sort((a, b) => a.state.localeCompare(b.state));\r\n                } else if (appSessionState.firmOption === FirmOption.Individual) {\r\n                    this.coverageOptions = raterData.coverageOptions.filter(\r\n                        (c) => c.isForIndividual,\r\n                    );\r\n                    const individualOptions = raterData.additionalCoverageOptions.filter(\r\n                        (c) => c.isForIndividual,\r\n                    );\r\n                    this.includedCoverageOptions = individualOptions.filter(\r\n                        (x) => x.isDefault,\r\n                    );\r\n                    this.additionalCoverageOptions = individualOptions.filter(\r\n                        (x) => !x.isDefault,\r\n                    );\r\n                    this.conformityOptions = raterData.conformityOptions\r\n                        .filter((c) => c.isForIndividual)\r\n                        .sort((a, b) => a.state.localeCompare(b.state));\r\n                }\r\n\r\n                this.coverageToAdditionalCoverageOptions =\r\n                    raterData.coverageToAdditionalCoverageOptions;\r\n\r\n                this.setCoverageData();\r\n            });\r\n    }\r\n\r\n    public onSubmit(): void {\r\n        if (this.quotingForm.valid) {\r\n            const formValue = this.quotingForm.value;\r\n\r\n            const selectedCoverage = formValue.coverage;\r\n\r\n            const selectedAdditionalCoverages = this.additionalCoverageOptions\r\n                .filter((option) => formValue[`additionalCoverage_${option.id}`])\r\n                .map((option) => ({\r\n                    ...option,\r\n                    licenseNum: option.requiresLicense\r\n                        ? formValue[`additionalCoverage_licenseNum_${option.id}`]\r\n                        : null,\r\n                    isActiveMember: option.coverage.startsWith(\r\n                        this.additionalCoverageTitle,\r\n                    )\r\n                        ? formValue[`additionalCoverage_activeMember_${option.id}`]\r\n                        : null,\r\n                    limits: !option.coverage.startsWith('Appraisal')\r\n                        ? option.limits\r\n                        : selectedCoverage.limits,\r\n                    premiumText: this.getPremiumText(option),\r\n                }));\r\n\r\n            const selectedConformityOptions = this.conformityOptions\r\n                .filter((option) => formValue[`conformity_${option.id}`])\r\n                .map((option) => ({\r\n                    ...option,\r\n                    licenseNum:\r\n                        formValue[`conformity_licenseNum${option.id}`] ?? 'Pending',\r\n                    pendingLicense: formValue[`conformity_pendingLicense${option.id}`],\r\n                }));\r\n\r\n            const quoting = {\r\n                coverage: selectedCoverage,\r\n                includedCoverageOptions: this.includedCoverageOptions,\r\n                additionalCoverageOptions: selectedAdditionalCoverages,\r\n                conformityOptions: selectedConformityOptions,\r\n                premium: this.premium,\r\n            } as Quoting;\r\n\r\n            this.quotingService.setQuoting(quoting);\r\n\r\n            if (this.user) {\r\n                this.isRequestProcessing = true;\r\n\r\n                this.insuredRaterService\r\n                    .createInsuredAndRater(quoting, this.appSessionState, this.user)\r\n                    .pipe(\r\n                        finalize(() => {\r\n                            this.isRequestProcessing = false;\r\n                        }),\r\n                    )\r\n                    .subscribe({\r\n                        next: (insureds) => {\r\n                            if (insureds) {\r\n                                this.user.insureds = insureds;\r\n                            }\r\n                            this.authService.setCurrentUser(this.user);\r\n                            this.router.navigate(['/summary']);\r\n                        },\r\n                        error: (err) => {\r\n                            if (err.error) {\r\n                                this.notificationService.showError(err.error as string);\r\n                            } else if (err.message) {\r\n                                this.notificationService.showError(err.message as string);\r\n                            } else {\r\n                                this.notificationService.showError(err as string);\r\n                            }\r\n                        },\r\n                    });\r\n            } else {\r\n                this.router.navigate(['/register']);\r\n            }\r\n        }\r\n    }\r\n\r\n    public showNrdsPopup(): void {\r\n        this.dialog.open(AdditionalCoverageNrdsDialogComponent, {\r\n            width: '500px',\r\n        });\r\n    }\r\n\r\n    public getLimitsText(option: AdditionalCoverageOption): string {\r\n        const coverage = this.quotingForm.get('coverage')?.value as Coverage;\r\n        if (!coverage) {\r\n            return option.limits;\r\n        }\r\n\r\n        const coverageToAdditionalCoverageMapping =\r\n            this.coverageToAdditionalCoverageOptions.find(\r\n                (x) =>\r\n                    x.coverageOptionId === coverage.id &&\r\n                    x.additionalCoverageOptionId === option.id,\r\n            );\r\n\r\n        return !coverageToAdditionalCoverageMapping\r\n            ? option.limits\r\n            : coverageToAdditionalCoverageMapping.limits;\r\n    }\r\n\r\n    public getPremiumText(option: AdditionalCoverageOption): string {\r\n        if (option.coverage.startsWith(this.additionalCoverageTitle)) {\r\n            return `$${option.invalidLicenseCharge} ($0 for CAR members)`;\r\n        }\r\n\r\n        const coverage = this.quotingForm.get('coverage')?.value as Coverage;\r\n        if (!coverage) {\r\n            return `$${option.basePremium}`;\r\n        }\r\n\r\n        const coverageToAdditionalCoverageMapping =\r\n            this.coverageToAdditionalCoverageOptions.find(\r\n                (x) =>\r\n                    x.coverageOptionId === coverage.id &&\r\n                    x.additionalCoverageOptionId === option.id,\r\n            );\r\n\r\n        return !coverageToAdditionalCoverageMapping\r\n            ? `$${option.basePremium}`\r\n            : `$${coverageToAdditionalCoverageMapping.basePremium}`;\r\n    }\r\n\r\n    private calculateRater(coverage: Coverage | undefined = undefined): void {\r\n        if (!coverage) {\r\n            coverage = this.quotingForm.value.coverage;\r\n            if (!coverage) {\r\n                return;\r\n            }\r\n        }\r\n\r\n        const includedCoverageOptions = this.includedCoverageOptions\r\n            .filter((option) => this.quotingForm.value[`additionalCoverage_${option.id}`])\r\n            .map((option) => {\r\n                return {\r\n                    additionalCoverageOptionId: option.id,\r\n                    invalidLicenseCharged: false,\r\n                } as CalculateAdditionalCoverageOption;\r\n            });\r\n\r\n        const additionalCoverageOptions = this.additionalCoverageOptions\r\n            .filter((option) => this.quotingForm.value[`additionalCoverage_${option.id}`])\r\n            .map((option) => {\r\n                return {\r\n                    additionalCoverageOptionId: option.id,\r\n                    invalidLicenseCharged:\r\n                        option.coverage.startsWith(this.additionalCoverageTitle) &&\r\n                        this.quotingForm.value[\r\n                            `additionalCoverage_activeMember_${option.id}`\r\n                        ] === YesNoOption.No,\r\n                } as CalculateAdditionalCoverageOption;\r\n            });\r\n\r\n        const calculateRaterPremium = {\r\n            effectiveDate: this.appSessionStateService.getEffectiveDateWithTimeShift(),\r\n            coverageOptionId: coverage.id,\r\n            additionalCoverageOptions: includedCoverageOptions.concat(\r\n                additionalCoverageOptions,\r\n            ),\r\n        } as CalculateRaterPremium;\r\n\r\n        this.raterService\r\n            .calculateRaterPremium(calculateRaterPremium)\r\n            .subscribe((premium) => (this.premium = premium));\r\n    }\r\n\r\n    private setCoverageData(): void {\r\n        Object.keys(this.quotingForm.controls).forEach((controlName) => {\r\n            if (\r\n                controlName.startsWith('additionalCoverage_') ||\r\n                controlName.startsWith('conformity_')\r\n            ) {\r\n                this.quotingForm.removeControl(controlName);\r\n            }\r\n        });\r\n\r\n        const existingQuoting = this.quotingService.getQuoting();\r\n\r\n        this.setCoverage(existingQuoting);\r\n        this.setIndividualCoverageOptions();\r\n        this.setAdditionalCoverageOptions(existingQuoting);\r\n        this.setConformityOptions(existingQuoting);\r\n\r\n        this.premium = existingQuoting?.premium ?? 0;\r\n    }\r\n\r\n    private setCoverage(existingQuoting: Quoting | null): void {\r\n        let emitEvent = true;\r\n        let coverage: Coverage | undefined;\r\n        if (existingQuoting) {\r\n            coverage = this.coverageOptions.find(\r\n                (x) => x.id === existingQuoting.coverage.id,\r\n            );\r\n            emitEvent = false;\r\n        } else {\r\n            coverage = this.coverageOptions.find(\r\n                (x) => x.id === this.quotingForm.value.coverage?.id,\r\n            );\r\n        }\r\n\r\n        this.quotingForm.patchValue(\r\n            {\r\n                coverage,\r\n            },\r\n            { emitEvent },\r\n        );\r\n    }\r\n\r\n    private setIndividualCoverageOptions(): void {\r\n        this.includedCoverageOptions.forEach((option) => {\r\n            this.quotingForm.addControl(\r\n                `additionalCoverage_${option.id}`,\r\n                new FormControl({ value: true, disabled: true }),\r\n            );\r\n        });\r\n    }\r\n\r\n    private setAdditionalCoverageOptions(existingQuoting: Quoting | null): void {\r\n        this.additionalCoverageOptions.forEach((option) => {\r\n            const existingCoverage = existingQuoting?.additionalCoverageOptions?.find(\r\n                (c) => c.id === option.id,\r\n            );\r\n            const selected = !!existingCoverage;\r\n\r\n            this.addCheckboxControl(option.id, selected);\r\n\r\n            if (option.coverage.startsWith(this.additionalCoverageTitle)) {\r\n                this.handleAdditionalCoverage(option, existingCoverage);\r\n            } else if (option.coverage.startsWith('Appraisal')) {\r\n                this.handleAppraisalCoverage(option, existingCoverage);\r\n            }\r\n\r\n            this.listenForCoverageChanges(option);\r\n        });\r\n    }\r\n\r\n    private addCheckboxControl(id: number, value: boolean): void {\r\n        this.quotingForm.addControl(`additionalCoverage_${id}`, new FormControl(value));\r\n    }\r\n\r\n    private addLicenseControl(id: number, licenseNum: string, required = false): void {\r\n        const validators = [Validators.maxLength(50)];\r\n        if (required) {\r\n            validators.push(Validators.required);\r\n        }\r\n        this.quotingForm.addControl(\r\n            `additionalCoverage_licenseNum_${id}`,\r\n            new FormControl(licenseNum, validators),\r\n        );\r\n    }\r\n\r\n    private handleAdditionalCoverage(\r\n        option: AdditionalCoverageOption,\r\n        existingCoverage: AdditionalCoverageOption | undefined,\r\n    ): void {\r\n        if (!existingCoverage && !option.isDefault) return;\r\n\r\n        const licenseNum = existingCoverage?.licenseNum || '';\r\n        const isActiveMember = existingCoverage?.isActiveMember;\r\n\r\n        this.addLicenseControl(option.id, licenseNum, isActiveMember === YesNoOption.Yes);\r\n\r\n        this.quotingForm.addControl(\r\n            `additionalCoverage_activeMember_${option.id}`,\r\n            new FormControl(isActiveMember, [Validators.required]),\r\n        );\r\n\r\n        this.listenForActiveMemberChanges(option.id);\r\n    }\r\n\r\n    private handleAppraisalCoverage(\r\n        option: AdditionalCoverageOption,\r\n        existingCoverage: AdditionalCoverageOption | undefined,\r\n    ): void {\r\n        if (!existingCoverage) return;\r\n\r\n        this.addLicenseControl(option.id, existingCoverage.licenseNum || '', true);\r\n\r\n        this.quotingForm.addControl(\r\n            `additionalCoverage_certified_${option.id}`,\r\n            new FormControl(existingCoverage ? YesNoOption.Yes : null, [\r\n                validateYesNo(YesNoOption.Yes),\r\n            ]),\r\n        );\r\n\r\n        this.quotingForm.addControl(\r\n            `additionalCoverage_hold_${option.id}`,\r\n            new FormControl(existingCoverage ? YesNoOption.Yes : null, [\r\n                validateYesNo(YesNoOption.Yes),\r\n            ]),\r\n        );\r\n\r\n        this.listenForHoldChanges(option.id);\r\n    }\r\n\r\n    private listenForActiveMemberChanges(id: number): void {\r\n        this.quotingForm\r\n            .get(`additionalCoverage_activeMember_${id}`)\r\n            ?.valueChanges.subscribe((isActiveMember) => {\r\n                const licenseNumControl = this.quotingForm.get(\r\n                    `additionalCoverage_licenseNum_${id}`,\r\n                );\r\n\r\n                if (licenseNumControl) {\r\n                    if (isActiveMember === YesNoOption.Yes) {\r\n                        licenseNumControl.addValidators(Validators.required);\r\n                    } else {\r\n                        licenseNumControl.removeValidators(Validators.required);\r\n                    }\r\n\r\n                    licenseNumControl.updateValueAndValidity();\r\n                }\r\n\r\n                setTimeout(() => this.calculateRater(), 0);\r\n            });\r\n    }\r\n\r\n    private listenForHoldChanges(id: number): void {\r\n        this.quotingForm\r\n            .get(`additionalCoverage_hold_${id}`)\r\n            ?.valueChanges.subscribe((hold) => {\r\n                const licenseNumControl = this.quotingForm.get(\r\n                    `additionalCoverage_licenseNum_${id}`,\r\n                );\r\n\r\n                if (hold === YesNoOption.Yes) {\r\n                    if (!licenseNumControl) {\r\n                        this.addLicenseControl(id, '', true);\r\n                    }\r\n                } else {\r\n                    if (licenseNumControl) {\r\n                        this.quotingForm.removeControl(\r\n                            `additionalCoverage_licenseNum_${id}`,\r\n                        );\r\n                    }\r\n                }\r\n            });\r\n    }\r\n\r\n    private listenForCoverageChanges(option: AdditionalCoverageOption): void {\r\n        this.quotingForm\r\n            .get(`additionalCoverage_${option.id}`)\r\n            ?.valueChanges.subscribe((isChecked) => {\r\n                if (option.coverage.startsWith(this.additionalCoverageTitle)) {\r\n                    this.toggleAdditionalCoverageControls(option.id, isChecked);\r\n                } else if (option.coverage.startsWith('Appraisal')) {\r\n                    this.toggleAppraisalControls(option.id, isChecked);\r\n                }\r\n\r\n                setTimeout(() => this.calculateRater(), 0);\r\n            });\r\n    }\r\n\r\n    private toggleAdditionalCoverageControls(id: number, isChecked: boolean): void {\r\n        if (isChecked) {\r\n            this.addLicenseControl(id, '', true);\r\n            this.quotingForm.addControl(\r\n                `additionalCoverage_activeMember_${id}`,\r\n                new FormControl(null, [Validators.required]),\r\n            );\r\n            this.listenForActiveMemberChanges(id);\r\n        } else {\r\n            this.quotingForm.removeControl(`additionalCoverage_licenseNum_${id}`);\r\n            this.quotingForm.removeControl(`additionalCoverage_activeMember_${id}`);\r\n        }\r\n    }\r\n\r\n    private toggleAppraisalControls(id: number, isChecked: boolean): void {\r\n        if (isChecked) {\r\n            this.addLicenseControl(id, '', true);\r\n            this.quotingForm.addControl(\r\n                `additionalCoverage_certified_${id}`,\r\n                new FormControl(null, [validateYesNo(YesNoOption.Yes)]),\r\n            );\r\n            this.quotingForm.addControl(\r\n                `additionalCoverage_hold_${id}`,\r\n                new FormControl(null, [validateYesNo(YesNoOption.Yes)]),\r\n            );\r\n            this.listenForHoldChanges(id);\r\n        } else {\r\n            this.quotingForm.removeControl(`additionalCoverage_licenseNum_${id}`);\r\n            this.quotingForm.removeControl(`additionalCoverage_certified_${id}`);\r\n            this.quotingForm.removeControl(`additionalCoverage_hold_${id}`);\r\n        }\r\n    }\r\n\r\n    private setConformityOptions(existingQuoting: Quoting | null): void {\r\n        this.conformityOptions.forEach((option) => {\r\n            const conformityOption = existingQuoting?.conformityOptions?.find(\r\n                (c) => c.id === option.id,\r\n            );\r\n            const selected = !!conformityOption;\r\n\r\n            this.quotingForm.addControl(\r\n                `conformity_${option.id}`,\r\n                new FormControl(selected || false),\r\n            );\r\n\r\n            if (selected) {\r\n                const licenseNum = conformityOption?.licenseNum || '';\r\n                const pendingLicense = conformityOption?.pendingLicense || false;\r\n\r\n                this.quotingForm.addControl(\r\n                    `conformity_licenseNum${option.id}`,\r\n                    new FormControl({ value: licenseNum, disabled: pendingLicense }, [\r\n                        Validators.required,\r\n                        Validators.maxLength(50),\r\n                        Validators.pattern(/^\\S*$/),\r\n                    ]),\r\n                );\r\n\r\n                this.quotingForm.addControl(\r\n                    `conformity_pendingLicense${option.id}`,\r\n                    new FormControl(pendingLicense),\r\n                );\r\n\r\n                this.quotingForm\r\n                    .get(`conformity_pendingLicense${option.id}`)\r\n                    ?.valueChanges.subscribe((isPending) => {\r\n                        const licenseNumControl = this.quotingForm.get(\r\n                            `conformity_licenseNum${option.id}`,\r\n                        );\r\n\r\n                        if (isPending) {\r\n                            licenseNumControl?.setValue('Pending');\r\n                            licenseNumControl?.disable();\r\n                        } else {\r\n                            licenseNumControl?.setValue('');\r\n                            licenseNumControl?.enable();\r\n                        }\r\n                    });\r\n            }\r\n\r\n            this.quotingForm\r\n                .get(`conformity_${option.id}`)\r\n                ?.valueChanges.subscribe((isChecked) => {\r\n                    const licenseControl = this.quotingForm.get(\r\n                        `conformity_licenseNum${option.id}`,\r\n                    );\r\n\r\n                    const pendingLicenseControl = this.quotingForm.get(\r\n                        `conformity_pendingLicense${option.id}`,\r\n                    );\r\n\r\n                    if (isChecked) {\r\n                        if (!licenseControl) {\r\n                            this.quotingForm.addControl(\r\n                                `conformity_licenseNum${option.id}`,\r\n                                new FormControl('', [\r\n                                    Validators.required,\r\n                                    Validators.maxLength(50),\r\n                                    Validators.pattern(/^\\S*$/),\r\n                                ]),\r\n                            );\r\n                        }\r\n\r\n                        if (!pendingLicenseControl) {\r\n                            this.quotingForm.addControl(\r\n                                `conformity_pendingLicense${option.id}`,\r\n                                new FormControl(false),\r\n                            );\r\n\r\n                            this.quotingForm\r\n                                .get(`conformity_pendingLicense${option.id}`)\r\n                                ?.valueChanges.subscribe((isPending) => {\r\n                                    const licenseNumControl = this.quotingForm.get(\r\n                                        `conformity_licenseNum${option.id}`,\r\n                                    );\r\n\r\n                                    if (isPending) {\r\n                                        licenseNumControl?.setValue('Pending');\r\n                                        licenseNumControl?.disable();\r\n                                    } else {\r\n                                        licenseNumControl?.setValue('');\r\n                                        licenseNumControl?.enable();\r\n                                    }\r\n                                });\r\n                        }\r\n                    } else {\r\n                        if (licenseControl) {\r\n                            this.quotingForm.removeControl(\r\n                                `conformity_licenseNum${option.id}`,\r\n                            );\r\n                        }\r\n\r\n                        if (pendingLicenseControl) {\r\n                            this.quotingForm.removeControl(\r\n                                `conformity_pendingLicense${option.id}`,\r\n                            );\r\n                        }\r\n                    }\r\n                });\r\n        });\r\n    }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { ConfigurationService } from '../app-configuration/configurationService';\r\n\r\n@Injectable({\r\n    providedIn: 'root',\r\n})\r\nexport class PaymentService {\r\n    public constructor(\r\n        private http: HttpClient,\r\n        private configurationService: ConfigurationService,\r\n    ) {}\r\n\r\n    public payToBindLink(\r\n        insuredNumber: number,\r\n        qNum: number,\r\n        qSuffix: string,\r\n    ): Observable<string> {\r\n        return this.http.get(\r\n            `${this.configurationService.configuration.wugPortalApiUrl}/api/v1/insureds/${insuredNumber}/quotes/${qNum}/${qSuffix}/pay-to-bind-link`,\r\n            { responseType: 'text' },\r\n        );\r\n    }\r\n}\r\n","<div class=\"container-fluid d-flex align-items-center\">\r\n    <div class=\"row flex-grow-1 w-100\" *ngIf=\"quoting\">\r\n        <div class=\"col-12 col-lg-8 p-4 p-md-5 bg-primary-subtle rounded shadow\">\r\n            <h1 class=\"mb-4 text-center text-md-start\">Your quote</h1>\r\n            <div class=\"row align-items-center\">\r\n                <p class=\"col-6 col-md-9 text-center text-md-start mb-0\">\r\n                    Insured Name:\r\n                    {{ insuredName }}\r\n                </p>\r\n            </div>\r\n            <div class=\"row align-items-center\">\r\n                <p class=\"col-6 col-md-9 text-center text-md-start mb-4\">\r\n                    Insured License Number:\r\n                    {{ licenseText }}\r\n                </p>\r\n            </div>\r\n            <div class=\"row align-items-center\">\r\n                <h6 class=\"col-6 col-md-9 text-center text-md-start\">\r\n                    Real Estate Brokers Professional Liability\r\n                </h6>\r\n                <h6 class=\"col-6 col-md-3 text-center text-md-start\">Premium</h6>\r\n            </div>\r\n            <div class=\"row align-items-center\">\r\n                <p class=\"col-6 col-md-9 text-center text-md-start mb-0\">\r\n                    Limits: {{ quoting.coverage.limits }}\r\n                </p>\r\n                <p class=\"col-6 col-md-3 text-center text-md-start mb-0\">\r\n                    {{\r\n                        quoting.coverage.basePremium\r\n                            | currency: 'USD' : 'symbol' : '1.0-0'\r\n                    }}\r\n                </p>\r\n            </div>\r\n            <div class=\"row align-items-center\">\r\n                <p class=\"col-6 col-md-9 text-center text-md-start mb-4\">\r\n                    Deductible:\r\n                    {{\r\n                        quoting.coverage.deductible | currency: 'USD' : 'symbol' : '1.0-0'\r\n                    }}\r\n                </p>\r\n            </div>\r\n\r\n            <h6 class=\"text-center text-md-start\">Included Coverages</h6>\r\n            <ul class=\"list-unstyled\">\r\n                @for (option of quoting.includedCoverageOptions; track option.id) {\r\n                    <li class=\"row\">\r\n                        <span class=\"col-12 col-md-3 text-center text-md-start\">\r\n                            {{ option.coverage }}\r\n                        </span>\r\n                        <div class=\"col-6 col-md-3 text-center text-md-start\">\r\n                            <span *ngIf=\"option.deductible\">\r\n                                {{\r\n                                    option.deductible\r\n                                        | currency: 'USD' : 'symbol' : '1.0-0'\r\n                                }}\r\n                                deductible\r\n                            </span>\r\n                        </div>\r\n\r\n                        <span\r\n                            [ngClass]=\"{ 'col-12': !option.deductible }\"\r\n                            class=\"col-6 col-md-3 text-center text-md-start\">\r\n                            {{ option.limits }}\r\n                        </span>\r\n                    </li>\r\n                }\r\n            </ul>\r\n\r\n            <h6 class=\"mt-4 text-center text-md-start\">\r\n                Additional Coverages Endorsements\r\n            </h6>\r\n            <ul class=\"list-unstyled\">\r\n                @for (option of quoting.additionalCoverageOptions; track option.id) {\r\n                    <li class=\"row\">\r\n                        <span class=\"col-12 col-md-6 text-center text-md-start\">\r\n                            {{ option.coverage }}\r\n                        </span>\r\n                        <span class=\"col-6 col-md-3 text-center text-md-start\">\r\n                            {{ option.limits }}\r\n                        </span>\r\n                        <span class=\"col-6 col-md-3 text-center text-md-start\">\r\n                            {{ option.premiumText }}\r\n                        </span>\r\n                    </li>\r\n                } @empty {\r\n                    <p class=\"col text-center text-md-start\">None</p>\r\n                }\r\n            </ul>\r\n\r\n            <h6 class=\"mt-4 text-center text-md-start\">Conformity Options</h6>\r\n            <p class=\"text-center text-md-start\">{{ conformityOptionsText }}</p>\r\n        </div>\r\n\r\n        <div\r\n            class=\"col-12 col-md-6 col-lg-3 d-flex flex-column align-items-center justify-content-center p-4 p-md-5 rounded shadow border border-black offset-md-3 offset-lg-0 offset-0\">\r\n            <div class=\"w-100 mb-3 d-flex justify-content-between\">\r\n                <p class=\"m-0\">Premium</p>\r\n                <p class=\"m-0\">\r\n                    {{ quoting.premium | currency: 'USD' : 'symbol' : '1.0-0' }}\r\n                </p>\r\n            </div>\r\n            <div class=\"w-100 mb-3 d-flex justify-content-between\">\r\n                <p class=\"m-0\">Taxes</p>\r\n                <p class=\"m-0\">$0</p>\r\n            </div>\r\n            <div class=\"w-100 mb-3 d-flex justify-content-between\">\r\n                <p class=\"m-0\">Fees</p>\r\n                <p class=\"m-0\">$0</p>\r\n            </div>\r\n            <hr class=\"w-100 my-4\" />\r\n            <div class=\"w-100 d-flex align-items-center justify-content-between\">\r\n                <p class=\"m-0\"><strong>Due Today</strong></p>\r\n                <p class=\"m-0 fs-2 fw-bold\">\r\n                    {{ quoting.premium | currency: 'USD' : 'symbol' : '1.0-0' }}\r\n                </p>\r\n            </div>\r\n            <div\r\n                class=\"w-100 my-3 d-flex flex-column align-items-center small text-muted\">\r\n                <p class=\"mb-0\">+ Transaction Fee</p>\r\n                <p class=\"mb-0\">$5 for Credit Card, $3 for ACH</p>\r\n            </div>\r\n            <button\r\n                mat-flat-button\r\n                color=\"primary\"\r\n                class=\"w-100\"\r\n                (click)=\"buyThisCoverage()\">\r\n                BUY THIS COVERAGE\r\n            </button>\r\n        </div>\r\n\r\n        <div\r\n            class=\"col-12 col-md-6 col-lg-1 bg-primary-subtle rounded shadow mt-3 mt-md-0\"></div>\r\n    </div>\r\n</div>\r\n","import { Routes } from '@angular/router';\r\nimport { appSessionStateGuard } from './guards/app-session-state.guard';\r\nimport { authGuard } from './guards/auth.guard';\r\nimport { quotingGuard } from './guards/quoting.guard';\r\nimport { registerGuard } from './guards/register.guard';\r\nimport { resetPasswordGuard } from './guards/reset-password.guard';\r\nimport { AuthComponent } from './pages/auth/auth.component';\r\nimport { ForgotPasswordComponent } from './pages/auth/login/forgot-password/forgot-password.component';\r\nimport { PasswordResetComponent } from './pages/auth/login/password-reset/password-reset.component';\r\nimport { RegisterComponent } from './pages/auth/register/register.component';\r\nimport { LandingPageComponent } from './pages/landing-page/landing-page.component';\r\nimport { LayoutComponent } from './pages/layout/layout.component';\r\nimport { QuotingComponent } from './pages/quoting/quoting.component';\r\nimport { SummaryComponent } from './pages/summary/summary.component';\r\n\r\nexport const routes: Routes = [\r\n    { path: '', component: LandingPageComponent, pathMatch: 'full' },\r\n    {\r\n        path: '',\r\n        component: LayoutComponent,\r\n        children: [\r\n            { path: 'auth', component: AuthComponent },\r\n            { path: 'forgot-password', component: ForgotPasswordComponent },\r\n            {\r\n                path: 'password-reset',\r\n                component: PasswordResetComponent,\r\n                canActivate: [resetPasswordGuard],\r\n            },\r\n            {\r\n                path: 'quoting',\r\n                component: QuotingComponent,\r\n                canActivate: [appSessionStateGuard],\r\n            },\r\n            {\r\n                path: 'register',\r\n                component: RegisterComponent,\r\n                canActivate: [registerGuard],\r\n            },\r\n            {\r\n                path: 'summary',\r\n                component: SummaryComponent,\r\n                canActivate: [authGuard, quotingGuard],\r\n            },\r\n        ],\r\n    },\r\n    { path: '**', redirectTo: '' },\r\n];\r\n","import { inject } from '@angular/core';\r\nimport { Router, ActivatedRouteSnapshot, CanActivateFn } from '@angular/router';\r\n\r\nexport const resetPasswordGuard: CanActivateFn = (route: ActivatedRouteSnapshot) => {\r\n    const router = inject(Router);\r\n    const codeParam = route.queryParams['code'];\r\n\r\n    if (!codeParam) {\r\n        router.navigate(['']);\r\n        return false;\r\n    }\r\n\r\n    return true;\r\n};\r\n","import { inject } from '@angular/core';\r\nimport { CanActivateFn, Router } from '@angular/router';\r\nimport { AppSessionStateService } from '../services/app-session-state.service';\r\n\r\nexport const appSessionStateGuard: CanActivateFn = () => {\r\n    const appSessionStateService = inject(AppSessionStateService);\r\n    const router = inject(Router);\r\n\r\n    const appSessionState = appSessionStateService.getState();\r\n\r\n    if (!appSessionState) {\r\n        router.navigate(['/auth']);\r\n        return false;\r\n    }\r\n\r\n    return true;\r\n};\r\n","import { inject } from '@angular/core';\r\nimport { CanActivateFn, Router } from '@angular/router';\r\nimport { AppSessionStateService } from '../services/app-session-state.service';\r\nimport { AppStateService } from '../services/app-state.service';\r\nimport { QuotingService } from '../services/quoting.service';\r\n\r\nexport const registerGuard: CanActivateFn = () => {\r\n    const appStateService = inject(AppStateService);\r\n    const appSessionStateService = inject(AppSessionStateService);\r\n    const quotingService = inject(QuotingService);\r\n    const router = inject(Router);\r\n\r\n    const principal = appStateService.getProperty('user');\r\n    const appSessionState = appSessionStateService.getState();\r\n    const quoting = quotingService.getQuoting();\r\n\r\n    if (principal || !appSessionState || !quoting) {\r\n        router.navigate(['/auth']);\r\n        return false;\r\n    }\r\n\r\n    return true;\r\n};\r\n","import { CommonModule } from '@angular/common';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { Quoting } from '../../models/quoting.model';\r\nimport { AppSessionStateService } from '../../services/app-session-state.service';\r\nimport { AppStateService } from '../../services/app-state.service';\r\nimport { PaymentService } from '../../services/payment.service';\r\nimport { QuotingService } from '../../services/quoting.service';\r\nimport { RaterDataService } from '../../services/rater-data.service';\r\n\r\n@Component({\r\n    selector: 'app-summary',\r\n    imports: [MatButtonModule, CommonModule],\r\n    templateUrl: './summary.component.html',\r\n    styleUrl: './summary.component.scss',\r\n})\r\nexport class SummaryComponent implements OnInit {\r\n    public quoting: Quoting;\r\n    public conformityOptionsText: string;\r\n    public insuredName: string;\r\n    public licenseText: string;\r\n\r\n    public constructor(\r\n        private quotingService: QuotingService,\r\n        private appSessionStateService: AppSessionStateService,\r\n        private appStateService: AppStateService,\r\n        private paymentService: PaymentService,\r\n        private raterDataService: RaterDataService,\r\n    ) {}\r\n\r\n    public ngOnInit(): void {\r\n        const quoting = this.quotingService.getQuoting();\r\n        if (quoting) {\r\n            this.quoting = quoting;\r\n\r\n            const conformityOptions = this.quoting.conformityOptions;\r\n            this.conformityOptionsText =\r\n                conformityOptions.length > 0\r\n                    ? conformityOptions\r\n                          .map((x) => `${x.state} License ${x.licenseNum}`)\r\n                          .join(', ')\r\n                    : 'None';\r\n        }\r\n\r\n        const appSessionState = this.appSessionStateService.getState();\r\n        const appState = this.appStateService.getState();\r\n        if (appSessionState && appState) {\r\n            if (appSessionState.insured.id !== 0) {\r\n                this.insuredName =\r\n                    appState.user.insureds.find(\r\n                        (insured) => insured.id === appSessionState.insured.id,\r\n                    )?.name ?? '';\r\n            } else {\r\n                this.insuredName = appSessionState.insured.name;\r\n            }\r\n\r\n            this.raterDataService\r\n                .getRaterData(new Date(appSessionState.effectiveDate))\r\n                .subscribe((raterData) => {\r\n                    const prefix = raterData.licensePrefixOptions.find(\r\n                        (option) => option.id === appSessionState.license.licensePrefixId,\r\n                    )?.prefix;\r\n                    this.licenseText = appSessionState.license.pendingLicense\r\n                        ? 'Pending License'\r\n                        : `${appSessionState.license.licenseBody} ${prefix}`;\r\n                });\r\n        }\r\n    }\r\n\r\n    public buyThisCoverage(): void {\r\n        this.paymentService\r\n            .payToBindLink(\r\n                this.quoting.insuredNum,\r\n                this.quoting.qNum,\r\n                this.quoting.qSuffix,\r\n            )\r\n            .subscribe((url) => {\r\n                this.quotingService.clear();\r\n                this.appSessionStateService.clear();\r\n                window.location.href = url;\r\n            });\r\n    }\r\n}\r\n","import { inject } from '@angular/core';\r\nimport { CanActivateFn, Router } from '@angular/router';\r\nimport { AppStateService } from '../services/app-state.service';\r\nimport { AuthService } from '../services/auth.service';\r\nimport { SecurityService } from '../services/security.service';\r\n\r\nexport const authGuard: CanActivateFn = () => {\r\n    const appStateService = inject(AppStateService);\r\n    const authService = inject(AuthService);\r\n    const securityService = inject(SecurityService);\r\n    const router = inject(Router);\r\n\r\n    const principal = appStateService.getProperty('user');\r\n    const token = appStateService.getProperty('token');\r\n\r\n    if (!principal || !token) {\r\n        router.navigate(['/auth']);\r\n        return false;\r\n    }\r\n\r\n    if (!securityService.isValidToken()) {\r\n        authService.logOut();\r\n        router.navigate(['/auth']);\r\n        return false;\r\n    }\r\n\r\n    return true;\r\n};\r\n","import { inject } from '@angular/core';\r\nimport { CanActivateFn, Router } from '@angular/router';\r\nimport { QuotingService } from '../services/quoting.service';\r\n\r\nexport const quotingGuard: CanActivateFn = () => {\r\n    const quotingService = inject(QuotingService);\r\n    const router = inject(Router);\r\n\r\n    const quoting = quotingService.getQuoting();\r\n\r\n    if (!quoting) {\r\n        router.navigate(['/quoting']);\r\n        return false;\r\n    }\r\n\r\n    return true;\r\n};\r\n","import { HttpInterceptorFn } from '@angular/common/http';\r\nimport { inject } from '@angular/core';\r\nimport { finalize } from 'rxjs';\r\nimport { LoadingService } from '../services/loading.service';\r\n\r\nlet totalRequests = 0;\r\n\r\nexport const loadingInterceptor: HttpInterceptorFn = (req, next) => {\r\n    const loadingService = inject(LoadingService);\r\n\r\n    if (totalRequests === 0) {\r\n        loadingService.load();\r\n    }\r\n\r\n    totalRequests++;\r\n\r\n    return next(req).pipe(\r\n        finalize(() => {\r\n            totalRequests--;\r\n            if (totalRequests === 0) {\r\n                loadingService.unload();\r\n            }\r\n        }),\r\n    );\r\n};\r\n","import { bootstrapApplication } from '@angular/platform-browser';\r\nimport { AppComponent } from './app/app.component';\r\nimport { appConfig } from './app/app.config';\r\n\r\nbootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));\r\n\r\n(window || ({} as any)).nameOf = function <T>(key: keyof T): any {\r\n    return key;\r\n};\r\n","import { provideHttpClient, withInterceptors } from '@angular/common/http';\r\nimport {\r\n    ApplicationConfig,\r\n    inject,\r\n    provideAppInitializer,\r\n    provideZoneChangeDetection,\r\n} from '@angular/core';\r\nimport { provideNativeDateAdapter } from '@angular/material/core';\r\nimport { provideAnimationsAsync } from '@angular/platform-browser/animations/async';\r\nimport { provideRouter } from '@angular/router';\r\n\r\nimport { AppInitializer } from './app-configuration/appInitializer';\r\nimport { initConfiguration } from './app-configuration/configurationFactory';\r\nimport { routes } from './app.routes';\r\nimport { loadingInterceptor } from './interceptors/loading.interceptor';\r\nimport { tokenInterceptor } from './interceptors/token.interceptor';\r\n\r\nexport const appConfig: ApplicationConfig = {\r\n    providers: [\r\n        provideZoneChangeDetection({ eventCoalescing: true }),\r\n        provideRouter(routes),\r\n        provideAnimationsAsync(),\r\n        provideAppInitializer(() => initConfiguration(inject(AppInitializer))),\r\n        provideHttpClient(withInterceptors([loadingInterceptor, tokenInterceptor])),\r\n        provideNativeDateAdapter(),\r\n    ],\r\n};\r\n","import { AppInitializer } from './appInitializer';\r\n\r\nexport function initConfiguration(initializer: AppInitializer): Promise<void> {\r\n    return initializer.init();\r\n}\r\n","import { HttpInterceptorFn, HttpStatusCode } from '@angular/common/http';\r\nimport { inject } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { catchError, throwError } from 'rxjs';\r\nimport { AuthService } from '../services/auth.service';\r\nimport { SecurityService } from '../services/security.service';\r\n\r\nexport const tokenInterceptor: HttpInterceptorFn = (req, next) => {\r\n    const securityService = inject(SecurityService);\r\n    const router = inject(Router);\r\n    const authService = inject(AuthService);\r\n    const accessToken = securityService.getToken();\r\n\r\n    if (accessToken && !req.headers.has('Authorization')) {\r\n        req = req.clone({\r\n            setHeaders: {\r\n                Authorization: `Bearer ${accessToken}`,\r\n            },\r\n        });\r\n    }\r\n\r\n    return next(req).pipe(\r\n        catchError((error) => {\r\n            if (error.status === HttpStatusCode.Unauthorized) {\r\n                authService.logOut();\r\n                router.navigate(['/auth']);\r\n            }\r\n            return throwError(() => error);\r\n        }),\r\n    );\r\n};\r\n","import { Subject } from './Subject';\nexport class BehaviorSubject extends Subject {\n    constructor(_value) {\n        super();\n        this._value = _value;\n    }\n    get value() {\n        return this.getValue();\n    }\n    _subscribe(subscriber) {\n        const subscription = super._subscribe(subscriber);\n        !subscription.closed && subscriber.next(this._value);\n        return subscription;\n    }\n    getValue() {\n        const { hasError, thrownError, _value } = this;\n        if (hasError) {\n            throw thrownError;\n        }\n        this._throwIfClosed();\n        return _value;\n    }\n    next(value) {\n        super.next((this._value = value));\n    }\n}\n","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nexport class Observable {\n    constructor(subscribe) {\n        if (subscribe) {\n            this._subscribe = subscribe;\n        }\n    }\n    lift(operator) {\n        const observable = new Observable();\n        observable.source = this;\n        observable.operator = operator;\n        return observable;\n    }\n    subscribe(observerOrNext, error, complete) {\n        const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n        errorContext(() => {\n            const { operator, source } = this;\n            subscriber.add(operator\n                ?\n                    operator.call(subscriber, source)\n                : source\n                    ?\n                        this._subscribe(subscriber)\n                    :\n                        this._trySubscribe(subscriber));\n        });\n        return subscriber;\n    }\n    _trySubscribe(sink) {\n        try {\n            return this._subscribe(sink);\n        }\n        catch (err) {\n            sink.error(err);\n        }\n    }\n    forEach(next, promiseCtor) {\n        promiseCtor = getPromiseCtor(promiseCtor);\n        return new promiseCtor((resolve, reject) => {\n            const subscriber = new SafeSubscriber({\n                next: (value) => {\n                    try {\n                        next(value);\n                    }\n                    catch (err) {\n                        reject(err);\n                        subscriber.unsubscribe();\n                    }\n                },\n                error: reject,\n                complete: resolve,\n            });\n            this.subscribe(subscriber);\n        });\n    }\n    _subscribe(subscriber) {\n        var _a;\n        return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n    }\n    [Symbol_observable]() {\n        return this;\n    }\n    pipe(...operations) {\n        return pipeFromArray(operations)(this);\n    }\n    toPromise(promiseCtor) {\n        promiseCtor = getPromiseCtor(promiseCtor);\n        return new promiseCtor((resolve, reject) => {\n            let value;\n            this.subscribe((x) => (value = x), (err) => reject(err), () => resolve(value));\n        });\n    }\n}\nObservable.create = (subscribe) => {\n    return new Observable(subscribe);\n};\nfunction getPromiseCtor(promiseCtor) {\n    var _a;\n    return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n    return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n    return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n","import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {\n    _super(this);\n    this.name = 'ObjectUnsubscribedError';\n    this.message = 'object unsubscribed';\n});\n","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport class Subject extends Observable {\n    constructor() {\n        super();\n        this.closed = false;\n        this.currentObservers = null;\n        this.observers = [];\n        this.isStopped = false;\n        this.hasError = false;\n        this.thrownError = null;\n    }\n    lift(operator) {\n        const subject = new AnonymousSubject(this, this);\n        subject.operator = operator;\n        return subject;\n    }\n    _throwIfClosed() {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n    }\n    next(value) {\n        errorContext(() => {\n            this._throwIfClosed();\n            if (!this.isStopped) {\n                if (!this.currentObservers) {\n                    this.currentObservers = Array.from(this.observers);\n                }\n                for (const observer of this.currentObservers) {\n                    observer.next(value);\n                }\n            }\n        });\n    }\n    error(err) {\n        errorContext(() => {\n            this._throwIfClosed();\n            if (!this.isStopped) {\n                this.hasError = this.isStopped = true;\n                this.thrownError = err;\n                const { observers } = this;\n                while (observers.length) {\n                    observers.shift().error(err);\n                }\n            }\n        });\n    }\n    complete() {\n        errorContext(() => {\n            this._throwIfClosed();\n            if (!this.isStopped) {\n                this.isStopped = true;\n                const { observers } = this;\n                while (observers.length) {\n                    observers.shift().complete();\n                }\n            }\n        });\n    }\n    unsubscribe() {\n        this.isStopped = this.closed = true;\n        this.observers = this.currentObservers = null;\n    }\n    get observed() {\n        var _a;\n        return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n    }\n    _trySubscribe(subscriber) {\n        this._throwIfClosed();\n        return super._trySubscribe(subscriber);\n    }\n    _subscribe(subscriber) {\n        this._throwIfClosed();\n        this._checkFinalizedStatuses(subscriber);\n        return this._innerSubscribe(subscriber);\n    }\n    _innerSubscribe(subscriber) {\n        const { hasError, isStopped, observers } = this;\n        if (hasError || isStopped) {\n            return EMPTY_SUBSCRIPTION;\n        }\n        this.currentObservers = null;\n        observers.push(subscriber);\n        return new Subscription(() => {\n            this.currentObservers = null;\n            arrRemove(observers, subscriber);\n        });\n    }\n    _checkFinalizedStatuses(subscriber) {\n        const { hasError, thrownError, isStopped } = this;\n        if (hasError) {\n            subscriber.error(thrownError);\n        }\n        else if (isStopped) {\n            subscriber.complete();\n        }\n    }\n    asObservable() {\n        const observable = new Observable();\n        observable.source = this;\n        return observable;\n    }\n}\nSubject.create = (destination, source) => {\n    return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n    constructor(destination, source) {\n        super();\n        this.destination = destination;\n        this.source = source;\n    }\n    next(value) {\n        var _a, _b;\n        (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n    }\n    error(err) {\n        var _a, _b;\n        (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n    }\n    complete() {\n        var _a, _b;\n        (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n    }\n    _subscribe(subscriber) {\n        var _a, _b;\n        return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n    }\n}\n","export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();\nexport function errorNotification(error) {\n    return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n    return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n    return {\n        kind,\n        value,\n        error,\n    };\n}\n","import { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nexport class Subscriber extends Subscription {\n    constructor(destination) {\n        super();\n        this.isStopped = false;\n        if (destination) {\n            this.destination = destination;\n            if (isSubscription(destination)) {\n                destination.add(this);\n            }\n        }\n        else {\n            this.destination = EMPTY_OBSERVER;\n        }\n    }\n    static create(next, error, complete) {\n        return new SafeSubscriber(next, error, complete);\n    }\n    next(value) {\n        if (this.isStopped) {\n            handleStoppedNotification(nextNotification(value), this);\n        }\n        else {\n            this._next(value);\n        }\n    }\n    error(err) {\n        if (this.isStopped) {\n            handleStoppedNotification(errorNotification(err), this);\n        }\n        else {\n            this.isStopped = true;\n            this._error(err);\n        }\n    }\n    complete() {\n        if (this.isStopped) {\n            handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n        }\n        else {\n            this.isStopped = true;\n            this._complete();\n        }\n    }\n    unsubscribe() {\n        if (!this.closed) {\n            this.isStopped = true;\n            super.unsubscribe();\n            this.destination = null;\n        }\n    }\n    _next(value) {\n        this.destination.next(value);\n    }\n    _error(err) {\n        try {\n            this.destination.error(err);\n        }\n        finally {\n            this.unsubscribe();\n        }\n    }\n    _complete() {\n        try {\n            this.destination.complete();\n        }\n        finally {\n            this.unsubscribe();\n        }\n    }\n}\nconst _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n    return _bind.call(fn, thisArg);\n}\nclass ConsumerObserver {\n    constructor(partialObserver) {\n        this.partialObserver = partialObserver;\n    }\n    next(value) {\n        const { partialObserver } = this;\n        if (partialObserver.next) {\n            try {\n                partialObserver.next(value);\n            }\n            catch (error) {\n                handleUnhandledError(error);\n            }\n        }\n    }\n    error(err) {\n        const { partialObserver } = this;\n        if (partialObserver.error) {\n            try {\n                partialObserver.error(err);\n            }\n            catch (error) {\n                handleUnhandledError(error);\n            }\n        }\n        else {\n            handleUnhandledError(err);\n        }\n    }\n    complete() {\n        const { partialObserver } = this;\n        if (partialObserver.complete) {\n            try {\n                partialObserver.complete();\n            }\n            catch (error) {\n                handleUnhandledError(error);\n            }\n        }\n    }\n}\nexport class SafeSubscriber extends Subscriber {\n    constructor(observerOrNext, error, complete) {\n        super();\n        let partialObserver;\n        if (isFunction(observerOrNext) || !observerOrNext) {\n            partialObserver = {\n                next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n                error: error !== null && error !== void 0 ? error : undefined,\n                complete: complete !== null && complete !== void 0 ? complete : undefined,\n            };\n        }\n        else {\n            let context;\n            if (this && config.useDeprecatedNextContext) {\n                context = Object.create(observerOrNext);\n                context.unsubscribe = () => this.unsubscribe();\n                partialObserver = {\n                    next: observerOrNext.next && bind(observerOrNext.next, context),\n                    error: observerOrNext.error && bind(observerOrNext.error, context),\n                    complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n                };\n            }\n            else {\n                partialObserver = observerOrNext;\n            }\n        }\n        this.destination = new ConsumerObserver(partialObserver);\n    }\n}\nfunction handleUnhandledError(error) {\n    if (config.useDeprecatedSynchronousErrorHandling) {\n        captureError(error);\n    }\n    else {\n        reportUnhandledError(error);\n    }\n}\nfunction defaultErrorHandler(err) {\n    throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n    const { onStoppedNotification } = config;\n    onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\nexport const EMPTY_OBSERVER = {\n    closed: true,\n    next: noop,\n    error: defaultErrorHandler,\n    complete: noop,\n};\n","import { createErrorClass } from './createErrorClass';\nexport const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) {\n    _super(this);\n    this.message = errors\n        ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n  ')}`\n        : '';\n    this.name = 'UnsubscriptionError';\n    this.errors = errors;\n});\n","import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nexport class Subscription {\n    constructor(initialTeardown) {\n        this.initialTeardown = initialTeardown;\n        this.closed = false;\n        this._parentage = null;\n        this._finalizers = null;\n    }\n    unsubscribe() {\n        let errors;\n        if (!this.closed) {\n            this.closed = true;\n            const { _parentage } = this;\n            if (_parentage) {\n                this._parentage = null;\n                if (Array.isArray(_parentage)) {\n                    for (const parent of _parentage) {\n                        parent.remove(this);\n                    }\n                }\n                else {\n                    _parentage.remove(this);\n                }\n            }\n            const { initialTeardown: initialFinalizer } = this;\n            if (isFunction(initialFinalizer)) {\n                try {\n                    initialFinalizer();\n                }\n                catch (e) {\n                    errors = e instanceof UnsubscriptionError ? e.errors : [e];\n                }\n            }\n            const { _finalizers } = this;\n            if (_finalizers) {\n                this._finalizers = null;\n                for (const finalizer of _finalizers) {\n                    try {\n                        execFinalizer(finalizer);\n                    }\n                    catch (err) {\n                        errors = errors !== null && errors !== void 0 ? errors : [];\n                        if (err instanceof UnsubscriptionError) {\n                            errors = [...errors, ...err.errors];\n                        }\n                        else {\n                            errors.push(err);\n                        }\n                    }\n                }\n            }\n            if (errors) {\n                throw new UnsubscriptionError(errors);\n            }\n        }\n    }\n    add(teardown) {\n        var _a;\n        if (teardown && teardown !== this) {\n            if (this.closed) {\n                execFinalizer(teardown);\n            }\n            else {\n                if (teardown instanceof Subscription) {\n                    if (teardown.closed || teardown._hasParent(this)) {\n                        return;\n                    }\n                    teardown._addParent(this);\n                }\n                (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n            }\n        }\n    }\n    _hasParent(parent) {\n        const { _parentage } = this;\n        return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n    }\n    _addParent(parent) {\n        const { _parentage } = this;\n        this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n    }\n    _removeParent(parent) {\n        const { _parentage } = this;\n        if (_parentage === parent) {\n            this._parentage = null;\n        }\n        else if (Array.isArray(_parentage)) {\n            arrRemove(_parentage, parent);\n        }\n    }\n    remove(teardown) {\n        const { _finalizers } = this;\n        _finalizers && arrRemove(_finalizers, teardown);\n        if (teardown instanceof Subscription) {\n            teardown._removeParent(this);\n        }\n    }\n}\nSubscription.EMPTY = (() => {\n    const empty = new Subscription();\n    empty.closed = true;\n    return empty;\n})();\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n    return (value instanceof Subscription ||\n        (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n    if (isFunction(finalizer)) {\n        finalizer();\n    }\n    else {\n        finalizer.unsubscribe();\n    }\n}\n","export const config = {\n    onUnhandledError: null,\n    onStoppedNotification: null,\n    Promise: undefined,\n    useDeprecatedSynchronousErrorHandling: false,\n    useDeprecatedNextContext: false,\n};\n","import { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n    return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nexport class OperatorSubscriber extends Subscriber {\n    constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n        super(destination);\n        this.onFinalize = onFinalize;\n        this.shouldUnsubscribe = shouldUnsubscribe;\n        this._next = onNext\n            ? function (value) {\n                try {\n                    onNext(value);\n                }\n                catch (err) {\n                    destination.error(err);\n                }\n            }\n            : super._next;\n        this._error = onError\n            ? function (err) {\n                try {\n                    onError(err);\n                }\n                catch (err) {\n                    destination.error(err);\n                }\n                finally {\n                    this.unsubscribe();\n                }\n            }\n            : super._error;\n        this._complete = onComplete\n            ? function () {\n                try {\n                    onComplete();\n                }\n                catch (err) {\n                    destination.error(err);\n                }\n                finally {\n                    this.unsubscribe();\n                }\n            }\n            : super._complete;\n    }\n    unsubscribe() {\n        var _a;\n        if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n            const { closed } = this;\n            super.unsubscribe();\n            !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n        }\n    }\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n    return operate((source, subscriber) => {\n        let index = 0;\n        source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n            subscriber.next(project.call(thisArg, value, index++));\n        }));\n    });\n}\n","export const timeoutProvider = {\n    setTimeout(handler, timeout, ...args) {\n        const { delegate } = timeoutProvider;\n        if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n            return delegate.setTimeout(handler, timeout, ...args);\n        }\n        return setTimeout(handler, timeout, ...args);\n    },\n    clearTimeout(handle) {\n        const { delegate } = timeoutProvider;\n        return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n    },\n    delegate: undefined,\n};\n","export const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n","export function arrRemove(arr, item) {\n    if (arr) {\n        const index = arr.indexOf(item);\n        0 <= index && arr.splice(index, 1);\n    }\n}\n","export function createErrorClass(createImpl) {\n    const _super = (instance) => {\n        Error.call(instance);\n        instance.stack = new Error().stack;\n    };\n    const ctorFunc = createImpl(_super);\n    ctorFunc.prototype = Object.create(Error.prototype);\n    ctorFunc.prototype.constructor = ctorFunc;\n    return ctorFunc;\n}\n","import { config } from '../config';\nlet context = null;\nexport function errorContext(cb) {\n    if (config.useDeprecatedSynchronousErrorHandling) {\n        const isRoot = !context;\n        if (isRoot) {\n            context = { errorThrown: false, error: null };\n        }\n        cb();\n        if (isRoot) {\n            const { errorThrown, error } = context;\n            context = null;\n            if (errorThrown) {\n                throw error;\n            }\n        }\n    }\n    else {\n        cb();\n    }\n}\nexport function captureError(err) {\n    if (config.useDeprecatedSynchronousErrorHandling && context) {\n        context.errorThrown = true;\n        context.error = err;\n    }\n}\n","export function identity(x) {\n    return x;\n}\n","export function isFunction(value) {\n    return typeof value === 'function';\n}\n","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n    return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n    return (source) => {\n        if (hasLift(source)) {\n            return source.lift(function (liftedSource) {\n                try {\n                    return init(liftedSource, this);\n                }\n                catch (err) {\n                    this.error(err);\n                }\n            });\n        }\n        throw new TypeError('Unable to lift unknown Observable type');\n    };\n}\n","export function noop() { }\n","import { identity } from './identity';\nexport function pipe(...fns) {\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((prev, fn) => fn(prev), input);\n    };\n}\n","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n    timeoutProvider.setTimeout(() => {\n        const { onUnhandledError } = config;\n        if (onUnhandledError) {\n            onUnhandledError(err);\n        }\n        else {\n            throw err;\n        }\n    });\n}\n","/**\n * @license Angular v19.0.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, Injectable, ANIMATION_MODULE_TYPE, ViewEncapsulation, ɵRuntimeError, Inject } from '@angular/core';\n\n/**\n * @description Constants for the categories of parameters that can be defined for animations.\n *\n * A corresponding function defines a set of parameters for each category, and\n * collects them into a corresponding `AnimationMetadata` object.\n *\n * @publicApi\n */\nvar AnimationMetadataType;\n(function (AnimationMetadataType) {\n    /**\n     * Associates a named animation state with a set of CSS styles.\n     * See [`state()`](api/animations/state)\n     */\n    AnimationMetadataType[AnimationMetadataType[\"State\"] = 0] = \"State\";\n    /**\n     * Data for a transition from one animation state to another.\n     * See `transition()`\n     */\n    AnimationMetadataType[AnimationMetadataType[\"Transition\"] = 1] = \"Transition\";\n    /**\n     * Contains a set of animation steps.\n     * See `sequence()`\n     */\n    AnimationMetadataType[AnimationMetadataType[\"Sequence\"] = 2] = \"Sequence\";\n    /**\n     * Contains a set of animation steps.\n     * See `{@link animations/group group()}`\n     */\n    AnimationMetadataType[AnimationMetadataType[\"Group\"] = 3] = \"Group\";\n    /**\n     * Contains an animation step.\n     * See `animate()`\n     */\n    AnimationMetadataType[AnimationMetadataType[\"Animate\"] = 4] = \"Animate\";\n    /**\n     * Contains a set of animation steps.\n     * See `keyframes()`\n     */\n    AnimationMetadataType[AnimationMetadataType[\"Keyframes\"] = 5] = \"Keyframes\";\n    /**\n     * Contains a set of CSS property-value pairs into a named style.\n     * See `style()`\n     */\n    AnimationMetadataType[AnimationMetadataType[\"Style\"] = 6] = \"Style\";\n    /**\n     * Associates an animation with an entry trigger that can be attached to an element.\n     * See `trigger()`\n     */\n    AnimationMetadataType[AnimationMetadataType[\"Trigger\"] = 7] = \"Trigger\";\n    /**\n     * Contains a re-usable animation.\n     * See `animation()`\n     */\n    AnimationMetadataType[AnimationMetadataType[\"Reference\"] = 8] = \"Reference\";\n    /**\n     * Contains data to use in executing child animations returned by a query.\n     * See `animateChild()`\n     */\n    AnimationMetadataType[AnimationMetadataType[\"AnimateChild\"] = 9] = \"AnimateChild\";\n    /**\n     * Contains animation parameters for a re-usable animation.\n     * See `useAnimation()`\n     */\n    AnimationMetadataType[AnimationMetadataType[\"AnimateRef\"] = 10] = \"AnimateRef\";\n    /**\n     * Contains child-animation query data.\n     * See `query()`\n     */\n    AnimationMetadataType[AnimationMetadataType[\"Query\"] = 11] = \"Query\";\n    /**\n     * Contains data for staggering an animation sequence.\n     * See `stagger()`\n     */\n    AnimationMetadataType[AnimationMetadataType[\"Stagger\"] = 12] = \"Stagger\";\n})(AnimationMetadataType || (AnimationMetadataType = {}));\n/**\n * Specifies automatic styling.\n *\n * @publicApi\n */\nconst AUTO_STYLE = '*';\n/**\n * Creates a named animation trigger, containing a  list of [`state()`](api/animations/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\n * [`state()`](api/animations/state) 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 * ```ts\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 * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\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 * ```ts\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 * ```angular-ts\n * @Component({\n *   selector: 'my-component',\n *   template: `\n *     <div [@.disabled]=\"isDisabled\">\n *       <div [@childAnimation]=\"exp\"></div>\n *     </div>\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 * ```ts\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: AnimationMetadataType.Trigger, name, 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 * ```ts\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 * ```ts\n * animate(500, keyframes(\n *  [\n *   style({ background: \"blue\" }),\n *   style({ background: \"red\" })\n *  ])\n * ```\n *\n * @publicApi\n */\nfunction animate(timings, styles = null) {\n    return { type: AnimationMetadataType.Animate, styles, 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 * ```ts\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 = null) {\n    return { type: AnimationMetadataType.Group, steps, 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 * ```ts\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 = null) {\n    return { type: AnimationMetadataType.Sequence, steps, options };\n}\n/**\n * Declares a key/value object containing CSS properties/styles that\n * can then be used for an animation [`state`](api/animations/state), within an animation\n *`sequence`, 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 * ```ts\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 an element to animate from\n * a height of 0 up to its full height:\n *\n * ```ts\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * @publicApi\n **/\nfunction style(tokens) {\n    return { type: AnimationMetadataType.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: AnimationMetadataType.State, name, styles, 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 * ```ts\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 * ```ts\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: AnimationMetadataType.Keyframes, steps };\n}\n/**\n * Declares an animation transition which is played when a certain specified condition is met.\n *\n * @param stateChangeExpr A string with a specific format or a function that specifies when the\n * animation transition should occur (see [State Change Expression](#state-change-expression)).\n *\n * @param steps One or more animation objects that represent the animation's instructions.\n *\n * @param options An options object that can be used to specify a delay for the animation or provide\n * custom parameters for it.\n *\n * @returns An object that encapsulates the transition data.\n *\n * @usageNotes\n *\n * ### State Change Expression\n *\n * The State Change Expression instructs Angular when to run the transition's animations, it can\n *either be\n *  - a string with a specific syntax\n *  - or a function that compares the previous and current state (value of the expression bound to\n *    the element's trigger) and returns `true` if the transition should occur or `false` otherwise\n *\n * The string format can be:\n *  - `fromState => toState`, which indicates that the transition's animations should occur then the\n *    expression bound to the trigger's element goes from `fromState` to `toState`\n *\n *    _Example:_\n *      ```ts\n *        transition('open => closed', animate('.5s ease-out', style({ height: 0 }) ))\n *      ```\n *\n *  - `fromState <=> toState`, which indicates that the transition's animations should occur then\n *    the expression bound to the trigger's element goes from `fromState` to `toState` or vice versa\n *\n *    _Example:_\n *      ```ts\n *        transition('enabled <=> disabled', animate('1s cubic-bezier(0.8,0.3,0,1)'))\n *      ```\n *\n *  - `:enter`/`:leave`, which indicates that the transition's animations should occur when the\n *    element enters or exists the DOM\n *\n *    _Example:_\n *      ```ts\n *        transition(':enter', [\n *          style({ opacity: 0 }),\n *          animate('500ms', style({ opacity: 1 }))\n *        ])\n *      ```\n *\n *  - `:increment`/`:decrement`, which indicates that the transition's animations should occur when\n *    the numerical expression bound to the trigger's element has increased in value or decreased\n *\n *    _Example:_\n *      ```ts\n *        transition(':increment', query('@counter', animateChild()))\n *      ```\n *\n *  - a sequence of any of the above divided by commas, which indicates that transition's animations\n *    should occur whenever one of the state change expressions matches\n *\n *    _Example:_\n *      ```ts\n *        transition(':increment, * => enabled, :enter', animate('1s ease', keyframes([\n *          style({ transform: 'scale(1)', offset: 0}),\n *          style({ transform: 'scale(1.1)', offset: 0.7}),\n *          style({ transform: 'scale(1)', offset: 1})\n *        ]))),\n *      ```\n *\n * Also note that in such context:\n *  - `void` can be used to indicate the absence of the element\n *  - asterisks can be used as wildcards that match any state\n *  - (as a consequence of the above, `void => *` is equivalent to `:enter` and `* => void` is\n *    equivalent to `:leave`)\n *  - `true` and `false` also match expression values of `1` and `0` respectively (but do not match\n *    _truthy_ and _falsy_ values)\n *\n * <div class=\"docs-alert docs-alert-helpful\">\n *\n *  Be careful about entering end leaving elements as their transitions present a common\n *  pitfall for developers.\n *\n *  Note that when an element with a trigger enters the DOM its `:enter` transition always\n *  gets executed, but its `:leave` transition will not be executed if the element is removed\n *  alongside its parent (as it will be removed \"without warning\" before its transition has\n *  a chance to be executed, the only way that such transition can occur is if the element\n *  is exiting the DOM on its own).\n *\n *\n * </div>\n *\n * ### Animating to a 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, in such case Angular automatically adds or removes\n * CSS styles to ensure that the element is in the correct final state.\n *\n *\n * ### Usage Examples\n *\n *  - Transition animations applied based on\n *    the trigger's expression value\n *\n *   ```html\n *   <div [@myAnimationTrigger]=\"myStatusExp\">\n *    ...\n *   </div>\n *   ```\n *\n *   ```ts\n *   trigger(\"myAnimationTrigger\", [\n *     ..., // states\n *     transition(\"on => off, open => closed\", animate(500)),\n *     transition(\"* <=> error\", query('.indicator', animateChild()))\n *   ])\n *   ```\n *\n *  - Transition animations applied based on custom logic dependent\n *    on the trigger's expression value and provided parameters\n *\n *    ```html\n *    <div [@myAnimationTrigger]=\"{\n *     value: stepName,\n *     params: { target: currentTarget }\n *    }\">\n *     ...\n *    </div>\n *    ```\n *\n *    ```ts\n *    trigger(\"myAnimationTrigger\", [\n *      ..., // states\n *      transition(\n *        (fromState, toState, _element, params) =>\n *          ['firststep', 'laststep'].includes(fromState.toLowerCase())\n *          && toState === params?.['target'],\n *        animate('1s')\n *      )\n *    ])\n *    ```\n *\n * @publicApi\n **/\nfunction transition(stateChangeExpr, steps, options = null) {\n    return { type: AnimationMetadataType.Transition, expr: stateChangeExpr, animation: steps, 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 * ```ts\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 = null) {\n    return { type: AnimationMetadataType.Reference, animation: steps, 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 = null) {\n    return { type: AnimationMetadataType.AnimateChild, 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 = null) {\n    return { type: AnimationMetadataType.AnimateRef, animation, 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 (not\n *     all elements can be queried via these tokens, see\n *     [Entering and Leaving Elements](#entering-and-leaving-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 *\n * ### Multiple Tokens\n *\n * Tokens can be merged into a combined query selector string. For example:\n *\n * ```ts\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 * ### Entering and Leaving Elements\n *\n * Not all elements can be queried via the `:enter` and `:leave` tokens, the only ones\n * that can are those that Angular assumes can enter/leave based on their own logic\n * (if their insertion/removal is simply a consequence of that of their parent they\n * should be queried via a different token in their parent's `:enter`/`:leave` transitions).\n *\n * The only elements Angular assumes can enter/leave based on their own logic (thus the only\n * ones that can be queried via the `:enter` and `:leave` tokens) are:\n *  - Those inserted dynamically (via `ViewContainerRef`)\n *  - Those that have a structural directive (which, under the hood, are a subset of the above ones)\n *\n * <div class=\"docs-alert docs-alert-helpful\">\n *\n *  Note that elements will be successfully queried via `:enter`/`:leave` even if their\n *  insertion/removal is not done manually via `ViewContainerRef`or caused by their structural\n *  directive (e.g. they enter/exit alongside their parent).\n *\n * </div>\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n *  There is an exception to what previously mentioned, besides elements entering/leaving based on\n *  their own logic, elements with an animation trigger can always be queried via `:leave` when\n * their parent is also leaving.\n *\n * </div>\n *\n * ### Usage Example\n *\n * The following example queries for inner elements and animates them\n * individually using `animate()`.\n *\n * ```angular-ts\n * @Component({\n *   selector: 'inner',\n *   template: `\n *     <div [@queryAnimation]=\"exp\">\n *       <h1>Title</h1>\n *       <div class=\"content\">\n *         Blah blah blah\n *       </div>\n *     </div>\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 = null) {\n    return { type: AnimationMetadataType.Query, selector, animation, 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 * <!-- list.component.html -->\n * <button (click)=\"toggle()\">Show / Hide Items</button>\n * <hr />\n * <div [@listAnimation]=\"items.length\">\n *   <div *ngFor=\"let item of items\">\n *     {{ item }}\n *   </div>\n * </div>\n * ```\n *\n * Here is the component code:\n *\n * ```ts\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 * ```ts\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: AnimationMetadataType.Stagger, timings, animation };\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 <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code> method\n * to create a programmatic animation. 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 */\nclass AnimationBuilder {\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: AnimationBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: AnimationBuilder, providedIn: 'root', useFactory: () => inject(BrowserAnimationBuilder) });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: AnimationBuilder, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root', useFactory: () => inject(BrowserAnimationBuilder) }]\n        }] });\n/**\n * A factory object returned from the\n * <code>[AnimationBuilder.build](api/animations/AnimationBuilder#build)()</code>\n * method.\n *\n * @publicApi\n */\nclass AnimationFactory {\n}\nclass BrowserAnimationBuilder extends AnimationBuilder {\n    animationModuleType = inject(ANIMATION_MODULE_TYPE, { optional: true });\n    _nextAnimationId = 0;\n    _renderer;\n    constructor(rootRenderer, doc) {\n        super();\n        const typeData = {\n            id: '0',\n            encapsulation: ViewEncapsulation.None,\n            styles: [],\n            data: { animation: [] },\n        };\n        this._renderer = rootRenderer.createRenderer(doc.body, typeData);\n        if (this.animationModuleType === null && !isAnimationRenderer(this._renderer)) {\n            // We only support AnimationRenderer & DynamicDelegationRenderer for this AnimationBuilder\n            throw new ɵRuntimeError(3600 /* RuntimeErrorCode.BROWSER_ANIMATION_BUILDER_INJECTED_WITHOUT_ANIMATIONS */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                'Angular detected that the `AnimationBuilder` was injected, but animation support was not enabled. ' +\n                    'Please make sure that you enable animations in your application by calling `provideAnimations()` or `provideAnimationsAsync()` function.');\n        }\n    }\n    build(animation) {\n        const id = this._nextAnimationId;\n        this._nextAnimationId++;\n        const entry = Array.isArray(animation) ? sequence(animation) : animation;\n        issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n        return new BrowserAnimationFactory(id, this._renderer);\n    }\n    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserAnimationBuilder, deps: [{ token: i0.RendererFactory2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });\n    static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserAnimationBuilder, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"19.0.5\", ngImport: i0, type: BrowserAnimationBuilder, decorators: [{\n            type: Injectable,\n            args: [{ providedIn: 'root' }]\n        }], ctorParameters: () => [{ type: i0.RendererFactory2 }, { type: Document, decorators: [{\n                    type: Inject,\n                    args: [DOCUMENT]\n                }] }] });\nclass BrowserAnimationFactory extends AnimationFactory {\n    _id;\n    _renderer;\n    constructor(_id, _renderer) {\n        super();\n        this._id = _id;\n        this._renderer = _renderer;\n    }\n    create(element, options) {\n        return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n    }\n}\nclass RendererAnimationPlayer {\n    id;\n    element;\n    _renderer;\n    parentPlayer = null;\n    _started = false;\n    constructor(id, element, options, _renderer) {\n        this.id = id;\n        this.element = element;\n        this._renderer = _renderer;\n        this._command('create', options);\n    }\n    _listen(eventName, callback) {\n        return this._renderer.listen(this.element, `@@${this.id}:${eventName}`, callback);\n    }\n    _command(command, ...args) {\n        issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n    }\n    onDone(fn) {\n        this._listen('done', fn);\n    }\n    onStart(fn) {\n        this._listen('start', fn);\n    }\n    onDestroy(fn) {\n        this._listen('destroy', fn);\n    }\n    init() {\n        this._command('init');\n    }\n    hasStarted() {\n        return this._started;\n    }\n    play() {\n        this._command('play');\n        this._started = true;\n    }\n    pause() {\n        this._command('pause');\n    }\n    restart() {\n        this._command('restart');\n    }\n    finish() {\n        this._command('finish');\n    }\n    destroy() {\n        this._command('destroy');\n    }\n    reset() {\n        this._command('reset');\n        this._started = false;\n    }\n    setPosition(p) {\n        this._command('setPosition', p);\n    }\n    getPosition() {\n        return unwrapAnimationRenderer(this._renderer)?.engine?.players[this.id]?.getPosition() ?? 0;\n    }\n    totalTime = 0;\n}\nfunction issueAnimationCommand(renderer, element, id, command, args) {\n    renderer.setProperty(element, `@@${id}:${command}`, args);\n}\n/**\n * The following 2 methods cannot reference their correct types (AnimationRenderer &\n * DynamicDelegationRenderer) since this would introduce a import cycle.\n */\nfunction unwrapAnimationRenderer(renderer) {\n    const type = renderer.ɵtype;\n    if (type === 0 /* AnimationRendererType.Regular */) {\n        return renderer;\n    }\n    else if (type === 1 /* AnimationRendererType.Delegated */) {\n        return renderer.animationRenderer;\n    }\n    return null;\n}\nfunction isAnimationRenderer(renderer) {\n    const type = renderer.ɵtype;\n    return type === 0 /* AnimationRendererType.Regular */ || type === 1 /* AnimationRendererType.Delegated */;\n}\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 {@link animate}\n * @see {@link AnimationPlayer}\n *\n * @publicApi\n */\nclass NoopAnimationPlayer {\n    _onDoneFns = [];\n    _onStartFns = [];\n    _onDestroyFns = [];\n    _originalOnDoneFns = [];\n    _originalOnStartFns = [];\n    _started = false;\n    _destroyed = false;\n    _finished = false;\n    _position = 0;\n    parentPlayer = null;\n    totalTime;\n    constructor(duration = 0, delay = 0) {\n        this.totalTime = duration + delay;\n    }\n    _onFinish() {\n        if (!this._finished) {\n            this._finished = true;\n            this._onDoneFns.forEach((fn) => fn());\n            this._onDoneFns = [];\n        }\n    }\n    onStart(fn) {\n        this._originalOnStartFns.push(fn);\n        this._onStartFns.push(fn);\n    }\n    onDone(fn) {\n        this._originalOnDoneFns.push(fn);\n        this._onDoneFns.push(fn);\n    }\n    onDestroy(fn) {\n        this._onDestroyFns.push(fn);\n    }\n    hasStarted() {\n        return this._started;\n    }\n    init() { }\n    play() {\n        if (!this.hasStarted()) {\n            this._onStart();\n            this.triggerMicrotask();\n        }\n        this._started = true;\n    }\n    /** @internal */\n    triggerMicrotask() {\n        queueMicrotask(() => this._onFinish());\n    }\n    _onStart() {\n        this._onStartFns.forEach((fn) => fn());\n        this._onStartFns = [];\n    }\n    pause() { }\n    restart() { }\n    finish() {\n        this._onFinish();\n    }\n    destroy() {\n        if (!this._destroyed) {\n            this._destroyed = true;\n            if (!this.hasStarted()) {\n                this._onStart();\n            }\n            this.finish();\n            this._onDestroyFns.forEach((fn) => fn());\n            this._onDestroyFns = [];\n        }\n    }\n    reset() {\n        this._started = false;\n        this._finished = false;\n        this._onStartFns = this._originalOnStartFns;\n        this._onDoneFns = this._originalOnDoneFns;\n    }\n    setPosition(position) {\n        this._position = this.totalTime ? position * this.totalTime : 1;\n    }\n    getPosition() {\n        return this.totalTime ? this._position / this.totalTime : 1;\n    }\n    /** @internal */\n    triggerCallback(phaseName) {\n        const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n        methods.forEach((fn) => fn());\n        methods.length = 0;\n    }\n}\n\n/**\n * A programmatic controller for a group of reusable animations.\n * Used internally to control animations.\n *\n * @see {@link AnimationPlayer}\n * @see {@link animations/group group}\n *\n */\nclass AnimationGroupPlayer {\n    _onDoneFns = [];\n    _onStartFns = [];\n    _finished = false;\n    _started = false;\n    _destroyed = false;\n    _onDestroyFns = [];\n    parentPlayer = null;\n    totalTime = 0;\n    players;\n    constructor(_players) {\n        this.players = _players;\n        let doneCount = 0;\n        let destroyCount = 0;\n        let startCount = 0;\n        const total = this.players.length;\n        if (total == 0) {\n            queueMicrotask(() => this._onFinish());\n        }\n        else {\n            this.players.forEach((player) => {\n                player.onDone(() => {\n                    if (++doneCount == total) {\n                        this._onFinish();\n                    }\n                });\n                player.onDestroy(() => {\n                    if (++destroyCount == total) {\n                        this._onDestroy();\n                    }\n                });\n                player.onStart(() => {\n                    if (++startCount == total) {\n                        this._onStart();\n                    }\n                });\n            });\n        }\n        this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0);\n    }\n    _onFinish() {\n        if (!this._finished) {\n            this._finished = true;\n            this._onDoneFns.forEach((fn) => fn());\n            this._onDoneFns = [];\n        }\n    }\n    init() {\n        this.players.forEach((player) => player.init());\n    }\n    onStart(fn) {\n        this._onStartFns.push(fn);\n    }\n    _onStart() {\n        if (!this.hasStarted()) {\n            this._started = true;\n            this._onStartFns.forEach((fn) => fn());\n            this._onStartFns = [];\n        }\n    }\n    onDone(fn) {\n        this._onDoneFns.push(fn);\n    }\n    onDestroy(fn) {\n        this._onDestroyFns.push(fn);\n    }\n    hasStarted() {\n        return this._started;\n    }\n    play() {\n        if (!this.parentPlayer) {\n            this.init();\n        }\n        this._onStart();\n        this.players.forEach((player) => player.play());\n    }\n    pause() {\n        this.players.forEach((player) => player.pause());\n    }\n    restart() {\n        this.players.forEach((player) => player.restart());\n    }\n    finish() {\n        this._onFinish();\n        this.players.forEach((player) => player.finish());\n    }\n    destroy() {\n        this._onDestroy();\n    }\n    _onDestroy() {\n        if (!this._destroyed) {\n            this._destroyed = true;\n            this._onFinish();\n            this.players.forEach((player) => player.destroy());\n            this._onDestroyFns.forEach((fn) => fn());\n            this._onDestroyFns = [];\n        }\n    }\n    reset() {\n        this.players.forEach((player) => player.reset());\n        this._destroyed = false;\n        this._finished = false;\n        this._started = false;\n    }\n    setPosition(p) {\n        const timeAtPosition = p * this.totalTime;\n        this.players.forEach((player) => {\n            const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n            player.setPosition(position);\n        });\n    }\n    getPosition() {\n        const longestPlayer = this.players.reduce((longestSoFar, player) => {\n            const newPlayerIsLongest = longestSoFar === null || player.totalTime > longestSoFar.totalTime;\n            return newPlayerIsLongest ? player : longestSoFar;\n        }, null);\n        return longestPlayer != null ? longestPlayer.getPosition() : 0;\n    }\n    beforeDestroy() {\n        this.players.forEach((player) => {\n            if (player.beforeDestroy) {\n                player.beforeDestroy();\n            }\n        });\n    }\n    /** @internal */\n    triggerCallback(phaseName) {\n        const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n        methods.forEach((fn) => fn());\n        methods.length = 0;\n    }\n}\n\nconst ɵPRE_STYLE = '!';\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation package.\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AUTO_STYLE, AnimationBuilder, AnimationFactory, AnimationMetadataType, NoopAnimationPlayer, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, AnimationGroupPlayer as ɵAnimationGroupPlayer, BrowserAnimationBuilder as ɵBrowserAnimationBuilder, ɵPRE_STYLE };\n","/**\n * @license Angular v19.0.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * The default equality function used for `signal` and `computed`, which uses referential equality.\n */\nfunction defaultEquals(a, b) {\n    return Object.is(a, b);\n}\n\n/**\n * The currently active consumer `ReactiveNode`, if running code in a reactive context.\n *\n * Change this via `setActiveConsumer`.\n */\nlet activeConsumer = null;\nlet inNotificationPhase = false;\n/**\n * Global epoch counter. Incremented whenever a source signal is set.\n */\nlet epoch = 1;\n/**\n * Symbol used to tell `Signal`s apart from other functions.\n *\n * This can be used to auto-unwrap signals in various cases, or to auto-wrap non-signal values.\n */\nconst SIGNAL = /* @__PURE__ */ Symbol('SIGNAL');\nfunction setActiveConsumer(consumer) {\n    const prev = activeConsumer;\n    activeConsumer = consumer;\n    return prev;\n}\nfunction getActiveConsumer() {\n    return activeConsumer;\n}\nfunction isInNotificationPhase() {\n    return inNotificationPhase;\n}\nfunction isReactive(value) {\n    return value[SIGNAL] !== undefined;\n}\nconst REACTIVE_NODE = {\n    version: 0,\n    lastCleanEpoch: 0,\n    dirty: false,\n    producerNode: undefined,\n    producerLastReadVersion: undefined,\n    producerIndexOfThis: undefined,\n    nextProducerIndex: 0,\n    liveConsumerNode: undefined,\n    liveConsumerIndexOfThis: undefined,\n    consumerAllowSignalWrites: false,\n    consumerIsAlwaysLive: false,\n    producerMustRecompute: () => false,\n    producerRecomputeValue: () => { },\n    consumerMarkedDirty: () => { },\n    consumerOnSignalRead: () => { },\n};\n/**\n * Called by implementations when a producer's signal is read.\n */\nfunction producerAccessed(node) {\n    if (inNotificationPhase) {\n        throw new Error(typeof ngDevMode !== 'undefined' && ngDevMode\n            ? `Assertion error: signal read during notification phase`\n            : '');\n    }\n    if (activeConsumer === null) {\n        // Accessed outside of a reactive context, so nothing to record.\n        return;\n    }\n    activeConsumer.consumerOnSignalRead(node);\n    // This producer is the `idx`th dependency of `activeConsumer`.\n    const idx = activeConsumer.nextProducerIndex++;\n    assertConsumerNode(activeConsumer);\n    if (idx < activeConsumer.producerNode.length && activeConsumer.producerNode[idx] !== node) {\n        // There's been a change in producers since the last execution of `activeConsumer`.\n        // `activeConsumer.producerNode[idx]` holds a stale dependency which will be be removed and\n        // replaced with `this`.\n        //\n        // If `activeConsumer` isn't live, then this is a no-op, since we can replace the producer in\n        // `activeConsumer.producerNode` directly. However, if `activeConsumer` is live, then we need\n        // to remove it from the stale producer's `liveConsumer`s.\n        if (consumerIsLive(activeConsumer)) {\n            const staleProducer = activeConsumer.producerNode[idx];\n            producerRemoveLiveConsumerAtIndex(staleProducer, activeConsumer.producerIndexOfThis[idx]);\n            // At this point, the only record of `staleProducer` is the reference at\n            // `activeConsumer.producerNode[idx]` which will be overwritten below.\n        }\n    }\n    if (activeConsumer.producerNode[idx] !== node) {\n        // We're a new dependency of the consumer (at `idx`).\n        activeConsumer.producerNode[idx] = node;\n        // If the active consumer is live, then add it as a live consumer. If not, then use 0 as a\n        // placeholder value.\n        activeConsumer.producerIndexOfThis[idx] = consumerIsLive(activeConsumer)\n            ? producerAddLiveConsumer(node, activeConsumer, idx)\n            : 0;\n    }\n    activeConsumer.producerLastReadVersion[idx] = node.version;\n}\n/**\n * Increment the global epoch counter.\n *\n * Called by source producers (that is, not computeds) whenever their values change.\n */\nfunction producerIncrementEpoch() {\n    epoch++;\n}\n/**\n * Ensure this producer's `version` is up-to-date.\n */\nfunction producerUpdateValueVersion(node) {\n    if (consumerIsLive(node) && !node.dirty) {\n        // A live consumer will be marked dirty by producers, so a clean state means that its version\n        // is guaranteed to be up-to-date.\n        return;\n    }\n    if (!node.dirty && node.lastCleanEpoch === epoch) {\n        // Even non-live consumers can skip polling if they previously found themselves to be clean at\n        // the current epoch, since their dependencies could not possibly have changed (such a change\n        // would've increased the epoch).\n        return;\n    }\n    if (!node.producerMustRecompute(node) && !consumerPollProducersForChange(node)) {\n        // None of our producers report a change since the last time they were read, so no\n        // recomputation of our value is necessary, and we can consider ourselves clean.\n        producerMarkClean(node);\n        return;\n    }\n    node.producerRecomputeValue(node);\n    // After recomputing the value, we're no longer dirty.\n    producerMarkClean(node);\n}\n/**\n * Propagate a dirty notification to live consumers of this producer.\n */\nfunction producerNotifyConsumers(node) {\n    if (node.liveConsumerNode === undefined) {\n        return;\n    }\n    // Prevent signal reads when we're updating the graph\n    const prev = inNotificationPhase;\n    inNotificationPhase = true;\n    try {\n        for (const consumer of node.liveConsumerNode) {\n            if (!consumer.dirty) {\n                consumerMarkDirty(consumer);\n            }\n        }\n    }\n    finally {\n        inNotificationPhase = prev;\n    }\n}\n/**\n * Whether this `ReactiveNode` in its producer capacity is currently allowed to initiate updates,\n * based on the current consumer context.\n */\nfunction producerUpdatesAllowed() {\n    return activeConsumer?.consumerAllowSignalWrites !== false;\n}\nfunction consumerMarkDirty(node) {\n    node.dirty = true;\n    producerNotifyConsumers(node);\n    node.consumerMarkedDirty?.(node);\n}\nfunction producerMarkClean(node) {\n    node.dirty = false;\n    node.lastCleanEpoch = epoch;\n}\n/**\n * Prepare this consumer to run a computation in its reactive context.\n *\n * Must be called by subclasses which represent reactive computations, before those computations\n * begin.\n */\nfunction consumerBeforeComputation(node) {\n    node && (node.nextProducerIndex = 0);\n    return setActiveConsumer(node);\n}\n/**\n * Finalize this consumer's state after a reactive computation has run.\n *\n * Must be called by subclasses which represent reactive computations, after those computations\n * have finished.\n */\nfunction consumerAfterComputation(node, prevConsumer) {\n    setActiveConsumer(prevConsumer);\n    if (!node ||\n        node.producerNode === undefined ||\n        node.producerIndexOfThis === undefined ||\n        node.producerLastReadVersion === undefined) {\n        return;\n    }\n    if (consumerIsLive(node)) {\n        // For live consumers, we need to remove the producer -> consumer edge for any stale producers\n        // which weren't dependencies after the recomputation.\n        for (let i = node.nextProducerIndex; i < node.producerNode.length; i++) {\n            producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n        }\n    }\n    // Truncate the producer tracking arrays.\n    // Perf note: this is essentially truncating the length to `node.nextProducerIndex`, but\n    // benchmarking has shown that individual pop operations are faster.\n    while (node.producerNode.length > node.nextProducerIndex) {\n        node.producerNode.pop();\n        node.producerLastReadVersion.pop();\n        node.producerIndexOfThis.pop();\n    }\n}\n/**\n * Determine whether this consumer has any dependencies which have changed since the last time\n * they were read.\n */\nfunction consumerPollProducersForChange(node) {\n    assertConsumerNode(node);\n    // Poll producers for change.\n    for (let i = 0; i < node.producerNode.length; i++) {\n        const producer = node.producerNode[i];\n        const seenVersion = node.producerLastReadVersion[i];\n        // First check the versions. A mismatch means that the producer's value is known to have\n        // changed since the last time we read it.\n        if (seenVersion !== producer.version) {\n            return true;\n        }\n        // The producer's version is the same as the last time we read it, but it might itself be\n        // stale. Force the producer to recompute its version (calculating a new value if necessary).\n        producerUpdateValueVersion(producer);\n        // Now when we do this check, `producer.version` is guaranteed to be up to date, so if the\n        // versions still match then it has not changed since the last time we read it.\n        if (seenVersion !== producer.version) {\n            return true;\n        }\n    }\n    return false;\n}\n/**\n * Disconnect this consumer from the graph.\n */\nfunction consumerDestroy(node) {\n    assertConsumerNode(node);\n    if (consumerIsLive(node)) {\n        // Drop all connections from the graph to this node.\n        for (let i = 0; i < node.producerNode.length; i++) {\n            producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n        }\n    }\n    // Truncate all the arrays to drop all connection from this node to the graph.\n    node.producerNode.length =\n        node.producerLastReadVersion.length =\n            node.producerIndexOfThis.length =\n                0;\n    if (node.liveConsumerNode) {\n        node.liveConsumerNode.length = node.liveConsumerIndexOfThis.length = 0;\n    }\n}\n/**\n * Add `consumer` as a live consumer of this node.\n *\n * Note that this operation is potentially transitive. If this node becomes live, then it becomes\n * a live consumer of all of its current producers.\n */\nfunction producerAddLiveConsumer(node, consumer, indexOfThis) {\n    assertProducerNode(node);\n    if (node.liveConsumerNode.length === 0 && isConsumerNode(node)) {\n        // When going from 0 to 1 live consumers, we become a live consumer to our producers.\n        for (let i = 0; i < node.producerNode.length; i++) {\n            node.producerIndexOfThis[i] = producerAddLiveConsumer(node.producerNode[i], node, i);\n        }\n    }\n    node.liveConsumerIndexOfThis.push(indexOfThis);\n    return node.liveConsumerNode.push(consumer) - 1;\n}\n/**\n * Remove the live consumer at `idx`.\n */\nfunction producerRemoveLiveConsumerAtIndex(node, idx) {\n    assertProducerNode(node);\n    if (typeof ngDevMode !== 'undefined' && ngDevMode && idx >= node.liveConsumerNode.length) {\n        throw new Error(`Assertion error: active consumer index ${idx} is out of bounds of ${node.liveConsumerNode.length} consumers)`);\n    }\n    if (node.liveConsumerNode.length === 1 && isConsumerNode(node)) {\n        // When removing the last live consumer, we will no longer be live. We need to remove\n        // ourselves from our producers' tracking (which may cause consumer-producers to lose\n        // liveness as well).\n        for (let i = 0; i < node.producerNode.length; i++) {\n            producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n        }\n    }\n    // Move the last value of `liveConsumers` into `idx`. Note that if there's only a single\n    // live consumer, this is a no-op.\n    const lastIdx = node.liveConsumerNode.length - 1;\n    node.liveConsumerNode[idx] = node.liveConsumerNode[lastIdx];\n    node.liveConsumerIndexOfThis[idx] = node.liveConsumerIndexOfThis[lastIdx];\n    // Truncate the array.\n    node.liveConsumerNode.length--;\n    node.liveConsumerIndexOfThis.length--;\n    // If the index is still valid, then we need to fix the index pointer from the producer to this\n    // consumer, and update it from `lastIdx` to `idx` (accounting for the move above).\n    if (idx < node.liveConsumerNode.length) {\n        const idxProducer = node.liveConsumerIndexOfThis[idx];\n        const consumer = node.liveConsumerNode[idx];\n        assertConsumerNode(consumer);\n        consumer.producerIndexOfThis[idxProducer] = idx;\n    }\n}\nfunction consumerIsLive(node) {\n    return node.consumerIsAlwaysLive || (node?.liveConsumerNode?.length ?? 0) > 0;\n}\nfunction assertConsumerNode(node) {\n    node.producerNode ??= [];\n    node.producerIndexOfThis ??= [];\n    node.producerLastReadVersion ??= [];\n}\nfunction assertProducerNode(node) {\n    node.liveConsumerNode ??= [];\n    node.liveConsumerIndexOfThis ??= [];\n}\nfunction isConsumerNode(node) {\n    return node.producerNode !== undefined;\n}\n\n/**\n * Create a computed signal which derives a reactive value from an expression.\n */\nfunction createComputed(computation) {\n    const node = Object.create(COMPUTED_NODE);\n    node.computation = computation;\n    const computed = () => {\n        // Check if the value needs updating before returning it.\n        producerUpdateValueVersion(node);\n        // Record that someone looked at this signal.\n        producerAccessed(node);\n        if (node.value === ERRORED) {\n            throw node.error;\n        }\n        return node.value;\n    };\n    computed[SIGNAL] = node;\n    return computed;\n}\n/**\n * A dedicated symbol used before a computed value has been calculated for the first time.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst UNSET = /* @__PURE__ */ Symbol('UNSET');\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * is in progress. Used to detect cycles in computation chains.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst COMPUTING = /* @__PURE__ */ Symbol('COMPUTING');\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * failed. The thrown error is cached until the computation gets dirty again.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst ERRORED = /* @__PURE__ */ Symbol('ERRORED');\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst COMPUTED_NODE = /* @__PURE__ */ (() => {\n    return {\n        ...REACTIVE_NODE,\n        value: UNSET,\n        dirty: true,\n        error: null,\n        equal: defaultEquals,\n        producerMustRecompute(node) {\n            // Force a recomputation if there's no current value, or if the current value is in the\n            // process of being calculated (which should throw an error).\n            return node.value === UNSET || node.value === COMPUTING;\n        },\n        producerRecomputeValue(node) {\n            if (node.value === COMPUTING) {\n                // Our computation somehow led to a cyclic read of itself.\n                throw new Error('Detected cycle in computations.');\n            }\n            const oldValue = node.value;\n            node.value = COMPUTING;\n            const prevConsumer = consumerBeforeComputation(node);\n            let newValue;\n            try {\n                newValue = node.computation();\n            }\n            catch (err) {\n                newValue = ERRORED;\n                node.error = err;\n            }\n            finally {\n                consumerAfterComputation(node, prevConsumer);\n            }\n            if (oldValue !== UNSET &&\n                oldValue !== ERRORED &&\n                newValue !== ERRORED &&\n                node.equal(oldValue, newValue)) {\n                // No change to `valueVersion` - old and new values are\n                // semantically equivalent.\n                node.value = oldValue;\n                return;\n            }\n            node.value = newValue;\n            node.version++;\n        },\n    };\n})();\n\nfunction defaultThrowError() {\n    throw new Error();\n}\nlet throwInvalidWriteToSignalErrorFn = defaultThrowError;\nfunction throwInvalidWriteToSignalError() {\n    throwInvalidWriteToSignalErrorFn();\n}\nfunction setThrowInvalidWriteToSignalError(fn) {\n    throwInvalidWriteToSignalErrorFn = fn;\n}\n\n/**\n * If set, called after `WritableSignal`s are updated.\n *\n * This hook can be used to achieve various effects, such as running effects synchronously as part\n * of setting a signal.\n */\nlet postSignalSetFn = null;\n/**\n * Create a `Signal` that can be set or updated directly.\n */\nfunction createSignal(initialValue) {\n    const node = Object.create(SIGNAL_NODE);\n    node.value = initialValue;\n    const getter = (() => {\n        producerAccessed(node);\n        return node.value;\n    });\n    getter[SIGNAL] = node;\n    return getter;\n}\nfunction setPostSignalSetFn(fn) {\n    const prev = postSignalSetFn;\n    postSignalSetFn = fn;\n    return prev;\n}\nfunction signalGetFn() {\n    producerAccessed(this);\n    return this.value;\n}\nfunction signalSetFn(node, newValue) {\n    if (!producerUpdatesAllowed()) {\n        throwInvalidWriteToSignalError();\n    }\n    if (!node.equal(node.value, newValue)) {\n        node.value = newValue;\n        signalValueChanged(node);\n    }\n}\nfunction signalUpdateFn(node, updater) {\n    if (!producerUpdatesAllowed()) {\n        throwInvalidWriteToSignalError();\n    }\n    signalSetFn(node, updater(node.value));\n}\nfunction runPostSignalSetFn() {\n    postSignalSetFn?.();\n}\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst SIGNAL_NODE = /* @__PURE__ */ (() => {\n    return {\n        ...REACTIVE_NODE,\n        equal: defaultEquals,\n        value: undefined,\n    };\n})();\nfunction signalValueChanged(node) {\n    node.version++;\n    producerIncrementEpoch();\n    producerNotifyConsumers(node);\n    postSignalSetFn?.();\n}\n\nfunction createWatch(fn, schedule, allowSignalWrites) {\n    const node = Object.create(WATCH_NODE);\n    if (allowSignalWrites) {\n        node.consumerAllowSignalWrites = true;\n    }\n    node.fn = fn;\n    node.schedule = schedule;\n    const registerOnCleanup = (cleanupFn) => {\n        node.cleanupFn = cleanupFn;\n    };\n    function isWatchNodeDestroyed(node) {\n        return node.fn === null && node.schedule === null;\n    }\n    function destroyWatchNode(node) {\n        if (!isWatchNodeDestroyed(node)) {\n            consumerDestroy(node); // disconnect watcher from the reactive graph\n            node.cleanupFn();\n            // nullify references to the integration functions to mark node as destroyed\n            node.fn = null;\n            node.schedule = null;\n            node.cleanupFn = NOOP_CLEANUP_FN;\n        }\n    }\n    const run = () => {\n        if (node.fn === null) {\n            // trying to run a destroyed watch is noop\n            return;\n        }\n        if (isInNotificationPhase()) {\n            throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);\n        }\n        node.dirty = false;\n        if (node.hasRun && !consumerPollProducersForChange(node)) {\n            return;\n        }\n        node.hasRun = true;\n        const prevConsumer = consumerBeforeComputation(node);\n        try {\n            node.cleanupFn();\n            node.cleanupFn = NOOP_CLEANUP_FN;\n            node.fn(registerOnCleanup);\n        }\n        finally {\n            consumerAfterComputation(node, prevConsumer);\n        }\n    };\n    node.ref = {\n        notify: () => consumerMarkDirty(node),\n        run,\n        cleanup: () => node.cleanupFn(),\n        destroy: () => destroyWatchNode(node),\n        [SIGNAL]: node,\n    };\n    return node.ref;\n}\nconst NOOP_CLEANUP_FN = () => { };\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst WATCH_NODE = /* @__PURE__ */ (() => {\n    return {\n        ...REACTIVE_NODE,\n        consumerIsAlwaysLive: true,\n        consumerAllowSignalWrites: false,\n        consumerMarkedDirty: (node) => {\n            if (node.schedule !== null) {\n                node.schedule(node.ref);\n            }\n        },\n        hasRun: false,\n        cleanupFn: NOOP_CLEANUP_FN,\n    };\n})();\n\nfunction setAlternateWeakRefImpl(impl) {\n    // TODO: remove this function\n}\n\nexport { REACTIVE_NODE, SIGNAL, SIGNAL_NODE, consumerAfterComputation, consumerBeforeComputation, consumerDestroy, consumerMarkDirty, consumerPollProducersForChange, createComputed, createSignal, createWatch, defaultEquals, getActiveConsumer, isInNotificationPhase, isReactive, producerAccessed, producerIncrementEpoch, producerMarkClean, producerNotifyConsumers, producerUpdateValueVersion, producerUpdatesAllowed, runPostSignalSetFn, setActiveConsumer, setAlternateWeakRefImpl, setPostSignalSetFn, setThrowInvalidWriteToSignalError, signalSetFn, signalUpdateFn };\n","/**\n * @license Angular v19.0.5\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { SIGNAL_NODE as SIGNAL_NODE$1, signalSetFn as signalSetFn$1, producerAccessed as producerAccessed$1, SIGNAL as SIGNAL$1, getActiveConsumer as getActiveConsumer$1, setActiveConsumer as setActiveConsumer$1, consumerDestroy as consumerDestroy$1, REACTIVE_NODE as REACTIVE_NODE$1, consumerBeforeComputation as consumerBeforeComputation$1, consumerAfterComputation as consumerAfterComputation$1, consumerPollProducersForChange as consumerPollProducersForChange$1, createSignal as createSignal$1, signalUpdateFn as signalUpdateFn$1, createComputed as createComputed$1, setThrowInvalidWriteToSignalError as setThrowInvalidWriteToSignalError$1, producerUpdateValueVersion as producerUpdateValueVersion$1, producerMarkClean as producerMarkClean$1, defaultEquals as defaultEquals$1, createWatch as createWatch$1, isInNotificationPhase as isInNotificationPhase$1 } from '@angular/core/primitives/signals';\nexport { SIGNAL as ɵSIGNAL } from '@angular/core/primitives/signals';\nimport { BehaviorSubject, Subject, Subscription } from 'rxjs';\nimport { Attribute as Attribute$1, EventContract, EventContractContainer, getAppScopedQueuedEventInfos, clearAppScopedEarlyEventContract, EventDispatcher, registerDispatcher, isEarlyEventType, isCaptureEventType, EventPhase } from '@angular/core/primitives/event-dispatch';\nimport { map } from 'rxjs/operators';\n\n/**\n * Base URL for the error details page.\n *\n * Keep this constant in sync across:\n *  - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts\n *  - packages/core/src/error_details_base_url.ts\n */\nconst ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.dev/errors';\n/**\n * URL for the XSS security documentation.\n */\nconst XSS_SECURITY_URL = 'https://g.co/ng/security#xss';\n\n/**\n * Class that represents a runtime error.\n * Formats and outputs the error message in a consistent way.\n *\n * Example:\n * ```ts\n *  throw new RuntimeError(\n *    RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n *    ngDevMode && 'Injector has already been destroyed.');\n * ```\n *\n * Note: the `message` argument contains a descriptive error message as a string in development\n * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the\n * `message` argument becomes `false`, thus we account for it in the typings and the runtime\n * logic.\n */\nclass RuntimeError extends Error {\n    code;\n    constructor(code, message) {\n        super(formatRuntimeError(code, message));\n        this.code = code;\n    }\n}\n/**\n * Called to format a runtime error.\n * See additional info on the `message` argument type in the `RuntimeError` class description.\n */\nfunction formatRuntimeError(code, message) {\n    // Error code might be a negative number, which is a special marker that instructs the logic to\n    // generate a link to the error details page on angular.io.\n    // We also prepend `0` to non-compile-time errors.\n    const fullCode = `NG0${Math.abs(code)}`;\n    let errorMessage = `${fullCode}${message ? ': ' + message : ''}`;\n    if (ngDevMode && code < 0) {\n        const addPeriodSeparator = !errorMessage.match(/[.,;!?\\n]$/);\n        const separator = addPeriodSeparator ? '.' : '';\n        errorMessage = `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;\n    }\n    return errorMessage;\n}\n\nconst REQUIRED_UNSET_VALUE = /* @__PURE__ */ Symbol('InputSignalNode#UNSET');\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst INPUT_SIGNAL_NODE = /* @__PURE__ */ (() => {\n    return {\n        ...SIGNAL_NODE$1,\n        transformFn: undefined,\n        applyValueToInputSignal(node, value) {\n            signalSetFn$1(node, value);\n        },\n    };\n})();\n\nconst ɵINPUT_SIGNAL_BRAND_READ_TYPE = /* @__PURE__ */ Symbol();\nconst ɵINPUT_SIGNAL_BRAND_WRITE_TYPE = /* @__PURE__ */ Symbol();\n/**\n * Creates an input signal.\n *\n * @param initialValue The initial value.\n *   Can be set to {@link REQUIRED_UNSET_VALUE} for required inputs.\n * @param options Additional options for the input. e.g. a transform, or an alias.\n */\nfunction createInputSignal(initialValue, options) {\n    const node = Object.create(INPUT_SIGNAL_NODE);\n    node.value = initialValue;\n    // Perf note: Always set `transformFn` here to ensure that `node` always\n    // has the same v8 class shape, allowing monomorphic reads on input signals.\n    node.transformFn = options?.transform;\n    function inputValueFn() {\n        // Record that someone looked at this signal.\n        producerAccessed$1(node);\n        if (node.value === REQUIRED_UNSET_VALUE) {\n            throw new RuntimeError(-950 /* RuntimeErrorCode.REQUIRED_INPUT_NO_VALUE */, ngDevMode && 'Input is required but no value is available yet.');\n        }\n        return node.value;\n    }\n    inputValueFn[SIGNAL$1] = node;\n    if (ngDevMode) {\n        inputValueFn.toString = () => `[Input Signal: ${inputValueFn()}]`;\n        node.debugName = options?.debugName;\n    }\n    return inputValueFn;\n}\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\nconst ANNOTATIONS = '__annotations__';\nconst PARAMETERS = '__parameters__';\nconst PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\nfunction makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n    return noSideEffects(() => {\n        const metaCtor = makeMetadataCtor(props);\n        function DecoratorFactory(...args) {\n            if (this instanceof DecoratorFactory) {\n                metaCtor.call(this, ...args);\n                return this;\n            }\n            const annotationInstance = new DecoratorFactory(...args);\n            return function TypeDecorator(cls) {\n                if (typeFn)\n                    typeFn(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                const 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(...args) {\n        if (props) {\n            const values = props(...args);\n            for (const propName in values) {\n                this[propName] = values[propName];\n            }\n        }\n    };\n}\nfunction makeParamDecorator(name, props, parentClass) {\n    return noSideEffects(() => {\n        const metaCtor = makeMetadataCtor(props);\n        function ParamDecoratorFactory(...args) {\n            if (this instanceof ParamDecoratorFactory) {\n                metaCtor.apply(this, args);\n                return this;\n            }\n            const annotationInstance = new ParamDecoratorFactory(...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                const 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(() => {\n        const metaCtor = makeMetadataCtor(props);\n        function PropDecoratorFactory(...args) {\n            if (this instanceof PropDecoratorFactory) {\n                metaCtor.apply(this, args);\n                return this;\n            }\n            const decoratorInstance = new PropDecoratorFactory(...args);\n            function PropDecorator(target, name) {\n                // target is undefined with standard decorators. This case is not supported and will throw\n                // if this decorator is used in JIT mode with standard decorators.\n                if (target === undefined) {\n                    throw new Error('Standard Angular field decorators are not supported in JIT mode.');\n                }\n                const constructor = target.constructor;\n                // Use of Object.defineProperty is important because it creates a non-enumerable property\n                // which prevents the property from being copied during subclassing.\n                const 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(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\nconst _global = globalThis;\n\nfunction ngDevModeResetPerfCounters() {\n    const locationString = typeof location !== 'undefined' ? location.toString() : '';\n    const 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        hydratedNodes: 0,\n        hydratedComponents: 0,\n        dehydratedViewsRemoved: 0,\n        dehydratedViewsCleanupRuns: 0,\n        componentsSkippedHydration: 0,\n        deferBlocksWithIncrementalHydration: 0,\n    };\n    // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n    const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n    if (!allowNgDevModeTrue) {\n        _global['ngDevMode'] = false;\n    }\n    else {\n        if (typeof _global['ngDevMode'] !== 'object') {\n            _global['ngDevMode'] = {};\n        }\n        Object.assign(_global['ngDevMode'], newCounters);\n    }\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 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' || Object.keys(ngDevMode).length === 0) {\n            ngDevModeResetPerfCounters();\n        }\n        return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n    }\n    return false;\n}\n\nfunction getClosureSafeProperty(objWithPropertyToExtract) {\n    for (let 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 (const key in source) {\n        if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n            target[key] = source[key];\n        }\n    }\n}\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    const res = token.toString();\n    if (res == null) {\n        return '' + res;\n    }\n    const 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\n            ? ''\n            : after\n        : after == null || after === ''\n            ? before\n            : before + ' ' + after;\n}\n/**\n * Ellipses the string in the middle when longer than the max length\n *\n * @param string\n * @param maxLength of the output string\n * @returns ellipsed string with ... in the middle\n */\nfunction truncateMiddle(str, maxLength = 100) {\n    if (!str || maxLength < 1 || str.length <= maxLength)\n        return str;\n    if (maxLength == 1)\n        return str.substring(0, 1) + '...';\n    const halfLimit = Math.round(maxLength / 2);\n    return str.substring(0, halfLimit) + '...' + str.substring(str.length - halfLimit);\n}\n\nconst __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 * `forwardRef` is also used to break circularities in standalone components imports.\n *\n * @usageNotes\n * ### Circular dependency example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n *\n * ### Circular standalone reference import example\n * ```angular-ts\n * @Component({\n *   standalone: true,\n *   imports: [ChildComponent],\n *   selector: 'app-parent',\n *   template: `<app-child [hideParent]=\"hideParent\"></app-child>`,\n * })\n * export class ParentComponent {\n *   @Input() hideParent: boolean;\n * }\n *\n *\n * @Component({\n *   standalone: true,\n *   imports: [CommonModule, forwardRef(() => ParentComponent)],\n *   selector: 'app-child',\n *   template: `<app-parent *ngIf=\"!hideParent\"></app-parent>`,\n * })\n * export class ChildComponent {\n *   @Input() hideParent: boolean;\n * }\n * ```\n *\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 {@link 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' &&\n        fn.hasOwnProperty(__forward_ref__) &&\n        fn.__forward_ref__ === forwardRef);\n}\n\n// The functions in this file verify that the assumptions we are making\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 assertFunction(actual, msg) {\n    if (!(typeof actual === 'function')) {\n        throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\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 (!(node instanceof Node)) {\n        throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n    }\n}\nfunction assertElement(node) {\n    if (!(node instanceof Element)) {\n        throwError(`The provided value must be an element but got ${stringify(node)}`);\n    }\n}\nfunction assertIndexInRange(arr, index) {\n    assertDefined(arr, 'Array must be defined.');\n    const maxLen = arr.length;\n    if (index < 0 || index >= maxLen) {\n        throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n    }\n}\nfunction assertOneOf(value, ...validValues) {\n    if (validValues.indexOf(value) !== -1)\n        return true;\n    throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`);\n}\nfunction assertNotReactive(fn) {\n    if (getActiveConsumer$1() !== null) {\n        throwError(`${fn}() should never be called in a reactive context.`);\n    }\n}\n\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and 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`](api/core/inject) to access the `Injector` and request injection\n * of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\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 by generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nconst 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 * * `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 * @codeGenApi\n */\nfunction ɵɵdefineInjector(options) {\n    return { providers: options.providers || [], imports: options.imports || [] };\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, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n}\nfunction isInjectable(type) {\n    return getInjectableDef(type) !== null;\n}\n/**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\nfunction getOwnDefinition(type, field) {\n    return type.hasOwnProperty(field) ? type[field] : 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 a future version of Angular, where an error will occur in the\n *     scenario if we find the `ɵprov` on an ancestor only.\n */\nfunction getInheritedInjectableDef(type) {\n    const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n    if (def) {\n        ngDevMode &&\n            console.warn(`DEPRECATED: DI is instantiating a token \"${type.name}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n                `This will become an error in a future version of Angular. Please add @Injectable() to the \"${type.name}\" class.`);\n        return def;\n    }\n    else {\n        return null;\n    }\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}\nconst NG_PROV_DEF = getClosureSafeProperty({ ɵprov: getClosureSafeProperty });\nconst NG_INJ_DEF = getClosureSafeProperty({ ɵinj: getClosureSafeProperty });\n// We need to keep these around so we can read off old defs if new defs are unavailable\nconst NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty });\nconst NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty });\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 an additional level of type safety.\n *\n * <div class=\"docs-alert docs-alert-helpful\">\n *\n * **Important Note**: Ensure that you use the same instance of the `InjectionToken` in both the\n * provider and the injection call. Creating a new instance of `InjectionToken` in different places,\n * even with the same description, will be treated as different tokens by Angular's DI system,\n * leading to a `NullInjectorError`.\n *\n * </div>\n *\n * {@example injection-token/src/main.ts region='InjectionToken'}\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`](api/core/inject) function.\n * As you can see in the Tree-shakable InjectionToken example below.\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` (note:\n * this option is now deprecated). As mentioned above, `'root'` is the default value for\n * `providedIn`.\n *\n * The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.\n *\n * @usageNotes\n * ### Basic Examples\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 * @publicApi\n */\nclass InjectionToken {\n    _desc;\n    /** @internal */\n    ngMetadataName = 'InjectionToken';\n    ɵprov;\n    /**\n     * @param _desc   Description for the token,\n     *                used only for debugging purposes,\n     *                it should but does not need to be unique\n     * @param options Options for the token's usage, as described above\n     */\n    constructor(_desc, options) {\n        this._desc = _desc;\n        this.ɵprov = undefined;\n        if (typeof options == 'number') {\n            (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                assertLessThan(options, 0, 'Only negative numbers are supported here');\n            // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n            // See `InjectorMarkers`\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    /**\n     * @internal\n     */\n    get multi() {\n        return this;\n    }\n    toString() {\n        return `InjectionToken ${this._desc}`;\n    }\n}\n\nlet _injectorProfilerContext;\nfunction getInjectorProfilerContext() {\n    !ngDevMode && throwError('getInjectorProfilerContext should never be called in production mode');\n    return _injectorProfilerContext;\n}\nfunction setInjectorProfilerContext(context) {\n    !ngDevMode && throwError('setInjectorProfilerContext should never be called in production mode');\n    const previous = _injectorProfilerContext;\n    _injectorProfilerContext = context;\n    return previous;\n}\nlet injectorProfilerCallback = null;\n/**\n * Sets the callback function which will be invoked during certain DI events within the\n * runtime (for example: injecting services, creating injectable instances, configuring providers)\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nconst setInjectorProfiler = (injectorProfiler) => {\n    !ngDevMode && throwError('setInjectorProfiler should never be called in production mode');\n    injectorProfilerCallback = injectorProfiler;\n};\n/**\n * Injector profiler function which emits on DI events executed by the runtime.\n *\n * @param event InjectorProfilerEvent corresponding to the DI event being emitted\n */\nfunction injectorProfiler(event) {\n    !ngDevMode && throwError('Injector profiler should never be called in production mode');\n    if (injectorProfilerCallback != null /* both `null` and `undefined` */) {\n        injectorProfilerCallback(event);\n    }\n}\n/**\n * Emits an InjectorProfilerEventType.ProviderConfigured to the injector profiler. The data in the\n * emitted event includes the raw provider, as well as the token that provider is providing.\n *\n * @param eventProvider A provider object\n */\nfunction emitProviderConfiguredEvent(eventProvider, isViewProvider = false) {\n    !ngDevMode && throwError('Injector profiler should never be called in production mode');\n    let token;\n    // if the provider is a TypeProvider (typeof provider is function) then the token is the\n    // provider itself\n    if (typeof eventProvider === 'function') {\n        token = eventProvider;\n    }\n    // if the provider is an injection token, then the token is the injection token.\n    else if (eventProvider instanceof InjectionToken) {\n        token = eventProvider;\n    }\n    // in all other cases we can access the token via the `provide` property of the provider\n    else {\n        token = resolveForwardRef(eventProvider.provide);\n    }\n    let provider = eventProvider;\n    // Injection tokens may define their own default provider which gets attached to the token itself\n    // as `ɵprov`. In this case, we want to emit the provider that is attached to the token, not the\n    // token itself.\n    if (eventProvider instanceof InjectionToken) {\n        provider = eventProvider.ɵprov || eventProvider;\n    }\n    injectorProfiler({\n        type: 2 /* InjectorProfilerEventType.ProviderConfigured */,\n        context: getInjectorProfilerContext(),\n        providerRecord: { token, provider, isViewProvider },\n    });\n}\n/**\n * Emits an event to the injector profiler with the instance that was created. Note that\n * the injector associated with this emission can be accessed by using getDebugInjectContext()\n *\n * @param instance an object created by an injector\n */\nfunction emitInstanceCreatedByInjectorEvent(instance) {\n    !ngDevMode && throwError('Injector profiler should never be called in production mode');\n    injectorProfiler({\n        type: 1 /* InjectorProfilerEventType.InstanceCreatedByInjector */,\n        context: getInjectorProfilerContext(),\n        instance: { value: instance },\n    });\n}\n/**\n * @param token DI token associated with injected service\n * @param value the instance of the injected service (i.e the result of `inject(token)`)\n * @param flags the flags that the token was injected with\n */\nfunction emitInjectEvent(token, value, flags) {\n    !ngDevMode && throwError('Injector profiler should never be called in production mode');\n    injectorProfiler({\n        type: 0 /* InjectorProfilerEventType.Inject */,\n        context: getInjectorProfilerContext(),\n        service: { token, value, flags },\n    });\n}\nfunction runInInjectorProfilerContext(injector, token, callback) {\n    !ngDevMode &&\n        throwError('runInInjectorProfilerContext should never be called in production mode');\n    const prevInjectContext = setInjectorProfilerContext({ injector, token });\n    try {\n        callback();\n    }\n    finally {\n        setInjectorProfilerContext(prevInjectContext);\n    }\n}\n\nfunction isEnvironmentProviders(value) {\n    return value && !!value.ɵproviders;\n}\n\nconst NG_COMP_DEF = getClosureSafeProperty({ ɵcmp: getClosureSafeProperty });\nconst NG_DIR_DEF = getClosureSafeProperty({ ɵdir: getClosureSafeProperty });\nconst NG_PIPE_DEF = getClosureSafeProperty({ ɵpipe: getClosureSafeProperty });\nconst NG_MOD_DEF = getClosureSafeProperty({ ɵmod: getClosureSafeProperty });\nconst 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.\nconst NG_ELEMENT_ID = getClosureSafeProperty({ __NG_ELEMENT_ID__: getClosureSafeProperty });\n/**\n * The `NG_ENV_ID` field on a DI token indicates special processing in the `EnvironmentInjector`:\n * getting such tokens from the `EnvironmentInjector` will bypass the standard DI resolution\n * strategy and instead will return implementation produced by the `NG_ENV_ID` factory function.\n *\n * This particular retrieval of DI tokens is mostly done to eliminate circular dependencies and\n * improve tree-shaking.\n */\nconst NG_ENV_ID = getClosureSafeProperty({ __NG_ENV_ID__: getClosureSafeProperty });\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 * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\nfunction renderStringify(value) {\n    if (typeof value === 'string')\n        return value;\n    if (value == null)\n        return '';\n    // Use `String` so that it invokes the `toString` method of the value. Note that this\n    // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n    return String(value);\n}\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n *\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}\n/**\n * Used to stringify a `Type` and including the file path and line number in which it is defined, if\n * possible, for better debugging experience.\n *\n * Important! This function contains a megamorphic read and should only be used for error messages.\n */\nfunction debugStringifyTypeForError(type) {\n    // TODO(pmvald): Do some refactoring so that we can use getComponentDef here without creating\n    // circular deps.\n    let componentDef = type[NG_COMP_DEF] || null;\n    if (componentDef !== null && componentDef.debugInfo) {\n        return stringifyTypeFromDebugInfo(componentDef.debugInfo);\n    }\n    return stringifyForError(type);\n}\n// TODO(pmvald): Do some refactoring so that we can use the type ClassDebugInfo for the param\n// debugInfo here without creating circular deps.\nfunction stringifyTypeFromDebugInfo(debugInfo) {\n    if (!debugInfo.filePath || !debugInfo.lineNumber) {\n        return debugInfo.className;\n    }\n    else {\n        return `${debugInfo.className} (at ${debugInfo.filePath}:${debugInfo.lineNumber})`;\n    }\n}\n\n/** Called when directives inject each other (creating a circular dependency) */\nfunction throwCyclicDependencyError(token, path) {\n    const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';\n    throw new RuntimeError(-200 /* RuntimeErrorCode.CYCLIC_DI_DEPENDENCY */, ngDevMode ? `Circular dependency in DI detected for ${token}${depPath}` : token);\n}\nfunction throwMixedMultiProviderError() {\n    throw new Error(`Cannot mix multi providers and regular providers`);\n}\nfunction throwInvalidProviderError(ngModuleType, providers, provider) {\n    if (ngModuleType && providers) {\n        const providerDetail = providers.map((v) => (v == provider ? '?' + provider + '?' : '...'));\n        throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}' - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`);\n    }\n    else if (isEnvironmentProviders(provider)) {\n        if (provider.ɵfromNgModule) {\n            throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`);\n        }\n        else {\n            throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers present in a non-environment injector. 'EnvironmentProviders' can't be used for component providers.`);\n        }\n    }\n    else {\n        throw new Error('Invalid provider');\n    }\n}\n/** Throws an error when a token is not found in DI. */\nfunction throwProviderNotFoundError(token, injectorName) {\n    const errorMessage = ngDevMode &&\n        `No provider for ${stringifyForError(token)} found${injectorName ? ` in ${injectorName}` : ''}`;\n    throw new RuntimeError(-201 /* RuntimeErrorCode.PROVIDER_NOT_FOUND */, errorMessage);\n}\n\n/**\n * Injection flags for DI.\n *\n * @publicApi\n * @deprecated use an options object for [`inject`](api/core/inject) instead.\n */\nvar InjectFlags;\n(function (InjectFlags) {\n    // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer\n    // 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 * 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 */\nlet _injectImplementation;\nfunction getInjectImplementation() {\n    return _injectImplementation;\n}\n/**\n * Sets the current inject implementation.\n */\nfunction setInjectImplementation(impl) {\n    const previous = _injectImplementation;\n    _injectImplementation = impl;\n    return previous;\n}\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 * injectable definition.\n */\nfunction injectRootLimpMode(token, notFoundValue, flags) {\n    const injectableDef = getInjectableDef(token);\n    if (injectableDef && injectableDef.providedIn == 'root') {\n        return injectableDef.value === undefined\n            ? (injectableDef.value = injectableDef.factory())\n            : injectableDef.value;\n    }\n    if (flags & InjectFlags.Optional)\n        return null;\n    if (notFoundValue !== undefined)\n        return notFoundValue;\n    throwProviderNotFoundError(token, 'Injector');\n}\n/**\n * Assert that `_injectImplementation` is not `fn`.\n *\n * This is useful, to prevent infinite recursion.\n *\n * @param fn Function which it should not equal to\n */\nfunction assertInjectImplementationNotEqual(fn) {\n    ngDevMode &&\n        assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\n}\n\nconst _THROW_IF_NOT_FOUND = {};\nconst THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n/*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\nconst NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nconst SOURCE = '__source';\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 */\nlet _currentInjector = undefined;\nfunction getCurrentInjector() {\n    return _currentInjector;\n}\nfunction setCurrentInjector(injector) {\n    const former = _currentInjector;\n    _currentInjector = injector;\n    return former;\n}\nfunction injectInjectorOnly(token, flags = InjectFlags.Default) {\n    if (_currentInjector === undefined) {\n        throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode &&\n            `inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \\`runInInjectionContext\\`.`);\n    }\n    else if (_currentInjector === null) {\n        return injectRootLimpMode(token, undefined, flags);\n    }\n    else {\n        const value = _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n        ngDevMode && emitInjectEvent(token, value, flags);\n        return value;\n    }\n}\nfunction ɵɵinject(token, flags = InjectFlags.Default) {\n    return (getInjectImplementation() || 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 * 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    throw new RuntimeError(202 /* RuntimeErrorCode.INVALID_FACTORY_DEPENDENCY */, 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}\n/**\n * Injects a token from the currently active injector.\n * `inject` is only supported in an [injection context](guide/di/dependency-injection-context). It\n * can be used during:\n * - Construction (via the `constructor`) of a class being instantiated by the DI system, such\n * as an `@Injectable` or `@Component`.\n * - In the initializer for fields of such classes.\n * - In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`.\n * - In the `factory` function specified for an `InjectionToken`.\n * - In a stackframe of a function call in a DI context\n *\n * @param token A token that represents a dependency that should 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`, `@SkipSelf`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @usageNotes\n * In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a\n * field initializer:\n *\n * ```ts\n * @Injectable({providedIn: 'root'})\n * export class Car {\n *   radio: Radio|undefined;\n *   // OK: field initializer\n *   spareTyre = inject(Tyre);\n *\n *   constructor() {\n *     // OK: constructor body\n *     this.radio = inject(Radio);\n *   }\n * }\n * ```\n *\n * It is also legal to call `inject` from a provider's factory:\n *\n * ```ts\n * providers: [\n *   {provide: Car, useFactory: () => {\n *     // OK: a class factory\n *     const engine = inject(Engine);\n *     return new Car(engine);\n *   }}\n * ]\n * ```\n *\n * Calls to the `inject()` function outside of the class creation context will result in error. Most\n * notably, calls to `inject()` are disallowed after a class instance was created, in methods\n * (including lifecycle hooks):\n *\n * ```ts\n * @Component({ ... })\n * export class CarComponent {\n *   ngOnInit() {\n *     // ERROR: too late, the component instance was already created\n *     const engine = inject(Engine);\n *     engine.start();\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nfunction inject(token, flags = InjectFlags.Default) {\n    // The `as any` here _shouldn't_ be necessary, but without it JSCompiler\n    // throws a disambiguation  error due to the multiple signatures.\n    return ɵɵinject(token, convertToBitFlags(flags));\n}\n// Converts object-based DI flags (`InjectOptions`) to bit flags (`InjectFlags`).\nfunction convertToBitFlags(flags) {\n    if (typeof flags === 'undefined' || typeof flags === 'number') {\n        return flags;\n    }\n    // While TypeScript doesn't accept it without a cast, bitwise OR with false-y values in\n    // JavaScript is a no-op. We can use that for a very codesize-efficient conversion from\n    // `InjectOptions` to `InjectFlags`.\n    return (0 /* InternalInjectFlags.Default */ | // comment to force a line break in the formatter\n        (flags.optional && 8 /* InternalInjectFlags.Optional */) |\n        (flags.host && 1 /* InternalInjectFlags.Host */) |\n        (flags.self && 2 /* InternalInjectFlags.Self */) |\n        (flags.skipSelf && 4 /* InternalInjectFlags.SkipSelf */));\n}\nfunction injectArgs(types) {\n    const args = [];\n    for (let i = 0; i < types.length; i++) {\n        const arg = resolveForwardRef(types[i]);\n        if (Array.isArray(arg)) {\n            if (arg.length === 0) {\n                throw new RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode && 'Arguments array must have arguments.');\n            }\n            let type = undefined;\n            let flags = InjectFlags.Default;\n            for (let j = 0; j < arg.length; j++) {\n                const meta = arg[j];\n                const flag = getInjectFlag(meta);\n                if (typeof flag === 'number') {\n                    // Special case when we handle @Inject decorator.\n                    if (flag === -1 /* DecoratorFlags.Inject */) {\n                        type = meta.token;\n                    }\n                    else {\n                        flags |= flag;\n                    }\n                }\n                else {\n                    type = meta;\n                }\n            }\n            args.push(ɵɵinject(type, flags));\n        }\n        else {\n            args.push(ɵɵinject(arg));\n        }\n    }\n    return args;\n}\n/**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\nfunction attachInjectFlag(decorator, flag) {\n    decorator[DI_DECORATOR_FLAG] = flag;\n    decorator.prototype[DI_DECORATOR_FLAG] = flag;\n    return decorator;\n}\n/**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\nfunction getInjectFlag(token) {\n    return token[DI_DECORATOR_FLAG];\n}\nfunction catchInjectorError(e, token, injectorErrorName, source) {\n    const 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 = null) {\n    text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;\n    let context = stringify(obj);\n    if (Array.isArray(obj)) {\n        context = obj.map(stringify).join(' -> ');\n    }\n    else if (typeof obj === 'object') {\n        let parts = [];\n        for (let key in obj) {\n            if (obj.hasOwnProperty(key)) {\n                let 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 * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Inject = attachInjectFlag(\n// Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\nmakeParamDecorator('Inject', (token) => ({ token })), -1 /* DecoratorFlags.Inject */);\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Optional = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('Optional'), 8 /* InternalInjectFlags.Optional */);\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Self = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('Self'), 2 /* InternalInjectFlags.Self */);\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst SkipSelf = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('SkipSelf'), 4 /* InternalInjectFlags.SkipSelf */);\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Host = \n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag(makeParamDecorator('Host'), 1 /* InternalInjectFlags.Host */);\n\nfunction getFactoryDef(type, throwNotFound) {\n    const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n    if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n        throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n    }\n    return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\n\n/**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n *     the array.\n */\nfunction arrayEquals(a, b, identityAccessor) {\n    if (a.length !== b.length)\n        return false;\n    for (let i = 0; i < a.length; i++) {\n        let valueA = a[i];\n        let valueB = b[i];\n        if (identityAccessor) {\n            valueA = identityAccessor(valueA);\n            valueB = identityAccessor(valueB);\n        }\n        if (valueB !== valueA) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Flattens an array.\n */\nfunction flatten(list) {\n    return list.flat(Number.POSITIVE_INFINITY);\n}\nfunction deepForEach(input, fn) {\n    input.forEach((value) => (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    const list = [];\n    for (let 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    const 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    let end = array.length;\n    while (end > index) {\n        const 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    let 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            const previousEnd = end - 2;\n            array[end] = array[previousEnd];\n            end--;\n        }\n        array[index] = value1;\n        array[index + 1] = value2;\n    }\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    let 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    const 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    const 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    let start = 0;\n    let end = array.length >> shift;\n    while (end !== start) {\n        const middle = start + ((end - start) >> 1); // find the middle.\n        const 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 * 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 */\nconst EMPTY_OBJ = {};\nconst 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 * A multi-provider token for initialization functions that will run upon construction of an\n * environment injector.\n *\n * @deprecated from v19.0.0, use provideEnvironmentInitializer instead\n *\n * @see {@link provideEnvironmentInitializer}\n *\n * Note: As opposed to the `APP_INITIALIZER` token, the `ENVIRONMENT_INITIALIZER` functions are not awaited,\n * hence they should not be `async`.\n *\n * @publicApi\n */\nconst ENVIRONMENT_INITIALIZER = new InjectionToken(ngDevMode ? 'ENVIRONMENT_INITIALIZER' : '');\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 */\nconst INJECTOR$1 = new InjectionToken(ngDevMode ? 'INJECTOR' : '', \n// Disable tslint because this is const enum which gets inlined not top level prop access.\n// tslint:disable-next-line: no-toplevel-property-access\n-1 /* InjectorMarkers.Injector */);\n\nconst INJECTOR_DEF_TYPES = new InjectionToken(ngDevMode ? 'INJECTOR_DEF_TYPES' : '');\n\nclass NullInjector {\n    get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n        if (notFoundValue === THROW_IF_NOT_FOUND) {\n            const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n            error.name = 'NullInjectorError';\n            throw error;\n        }\n        return notFoundValue;\n    }\n}\n\nfunction getNgModuleDef(type, throwNotFound) {\n    const ngModuleDef = type[NG_MOD_DEF] || null;\n    if (!ngModuleDef && throwNotFound === true) {\n        throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n    }\n    return ngModuleDef;\n}\n/**\n * The following getter methods retrieve the definition from 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$1(type) {\n    return type[NG_PIPE_DEF] || null;\n}\n/**\n * Checks whether a given Component, Directive or Pipe is marked as standalone.\n * This will return false if passed anything other than a Component, Directive, or Pipe class\n * See [this guide](guide/components/importing) for additional information:\n *\n * @param type A reference to a Component, Directive or Pipe.\n * @publicApi\n */\nfunction isStandalone(type) {\n    const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n    // TODO: standalone as default value (invert the condition)\n    return def !== null ? def.standalone : false;\n}\n\n/**\n * Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally\n * referenced in `@Component` in a component injector.\n */\nfunction makeEnvironmentProviders(providers) {\n    return {\n        ɵproviders: providers,\n    };\n}\n/**\n * @description\n * This function is used to provide initialization functions that will be executed upon construction\n * of an environment injector.\n *\n * Note that the provided initializer is run in the injection context.\n *\n * Previously, this was achieved using the `ENVIRONMENT_INITIALIZER` token which is now deprecated.\n *\n * @see {@link ENVIRONMENT_INITIALIZER}\n *\n * @usageNotes\n * The following example illustrates how to configure an initialization function using\n * `provideEnvironmentInitializer()`\n * ```ts\n * createEnvironmentInjector(\n *   [\n *     provideEnvironmentInitializer(() => {\n *       console.log('environment initialized');\n *     }),\n *   ],\n *   parentInjector\n * );\n * ```\n *\n * @publicApi\n */\nfunction provideEnvironmentInitializer(initializerFn) {\n    return makeEnvironmentProviders([\n        {\n            provide: ENVIRONMENT_INITIALIZER,\n            multi: true,\n            useValue: initializerFn,\n        },\n    ]);\n}\n/**\n * Collects providers from all NgModules and standalone components, including transitively imported\n * ones.\n *\n * Providers extracted via `importProvidersFrom` are only usable in an application injector or\n * another environment injector (such as a route injector). They should not be used in component\n * providers.\n *\n * More information about standalone components can be found in [this\n * guide](guide/components/importing).\n *\n * @usageNotes\n * The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:\n *\n * ```ts\n * await bootstrapApplication(RootComponent, {\n *   providers: [\n *     importProvidersFrom(NgModuleOne, NgModuleTwo)\n *   ]\n * });\n * ```\n *\n * You can also use the `importProvidersFrom` results in the `providers` field of a route, when a\n * standalone component is used:\n *\n * ```ts\n * export const ROUTES: Route[] = [\n *   {\n *     path: 'foo',\n *     providers: [\n *       importProvidersFrom(NgModuleOne, NgModuleTwo)\n *     ],\n *     component: YourStandaloneComponent\n *   }\n * ];\n * ```\n *\n * @returns Collected providers from the specified list of types.\n * @publicApi\n */\nfunction importProvidersFrom(...sources) {\n    return {\n        ɵproviders: internalImportProvidersFrom(true, sources),\n        ɵfromNgModule: true,\n    };\n}\nfunction internalImportProvidersFrom(checkForStandaloneCmp, ...sources) {\n    const providersOut = [];\n    const dedup = new Set(); // already seen types\n    let injectorTypesWithProviders;\n    const collectProviders = (provider) => {\n        providersOut.push(provider);\n    };\n    deepForEach(sources, (source) => {\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && checkForStandaloneCmp) {\n            const cmpDef = getComponentDef(source);\n            if (cmpDef?.standalone) {\n                throw new RuntimeError(800 /* RuntimeErrorCode.IMPORT_PROVIDERS_FROM_STANDALONE */, `Importing providers supports NgModule or ModuleWithProviders but got a standalone component \"${stringifyForError(source)}\"`);\n            }\n        }\n        // Narrow `source` to access the internal type analogue for `ModuleWithProviders`.\n        const internalSource = source;\n        if (walkProviderTree(internalSource, collectProviders, [], dedup)) {\n            injectorTypesWithProviders ||= [];\n            injectorTypesWithProviders.push(internalSource);\n        }\n    });\n    // Collect all providers from `ModuleWithProviders` types.\n    if (injectorTypesWithProviders !== undefined) {\n        processInjectorTypesWithProviders(injectorTypesWithProviders, collectProviders);\n    }\n    return providersOut;\n}\n/**\n * Collects all providers from the list of `ModuleWithProviders` and appends them to the provided\n * array.\n */\nfunction processInjectorTypesWithProviders(typesWithProviders, visitor) {\n    for (let i = 0; i < typesWithProviders.length; i++) {\n        const { ngModule, providers } = typesWithProviders[i];\n        deepForEachProvider(providers, (provider) => {\n            ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);\n            visitor(provider, ngModule);\n        });\n    }\n}\n/**\n * The logic visits an `InjectorType`, an `InjectorTypeWithProviders`, or a standalone\n * `ComponentType`, and all of its transitive providers and collects providers.\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 */\nfunction walkProviderTree(container, visitor, parents, dedup) {\n    container = resolveForwardRef(container);\n    if (!container)\n        return false;\n    // The actual type which had the definition. Usually `container`, but may be an unwrapped type\n    // from `InjectorTypeWithProviders`.\n    let defType = null;\n    let injDef = getInjectorDef(container);\n    const cmpDef = !injDef && getComponentDef(container);\n    if (!injDef && !cmpDef) {\n        // `container` is not an injector type or a component type. It might be:\n        //  * An `InjectorTypeWithProviders` that wraps an injector type.\n        //  * A standalone directive or pipe that got pulled in from a standalone component's\n        //    dependencies.\n        // Try to unwrap it as an `InjectorTypeWithProviders` first.\n        const ngModule = container\n            .ngModule;\n        injDef = getInjectorDef(ngModule);\n        if (injDef) {\n            defType = ngModule;\n        }\n        else {\n            // Not a component or injector type, so ignore it.\n            return false;\n        }\n    }\n    else if (cmpDef && !cmpDef.standalone) {\n        return false;\n    }\n    else {\n        defType = container;\n    }\n    // Check for circular dependencies.\n    if (ngDevMode && parents.indexOf(defType) !== -1) {\n        const defName = stringify(defType);\n        const path = parents.map(stringify);\n        throwCyclicDependencyError(defName, path);\n    }\n    // Check for multiple imports of the same module\n    const isDuplicate = dedup.has(defType);\n    if (cmpDef) {\n        if (isDuplicate) {\n            // This component definition has already been processed.\n            return false;\n        }\n        dedup.add(defType);\n        if (cmpDef.dependencies) {\n            const deps = typeof cmpDef.dependencies === 'function' ? cmpDef.dependencies() : cmpDef.dependencies;\n            for (const dep of deps) {\n                walkProviderTree(dep, visitor, parents, dedup);\n            }\n        }\n    }\n    else if (injDef) {\n        // First, include providers from any imports.\n        if (injDef.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            dedup.add(defType);\n            let importTypesWithProviders;\n            try {\n                deepForEach(injDef.imports, (imported) => {\n                    if (walkProviderTree(imported, visitor, parents, dedup)) {\n                        importTypesWithProviders ||= [];\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.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 !== undefined) {\n                processInjectorTypesWithProviders(importTypesWithProviders, visitor);\n            }\n        }\n        if (!isDuplicate) {\n            // Track the InjectorType and add a provider for it.\n            // It's important that this is done after the def's imports.\n            const factory = getFactoryDef(defType) || (() => new defType());\n            // Append extra providers to make more info available for consumers (to retrieve an injector\n            // type), as well as internally (to calculate an injection scope correctly and eagerly\n            // instantiate a `defType` when an injector is created).\n            // Provider to create `defType` using its factory.\n            visitor({ provide: defType, useFactory: factory, deps: EMPTY_ARRAY }, defType);\n            // Make this `defType` available to an internal logic that calculates injector scope.\n            visitor({ provide: INJECTOR_DEF_TYPES, useValue: defType, multi: true }, defType);\n            // Provider to eagerly instantiate `defType` via `INJECTOR_INITIALIZER`.\n            visitor({ provide: ENVIRONMENT_INITIALIZER, useValue: () => ɵɵinject(defType), multi: true }, defType);\n        }\n        // Next, include providers listed on the definition itself.\n        const defProviders = injDef.providers;\n        if (defProviders != null && !isDuplicate) {\n            const injectorType = container;\n            deepForEachProvider(defProviders, (provider) => {\n                ngDevMode && validateProvider(provider, defProviders, injectorType);\n                visitor(provider, injectorType);\n            });\n        }\n    }\n    else {\n        // Should not happen, but just in case.\n        return false;\n    }\n    return (defType !== container && container.providers !== undefined);\n}\nfunction validateProvider(provider, providers, containerType) {\n    if (isTypeProvider(provider) ||\n        isValueProvider(provider) ||\n        isFactoryProvider(provider) ||\n        isExistingProvider(provider)) {\n        return;\n    }\n    // Here we expect the provider to be a `useClass` provider (by elimination).\n    const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n    if (!classRef) {\n        throwInvalidProviderError(containerType, providers, provider);\n    }\n}\nfunction deepForEachProvider(providers, fn) {\n    for (let provider of providers) {\n        if (isEnvironmentProviders(provider)) {\n            provider = provider.ɵproviders;\n        }\n        if (Array.isArray(provider)) {\n            deepForEachProvider(provider, fn);\n        }\n        else {\n            fn(provider);\n        }\n    }\n}\nconst USE_VALUE$1 = getClosureSafeProperty({\n    provide: String,\n    useValue: getClosureSafeProperty,\n});\nfunction isValueProvider(value) {\n    return value !== null && typeof value == 'object' && USE_VALUE$1 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}\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 */\nconst INJECTOR_SCOPE = new InjectionToken(ngDevMode ? 'Set Injector scope.' : '');\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst 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 */\nconst CIRCULAR = {};\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR = undefined;\nfunction getNullInjector() {\n    if (NULL_INJECTOR === undefined) {\n        NULL_INJECTOR = new NullInjector();\n    }\n    return NULL_INJECTOR;\n}\n/**\n * An `Injector` that's part of the environment injector hierarchy, which exists outside of the\n * component tree.\n */\nclass EnvironmentInjector {\n}\nclass R3Injector extends EnvironmentInjector {\n    parent;\n    source;\n    scopes;\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    records = new Map();\n    /**\n     * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n     */\n    _ngOnDestroyHooks = new Set();\n    _onDestroyHooks = [];\n    /**\n     * Flag indicating that this injector was previously destroyed.\n     */\n    get destroyed() {\n        return this._destroyed;\n    }\n    _destroyed = false;\n    injectorDefTypes;\n    constructor(providers, parent, source, scopes) {\n        super();\n        this.parent = parent;\n        this.source = source;\n        this.scopes = scopes;\n        // Start off by creating Records for every provider.\n        forEachSingleProvider(providers, (provider) => this.processProvider(provider));\n        // Make sure the INJECTOR token provides this injector.\n        this.records.set(INJECTOR$1, makeRecord(undefined, this));\n        // And `EnvironmentInjector` if the current injector is supposed to be env-scoped.\n        if (scopes.has('environment')) {\n            this.records.set(EnvironmentInjector, makeRecord(undefined, this));\n        }\n        // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n        // any injectable scoped to APP_ROOT_SCOPE.\n        const record = this.records.get(INJECTOR_SCOPE);\n        if (record != null && typeof record.value === 'string') {\n            this.scopes.add(record.value);\n        }\n        this.injectorDefTypes = new Set(this.get(INJECTOR_DEF_TYPES, EMPTY_ARRAY, InjectFlags.Self));\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    destroy() {\n        assertNotDestroyed(this);\n        // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n        this._destroyed = true;\n        const prevConsumer = setActiveConsumer$1(null);\n        try {\n            // Call all the lifecycle hooks.\n            for (const service of this._ngOnDestroyHooks) {\n                service.ngOnDestroy();\n            }\n            const onDestroyHooks = this._onDestroyHooks;\n            // Reset the _onDestroyHooks array before iterating over it to prevent hooks that unregister\n            // themselves from mutating the array during iteration.\n            this._onDestroyHooks = [];\n            for (const hook of onDestroyHooks) {\n                hook();\n            }\n        }\n        finally {\n            // Release all references.\n            this.records.clear();\n            this._ngOnDestroyHooks.clear();\n            this.injectorDefTypes.clear();\n            setActiveConsumer$1(prevConsumer);\n        }\n    }\n    onDestroy(callback) {\n        assertNotDestroyed(this);\n        this._onDestroyHooks.push(callback);\n        return () => this.removeOnDestroy(callback);\n    }\n    runInContext(fn) {\n        assertNotDestroyed(this);\n        const previousInjector = setCurrentInjector(this);\n        const previousInjectImplementation = setInjectImplementation(undefined);\n        let prevInjectContext;\n        if (ngDevMode) {\n            prevInjectContext = setInjectorProfilerContext({ injector: this, token: null });\n        }\n        try {\n            return fn();\n        }\n        finally {\n            setCurrentInjector(previousInjector);\n            setInjectImplementation(previousInjectImplementation);\n            ngDevMode && setInjectorProfilerContext(prevInjectContext);\n        }\n    }\n    get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) {\n        assertNotDestroyed(this);\n        if (token.hasOwnProperty(NG_ENV_ID)) {\n            return token[NG_ENV_ID](this);\n        }\n        flags = convertToBitFlags(flags);\n        // Set the injection context.\n        let prevInjectContext;\n        if (ngDevMode) {\n            prevInjectContext = setInjectorProfilerContext({ injector: this, token: token });\n        }\n        const previousInjector = setCurrentInjector(this);\n        const previousInjectImplementation = setInjectImplementation(undefined);\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                let 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                    const 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                        if (ngDevMode) {\n                            runInInjectorProfilerContext(this, token, () => {\n                                emitProviderConfiguredEvent(token);\n                            });\n                        }\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            const 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 =\n                flags & InjectFlags.Optional && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue;\n            return nextInjector.get(token, notFoundValue);\n        }\n        catch (e) {\n            if (e.name === 'NullInjectorError') {\n                const 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, restore the previous injection context.\n            setInjectImplementation(previousInjectImplementation);\n            setCurrentInjector(previousInjector);\n            ngDevMode && setInjectorProfilerContext(prevInjectContext);\n        }\n    }\n    /** @internal */\n    resolveInjectorInitializers() {\n        const prevConsumer = setActiveConsumer$1(null);\n        const previousInjector = setCurrentInjector(this);\n        const previousInjectImplementation = setInjectImplementation(undefined);\n        let prevInjectContext;\n        if (ngDevMode) {\n            prevInjectContext = setInjectorProfilerContext({ injector: this, token: null });\n        }\n        try {\n            const initializers = this.get(ENVIRONMENT_INITIALIZER, EMPTY_ARRAY, InjectFlags.Self);\n            if (ngDevMode && !Array.isArray(initializers)) {\n                throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' +\n                    `(expected an array, but got ${typeof initializers}). ` +\n                    'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' +\n                    '`multi: true` provider.');\n            }\n            for (const initializer of initializers) {\n                initializer();\n            }\n        }\n        finally {\n            setCurrentInjector(previousInjector);\n            setInjectImplementation(previousInjectImplementation);\n            ngDevMode && setInjectorProfilerContext(prevInjectContext);\n            setActiveConsumer$1(prevConsumer);\n        }\n    }\n    toString() {\n        const tokens = [];\n        const records = this.records;\n        for (const token of records.keys()) {\n            tokens.push(stringify(token));\n        }\n        return `R3Injector[${tokens.join(', ')}]`;\n    }\n    /**\n     * Process a `SingleProvider` and add it.\n     */\n    processProvider(provider) {\n        // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n        // property.\n        provider = resolveForwardRef(provider);\n        let token = isTypeProvider(provider)\n            ? provider\n            : resolveForwardRef(provider && provider.provide);\n        // Construct a `Record` for the provider.\n        const record = providerToRecord(provider);\n        if (ngDevMode) {\n            runInInjectorProfilerContext(this, token, () => {\n                // Emit InjectorProfilerEventType.Create if provider is a value provider because\n                // these are the only providers that do not go through the value hydration logic\n                // where this event would normally be emitted from.\n                if (isValueProvider(provider)) {\n                    emitInstanceCreatedByInjectorEvent(provider.useValue);\n                }\n                emitProviderConfiguredEvent(provider);\n            });\n        }\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            let multiRecord = this.records.get(token);\n            if (multiRecord) {\n                // It has. Throw a nice error if\n                if (ngDevMode && multiRecord.multi === undefined) {\n                    throwMixedMultiProviderError();\n                }\n            }\n            else {\n                multiRecord = makeRecord(undefined, NOT_YET, true);\n                multiRecord.factory = () => injectArgs(multiRecord.multi);\n                this.records.set(token, multiRecord);\n            }\n            token = provider;\n            multiRecord.multi.push(provider);\n        }\n        else {\n            if (ngDevMode) {\n                const existing = this.records.get(token);\n                if (existing && existing.multi !== undefined) {\n                    throwMixedMultiProviderError();\n                }\n            }\n        }\n        this.records.set(token, record);\n    }\n    hydrate(token, record) {\n        const prevConsumer = setActiveConsumer$1(null);\n        try {\n            if (ngDevMode && record.value === CIRCULAR) {\n                throwCyclicDependencyError(stringify(token));\n            }\n            else if (record.value === NOT_YET) {\n                record.value = CIRCULAR;\n                if (ngDevMode) {\n                    runInInjectorProfilerContext(this, token, () => {\n                        record.value = record.factory();\n                        emitInstanceCreatedByInjectorEvent(record.value);\n                    });\n                }\n                else {\n                    record.value = record.factory();\n                }\n            }\n            if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n                this._ngOnDestroyHooks.add(record.value);\n            }\n            return record.value;\n        }\n        finally {\n            setActiveConsumer$1(prevConsumer);\n        }\n    }\n    injectableDefInScope(def) {\n        if (!def.providedIn) {\n            return false;\n        }\n        const providedIn = resolveForwardRef(def.providedIn);\n        if (typeof providedIn === 'string') {\n            return providedIn === 'any' || this.scopes.has(providedIn);\n        }\n        else {\n            return this.injectorDefTypes.has(providedIn);\n        }\n    }\n    removeOnDestroy(callback) {\n        const destroyCBIdx = this._onDestroyHooks.indexOf(callback);\n        if (destroyCBIdx !== -1) {\n            this._onDestroyHooks.splice(destroyCBIdx, 1);\n        }\n    }\n}\nfunction injectableDefOrInjectorDefFactory(token) {\n    // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n    const injectableDef = getInjectableDef(token);\n    const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n    if (factory !== null) {\n        return 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 RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Token ${stringify(token)} is missing a ɵprov 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 RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && 'unreachable');\n}\nfunction getUndecoratedInjectableFactory(token) {\n    // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n    const paramLength = token.length;\n    if (paramLength > 0) {\n        throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode &&\n            `Can't resolve all parameters for ${stringify(token)}: (${newArray(paramLength, '?').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    const inheritedInjectableDef = getInheritedInjectableDef(token);\n    if (inheritedInjectableDef !== null) {\n        return () => inheritedInjectableDef.factory(token);\n    }\n    else {\n        return () => new token();\n    }\n}\nfunction providerToRecord(provider) {\n    if (isValueProvider(provider)) {\n        return makeRecord(undefined, provider.useValue);\n    }\n    else {\n        const factory = providerToFactory(provider);\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    let factory = undefined;\n    if (ngDevMode && isEnvironmentProviders(provider)) {\n        throwInvalidProviderError(undefined, providers, provider);\n    }\n    if (isTypeProvider(provider)) {\n        const unwrappedProvider = resolveForwardRef(provider);\n        return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n    }\n    else {\n        if (isValueProvider(provider)) {\n            factory = () => resolveForwardRef(provider.useValue);\n        }\n        else if (isFactoryProvider(provider)) {\n            factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n        }\n        else if (isExistingProvider(provider)) {\n            factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n        }\n        else {\n            const classRef = resolveForwardRef(provider &&\n                (provider.useClass || provider.provide));\n            if (ngDevMode && !classRef) {\n                throwInvalidProviderError(ngModuleType, providers, provider);\n            }\n            if (hasDeps(provider)) {\n                factory = () => new classRef(...injectArgs(provider.deps));\n            }\n            else {\n                return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n            }\n        }\n    }\n    return factory;\n}\nfunction assertNotDestroyed(injector) {\n    if (injector.destroyed) {\n        throw new RuntimeError(205 /* RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED */, ngDevMode && 'Injector has already been destroyed.');\n    }\n}\nfunction makeRecord(factory, value, multi = false) {\n    return {\n        factory: factory,\n        value: value,\n        multi: multi ? [] : undefined,\n    };\n}\nfunction hasDeps(value) {\n    return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n    return (value !== null &&\n        typeof value === 'object' &&\n        typeof value.ngOnDestroy === 'function');\n}\nfunction couldBeInjectableType(value) {\n    return (typeof value === 'function' || (typeof value === 'object' && value instanceof InjectionToken));\n}\nfunction forEachSingleProvider(providers, fn) {\n    for (const provider of providers) {\n        if (Array.isArray(provider)) {\n            forEachSingleProvider(provider, fn);\n        }\n        else if (provider && isEnvironmentProviders(provider)) {\n            forEachSingleProvider(provider.ɵproviders, fn);\n        }\n        else {\n            fn(provider);\n        }\n    }\n}\n\n/**\n * Runs the given function in the [context](guide/di/dependency-injection-context) of the given\n * `Injector`.\n *\n * Within the function's stack frame, [`inject`](api/core/inject) can be used to inject dependencies\n * from the given `Injector`. Note that `inject` is only usable synchronously, and cannot be used in\n * any asynchronous callbacks or after any `await` points.\n *\n * @param injector the injector which will satisfy calls to [`inject`](api/core/inject) while `fn`\n *     is executing\n * @param fn the closure to be run in the context of `injector`\n * @returns the return value of the function, if any\n * @publicApi\n */\nfunction runInInjectionContext(injector, fn) {\n    if (injector instanceof R3Injector) {\n        assertNotDestroyed(injector);\n    }\n    let prevInjectorProfilerContext;\n    if (ngDevMode) {\n        prevInjectorProfilerContext = setInjectorProfilerContext({ injector, token: null });\n    }\n    const prevInjector = setCurrentInjector(injector);\n    const previousInjectImplementation = setInjectImplementation(undefined);\n    try {\n        return fn();\n    }\n    finally {\n        setCurrentInjector(prevInjector);\n        ngDevMode && setInjectorProfilerContext(prevInjectorProfilerContext);\n        setInjectImplementation(previousInjectImplementation);\n    }\n}\n/**\n * Whether the current stack frame is inside an injection context.\n */\nfunction isInInjectionContext() {\n    return getInjectImplementation() !== undefined || getCurrentInjector() != null;\n}\n/**\n * Asserts that the current stack frame is within an [injection\n * context](guide/di/dependency-injection-context) and has access to `inject`.\n *\n * @param debugFn a reference to the function making the assertion (used for the error message).\n *\n * @publicApi\n */\nfunction assertInInjectionContext(debugFn) {\n    // Taking a `Function` instead of a string name here prevents the unminified name of the function\n    // from being retained in the bundle regardless of minification.\n    if (!isInInjectionContext()) {\n        throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode &&\n            debugFn.name +\n                '() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`');\n    }\n}\n\nvar FactoryTarget;\n(function (FactoryTarget) {\n    FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n    FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n    FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n    FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n    FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(FactoryTarget || (FactoryTarget = {}));\nvar R3TemplateDependencyKind;\n(function (R3TemplateDependencyKind) {\n    R3TemplateDependencyKind[R3TemplateDependencyKind[\"Directive\"] = 0] = \"Directive\";\n    R3TemplateDependencyKind[R3TemplateDependencyKind[\"Pipe\"] = 1] = \"Pipe\";\n    R3TemplateDependencyKind[R3TemplateDependencyKind[\"NgModule\"] = 2] = \"NgModule\";\n})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));\nvar ViewEncapsulation$1;\n(function (ViewEncapsulation) {\n    ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n    // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n    ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n    ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation$1 || (ViewEncapsulation$1 = {}));\n\nfunction getCompilerFacade(request) {\n    const globalNg = _global['ng'];\n    if (globalNg && globalNg.ɵcompilerFacade) {\n        return globalNg.ɵcompilerFacade;\n    }\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        // Log the type as an error so that a developer can easily navigate to the type from the\n        // console.\n        console.error(`JIT compilation failed for ${request.kind}`, request.type);\n        let message = `The ${request.kind} '${request.type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n`;\n        if (request.usage === 1 /* JitCompilerUsage.PartialDeclaration */) {\n            message += `The ${request.kind} is part of a library that has been partially compiled.\\n`;\n            message += `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n`;\n            message += '\\n';\n            message += `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n`;\n        }\n        else {\n            message += `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n`;\n        }\n        message += `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n`;\n        message += `or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`;\n        throw new Error(message);\n    }\n    else {\n        throw new Error('JIT compiler unavailable');\n    }\n}\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 */\nconst angularCoreDiEnv = {\n    'ɵɵdefineInjectable': ɵɵdefineInjectable,\n    'ɵɵdefineInjector': ɵɵdefineInjector,\n    'ɵɵinject': ɵɵinject,\n    'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n    'resolveForwardRef': resolveForwardRef,\n};\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 represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nconst Type = Function;\nfunction isType(v) {\n    return typeof v === 'function';\n}\n\n/*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\n */\n/**\n * Regular expression that detects pass-through constructors for ES5 output. This Regex\n * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also\n * it intends to capture the pattern where existing constructors have been downleveled from\n * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.\n *\n * ```ts\n *   function MyClass() {\n *     var _this = _super.apply(this, arguments) || this;\n * ```\n *\n * downleveled to ES5 with `downlevelIteration` for TypeScript < 4.2:\n * ```ts\n *   function MyClass() {\n *     var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * or downleveled to ES5 with `downlevelIteration` for TypeScript >= 4.2:\n * ```ts\n *   function MyClass() {\n *     var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\nconst ES5_DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|(?:[^()]+\\(\\[\\],)?[^()]+\\(arguments\\).*)\\)/;\n/** Regular expression that detects ES2015 classes which extend from other classes. */\nconst ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes and\n * have an explicit constructor defined.\n */\nconst ES2015_INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes\n * and inherit a constructor.\n */\nconst ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\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 (ES5_DELEGATE_CTOR.test(typeStr) ||\n        ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n        (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr)));\n}\nclass ReflectionCapabilities {\n    _reflect;\n    constructor(reflect) {\n        this._reflect = reflect || _global['Reflect'];\n    }\n    factory(t) {\n        return (...args) => new t(...args);\n    }\n    /** @internal */\n    _zipTypesAndAnnotations(paramTypes, paramAnnotations) {\n        let result;\n        if (typeof paramTypes === 'undefined') {\n            result = newArray(paramAnnotations.length);\n        }\n        else {\n            result = newArray(paramTypes.length);\n        }\n        for (let 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    _ownParameters(type, parentCtor) {\n        const 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        const 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            const ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n            const paramTypes = ctorParameters.map((ctorParam) => ctorParam && ctorParam.type);\n            const paramAnnotations = ctorParameters.map((ctorParam) => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n            return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n        }\n        // API for metadata created by invoking the decorators.\n        const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n        const paramTypes = this._reflect &&\n            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    parameters(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        const parentCtor = getParentCtor(type);\n        let parameters = this._ownParameters(type, parentCtor);\n        if (!parameters && parentCtor !== Object) {\n            parameters = this.parameters(parentCtor);\n        }\n        return parameters || [];\n    }\n    _ownAnnotations(typeOrFunc, parentCtor) {\n        // Prefer the direct API.\n        if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n            let 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    annotations(typeOrFunc) {\n        if (!isType(typeOrFunc)) {\n            return [];\n        }\n        const parentCtor = getParentCtor(typeOrFunc);\n        const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n        const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n        return parentAnnotations.concat(ownAnnotations);\n    }\n    _ownPropMetadata(typeOrFunc, parentCtor) {\n        // Prefer the direct API.\n        if (typeOrFunc.propMetadata &&\n            typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n            let 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            const propDecorators = typeOrFunc.propDecorators;\n            const propMetadata = {};\n            Object.keys(propDecorators).forEach((prop) => {\n                propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n            });\n            return propMetadata;\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    propMetadata(typeOrFunc) {\n        if (!isType(typeOrFunc)) {\n            return {};\n        }\n        const parentCtor = getParentCtor(typeOrFunc);\n        const propMetadata = {};\n        if (parentCtor !== Object) {\n            const parentPropMetadata = this.propMetadata(parentCtor);\n            Object.keys(parentPropMetadata).forEach((propName) => {\n                propMetadata[propName] = parentPropMetadata[propName];\n            });\n        }\n        const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n        if (ownPropMetadata) {\n            Object.keys(ownPropMetadata).forEach((propName) => {\n                const decorators = [];\n                if (propMetadata.hasOwnProperty(propName)) {\n                    decorators.push(...propMetadata[propName]);\n                }\n                decorators.push(...ownPropMetadata[propName]);\n                propMetadata[propName] = decorators;\n            });\n        }\n        return propMetadata;\n    }\n    ownPropMetadata(typeOrFunc) {\n        if (!isType(typeOrFunc)) {\n            return {};\n        }\n        return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n    }\n    hasLifecycleHook(type, lcProperty) {\n        return type instanceof Type && lcProperty in type.prototype;\n    }\n}\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n    if (!decoratorInvocations) {\n        return [];\n    }\n    return decoratorInvocations.map((decoratorInvocation) => {\n        const decoratorType = decoratorInvocation.type;\n        const annotationCls = decoratorType.annotationCls;\n        const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n        return new annotationCls(...annotationArgs);\n    });\n}\nfunction getParentCtor(ctor) {\n    const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n    const 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// 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.\nconst HOST = 0;\nconst TVIEW = 1;\n// Shared with LContainer\nconst FLAGS = 2;\nconst PARENT = 3;\nconst NEXT = 4;\nconst T_HOST = 5;\n// End shared with LContainer\nconst HYDRATION = 6;\nconst CLEANUP = 7;\nconst CONTEXT = 8;\nconst INJECTOR = 9;\nconst ENVIRONMENT = 10;\nconst RENDERER = 11;\nconst CHILD_HEAD = 12;\nconst CHILD_TAIL = 13;\n// FIXME(misko): Investigate if the three declarations aren't all same thing.\nconst DECLARATION_VIEW = 14;\nconst DECLARATION_COMPONENT_VIEW = 15;\nconst DECLARATION_LCONTAINER = 16;\nconst PREORDER_HOOK_FLAGS = 17;\nconst QUERIES = 18;\nconst ID = 19;\nconst EMBEDDED_VIEW_INJECTOR = 20;\nconst ON_DESTROY_HOOKS = 21;\nconst EFFECTS_TO_SCHEDULE = 22;\nconst EFFECTS = 23;\nconst REACTIVE_TEMPLATE_CONSUMER = 24;\n/**\n * Size of LView's header. Necessary to adjust for it when setting slots.\n *\n * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate\n * instruction index into `LView` index. All other indexes should be in the `LView` index space and\n * there should be no need to refer to `HEADER_OFFSET` anywhere else.\n */\nconst HEADER_OFFSET = 25;\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 */\nconst 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// FLAGS, PARENT, NEXT, and T_HOST are indices 2, 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\nconst DEHYDRATED_VIEWS = 6;\nconst NATIVE = 7;\nconst VIEW_REFS = 8;\nconst 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 */\nconst CONTAINER_HEADER_OFFSET = 10;\n/** Flags associated with an LContainer (saved in LContainer[FLAGS]) */\nvar LContainerFlags;\n(function (LContainerFlags) {\n    LContainerFlags[LContainerFlags[\"None\"] = 0] = \"None\";\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`.\n     */\n    LContainerFlags[LContainerFlags[\"HasTransplantedViews\"] = 2] = \"HasTransplantedViews\";\n})(LContainerFlags || (LContainerFlags = {}));\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 & 4 /* TNodeFlags.hasContentQuery */) !== 0;\n}\nfunction isComponentHost(tNode) {\n    return tNode.componentOffset > -1;\n}\nfunction isDirectiveHost(tNode) {\n    return (tNode.flags & 1 /* TNodeFlags.isDirectiveHost */) === 1 /* TNodeFlags.isDirectiveHost */;\n}\nfunction isComponentDef(def) {\n    return !!def.template;\n}\nfunction isRootView(target) {\n    return (target[FLAGS] & 512 /* LViewFlags.IsRoot */) !== 0;\n}\nfunction isProjectionTNode(tNode) {\n    return (tNode.type & 16 /* TNodeType.Projection */) === 16 /* TNodeType.Projection */;\n}\nfunction hasI18n(lView) {\n    return (lView[FLAGS] & 32 /* LViewFlags.HasI18n */) === 32 /* LViewFlags.HasI18n */;\n}\nfunction isDestroyed(lView) {\n    return (lView[FLAGS] & 256 /* LViewFlags.Destroyed */) === 256 /* LViewFlags.Destroyed */;\n}\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    assertTNodeForTView(tNode, lView[TVIEW]);\n}\nfunction assertTNodeForTView(tNode, tView) {\n    assertTNode(tNode);\n    const tData = tView.data;\n    for (let i = HEADER_OFFSET; i < tData.length; i++) {\n        if (tData[i] === tNode) {\n            return;\n        }\n    }\n    throwError('This TNode does not belong to this TView.');\n}\nfunction assertTNode(tNode) {\n    assertDefined(tNode, 'TNode must be defined');\n    if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n        throwError('Not of type TNode, got: ' + tNode);\n    }\n}\nfunction assertTIcu(tIcu) {\n    assertDefined(tIcu, 'Expected TIcu to be defined');\n    if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n        throwError('Object is not of TIcu type.');\n    }\n}\nfunction assertComponentType(actual, 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 = \"Type passed in is not NgModuleType, it does not have 'ɵmod' property.\") {\n    if (!getNgModuleDef(actual)) {\n        throwError(msg);\n    }\n}\nfunction assertCurrentTNodeIsParent(isParent) {\n    assertEqual(isParent, true, 'currentTNode should be a parent');\n}\nfunction assertHasParent(tNode) {\n    assertDefined(tNode, 'currentTNode should exist!');\n    assertDefined(tNode.parent, 'currentTNode should have a parent');\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}\nfunction assertIndexInDeclRange(tView, index) {\n    assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\nfunction assertIndexInExpandoRange(lView, index) {\n    const tView = lView[1];\n    assertBetween(tView.expandoStartIndex, lView.length, index);\n}\nfunction assertBetween(lower, upper, index) {\n    if (!(lower <= index && index < upper)) {\n        throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n    }\n}\nfunction assertProjectionSlots(lView, errMessage) {\n    assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n    assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage ||\n        'Components with projection nodes (<ng-content>) must have projection slots defined.');\n}\nfunction assertParentView(lView, errMessage) {\n    assertDefined(lView, errMessage || \"Component views should always have a parent view (component's host view)\");\n}\nfunction assertNoDuplicateDirectives(directives) {\n    // The array needs at least two elements in order to have duplicates.\n    if (directives.length < 2) {\n        return;\n    }\n    const seenDirectives = new Set();\n    for (const current of directives) {\n        if (seenDirectives.has(current)) {\n            throw new RuntimeError(309 /* RuntimeErrorCode.DUPLICATE_DIRECTIVE */, `Directive ${current.type.name} matches multiple times on the same element. ` +\n                `Directives can only match an element once.`);\n        }\n        seenDirectives.add(current);\n    }\n}\n/**\n * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a\n * NodeInjector data structure.\n *\n * @param lView `LView` which should be checked.\n * @param injectorIndex index into the `LView` where the `NodeInjector` is expected.\n */\nfunction assertNodeInjector(lView, injectorIndex) {\n    assertIndexInExpandoRange(lView, injectorIndex);\n    assertIndexInExpandoRange(lView, injectorIndex + 8 /* NodeInjectorOffset.PARENT */);\n    assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');\n    assertNumber(lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */], 'injectorIndex should point to parent injector');\n}\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 {@link OnChanges}\n *\n * @publicApi\n */\nclass SimpleChange {\n    previousValue;\n    currentValue;\n    firstChange;\n    constructor(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    isFirstChange() {\n        return this.firstChange;\n    }\n}\n\nfunction applyValueToInputField(instance, inputSignalNode, privateName, value) {\n    if (inputSignalNode !== null) {\n        inputSignalNode.applyValueToInputSignal(inputSignalNode, value);\n    }\n    else {\n        instance[privateName] = value;\n    }\n}\n\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```ts\n * static ɵcmp = defineComponent({\n *   ...\n *   inputs: {name: 'publicName'},\n *   features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nconst ɵɵNgOnChangesFeature = /* @__PURE__ */ (() => {\n    const ɵɵNgOnChangesFeatureImpl = () => NgOnChangesFeatureImpl;\n    // This option ensures that the ngOnChanges lifecycle hook will be inherited\n    // from superclasses (in InheritDefinitionFeature).\n    /** @nocollapse */\n    ɵɵNgOnChangesFeatureImpl.ngInherit = true;\n    return ɵɵNgOnChangesFeatureImpl;\n})();\nfunction NgOnChangesFeatureImpl(definition) {\n    if (definition.type.prototype.ngOnChanges) {\n        definition.setInput = ngOnChangesSetInput;\n    }\n    return rememberChangeHistoryAndInvokeOnChangesHook;\n}\n/**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n *     it is guaranteed to be called with component instance.\n */\nfunction rememberChangeHistoryAndInvokeOnChangesHook() {\n    const simpleChangesStore = getSimpleChangesStore(this);\n    const current = simpleChangesStore?.current;\n    if (current) {\n        const 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 (let key in current) {\n                previous[key] = current[key];\n            }\n        }\n        simpleChangesStore.current = null;\n        this.ngOnChanges(current);\n    }\n}\nfunction ngOnChangesSetInput(instance, inputSignalNode, value, publicName, privateName) {\n    const declaredName = this.declaredInputs[publicName];\n    ngDevMode && assertString(declaredName, 'Name of input in ngOnChanges has to be a string');\n    const simpleChangesStore = getSimpleChangesStore(instance) ||\n        setSimpleChangesStore(instance, { previous: EMPTY_OBJ, current: null });\n    const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n    const previous = simpleChangesStore.previous;\n    const previousChange = previous[declaredName];\n    current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n    applyValueToInputField(instance, inputSignalNode, privateName, value);\n}\nconst 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\nlet profilerCallback = null;\n/**\n * Sets the callback function which will be invoked before and after performing certain actions at\n * runtime (for example, before and after running change detection).\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nconst setProfiler = (profiler) => {\n    profilerCallback = profiler;\n};\n/**\n * Profiler function which wraps user code executed by the runtime.\n *\n * @param event ProfilerEvent corresponding to the execution context\n * @param instance component instance\n * @param hookOrListener lifecycle hook function or output listener. The value depends on the\n *  execution context\n * @returns\n */\nconst profiler = function (event, instance, hookOrListener) {\n    if (profilerCallback != null /* both `null` and `undefined` */) {\n        profilerCallback(event, instance, hookOrListener);\n    }\n};\n\nconst SVG_NAMESPACE = 'svg';\nconst MATH_ML_NAMESPACE = 'math';\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 * 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    ngDevMode && assertIndexInRange(lView, index);\n    ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n    return unwrapRNode(lView[index]);\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 && assertIndexInRange(lView, tNode.index);\n    const node = unwrapRNode(lView[tNode.index]);\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    const index = tNode === null ? -1 : tNode.index;\n    if (index !== -1) {\n        ngDevMode && assertTNodeForLView(tNode, lView);\n        const node = unwrapRNode(lView[index]);\n        return node;\n    }\n    return null;\n}\n// fixme(misko): The return Type should be `TNode|null`\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    const tNode = tView.data[index];\n    ngDevMode && tNode !== null && assertTNode(tNode);\n    return tNode;\n}\n/** Retrieves a value from any `LView` or `TData`. */\nfunction load(view, index) {\n    ngDevMode && assertIndexInRange(view, index);\n    return view[index];\n}\nfunction getComponentLViewByIndex(nodeIndex, hostView) {\n    // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n    ngDevMode && assertIndexInRange(hostView, nodeIndex);\n    const slotValue = hostView[nodeIndex];\n    const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n    return lView;\n}\n/** Checks whether a given view is in creation mode */\nfunction isCreationMode(view) {\n    return (view[FLAGS] & 4 /* LViewFlags.CreationMode */) === 4 /* LViewFlags.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 /* LViewFlags.Attached */) === 128 /* LViewFlags.Attached */;\n}\n/** Returns a boolean for whether the view is attached to a container. */\nfunction viewAttachedToContainer(view) {\n    return isLContainer(view[PARENT]);\n}\nfunction getConstant(consts, index) {\n    if (index === null || index === undefined)\n        return null;\n    ngDevMode && assertIndexInRange(consts, index);\n    return 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 * Adds the `RefreshView` flag from the lView and updates HAS_CHILD_VIEWS_TO_REFRESH flag of\n * parents.\n */\nfunction markViewForRefresh(lView) {\n    if (lView[FLAGS] & 1024 /* LViewFlags.RefreshView */) {\n        return;\n    }\n    lView[FLAGS] |= 1024 /* LViewFlags.RefreshView */;\n    if (viewAttachedToChangeDetector(lView)) {\n        markAncestorsForTraversal(lView);\n    }\n}\n/**\n * Walks up the LView hierarchy.\n * @param nestingLevel Number of times to walk up in hierarchy.\n * @param currentView View from which to start the lookup.\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}\nfunction requiresRefreshOrTraversal(lView) {\n    return !!(lView[FLAGS] & (1024 /* LViewFlags.RefreshView */ | 8192 /* LViewFlags.HasChildViewsToRefresh */) ||\n        lView[REACTIVE_TEMPLATE_CONSUMER]?.dirty);\n}\n/**\n * Updates the `HasChildViewsToRefresh` flag on the parents of the `LView` as well as the\n * parents above.\n */\nfunction updateAncestorTraversalFlagsOnAttach(lView) {\n    lView[ENVIRONMENT].changeDetectionScheduler?.notify(9 /* NotificationSource.ViewAttached */);\n    if (lView[FLAGS] & 64 /* LViewFlags.Dirty */) {\n        lView[FLAGS] |= 1024 /* LViewFlags.RefreshView */;\n    }\n    if (requiresRefreshOrTraversal(lView)) {\n        markAncestorsForTraversal(lView);\n    }\n}\n/**\n * Ensures views above the given `lView` are traversed during change detection even when they are\n * not dirty.\n *\n * This is done by setting the `HAS_CHILD_VIEWS_TO_REFRESH` flag up to the root, stopping when the\n * flag is already `true` or the `lView` is detached.\n */\nfunction markAncestorsForTraversal(lView) {\n    lView[ENVIRONMENT].changeDetectionScheduler?.notify(0 /* NotificationSource.MarkAncestorsForTraversal */);\n    let parent = getLViewParent(lView);\n    while (parent !== null) {\n        // We stop adding markers to the ancestors once we reach one that already has the marker. This\n        // is to avoid needlessly traversing all the way to the root when the marker already exists.\n        if (parent[FLAGS] & 8192 /* LViewFlags.HasChildViewsToRefresh */) {\n            break;\n        }\n        parent[FLAGS] |= 8192 /* LViewFlags.HasChildViewsToRefresh */;\n        if (!viewAttachedToChangeDetector(parent)) {\n            break;\n        }\n        parent = getLViewParent(parent);\n    }\n}\n/**\n * Stores a LView-specific destroy callback.\n */\nfunction storeLViewOnDestroy(lView, onDestroyCallback) {\n    if ((lView[FLAGS] & 256 /* LViewFlags.Destroyed */) === 256 /* LViewFlags.Destroyed */) {\n        throw new RuntimeError(911 /* RuntimeErrorCode.VIEW_ALREADY_DESTROYED */, ngDevMode && 'View has already been destroyed.');\n    }\n    if (lView[ON_DESTROY_HOOKS] === null) {\n        lView[ON_DESTROY_HOOKS] = [];\n    }\n    lView[ON_DESTROY_HOOKS].push(onDestroyCallback);\n}\n/**\n * Removes previously registered LView-specific destroy callback.\n */\nfunction removeLViewOnDestroy(lView, onDestroyCallback) {\n    if (lView[ON_DESTROY_HOOKS] === null)\n        return;\n    const destroyCBIdx = lView[ON_DESTROY_HOOKS].indexOf(onDestroyCallback);\n    if (destroyCBIdx !== -1) {\n        lView[ON_DESTROY_HOOKS].splice(destroyCBIdx, 1);\n    }\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    const parent = lView[PARENT];\n    return isLContainer(parent) ? parent[PARENT] : parent;\n}\n\nconst instructionState = {\n    lFrame: createLFrame(null),\n    bindingsEnabled: true,\n    skipHydrationRootTNode: null,\n};\nvar CheckNoChangesMode;\n(function (CheckNoChangesMode) {\n    CheckNoChangesMode[CheckNoChangesMode[\"Off\"] = 0] = \"Off\";\n    CheckNoChangesMode[CheckNoChangesMode[\"Exhaustive\"] = 1] = \"Exhaustive\";\n    CheckNoChangesMode[CheckNoChangesMode[\"OnlyDirtyViews\"] = 2] = \"OnlyDirtyViews\";\n})(CheckNoChangesMode || (CheckNoChangesMode = {}));\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n *\n * The `checkNoChanges` function is invoked only in ngDevMode=true and verifies that no unintended\n * changes exist in the change detector or its children.\n */\nlet _checkNoChangesMode = 0; /* CheckNoChangesMode.Off */\n/**\n * Flag used to indicate that we are in the middle running change detection on a view\n *\n * @see detectChangesInViewWhileDirty\n */\nlet _isRefreshingViews = false;\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\nfunction specOnlyIsInstructionStateEmpty() {\n    return instructionState.lFrame.parent === null;\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 * Returns true if currently inside a skip hydration block.\n * @returns boolean\n */\nfunction isInSkipHydrationBlock$1() {\n    return instructionState.skipHydrationRootTNode !== null;\n}\n/**\n * Returns true if this is the root TNode of the skip hydration block.\n * @param tNode the current TNode\n * @returns boolean\n */\nfunction isSkipHydrationRootTNode(tNode) {\n    return instructionState.skipHydrationRootTNode === tNode;\n}\n/**\n * Enables directive matching on elements.\n *\n *  * Example:\n * ```html\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 * Sets a flag to specify that the TNode is in a skip hydration block.\n * @param tNode the current TNode\n */\nfunction enterSkipHydrationBlock(tNode) {\n    instructionState.skipHydrationRootTNode = tNode;\n}\n/**\n * Disables directive matching on element.\n *\n *  * Example:\n * ```html\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 * Clears the root skip hydration node when leaving a skip hydration block.\n */\nfunction leaveSkipHydrationBlock() {\n    instructionState.skipHydrationRootTNode = null;\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 * @returns Context of the restored OpaqueViewState instance.\n *\n * @codeGenApi\n */\nfunction ɵɵrestoreView(viewToRestore) {\n    instructionState.lFrame.contextLView = viewToRestore;\n    return viewToRestore[CONTEXT];\n}\n/**\n * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in\n * value so that it can be used as a return value of an instruction.\n *\n * @codeGenApi\n */\nfunction ɵɵresetView(value) {\n    instructionState.lFrame.contextLView = null;\n    return value;\n}\nfunction getCurrentTNode() {\n    let currentTNode = getCurrentTNodePlaceholderOk();\n    while (currentTNode !== null && currentTNode.type === 64 /* TNodeType.Placeholder */) {\n        currentTNode = currentTNode.parent;\n    }\n    return currentTNode;\n}\nfunction getCurrentTNodePlaceholderOk() {\n    return instructionState.lFrame.currentTNode;\n}\nfunction getCurrentParentTNode() {\n    const lFrame = instructionState.lFrame;\n    const currentTNode = lFrame.currentTNode;\n    return lFrame.isParent ? currentTNode : currentTNode.parent;\n}\nfunction setCurrentTNode(tNode, isParent) {\n    ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n    const lFrame = instructionState.lFrame;\n    lFrame.currentTNode = tNode;\n    lFrame.isParent = isParent;\n}\nfunction isCurrentTNodeParent() {\n    return instructionState.lFrame.isParent;\n}\nfunction setCurrentTNodeAsNotParent() {\n    instructionState.lFrame.isParent = false;\n}\nfunction getContextLView() {\n    const contextLView = instructionState.lFrame.contextLView;\n    ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');\n    return contextLView;\n}\nfunction isInCheckNoChangesMode() {\n    !ngDevMode && throwError('Must never be called in production mode');\n    return _checkNoChangesMode !== CheckNoChangesMode.Off;\n}\nfunction isExhaustiveCheckNoChanges() {\n    !ngDevMode && throwError('Must never be called in production mode');\n    return _checkNoChangesMode === CheckNoChangesMode.Exhaustive;\n}\nfunction setIsInCheckNoChangesMode(mode) {\n    !ngDevMode && throwError('Must never be called in production mode');\n    _checkNoChangesMode = mode;\n}\nfunction isRefreshingViews() {\n    return _isRefreshingViews;\n}\nfunction setIsRefreshingViews(mode) {\n    const prev = _isRefreshingViews;\n    _isRefreshingViews = mode;\n    return prev;\n}\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nfunction getBindingRoot() {\n    const lFrame = instructionState.lFrame;\n    let 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    const lFrame = instructionState.lFrame;\n    const index = lFrame.bindingIndex;\n    lFrame.bindingIndex = lFrame.bindingIndex + count;\n    return index;\n}\nfunction isInI18nBlock() {\n    return instructionState.lFrame.inI18n;\n}\nfunction setInI18nBlock(isInI18nBlock) {\n    instructionState.lFrame.inI18n = isInI18nBlock;\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    const 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    const 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 * Returns a `TNode` of the location where the current `LView` is declared at.\n *\n * @param lView an `LView` that we want to find parent `TNode` for.\n */\nfunction getDeclarationTNode(lView) {\n    const tView = lView[TVIEW];\n    // Return the declaration parent for embedded views\n    if (tView.type === 2 /* TViewType.Embedded */) {\n        ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n        return tView.declTNode;\n    }\n    // Components don't have `TView.declTNode` because each instance of component could be\n    // inserted in different location, hence `TView.declTNode` is meaningless.\n    // Falling back to `T_HOST` in case we cross component boundary.\n    if (tView.type === 1 /* TViewType.Component */) {\n        return lView[T_HOST];\n    }\n    // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n    return null;\n}\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n *\n * @param lView `LView` location of the DI context.\n * @param tNode `TNode` for DI context\n * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration\n *     tree from `tNode`  until we find parent declared `TElementNode`.\n * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared\n *     `TNode` if `flags` has  `SkipSelf`). Failing to enter DI implies that no associated\n *     `NodeInjector` can be found and we should instead use `ModuleInjector`.\n *     - If `true` than this call must be fallowed by `leaveDI`\n *     - If `false` than this call failed and we should NOT call `leaveDI`\n */\nfunction enterDI(lView, tNode, flags) {\n    ngDevMode && assertLViewOrUndefined(lView);\n    if (flags & InjectFlags.SkipSelf) {\n        ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n        let parentTNode = tNode;\n        let parentLView = lView;\n        while (true) {\n            ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n            parentTNode = parentTNode.parent;\n            if (parentTNode === null && !(flags & InjectFlags.Host)) {\n                parentTNode = getDeclarationTNode(parentLView);\n                if (parentTNode === null)\n                    break;\n                // In this case, a parent exists and is definitely an element. So it will definitely\n                // have an existing lView as the declaration view, which is why we can assume it's defined.\n                ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n                parentLView = parentLView[DECLARATION_VIEW];\n                // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives\n                // We want to skip those and look only at Elements and ElementContainers to ensure\n                // we're looking at true parent nodes, and not content or other types.\n                if (parentTNode.type & (2 /* TNodeType.Element */ | 8 /* TNodeType.ElementContainer */)) {\n                    break;\n                }\n            }\n            else {\n                break;\n            }\n        }\n        if (parentTNode === null) {\n            // If we failed to find a parent TNode this means that we should use module injector.\n            return false;\n        }\n        else {\n            tNode = parentTNode;\n            lView = parentLView;\n        }\n    }\n    ngDevMode && assertTNodeForLView(tNode, lView);\n    const lFrame = (instructionState.lFrame = allocLFrame());\n    lFrame.currentTNode = tNode;\n    lFrame.lView = lView;\n    return true;\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 * @returns the previously active lView;\n */\nfunction enterView(newView) {\n    ngDevMode && assertNotEqual(newView[0], newView[1], '????');\n    ngDevMode && assertLViewOrUndefined(newView);\n    const 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, -1, '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.bindingRootIndex, -1, 'Expected clean LFrame');\n        assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n    }\n    const tView = newView[TVIEW];\n    instructionState.lFrame = newLFrame;\n    ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n    newLFrame.currentTNode = tView.firstChild;\n    newLFrame.lView = newView;\n    newLFrame.tView = tView;\n    newLFrame.contextLView = newView;\n    newLFrame.bindingIndex = tView.bindingStartIndex;\n    newLFrame.inI18n = false;\n}\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n    const currentLFrame = instructionState.lFrame;\n    const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n    const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n    return newLFrame;\n}\nfunction createLFrame(parent) {\n    const lFrame = {\n        currentTNode: null,\n        isParent: true,\n        lView: null,\n        tView: null,\n        selectedIndex: -1,\n        contextLView: null,\n        elementDepthCount: 0,\n        currentNamespace: null,\n        currentDirectiveIndex: -1,\n        bindingRootIndex: -1,\n        bindingIndex: -1,\n        currentQueryIndex: 0,\n        parent: parent,\n        child: null,\n        inI18n: false,\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 `currentTNode` 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    const oldLFrame = instructionState.lFrame;\n    instructionState.lFrame = oldLFrame.parent;\n    oldLFrame.currentTNode = 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 */\nconst 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    const oldLFrame = leaveViewLight();\n    oldLFrame.isParent = true;\n    oldLFrame.tView = null;\n    oldLFrame.selectedIndex = -1;\n    oldLFrame.contextLView = null;\n    oldLFrame.elementDepthCount = 0;\n    oldLFrame.currentDirectiveIndex = -1;\n    oldLFrame.currentNamespace = null;\n    oldLFrame.bindingRootIndex = -1;\n    oldLFrame.bindingIndex = -1;\n    oldLFrame.currentQueryIndex = 0;\n}\nfunction nextContextImpl(level) {\n    const contextLView = (instructionState.lFrame.contextLView = walkUpViews(level, instructionState.lFrame.contextLView));\n    return contextLView[CONTEXT];\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    ngDevMode &&\n        index !== -1 &&\n        assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n    ngDevMode &&\n        assertLessThan(index, instructionState.lFrame.lView.length, \"Can't set index passed end of LView\");\n    instructionState.lFrame.selectedIndex = index;\n}\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nfunction getSelectedTNode() {\n    const 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$1() {\n    return instructionState.lFrame.currentNamespace;\n}\nlet _wasLastNodeCreated = true;\n/**\n * Retrieves a global flag that indicates whether the most recent DOM node\n * was created or hydrated.\n */\nfunction wasLastNodeCreated() {\n    return _wasLastNodeCreated;\n}\n/**\n * Sets a global flag to indicate whether the most recent DOM node\n * was created or hydrated.\n */\nfunction lastNodeWasCreated(flag) {\n    _wasLastNodeCreated = flag;\n}\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    const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype;\n    if (ngOnChanges) {\n        const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n        (tView.preOrderHooks ??= []).push(directiveIndex, wrappedOnChanges);\n        (tView.preOrderCheckHooks ??= []).push(directiveIndex, wrappedOnChanges);\n    }\n    if (ngOnInit) {\n        (tView.preOrderHooks ??= []).push(0 - directiveIndex, ngOnInit);\n    }\n    if (ngDoCheck) {\n        (tView.preOrderHooks ??= []).push(directiveIndex, ngDoCheck);\n        (tView.preOrderCheckHooks ??= []).push(directiveIndex, ngDoCheck);\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 (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n        const directiveDef = tView.data[i];\n        ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n        const lifecycleHooks = directiveDef.type.prototype;\n        const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy, } = lifecycleHooks;\n        if (ngAfterContentInit) {\n            (tView.contentHooks ??= []).push(-i, ngAfterContentInit);\n        }\n        if (ngAfterContentChecked) {\n            (tView.contentHooks ??= []).push(i, ngAfterContentChecked);\n            (tView.contentCheckHooks ??= []).push(i, ngAfterContentChecked);\n        }\n        if (ngAfterViewInit) {\n            (tView.viewHooks ??= []).push(-i, ngAfterViewInit);\n        }\n        if (ngAfterViewChecked) {\n            (tView.viewHooks ??= []).push(i, ngAfterViewChecked);\n            (tView.viewCheckHooks ??= []).push(i, ngAfterViewChecked);\n        }\n        if (ngOnDestroy != null) {\n            (tView.destroyHooks ??= []).push(i, ngOnDestroy);\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 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 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 /* InitPhaseState.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 /* InitPhaseState.InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');\n    if ((lView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n        callHooks(lView, hooks, initPhase, nodeIndex);\n    }\n}\nfunction incrementInitPhaseFlags(lView, initPhase) {\n    ngDevMode &&\n        assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');\n    let flags = lView[FLAGS];\n    if ((flags & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n        flags &= 16383 /* LViewFlags.IndexWithinInitPhaseReset */;\n        flags += 1 /* LViewFlags.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(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');\n    const startIndex = currentNodeIndex !== undefined\n        ? currentView[PREORDER_HOOK_FLAGS] & 65535 /* PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask */\n        : 0;\n    const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n    const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n    let lastNodeIndexFound = 0;\n    for (let i = startIndex; i < max; i++) {\n        const 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            const isInitHook = arr[i] < 0;\n            if (isInitHook) {\n                currentView[PREORDER_HOOK_FLAGS] += 65536 /* PreOrderHookFlags.NumberOfInitHooksCalledIncrementer */;\n            }\n            if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n                callHook(currentView, initPhase, arr, i);\n                currentView[PREORDER_HOOK_FLAGS] =\n                    (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* PreOrderHookFlags.NumberOfInitHooksCalledMask */) +\n                        i +\n                        2;\n            }\n            i++;\n        }\n    }\n}\n/**\n * Executes a single lifecycle hook, making sure that:\n * - it is called in the non-reactive context;\n * - profiling data are registered.\n */\nfunction callHookInternal(directive, hook) {\n    profiler(4 /* ProfilerEvent.LifecycleHookStart */, directive, hook);\n    const prevConsumer = setActiveConsumer$1(null);\n    try {\n        hook.call(directive);\n    }\n    finally {\n        setActiveConsumer$1(prevConsumer);\n        profiler(5 /* ProfilerEvent.LifecycleHookEnd */, directive, hook);\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    const isInitHook = arr[i] < 0;\n    const hook = arr[i + 1];\n    const directiveIndex = isInitHook ? -arr[i] : arr[i];\n    const directive = currentView[directiveIndex];\n    if (isInitHook) {\n        const indexWithintInitPhase = currentView[FLAGS] >> 14 /* LViewFlags.IndexWithinInitPhaseShift */;\n        // The init phase state must be always checked here as it may have been recursively updated.\n        if (indexWithintInitPhase <\n            currentView[PREORDER_HOOK_FLAGS] >> 16 /* PreOrderHookFlags.NumberOfInitHooksCalledShift */ &&\n            (currentView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n            currentView[FLAGS] += 16384 /* LViewFlags.IndexWithinInitPhaseIncrementer */;\n            callHookInternal(directive, hook);\n        }\n    }\n    else {\n        callHookInternal(directive, hook);\n    }\n}\n\nconst 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 */\nclass NodeInjectorFactory {\n    factory;\n    /**\n     * The inject implementation to be activated when using the factory.\n     */\n    injectImpl;\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    resolving = false;\n    /**\n     * Marks that the token can see other Tokens declared in `viewProviders` on the same node.\n     */\n    canSeeViewProviders;\n    /**\n     * An array of factories to use in case of `multi` provider.\n     */\n    multi;\n    /**\n     * Number of `multi`-providers which belong to the component.\n     *\n     * This is needed because when multiple components and directives declare the `multi` provider\n     * they have to be concatenated in the correct order.\n     *\n     * Example:\n     *\n     * If we have a component and directive active an a single element as declared here\n     * ```\n     * component:\n     *   providers: [ {provide: String, useValue: 'component', multi: true} ],\n     *   viewProviders: [ {provide: String, useValue: 'componentView', multi: true} ],\n     *\n     * directive:\n     *   providers: [ {provide: String, useValue: 'directive', multi: true} ],\n     * ```\n     *\n     * Then the expected results are:\n     *\n     * ```\n     * providers: ['component', 'directive']\n     * viewProviders: ['component', 'componentView', 'directive']\n     * ```\n     *\n     * The way to think about it is that the `viewProviders` have been inserted after the component\n     * but before the directives, which is why we need to know how many `multi`s have been declared by\n     * the component.\n     */\n    componentProviders;\n    /**\n     * Current index of the Factory in the `data`. Needed for `viewProviders` and `providers` merging.\n     * See `providerFactory`.\n     */\n    index;\n    /**\n     * Because the same `multi` provider can be declared in `providers` and `viewProviders` it is\n     * possible for `viewProviders` to shadow the `providers`. For this reason we store the\n     * `provideFactory` of the `providers` so that `providers` can be extended with `viewProviders`.\n     *\n     * Example:\n     *\n     * Given:\n     * ```\n     * providers: [ {provide: String, useValue: 'all', multi: true} ],\n     * viewProviders: [ {provide: String, useValue: 'viewOnly', multi: true} ],\n     * ```\n     *\n     * We have to return `['all']` in case of content injection, but `['all', 'viewOnly']` in case\n     * of view injection. We further have to make sure that the shared instances (in our case\n     * `all`) are the exact same instance in both the content as well as the view injection. (We\n     * have to make sure that we don't double instantiate.) For this reason the `viewProviders`\n     * `Factory` has a pointer to the shadowed `providers` factory so that it can instantiate the\n     * `providers` (`['all']`) and then extend it with `viewProviders` (`['all'] + ['viewOnly'] =\n     * ['all', 'viewOnly']`).\n     */\n    providerFactory;\n    constructor(\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        ngDevMode && assertDefined(factory, 'Factory not specified');\n        ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n        this.canSeeViewProviders = isViewProvider;\n        this.injectImpl = injectImplementation;\n    }\n}\nfunction isFactory(obj) {\n    return obj instanceof NodeInjectorFactory;\n}\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nfunction toTNodeTypeAsString(tNodeType) {\n    let text = '';\n    tNodeType & 1 /* TNodeType.Text */ && (text += '|Text');\n    tNodeType & 2 /* TNodeType.Element */ && (text += '|Element');\n    tNodeType & 4 /* TNodeType.Container */ && (text += '|Container');\n    tNodeType & 8 /* TNodeType.ElementContainer */ && (text += '|ElementContainer');\n    tNodeType & 16 /* TNodeType.Projection */ && (text += '|Projection');\n    tNodeType & 32 /* TNodeType.Icu */ && (text += '|IcuContainer');\n    tNodeType & 64 /* TNodeType.Placeholder */ && (text += '|Placeholder');\n    tNodeType & 128 /* TNodeType.LetDeclaration */ && (text += '|LetDeclaration');\n    return text.length > 0 ? text.substring(1) : text;\n}\n/**\n * Helper function to detect if a given value matches a `TNode` shape.\n *\n * The logic uses the `insertBeforeIndex` and its possible values as\n * a way to differentiate a TNode shape from other types of objects\n * within the `TView.data`. This is not a perfect check, but it can\n * be a reasonable differentiator, since we control the shapes of objects\n * within `TView.data`.\n */\nfunction isTNodeShape(value) {\n    return (value != null &&\n        typeof value === 'object' &&\n        (value.insertBeforeIndex === null ||\n            typeof value.insertBeforeIndex === 'number' ||\n            Array.isArray(value.insertBeforeIndex)));\n}\nfunction isLetDeclaration(tNode) {\n    return !!(tNode.type & 128 /* TNodeType.LetDeclaration */);\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```html\n * <div my-dir [class]=\"exp\"></div>\n * ```\n * and\n * ```ts\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 & 8 /* TNodeFlags.hasClassInput */) !== 0;\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```html\n * <div my-dir [style]=\"exp\"></div>\n * ```\n * and\n * ```ts\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 & 16 /* TNodeFlags.hasStyleInput */) !== 0;\n}\n\nfunction assertTNodeType(tNode, expectedTypes, message) {\n    assertDefined(tNode, 'should be called with a TNode');\n    if ((tNode.type & expectedTypes) === 0) {\n        throwError(message ||\n            `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`);\n    }\n}\nfunction assertPureTNodeType(type) {\n    if (!(type === 2 /* TNodeType.Element */ ||\n        type === 1 /* TNodeType.Text */ ||\n        type === 4 /* TNodeType.Container */ ||\n        type === 8 /* TNodeType.ElementContainer */ ||\n        type === 32 /* TNodeType.Icu */ ||\n        type === 16 /* TNodeType.Projection */ ||\n        type === 64 /* TNodeType.Placeholder */ ||\n        type === 128 /* TNodeType.LetDeclaration */)) {\n        throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`);\n    }\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    let i = 0;\n    while (i < attrs.length) {\n        const 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 /* AttributeMarker.NamespaceURI */) {\n                break;\n            }\n            // we just landed on the marker value ... therefore\n            // we should skip to the next entry\n            i++;\n            const namespaceURI = attrs[i++];\n            const attrName = attrs[i++];\n            const attrVal = attrs[i++];\n            ngDevMode && ngDevMode.rendererSetAttribute++;\n            renderer.setAttribute(native, attrName, attrVal, namespaceURI);\n        }\n        else {\n            // attrName is string;\n            const attrName = value;\n            const attrVal = attrs[++i];\n            // Standard attributes\n            ngDevMode && ngDevMode.rendererSetAttribute++;\n            if (isAnimationProp(attrName)) {\n                renderer.setProperty(native, attrName, attrVal);\n            }\n            else {\n                renderer.setAttribute(native, 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 /* AttributeMarker.Bindings */ ||\n        marker === 4 /* AttributeMarker.Template */ ||\n        marker === 6 /* AttributeMarker.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 /* CharCode.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        let srcMarker = -1 /* AttributeMarker.ImplicitAttributes */;\n        for (let i = 0; i < src.length; i++) {\n            const item = src[i];\n            if (typeof item === 'number') {\n                srcMarker = item;\n            }\n            else {\n                if (srcMarker === 0 /* AttributeMarker.NamespaceURI */) {\n                    // Case where we need to consume `key1`, `key2`, `value` items.\n                }\n                else if (srcMarker === -1 /* AttributeMarker.ImplicitAttributes */ ||\n                    srcMarker === 2 /* AttributeMarker.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    let i = 0;\n    // Assume that new markers will be inserted at the end.\n    let markerInsertPosition = dst.length;\n    // scan until correct type.\n    if (marker === -1 /* AttributeMarker.ImplicitAttributes */) {\n        markerInsertPosition = -1;\n    }\n    else {\n        while (i < dst.length) {\n            const 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        const 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// 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)\nconst NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\n\n/**\n * Injector that looks up a value using a specific injector, before falling back to the module\n * injector. Used primarily when creating components or embedded views dynamically.\n */\nclass ChainedInjector {\n    injector;\n    parentInjector;\n    constructor(injector, parentInjector) {\n        this.injector = injector;\n        this.parentInjector = parentInjector;\n    }\n    get(token, notFoundValue, flags) {\n        flags = convertToBitFlags(flags);\n        const value = this.injector.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 this.parentInjector.get(token, notFoundValue, flags);\n    }\n}\n\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nfunction hasParentInjector(parentLocation) {\n    return parentLocation !== NO_PARENT_INJECTOR;\n}\nfunction getParentInjectorIndex(parentLocation) {\n    if (ngDevMode) {\n        assertNumber(parentLocation, 'Number expected');\n        assertNotEqual(parentLocation, -1, 'Not a valid state.');\n        const parentInjectorIndex = parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n        assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');\n    }\n    return parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n}\nfunction getParentInjectorViewOffset(parentLocation) {\n    return parentLocation >> 16 /* RelativeInjectorLocationFlags.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    let viewOffset = getParentInjectorViewOffset(location);\n    let 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 * Detects whether an injector is an instance of a `ChainedInjector`,\n * created based on the `OutletInjector`.\n */\nfunction isRouterOutletInjector(currentInjector) {\n    return (currentInjector instanceof ChainedInjector &&\n        typeof currentInjector.injector.__ngOutletInjector === 'function');\n}\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 * ```ts\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 */\nlet includeViewProviders = true;\nfunction setIncludeViewProviders(v) {\n    const 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 */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n/**\n * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits,\n * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash\n * number.\n */\nconst BLOOM_BUCKET_BITS = 5;\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n/** Value used when something wasn't found by an injector. */\nconst NOT_FOUND = {};\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    let id;\n    if (typeof type === 'string') {\n        id = type.charCodeAt(0) || 0;\n    }\n    else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n        id = type[NG_ELEMENT_ID];\n    }\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    const bloomHash = 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    const mask = 1 << bloomHash;\n    // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`.\n    // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask\n    // should be written to.\n    tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\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 lView View where the node is stored\n * @returns Node injector\n */\nfunction getOrCreateNodeInjectorForNode(tNode, lView) {\n    const existingInjectorIndex = getInjectorIndex(tNode, lView);\n    if (existingInjectorIndex !== -1) {\n        return existingInjectorIndex;\n    }\n    const tView = lView[TVIEW];\n    if (tView.firstCreatePass) {\n        tNode.injectorIndex = lView.length;\n        insertBloom(tView.data, tNode); // foundation for node bloom\n        insertBloom(lView, null); // foundation for cumulative bloom\n        insertBloom(tView.blueprint, null);\n    }\n    const parentLoc = getParentInjectorLocation(tNode, lView);\n    const 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        const parentIndex = getParentInjectorIndex(parentLoc);\n        const parentLView = getParentInjectorView(parentLoc, lView);\n        const 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 (let i = 0; i < 8 /* NodeInjectorOffset.BLOOM_SIZE */; i++) {\n            lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n        }\n    }\n    lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */] = 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, lView) {\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        lView[tNode.injectorIndex + 8 /* NodeInjectorOffset.PARENT */] === null) {\n        return -1;\n    }\n    else {\n        ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\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 Returns a number that is the combination of the number of LViews that we have to go up\n * to find the LView containing the parent inject AND the index of the injector within that LView.\n */\nfunction getParentInjectorLocation(tNode, lView) {\n    if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n        // If we have a parent `TNode` and there is an injector associated with it we are done, because\n        // the parent injector is within the current `LView`.\n        return tNode.parent.injectorIndex; // ViewOffset is 0\n    }\n    // When parent injector location is computed it may be outside of the current view. (ie it could\n    // be pointing to a declared parent location). This variable stores number of declaration parents\n    // we need to walk up in order to find the parent injector location.\n    let declarationViewOffset = 0;\n    let parentTNode = null;\n    let lViewCursor = lView;\n    // The parent injector is not in the current `LView`. We will have to walk the declared parent\n    // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent\n    // `NodeInjector`.\n    while (lViewCursor !== null) {\n        parentTNode = getTNodeFromLView(lViewCursor);\n        if (parentTNode === null) {\n            // If we have no parent, than we are done.\n            return NO_PARENT_INJECTOR;\n        }\n        ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]);\n        // Every iteration of the loop requires that we go to the declared parent.\n        declarationViewOffset++;\n        lViewCursor = lViewCursor[DECLARATION_VIEW];\n        if (parentTNode.injectorIndex !== -1) {\n            // We found a NodeInjector which points to something.\n            return (parentTNode.injectorIndex |\n                (declarationViewOffset <<\n                    16 /* RelativeInjectorLocationFlags.ViewOffsetShift */));\n        }\n    }\n    return NO_PARENT_INJECTOR;\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 * ```ts\n * @Component(...)\n * class MyComponent {\n *   constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```html\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```ts\n * MyComponent.ɵcmp = defineComponent({\n *   factory: () => new MyComponent(injectAttribute('title'))\n *   ...\n * })\n * ```\n *\n * @publicApi\n */\nfunction injectAttributeImpl(tNode, attrNameToInject) {\n    ngDevMode && assertTNodeType(tNode, 12 /* TNodeType.AnyContainer */ | 3 /* TNodeType.AnyRNode */);\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    const attrs = tNode.attrs;\n    if (attrs) {\n        const attrsLength = attrs.length;\n        let i = 0;\n        while (i < attrsLength) {\n            const 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 /* AttributeMarker.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}\nfunction notFoundValueOrThrow(notFoundValue, token, flags) {\n    if (flags & InjectFlags.Optional || notFoundValue !== undefined) {\n        return notFoundValue;\n    }\n    else {\n        throwProviderNotFoundError(token, 'NodeInjector');\n    }\n}\n/**\n * Returns the value associated to the given token from the ModuleInjector or throws exception\n *\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 or throws an exception\n */\nfunction lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {\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        const moduleInjector = lView[INJECTOR];\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        const 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    return notFoundValueOrThrow(notFoundValue, token, flags);\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. `-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 = InjectFlags.Default, notFoundValue) {\n    if (tNode !== null) {\n        // If the view or any of its ancestors have an embedded\n        // view injector, we have to look it up there first.\n        if (lView[FLAGS] & 2048 /* LViewFlags.HasEmbeddedViewInjector */ &&\n            // The token must be present on the current node injector when the `Self`\n            // flag is set, so the lookup on embedded view injector(s) can be skipped.\n            !(flags & InjectFlags.Self)) {\n            const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);\n            if (embeddedInjectorValue !== NOT_FOUND) {\n                return embeddedInjectorValue;\n            }\n        }\n        // Otherwise try the node injector.\n        const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);\n        if (value !== NOT_FOUND) {\n            return value;\n        }\n    }\n    // Finally, fall back to the module injector.\n    return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n}\n/**\n * Returns the value associated to the given token from the node injector.\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 lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {\n    const 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        if (!enterDI(lView, tNode, flags)) {\n            // Failed to enter DI, try module injector instead. If a token is injected with the @Host\n            // flag, the module injector is not searched for that token in Ivy.\n            return flags & InjectFlags.Host\n                ? notFoundValueOrThrow(notFoundValue, token, flags)\n                : lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n        }\n        try {\n            let value;\n            if (ngDevMode) {\n                runInInjectorProfilerContext(new NodeInjector(getCurrentTNode(), getLView()), token, () => {\n                    value = bloomHash(flags);\n                    if (value != null) {\n                        emitInstanceCreatedByInjectorEvent(value);\n                    }\n                });\n            }\n            else {\n                value = bloomHash(flags);\n            }\n            if (value == null && !(flags & InjectFlags.Optional)) {\n                throwProviderNotFoundError(token);\n            }\n            else {\n                return value;\n            }\n        }\n        finally {\n            leaveDI();\n        }\n    }\n    else if (typeof bloomHash === 'number') {\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        let previousTView = null;\n        let injectorIndex = getInjectorIndex(tNode, lView);\n        let parentLocation = NO_PARENT_INJECTOR;\n        let 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 the parent injector.\n        if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n            parentLocation =\n                injectorIndex === -1\n                    ? getParentInjectorLocation(tNode, lView)\n                    : lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];\n            if (parentLocation === NO_PARENT_INJECTOR || !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            ngDevMode && assertNodeInjector(lView, injectorIndex);\n            // Check the current injector. If it matches, see if it contains token.\n            const tView = lView[TVIEW];\n            ngDevMode &&\n                assertTNodeForLView(tView.data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */], lView);\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                const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n                if (instance !== NOT_FOUND) {\n                    return instance;\n                }\n            }\n            parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];\n            if (parentLocation !== NO_PARENT_INJECTOR &&\n                shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.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    return notFoundValue;\n}\nfunction searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n    const currentTView = lView[TVIEW];\n    const tNode = currentTView.data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];\n    // First, we need to determine if view providers can be accessed by the starting element.\n    // There are two possibilities\n    const 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 /* TNodeType.AnyRNode */) !== 0;\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    const isHostSpecialCase = flags & InjectFlags.Host && hostTElementNode === tNode;\n    const 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    const nodeProviderIndexes = tNode.providerIndexes;\n    const tInjectables = tView.data;\n    const injectablesStart = nodeProviderIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n    const directivesStart = tNode.directiveStart;\n    const directiveEnd = tNode.directiveEnd;\n    const cptViewProvidersCount = nodeProviderIndexes >> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */;\n    const startingIndex = canAccessViewProviders\n        ? injectablesStart\n        : injectablesStart + cptViewProvidersCount;\n    // When the host special case applies, only the viewProviders and the component are visible\n    const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n    for (let i = startingIndex; i < endIndex; i++) {\n        const providerTokenOrDef = tInjectables[i];\n        if ((i < directivesStart && token === providerTokenOrDef) ||\n            (i >= directivesStart && providerTokenOrDef.type === token)) {\n            return i;\n        }\n    }\n    if (isHostSpecialCase) {\n        const 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    let value = lView[index];\n    const tData = tView.data;\n    if (isFactory(value)) {\n        const factory = value;\n        if (factory.resolving) {\n            throwCyclicDependencyError(stringifyForError(tData[index]));\n        }\n        const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n        factory.resolving = true;\n        let prevInjectContext;\n        if (ngDevMode) {\n            // tData indexes mirror the concrete instances in its corresponding LView.\n            // lView[index] here is either the injectable instace itself or a factory,\n            // therefore tData[index] is the constructor of that injectable or a\n            // definition object that contains the constructor in a `.type` field.\n            const token = tData[index].type || tData[index];\n            const injector = new NodeInjector(tNode, lView);\n            prevInjectContext = setInjectorProfilerContext({ injector, token });\n        }\n        const previousInjectImplementation = factory.injectImpl\n            ? setInjectImplementation(factory.injectImpl)\n            : null;\n        const success = enterDI(lView, tNode, InjectFlags.Default);\n        ngDevMode &&\n            assertEqual(success, true, \"Because flags do not contain `SkipSelf' we expect this to always succeed.\");\n        try {\n            value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n            ngDevMode && emitInstanceCreatedByInjectorEvent(value);\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            ngDevMode && setInjectorProfilerContext(prevInjectContext);\n            previousInjectImplementation !== null &&\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    const tokenId = \n    // First check with `hasOwnProperty` so we don't get an inherited ID.\n    token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined;\n    // Negative token IDs are used for special objects such as `Injector`\n    if (typeof tokenId === 'number') {\n        if (tokenId >= 0) {\n            return tokenId & BLOOM_MASK;\n        }\n        else {\n            ngDevMode &&\n                assertEqual(tokenId, -1 /* InjectorMarkers.Injector */, 'Expecting to get Special Injector Id');\n            return createNodeInjector;\n        }\n    }\n    else {\n        return tokenId;\n    }\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    const mask = 1 << bloomHash;\n    // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of\n    // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset\n    // that should be used.\n    const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\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}\nfunction getNodeInjectorLView(nodeInjector) {\n    return nodeInjector._lView;\n}\nfunction getNodeInjectorTNode(nodeInjector) {\n    return nodeInjector._tNode;\n}\nclass NodeInjector {\n    _tNode;\n    _lView;\n    constructor(_tNode, _lView) {\n        this._tNode = _tNode;\n        this._lView = _lView;\n    }\n    get(token, notFoundValue, flags) {\n        return getOrCreateInjectable(this._tNode, this._lView, token, convertToBitFlags(flags), notFoundValue);\n    }\n}\n/** Creates a `NodeInjector` for the current node. */\nfunction createNodeInjector() {\n    return new NodeInjector(getCurrentTNode(), getLView());\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵgetInheritedFactory(type) {\n    return noSideEffects(() => {\n        const ownConstructor = type.prototype.constructor;\n        const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n        const objectPrototype = Object.prototype;\n        let parent = Object.getPrototypeOf(type.prototype).constructor;\n        // Go up the prototype until we hit `Object`.\n        while (parent && parent !== objectPrototype) {\n            const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n            // If we hit something that has a factory and the factory isn't the same as the type,\n            // we've found the inherited factory. Note the check that the factory isn't the type's\n            // own factory is redundant in most cases, but if the user has custom decorators on the\n            // class, this lookup will start one level down in the prototype chain, causing us to\n            // find the own factory first and potentially triggering an infinite loop downstream.\n            if (factory && factory !== ownFactory) {\n                return factory;\n            }\n            parent = Object.getPrototypeOf(parent);\n        }\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 (t) => new t();\n    });\n}\nfunction getFactoryOf(type) {\n    if (isForwardRef(type)) {\n        return () => {\n            const factory = getFactoryOf(resolveForwardRef(type));\n            return factory && factory();\n        };\n    }\n    return getFactoryDef(type);\n}\n/**\n * Returns a value from the closest embedded or node injector.\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 lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {\n    let currentTNode = tNode;\n    let currentLView = lView;\n    // When an LView with an embedded view injector is inserted, it'll likely be interlaced with\n    // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).\n    // Since the bloom filters for the node injectors have already been constructed and we don't\n    // have a way of extracting the records from an injector, the only way to maintain the correct\n    // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve\n    // the token at each level.\n    while (currentTNode !== null &&\n        currentLView !== null &&\n        currentLView[FLAGS] & 2048 /* LViewFlags.HasEmbeddedViewInjector */ &&\n        !(currentLView[FLAGS] & 512 /* LViewFlags.IsRoot */)) {\n        ngDevMode && assertTNodeForLView(currentTNode, currentLView);\n        // Note that this lookup on the node injector is using the `Self` flag, because\n        // we don't want the node injector to look at any parent injectors since we\n        // may hit the embedded view injector first.\n        const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);\n        if (nodeInjectorValue !== NOT_FOUND) {\n            return nodeInjectorValue;\n        }\n        // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191\n        let parentTNode = currentTNode.parent;\n        // `TNode.parent` includes the parent within the current view only. If it doesn't exist,\n        // it means that we've hit the view boundary and we need to go up to the next view.\n        if (!parentTNode) {\n            // Before we go to the next LView, check if the token exists on the current embedded injector.\n            const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];\n            if (embeddedViewInjector) {\n                const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);\n                if (embeddedViewInjectorValue !== NOT_FOUND) {\n                    return embeddedViewInjectorValue;\n                }\n            }\n            // Otherwise keep going up the tree.\n            parentTNode = getTNodeFromLView(currentLView);\n            currentLView = currentLView[DECLARATION_VIEW];\n        }\n        currentTNode = parentTNode;\n    }\n    return notFoundValue;\n}\n/** Gets the TNode associated with an LView inside of the declaration view. */\nfunction getTNodeFromLView(lView) {\n    const tView = lView[TVIEW];\n    const tViewType = tView.type;\n    // The parent pointer differs based on `TView.type`.\n    if (tViewType === 2 /* TViewType.Embedded */) {\n        ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n        return tView.declTNode;\n    }\n    else if (tViewType === 1 /* TViewType.Component */) {\n        // Components don't have `TView.declTNode` because each instance of component could be\n        // inserted in different location, hence `TView.declTNode` is meaningless.\n        return lView[T_HOST];\n    }\n    return null;\n}\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nfunction ɵɵinjectAttribute(attrNameToInject) {\n    return injectAttributeImpl(getCurrentTNode(), attrNameToInject);\n}\n\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Attribute = makeParamDecorator('Attribute', (attributeName) => ({\n    attributeName,\n    __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName),\n}));\n\nlet _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    return deps.map((dep) => reflectDependency(dep));\n}\nfunction reflectDependency(dep) {\n    const meta = {\n        token: null,\n        attribute: null,\n        host: false,\n        optional: false,\n        self: false,\n        skipSelf: false,\n    };\n    if (Array.isArray(dep) && dep.length > 0) {\n        for (let j = 0; j < dep.length; j++) {\n            const 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            const 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 RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Attribute name must be defined.`);\n                }\n                meta.attribute = param.attributeName;\n            }\n            else {\n                meta.token = param;\n            }\n        }\n    }\n    else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) {\n        meta.token = null;\n    }\n    else {\n        meta.token = dep;\n    }\n    return meta;\n}\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, meta) {\n    let ngInjectableDef = null;\n    let 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: () => {\n                if (ngInjectableDef === null) {\n                    const compiler = getCompilerFacade({\n                        usage: 0 /* JitCompilerUsage.Decorator */,\n                        kind: 'injectable',\n                        type,\n                    });\n                    ngInjectableDef = compiler.compileInjectable(angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, meta));\n                }\n                return ngInjectableDef;\n            },\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: () => {\n                if (ngFactoryDef === null) {\n                    const compiler = getCompilerFacade({\n                        usage: 0 /* JitCompilerUsage.Decorator */,\n                        kind: 'injectable',\n                        type,\n                    });\n                    ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {\n                        name: type.name,\n                        type,\n                        typeArgumentCount: 0, // In JIT mode types are not available nor used.\n                        deps: reflectDependencies(type),\n                        target: compiler.FactoryTarget.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}\nconst USE_VALUE = getClosureSafeProperty({\n    provide: String,\n    useValue: getClosureSafeProperty,\n});\nfunction isUseClassProvider(meta) {\n    return meta.useClass !== undefined;\n}\nfunction isUseValueProvider(meta) {\n    return USE_VALUE 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    const meta = srcMeta || { providedIn: null };\n    const compilerMeta = {\n        name: type.name,\n        type: type,\n        typeArgumentCount: 0,\n        providedIn: meta.providedIn,\n    };\n    if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n        compilerMeta.deps = convertDependencies(meta.deps);\n    }\n    // Check to see if the user explicitly provided a `useXxxx` property.\n    if (isUseClassProvider(meta)) {\n        compilerMeta.useClass = meta.useClass;\n    }\n    else if (isUseValueProvider(meta)) {\n        compilerMeta.useValue = meta.useValue;\n    }\n    else if (isUseFactoryProvider(meta)) {\n        compilerMeta.useFactory = meta.useFactory;\n    }\n    else if (isUseExistingProvider(meta)) {\n        compilerMeta.useExisting = meta.useExisting;\n    }\n    return compilerMeta;\n}\n\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Injectable = makeDecorator('Injectable', undefined, undefined, undefined, (type, meta) => compileInjectable(type, meta));\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n */\nfunction createInjector(defType, parent = null, additionalProviders = null, name) {\n    const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n    injector.resolveInjectorInitializers();\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 = null, additionalProviders = null, name, scopes = new Set()) {\n    const providers = [additionalProviders || EMPTY_ARRAY, importProvidersFrom(defType)];\n    name = name || (typeof defType === 'object' ? undefined : stringify(defType));\n    return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);\n}\n\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/di/dependency-injection-providers) that associate\n * dependencies of various types with [injection tokens](guide/di/dependency-injection-providers).\n *\n * @see [DI Providers](guide/di/dependency-injection-providers).\n * @see {@link 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 */\nclass Injector {\n    static THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n    static NULL = new NullInjector();\n    static create(options, parent) {\n        if (Array.isArray(options)) {\n            return createInjector({ name: '' }, parent, options, '');\n        }\n        else {\n            const name = options.name ?? '';\n            return createInjector({ name }, options.parent, options.providers, name);\n        }\n    }\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: Injector,\n        providedIn: 'any',\n        factory: () => ɵɵinject(INJECTOR$1),\n    });\n    /**\n     * @internal\n     * @nocollapse\n     */\n    static __NG_ELEMENT_ID__ = -1 /* InjectorMarkers.Injector */;\n}\n\n/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Creates a token that can be used to inject static attributes of the host node.\n *\n * @usageNotes\n * ### Injecting an attribute that is known to exist\n * ```ts\n * @Directive()\n * class MyDir {\n *   attr: string = inject(new HostAttributeToken('some-attr'));\n * }\n * ```\n *\n * ### Optionally injecting an attribute\n * ```ts\n * @Directive()\n * class MyDir {\n *   attr: string | null = inject(new HostAttributeToken('some-attr'), {optional: true});\n * }\n * ```\n * @publicApi\n */\nclass HostAttributeToken {\n    attributeName;\n    constructor(attributeName) {\n        this.attributeName = attributeName;\n    }\n    /** @internal */\n    __NG_ELEMENT_ID__ = () => ɵɵinjectAttribute(this.attributeName);\n    toString() {\n        return `HostAttributeToken ${this.attributeName}`;\n    }\n}\n\n/**\n * A token that can be used to inject the tag name of the host node.\n *\n * @usageNotes\n * ### Injecting a tag name that is known to exist\n * ```ts\n * @Directive()\n * class MyDir {\n *   tagName: string = inject(HOST_TAG_NAME);\n * }\n * ```\n *\n * ### Optionally injecting a tag name\n * ```ts\n * @Directive()\n * class MyDir {\n *   tagName: string | null = inject(HOST_TAG_NAME, {optional: true});\n * }\n * ```\n * @publicApi\n */\nconst HOST_TAG_NAME = new InjectionToken(ngDevMode ? 'HOST_TAG_NAME' : '');\n// HOST_TAG_NAME should be resolved at the current node, similar to e.g. ElementRef,\n// so we manually specify __NG_ELEMENT_ID__ here, instead of using a factory.\n// tslint:disable-next-line:no-toplevel-property-access\nHOST_TAG_NAME.__NG_ELEMENT_ID__ = (flags) => {\n    const tNode = getCurrentTNode();\n    if (tNode === null) {\n        throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode &&\n            'HOST_TAG_NAME can only be injected in directives and components ' +\n                'during construction time (in a class constructor or as a class field initializer)');\n    }\n    if (tNode.type & 2 /* TNodeType.Element */) {\n        return tNode.value;\n    }\n    if (flags & InjectFlags.Optional) {\n        return null;\n    }\n    throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode &&\n        `HOST_TAG_NAME was used on ${getDevModeNodeName(tNode)} which doesn't have an underlying element in the DOM. ` +\n            `This is invalid, and so the dependency should be marked as optional.`);\n};\nfunction getDevModeNodeName(tNode) {\n    if (tNode.type & 8 /* TNodeType.ElementContainer */) {\n        return 'an <ng-container>';\n    }\n    else if (tNode.type & 4 /* TNodeType.Container */) {\n        return 'an <ng-template>';\n    }\n    else if (tNode.type & 128 /* TNodeType.LetDeclaration */) {\n        return 'an @let declaration';\n    }\n    else {\n        return 'a node';\n    }\n}\n\n/**\n * @module\n * @description\n * The `di` module provides dependency injection container services.\n */\n\n/**\n * This file should not be necessary because node resolution should just default to `./di/index`!\n *\n * However it does not seem to work and it breaks:\n *  - //packages/animations/browser/test:test_web_chromium-local\n *  - //packages/compiler-cli/test:extract_i18n\n *  - //packages/compiler-cli/test:ngc\n *  - //packages/compiler-cli/test:perform_watch\n *  - //packages/compiler-cli/test/diagnostics:check_types\n *  - //packages/compiler-cli/test/transformers:test\n *  - //packages/compiler/test:test\n *  - //tools/public_api_guard:core_api\n *\n * Remove this file once the above is solved or wait until `ngc` is deleted and then it should be\n * safe to delete this file.\n */\n\nconst SCHEDULE_IN_ROOT_ZONE_DEFAULT = false;\n\n/**\n * `DestroyRef` lets you set callbacks to run for any cleanup or destruction behavior.\n * The scope of this destruction depends on where `DestroyRef` is injected. If `DestroyRef`\n * is injected in a component or directive, the callbacks run when that component or\n * directive is destroyed. Otherwise the callbacks run when a corresponding injector is destroyed.\n *\n * @publicApi\n */\nclass DestroyRef {\n    /**\n     * @internal\n     * @nocollapse\n     */\n    static __NG_ELEMENT_ID__ = injectDestroyRef;\n    /**\n     * @internal\n     * @nocollapse\n     */\n    static __NG_ENV_ID__ = (injector) => injector;\n}\nclass NodeInjectorDestroyRef extends DestroyRef {\n    _lView;\n    constructor(_lView) {\n        super();\n        this._lView = _lView;\n    }\n    onDestroy(callback) {\n        storeLViewOnDestroy(this._lView, callback);\n        return () => removeLViewOnDestroy(this._lView, callback);\n    }\n}\nfunction injectDestroyRef() {\n    return new NodeInjectorDestroyRef(getLView());\n}\n\n/**\n * Injectable that is notified when an `LView` is made aware of changes to application state.\n */\nclass ChangeDetectionScheduler {\n}\n/** Token used to indicate if zoneless was enabled via provideZonelessChangeDetection(). */\nconst ZONELESS_ENABLED = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'Zoneless enabled' : '', { providedIn: 'root', factory: () => false });\n/** Token used to indicate `provideExperimentalZonelessChangeDetection` was used. */\nconst PROVIDED_ZONELESS = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'Zoneless provided' : '', { providedIn: 'root', factory: () => false });\nconst ZONELESS_SCHEDULER_DISABLED = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'scheduler disabled' : '');\n// TODO(atscott): Remove in v19. Scheduler should be done with runOutsideAngular.\nconst SCHEDULE_IN_ROOT_ZONE = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'run changes outside zone in root' : '');\n\n/**\n * Internal implementation of the pending tasks service.\n */\nclass PendingTasksInternal {\n    taskId = 0;\n    pendingTasks = new Set();\n    get _hasPendingTasks() {\n        return this.hasPendingTasks.value;\n    }\n    hasPendingTasks = new BehaviorSubject(false);\n    add() {\n        if (!this._hasPendingTasks) {\n            this.hasPendingTasks.next(true);\n        }\n        const taskId = this.taskId++;\n        this.pendingTasks.add(taskId);\n        return taskId;\n    }\n    has(taskId) {\n        return this.pendingTasks.has(taskId);\n    }\n    remove(taskId) {\n        this.pendingTasks.delete(taskId);\n        if (this.pendingTasks.size === 0 && this._hasPendingTasks) {\n            this.hasPendingTasks.next(false);\n        }\n    }\n    ngOnDestroy() {\n        this.pendingTasks.clear();\n        if (this._hasPendingTasks) {\n            this.hasPendingTasks.next(false);\n        }\n    }\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: PendingTasksInternal,\n        providedIn: 'root',\n        factory: () => new PendingTasksInternal(),\n    });\n}\n/**\n * Service that keeps track of pending tasks contributing to the stableness of Angular\n * application. While several existing Angular services (ex.: `HttpClient`) will internally manage\n * tasks influencing stability, this API gives control over stability to library and application\n * developers for specific cases not covered by Angular internals.\n *\n * The concept of stability comes into play in several important scenarios:\n * - SSR process needs to wait for the application stability before serializing and sending rendered\n * HTML;\n * - tests might want to delay assertions until the application becomes stable;\n *\n * @usageNotes\n * ```ts\n * const pendingTasks = inject(PendingTasks);\n * const taskCleanup = pendingTasks.add();\n * // do work that should block application's stability and then:\n * taskCleanup();\n * ```\n *\n * @publicApi\n * @developerPreview\n */\nclass PendingTasks {\n    internalPendingTasks = inject(PendingTasksInternal);\n    scheduler = inject(ChangeDetectionScheduler);\n    /**\n     * Adds a new task that should block application's stability.\n     * @returns A cleanup function that removes a task when called.\n     */\n    add() {\n        const taskId = this.internalPendingTasks.add();\n        return () => {\n            if (!this.internalPendingTasks.has(taskId)) {\n                // This pending task has already been cleared.\n                return;\n            }\n            // Notifying the scheduler will hold application stability open until the next tick.\n            this.scheduler.notify(12 /* NotificationSource.PendingTaskRemoved */);\n            this.internalPendingTasks.remove(taskId);\n        };\n    }\n    /**\n     * Runs an asynchronous function and blocks the application's stability until the function completes.\n     *\n     * ```\n     * pendingTasks.run(async () => {\n     *   const userData = await fetch('/api/user');\n     *   this.userData.set(userData);\n     * });\n     * ```\n     *\n     * Application stability is at least delayed until the next tick after the `run` method resolves\n     * so it is safe to make additional updates to application state that would require UI synchronization:\n     *\n     * ```\n     * const userData = await pendingTasks.run(() => fetch('/api/user'));\n     * this.userData.set(userData);\n     * ```\n     *\n     * @param fn The asynchronous function to execute\n     */\n    async run(fn) {\n        const removeTask = this.add();\n        try {\n            return await fn();\n        }\n        finally {\n            removeTask();\n        }\n    }\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: PendingTasks,\n        providedIn: 'root',\n        factory: () => new PendingTasks(),\n    });\n}\n\nclass EventEmitter_ extends Subject {\n    __isAsync; // tslint:disable-line\n    destroyRef = undefined;\n    pendingTasks = undefined;\n    constructor(isAsync = false) {\n        super();\n        this.__isAsync = isAsync;\n        // Attempt to retrieve a `DestroyRef` and `PendingTasks` optionally.\n        // For backwards compatibility reasons, this cannot be required.\n        if (isInInjectionContext()) {\n            // `DestroyRef` is optional because it is not available in all contexts.\n            // But it is useful to properly complete the `EventEmitter` if used with `outputToObservable`\n            // when the component/directive is destroyed. (See `outputToObservable` for more details.)\n            this.destroyRef = inject(DestroyRef, { optional: true }) ?? undefined;\n            this.pendingTasks = inject(PendingTasksInternal, { optional: true }) ?? undefined;\n        }\n    }\n    emit(value) {\n        const prevConsumer = setActiveConsumer$1(null);\n        try {\n            super.next(value);\n        }\n        finally {\n            setActiveConsumer$1(prevConsumer);\n        }\n    }\n    subscribe(observerOrNext, error, complete) {\n        let nextFn = observerOrNext;\n        let errorFn = error || (() => null);\n        let completeFn = complete;\n        if (observerOrNext && typeof observerOrNext === 'object') {\n            const observer = observerOrNext;\n            nextFn = observer.next?.bind(observer);\n            errorFn = observer.error?.bind(observer);\n            completeFn = observer.complete?.bind(observer);\n        }\n        if (this.__isAsync) {\n            errorFn = this.wrapInTimeout(errorFn);\n            if (nextFn) {\n                nextFn = this.wrapInTimeout(nextFn);\n            }\n            if (completeFn) {\n                completeFn = this.wrapInTimeout(completeFn);\n            }\n        }\n        const sink = super.subscribe({ next: nextFn, error: errorFn, complete: completeFn });\n        if (observerOrNext instanceof Subscription) {\n            observerOrNext.add(sink);\n        }\n        return sink;\n    }\n    wrapInTimeout(fn) {\n        return (value) => {\n            const taskId = this.pendingTasks?.add();\n            setTimeout(() => {\n                fn(value);\n                if (taskId !== undefined) {\n                    this.pendingTasks?.remove(taskId);\n                }\n            });\n        };\n    }\n}\n/**\n * @publicApi\n */\nconst EventEmitter = EventEmitter_;\n\nfunction noop(...args) {\n    // Do nothing.\n}\n\n/**\n * Gets a scheduling function that runs the callback after the first of setTimeout and\n * requestAnimationFrame resolves.\n *\n * - `requestAnimationFrame` ensures that change detection runs ahead of a browser repaint.\n * This ensures that the create and update passes of a change detection always happen\n * in the same frame.\n * - When the browser is resource-starved, `rAF` can execute _before_ a `setTimeout` because\n * rendering is a very high priority process. This means that `setTimeout` cannot guarantee\n * same-frame create and update pass, when `setTimeout` is used to schedule the update phase.\n * - While `rAF` gives us the desirable same-frame updates, it has two limitations that\n * prevent it from being used alone. First, it does not run in background tabs, which would\n * prevent Angular from initializing an application when opened in a new tab (for example).\n * Second, repeated calls to requestAnimationFrame will execute at the refresh rate of the\n * hardware (~16ms for a 60Hz display). This would cause significant slowdown of tests that\n * are written with several updates and asserts in the form of \"update; await stable; assert;\".\n * - Both `setTimeout` and `rAF` are able to \"coalesce\" several events from a single user\n * interaction into a single change detection. Importantly, this reduces view tree traversals when\n * compared to an alternative timing mechanism like `queueMicrotask`, where change detection would\n * then be interleaves between each event.\n *\n * By running change detection after the first of `setTimeout` and `rAF` to execute, we get the\n * best of both worlds.\n *\n * @returns a function to cancel the scheduled callback\n */\nfunction scheduleCallbackWithRafRace(callback) {\n    let timeoutId;\n    let animationFrameId;\n    function cleanup() {\n        callback = noop;\n        try {\n            if (animationFrameId !== undefined && typeof cancelAnimationFrame === 'function') {\n                cancelAnimationFrame(animationFrameId);\n            }\n            if (timeoutId !== undefined) {\n                clearTimeout(timeoutId);\n            }\n        }\n        catch {\n            // Clearing/canceling can fail in tests due to the timing of functions being patched and unpatched\n            // Just ignore the errors - we protect ourselves from this issue by also making the callback a no-op.\n        }\n    }\n    timeoutId = setTimeout(() => {\n        callback();\n        cleanup();\n    });\n    if (typeof requestAnimationFrame === 'function') {\n        animationFrameId = requestAnimationFrame(() => {\n            callback();\n            cleanup();\n        });\n    }\n    return () => cleanup();\n}\nfunction scheduleCallbackWithMicrotask(callback) {\n    queueMicrotask(() => callback());\n    return () => {\n        callback = noop;\n    };\n}\n\nclass AsyncStackTaggingZoneSpec {\n    createTask;\n    constructor(namePrefix, consoleAsyncStackTaggingImpl = console) {\n        this.name = 'asyncStackTagging for ' + namePrefix;\n        this.createTask = consoleAsyncStackTaggingImpl?.createTask ?? (() => null);\n    }\n    // ZoneSpec implementation below.\n    name;\n    onScheduleTask(delegate, _current, target, task) {\n        task.consoleTask = this.createTask(`Zone - ${task.source || task.type}`);\n        return delegate.scheduleTask(target, task);\n    }\n    onInvokeTask(delegate, _currentZone, targetZone, task, applyThis, applyArgs) {\n        let ret;\n        if (task.consoleTask) {\n            ret = task.consoleTask.run(() => delegate.invokeTask(targetZone, task, applyThis, applyArgs));\n        }\n        else {\n            ret = delegate.invokeTask(targetZone, task, applyThis, applyArgs);\n        }\n        return ret;\n    }\n}\n\nconst isAngularZoneProperty = 'isAngularZone';\nconst angularZoneInstanceIdProperty = isAngularZoneProperty + '_ID';\nlet ngZoneInstanceId = 0;\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 * ```ts\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 */\nclass NgZone {\n    hasPendingMacrotasks = false;\n    hasPendingMicrotasks = false;\n    /**\n     * Whether there are no outstanding microtasks or macrotasks.\n     */\n    isStable = true;\n    /**\n     * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n     */\n    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    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    onStable = new EventEmitter(false);\n    /**\n     * Notifies that an error has been delivered.\n     */\n    onError = new EventEmitter(false);\n    constructor(options) {\n        const { enableLongStackTrace = false, shouldCoalesceEventChangeDetection = false, shouldCoalesceRunChangeDetection = false, scheduleInRootZone = SCHEDULE_IN_ROOT_ZONE_DEFAULT, } = options;\n        if (typeof Zone == 'undefined') {\n            throw new RuntimeError(908 /* RuntimeErrorCode.MISSING_ZONEJS */, ngDevMode && `In this configuration Angular requires Zone.js`);\n        }\n        Zone.assertZonePatched();\n        const self = this;\n        self._nesting = 0;\n        self._outer = self._inner = Zone.current;\n        // AsyncStackTaggingZoneSpec provides `linked stack traces` to show\n        // where the async operation is scheduled. For more details, refer\n        // to this article, https://developer.chrome.com/blog/devtools-better-angular-debugging/\n        // And we only import this AsyncStackTaggingZoneSpec in development mode,\n        // in the production mode, the AsyncStackTaggingZoneSpec will be tree shaken away.\n        if (ngDevMode) {\n            self._inner = self._inner.fork(new AsyncStackTaggingZoneSpec('Angular'));\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        // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be\n        // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.\n        self.shouldCoalesceEventChangeDetection =\n            !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n        self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n        self.callbackScheduled = false;\n        self.scheduleInRootZone = scheduleInRootZone;\n        forkInnerZoneWithAngularBehavior(self);\n    }\n    /**\n      This method checks whether the method call happens within an Angular Zone instance.\n    */\n    static isInAngularZone() {\n        // Zone needs to be checked, because this method might be called even when NoopNgZone is used.\n        return typeof Zone !== 'undefined' && Zone.current.get(isAngularZoneProperty) === true;\n    }\n    /**\n      Assures that the method is called within the Angular Zone, otherwise throws an error.\n    */\n    static assertInAngularZone() {\n        if (!NgZone.isInAngularZone()) {\n            throw new RuntimeError(909 /* RuntimeErrorCode.UNEXPECTED_ZONE_STATE */, ngDevMode && 'Expected to be in Angular Zone, but it is not!');\n        }\n    }\n    /**\n      Assures that the method is called outside of the Angular Zone, otherwise throws an error.\n    */\n    static assertNotInAngularZone() {\n        if (NgZone.isInAngularZone()) {\n            throw new RuntimeError(909 /* RuntimeErrorCode.UNEXPECTED_ZONE_STATE */, ngDevMode && '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    run(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 `runTask` 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    runTask(fn, applyThis, applyArgs, name) {\n        const zone = this._inner;\n        const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\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    runGuarded(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    runOutsideAngular(fn) {\n        return this._outer.run(fn);\n    }\n}\nconst EMPTY_PAYLOAD = {};\nfunction checkStable(zone) {\n    // TODO: @JiaLiPassion, should check zone.isCheckStableRunning to prevent\n    // re-entry. The case is:\n    //\n    // @Component({...})\n    // export class AppComponent {\n    // constructor(private ngZone: NgZone) {\n    //   this.ngZone.onStable.subscribe(() => {\n    //     this.ngZone.run(() => console.log('stable'););\n    //   });\n    // }\n    //\n    // The onStable subscriber run another function inside ngZone\n    // which causes `checkStable()` re-entry.\n    // But this fix causes some issues in g3, so this fix will be\n    // launched in another PR.\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(() => zone.onStable.emit(null));\n                }\n                finally {\n                    zone.isStable = true;\n                }\n            }\n        }\n    }\n}\nfunction delayChangeDetectionForEvents(zone) {\n    /**\n     * We also need to check _nesting here\n     * Consider the following case with shouldCoalesceRunChangeDetection = true\n     *\n     * ngZone.run(() => {});\n     * ngZone.run(() => {});\n     *\n     * We want the two `ngZone.run()` only trigger one change detection\n     * when shouldCoalesceRunChangeDetection is true.\n     * And because in this case, change detection run in async way(requestAnimationFrame),\n     * so we also need to check the _nesting here to prevent multiple\n     * change detections.\n     */\n    if (zone.isCheckStableRunning || zone.callbackScheduled) {\n        return;\n    }\n    zone.callbackScheduled = true;\n    function scheduleCheckStable() {\n        scheduleCallbackWithRafRace(() => {\n            zone.callbackScheduled = false;\n            updateMicroTaskStatus(zone);\n            zone.isCheckStableRunning = true;\n            checkStable(zone);\n            zone.isCheckStableRunning = false;\n        });\n    }\n    if (zone.scheduleInRootZone) {\n        Zone.root.run(() => {\n            scheduleCheckStable();\n        });\n    }\n    else {\n        zone._outer.run(() => {\n            scheduleCheckStable();\n        });\n    }\n    updateMicroTaskStatus(zone);\n}\nfunction forkInnerZoneWithAngularBehavior(zone) {\n    const delayChangeDetectionForEventsDelegate = () => {\n        delayChangeDetectionForEvents(zone);\n    };\n    const instanceId = ngZoneInstanceId++;\n    zone._inner = zone._inner.fork({\n        name: 'angular',\n        properties: {\n            [isAngularZoneProperty]: true,\n            [angularZoneInstanceIdProperty]: instanceId,\n            [angularZoneInstanceIdProperty + instanceId]: true,\n        },\n        onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => {\n            // Prevent triggering change detection when the flag is detected.\n            if (shouldBeIgnoredByZone(applyArgs)) {\n                return delegate.invokeTask(target, task, applyThis, applyArgs);\n            }\n            try {\n                onEnter(zone);\n                return delegate.invokeTask(target, task, applyThis, applyArgs);\n            }\n            finally {\n                if ((zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') ||\n                    zone.shouldCoalesceRunChangeDetection) {\n                    delayChangeDetectionForEventsDelegate();\n                }\n                onLeave(zone);\n            }\n        },\n        onInvoke: (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                if (zone.shouldCoalesceRunChangeDetection &&\n                    // Do not delay change detection when the task is the scheduler's tick.\n                    // We need to synchronously trigger the stability logic so that the\n                    // zone-based scheduler can prevent a duplicate ApplicationRef.tick\n                    // by first checking if the scheduler tick is running. This does seem a bit roundabout,\n                    // but we _do_ still want to trigger all the correct events when we exit the zone.run\n                    // (`onMicrotaskEmpty` and `onStable` _should_ emit; developers can have code which\n                    // relies on these events happening after change detection runs).\n                    // Note: `zone.callbackScheduled` is already in delayChangeDetectionForEventsDelegate\n                    // but is added here as well to prevent reads of applyArgs when not necessary\n                    !zone.callbackScheduled &&\n                    !isSchedulerTick(applyArgs)) {\n                    delayChangeDetectionForEventsDelegate();\n                }\n                onLeave(zone);\n            }\n        },\n        onHasTask: (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: (delegate, current, target, error) => {\n            delegate.handleError(target, error);\n            zone.runOutsideAngular(() => zone.onError.emit(error));\n            return false;\n        },\n    });\n}\nfunction updateMicroTaskStatus(zone) {\n    if (zone._hasPendingMicrotasks ||\n        ((zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) &&\n            zone.callbackScheduled === true)) {\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 */\nclass NoopNgZone {\n    hasPendingMicrotasks = false;\n    hasPendingMacrotasks = false;\n    isStable = true;\n    onUnstable = new EventEmitter();\n    onMicrotaskEmpty = new EventEmitter();\n    onStable = new EventEmitter();\n    onError = new EventEmitter();\n    run(fn, applyThis, applyArgs) {\n        return fn.apply(applyThis, applyArgs);\n    }\n    runGuarded(fn, applyThis, applyArgs) {\n        return fn.apply(applyThis, applyArgs);\n    }\n    runOutsideAngular(fn) {\n        return fn();\n    }\n    runTask(fn, applyThis, applyArgs, name) {\n        return fn.apply(applyThis, applyArgs);\n    }\n}\nfunction shouldBeIgnoredByZone(applyArgs) {\n    return hasApplyArgsData(applyArgs, '__ignore_ng_zone__');\n}\nfunction isSchedulerTick(applyArgs) {\n    return hasApplyArgsData(applyArgs, '__scheduler_tick__');\n}\nfunction hasApplyArgsData(applyArgs, key) {\n    if (!Array.isArray(applyArgs)) {\n        return false;\n    }\n    // We should only ever get 1 arg passed through to invokeTask.\n    // Short circuit here incase that behavior changes.\n    if (applyArgs.length !== 1) {\n        return false;\n    }\n    return applyArgs[0]?.data?.[key] === true;\n}\nfunction getNgZone(ngZoneToUse = 'zone.js', options) {\n    if (ngZoneToUse === 'noop') {\n        return new NoopNgZone();\n    }\n    if (ngZoneToUse === 'zone.js') {\n        return new NgZone(options);\n    }\n    return ngZoneToUse;\n}\n\n// Public API for Zone\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 * ```ts\n * class MyErrorHandler implements ErrorHandler {\n *   handleError(error) {\n *     // do something with the exception\n *   }\n * }\n *\n * // Provide in standalone apps\n * bootstrapApplication(AppComponent, {\n *   providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n *\n * // Provide in module-based apps\n * @NgModule({\n *   providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\nclass ErrorHandler {\n    /**\n     * @internal\n     */\n    _console = console;\n    handleError(error) {\n        this._console.error('ERROR', error);\n    }\n}\n/**\n * `InjectionToken` used to configure how to call the `ErrorHandler`.\n *\n * `NgZone` is provided by default today so the default (and only) implementation for this\n * is calling `ErrorHandler.handleError` outside of the Angular zone.\n */\nconst INTERNAL_APPLICATION_ERROR_HANDLER = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'internal error handler' : '', {\n    providedIn: 'root',\n    factory: () => {\n        const zone = inject(NgZone);\n        const userErrorHandler = inject(ErrorHandler);\n        return (e) => zone.runOutsideAngular(() => userErrorHandler.handleError(e));\n    },\n});\n\n/**\n * An `OutputEmitterRef` is created by the `output()` function and can be\n * used to emit values to consumers of your directive or component.\n *\n * Consumers of your directive/component can bind to the output and\n * subscribe to changes via the bound event syntax. For example:\n *\n * ```html\n * <my-comp (valueChange)=\"processNewValue($event)\" />\n * ```\n *\n * @publicAPI\n */\nclass OutputEmitterRef {\n    destroyed = false;\n    listeners = null;\n    errorHandler = inject(ErrorHandler, { optional: true });\n    /** @internal */\n    destroyRef = inject(DestroyRef);\n    constructor() {\n        // Clean-up all listeners and mark as destroyed upon destroy.\n        this.destroyRef.onDestroy(() => {\n            this.destroyed = true;\n            this.listeners = null;\n        });\n    }\n    subscribe(callback) {\n        if (this.destroyed) {\n            throw new RuntimeError(953 /* RuntimeErrorCode.OUTPUT_REF_DESTROYED */, ngDevMode &&\n                'Unexpected subscription to destroyed `OutputRef`. ' +\n                    'The owning directive/component is destroyed.');\n        }\n        (this.listeners ??= []).push(callback);\n        return {\n            unsubscribe: () => {\n                const idx = this.listeners?.indexOf(callback);\n                if (idx !== undefined && idx !== -1) {\n                    this.listeners?.splice(idx, 1);\n                }\n            },\n        };\n    }\n    /** Emits a new value to the output. */\n    emit(value) {\n        if (this.destroyed) {\n            throw new RuntimeError(953 /* RuntimeErrorCode.OUTPUT_REF_DESTROYED */, ngDevMode &&\n                'Unexpected emit for destroyed `OutputRef`. ' +\n                    'The owning directive/component is destroyed.');\n        }\n        if (this.listeners === null) {\n            return;\n        }\n        const previousConsumer = setActiveConsumer$1(null);\n        try {\n            for (const listenerFn of this.listeners) {\n                try {\n                    listenerFn(value);\n                }\n                catch (err) {\n                    this.errorHandler?.handleError(err);\n                }\n            }\n        }\n        finally {\n            setActiveConsumer$1(previousConsumer);\n        }\n    }\n}\n/** Gets the owning `DestroyRef` for the given output. */\nfunction getOutputDestroyRef(ref) {\n    return ref.destroyRef;\n}\n\n/**\n * The `output` function allows declaration of Angular outputs in\n * directives and components.\n *\n * You can use outputs to emit values to parent directives and component.\n * Parents can subscribe to changes via:\n *\n * - template event bindings. For example, `(myOutput)=\"doSomething($event)\"`\n * - programmatic subscription by using `OutputRef#subscribe`.\n *\n * @usageNotes\n *\n * To use `output()`, import the function from `@angular/core`.\n *\n * ```ts\n * import {output} from '@angular/core';\n * ```\n *\n * Inside your component, introduce a new class member and initialize\n * it with a call to `output`.\n *\n * ```ts\n * @Directive({\n *   ...\n * })\n * export class MyDir {\n *   nameChange = output<string>();    // OutputEmitterRef<string>\n *   onClick    = output();            // OutputEmitterRef<void>\n * }\n * ```\n *\n * You can emit values to consumers of your directive, by using\n * the `emit` method from `OutputEmitterRef`.\n *\n * ```ts\n * updateName(newName: string): void {\n *   this.nameChange.emit(newName);\n * }\n * ```\n * @initializerApiFunction {\"showTypesInSignaturePreview\": true}\n * @publicAPI\n */\nfunction output(opts) {\n    ngDevMode && assertInInjectionContext(output);\n    return new OutputEmitterRef();\n}\n\nfunction inputFunction(initialValue, opts) {\n    ngDevMode && assertInInjectionContext(input);\n    return createInputSignal(initialValue, opts);\n}\nfunction inputRequiredFunction(opts) {\n    ngDevMode && assertInInjectionContext(input);\n    return createInputSignal(REQUIRED_UNSET_VALUE, opts);\n}\n/**\n * The `input` function allows declaration of Angular inputs in directives\n * and components.\n *\n * There are two variants of inputs that can be declared:\n *\n *   1. **Optional inputs** with an initial value.\n *   2. **Required inputs** that consumers need to set.\n *\n * By default, the `input` function will declare optional inputs that\n * always have an initial value. Required inputs can be declared\n * using the `input.required()` function.\n *\n * Inputs are signals. The values of an input are exposed as a `Signal`.\n * The signal always holds the latest value of the input that is bound\n * from the parent.\n *\n * @usageNotes\n * To use signal-based inputs, import `input` from `@angular/core`.\n *\n * ```ts\n * import {input} from '@angular/core`;\n * ```\n *\n * Inside your component, introduce a new class member and initialize\n * it with a call to `input` or `input.required`.\n *\n * ```ts\n * @Component({\n *   ...\n * })\n * export class UserProfileComponent {\n *   firstName = input<string>();             // Signal<string|undefined>\n *   lastName  = input.required<string>();    // Signal<string>\n *   age       = input(0)                     // Signal<number>\n * }\n * ```\n *\n * Inside your component template, you can display values of the inputs\n * by calling the signal.\n *\n * ```html\n * <span>{{firstName()}}</span>\n * ```\n *\n * @publicAPI\n * @initializerApiFunction\n */\nconst input = (() => {\n    // Note: This may be considered a side-effect, but nothing will depend on\n    // this assignment, unless this `input` constant export is accessed. It's a\n    // self-contained side effect that is local to the user facing`input` export.\n    inputFunction.required = inputRequiredFunction;\n    return inputFunction;\n})();\n\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nfunction injectElementRef() {\n    return createElementRef(getCurrentTNode(), getLView());\n}\n/**\n * Creates an ElementRef given a node.\n *\n * @param tNode The node for which you'd like an ElementRef\n * @param lView The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nfunction createElementRef(tNode, lView) {\n    return new ElementRef(getNativeByTNode(tNode, lView));\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](https://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.\nclass ElementRef {\n    /**\n     * <div class=\"callout is-critical\">\n     *   <header>Use with caution</header>\n     *   <p>\n     *    Use this API as the last resort when direct access to DOM is needed. Use templating and\n     *    data-binding provided by Angular instead. Alternatively you can take a look at\n     *    {@link Renderer2} which provides an API that can be safely used.\n     *   </p>\n     * </div>\n     */\n    nativeElement;\n    constructor(nativeElement) {\n        this.nativeElement = nativeElement;\n    }\n    /**\n     * @internal\n     * @nocollapse\n     */\n    static __NG_ELEMENT_ID__ = injectElementRef;\n}\n/**\n * Unwraps `ElementRef` and return the `nativeElement`.\n *\n * @param value value to unwrap\n * @returns `nativeElement` if `ElementRef` otherwise returns value as is.\n */\nfunction unwrapElementRef(value) {\n    return value instanceof ElementRef ? value.nativeElement : value;\n}\n\nfunction symbolIterator() {\n    // @ts-expect-error accessing a private member\n    return this._results[Symbol.iterator]();\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 * ```ts\n * @Component({...})\n * class Container {\n *   @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nclass QueryList {\n    _emitDistinctChangesOnly;\n    dirty = true;\n    _onDirty = undefined;\n    _results = [];\n    _changesDetected = false;\n    _changes = undefined;\n    length = 0;\n    first = undefined;\n    last = undefined;\n    /**\n     * Returns `Observable` of `QueryList` notifying the subscriber of changes.\n     */\n    get changes() {\n        return (this._changes ??= new Subject());\n    }\n    /**\n     * @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change\n     *     has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in\n     *     the same result)\n     */\n    constructor(_emitDistinctChangesOnly = false) {\n        this._emitDistinctChangesOnly = _emitDistinctChangesOnly;\n    }\n    /**\n     * Returns the QueryList entry at `index`.\n     */\n    get(index) {\n        return this._results[index];\n    }\n    /**\n     * See\n     * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n     */\n    map(fn) {\n        return this._results.map(fn);\n    }\n    filter(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    find(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    reduce(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    forEach(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    some(fn) {\n        return this._results.some(fn);\n    }\n    /**\n     * Returns a copy of the internal results list as an Array.\n     */\n    toArray() {\n        return this._results.slice();\n    }\n    toString() {\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     * @param identityAccessor Optional function for extracting stable object identity from a value\n     *    in the array. This function is executed for each element of the query result list while\n     *    comparing current query list with the new one (provided as a first argument of the `reset`\n     *    function) to detect if the lists are different. If the function is not provided, elements\n     *    are compared as is (without any pre-processing).\n     */\n    reset(resultsTree, identityAccessor) {\n        this.dirty = false;\n        const newResultFlat = flatten(resultsTree);\n        if ((this._changesDetected = !arrayEquals(this._results, newResultFlat, identityAccessor))) {\n            this._results = newResultFlat;\n            this.length = newResultFlat.length;\n            this.last = newResultFlat[this.length - 1];\n            this.first = newResultFlat[0];\n        }\n    }\n    /**\n     * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n     */\n    notifyOnChanges() {\n        if (this._changes !== undefined && (this._changesDetected || !this._emitDistinctChangesOnly))\n            this._changes.next(this);\n    }\n    /** @internal */\n    onDirty(cb) {\n        this._onDirty = cb;\n    }\n    /** internal */\n    setDirty() {\n        this.dirty = true;\n        this._onDirty?.();\n    }\n    /** internal */\n    destroy() {\n        if (this._changes !== undefined) {\n            this._changes.complete();\n            this._changes.unsubscribe();\n        }\n    }\n    [Symbol.iterator] = (() => symbolIterator)();\n}\n\n/**\n * The name of an attribute that can be added to the hydration boundary node\n * (component host node) to disable hydration for the content within that boundary.\n */\nconst SKIP_HYDRATION_ATTR_NAME = 'ngSkipHydration';\n/** Lowercase name of the `ngSkipHydration` attribute used for case-insensitive comparisons. */\nconst SKIP_HYDRATION_ATTR_NAME_LOWER_CASE = 'ngskiphydration';\n/**\n * Helper function to check if a given TNode has the 'ngSkipHydration' attribute.\n */\nfunction hasSkipHydrationAttrOnTNode(tNode) {\n    const attrs = tNode.mergedAttrs;\n    if (attrs === null)\n        return false;\n    // only ever look at the attribute name and skip the values\n    for (let i = 0; i < attrs.length; i += 2) {\n        const value = attrs[i];\n        // This is a marker, which means that the static attributes section is over,\n        // so we can exit early.\n        if (typeof value === 'number')\n            return false;\n        if (typeof value === 'string' && value.toLowerCase() === SKIP_HYDRATION_ATTR_NAME_LOWER_CASE) {\n            return true;\n        }\n    }\n    return false;\n}\n/**\n * Helper function to check if a given RElement has the 'ngSkipHydration' attribute.\n */\nfunction hasSkipHydrationAttrOnRElement(rNode) {\n    return rNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME);\n}\n/**\n * Checks whether a TNode has a flag to indicate that it's a part of\n * a skip hydration block.\n */\nfunction hasInSkipHydrationBlockFlag(tNode) {\n    return (tNode.flags & 128 /* TNodeFlags.inSkipHydrationBlock */) === 128 /* TNodeFlags.inSkipHydrationBlock */;\n}\n/**\n * Helper function that determines if a given node is within a skip hydration block\n * by navigating up the TNode tree to see if any parent nodes have skip hydration\n * attribute.\n */\nfunction isInSkipHydrationBlock(tNode) {\n    if (hasInSkipHydrationBlockFlag(tNode)) {\n        return true;\n    }\n    let currentTNode = tNode.parent;\n    while (currentTNode) {\n        if (hasInSkipHydrationBlockFlag(tNode) || hasSkipHydrationAttrOnTNode(currentTNode)) {\n            return true;\n        }\n        currentTNode = currentTNode.parent;\n    }\n    return false;\n}\n/**\n * Check if an i18n block is in a skip hydration section by looking at a parent TNode\n * to determine if this TNode is in a skip hydration section or the TNode has\n * the `ngSkipHydration` attribute.\n */\nfunction isI18nInSkipHydrationBlock(parentTNode) {\n    return (hasInSkipHydrationBlockFlag(parentTNode) ||\n        hasSkipHydrationAttrOnTNode(parentTNode) ||\n        isInSkipHydrationBlock(parentTNode));\n}\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 * @see [Change detection usage](/api/core/ChangeDetectorRef?tab=usage-notes)\n * @see [Skipping component subtrees](/best-practices/skipping-subtrees)\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// Keeps track of the currently-active LViews.\nconst TRACKED_LVIEWS = new Map();\n// Used for generating unique IDs for LViews.\nlet uniqueIdCounter = 0;\n/** Gets a unique ID that can be assigned to an LView. */\nfunction getUniqueLViewId() {\n    return uniqueIdCounter++;\n}\n/** Starts tracking an LView. */\nfunction registerLView(lView) {\n    ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');\n    TRACKED_LVIEWS.set(lView[ID], lView);\n}\n/** Gets an LView by its unique ID. */\nfunction getLViewById(id) {\n    ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');\n    return TRACKED_LVIEWS.get(id) || null;\n}\n/** Stops tracking an LView. */\nfunction unregisterLView(lView) {\n    ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');\n    TRACKED_LVIEWS.delete(lView[ID]);\n}\n/** Gets the currently-tracked views. */\nfunction getTrackedLViews() {\n    return TRACKED_LVIEWS;\n}\n\n/**\n * The internal view context which is specific to a given DOM element, directive or\n * component instance. Each value in here (besides the LView and element node details)\n * can be present, null or undefined. If undefined then it implies the value has not been\n * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.\n *\n * Each value will get filled when the respective value is examined within the getContext\n * function. The component, element and each directive instance will share the same instance\n * of the context.\n */\nclass LContext {\n    lViewId;\n    nodeIndex;\n    native;\n    /**\n     * The instance of the Component node.\n     */\n    component;\n    /**\n     * The list of active directives that exist on this element.\n     */\n    directives;\n    /**\n     * The map of local references (local reference name => element or directive instance) that\n     * exist on this element.\n     */\n    localRefs;\n    /** Component's parent view data. */\n    get lView() {\n        return getLViewById(this.lViewId);\n    }\n    constructor(\n    /**\n     * ID of the component's parent view data.\n     */\n    lViewId, \n    /**\n     * The index instance of the node.\n     */\n    nodeIndex, \n    /**\n     * The instance of the DOM node that is attached to the lNode.\n     */\n    native) {\n        this.lViewId = lViewId;\n        this.nodeIndex = nodeIndex;\n        this.native = native;\n    }\n}\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    let 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 (isLView(mpValue)) {\n            const lView = mpValue;\n            let nodeIndex;\n            let component = undefined;\n            let 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);\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            const native = unwrapRNode(lView[nodeIndex]);\n            const existingCtx = readPatchedData(native);\n            const 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 (let 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        const 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        let parent = rElement;\n        while ((parent = parent.parentNode)) {\n            const parentContext = readPatchedData(parent);\n            if (parentContext) {\n                const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;\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                const index = findViaNativeElement(lView, rElement);\n                if (index >= 0) {\n                    const native = unwrapRNode(lView[index]);\n                    const 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 new LContext(lView[ID], nodeIndex, native);\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    let patchedData = readPatchedData(componentInstance);\n    let lView;\n    if (isLView(patchedData)) {\n        const contextLView = patchedData;\n        const nodeIndex = findViaComponent(contextLView, componentInstance);\n        lView = getComponentLViewByIndex(nodeIndex, contextLView);\n        const context = createLContext(contextLView, nodeIndex, lView[HOST]);\n        context.component = componentInstance;\n        attachPatchData(componentInstance, context);\n        attachPatchData(context.native, context);\n    }\n    else {\n        const context = patchedData;\n        const contextLView = context.lView;\n        ngDevMode && assertLView(contextLView);\n        lView = getComponentLViewByIndex(context.nodeIndex, contextLView);\n    }\n    return lView;\n}\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\nfunction attachLViewId(target, data) {\n    target[MONKEY_PATCH_KEY_NAME] = data[ID];\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 readLView(target) {\n    const data = readPatchedData(target);\n    if (isLView(data)) {\n        return data;\n    }\n    return data ? data.lView : null;\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    ngDevMode && assertDefined(target, 'Target expected');\n    // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this\n    // for `LView`, because we have control over when an `LView` is created and destroyed, whereas\n    // we can't know when to remove an `LContext`.\n    if (isLView(data)) {\n        target[MONKEY_PATCH_KEY_NAME] = data[ID];\n        registerLView(data);\n    }\n    else {\n        target[MONKEY_PATCH_KEY_NAME] = data;\n    }\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    const data = target[MONKEY_PATCH_KEY_NAME];\n    return typeof data === 'number' ? getLViewById(data) : data || null;\n}\nfunction readPatchedLView(target) {\n    const value = readPatchedData(target);\n    if (value) {\n        return (isLView(value) ? value : value.lView);\n    }\n    return null;\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    const tView = lView[TVIEW];\n    for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n        if (unwrapRNode(lView[i]) === target) {\n            return i;\n        }\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    const componentIndices = lView[TVIEW].components;\n    if (componentIndices) {\n        for (let i = 0; i < componentIndices.length; i++) {\n            const elementComponentIndex = componentIndices[i];\n            const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n            if (componentView[CONTEXT] === componentInstance) {\n                return elementComponentIndex;\n            }\n        }\n    }\n    else {\n        const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n        const 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    let tNode = lView[TVIEW].firstChild;\n    while (tNode) {\n        const directiveIndexStart = tNode.directiveStart;\n        const directiveIndexEnd = tNode.directiveEnd;\n        for (let 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 applied to a node at a specific index. The list includes\n * directives matched by selector and any host directives, but it excludes components.\n * Use `getComponentAtNodeIndex` to find the component applied to a node.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n */\nfunction getDirectivesAtNodeIndex(nodeIndex, lView) {\n    const tNode = lView[TVIEW].data[nodeIndex];\n    if (tNode.directiveStart === 0)\n        return EMPTY_ARRAY;\n    const results = [];\n    for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n        const directiveInstance = lView[i];\n        if (!isComponentInstance(directiveInstance)) {\n            results.push(directiveInstance);\n        }\n    }\n    return results;\n}\nfunction getComponentAtNodeIndex(nodeIndex, lView) {\n    const tNode = lView[TVIEW].data[nodeIndex];\n    const { directiveStart, componentOffset } = tNode;\n    return componentOffset > -1 ? lView[directiveStart + componentOffset] : 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    const tNode = lView[TVIEW].data[nodeIndex];\n    if (tNode && tNode.localNames) {\n        const result = {};\n        let localIndex = tNode.index + 1;\n        for (let 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/**\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    let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n    while (lView && !(lView[FLAGS] & 512 /* LViewFlags.IsRoot */)) {\n        lView = getLViewParent(lView);\n    }\n    ngDevMode && assertLView(lView);\n    return lView;\n}\n/**\n * Returns the context information associated with the application where the target is situated. It\n * does this by walking the parent views until it gets to the root view, then getting the context\n * off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nfunction getRootContext(viewOrComponent) {\n    const rootView = getRootView(viewOrComponent);\n    ngDevMode &&\n        assertDefined(rootView[CONTEXT], 'Root view 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 * Retrieves the component instance associated with a given DOM element.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n *   <div>\n *     <child-comp></child-comp>\n *   </div>\n * </app-root>\n * ```\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 `<app-root>` 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 */\nfunction getComponent(element) {\n    ngDevMode && assertDomElement(element);\n    const context = getLContext(element);\n    if (context === null)\n        return null;\n    if (context.component === undefined) {\n        const lView = context.lView;\n        if (lView === null) {\n            return null;\n        }\n        context.component = getComponentAtNodeIndex(context.nodeIndex, 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 */\nfunction getContext(element) {\n    assertDomElement(element);\n    const context = getLContext(element);\n    const lView = context ? context.lView : null;\n    return lView === null ? null : 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 */\nfunction getOwningComponent(elementOrDir) {\n    const context = getLContext(elementOrDir);\n    let lView = context ? context.lView : null;\n    if (lView === null)\n        return null;\n    let parent;\n    while (lView[TVIEW].type === 2 /* TViewType.Embedded */ && (parent = getLViewParent(lView))) {\n        lView = parent;\n    }\n    return lView[FLAGS] & 512 /* LViewFlags.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 */\nfunction getRootComponents(elementOrDir) {\n    const lView = readPatchedLView(elementOrDir);\n    return lView !== null ? [getRootContext(lView)] : [];\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 */\nfunction getInjector(elementOrDir) {\n    const context = getLContext(elementOrDir);\n    const lView = context ? context.lView : null;\n    if (lView === null)\n        return Injector.NULL;\n    const tNode = lView[TVIEW].data[context.nodeIndex];\n    return new NodeInjector(tNode, 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    const context = getLContext(element);\n    const lView = context ? context.lView : null;\n    if (lView === null)\n        return [];\n    const tView = lView[TVIEW];\n    const tNode = tView.data[context.nodeIndex];\n    const providerTokens = [];\n    const startIndex = tNode.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n    const endIndex = tNode.directiveEnd;\n    for (let i = startIndex; i < endIndex; i++) {\n        let 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 node. Does not include\n * component instances.\n *\n * @usageNotes\n * Given the following DOM structure:\n *\n * ```html\n * <app-root>\n *   <button my-button></button>\n *   <my-comp></my-comp>\n * </app-root>\n * ```\n *\n * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`\n * directive that is associated with the DOM node.\n *\n * Calling `getDirectives` on `<my-comp>` will return an empty array.\n *\n * @param node DOM node for which to get the directives.\n * @returns Array of directives associated with the node.\n *\n * @publicApi\n */\nfunction getDirectives(node) {\n    // Skip text nodes because we can't have directives associated with them.\n    if (node instanceof Text) {\n        return [];\n    }\n    const context = getLContext(node);\n    const lView = context ? context.lView : null;\n    if (lView === null) {\n        return [];\n    }\n    const tView = lView[TVIEW];\n    const nodeIndex = context.nodeIndex;\n    if (!tView?.data[nodeIndex]) {\n        return [];\n    }\n    if (context.directives === undefined) {\n        context.directives = getDirectivesAtNodeIndex(nodeIndex, lView);\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 ? [] : [...context.directives];\n}\n/**\n * Returns the debug (partial) metadata for a particular directive or component instance.\n * The function accepts an instance of a directive or component and returns the corresponding\n * metadata.\n *\n * @param directiveOrComponentInstance Instance of a directive or component\n * @returns metadata of the passed directive or component\n *\n * @publicApi\n */\nfunction getDirectiveMetadata$1(directiveOrComponentInstance) {\n    const { constructor } = directiveOrComponentInstance;\n    if (!constructor) {\n        throw new Error('Unable to find the instance constructor');\n    }\n    // In case a component inherits from a directive, we may have component and directive metadata\n    // To ensure we don't get the metadata of the directive, we want to call `getComponentDef` first.\n    const componentDef = getComponentDef(constructor);\n    if (componentDef) {\n        const inputs = extractInputDebugMetadata(componentDef.inputs);\n        return {\n            inputs,\n            outputs: componentDef.outputs,\n            encapsulation: componentDef.encapsulation,\n            changeDetection: componentDef.onPush\n                ? ChangeDetectionStrategy.OnPush\n                : ChangeDetectionStrategy.Default,\n        };\n    }\n    const directiveDef = getDirectiveDef(constructor);\n    if (directiveDef) {\n        const inputs = extractInputDebugMetadata(directiveDef.inputs);\n        return { inputs, outputs: directiveDef.outputs };\n    }\n    return null;\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    const context = getLContext(target);\n    if (context === null)\n        return {};\n    if (context.localRefs === undefined) {\n        const lView = context.lView;\n        if (lView === null) {\n            return {};\n        }\n        context.localRefs = discoverLocalRefs(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 */\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    const hostElement = getHostElement(component);\n    return hostElement.textContent || '';\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 * ```html\n * <app-root>\n *   <div (click)=\"doSomething()\"></div>\n * </app-root>\n * ```\n *\n * Calling `getListeners` on `<div>` will return an object that looks as follows:\n *\n * ```ts\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 */\nfunction getListeners(element) {\n    ngDevMode && assertDomElement(element);\n    const lContext = getLContext(element);\n    const lView = lContext === null ? null : lContext.lView;\n    if (lView === null)\n        return [];\n    const tView = lView[TVIEW];\n    const lCleanup = lView[CLEANUP];\n    const tCleanup = tView.cleanup;\n    const listeners = [];\n    if (tCleanup && lCleanup) {\n        for (let i = 0; i < tCleanup.length;) {\n            const firstParam = tCleanup[i++];\n            const secondParam = tCleanup[i++];\n            if (typeof firstParam === 'string') {\n                const name = firstParam;\n                const listenerElement = unwrapRNode(lView[secondParam]);\n                const callback = lCleanup[tCleanup[i++]];\n                const 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                const type = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0 ? 'dom' : 'output';\n                const useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n                if (element == listenerElement) {\n                    listeners.push({ element, name, callback, useCapture, 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 &&\n        obj.declaredInputs !== undefined &&\n        obj.findHostDirectiveDefs !== undefined);\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    const lContext = getLContext(target);\n    const nodeIndx = lContext.nodeIndex;\n    const lView = lContext.lView;\n    ngDevMode && assertLView(lView);\n    const 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 * A directive definition holds additional metadata using bitwise flags to indicate\n * for example whether it is signal based.\n *\n * This information needs to be separate from the `publicName -> minifiedName`\n * mappings for backwards compatibility.\n */\nfunction extractInputDebugMetadata(inputs) {\n    const res = {};\n    for (const key in inputs) {\n        if (!inputs.hasOwnProperty(key)) {\n            continue;\n        }\n        const value = inputs[key];\n        if (value === undefined) {\n            continue;\n        }\n        let minifiedName;\n        if (Array.isArray(value)) {\n            minifiedName = value[0];\n            // flags are not used for now.\n            // TODO: Consider exposing flag information in discovery.\n        }\n        else {\n            minifiedName = value;\n        }\n        res[key] = minifiedName;\n    }\n    return res;\n}\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` and `Server`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nlet 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    throw new RuntimeError(210 /* RuntimeErrorCode.MISSING_DOCUMENT */, (typeof ngDevMode === 'undefined' || ngDevMode) &&\n        `The document object is not available in this context. Make sure the DOCUMENT injection token is provided.`);\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.\n}\n\n/**\n * A DI token representing a string ID, used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated} is being used.\n *\n * The token is needed in cases when multiple applications are bootstrapped on a page\n * (for example, using `bootstrapApplication` calls). In this case, ensure that those applications\n * have different `APP_ID` value setup. For example:\n *\n * ```ts\n * bootstrapApplication(ComponentA, {\n *   providers: [\n *     { provide: APP_ID, useValue: 'app-a' },\n *     // ... other providers ...\n *   ]\n * });\n *\n * bootstrapApplication(ComponentB, {\n *   providers: [\n *     { provide: APP_ID, useValue: 'app-b' },\n *     // ... other providers ...\n *   ]\n * });\n * ```\n *\n * By default, when there is only one application bootstrapped, you don't need to provide the\n * `APP_ID` token (the `ng` will be used as an app ID).\n *\n * @publicApi\n */\nconst APP_ID = new InjectionToken(ngDevMode ? 'AppId' : '', {\n    providedIn: 'root',\n    factory: () => DEFAULT_APP_ID,\n});\n/** Default value of the `APP_ID` token. */\nconst DEFAULT_APP_ID = 'ng';\n/**\n * A function that is executed when a platform is initialized.\n *\n * @deprecated from v19.0.0, use providePlatformInitializer instead\n *\n * @see {@link providePlatformInitializer}\n *\n * @publicApi\n */\nconst PLATFORM_INITIALIZER = new InjectionToken(ngDevMode ? 'Platform Initializer' : '');\n/**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\nconst PLATFORM_ID = new InjectionToken(ngDevMode ? 'Platform ID' : '', {\n    providedIn: 'platform',\n    factory: () => 'unknown', // set a default platform name, when none set explicitly\n});\n/**\n * A DI token that indicates the root directory of\n * the application\n * @publicApi\n * @deprecated\n */\nconst PACKAGE_ROOT_URL = new InjectionToken(ngDevMode ? 'Application Packages Root URL' : '');\n// We keep this token here, rather than the animations package, so that modules that only care\n// about which animations module is loaded (e.g. the CDK) can retrieve it without having to\n// include extra dependencies. See #44970 for more context.\n/**\n * A [DI token](api/core/InjectionToken) that indicates which animations\n * module has been loaded.\n * @publicApi\n */\nconst ANIMATION_MODULE_TYPE = new InjectionToken(ngDevMode ? 'AnimationModuleType' : '');\n// TODO(crisbeto): link to CSP guide here.\n/**\n * Token used to configure the [Content Security Policy](https://web.dev/strict-csp/) nonce that\n * Angular will apply when inserting inline styles. If not provided, Angular will look up its value\n * from the `ngCspNonce` attribute of the application root node.\n *\n * @publicApi\n */\nconst CSP_NONCE = new InjectionToken(ngDevMode ? 'CSP nonce' : '', {\n    providedIn: 'root',\n    factory: () => {\n        // Ideally we wouldn't have to use `querySelector` here since we know that the nonce will be on\n        // the root node, but because the token value is used in renderers, it has to be available\n        // *very* early in the bootstrapping process. This should be a fairly shallow search, because\n        // the app won't have been added to the DOM yet. Some approaches that were considered:\n        // 1. Find the root node through `ApplicationRef.components[i].location` - normally this would\n        // be enough for our purposes, but the token is injected very early so the `components` array\n        // isn't populated yet.\n        // 2. Find the root `LView` through the current `LView` - renderers are a prerequisite to\n        // creating the `LView`. This means that no `LView` will have been entered when this factory is\n        // invoked for the root component.\n        // 3. Have the token factory return `() => string` which is invoked when a nonce is requested -\n        // the slightly later execution does allow us to get an `LView` reference, but the fact that\n        // it is a function means that it could be executed at *any* time (including immediately) which\n        // may lead to weird bugs.\n        // 4. Have the `ComponentFactory` read the attribute and provide it to the injector under the\n        // hood - has the same problem as #1 and #2 in that the renderer is used to query for the root\n        // node and the nonce value needs to be available when the renderer is created.\n        return getDocument().body?.querySelector('[ngCspNonce]')?.getAttribute('ngCspNonce') || null;\n    },\n});\nconst IMAGE_CONFIG_DEFAULTS = {\n    breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n    placeholderResolution: 30,\n    disableImageSizeWarning: false,\n    disableImageLazyLoadWarning: false,\n};\n/**\n * Injection token that configures the image optimized image functionality.\n * See {@link ImageConfig} for additional information about parameters that\n * can be used.\n *\n * @see {@link NgOptimizedImage}\n * @see {@link ImageConfig}\n * @publicApi\n */\nconst IMAGE_CONFIG = new InjectionToken(ngDevMode ? 'ImageConfig' : '', {\n    providedIn: 'root',\n    factory: () => IMAGE_CONFIG_DEFAULTS,\n});\n\n/**\n * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.\n *\n * Example:\n *\n * ```ts\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}\nfunction initTransferState() {\n    const transferState = new TransferState();\n    if (inject(PLATFORM_ID) === 'browser') {\n        transferState.store = retrieveTransferredState(getDocument(), inject(APP_ID));\n    }\n    return transferState;\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 * The `TransferState` is available as an injectable token.\n * On the client, just inject this token using DI and use it, it will be lazily initialized.\n * On the server it's already included if `renderApplication` function is used. Otherwise, import\n * the `ServerTransferStateModule` module to make the `TransferState` available.\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 deserialized in a\n * non-lossy manner.\n *\n * @publicApi\n */\nclass TransferState {\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: TransferState,\n        providedIn: 'root',\n        factory: initTransferState,\n    });\n    /** @internal */\n    store = {};\n    onSerializeCallbacks = {};\n    /**\n     * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n     */\n    get(key, defaultValue) {\n        return this.store[key] !== undefined ? this.store[key] : defaultValue;\n    }\n    /**\n     * Set the value corresponding to a key.\n     */\n    set(key, value) {\n        this.store[key] = value;\n    }\n    /**\n     * Remove a key from the store.\n     */\n    remove(key) {\n        delete this.store[key];\n    }\n    /**\n     * Test whether a key exists in the store.\n     */\n    hasKey(key) {\n        return this.store.hasOwnProperty(key);\n    }\n    /**\n     * Indicates whether the state is empty.\n     */\n    get isEmpty() {\n        return Object.keys(this.store).length === 0;\n    }\n    /**\n     * Register a callback to provide the value for a key when `toJson` is called.\n     */\n    onSerialize(key, callback) {\n        this.onSerializeCallbacks[key] = callback;\n    }\n    /**\n     * Serialize the current state of the store to JSON.\n     */\n    toJson() {\n        // Call the onSerialize callbacks and put those values into the store.\n        for (const 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        // Escape script tag to avoid break out of <script> tag in serialized output.\n        // Encoding of `<` is the same behaviour as G3 script_builders.\n        return JSON.stringify(this.store).replace(/</g, '\\\\u003C');\n    }\n}\nfunction retrieveTransferredState(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    const script = doc.getElementById(appId + '-state');\n    if (script?.textContent) {\n        try {\n            // Avoid using any here as it triggers lint errors in google3 (any is not allowed).\n            // Decoding of `<` is done of the box by browsers and node.js, same behaviour as G3\n            // script_builders.\n            return JSON.parse(script.textContent);\n        }\n        catch (e) {\n            console.warn('Exception while restoring TransferState for app ' + appId, e);\n        }\n    }\n    return {};\n}\n\n/** Encodes that the node lookup should start from the host node of this component. */\nconst REFERENCE_NODE_HOST = 'h';\n/** Encodes that the node lookup should start from the document body node. */\nconst REFERENCE_NODE_BODY = 'b';\n/**\n * Describes navigation steps that the runtime logic need to perform,\n * starting from a given (known) element.\n */\nvar NodeNavigationStep;\n(function (NodeNavigationStep) {\n    NodeNavigationStep[\"FirstChild\"] = \"f\";\n    NodeNavigationStep[\"NextSibling\"] = \"n\";\n})(NodeNavigationStep || (NodeNavigationStep = {}));\n/**\n * Keys within serialized view data structure to represent various\n * parts. See the `SerializedView` interface below for additional information.\n */\nconst ELEMENT_CONTAINERS = 'e';\nconst TEMPLATES = 't';\nconst CONTAINERS = 'c';\nconst MULTIPLIER = 'x';\nconst NUM_ROOT_NODES = 'r';\nconst TEMPLATE_ID = 'i'; // as it's also an \"id\"\nconst NODES = 'n';\nconst DISCONNECTED_NODES = 'd';\nconst I18N_DATA = 'l';\nconst DEFER_BLOCK_ID = 'di';\nconst DEFER_BLOCK_STATE$1 = 's';\nconst DEFER_PARENT_BLOCK_ID = 'p';\nconst DEFER_HYDRATE_TRIGGERS = 't';\nconst DEFER_PREFETCH_TRIGGERS = 'pt';\n\n/**\n * Internal token that specifies whether DOM reuse logic\n * during hydration is enabled.\n */\nconst IS_HYDRATION_DOM_REUSE_ENABLED = new InjectionToken(typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_HYDRATION_DOM_REUSE_ENABLED' : '');\n// By default (in client rendering mode), we remove all the contents\n// of the host element and render an application after that.\nconst PRESERVE_HOST_CONTENT_DEFAULT = false;\n/**\n * Internal token that indicates whether host element content should be\n * retained during the bootstrap.\n */\nconst PRESERVE_HOST_CONTENT = new InjectionToken(typeof ngDevMode === 'undefined' || !!ngDevMode ? 'PRESERVE_HOST_CONTENT' : '', {\n    providedIn: 'root',\n    factory: () => PRESERVE_HOST_CONTENT_DEFAULT,\n});\n/**\n * Internal token that indicates whether hydration support for i18n\n * is enabled.\n */\nconst IS_I18N_HYDRATION_ENABLED = new InjectionToken(typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_I18N_HYDRATION_ENABLED' : '');\n/**\n * Internal token that indicates whether event replay support for SSR\n * is enabled.\n */\nconst IS_EVENT_REPLAY_ENABLED = new InjectionToken(typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_EVENT_REPLAY_ENABLED' : '');\nconst EVENT_REPLAY_ENABLED_DEFAULT = false;\n/**\n * Internal token that indicates whether incremental hydration support\n * is enabled.\n */\nconst IS_INCREMENTAL_HYDRATION_ENABLED = new InjectionToken(typeof ngDevMode === 'undefined' || !!ngDevMode ? 'IS_INCREMENTAL_HYDRATION_ENABLED' : '');\n/**\n * A map of DOM elements with `jsaction` attributes grouped by action names.\n */\nconst JSACTION_BLOCK_ELEMENT_MAP = new InjectionToken(ngDevMode ? 'JSACTION_BLOCK_ELEMENT_MAP' : '', {\n    providedIn: 'root',\n    factory: () => new Map(),\n});\n\n/** Actions that are supported by the tracing framework. */\nvar TracingAction;\n(function (TracingAction) {\n    TracingAction[TracingAction[\"CHANGE_DETECTION\"] = 0] = \"CHANGE_DETECTION\";\n    TracingAction[TracingAction[\"AFTER_NEXT_RENDER\"] = 1] = \"AFTER_NEXT_RENDER\";\n})(TracingAction || (TracingAction = {}));\n/**\n * Injection token for a `TracingService`, optionally provided.\n */\nconst TracingService = new InjectionToken(ngDevMode ? 'TracingService' : '');\n\nconst markedFeatures = new Set();\n// tslint:disable:ban\n/**\n * A guarded `performance.mark` for feature marking.\n *\n * This method exists because while all supported browser and node.js version supported by Angular\n * support performance.mark API. This is not the case for other environments such as JSDOM and\n * Cloudflare workers.\n */\nfunction performanceMarkFeature(feature) {\n    if (markedFeatures.has(feature)) {\n        return;\n    }\n    markedFeatures.add(feature);\n    performance?.mark?.('mark_feature_usage', { detail: { feature } });\n}\n\n/**\n * Asserts that the current stack frame is not within a reactive context. Useful\n * to disallow certain code from running inside a reactive context (see {@link toSignal}).\n *\n * @param debugFn a reference to the function making the assertion (used for the error message).\n *\n * @publicApi\n */\nfunction assertNotInReactiveContext(debugFn, extraContext) {\n    // Taking a `Function` instead of a string name here prevents the un-minified name of the function\n    // from being retained in the bundle regardless of minification.\n    if (getActiveConsumer$1() !== null) {\n        throw new RuntimeError(-602 /* RuntimeErrorCode.ASSERTION_NOT_INSIDE_REACTIVE_CONTEXT */, ngDevMode &&\n            `${debugFn.name}() cannot be called from within a reactive context.${extraContext ? ` ${extraContext}` : ''}`);\n    }\n}\n\n/**\n * The phase to run an `afterRender` or `afterNextRender` callback in.\n *\n * Callbacks in the same phase run in the order they are registered. Phases run in the\n * following order after each render:\n *\n *   1. `AfterRenderPhase.EarlyRead`\n *   2. `AfterRenderPhase.Write`\n *   3. `AfterRenderPhase.MixedReadWrite`\n *   4. `AfterRenderPhase.Read`\n *\n * Angular is unable to verify or enforce that phases are used correctly, and instead\n * relies on each developer to follow the guidelines documented for each value and\n * carefully choose the appropriate one, refactoring their code if necessary. By doing\n * so, Angular is better able to minimize the performance degradation associated with\n * manual DOM access, ensuring the best experience for the end users of your application\n * or library.\n *\n * @deprecated Specify the phase for your callback to run in by passing a spec-object as the first\n *   parameter to `afterRender` or `afterNextRender` instead of a function.\n */\nvar AfterRenderPhase;\n(function (AfterRenderPhase) {\n    /**\n     * Use `AfterRenderPhase.EarlyRead` for callbacks that only need to **read** from the\n     * DOM before a subsequent `AfterRenderPhase.Write` callback, for example to perform\n     * custom layout that the browser doesn't natively support. Prefer the\n     * `AfterRenderPhase.EarlyRead` phase if reading can wait until after the write phase.\n     * **Never** write to the DOM in this phase.\n     *\n     * <div class=\"docs-alert docs-alert-important\">\n     *\n     * Using this value can degrade performance.\n     * Instead, prefer using built-in browser functionality when possible.\n     *\n     * </div>\n     */\n    AfterRenderPhase[AfterRenderPhase[\"EarlyRead\"] = 0] = \"EarlyRead\";\n    /**\n     * Use `AfterRenderPhase.Write` for callbacks that only **write** to the DOM. **Never**\n     * read from the DOM in this phase.\n     */\n    AfterRenderPhase[AfterRenderPhase[\"Write\"] = 1] = \"Write\";\n    /**\n     * Use `AfterRenderPhase.MixedReadWrite` for callbacks that read from or write to the\n     * DOM, that haven't been refactored to use a different phase. **Never** use this phase if\n     * it is possible to divide the work among the other phases instead.\n     *\n     * <div class=\"docs-alert docs-alert-critical\">\n     *\n     * Using this value can **significantly** degrade performance.\n     * Instead, prefer dividing work into the appropriate phase callbacks.\n     *\n     * </div>\n     */\n    AfterRenderPhase[AfterRenderPhase[\"MixedReadWrite\"] = 2] = \"MixedReadWrite\";\n    /**\n     * Use `AfterRenderPhase.Read` for callbacks that only **read** from the DOM. **Never**\n     * write to the DOM in this phase.\n     */\n    AfterRenderPhase[AfterRenderPhase[\"Read\"] = 3] = \"Read\";\n})(AfterRenderPhase || (AfterRenderPhase = {}));\n\nclass AfterRenderManager {\n    impl = null;\n    execute() {\n        this.impl?.execute();\n    }\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: AfterRenderManager,\n        providedIn: 'root',\n        factory: () => new AfterRenderManager(),\n    });\n}\nconst AFTER_RENDER_PHASES = /* @__PURE__ **/ (() => [\n    AfterRenderPhase.EarlyRead,\n    AfterRenderPhase.Write,\n    AfterRenderPhase.MixedReadWrite,\n    AfterRenderPhase.Read,\n])();\nclass AfterRenderImpl {\n    ngZone = inject(NgZone);\n    scheduler = inject(ChangeDetectionScheduler);\n    errorHandler = inject(ErrorHandler, { optional: true });\n    /** Current set of active sequences. */\n    sequences = new Set();\n    /** Tracks registrations made during the current set of executions. */\n    deferredRegistrations = new Set();\n    /** Whether the `AfterRenderManager` is currently executing hooks. */\n    executing = false;\n    constructor() {\n        // Inject the tracing service to make sure it's initialized.\n        inject(TracingService, { optional: true });\n    }\n    /**\n     * Run the sequence of phases of hooks, once through. As a result of executing some hooks, more\n     * might be scheduled.\n     */\n    execute() {\n        this.executing = true;\n        for (const phase of AFTER_RENDER_PHASES) {\n            for (const sequence of this.sequences) {\n                if (sequence.erroredOrDestroyed || !sequence.hooks[phase]) {\n                    continue;\n                }\n                try {\n                    sequence.pipelinedValue = this.ngZone.runOutsideAngular(() => this.maybeTrace(() => sequence.hooks[phase](sequence.pipelinedValue), sequence.snapshot));\n                }\n                catch (err) {\n                    sequence.erroredOrDestroyed = true;\n                    this.errorHandler?.handleError(err);\n                }\n            }\n        }\n        this.executing = false;\n        // Cleanup step to reset sequence state and also collect one-shot sequences for removal.\n        for (const sequence of this.sequences) {\n            sequence.afterRun();\n            if (sequence.once) {\n                this.sequences.delete(sequence);\n                // Destroy the sequence so its on destroy callbacks can be cleaned up\n                // immediately, instead of waiting until the injector is destroyed.\n                sequence.destroy();\n            }\n        }\n        for (const sequence of this.deferredRegistrations) {\n            this.sequences.add(sequence);\n        }\n        if (this.deferredRegistrations.size > 0) {\n            this.scheduler.notify(8 /* NotificationSource.DeferredRenderHook */);\n        }\n        this.deferredRegistrations.clear();\n    }\n    register(sequence) {\n        if (!this.executing) {\n            this.sequences.add(sequence);\n            // Trigger an `ApplicationRef.tick()` if one is not already pending/running, because we have a\n            // new render hook that needs to run.\n            this.scheduler.notify(7 /* NotificationSource.RenderHook */);\n        }\n        else {\n            this.deferredRegistrations.add(sequence);\n        }\n    }\n    unregister(sequence) {\n        if (this.executing && this.sequences.has(sequence)) {\n            // We can't remove an `AfterRenderSequence` in the middle of iteration.\n            // Instead, mark it as destroyed so it doesn't run any more, and mark it as one-shot so it'll\n            // be removed at the end of the current execution.\n            sequence.erroredOrDestroyed = true;\n            sequence.pipelinedValue = undefined;\n            sequence.once = true;\n        }\n        else {\n            // It's safe to directly remove this sequence.\n            this.sequences.delete(sequence);\n            this.deferredRegistrations.delete(sequence);\n        }\n    }\n    maybeTrace(fn, snapshot) {\n        // Only trace the execution if the snapshot is defined.\n        return snapshot ? snapshot.run(TracingAction.AFTER_NEXT_RENDER, fn) : fn();\n    }\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: AfterRenderImpl,\n        providedIn: 'root',\n        factory: () => new AfterRenderImpl(),\n    });\n}\nclass AfterRenderSequence {\n    impl;\n    hooks;\n    once;\n    snapshot;\n    /**\n     * Whether this sequence errored or was destroyed during this execution, and hooks should no\n     * longer run for it.\n     */\n    erroredOrDestroyed = false;\n    /**\n     * The value returned by the last hook execution (if any), ready to be pipelined into the next\n     * one.\n     */\n    pipelinedValue = undefined;\n    unregisterOnDestroy;\n    constructor(impl, hooks, once, destroyRef, snapshot = null) {\n        this.impl = impl;\n        this.hooks = hooks;\n        this.once = once;\n        this.snapshot = snapshot;\n        this.unregisterOnDestroy = destroyRef?.onDestroy(() => this.destroy());\n    }\n    afterRun() {\n        this.erroredOrDestroyed = false;\n        this.pipelinedValue = undefined;\n        // Clear the tracing snapshot after the initial run. This snapshot only\n        // associates the initial run of the hook with the context that created it.\n        // Follow-up runs are independent of that initial context and have different\n        // triggers.\n        this.snapshot?.dispose();\n        this.snapshot = null;\n    }\n    destroy() {\n        this.impl.unregister(this);\n        this.unregisterOnDestroy?.();\n    }\n}\n\nfunction afterRender(callbackOrSpec, options) {\n    ngDevMode &&\n        assertNotInReactiveContext(afterRender, 'Call `afterRender` outside of a reactive context. For example, schedule the render ' +\n            'callback inside the component constructor`.');\n    !options?.injector && assertInInjectionContext(afterRender);\n    const injector = options?.injector ?? inject(Injector);\n    if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n        return NOOP_AFTER_RENDER_REF;\n    }\n    performanceMarkFeature('NgAfterRender');\n    return afterRenderImpl(callbackOrSpec, injector, options, /* once */ false);\n}\nfunction afterNextRender(callbackOrSpec, options) {\n    !options?.injector && assertInInjectionContext(afterNextRender);\n    const injector = options?.injector ?? inject(Injector);\n    if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n        return NOOP_AFTER_RENDER_REF;\n    }\n    performanceMarkFeature('NgAfterNextRender');\n    return afterRenderImpl(callbackOrSpec, injector, options, /* once */ true);\n}\nfunction getHooks(callbackOrSpec, phase) {\n    if (callbackOrSpec instanceof Function) {\n        const hooks = [undefined, undefined, undefined, undefined];\n        hooks[phase] = callbackOrSpec;\n        return hooks;\n    }\n    else {\n        return [\n            callbackOrSpec.earlyRead,\n            callbackOrSpec.write,\n            callbackOrSpec.mixedReadWrite,\n            callbackOrSpec.read,\n        ];\n    }\n}\n/**\n * Shared implementation for `afterRender` and `afterNextRender`.\n */\nfunction afterRenderImpl(callbackOrSpec, injector, options, once) {\n    const manager = injector.get(AfterRenderManager);\n    // Lazily initialize the handler implementation, if necessary. This is so that it can be\n    // tree-shaken if `afterRender` and `afterNextRender` aren't used.\n    manager.impl ??= injector.get(AfterRenderImpl);\n    const tracing = injector.get(TracingService, null, { optional: true });\n    const hooks = options?.phase ?? AfterRenderPhase.MixedReadWrite;\n    const destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;\n    const sequence = new AfterRenderSequence(manager.impl, getHooks(callbackOrSpec, hooks), once, destroyRef, tracing?.snapshot(null));\n    manager.impl.register(sequence);\n    return sequence;\n}\n/** `AfterRenderRef` that does nothing. */\nconst NOOP_AFTER_RENDER_REF = {\n    destroy() { },\n};\n\n/**\n * Describes the state of defer block dependency loading.\n */\nvar DeferDependenciesLoadingState;\n(function (DeferDependenciesLoadingState) {\n    /** Initial state, dependency loading is not yet triggered */\n    DeferDependenciesLoadingState[DeferDependenciesLoadingState[\"NOT_STARTED\"] = 0] = \"NOT_STARTED\";\n    /** Dependency loading is in progress */\n    DeferDependenciesLoadingState[DeferDependenciesLoadingState[\"IN_PROGRESS\"] = 1] = \"IN_PROGRESS\";\n    /** Dependency loading has completed successfully */\n    DeferDependenciesLoadingState[DeferDependenciesLoadingState[\"COMPLETE\"] = 2] = \"COMPLETE\";\n    /** Dependency loading has failed */\n    DeferDependenciesLoadingState[DeferDependenciesLoadingState[\"FAILED\"] = 3] = \"FAILED\";\n})(DeferDependenciesLoadingState || (DeferDependenciesLoadingState = {}));\n/** Slot index where `minimum` parameter value is stored. */\nconst MINIMUM_SLOT = 0;\n/** Slot index where `after` parameter value is stored. */\nconst LOADING_AFTER_SLOT = 1;\n/**\n * Describes the current state of this defer block instance.\n *\n * @publicApi\n */\nvar DeferBlockState;\n(function (DeferBlockState) {\n    /** The placeholder block content is rendered */\n    DeferBlockState[DeferBlockState[\"Placeholder\"] = 0] = \"Placeholder\";\n    /** The loading block content is rendered */\n    DeferBlockState[DeferBlockState[\"Loading\"] = 1] = \"Loading\";\n    /** The main content block content is rendered */\n    DeferBlockState[DeferBlockState[\"Complete\"] = 2] = \"Complete\";\n    /** The error block content is rendered */\n    DeferBlockState[DeferBlockState[\"Error\"] = 3] = \"Error\";\n})(DeferBlockState || (DeferBlockState = {}));\n/**\n * Describes the initial state of this defer block instance.\n *\n * Note: this state is internal only and *must* be represented\n * with a number lower than any value in the `DeferBlockState` enum.\n */\nvar DeferBlockInternalState;\n(function (DeferBlockInternalState) {\n    /** Initial state. Nothing is rendered yet. */\n    DeferBlockInternalState[DeferBlockInternalState[\"Initial\"] = -1] = \"Initial\";\n})(DeferBlockInternalState || (DeferBlockInternalState = {}));\nconst NEXT_DEFER_BLOCK_STATE = 0;\n// Note: it's *important* to keep the state in this slot, because this slot\n// is used by runtime logic to differentiate between LViews, LContainers and\n// other types (see `isLView` and `isLContainer` functions). In case of defer\n// blocks, this slot would always be a number.\nconst DEFER_BLOCK_STATE = 1;\nconst STATE_IS_FROZEN_UNTIL = 2;\nconst LOADING_AFTER_CLEANUP_FN = 3;\nconst TRIGGER_CLEANUP_FNS = 4;\nconst PREFETCH_TRIGGER_CLEANUP_FNS = 5;\nconst SSR_UNIQUE_ID = 6;\nconst SSR_BLOCK_STATE = 7;\nconst ON_COMPLETE_FNS = 8;\nconst HYDRATE_TRIGGER_CLEANUP_FNS = 9;\n/**\n * Options for configuring defer blocks behavior.\n * @publicApi\n */\nvar DeferBlockBehavior;\n(function (DeferBlockBehavior) {\n    /**\n     * Manual triggering mode for defer blocks. Provides control over when defer blocks render\n     * and which state they render.\n     */\n    DeferBlockBehavior[DeferBlockBehavior[\"Manual\"] = 0] = \"Manual\";\n    /**\n     * Playthrough mode for defer blocks. This mode behaves like defer blocks would in a browser.\n     * This is the default behavior in test environments.\n     */\n    DeferBlockBehavior[DeferBlockBehavior[\"Playthrough\"] = 1] = \"Playthrough\";\n})(DeferBlockBehavior || (DeferBlockBehavior = {}));\n\n/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Registers a cleanup function associated with a prefetching trigger\n * or a regular trigger of a defer block.\n */\nfunction storeTriggerCleanupFn(type, lDetails, cleanupFn) {\n    const key = getCleanupFnKeyByType(type);\n    if (lDetails[key] === null) {\n        lDetails[key] = [];\n    }\n    lDetails[key].push(cleanupFn);\n}\n/**\n * Invokes registered cleanup functions either for prefetch or for regular triggers.\n */\nfunction invokeTriggerCleanupFns(type, lDetails) {\n    const key = getCleanupFnKeyByType(type);\n    const cleanupFns = lDetails[key];\n    if (cleanupFns !== null) {\n        for (const cleanupFn of cleanupFns) {\n            cleanupFn();\n        }\n        lDetails[key] = null;\n    }\n}\n/**\n * Invokes registered cleanup functions for prefetch, hydrate, and regular triggers.\n */\nfunction invokeAllTriggerCleanupFns(lDetails) {\n    invokeTriggerCleanupFns(1 /* TriggerType.Prefetch */, lDetails);\n    invokeTriggerCleanupFns(0 /* TriggerType.Regular */, lDetails);\n    invokeTriggerCleanupFns(2 /* TriggerType.Hydrate */, lDetails);\n}\nfunction getCleanupFnKeyByType(type) {\n    let key = TRIGGER_CLEANUP_FNS;\n    if (type === 1 /* TriggerType.Prefetch */) {\n        key = PREFETCH_TRIGGER_CLEANUP_FNS;\n    }\n    else if (type === 2 /* TriggerType.Hydrate */) {\n        key = HYDRATE_TRIGGER_CLEANUP_FNS;\n    }\n    return key;\n}\n\n/**\n * Calculates a data slot index for defer block info (either static or\n * instance-specific), given an index of a defer instruction.\n */\nfunction getDeferBlockDataIndex(deferBlockIndex) {\n    // Instance state is located at the *next* position\n    // after the defer block slot in an LView or TView.data.\n    return deferBlockIndex + 1;\n}\n/** Retrieves a defer block state from an LView, given a TNode that represents a block. */\nfunction getLDeferBlockDetails(lView, tNode) {\n    const tView = lView[TVIEW];\n    const slotIndex = getDeferBlockDataIndex(tNode.index);\n    ngDevMode && assertIndexInDeclRange(tView, slotIndex);\n    return lView[slotIndex];\n}\n/** Stores a defer block instance state in LView. */\nfunction setLDeferBlockDetails(lView, deferBlockIndex, lDetails) {\n    const tView = lView[TVIEW];\n    const slotIndex = getDeferBlockDataIndex(deferBlockIndex);\n    ngDevMode && assertIndexInDeclRange(tView, slotIndex);\n    lView[slotIndex] = lDetails;\n}\n/** Retrieves static info about a defer block, given a TView and a TNode that represents a block. */\nfunction getTDeferBlockDetails(tView, tNode) {\n    const slotIndex = getDeferBlockDataIndex(tNode.index);\n    ngDevMode && assertIndexInDeclRange(tView, slotIndex);\n    return tView.data[slotIndex];\n}\n/** Stores a defer block static info in `TView.data`. */\nfunction setTDeferBlockDetails(tView, deferBlockIndex, deferBlockConfig) {\n    const slotIndex = getDeferBlockDataIndex(deferBlockIndex);\n    ngDevMode && assertIndexInDeclRange(tView, slotIndex);\n    tView.data[slotIndex] = deferBlockConfig;\n}\nfunction getTemplateIndexForState(newState, hostLView, tNode) {\n    const tView = hostLView[TVIEW];\n    const tDetails = getTDeferBlockDetails(tView, tNode);\n    switch (newState) {\n        case DeferBlockState.Complete:\n            return tDetails.primaryTmplIndex;\n        case DeferBlockState.Loading:\n            return tDetails.loadingTmplIndex;\n        case DeferBlockState.Error:\n            return tDetails.errorTmplIndex;\n        case DeferBlockState.Placeholder:\n            return tDetails.placeholderTmplIndex;\n        default:\n            ngDevMode && throwError(`Unexpected defer block state: ${newState}`);\n            return null;\n    }\n}\n/**\n * Returns a minimum amount of time that a given state should be rendered for,\n * taking into account `minimum` parameter value. If the `minimum` value is\n * not specified - returns `null`.\n */\nfunction getMinimumDurationForState(tDetails, currentState) {\n    if (currentState === DeferBlockState.Placeholder) {\n        return tDetails.placeholderBlockConfig?.[MINIMUM_SLOT] ?? null;\n    }\n    else if (currentState === DeferBlockState.Loading) {\n        return tDetails.loadingBlockConfig?.[MINIMUM_SLOT] ?? null;\n    }\n    return null;\n}\n/** Retrieves the value of the `after` parameter on the @loading block. */\nfunction getLoadingBlockAfter(tDetails) {\n    return tDetails.loadingBlockConfig?.[LOADING_AFTER_SLOT] ?? null;\n}\n/**\n * Adds downloaded dependencies into a directive or a pipe registry,\n * making sure that a dependency doesn't yet exist in the registry.\n */\nfunction addDepsToRegistry(currentDeps, newDeps) {\n    if (!currentDeps || currentDeps.length === 0) {\n        return newDeps;\n    }\n    const currentDepSet = new Set(currentDeps);\n    for (const dep of newDeps) {\n        currentDepSet.add(dep);\n    }\n    // If `currentDeps` is the same length, there were no new deps and can\n    // return the original array.\n    return currentDeps.length === currentDepSet.size ? currentDeps : Array.from(currentDepSet);\n}\n/** Retrieves a TNode that represents main content of a defer block. */\nfunction getPrimaryBlockTNode(tView, tDetails) {\n    const adjustedIndex = tDetails.primaryTmplIndex + HEADER_OFFSET;\n    return getTNode(tView, adjustedIndex);\n}\n/**\n * Asserts whether all dependencies for a defer block are loaded.\n * Always run this function (in dev mode) before rendering a defer\n * block in completed state.\n */\nfunction assertDeferredDependenciesLoaded(tDetails) {\n    assertEqual(tDetails.loadingState, DeferDependenciesLoadingState.COMPLETE, 'Expecting all deferred dependencies to be loaded.');\n}\n/**\n * Determines if a given value matches the expected structure of a defer block\n *\n * We can safely rely on the primaryTmplIndex because every defer block requires\n * that a primary template exists. All the other template options are optional.\n */\nfunction isTDeferBlockDetails(value) {\n    return (value !== null &&\n        typeof value === 'object' &&\n        typeof value.primaryTmplIndex === 'number');\n}\n/**\n * Whether a given TNode represents a defer block.\n */\nfunction isDeferBlock(tView, tNode) {\n    let tDetails = null;\n    const slotIndex = getDeferBlockDataIndex(tNode.index);\n    // Check if a slot index is in the reasonable range.\n    // Note: we do `-1` on the right border, since defer block details are stored\n    // in the `n+1` slot, see `getDeferBlockDataIndex` for more info.\n    if (HEADER_OFFSET < slotIndex && slotIndex < tView.bindingStartIndex) {\n        tDetails = getTDeferBlockDetails(tView, tNode);\n    }\n    return !!tDetails && isTDeferBlockDetails(tDetails);\n}\n\n/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/** Configuration object used to register passive and capturing events. */\nconst eventListenerOptions = {\n    passive: true,\n    capture: true,\n};\n/** Keeps track of the currently-registered `on hover` triggers. */\nconst hoverTriggers = new WeakMap();\n/** Keeps track of the currently-registered `on interaction` triggers. */\nconst interactionTriggers = new WeakMap();\n/** Currently-registered `viewport` triggers. */\nconst viewportTriggers = new WeakMap();\n/** Names of the events considered as interaction events. */\nconst interactionEventNames = ['click', 'keydown'];\n/** Names of the events considered as hover events. */\nconst hoverEventNames = ['mouseenter', 'mouseover', 'focusin'];\n/** `IntersectionObserver` used to observe `viewport` triggers. */\nlet intersectionObserver = null;\n/** Number of elements currently observed with `viewport` triggers. */\nlet observedViewportElements = 0;\n/** Object keeping track of registered callbacks for a deferred block trigger. */\nclass DeferEventEntry {\n    callbacks = new Set();\n    listener = () => {\n        for (const callback of this.callbacks) {\n            callback();\n        }\n    };\n}\n/**\n * Registers an interaction trigger.\n * @param trigger Element that is the trigger.\n * @param callback Callback to be invoked when the trigger is interacted with.\n */\nfunction onInteraction(trigger, callback) {\n    let entry = interactionTriggers.get(trigger);\n    // If this is the first entry for this element, add the listeners.\n    if (!entry) {\n        // Note that managing events centrally like this lends itself well to using global\n        // event delegation. It currently does delegation at the element level, rather than the\n        // document level, because:\n        // 1. Global delegation is the most effective when there are a lot of events being registered\n        // at the same time. Deferred blocks are unlikely to be used in such a way.\n        // 2. Matching events to their target isn't free. For each `click` and `keydown` event we\n        // would have look through all the triggers and check if the target either is the element\n        // itself or it's contained within the element. Given that `click` and `keydown` are some\n        // of the most common events, this may end up introducing a lot of runtime overhead.\n        // 3. We're still registering only two events per element, no matter how many deferred blocks\n        // are referencing it.\n        entry = new DeferEventEntry();\n        interactionTriggers.set(trigger, entry);\n        for (const name of interactionEventNames) {\n            trigger.addEventListener(name, entry.listener, eventListenerOptions);\n        }\n    }\n    entry.callbacks.add(callback);\n    return () => {\n        const { callbacks, listener } = entry;\n        callbacks.delete(callback);\n        if (callbacks.size === 0) {\n            interactionTriggers.delete(trigger);\n            for (const name of interactionEventNames) {\n                trigger.removeEventListener(name, listener, eventListenerOptions);\n            }\n        }\n    };\n}\n/**\n * Registers a hover trigger.\n * @param trigger Element that is the trigger.\n * @param callback Callback to be invoked when the trigger is hovered over.\n */\nfunction onHover(trigger, callback) {\n    let entry = hoverTriggers.get(trigger);\n    // If this is the first entry for this element, add the listener.\n    if (!entry) {\n        entry = new DeferEventEntry();\n        hoverTriggers.set(trigger, entry);\n        for (const name of hoverEventNames) {\n            trigger.addEventListener(name, entry.listener, eventListenerOptions);\n        }\n    }\n    entry.callbacks.add(callback);\n    return () => {\n        const { callbacks, listener } = entry;\n        callbacks.delete(callback);\n        if (callbacks.size === 0) {\n            for (const name of hoverEventNames) {\n                trigger.removeEventListener(name, listener, eventListenerOptions);\n            }\n            hoverTriggers.delete(trigger);\n        }\n    };\n}\n/**\n * Registers a viewport trigger.\n * @param trigger Element that is the trigger.\n * @param callback Callback to be invoked when the trigger comes into the viewport.\n * @param injector Injector that can be used by the trigger to resolve DI tokens.\n */\nfunction onViewport(trigger, callback, injector) {\n    const ngZone = injector.get(NgZone);\n    let entry = viewportTriggers.get(trigger);\n    intersectionObserver =\n        intersectionObserver ||\n            ngZone.runOutsideAngular(() => {\n                return new IntersectionObserver((entries) => {\n                    for (const current of entries) {\n                        // Only invoke the callbacks if the specific element is intersecting.\n                        if (current.isIntersecting && viewportTriggers.has(current.target)) {\n                            ngZone.run(viewportTriggers.get(current.target).listener);\n                        }\n                    }\n                });\n            });\n    if (!entry) {\n        entry = new DeferEventEntry();\n        ngZone.runOutsideAngular(() => intersectionObserver.observe(trigger));\n        viewportTriggers.set(trigger, entry);\n        observedViewportElements++;\n    }\n    entry.callbacks.add(callback);\n    return () => {\n        // It's possible that a different cleanup callback fully removed this element already.\n        if (!viewportTriggers.has(trigger)) {\n            return;\n        }\n        entry.callbacks.delete(callback);\n        if (entry.callbacks.size === 0) {\n            intersectionObserver?.unobserve(trigger);\n            viewportTriggers.delete(trigger);\n            observedViewportElements--;\n        }\n        if (observedViewportElements === 0) {\n            intersectionObserver?.disconnect();\n            intersectionObserver = null;\n        }\n    };\n}\n/**\n * Helper function to get the LView in which a deferred block's trigger is rendered.\n * @param deferredHostLView LView in which the deferred block is defined.\n * @param deferredTNode TNode defining the deferred block.\n * @param walkUpTimes Number of times to go up in the view hierarchy to find the trigger's view.\n *   A negative value means that the trigger is inside the block's placeholder, while an undefined\n *   value means that the trigger is in the same LView as the deferred block.\n */\nfunction getTriggerLView(deferredHostLView, deferredTNode, walkUpTimes) {\n    // The trigger is in the same view, we don't need to traverse.\n    if (walkUpTimes == null) {\n        return deferredHostLView;\n    }\n    // A positive value or zero means that the trigger is in a parent view.\n    if (walkUpTimes >= 0) {\n        return walkUpViews(walkUpTimes, deferredHostLView);\n    }\n    // If the value is negative, it means that the trigger is inside the placeholder.\n    const deferredContainer = deferredHostLView[deferredTNode.index];\n    ngDevMode && assertLContainer(deferredContainer);\n    const triggerLView = deferredContainer[CONTAINER_HEADER_OFFSET] ?? null;\n    // We need to null check, because the placeholder might not have been rendered yet.\n    if (ngDevMode && triggerLView !== null) {\n        const lDetails = getLDeferBlockDetails(deferredHostLView, deferredTNode);\n        const renderedState = lDetails[DEFER_BLOCK_STATE];\n        assertEqual(renderedState, DeferBlockState.Placeholder, 'Expected a placeholder to be rendered in this defer block.');\n        assertLView(triggerLView);\n    }\n    return triggerLView;\n}\n/**\n * Gets the element that a deferred block's trigger is pointing to.\n * @param triggerLView LView in which the trigger is defined.\n * @param triggerIndex Index at which the trigger element should've been rendered.\n */\nfunction getTriggerElement(triggerLView, triggerIndex) {\n    const element = getNativeByIndex(HEADER_OFFSET + triggerIndex, triggerLView);\n    ngDevMode && assertElement(element);\n    return element;\n}\n/**\n * Registers a DOM-node based trigger.\n * @param initialLView LView in which the defer block is rendered.\n * @param tNode TNode representing the defer block.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to go up/down in the view hierarchy to find the trigger.\n * @param registerFn Function that will register the DOM events.\n * @param callback Callback to be invoked when the trigger receives the event that should render\n *     the deferred block.\n * @param type Trigger type to distinguish between regular and prefetch triggers.\n */\nfunction registerDomTrigger(initialLView, tNode, triggerIndex, walkUpTimes, registerFn, callback, type) {\n    const injector = initialLView[INJECTOR];\n    const zone = injector.get(NgZone);\n    function pollDomTrigger() {\n        // If the initial view was destroyed, we don't need to do anything.\n        if (isDestroyed(initialLView)) {\n            return;\n        }\n        const lDetails = getLDeferBlockDetails(initialLView, tNode);\n        const renderedState = lDetails[DEFER_BLOCK_STATE];\n        // If the block was loaded before the trigger was resolved, we don't need to do anything.\n        if (renderedState !== DeferBlockInternalState.Initial &&\n            renderedState !== DeferBlockState.Placeholder) {\n            return;\n        }\n        const triggerLView = getTriggerLView(initialLView, tNode, walkUpTimes);\n        // Keep polling until we resolve the trigger's LView.\n        if (!triggerLView) {\n            afterNextRender({ read: pollDomTrigger }, { injector });\n            return;\n        }\n        // It's possible that the trigger's view was destroyed before we resolved the trigger element.\n        if (isDestroyed(triggerLView)) {\n            return;\n        }\n        const element = getTriggerElement(triggerLView, triggerIndex);\n        const cleanup = registerFn(element, () => {\n            // `pollDomTrigger` runs outside the zone (because of `afterNextRender`) and registers its\n            // listeners outside the zone, so we jump back into the zone prior to running the callback.\n            zone.run(() => {\n                if (initialLView !== triggerLView) {\n                    removeLViewOnDestroy(triggerLView, cleanup);\n                }\n                callback();\n            });\n        }, injector);\n        // The trigger and deferred block might be in different LViews.\n        // For the main LView the cleanup would happen as a part of\n        // `storeTriggerCleanupFn` logic. For trigger LView we register\n        // a cleanup function there to remove event handlers in case an\n        // LView gets destroyed before a trigger is invoked.\n        if (initialLView !== triggerLView) {\n            storeLViewOnDestroy(triggerLView, cleanup);\n        }\n        storeTriggerCleanupFn(type, lDetails, cleanup);\n    }\n    // Begin polling for the trigger.\n    afterNextRender({ read: pollDomTrigger }, { injector });\n}\n\nconst DEFER_BLOCK_SSR_ID_ATTRIBUTE = 'ngb';\nfunction invokeRegisteredDelegationListeners(event) {\n    const handlerFns = event.currentTarget?.__jsaction_fns?.get(event.type);\n    if (!handlerFns) {\n        return;\n    }\n    for (const handler of handlerFns) {\n        handler(event);\n    }\n}\nfunction setJSActionAttributes(nativeElement, eventTypes, parentDeferBlockId = null) {\n    // jsaction attributes specifically should be applied to elements and not comment nodes.\n    // Comment nodes also have no setAttribute function. So this avoids errors.\n    if (eventTypes.length === 0 || nativeElement.nodeType !== Node.ELEMENT_NODE) {\n        return;\n    }\n    const existingAttr = nativeElement.getAttribute(Attribute$1.JSACTION);\n    // we dedupe cases where hydrate triggers are used as it's possible that\n    // someone may have added an event binding to the root node that matches what the\n    // hydrate trigger adds.\n    const parts = eventTypes.reduce((prev, curr) => {\n        // if there is no existing attribute OR it's not in the existing one, we need to add it\n        return (existingAttr?.indexOf(curr) ?? -1) === -1 ? prev + curr + ':;' : prev;\n    }, '');\n    //  This is required to be a module accessor to appease security tests on setAttribute.\n    nativeElement.setAttribute(Attribute$1.JSACTION, `${existingAttr ?? ''}${parts}`);\n    const blockName = parentDeferBlockId ?? '';\n    if (blockName !== '' && parts.length > 0) {\n        nativeElement.setAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE, blockName);\n    }\n}\nconst sharedStashFunction = (rEl, eventType, listenerFn) => {\n    const el = rEl;\n    const eventListenerMap = el.__jsaction_fns ?? new Map();\n    const eventListeners = eventListenerMap.get(eventType) ?? [];\n    eventListeners.push(listenerFn);\n    eventListenerMap.set(eventType, eventListeners);\n    el.__jsaction_fns = eventListenerMap;\n};\nconst sharedMapFunction = (rEl, jsActionMap) => {\n    let blockName = rEl.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE) ?? '';\n    const el = rEl;\n    const blockSet = jsActionMap.get(blockName) ?? new Set();\n    if (!blockSet.has(el)) {\n        blockSet.add(el);\n    }\n    jsActionMap.set(blockName, blockSet);\n};\nfunction removeListenersFromBlocks(blockNames, jsActionMap) {\n    if (blockNames.length > 0) {\n        let blockList = [];\n        for (let blockName of blockNames) {\n            if (jsActionMap.has(blockName)) {\n                blockList = [...blockList, ...jsActionMap.get(blockName)];\n            }\n        }\n        const replayList = new Set(blockList);\n        replayList.forEach(removeListeners);\n    }\n}\nconst removeListeners = (el) => {\n    el.removeAttribute(Attribute$1.JSACTION);\n    el.removeAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE);\n    el.__jsaction_fns = undefined;\n};\nconst JSACTION_EVENT_CONTRACT = new InjectionToken(ngDevMode ? 'EVENT_CONTRACT_DETAILS' : '', {\n    providedIn: 'root',\n    factory: () => ({}),\n});\nfunction invokeListeners(event, currentTarget) {\n    const handlerFns = currentTarget?.__jsaction_fns?.get(event.type);\n    if (!handlerFns) {\n        return;\n    }\n    for (const handler of handlerFns) {\n        handler(event);\n    }\n}\n\n/**\n * An internal injection token to reference `DehydratedBlockRegistry` implementation\n * in a tree-shakable way.\n */\nconst DEHYDRATED_BLOCK_REGISTRY = new InjectionToken(ngDevMode ? 'DEHYDRATED_BLOCK_REGISTRY' : '');\n/**\n * The DehydratedBlockRegistry is used for incremental hydration purposes. It keeps\n * track of the Defer Blocks that need hydration so we can effectively\n * navigate up to the top dehydrated defer block and fire appropriate cleanup\n * functions post hydration.\n */\nclass DehydratedBlockRegistry {\n    registry = new Map();\n    cleanupFns = new Map();\n    jsActionMap = inject(JSACTION_BLOCK_ELEMENT_MAP);\n    contract = inject(JSACTION_EVENT_CONTRACT);\n    add(blockId, info) {\n        this.registry.set(blockId, info);\n    }\n    get(blockId) {\n        return this.registry.get(blockId) ?? null;\n    }\n    has(blockId) {\n        return this.registry.has(blockId);\n    }\n    cleanup(hydratedBlocks) {\n        removeListenersFromBlocks(hydratedBlocks, this.jsActionMap);\n        for (let blockId of hydratedBlocks) {\n            this.registry.delete(blockId);\n            this.jsActionMap.delete(blockId);\n            this.invokeTriggerCleanupFns(blockId);\n            this.hydrating.delete(blockId);\n        }\n        if (this.size === 0) {\n            this.contract.instance?.cleanUp();\n        }\n    }\n    get size() {\n        return this.registry.size;\n    }\n    // we have to leave the lowest block Id in the registry\n    // unless that block has no children\n    addCleanupFn(blockId, fn) {\n        let cleanupFunctions = [];\n        if (this.cleanupFns.has(blockId)) {\n            cleanupFunctions = this.cleanupFns.get(blockId);\n        }\n        cleanupFunctions.push(fn);\n        this.cleanupFns.set(blockId, cleanupFunctions);\n    }\n    invokeTriggerCleanupFns(blockId) {\n        const fns = this.cleanupFns.get(blockId) ?? [];\n        for (let fn of fns) {\n            fn();\n        }\n        this.cleanupFns.delete(blockId);\n    }\n    // Blocks that are being hydrated.\n    hydrating = new Map();\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: DehydratedBlockRegistry,\n        providedIn: null,\n        factory: () => new DehydratedBlockRegistry(),\n    });\n}\n\n/**\n * The name of the key used in the TransferState collection,\n * where hydration information is located.\n */\nconst TRANSFER_STATE_TOKEN_ID = '__nghData__';\n/**\n * Lookup key used to reference DOM hydration data (ngh) in `TransferState`.\n */\nconst NGH_DATA_KEY = makeStateKey(TRANSFER_STATE_TOKEN_ID);\n/**\n * The name of the key used in the TransferState collection,\n * where serialized defer block information is located.\n */\nconst TRANSFER_STATE_DEFER_BLOCKS_INFO = '__nghDeferData__';\n/**\n * Lookup key used to retrieve defer block datain `TransferState`.\n */\nconst NGH_DEFER_BLOCKS_KEY = makeStateKey(TRANSFER_STATE_DEFER_BLOCKS_INFO);\n/**\n * The name of the attribute that would be added to host component\n * nodes and contain a reference to a particular slot in transferred\n * state that contains the necessary hydration info for this component.\n */\nconst NGH_ATTR_NAME = 'ngh';\n/**\n * Marker used in a comment node to ensure hydration content integrity\n */\nconst SSR_CONTENT_INTEGRITY_MARKER = 'nghm';\n/**\n * Reference to a function that reads `ngh` attribute value from a given RNode\n * and retrieves hydration information from the TransferState using that value\n * as an index. Returns `null` by default, when hydration is not enabled.\n *\n * @param rNode Component's host element.\n * @param injector Injector that this component has access to.\n * @param isRootView Specifies whether we trying to read hydration info for the root view.\n */\nlet _retrieveHydrationInfoImpl = () => null;\nfunction retrieveHydrationInfoImpl(rNode, injector, isRootView = false) {\n    let nghAttrValue = rNode.getAttribute(NGH_ATTR_NAME);\n    if (nghAttrValue == null)\n        return null;\n    // For cases when a root component also acts as an anchor node for a ViewContainerRef\n    // (for example, when ViewContainerRef is injected in a root component), there is a need\n    // to serialize information about the component itself, as well as an LContainer that\n    // represents this ViewContainerRef. Effectively, we need to serialize 2 pieces of info:\n    // (1) hydration info for the root component itself and (2) hydration info for the\n    // ViewContainerRef instance (an LContainer). Each piece of information is included into\n    // the hydration data (in the TransferState object) separately, thus we end up with 2 ids.\n    // Since we only have 1 root element, we encode both bits of info into a single string:\n    // ids are separated by the `|` char (e.g. `10|25`, where `10` is the ngh for a component view\n    // and 25 is the `ngh` for a root view which holds LContainer).\n    const [componentViewNgh, rootViewNgh] = nghAttrValue.split('|');\n    nghAttrValue = isRootView ? rootViewNgh : componentViewNgh;\n    if (!nghAttrValue)\n        return null;\n    // We've read one of the ngh ids, keep the remaining one, so that\n    // we can set it back on the DOM element.\n    const rootNgh = rootViewNgh ? `|${rootViewNgh}` : '';\n    const remainingNgh = isRootView ? componentViewNgh : rootNgh;\n    let data = {};\n    // An element might have an empty `ngh` attribute value (e.g. `<comp ngh=\"\" />`),\n    // which means that no special annotations are required. Do not attempt to read\n    // from the TransferState in this case.\n    if (nghAttrValue !== '') {\n        const transferState = injector.get(TransferState, null, { optional: true });\n        if (transferState !== null) {\n            const nghData = transferState.get(NGH_DATA_KEY, []);\n            // The nghAttrValue is always a number referencing an index\n            // in the hydration TransferState data.\n            data = nghData[Number(nghAttrValue)];\n            // If the `ngh` attribute exists and has a non-empty value,\n            // the hydration info *must* be present in the TransferState.\n            // If there is no data for some reasons, this is an error.\n            ngDevMode && assertDefined(data, 'Unable to retrieve hydration info from the TransferState.');\n        }\n    }\n    const dehydratedView = {\n        data,\n        firstChild: rNode.firstChild ?? null,\n    };\n    if (isRootView) {\n        // If there is hydration info present for the root view, it means that there was\n        // a ViewContainerRef injected in the root component. The root component host element\n        // acted as an anchor node in this scenario. As a result, the DOM nodes that represent\n        // embedded views in this ViewContainerRef are located as siblings to the host node,\n        // i.e. `<app-root /><#VIEW1><#VIEW2>...<!--container-->`. In this case, the current\n        // node becomes the first child of this root view and the next sibling is the first\n        // element in the DOM segment.\n        dehydratedView.firstChild = rNode;\n        // We use `0` here, since this is the slot (right after the HEADER_OFFSET)\n        // where a component LView or an LContainer is located in a root LView.\n        setSegmentHead(dehydratedView, 0, rNode.nextSibling);\n    }\n    if (remainingNgh) {\n        // If we have only used one of the ngh ids, store the remaining one\n        // back on this RNode.\n        rNode.setAttribute(NGH_ATTR_NAME, remainingNgh);\n    }\n    else {\n        // The `ngh` attribute is cleared from the DOM node now\n        // that the data has been retrieved for all indices.\n        rNode.removeAttribute(NGH_ATTR_NAME);\n    }\n    // Note: don't check whether this node was claimed for hydration,\n    // because this node might've been previously claimed while processing\n    // template instructions.\n    ngDevMode && markRNodeAsClaimedByHydration(rNode, /* checkIfAlreadyClaimed */ false);\n    ngDevMode && ngDevMode.hydratedComponents++;\n    return dehydratedView;\n}\n/**\n * Sets the implementation for the `retrieveHydrationInfo` function.\n */\nfunction enableRetrieveHydrationInfoImpl() {\n    _retrieveHydrationInfoImpl = retrieveHydrationInfoImpl;\n}\n/**\n * Retrieves hydration info by reading the value from the `ngh` attribute\n * and accessing a corresponding slot in TransferState storage.\n */\nfunction retrieveHydrationInfo(rNode, injector, isRootView = false) {\n    return _retrieveHydrationInfoImpl(rNode, injector, isRootView);\n}\n/**\n * Retrieves the necessary object from a given ViewRef to serialize:\n *  - an LView for component views\n *  - an LContainer for cases when component acts as a ViewContainerRef anchor\n *  - `null` in case of an embedded view\n */\nfunction getLNodeForHydration(viewRef) {\n    // Reading an internal field from `ViewRef` instance.\n    let lView = viewRef._lView;\n    const tView = lView[TVIEW];\n    // A registered ViewRef might represent an instance of an\n    // embedded view, in which case we do not need to annotate it.\n    if (tView.type === 2 /* TViewType.Embedded */) {\n        return null;\n    }\n    // Check if it's a root view and if so, retrieve component's\n    // LView from the first slot after the header.\n    if (isRootView(lView)) {\n        lView = lView[HEADER_OFFSET];\n    }\n    return lView;\n}\nfunction getTextNodeContent(node) {\n    return node.textContent?.replace(/\\s/gm, '');\n}\n/**\n * Restores text nodes and separators into the DOM that were lost during SSR\n * serialization. The hydration process replaces empty text nodes and text\n * nodes that are immediately adjacent to other text nodes with comment nodes\n * that this method filters on to restore those missing nodes that the\n * hydration process is expecting to be present.\n *\n * @param node The app's root HTML Element\n */\nfunction processTextNodeMarkersBeforeHydration(node) {\n    const doc = getDocument();\n    const commentNodesIterator = doc.createNodeIterator(node, NodeFilter.SHOW_COMMENT, {\n        acceptNode(node) {\n            const content = getTextNodeContent(node);\n            const isTextNodeMarker = content === \"ngetn\" /* TextNodeMarker.EmptyNode */ || content === \"ngtns\" /* TextNodeMarker.Separator */;\n            return isTextNodeMarker ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;\n        },\n    });\n    let currentNode;\n    // We cannot modify the DOM while using the commentIterator,\n    // because it throws off the iterator state.\n    // So we collect all marker nodes first and then follow up with\n    // applying the changes to the DOM: either inserting an empty node\n    // or just removing the marker if it was used as a separator.\n    const nodes = [];\n    while ((currentNode = commentNodesIterator.nextNode())) {\n        nodes.push(currentNode);\n    }\n    for (const node of nodes) {\n        if (node.textContent === \"ngetn\" /* TextNodeMarker.EmptyNode */) {\n            node.replaceWith(doc.createTextNode(''));\n        }\n        else {\n            node.remove();\n        }\n    }\n}\n/**\n * Internal type that represents a claimed node.\n * Only used in dev mode.\n */\nvar HydrationStatus;\n(function (HydrationStatus) {\n    HydrationStatus[\"Hydrated\"] = \"hydrated\";\n    HydrationStatus[\"Skipped\"] = \"skipped\";\n    HydrationStatus[\"Mismatched\"] = \"mismatched\";\n})(HydrationStatus || (HydrationStatus = {}));\nconst HYDRATION_INFO_KEY = '__ngDebugHydrationInfo__';\nfunction patchHydrationInfo(node, info) {\n    node[HYDRATION_INFO_KEY] = info;\n}\nfunction readHydrationInfo(node) {\n    return node[HYDRATION_INFO_KEY] ?? null;\n}\n/**\n * Marks a node as \"claimed\" by hydration process.\n * This is needed to make assessments in tests whether\n * the hydration process handled all nodes.\n */\nfunction markRNodeAsClaimedByHydration(node, checkIfAlreadyClaimed = true) {\n    if (!ngDevMode) {\n        throw new Error('Calling `markRNodeAsClaimedByHydration` in prod mode ' +\n            'is not supported and likely a mistake.');\n    }\n    if (checkIfAlreadyClaimed && isRNodeClaimedForHydration(node)) {\n        throw new Error('Trying to claim a node, which was claimed already.');\n    }\n    patchHydrationInfo(node, { status: HydrationStatus.Hydrated });\n    ngDevMode.hydratedNodes++;\n}\nfunction markRNodeAsSkippedByHydration(node) {\n    if (!ngDevMode) {\n        throw new Error('Calling `markRNodeAsSkippedByHydration` in prod mode ' +\n            'is not supported and likely a mistake.');\n    }\n    patchHydrationInfo(node, { status: HydrationStatus.Skipped });\n    ngDevMode.componentsSkippedHydration++;\n}\nfunction countBlocksSkippedByHydration(injector) {\n    const transferState = injector.get(TransferState);\n    const nghDeferData = transferState.get(NGH_DEFER_BLOCKS_KEY, {});\n    if (ngDevMode) {\n        ngDevMode.deferBlocksWithIncrementalHydration = Object.keys(nghDeferData).length;\n    }\n}\nfunction markRNodeAsHavingHydrationMismatch(node, expectedNodeDetails = null, actualNodeDetails = null) {\n    if (!ngDevMode) {\n        throw new Error('Calling `markRNodeAsMismatchedByHydration` in prod mode ' +\n            'is not supported and likely a mistake.');\n    }\n    // The RNode can be a standard HTMLElement (not an Angular component or directive)\n    // The devtools component tree only displays Angular components & directives\n    // Therefore we attach the debug info to the closest component/directive\n    while (node && !getComponent(node)) {\n        node = node?.parentNode;\n    }\n    if (node) {\n        patchHydrationInfo(node, {\n            status: HydrationStatus.Mismatched,\n            expectedNodeDetails,\n            actualNodeDetails,\n        });\n    }\n}\nfunction isRNodeClaimedForHydration(node) {\n    return readHydrationInfo(node)?.status === HydrationStatus.Hydrated;\n}\nfunction setSegmentHead(hydrationInfo, index, node) {\n    hydrationInfo.segmentHeads ??= {};\n    hydrationInfo.segmentHeads[index] = node;\n}\nfunction getSegmentHead(hydrationInfo, index) {\n    return hydrationInfo.segmentHeads?.[index] ?? null;\n}\nfunction isIncrementalHydrationEnabled(injector) {\n    return injector.get(IS_INCREMENTAL_HYDRATION_ENABLED, false, {\n        optional: true,\n    });\n}\n/** Throws an error if the incremental hydration is not enabled */\nfunction assertIncrementalHydrationIsConfigured(injector) {\n    if (!isIncrementalHydrationEnabled(injector)) {\n        throw new RuntimeError(508 /* RuntimeErrorCode.MISCONFIGURED_INCREMENTAL_HYDRATION */, 'Angular has detected that some `@defer` blocks use `hydrate` triggers, ' +\n            'but incremental hydration was not enabled. Please ensure that the `withIncrementalHydration()` ' +\n            'call is added as an argument for the `provideClientHydration()` function call ' +\n            'in your application config.');\n    }\n}\n/** Throws an error if the ssrUniqueId on the LDeferBlockDetails is not present  */\nfunction assertSsrIdDefined(ssrUniqueId) {\n    assertDefined(ssrUniqueId, 'Internal error: expecting an SSR id for a defer block that should be hydrated, but the id is not present');\n}\n/**\n * Returns the size of an <ng-container>, using either the information\n * serialized in `ELEMENT_CONTAINERS` (element container size) or by\n * computing the sum of root nodes in all dehydrated views in a given\n * container (in case this `<ng-container>` was also used as a view\n * container host node, e.g. <ng-container *ngIf>).\n */\nfunction getNgContainerSize(hydrationInfo, index) {\n    const data = hydrationInfo.data;\n    let size = data[ELEMENT_CONTAINERS]?.[index] ?? null;\n    // If there is no serialized information available in the `ELEMENT_CONTAINERS` slot,\n    // check if we have info about view containers at this location (e.g.\n    // `<ng-container *ngIf>`) and use container size as a number of root nodes in this\n    // element container.\n    if (size === null && data[CONTAINERS]?.[index]) {\n        size = calcSerializedContainerSize(hydrationInfo, index);\n    }\n    return size;\n}\nfunction isSerializedElementContainer(hydrationInfo, index) {\n    return hydrationInfo.data[ELEMENT_CONTAINERS]?.[index] !== undefined;\n}\nfunction getSerializedContainerViews(hydrationInfo, index) {\n    return hydrationInfo.data[CONTAINERS]?.[index] ?? null;\n}\n/**\n * Computes the size of a serialized container (the number of root nodes)\n * by calculating the sum of root nodes in all dehydrated views in this container.\n */\nfunction calcSerializedContainerSize(hydrationInfo, index) {\n    const views = getSerializedContainerViews(hydrationInfo, index) ?? [];\n    let numNodes = 0;\n    for (let view of views) {\n        numNodes += view[NUM_ROOT_NODES] * (view[MULTIPLIER] ?? 1);\n    }\n    return numNodes;\n}\n/**\n * Attempt to initialize the `disconnectedNodes` field of the given\n * `DehydratedView`. Returns the initialized value.\n */\nfunction initDisconnectedNodes(hydrationInfo) {\n    // Check if we are processing disconnected info for the first time.\n    if (typeof hydrationInfo.disconnectedNodes === 'undefined') {\n        const nodeIds = hydrationInfo.data[DISCONNECTED_NODES];\n        hydrationInfo.disconnectedNodes = nodeIds ? new Set(nodeIds) : null;\n    }\n    return hydrationInfo.disconnectedNodes;\n}\n/**\n * Checks whether a node is annotated as \"disconnected\", i.e. not present\n * in the DOM at serialization time. We should not attempt hydration for\n * such nodes and instead, use a regular \"creation mode\".\n */\nfunction isDisconnectedNode$1(hydrationInfo, index) {\n    // Check if we are processing disconnected info for the first time.\n    if (typeof hydrationInfo.disconnectedNodes === 'undefined') {\n        const nodeIds = hydrationInfo.data[DISCONNECTED_NODES];\n        hydrationInfo.disconnectedNodes = nodeIds ? new Set(nodeIds) : null;\n    }\n    return !!initDisconnectedNodes(hydrationInfo)?.has(index);\n}\n/**\n * Helper function to prepare text nodes for serialization by ensuring\n * that seperate logical text blocks in the DOM remain separate after\n * serialization.\n */\nfunction processTextNodeBeforeSerialization(context, node) {\n    // Handle cases where text nodes can be lost after DOM serialization:\n    //  1. When there is an *empty text node* in DOM: in this case, this\n    //     node would not make it into the serialized string and as a result,\n    //     this node wouldn't be created in a browser. This would result in\n    //     a mismatch during the hydration, where the runtime logic would expect\n    //     a text node to be present in live DOM, but no text node would exist.\n    //     Example: `<span>{{ name }}</span>` when the `name` is an empty string.\n    //     This would result in `<span></span>` string after serialization and\n    //     in a browser only the `span` element would be created. To resolve that,\n    //     an extra comment node is appended in place of an empty text node and\n    //     that special comment node is replaced with an empty text node *before*\n    //     hydration.\n    //  2. When there are 2 consecutive text nodes present in the DOM.\n    //     Example: `<div>Hello <ng-container *ngIf=\"true\">world</ng-container></div>`.\n    //     In this scenario, the live DOM would look like this:\n    //       <div>#text('Hello ') #text('world') #comment('container')</div>\n    //     Serialized string would look like this: `<div>Hello world<!--container--></div>`.\n    //     The live DOM in a browser after that would be:\n    //       <div>#text('Hello world') #comment('container')</div>\n    //     Notice how 2 text nodes are now \"merged\" into one. This would cause hydration\n    //     logic to fail, since it'd expect 2 text nodes being present, not one.\n    //     To fix this, we insert a special comment node in between those text nodes, so\n    //     serialized representation is: `<div>Hello <!--ngtns-->world<!--container--></div>`.\n    //     This forces browser to create 2 text nodes separated by a comment node.\n    //     Before running a hydration process, this special comment node is removed, so the\n    //     live DOM has exactly the same state as it was before serialization.\n    // Collect this node as required special annotation only when its\n    // contents is empty. Otherwise, such text node would be present on\n    // the client after server-side rendering and no special handling needed.\n    const el = node;\n    const corruptedTextNodes = context.corruptedTextNodes;\n    if (el.textContent === '') {\n        corruptedTextNodes.set(el, \"ngetn\" /* TextNodeMarker.EmptyNode */);\n    }\n    else if (el.nextSibling?.nodeType === Node.TEXT_NODE) {\n        corruptedTextNodes.set(el, \"ngtns\" /* TextNodeMarker.Separator */);\n    }\n}\nfunction convertHydrateTriggersToJsAction(triggers) {\n    let actionList = [];\n    if (triggers !== null) {\n        if (triggers.has(4 /* DeferBlockTrigger.Hover */)) {\n            actionList.push(...hoverEventNames);\n        }\n        if (triggers.has(3 /* DeferBlockTrigger.Interaction */)) {\n            actionList.push(...interactionEventNames);\n        }\n    }\n    return actionList;\n}\n/**\n * Builds a queue of blocks that need to be hydrated, looking up the\n * tree to the topmost defer block that exists in the tree that hasn't\n * been hydrated, but exists in the registry. This queue is in top down\n * hierarchical order as a list of defer block ids.\n * Note: This is utilizing serialized information to navigate up the tree\n */\nfunction getParentBlockHydrationQueue(deferBlockId, injector) {\n    const dehydratedBlockRegistry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n    const transferState = injector.get(TransferState);\n    const deferBlockParents = transferState.get(NGH_DEFER_BLOCKS_KEY, {});\n    let isTopMostDeferBlock = false;\n    let currentBlockId = deferBlockId;\n    let parentBlockPromise = null;\n    const hydrationQueue = [];\n    while (!isTopMostDeferBlock && currentBlockId) {\n        ngDevMode &&\n            assertEqual(hydrationQueue.indexOf(currentBlockId), -1, 'Internal error: defer block hierarchy has a cycle.');\n        isTopMostDeferBlock = dehydratedBlockRegistry.has(currentBlockId);\n        const hydratingParentBlock = dehydratedBlockRegistry.hydrating.get(currentBlockId);\n        if (parentBlockPromise === null && hydratingParentBlock != null) {\n            // TODO: add an ngDevMode asset that `hydratingParentBlock.promise` exists and is of type Promise.\n            parentBlockPromise = hydratingParentBlock.promise;\n            break;\n        }\n        hydrationQueue.unshift(currentBlockId);\n        currentBlockId = deferBlockParents[currentBlockId][DEFER_PARENT_BLOCK_ID];\n    }\n    return { parentBlockPromise, hydrationQueue };\n}\nfunction gatherDeferBlocksByJSActionAttribute(doc) {\n    const jsactionNodes = doc.body.querySelectorAll('[jsaction]');\n    const blockMap = new Set();\n    for (let node of jsactionNodes) {\n        const attr = node.getAttribute('jsaction');\n        const blockId = node.getAttribute('ngb');\n        const eventTypes = [...hoverEventNames.join(':;'), ...interactionEventNames.join(':;')].join('|');\n        if (attr?.match(eventTypes) && blockId !== null) {\n            blockMap.add(node);\n        }\n    }\n    return blockMap;\n}\nfunction appendDeferBlocksToJSActionMap(doc, injector) {\n    const blockMap = gatherDeferBlocksByJSActionAttribute(doc);\n    for (let rNode of blockMap) {\n        const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);\n        sharedMapFunction(rNode, jsActionMap);\n    }\n}\n/**\n * Retrieves defer block hydration information from the TransferState.\n *\n * @param injector Injector that this component has access to.\n */\nlet _retrieveDeferBlockDataImpl = () => {\n    return {};\n};\nfunction retrieveDeferBlockDataImpl(injector) {\n    const transferState = injector.get(TransferState, null, { optional: true });\n    if (transferState !== null) {\n        const nghDeferData = transferState.get(NGH_DEFER_BLOCKS_KEY, {});\n        ngDevMode &&\n            assertDefined(nghDeferData, 'Unable to retrieve defer block info from the TransferState.');\n        return nghDeferData;\n    }\n    return {};\n}\n/**\n * Sets the implementation for the `retrieveDeferBlockData` function.\n */\nfunction enableRetrieveDeferBlockDataImpl() {\n    _retrieveDeferBlockDataImpl = retrieveDeferBlockDataImpl;\n}\n/**\n * Retrieves defer block data from TransferState storage\n */\nfunction retrieveDeferBlockData(injector) {\n    return _retrieveDeferBlockDataImpl(injector);\n}\nfunction isTimerTrigger(triggerInfo) {\n    return typeof triggerInfo === 'object' && triggerInfo.trigger === 5 /* DeferBlockTrigger.Timer */;\n}\nfunction getHydrateTimerTrigger(blockData) {\n    const trigger = blockData[DEFER_HYDRATE_TRIGGERS]?.find((t) => isTimerTrigger(t));\n    return trigger?.delay ?? null;\n}\nfunction hasHydrateTrigger(blockData, trigger) {\n    return blockData[DEFER_HYDRATE_TRIGGERS]?.includes(trigger) ?? false;\n}\n/**\n * Creates a summary of the given serialized defer block, which is used later to properly initialize\n * specific triggers.\n */\nfunction createBlockSummary(blockInfo) {\n    return {\n        data: blockInfo,\n        hydrate: {\n            idle: hasHydrateTrigger(blockInfo, 0 /* DeferBlockTrigger.Idle */),\n            immediate: hasHydrateTrigger(blockInfo, 1 /* DeferBlockTrigger.Immediate */),\n            timer: getHydrateTimerTrigger(blockInfo),\n            viewport: hasHydrateTrigger(blockInfo, 2 /* DeferBlockTrigger.Viewport */),\n        },\n    };\n}\n/**\n * Processes all of the defer block data in the transfer state and creates a map of the summaries\n */\nfunction processBlockData(injector) {\n    const blockData = retrieveDeferBlockData(injector);\n    let blockDetails = new Map();\n    for (let blockId in blockData) {\n        blockDetails.set(blockId, createBlockSummary(blockData[blockId]));\n    }\n    return blockDetails;\n}\n\n/**\n * Defines the CSS styles encapsulation policies for the {@link Component} decorator's\n * `encapsulation` option.\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;\n(function (ViewEncapsulation) {\n    // TODO: consider making `ViewEncapsulation` a `const enum` instead. See\n    // https://github.com/angular/angular/issues/44119 for additional information.\n    /**\n     * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the\n     * component's host element and applying the same attribute to all the CSS selectors provided\n     * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.\n     *\n     * This is the default option.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n    // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n    /**\n     * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided\n     * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable\n     * to any HTML element of the application regardless of their host Component.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n    /**\n     * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates\n     * a ShadowRoot for the component's host element which is then used to encapsulate\n     * all the Component's styling.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation || (ViewEncapsulation = {}));\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular. It lazily constructs the Trusted Types policy, providing helper\n * utilities for promoting strings to Trusted Types. When Trusted Types are not\n * available, strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy$1;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy$1() {\n    if (policy$1 === undefined) {\n        policy$1 = null;\n        if (_global.trustedTypes) {\n            try {\n                policy$1 = _global.trustedTypes.createPolicy('angular', {\n                    createHTML: (s) => s,\n                    createScript: (s) => s,\n                    createScriptURL: (s) => s,\n                });\n            }\n            catch {\n                // trustedTypes.createPolicy throws if called with a name that is\n                // already registered, even in report-only mode. Until the API changes,\n                // catch the error not to break the applications functionally. In such\n                // cases, the code will fall back to using strings.\n            }\n        }\n    }\n    return policy$1;\n}\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will be interpreted as HTML by a browser, e.g. when assigning to\n * element.innerHTML.\n */\nfunction trustedHTMLFromString(html) {\n    return getPolicy$1()?.createHTML(html) || html;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security In particular, it must be assured that the provided string will\n * never cause an XSS vulnerability if used in a context that will be\n * interpreted and executed as a script by a browser, e.g. when calling eval.\n */\nfunction trustedScriptFromString(script) {\n    return getPolicy$1()?.createScript(script) || script;\n}\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will cause a browser to load and execute a resource, e.g. when\n * assigning to script.src.\n */\nfunction trustedScriptURLFromString(url) {\n    return getPolicy$1()?.createScriptURL(url) || url;\n}\n/**\n * Unsafely call the Function constructor with the given string arguments. It\n * is only available in development mode, and should be stripped out of\n * production code.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only called from development code, as use in production code can lead to\n * XSS vulnerabilities.\n */\nfunction newTrustedFunctionForDev(...args) {\n    if (typeof ngDevMode === 'undefined') {\n        throw new Error('newTrustedFunctionForDev should never be called in production');\n    }\n    if (!_global.trustedTypes) {\n        // In environments that don't support Trusted Types, fall back to the most\n        // straightforward implementation:\n        return new Function(...args);\n    }\n    // Chrome currently does not support passing TrustedScript to the Function\n    // constructor. The following implements the workaround proposed on the page\n    // below, where the Chromium bug is also referenced:\n    // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor\n    const fnArgs = args.slice(0, -1).join(',');\n    const fnBody = args[args.length - 1];\n    const body = `(function anonymous(${fnArgs}\n) { ${fnBody}\n})`;\n    // Using eval directly confuses the compiler and prevents this module from\n    // being stripped out of JS binaries even if not used. The global['eval']\n    // indirection fixes that.\n    const fn = _global['eval'](trustedScriptFromString(body));\n    if (fn.bind === undefined) {\n        // Workaround for a browser bug that only exists in Chrome 83, where passing\n        // a TrustedScript to eval just returns the TrustedScript back without\n        // evaluating it. In that case, fall back to the most straightforward\n        // implementation:\n        return new Function(...args);\n    }\n    // To completely mimic the behavior of calling \"new Function\", two more\n    // things need to happen:\n    // 1. Stringifying the resulting function should return its source code\n    fn.toString = () => body;\n    // 2. When calling the resulting function, `this` should refer to `global`\n    return fn.bind(_global);\n    // When Trusted Types support in Function constructors is widely available,\n    // the implementation of this function can be simplified to:\n    // return new Function(...args.map(a => trustedScriptFromString(a)));\n}\n\n/**\n * @fileoverview\n * A module to facilitate use of a Trusted Types policy internally within\n * Angular specifically for bypassSecurityTrust* and custom sanitizers. It\n * lazily constructs the Trusted Types policy, providing helper utilities for\n * promoting strings to Trusted Types. When Trusted Types are not available,\n * strings are used as a fallback.\n * @security All use of this module is security-sensitive and should go through\n * security review.\n */\n/**\n * The Trusted Types policy, or null if Trusted Types are not\n * enabled/supported, or undefined if the policy has not been created yet.\n */\nlet policy;\n/**\n * Returns the Trusted Types policy, or null if Trusted Types are not\n * enabled/supported. The first call to this function will create the policy.\n */\nfunction getPolicy() {\n    if (policy === undefined) {\n        policy = null;\n        if (_global.trustedTypes) {\n            try {\n                policy = _global.trustedTypes.createPolicy('angular#unsafe-bypass', {\n                    createHTML: (s) => s,\n                    createScript: (s) => s,\n                    createScriptURL: (s) => s,\n                });\n            }\n            catch {\n                // trustedTypes.createPolicy throws if called with a name that is\n                // already registered, even in report-only mode. Until the API changes,\n                // catch the error not to break the applications functionally. In such\n                // cases, the code will fall back to using strings.\n            }\n        }\n    }\n    return policy;\n}\n/**\n * Unsafely promote a string to a TrustedHTML, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedHTMLFromStringBypass(html) {\n    return getPolicy()?.createHTML(html) || html;\n}\n/**\n * Unsafely promote a string to a TrustedScript, falling back to strings when\n * Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedScriptFromStringBypass(script) {\n    return getPolicy()?.createScript(script) || script;\n}\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * @security This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that it\n * is only passed strings that come directly from custom sanitizers or the\n * bypassSecurityTrust* functions.\n */\nfunction trustedScriptURLFromStringBypass(url) {\n    return getPolicy()?.createScriptURL(url) || url;\n}\n\nclass SafeValueImpl {\n    changingThisBreaksApplicationSecurity;\n    constructor(changingThisBreaksApplicationSecurity) {\n        this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;\n    }\n    toString() {\n        return (`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` +\n            ` (see ${XSS_SECURITY_URL})`);\n    }\n}\nclass SafeHtmlImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"HTML\" /* BypassType.Html */;\n    }\n}\nclass SafeStyleImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"Style\" /* BypassType.Style */;\n    }\n}\nclass SafeScriptImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"Script\" /* BypassType.Script */;\n    }\n}\nclass SafeUrlImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"URL\" /* BypassType.Url */;\n    }\n}\nclass SafeResourceUrlImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"ResourceURL\" /* BypassType.ResourceUrl */;\n    }\n}\nfunction unwrapSafeValue(value) {\n    return value instanceof SafeValueImpl\n        ? value.changingThisBreaksApplicationSecurity\n        : value;\n}\nfunction allowSanitizationBypassAndThrow(value, type) {\n    const actualType = getSanitizationBypassType(value);\n    if (actualType != null && actualType !== type) {\n        // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n        if (actualType === \"ResourceURL\" /* BypassType.ResourceUrl */ && type === \"URL\" /* BypassType.Url */)\n            return true;\n        throw new Error(`Required a safe ${type}, got a ${actualType} (see ${XSS_SECURITY_URL})`);\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 * This helper 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 use one of two strategies for doing this.\n * Default: DOMParser strategy\n * Fallback: InertDocument strategy\n */\nfunction getInertBodyHelper(defaultDoc) {\n    const inertDocumentHelper = new InertDocumentHelper(defaultDoc);\n    return isDOMParserAvailable() ? new DOMParserHelper(inertDocumentHelper) : inertDocumentHelper;\n}\n/**\n * Uses DOMParser to create and fill an inert body element.\n * This is the default strategy used in browsers that support it.\n */\nclass DOMParserHelper {\n    inertDocumentHelper;\n    constructor(inertDocumentHelper) {\n        this.inertDocumentHelper = inertDocumentHelper;\n    }\n    getInertBodyElement(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. Note that the `<body>` tag is closed implicitly to prevent unclosed tags\n        // in `html` from consuming the otherwise explicit `</body>` tag.\n        html = '<body><remove></remove>' + html;\n        try {\n            const body = new window.DOMParser().parseFromString(trustedHTMLFromString(html), 'text/html').body;\n            if (body === null) {\n                // In some browsers (e.g. Mozilla/5.0 iPad AppleWebKit Mobile) the `body` property only\n                // becomes available in the following tick of the JS engine. In that case we fall back to\n                // the `inertDocumentHelper` instead.\n                return this.inertDocumentHelper.getInertBodyElement(html);\n            }\n            body.firstChild?.remove();\n            return body;\n        }\n        catch {\n            return null;\n        }\n    }\n}\n/**\n * Use an HTML5 `template` element to create and fill an inert DOM element.\n * This is the fallback strategy if the browser does not support DOMParser.\n */\nclass InertDocumentHelper {\n    defaultDoc;\n    inertDocument;\n    constructor(defaultDoc) {\n        this.defaultDoc = defaultDoc;\n        this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n    }\n    getInertBodyElement(html) {\n        const templateEl = this.inertDocument.createElement('template');\n        templateEl.innerHTML = trustedHTMLFromString(html);\n        return templateEl;\n    }\n}\n/**\n * We need to determine whether the DOMParser exists in the global context and\n * supports parsing HTML; HTML parsing support is not as wide as other formats, see\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.\n *\n * @suppress {uselessCode}\n */\nfunction isDOMParserAvailable() {\n    try {\n        return !!new window.DOMParser().parseFromString(trustedHTMLFromString(''), 'text/html');\n    }\n    catch {\n        return false;\n    }\n}\n\n/**\n * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation\n * contexts.\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:\n * (1) Either a protocol that is not javascript:, and that has valid characters\n *     (alphanumeric or [+-.]).\n * (2) or no protocol.  A protocol must be followed by a colon. The below\n *     allows that by allowing colons only after one of the characters [/?#].\n *     A colon after a hash (#) must be in the fragment.\n *     Otherwise, a colon after a (?) must be in a query.\n *     Otherwise, a colon after a single solidus (/) must be in a path.\n *     Otherwise, a colon after a double solidus (//) must be in the authority\n *     (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"h&#116;tp\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo&lt;bar/baz\".  Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript&#58;...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\\/?#]*(?:[\\/?#]|$))/i;\nfunction _sanitizeUrl(url) {\n    url = String(url);\n    if (url.match(SAFE_URL_PATTERN))\n        return url;\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        console.warn(`WARNING: sanitizing unsafe URL value ${url} (see ${XSS_SECURITY_URL})`);\n    }\n    return 'unsafe:' + url;\n}\n\nfunction tagSet(tags) {\n    const res = {};\n    for (const t of tags.split(','))\n        res[t] = true;\n    return res;\n}\nfunction merge(...sets) {\n    const res = {};\n    for (const s of sets) {\n        for (const v in s) {\n            if (s.hasOwnProperty(v))\n                res[v] = true;\n        }\n    }\n    return res;\n}\n// Good source of info about elements and attributes\n// https://html.spec.whatwg.org/#semantics\n// https://simon.html5.org/html-elements\n// Safe Void Elements - HTML5\n// https://html.spec.whatwg.org/#void-elements\nconst VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n// Elements that you can, intentionally, leave open (and which close themselves)\n// https://html.spec.whatwg.org/#optional-tags\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n// Safe Block Elements - HTML5\nconst 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\nconst 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'));\nconst VALID_ELEMENTS = merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n// Attributes that have href and hence need to be sanitized\nconst URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\nconst 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,srcset,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)\nconst 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.\nconst VALID_ATTRS = merge(URI_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.\nconst 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 */\nclass SanitizingHtmlSerializer {\n    // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n    // because characters were re-encoded.\n    sanitizedSomething = false;\n    buf = [];\n    sanitizeChildren(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        let current = el.firstChild;\n        let traverseContent = true;\n        let parentNodes = [];\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                // Push current node to the parent stack before entering its content.\n                parentNodes.push(current);\n                current = getFirstChild(current);\n                continue;\n            }\n            while (current) {\n                // Leaving the element.\n                // Walk up and to the right, closing tags as we go.\n                if (current.nodeType === Node.ELEMENT_NODE) {\n                    this.endElement(current);\n                }\n                let next = getNextSibling(current);\n                if (next) {\n                    current = next;\n                    break;\n                }\n                // There was no next sibling, walk up to the parent node (extract it from the stack).\n                current = parentNodes.pop();\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    startElement(element) {\n        const tagName = getNodeName(element).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        const elAttrs = element.attributes;\n        for (let i = 0; i < elAttrs.length; i++) {\n            const elAttr = elAttrs.item(i);\n            const attrName = elAttr.name;\n            const lower = attrName.toLowerCase();\n            if (!VALID_ATTRS.hasOwnProperty(lower)) {\n                this.sanitizedSomething = true;\n                continue;\n            }\n            let value = elAttr.value;\n            // TODO(martinprobst): Special case image URIs for data:image/...\n            if (URI_ATTRS[lower])\n                value = _sanitizeUrl(value);\n            this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n        }\n        this.buf.push('>');\n        return true;\n    }\n    endElement(current) {\n        const tagName = getNodeName(current).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    chars(chars) {\n        this.buf.push(encodeEntities(chars));\n    }\n}\n/**\n * Verifies whether a given child node is a descendant of a given parent node.\n * It may not be the case when properties like `.firstChild` are clobbered and\n * accessing `.firstChild` results in an unexpected node returned.\n */\nfunction isClobberedElement(parentNode, childNode) {\n    return ((parentNode.compareDocumentPosition(childNode) & Node.DOCUMENT_POSITION_CONTAINED_BY) !==\n        Node.DOCUMENT_POSITION_CONTAINED_BY);\n}\n/**\n * Retrieves next sibling node and makes sure that there is no\n * clobbering of the `nextSibling` property happening.\n */\nfunction getNextSibling(node) {\n    const nextSibling = node.nextSibling;\n    // Make sure there is no `nextSibling` clobbering: navigating to\n    // the next sibling and going back to the previous one should result\n    // in the original node.\n    if (nextSibling && node !== nextSibling.previousSibling) {\n        throw clobberedElementError(nextSibling);\n    }\n    return nextSibling;\n}\n/**\n * Retrieves first child node and makes sure that there is no\n * clobbering of the `firstChild` property happening.\n */\nfunction getFirstChild(node) {\n    const firstChild = node.firstChild;\n    if (firstChild && isClobberedElement(node, firstChild)) {\n        throw clobberedElementError(firstChild);\n    }\n    return firstChild;\n}\n/** Gets a reasonable nodeName, even for clobbered nodes. */\nfunction getNodeName(node) {\n    const nodeName = node.nodeName;\n    // If the property is clobbered, assume it is an `HTMLFormElement`.\n    return typeof nodeName === 'string' ? nodeName : 'FORM';\n}\nfunction clobberedElementError(node) {\n    return new Error(`Failed to sanitize html because the element is clobbered: ${node.outerHTML}`);\n}\n// Regular Expressions for parsing tags and attributes\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nconst 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\n        .replace(/&/g, '&amp;')\n        .replace(SURROGATE_PAIR_REGEXP, function (match) {\n        const hi = match.charCodeAt(0);\n        const 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, '&lt;')\n        .replace(/>/g, '&gt;');\n}\nlet 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    let inertBodyElement = null;\n    try {\n        inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc);\n        // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n        let 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        let mXSSAttempts = 5;\n        let 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        const sanitizer = new SanitizingHtmlSerializer();\n        const safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {\n            console.warn(`WARNING: sanitizing HTML stripped some content, see ${XSS_SECURITY_URL}`);\n        }\n        return trustedHTMLFromString(safeHtml);\n    }\n    finally {\n        // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n        if (inertBodyElement) {\n            const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n            while (parent.firstChild) {\n                parent.firstChild.remove();\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 * 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 * 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 * @codeGenApi\n */\nfunction ɵɵsanitizeHtml(unsafeHtml) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return trustedHTMLFromStringBypass(sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '');\n    }\n    if (allowSanitizationBypassAndThrow(unsafeHtml, \"HTML\" /* BypassType.Html */)) {\n        return trustedHTMLFromStringBypass(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 * 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.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeStyle(unsafeStyle) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n    }\n    if (allowSanitizationBypassAndThrow(unsafeStyle, \"Style\" /* BypassType.Style */)) {\n        return unwrapSafeValue(unsafeStyle);\n    }\n    return 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 * @codeGenApi\n */\nfunction ɵɵsanitizeUrl(unsafeUrl) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n    }\n    if (allowSanitizationBypassAndThrow(unsafeUrl, \"URL\" /* BypassType.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 * @codeGenApi\n */\nfunction ɵɵsanitizeResourceUrl(unsafeResourceUrl) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return trustedScriptURLFromStringBypass(sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '');\n    }\n    if (allowSanitizationBypassAndThrow(unsafeResourceUrl, \"ResourceURL\" /* BypassType.ResourceUrl */)) {\n        return trustedScriptURLFromStringBypass(unwrapSafeValue(unsafeResourceUrl));\n    }\n    throw new RuntimeError(904 /* RuntimeErrorCode.UNSAFE_VALUE_IN_RESOURCE_URL */, ngDevMode && `unsafe value used in a resource URL context (see ${XSS_SECURITY_URL})`);\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 * @codeGenApi\n */\nfunction ɵɵsanitizeScript(unsafeScript) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return trustedScriptFromStringBypass(sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '');\n    }\n    if (allowSanitizationBypassAndThrow(unsafeScript, \"Script\" /* BypassType.Script */)) {\n        return trustedScriptFromStringBypass(unwrapSafeValue(unsafeScript));\n    }\n    throw new RuntimeError(905 /* RuntimeErrorCode.UNSAFE_VALUE_IN_SCRIPT */, ngDevMode && 'unsafe value used in a script context');\n}\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedHTML. Interpolation is explicitly not allowed.\n *\n * @param html constant template literal containing trusted HTML.\n * @returns TrustedHTML wrapping `html`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedHTML.\n *\n * @codeGenApi\n */\nfunction ɵɵtrustConstantHtml(html) {\n    // The following runtime check ensures that the function was called as a\n    // template tag (e.g. ɵɵtrustConstantHtml`content`), without any interpolation\n    // (e.g. not ɵɵtrustConstantHtml`content ${variable}`). A TemplateStringsArray\n    // is an array with a `raw` property that is also an array. The associated\n    // template literal has no interpolation if and only if the length of the\n    // TemplateStringsArray is 1.\n    if (ngDevMode && (!Array.isArray(html) || !Array.isArray(html.raw) || html.length !== 1)) {\n        throw new Error(`Unexpected interpolation in trusted HTML constant: ${html.join('?')}`);\n    }\n    return trustedHTMLFromString(html[0]);\n}\n/**\n * A template tag function for promoting the associated constant literal to a\n * TrustedScriptURL. Interpolation is explicitly not allowed.\n *\n * @param url constant template literal containing a trusted script URL.\n * @returns TrustedScriptURL wrapping `url`.\n *\n * @security This is a security-sensitive function and should only be used to\n * convert constant values of attributes and properties found in\n * application-provided Angular templates to TrustedScriptURL.\n *\n * @codeGenApi\n */\nfunction ɵɵtrustConstantResourceUrl(url) {\n    // The following runtime check ensures that the function was called as a\n    // template tag (e.g. ɵɵtrustConstantResourceUrl`content`), without any\n    // interpolation (e.g. not ɵɵtrustConstantResourceUrl`content ${variable}`). A\n    // TemplateStringsArray is an array with a `raw` property that is also an\n    // array. The associated template literal has no interpolation if and only if\n    // the length of the TemplateStringsArray is 1.\n    if (ngDevMode && (!Array.isArray(url) || !Array.isArray(url.raw) || url.length !== 1)) {\n        throw new Error(`Unexpected interpolation in trusted URL constant: ${url.join('?')}`);\n    }\n    return trustedScriptURLFromString(url[0]);\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' ||\n            tag === 'frame' ||\n            tag === 'iframe' ||\n            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 * @codeGenApi\n */\nfunction ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {\n    return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\nfunction validateAgainstEventProperties(name) {\n    if (name.toLowerCase().startsWith('on')) {\n        const errorMessage = `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 RuntimeError(306 /* RuntimeErrorCode.INVALID_EVENT_BINDING */, errorMessage);\n    }\n}\nfunction validateAgainstEventAttributes(name) {\n    if (name.toLowerCase().startsWith('on')) {\n        const errorMessage = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n            `please use (${name.slice(2)})=...`;\n        throw new RuntimeError(306 /* RuntimeErrorCode.INVALID_EVENT_BINDING */, errorMessage);\n    }\n}\nfunction getSanitizer() {\n    const lView = getLView();\n    return lView && lView[ENVIRONMENT].sanitizer;\n}\n\n/**\n * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\nconst COMMENT_DISALLOWED = /^>|^->|<!--|-->|--!>|<!-$/g;\n/**\n * Delimiter in the disallowed strings which needs to be wrapped with zero with character.\n */\nconst COMMENT_DELIMITER = /(<|>)/g;\nconst COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\n/**\n * Escape the content of comment strings so that it can be safely inserted into a comment node.\n *\n * The issue is that HTML does not specify any way to escape comment end text inside the comment.\n * Consider: `<!-- The way you close a comment is with \">\", and \"->\" at the beginning or by \"-->\" or\n * \"--!>\" at the end. -->`. Above the `\"-->\"` is meant to be text not an end to the comment. This\n * can be created programmatically through DOM APIs. (`<!--` are also disallowed.)\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n *\n * ```ts\n * div.innerHTML = div.innerHTML\n * ```\n *\n * One would expect that the above code would be safe to do, but it turns out that because comment\n * text is not escaped, the comment may contain text which will prematurely close the comment\n * opening up the application for XSS attack. (In SSR we programmatically create comment nodes which\n * may contain such text and expect them to be safe.)\n *\n * This function escapes the comment text by looking for comment delimiters (`<` and `>`) and\n * surrounding them with `_>_` where the `_` is a zero width space `\\u200B`. The result is that if a\n * comment contains any of the comment start/end delimiters (such as `<!--`, `-->` or `--!>`) the\n * text it will render normally but it will not cause the HTML parser to close/open the comment.\n *\n * @param value text to make safe for comment node by escaping the comment open/close character\n *     sequence.\n */\nfunction escapeCommentText(value) {\n    return value.replace(COMMENT_DISALLOWED, (text) => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));\n}\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}\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\nfunction camelCaseToDashCase(input) {\n    return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase());\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 * 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 */\nconst CUSTOM_ELEMENTS_SCHEMA = {\n    name: 'custom-elements',\n};\n/**\n * Defines a schema that allows any property on any element.\n *\n * This schema allows you to ignore the errors related to any unknown elements or properties in a\n * template. The usage of this schema is generally discouraged because it prevents useful validation\n * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.\n *\n * @publicApi\n */\nconst NO_ERRORS_SCHEMA = {\n    name: 'no-errors-schema',\n};\n\nlet shouldThrowErrorOnUnknownElement = false;\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown elements,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nfunction ɵsetUnknownElementStrictMode(shouldThrow) {\n    shouldThrowErrorOnUnknownElement = shouldThrow;\n}\n/**\n * Gets the current value of the strict mode.\n */\nfunction ɵgetUnknownElementStrictMode() {\n    return shouldThrowErrorOnUnknownElement;\n}\nlet shouldThrowErrorOnUnknownProperty = false;\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown properties,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nfunction ɵsetUnknownPropertyStrictMode(shouldThrow) {\n    shouldThrowErrorOnUnknownProperty = shouldThrow;\n}\n/**\n * Gets the current value of the strict mode.\n */\nfunction ɵgetUnknownPropertyStrictMode() {\n    return shouldThrowErrorOnUnknownProperty;\n}\n/**\n * Validates that the element is known at runtime and produces\n * an error if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The element is considered known if either:\n * - it's a known HTML element\n * - it's a known custom element\n * - the element matches any directive\n * - the element is allowed by one of the schemas\n *\n * @param element Element to validate\n * @param lView An `LView` that represents a current component that is being rendered\n * @param tagName Name of the tag to check\n * @param schemas Array of schemas\n * @param hasDirectives Boolean indicating that the element matches any directive\n */\nfunction validateElementIsKnown(element, lView, tagName, schemas, hasDirectives) {\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    // 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        const isUnknown = \n        // Note that we can't check for `typeof HTMLUnknownElement === 'function'` because\n        // Domino doesn't expose HTMLUnknownElement globally.\n        (typeof HTMLUnknownElement !== 'undefined' &&\n            HTMLUnknownElement &&\n            element instanceof HTMLUnknownElement) ||\n            (typeof customElements !== 'undefined' &&\n                tagName.indexOf('-') > -1 &&\n                !customElements.get(tagName));\n        if (isUnknown && !matchingSchemas(schemas, tagName)) {\n            const isHostStandalone = isHostComponentStandalone(lView);\n            const templateLocation = getTemplateLocationDetails(lView);\n            const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n            let message = `'${tagName}' is not a known element${templateLocation}:\\n`;\n            message += `1. If '${tagName}' is an Angular component, then verify that it is ${isHostStandalone\n                ? \"included in the '@Component.imports' of this component\"\n                : 'a part of an @NgModule where this component is declared'}.\\n`;\n            if (tagName && tagName.indexOf('-') > -1) {\n                message += `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${schemas} of this component to suppress this message.`;\n            }\n            else {\n                message += `2. To allow any element add 'NO_ERRORS_SCHEMA' to the ${schemas} of this component.`;\n            }\n            if (shouldThrowErrorOnUnknownElement) {\n                throw new RuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message);\n            }\n            else {\n                console.error(formatRuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message));\n            }\n        }\n    }\n}\n/**\n * Validates that the property of the element is known at runtime and returns\n * false if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The property is considered known if either:\n * - it's a known property of the element\n * - the element is allowed by one of the schemas\n * - the property is used for animations\n *\n * @param element Element to validate\n * @param propName Name of the property to check\n * @param tagName Name of the tag hosting the property\n * @param schemas Array of schemas\n */\nfunction isPropertyValid(element, propName, tagName, 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 true;\n    // The property is considered valid if the element matches the schema, it exists on the element,\n    // or it is synthetic.\n    if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {\n        return true;\n    }\n    // Note: `typeof Node` returns 'function' in most browsers, but is undefined with domino.\n    return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\n/**\n * Logs or throws an error that a property is not supported on an element.\n *\n * @param propName Name of the invalid property\n * @param tagName Name of the tag hosting the property\n * @param nodeType Type of the node hosting the property\n * @param lView An `LView` that represents a current component\n */\nfunction handleUnknownPropertyError(propName, tagName, nodeType, lView) {\n    // Special-case a situation when a structural directive is applied to\n    // an `<ng-template>` element, for example: `<ng-template *ngIf=\"true\">`.\n    // In this case the compiler generates the `ɵɵtemplate` instruction with\n    // the `null` as the tagName. The directive matching logic at runtime relies\n    // on this effect (see `isInlineTemplate`), thus using the 'ng-template' as\n    // a default value of the `tNode.value` is not feasible at this moment.\n    if (!tagName && nodeType === 4 /* TNodeType.Container */) {\n        tagName = 'ng-template';\n    }\n    const isHostStandalone = isHostComponentStandalone(lView);\n    const templateLocation = getTemplateLocationDetails(lView);\n    let message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'${templateLocation}.`;\n    const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n    const importLocation = isHostStandalone\n        ? \"included in the '@Component.imports' of this component\"\n        : 'a part of an @NgModule where this component is declared';\n    if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {\n        // Most likely this is a control flow directive (such as `*ngIf`) used in\n        // a template, but the directive or the `CommonModule` is not imported.\n        const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);\n        message +=\n            `\\nIf the '${propName}' is an Angular control flow directive, ` +\n                `please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;\n    }\n    else {\n        // May be an Angular component, which is not imported/declared?\n        message +=\n            `\\n1. If '${tagName}' is an Angular component and it has the ` +\n                `'${propName}' input, then verify that it is ${importLocation}.`;\n        // May be a Web Component?\n        if (tagName && tagName.indexOf('-') > -1) {\n            message +=\n                `\\n2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' ` +\n                    `to the ${schemas} of this component to suppress this message.`;\n            message +=\n                `\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to ` +\n                    `the ${schemas} of this component.`;\n        }\n        else {\n            // If it's expected, the error can be suppressed by the `NO_ERRORS_SCHEMA` schema.\n            message +=\n                `\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to ` +\n                    `the ${schemas} of this component.`;\n        }\n    }\n    reportUnknownPropertyError(message);\n}\nfunction reportUnknownPropertyError(message) {\n    if (shouldThrowErrorOnUnknownProperty) {\n        throw new RuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message);\n    }\n    else {\n        console.error(formatRuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message));\n    }\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode and also it relies on the constructor function being available.\n *\n * Gets a reference to the host component def (where a current component is declared).\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getDeclarationComponentDef(lView) {\n    !ngDevMode && throwError('Must never be called in production mode');\n    const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n    const context = declarationLView[CONTEXT];\n    // Unable to obtain a context.\n    if (!context)\n        return null;\n    return context.constructor ? getComponentDef(context.constructor) : null;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Checks if the current component is declared inside of a standalone component template.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction isHostComponentStandalone(lView) {\n    !ngDevMode && throwError('Must never be called in production mode');\n    const componentDef = getDeclarationComponentDef(lView);\n    // Treat host component as non-standalone if we can't obtain the def.\n    return !!componentDef?.standalone;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Constructs a string describing the location of the host component template. The function is used\n * in dev mode to produce error messages.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getTemplateLocationDetails(lView) {\n    !ngDevMode && throwError('Must never be called in production mode');\n    const hostComponentDef = getDeclarationComponentDef(lView);\n    const componentClassName = hostComponentDef?.type?.name;\n    return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';\n}\n/**\n * The set of known control flow directives and their corresponding imports.\n * We use this set to produce a more precises error message with a note\n * that the `CommonModule` should also be included.\n */\nconst KNOWN_CONTROL_FLOW_DIRECTIVES = new Map([\n    ['ngIf', 'NgIf'],\n    ['ngFor', 'NgFor'],\n    ['ngSwitchCase', 'NgSwitchCase'],\n    ['ngSwitchDefault', 'NgSwitchDefault'],\n]);\n/**\n * Returns true if the tag name is allowed by specified schemas.\n * @param schemas Array of schemas\n * @param tagName Name of the tag\n */\nfunction matchingSchemas(schemas, tagName) {\n    if (schemas !== null) {\n        for (let i = 0; i < schemas.length; i++) {\n            const 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/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveWindow(element) {\n    return element.ownerDocument.defaultView;\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveDocument(element) {\n    return element.ownerDocument;\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveBody(element) {\n    return 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 */\nconst INTERPOLATION_DELIMITER = `�`;\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 * The max length of the string representation of a value in an error message\n */\nconst VALUE_STRING_LENGTH_LIMIT = 200;\n/** Verifies that a given type is a Standalone Component. */\nfunction assertStandaloneComponentType(type) {\n    assertComponentDef(type);\n    const componentDef = getComponentDef(type);\n    if (!componentDef.standalone) {\n        throw new RuntimeError(907 /* RuntimeErrorCode.TYPE_IS_NOT_STANDALONE */, `The ${stringifyForError(type)} component is not marked as standalone, ` +\n            `but Angular expects to have a standalone component here. ` +\n            `Please make sure the ${stringifyForError(type)} component has ` +\n            `the \\`standalone: true\\` flag in the decorator.`);\n    }\n}\n/** Verifies whether a given type is a component */\nfunction assertComponentDef(type) {\n    if (!getComponentDef(type)) {\n        throw new RuntimeError(906 /* RuntimeErrorCode.MISSING_GENERATED_DEF */, `The ${stringifyForError(type)} is not an Angular component, ` +\n            `make sure it has the \\`@Component\\` decorator.`);\n    }\n}\n/** Called when there are multiple component selectors that match a given node */\nfunction throwMultipleComponentError(tNode, first, second) {\n    throw new RuntimeError(-300 /* RuntimeErrorCode.MULTIPLE_COMPONENTS_MATCH */, `Multiple components match node with tagname ${tNode.value}: ` +\n        `${stringifyForError(first)} and ` +\n        `${stringifyForError(second)}`);\n}\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nfunction throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName, lView) {\n    const hostComponentDef = getDeclarationComponentDef(lView);\n    const componentClassName = hostComponentDef?.type?.name;\n    const field = propName ? ` for '${propName}'` : '';\n    let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${formatValue(oldValue)}'. Current value: '${formatValue(currValue)}'.${componentClassName ? ` Expression location: ${componentClassName} component` : ''}`;\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    throw new RuntimeError(-100 /* RuntimeErrorCode.EXPRESSION_CHANGED_AFTER_CHECKED */, msg);\n}\nfunction formatValue(value) {\n    let strValue = String(value);\n    // JSON.stringify will throw on circular references\n    try {\n        if (Array.isArray(value) || strValue === '[object Object]') {\n            strValue = JSON.stringify(value);\n        }\n    }\n    catch (error) { }\n    return strValue.length > VALUE_STRING_LENGTH_LIMIT\n        ? strValue.substring(0, VALUE_STRING_LENGTH_LIMIT) + '…'\n        : strValue;\n}\nfunction constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {\n    const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);\n    let oldValue = prefix, newValue = prefix;\n    for (let i = 0; i < chunks.length; i++) {\n        const slotIdx = rootIndex + i;\n        oldValue += `${lView[slotIdx]}${chunks[i]}`;\n        newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;\n    }\n    return { propName, oldValue, 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    const tData = lView[TVIEW].data;\n    const 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, 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        let idx = bindingIndex - 1;\n        while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n            idx--;\n        }\n        const meta = tData[idx];\n        if (typeof meta === 'string') {\n            const 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, newValue };\n}\n\n/** Flags describing an input for a directive. */\nvar InputFlags;\n(function (InputFlags) {\n    InputFlags[InputFlags[\"None\"] = 0] = \"None\";\n    InputFlags[InputFlags[\"SignalBased\"] = 1] = \"SignalBased\";\n    InputFlags[InputFlags[\"HasDecoratorInputTransform\"] = 2] = \"HasDecoratorInputTransform\";\n})(InputFlags || (InputFlags = {}));\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\nlet _icuContainerIterate;\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\nfunction icuContainerIterate(tIcuContainerNode, lView) {\n    return _icuContainerIterate(tIcuContainerNode, lView);\n}\n/**\n * Ensures that `IcuContainerVisitor`'s implementation is present.\n *\n * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the\n * bundler to tree shake ICU logic and only load it if ICU instruction is executed.\n */\nfunction ensureIcuContainerVisitorLoaded(loader) {\n    if (_icuContainerIterate === undefined) {\n        // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it\n        // can be inlined into call-site.\n        _icuContainerIterate = loader();\n    }\n}\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        let lContainer;\n        let 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        const rNode = unwrapRNode(lNodeToHandle);\n        if (action === 0 /* WalkTNodeTreeAction.Create */ && parent !== null) {\n            if (beforeNode == null) {\n                nativeAppendChild(renderer, parent, rNode);\n            }\n            else {\n                nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n            }\n        }\n        else if (action === 1 /* WalkTNodeTreeAction.Insert */ && parent !== null) {\n            nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n        }\n        else if (action === 2 /* WalkTNodeTreeAction.Detach */) {\n            nativeRemoveNode(renderer, rNode, isComponent);\n        }\n        else if (action === 3 /* WalkTNodeTreeAction.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(renderer, value) {\n    ngDevMode && ngDevMode.rendererCreateTextNode++;\n    ngDevMode && ngDevMode.rendererSetText++;\n    return renderer.createText(value);\n}\nfunction updateTextNode(renderer, rNode, value) {\n    ngDevMode && ngDevMode.rendererSetText++;\n    renderer.setValue(rNode, value);\n}\nfunction createCommentNode(renderer, value) {\n    ngDevMode && ngDevMode.rendererCreateComment++;\n    return renderer.createComment(escapeCommentText(value));\n}\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param renderer A renderer to use\n * @param name the tag name\n * @param namespace Optional namespace for element.\n * @returns the element created\n */\nfunction createElementNode(renderer, name, namespace) {\n    ngDevMode && ngDevMode.rendererCreateElement++;\n    return renderer.createElement(name, namespace);\n}\n/**\n * Removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param lView The view from which elements should be added or removed\n */\nfunction removeViewFromDOM(tView, lView) {\n    detachViewFromDOM(tView, lView);\n    lView[HOST] = null;\n    lView[T_HOST] = null;\n}\n/**\n * Adds all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to add all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param parentTNode The `TNode` where the `LView` should be attached to.\n * @param renderer Current renderer to use for DOM manipulations.\n * @param lView The view from which elements should be added or removed\n * @param parentNativeNode The parent `RElement` where it should be inserted into.\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nfunction addViewToDOM(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) {\n    lView[HOST] = parentNativeNode;\n    lView[T_HOST] = parentTNode;\n    applyView(tView, lView, renderer, 1 /* WalkTNodeTreeAction.Insert */, parentNativeNode, beforeNode);\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 detachViewFromDOM(tView, lView) {\n    // When we remove a view from the DOM, we need to rerun afterRender hooks\n    // We don't necessarily needs to run change detection. DOM removal only requires\n    // change detection if animations are enabled (this notification is handled by animations).\n    lView[ENVIRONMENT].changeDetectionScheduler?.notify(10 /* NotificationSource.ViewDetachedFromDOM */);\n    applyView(tView, lView, lView[RENDERER], 2 /* WalkTNodeTreeAction.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    let lViewOrLContainer = rootView[CHILD_HEAD];\n    if (!lViewOrLContainer) {\n        return cleanUpView(rootView[TVIEW], rootView);\n    }\n    while (lViewOrLContainer) {\n        let 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            const 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                if (isLView(lViewOrLContainer)) {\n                    cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n                }\n                lViewOrLContainer = lViewOrLContainer[PARENT];\n            }\n            if (lViewOrLContainer === null)\n                lViewOrLContainer = rootView;\n            if (isLView(lViewOrLContainer)) {\n                cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n            }\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    const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n    const 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    const 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    const lQueries = lView[QUERIES];\n    if (lQueries !== null) {\n        lQueries.insertView(tView);\n    }\n    updateAncestorTraversalFlagsOnAttach(lView);\n    // Sets the attached flag\n    lView[FLAGS] |= 128 /* LViewFlags.Attached */;\n}\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer or attached directly to ApplicationRef.\n */\nfunction trackMovedView(declarationContainer, lView) {\n    ngDevMode && assertDefined(lView, 'LView required');\n    ngDevMode && assertLContainer(declarationContainer);\n    const movedViews = declarationContainer[MOVED_VIEWS];\n    const parent = lView[PARENT];\n    ngDevMode && assertDefined(parent, 'missing parent');\n    if (isLView(parent)) {\n        declarationContainer[FLAGS] |= LContainerFlags.HasTransplantedViews;\n    }\n    else {\n        const insertedComponentLView = parent[PARENT][DECLARATION_COMPONENT_VIEW];\n        ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n        const 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[FLAGS] |= LContainerFlags.HasTransplantedViews;\n        }\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    const movedViews = declarationContainer[MOVED_VIEWS];\n    const declarationViewIndex = movedViews.indexOf(lView);\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    const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n    const viewToDetach = lContainer[indexInContainer];\n    if (viewToDetach) {\n        const 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        const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n        removeViewFromDOM(viewToDetach[TVIEW], viewToDetach);\n        // notify query that a view has been removed\n        const 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 /* LViewFlags.Attached */;\n    }\n    return viewToDetach;\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 /* LViewFlags.Destroyed */)) {\n        const renderer = lView[RENDERER];\n        if (renderer.destroyNode) {\n            applyView(tView, lView, renderer, 3 /* WalkTNodeTreeAction.Destroy */, null, null);\n        }\n        destroyViewTree(lView);\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 /* LViewFlags.Destroyed */) {\n        return;\n    }\n    const prevConsumer = setActiveConsumer$1(null);\n    try {\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 /* LViewFlags.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 /* LViewFlags.Destroyed */;\n        lView[REACTIVE_TEMPLATE_CONSUMER] && consumerDestroy$1(lView[REACTIVE_TEMPLATE_CONSUMER]);\n        executeOnDestroys(tView, lView);\n        processCleanups(tView, lView);\n        // For component views only, the local renderer is destroyed at clean up time.\n        if (lView[TVIEW].type === 1 /* TViewType.Component */) {\n            ngDevMode && ngDevMode.rendererDestroy++;\n            lView[RENDERER].destroy();\n        }\n        const 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            const lQueries = lView[QUERIES];\n            if (lQueries !== null) {\n                lQueries.detachView(tView);\n            }\n        }\n        // Unregister the view once everything else has been cleaned up.\n        unregisterLView(lView);\n    }\n    finally {\n        setActiveConsumer$1(prevConsumer);\n    }\n}\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction processCleanups(tView, lView) {\n    ngDevMode && assertNotReactive(processCleanups.name);\n    const tCleanup = tView.cleanup;\n    const lCleanup = lView[CLEANUP];\n    if (tCleanup !== null) {\n        for (let i = 0; i < tCleanup.length - 1; i += 2) {\n            if (typeof tCleanup[i] === 'string') {\n                // This is a native DOM listener. It will occupy 4 entries in the TCleanup array (hence i +=\n                // 2 at the end of this block).\n                const targetIdx = tCleanup[i + 3];\n                ngDevMode && assertNumber(targetIdx, 'cleanup target must be a number');\n                if (targetIdx >= 0) {\n                    // Destroy anything whose teardown is a function call (e.g. QueryList, ModelSignal).\n                    lCleanup[targetIdx]();\n                }\n                else {\n                    // Subscription\n                    lCleanup[-targetIdx].unsubscribe();\n                }\n                i += 2;\n            }\n            else {\n                // This is a cleanup function that is grouped with the index of its context\n                const context = lCleanup[tCleanup[i + 1]];\n                tCleanup[i].call(context);\n            }\n        }\n    }\n    if (lCleanup !== null) {\n        lView[CLEANUP] = null;\n    }\n    const destroyHooks = lView[ON_DESTROY_HOOKS];\n    if (destroyHooks !== null) {\n        // Reset the ON_DESTROY_HOOKS array before iterating over it to prevent hooks that unregister\n        // themselves from mutating the array during iteration.\n        lView[ON_DESTROY_HOOKS] = null;\n        for (let i = 0; i < destroyHooks.length; i++) {\n            const destroyHooksFn = destroyHooks[i];\n            ngDevMode && assertFunction(destroyHooksFn, 'Expecting destroy hook to be a function.');\n            destroyHooksFn();\n        }\n    }\n    // Destroy effects registered to the view. Many of these will have been processed above.\n    const effects = lView[EFFECTS];\n    if (effects !== null) {\n        lView[EFFECTS] = null;\n        for (const effect of effects) {\n            effect.destroy();\n        }\n    }\n}\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(tView, lView) {\n    ngDevMode && assertNotReactive(executeOnDestroys.name);\n    let destroyHooks;\n    if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n        for (let i = 0; i < destroyHooks.length; i += 2) {\n            const context = lView[destroyHooks[i]];\n            // Only call the destroy hook if the context has been requested.\n            if (!(context instanceof NodeInjectorFactory)) {\n                const toCall = destroyHooks[i + 1];\n                if (Array.isArray(toCall)) {\n                    for (let j = 0; j < toCall.length; j += 2) {\n                        const callContext = context[toCall[j]];\n                        const hook = toCall[j + 1];\n                        profiler(4 /* ProfilerEvent.LifecycleHookStart */, callContext, hook);\n                        try {\n                            hook.call(callContext);\n                        }\n                        finally {\n                            profiler(5 /* ProfilerEvent.LifecycleHookEnd */, callContext, hook);\n                        }\n                    }\n                }\n                else {\n                    profiler(4 /* ProfilerEvent.LifecycleHookStart */, context, toCall);\n                    try {\n                        toCall.call(context);\n                    }\n                    finally {\n                        profiler(5 /* ProfilerEvent.LifecycleHookEnd */, context, toCall);\n                    }\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 *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve render parent.\n * @param lView: Current `LView`.\n */\nfunction getParentRElement(tView, tNode, lView) {\n    return getClosestRElement(tView, tNode.parent, lView);\n}\n/**\n * Get closest `RElement` or `null` if it can't be found.\n *\n * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.\n * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).\n * If `TNode` is `null` then return host `RElement`:\n *   - return `null` if projection\n *   - return `null` if parent container is disconnected (we have no parent.)\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is\n *     needed).\n * @param lView: Current `LView`.\n * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)\n */\nfunction getClosestRElement(tView, tNode, lView) {\n    let parentTNode = tNode;\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. Also skip let declarations since they don't have a\n    // corresponding DOM node at all.\n    while (parentTNode !== null &&\n        parentTNode.type & (8 /* TNodeType.ElementContainer */ | 32 /* TNodeType.Icu */ | 128 /* TNodeType.LetDeclaration */)) {\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        // We are inserting a root element of the component view into the component host element and\n        // it should always be eager.\n        return lView[HOST];\n    }\n    else {\n        ngDevMode && assertTNodeType(parentTNode, 3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */);\n        const { componentOffset } = parentTNode;\n        if (componentOffset > -1) {\n            ngDevMode && assertTNodeForLView(parentTNode, lView);\n            const { encapsulation } = tView.data[parentTNode.directiveStart + componentOffset];\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.None ||\n                encapsulation === ViewEncapsulation.Emulated) {\n                return null;\n            }\n        }\n        return getNativeByTNode(parentTNode, lView);\n    }\n}\n/**\n * Inserts a native node before another native node for a given parent.\n * This is a utility function that can be used when native nodes were determined.\n */\nfunction nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {\n    ngDevMode && ngDevMode.rendererInsertBefore++;\n    renderer.insertBefore(parent, child, beforeNode, isMove);\n}\nfunction nativeAppendChild(renderer, parent, child) {\n    ngDevMode && ngDevMode.rendererAppendChild++;\n    ngDevMode && assertDefined(parent, 'parent node must be defined');\n    renderer.appendChild(parent, child);\n}\nfunction nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {\n    if (beforeNode !== null) {\n        nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n    }\n    else {\n        nativeAppendChild(renderer, parent, child);\n    }\n}\n/**\n * Returns a native parent of a given native node.\n */\nfunction nativeParentNode(renderer, node) {\n    return renderer.parentNode(node);\n}\n/**\n * Returns a native sibling of a given native node.\n */\nfunction nativeNextSibling(renderer, node) {\n    return renderer.nextSibling(node);\n}\n/**\n * Find a node in front of which `currentTNode` should be inserted.\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account if i18n code has been invoked.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNode(parentTNode, currentTNode, lView) {\n    return _getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView);\n}\n/**\n * Find a node in front of which `currentTNode` should be inserted. (Does not take i18n into\n * account)\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * does not take `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView) {\n    if (parentTNode.type & (8 /* TNodeType.ElementContainer */ | 32 /* TNodeType.Icu */)) {\n        return getNativeByTNode(parentTNode, lView);\n    }\n    return null;\n}\n/**\n * Tree shakable boundary for `getInsertInFrontOfRNodeWithI18n` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithNoI18n;\n/**\n * Tree shakable boundary for `processI18nInsertBefore` function.\n *\n * This function will only be set if i18n code runs.\n */\nlet _processI18nInsertBefore;\nfunction setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore) {\n    _getInsertInFrontOfRNodeWithI18n = getInsertInFrontOfRNodeWithI18n;\n    _processI18nInsertBefore = processI18nInsertBefore;\n}\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * @param tView The `TView' to be appended\n * @param lView The current LView\n * @param childRNode The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n */\nfunction appendChild(tView, lView, childRNode, childTNode) {\n    const parentRNode = getParentRElement(tView, childTNode, lView);\n    const renderer = lView[RENDERER];\n    const parentTNode = childTNode.parent || lView[T_HOST];\n    const anchorNode = getInsertInFrontOfRNode(parentTNode, childTNode, lView);\n    if (parentRNode != null) {\n        if (Array.isArray(childRNode)) {\n            for (let i = 0; i < childRNode.length; i++) {\n                nativeAppendOrInsertBefore(renderer, parentRNode, childRNode[i], anchorNode, false);\n            }\n        }\n        else {\n            nativeAppendOrInsertBefore(renderer, parentRNode, childRNode, anchorNode, false);\n        }\n    }\n    _processI18nInsertBefore !== undefined &&\n        _processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRNode);\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            assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ |\n                12 /* TNodeType.AnyContainer */ |\n                32 /* TNodeType.Icu */ |\n                16 /* TNodeType.Projection */ |\n                128 /* TNodeType.LetDeclaration */);\n        const tNodeType = tNode.type;\n        if (tNodeType & 3 /* TNodeType.AnyRNode */) {\n            return getNativeByTNode(tNode, lView);\n        }\n        else if (tNodeType & 4 /* TNodeType.Container */) {\n            return getBeforeNodeForView(-1, lView[tNode.index]);\n        }\n        else if (tNodeType & 8 /* TNodeType.ElementContainer */) {\n            const elIcuContainerChild = tNode.child;\n            if (elIcuContainerChild !== null) {\n                return getFirstNativeNode(lView, elIcuContainerChild);\n            }\n            else {\n                const 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 if (tNodeType & 128 /* TNodeType.LetDeclaration */) {\n            return getFirstNativeNode(lView, tNode.next);\n        }\n        else if (tNodeType & 32 /* TNodeType.Icu */) {\n            let nextRNode = icuContainerIterate(tNode, lView);\n            let rNode = nextRNode();\n            // If the ICU container has no nodes, than we use the ICU anchor as the node.\n            return rNode || unwrapRNode(lView[tNode.index]);\n        }\n        else {\n            const projectionNodes = getProjectionNodes(lView, tNode);\n            if (projectionNodes !== null) {\n                if (Array.isArray(projectionNodes)) {\n                    return projectionNodes[0];\n                }\n                const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n                ngDevMode && assertParentView(parentView);\n                return getFirstNativeNode(parentView, projectionNodes);\n            }\n            else {\n                return getFirstNativeNode(lView, tNode.next);\n            }\n        }\n    }\n    return null;\n}\nfunction getProjectionNodes(lView, tNode) {\n    if (tNode !== null) {\n        const componentView = lView[DECLARATION_COMPONENT_VIEW];\n        const componentHost = componentView[T_HOST];\n        const slotIdx = tNode.projection;\n        ngDevMode && assertProjectionSlots(lView);\n        return componentHost.projection[slotIdx];\n    }\n    return null;\n}\nfunction getBeforeNodeForView(viewIndexInContainer, lContainer) {\n    const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n    if (nextViewIndex < lContainer.length) {\n        const lView = lContainer[nextViewIndex];\n        const 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    ngDevMode && ngDevMode.rendererRemoveNode++;\n    renderer.removeChild(null, rNode, isHostElement);\n}\n/**\n * Clears the contents of a given RElement.\n *\n * @param rElement the native RElement to be cleared\n */\nfunction clearElementContents(rElement) {\n    rElement.textContent = '';\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, parentRElement, beforeNode, isProjection) {\n    while (tNode != null) {\n        ngDevMode && assertTNodeForLView(tNode, lView);\n        // Let declarations don't have corresponding DOM nodes so we skip over them.\n        if (tNode.type === 128 /* TNodeType.LetDeclaration */) {\n            tNode = tNode.next;\n            continue;\n        }\n        ngDevMode &&\n            assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 16 /* TNodeType.Projection */ | 32 /* TNodeType.Icu */);\n        const rawSlotValue = lView[tNode.index];\n        const tNodeType = tNode.type;\n        if (isProjection) {\n            if (action === 0 /* WalkTNodeTreeAction.Create */) {\n                rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n                tNode.flags |= 2 /* TNodeFlags.isProjected */;\n            }\n        }\n        if ((tNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {\n            if (tNodeType & 8 /* TNodeType.ElementContainer */) {\n                applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);\n                applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n            }\n            else if (tNodeType & 32 /* TNodeType.Icu */) {\n                const nextRNode = icuContainerIterate(tNode, lView);\n                let rNode;\n                while ((rNode = nextRNode())) {\n                    applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n                }\n                applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n            }\n            else if (tNodeType & 16 /* TNodeType.Projection */) {\n                applyProjectionRecursive(renderer, action, lView, tNode, parentRElement, beforeNode);\n            }\n            else {\n                ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */);\n                applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);\n            }\n        }\n        tNode = isProjection ? tNode.projectionNext : tNode.next;\n    }\n}\nfunction applyView(tView, lView, renderer, action, parentRElement, beforeNode) {\n    applyNodes(renderer, action, tView.firstChild, lView, parentRElement, 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    const renderer = lView[RENDERER];\n    const parentRNode = getParentRElement(tView, tProjectionNode, lView);\n    const parentTNode = tProjectionNode.parent || lView[T_HOST];\n    let beforeNode = getInsertInFrontOfRNode(parentTNode, tProjectionNode, lView);\n    applyProjectionRecursive(renderer, 0 /* WalkTNodeTreeAction.Create */, lView, tProjectionNode, parentRNode, 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 parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) {\n    const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n    const componentNode = componentLView[T_HOST];\n    ngDevMode &&\n        assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n    const 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 TView is not shared and therefore it will not be a problem.\n        // This should be refactored and cleaned up.\n        for (let i = 0; i < nodeToProjectOrRNodes.length; i++) {\n            const rNode = nodeToProjectOrRNodes[i];\n            applyToElementOrContainer(action, renderer, parentRElement, rNode, beforeNode);\n        }\n    }\n    else {\n        let nodeToProject = nodeToProjectOrRNodes;\n        const projectedComponentLView = componentLView[PARENT];\n        // If a parent <ng-content> is located within a skip hydration block,\n        // annotate an actual node that is being projected with the same flag too.\n        if (hasInSkipHydrationBlockFlag(tProjectionNode)) {\n            nodeToProject.flags |= 128 /* TNodeFlags.inSkipHydrationBlock */;\n        }\n        applyNodes(renderer, action, nodeToProject, projectedComponentLView, parentRElement, 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 parentRElement parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyContainer(renderer, action, lContainer, parentRElement, beforeNode) {\n    ngDevMode && assertLContainer(lContainer);\n    const anchor = lContainer[NATIVE]; // LContainer has its own before node.\n    const 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\n    // node (comment in the DOM) that will be different from the LContainer's host node. In this\n    // particular 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\n        // don't 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, parentRElement, anchor, beforeNode);\n    }\n    for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n        const lView = lContainer[i];\n        applyView(lView[TVIEW], lView, renderer, action, parentRElement, 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    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            renderer.removeClass(rNode, prop);\n        }\n        else {\n            ngDevMode && ngDevMode.rendererAddClass++;\n            renderer.addClass(rNode, prop);\n        }\n    }\n    else {\n        let flags = prop.indexOf('-') === -1 ? undefined : RendererStyleFlags2.DashCase;\n        if (value == null /** || value === undefined */) {\n            ngDevMode && ngDevMode.rendererRemoveStyle++;\n            renderer.removeStyle(rNode, prop, flags);\n        }\n        else {\n            // A value is important if it ends with `!important`. The style\n            // parser strips any semicolons at the end of the value.\n            const isImportant = typeof value === 'string' ? value.endsWith('!important') : false;\n            if (isImportant) {\n                // !important has to be stripped from the value for it to be valid.\n                value = value.slice(0, -10);\n                flags |= RendererStyleFlags2.Important;\n            }\n            ngDevMode && ngDevMode.rendererSetStyle++;\n            renderer.setStyle(rNode, prop, value, flags);\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    renderer.setAttribute(element, 'style', newValue);\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 (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    ngDevMode && ngDevMode.rendererSetClassName++;\n}\n/** Sets up the static DOM attributes on an `RNode`. */\nfunction setupStaticAttributes(renderer, element, tNode) {\n    const { mergedAttrs, classes, styles } = tNode;\n    if (mergedAttrs !== null) {\n        setUpAttributes(renderer, element, mergedAttrs);\n    }\n    if (classes !== null) {\n        writeDirectClass(renderer, element, classes);\n    }\n    if (styles !== null) {\n        writeDirectStyle(renderer, element, styles);\n    }\n}\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    let end = className.length;\n    while (true) {\n        const foundIndex = className.indexOf(classToSearch, startingIndex);\n        if (foundIndex === -1)\n            return foundIndex;\n        if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32 /* CharCode.SPACE */) {\n            // Ensure that it has leading whitespace\n            const length = classToSearch.length;\n            if (foundIndex + length === end ||\n                className.charCodeAt(foundIndex + length) <= 32 /* CharCode.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\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param tNode static data of the node to match\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(tNode, attrs, cssClassToMatch, isProjectionMode) {\n    ngDevMode &&\n        assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n    let i = 0;\n    if (isProjectionMode) {\n        for (; i < attrs.length && typeof attrs[i] === 'string'; i += 2) {\n            // Search for an implicit `class` attribute and check if its value matches `cssClassToMatch`.\n            if (attrs[i] === 'class' &&\n                classIndexOf(attrs[i + 1].toLowerCase(), cssClassToMatch, 0) !== -1) {\n                return true;\n            }\n        }\n    }\n    else if (isInlineTemplate(tNode)) {\n        // Matching directives (i.e. when not matching for projection mode) should not consider the\n        // class bindings that are present on inline templates, as those class bindings only target\n        // the root node of the template, not the template itself.\n        return false;\n    }\n    // Resume the search for classes after the `Classes` marker.\n    i = attrs.indexOf(1 /* AttributeMarker.Classes */, i);\n    if (i > -1) {\n        // We found the classes section. Start searching for the class.\n        let item;\n        while (++i < attrs.length && typeof (item = attrs[i]) === 'string') {\n            if (item.toLowerCase() === cssClassToMatch) {\n                return true;\n            }\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 === 4 /* TNodeType.Container */ && tNode.value !== 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    const tagNameToCompare = tNode.type === 4 /* TNodeType.Container */ && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\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 tNode 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    let mode = 4 /* SelectorFlags.ELEMENT */;\n    const nodeAttrs = tNode.attrs;\n    // Find the index of first attribute that has no value, only a name.\n    const nameOnlyMarkerIdx = nodeAttrs !== null ? getNameOnlyMarkerIndex(nodeAttrs) : 0;\n    // When processing \":not\" selectors, we skip to the next \":not\" if the\n    // current one doesn't match\n    let skipToNextSelector = false;\n    for (let i = 0; i < selector.length; i++) {\n        const 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 /* SelectorFlags.NOT */);\n            continue;\n        }\n        if (skipToNextSelector)\n            continue;\n        if (mode & 4 /* SelectorFlags.ELEMENT */) {\n            mode = 2 /* SelectorFlags.ATTRIBUTE */ | (mode & 1 /* SelectorFlags.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 if (mode & 8 /* SelectorFlags.CLASS */) {\n            if (nodeAttrs === null || !isCssClassMatching(tNode, nodeAttrs, current, isProjectionMode)) {\n                if (isPositive(mode))\n                    return false;\n                skipToNextSelector = true;\n            }\n        }\n        else {\n            const selectorAttrValue = selector[++i];\n            const attrIndexInNode = findAttrIndexInNode(current, 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                let nodeAttrValue;\n                if (attrIndexInNode > nameOnlyMarkerIdx) {\n                    nodeAttrValue = '';\n                }\n                else {\n                    ngDevMode &&\n                        assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* AttributeMarker.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                if (mode & 2 /* SelectorFlags.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 /* SelectorFlags.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    let i = 0;\n    if (isProjectionMode || !isInlineTemplate) {\n        let bindingsMode = false;\n        while (i < attrs.length) {\n            const maybeAttrName = attrs[i];\n            if (maybeAttrName === name) {\n                return i;\n            }\n            else if (maybeAttrName === 3 /* AttributeMarker.Bindings */ ||\n                maybeAttrName === 6 /* AttributeMarker.I18n */) {\n                bindingsMode = true;\n            }\n            else if (maybeAttrName === 1 /* AttributeMarker.Classes */ ||\n                maybeAttrName === 2 /* AttributeMarker.Styles */) {\n                let 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 /* AttributeMarker.Template */) {\n                // We do not care about Template attributes in this scenario.\n                break;\n            }\n            else if (maybeAttrName === 0 /* AttributeMarker.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 = false) {\n    for (let 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    const nodeAttrs = tNode.attrs;\n    if (nodeAttrs != null) {\n        const ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* AttributeMarker.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 (let i = 0; i < nodeAttrs.length; i++) {\n        const nodeAttr = nodeAttrs[i];\n        if (isNameOnlyAttributeMarker(nodeAttr)) {\n            return i;\n        }\n    }\n    return nodeAttrs.length;\n}\nfunction matchTemplateAttribute(attrs, name) {\n    let i = attrs.indexOf(4 /* AttributeMarker.Template */);\n    if (i > -1) {\n        i++;\n        while (i < attrs.length) {\n            const 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 (let i = 0; i < list.length; i++) {\n        const currentSelectorInList = list[i];\n        if (selector.length !== currentSelectorInList.length) {\n            continue;\n        }\n        for (let 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    let result = selector[0];\n    let i = 1;\n    let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n    let currentChunk = '';\n    let isNegativeMode = false;\n    while (i < selector.length) {\n        let valueOrMarker = selector[i];\n        if (typeof valueOrMarker === 'string') {\n            if (mode & 2 /* SelectorFlags.ATTRIBUTE */) {\n                const attrValue = selector[++i];\n                currentChunk +=\n                    '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n            }\n            else if (mode & 8 /* SelectorFlags.CLASS */) {\n                currentChunk += '.' + valueOrMarker;\n            }\n            else if (mode & 4 /* SelectorFlags.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    const attrs = [];\n    const classes = [];\n    let i = 1;\n    let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n    while (i < selector.length) {\n        let valueOrMarker = selector[i];\n        if (typeof valueOrMarker === 'string') {\n            if (mode === 2 /* SelectorFlags.ATTRIBUTE */) {\n                if (valueOrMarker !== '') {\n                    attrs.push(valueOrMarker, selector[++i]);\n                }\n            }\n            else if (mode === 8 /* SelectorFlags.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, classes };\n}\n\n/** A special value which designates that a value has not changed. */\nconst NO_CHANGE = typeof ngDevMode === 'undefined' || ngDevMode ? { __brand__: 'NO_CHANGE' } : {};\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 = 1) {\n    ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n    selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, !!ngDevMode && isInCheckNoChangesMode());\n}\nfunction selectIndexInternal(tView, lView, index, checkNoChangesMode) {\n    ngDevMode && assertIndexInDeclRange(lView[TVIEW], index);\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        const hooksInitPhaseCompleted = (lView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === 3 /* InitPhaseState.InitPhaseCompleted */;\n        if (hooksInitPhaseCompleted) {\n            const preOrderCheckHooks = tView.preOrderCheckHooks;\n            if (preOrderCheckHooks !== null) {\n                executeCheckHooks(lView, preOrderCheckHooks, index);\n            }\n        }\n        else {\n            const preOrderHooks = tView.preOrderHooks;\n            if (preOrderHooks !== null) {\n                executeInitAndCheckHooks(lView, preOrderHooks, 0 /* InitPhaseState.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\nfunction ɵɵdirectiveInject(token, flags = InjectFlags.Default) {\n    const 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        // Verify that we will not get into infinite loop.\n        ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);\n        return ɵɵinject(token, flags);\n    }\n    const tNode = getCurrentTNode();\n    const value = getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);\n    ngDevMode && emitInjectEvent(token, value, flags);\n    return value;\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    const msg = ngDevMode\n        ? `This constructor was not compatible with Dependency Injection.`\n        : 'invalid';\n    throw new Error(msg);\n}\n\nfunction writeToDirectiveInput(def, instance, publicName, privateName, flags, value) {\n    const prevConsumer = setActiveConsumer$1(null);\n    try {\n        // If we know we are dealing with a signal input, we cache its reference\n        // in a tree-shakable way. The input signal node can then be used for\n        // value transform execution or actual value updates without introducing\n        // additional megamorphic accesses for accessing the instance field.\n        let inputSignalNode = null;\n        if ((flags & InputFlags.SignalBased) !== 0) {\n            const field = instance[privateName];\n            inputSignalNode = field[SIGNAL$1];\n        }\n        // If there is a signal node and a transform, run it before potentially\n        // delegating to features like `NgOnChanges`.\n        if (inputSignalNode !== null && inputSignalNode.transformFn !== undefined) {\n            value = inputSignalNode.transformFn(value);\n        }\n        // If there is a decorator input transform, run it.\n        if ((flags & InputFlags.HasDecoratorInputTransform) !== 0) {\n            value = def.inputTransforms[privateName].call(instance, value);\n        }\n        if (def.setInput !== null) {\n            def.setInput(instance, inputSignalNode, value, publicName, privateName);\n        }\n        else {\n            applyValueToInputField(instance, inputSignalNode, privateName, value);\n        }\n    }\n    finally {\n        setActiveConsumer$1(prevConsumer);\n    }\n}\n\n/**\n * Invoke `HostBindingsFunction`s for view.\n *\n * This methods executes `TView.hostBindingOpCodes`. It is used to execute the\n * `HostBindingsFunction`s associated with the current `LView`.\n *\n * @param tView Current `TView`.\n * @param lView Current `LView`.\n */\nfunction processHostBindingOpCodes(tView, lView) {\n    const hostBindingOpCodes = tView.hostBindingOpCodes;\n    if (hostBindingOpCodes === null)\n        return;\n    try {\n        for (let i = 0; i < hostBindingOpCodes.length; i++) {\n            const opCode = hostBindingOpCodes[i];\n            if (opCode < 0) {\n                // Negative numbers are element indexes.\n                setSelectedIndex(~opCode);\n            }\n            else {\n                // Positive numbers are NumberTuple which store bindingRootIndex and directiveIndex.\n                const directiveIdx = opCode;\n                const bindingRootIndx = hostBindingOpCodes[++i];\n                const hostBindingFn = hostBindingOpCodes[++i];\n                setBindingRootForHostBindings(bindingRootIndx, directiveIdx);\n                const context = lView[directiveIdx];\n                hostBindingFn(2 /* RenderFlags.Update */, context);\n            }\n        }\n    }\n    finally {\n        setSelectedIndex(-1);\n    }\n}\nfunction createLView(parentLView, tView, context, flags, host, tHostNode, environment, renderer, injector, embeddedViewInjector, hydrationInfo) {\n    const lView = tView.blueprint.slice();\n    lView[HOST] = host;\n    lView[FLAGS] =\n        flags |\n            4 /* LViewFlags.CreationMode */ |\n            128 /* LViewFlags.Attached */ |\n            8 /* LViewFlags.FirstLViewPass */ |\n            64 /* LViewFlags.Dirty */ |\n            1024 /* LViewFlags.RefreshView */;\n    if (embeddedViewInjector !== null ||\n        (parentLView && parentLView[FLAGS] & 2048 /* LViewFlags.HasEmbeddedViewInjector */)) {\n        lView[FLAGS] |= 2048 /* LViewFlags.HasEmbeddedViewInjector */;\n    }\n    resetPreOrderHookFlags(lView);\n    ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);\n    lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n    lView[CONTEXT] = context;\n    lView[ENVIRONMENT] = (environment || (parentLView && parentLView[ENVIRONMENT]));\n    ngDevMode && assertDefined(lView[ENVIRONMENT], 'LViewEnvironment is required');\n    lView[RENDERER] = (renderer || (parentLView && parentLView[RENDERER]));\n    ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n    lView[INJECTOR] = injector || (parentLView && parentLView[INJECTOR]) || null;\n    lView[T_HOST] = tHostNode;\n    lView[ID] = getUniqueLViewId();\n    lView[HYDRATION] = hydrationInfo;\n    lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;\n    ngDevMode &&\n        assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');\n    lView[DECLARATION_COMPONENT_VIEW] =\n        tView.type == 2 /* TViewType.Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;\n    return lView;\n}\nfunction getOrCreateTNode(tView, index, type, name, attrs) {\n    ngDevMode &&\n        index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n        // `view_engine_compatibility` for additional context.\n        assertGreaterThanOrEqual(index, HEADER_OFFSET, \"TNodes can't be in the LView header.\");\n    // Keep this function short, so that the VM will inline it.\n    ngDevMode && assertPureTNodeType(type);\n    let tNode = tView.data[index];\n    if (tNode === null) {\n        tNode = createTNodeAtIndex(tView, index, type, name, attrs);\n        if (isInI18nBlock()) {\n            // If we are in i18n block then all elements should be pre declared through `Placeholder`\n            // See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n            // If the `TNode` was not pre-declared than it means it was not mentioned which means it was\n            // removed, so we mark it as detached.\n            tNode.flags |= 32 /* TNodeFlags.isDetached */;\n        }\n    }\n    else if (tNode.type & 64 /* TNodeType.Placeholder */) {\n        tNode.type = type;\n        tNode.value = name;\n        tNode.attrs = attrs;\n        const parent = getCurrentParentTNode();\n        tNode.injectorIndex = parent === null ? -1 : parent.injectorIndex;\n        ngDevMode && assertTNodeForTView(tNode, tView);\n        ngDevMode && assertEqual(index, tNode.index, 'Expecting same index');\n    }\n    setCurrentTNode(tNode, true);\n    return tNode;\n}\nfunction createTNodeAtIndex(tView, index, type, name, attrs) {\n    const currentTNode = getCurrentTNodePlaceholderOk();\n    const isParent = isCurrentTNodeParent();\n    const parent = isParent ? currentTNode : currentTNode && currentTNode.parent;\n    // Parents cannot cross component boundaries because components will be used in multiple places.\n    const tNode = (tView.data[index] = createTNode(tView, parent, type, index, 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 (currentTNode !== null) {\n        if (isParent) {\n            // FIXME(misko): This logic looks unnecessarily complicated. Could we simplify?\n            if (currentTNode.child == null && tNode.parent !== null) {\n                // We are in the same view, which means we are adding content node to the parent view.\n                currentTNode.child = tNode;\n            }\n        }\n        else {\n            if (currentTNode.next === null) {\n                // In the case of i18n the `currentTNode` may already be linked, in which case we don't want\n                // to break the links which i18n created.\n                currentTNode.next = tNode;\n                tNode.prev = currentTNode;\n            }\n        }\n    }\n    return tNode;\n}\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply()), we need to adjust the blueprint for future\n * template passes.\n *\n * @param tView `TView` associated with `LView`\n * @param lView The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n * @param initialValue Initial value to store in blueprint\n */\nfunction allocExpando(tView, lView, numSlotsToAlloc, initialValue) {\n    if (numSlotsToAlloc === 0)\n        return -1;\n    if (ngDevMode) {\n        assertFirstCreatePass(tView);\n        assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n        assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');\n        assertEqual(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');\n        assertFirstUpdatePass(tView);\n    }\n    const allocIdx = lView.length;\n    for (let i = 0; i < numSlotsToAlloc; i++) {\n        lView.push(initialValue);\n        tView.blueprint.push(initialValue);\n        tView.data.push(null);\n    }\n    return allocIdx;\n}\nfunction executeTemplate(tView, lView, templateFn, rf, context) {\n    const prevSelectedIndex = getSelectedIndex();\n    const isUpdatePhase = rf & 2 /* RenderFlags.Update */;\n    try {\n        setSelectedIndex(-1);\n        if (isUpdatePhase && 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, HEADER_OFFSET, !!ngDevMode && isInCheckNoChangesMode());\n        }\n        const preHookType = isUpdatePhase\n            ? 2 /* ProfilerEvent.TemplateUpdateStart */\n            : 0 /* ProfilerEvent.TemplateCreateStart */;\n        profiler(preHookType, context);\n        templateFn(rf, context);\n    }\n    finally {\n        setSelectedIndex(prevSelectedIndex);\n        const postHookType = isUpdatePhase\n            ? 3 /* ProfilerEvent.TemplateUpdateEnd */\n            : 1 /* ProfilerEvent.TemplateCreateEnd */;\n        profiler(postHookType, context);\n    }\n}\n//////////////////////////\n//// Element\n//////////////////////////\nfunction executeContentQueries(tView, tNode, lView) {\n    if (isContentQueryHost(tNode)) {\n        const prevConsumer = setActiveConsumer$1(null);\n        try {\n            const start = tNode.directiveStart;\n            const end = tNode.directiveEnd;\n            for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n                const def = tView.data[directiveIndex];\n                if (def.contentQueries) {\n                    const directiveInstance = lView[directiveIndex];\n                    ngDevMode &&\n                        assertDefined(directiveIndex, 'Incorrect reference to a directive defining a content query');\n                    def.contentQueries(1 /* RenderFlags.Create */, directiveInstance, directiveIndex);\n                }\n            }\n        }\n        finally {\n            setActiveConsumer$1(prevConsumer);\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 & 64 /* TNodeFlags.hasHostBindings */) === 64 /* TNodeFlags.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 = getNativeByTNode) {\n    const localNames = tNode.localNames;\n    if (localNames !== null) {\n        let localIndex = tNode.index + 1;\n        for (let i = 0; i < localNames.length; i += 2) {\n            const index = localNames[i + 1];\n            const 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 getOrCreateComponentTView(def) {\n    const tView = def.tView;\n    // Create a TView if there isn't one, or recreate it if the first create pass didn't\n    // complete successfully since we can't know for sure whether it's in a usable shape.\n    if (tView === null || tView.incompleteFirstPass) {\n        // Declaration node here is null since this function is called when we dynamically create a\n        // component and hence there is no declaration.\n        const declTNode = null;\n        return (def.tView = createTView(1 /* TViewType.Component */, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts, def.id));\n    }\n    return tView;\n}\n/**\n * Creates a TView instance\n *\n * @param type Type of `TView`.\n * @param declTNode Declaration location of this `TView`.\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, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory, ssrId) {\n    ngDevMode && ngDevMode.tView++;\n    const 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    const initialViewLength = bindingStartIndex + vars;\n    const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n    const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n    const tView = (blueprint[TVIEW] = {\n        type: type,\n        blueprint: blueprint,\n        template: templateFn,\n        queries: null,\n        viewQuery: viewQuery,\n        declTNode: declTNode,\n        data: blueprint.slice().fill(null, bindingStartIndex),\n        bindingStartIndex: bindingStartIndex,\n        expandoStartIndex: initialViewLength,\n        hostBindingOpCodes: 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        ssrId,\n    });\n    if (ngDevMode) {\n        // For performance reasons it is important that the tView retains the same shape during runtime.\n        // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n        // prevent class transitions.\n        Object.seal(tView);\n    }\n    return tView;\n}\nfunction createViewBlueprint(bindingStartIndex, initialViewLength) {\n    const blueprint = [];\n    for (let i = 0; i < initialViewLength; i++) {\n        blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n    }\n    return blueprint;\n}\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param renderer the renderer used to locate the element.\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 * @param injector Root view injector instance.\n */\nfunction locateHostElement(renderer, elementOrSelector, encapsulation, injector) {\n    // Note: we use default value for the `PRESERVE_HOST_CONTENT` here even though it's a\n    // tree-shakable one (providedIn:'root'). This code path can be triggered during dynamic\n    // component creation (after calling ViewContainerRef.createComponent) when an injector\n    // instance can be provided. The injector instance might be disconnected from the main DI\n    // tree, thus the `PRESERVE_HOST_CONTENT` would not be able to instantiate. In this case, the\n    // default value will be used.\n    const preserveHostContent = injector.get(PRESERVE_HOST_CONTENT, PRESERVE_HOST_CONTENT_DEFAULT);\n    // When using native Shadow DOM, do not clear host element to allow native slot\n    // projection.\n    const preserveContent = preserveHostContent || encapsulation === ViewEncapsulation.ShadowDom;\n    const rootElement = renderer.selectRootElement(elementOrSelector, preserveContent);\n    applyRootElementTransform(rootElement);\n    return rootElement;\n}\n/**\n * Applies any root element transformations that are needed. If hydration is enabled,\n * this will process corrupted text nodes.\n *\n * @param rootElement the app root HTML Element\n */\nfunction applyRootElementTransform(rootElement) {\n    _applyRootElementTransformImpl(rootElement);\n}\n/**\n * Reference to a function that applies transformations to the root HTML element\n * of an app. When hydration is enabled, this processes any corrupt text nodes\n * so they are properly hydratable on the client.\n *\n * @param rootElement the app root HTML Element\n */\nlet _applyRootElementTransformImpl = () => null;\n/**\n * Processes text node markers before hydration begins. This replaces any special comment\n * nodes that were added prior to serialization are swapped out to restore proper text\n * nodes before hydration.\n *\n * @param rootElement the app root HTML Element\n */\nfunction applyRootElementTransformImpl(rootElement) {\n    if (hasSkipHydrationAttrOnRElement(rootElement)) {\n        // Handle a situation when the `ngSkipHydration` attribute is applied\n        // to the root node of an application. In this case, we should clear\n        // the contents and render everything from scratch.\n        clearElementContents(rootElement);\n    }\n    else {\n        processTextNodeMarkersBeforeHydration(rootElement);\n    }\n}\n/**\n * Sets the implementation for the `applyRootElementTransform` function.\n */\nfunction enableApplyRootElementTransformImpl() {\n    _applyRootElementTransformImpl = applyRootElementTransformImpl;\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    const lCleanup = getOrCreateLViewCleanup(lView);\n    // Historically the `storeCleanupWithContext` was used to register both framework-level and\n    // user-defined cleanup callbacks, but over time those two types of cleanups were separated.\n    // This dev mode checks assures that user-level cleanup callbacks are _not_ stored in data\n    // structures reserved for framework-specific hooks.\n    ngDevMode &&\n        assertDefined(context, 'Cleanup context is mandatory when registering framework-level destroy hooks');\n    lCleanup.push(context);\n    if (tView.firstCreatePass) {\n        getOrCreateTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n    }\n    else {\n        // Make sure that no new framework-level cleanup functions are registered after the first\n        // template pass is done (and TView data structures are meant to fully constructed).\n        if (ngDevMode) {\n            Object.freeze(getOrCreateTViewCleanup(tView));\n        }\n    }\n}\nfunction createTNode(tView, tParent, type, index, value, attrs) {\n    ngDevMode &&\n        index !== 0 && // 0 are bogus nodes and they are OK. See `createContainerRef` in\n        // `view_engine_compatibility` for additional context.\n        assertGreaterThanOrEqual(index, HEADER_OFFSET, \"TNodes can't be in the LView header.\");\n    ngDevMode && assertNotSame(attrs, undefined, \"'undefined' is not valid value for 'attrs'\");\n    ngDevMode && ngDevMode.tNode++;\n    ngDevMode && tParent && assertTNodeForTView(tParent, tView);\n    let injectorIndex = tParent ? tParent.injectorIndex : -1;\n    let flags = 0;\n    if (isInSkipHydrationBlock$1()) {\n        flags |= 128 /* TNodeFlags.inSkipHydrationBlock */;\n    }\n    const tNode = {\n        type,\n        index,\n        insertBeforeIndex: null,\n        injectorIndex,\n        directiveStart: -1,\n        directiveEnd: -1,\n        directiveStylingLast: -1,\n        componentOffset: -1,\n        propertyBindings: null,\n        flags,\n        providerIndexes: 0,\n        value: value,\n        attrs: attrs,\n        mergedAttrs: null,\n        localNames: null,\n        initialInputs: undefined,\n        inputs: null,\n        outputs: null,\n        tView: null,\n        next: null,\n        prev: 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    if (ngDevMode) {\n        // For performance reasons it is important that the tNode retains the same shape during runtime.\n        // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n        // prevent class transitions.\n        Object.seal(tNode);\n    }\n    return tNode;\n}\nfunction captureNodeBindings(mode, aliasMap, directiveIndex, bindingsResult, hostDirectiveAliasMap) {\n    for (let publicName in aliasMap) {\n        if (!aliasMap.hasOwnProperty(publicName)) {\n            continue;\n        }\n        const value = aliasMap[publicName];\n        if (value === undefined) {\n            continue;\n        }\n        bindingsResult ??= {};\n        let internalName;\n        let inputFlags = InputFlags.None;\n        // For inputs, the value might be an array capturing additional\n        // input flags.\n        if (Array.isArray(value)) {\n            internalName = value[0];\n            inputFlags = value[1];\n        }\n        else {\n            internalName = value;\n        }\n        // If there are no host directive mappings, we want to remap using the alias map from the\n        // definition itself. If there is an alias map, it has two functions:\n        // 1. It serves as an allowlist of bindings that are exposed by the host directives. Only the\n        // ones inside the host directive map will be exposed on the host.\n        // 2. The public name of the property is aliased using the host directive alias map, rather\n        // than the alias map from the definition.\n        let finalPublicName = publicName;\n        if (hostDirectiveAliasMap !== null) {\n            // If there is no mapping, it's not part of the allowlist and this input/output\n            // is not captured and should be ignored.\n            if (!hostDirectiveAliasMap.hasOwnProperty(publicName)) {\n                continue;\n            }\n            finalPublicName = hostDirectiveAliasMap[publicName];\n        }\n        if (mode === 0 /* CaptureNodeBindingMode.Inputs */) {\n            addPropertyBinding(bindingsResult, directiveIndex, finalPublicName, internalName, inputFlags);\n        }\n        else {\n            addPropertyBinding(bindingsResult, directiveIndex, finalPublicName, internalName);\n        }\n    }\n    return bindingsResult;\n}\nfunction addPropertyBinding(bindings, directiveIndex, publicName, internalName, inputFlags) {\n    let values;\n    if (bindings.hasOwnProperty(publicName)) {\n        (values = bindings[publicName]).push(directiveIndex, internalName);\n    }\n    else {\n        values = bindings[publicName] = [directiveIndex, internalName];\n    }\n    if (inputFlags !== undefined) {\n        values.push(inputFlags);\n    }\n}\n/**\n * Initializes data structures required to work with directive inputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\nfunction initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefinitionMap) {\n    ngDevMode && assertFirstCreatePass(tView);\n    const start = tNode.directiveStart;\n    const end = tNode.directiveEnd;\n    const tViewData = tView.data;\n    const tNodeAttrs = tNode.attrs;\n    const inputsFromAttrs = [];\n    let inputsStore = null;\n    let outputsStore = null;\n    for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n        const directiveDef = tViewData[directiveIndex];\n        const aliasData = hostDirectiveDefinitionMap\n            ? hostDirectiveDefinitionMap.get(directiveDef)\n            : null;\n        const aliasedInputs = aliasData ? aliasData.inputs : null;\n        const aliasedOutputs = aliasData ? aliasData.outputs : null;\n        inputsStore = captureNodeBindings(0 /* CaptureNodeBindingMode.Inputs */, directiveDef.inputs, directiveIndex, inputsStore, aliasedInputs);\n        outputsStore = captureNodeBindings(1 /* CaptureNodeBindingMode.Outputs */, directiveDef.outputs, directiveIndex, outputsStore, aliasedOutputs);\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        const initialInputs = inputsStore !== null && tNodeAttrs !== null && !isInlineTemplate(tNode)\n            ? generateInitialInputs(inputsStore, directiveIndex, tNodeAttrs)\n            : null;\n        inputsFromAttrs.push(initialInputs);\n    }\n    if (inputsStore !== null) {\n        if (inputsStore.hasOwnProperty('class')) {\n            tNode.flags |= 8 /* TNodeFlags.hasClassInput */;\n        }\n        if (inputsStore.hasOwnProperty('style')) {\n            tNode.flags |= 16 /* TNodeFlags.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    const element = getNativeByTNode(tNode, lView);\n    let inputData = tNode.inputs;\n    let 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 /* TNodeType.AnyRNode */) {\n        propName = mapPropName(propName);\n        if (ngDevMode) {\n            validateAgainstEventProperties(propName);\n            if (!isPropertyValid(element, propName, tNode.value, tView.schemas)) {\n                handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\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.value || '', propName) : value;\n        renderer.setProperty(element, propName, value);\n    }\n    else if (tNode.type & 12 /* TNodeType.AnyContainer */) {\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.schemas, tNode.value)) {\n            handleUnknownPropertyError(propName, tNode.value, tNode.type, lView);\n        }\n    }\n}\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(lView, viewIndex) {\n    ngDevMode && assertLView(lView);\n    const childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n    if (!(childComponentLView[FLAGS] & 16 /* LViewFlags.CheckAlways */)) {\n        childComponentLView[FLAGS] |= 64 /* LViewFlags.Dirty */;\n    }\n}\nfunction setNgReflectProperty(lView, element, type, attrName, value) {\n    const renderer = lView[RENDERER];\n    attrName = normalizeDebugBindingName(attrName);\n    const debugValue = normalizeDebugBindingValue(value);\n    if (type & 3 /* TNodeType.AnyRNode */) {\n        if (value == null) {\n            renderer.removeAttribute(element, attrName);\n        }\n        else {\n            renderer.setAttribute(element, attrName, debugValue);\n        }\n    }\n    else {\n        const textContent = escapeCommentText(`bindings=${JSON.stringify({ [attrName]: debugValue }, null, 2)}`);\n        renderer.setValue(element, textContent);\n    }\n}\nfunction setNgReflectProperties(lView, element, type, dataValue, value) {\n    if (type & (3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.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 (let i = 0; i < dataValue.length; i += 3) {\n            setNgReflectProperty(lView, element, type, dataValue[i + 1], value);\n        }\n    }\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    if (getBindingsEnabled()) {\n        const exportsMap = localRefs === null ? null : { '': -1 };\n        const matchResult = findDirectiveDefMatches(tView, tNode);\n        let directiveDefs;\n        let hostDirectiveDefs;\n        if (matchResult === null) {\n            directiveDefs = hostDirectiveDefs = null;\n        }\n        else {\n            [directiveDefs, hostDirectiveDefs] = matchResult;\n        }\n        if (directiveDefs !== null) {\n            initializeDirectives(tView, lView, tNode, directiveDefs, exportsMap, hostDirectiveDefs);\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}\n/** Initializes the data structures necessary for a list of directives to be instantiated. */\nfunction initializeDirectives(tView, lView, tNode, directives, exportsMap, hostDirectiveDefs) {\n    ngDevMode && assertFirstCreatePass(tView);\n    // Publishes the directive types to DI so they can be injected. Needs to\n    // happen in a separate pass before the TNode flags have been initialized.\n    for (let i = 0; i < directives.length; i++) {\n        diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, directives[i].type);\n    }\n    initTNodeFlags(tNode, tView.data.length, directives.length);\n    // When the same token is provided by several directives on the same node, some rules apply in\n    // the viewEngine:\n    // - viewProviders have priority over providers\n    // - the last directive in NgModule.declarations has priority over the previous one\n    // So to match these rules, the order in which providers are added in the arrays is very\n    // important.\n    for (let i = 0; i < directives.length; i++) {\n        const def = directives[i];\n        if (def.providersResolver)\n            def.providersResolver(def);\n    }\n    let preOrderHooksFound = false;\n    let preOrderCheckHooksFound = false;\n    let directiveIdx = allocExpando(tView, lView, directives.length, null);\n    ngDevMode &&\n        assertSame(directiveIdx, tNode.directiveStart, 'TNode.directiveStart should point to just allocated space');\n    for (let i = 0; i < directives.length; i++) {\n        const def = directives[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        configureViewWithDirective(tView, tNode, lView, directiveIdx, def);\n        saveNameToExportMap(directiveIdx, def, exportsMap);\n        if (def.contentQueries !== null)\n            tNode.flags |= 4 /* TNodeFlags.hasContentQuery */;\n        if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n            tNode.flags |= 64 /* TNodeFlags.hasHostBindings */;\n        const lifeCycleHooks = def.type.prototype;\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 &&\n            (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {\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 ??= []).push(tNode.index);\n            preOrderHooksFound = true;\n        }\n        if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n            (tView.preOrderCheckHooks ??= []).push(tNode.index);\n            preOrderCheckHooksFound = true;\n        }\n        directiveIdx++;\n    }\n    initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefs);\n}\n/**\n * Add `hostBindings` to the `TView.hostBindingOpCodes`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param tNode `TNode` the element which contains the directive\n * @param directiveIdx Directive index in view.\n * @param directiveVarsIdx Where will the directive's vars be stored\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\nfunction registerHostBindingOpCodes(tView, tNode, directiveIdx, directiveVarsIdx, def) {\n    ngDevMode && assertFirstCreatePass(tView);\n    const hostBindings = def.hostBindings;\n    if (hostBindings) {\n        let hostBindingOpCodes = tView.hostBindingOpCodes;\n        if (hostBindingOpCodes === null) {\n            hostBindingOpCodes = tView.hostBindingOpCodes = [];\n        }\n        const elementIndx = ~tNode.index;\n        if (lastSelectedElementIdx(hostBindingOpCodes) != elementIndx) {\n            // Conditionally add select element so that we are more efficient in execution.\n            // NOTE: this is strictly not necessary and it trades code size for runtime perf.\n            // (We could just always add it.)\n            hostBindingOpCodes.push(elementIndx);\n        }\n        hostBindingOpCodes.push(directiveIdx, directiveVarsIdx, hostBindings);\n    }\n}\n/**\n * Returns the last selected element index in the `HostBindingOpCodes`\n *\n * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only\n * if it changes. This method returns the last index (or '0' if not found.)\n *\n * Selected element index are only the ones which are negative.\n */\nfunction lastSelectedElementIdx(hostBindingOpCodes) {\n    let i = hostBindingOpCodes.length;\n    while (i > 0) {\n        const value = hostBindingOpCodes[--i];\n        if (typeof value === 'number' && value < 0) {\n            return value;\n        }\n    }\n    return 0;\n}\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(tView, lView, tNode, native) {\n    const start = tNode.directiveStart;\n    const end = tNode.directiveEnd;\n    // The component view needs to be created before creating the node injector\n    // since it is used to inject some special symbols like `ChangeDetectorRef`.\n    if (isComponentHost(tNode)) {\n        ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);\n        addComponentLogic(lView, tNode, tView.data[start + tNode.componentOffset]);\n    }\n    if (!tView.firstCreatePass) {\n        getOrCreateNodeInjectorForNode(tNode, lView);\n    }\n    attachPatchData(native, lView);\n    const initialInputs = tNode.initialInputs;\n    for (let i = start; i < end; i++) {\n        const def = tView.data[i];\n        const 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 (isComponentDef(def)) {\n            const componentView = getComponentLViewByIndex(tNode.index, lView);\n            componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);\n        }\n    }\n}\nfunction invokeDirectivesHostBindings(tView, lView, tNode) {\n    const start = tNode.directiveStart;\n    const end = tNode.directiveEnd;\n    const elementIndex = tNode.index;\n    const currentDirectiveIndex = getCurrentDirectiveIndex();\n    try {\n        setSelectedIndex(elementIndex);\n        for (let dirIndex = start; dirIndex < end; dirIndex++) {\n            const def = tView.data[dirIndex];\n            const directive = lView[dirIndex];\n            setCurrentDirectiveIndex(dirIndex);\n            if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n                invokeHostBindingsInCreationMode(def, directive);\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 /* RenderFlags.Create */, directive);\n    }\n}\n/**\n * Matches the current node against all available selectors.\n * If a component is matched (at most one), it is returned in first position in the array.\n */\nfunction findDirectiveDefMatches(tView, tNode) {\n    ngDevMode && assertFirstCreatePass(tView);\n    ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */);\n    const registry = tView.directiveRegistry;\n    let matches = null;\n    let hostDirectiveDefs = null;\n    if (registry) {\n        for (let i = 0; i < registry.length; i++) {\n            const def = registry[i];\n            if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {\n                matches || (matches = []);\n                if (isComponentDef(def)) {\n                    if (ngDevMode) {\n                        assertTNodeType(tNode, 2 /* TNodeType.Element */, `\"${tNode.value}\" tags cannot be used as component hosts. ` +\n                            `Please use a different tag to activate the ${stringify(def.type)} component.`);\n                        if (isComponentHost(tNode)) {\n                            throwMultipleComponentError(tNode, matches.find(isComponentDef).type, def.type);\n                        }\n                    }\n                    // Components are inserted at the front of the matches array so that their lifecycle\n                    // hooks run before any directive lifecycle hooks. This appears to be for ViewEngine\n                    // compatibility. This logic doesn't make sense with host directives, because it\n                    // would allow the host directives to undo any overrides the host may have made.\n                    // To handle this case, the host directives of components are inserted at the beginning\n                    // of the array, followed by the component. As such, the insertion order is as follows:\n                    // 1. Host directives belonging to the selector-matched component.\n                    // 2. Selector-matched component.\n                    // 3. Host directives belonging to selector-matched directives.\n                    // 4. Selector-matched directives.\n                    if (def.findHostDirectiveDefs !== null) {\n                        const hostDirectiveMatches = [];\n                        hostDirectiveDefs = hostDirectiveDefs || new Map();\n                        def.findHostDirectiveDefs(def, hostDirectiveMatches, hostDirectiveDefs);\n                        // Add all host directives declared on this component, followed by the component itself.\n                        // Host directives should execute first so the host has a chance to override changes\n                        // to the DOM made by them.\n                        matches.unshift(...hostDirectiveMatches, def);\n                        // Component is offset starting from the beginning of the host directives array.\n                        const componentOffset = hostDirectiveMatches.length;\n                        markAsComponentHost(tView, tNode, componentOffset);\n                    }\n                    else {\n                        // No host directives on this component, just add the\n                        // component def to the beginning of the matches.\n                        matches.unshift(def);\n                        markAsComponentHost(tView, tNode, 0);\n                    }\n                }\n                else {\n                    // Append any host directives to the matches first.\n                    hostDirectiveDefs = hostDirectiveDefs || new Map();\n                    def.findHostDirectiveDefs?.(def, matches, hostDirectiveDefs);\n                    matches.push(def);\n                }\n            }\n        }\n    }\n    ngDevMode && matches !== null && assertNoDuplicateDirectives(matches);\n    return matches === null ? null : [matches, hostDirectiveDefs];\n}\n/**\n * Marks a given TNode as a component's host. This consists of:\n * - setting the component offset on the TNode.\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\nfunction markAsComponentHost(tView, hostTNode, componentOffset) {\n    ngDevMode && assertFirstCreatePass(tView);\n    ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');\n    hostTNode.componentOffset = componentOffset;\n    (tView.components ??= []).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        const localNames = (tNode.localNames = []);\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 (let i = 0; i < localRefs.length; i += 2) {\n            const index = exportsMap[localRefs[i + 1]];\n            if (index == null)\n                throw new RuntimeError(-301 /* RuntimeErrorCode.EXPORT_NOT_FOUND */, ngDevMode && `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(directiveIdx, def, exportsMap) {\n    if (exportsMap) {\n        if (def.exportAs) {\n            for (let i = 0; i < def.exportAs.length; i++) {\n                exportsMap[def.exportAs[i]] = directiveIdx;\n            }\n        }\n        if (isComponentDef(def))\n            exportsMap[''] = directiveIdx;\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 /* TNodeFlags.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}\n/**\n * Setup directive for instantiation.\n *\n * We need to create a `NodeInjectorFactory` which is then inserted in both the `Blueprint` as well\n * as `LView`. `TView` gets the `DirectiveDef`.\n *\n * @param tView `TView`\n * @param tNode `TNode`\n * @param lView `LView`\n * @param directiveIndex Index where the directive will be stored in the Expando.\n * @param def `DirectiveDef`\n */\nfunction configureViewWithDirective(tView, tNode, lView, directiveIndex, def) {\n    ngDevMode &&\n        assertGreaterThanOrEqual(directiveIndex, HEADER_OFFSET, 'Must be in Expando section');\n    tView.data[directiveIndex] = def;\n    const directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true));\n    // Even though `directiveFactory` will already be using `ɵɵdirectiveInject` in its generated code,\n    // we also want to support `inject()` directly from the directive constructor context so we set\n    // `ɵɵdirectiveInject` as the inject implementation here too.\n    const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), ɵɵdirectiveInject);\n    tView.blueprint[directiveIndex] = nodeInjectorFactory;\n    lView[directiveIndex] = nodeInjectorFactory;\n    registerHostBindingOpCodes(tView, tNode, directiveIndex, allocExpando(tView, lView, def.hostVars, NO_CHANGE), def);\n}\n/**\n * Gets the initial set of LView flags based on the component definition that the LView represents.\n * @param def Component definition from which to determine the flags.\n */\nfunction getInitialLViewFlagsFromDef(def) {\n    let flags = 16 /* LViewFlags.CheckAlways */;\n    if (def.signals) {\n        flags = 4096 /* LViewFlags.SignalView */;\n    }\n    else if (def.onPush) {\n        flags = 64 /* LViewFlags.Dirty */;\n    }\n    return flags;\n}\nfunction addComponentLogic(lView, hostTNode, def) {\n    const native = getNativeByTNode(hostTNode, lView);\n    const tView = getOrCreateComponentTView(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    const rendererFactory = lView[ENVIRONMENT].rendererFactory;\n    const componentView = addToEndOfViewTree(lView, createLView(lView, tView, null, getInitialLViewFlagsFromDef(def), native, hostTNode, null, rendererFactory.createRenderer(native, def), null, null, null));\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    if (ngDevMode) {\n        assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n        validateAgainstEventAttributes(name);\n        assertTNodeType(tNode, 2 /* TNodeType.Element */, `Attempted to set attribute \\`${name}\\` on a container node. ` +\n            `Host bindings are not valid on ng-container or ng-template.`);\n    }\n    const element = getNativeByTNode(tNode, lView);\n    setElementAttribute(lView[RENDERER], element, namespace, tNode.value, name, value, sanitizer);\n}\nfunction setElementAttribute(renderer, element, namespace, tagName, name, value, sanitizer) {\n    if (value == null) {\n        ngDevMode && ngDevMode.rendererRemoveAttribute++;\n        renderer.removeAttribute(element, name, namespace);\n    }\n    else {\n        ngDevMode && ngDevMode.rendererSetAttribute++;\n        const strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tagName || '', name);\n        renderer.setAttribute(element, name, strValue, namespace);\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    const initialInputs = initialInputData[directiveIndex];\n    if (initialInputs !== null) {\n        for (let i = 0; i < initialInputs.length;) {\n            const publicName = initialInputs[i++];\n            const privateName = initialInputs[i++];\n            const flags = initialInputs[i++];\n            const value = initialInputs[i++];\n            writeToDirectiveInput(def, instance, publicName, privateName, flags, value);\n            if (ngDevMode) {\n                const 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 Input alias map that was generated from the directive def inputs.\n * @param directiveIndex Index of the directive that is currently being processed.\n * @param attrs Static attrs on this node.\n */\nfunction generateInitialInputs(inputs, directiveIndex, attrs) {\n    let inputsToStore = null;\n    let i = 0;\n    while (i < attrs.length) {\n        const attrName = attrs[i];\n        if (attrName === 0 /* AttributeMarker.NamespaceURI */) {\n            // We do not allow inputs on namespaced attributes.\n            i += 4;\n            continue;\n        }\n        else if (attrName === 5 /* AttributeMarker.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            // Find the input's public name from the input store. Note that we can be found easier\n            // through the directive def, but we want to do it using the inputs store so that it can\n            // account for host directive aliases.\n            const inputConfig = inputs[attrName];\n            for (let j = 0; j < inputConfig.length; j += 3) {\n                if (inputConfig[j] === directiveIndex) {\n                    inputsToStore.push(attrName, inputConfig[j + 1], inputConfig[j + 2], attrs[i + 1]);\n                    // A directive can't have multiple inputs with the same name so we can break here.\n                    break;\n                }\n            }\n        }\n        i += 2;\n    }\n    return inputsToStore;\n}\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\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    const lContainer = [\n        hostNative, // host native\n        true, // Boolean `true` in this position signifies that this is an `LContainer`\n        0, // flags\n        currentView, // parent\n        null, // next\n        tNode, // t_host\n        null, // dehydrated views\n        native, // native,\n        null, // view refs\n        null, // moved views\n    ];\n    ngDevMode &&\n        assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');\n    return lContainer;\n}\n/** Refreshes all content queries declared by directives in a given view */\nfunction refreshContentQueries(tView, lView) {\n    const contentQueries = tView.contentQueries;\n    if (contentQueries !== null) {\n        const prevConsumer = setActiveConsumer$1(null);\n        try {\n            for (let i = 0; i < contentQueries.length; i += 2) {\n                const queryStartIdx = contentQueries[i];\n                const directiveDefIdx = contentQueries[i + 1];\n                if (directiveDefIdx !== -1) {\n                    const directiveDef = tView.data[directiveDefIdx];\n                    ngDevMode && assertDefined(directiveDef, 'DirectiveDef not found.');\n                    ngDevMode &&\n                        assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n                    setCurrentQueryIndex(queryStartIdx);\n                    directiveDef.contentQueries(2 /* RenderFlags.Update */, lView[directiveDefIdx], directiveDefIdx);\n                }\n            }\n        }\n        finally {\n            setActiveConsumer$1(prevConsumer);\n        }\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 addToEndOfViewTree(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///////////////////////////////\nfunction executeViewQueryFn(flags, viewQueryFn, component) {\n    ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n    setCurrentQueryIndex(0);\n    const prevConsumer = setActiveConsumer$1(null);\n    try {\n        viewQueryFn(flags, component);\n    }\n    finally {\n        setActiveConsumer$1(prevConsumer);\n    }\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, ...interpolationParts) {\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            const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n            propBindingIdxs.push(bindingIndex);\n            let bindingMetadata = propertyName;\n            if (interpolationParts.length > 0) {\n                bindingMetadata +=\n                    INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n            }\n            tData[bindingIndex] = bindingMetadata;\n        }\n    }\n}\nfunction getOrCreateLViewCleanup(view) {\n    // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n    return (view[CLEANUP] ??= []);\n}\nfunction getOrCreateTViewCleanup(tView) {\n    return (tView.cleanup ??= []);\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    const injector = lView[INJECTOR];\n    const 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 (let i = 0; i < inputs.length;) {\n        const index = inputs[i++];\n        const privateName = inputs[i++];\n        const flags = inputs[i++];\n        const instance = lView[index];\n        ngDevMode && assertIndexInRange(lView, index);\n        const def = tView.data[index];\n        writeToDirectiveInput(def, instance, publicName, privateName, flags, value);\n    }\n}\n/**\n * Updates a text binding at a given index in a given LView.\n */\nfunction textBindingInternal(lView, index, value) {\n    ngDevMode && assertString(value, 'Value should be a string');\n    ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');\n    ngDevMode && assertIndexInRange(lView, index);\n    const element = getNativeByIndex(index, lView);\n    ngDevMode && assertDefined(element, 'native element should exist');\n    updateTextNode(lView[RENDERER], element, value);\n}\n\nfunction renderComponent(hostLView, componentHostIdx) {\n    ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n    const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n    const componentTView = componentView[TVIEW];\n    syncViewWithBlueprint(componentTView, componentView);\n    const hostRNode = componentView[HOST];\n    // Populate an LView with hydration info retrieved from the DOM via TransferState.\n    if (hostRNode !== null && componentView[HYDRATION] === null) {\n        componentView[HYDRATION] = retrieveHydrationInfo(hostRNode, componentView[INJECTOR]);\n    }\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 * ```html\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 (let i = lView.length; i < tView.blueprint.length; i++) {\n        lView.push(tView.blueprint[i]);\n    }\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    ngDevMode && assertNotReactive(renderView.name);\n    enterView(lView);\n    try {\n        const viewQuery = tView.viewQuery;\n        if (viewQuery !== null) {\n            executeViewQueryFn(1 /* RenderFlags.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        const templateFn = tView.template;\n        if (templateFn !== null) {\n            executeTemplate(tView, lView, templateFn, 1 /* RenderFlags.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        // Mark all queries active in this view as dirty. This is necessary for signal-based queries to\n        // have a clear marking point where we can read query results atomically (for a given view).\n        lView[QUERIES]?.finishViewCreation(tView);\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 /* RenderFlags.Update */, tView.viewQuery, context);\n        }\n        // Render child component views.\n        const 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            tView.firstCreatePass = false;\n        }\n        throw error;\n    }\n    finally {\n        lView[FLAGS] &= ~4 /* LViewFlags.CreationMode */;\n        leaveView();\n    }\n}\n/** Renders child components in the current view (creation mode). */\nfunction renderChildComponents(hostLView, components) {\n    for (let i = 0; i < components.length; i++) {\n        renderComponent(hostLView, components[i]);\n    }\n}\n\nfunction createAndRenderEmbeddedLView(declarationLView, templateTNode, context, options) {\n    const prevConsumer = setActiveConsumer$1(null);\n    try {\n        const embeddedTView = templateTNode.tView;\n        ngDevMode && assertDefined(embeddedTView, 'TView must be defined for a template node.');\n        ngDevMode && assertTNodeForLView(templateTNode, declarationLView);\n        // Embedded views follow the change detection strategy of the view they're declared in.\n        const isSignalView = declarationLView[FLAGS] & 4096 /* LViewFlags.SignalView */;\n        const viewFlags = isSignalView ? 4096 /* LViewFlags.SignalView */ : 16 /* LViewFlags.CheckAlways */;\n        const embeddedLView = createLView(declarationLView, embeddedTView, context, viewFlags, null, templateTNode, null, null, options?.injector ?? null, options?.embeddedViewInjector ?? null, options?.dehydratedView ?? null);\n        const declarationLContainer = declarationLView[templateTNode.index];\n        ngDevMode && assertLContainer(declarationLContainer);\n        embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n        const declarationViewLQueries = declarationLView[QUERIES];\n        if (declarationViewLQueries !== null) {\n            embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n        }\n        // execute creation mode of a view\n        renderView(embeddedTView, embeddedLView, context);\n        return embeddedLView;\n    }\n    finally {\n        setActiveConsumer$1(prevConsumer);\n    }\n}\nfunction getLViewFromLContainer(lContainer, index) {\n    const adjustedIndex = CONTAINER_HEADER_OFFSET + index;\n    // avoid reading past the array boundaries\n    if (adjustedIndex < lContainer.length) {\n        const lView = lContainer[adjustedIndex];\n        ngDevMode && assertLView(lView);\n        return lView;\n    }\n    return undefined;\n}\n/**\n * Returns whether an elements that belong to a view should be\n * inserted into the DOM. For client-only cases, DOM elements are\n * always inserted. For hydration cases, we check whether serialized\n * info is available for a view and the view is not in a \"skip hydration\"\n * block (in which case view contents was re-created, thus needing insertion).\n */\nfunction shouldAddViewToDom(tNode, dehydratedView) {\n    return (!dehydratedView || dehydratedView.firstChild === null || hasInSkipHydrationBlockFlag(tNode));\n}\nfunction addLViewToLContainer(lContainer, lView, index, addToDOM = true) {\n    const tView = lView[TVIEW];\n    // Insert into the view tree so the new view can be change-detected\n    insertView(tView, lView, lContainer, index);\n    // Insert elements that belong to this view into the DOM tree\n    if (addToDOM) {\n        const beforeNode = getBeforeNodeForView(index, lContainer);\n        const renderer = lView[RENDERER];\n        const parentRNode = nativeParentNode(renderer, lContainer[NATIVE]);\n        if (parentRNode !== null) {\n            addViewToDOM(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);\n        }\n    }\n    // When in hydration mode, reset the pointer to the first child in\n    // the dehydrated view. This indicates that the view was hydrated and\n    // further attaching/detaching should work with this view as normal.\n    const hydrationInfo = lView[HYDRATION];\n    if (hydrationInfo !== null && hydrationInfo.firstChild !== null) {\n        hydrationInfo.firstChild = null;\n    }\n}\nfunction removeLViewFromLContainer(lContainer, index) {\n    const lView = detachView(lContainer, index);\n    if (lView !== undefined) {\n        destroyLView(lView[TVIEW], lView);\n    }\n    return lView;\n}\n\nfunction collectNativeNodes(tView, lView, tNode, result, isProjection = false) {\n    while (tNode !== null) {\n        // Let declarations don't have corresponding DOM nodes so we skip over them.\n        if (tNode.type === 128 /* TNodeType.LetDeclaration */) {\n            tNode = isProjection ? tNode.projectionNext : tNode.next;\n            continue;\n        }\n        ngDevMode &&\n            assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 16 /* TNodeType.Projection */ | 32 /* TNodeType.Icu */);\n        const 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            collectNativeNodesInLContainer(lNode, result);\n        }\n        const tNodeType = tNode.type;\n        if (tNodeType & 8 /* TNodeType.ElementContainer */) {\n            collectNativeNodes(tView, lView, tNode.child, result);\n        }\n        else if (tNodeType & 32 /* TNodeType.Icu */) {\n            const nextRNode = icuContainerIterate(tNode, lView);\n            let rNode;\n            while ((rNode = nextRNode())) {\n                result.push(rNode);\n            }\n        }\n        else if (tNodeType & 16 /* TNodeType.Projection */) {\n            const nodesInSlot = getProjectionNodes(lView, tNode);\n            if (Array.isArray(nodesInSlot)) {\n                result.push(...nodesInSlot);\n            }\n            else {\n                const parentView = getLViewParent(lView[DECLARATION_COMPONENT_VIEW]);\n                ngDevMode && assertParentView(parentView);\n                collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n            }\n        }\n        tNode = isProjection ? tNode.projectionNext : tNode.next;\n    }\n    return result;\n}\n/**\n * Collects all root nodes in all views in a given LContainer.\n */\nfunction collectNativeNodesInLContainer(lContainer, result) {\n    for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n        const lViewInAContainer = lContainer[i];\n        const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n        if (lViewFirstChildTNode !== null) {\n            collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n        }\n    }\n    // When an LContainer is created, the anchor (comment) node is:\n    // - (1) either reused in case of an ElementContainer (<ng-container>)\n    // - (2) or a new comment node is created\n    // In the first case, the anchor comment node would be added to the final\n    // list by the code in the `collectNativeNodes` function\n    // (see the `result.push(unwrapRNode(lNode))` line), but the second\n    // case requires extra handling: the anchor node needs to be added to the\n    // final list manually. See additional information in the `createAnchorNode`\n    // function in the `view_container_ref.ts`.\n    //\n    // In the first case, the same reference would be stored in the `NATIVE`\n    // and `HOST` slots in an LContainer. Otherwise, this is the second case and\n    // we should add an element to the final list.\n    if (lContainer[NATIVE] !== lContainer[HOST]) {\n        result.push(lContainer[NATIVE]);\n    }\n}\n\nlet freeConsumers = [];\n/**\n * Create a new template consumer pointing at the specified LView.\n * Sometimes, a previously created consumer may be reused, in order to save on allocations. In that\n * case, the LView will be updated.\n */\nfunction getOrBorrowReactiveLViewConsumer(lView) {\n    return lView[REACTIVE_TEMPLATE_CONSUMER] ?? borrowReactiveLViewConsumer(lView);\n}\nfunction borrowReactiveLViewConsumer(lView) {\n    const consumer = freeConsumers.pop() ?? Object.create(REACTIVE_LVIEW_CONSUMER_NODE);\n    consumer.lView = lView;\n    return consumer;\n}\nfunction maybeReturnReactiveLViewConsumer(consumer) {\n    if (consumer.lView[REACTIVE_TEMPLATE_CONSUMER] === consumer) {\n        // The consumer got committed.\n        return;\n    }\n    consumer.lView = null;\n    freeConsumers.push(consumer);\n}\nconst REACTIVE_LVIEW_CONSUMER_NODE = {\n    ...REACTIVE_NODE$1,\n    consumerIsAlwaysLive: true,\n    consumerMarkedDirty: (node) => {\n        markAncestorsForTraversal(node.lView);\n    },\n    consumerOnSignalRead() {\n        this.lView[REACTIVE_TEMPLATE_CONSUMER] = this;\n    },\n};\n/**\n * Creates a temporary consumer for use with `LView`s that should not have consumers.\n * If the LView already has a consumer, returns the existing one instead.\n *\n * This is necessary because some APIs may cause change detection directly on an LView\n * that we do not want to have a consumer (Embedded views today). As a result, there\n * would be no active consumer from running change detection on its host component\n * and any signals in the LView template would be untracked. Instead, we create\n * this temporary consumer that marks the first parent that _should_ have a consumer\n * for refresh. Once change detection runs as part of that refresh, we throw away\n * this consumer because its signals will then be tracked by the parent's consumer.\n */\nfunction getOrCreateTemporaryConsumer(lView) {\n    const consumer = lView[REACTIVE_TEMPLATE_CONSUMER] ?? Object.create(TEMPORARY_CONSUMER_NODE);\n    consumer.lView = lView;\n    return consumer;\n}\nconst TEMPORARY_CONSUMER_NODE = {\n    ...REACTIVE_NODE$1,\n    consumerIsAlwaysLive: true,\n    consumerMarkedDirty: (node) => {\n        let parent = getLViewParent(node.lView);\n        while (parent && !viewShouldHaveReactiveConsumer(parent[TVIEW])) {\n            parent = getLViewParent(parent);\n        }\n        if (!parent) {\n            // If we can't find an appropriate parent that should have a consumer, we\n            // don't have a way of appropriately refreshing this LView as part of application synchronization.\n            return;\n        }\n        markViewForRefresh(parent);\n    },\n    consumerOnSignalRead() {\n        this.lView[REACTIVE_TEMPLATE_CONSUMER] = this;\n    },\n};\n/**\n * Indicates if the view should get its own reactive consumer node.\n *\n * In the current design, all embedded views share a consumer with the component view. This allows\n * us to refresh at the component level rather than at a per-view level. In addition, root views get\n * their own reactive node because root component will have a host view that executes the\n * component's host bindings. This needs to be tracked in a consumer as well.\n *\n * To get a more granular change detection than per-component, all we would just need to update the\n * condition here so that a given view gets a reactive consumer which can become dirty independently\n * from its parent component. For example embedded views for signal components could be created with\n * a new type \"SignalEmbeddedView\" and the condition here wouldn't even need updating in order to\n * get granular per-view change detection for signal components.\n */\nfunction viewShouldHaveReactiveConsumer(tView) {\n    return tView.type !== 2 /* TViewType.Embedded */;\n}\n\nfunction runEffectsInView(view) {\n    if (view[EFFECTS] === null) {\n        return;\n    }\n    // Since effects can make other effects dirty, we flush them in a loop until there are no more to\n    // flush.\n    let tryFlushEffects = true;\n    while (tryFlushEffects) {\n        let foundDirtyEffect = false;\n        for (const effect of view[EFFECTS]) {\n            if (!effect.dirty) {\n                continue;\n            }\n            foundDirtyEffect = true;\n            // `runEffectsInView` is called during change detection, and therefore runs\n            // in the Angular zone if it's available.\n            if (effect.zone === null || Zone.current === effect.zone) {\n                effect.run();\n            }\n            else {\n                effect.zone.run(() => effect.run());\n            }\n        }\n        // Check if we need to continue flushing. If we didn't find any dirty effects, then there's\n        // no need to loop back. Otherwise, check the view to see if it was marked for traversal\n        // again. If so, there's a chance that one of the effects we ran caused another effect to\n        // become dirty.\n        tryFlushEffects = foundDirtyEffect && !!(view[FLAGS] & 8192 /* LViewFlags.HasChildViewsToRefresh */);\n    }\n}\n\n/**\n * The maximum number of times the change detection traversal will rerun before throwing an error.\n */\nconst MAXIMUM_REFRESH_RERUNS$1 = 100;\nfunction detectChangesInternal(lView, notifyErrorHandler = true, mode = 0 /* ChangeDetectionMode.Global */) {\n    const environment = lView[ENVIRONMENT];\n    const rendererFactory = environment.rendererFactory;\n    // Check no changes mode is a dev only mode used to verify that bindings have not changed\n    // since they were assigned. We do not want to invoke renderer factory functions in that mode\n    // to avoid any possible side-effects.\n    const checkNoChangesMode = !!ngDevMode && isInCheckNoChangesMode();\n    if (!checkNoChangesMode) {\n        rendererFactory.begin?.();\n    }\n    try {\n        detectChangesInViewWhileDirty(lView, mode);\n    }\n    catch (error) {\n        if (notifyErrorHandler) {\n            handleError(lView, error);\n        }\n        throw error;\n    }\n    finally {\n        if (!checkNoChangesMode) {\n            rendererFactory.end?.();\n        }\n    }\n}\nfunction detectChangesInViewWhileDirty(lView, mode) {\n    const lastIsRefreshingViewsValue = isRefreshingViews();\n    try {\n        setIsRefreshingViews(true);\n        detectChangesInView(lView, mode);\n        // We don't need or want to do any looping when in exhaustive checkNoChanges because we\n        // already traverse all the views and nothing should change so we shouldn't have to do\n        // another pass to pick up new changes.\n        if (ngDevMode && isExhaustiveCheckNoChanges()) {\n            return;\n        }\n        let retries = 0;\n        // If after running change detection, this view still needs to be refreshed or there are\n        // descendants views that need to be refreshed due to re-dirtying during the change detection\n        // run, detect changes on the view again. We run change detection in `Targeted` mode to only\n        // refresh views with the `RefreshView` flag.\n        while (requiresRefreshOrTraversal(lView)) {\n            if (retries === MAXIMUM_REFRESH_RERUNS$1) {\n                throw new RuntimeError(103 /* RuntimeErrorCode.INFINITE_CHANGE_DETECTION */, ngDevMode &&\n                    'Infinite change detection while trying to refresh views. ' +\n                        'There may be components which each cause the other to require a refresh, ' +\n                        'causing an infinite loop.');\n            }\n            retries++;\n            // Even if this view is detached, we still detect changes in targeted mode because this was\n            // the root of the change detection run.\n            detectChangesInView(lView, 1 /* ChangeDetectionMode.Targeted */);\n        }\n    }\n    finally {\n        // restore state to what it was before entering this change detection loop\n        setIsRefreshingViews(lastIsRefreshingViewsValue);\n    }\n}\nfunction checkNoChangesInternal(lView, mode, notifyErrorHandler = true) {\n    setIsInCheckNoChangesMode(mode);\n    try {\n        detectChangesInternal(lView, notifyErrorHandler);\n    }\n    finally {\n        setIsInCheckNoChangesMode(CheckNoChangesMode.Off);\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    const flags = lView[FLAGS];\n    if ((flags & 256 /* LViewFlags.Destroyed */) === 256 /* LViewFlags.Destroyed */)\n        return;\n    // Check no changes mode is a dev only mode used to verify that bindings have not changed\n    // since they were assigned. We do not want to execute lifecycle hooks in that mode.\n    const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();\n    const isInExhaustiveCheckNoChangesPass = ngDevMode && isExhaustiveCheckNoChanges();\n    // Start component reactive context\n    // - We might already be in a reactive context if this is an embedded view of the host.\n    // - We might be descending into a view that needs a consumer.\n    enterView(lView);\n    let returnConsumerToPool = true;\n    let prevConsumer = null;\n    let currentConsumer = null;\n    if (!isInCheckNoChangesPass) {\n        if (viewShouldHaveReactiveConsumer(tView)) {\n            currentConsumer = getOrBorrowReactiveLViewConsumer(lView);\n            prevConsumer = consumerBeforeComputation$1(currentConsumer);\n        }\n        else if (getActiveConsumer$1() === null) {\n            // If the current view should not have a reactive consumer but we don't have an active consumer,\n            // we still need to create a temporary consumer to track any signal reads in this template.\n            // This is a rare case that can happen with `viewContainerRef.createEmbeddedView(...).detectChanges()`.\n            // This temporary consumer marks the first parent that _should_ have a consumer for refresh.\n            // Once that refresh happens, the signals will be tracked in the parent consumer and we can destroy\n            // the temporary one.\n            returnConsumerToPool = false;\n            currentConsumer = getOrCreateTemporaryConsumer(lView);\n            prevConsumer = consumerBeforeComputation$1(currentConsumer);\n        }\n        else if (lView[REACTIVE_TEMPLATE_CONSUMER]) {\n            consumerDestroy$1(lView[REACTIVE_TEMPLATE_CONSUMER]);\n            lView[REACTIVE_TEMPLATE_CONSUMER] = null;\n        }\n    }\n    try {\n        resetPreOrderHookFlags(lView);\n        setBindingIndex(tView.bindingStartIndex);\n        if (templateFn !== null) {\n            executeTemplate(tView, lView, templateFn, 2 /* RenderFlags.Update */, context);\n        }\n        const hooksInitPhaseCompleted = (flags & 3 /* LViewFlags.InitPhaseStateMask */) === 3 /* InitPhaseState.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 (!isInCheckNoChangesPass) {\n            if (hooksInitPhaseCompleted) {\n                const preOrderCheckHooks = tView.preOrderCheckHooks;\n                if (preOrderCheckHooks !== null) {\n                    executeCheckHooks(lView, preOrderCheckHooks, null);\n                }\n            }\n            else {\n                const preOrderHooks = tView.preOrderHooks;\n                if (preOrderHooks !== null) {\n                    executeInitAndCheckHooks(lView, preOrderHooks, 0 /* InitPhaseState.OnInitHooksToBeRun */, null);\n                }\n                incrementInitPhaseFlags(lView, 0 /* InitPhaseState.OnInitHooksToBeRun */);\n            }\n        }\n        // We do not need to mark transplanted views for refresh when doing exhaustive checks\n        // because all views will be reached anyways during the traversal.\n        if (!isInExhaustiveCheckNoChangesPass) {\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        }\n        runEffectsInView(lView);\n        detectChangesInEmbeddedViews(lView, 0 /* ChangeDetectionMode.Global */);\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 (!isInCheckNoChangesPass) {\n            if (hooksInitPhaseCompleted) {\n                const contentCheckHooks = tView.contentCheckHooks;\n                if (contentCheckHooks !== null) {\n                    executeCheckHooks(lView, contentCheckHooks);\n                }\n            }\n            else {\n                const contentHooks = tView.contentHooks;\n                if (contentHooks !== null) {\n                    executeInitAndCheckHooks(lView, contentHooks, 1 /* InitPhaseState.AfterContentInitHooksToBeRun */);\n                }\n                incrementInitPhaseFlags(lView, 1 /* InitPhaseState.AfterContentInitHooksToBeRun */);\n            }\n        }\n        processHostBindingOpCodes(tView, lView);\n        // Refresh child component views.\n        const components = tView.components;\n        if (components !== null) {\n            detectChangesInChildComponents(lView, components, 0 /* ChangeDetectionMode.Global */);\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        const viewQuery = tView.viewQuery;\n        if (viewQuery !== null) {\n            executeViewQueryFn(2 /* RenderFlags.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 (!isInCheckNoChangesPass) {\n            if (hooksInitPhaseCompleted) {\n                const viewCheckHooks = tView.viewCheckHooks;\n                if (viewCheckHooks !== null) {\n                    executeCheckHooks(lView, viewCheckHooks);\n                }\n            }\n            else {\n                const viewHooks = tView.viewHooks;\n                if (viewHooks !== null) {\n                    executeInitAndCheckHooks(lView, viewHooks, 2 /* InitPhaseState.AfterViewInitHooksToBeRun */);\n                }\n                incrementInitPhaseFlags(lView, 2 /* InitPhaseState.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        // Schedule any effects that are waiting on the update pass of this view.\n        if (lView[EFFECTS_TO_SCHEDULE]) {\n            for (const notifyEffect of lView[EFFECTS_TO_SCHEDULE]) {\n                notifyEffect();\n            }\n            // Once they've been run, we can drop the array.\n            lView[EFFECTS_TO_SCHEDULE] = null;\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 (!isInCheckNoChangesPass) {\n            lView[FLAGS] &= ~(64 /* LViewFlags.Dirty */ | 8 /* LViewFlags.FirstLViewPass */);\n        }\n    }\n    catch (e) {\n        if (!isInCheckNoChangesPass) {\n            // If refreshing a view causes an error, we need to remark the ancestors as needing traversal\n            // because the error might have caused a situation where views below the current location are\n            // dirty but will be unreachable because the \"has dirty children\" flag in the ancestors has been\n            // cleared during change detection and we failed to run to completion.\n            markAncestorsForTraversal(lView);\n        }\n        throw e;\n    }\n    finally {\n        if (currentConsumer !== null) {\n            consumerAfterComputation$1(currentConsumer, prevConsumer);\n            if (returnConsumerToPool) {\n                maybeReturnReactiveLViewConsumer(currentConsumer);\n            }\n        }\n        leaveView();\n    }\n}\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\nfunction detectChangesInEmbeddedViews(lView, mode) {\n    for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n        for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n            const embeddedLView = lContainer[i];\n            detectChangesInViewIfAttached(embeddedLView, mode);\n        }\n    }\n}\n/**\n * Mark transplanted views as needing to be refreshed at their attachment points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\nfunction markTransplantedViewsForRefresh(lView) {\n    for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n        if (!(lContainer[FLAGS] & LContainerFlags.HasTransplantedViews))\n            continue;\n        const movedViews = lContainer[MOVED_VIEWS];\n        ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n        for (let i = 0; i < movedViews.length; i++) {\n            const movedLView = movedViews[i];\n            markViewForRefresh(movedLView);\n        }\n    }\n}\n/**\n * Detects changes in a component by entering the component view and processing its bindings,\n * queries, etc. if it is CheckAlways, OnPush and Dirty, etc.\n *\n * @param componentHostIdx  Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nfunction detectChangesInComponent(hostLView, componentHostIdx, mode) {\n    ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n    const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n    detectChangesInViewIfAttached(componentView, mode);\n}\n/**\n * Visits a view as part of change detection traversal.\n *\n * If the view is detached, no additional traversal happens.\n */\nfunction detectChangesInViewIfAttached(lView, mode) {\n    if (!viewAttachedToChangeDetector(lView)) {\n        return;\n    }\n    detectChangesInView(lView, mode);\n}\n/**\n * Visits a view as part of change detection traversal.\n *\n * The view is refreshed if:\n * - If the view is CheckAlways or Dirty and ChangeDetectionMode is `Global`\n * - If the view has the `RefreshView` flag\n *\n * The view is not refreshed, but descendants are traversed in `ChangeDetectionMode.Targeted` if the\n * view HasChildViewsToRefresh flag is set.\n */\nfunction detectChangesInView(lView, mode) {\n    const isInCheckNoChangesPass = ngDevMode && isInCheckNoChangesMode();\n    const tView = lView[TVIEW];\n    const flags = lView[FLAGS];\n    const consumer = lView[REACTIVE_TEMPLATE_CONSUMER];\n    // Refresh CheckAlways views in Global mode.\n    let shouldRefreshView = !!(mode === 0 /* ChangeDetectionMode.Global */ && flags & 16 /* LViewFlags.CheckAlways */);\n    // Refresh Dirty views in Global mode, as long as we're not in checkNoChanges.\n    // CheckNoChanges never worked with `OnPush` components because the `Dirty` flag was\n    // cleared before checkNoChanges ran. Because there is now a loop for to check for\n    // backwards views, it gives an opportunity for `OnPush` components to be marked `Dirty`\n    // before the CheckNoChanges pass. We don't want existing errors that are hidden by the\n    // current CheckNoChanges bug to surface when making unrelated changes.\n    shouldRefreshView ||= !!(flags & 64 /* LViewFlags.Dirty */ &&\n        mode === 0 /* ChangeDetectionMode.Global */ &&\n        !isInCheckNoChangesPass);\n    // Always refresh views marked for refresh, regardless of mode.\n    shouldRefreshView ||= !!(flags & 1024 /* LViewFlags.RefreshView */);\n    // Refresh views when they have a dirty reactive consumer, regardless of mode.\n    shouldRefreshView ||= !!(consumer?.dirty && consumerPollProducersForChange$1(consumer));\n    shouldRefreshView ||= !!(ngDevMode && isExhaustiveCheckNoChanges());\n    // Mark the Flags and `ReactiveNode` as not dirty before refreshing the component, so that they\n    // can be re-dirtied during the refresh process.\n    if (consumer) {\n        consumer.dirty = false;\n    }\n    lView[FLAGS] &= ~(8192 /* LViewFlags.HasChildViewsToRefresh */ | 1024 /* LViewFlags.RefreshView */);\n    if (shouldRefreshView) {\n        refreshView(tView, lView, tView.template, lView[CONTEXT]);\n    }\n    else if (flags & 8192 /* LViewFlags.HasChildViewsToRefresh */) {\n        runEffectsInView(lView);\n        detectChangesInEmbeddedViews(lView, 1 /* ChangeDetectionMode.Targeted */);\n        const components = tView.components;\n        if (components !== null) {\n            detectChangesInChildComponents(lView, components, 1 /* ChangeDetectionMode.Targeted */);\n        }\n    }\n}\n/** Refreshes child components in the current view (update mode). */\nfunction detectChangesInChildComponents(hostLView, components, mode) {\n    for (let i = 0; i < components.length; i++) {\n        detectChangesInComponent(hostLView, components[i], mode);\n    }\n}\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, source) {\n    const dirtyBitsToUse = isRefreshingViews()\n        ? // When we are actively refreshing views, we only use the `Dirty` bit to mark a view\n            64 /* LViewFlags.Dirty */\n        : // When we are not actively refreshing a view tree, it is absolutely\n            // valid to update state and mark views dirty. We use the `RefreshView` flag in this\n            // case to allow synchronously rerunning change detection. This applies today to\n            // afterRender hooks as well as animation listeners which execute after detecting\n            // changes in a view when the render factory flushes.\n            1024 /* LViewFlags.RefreshView */ | 64 /* LViewFlags.Dirty */;\n    lView[ENVIRONMENT].changeDetectionScheduler?.notify(source);\n    while (lView) {\n        lView[FLAGS] |= dirtyBitsToUse;\n        const parent = 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) {\n            return lView;\n        }\n        // continue otherwise\n        lView = parent;\n    }\n    return null;\n}\n\nclass ViewRef$1 {\n    _lView;\n    _cdRefInjectingView;\n    notifyErrorHandler;\n    _appRef = null;\n    _attachedToViewContainer = false;\n    get rootNodes() {\n        const lView = this._lView;\n        const tView = lView[TVIEW];\n        return collectNativeNodes(tView, lView, tView.firstChild, []);\n    }\n    constructor(\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, notifyErrorHandler = true) {\n        this._lView = _lView;\n        this._cdRefInjectingView = _cdRefInjectingView;\n        this.notifyErrorHandler = notifyErrorHandler;\n    }\n    get context() {\n        return this._lView[CONTEXT];\n    }\n    /**\n     * Reports whether the given view is considered dirty according to the different marking mechanisms.\n     */\n    get dirty() {\n        return (!!(this._lView[FLAGS] &\n            (64 /* LViewFlags.Dirty */ | 1024 /* LViewFlags.RefreshView */ | 8192 /* LViewFlags.HasChildViewsToRefresh */)) || !!this._lView[REACTIVE_TEMPLATE_CONSUMER]?.dirty);\n    }\n    /**\n     * @deprecated Replacing the full context object is not supported. Modify the context\n     *   directly, or consider using a `Proxy` if you need to replace the full object.\n     * // TODO(devversion): Remove this.\n     */\n    set context(value) {\n        if (ngDevMode) {\n            // Note: We have a warning message here because the `@deprecated` JSDoc will not be picked\n            // up for assignments on the setter. We want to let users know about the deprecated usage.\n            console.warn('Angular: Replacing the `context` object of an `EmbeddedViewRef` is deprecated.');\n        }\n        this._lView[CONTEXT] = value;\n    }\n    get destroyed() {\n        return (this._lView[FLAGS] & 256 /* LViewFlags.Destroyed */) === 256 /* LViewFlags.Destroyed */;\n    }\n    destroy() {\n        if (this._appRef) {\n            this._appRef.detachView(this);\n        }\n        else if (this._attachedToViewContainer) {\n            const parent = this._lView[PARENT];\n            if (isLContainer(parent)) {\n                const viewRefs = parent[VIEW_REFS];\n                const index = viewRefs ? viewRefs.indexOf(this) : -1;\n                if (index > -1) {\n                    ngDevMode &&\n                        assertEqual(index, parent.indexOf(this._lView) - CONTAINER_HEADER_OFFSET, 'An attached view should be in the same position within its container as its ViewRef in the VIEW_REFS array.');\n                    detachView(parent, index);\n                    removeFromArray(viewRefs, index);\n                }\n            }\n            this._attachedToViewContainer = false;\n        }\n        destroyLView(this._lView[TVIEW], this._lView);\n    }\n    onDestroy(callback) {\n        storeLViewOnDestroy(this._lView, callback);\n    }\n    /**\n     * Marks a view and all of its ancestors dirty.\n     *\n     * This can be used to ensure an {@link ChangeDetectionStrategy#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     * ```ts\n     * @Component({\n     *   selector: 'app-root',\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    markForCheck() {\n        markViewDirty(this._cdRefInjectingView || this._lView, 4 /* NotificationSource.MarkForCheck */);\n    }\n    markForRefresh() {\n        markViewForRefresh(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} 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     * ```ts\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    detach() {\n        this._lView[FLAGS] &= ~128 /* LViewFlags.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}. 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     * ```ts\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: 'app-root',\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    reattach() {\n        updateAncestorTraversalFlagsOnAttach(this._lView);\n        this._lView[FLAGS] |= 128 /* LViewFlags.Attached */;\n    }\n    /**\n     * Checks the view and its children.\n     *\n     * This can also be used in combination with {@link ChangeDetectorRef#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} for more information.\n     */\n    detectChanges() {\n        // Add `RefreshView` flag to ensure this view is refreshed if not already dirty.\n        // `RefreshView` flag is used intentionally over `Dirty` because it gets cleared before\n        // executing any of the actual refresh code while the `Dirty` flag doesn't get cleared\n        // until the end of the refresh. Using `RefreshView` prevents creating a potential difference\n        // in the state of the LViewFlags during template execution.\n        this._lView[FLAGS] |= 1024 /* LViewFlags.RefreshView */;\n        detectChangesInternal(this._lView, this.notifyErrorHandler);\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    checkNoChanges() {\n        if (ngDevMode) {\n            checkNoChangesInternal(this._lView, CheckNoChangesMode.OnlyDirtyViews, this.notifyErrorHandler);\n        }\n    }\n    attachToViewContainerRef() {\n        if (this._appRef) {\n            throw new RuntimeError(902 /* RuntimeErrorCode.VIEW_ALREADY_ATTACHED */, ngDevMode && 'This view is already attached directly to the ApplicationRef!');\n        }\n        this._attachedToViewContainer = true;\n    }\n    detachFromAppRef() {\n        this._appRef = null;\n        const isRoot = isRootView(this._lView);\n        const declarationContainer = this._lView[DECLARATION_LCONTAINER];\n        if (declarationContainer !== null && !isRoot) {\n            detachMovedView(declarationContainer, this._lView);\n        }\n        detachViewFromDOM(this._lView[TVIEW], this._lView);\n    }\n    attachToAppRef(appRef) {\n        if (this._attachedToViewContainer) {\n            throw new RuntimeError(902 /* RuntimeErrorCode.VIEW_ALREADY_ATTACHED */, ngDevMode && 'This view is already attached to a ViewContainer!');\n        }\n        this._appRef = appRef;\n        const isRoot = isRootView(this._lView);\n        const declarationContainer = this._lView[DECLARATION_LCONTAINER];\n        if (declarationContainer !== null && !isRoot) {\n            trackMovedView(declarationContainer, this._lView);\n        }\n        updateAncestorTraversalFlagsOnAttach(this._lView);\n    }\n}\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 {@link ViewContainerRef}\n *\n * @publicApi\n */\nclass TemplateRef {\n    /**\n     * @internal\n     * @nocollapse\n     */\n    static __NG_ELEMENT_ID__ = injectTemplateRef;\n}\nconst ViewEngineTemplateRef = TemplateRef;\n// TODO(alxhub): combine interface and implementation. Currently this is challenging since something\n// in g3 depends on them being separate.\nconst R3TemplateRef = class TemplateRef extends ViewEngineTemplateRef {\n    _declarationLView;\n    _declarationTContainer;\n    elementRef;\n    constructor(_declarationLView, _declarationTContainer, elementRef) {\n        super();\n        this._declarationLView = _declarationLView;\n        this._declarationTContainer = _declarationTContainer;\n        this.elementRef = elementRef;\n    }\n    /**\n     * Returns an `ssrId` associated with a TView, which was used to\n     * create this instance of the `TemplateRef`.\n     *\n     * @internal\n     */\n    get ssrId() {\n        return this._declarationTContainer.tView?.ssrId || null;\n    }\n    createEmbeddedView(context, injector) {\n        return this.createEmbeddedViewImpl(context, injector);\n    }\n    /**\n     * @internal\n     */\n    createEmbeddedViewImpl(context, injector, dehydratedView) {\n        const embeddedLView = createAndRenderEmbeddedLView(this._declarationLView, this._declarationTContainer, context, { embeddedViewInjector: injector, dehydratedView });\n        return new ViewRef$1(embeddedLView);\n    }\n};\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nfunction injectTemplateRef() {\n    return createTemplateRef(getCurrentTNode(), getLView());\n}\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostLView The `LView` 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(hostTNode, hostLView) {\n    if (hostTNode.type & 4 /* TNodeType.Container */) {\n        ngDevMode && assertDefined(hostTNode.tView, 'TView must be allocated');\n        return new R3TemplateRef(hostLView, hostTNode, createElementRef(hostTNode, hostLView));\n    }\n    return null;\n}\n\nconst AT_THIS_LOCATION = '<-- AT THIS LOCATION';\n/**\n * Retrieves a user friendly string for a given TNodeType for use in\n * friendly error messages\n *\n * @param tNodeType\n * @returns\n */\nfunction getFriendlyStringFromTNodeType(tNodeType) {\n    switch (tNodeType) {\n        case 4 /* TNodeType.Container */:\n            return 'view container';\n        case 2 /* TNodeType.Element */:\n            return 'element';\n        case 8 /* TNodeType.ElementContainer */:\n            return 'ng-container';\n        case 32 /* TNodeType.Icu */:\n            return 'icu';\n        case 64 /* TNodeType.Placeholder */:\n            return 'i18n';\n        case 16 /* TNodeType.Projection */:\n            return 'projection';\n        case 1 /* TNodeType.Text */:\n            return 'text';\n        case 128 /* TNodeType.LetDeclaration */:\n            return '@let';\n        default:\n            // This should not happen as we cover all possible TNode types above.\n            return '<unknown>';\n    }\n}\n/**\n * Validates that provided nodes match during the hydration process.\n */\nfunction validateMatchingNode(node, nodeType, tagName, lView, tNode, isViewContainerAnchor = false) {\n    if (!node ||\n        node.nodeType !== nodeType ||\n        (node.nodeType === Node.ELEMENT_NODE &&\n            node.tagName.toLowerCase() !== tagName?.toLowerCase())) {\n        const expectedNode = shortRNodeDescription(nodeType, tagName, null);\n        let header = `During hydration Angular expected ${expectedNode} but `;\n        const hostComponentDef = getDeclarationComponentDef(lView);\n        const componentClassName = hostComponentDef?.type?.name;\n        const expectedDom = describeExpectedDom(lView, tNode, isViewContainerAnchor);\n        const expected = `Angular expected this DOM:\\n\\n${expectedDom}\\n\\n`;\n        let actual = '';\n        const componentHostElement = unwrapRNode(lView[HOST]);\n        if (!node) {\n            // No node found during hydration.\n            header += `the node was not found.\\n\\n`;\n            // Since the node is missing, we use the closest node to attach the error to\n            markRNodeAsHavingHydrationMismatch(componentHostElement, expectedDom);\n        }\n        else {\n            const actualNode = shortRNodeDescription(node.nodeType, node.tagName ?? null, node.textContent ?? null);\n            header += `found ${actualNode}.\\n\\n`;\n            const actualDom = describeDomFromNode(node);\n            actual = `Actual DOM is:\\n\\n${actualDom}\\n\\n`;\n            // DevTools only report hydration issues on the component level, so we attach extra debug\n            // info to a component host element to make it available to DevTools.\n            markRNodeAsHavingHydrationMismatch(componentHostElement, expectedDom, actualDom);\n        }\n        const footer = getHydrationErrorFooter(componentClassName);\n        const message = header + expected + actual + getHydrationAttributeNote() + footer;\n        throw new RuntimeError(-500 /* RuntimeErrorCode.HYDRATION_NODE_MISMATCH */, message);\n    }\n}\n/**\n * Validates that a given node has sibling nodes\n */\nfunction validateSiblingNodeExists(node) {\n    validateNodeExists(node);\n    if (!node.nextSibling) {\n        const header = 'During hydration Angular expected more sibling nodes to be present.\\n\\n';\n        const actual = `Actual DOM is:\\n\\n${describeDomFromNode(node)}\\n\\n`;\n        const footer = getHydrationErrorFooter();\n        const message = header + actual + footer;\n        markRNodeAsHavingHydrationMismatch(node, '', actual);\n        throw new RuntimeError(-501 /* RuntimeErrorCode.HYDRATION_MISSING_SIBLINGS */, message);\n    }\n}\n/**\n * Validates that a node exists or throws\n */\nfunction validateNodeExists(node, lView = null, tNode = null) {\n    if (!node) {\n        const header = 'During hydration, Angular expected an element to be present at this location.\\n\\n';\n        let expected = '';\n        let footer = '';\n        if (lView !== null && tNode !== null) {\n            expected = describeExpectedDom(lView, tNode, false);\n            footer = getHydrationErrorFooter();\n            // Since the node is missing, we use the closest node to attach the error to\n            markRNodeAsHavingHydrationMismatch(unwrapRNode(lView[HOST]), expected, '');\n        }\n        throw new RuntimeError(-502 /* RuntimeErrorCode.HYDRATION_MISSING_NODE */, `${header}${expected}\\n\\n${footer}`);\n    }\n}\n/**\n * Builds the hydration error message when a node is not found\n *\n * @param lView the LView where the node exists\n * @param tNode the TNode\n */\nfunction nodeNotFoundError(lView, tNode) {\n    const header = 'During serialization, Angular was unable to find an element in the DOM:\\n\\n';\n    const expected = `${describeExpectedDom(lView, tNode, false)}\\n\\n`;\n    const footer = getHydrationErrorFooter();\n    throw new RuntimeError(-502 /* RuntimeErrorCode.HYDRATION_MISSING_NODE */, header + expected + footer);\n}\n/**\n * Builds a hydration error message when a node is not found at a path location\n *\n * @param host the Host Node\n * @param path the path to the node\n */\nfunction nodeNotFoundAtPathError(host, path) {\n    const header = `During hydration Angular was unable to locate a node ` +\n        `using the \"${path}\" path, starting from the ${describeRNode(host)} node.\\n\\n`;\n    const footer = getHydrationErrorFooter();\n    markRNodeAsHavingHydrationMismatch(host);\n    throw new RuntimeError(-502 /* RuntimeErrorCode.HYDRATION_MISSING_NODE */, header + footer);\n}\n/**\n * Builds the hydration error message in the case that dom nodes are created outside of\n * the Angular context and are being used as projected nodes\n *\n * @param lView the LView\n * @param tNode the TNode\n * @returns an error\n */\nfunction unsupportedProjectionOfDomNodes(rNode) {\n    const header = 'During serialization, Angular detected DOM nodes ' +\n        'that were created outside of Angular context and provided as projectable nodes ' +\n        '(likely via `ViewContainerRef.createComponent` or `createComponent` APIs). ' +\n        'Hydration is not supported for such cases, consider refactoring the code to avoid ' +\n        'this pattern or using `ngSkipHydration` on the host element of the component.\\n\\n';\n    const actual = `${describeDomFromNode(rNode)}\\n\\n`;\n    const message = header + actual + getHydrationAttributeNote();\n    return new RuntimeError(-503 /* RuntimeErrorCode.UNSUPPORTED_PROJECTION_DOM_NODES */, message);\n}\n/**\n * Builds the hydration error message in the case that ngSkipHydration was used on a\n * node that is not a component host element or host binding\n *\n * @param rNode the HTML Element\n * @returns an error\n */\nfunction invalidSkipHydrationHost(rNode) {\n    const header = 'The `ngSkipHydration` flag is applied on a node ' +\n        \"that doesn't act as a component host. Hydration can be \" +\n        'skipped only on per-component basis.\\n\\n';\n    const actual = `${describeDomFromNode(rNode)}\\n\\n`;\n    const footer = 'Please move the `ngSkipHydration` attribute to the component host element.\\n\\n';\n    const message = header + actual + footer;\n    return new RuntimeError(-504 /* RuntimeErrorCode.INVALID_SKIP_HYDRATION_HOST */, message);\n}\n// Stringification methods\n/**\n * Stringifies a given TNode's attributes\n *\n * @param tNode a provided TNode\n * @returns string\n */\nfunction stringifyTNodeAttrs(tNode) {\n    const results = [];\n    if (tNode.attrs) {\n        for (let i = 0; i < tNode.attrs.length;) {\n            const attrName = tNode.attrs[i++];\n            // Once we reach the first flag, we know that the list of\n            // attributes is over.\n            if (typeof attrName == 'number') {\n                break;\n            }\n            const attrValue = tNode.attrs[i++];\n            results.push(`${attrName}=\"${shorten(attrValue)}\"`);\n        }\n    }\n    return results.join(' ');\n}\n/**\n * The list of internal attributes that should be filtered out while\n * producing an error message.\n */\nconst internalAttrs = new Set(['ngh', 'ng-version', 'ng-server-context']);\n/**\n * Stringifies an HTML Element's attributes\n *\n * @param rNode an HTML Element\n * @returns string\n */\nfunction stringifyRNodeAttrs(rNode) {\n    const results = [];\n    for (let i = 0; i < rNode.attributes.length; i++) {\n        const attr = rNode.attributes[i];\n        if (internalAttrs.has(attr.name))\n            continue;\n        results.push(`${attr.name}=\"${shorten(attr.value)}\"`);\n    }\n    return results.join(' ');\n}\n// Methods for Describing the DOM\n/**\n * Converts a tNode to a helpful readable string value for use in error messages\n *\n * @param tNode a given TNode\n * @param innerContent the content of the node\n * @returns string\n */\nfunction describeTNode(tNode, innerContent = '…') {\n    switch (tNode.type) {\n        case 1 /* TNodeType.Text */:\n            const content = tNode.value ? `(${tNode.value})` : '';\n            return `#text${content}`;\n        case 2 /* TNodeType.Element */:\n            const attrs = stringifyTNodeAttrs(tNode);\n            const tag = tNode.value.toLowerCase();\n            return `<${tag}${attrs ? ' ' + attrs : ''}>${innerContent}</${tag}>`;\n        case 8 /* TNodeType.ElementContainer */:\n            return '<!-- ng-container -->';\n        case 4 /* TNodeType.Container */:\n            return '<!-- container -->';\n        default:\n            const typeAsString = getFriendlyStringFromTNodeType(tNode.type);\n            return `#node(${typeAsString})`;\n    }\n}\n/**\n * Converts an RNode to a helpful readable string value for use in error messages\n *\n * @param rNode a given RNode\n * @param innerContent the content of the node\n * @returns string\n */\nfunction describeRNode(rNode, innerContent = '…') {\n    const node = rNode;\n    switch (node.nodeType) {\n        case Node.ELEMENT_NODE:\n            const tag = node.tagName.toLowerCase();\n            const attrs = stringifyRNodeAttrs(node);\n            return `<${tag}${attrs ? ' ' + attrs : ''}>${innerContent}</${tag}>`;\n        case Node.TEXT_NODE:\n            const content = node.textContent ? shorten(node.textContent) : '';\n            return `#text${content ? `(${content})` : ''}`;\n        case Node.COMMENT_NODE:\n            return `<!-- ${shorten(node.textContent ?? '')} -->`;\n        default:\n            return `#node(${node.nodeType})`;\n    }\n}\n/**\n * Builds the string containing the expected DOM present given the LView and TNode\n * values for a readable error message\n *\n * @param lView the lView containing the DOM\n * @param tNode the tNode\n * @param isViewContainerAnchor boolean\n * @returns string\n */\nfunction describeExpectedDom(lView, tNode, isViewContainerAnchor) {\n    const spacer = '  ';\n    let content = '';\n    if (tNode.prev) {\n        content += spacer + '…\\n';\n        content += spacer + describeTNode(tNode.prev) + '\\n';\n    }\n    else if (tNode.type && tNode.type & 12 /* TNodeType.AnyContainer */) {\n        content += spacer + '…\\n';\n    }\n    if (isViewContainerAnchor) {\n        content += spacer + describeTNode(tNode) + '\\n';\n        content += spacer + `<!-- container -->  ${AT_THIS_LOCATION}\\n`;\n    }\n    else {\n        content += spacer + describeTNode(tNode) + `  ${AT_THIS_LOCATION}\\n`;\n    }\n    content += spacer + '…\\n';\n    const parentRNode = tNode.type ? getParentRElement(lView[TVIEW], tNode, lView) : null;\n    if (parentRNode) {\n        content = describeRNode(parentRNode, '\\n' + content);\n    }\n    return content;\n}\n/**\n * Builds the string containing the DOM present around a given RNode for a\n * readable error message\n *\n * @param node the RNode\n * @returns string\n */\nfunction describeDomFromNode(node) {\n    const spacer = '  ';\n    let content = '';\n    const currentNode = node;\n    if (currentNode.previousSibling) {\n        content += spacer + '…\\n';\n        content += spacer + describeRNode(currentNode.previousSibling) + '\\n';\n    }\n    content += spacer + describeRNode(currentNode) + `  ${AT_THIS_LOCATION}\\n`;\n    if (node.nextSibling) {\n        content += spacer + '…\\n';\n    }\n    if (node.parentNode) {\n        content = describeRNode(currentNode.parentNode, '\\n' + content);\n    }\n    return content;\n}\n/**\n * Shortens the description of a given RNode by its type for readability\n *\n * @param nodeType the type of node\n * @param tagName the node tag name\n * @param textContent the text content in the node\n * @returns string\n */\nfunction shortRNodeDescription(nodeType, tagName, textContent) {\n    switch (nodeType) {\n        case Node.ELEMENT_NODE:\n            return `<${tagName.toLowerCase()}>`;\n        case Node.TEXT_NODE:\n            const content = textContent ? ` (with the \"${shorten(textContent)}\" content)` : '';\n            return `a text node${content}`;\n        case Node.COMMENT_NODE:\n            return 'a comment node';\n        default:\n            return `#node(nodeType=${nodeType})`;\n    }\n}\n/**\n * Builds the footer hydration error message\n *\n * @param componentClassName the name of the component class\n * @returns string\n */\nfunction getHydrationErrorFooter(componentClassName) {\n    const componentInfo = componentClassName ? `the \"${componentClassName}\"` : 'corresponding';\n    return (`To fix this problem:\\n` +\n        `  * check ${componentInfo} component for hydration-related issues\\n` +\n        `  * check to see if your template has valid HTML structure\\n` +\n        `  * or skip hydration by adding the \\`ngSkipHydration\\` attribute ` +\n        `to its host node in a template\\n\\n`);\n}\n/**\n * An attribute related note for hydration errors\n */\nfunction getHydrationAttributeNote() {\n    return ('Note: attributes are only displayed to better represent the DOM' +\n        ' but have no effect on hydration mismatches.\\n\\n');\n}\n// Node string utility functions\n/**\n * Strips all newlines out of a given string\n *\n * @param input a string to be cleared of new line characters\n * @returns\n */\nfunction stripNewlines(input) {\n    return input.replace(/\\s+/gm, '');\n}\n/**\n * Reduces a string down to a maximum length of characters with ellipsis for readability\n *\n * @param input a string input\n * @param maxLength a maximum length in characters\n * @returns string\n */\nfunction shorten(input, maxLength = 50) {\n    if (!input) {\n        return '';\n    }\n    input = stripNewlines(input);\n    return input.length > maxLength ? `${input.substring(0, maxLength - 1)}…` : input;\n}\n\n/**\n * Find a node in front of which `currentTNode` should be inserted (takes i18n into account).\n *\n * This method determines the `RNode` in front of which we should insert the `currentRNode`. This\n * takes `TNode.insertBeforeIndex` into account.\n *\n * @param parentTNode parent `TNode`\n * @param currentTNode current `TNode` (The node which we would like to insert into the DOM)\n * @param lView current `LView`\n */\nfunction getInsertInFrontOfRNodeWithI18n(parentTNode, currentTNode, lView) {\n    const tNodeInsertBeforeIndex = currentTNode.insertBeforeIndex;\n    const insertBeforeIndex = Array.isArray(tNodeInsertBeforeIndex)\n        ? tNodeInsertBeforeIndex[0]\n        : tNodeInsertBeforeIndex;\n    if (insertBeforeIndex === null) {\n        return getInsertInFrontOfRNodeWithNoI18n(parentTNode, currentTNode, lView);\n    }\n    else {\n        ngDevMode && assertIndexInRange(lView, insertBeforeIndex);\n        return unwrapRNode(lView[insertBeforeIndex]);\n    }\n}\n/**\n * Process `TNode.insertBeforeIndex` by adding i18n text nodes.\n *\n * See `TNode.insertBeforeIndex`\n */\nfunction processI18nInsertBefore(renderer, childTNode, lView, childRNode, parentRElement) {\n    const tNodeInsertBeforeIndex = childTNode.insertBeforeIndex;\n    if (Array.isArray(tNodeInsertBeforeIndex)) {\n        // An array indicates that there are i18n nodes that need to be added as children of this\n        // `childRNode`. These i18n nodes were created before this `childRNode` was available and so\n        // only now can be added. The first element of the array is the normal index where we should\n        // insert the `childRNode`. Additional elements are the extra nodes to be added as children of\n        // `childRNode`.\n        ngDevMode && assertDomNode(childRNode);\n        let i18nParent = childRNode;\n        let anchorRNode = null;\n        if (!(childTNode.type & 3 /* TNodeType.AnyRNode */)) {\n            anchorRNode = i18nParent;\n            i18nParent = parentRElement;\n        }\n        if (i18nParent !== null && childTNode.componentOffset === -1) {\n            for (let i = 1; i < tNodeInsertBeforeIndex.length; i++) {\n                // No need to `unwrapRNode` because all of the indexes point to i18n text nodes.\n                // see `assertDomNode` below.\n                const i18nChild = lView[tNodeInsertBeforeIndex[i]];\n                nativeInsertBefore(renderer, i18nParent, i18nChild, anchorRNode, false);\n            }\n        }\n    }\n}\n\n/**\n * Add `tNode` to `previousTNodes` list and update relevant `TNode`s in `previousTNodes` list\n * `tNode.insertBeforeIndex`.\n *\n * Things to keep in mind:\n * 1. All i18n text nodes are encoded as `TNodeType.Element` and are created eagerly by the\n *    `ɵɵi18nStart` instruction.\n * 2. All `TNodeType.Placeholder` `TNodes` are elements which will be created later by\n *    `ɵɵelementStart` instruction.\n * 3. `ɵɵelementStart` instruction will create `TNode`s in the ascending `TNode.index` order. (So a\n *    smaller index `TNode` is guaranteed to be created before a larger one)\n *\n * We use the above three invariants to determine `TNode.insertBeforeIndex`.\n *\n * In an ideal world `TNode.insertBeforeIndex` would always be `TNode.next.index`. However,\n * this will not work because `TNode.next.index` may be larger than `TNode.index` which means that\n * the next node is not yet created and therefore we can't insert in front of it.\n *\n * Rule1: `TNode.insertBeforeIndex = null` if `TNode.next === null` (Initial condition, as we don't\n *        know if there will be further `TNode`s inserted after.)\n * Rule2: If `previousTNode` is created after the `tNode` being inserted, then\n *        `previousTNode.insertBeforeNode = tNode.index` (So when a new `tNode` is added we check\n *        previous to see if we can update its `insertBeforeTNode`)\n *\n * See `TNode.insertBeforeIndex` for more context.\n *\n * @param previousTNodes A list of previous TNodes so that we can easily traverse `TNode`s in\n *     reverse order. (If `TNode` would have `previous` this would not be necessary.)\n * @param newTNode A TNode to add to the `previousTNodes` list.\n */\nfunction addTNodeAndUpdateInsertBeforeIndex(previousTNodes, newTNode) {\n    // Start with Rule1\n    ngDevMode &&\n        assertEqual(newTNode.insertBeforeIndex, null, 'We expect that insertBeforeIndex is not set');\n    previousTNodes.push(newTNode);\n    if (previousTNodes.length > 1) {\n        for (let i = previousTNodes.length - 2; i >= 0; i--) {\n            const existingTNode = previousTNodes[i];\n            // Text nodes are created eagerly and so they don't need their `indexBeforeIndex` updated.\n            // It is safe to ignore them.\n            if (!isI18nText(existingTNode)) {\n                if (isNewTNodeCreatedBefore(existingTNode, newTNode) &&\n                    getInsertBeforeIndex(existingTNode) === null) {\n                    // If it was created before us in time, (and it does not yet have `insertBeforeIndex`)\n                    // then add the `insertBeforeIndex`.\n                    setInsertBeforeIndex(existingTNode, newTNode.index);\n                }\n            }\n        }\n    }\n}\nfunction isI18nText(tNode) {\n    return !(tNode.type & 64 /* TNodeType.Placeholder */);\n}\nfunction isNewTNodeCreatedBefore(existingTNode, newTNode) {\n    return isI18nText(newTNode) || existingTNode.index > newTNode.index;\n}\nfunction getInsertBeforeIndex(tNode) {\n    const index = tNode.insertBeforeIndex;\n    return Array.isArray(index) ? index[0] : index;\n}\nfunction setInsertBeforeIndex(tNode, value) {\n    const index = tNode.insertBeforeIndex;\n    if (Array.isArray(index)) {\n        // Array is stored if we have to insert child nodes. See `TNode.insertBeforeIndex`\n        index[0] = value;\n    }\n    else {\n        setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n        tNode.insertBeforeIndex = value;\n    }\n}\n\n/**\n * Retrieve `TIcu` at a given `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be read from.\n */\nfunction getTIcu(tView, index) {\n    const value = tView.data[index];\n    if (value === null || typeof value === 'string')\n        return null;\n    if (ngDevMode &&\n        !(value.hasOwnProperty('tView') || value.hasOwnProperty('currentCaseLViewIndex'))) {\n        throwError(\"We expect to get 'null'|'TIcu'|'TIcuContainer', but got: \" + value);\n    }\n    // Here the `value.hasOwnProperty('currentCaseLViewIndex')` is a polymorphic read as it can be\n    // either TIcu or TIcuContainerNode. This is not ideal, but we still think it is OK because it\n    // will be just two cases which fits into the browser inline cache (inline cache can take up to\n    // 4)\n    const tIcu = value.hasOwnProperty('currentCaseLViewIndex')\n        ? value\n        : value.value;\n    ngDevMode && assertTIcu(tIcu);\n    return tIcu;\n}\n/**\n * Store `TIcu` at a give `index`.\n *\n * The `TIcu` can be stored either directly (if it is nested ICU) OR\n * it is stored inside tho `TIcuContainer` if it is top level ICU.\n *\n * The reason for this is that the top level ICU need a `TNode` so that they are part of the render\n * tree, but nested ICU's have no TNode, because we don't know ahead of time if the nested ICU is\n * expressed (parent ICU may have selected a case which does not contain it.)\n *\n * @param tView Current `TView`.\n * @param index Index where the value should be stored at in `Tview.data`\n * @param tIcu The TIcu to store.\n */\nfunction setTIcu(tView, index, tIcu) {\n    const tNode = tView.data[index];\n    ngDevMode &&\n        assertEqual(tNode === null || tNode.hasOwnProperty('tView'), true, \"We expect to get 'null'|'TIcuContainer'\");\n    if (tNode === null) {\n        tView.data[index] = tIcu;\n    }\n    else {\n        ngDevMode && assertTNodeType(tNode, 32 /* TNodeType.Icu */);\n        tNode.value = tIcu;\n    }\n}\n/**\n * Set `TNode.insertBeforeIndex` taking the `Array` into account.\n *\n * See `TNode.insertBeforeIndex`\n */\nfunction setTNodeInsertBeforeIndex(tNode, index) {\n    ngDevMode && assertTNode(tNode);\n    let insertBeforeIndex = tNode.insertBeforeIndex;\n    if (insertBeforeIndex === null) {\n        setI18nHandling(getInsertInFrontOfRNodeWithI18n, processI18nInsertBefore);\n        insertBeforeIndex = tNode.insertBeforeIndex = [\n            null /* may be updated to number later */,\n            index,\n        ];\n    }\n    else {\n        assertEqual(Array.isArray(insertBeforeIndex), true, 'Expecting array here');\n        insertBeforeIndex.push(index);\n    }\n}\n/**\n * Create `TNode.type=TNodeType.Placeholder` node.\n *\n * See `TNodeType.Placeholder` for more information.\n */\nfunction createTNodePlaceholder(tView, previousTNodes, index) {\n    const tNode = createTNodeAtIndex(tView, index, 64 /* TNodeType.Placeholder */, null, null);\n    addTNodeAndUpdateInsertBeforeIndex(previousTNodes, tNode);\n    return tNode;\n}\n/**\n * Returns current ICU case.\n *\n * ICU cases are stored as index into the `TIcu.cases`.\n * At times it is necessary to communicate that the ICU case just switched and that next ICU update\n * should update all bindings regardless of the mask. In such a case the we store negative numbers\n * for cases which have just been switched. This function removes the negative flag.\n */\nfunction getCurrentICUCaseIndex(tIcu, lView) {\n    const currentCase = lView[tIcu.currentCaseLViewIndex];\n    return currentCase === null ? currentCase : currentCase < 0 ? ~currentCase : currentCase;\n}\nfunction getParentFromIcuCreateOpCode(mergedCode) {\n    return mergedCode >>> 17 /* IcuCreateOpCode.SHIFT_PARENT */;\n}\nfunction getRefFromIcuCreateOpCode(mergedCode) {\n    return (mergedCode & 131070 /* IcuCreateOpCode.MASK_REF */) >>> 1 /* IcuCreateOpCode.SHIFT_REF */;\n}\nfunction getInstructionFromIcuCreateOpCode(mergedCode) {\n    return mergedCode & 1 /* IcuCreateOpCode.MASK_INSTRUCTION */;\n}\nfunction icuCreateOpCode(opCode, parentIdx, refIdx) {\n    ngDevMode && assertGreaterThanOrEqual(parentIdx, 0, 'Missing parent index');\n    ngDevMode && assertGreaterThan(refIdx, 0, 'Missing ref index');\n    return (opCode | (parentIdx << 17 /* IcuCreateOpCode.SHIFT_PARENT */) | (refIdx << 1 /* IcuCreateOpCode.SHIFT_REF */));\n}\n// Returns whether the given value corresponds to a root template message,\n// or a sub-template.\nfunction isRootTemplateMessage(subTemplateIndex) {\n    return subTemplateIndex === -1;\n}\n\nfunction enterIcu(state, tIcu, lView) {\n    state.index = 0;\n    const currentCase = getCurrentICUCaseIndex(tIcu, lView);\n    if (currentCase !== null) {\n        ngDevMode && assertNumberInRange(currentCase, 0, tIcu.cases.length - 1);\n        state.removes = tIcu.remove[currentCase];\n    }\n    else {\n        state.removes = EMPTY_ARRAY;\n    }\n}\nfunction icuContainerIteratorNext(state) {\n    if (state.index < state.removes.length) {\n        const removeOpCode = state.removes[state.index++];\n        ngDevMode && assertNumber(removeOpCode, 'Expecting OpCode number');\n        if (removeOpCode > 0) {\n            const rNode = state.lView[removeOpCode];\n            ngDevMode && assertDomNode(rNode);\n            return rNode;\n        }\n        else {\n            state.stack.push(state.index, state.removes);\n            // ICUs are represented by negative indices\n            const tIcuIndex = ~removeOpCode;\n            const tIcu = state.lView[TVIEW].data[tIcuIndex];\n            ngDevMode && assertTIcu(tIcu);\n            enterIcu(state, tIcu, state.lView);\n            return icuContainerIteratorNext(state);\n        }\n    }\n    else {\n        if (state.stack.length === 0) {\n            return null;\n        }\n        else {\n            state.removes = state.stack.pop();\n            state.index = state.stack.pop();\n            return icuContainerIteratorNext(state);\n        }\n    }\n}\nfunction loadIcuContainerVisitor() {\n    const _state = {\n        stack: [],\n        index: -1,\n    };\n    /**\n     * Retrieves a set of root nodes from `TIcu.remove`. Used by `TNodeType.ICUContainer`\n     * to determine which root belong to the ICU.\n     *\n     * Example of usage.\n     * ```\n     * const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView);\n     * let rNode: RNode|null;\n     * while(rNode = nextRNode()) {\n     *   console.log(rNode);\n     * }\n     * ```\n     *\n     * @param tIcuContainerNode Current `TIcuContainerNode`\n     * @param lView `LView` where the `RNode`s should be looked up.\n     */\n    function icuContainerIteratorStart(tIcuContainerNode, lView) {\n        _state.lView = lView;\n        while (_state.stack.length)\n            _state.stack.pop();\n        ngDevMode && assertTNodeForLView(tIcuContainerNode, lView);\n        enterIcu(_state, tIcuContainerNode.value, lView);\n        return icuContainerIteratorNext.bind(null, _state);\n    }\n    return icuContainerIteratorStart;\n}\nfunction createIcuIterator(tIcu, lView) {\n    const state = {\n        stack: [],\n        index: -1,\n        lView,\n    };\n    ngDevMode && assertTIcu(tIcu);\n    enterIcu(state, tIcu, lView);\n    return icuContainerIteratorNext.bind(null, state);\n}\n\n/**\n * Regexp that extracts a reference node information from the compressed node location.\n * The reference node is represented as either:\n *  - a number which points to an LView slot\n *  - the `b` char which indicates that the lookup should start from the `document.body`\n *  - the `h` char to start lookup from the component host node (`lView[HOST]`)\n */\nconst REF_EXTRACTOR_REGEXP = new RegExp(`^(\\\\d+)*(${REFERENCE_NODE_BODY}|${REFERENCE_NODE_HOST})*(.*)`);\n/**\n * Helper function that takes a reference node location and a set of navigation steps\n * (from the reference node) to a target node and outputs a string that represents\n * a location.\n *\n * For example, given: referenceNode = 'b' (body) and path = ['firstChild', 'firstChild',\n * 'nextSibling'], the function returns: `bf2n`.\n */\nfunction compressNodeLocation(referenceNode, path) {\n    const result = [referenceNode];\n    for (const segment of path) {\n        const lastIdx = result.length - 1;\n        if (lastIdx > 0 && result[lastIdx - 1] === segment) {\n            // An empty string in a count slot represents 1 occurrence of an instruction.\n            const value = (result[lastIdx] || 1);\n            result[lastIdx] = value + 1;\n        }\n        else {\n            // Adding a new segment to the path.\n            // Using an empty string in a counter field to avoid encoding `1`s\n            // into the path, since they are implicit (e.g. `f1n1` vs `fn`), so\n            // it's enough to have a single char in this case.\n            result.push(segment, '');\n        }\n    }\n    return result.join('');\n}\n/**\n * Helper function that reverts the `compressNodeLocation` and transforms a given\n * string into an array where at 0th position there is a reference node info and\n * after that it contains information (in pairs) about a navigation step and the\n * number of repetitions.\n *\n * For example, the path like 'bf2n' will be transformed to:\n * ['b', 'firstChild', 2, 'nextSibling', 1].\n *\n * This information is later consumed by the code that navigates the DOM to find\n * a given node by its location.\n */\nfunction decompressNodeLocation(path) {\n    const matches = path.match(REF_EXTRACTOR_REGEXP);\n    const [_, refNodeId, refNodeName, rest] = matches;\n    // If a reference node is represented by an index, transform it to a number.\n    const ref = refNodeId ? parseInt(refNodeId, 10) : refNodeName;\n    const steps = [];\n    // Match all segments in a path.\n    for (const [_, step, count] of rest.matchAll(/(f|n)(\\d*)/g)) {\n        const repeat = parseInt(count, 10) || 1;\n        steps.push(step, repeat);\n    }\n    return [ref, ...steps];\n}\n\n/** Whether current TNode is a first node in an <ng-container>. */\nfunction isFirstElementInNgContainer(tNode) {\n    return !tNode.prev && tNode.parent?.type === 8 /* TNodeType.ElementContainer */;\n}\n/** Returns an instruction index (subtracting HEADER_OFFSET). */\nfunction getNoOffsetIndex(tNode) {\n    return tNode.index - HEADER_OFFSET;\n}\n/**\n * Check whether a given node exists, but is disconnected from the DOM.\n */\nfunction isDisconnectedNode(tNode, lView) {\n    return (!(tNode.type & (16 /* TNodeType.Projection */ | 128 /* TNodeType.LetDeclaration */)) &&\n        !!lView[tNode.index] &&\n        isDisconnectedRNode(unwrapRNode(lView[tNode.index])));\n}\n/**\n * Check whether the given node exists, but is disconnected from the DOM.\n *\n * Note: we leverage the fact that we have this information available in the DOM emulation\n * layer (in Domino) for now. Longer-term solution should not rely on the DOM emulation and\n * only use internal data structures and state to compute this information.\n */\nfunction isDisconnectedRNode(rNode) {\n    return !!rNode && !rNode.isConnected;\n}\n/**\n * Locate a node in an i18n tree that corresponds to a given instruction index.\n *\n * @param hydrationInfo The hydration annotation data\n * @param noOffsetIndex the instruction index\n * @returns an RNode that corresponds to the instruction index\n */\nfunction locateI18nRNodeByIndex(hydrationInfo, noOffsetIndex) {\n    const i18nNodes = hydrationInfo.i18nNodes;\n    if (i18nNodes) {\n        return i18nNodes.get(noOffsetIndex);\n    }\n    return undefined;\n}\n/**\n * Attempt to locate an RNode by a path, if it exists.\n *\n * @param hydrationInfo The hydration annotation data\n * @param lView the current lView\n * @param noOffsetIndex the instruction index\n * @returns an RNode that corresponds to the instruction index or null if no path exists\n */\nfunction tryLocateRNodeByPath(hydrationInfo, lView, noOffsetIndex) {\n    const nodes = hydrationInfo.data[NODES];\n    const path = nodes?.[noOffsetIndex];\n    return path ? locateRNodeByPath(path, lView) : null;\n}\n/**\n * Locate a node in DOM tree that corresponds to a given TNode.\n *\n * @param hydrationInfo The hydration annotation data\n * @param tView the current tView\n * @param lView the current lView\n * @param tNode the current tNode\n * @returns an RNode that represents a given tNode\n */\nfunction locateNextRNode(hydrationInfo, tView, lView, tNode) {\n    const noOffsetIndex = getNoOffsetIndex(tNode);\n    let native = locateI18nRNodeByIndex(hydrationInfo, noOffsetIndex);\n    if (native === undefined) {\n        const nodes = hydrationInfo.data[NODES];\n        if (nodes?.[noOffsetIndex]) {\n            // We know the exact location of the node.\n            native = locateRNodeByPath(nodes[noOffsetIndex], lView);\n        }\n        else if (tView.firstChild === tNode) {\n            // We create a first node in this view, so we use a reference\n            // to the first child in this DOM segment.\n            native = hydrationInfo.firstChild;\n        }\n        else {\n            // Locate a node based on a previous sibling or a parent node.\n            const previousTNodeParent = tNode.prev === null;\n            const previousTNode = (tNode.prev ?? tNode.parent);\n            ngDevMode &&\n                assertDefined(previousTNode, 'Unexpected state: current TNode does not have a connection ' +\n                    'to the previous node or a parent node.');\n            if (isFirstElementInNgContainer(tNode)) {\n                const noOffsetParentIndex = getNoOffsetIndex(tNode.parent);\n                native = getSegmentHead(hydrationInfo, noOffsetParentIndex);\n            }\n            else {\n                let previousRElement = getNativeByTNode(previousTNode, lView);\n                if (previousTNodeParent) {\n                    native = previousRElement.firstChild;\n                }\n                else {\n                    // If the previous node is an element, but it also has container info,\n                    // this means that we are processing a node like `<div #vcrTarget>`, which is\n                    // represented in the DOM as `<div></div>...<!--container-->`.\n                    // In this case, there are nodes *after* this element and we need to skip\n                    // all of them to reach an element that we are looking for.\n                    const noOffsetPrevSiblingIndex = getNoOffsetIndex(previousTNode);\n                    const segmentHead = getSegmentHead(hydrationInfo, noOffsetPrevSiblingIndex);\n                    if (previousTNode.type === 2 /* TNodeType.Element */ && segmentHead) {\n                        const numRootNodesToSkip = calcSerializedContainerSize(hydrationInfo, noOffsetPrevSiblingIndex);\n                        // `+1` stands for an anchor comment node after all the views in this container.\n                        const nodesToSkip = numRootNodesToSkip + 1;\n                        // First node after this segment.\n                        native = siblingAfter(nodesToSkip, segmentHead);\n                    }\n                    else {\n                        native = previousRElement.nextSibling;\n                    }\n                }\n            }\n        }\n    }\n    return native;\n}\n/**\n * Skips over a specified number of nodes and returns the next sibling node after that.\n */\nfunction siblingAfter(skip, from) {\n    let currentNode = from;\n    for (let i = 0; i < skip; i++) {\n        ngDevMode && validateSiblingNodeExists(currentNode);\n        currentNode = currentNode.nextSibling;\n    }\n    return currentNode;\n}\n/**\n * Helper function to produce a string representation of the navigation steps\n * (in terms of `nextSibling` and `firstChild` navigations). Used in error\n * messages in dev mode.\n */\nfunction stringifyNavigationInstructions(instructions) {\n    const container = [];\n    for (let i = 0; i < instructions.length; i += 2) {\n        const step = instructions[i];\n        const repeat = instructions[i + 1];\n        for (let r = 0; r < repeat; r++) {\n            container.push(step === NodeNavigationStep.FirstChild ? 'firstChild' : 'nextSibling');\n        }\n    }\n    return container.join('.');\n}\n/**\n * Helper function that navigates from a starting point node (the `from` node)\n * using provided set of navigation instructions (within `path` argument).\n */\nfunction navigateToNode(from, instructions) {\n    let node = from;\n    for (let i = 0; i < instructions.length; i += 2) {\n        const step = instructions[i];\n        const repeat = instructions[i + 1];\n        for (let r = 0; r < repeat; r++) {\n            if (ngDevMode && !node) {\n                throw nodeNotFoundAtPathError(from, stringifyNavigationInstructions(instructions));\n            }\n            switch (step) {\n                case NodeNavigationStep.FirstChild:\n                    node = node.firstChild;\n                    break;\n                case NodeNavigationStep.NextSibling:\n                    node = node.nextSibling;\n                    break;\n            }\n        }\n    }\n    if (ngDevMode && !node) {\n        throw nodeNotFoundAtPathError(from, stringifyNavigationInstructions(instructions));\n    }\n    return node;\n}\n/**\n * Locates an RNode given a set of navigation instructions (which also contains\n * a starting point node info).\n */\nfunction locateRNodeByPath(path, lView) {\n    const [referenceNode, ...navigationInstructions] = decompressNodeLocation(path);\n    let ref;\n    if (referenceNode === REFERENCE_NODE_HOST) {\n        ref = lView[DECLARATION_COMPONENT_VIEW][HOST];\n    }\n    else if (referenceNode === REFERENCE_NODE_BODY) {\n        ref = ɵɵresolveBody(lView[DECLARATION_COMPONENT_VIEW][HOST]);\n    }\n    else {\n        const parentElementId = Number(referenceNode);\n        ref = unwrapRNode(lView[parentElementId + HEADER_OFFSET]);\n    }\n    return navigateToNode(ref, navigationInstructions);\n}\n/**\n * Generate a list of DOM navigation operations to get from node `start` to node `finish`.\n *\n * Note: assumes that node `start` occurs before node `finish` in an in-order traversal of the DOM\n * tree. That is, we should be able to get from `start` to `finish` purely by using `.firstChild`\n * and `.nextSibling` operations.\n */\nfunction navigateBetween(start, finish) {\n    if (start === finish) {\n        return [];\n    }\n    else if (start.parentElement == null || finish.parentElement == null) {\n        return null;\n    }\n    else if (start.parentElement === finish.parentElement) {\n        return navigateBetweenSiblings(start, finish);\n    }\n    else {\n        // `finish` is a child of its parent, so the parent will always have a child.\n        const parent = finish.parentElement;\n        const parentPath = navigateBetween(start, parent);\n        const childPath = navigateBetween(parent.firstChild, finish);\n        if (!parentPath || !childPath)\n            return null;\n        return [\n            // First navigate to `finish`'s parent\n            ...parentPath,\n            // Then to its first child.\n            NodeNavigationStep.FirstChild,\n            // And finally from that node to `finish` (maybe a no-op if we're already there).\n            ...childPath,\n        ];\n    }\n}\n/**\n * Calculates a path between 2 sibling nodes (generates a number of `NextSibling` navigations).\n * Returns `null` if no such path exists between the given nodes.\n */\nfunction navigateBetweenSiblings(start, finish) {\n    const nav = [];\n    let node = null;\n    for (node = start; node != null && node !== finish; node = node.nextSibling) {\n        nav.push(NodeNavigationStep.NextSibling);\n    }\n    // If the `node` becomes `null` or `undefined` at the end, that means that we\n    // didn't find the `end` node, thus return `null` (which would trigger serialization\n    // error to be produced).\n    return node == null ? null : nav;\n}\n/**\n * Calculates a path between 2 nodes in terms of `nextSibling` and `firstChild`\n * navigations:\n * - the `from` node is a known node, used as an starting point for the lookup\n *   (the `fromNodeName` argument is a string representation of the node).\n * - the `to` node is a node that the runtime logic would be looking up,\n *   using the path generated by this function.\n */\nfunction calcPathBetween(from, to, fromNodeName) {\n    const path = navigateBetween(from, to);\n    return path === null ? null : compressNodeLocation(fromNodeName, path);\n}\n/**\n * Invoked at serialization time (on the server) when a set of navigation\n * instructions needs to be generated for a TNode.\n */\nfunction calcPathForNode(tNode, lView, excludedParentNodes) {\n    let parentTNode = tNode.parent;\n    let parentIndex;\n    let parentRNode;\n    let referenceNodeName;\n    // Skip over all parent nodes that are disconnected from the DOM, such nodes\n    // can not be used as anchors.\n    //\n    // This might happen in certain content projection-based use-cases, where\n    // a content of an element is projected and used, when a parent element\n    // itself remains detached from DOM. In this scenario we try to find a parent\n    // element that is attached to DOM and can act as an anchor instead.\n    //\n    // It can also happen that the parent node should be excluded, for example,\n    // because it belongs to an i18n block, which requires paths which aren't\n    // relative to other views in an i18n block.\n    while (parentTNode !== null &&\n        (isDisconnectedNode(parentTNode, lView) || excludedParentNodes?.has(parentTNode.index))) {\n        parentTNode = parentTNode.parent;\n    }\n    if (parentTNode === null || !(parentTNode.type & 3 /* TNodeType.AnyRNode */)) {\n        // If there is no parent TNode or a parent TNode does not represent an RNode\n        // (i.e. not a DOM node), use component host element as a reference node.\n        parentIndex = referenceNodeName = REFERENCE_NODE_HOST;\n        parentRNode = lView[DECLARATION_COMPONENT_VIEW][HOST];\n    }\n    else {\n        // Use parent TNode as a reference node.\n        parentIndex = parentTNode.index;\n        parentRNode = unwrapRNode(lView[parentIndex]);\n        referenceNodeName = renderStringify(parentIndex - HEADER_OFFSET);\n    }\n    let rNode = unwrapRNode(lView[tNode.index]);\n    if (tNode.type & (12 /* TNodeType.AnyContainer */ | 32 /* TNodeType.Icu */)) {\n        // For <ng-container> nodes, instead of serializing a reference\n        // to the anchor comment node, serialize a location of the first\n        // DOM element. Paired with the container size (serialized as a part\n        // of `ngh.containers`), it should give enough information for runtime\n        // to hydrate nodes in this container.\n        const firstRNode = getFirstNativeNode(lView, tNode);\n        // If container is not empty, use a reference to the first element,\n        // otherwise, rNode would point to an anchor comment node.\n        if (firstRNode) {\n            rNode = firstRNode;\n        }\n    }\n    let path = calcPathBetween(parentRNode, rNode, referenceNodeName);\n    if (path === null && parentRNode !== rNode) {\n        // Searching for a path between elements within a host node failed.\n        // Trying to find a path to an element starting from the `document.body` instead.\n        //\n        // Important note: this type of reference is relatively unstable, since Angular\n        // may not be able to control parts of the page that the runtime logic navigates\n        // through. This is mostly needed to cover \"portals\" use-case (like menus, dialog boxes,\n        // etc), where nodes are content-projected (including direct DOM manipulations) outside\n        // of the host node. The better solution is to provide APIs to work with \"portals\",\n        // at which point this code path would not be needed.\n        const body = parentRNode.ownerDocument.body;\n        path = calcPathBetween(body, rNode, REFERENCE_NODE_BODY);\n        if (path === null) {\n            // If the path is still empty, it's likely that this node is detached and\n            // won't be found during hydration.\n            throw nodeNotFoundError(lView, tNode);\n        }\n    }\n    return path;\n}\n/**\n * Retrieves all comments nodes that contain ngh comments referring to a defer block\n */\nfunction gatherDeferBlocksCommentNodes(doc, node) {\n    const commentNodesIterator = doc.createNodeIterator(node, NodeFilter.SHOW_COMMENT, { acceptNode });\n    let currentNode;\n    const nodesByBlockId = new Map();\n    while ((currentNode = commentNodesIterator.nextNode())) {\n        const nghPattern = 'ngh=';\n        const content = currentNode?.textContent;\n        const nghIdx = content?.indexOf(nghPattern) ?? -1;\n        if (nghIdx > -1) {\n            const nghValue = content.substring(nghIdx + nghPattern.length).trim();\n            // Make sure the value has an expected format.\n            ngDevMode &&\n                assertEqual(nghValue.startsWith('d'), true, 'Invalid defer block id found in a comment node.');\n            nodesByBlockId.set(nghValue, currentNode);\n        }\n    }\n    return nodesByBlockId;\n}\nfunction acceptNode(node) {\n    return node.textContent?.trimStart().startsWith('ngh=')\n        ? NodeFilter.FILTER_ACCEPT\n        : NodeFilter.FILTER_REJECT;\n}\n\nlet _isI18nHydrationSupportEnabled = false;\nlet _prepareI18nBlockForHydrationImpl = () => {\n    // noop unless `enablePrepareI18nBlockForHydrationImpl` is invoked.\n};\nfunction setIsI18nHydrationSupportEnabled(enabled) {\n    _isI18nHydrationSupportEnabled = enabled;\n}\nfunction isI18nHydrationSupportEnabled() {\n    return _isI18nHydrationSupportEnabled;\n}\n/**\n * Prepares an i18n block and its children, located at the given\n * view and instruction index, for hydration.\n *\n * @param lView lView with the i18n block\n * @param index index of the i18n block in the lView\n * @param parentTNode TNode of the parent of the i18n block\n * @param subTemplateIndex sub-template index, or -1 for the main template\n */\nfunction prepareI18nBlockForHydration(lView, index, parentTNode, subTemplateIndex) {\n    _prepareI18nBlockForHydrationImpl(lView, index, parentTNode, subTemplateIndex);\n}\nfunction enablePrepareI18nBlockForHydrationImpl() {\n    _prepareI18nBlockForHydrationImpl = prepareI18nBlockForHydrationImpl;\n}\nfunction isI18nHydrationEnabled(injector) {\n    injector = injector ?? inject(Injector);\n    return injector.get(IS_I18N_HYDRATION_ENABLED, false);\n}\n/**\n * Collects, if not already cached, all of the indices in the\n * given TView which are children of an i18n block.\n *\n * Since i18n blocks don't introduce a parent TNode, this is necessary\n * in order to determine which indices in a LView are translated.\n */\nfunction getOrComputeI18nChildren(tView, context) {\n    let i18nChildren = context.i18nChildren.get(tView);\n    if (i18nChildren === undefined) {\n        i18nChildren = collectI18nChildren(tView);\n        context.i18nChildren.set(tView, i18nChildren);\n    }\n    return i18nChildren;\n}\nfunction collectI18nChildren(tView) {\n    const children = new Set();\n    function collectI18nViews(node) {\n        children.add(node.index);\n        switch (node.kind) {\n            case 1 /* I18nNodeKind.ELEMENT */:\n            case 2 /* I18nNodeKind.PLACEHOLDER */: {\n                for (const childNode of node.children) {\n                    collectI18nViews(childNode);\n                }\n                break;\n            }\n            case 3 /* I18nNodeKind.ICU */: {\n                for (const caseNodes of node.cases) {\n                    for (const caseNode of caseNodes) {\n                        collectI18nViews(caseNode);\n                    }\n                }\n                break;\n            }\n        }\n    }\n    // Traverse through the AST of each i18n block in the LView,\n    // and collect every instruction index.\n    for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n        const tI18n = tView.data[i];\n        if (!tI18n || !tI18n.ast) {\n            continue;\n        }\n        for (const node of tI18n.ast) {\n            collectI18nViews(node);\n        }\n    }\n    return children.size === 0 ? null : children;\n}\n/**\n * Attempts to serialize i18n data for an i18n block, located at\n * the given view and instruction index.\n *\n * @param lView lView with the i18n block\n * @param index index of the i18n block in the lView\n * @param context the hydration context\n * @returns the i18n data, or null if there is no relevant data\n */\nfunction trySerializeI18nBlock(lView, index, context) {\n    if (!context.isI18nHydrationEnabled) {\n        return null;\n    }\n    const tView = lView[TVIEW];\n    const tI18n = tView.data[index];\n    if (!tI18n || !tI18n.ast) {\n        return null;\n    }\n    const parentTNode = tView.data[tI18n.parentTNodeIndex];\n    if (parentTNode && isI18nInSkipHydrationBlock(parentTNode)) {\n        return null;\n    }\n    const serializedI18nBlock = {\n        caseQueue: [],\n        disconnectedNodes: new Set(),\n        disjointNodes: new Set(),\n    };\n    serializeI18nBlock(lView, serializedI18nBlock, context, tI18n.ast);\n    return serializedI18nBlock.caseQueue.length === 0 &&\n        serializedI18nBlock.disconnectedNodes.size === 0 &&\n        serializedI18nBlock.disjointNodes.size === 0\n        ? null\n        : serializedI18nBlock;\n}\nfunction serializeI18nBlock(lView, serializedI18nBlock, context, nodes) {\n    let prevRNode = null;\n    for (const node of nodes) {\n        const nextRNode = serializeI18nNode(lView, serializedI18nBlock, context, node);\n        if (nextRNode) {\n            if (isDisjointNode(prevRNode, nextRNode)) {\n                serializedI18nBlock.disjointNodes.add(node.index - HEADER_OFFSET);\n            }\n            prevRNode = nextRNode;\n        }\n    }\n    return prevRNode;\n}\n/**\n * Helper to determine whether the given nodes are \"disjoint\".\n *\n * The i18n hydration process walks through the DOM and i18n nodes\n * at the same time. It expects the sibling DOM node of the previous\n * i18n node to be the first node of the next i18n node.\n *\n * In cases of content projection, this won't always be the case. So\n * when we detect that, we mark the node as \"disjoint\", ensuring that\n * we will serialize the path to the node. This way, when we hydrate the\n * i18n node, we will be able to find the correct place to start.\n */\nfunction isDisjointNode(prevNode, nextNode) {\n    return prevNode && prevNode.nextSibling !== nextNode;\n}\n/**\n * Process the given i18n node for serialization.\n * Returns the first RNode for the i18n node to begin hydration.\n */\nfunction serializeI18nNode(lView, serializedI18nBlock, context, node) {\n    const maybeRNode = unwrapRNode(lView[node.index]);\n    if (!maybeRNode || isDisconnectedRNode(maybeRNode)) {\n        serializedI18nBlock.disconnectedNodes.add(node.index - HEADER_OFFSET);\n        return null;\n    }\n    const rNode = maybeRNode;\n    switch (node.kind) {\n        case 0 /* I18nNodeKind.TEXT */: {\n            processTextNodeBeforeSerialization(context, rNode);\n            break;\n        }\n        case 1 /* I18nNodeKind.ELEMENT */:\n        case 2 /* I18nNodeKind.PLACEHOLDER */: {\n            serializeI18nBlock(lView, serializedI18nBlock, context, node.children);\n            break;\n        }\n        case 3 /* I18nNodeKind.ICU */: {\n            const currentCase = lView[node.currentCaseLViewIndex];\n            if (currentCase != null) {\n                // i18n uses a negative value to signal a change to a new case, so we\n                // need to invert it to get the proper value.\n                const caseIdx = currentCase < 0 ? ~currentCase : currentCase;\n                serializedI18nBlock.caseQueue.push(caseIdx);\n                serializeI18nBlock(lView, serializedI18nBlock, context, node.cases[caseIdx]);\n            }\n            break;\n        }\n    }\n    return getFirstNativeNodeForI18nNode(lView, node);\n}\n/**\n * Helper function to get the first native node to begin hydrating\n * the given i18n node.\n */\nfunction getFirstNativeNodeForI18nNode(lView, node) {\n    const tView = lView[TVIEW];\n    const maybeTNode = tView.data[node.index];\n    if (isTNodeShape(maybeTNode)) {\n        // If the node is backed by an actual TNode, we can simply delegate.\n        return getFirstNativeNode(lView, maybeTNode);\n    }\n    else if (node.kind === 3 /* I18nNodeKind.ICU */) {\n        // A nested ICU container won't have an actual TNode. In that case, we can use\n        // an iterator to find the first child.\n        const icuIterator = createIcuIterator(maybeTNode, lView);\n        let rNode = icuIterator();\n        // If the ICU container has no nodes, then we use the ICU anchor as the node.\n        return rNode ?? unwrapRNode(lView[node.index]);\n    }\n    else {\n        // Otherwise, the node is a text or trivial element in an ICU container,\n        // and we can just use the RNode directly.\n        return unwrapRNode(lView[node.index]) ?? null;\n    }\n}\nfunction setCurrentNode(state, node) {\n    state.currentNode = node;\n}\n/**\n * Marks the current RNode as the hydration root for the given\n * AST node.\n */\nfunction appendI18nNodeToCollection(context, state, astNode) {\n    const noOffsetIndex = astNode.index - HEADER_OFFSET;\n    const { disconnectedNodes } = context;\n    const currentNode = state.currentNode;\n    if (state.isConnected) {\n        context.i18nNodes.set(noOffsetIndex, currentNode);\n        // We expect the node to be connected, so ensure that it\n        // is not in the set, regardless of whether we found it,\n        // so that the downstream error handling can provide the\n        // proper context.\n        disconnectedNodes.delete(noOffsetIndex);\n    }\n    else {\n        disconnectedNodes.add(noOffsetIndex);\n    }\n    return currentNode;\n}\n/**\n * Skip over some sibling nodes during hydration.\n *\n * Note: we use this instead of `siblingAfter` as it's expected that\n * sometimes we might encounter null nodes. In those cases, we want to\n * defer to downstream error handling to provide proper context.\n */\nfunction skipSiblingNodes(state, skip) {\n    let currentNode = state.currentNode;\n    for (let i = 0; i < skip; i++) {\n        if (!currentNode) {\n            break;\n        }\n        currentNode = currentNode?.nextSibling ?? null;\n    }\n    return currentNode;\n}\n/**\n * Fork the given state into a new state for hydrating children.\n */\nfunction forkHydrationState(state, nextNode) {\n    return { currentNode: nextNode, isConnected: state.isConnected };\n}\nfunction prepareI18nBlockForHydrationImpl(lView, index, parentTNode, subTemplateIndex) {\n    const hydrationInfo = lView[HYDRATION];\n    if (!hydrationInfo) {\n        return;\n    }\n    if (!isI18nHydrationSupportEnabled() ||\n        (parentTNode &&\n            (isI18nInSkipHydrationBlock(parentTNode) ||\n                isDisconnectedNode$1(hydrationInfo, parentTNode.index - HEADER_OFFSET)))) {\n        return;\n    }\n    const tView = lView[TVIEW];\n    const tI18n = tView.data[index];\n    ngDevMode &&\n        assertDefined(tI18n, 'Expected i18n data to be present in a given TView slot during hydration');\n    function findHydrationRoot() {\n        if (isRootTemplateMessage(subTemplateIndex)) {\n            // This is the root of an i18n block. In this case, our hydration root will\n            // depend on where our parent TNode (i.e. the block with i18n applied) is\n            // in the DOM.\n            ngDevMode && assertDefined(parentTNode, 'Expected parent TNode while hydrating i18n root');\n            const rootNode = locateNextRNode(hydrationInfo, tView, lView, parentTNode);\n            // If this i18n block is attached to an <ng-container>, then we want to begin\n            // hydrating directly with the RNode. Otherwise, for a TNode with a physical DOM\n            // element, we want to recurse into the first child and begin there.\n            return parentTNode.type & 8 /* TNodeType.ElementContainer */ ? rootNode : rootNode.firstChild;\n        }\n        // This is a nested template in an i18n block. In this case, the entire view\n        // is translated, and part of a dehydrated view in a container. This means that\n        // we can simply begin hydration with the first dehydrated child.\n        return hydrationInfo?.firstChild;\n    }\n    const currentNode = findHydrationRoot();\n    ngDevMode && assertDefined(currentNode, 'Expected root i18n node during hydration');\n    const disconnectedNodes = initDisconnectedNodes(hydrationInfo) ?? new Set();\n    const i18nNodes = (hydrationInfo.i18nNodes ??= new Map());\n    const caseQueue = hydrationInfo.data[I18N_DATA]?.[index - HEADER_OFFSET] ?? [];\n    const dehydratedIcuData = (hydrationInfo.dehydratedIcuData ??= new Map());\n    collectI18nNodesFromDom({ hydrationInfo, lView, i18nNodes, disconnectedNodes, caseQueue, dehydratedIcuData }, { currentNode, isConnected: true }, tI18n.ast);\n    // Nodes from inactive ICU cases should be considered disconnected. We track them above\n    // because they aren't (and shouldn't be) serialized. Since we may mutate or create a\n    // new set, we need to be sure to write the expected value back to the DehydratedView.\n    hydrationInfo.disconnectedNodes = disconnectedNodes.size === 0 ? null : disconnectedNodes;\n}\nfunction collectI18nNodesFromDom(context, state, nodeOrNodes) {\n    if (Array.isArray(nodeOrNodes)) {\n        let nextState = state;\n        for (const node of nodeOrNodes) {\n            // Whenever a node doesn't directly follow the previous RNode, it\n            // is given a path. We need to resume collecting nodes from that location\n            // until and unless we find another disjoint node.\n            const targetNode = tryLocateRNodeByPath(context.hydrationInfo, context.lView, node.index - HEADER_OFFSET);\n            if (targetNode) {\n                nextState = forkHydrationState(state, targetNode);\n            }\n            collectI18nNodesFromDom(context, nextState, node);\n        }\n    }\n    else {\n        if (context.disconnectedNodes.has(nodeOrNodes.index - HEADER_OFFSET)) {\n            // i18n nodes can be considered disconnected if e.g. they were projected.\n            // In that case, we have to make sure to skip over them.\n            return;\n        }\n        switch (nodeOrNodes.kind) {\n            case 0 /* I18nNodeKind.TEXT */: {\n                // Claim a text node for hydration\n                const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n                setCurrentNode(state, currentNode?.nextSibling ?? null);\n                break;\n            }\n            case 1 /* I18nNodeKind.ELEMENT */: {\n                // Recurse into the current element's children...\n                collectI18nNodesFromDom(context, forkHydrationState(state, state.currentNode?.firstChild ?? null), nodeOrNodes.children);\n                // And claim the parent element itself.\n                const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n                setCurrentNode(state, currentNode?.nextSibling ?? null);\n                break;\n            }\n            case 2 /* I18nNodeKind.PLACEHOLDER */: {\n                const noOffsetIndex = nodeOrNodes.index - HEADER_OFFSET;\n                const { hydrationInfo } = context;\n                const containerSize = getNgContainerSize(hydrationInfo, noOffsetIndex);\n                switch (nodeOrNodes.type) {\n                    case 0 /* I18nPlaceholderType.ELEMENT */: {\n                        // Hydration expects to find the head of the element.\n                        const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n                        // A TNode for the node may not yet if we're hydrating during the first pass,\n                        // so use the serialized data to determine if this is an <ng-container>.\n                        if (isSerializedElementContainer(hydrationInfo, noOffsetIndex)) {\n                            // An <ng-container> doesn't have a physical DOM node, so we need to\n                            // continue hydrating from siblings.\n                            collectI18nNodesFromDom(context, state, nodeOrNodes.children);\n                            // Skip over the anchor element. It will be claimed by the\n                            // downstream container hydration.\n                            const nextNode = skipSiblingNodes(state, 1);\n                            setCurrentNode(state, nextNode);\n                        }\n                        else {\n                            // Non-container elements represent an actual node in the DOM, so we\n                            // need to continue hydration with the children, and claim the node.\n                            collectI18nNodesFromDom(context, forkHydrationState(state, state.currentNode?.firstChild ?? null), nodeOrNodes.children);\n                            setCurrentNode(state, currentNode?.nextSibling ?? null);\n                            // Elements can also be the anchor of a view container, so there may\n                            // be elements after this node that we need to skip.\n                            if (containerSize !== null) {\n                                // `+1` stands for an anchor node after all of the views in the container.\n                                const nextNode = skipSiblingNodes(state, containerSize + 1);\n                                setCurrentNode(state, nextNode);\n                            }\n                        }\n                        break;\n                    }\n                    case 1 /* I18nPlaceholderType.SUBTEMPLATE */: {\n                        ngDevMode &&\n                            assertNotEqual(containerSize, null, 'Expected a container size while hydrating i18n subtemplate');\n                        // Hydration expects to find the head of the template.\n                        appendI18nNodeToCollection(context, state, nodeOrNodes);\n                        // Skip over all of the template children, as well as the anchor\n                        // node, since the template itself will handle them instead.\n                        const nextNode = skipSiblingNodes(state, containerSize + 1);\n                        setCurrentNode(state, nextNode);\n                        break;\n                    }\n                }\n                break;\n            }\n            case 3 /* I18nNodeKind.ICU */: {\n                // If the current node is connected, we need to pop the next case from the\n                // queue, so that the active case is also considered connected.\n                const selectedCase = state.isConnected ? context.caseQueue.shift() : null;\n                const childState = { currentNode: null, isConnected: false };\n                // We traverse through each case, even if it's not active,\n                // so that we correctly populate disconnected nodes.\n                for (let i = 0; i < nodeOrNodes.cases.length; i++) {\n                    collectI18nNodesFromDom(context, i === selectedCase ? state : childState, nodeOrNodes.cases[i]);\n                }\n                if (selectedCase !== null) {\n                    // ICUs represent a branching state, and the selected case could be different\n                    // than what it was on the server. In that case, we need to be able to clean\n                    // up the nodes from the original case. To do that, we store the selected case.\n                    context.dehydratedIcuData.set(nodeOrNodes.index, { case: selectedCase, node: nodeOrNodes });\n                }\n                // Hydration expects to find the ICU anchor element.\n                const currentNode = appendI18nNodeToCollection(context, state, nodeOrNodes);\n                setCurrentNode(state, currentNode?.nextSibling ?? null);\n                break;\n            }\n        }\n    }\n}\nlet _claimDehydratedIcuCaseImpl = () => {\n    // noop unless `enableClaimDehydratedIcuCaseImpl` is invoked\n};\n/**\n * Mark the case for the ICU node at the given index in the view as claimed,\n * allowing its nodes to be hydrated and not cleaned up.\n */\nfunction claimDehydratedIcuCase(lView, icuIndex, caseIndex) {\n    _claimDehydratedIcuCaseImpl(lView, icuIndex, caseIndex);\n}\nfunction enableClaimDehydratedIcuCaseImpl() {\n    _claimDehydratedIcuCaseImpl = claimDehydratedIcuCaseImpl;\n}\nfunction claimDehydratedIcuCaseImpl(lView, icuIndex, caseIndex) {\n    const dehydratedIcuDataMap = lView[HYDRATION]?.dehydratedIcuData;\n    if (dehydratedIcuDataMap) {\n        const dehydratedIcuData = dehydratedIcuDataMap.get(icuIndex);\n        if (dehydratedIcuData?.case === caseIndex) {\n            // If the case we're attempting to claim matches the dehydrated one,\n            // we remove it from the map to mark it as \"claimed.\"\n            dehydratedIcuDataMap.delete(icuIndex);\n        }\n    }\n}\n/**\n * Clean up all i18n hydration data associated with the given view.\n */\nfunction cleanupI18nHydrationData(lView) {\n    const hydrationInfo = lView[HYDRATION];\n    if (hydrationInfo) {\n        const { i18nNodes, dehydratedIcuData: dehydratedIcuDataMap } = hydrationInfo;\n        if (i18nNodes && dehydratedIcuDataMap) {\n            const renderer = lView[RENDERER];\n            for (const dehydratedIcuData of dehydratedIcuDataMap.values()) {\n                cleanupDehydratedIcuData(renderer, i18nNodes, dehydratedIcuData);\n            }\n        }\n        hydrationInfo.i18nNodes = undefined;\n        hydrationInfo.dehydratedIcuData = undefined;\n    }\n}\nfunction cleanupDehydratedIcuData(renderer, i18nNodes, dehydratedIcuData) {\n    for (const node of dehydratedIcuData.node.cases[dehydratedIcuData.case]) {\n        const rNode = i18nNodes.get(node.index - HEADER_OFFSET);\n        if (rNode) {\n            nativeRemoveNode(renderer, rNode, false);\n        }\n    }\n}\n\n/**\n * Removes all dehydrated views from a given LContainer:\n * both in internal data structure, as well as removing\n * corresponding DOM nodes that belong to that dehydrated view.\n */\nfunction removeDehydratedViews(lContainer) {\n    const views = lContainer[DEHYDRATED_VIEWS] ?? [];\n    const parentLView = lContainer[PARENT];\n    const renderer = parentLView[RENDERER];\n    const retainedViews = [];\n    for (const view of views) {\n        // Do not clean up contents of `@defer` blocks.\n        // The cleanup for this content would happen once a given block\n        // is triggered and hydrated.\n        if (view.data[DEFER_BLOCK_ID] !== undefined) {\n            retainedViews.push(view);\n        }\n        else {\n            removeDehydratedView(view, renderer);\n            ngDevMode && ngDevMode.dehydratedViewsRemoved++;\n        }\n    }\n    // Reset the value to an array to indicate that no\n    // further processing of dehydrated views is needed for\n    // this view container (i.e. do not trigger the lookup process\n    // once again in case a `ViewContainerRef` is created later).\n    lContainer[DEHYDRATED_VIEWS] = retainedViews;\n}\n/**\n * Helper function to remove all nodes from a dehydrated view.\n */\nfunction removeDehydratedView(dehydratedView, renderer) {\n    let nodesRemoved = 0;\n    let currentRNode = dehydratedView.firstChild;\n    if (currentRNode) {\n        const numNodes = dehydratedView.data[NUM_ROOT_NODES];\n        while (nodesRemoved < numNodes) {\n            ngDevMode && validateSiblingNodeExists(currentRNode);\n            const nextSibling = currentRNode.nextSibling;\n            nativeRemoveNode(renderer, currentRNode, false);\n            currentRNode = nextSibling;\n            nodesRemoved++;\n        }\n    }\n}\n/**\n * Walks over all views within this LContainer invokes dehydrated views\n * cleanup function for each one.\n */\nfunction cleanupLContainer(lContainer) {\n    removeDehydratedViews(lContainer);\n    // The host could be an LView if this container is on a component node.\n    // In this case, descend into host LView for further cleanup. See also\n    // LContainer[HOST] docs for additional information.\n    const hostLView = lContainer[HOST];\n    if (isLView(hostLView)) {\n        cleanupLView(hostLView);\n    }\n    for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n        cleanupLView(lContainer[i]);\n    }\n}\n/**\n * Walks over `LContainer`s and components registered within\n * this LView and invokes dehydrated views cleanup function for each one.\n */\nfunction cleanupLView(lView) {\n    cleanupI18nHydrationData(lView);\n    const tView = lView[TVIEW];\n    for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n        if (isLContainer(lView[i])) {\n            const lContainer = lView[i];\n            cleanupLContainer(lContainer);\n        }\n        else if (isLView(lView[i])) {\n            // This is a component, enter the `cleanupLView` recursively.\n            cleanupLView(lView[i]);\n        }\n    }\n}\n/**\n * Walks over all views registered within the ApplicationRef and removes\n * all dehydrated views from all `LContainer`s along the way.\n */\nfunction cleanupDehydratedViews(appRef) {\n    const viewRefs = appRef._views;\n    for (const viewRef of viewRefs) {\n        const lNode = getLNodeForHydration(viewRef);\n        // An `lView` might be `null` if a `ViewRef` represents\n        // an embedded view (not a component view).\n        if (lNode !== null && lNode[HOST] !== null) {\n            if (isLView(lNode)) {\n                cleanupLView(lNode);\n            }\n            else {\n                // Cleanup in all views within this view container\n                cleanupLContainer(lNode);\n            }\n            ngDevMode && ngDevMode.dehydratedViewsCleanupRuns++;\n        }\n    }\n}\n/**\n * post hydration cleanup handling for defer blocks that were incrementally\n * hydrated. This removes all the jsaction attributes, timers, observers,\n * dehydrated views and containers\n */\nfunction cleanupHydratedDeferBlocks(deferBlock, hydratedBlocks, registry, appRef) {\n    if (deferBlock !== null) {\n        registry.cleanup(hydratedBlocks);\n        cleanupLContainer(deferBlock.lContainer);\n        cleanupDehydratedViews(appRef);\n    }\n}\n\n/**\n * Given a current DOM node and a serialized information about the views\n * in a container, walks over the DOM structure, collecting the list of\n * dehydrated views.\n */\nfunction locateDehydratedViewsInContainer(currentRNode, serializedViews) {\n    const dehydratedViews = [];\n    for (const serializedView of serializedViews) {\n        // Repeats a view multiple times as needed, based on the serialized information\n        // (for example, for *ngFor-produced views).\n        for (let i = 0; i < (serializedView[MULTIPLIER] ?? 1); i++) {\n            const view = {\n                data: serializedView,\n                firstChild: null,\n            };\n            if (serializedView[NUM_ROOT_NODES] > 0) {\n                // Keep reference to the first node in this view,\n                // so it can be accessed while invoking template instructions.\n                view.firstChild = currentRNode;\n                // Move over to the next node after this view, which can\n                // either be a first node of the next view or an anchor comment\n                // node after the last view in a container.\n                currentRNode = siblingAfter(serializedView[NUM_ROOT_NODES], currentRNode);\n            }\n            dehydratedViews.push(view);\n        }\n    }\n    return [currentRNode, dehydratedViews];\n}\n/**\n * Reference to a function that searches for a matching dehydrated views\n * stored on a given lContainer.\n * Returns `null` by default, when hydration is not enabled.\n */\nlet _findMatchingDehydratedViewImpl = () => null;\n/**\n * Retrieves the next dehydrated view from the LContainer and verifies that\n * it matches a given template id (from the TView that was used to create this\n * instance of a view). If the id doesn't match, that means that we are in an\n * unexpected state and can not complete the reconciliation process. Thus,\n * all dehydrated views from this LContainer are removed (including corresponding\n * DOM nodes) and the rendering is performed as if there were no dehydrated views\n * in this container.\n */\nfunction findMatchingDehydratedViewImpl(lContainer, template) {\n    const views = lContainer[DEHYDRATED_VIEWS];\n    if (!template || views === null || views.length === 0) {\n        return null;\n    }\n    const view = views[0];\n    // Verify whether the first dehydrated view in the container matches\n    // the template id passed to this function (that originated from a TView\n    // that was used to create an instance of an embedded or component views.\n    if (view.data[TEMPLATE_ID] === template) {\n        // If the template id matches - extract the first view and return it.\n        return views.shift();\n    }\n    else {\n        // Otherwise, we are at the state when reconciliation can not be completed,\n        // thus we remove all dehydrated views within this container (remove them\n        // from internal data structures as well as delete associated elements from\n        // the DOM tree).\n        removeDehydratedViews(lContainer);\n        return null;\n    }\n}\nfunction enableFindMatchingDehydratedViewImpl() {\n    _findMatchingDehydratedViewImpl = findMatchingDehydratedViewImpl;\n}\nfunction findMatchingDehydratedView(lContainer, template) {\n    return _findMatchingDehydratedViewImpl(lContainer, template);\n}\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 */\nclass ComponentRef$1 {\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 * @publicApi\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n *     Component class can be used directly.\n */\nclass ComponentFactory$1 {\n}\n\nclass _NullComponentFactoryResolver {\n    resolveComponentFactory(component) {\n        throw Error(`No component factory found for ${stringify(component)}.`);\n    }\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 * Note: since v13, dynamic component creation via\n * [`ViewContainerRef.createComponent`](api/core/ViewContainerRef#createComponent)\n * does **not** require resolving component factory: component class can be used directly.\n *\n * @publicApi\n *\n * @deprecated Angular no longer requires Component factories. Please use other APIs where\n *     Component class can be used directly.\n */\nclass ComponentFactoryResolver$1 {\n    static NULL = new _NullComponentFactoryResolver();\n}\n\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nclass RendererFactory2 {\n}\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 */\nclass Renderer2 {\n    /**\n     * If null or undefined, the view engine won't call it.\n     * This is used as a performance optimization for production mode.\n     */\n    destroyNode = null;\n    /**\n     * @internal\n     * @nocollapse\n     */\n    static __NG_ELEMENT_ID__ = () => injectRenderer2();\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    const lView = getLView();\n    const tNode = getCurrentTNode();\n    const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n    return (isLView(nodeAtIndex) ? nodeAtIndex : lView)[RENDERER];\n}\n\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nclass Sanitizer {\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: Sanitizer,\n        providedIn: 'root',\n        factory: () => null,\n    });\n}\n\nfunction isModuleWithProviders(value) {\n    return value.ngModule !== undefined;\n}\nfunction isNgModule(value) {\n    return !!getNgModuleDef(value);\n}\nfunction isPipe(value) {\n    return !!getPipeDef$1(value);\n}\nfunction isDirective(value) {\n    return !!getDirectiveDef(value);\n}\nfunction isComponent(value) {\n    return !!getComponentDef(value);\n}\nfunction getDependencyTypeForError(type) {\n    if (getComponentDef(type))\n        return 'component';\n    if (getDirectiveDef(type))\n        return 'directive';\n    if (getPipeDef$1(type))\n        return 'pipe';\n    return 'type';\n}\nfunction verifyStandaloneImport(depType, importingType) {\n    if (isForwardRef(depType)) {\n        depType = resolveForwardRef(depType);\n        if (!depType) {\n            throw new Error(`Expected forwardRef function, imported from \"${stringifyForError(importingType)}\", to return a standalone entity or NgModule but got \"${stringifyForError(depType) || depType}\".`);\n        }\n    }\n    if (getNgModuleDef(depType) == null) {\n        const def = getComponentDef(depType) || getDirectiveDef(depType) || getPipeDef$1(depType);\n        if (def != null) {\n            // if a component, directive or pipe is imported make sure that it is standalone\n            if (!def.standalone) {\n                throw new Error(`The \"${stringifyForError(depType)}\" ${getDependencyTypeForError(depType)}, imported from \"${stringifyForError(importingType)}\", is not standalone. Did you forget to add the standalone: true flag?`);\n            }\n        }\n        else {\n            // it can be either a module with provider or an unknown (not annotated) type\n            if (isModuleWithProviders(depType)) {\n                throw new Error(`A module with providers was imported from \"${stringifyForError(importingType)}\". Modules with providers are not supported in standalone components imports.`);\n            }\n            else {\n                throw new Error(`The \"${stringifyForError(depType)}\" type, imported from \"${stringifyForError(importingType)}\", must be a standalone component / directive / pipe or an NgModule. Did you forget to add the required @Component / @Directive / @Pipe or @NgModule annotation?`);\n            }\n        }\n    }\n}\n\n/**\n * Indicates whether to use the runtime dependency tracker for scope calculation in JIT compilation.\n * The value \"false\" means the old code path based on patching scope info into the types will be\n * used.\n *\n * @deprecated For migration purposes only, to be removed soon.\n */\nconst USE_RUNTIME_DEPS_TRACKER_FOR_JIT = true;\n/**\n * An implementation of DepsTrackerApi which will be used for JIT and local compilation.\n */\nclass DepsTracker {\n    ownerNgModule = new Map();\n    ngModulesWithSomeUnresolvedDecls = new Set();\n    ngModulesScopeCache = new Map();\n    standaloneComponentsScopeCache = new Map();\n    /**\n     * Attempts to resolve ng module's forward ref declarations as much as possible and add them to\n     * the `ownerNgModule` map. This method normally should be called after the initial parsing when\n     * all the forward refs are resolved (e.g., when trying to render a component)\n     */\n    resolveNgModulesDecls() {\n        if (this.ngModulesWithSomeUnresolvedDecls.size === 0) {\n            return;\n        }\n        for (const moduleType of this.ngModulesWithSomeUnresolvedDecls) {\n            const def = getNgModuleDef(moduleType);\n            if (def?.declarations) {\n                for (const decl of maybeUnwrapFn(def.declarations)) {\n                    if (isComponent(decl)) {\n                        this.ownerNgModule.set(decl, moduleType);\n                    }\n                }\n            }\n        }\n        this.ngModulesWithSomeUnresolvedDecls.clear();\n    }\n    /** @override */\n    getComponentDependencies(type, rawImports) {\n        this.resolveNgModulesDecls();\n        const def = getComponentDef(type);\n        if (def === null) {\n            throw new Error(`Attempting to get component dependencies for a type that is not a component: ${type}`);\n        }\n        if (def.standalone) {\n            const scope = this.getStandaloneComponentScope(type, rawImports);\n            if (scope.compilation.isPoisoned) {\n                return { dependencies: [] };\n            }\n            return {\n                dependencies: [\n                    ...scope.compilation.directives,\n                    ...scope.compilation.pipes,\n                    ...scope.compilation.ngModules,\n                ],\n            };\n        }\n        else {\n            if (!this.ownerNgModule.has(type)) {\n                // This component is orphan! No need to handle the error since the component rendering\n                // pipeline (e.g., view_container_ref) will check for this error based on configs.\n                return { dependencies: [] };\n            }\n            const scope = this.getNgModuleScope(this.ownerNgModule.get(type));\n            if (scope.compilation.isPoisoned) {\n                return { dependencies: [] };\n            }\n            return {\n                dependencies: [...scope.compilation.directives, ...scope.compilation.pipes],\n            };\n        }\n    }\n    /**\n     * @override\n     * This implementation does not make use of param scopeInfo since it assumes the scope info is\n     * already added to the type itself through methods like {@link ɵɵsetNgModuleScope}\n     */\n    registerNgModule(type, scopeInfo) {\n        if (!isNgModule(type)) {\n            throw new Error(`Attempting to register a Type which is not NgModule as NgModule: ${type}`);\n        }\n        // Lazily process the NgModules later when needed.\n        this.ngModulesWithSomeUnresolvedDecls.add(type);\n    }\n    /** @override */\n    clearScopeCacheFor(type) {\n        this.ngModulesScopeCache.delete(type);\n        this.standaloneComponentsScopeCache.delete(type);\n    }\n    /** @override */\n    getNgModuleScope(type) {\n        if (this.ngModulesScopeCache.has(type)) {\n            return this.ngModulesScopeCache.get(type);\n        }\n        const scope = this.computeNgModuleScope(type);\n        this.ngModulesScopeCache.set(type, scope);\n        return scope;\n    }\n    /** Compute NgModule scope afresh. */\n    computeNgModuleScope(type) {\n        const def = getNgModuleDef(type, true);\n        const scope = {\n            exported: { directives: new Set(), pipes: new Set() },\n            compilation: { directives: new Set(), pipes: new Set() },\n        };\n        // Analyzing imports\n        for (const imported of maybeUnwrapFn(def.imports)) {\n            if (isNgModule(imported)) {\n                const importedScope = this.getNgModuleScope(imported);\n                // When this module imports another, the imported module's exported directives and pipes\n                // are added to the compilation scope of this module.\n                addSet(importedScope.exported.directives, scope.compilation.directives);\n                addSet(importedScope.exported.pipes, scope.compilation.pipes);\n            }\n            else if (isStandalone(imported)) {\n                if (isDirective(imported) || isComponent(imported)) {\n                    scope.compilation.directives.add(imported);\n                }\n                else if (isPipe(imported)) {\n                    scope.compilation.pipes.add(imported);\n                }\n                else {\n                    // The standalone thing is neither a component nor a directive nor a pipe ... (what?)\n                    throw new RuntimeError(980 /* RuntimeErrorCode.RUNTIME_DEPS_INVALID_IMPORTED_TYPE */, 'The standalone imported type is neither a component nor a directive nor a pipe');\n                }\n            }\n            else {\n                // The import is neither a module nor a module-with-providers nor a standalone thing. This\n                // is going to be an error. So we short circuit.\n                scope.compilation.isPoisoned = true;\n                break;\n            }\n        }\n        // Analyzing declarations\n        if (!scope.compilation.isPoisoned) {\n            for (const decl of maybeUnwrapFn(def.declarations)) {\n                // Cannot declare another NgModule or a standalone thing\n                if (isNgModule(decl) || isStandalone(decl)) {\n                    scope.compilation.isPoisoned = true;\n                    break;\n                }\n                if (isPipe(decl)) {\n                    scope.compilation.pipes.add(decl);\n                }\n                else {\n                    // decl is either a directive or a component. The component may not yet have the ɵcmp due\n                    // to async compilation.\n                    scope.compilation.directives.add(decl);\n                }\n            }\n        }\n        // Analyzing exports\n        for (const exported of maybeUnwrapFn(def.exports)) {\n            if (isNgModule(exported)) {\n                // When this module exports another, the exported module's exported directives and pipes\n                // are added to both the compilation and exported scopes of this module.\n                const exportedScope = this.getNgModuleScope(exported);\n                // Based on the current logic there is no way to have poisoned exported scope. So no need to\n                // check for it.\n                addSet(exportedScope.exported.directives, scope.exported.directives);\n                addSet(exportedScope.exported.pipes, scope.exported.pipes);\n                // Some test toolings which run in JIT mode depend on this behavior that the exported scope\n                // should also be present in the compilation scope, even though AoT does not support this\n                // and it is also in odds with NgModule metadata definitions. Without this some tests in\n                // Google will fail.\n                addSet(exportedScope.exported.directives, scope.compilation.directives);\n                addSet(exportedScope.exported.pipes, scope.compilation.pipes);\n            }\n            else if (isPipe(exported)) {\n                scope.exported.pipes.add(exported);\n            }\n            else {\n                scope.exported.directives.add(exported);\n            }\n        }\n        return scope;\n    }\n    /** @override */\n    getStandaloneComponentScope(type, rawImports) {\n        if (this.standaloneComponentsScopeCache.has(type)) {\n            return this.standaloneComponentsScopeCache.get(type);\n        }\n        const ans = this.computeStandaloneComponentScope(type, rawImports);\n        this.standaloneComponentsScopeCache.set(type, ans);\n        return ans;\n    }\n    computeStandaloneComponentScope(type, rawImports) {\n        const ans = {\n            compilation: {\n                // Standalone components are always able to self-reference.\n                directives: new Set([type]),\n                pipes: new Set(),\n                ngModules: new Set(),\n            },\n        };\n        for (const rawImport of flatten(rawImports ?? [])) {\n            const imported = resolveForwardRef(rawImport);\n            try {\n                verifyStandaloneImport(imported, type);\n            }\n            catch (e) {\n                // Short-circuit if an import is not valid\n                ans.compilation.isPoisoned = true;\n                return ans;\n            }\n            if (isNgModule(imported)) {\n                ans.compilation.ngModules.add(imported);\n                const importedScope = this.getNgModuleScope(imported);\n                // Short-circuit if an imported NgModule has corrupted exported scope.\n                if (importedScope.exported.isPoisoned) {\n                    ans.compilation.isPoisoned = true;\n                    return ans;\n                }\n                addSet(importedScope.exported.directives, ans.compilation.directives);\n                addSet(importedScope.exported.pipes, ans.compilation.pipes);\n            }\n            else if (isPipe(imported)) {\n                ans.compilation.pipes.add(imported);\n            }\n            else if (isDirective(imported) || isComponent(imported)) {\n                ans.compilation.directives.add(imported);\n            }\n            else {\n                // The imported thing is not module/pipe/directive/component, so we error and short-circuit\n                // here\n                ans.compilation.isPoisoned = true;\n                return ans;\n            }\n        }\n        return ans;\n    }\n    /** @override */\n    isOrphanComponent(cmp) {\n        const def = getComponentDef(cmp);\n        if (!def || def.standalone) {\n            return false;\n        }\n        this.resolveNgModulesDecls();\n        return !this.ownerNgModule.has(cmp);\n    }\n}\nfunction addSet(sourceSet, targetSet) {\n    for (const m of sourceSet) {\n        targetSet.add(m);\n    }\n}\n/** The deps tracker to be used in the current Angular app in dev mode. */\nconst depsTracker = new DepsTracker();\nconst TEST_ONLY = { DepsTracker };\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    let styles = writeToHost ? tNode.styles : null;\n    let classes = writeToHost ? tNode.classes : null;\n    let mode = 0;\n    if (attrs !== null) {\n        for (let i = 0; i < attrs.length; i++) {\n            const value = attrs[i];\n            if (typeof value === 'number') {\n                mode = value;\n            }\n            else if (mode == 1 /* AttributeMarker.Classes */) {\n                classes = concatStringsWithSpace(classes, value);\n            }\n            else if (mode == 2 /* AttributeMarker.Styles */) {\n                const style = value;\n                const 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\nclass ComponentFactoryResolver extends ComponentFactoryResolver$1 {\n    ngModule;\n    /**\n     * @param ngModule The NgModuleRef to which all resolved factories are bound.\n     */\n    constructor(ngModule) {\n        super();\n        this.ngModule = ngModule;\n    }\n    resolveComponentFactory(component) {\n        ngDevMode && assertComponentType(component);\n        const componentDef = getComponentDef(component);\n        return new ComponentFactory(componentDef, this.ngModule);\n    }\n}\nfunction toRefArray(map, isInputMap) {\n    const array = [];\n    for (const publicName in map) {\n        if (!map.hasOwnProperty(publicName)) {\n            continue;\n        }\n        const value = map[publicName];\n        if (value === undefined) {\n            continue;\n        }\n        const isArray = Array.isArray(value);\n        const propName = isArray ? value[0] : value;\n        const flags = isArray ? value[1] : InputFlags.None;\n        if (isInputMap) {\n            array.push({\n                propName: propName,\n                templateName: publicName,\n                isSignal: (flags & InputFlags.SignalBased) !== 0,\n            });\n        }\n        else {\n            array.push({\n                propName: propName,\n                templateName: publicName,\n            });\n        }\n    }\n    return array;\n}\nfunction getNamespace(elementName) {\n    const name = elementName.toLowerCase();\n    return name === 'svg' ? SVG_NAMESPACE : name === 'math' ? MATH_ML_NAMESPACE : null;\n}\n/**\n * ComponentFactory interface implementation.\n */\nclass ComponentFactory extends ComponentFactory$1 {\n    componentDef;\n    ngModule;\n    selector;\n    componentType;\n    ngContentSelectors;\n    isBoundToModule;\n    get inputs() {\n        const componentDef = this.componentDef;\n        const inputTransforms = componentDef.inputTransforms;\n        const refArray = toRefArray(componentDef.inputs, true);\n        if (inputTransforms !== null) {\n            for (const input of refArray) {\n                if (inputTransforms.hasOwnProperty(input.propName)) {\n                    input.transform = inputTransforms[input.propName];\n                }\n            }\n        }\n        return refArray;\n    }\n    get outputs() {\n        return toRefArray(this.componentDef.outputs, false);\n    }\n    /**\n     * @param componentDef The component definition.\n     * @param ngModule The NgModuleRef to which the factory is bound.\n     */\n    constructor(componentDef, ngModule) {\n        super();\n        this.componentDef = componentDef;\n        this.ngModule = ngModule;\n        this.componentType = componentDef.type;\n        this.selector = stringifyCSSSelectorList(componentDef.selectors);\n        this.ngContentSelectors = componentDef.ngContentSelectors\n            ? componentDef.ngContentSelectors\n            : [];\n        this.isBoundToModule = !!ngModule;\n    }\n    create(injector, projectableNodes, rootSelectorOrNode, environmentInjector) {\n        const prevConsumer = setActiveConsumer$1(null);\n        try {\n            // Check if the component is orphan\n            if (ngDevMode &&\n                (typeof ngJitMode === 'undefined' || ngJitMode) &&\n                this.componentDef.debugInfo?.forbidOrphanRendering) {\n                if (depsTracker.isOrphanComponent(this.componentType)) {\n                    throw new RuntimeError(981 /* RuntimeErrorCode.RUNTIME_DEPS_ORPHAN_COMPONENT */, `Orphan component found! Trying to render the component ${debugStringifyTypeForError(this.componentType)} without first loading the NgModule that declares it. It is recommended to make this component standalone in order to avoid this error. If this is not possible now, import the component's NgModule in the appropriate NgModule, or the standalone component in which you are trying to render this component. If this is a lazy import, load the NgModule lazily as well and use its module injector.`);\n                }\n            }\n            environmentInjector = environmentInjector || this.ngModule;\n            let realEnvironmentInjector = environmentInjector instanceof EnvironmentInjector\n                ? environmentInjector\n                : environmentInjector?.injector;\n            if (realEnvironmentInjector && this.componentDef.getStandaloneInjector !== null) {\n                realEnvironmentInjector =\n                    this.componentDef.getStandaloneInjector(realEnvironmentInjector) ||\n                        realEnvironmentInjector;\n            }\n            const rootViewInjector = realEnvironmentInjector\n                ? new ChainedInjector(injector, realEnvironmentInjector)\n                : injector;\n            const rendererFactory = rootViewInjector.get(RendererFactory2, null);\n            if (rendererFactory === null) {\n                throw new RuntimeError(407 /* RuntimeErrorCode.RENDERER_NOT_FOUND */, ngDevMode &&\n                    'Angular was not able to inject a renderer (RendererFactory2). ' +\n                        'Likely this is due to a broken DI hierarchy. ' +\n                        'Make sure that any injector used to create this component has a correct parent.');\n            }\n            const sanitizer = rootViewInjector.get(Sanitizer, null);\n            const changeDetectionScheduler = rootViewInjector.get(ChangeDetectionScheduler, null);\n            const environment = {\n                rendererFactory,\n                sanitizer,\n                changeDetectionScheduler,\n            };\n            const 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\n            // selector.\n            const elementName = this.componentDef.selectors[0][0] || 'div';\n            const hostRNode = rootSelectorOrNode\n                ? locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation, rootViewInjector)\n                : createElementNode(hostRenderer, elementName, getNamespace(elementName));\n            let rootFlags = 512 /* LViewFlags.IsRoot */;\n            if (this.componentDef.signals) {\n                rootFlags |= 4096 /* LViewFlags.SignalView */;\n            }\n            else if (!this.componentDef.onPush) {\n                rootFlags |= 16 /* LViewFlags.CheckAlways */;\n            }\n            let hydrationInfo = null;\n            if (hostRNode !== null) {\n                hydrationInfo = retrieveHydrationInfo(hostRNode, rootViewInjector, true /* isRootView */);\n            }\n            // Create the root view. Uses empty TView and ContentTemplate.\n            const rootTView = createTView(0 /* TViewType.Root */, null, null, 1, 0, null, null, null, null, null, null);\n            const rootLView = createLView(null, rootTView, null, rootFlags, null, null, environment, hostRenderer, rootViewInjector, null, hydrationInfo);\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);\n            let component;\n            let tElementNode;\n            let componentView = null;\n            try {\n                const rootComponentDef = this.componentDef;\n                let rootDirectives;\n                let hostDirectiveDefs = null;\n                if (rootComponentDef.findHostDirectiveDefs) {\n                    rootDirectives = [];\n                    hostDirectiveDefs = new Map();\n                    rootComponentDef.findHostDirectiveDefs(rootComponentDef, rootDirectives, hostDirectiveDefs);\n                    rootDirectives.push(rootComponentDef);\n                    ngDevMode && assertNoDuplicateDirectives(rootDirectives);\n                }\n                else {\n                    rootDirectives = [rootComponentDef];\n                }\n                const hostTNode = createRootComponentTNode(rootLView, hostRNode);\n                componentView = createRootComponentView(hostTNode, hostRNode, rootComponentDef, rootDirectives, rootLView, environment, hostRenderer);\n                tElementNode = getTNode(rootTView, HEADER_OFFSET);\n                // TODO(crisbeto): in practice `hostRNode` should always be defined, but there are some\n                // tests where the renderer is mocked out and `undefined` is returned. We should update the\n                // tests so that this check can be removed.\n                if (hostRNode) {\n                    setRootNodeAttributes(hostRenderer, rootComponentDef, hostRNode, rootSelectorOrNode);\n                }\n                if (projectableNodes !== undefined) {\n                    projectNodes(tElementNode, this.ngContentSelectors, projectableNodes);\n                }\n                // TODO: should LifecycleHooksFeature and other host features be generated by the compiler\n                // and executed here? Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n                component = createRootComponent(componentView, rootComponentDef, rootDirectives, hostDirectiveDefs, rootLView, [LifecycleHooksFeature]);\n                renderView(rootTView, rootLView, null);\n            }\n            catch (e) {\n                // Stop tracking the views if creation failed since\n                // the consumer won't have a way to dereference them.\n                if (componentView !== null) {\n                    unregisterLView(componentView);\n                }\n                unregisterLView(rootLView);\n                throw e;\n            }\n            finally {\n                leaveView();\n            }\n            return new ComponentRef(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);\n        }\n        finally {\n            setActiveConsumer$1(prevConsumer);\n        }\n    }\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 */\nclass ComponentRef extends ComponentRef$1 {\n    location;\n    _rootLView;\n    _tNode;\n    instance;\n    hostView;\n    changeDetectorRef;\n    componentType;\n    previousInputValues = null;\n    constructor(componentType, instance, location, _rootLView, _tNode) {\n        super();\n        this.location = location;\n        this._rootLView = _rootLView;\n        this._tNode = _tNode;\n        this.instance = instance;\n        this.hostView = this.changeDetectorRef = new ViewRef$1(_rootLView, undefined /* _cdRefInjectingView */, false /* notifyErrorHandler */);\n        this.componentType = componentType;\n    }\n    setInput(name, value) {\n        const inputData = this._tNode.inputs;\n        let dataValue;\n        if (inputData !== null && (dataValue = inputData[name])) {\n            this.previousInputValues ??= new Map();\n            // Do not set the input if it is the same as the last value\n            // This behavior matches `bindingUpdated` when binding inputs in templates.\n            if (this.previousInputValues.has(name) &&\n                Object.is(this.previousInputValues.get(name), value)) {\n                return;\n            }\n            const lView = this._rootLView;\n            setInputsForProperty(lView[TVIEW], lView, dataValue, name, value);\n            this.previousInputValues.set(name, value);\n            const childComponentLView = getComponentLViewByIndex(this._tNode.index, lView);\n            markViewDirty(childComponentLView, 1 /* NotificationSource.SetInput */);\n        }\n        else {\n            if (ngDevMode) {\n                const cmpNameForError = stringifyForError(this.componentType);\n                let message = `Can't set value of the '${name}' input on the '${cmpNameForError}' component. `;\n                message += `Make sure that the '${name}' property is annotated with @Input() or a mapped @Input('${name}') exists.`;\n                reportUnknownPropertyError(message);\n            }\n        }\n    }\n    get injector() {\n        return new NodeInjector(this._tNode, this._rootLView);\n    }\n    destroy() {\n        this.hostView.destroy();\n    }\n    onDestroy(callback) {\n        this.hostView.onDestroy(callback);\n    }\n}\n/** Creates a TNode that can be used to instantiate a root component. */\nfunction createRootComponentTNode(lView, rNode) {\n    const tView = lView[TVIEW];\n    const index = HEADER_OFFSET;\n    ngDevMode && assertIndexInRange(lView, index);\n    lView[index] = rNode;\n    // '#host' is added here as we don't know the real host DOM name (we don't want to read it) and at\n    // the same time we want to communicate the debug `TNode` that this is a special `TNode`\n    // representing a host element.\n    return getOrCreateTNode(tView, index, 2 /* TNodeType.Element */, '#host', null);\n}\n/**\n * Creates the root component view and the root component node.\n *\n * @param hostRNode Render host element.\n * @param rootComponentDef ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param rendererFactory Factory to be used for creating child renderers.\n * @param hostRenderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nfunction createRootComponentView(tNode, hostRNode, rootComponentDef, rootDirectives, rootView, environment, hostRenderer) {\n    const tView = rootView[TVIEW];\n    applyRootComponentStyling(rootDirectives, tNode, hostRNode, hostRenderer);\n    // Hydration info is on the host element and needs to be retrieved\n    // and passed to the component LView.\n    let hydrationInfo = null;\n    if (hostRNode !== null) {\n        hydrationInfo = retrieveHydrationInfo(hostRNode, rootView[INJECTOR]);\n    }\n    const viewRenderer = environment.rendererFactory.createRenderer(hostRNode, rootComponentDef);\n    const componentView = createLView(rootView, getOrCreateComponentTView(rootComponentDef), null, getInitialLViewFlagsFromDef(rootComponentDef), rootView[tNode.index], tNode, environment, viewRenderer, null, null, hydrationInfo);\n    if (tView.firstCreatePass) {\n        markAsComponentHost(tView, tNode, rootDirectives.length - 1);\n    }\n    addToEndOfViewTree(rootView, componentView);\n    // Store component view at node index, with node as the HOST\n    return (rootView[tNode.index] = componentView);\n}\n/** Sets up the styling information on a root component. */\nfunction applyRootComponentStyling(rootDirectives, tNode, rNode, hostRenderer) {\n    for (const def of rootDirectives) {\n        tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n    }\n    if (tNode.mergedAttrs !== null) {\n        computeStaticStyling(tNode, tNode.mergedAttrs, true);\n        if (rNode !== null) {\n            setupStaticAttributes(hostRenderer, rNode, tNode);\n        }\n    }\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, rootComponentDef, rootDirectives, hostDirectiveDefs, rootLView, hostFeatures) {\n    const rootTNode = getCurrentTNode();\n    ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');\n    const tView = rootLView[TVIEW];\n    const native = getNativeByTNode(rootTNode, rootLView);\n    initializeDirectives(tView, rootLView, rootTNode, rootDirectives, null, hostDirectiveDefs);\n    for (let i = 0; i < rootDirectives.length; i++) {\n        const directiveIndex = rootTNode.directiveStart + i;\n        const directiveInstance = getNodeInjectable(rootLView, tView, directiveIndex, rootTNode);\n        attachPatchData(directiveInstance, rootLView);\n    }\n    invokeDirectivesHostBindings(tView, rootLView, rootTNode);\n    if (native) {\n        attachPatchData(native, rootLView);\n    }\n    // We're guaranteed for the `componentOffset` to be positive here\n    // since a root component always matches a component def.\n    ngDevMode &&\n        assertGreaterThan(rootTNode.componentOffset, -1, 'componentOffset must be great than -1');\n    const component = getNodeInjectable(rootLView, tView, rootTNode.directiveStart + rootTNode.componentOffset, rootTNode);\n    componentView[CONTEXT] = rootLView[CONTEXT] = component;\n    if (hostFeatures !== null) {\n        for (const feature of hostFeatures) {\n            feature(component, rootComponentDef);\n        }\n    }\n    // We want to generate an empty QueryList for root content queries for backwards\n    // compatibility with ViewEngine.\n    executeContentQueries(tView, rootTNode, rootLView);\n    return component;\n}\n/** Sets the static attributes on a root component. */\nfunction setRootNodeAttributes(hostRenderer, componentDef, hostRNode, rootSelectorOrNode) {\n    if (rootSelectorOrNode) {\n        // The placeholder will be replaced with the actual version at build time.\n        setUpAttributes(hostRenderer, hostRNode, ['ng-version', '19.0.5']);\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        const { attrs, classes } = extractAttrsAndClassesFromSelector(componentDef.selectors[0]);\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/** Projects the `projectableNodes` that were specified when creating a root component. */\nfunction projectNodes(tNode, ngContentSelectors, projectableNodes) {\n    const projection = (tNode.projection = []);\n    for (let i = 0; i < ngContentSelectors.length; i++) {\n        const 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 && nodesforSlot.length ? Array.from(nodesforSlot) : null);\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 * ```ts\n * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});\n * ```\n */\nfunction LifecycleHooksFeature() {\n    const tNode = getCurrentTNode();\n    ngDevMode && assertDefined(tNode, 'TNode is required');\n    registerPostOrderHooks(getLView()[TVIEW], tNode);\n}\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.\n *\n * @usageNotes\n *\n * The example below demonstrates how the `createComponent` function can be used\n * to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef,\n * so that it gets included into change detection cycles.\n *\n * Note: the example uses standalone components, but the function can also be used for\n * non-standalone components (declared in an NgModule) as well.\n *\n * ```angular-ts\n * @Component({\n *   standalone: true,\n *   selector: 'dynamic',\n *   template: `<span>This is a content of a dynamic component.</span>`,\n * })\n * class DynamicComponent {\n *   vcr = inject(ViewContainerRef);\n * }\n *\n * @Component({\n *   standalone: true,\n *   selector: 'app',\n *   template: `<main>Hi! This is the main content.</main>`,\n * })\n * class AppComponent {\n *   vcr = inject(ViewContainerRef);\n *\n *   ngAfterViewInit() {\n *     const compRef = this.vcr.createComponent(DynamicComponent);\n *     compRef.changeDetectorRef.detectChanges();\n *   }\n * }\n * ```\n *\n * @see {@link ComponentRef}\n * @see {@link EmbeddedViewRef}\n *\n * @publicApi\n */\nclass ViewContainerRef {\n    /**\n     * @internal\n     * @nocollapse\n     */\n    static __NG_ELEMENT_ID__ = injectViewContainerRef;\n}\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() {\n    const previousTNode = getCurrentTNode();\n    return createContainerRef(previousTNode, getLView());\n}\nconst VE_ViewContainerRef = ViewContainerRef;\n// TODO(alxhub): cleaning up this indirection triggers a subtle bug in Closure in g3. Once the fix\n// for that lands, this can be cleaned up.\nconst R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {\n    _lContainer;\n    _hostTNode;\n    _hostLView;\n    constructor(_lContainer, _hostTNode, _hostLView) {\n        super();\n        this._lContainer = _lContainer;\n        this._hostTNode = _hostTNode;\n        this._hostLView = _hostLView;\n    }\n    get element() {\n        return createElementRef(this._hostTNode, this._hostLView);\n    }\n    get injector() {\n        return new NodeInjector(this._hostTNode, this._hostLView);\n    }\n    /** @deprecated No replacement */\n    get parentInjector() {\n        const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostLView);\n        if (hasParentInjector(parentLocation)) {\n            const parentView = getParentInjectorView(parentLocation, this._hostLView);\n            const injectorIndex = getParentInjectorIndex(parentLocation);\n            ngDevMode && assertNodeInjector(parentView, injectorIndex);\n            const parentTNode = parentView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];\n            return new NodeInjector(parentTNode, parentView);\n        }\n        else {\n            return new NodeInjector(null, this._hostLView);\n        }\n    }\n    clear() {\n        while (this.length > 0) {\n            this.remove(this.length - 1);\n        }\n    }\n    get(index) {\n        const viewRefs = getViewRefs(this._lContainer);\n        return (viewRefs !== null && viewRefs[index]) || null;\n    }\n    get length() {\n        return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n    }\n    createEmbeddedView(templateRef, context, indexOrOptions) {\n        let index;\n        let injector;\n        if (typeof indexOrOptions === 'number') {\n            index = indexOrOptions;\n        }\n        else if (indexOrOptions != null) {\n            index = indexOrOptions.index;\n            injector = indexOrOptions.injector;\n        }\n        const dehydratedView = findMatchingDehydratedView(this._lContainer, templateRef.ssrId);\n        const viewRef = templateRef.createEmbeddedViewImpl(context || {}, injector, dehydratedView);\n        this.insertImpl(viewRef, index, shouldAddViewToDom(this._hostTNode, dehydratedView));\n        return viewRef;\n    }\n    createComponent(componentFactoryOrType, indexOrOptions, injector, projectableNodes, environmentInjector) {\n        const isComponentFactory = componentFactoryOrType && !isType(componentFactoryOrType);\n        let index;\n        // This function supports 2 signatures and we need to handle options correctly for both:\n        //   1. When first argument is a Component type. This signature also requires extra\n        //      options to be provided as object (more ergonomic option).\n        //   2. First argument is a Component factory. In this case extra options are represented as\n        //      positional arguments. This signature is less ergonomic and will be deprecated.\n        if (isComponentFactory) {\n            if (ngDevMode) {\n                assertEqual(typeof indexOrOptions !== 'object', true, 'It looks like Component factory was provided as the first argument ' +\n                    'and an options object as the second argument. This combination of arguments ' +\n                    'is incompatible. You can either change the first argument to provide Component ' +\n                    'type or change the second argument to be a number (representing an index at ' +\n                    \"which to insert the new component's host view into this container)\");\n            }\n            index = indexOrOptions;\n        }\n        else {\n            if (ngDevMode) {\n                assertDefined(getComponentDef(componentFactoryOrType), `Provided Component class doesn't contain Component definition. ` +\n                    `Please check whether provided class has @Component decorator.`);\n                assertEqual(typeof indexOrOptions !== 'number', true, 'It looks like Component type was provided as the first argument ' +\n                    \"and a number (representing an index at which to insert the new component's \" +\n                    'host view into this container as the second argument. This combination of arguments ' +\n                    'is incompatible. Please use an object as the second argument instead.');\n            }\n            const options = (indexOrOptions || {});\n            if (ngDevMode && options.environmentInjector && options.ngModuleRef) {\n                throwError(`Cannot pass both environmentInjector and ngModuleRef options to createComponent().`);\n            }\n            index = options.index;\n            injector = options.injector;\n            projectableNodes = options.projectableNodes;\n            environmentInjector = options.environmentInjector || options.ngModuleRef;\n        }\n        const componentFactory = isComponentFactory\n            ? componentFactoryOrType\n            : new ComponentFactory(getComponentDef(componentFactoryOrType));\n        const contextInjector = injector || this.parentInjector;\n        // If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.\n        if (!environmentInjector && componentFactory.ngModule == null) {\n            // For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that\n            // an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an\n            // `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based\n            // use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try\n            // using a provided injector first, then fall back to the parent injector of this\n            // `ViewContainerRef` instance.\n            //\n            // For the factory-less case, it's critical to establish a connection with the module\n            // injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),\n            // so that a component can use DI tokens provided in MgModules. For this reason, we can not\n            // rely on the provided injector, since it might be detached from the DI tree (for example, if\n            // it was created via `Injector.create` without specifying a parent injector, or if an\n            // injector is retrieved from an `NgModuleRef` created via `createNgModule` using an\n            // NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent\n            // injector, which is normally connected to the DI tree, which includes module injector\n            // subtree.\n            const _injector = isComponentFactory ? contextInjector : this.parentInjector;\n            // DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||\n            // undefined` expression which seems to cause internal google apps to fail. This is documented\n            // in the following internal bug issue: go/b/142967802\n            const result = _injector.get(EnvironmentInjector, null);\n            if (result) {\n                environmentInjector = result;\n            }\n        }\n        const componentDef = getComponentDef(componentFactory.componentType ?? {});\n        const dehydratedView = findMatchingDehydratedView(this._lContainer, componentDef?.id ?? null);\n        const rNode = dehydratedView?.firstChild ?? null;\n        const componentRef = componentFactory.create(contextInjector, projectableNodes, rNode, environmentInjector);\n        this.insertImpl(componentRef.hostView, index, shouldAddViewToDom(this._hostTNode, dehydratedView));\n        return componentRef;\n    }\n    insert(viewRef, index) {\n        return this.insertImpl(viewRef, index, true);\n    }\n    insertImpl(viewRef, index, addToDOM) {\n        const lView = viewRef._lView;\n        if (ngDevMode && viewRef.destroyed) {\n            throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n        }\n        if (viewAttachedToContainer(lView)) {\n            // If view is already attached, detach it first so we clean up references appropriately.\n            const 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                const 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                const prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]);\n                prevVCRef.detach(prevVCRef.indexOf(viewRef));\n            }\n        }\n        // Logical operation of adding `LView` to `LContainer`\n        const adjustedIdx = this._adjustIndex(index);\n        const lContainer = this._lContainer;\n        addLViewToLContainer(lContainer, lView, adjustedIdx, addToDOM);\n        viewRef.attachToViewContainerRef();\n        addToArray(getOrCreateViewRefs(lContainer), adjustedIdx, viewRef);\n        return viewRef;\n    }\n    move(viewRef, newIndex) {\n        if (ngDevMode && viewRef.destroyed) {\n            throw new Error('Cannot move a destroyed View in a ViewContainer!');\n        }\n        return this.insert(viewRef, newIndex);\n    }\n    indexOf(viewRef) {\n        const viewRefsArr = getViewRefs(this._lContainer);\n        return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n    }\n    remove(index) {\n        const adjustedIdx = this._adjustIndex(index, -1);\n        const detachedView = detachView(this._lContainer, adjustedIdx);\n        if (detachedView) {\n            // Before destroying the view, remove it from the container's array of `ViewRef`s.\n            // This ensures the view container length is updated before calling\n            // `destroyLView`, which could recursively call view container methods that\n            // rely on an accurate container length.\n            // (e.g. a method on this view container being called by a child directive's OnDestroy\n            // lifecycle hook)\n            removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx);\n            destroyLView(detachedView[TVIEW], detachedView);\n        }\n    }\n    detach(index) {\n        const adjustedIdx = this._adjustIndex(index, -1);\n        const view = detachView(this._lContainer, adjustedIdx);\n        const wasDetached = view && removeFromArray(getOrCreateViewRefs(this._lContainer), adjustedIdx) != null;\n        return wasDetached ? new ViewRef$1(view) : null;\n    }\n    _adjustIndex(index, 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};\nfunction getViewRefs(lContainer) {\n    return lContainer[VIEW_REFS];\n}\nfunction getOrCreateViewRefs(lContainer) {\n    return (lContainer[VIEW_REFS] || (lContainer[VIEW_REFS] = []));\n}\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostLView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nfunction createContainerRef(hostTNode, hostLView) {\n    ngDevMode && assertTNodeType(hostTNode, 12 /* TNodeType.AnyContainer */ | 3 /* TNodeType.AnyRNode */);\n    let lContainer;\n    const slotValue = hostLView[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        // An LContainer anchor can not be `null`, but we set it here temporarily\n        // and update to the actual value later in this function (see\n        // `_locateOrCreateAnchorNode`).\n        lContainer = createLContainer(slotValue, hostLView, null, hostTNode);\n        hostLView[hostTNode.index] = lContainer;\n        addToEndOfViewTree(hostLView, lContainer);\n    }\n    _locateOrCreateAnchorNode(lContainer, hostLView, hostTNode, slotValue);\n    return new R3ViewContainerRef(lContainer, hostTNode, hostLView);\n}\n/**\n * Creates and inserts a comment node that acts as an anchor for a view container.\n *\n * If the host is a regular element, we have to insert a comment node manually which will\n * be used as an anchor when inserting elements. In this specific case we use low-level DOM\n * manipulation to insert it.\n */\nfunction insertAnchorNode(hostLView, hostTNode) {\n    const renderer = hostLView[RENDERER];\n    ngDevMode && ngDevMode.rendererCreateComment++;\n    const commentNode = renderer.createComment(ngDevMode ? 'container' : '');\n    const hostNative = getNativeByTNode(hostTNode, hostLView);\n    const parentOfHostNative = nativeParentNode(renderer, hostNative);\n    nativeInsertBefore(renderer, parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative), false);\n    return commentNode;\n}\nlet _locateOrCreateAnchorNode = createAnchorNode;\nlet _populateDehydratedViewsInLContainer = () => false; // noop by default\n/**\n * Looks up dehydrated views that belong to a given LContainer and populates\n * this information into the `LContainer[DEHYDRATED_VIEWS]` slot. When running\n * in client-only mode, this function is a noop.\n *\n * @param lContainer LContainer that should be populated.\n * @param tNode Corresponding TNode.\n * @param hostLView LView that hosts LContainer.\n * @returns a boolean flag that indicates whether a populating operation\n *   was successful. The operation might be unsuccessful in case is has completed\n *   previously, we are rendering in client-only mode or this content is located\n *   in a skip hydration section.\n */\nfunction populateDehydratedViewsInLContainer(lContainer, tNode, hostLView) {\n    return _populateDehydratedViewsInLContainer(lContainer, tNode, hostLView);\n}\n/**\n * Regular creation mode: an anchor is created and\n * assigned to the `lContainer[NATIVE]` slot.\n */\nfunction createAnchorNode(lContainer, hostLView, hostTNode, slotValue) {\n    // We already have a native element (anchor) set, return.\n    if (lContainer[NATIVE])\n        return;\n    let commentNode;\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 & 8 /* TNodeType.ElementContainer */) {\n        commentNode = unwrapRNode(slotValue);\n    }\n    else {\n        commentNode = insertAnchorNode(hostLView, hostTNode);\n    }\n    lContainer[NATIVE] = commentNode;\n}\n/**\n * Hydration logic that looks up all dehydrated views in this container\n * and puts them into `lContainer[DEHYDRATED_VIEWS]` slot.\n *\n * @returns a boolean flag that indicates whether a populating operation\n *   was successful. The operation might be unsuccessful in case is has completed\n *   previously, we are rendering in client-only mode or this content is located\n *   in a skip hydration section.\n */\nfunction populateDehydratedViewsInLContainerImpl(lContainer, tNode, hostLView) {\n    // We already have a native element (anchor) set and the process\n    // of finding dehydrated views happened (so the `lContainer[DEHYDRATED_VIEWS]`\n    // is not null), exit early.\n    if (lContainer[NATIVE] && lContainer[DEHYDRATED_VIEWS]) {\n        return true;\n    }\n    const hydrationInfo = hostLView[HYDRATION];\n    const noOffsetIndex = tNode.index - HEADER_OFFSET;\n    const isNodeCreationMode = !hydrationInfo ||\n        isInSkipHydrationBlock(tNode) ||\n        isDisconnectedNode$1(hydrationInfo, noOffsetIndex);\n    // Regular creation mode.\n    if (isNodeCreationMode) {\n        return false;\n    }\n    // Hydration mode, looking up an anchor node and dehydrated views in DOM.\n    const currentRNode = getSegmentHead(hydrationInfo, noOffsetIndex);\n    const serializedViews = hydrationInfo.data[CONTAINERS]?.[noOffsetIndex];\n    ngDevMode &&\n        assertDefined(serializedViews, 'Unexpected state: no hydration info available for a given TNode, ' +\n            'which represents a view container.');\n    const [commentNode, dehydratedViews] = locateDehydratedViewsInContainer(currentRNode, serializedViews);\n    if (ngDevMode) {\n        validateMatchingNode(commentNode, Node.COMMENT_NODE, null, hostLView, tNode, true);\n        // Do not throw in case this node is already claimed (thus `false` as a second\n        // argument). If this container is created based on an `<ng-template>`, the comment\n        // node would be already claimed from the `template` instruction. If an element acts\n        // as an anchor (e.g. <div #vcRef>), a separate comment node would be created/located,\n        // so we need to claim it here.\n        markRNodeAsClaimedByHydration(commentNode, false);\n    }\n    lContainer[NATIVE] = commentNode;\n    lContainer[DEHYDRATED_VIEWS] = dehydratedViews;\n    return true;\n}\nfunction locateOrCreateAnchorNode(lContainer, hostLView, hostTNode, slotValue) {\n    if (!_populateDehydratedViewsInLContainer(lContainer, hostTNode, hostLView)) {\n        // Populating dehydrated views operation returned `false`, which indicates\n        // that the logic was running in client-only mode, this an anchor comment\n        // node should be created for this container.\n        createAnchorNode(lContainer, hostLView, hostTNode, slotValue);\n    }\n}\nfunction enableLocateOrCreateContainerRefImpl() {\n    _locateOrCreateAnchorNode = locateOrCreateAnchorNode;\n    _populateDehydratedViewsInLContainer = populateDehydratedViewsInLContainerImpl;\n}\n\nclass LQuery_ {\n    queryList;\n    matches = null;\n    constructor(queryList) {\n        this.queryList = queryList;\n    }\n    clone() {\n        return new LQuery_(this.queryList);\n    }\n    setDirty() {\n        this.queryList.setDirty();\n    }\n}\nclass LQueries_ {\n    queries;\n    constructor(queries = []) {\n        this.queries = queries;\n    }\n    createEmbeddedView(tView) {\n        const tQueries = tView.queries;\n        if (tQueries !== null) {\n            const noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n            const 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 (let i = 0; i < noOfInheritedQueries; i++) {\n                const tQuery = tQueries.getByIndex(i);\n                const parentLQuery = this.queries[tQuery.indexInDeclarationView];\n                viewLQueries.push(parentLQuery.clone());\n            }\n            return new LQueries_(viewLQueries);\n        }\n        return null;\n    }\n    insertView(tView) {\n        this.dirtyQueriesWithMatches(tView);\n    }\n    detachView(tView) {\n        this.dirtyQueriesWithMatches(tView);\n    }\n    finishViewCreation(tView) {\n        this.dirtyQueriesWithMatches(tView);\n    }\n    dirtyQueriesWithMatches(tView) {\n        for (let i = 0; i < this.queries.length; i++) {\n            if (getTQuery(tView, i).matches !== null) {\n                this.queries[i].setDirty();\n            }\n        }\n    }\n}\nclass TQueryMetadata_ {\n    flags;\n    read;\n    predicate;\n    constructor(predicate, flags, read = null) {\n        this.flags = flags;\n        this.read = read;\n        // Compiler might not be able to pre-optimize and split multiple selectors.\n        if (typeof predicate === 'string') {\n            this.predicate = splitQueryMultiSelectors(predicate);\n        }\n        else {\n            this.predicate = predicate;\n        }\n    }\n}\nclass TQueries_ {\n    queries;\n    constructor(queries = []) {\n        this.queries = queries;\n    }\n    elementStart(tView, tNode) {\n        ngDevMode &&\n            assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n        for (let i = 0; i < this.queries.length; i++) {\n            this.queries[i].elementStart(tView, tNode);\n        }\n    }\n    elementEnd(tNode) {\n        for (let i = 0; i < this.queries.length; i++) {\n            this.queries[i].elementEnd(tNode);\n        }\n    }\n    embeddedTView(tNode) {\n        let queriesForTemplateRef = null;\n        for (let i = 0; i < this.length; i++) {\n            const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n            const 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    template(tView, tNode) {\n        ngDevMode &&\n            assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n        for (let i = 0; i < this.queries.length; i++) {\n            this.queries[i].template(tView, tNode);\n        }\n    }\n    getByIndex(index) {\n        ngDevMode && assertIndexInRange(this.queries, index);\n        return this.queries[index];\n    }\n    get length() {\n        return this.queries.length;\n    }\n    track(tquery) {\n        this.queries.push(tquery);\n    }\n}\nclass TQuery_ {\n    metadata;\n    matches = null;\n    indexInDeclarationView = -1;\n    crossesNgTemplate = false;\n    /**\n     * A node index on which a query was declared (-1 for view queries and ones inherited from the\n     * declaration template). We use this index (alongside with _appliesToNextNode flag) to know\n     * when to apply content queries to elements in a template.\n     */\n    _declarationNodeIndex;\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    _appliesToNextNode = true;\n    constructor(metadata, nodeIndex = -1) {\n        this.metadata = metadata;\n        this._declarationNodeIndex = nodeIndex;\n    }\n    elementStart(tView, tNode) {\n        if (this.isApplyingToNode(tNode)) {\n            this.matchTNode(tView, tNode);\n        }\n    }\n    elementEnd(tNode) {\n        if (this._declarationNodeIndex === tNode.index) {\n            this._appliesToNextNode = false;\n        }\n    }\n    template(tView, tNode) {\n        this.elementStart(tView, tNode);\n    }\n    embeddedTView(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    isApplyingToNode(tNode) {\n        if (this._appliesToNextNode &&\n            (this.metadata.flags & 1 /* QueryFlags.descendants */) !== 1 /* QueryFlags.descendants */) {\n            const declarationNodeIdx = this._declarationNodeIndex;\n            let parent = 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 !== null &&\n                parent.type & 8 /* TNodeType.ElementContainer */ &&\n                parent.index !== declarationNodeIdx) {\n                parent = parent.parent;\n            }\n            return declarationNodeIdx === (parent !== null ? parent.index : -1);\n        }\n        return this._appliesToNextNode;\n    }\n    matchTNode(tView, tNode) {\n        const predicate = this.metadata.predicate;\n        if (Array.isArray(predicate)) {\n            for (let i = 0; i < predicate.length; i++) {\n                const name = predicate[i];\n                this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name));\n                // Also try matching the name to a provider since strings can be used as DI tokens too.\n                this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false));\n            }\n        }\n        else {\n            if (predicate === TemplateRef) {\n                if (tNode.type & 4 /* TNodeType.Container */) {\n                    this.matchTNodeWithReadOption(tView, tNode, -1);\n                }\n            }\n            else {\n                this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false));\n            }\n        }\n    }\n    matchTNodeWithReadOption(tView, tNode, nodeMatchIdx) {\n        if (nodeMatchIdx !== null) {\n            const read = this.metadata.read;\n            if (read !== null) {\n                if (read === ElementRef ||\n                    read === ViewContainerRef ||\n                    (read === TemplateRef && tNode.type & 4 /* TNodeType.Container */)) {\n                    this.addMatch(tNode.index, -2);\n                }\n                else {\n                    const 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    addMatch(tNodeIdx, matchIdx) {\n        if (this.matches === null) {\n            this.matches = [tNodeIdx, matchIdx];\n        }\n        else {\n            this.matches.push(tNodeIdx, matchIdx);\n        }\n    }\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    const localNames = tNode.localNames;\n    if (localNames !== null) {\n        for (let 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 /* TNodeType.AnyRNode */ | 8 /* TNodeType.ElementContainer */)) {\n        return createElementRef(tNode, currentView);\n    }\n    else if (tNode.type & 4 /* TNodeType.Container */) {\n        return createTemplateRef(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(tNode, lView);\n    }\n    else if (read === TemplateRef) {\n        return createTemplateRef(tNode, lView);\n    }\n    else if (read === ViewContainerRef) {\n        ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */);\n        return createContainerRef(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    const lQuery = lView[QUERIES].queries[queryIndex];\n    if (lQuery.matches === null) {\n        const tViewData = tView.data;\n        const tQueryMatches = tQuery.matches;\n        const result = [];\n        for (let i = 0; tQueryMatches !== null && i < tQueryMatches.length; i += 2) {\n            const 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 && assertIndexInRange(tViewData, matchedNodeIdx);\n                const 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    const tQuery = tView.queries.getByIndex(queryIndex);\n    const tQueryMatches = tQuery.matches;\n    if (tQueryMatches !== null) {\n        const lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex);\n        for (let i = 0; i < tQueryMatches.length; i += 2) {\n            const tNodeIdx = tQueryMatches[i];\n            if (tNodeIdx > 0) {\n                result.push(lViewResults[i / 2]);\n            }\n            else {\n                const childQueryIndex = tQueryMatches[i + 1];\n                const declarationLContainer = lView[-tNodeIdx];\n                ngDevMode && assertLContainer(declarationLContainer);\n                // collect matches for views inserted in this container\n                for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) {\n                    const embeddedLView = declarationLContainer[i];\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                    const embeddedLViews = declarationLContainer[MOVED_VIEWS];\n                    for (let i = 0; i < embeddedLViews.length; i++) {\n                        const embeddedLView = embeddedLViews[i];\n                        collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n                    }\n                }\n            }\n        }\n    }\n    return result;\n}\nfunction loadQueryInternal(lView, queryIndex) {\n    ngDevMode &&\n        assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n    ngDevMode && assertIndexInRange(lView[QUERIES].queries, queryIndex);\n    return lView[QUERIES].queries[queryIndex].queryList;\n}\n/**\n * Creates a new instance of LQuery and returns its index in the collection of LQuery objects.\n *\n * @returns index in the collection of LQuery objects\n */\nfunction createLQuery(tView, lView, flags) {\n    const queryList = new QueryList((flags & 4 /* QueryFlags.emitDistinctChangesOnly */) === 4 /* QueryFlags.emitDistinctChangesOnly */);\n    storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n    const lQueries = (lView[QUERIES] ??= new LQueries_()).queries;\n    return lQueries.push(new LQuery_(queryList)) - 1;\n}\nfunction createViewQuery(predicate, flags, read) {\n    ngDevMode && assertNumber(flags, 'Expecting flags');\n    const tView = getTView();\n    if (tView.firstCreatePass) {\n        createTQuery(tView, new TQueryMetadata_(predicate, flags, read), -1);\n        if ((flags & 2 /* QueryFlags.isStatic */) === 2 /* QueryFlags.isStatic */) {\n            tView.staticViewQueries = true;\n        }\n    }\n    return createLQuery(tView, getLView(), flags);\n}\nfunction createContentQuery(directiveIndex, predicate, flags, read) {\n    ngDevMode && assertNumber(flags, 'Expecting flags');\n    const tView = getTView();\n    if (tView.firstCreatePass) {\n        const tNode = getCurrentTNode();\n        createTQuery(tView, new TQueryMetadata_(predicate, flags, read), tNode.index);\n        saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n        if ((flags & 2 /* QueryFlags.isStatic */) === 2 /* QueryFlags.isStatic */) {\n            tView.staticContentQueries = true;\n        }\n    }\n    return createLQuery(tView, getLView(), flags);\n}\n/** Splits multiple selectors in the locator. */\nfunction splitQueryMultiSelectors(locator) {\n    return locator.split(',').map((s) => s.trim());\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    const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n    const lastSavedDirectiveIndex = tViewContentQueries.length\n        ? tViewContentQueries[tViewContentQueries.length - 1]\n        : -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 * A helper function collecting results from all the views where a given query was active.\n * @param lView\n * @param queryIndex\n */\nfunction getQueryResults(lView, queryIndex) {\n    const tView = lView[TVIEW];\n    const tQuery = getTQuery(tView, queryIndex);\n    return tQuery.crossesNgTemplate\n        ? collectQueryResults(tView, lView, queryIndex, [])\n        : materializeViewResults(tView, lView, tQuery, queryIndex);\n}\n\n/**\n * Checks if the given `value` is a reactive `Signal`.\n */\nfunction isSignal(value) {\n    return typeof value === 'function' && value[SIGNAL$1] !== undefined;\n}\n\n/** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */\nconst ɵWRITABLE_SIGNAL = /* @__PURE__ */ Symbol('WRITABLE_SIGNAL');\n/**\n * Utility function used during template type checking to extract the value from a `WritableSignal`.\n * @codeGenApi\n */\nfunction ɵunwrapWritableSignal(value) {\n    // Note: the function uses `WRITABLE_SIGNAL` as a brand instead of `WritableSignal<T>`,\n    // because the latter incorrectly unwraps non-signal getter functions.\n    return null;\n}\n/**\n * Create a `Signal` that can be set or updated directly.\n */\nfunction signal(initialValue, options) {\n    performanceMarkFeature('NgSignals');\n    const signalFn = createSignal$1(initialValue);\n    const node = signalFn[SIGNAL$1];\n    if (options?.equal) {\n        node.equal = options.equal;\n    }\n    signalFn.set = (newValue) => signalSetFn$1(node, newValue);\n    signalFn.update = (updateFn) => signalUpdateFn$1(node, updateFn);\n    signalFn.asReadonly = signalAsReadonlyFn.bind(signalFn);\n    if (ngDevMode) {\n        signalFn.toString = () => `[Signal: ${signalFn()}]`;\n        node.debugName = options?.debugName;\n    }\n    return signalFn;\n}\nfunction signalAsReadonlyFn() {\n    const node = this[SIGNAL$1];\n    if (node.readonlyFn === undefined) {\n        const readonlyFn = () => this();\n        readonlyFn[SIGNAL$1] = node;\n        node.readonlyFn = readonlyFn;\n    }\n    return node.readonlyFn;\n}\n/**\n * Checks if the given `value` is a writeable signal.\n */\nfunction isWritableSignal(value) {\n    return isSignal(value) && typeof value.set === 'function';\n}\n\n/**\n * A signal factory function in charge of creating a new computed signal capturing query\n * results. This centralized creation function is used by all types of queries (child / children,\n * required / optional).\n *\n * @param firstOnly indicates if all or only the first result should be returned\n * @param required indicates if at least one result is required\n * @returns a read-only signal with query results\n */\nfunction createQuerySignalFn(firstOnly, required, opts) {\n    let node;\n    const signalFn = createComputed$1(() => {\n        // A dedicated signal that increments its value every time a query changes its dirty status. By\n        // using this signal we can implement a query as computed and avoid creation of a specialized\n        // reactive node type. Please note that a query gets marked dirty under the following\n        // circumstances:\n        // - a view (where a query is active) finished its first creation pass;\n        // - a new view is inserted / deleted and it impacts query results.\n        node._dirtyCounter();\n        const value = refreshSignalQuery(node, firstOnly);\n        if (required && value === undefined) {\n            throw new RuntimeError(-951 /* RuntimeErrorCode.REQUIRED_QUERY_NO_VALUE */, ngDevMode && 'Child query result is required but no value is available.');\n        }\n        return value;\n    });\n    node = signalFn[SIGNAL$1];\n    node._dirtyCounter = signal(0);\n    node._flatValue = undefined;\n    if (ngDevMode) {\n        signalFn.toString = () => `[Query Signal]`;\n        node.debugName = opts?.debugName;\n    }\n    return signalFn;\n}\nfunction createSingleResultOptionalQuerySignalFn(opts) {\n    return createQuerySignalFn(/* firstOnly */ true, /* required */ false, opts);\n}\nfunction createSingleResultRequiredQuerySignalFn(opts) {\n    return createQuerySignalFn(/* firstOnly */ true, /* required */ true, opts);\n}\nfunction createMultiResultQuerySignalFn(opts) {\n    return createQuerySignalFn(/* firstOnly */ false, /* required */ false, opts);\n}\nfunction bindQueryToSignal(target, queryIndex) {\n    const node = target[SIGNAL$1];\n    node._lView = getLView();\n    node._queryIndex = queryIndex;\n    node._queryList = loadQueryInternal(node._lView, queryIndex);\n    node._queryList.onDirty(() => node._dirtyCounter.update((v) => v + 1));\n}\nfunction refreshSignalQuery(node, firstOnly) {\n    const lView = node._lView;\n    const queryIndex = node._queryIndex;\n    // There are 2 conditions under which we want to return \"empty\" results instead of the ones\n    // collected by a query:\n    //\n    // 1) a given query wasn't created yet (this is a period of time between the directive creation\n    // and execution of the query creation function) - in this case a query doesn't exist yet and we\n    // don't have any results to return.\n    //\n    // 2) we are in the process of constructing a view (the first\n    // creation pass didn't finish) and a query might have partial results, but we don't want to\n    // return those - instead we do delay results collection until all nodes had a chance of matching\n    // and we can present consistent, \"atomic\" (on a view level) results.\n    if (lView === undefined || queryIndex === undefined || lView[FLAGS] & 4 /* LViewFlags.CreationMode */) {\n        return (firstOnly ? undefined : EMPTY_ARRAY);\n    }\n    const queryList = loadQueryInternal(lView, queryIndex);\n    const results = getQueryResults(lView, queryIndex);\n    queryList.reset(results, unwrapElementRef);\n    if (firstOnly) {\n        return queryList.first;\n    }\n    else {\n        // TODO: remove access to the private _changesDetected field by abstracting / removing usage of\n        // QueryList in the signal-based queries (perf follow-up)\n        const resultChanged = queryList._changesDetected;\n        if (resultChanged || node._flatValue === undefined) {\n            return (node._flatValue = queryList.toArray());\n        }\n        return node._flatValue;\n    }\n}\n\nfunction viewChildFn(locator, opts) {\n    ngDevMode && assertInInjectionContext(viewChild);\n    return createSingleResultOptionalQuerySignalFn(opts);\n}\nfunction viewChildRequiredFn(locator, opts) {\n    ngDevMode && assertInInjectionContext(viewChild);\n    return createSingleResultRequiredQuerySignalFn(opts);\n}\n/**\n * Initializes a view child query.\n *\n * Consider using `viewChild.required` for queries that should always match.\n *\n * @usageNotes\n * Create a child query in your component by declaring a\n * class field and initializing it with the `viewChild()` function.\n *\n * ```angular-ts\n * @Component({template: '<div #el></div><my-component #cmp />'})\n * export class TestComponent {\n *   divEl = viewChild<ElementRef>('el');                   // Signal<ElementRef|undefined>\n *   divElRequired = viewChild.required<ElementRef>('el');  // Signal<ElementRef>\n *   cmp = viewChild(MyComponent);                          // Signal<MyComponent|undefined>\n *   cmpRequired = viewChild.required(MyComponent);         // Signal<MyComponent>\n * }\n * ```\n *\n * @publicAPI\n * @initializerApiFunction\n */\nconst viewChild = (() => {\n    // Note: This may be considered a side-effect, but nothing will depend on\n    // this assignment, unless this `viewChild` constant export is accessed. It's a\n    // self-contained side effect that is local to the user facing `viewChild` export.\n    viewChildFn.required = viewChildRequiredFn;\n    return viewChildFn;\n})();\n/**\n * Initializes a view children query.\n *\n * Query results are represented as a signal of a read-only collection containing all matched\n * elements.\n *\n * @usageNotes\n * Create a children query in your component by declaring a\n * class field and initializing it with the `viewChildren()` function.\n *\n * ```ts\n * @Component({...})\n * export class TestComponent {\n *   divEls = viewChildren<ElementRef>('el');   // Signal<ReadonlyArray<ElementRef>>\n * }\n * ```\n *\n * @initializerApiFunction\n * @publicAPI\n */\nfunction viewChildren(locator, opts) {\n    ngDevMode && assertInInjectionContext(viewChildren);\n    return createMultiResultQuerySignalFn(opts);\n}\nfunction contentChildFn(locator, opts) {\n    ngDevMode && assertInInjectionContext(contentChild);\n    return createSingleResultOptionalQuerySignalFn(opts);\n}\nfunction contentChildRequiredFn(locator, opts) {\n    ngDevMode && assertInInjectionContext(contentChildren);\n    return createSingleResultRequiredQuerySignalFn(opts);\n}\n/**\n * Initializes a content child query. Consider using `contentChild.required` for queries that should\n * always match.\n *\n * @usageNotes\n * Create a child query in your component by declaring a\n * class field and initializing it with the `contentChild()` function.\n *\n * ```ts\n * @Component({...})\n * export class TestComponent {\n *   headerEl = contentChild<ElementRef>('h');                    // Signal<ElementRef|undefined>\n *   headerElElRequired = contentChild.required<ElementRef>('h'); // Signal<ElementRef>\n *   header = contentChild(MyHeader);                             // Signal<MyHeader|undefined>\n *   headerRequired = contentChild.required(MyHeader);            // Signal<MyHeader>\n * }\n * ```\n *\n * @initializerApiFunction\n * @publicAPI\n */\nconst contentChild = (() => {\n    // Note: This may be considered a side-effect, but nothing will depend on\n    // this assignment, unless this `viewChild` constant export is accessed. It's a\n    // self-contained side effect that is local to the user facing `viewChild` export.\n    contentChildFn.required = contentChildRequiredFn;\n    return contentChildFn;\n})();\n/**\n * Initializes a content children query.\n *\n * Query results are represented as a signal of a read-only collection containing all matched\n * elements.\n *\n * @usageNotes\n * Create a children query in your component by declaring a\n * class field and initializing it with the `contentChildren()` function.\n *\n * ```ts\n * @Component({...})\n * export class TestComponent {\n *   headerEl = contentChildren<ElementRef>('h');   // Signal<ReadonlyArray<ElementRef>>\n * }\n * ```\n *\n * @initializerApiFunction\n * @publicAPI\n */\nfunction contentChildren(locator, opts) {\n    return createMultiResultQuerySignalFn(opts);\n}\n\n/**\n * Creates a model signal.\n *\n * @param initialValue The initial value.\n *   Can be set to {@link REQUIRED_UNSET_VALUE} for required model signals.\n * @param options Additional options for the model.\n */\nfunction createModelSignal(initialValue, opts) {\n    const node = Object.create(INPUT_SIGNAL_NODE);\n    const emitterRef = new OutputEmitterRef();\n    node.value = initialValue;\n    function getter() {\n        producerAccessed$1(node);\n        assertModelSet(node.value);\n        return node.value;\n    }\n    getter[SIGNAL$1] = node;\n    getter.asReadonly = signalAsReadonlyFn.bind(getter);\n    // TODO: Should we throw an error when updating a destroyed model?\n    getter.set = (newValue) => {\n        if (!node.equal(node.value, newValue)) {\n            signalSetFn$1(node, newValue);\n            emitterRef.emit(newValue);\n        }\n    };\n    getter.update = (updateFn) => {\n        assertModelSet(node.value);\n        getter.set(updateFn(node.value));\n    };\n    getter.subscribe = emitterRef.subscribe.bind(emitterRef);\n    getter.destroyRef = emitterRef.destroyRef;\n    if (ngDevMode) {\n        getter.toString = () => `[Model Signal: ${getter()}]`;\n        node.debugName = opts?.debugName;\n    }\n    return getter;\n}\n/** Asserts that a model's value is set. */\nfunction assertModelSet(value) {\n    if (value === REQUIRED_UNSET_VALUE) {\n        throw new RuntimeError(952 /* RuntimeErrorCode.REQUIRED_MODEL_NO_VALUE */, ngDevMode && 'Model is required but no value is available yet.');\n    }\n}\n\nfunction modelFunction(initialValue, opts) {\n    ngDevMode && assertInInjectionContext(model);\n    return createModelSignal(initialValue, opts);\n}\nfunction modelRequiredFunction(opts) {\n    ngDevMode && assertInInjectionContext(model);\n    return createModelSignal(REQUIRED_UNSET_VALUE, opts);\n}\n/**\n * `model` declares a writeable signal that is exposed as an input/output\n * pair on the containing directive.\n *\n * The input name is taken either from the class member or from the `alias` option.\n * The output name is generated by taking the input name and appending `Change`.\n *\n * @usageNotes\n *\n * To use `model()`, import the function from `@angular/core`.\n *\n * ```ts\n * import {model} from '@angular/core`;\n * ```\n *\n * Inside your component, introduce a new class member and initialize\n * it with a call to `model` or `model.required`.\n *\n * ```ts\n * @Directive({\n *   ...\n * })\n * export class MyDir {\n *   firstName = model<string>();            // ModelSignal<string|undefined>\n *   lastName  = model.required<string>();   // ModelSignal<string>\n *   age       = model(0);                   // ModelSignal<number>\n * }\n * ```\n *\n * Inside your component template, you can display the value of a `model`\n * by calling the signal.\n *\n * ```html\n * <span>{{firstName()}}</span>\n * ```\n *\n * Updating the `model` is equivalent to updating a writable signal.\n *\n * ```ts\n * updateName(newFirstName: string): void {\n *   this.firstName.set(newFirstName);\n * }\n * ```\n *\n * @publicAPI\n * @initializerApiFunction\n */\nconst model = (() => {\n    // Note: This may be considered a side-effect, but nothing will depend on\n    // this assignment, unless this `model` constant export is accessed. It's a\n    // self-contained side effect that is local to the user facing `model` export.\n    modelFunction.required = modelRequiredFunction;\n    return modelFunction;\n})();\n\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nconst emitDistinctChangesOnlyDefaultValue = true;\n/**\n * Base class for query metadata.\n *\n * @see {@link ContentChildren}\n * @see {@link ContentChild}\n * @see {@link ViewChildren}\n * @see {@link ViewChild}\n *\n * @publicApi\n */\nclass Query {\n}\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nconst ContentChildren = makePropDecorator('ContentChildren', (selector, opts = {}) => ({\n    selector,\n    first: false,\n    isViewQuery: false,\n    descendants: false,\n    emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n    ...opts,\n}), Query);\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nconst ContentChild = makePropDecorator('ContentChild', (selector, opts = {}) => ({\n    selector,\n    first: true,\n    isViewQuery: false,\n    descendants: true,\n    ...opts,\n}), Query);\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChildren = makePropDecorator('ViewChildren', (selector, opts = {}) => ({\n    selector,\n    first: false,\n    isViewQuery: true,\n    descendants: true,\n    emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n    ...opts,\n}), Query);\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChild = makePropDecorator('ViewChild', (selector, opts) => ({\n    selector,\n    first: true,\n    isViewQuery: true,\n    descendants: true,\n    ...opts,\n}), Query);\n\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```ts\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    const componentResolved = [];\n    // Cache so that we don't fetch the same resource more than once.\n    const urlMap = new Map();\n    function cachedResourceResolve(url) {\n        let promise = urlMap.get(url);\n        if (!promise) {\n            const resp = resourceResolver(url);\n            urlMap.set(url, (promise = resp.then(unwrapResponse)));\n        }\n        return promise;\n    }\n    componentResourceResolutionQueue.forEach((component, type) => {\n        const promises = [];\n        if (component.templateUrl) {\n            promises.push(cachedResourceResolve(component.templateUrl).then((template) => {\n                component.template = template;\n            }));\n        }\n        const styles = typeof component.styles === 'string' ? [component.styles] : component.styles || [];\n        component.styles = styles;\n        if (component.styleUrl && component.styleUrls?.length) {\n            throw new Error('@Component cannot define both `styleUrl` and `styleUrls`. ' +\n                'Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple');\n        }\n        else if (component.styleUrls?.length) {\n            const styleOffset = component.styles.length;\n            const styleUrls = component.styleUrls;\n            component.styleUrls.forEach((styleUrl, index) => {\n                styles.push(''); // pre-allocate array.\n                promises.push(cachedResourceResolve(styleUrl).then((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        }\n        else if (component.styleUrl) {\n            promises.push(cachedResourceResolve(component.styleUrl).then((style) => {\n                styles.push(style);\n                component.styleUrl = undefined;\n            }));\n        }\n        const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n        componentResolved.push(fullyResolved);\n    });\n    clearResolutionOfComponentResourcesQueue();\n    return Promise.all(componentResolved).then(() => undefined);\n}\nlet componentResourceResolutionQueue = new Map();\n// Track when existing ɵcmp for a Type is waiting on resources.\nconst 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        component.styleUrl);\n}\nfunction clearResolutionOfComponentResourcesQueue() {\n    const old = componentResourceResolutionQueue;\n    componentResourceResolutionQueue = new Map();\n    return old;\n}\nfunction restoreComponentResolutionQueue(queue) {\n    componentDefPendingResolution.clear();\n    queue.forEach((_, type) => 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 * Map of module-id to the corresponding NgModule.\n */\nconst modules = new Map();\n/**\n * Whether to check for duplicate NgModule registrations.\n *\n * This can be disabled for testing.\n */\nlet checkForDuplicateNgModules = true;\nfunction assertSameOrNotExisting(id, type, incoming) {\n    if (type && type !== incoming && checkForDuplicateNgModules) {\n        throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n    }\n}\n/**\n * Adds the given NgModule type to Angular's NgModule registry.\n *\n * This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in\n * explicitly and not read from the NgModule definition. This is for two reasons: it avoids a\n * megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be\n * fully resolved when it's registered.\n *\n * @codeGenApi\n */\nfunction registerNgModuleType(ngModuleType, id) {\n    const existing = modules.get(id) || null;\n    assertSameOrNotExisting(id, existing, ngModuleType);\n    modules.set(id, ngModuleType);\n}\nfunction clearModulesForTest() {\n    modules.clear();\n}\nfunction getRegisteredNgModuleType(id) {\n    return modules.get(id);\n}\n/**\n * Control whether the NgModule registration system enforces that each NgModule type registered has\n * a unique id.\n *\n * This is useful for testing as the NgModule registry cannot be properly reset between tests with\n * Angular's current API.\n */\nfunction setAllowDuplicateNgModuleIdsForTest(allowDuplicates) {\n    checkForDuplicateNgModules = !allowDuplicates;\n}\n\n/**\n * Validation function invoked at runtime for each binding that might potentially\n * represent a security-sensitive attribute of an <iframe>.\n * See `IFRAME_SECURITY_SENSITIVE_ATTRS` in the\n * `packages/compiler/src/schema/dom_security_schema.ts` script for the full list\n * of such attributes.\n *\n * @codeGenApi\n */\nfunction ɵɵvalidateIframeAttribute(attrValue, tagName, attrName) {\n    const lView = getLView();\n    const tNode = getSelectedTNode();\n    const element = getNativeByTNode(tNode, lView);\n    // Restrict any dynamic bindings of security-sensitive attributes/properties\n    // on an <iframe> for security reasons.\n    if (tNode.type === 2 /* TNodeType.Element */ && tagName.toLowerCase() === 'iframe') {\n        const iframe = element;\n        // Unset previously applied `src` and `srcdoc` if we come across a situation when\n        // a security-sensitive attribute is set later via an attribute/property binding.\n        iframe.src = '';\n        iframe.srcdoc = trustedHTMLFromString('');\n        // Also remove the <iframe> from the document.\n        nativeRemoveNode(lView[RENDERER], iframe);\n        const errorMessage = ngDevMode &&\n            `Angular has detected that the \\`${attrName}\\` was applied ` +\n                `as a binding to an <iframe>${getTemplateLocationDetails(lView)}. ` +\n                `For security reasons, the \\`${attrName}\\` can be set on an <iframe> ` +\n                `as a static attribute only. \\n` +\n                `To fix this, switch the \\`${attrName}\\` binding to a static attribute ` +\n                `in a template or in host bindings section.`;\n        throw new RuntimeError(-910 /* RuntimeErrorCode.UNSAFE_IFRAME_ATTRS */, errorMessage);\n    }\n    return attrValue;\n}\n\n/**\n * Represents an instance of an `NgModule` created by an `NgModuleFactory`.\n * Provides access to the `NgModule` instance and related objects.\n *\n * @publicApi\n */\nclass NgModuleRef$1 {\n}\n/**\n * @publicApi\n *\n * @deprecated\n * This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy\n * JIT mode. Angular provides APIs that accept NgModule classes directly (such as\n * [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and\n * [createNgModule](api/core/createNgModule)), consider switching to those APIs instead of\n * using factory-based ones.\n */\nclass NgModuleFactory$1 {\n}\n\n/**\n * Returns a new NgModuleRef instance based on the NgModule class and parent injector provided.\n *\n * @param ngModule NgModule class.\n * @param parentInjector Optional injector instance to use as a parent for the module injector. If\n *     not provided, `NullInjector` will be used instead.\n * @returns NgModuleRef that represents an NgModule instance.\n *\n * @publicApi\n */\nfunction createNgModule(ngModule, parentInjector) {\n    return new NgModuleRef(ngModule, parentInjector ?? null, []);\n}\n/**\n * The `createNgModule` function alias for backwards-compatibility.\n * Please avoid using it directly and use `createNgModule` instead.\n *\n * @deprecated Use `createNgModule` instead.\n */\nconst createNgModuleRef = createNgModule;\nclass NgModuleRef extends NgModuleRef$1 {\n    ngModuleType;\n    _parent;\n    // tslint:disable-next-line:require-internal-with-underscore\n    _bootstrapComponents = [];\n    // tslint:disable-next-line:require-internal-with-underscore\n    _r3Injector;\n    instance;\n    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    componentFactoryResolver = new ComponentFactoryResolver(this);\n    constructor(ngModuleType, _parent, additionalProviders, runInjectorInitializers = true) {\n        super();\n        this.ngModuleType = ngModuleType;\n        this._parent = _parent;\n        const ngModuleDef = getNgModuleDef(ngModuleType);\n        ngDevMode &&\n            assertDefined(ngModuleDef, `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);\n        this._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap);\n        this._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [\n            { provide: NgModuleRef$1, useValue: this },\n            {\n                provide: ComponentFactoryResolver$1,\n                useValue: this.componentFactoryResolver,\n            },\n            ...additionalProviders,\n        ], stringify(ngModuleType), new Set(['environment']));\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 constructor for DI which will cause a\n        // circular error that will eventually error out, because the injector isn't created yet.\n        if (runInjectorInitializers) {\n            this.resolveInjectorInitializers();\n        }\n    }\n    resolveInjectorInitializers() {\n        this._r3Injector.resolveInjectorInitializers();\n        this.instance = this._r3Injector.get(this.ngModuleType);\n    }\n    get injector() {\n        return this._r3Injector;\n    }\n    destroy() {\n        ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n        const injector = this._r3Injector;\n        !injector.destroyed && injector.destroy();\n        this.destroyCbs.forEach((fn) => fn());\n        this.destroyCbs = null;\n    }\n    onDestroy(callback) {\n        ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n        this.destroyCbs.push(callback);\n    }\n}\nclass NgModuleFactory extends NgModuleFactory$1 {\n    moduleType;\n    constructor(moduleType) {\n        super();\n        this.moduleType = moduleType;\n    }\n    create(parentInjector) {\n        return new NgModuleRef(this.moduleType, parentInjector, []);\n    }\n}\nfunction createNgModuleRefWithProviders(moduleType, parentInjector, additionalProviders) {\n    return new NgModuleRef(moduleType, parentInjector, additionalProviders, false);\n}\nclass EnvironmentNgModuleRefAdapter extends NgModuleRef$1 {\n    injector;\n    componentFactoryResolver = new ComponentFactoryResolver(this);\n    instance = null;\n    constructor(config) {\n        super();\n        const injector = new R3Injector([\n            ...config.providers,\n            { provide: NgModuleRef$1, useValue: this },\n            { provide: ComponentFactoryResolver$1, useValue: this.componentFactoryResolver },\n        ], config.parent || getNullInjector(), config.debugName, new Set(['environment']));\n        this.injector = injector;\n        if (config.runEnvironmentInitializers) {\n            injector.resolveInjectorInitializers();\n        }\n    }\n    destroy() {\n        this.injector.destroy();\n    }\n    onDestroy(callback) {\n        this.injector.onDestroy(callback);\n    }\n}\n/**\n * Create a new environment injector.\n *\n * @param providers An array of providers.\n * @param parent A parent environment injector.\n * @param debugName An optional name for this injector instance, which will be used in error\n *     messages.\n *\n * @publicApi\n */\nfunction createEnvironmentInjector(providers, parent, debugName = null) {\n    const adapter = new EnvironmentNgModuleRefAdapter({\n        providers,\n        parent,\n        debugName,\n        runEnvironmentInitializers: true,\n    });\n    return adapter.injector;\n}\n\n/**\n * A service used by the framework to create instances of standalone injectors. Those injectors are\n * created on demand in case of dynamic component instantiation and contain ambient providers\n * collected from the imports graph rooted at a given standalone component.\n */\nclass StandaloneService {\n    _injector;\n    cachedInjectors = new Map();\n    constructor(_injector) {\n        this._injector = _injector;\n    }\n    getOrCreateStandaloneInjector(componentDef) {\n        if (!componentDef.standalone) {\n            return null;\n        }\n        if (!this.cachedInjectors.has(componentDef)) {\n            const providers = internalImportProvidersFrom(false, componentDef.type);\n            const standaloneInjector = providers.length > 0\n                ? createEnvironmentInjector([providers], this._injector, `Standalone[${componentDef.type.name}]`)\n                : null;\n            this.cachedInjectors.set(componentDef, standaloneInjector);\n        }\n        return this.cachedInjectors.get(componentDef);\n    }\n    ngOnDestroy() {\n        try {\n            for (const injector of this.cachedInjectors.values()) {\n                if (injector !== null) {\n                    injector.destroy();\n                }\n            }\n        }\n        finally {\n            this.cachedInjectors.clear();\n        }\n    }\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: StandaloneService,\n        providedIn: 'environment',\n        factory: () => new StandaloneService(ɵɵinject(EnvironmentInjector)),\n    });\n}\n\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```ts\n * class MyComponent {\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(() => {\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        const baseDef = getNgDirectiveDef(componentDefinition);\n        const def = {\n            ...baseDef,\n            decls: componentDefinition.decls,\n            vars: componentDefinition.vars,\n            template: componentDefinition.template,\n            consts: componentDefinition.consts || null,\n            ngContentSelectors: componentDefinition.ngContentSelectors,\n            onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n            directiveDefs: null, // assigned in noSideEffects\n            pipeDefs: null, // assigned in noSideEffects\n            dependencies: (baseDef.standalone && componentDefinition.dependencies) || null,\n            getStandaloneInjector: baseDef.standalone\n                ? (parentInjector) => {\n                    return parentInjector.get(StandaloneService).getOrCreateStandaloneInjector(def);\n                }\n                : null,\n            getExternalStyles: null,\n            signals: componentDefinition.signals ?? false,\n            data: componentDefinition.data || {},\n            encapsulation: componentDefinition.encapsulation || ViewEncapsulation.Emulated,\n            styles: componentDefinition.styles || EMPTY_ARRAY,\n            _: null,\n            schemas: componentDefinition.schemas || null,\n            tView: null,\n            id: '',\n        };\n        // TODO: Do we still need/want this ?\n        if (baseDef.standalone) {\n            performanceMarkFeature('NgStandalone');\n        }\n        initFeatures(def);\n        const dependencies = componentDefinition.dependencies;\n        def.directiveDefs = extractDefListOrFactory(dependencies, /* pipeDef */ false);\n        def.pipeDefs = extractDefListOrFactory(dependencies, /* pipeDef */ true);\n        def.id = getComponentId(def);\n        return def;\n    });\n}\nfunction extractDirectiveDef(type) {\n    return getComponentDef(type) || getDirectiveDef(type);\n}\nfunction nonNull(value) {\n    return value !== null;\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵdefineNgModule(def) {\n    return noSideEffects(() => {\n        const 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        return res;\n    });\n}\nfunction parseAndConvertBindingsForDefinition(obj, declaredInputs) {\n    if (obj == null)\n        return EMPTY_OBJ;\n    const newLookup = {};\n    for (const minifiedKey in obj) {\n        if (obj.hasOwnProperty(minifiedKey)) {\n            const value = obj[minifiedKey];\n            let publicName;\n            let declaredName;\n            let inputFlags = InputFlags.None;\n            if (Array.isArray(value)) {\n                inputFlags = value[0];\n                publicName = value[1];\n                declaredName = value[2] ?? publicName; // declared name might not be set to save bytes.\n            }\n            else {\n                publicName = value;\n                declaredName = value;\n            }\n            // For inputs, capture the declared name, or if some flags are set.\n            if (declaredInputs) {\n                // Perf note: An array is only allocated for the input if there are flags.\n                newLookup[publicName] =\n                    inputFlags !== InputFlags.None ? [minifiedKey, inputFlags] : minifiedKey;\n                declaredInputs[publicName] = declaredName;\n            }\n            else {\n                newLookup[publicName] = minifiedKey;\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 */\nfunction ɵɵdefineDirective(directiveDefinition) {\n    return noSideEffects(() => {\n        const def = getNgDirectiveDef(directiveDefinition);\n        initFeatures(def);\n        return def;\n    });\n}\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```ts\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        standalone: pipeDef.standalone ?? true,\n        onDestroy: pipeDef.type.prototype.ngOnDestroy || null,\n    };\n}\nfunction getNgDirectiveDef(directiveDefinition) {\n    const declaredInputs = {};\n    return {\n        type: directiveDefinition.type,\n        providersResolver: null,\n        factory: null,\n        hostBindings: directiveDefinition.hostBindings || null,\n        hostVars: directiveDefinition.hostVars || 0,\n        hostAttrs: directiveDefinition.hostAttrs || null,\n        contentQueries: directiveDefinition.contentQueries || null,\n        declaredInputs: declaredInputs,\n        inputTransforms: null,\n        inputConfig: directiveDefinition.inputs || EMPTY_OBJ,\n        exportAs: directiveDefinition.exportAs || null,\n        standalone: directiveDefinition.standalone ?? true,\n        signals: directiveDefinition.signals === true,\n        selectors: directiveDefinition.selectors || EMPTY_ARRAY,\n        viewQuery: directiveDefinition.viewQuery || null,\n        features: directiveDefinition.features || null,\n        setInput: null,\n        findHostDirectiveDefs: null,\n        hostDirectives: null,\n        inputs: parseAndConvertBindingsForDefinition(directiveDefinition.inputs, declaredInputs),\n        outputs: parseAndConvertBindingsForDefinition(directiveDefinition.outputs),\n        debugInfo: null,\n    };\n}\nfunction initFeatures(definition) {\n    definition.features?.forEach((fn) => fn(definition));\n}\nfunction extractDefListOrFactory(dependencies, pipeDef) {\n    if (!dependencies) {\n        return null;\n    }\n    const defExtractor = pipeDef ? getPipeDef$1 : extractDirectiveDef;\n    return () => (typeof dependencies === 'function' ? dependencies() : dependencies)\n        .map((dep) => defExtractor(dep))\n        .filter(nonNull);\n}\n/**\n * A map that contains the generated component IDs and type.\n */\nconst GENERATED_COMP_IDS = new Map();\n/**\n * A method can returns a component ID from the component definition using a variant of DJB2 hash\n * algorithm.\n */\nfunction getComponentId(componentDef) {\n    let hash = 0;\n    // For components with i18n in templates, the `consts` array is generated by the compiler\n    // as a function. If client and server bundles were produced with different minification\n    // configurations, the serializable contents of the function body would be different on\n    // the client and on the server. This might result in different ids generated. To avoid this\n    // issue, we do not take the `consts` contents into account if it's a function.\n    // See https://github.com/angular/angular/issues/58713.\n    const componentDefConsts = typeof componentDef.consts === 'function' ? '' : componentDef.consts;\n    // We cannot rely solely on the component selector as the same selector can be used in different\n    // modules.\n    //\n    // `componentDef.style` is not used, due to it causing inconsistencies. Ex: when server\n    // component styles has no sourcemaps and browsers do.\n    //\n    // Example:\n    // https://github.com/angular/components/blob/d9f82c8f95309e77a6d82fd574c65871e91354c2/src/material/core/option/option.ts#L248\n    // https://github.com/angular/components/blob/285f46dc2b4c5b127d356cb7c4714b221f03ce50/src/material/legacy-core/option/option.ts#L32\n    const hashSelectors = [\n        componentDef.selectors,\n        componentDef.ngContentSelectors,\n        componentDef.hostVars,\n        componentDef.hostAttrs,\n        componentDefConsts,\n        componentDef.vars,\n        componentDef.decls,\n        componentDef.encapsulation,\n        componentDef.standalone,\n        componentDef.signals,\n        componentDef.exportAs,\n        JSON.stringify(componentDef.inputs),\n        JSON.stringify(componentDef.outputs),\n        // We cannot use 'componentDef.type.name' as the name of the symbol will change and will not\n        // match in the server and browser bundles.\n        Object.getOwnPropertyNames(componentDef.type.prototype),\n        !!componentDef.contentQueries,\n        !!componentDef.viewQuery,\n    ];\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        // If client and server bundles were produced with different minification configurations,\n        // the serializable contents of the function body would be different on the client and on\n        // the server. Ensure that we do not accidentally use functions in component id computation.\n        for (const item of hashSelectors) {\n            assertNotEqual(typeof item, 'function', 'Internal error: attempting to use a function in component id computation logic.');\n        }\n    }\n    for (const char of hashSelectors.join('|')) {\n        hash = (Math.imul(31, hash) + char.charCodeAt(0)) << 0;\n    }\n    // Force positive number hash.\n    // 2147483647 = equivalent of Integer.MAX_VALUE.\n    hash += 2147483647 + 1;\n    const compId = 'c' + hash;\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        if (GENERATED_COMP_IDS.has(compId)) {\n            const previousCompDefType = GENERATED_COMP_IDS.get(compId);\n            if (previousCompDefType !== componentDef.type) {\n                console.warn(formatRuntimeError(-912 /* RuntimeErrorCode.COMPONENT_ID_COLLISION */, `Component ID generation collision detected. Components '${previousCompDefType.name}' and '${componentDef.type.name}' with selector '${stringifyCSSSelectorList(componentDef.selectors)}' generated the same component ID. To fix this, you can change the selector of one of those components or add an extra host attribute to force a different ID.`));\n            }\n        }\n        else {\n            GENERATED_COMP_IDS.set(compId, componentDef.type);\n        }\n    }\n    return compId;\n}\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    let superType = getSuperType(definition.type);\n    let shouldInheritFields = true;\n    const inheritanceChain = [definition];\n    while (superType) {\n        let 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 RuntimeError(903 /* RuntimeErrorCode.INVALID_INHERITANCE */, ngDevMode &&\n                    `Directives cannot inherit Components. Directive ${stringifyForError(definition.type)} is attempting to extend component ${stringifyForError(superType)}`);\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                const writeableDef = definition;\n                writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n                writeableDef.inputTransforms = maybeUnwrapEmpty(definition.inputTransforms);\n                writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n                writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n                // Merge hostBindings\n                const superHostBindings = superDef.hostBindings;\n                superHostBindings && inheritHostBindings(definition, superHostBindings);\n                // Merge queries\n                const superViewQuery = superDef.viewQuery;\n                const superContentQueries = superDef.contentQueries;\n                superViewQuery && inheritViewQuery(definition, superViewQuery);\n                superContentQueries && inheritContentQueries(definition, superContentQueries);\n                // Merge inputs and outputs\n                mergeInputsWithTransforms(definition, superDef);\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                    const defData = definition.data;\n                    defData.animation = (defData.animation || []).concat(superDef.data.animation);\n                }\n            }\n            // Run parent features\n            const features = superDef.features;\n            if (features) {\n                for (let i = 0; i < features.length; i++) {\n                    const 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}\nfunction mergeInputsWithTransforms(target, source) {\n    for (const key in source.inputs) {\n        if (!source.inputs.hasOwnProperty(key)) {\n            continue;\n        }\n        if (target.inputs.hasOwnProperty(key)) {\n            continue;\n        }\n        const value = source.inputs[key];\n        if (value === undefined) {\n            continue;\n        }\n        target.inputs[key] = value;\n        target.declaredInputs[key] = source.declaredInputs[key];\n        // If the input is inherited, and we have a transform for it, we also inherit it.\n        // Note that transforms should not be inherited if the input has its own metadata\n        // in the `source` directive itself already (i.e. the input is re-declared/overridden).\n        if (source.inputTransforms !== null) {\n            // Note: transforms are stored with their minified names.\n            // Perf: only access the minified name when there are source transforms.\n            const minifiedName = Array.isArray(value) ? value[0] : value;\n            if (!source.inputTransforms.hasOwnProperty(minifiedName)) {\n                continue;\n            }\n            target.inputTransforms ??= {};\n            target.inputTransforms[minifiedName] = source.inputTransforms[minifiedName];\n        }\n    }\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    let hostVars = 0;\n    let hostAttrs = null;\n    // We process the inheritance order from the base to the leaves here.\n    for (let i = inheritanceChain.length - 1; i >= 0; i--) {\n        const 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 = 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    const prevViewQuery = definition.viewQuery;\n    if (prevViewQuery) {\n        definition.viewQuery = (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    const prevContentQueries = definition.contentQueries;\n    if (prevContentQueries) {\n        definition.contentQueries = (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    const prevHostBindings = definition.hostBindings;\n    if (prevHostBindings) {\n        definition.hostBindings = (rf, ctx) => {\n            superHostBindings(rf, ctx);\n            prevHostBindings(rf, ctx);\n        };\n    }\n    else {\n        definition.hostBindings = superHostBindings;\n    }\n}\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 */\nconst COPY_DIRECTIVE_FIELDS = [\n    // The child class should use the providers of its parent.\n    'providersResolver',\n    // Not listed here are any fields which are handled by the `ɵɵInheritDefinitionFeature`, such\n    // as inputs, outputs, and host binding functions.\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 */\nconst 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    let superType = getSuperType(definition.type);\n    let 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    const defAny = definition;\n    // Copy over any fields that apply to either directives or components.\n    for (const field of COPY_DIRECTIVE_FIELDS) {\n        defAny[field] = superDef[field];\n    }\n    if (isComponentDef(superDef)) {\n        // Copy over any component-specific fields.\n        for (const field of COPY_COMPONENT_FIELDS) {\n            defAny[field] = superDef[field];\n        }\n    }\n}\n\n/**\n * This feature adds the host directives behavior to a directive definition by patching a\n * function onto it. The expectation is that the runtime will invoke the function during\n * directive matching.\n *\n * For example:\n * ```ts\n * class ComponentWithHostDirective {\n *   static ɵcmp = defineComponent({\n *    type: ComponentWithHostDirective,\n *    features: [ɵɵHostDirectivesFeature([\n *      SimpleHostDirective,\n *      {directive: AdvancedHostDirective, inputs: ['foo: alias'], outputs: ['bar']},\n *    ])]\n *  });\n * }\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵHostDirectivesFeature(rawHostDirectives) {\n    const feature = (definition) => {\n        const isEager = Array.isArray(rawHostDirectives);\n        if (definition.hostDirectives === null) {\n            definition.findHostDirectiveDefs = findHostDirectiveDefs;\n            definition.hostDirectives = isEager\n                ? rawHostDirectives.map(createHostDirectiveDef)\n                : [rawHostDirectives];\n        }\n        else if (isEager) {\n            definition.hostDirectives.unshift(...rawHostDirectives.map(createHostDirectiveDef));\n        }\n        else {\n            definition.hostDirectives.unshift(rawHostDirectives);\n        }\n    };\n    feature.ngInherit = true;\n    return feature;\n}\nfunction findHostDirectiveDefs(currentDef, matchedDefs, hostDirectiveDefs) {\n    if (currentDef.hostDirectives !== null) {\n        for (const configOrFn of currentDef.hostDirectives) {\n            if (typeof configOrFn === 'function') {\n                const resolved = configOrFn();\n                for (const config of resolved) {\n                    trackHostDirectiveDef(createHostDirectiveDef(config), matchedDefs, hostDirectiveDefs);\n                }\n            }\n            else {\n                trackHostDirectiveDef(configOrFn, matchedDefs, hostDirectiveDefs);\n            }\n        }\n    }\n}\n/** Tracks a single host directive during directive matching. */\nfunction trackHostDirectiveDef(def, matchedDefs, hostDirectiveDefs) {\n    const hostDirectiveDef = getDirectiveDef(def.directive);\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        validateHostDirective(def, hostDirectiveDef);\n    }\n    // We need to patch the `declaredInputs` so that\n    // `ngOnChanges` can map the properties correctly.\n    patchDeclaredInputs(hostDirectiveDef.declaredInputs, def.inputs);\n    // Host directives execute before the host so that its host bindings can be overwritten.\n    findHostDirectiveDefs(hostDirectiveDef, matchedDefs, hostDirectiveDefs);\n    hostDirectiveDefs.set(hostDirectiveDef, def);\n    matchedDefs.push(hostDirectiveDef);\n}\n/** Creates a `HostDirectiveDef` from a used-defined host directive configuration. */\nfunction createHostDirectiveDef(config) {\n    return typeof config === 'function'\n        ? { directive: resolveForwardRef(config), inputs: EMPTY_OBJ, outputs: EMPTY_OBJ }\n        : {\n            directive: resolveForwardRef(config.directive),\n            inputs: bindingArrayToMap(config.inputs),\n            outputs: bindingArrayToMap(config.outputs),\n        };\n}\n/**\n * Converts an array in the form of `['publicName', 'alias', 'otherPublicName', 'otherAlias']` into\n * a map in the form of `{publicName: 'alias', otherPublicName: 'otherAlias'}`.\n */\nfunction bindingArrayToMap(bindings) {\n    if (bindings === undefined || bindings.length === 0) {\n        return EMPTY_OBJ;\n    }\n    const result = {};\n    for (let i = 0; i < bindings.length; i += 2) {\n        result[bindings[i]] = bindings[i + 1];\n    }\n    return result;\n}\n/**\n * `ngOnChanges` has some leftover legacy ViewEngine behavior where the keys inside the\n * `SimpleChanges` event refer to the *declared* name of the input, not its public name or its\n * minified name. E.g. in `@Input('alias') foo: string`, the name in the `SimpleChanges` object\n * will always be `foo`, and not `alias` or the minified name of `foo` in apps using property\n * minification.\n *\n * This is achieved through the `DirectiveDef.declaredInputs` map that is constructed when the\n * definition is declared. When a property is written to the directive instance, the\n * `NgOnChangesFeature` will try to remap the property name being written to using the\n * `declaredInputs`.\n *\n * Since the host directive input remapping happens during directive matching, `declaredInputs`\n * won't contain the new alias that the input is available under. This function addresses the\n * issue by patching the host directive aliases to the `declaredInputs`. There is *not* a risk of\n * this patching accidentally introducing new inputs to the host directive, because `declaredInputs`\n * is used *only* by the `NgOnChangesFeature` when determining what name is used in the\n * `SimpleChanges` object which won't be reached if an input doesn't exist.\n */\nfunction patchDeclaredInputs(declaredInputs, exposedInputs) {\n    for (const publicName in exposedInputs) {\n        if (exposedInputs.hasOwnProperty(publicName)) {\n            const remappedPublicName = exposedInputs[publicName];\n            const privateName = declaredInputs[publicName];\n            // We *technically* shouldn't be able to hit this case because we can't have multiple\n            // inputs on the same property and we have validations against conflicting aliases in\n            // `validateMappings`. If we somehow did, it would lead to `ngOnChanges` being invoked\n            // with the wrong name so we have a non-user-friendly assertion here just in case.\n            if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n                declaredInputs.hasOwnProperty(remappedPublicName)) {\n                assertEqual(declaredInputs[remappedPublicName], declaredInputs[publicName], `Conflicting host directive input alias ${publicName}.`);\n            }\n            declaredInputs[remappedPublicName] = privateName;\n        }\n    }\n}\n/**\n * Verifies that the host directive has been configured correctly.\n * @param hostDirectiveConfig Host directive configuration object.\n * @param directiveDef Directive definition of the host directive.\n */\nfunction validateHostDirective(hostDirectiveConfig, directiveDef) {\n    const type = hostDirectiveConfig.directive;\n    if (directiveDef === null) {\n        if (getComponentDef(type) !== null) {\n            throw new RuntimeError(310 /* RuntimeErrorCode.HOST_DIRECTIVE_COMPONENT */, `Host directive ${type.name} cannot be a component.`);\n        }\n        throw new RuntimeError(307 /* RuntimeErrorCode.HOST_DIRECTIVE_UNRESOLVABLE */, `Could not resolve metadata for host directive ${type.name}. ` +\n            `Make sure that the ${type.name} class is annotated with an @Directive decorator.`);\n    }\n    if (!directiveDef.standalone) {\n        throw new RuntimeError(308 /* RuntimeErrorCode.HOST_DIRECTIVE_NOT_STANDALONE */, `Host directive ${directiveDef.type.name} must be standalone.`);\n    }\n    validateMappings('input', directiveDef, hostDirectiveConfig.inputs);\n    validateMappings('output', directiveDef, hostDirectiveConfig.outputs);\n}\n/**\n * Checks that the host directive inputs/outputs configuration is valid.\n * @param bindingType Kind of binding that is being validated. Used in the error message.\n * @param def Definition of the host directive that is being validated against.\n * @param hostDirectiveBindings Host directive mapping object that shold be validated.\n */\nfunction validateMappings(bindingType, def, hostDirectiveBindings) {\n    const className = def.type.name;\n    const bindings = bindingType === 'input' ? def.inputs : def.outputs;\n    for (const publicName in hostDirectiveBindings) {\n        if (hostDirectiveBindings.hasOwnProperty(publicName)) {\n            if (!bindings.hasOwnProperty(publicName)) {\n                throw new RuntimeError(311 /* RuntimeErrorCode.HOST_DIRECTIVE_UNDEFINED_BINDING */, `Directive ${className} does not have an ${bindingType} with a public name of ${publicName}.`);\n            }\n            const remappedPublicName = hostDirectiveBindings[publicName];\n            if (bindings.hasOwnProperty(remappedPublicName) && remappedPublicName !== publicName) {\n                throw new RuntimeError(312 /* RuntimeErrorCode.HOST_DIRECTIVE_CONFLICTING_ALIAS */, `Cannot alias ${bindingType} ${publicName} of host directive ${className} to ${remappedPublicName}, because it already has a different ${bindingType} with the same public name.`);\n            }\n        }\n    }\n}\n\n/**\n * Decorates the directive definition with support for input transform functions.\n *\n * If the directive uses inheritance, the feature should be included before the\n * `InheritDefinitionFeature` to ensure that the `inputTransforms` field is populated.\n *\n * @codeGenApi\n */\nfunction ɵɵInputTransformsFeature(definition) {\n    const inputs = definition.inputConfig;\n    const inputTransforms = {};\n    for (const minifiedKey in inputs) {\n        if (inputs.hasOwnProperty(minifiedKey)) {\n            // Note: the private names are used for the keys, rather than the public ones, because public\n            // names can be re-aliased in host directives which would invalidate the lookup.\n            const value = inputs[minifiedKey];\n            if (Array.isArray(value) && value[3]) {\n                inputTransforms[minifiedKey] = value[3];\n            }\n        }\n    }\n    definition.inputTransforms = inputTransforms;\n}\n\nfunction isIterable(obj) {\n    return obj !== null && typeof obj === 'object' && obj[Symbol.iterator] !== 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            Symbol.iterator in obj)); // JS Iterable have a Symbol.iterator prop\n}\nfunction areIterablesEqual(a, b, comparator) {\n    const iterator1 = a[Symbol.iterator]();\n    const iterator2 = b[Symbol.iterator]();\n    while (true) {\n        const item1 = iterator1.next();\n        const 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 (let i = 0; i < obj.length; i++) {\n            fn(obj[i]);\n        }\n    }\n    else {\n        const iterator = obj[Symbol.iterator]();\n        let item;\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\nfunction devModeEqual(a, b) {\n    const isListLikeIterableA = isListLikeIterable(a);\n    const isListLikeIterableB = isListLikeIterable(b);\n    if (isListLikeIterableA && isListLikeIterableB) {\n        return areIterablesEqual(a, b, devModeEqual);\n    }\n    else {\n        const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n        const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n        if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n            return true;\n        }\n        else {\n            return Object.is(a, b);\n        }\n    }\n}\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 && assertIndexInRange(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    const oldValue = lView[bindingIndex];\n    if (Object.is(oldValue, value)) {\n        return false;\n    }\n    else {\n        if (ngDevMode && isInCheckNoChangesMode()) {\n            // View engine didn't report undefined values as changed on the first checkNoChanges pass\n            // (before the change detection was run).\n            const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n            if (!devModeEqual(oldValueToCompare, value)) {\n                const details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);\n                throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName, lView);\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    const 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    const 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    const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n    return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\n}\n\n/**\n * Checks whether a TNode is considered detached, i.e. not present in the\n * translated i18n template. We should not attempt hydration for such nodes\n * and instead, use a regular \"creation mode\".\n */\nfunction isDetachedByI18n(tNode) {\n    return (tNode.flags & 32 /* TNodeFlags.isDetached */) === 32 /* TNodeFlags.isDetached */;\n}\n\nfunction templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrs, localRefsIndex) {\n    ngDevMode && assertFirstCreatePass(tView);\n    ngDevMode && ngDevMode.firstCreatePass++;\n    const tViewConsts = tView.consts;\n    // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n    const tNode = getOrCreateTNode(tView, index, 4 /* TNodeType.Container */, tagName || null, attrs || null);\n    resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n    registerPostOrderHooks(tView, tNode);\n    const embeddedTView = (tNode.tView = createTView(2 /* TViewType.Embedded */, tNode, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts, null /* ssrId */));\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 embedded view.\n *\n * @param declarationLView LView in which the template was declared.\n * @param declarationTView TView in which the template wa declared.\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 */\nfunction declareTemplate(declarationLView, declarationTView, index, templateFn, decls, vars, tagName, attrs, localRefsIndex, localRefExtractor) {\n    const adjustedIndex = index + HEADER_OFFSET;\n    const tNode = declarationTView.firstCreatePass\n        ? templateFirstCreatePass(adjustedIndex, declarationTView, declarationLView, templateFn, decls, vars, tagName, attrs, localRefsIndex)\n        : declarationTView.data[adjustedIndex];\n    setCurrentTNode(tNode, false);\n    const comment = _locateOrCreateContainerAnchor(declarationTView, declarationLView, tNode, index);\n    if (wasLastNodeCreated()) {\n        appendChild(declarationTView, declarationLView, comment, tNode);\n    }\n    attachPatchData(comment, declarationLView);\n    const lContainer = createLContainer(comment, declarationLView, comment, tNode);\n    declarationLView[adjustedIndex] = lContainer;\n    addToEndOfViewTree(declarationLView, lContainer);\n    // If hydration is enabled, looks up dehydrated views in the DOM\n    // using hydration annotation info and stores those views on LContainer.\n    // In client-only mode, this function is a noop.\n    populateDehydratedViewsInLContainer(lContainer, tNode, declarationLView);\n    if (isDirectiveHost(tNode)) {\n        createDirectivesInstances(declarationTView, declarationLView, tNode);\n    }\n    if (localRefsIndex != null) {\n        saveResolvedLocalsInData(declarationLView, tNode, localRefExtractor);\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    const lView = getLView();\n    const tView = getTView();\n    const attrs = getConstant(tView.consts, attrsIndex);\n    declareTemplate(lView, tView, index, templateFn, decls, vars, tagName, attrs, localRefsIndex, localRefExtractor);\n    return ɵɵtemplate;\n}\nlet _locateOrCreateContainerAnchor = createContainerAnchorImpl;\n/**\n * Regular creation mode for LContainers and their anchor (comment) nodes.\n */\nfunction createContainerAnchorImpl(tView, lView, tNode, index) {\n    lastNodeWasCreated(true);\n    return lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n}\n/**\n * Enables hydration code path (to lookup existing elements in DOM)\n * in addition to the regular creation mode for LContainers and their\n * anchor (comment) nodes.\n */\nfunction locateOrCreateContainerAnchorImpl(tView, lView, tNode, index) {\n    const hydrationInfo = lView[HYDRATION];\n    const isNodeCreationMode = !hydrationInfo ||\n        isInSkipHydrationBlock$1() ||\n        isDetachedByI18n(tNode) ||\n        isDisconnectedNode$1(hydrationInfo, index);\n    lastNodeWasCreated(isNodeCreationMode);\n    // Regular creation mode.\n    if (isNodeCreationMode) {\n        return createContainerAnchorImpl(tView, lView, tNode, index);\n    }\n    const ssrId = hydrationInfo.data[TEMPLATES]?.[index] ?? null;\n    // Apply `ssrId` value to the underlying TView if it was not previously set.\n    //\n    // There might be situations when the same component is present in a template\n    // multiple times and some instances are opted-out of using hydration via\n    // `ngSkipHydration` attribute. In this scenario, at the time a TView is created,\n    // the `ssrId` might be `null` (if the first component is opted-out of hydration).\n    // The code below makes sure that the `ssrId` is applied to the TView if it's still\n    // `null` and verifies we never try to override it with a different value.\n    if (ssrId !== null && tNode.tView !== null) {\n        if (tNode.tView.ssrId === null) {\n            tNode.tView.ssrId = ssrId;\n        }\n        else {\n            ngDevMode &&\n                assertEqual(tNode.tView.ssrId, ssrId, 'Unexpected value of the `ssrId` for this TView');\n        }\n    }\n    // Hydration mode, looking up existing elements in DOM.\n    const currentRNode = locateNextRNode(hydrationInfo, tView, lView, tNode);\n    ngDevMode && validateNodeExists(currentRNode, lView, tNode);\n    setSegmentHead(hydrationInfo, index, currentRNode);\n    const viewContainerSize = calcSerializedContainerSize(hydrationInfo, index);\n    const comment = siblingAfter(viewContainerSize, currentRNode);\n    if (ngDevMode) {\n        validateMatchingNode(comment, Node.COMMENT_NODE, null, lView, tNode);\n        markRNodeAsClaimedByHydration(comment);\n    }\n    return comment;\n}\nfunction enableLocateOrCreateContainerAnchorImpl() {\n    _locateOrCreateContainerAnchor = locateOrCreateContainerAnchorImpl;\n}\n\n/**\n * Helper function to schedule a callback to be invoked when a browser becomes idle.\n *\n * @param callback A function to be invoked when a browser becomes idle.\n * @param injector injector for the app\n */\nfunction onIdle(callback, injector) {\n    const scheduler = injector.get(IdleScheduler);\n    const cleanupFn = () => scheduler.remove(callback);\n    scheduler.add(callback);\n    return cleanupFn;\n}\n/**\n * Use shims for the `requestIdleCallback` and `cancelIdleCallback` functions for\n * environments where those functions are not available (e.g. Node.js and Safari).\n *\n * Note: we wrap the `requestIdleCallback` call into a function, so that it can be\n * overridden/mocked in test environment and picked up by the runtime code.\n */\nconst _requestIdleCallback = () => typeof requestIdleCallback !== 'undefined' ? requestIdleCallback : setTimeout;\nconst _cancelIdleCallback = () => typeof requestIdleCallback !== 'undefined' ? cancelIdleCallback : clearTimeout;\n/**\n * Helper service to schedule `requestIdleCallback`s for batches of defer blocks,\n * to avoid calling `requestIdleCallback` for each defer block (e.g. if\n * defer blocks are defined inside a for loop).\n */\nclass IdleScheduler {\n    // Indicates whether current callbacks are being invoked.\n    executingCallbacks = false;\n    // Currently scheduled idle callback id.\n    idleId = null;\n    // Set of callbacks to be invoked next.\n    current = new Set();\n    // Set of callbacks collected while invoking current set of callbacks.\n    // Those callbacks are scheduled for the next idle period.\n    deferred = new Set();\n    ngZone = inject(NgZone);\n    requestIdleCallbackFn = _requestIdleCallback().bind(globalThis);\n    cancelIdleCallbackFn = _cancelIdleCallback().bind(globalThis);\n    add(callback) {\n        const target = this.executingCallbacks ? this.deferred : this.current;\n        target.add(callback);\n        if (this.idleId === null) {\n            this.scheduleIdleCallback();\n        }\n    }\n    remove(callback) {\n        const { current, deferred } = this;\n        current.delete(callback);\n        deferred.delete(callback);\n        // If the last callback was removed and there is a pending\n        // idle callback - cancel it.\n        if (current.size === 0 && deferred.size === 0) {\n            this.cancelIdleCallback();\n        }\n    }\n    scheduleIdleCallback() {\n        const callback = () => {\n            this.cancelIdleCallback();\n            this.executingCallbacks = true;\n            for (const callback of this.current) {\n                callback();\n            }\n            this.current.clear();\n            this.executingCallbacks = false;\n            // If there are any callbacks added during an invocation\n            // of the current ones - make them \"current\" and schedule\n            // a new idle callback.\n            if (this.deferred.size > 0) {\n                for (const callback of this.deferred) {\n                    this.current.add(callback);\n                }\n                this.deferred.clear();\n                this.scheduleIdleCallback();\n            }\n        };\n        // Ensure that the callback runs in the NgZone since\n        // the `requestIdleCallback` is not currently patched by Zone.js.\n        this.idleId = this.requestIdleCallbackFn(() => this.ngZone.run(callback));\n    }\n    cancelIdleCallback() {\n        if (this.idleId !== null) {\n            this.cancelIdleCallbackFn(this.idleId);\n            this.idleId = null;\n        }\n    }\n    ngOnDestroy() {\n        this.cancelIdleCallback();\n        this.current.clear();\n        this.deferred.clear();\n    }\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: IdleScheduler,\n        providedIn: 'root',\n        factory: () => new IdleScheduler(),\n    });\n}\n\n/**\n * Returns a function that captures a provided delay.\n * Invoking the returned function schedules a trigger.\n */\nfunction onTimer(delay) {\n    return (callback, injector) => scheduleTimerTrigger(delay, callback, injector);\n}\n/**\n * Schedules a callback to be invoked after a given timeout.\n *\n * @param delay A number of ms to wait until firing a callback.\n * @param callback A function to be invoked after a timeout.\n * @param injector injector for the app.\n */\nfunction scheduleTimerTrigger(delay, callback, injector) {\n    const scheduler = injector.get(TimerScheduler);\n    const cleanupFn = () => scheduler.remove(callback);\n    scheduler.add(delay, callback);\n    return cleanupFn;\n}\n/**\n * Helper service to schedule `setTimeout`s for batches of defer blocks,\n * to avoid calling `setTimeout` for each defer block (e.g. if defer blocks\n * are created inside a for loop).\n */\nclass TimerScheduler {\n    // Indicates whether current callbacks are being invoked.\n    executingCallbacks = false;\n    // Currently scheduled `setTimeout` id.\n    timeoutId = null;\n    // When currently scheduled timer would fire.\n    invokeTimerAt = null;\n    // List of callbacks to be invoked.\n    // For each callback we also store a timestamp on when the callback\n    // should be invoked. We store timestamps and callback functions\n    // in a flat array to avoid creating new objects for each entry.\n    // [timestamp1, callback1, timestamp2, callback2, ...]\n    current = [];\n    // List of callbacks collected while invoking current set of callbacks.\n    // Those callbacks are added to the \"current\" queue at the end of\n    // the current callback invocation. The shape of this list is the same\n    // as the shape of the `current` list.\n    deferred = [];\n    add(delay, callback) {\n        const target = this.executingCallbacks ? this.deferred : this.current;\n        this.addToQueue(target, Date.now() + delay, callback);\n        this.scheduleTimer();\n    }\n    remove(callback) {\n        const { current, deferred } = this;\n        const callbackIndex = this.removeFromQueue(current, callback);\n        if (callbackIndex === -1) {\n            // Try cleaning up deferred queue only in case\n            // we didn't find a callback in the \"current\" queue.\n            this.removeFromQueue(deferred, callback);\n        }\n        // If the last callback was removed and there is a pending timeout - cancel it.\n        if (current.length === 0 && deferred.length === 0) {\n            this.clearTimeout();\n        }\n    }\n    addToQueue(target, invokeAt, callback) {\n        let insertAtIndex = target.length;\n        for (let i = 0; i < target.length; i += 2) {\n            const invokeQueuedCallbackAt = target[i];\n            if (invokeQueuedCallbackAt > invokeAt) {\n                // We've reached a first timer that is scheduled\n                // for a later time than what we are trying to insert.\n                // This is the location at which we need to insert,\n                // no need to iterate further.\n                insertAtIndex = i;\n                break;\n            }\n        }\n        arrayInsert2(target, insertAtIndex, invokeAt, callback);\n    }\n    removeFromQueue(target, callback) {\n        let index = -1;\n        for (let i = 0; i < target.length; i += 2) {\n            const queuedCallback = target[i + 1];\n            if (queuedCallback === callback) {\n                index = i;\n                break;\n            }\n        }\n        if (index > -1) {\n            // Remove 2 elements: a timestamp slot and\n            // the following slot with a callback function.\n            arraySplice(target, index, 2);\n        }\n        return index;\n    }\n    scheduleTimer() {\n        const callback = () => {\n            this.clearTimeout();\n            this.executingCallbacks = true;\n            // Clone the current state of the queue, since it might be altered\n            // as we invoke callbacks.\n            const current = [...this.current];\n            // Invoke callbacks that were scheduled to run before the current time.\n            const now = Date.now();\n            for (let i = 0; i < current.length; i += 2) {\n                const invokeAt = current[i];\n                const callback = current[i + 1];\n                if (invokeAt <= now) {\n                    callback();\n                }\n                else {\n                    // We've reached a timer that should not be invoked yet.\n                    break;\n                }\n            }\n            // The state of the queue might've changed after callbacks invocation,\n            // run the cleanup logic based on the *current* state of the queue.\n            let lastCallbackIndex = -1;\n            for (let i = 0; i < this.current.length; i += 2) {\n                const invokeAt = this.current[i];\n                if (invokeAt <= now) {\n                    // Add +1 to account for a callback function that\n                    // goes after the timestamp in events array.\n                    lastCallbackIndex = i + 1;\n                }\n                else {\n                    // We've reached a timer that should not be invoked yet.\n                    break;\n                }\n            }\n            if (lastCallbackIndex >= 0) {\n                arraySplice(this.current, 0, lastCallbackIndex + 1);\n            }\n            this.executingCallbacks = false;\n            // If there are any callbacks added during an invocation\n            // of the current ones - move them over to the \"current\"\n            // queue.\n            if (this.deferred.length > 0) {\n                for (let i = 0; i < this.deferred.length; i += 2) {\n                    const invokeAt = this.deferred[i];\n                    const callback = this.deferred[i + 1];\n                    this.addToQueue(this.current, invokeAt, callback);\n                }\n                this.deferred.length = 0;\n            }\n            this.scheduleTimer();\n        };\n        // Avoid running timer callbacks more than once per\n        // average frame duration. This is needed for better\n        // batching and to avoid kicking off excessive change\n        // detection cycles.\n        const FRAME_DURATION_MS = 16; // 1000ms / 60fps\n        if (this.current.length > 0) {\n            const now = Date.now();\n            // First element in the queue points at the timestamp\n            // of the first (earliest) event.\n            const invokeAt = this.current[0];\n            if (this.timeoutId === null ||\n                // Reschedule a timer in case a queue contains an item with\n                // an earlier timestamp and the delta is more than an average\n                // frame duration.\n                (this.invokeTimerAt && this.invokeTimerAt - invokeAt > FRAME_DURATION_MS)) {\n                // There was a timeout already, but an earlier event was added\n                // into the queue. In this case we drop an old timer and setup\n                // a new one with an updated (smaller) timeout.\n                this.clearTimeout();\n                const timeout = Math.max(invokeAt - now, FRAME_DURATION_MS);\n                this.invokeTimerAt = invokeAt;\n                this.timeoutId = setTimeout(callback, timeout);\n            }\n        }\n    }\n    clearTimeout() {\n        if (this.timeoutId !== null) {\n            clearTimeout(this.timeoutId);\n            this.timeoutId = null;\n        }\n    }\n    ngOnDestroy() {\n        this.clearTimeout();\n        this.current.length = 0;\n        this.deferred.length = 0;\n    }\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: TimerScheduler,\n        providedIn: 'root',\n        factory: () => new TimerScheduler(),\n    });\n}\n\n/**\n * A service used by the framework to create and cache injector instances.\n *\n * This service is used to create a single injector instance for each defer\n * block definition, to avoid creating an injector for each defer block instance\n * of a certain type.\n */\nclass CachedInjectorService {\n    cachedInjectors = new Map();\n    getOrCreateInjector(key, parentInjector, providers, debugName) {\n        if (!this.cachedInjectors.has(key)) {\n            const injector = providers.length > 0\n                ? createEnvironmentInjector(providers, parentInjector, debugName)\n                : null;\n            this.cachedInjectors.set(key, injector);\n        }\n        return this.cachedInjectors.get(key);\n    }\n    ngOnDestroy() {\n        try {\n            for (const injector of this.cachedInjectors.values()) {\n                if (injector !== null) {\n                    injector.destroy();\n                }\n            }\n        }\n        finally {\n            this.cachedInjectors.clear();\n        }\n    }\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: CachedInjectorService,\n        providedIn: 'environment',\n        factory: () => new CachedInjectorService(),\n    });\n}\n\n/**\n * **INTERNAL**, avoid referencing it in application code.\n * *\n * Injector token that allows to provide `DeferBlockDependencyInterceptor` class\n * implementation.\n *\n * This token is only injected in devMode\n */\nconst DEFER_BLOCK_DEPENDENCY_INTERCEPTOR = new InjectionToken('DEFER_BLOCK_DEPENDENCY_INTERCEPTOR');\n/**\n * **INTERNAL**, token used for configuring defer block behavior.\n */\nconst DEFER_BLOCK_CONFIG = new InjectionToken(ngDevMode ? 'DEFER_BLOCK_CONFIG' : '');\n/**\n * Checks whether there is a cached injector associated with a given defer block\n * declaration and returns if it exists. If there is no cached injector present -\n * creates a new injector and stores in the cache.\n */\nfunction getOrCreateEnvironmentInjector(parentInjector, tDetails, providers) {\n    return parentInjector\n        .get(CachedInjectorService)\n        .getOrCreateInjector(tDetails, parentInjector, providers, ngDevMode ? 'DeferBlock Injector' : '');\n}\n/** Injector Helpers */\n/**\n * Creates a new injector, which contains providers collected from dependencies (NgModules) of\n * defer-loaded components. This function detects different types of parent injectors and creates\n * a new injector based on that.\n */\nfunction createDeferBlockInjector(parentInjector, tDetails, providers) {\n    // Check if the parent injector is an instance of a `ChainedInjector`.\n    //\n    // In this case, we retain the shape of the injector and use a newly created\n    // `EnvironmentInjector` as a parent in the `ChainedInjector`. That is needed to\n    // make sure that the primary injector gets consulted first (since it's typically\n    // a NodeInjector) and `EnvironmentInjector` tree is consulted after that.\n    if (parentInjector instanceof ChainedInjector) {\n        const origInjector = parentInjector.injector;\n        // Guaranteed to be an environment injector\n        const parentEnvInjector = parentInjector.parentInjector;\n        const envInjector = getOrCreateEnvironmentInjector(parentEnvInjector, tDetails, providers);\n        return new ChainedInjector(origInjector, envInjector);\n    }\n    const parentEnvInjector = parentInjector.get(EnvironmentInjector);\n    // If the `parentInjector` is *not* an `EnvironmentInjector` - we need to create\n    // a new `ChainedInjector` with the following setup:\n    //\n    //  - the provided `parentInjector` becomes a primary injector\n    //  - an existing (real) `EnvironmentInjector` becomes a parent injector for\n    //    a newly-created one, which contains extra providers\n    //\n    // So the final order in which injectors would be consulted in this case would look like this:\n    //\n    //  1. Provided `parentInjector`\n    //  2. Newly-created `EnvironmentInjector` with extra providers\n    //  3. `EnvironmentInjector` from the `parentInjector`\n    if (parentEnvInjector !== parentInjector) {\n        const envInjector = getOrCreateEnvironmentInjector(parentEnvInjector, tDetails, providers);\n        return new ChainedInjector(parentInjector, envInjector);\n    }\n    // The `parentInjector` is an instance of an `EnvironmentInjector`.\n    // No need for special handling, we can use `parentInjector` as a\n    // parent injector directly.\n    return getOrCreateEnvironmentInjector(parentInjector, tDetails, providers);\n}\n/** Rendering Helpers */\n/**\n * Transitions a defer block to the new state. Updates the  necessary\n * data structures and renders corresponding block.\n *\n * @param newState New state that should be applied to the defer block.\n * @param tNode TNode that represents a defer block.\n * @param lContainer Represents an instance of a defer block.\n * @param skipTimerScheduling Indicates that `@loading` and `@placeholder` block\n *   should be rendered immediately, even if they have `after` or `minimum` config\n *   options setup. This flag to needed for testing APIs to transition defer block\n *   between states via `DeferFixture.render` method.\n */\nfunction renderDeferBlockState(newState, tNode, lContainer, skipTimerScheduling = false) {\n    const hostLView = lContainer[PARENT];\n    const hostTView = hostLView[TVIEW];\n    // Check if this view is not destroyed. Since the loading process was async,\n    // the view might end up being destroyed by the time rendering happens.\n    if (isDestroyed(hostLView))\n        return;\n    // Make sure this TNode belongs to TView that represents host LView.\n    ngDevMode && assertTNodeForLView(tNode, hostLView);\n    const lDetails = getLDeferBlockDetails(hostLView, tNode);\n    ngDevMode && assertDefined(lDetails, 'Expected a defer block state defined');\n    const currentState = lDetails[DEFER_BLOCK_STATE];\n    const ssrState = lDetails[SSR_BLOCK_STATE];\n    if (ssrState !== null && newState < ssrState) {\n        return; // trying to render a previous state, exit\n    }\n    if (isValidStateChange(currentState, newState) &&\n        isValidStateChange(lDetails[NEXT_DEFER_BLOCK_STATE] ?? -1, newState)) {\n        const tDetails = getTDeferBlockDetails(hostTView, tNode);\n        // Skips scheduling on the server since it can delay the server response.\n        const needsScheduling = !skipTimerScheduling &&\n            (typeof ngServerMode === 'undefined' || !ngServerMode) &&\n            (getLoadingBlockAfter(tDetails) !== null ||\n                getMinimumDurationForState(tDetails, DeferBlockState.Loading) !== null ||\n                getMinimumDurationForState(tDetails, DeferBlockState.Placeholder));\n        if (ngDevMode && needsScheduling) {\n            assertDefined(applyDeferBlockStateWithSchedulingImpl, 'Expected scheduling function to be defined');\n        }\n        const applyStateFn = needsScheduling\n            ? applyDeferBlockStateWithSchedulingImpl\n            : applyDeferBlockState;\n        try {\n            applyStateFn(newState, lDetails, lContainer, tNode, hostLView);\n        }\n        catch (error) {\n            handleError(hostLView, error);\n        }\n    }\n}\nfunction findMatchingDehydratedViewForDeferBlock(lContainer, lDetails) {\n    // Find matching view based on serialized defer block state.\n    return (lContainer[DEHYDRATED_VIEWS]?.find((view) => view.data[DEFER_BLOCK_STATE$1] === lDetails[DEFER_BLOCK_STATE]) ?? null);\n}\n/**\n * Applies changes to the DOM to reflect a given state.\n */\nfunction applyDeferBlockState(newState, lDetails, lContainer, tNode, hostLView) {\n    const stateTmplIndex = getTemplateIndexForState(newState, hostLView, tNode);\n    if (stateTmplIndex !== null) {\n        lDetails[DEFER_BLOCK_STATE] = newState;\n        const hostTView = hostLView[TVIEW];\n        const adjustedIndex = stateTmplIndex + HEADER_OFFSET;\n        // The TNode that represents a template that will activated in the defer block\n        const activeBlockTNode = getTNode(hostTView, adjustedIndex);\n        // There is only 1 view that can be present in an LContainer that\n        // represents a defer block, so always refer to the first one.\n        const viewIndex = 0;\n        removeLViewFromLContainer(lContainer, viewIndex);\n        let injector;\n        if (newState === DeferBlockState.Complete) {\n            // When we render a defer block in completed state, there might be\n            // newly loaded standalone components used within the block, which may\n            // import NgModules with providers. In order to make those providers\n            // available for components declared in that NgModule, we create an instance\n            // of an environment injector to host those providers and pass this injector\n            // to the logic that creates a view.\n            const tDetails = getTDeferBlockDetails(hostTView, tNode);\n            const providers = tDetails.providers;\n            if (providers && providers.length > 0) {\n                injector = createDeferBlockInjector(hostLView[INJECTOR], tDetails, providers);\n            }\n        }\n        const dehydratedView = findMatchingDehydratedViewForDeferBlock(lContainer, lDetails);\n        // Erase dehydrated view info, so that it's not removed later\n        // by post-hydration cleanup process.\n        lContainer[DEHYDRATED_VIEWS] = null;\n        const embeddedLView = createAndRenderEmbeddedLView(hostLView, activeBlockTNode, null, {\n            injector,\n            dehydratedView,\n        });\n        addLViewToLContainer(lContainer, embeddedLView, viewIndex, shouldAddViewToDom(activeBlockTNode, dehydratedView));\n        markViewDirty(embeddedLView, 2 /* NotificationSource.DeferBlockStateUpdate */);\n        // TODO(incremental-hydration):\n        // - what if we had some views in `lContainer[DEHYDRATED_VIEWS]`, but\n        //   we didn't find a view that matches the expected state?\n        // - for example, handle a situation when a block was in the \"completed\" state\n        //   on the server, but the loading failing on the client. How do we reconcile and cleanup?\n        if ((newState === DeferBlockState.Complete || newState === DeferBlockState.Error) &&\n            Array.isArray(lDetails[ON_COMPLETE_FNS])) {\n            for (const callback of lDetails[ON_COMPLETE_FNS]) {\n                callback();\n            }\n            lDetails[ON_COMPLETE_FNS] = null;\n        }\n    }\n}\n/**\n * Extends the `applyDeferBlockState` with timer-based scheduling.\n * This function becomes available on a page if there are defer blocks\n * that use `after` or `minimum` parameters in the `@loading` or\n * `@placeholder` blocks.\n */\nfunction applyDeferBlockStateWithScheduling(newState, lDetails, lContainer, tNode, hostLView) {\n    const now = Date.now();\n    const hostTView = hostLView[TVIEW];\n    const tDetails = getTDeferBlockDetails(hostTView, tNode);\n    if (lDetails[STATE_IS_FROZEN_UNTIL] === null || lDetails[STATE_IS_FROZEN_UNTIL] <= now) {\n        lDetails[STATE_IS_FROZEN_UNTIL] = null;\n        const loadingAfter = getLoadingBlockAfter(tDetails);\n        const inLoadingAfterPhase = lDetails[LOADING_AFTER_CLEANUP_FN] !== null;\n        if (newState === DeferBlockState.Loading && loadingAfter !== null && !inLoadingAfterPhase) {\n            // Trying to render loading, but it has an `after` config,\n            // so schedule an update action after a timeout.\n            lDetails[NEXT_DEFER_BLOCK_STATE] = newState;\n            const cleanupFn = scheduleDeferBlockUpdate(loadingAfter, lDetails, tNode, lContainer, hostLView);\n            lDetails[LOADING_AFTER_CLEANUP_FN] = cleanupFn;\n        }\n        else {\n            // If we transition to a complete or an error state and there is a pending\n            // operation to render loading after a timeout - invoke a cleanup operation,\n            // which stops the timer.\n            if (newState > DeferBlockState.Loading && inLoadingAfterPhase) {\n                lDetails[LOADING_AFTER_CLEANUP_FN]();\n                lDetails[LOADING_AFTER_CLEANUP_FN] = null;\n                lDetails[NEXT_DEFER_BLOCK_STATE] = null;\n            }\n            applyDeferBlockState(newState, lDetails, lContainer, tNode, hostLView);\n            const duration = getMinimumDurationForState(tDetails, newState);\n            if (duration !== null) {\n                lDetails[STATE_IS_FROZEN_UNTIL] = now + duration;\n                scheduleDeferBlockUpdate(duration, lDetails, tNode, lContainer, hostLView);\n            }\n        }\n    }\n    else {\n        // We are still rendering the previous state.\n        // Update the `NEXT_DEFER_BLOCK_STATE`, which would be\n        // picked up once it's time to transition to the next state.\n        lDetails[NEXT_DEFER_BLOCK_STATE] = newState;\n    }\n}\n/**\n * Schedules an update operation after a specified timeout.\n */\nfunction scheduleDeferBlockUpdate(timeout, lDetails, tNode, lContainer, hostLView) {\n    const callback = () => {\n        const nextState = lDetails[NEXT_DEFER_BLOCK_STATE];\n        lDetails[STATE_IS_FROZEN_UNTIL] = null;\n        lDetails[NEXT_DEFER_BLOCK_STATE] = null;\n        if (nextState !== null) {\n            renderDeferBlockState(nextState, tNode, lContainer);\n        }\n    };\n    return scheduleTimerTrigger(timeout, callback, hostLView[INJECTOR]);\n}\n/**\n * Checks whether we can transition to the next state.\n *\n * We transition to the next state if the previous state was represented\n * with a number that is less than the next state. For example, if the current\n * state is \"loading\" (represented as `1`), we should not show a placeholder\n * (represented as `0`), but we can show a completed state (represented as `2`)\n * or an error state (represented as `3`).\n */\nfunction isValidStateChange(currentState, newState) {\n    return currentState < newState;\n}\n/** Utility function to render placeholder content (if present) */\nfunction renderPlaceholder(lView, tNode) {\n    const lContainer = lView[tNode.index];\n    ngDevMode && assertLContainer(lContainer);\n    renderDeferBlockState(DeferBlockState.Placeholder, tNode, lContainer);\n}\n/**\n * Subscribes to the \"loading\" Promise and renders corresponding defer sub-block,\n * based on the loading results.\n *\n * @param lContainer Represents an instance of a defer block.\n * @param tNode Represents defer block info shared across all instances.\n */\nfunction renderDeferStateAfterResourceLoading(tDetails, tNode, lContainer) {\n    ngDevMode &&\n        assertDefined(tDetails.loadingPromise, 'Expected loading Promise to exist on this defer block');\n    tDetails.loadingPromise.then(() => {\n        if (tDetails.loadingState === DeferDependenciesLoadingState.COMPLETE) {\n            ngDevMode && assertDeferredDependenciesLoaded(tDetails);\n            // Everything is loaded, show the primary block content\n            renderDeferBlockState(DeferBlockState.Complete, tNode, lContainer);\n        }\n        else if (tDetails.loadingState === DeferDependenciesLoadingState.FAILED) {\n            renderDeferBlockState(DeferBlockState.Error, tNode, lContainer);\n        }\n    });\n}\n/**\n * Reference to the timer-based scheduler implementation of defer block state\n * rendering method. It's used to make timer-based scheduling tree-shakable.\n * If `minimum` or `after` parameters are used, compiler generates an extra\n * argument for the `ɵɵdefer` instruction, which references a timer-based\n * implementation.\n */\nlet applyDeferBlockStateWithSchedulingImpl = null;\n/**\n * Enables timer-related scheduling if `after` or `minimum` parameters are setup\n * on the `@loading` or `@placeholder` blocks.\n */\nfunction ɵɵdeferEnableTimerScheduling(tView, tDetails, placeholderConfigIndex, loadingConfigIndex) {\n    const tViewConsts = tView.consts;\n    if (placeholderConfigIndex != null) {\n        tDetails.placeholderBlockConfig = getConstant(tViewConsts, placeholderConfigIndex);\n    }\n    if (loadingConfigIndex != null) {\n        tDetails.loadingBlockConfig = getConstant(tViewConsts, loadingConfigIndex);\n    }\n    // Enable implementation that supports timer-based scheduling.\n    if (applyDeferBlockStateWithSchedulingImpl === null) {\n        applyDeferBlockStateWithSchedulingImpl = applyDeferBlockStateWithScheduling;\n    }\n}\n\n/**\n * The name of a field that Angular monkey-patches onto a component\n * class to store a function that loads defer-loadable dependencies\n * and applies metadata to a class.\n */\nconst ASYNC_COMPONENT_METADATA_FN = '__ngAsyncComponentMetadataFn__';\n/**\n * If a given component has unresolved async metadata - returns a reference\n * to a function that applies component metadata after resolving defer-loadable\n * dependencies. Otherwise - this function returns `null`.\n */\nfunction getAsyncClassMetadataFn(type) {\n    const componentClass = type; // cast to `any`, so that we can read a monkey-patched field\n    return componentClass[ASYNC_COMPONENT_METADATA_FN] ?? null;\n}\n/**\n * Handles the process of applying metadata info to a component class in case\n * component template has defer blocks (thus some dependencies became deferrable).\n *\n * @param type Component class where metadata should be added\n * @param dependencyLoaderFn Function that loads dependencies\n * @param metadataSetterFn Function that forms a scope in which the `setClassMetadata` is invoked\n */\nfunction setClassMetadataAsync(type, dependencyLoaderFn, metadataSetterFn) {\n    const componentClass = type; // cast to `any`, so that we can monkey-patch it\n    componentClass[ASYNC_COMPONENT_METADATA_FN] = () => Promise.all(dependencyLoaderFn()).then((dependencies) => {\n        metadataSetterFn(...dependencies);\n        // Metadata is now set, reset field value to indicate that this component\n        // can by used/compiled synchronously.\n        componentClass[ASYNC_COMPONENT_METADATA_FN] = null;\n        return dependencies;\n    });\n    return componentClass[ASYNC_COMPONENT_METADATA_FN];\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 guarded by ngDevMode, resulting in the metadata assignments\n * being tree-shaken away during production builds.\n */\nfunction setClassMetadata(type, decorators, ctorParameters, propDecorators) {\n    return noSideEffects(() => {\n        const clazz = type;\n        if (decorators !== null) {\n            if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {\n                clazz.decorators.push(...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.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) {\n                clazz.propDecorators = { ...clazz.propDecorators, ...propDecorators };\n            }\n            else {\n                clazz.propDecorators = propDecorators;\n            }\n        }\n    });\n}\n\n/*\n * This file exists to support compilation of @angular/core in Ivy mode.\n *\n * When the Angular compiler processes a compilation unit, it normally writes imports to\n * @angular/core. When compiling the core package itself this strategy isn't usable. Instead, the\n * compiler writes imports to this file.\n *\n * Only a subset of such imports are supported - core is not allowed to declare components or pipes.\n * A check in ngtsc's `R3SymbolsImportRewriter` validates this condition. The rewriter is only used\n * when compiling @angular/core and is responsible for translating an external name (prefixed with\n * ɵ) to the internal symbol name as exported below.\n *\n * The below symbols are used for @Injectable and @NgModule compilation.\n */\n/**\n * The existence of this constant (in this particular file) informs the Angular compiler that the\n * current program is actually @angular/core, which needs to be compiled specially.\n */\nconst ITS_JUST_ANGULAR = true;\n\nclass Console {\n    log(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    warn(message) {\n        // tslint:disable-next-line:no-console\n        console.warn(message);\n    }\n    static ɵfac = function Console_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Console)(); };\n    static ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: Console.ɵfac, providedIn: 'platform' });\n}\n(() => { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Console, [{\n        type: Injectable,\n        args: [{ providedIn: 'platform' }]\n    }], null, null); })();\n\n/**\n * These are the data structures that our framework injector profiler will fill with data in order\n * to support DI debugging APIs.\n *\n * resolverToTokenToDependencies: Maps an injector to a Map of tokens to an Array of\n * dependencies. Injector -> Token -> Dependencies This is used to support the\n * getDependenciesFromInjectable API, which takes in an injector and a token and returns it's\n * dependencies.\n *\n * resolverToProviders: Maps a DI resolver (an Injector or a TNode) to the providers configured\n * within it This is used to support the getInjectorProviders API, which takes in an injector and\n * returns the providers that it was configured with. Note that for the element injector case we\n * use the TNode instead of the LView as the DI resolver. This is because the registration of\n * providers happens only once per type of TNode. If an injector is created with an identical TNode,\n * the providers for that injector will not be reconfigured.\n *\n * standaloneInjectorToComponent: Maps the injector of a standalone component to the standalone\n * component that it is associated with. Used in the getInjectorProviders API, specificially in the\n * discovery of import paths for each provider. This is necessary because the imports array of a\n * standalone component is processed and configured in its standalone injector, but exists within\n * the component's definition. Because getInjectorProviders takes in an injector, if that injector\n * is the injector of a standalone component, we need to be able to discover the place where the\n * imports array is located (the component) in order to flatten the imports array within it to\n * discover all of it's providers.\n *\n *\n * All of these data structures are instantiated with WeakMaps. This will ensure that the presence\n * of any object in the keys of these maps does not prevent the garbage collector from collecting\n * those objects. Because of this property of WeakMaps, these data structures will never be the\n * source of a memory leak.\n *\n * An example of this advantage: When components are destroyed, we don't need to do\n * any additional work to remove that component from our mappings.\n *\n */\nclass DIDebugData {\n    resolverToTokenToDependencies = new WeakMap();\n    resolverToProviders = new WeakMap();\n    standaloneInjectorToComponent = new WeakMap();\n    reset() {\n        this.resolverToTokenToDependencies = new WeakMap();\n        this.resolverToProviders = new WeakMap();\n        this.standaloneInjectorToComponent = new WeakMap();\n    }\n}\nlet frameworkDIDebugData = new DIDebugData();\nfunction getFrameworkDIDebugData() {\n    return frameworkDIDebugData;\n}\n/**\n * Initalize default handling of injector events. This handling parses events\n * as they are emitted and constructs the data structures necessary to support\n * some of debug APIs.\n *\n * See handleInjectEvent, handleCreateEvent and handleProviderConfiguredEvent\n * for descriptions of each handler\n *\n * Supported APIs:\n *               - getDependenciesFromInjectable\n *               - getInjectorProviders\n */\nfunction setupFrameworkInjectorProfiler() {\n    frameworkDIDebugData.reset();\n    setInjectorProfiler((injectorProfilerEvent) => handleInjectorProfilerEvent(injectorProfilerEvent));\n}\nfunction handleInjectorProfilerEvent(injectorProfilerEvent) {\n    const { context, type } = injectorProfilerEvent;\n    if (type === 0 /* InjectorProfilerEventType.Inject */) {\n        handleInjectEvent(context, injectorProfilerEvent.service);\n    }\n    else if (type === 1 /* InjectorProfilerEventType.InstanceCreatedByInjector */) {\n        handleInstanceCreatedByInjectorEvent(context, injectorProfilerEvent.instance);\n    }\n    else if (type === 2 /* InjectorProfilerEventType.ProviderConfigured */) {\n        handleProviderConfiguredEvent(context, injectorProfilerEvent.providerRecord);\n    }\n}\n/**\n *\n * Stores the injected service in frameworkDIDebugData.resolverToTokenToDependencies\n * based on it's injector and token.\n *\n * @param context InjectorProfilerContext the injection context that this event occurred in.\n * @param data InjectedService the service associated with this inject event.\n *\n */\nfunction handleInjectEvent(context, data) {\n    const diResolver = getDIResolver(context.injector);\n    if (diResolver === null) {\n        throwError('An Inject event must be run within an injection context.');\n    }\n    const diResolverToInstantiatedToken = frameworkDIDebugData.resolverToTokenToDependencies;\n    if (!diResolverToInstantiatedToken.has(diResolver)) {\n        diResolverToInstantiatedToken.set(diResolver, new WeakMap());\n    }\n    // if token is a primitive type, ignore this event. We do this because we cannot keep track of\n    // non-primitive tokens in WeakMaps since they are not garbage collectable.\n    if (!canBeHeldWeakly(context.token)) {\n        return;\n    }\n    const instantiatedTokenToDependencies = diResolverToInstantiatedToken.get(diResolver);\n    if (!instantiatedTokenToDependencies.has(context.token)) {\n        instantiatedTokenToDependencies.set(context.token, []);\n    }\n    const { token, value, flags } = data;\n    assertDefined(context.token, 'Injector profiler context token is undefined.');\n    const dependencies = instantiatedTokenToDependencies.get(context.token);\n    assertDefined(dependencies, 'Could not resolve dependencies for token.');\n    if (context.injector instanceof NodeInjector) {\n        dependencies.push({ token, value, flags, injectedIn: getNodeInjectorContext(context.injector) });\n    }\n    else {\n        dependencies.push({ token, value, flags });\n    }\n}\n/**\n *\n * Returns the LView and TNode associated with a NodeInjector. Returns undefined if the injector\n * is not a NodeInjector.\n *\n * @param injector\n * @returns {lView: LView, tNode: TNode}|undefined\n */\nfunction getNodeInjectorContext(injector) {\n    if (!(injector instanceof NodeInjector)) {\n        throwError('getNodeInjectorContext must be called with a NodeInjector');\n    }\n    const lView = getNodeInjectorLView(injector);\n    const tNode = getNodeInjectorTNode(injector);\n    if (tNode === null) {\n        return;\n    }\n    assertTNodeForLView(tNode, lView);\n    return { lView, tNode };\n}\n/**\n *\n * If the created instance is an instance of a standalone component, maps the injector to that\n * standalone component in frameworkDIDebugData.standaloneInjectorToComponent\n *\n * @param context InjectorProfilerContext the injection context that this event occurred in.\n * @param data InjectorCreatedInstance an object containing the instance that was just created\n *\n */\nfunction handleInstanceCreatedByInjectorEvent(context, data) {\n    const { value } = data;\n    if (getDIResolver(context.injector) === null) {\n        throwError('An InjectorCreatedInstance event must be run within an injection context.');\n    }\n    // if our value is an instance of a standalone component, map the injector of that standalone\n    // component to the component class. Otherwise, this event is a noop.\n    let standaloneComponent = undefined;\n    if (typeof value === 'object') {\n        standaloneComponent = value?.constructor;\n    }\n    // We want to also cover if `standaloneComponent === null` in addition to `undefined`\n    if (standaloneComponent == undefined || !isStandaloneComponent(standaloneComponent)) {\n        return;\n    }\n    const environmentInjector = context.injector.get(EnvironmentInjector, null, { optional: true });\n    // Standalone components should have an environment injector. If one cannot be\n    // found we may be in a test case for low level functionality that did not explicitly\n    // setup this injector. In those cases, we simply ignore this event.\n    if (environmentInjector === null) {\n        return;\n    }\n    const { standaloneInjectorToComponent } = frameworkDIDebugData;\n    // If our injector has already been mapped, as is the case\n    // when a standalone component imports another standalone component,\n    // we consider the original component (the component doing the importing)\n    // as the component connected to our injector.\n    if (standaloneInjectorToComponent.has(environmentInjector)) {\n        return;\n    }\n    // If our injector hasn't been mapped, then we map it to the standalone component\n    standaloneInjectorToComponent.set(environmentInjector, standaloneComponent);\n}\nfunction isStandaloneComponent(value) {\n    const def = getComponentDef(value);\n    return !!def?.standalone;\n}\n/**\n *\n * Stores the emitted ProviderRecords from the InjectorProfilerEventType.ProviderConfigured\n * event in frameworkDIDebugData.resolverToProviders\n *\n * @param context InjectorProfilerContext the injection context that this event occurred in.\n * @param data ProviderRecord an object containing the instance that was just created\n *\n */\nfunction handleProviderConfiguredEvent(context, data) {\n    const { resolverToProviders } = frameworkDIDebugData;\n    let diResolver;\n    if (context?.injector instanceof NodeInjector) {\n        diResolver = getNodeInjectorTNode(context.injector);\n    }\n    else {\n        diResolver = context.injector;\n    }\n    if (diResolver === null) {\n        throwError('A ProviderConfigured event must be run within an injection context.');\n    }\n    if (!resolverToProviders.has(diResolver)) {\n        resolverToProviders.set(diResolver, []);\n    }\n    resolverToProviders.get(diResolver).push(data);\n}\nfunction getDIResolver(injector) {\n    let diResolver = null;\n    if (injector === undefined) {\n        return diResolver;\n    }\n    // We use the LView as the diResolver for NodeInjectors because they\n    // do not persist anywhere in the framework. They are simply wrappers around an LView and a TNode\n    // that do persist. Because of this, we rely on the LView of the NodeInjector in order to use\n    // as a concrete key to represent this injector. If we get the same LView back later, we know\n    // we're looking at the same injector.\n    if (injector instanceof NodeInjector) {\n        diResolver = getNodeInjectorLView(injector);\n    }\n    // Other injectors can be used a keys for a map because their instances\n    // persist\n    else {\n        diResolver = injector;\n    }\n    return diResolver;\n}\n// inspired by\n// https://tc39.es/ecma262/multipage/executable-code-and-execution-contexts.html#sec-canbeheldweakly\nfunction canBeHeldWeakly(value) {\n    // we check for value !== null here because typeof null === 'object\n    return (value !== null &&\n        (typeof value === 'object' || typeof value === 'function' || typeof value === 'symbol'));\n}\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 */\nfunction applyChanges(component) {\n    ngDevMode && assertDefined(component, 'component');\n    markViewDirty(getComponentViewByInstance(component), 3 /* NotificationSource.DebugApplyChanges */);\n    getRootComponents(component).forEach((rootComponent) => detectChanges(rootComponent));\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    const view = getComponentViewByInstance(component);\n    view[FLAGS] |= 1024 /* LViewFlags.RefreshView */;\n    detectChangesInternal(view);\n}\n\n/**\n * Discovers the dependencies of an injectable instance. Provides DI information about each\n * dependency that the injectable was instantiated with, including where they were provided from.\n *\n * @param injector An injector instance\n * @param token a DI token that was constructed by the given injector instance\n * @returns an object that contains the created instance of token as well as all of the dependencies\n * that it was instantiated with OR undefined if the token was not created within the given\n * injector.\n */\nfunction getDependenciesFromInjectable(injector, token) {\n    // First we check to see if the token given maps to an actual instance in the injector given.\n    // We use `self: true` because we only want to look at the injector we were given.\n    // We use `optional: true` because it's possible that the token we were given was never\n    // constructed by the injector we were given.\n    const instance = injector.get(token, null, { self: true, optional: true });\n    if (instance === null) {\n        throw new Error(`Unable to determine instance of ${token} in given injector`);\n    }\n    const unformattedDependencies = getDependenciesForTokenInInjector(token, injector);\n    const resolutionPath = getInjectorResolutionPath(injector);\n    const dependencies = unformattedDependencies.map((dep) => {\n        // injectedIn contains private fields, so we omit it from the response\n        const formattedDependency = {\n            value: dep.value,\n        };\n        // convert injection flags to booleans\n        const flags = dep.flags;\n        formattedDependency.flags = {\n            optional: (8 /* InternalInjectFlags.Optional */ & flags) === 8 /* InternalInjectFlags.Optional */,\n            host: (1 /* InternalInjectFlags.Host */ & flags) === 1 /* InternalInjectFlags.Host */,\n            self: (2 /* InternalInjectFlags.Self */ & flags) === 2 /* InternalInjectFlags.Self */,\n            skipSelf: (4 /* InternalInjectFlags.SkipSelf */ & flags) === 4 /* InternalInjectFlags.SkipSelf */,\n        };\n        // find the injector that provided the dependency\n        for (let i = 0; i < resolutionPath.length; i++) {\n            const injectorToCheck = resolutionPath[i];\n            // if skipSelf is true we skip the first injector\n            if (i === 0 && formattedDependency.flags.skipSelf) {\n                continue;\n            }\n            // host only applies to NodeInjectors\n            if (formattedDependency.flags.host && injectorToCheck instanceof EnvironmentInjector) {\n                break;\n            }\n            const instance = injectorToCheck.get(dep.token, null, {\n                self: true,\n                optional: true,\n            });\n            if (instance !== null) {\n                // if host flag is true we double check that we can get the service from the first element\n                // in the resolution path by using the host flag. This is done to make sure that we've found\n                // the correct providing injector, and not a node injector that is connected to our path via\n                // a router outlet.\n                if (formattedDependency.flags.host) {\n                    const firstInjector = resolutionPath[0];\n                    const lookupFromFirstInjector = firstInjector.get(dep.token, null, {\n                        ...formattedDependency.flags,\n                        optional: true,\n                    });\n                    if (lookupFromFirstInjector !== null) {\n                        formattedDependency.providedIn = injectorToCheck;\n                    }\n                    break;\n                }\n                formattedDependency.providedIn = injectorToCheck;\n                break;\n            }\n            // if self is true we stop after the first injector\n            if (i === 0 && formattedDependency.flags.self) {\n                break;\n            }\n        }\n        if (dep.token)\n            formattedDependency.token = dep.token;\n        return formattedDependency;\n    });\n    return { instance, dependencies };\n}\nfunction getDependenciesForTokenInInjector(token, injector) {\n    const { resolverToTokenToDependencies } = getFrameworkDIDebugData();\n    if (!(injector instanceof NodeInjector)) {\n        return resolverToTokenToDependencies.get(injector)?.get?.(token) ?? [];\n    }\n    const lView = getNodeInjectorLView(injector);\n    const tokenDependencyMap = resolverToTokenToDependencies.get(lView);\n    const dependencies = tokenDependencyMap?.get(token) ?? [];\n    // In the NodeInjector case, all injections for every node are stored in the same lView.\n    // We use the injectedIn field of the dependency to filter out the dependencies that\n    // do not come from the same node as the instance we're looking at.\n    return dependencies.filter((dependency) => {\n        const dependencyNode = dependency.injectedIn?.tNode;\n        if (dependencyNode === undefined) {\n            return false;\n        }\n        const instanceNode = getNodeInjectorTNode(injector);\n        assertTNode(dependencyNode);\n        assertTNode(instanceNode);\n        return dependencyNode === instanceNode;\n    });\n}\n/**\n * Gets the class associated with an injector that contains a provider `imports` array in it's\n * definition\n *\n * For Module Injectors this returns the NgModule constructor.\n *\n * For Standalone injectors this returns the standalone component constructor.\n *\n * @param injector Injector an injector instance\n * @returns the constructor where the `imports` array that configures this injector is located\n */\nfunction getProviderImportsContainer(injector) {\n    const { standaloneInjectorToComponent } = getFrameworkDIDebugData();\n    // standalone components configure providers through a component def, so we have to\n    // use the standalone component associated with this injector if Injector represents\n    // a standalone components EnvironmentInjector\n    if (standaloneInjectorToComponent.has(injector)) {\n        return standaloneInjectorToComponent.get(injector);\n    }\n    // Module injectors configure providers through their NgModule def, so we use the\n    // injector to lookup its NgModuleRef and through that grab its instance\n    const defTypeRef = injector.get(NgModuleRef$1, null, { self: true, optional: true });\n    // If we can't find an associated imports container, return null.\n    // This could be the case if this function is called with an R3Injector that does not represent\n    // a standalone component or NgModule.\n    if (defTypeRef === null) {\n        return null;\n    }\n    // In standalone applications, the root environment injector created by bootstrapApplication\n    // may have no associated \"instance\".\n    if (defTypeRef.instance === null) {\n        return null;\n    }\n    return defTypeRef.instance.constructor;\n}\n/**\n * Gets the providers configured on a NodeInjector\n *\n * @param injector A NodeInjector instance\n * @returns ProviderRecord[] an array of objects representing the providers configured on this\n *     injector\n */\nfunction getNodeInjectorProviders(injector) {\n    const diResolver = getNodeInjectorTNode(injector);\n    const { resolverToProviders } = getFrameworkDIDebugData();\n    return resolverToProviders.get(diResolver) ?? [];\n}\n/**\n * Gets a mapping of providers configured on an injector to their import paths\n *\n * ModuleA -> imports ModuleB\n * ModuleB -> imports ModuleC\n * ModuleB -> provides MyServiceA\n * ModuleC -> provides MyServiceB\n *\n * getProviderImportPaths(ModuleA)\n * > Map(2) {\n *   MyServiceA => [ModuleA, ModuleB]\n *   MyServiceB => [ModuleA, ModuleB, ModuleC]\n *  }\n *\n * @param providerImportsContainer constructor of class that contains an `imports` array in it's\n *     definition\n * @returns A Map object that maps providers to an array of constructors representing it's import\n *     path\n *\n */\nfunction getProviderImportPaths(providerImportsContainer) {\n    const providerToPath = new Map();\n    const visitedContainers = new Set();\n    const visitor = walkProviderTreeToDiscoverImportPaths(providerToPath, visitedContainers);\n    walkProviderTree(providerImportsContainer, visitor, [], new Set());\n    return providerToPath;\n}\n/**\n *\n * Higher order function that returns a visitor for WalkProviderTree\n *\n * Takes in a Map and Set to keep track of the providers and containers\n * visited, so that we can discover the import paths of these providers\n * during the traversal.\n *\n * This visitor takes advantage of the fact that walkProviderTree performs a\n * postorder traversal of the provider tree for the passed in container. Because postorder\n * traversal recursively processes subtrees from leaf nodes until the traversal reaches the root,\n * we write a visitor that constructs provider import paths in reverse.\n *\n *\n * We use the visitedContainers set defined outside this visitor\n * because we want to run some logic only once for\n * each container in the tree. That logic can be described as:\n *\n *\n * 1. for each discovered_provider and discovered_path in the incomplete provider paths we've\n * already discovered\n * 2. get the first container in discovered_path\n * 3. if that first container is in the imports array of the container we're visiting\n *    Then the container we're visiting is also in the import path of discovered_provider, so we\n *    unshift discovered_path with the container we're currently visiting\n *\n *\n * Example Run:\n * ```\n *                 ┌──────────┐\n *                 │containerA│\n *      ┌─imports-─┤          ├──imports─┐\n *      │          │  provA   │          │\n *      │          │  provB   │          │\n *      │          └──────────┘          │\n *      │                                │\n *     ┌▼─────────┐             ┌────────▼─┐\n *     │containerB│             │containerC│\n *     │          │             │          │\n *     │  provD   │             │  provF   │\n *     │  provE   │             │  provG   │\n *     └──────────┘             └──────────┘\n * ```\n *\n * Each step of the traversal,\n *\n * ```\n * visitor(provD, containerB)\n * providerToPath === Map { provD => [containerB] }\n * visitedContainers === Set { containerB }\n *\n * visitor(provE, containerB)\n * providerToPath === Map { provD => [containerB], provE => [containerB] }\n * visitedContainers === Set { containerB }\n *\n * visitor(provF, containerC)\n * providerToPath === Map { provD => [containerB], provE => [containerB], provF => [containerC] }\n * visitedContainers === Set { containerB, containerC }\n *\n * visitor(provG, containerC)\n * providerToPath === Map {\n *   provD => [containerB], provE => [containerB], provF => [containerC], provG => [containerC]\n * }\n * visitedContainers === Set { containerB, containerC }\n *\n * visitor(provA, containerA)\n * providerToPath === Map {\n *   provD => [containerA, containerB],\n *   provE => [containerA, containerB],\n *   provF => [containerA, containerC],\n *   provG => [containerA, containerC],\n *   provA => [containerA]\n * }\n * visitedContainers === Set { containerB, containerC, containerA }\n *\n * visitor(provB, containerA)\n * providerToPath === Map {\n *   provD => [containerA, containerB],\n *   provE => [containerA, containerB],\n *   provF => [containerA, containerC],\n *   provG => [containerA, containerC],\n *   provA => [containerA]\n *   provB => [containerA]\n * }\n * visitedContainers === Set { containerB, containerC, containerA }\n * ```\n *\n * @param providerToPath Map map of providers to paths that this function fills\n * @param visitedContainers Set a set to keep track of the containers we've already visited\n * @return function(provider SingleProvider, container: Type<unknown> | InjectorType<unknown>) =>\n *     void\n */\nfunction walkProviderTreeToDiscoverImportPaths(providerToPath, visitedContainers) {\n    return (provider, container) => {\n        // If the provider is not already in the providerToPath map,\n        // add an entry with the provider as the key and an array containing the current container as\n        // the value\n        if (!providerToPath.has(provider)) {\n            providerToPath.set(provider, [container]);\n        }\n        // This block will run exactly once for each container in the import tree.\n        // This is where we run the logic to check the imports array of the current\n        // container to see if it's the next container in the path for our currently\n        // discovered providers.\n        if (!visitedContainers.has(container)) {\n            // Iterate through the providers we've already seen\n            for (const prov of providerToPath.keys()) {\n                const existingImportPath = providerToPath.get(prov);\n                let containerDef = getInjectorDef(container);\n                if (!containerDef) {\n                    const ngModule = container.ngModule;\n                    containerDef = getInjectorDef(ngModule);\n                }\n                if (!containerDef) {\n                    return;\n                }\n                const lastContainerAddedToPath = existingImportPath[0];\n                let isNextStepInPath = false;\n                deepForEach(containerDef.imports, (moduleImport) => {\n                    if (isNextStepInPath) {\n                        return;\n                    }\n                    isNextStepInPath =\n                        moduleImport.ngModule === lastContainerAddedToPath ||\n                            moduleImport === lastContainerAddedToPath;\n                    if (isNextStepInPath) {\n                        providerToPath.get(prov)?.unshift(container);\n                    }\n                });\n            }\n        }\n        visitedContainers.add(container);\n    };\n}\n/**\n * Gets the providers configured on an EnvironmentInjector\n *\n * @param injector EnvironmentInjector\n * @returns an array of objects representing the providers of the given injector\n */\nfunction getEnvironmentInjectorProviders(injector) {\n    const providerRecordsWithoutImportPaths = getFrameworkDIDebugData().resolverToProviders.get(injector) ?? [];\n    // platform injector has no provider imports container so can we skip trying to\n    // find import paths\n    if (isPlatformInjector(injector)) {\n        return providerRecordsWithoutImportPaths;\n    }\n    const providerImportsContainer = getProviderImportsContainer(injector);\n    if (providerImportsContainer === null) {\n        // We assume that if an environment injector exists without an associated provider imports\n        // container, it was created without such a container. Some examples cases where this could\n        // happen:\n        // - The root injector of a standalone application\n        // - A router injector created by using the providers array in a lazy loaded route\n        // - A manually created injector that is attached to the injector tree\n        // Since each of these cases has no provider container, there is no concept of import paths,\n        // so we can simply return the provider records.\n        return providerRecordsWithoutImportPaths;\n    }\n    const providerToPath = getProviderImportPaths(providerImportsContainer);\n    const providerRecords = [];\n    for (const providerRecord of providerRecordsWithoutImportPaths) {\n        const provider = providerRecord.provider;\n        // Ignore these special providers for now until we have a cleaner way of\n        // determing when they are provided by the framework vs provided by the user.\n        const token = provider.provide;\n        if (token === ENVIRONMENT_INITIALIZER || token === INJECTOR_DEF_TYPES) {\n            continue;\n        }\n        let importPath = providerToPath.get(provider) ?? [];\n        const def = getComponentDef(providerImportsContainer);\n        const isStandaloneComponent = !!def?.standalone;\n        // We prepend the component constructor in the standalone case\n        // because walkProviderTree does not visit this constructor during it's traversal\n        if (isStandaloneComponent) {\n            importPath = [providerImportsContainer, ...importPath];\n        }\n        providerRecords.push({ ...providerRecord, importPath });\n    }\n    return providerRecords;\n}\nfunction isPlatformInjector(injector) {\n    return injector instanceof R3Injector && injector.scopes.has('platform');\n}\n/**\n * Gets the providers configured on an injector.\n *\n * @param injector the injector to lookup the providers of\n * @returns ProviderRecord[] an array of objects representing the providers of the given injector\n */\nfunction getInjectorProviders(injector) {\n    if (injector instanceof NodeInjector) {\n        return getNodeInjectorProviders(injector);\n    }\n    else if (injector instanceof EnvironmentInjector) {\n        return getEnvironmentInjectorProviders(injector);\n    }\n    throwError('getInjectorProviders only supports NodeInjector and EnvironmentInjector');\n}\n/**\n *\n * Given an injector, this function will return\n * an object containing the type and source of the injector.\n *\n * |              | type        | source                                                      |\n * |--------------|-------------|-------------------------------------------------------------|\n * | NodeInjector | element     | DOM element that created this injector                      |\n * | R3Injector   | environment | `injector.source`                                           |\n * | NullInjector | null        | null                                                        |\n *\n * @param injector the Injector to get metadata for\n * @returns an object containing the type and source of the given injector. If the injector metadata\n *     cannot be determined, returns null.\n */\nfunction getInjectorMetadata(injector) {\n    if (injector instanceof NodeInjector) {\n        const lView = getNodeInjectorLView(injector);\n        const tNode = getNodeInjectorTNode(injector);\n        assertTNodeForLView(tNode, lView);\n        return { type: 'element', source: getNativeByTNode(tNode, lView) };\n    }\n    if (injector instanceof R3Injector) {\n        return { type: 'environment', source: injector.source ?? null };\n    }\n    if (injector instanceof NullInjector) {\n        return { type: 'null', source: null };\n    }\n    return null;\n}\nfunction getInjectorResolutionPath(injector) {\n    const resolutionPath = [injector];\n    getInjectorResolutionPathHelper(injector, resolutionPath);\n    return resolutionPath;\n}\nfunction getInjectorResolutionPathHelper(injector, resolutionPath) {\n    const parent = getInjectorParent(injector);\n    // if getInjectorParent can't find a parent, then we've either reached the end\n    // of the path, or we need to move from the Element Injector tree to the\n    // module injector tree using the first injector in our path as the connection point.\n    if (parent === null) {\n        if (injector instanceof NodeInjector) {\n            const firstInjector = resolutionPath[0];\n            if (firstInjector instanceof NodeInjector) {\n                const moduleInjector = getModuleInjectorOfNodeInjector(firstInjector);\n                if (moduleInjector === null) {\n                    throwError('NodeInjector must have some connection to the module injector tree');\n                }\n                resolutionPath.push(moduleInjector);\n                getInjectorResolutionPathHelper(moduleInjector, resolutionPath);\n            }\n            return resolutionPath;\n        }\n    }\n    else {\n        resolutionPath.push(parent);\n        getInjectorResolutionPathHelper(parent, resolutionPath);\n    }\n    return resolutionPath;\n}\n/**\n * Gets the parent of an injector.\n *\n * This function is not able to make the jump from the Element Injector Tree to the Module\n * injector tree. This is because the \"parent\" (the next step in the reoslution path)\n * of a root NodeInjector is dependent on which NodeInjector ancestor initiated\n * the DI lookup. See getInjectorResolutionPath for a function that can make this jump.\n *\n * In the below diagram:\n * ```ts\n * getInjectorParent(NodeInjectorB)\n *  > NodeInjectorA\n * getInjectorParent(NodeInjectorA) // or getInjectorParent(getInjectorParent(NodeInjectorB))\n *  > null // cannot jump to ModuleInjector tree\n * ```\n *\n * ```\n *                ┌───────┐                ┌───────────────────┐\n *    ┌───────────┤ModuleA├───Injector────►│EnvironmentInjector│\n *    │           └───┬───┘                └───────────────────┘\n *    │               │\n *    │           bootstraps\n *    │               │\n *    │               │\n *    │          ┌────▼─────┐                 ┌─────────────┐\n * declares      │ComponentA├────Injector────►│NodeInjectorA│\n *    │          └────┬─────┘                 └─────▲───────┘\n *    │               │                             │\n *    │            renders                        parent\n *    │               │                             │\n *    │          ┌────▼─────┐                 ┌─────┴───────┐\n *    └─────────►│ComponentB├────Injector────►│NodeInjectorB│\n *               └──────────┘                 └─────────────┘\n *```\n *\n * @param injector an Injector to get the parent of\n * @returns Injector the parent of the given injector\n */\nfunction getInjectorParent(injector) {\n    if (injector instanceof R3Injector) {\n        const parent = injector.parent;\n        if (isRouterOutletInjector(parent)) {\n            // This is a special case for a `ChainedInjector` instance, which represents\n            // a combination of a Router's `OutletInjector` and an EnvironmentInjector,\n            // which represents a `@defer` block. Since the `OutletInjector` doesn't store\n            // any tokens itself, we point to the parent injector instead. See the\n            // `OutletInjector.__ngOutletInjector` field for additional information.\n            return parent.parentInjector;\n        }\n        return parent;\n    }\n    let tNode;\n    let lView;\n    if (injector instanceof NodeInjector) {\n        tNode = getNodeInjectorTNode(injector);\n        lView = getNodeInjectorLView(injector);\n    }\n    else if (injector instanceof NullInjector) {\n        return null;\n    }\n    else if (injector instanceof ChainedInjector) {\n        return injector.parentInjector;\n    }\n    else {\n        throwError('getInjectorParent only support injectors of type R3Injector, NodeInjector, NullInjector');\n    }\n    const parentLocation = getParentInjectorLocation(tNode, lView);\n    if (hasParentInjector(parentLocation)) {\n        const parentInjectorIndex = getParentInjectorIndex(parentLocation);\n        const parentLView = getParentInjectorView(parentLocation, lView);\n        const parentTView = parentLView[TVIEW];\n        const parentTNode = parentTView.data[parentInjectorIndex + 8 /* NodeInjectorOffset.TNODE */];\n        return new NodeInjector(parentTNode, parentLView);\n    }\n    else {\n        const chainedInjector = lView[INJECTOR];\n        // Case where chainedInjector.injector is an OutletInjector and chainedInjector.injector.parent\n        // is a NodeInjector.\n        // todo(aleksanderbodurri): ideally nothing in packages/core should deal\n        // directly with router concerns. Refactor this so that we can make the jump from\n        // NodeInjector -> OutletInjector -> NodeInjector\n        // without explicitly relying on types contracts from packages/router\n        const injectorParent = chainedInjector.injector?.parent;\n        if (injectorParent instanceof NodeInjector) {\n            return injectorParent;\n        }\n    }\n    return null;\n}\n/**\n * Gets the module injector of a NodeInjector.\n *\n * @param injector NodeInjector to get module injector of\n * @returns Injector representing module injector of the given NodeInjector\n */\nfunction getModuleInjectorOfNodeInjector(injector) {\n    let lView;\n    if (injector instanceof NodeInjector) {\n        lView = getNodeInjectorLView(injector);\n    }\n    else {\n        throwError('getModuleInjectorOfNodeInjector must be called with a NodeInjector');\n    }\n    const inj = lView[INJECTOR];\n    const moduleInjector = inj instanceof ChainedInjector ? inj.parentInjector : inj.parent;\n    if (!moduleInjector) {\n        throwError('NodeInjector must have some connection to the module injector tree');\n    }\n    return moduleInjector;\n}\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 //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 * */\nconst GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\nconst globalUtilsFunctions = {\n    /**\n     * Warning: functions that start with `ɵ` are considered *INTERNAL* and should not be relied upon\n     * in application's code. The contract of those functions might be changed in any release and/or a\n     * function can be removed completely.\n     */\n    'ɵgetDependenciesFromInjectable': getDependenciesFromInjectable,\n    'ɵgetInjectorProviders': getInjectorProviders,\n    'ɵgetInjectorResolutionPath': getInjectorResolutionPath,\n    'ɵgetInjectorMetadata': getInjectorMetadata,\n    'ɵsetProfiler': setProfiler,\n    'getDirectiveMetadata': getDirectiveMetadata$1,\n    'getComponent': getComponent,\n    'getContext': getContext,\n    'getListeners': getListeners,\n    'getOwningComponent': getOwningComponent,\n    'getHostElement': getHostElement,\n    'getInjector': getInjector,\n    'getRootComponents': getRootComponents,\n    'getDirectives': getDirectives,\n    'applyChanges': applyChanges,\n    'isSignal': isSignal,\n};\nlet _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$1() {\n    if (!_published) {\n        _published = true;\n        if (typeof window !== 'undefined') {\n            // Only configure the injector profiler when running in the browser.\n            setupFrameworkInjectorProfiler();\n        }\n        for (const [methodName, method] of Object.entries(globalUtilsFunctions)) {\n            publishGlobalUtil(methodName, method);\n        }\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    publishUtil(name, fn);\n}\n/**\n * Publishes the given function to `window.ng` from package other than @angular/core\n * So that it can be used from the browser console when an application is not in production.\n */\nfunction publishExternalGlobalUtil(name, fn) {\n    publishUtil(name, fn);\n}\nfunction publishUtil(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        const w = _global;\n        ngDevMode && assertDefined(fn, 'function not defined');\n        w[GLOBAL_PUBLISH_EXPANDO_KEY] ??= {};\n        w[GLOBAL_PUBLISH_EXPANDO_KEY][name] = fn;\n    }\n}\n\n/**\n * Internal injection token that can used to access an instance of a Testability class.\n *\n * This token acts as a bridge between the core bootstrap code and the `Testability` class. This is\n * needed to ensure that there are no direct references to the `Testability` class, so it can be\n * tree-shaken away (if not referenced). For the environments/setups when the `Testability` class\n * should be available, this token is used to add a provider that references the `Testability`\n * class. Otherwise, only this token is retained in a bundle, but the `Testability` class is not.\n */\nconst TESTABILITY = new InjectionToken('');\n/**\n * Internal injection token to retrieve Testability getter class instance.\n */\nconst TESTABILITY_GETTER = new InjectionToken('');\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser.\n *\n * Angular applications bootstrapped using an NgModule (via `@NgModule.bootstrap` field) will also\n * instantiate Testability by default (in both development and production modes).\n *\n * For applications bootstrapped using the `bootstrapApplication` function, Testability is not\n * included by default. You can include it into your applications by getting the list of necessary\n * providers using the `provideProtractorTestingSupport()` function and adding them into the\n * `options.providers` array. Example:\n *\n * ```ts\n * import {provideProtractorTestingSupport} from '@angular/platform-browser';\n *\n * await bootstrapApplication(RootComponent, providers: [provideProtractorTestingSupport()]);\n * ```\n *\n * @publicApi\n */\nclass Testability {\n    _ngZone;\n    registry;\n    _isZoneStable = true;\n    _callbacks = [];\n    taskTrackingZone = null;\n    constructor(_ngZone, registry, testabilityGetter) {\n        this._ngZone = _ngZone;\n        this.registry = registry;\n        // If there was no Testability logic registered in the global scope\n        // before, register the current testability getter as a global one.\n        if (!_testabilityGetter) {\n            setTestabilityGetter(testabilityGetter);\n            testabilityGetter.addToWindow(registry);\n        }\n        this._watchAngularEvents();\n        _ngZone.run(() => {\n            this.taskTrackingZone =\n                typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n        });\n    }\n    _watchAngularEvents() {\n        this._ngZone.onUnstable.subscribe({\n            next: () => {\n                this._isZoneStable = false;\n            },\n        });\n        this._ngZone.runOutsideAngular(() => {\n            this._ngZone.onStable.subscribe({\n                next: () => {\n                    NgZone.assertNotInAngularZone();\n                    queueMicrotask(() => {\n                        this._isZoneStable = true;\n                        this._runCallbacksIfReady();\n                    });\n                },\n            });\n        });\n    }\n    /**\n     * Whether an associated application is stable\n     */\n    isStable() {\n        return this._isZoneStable && !this._ngZone.hasPendingMacrotasks;\n    }\n    _runCallbacksIfReady() {\n        if (this.isStable()) {\n            // Schedules the call backs in a new frame so that it is always async.\n            queueMicrotask(() => {\n                while (this._callbacks.length !== 0) {\n                    let cb = this._callbacks.pop();\n                    clearTimeout(cb.timeoutId);\n                    cb.doneCb();\n                }\n            });\n        }\n        else {\n            // Still not stable, send updates.\n            let pending = this.getPendingTasks();\n            this._callbacks = this._callbacks.filter((cb) => {\n                if (cb.updateCb && cb.updateCb(pending)) {\n                    clearTimeout(cb.timeoutId);\n                    return false;\n                }\n                return true;\n            });\n        }\n    }\n    getPendingTasks() {\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((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    addCallback(cb, timeout, updateCb) {\n        let timeoutId = -1;\n        if (timeout && timeout > 0) {\n            timeoutId = setTimeout(() => {\n                this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId);\n                cb();\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    whenStable(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/plugins/task-tracking\" loaded?');\n        }\n        this.addCallback(doneCb, timeout, updateCb);\n        this._runCallbacksIfReady();\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     *\n     * @internal\n     */\n    registerApplication(token) {\n        this.registry.registerApplication(token, this);\n    }\n    /**\n     * Unregisters an application.\n     * @param token token of application, root element\n     *\n     * @internal\n     */\n    unregisterApplication(token) {\n        this.registry.unregisterApplication(token);\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    findProviders(using, provider, exactMatch) {\n        // TODO(juliemr): implement.\n        return [];\n    }\n    static ɵfac = function Testability_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Testability)(ɵɵinject(NgZone), ɵɵinject(TestabilityRegistry), ɵɵinject(TESTABILITY_GETTER)); };\n    static ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Testability, factory: Testability.ɵfac });\n}\n(() => { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Testability, [{\n        type: Injectable\n    }], () => [{ type: NgZone }, { type: TestabilityRegistry }, { type: undefined, decorators: [{\n                type: Inject,\n                args: [TESTABILITY_GETTER]\n            }] }], null); })();\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\nclass TestabilityRegistry {\n    /** @internal */\n    _applications = new Map();\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    registerApplication(token, testability) {\n        this._applications.set(token, testability);\n    }\n    /**\n     * Unregisters an application.\n     * @param token token of application, root element\n     */\n    unregisterApplication(token) {\n        this._applications.delete(token);\n    }\n    /**\n     * Unregisters all applications\n     */\n    unregisterAllApplications() {\n        this._applications.clear();\n    }\n    /**\n     * Get a testability hook associated with the application\n     * @param elem root element\n     */\n    getTestability(elem) {\n        return this._applications.get(elem) || null;\n    }\n    /**\n     * Get all registered testabilities\n     */\n    getAllTestabilities() {\n        return Array.from(this._applications.values());\n    }\n    /**\n     * Get all registered applications(root elements)\n     */\n    getAllRootElements() {\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    findTestabilityInTree(elem, findInAncestors = true) {\n        return _testabilityGetter?.findTestabilityInTree(this, elem, findInAncestors) ?? null;\n    }\n    static ɵfac = function TestabilityRegistry_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TestabilityRegistry)(); };\n    static ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: TestabilityRegistry, factory: TestabilityRegistry.ɵfac, providedIn: 'platform' });\n}\n(() => { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(TestabilityRegistry, [{\n        type: Injectable,\n        args: [{ providedIn: 'platform' }]\n    }], null, null); })();\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\nfunction setTestabilityGetter(getter) {\n    _testabilityGetter = getter;\n}\nlet _testabilityGetter;\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 a Subscribable\n */\nfunction isSubscribable(obj) {\n    return !!obj && typeof obj.subscribe === 'function';\n}\n\n/**\n * A DI token that you can use to provide\n * one or more initialization functions.\n *\n * The provided functions are injected at application startup and executed during\n * app initialization. If any of these functions returns a Promise or an Observable, initialization\n * does not complete until the Promise is resolved or the Observable is completed.\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 * The function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * Note that the provided initializer is run in the injection context.\n *\n * @deprecated from v19.0.0, use provideAppInitializer instead\n *\n * @see {@link ApplicationInitStatus}\n * @see {@link provideAppInitializer}\n *\n * @usageNotes\n *\n * The following example illustrates how to configure a multi-provider using `APP_INITIALIZER` token\n * and a function returning a promise.\n * ### Example with NgModule-based application\n * ```ts\n *  function initializeApp(): Promise<any> {\n *    const http = inject(HttpClient);\n *    return firstValueFrom(\n *      http\n *        .get(\"https://someUrl.com/api/user\")\n *        .pipe(tap(user => { ... }))\n *    );\n *  }\n *\n *  @NgModule({\n *   imports: [BrowserModule],\n *   declarations: [AppComponent],\n *   bootstrap: [AppComponent],\n *   providers: [{\n *     provide: APP_INITIALIZER,\n *     useValue: initializeApp,\n *     multi: true,\n *    }]\n *   })\n *  export class AppModule {}\n * ```\n *\n * ### Example with standalone application\n * ```ts\n * function initializeApp() {\n *   const http = inject(HttpClient);\n *   return firstValueFrom(\n *     http\n *       .get(\"https://someUrl.com/api/user\")\n *       .pipe(tap(user => { ... }))\n *   );\n * }\n *\n * bootstrapApplication(App, {\n *   providers: [\n *     provideHttpClient(),\n *     {\n *       provide: APP_INITIALIZER,\n *       useValue: initializeApp,\n *       multi: true,\n *     },\n *   ],\n * });\n\n * ```\n *\n *\n * It's also possible to configure a multi-provider using `APP_INITIALIZER` token and a function\n * returning an observable, see an example below. Note: the `HttpClient` in this example is used for\n * demo purposes to illustrate how the factory function can work with other providers available\n * through DI.\n *\n * ### Example with NgModule-based application\n * ```ts\n * function initializeApp() {\n *   const http = inject(HttpClient);\n *   return firstValueFrom(\n *     http\n *       .get(\"https://someUrl.com/api/user\")\n *       .pipe(tap(user => { ... }))\n *   );\n * }\n *\n * @NgModule({\n *   imports: [BrowserModule, HttpClientModule],\n *   declarations: [AppComponent],\n *   bootstrap: [AppComponent],\n *   providers: [{\n *     provide: APP_INITIALIZER,\n *     useValue: initializeApp,\n *     multi: true,\n *   }]\n * })\n * export class AppModule {}\n * ```\n *\n * ### Example with standalone application\n * ```ts\n * function initializeApp() {\n *   const http = inject(HttpClient);\n *   return firstValueFrom(\n *     http\n *       .get(\"https://someUrl.com/api/user\")\n *       .pipe(tap(user => { ... }))\n *   );\n * }\n *\n * bootstrapApplication(App, {\n *   providers: [\n *     provideHttpClient(),\n *     {\n *       provide: APP_INITIALIZER,\n *       useValue: initializeApp,\n *       multi: true,\n *     },\n *   ],\n * });\n * ```\n *\n * @publicApi\n */\nconst APP_INITIALIZER = new InjectionToken(ngDevMode ? 'Application Initializer' : '');\n/**\n * @description\n * The provided function is injected at application startup and executed during\n * app initialization. If the function returns a Promise or an Observable, initialization\n * does not complete until the Promise is resolved or the Observable is completed.\n *\n * You can, for example, create a function that loads language data\n * or an external configuration, and provide that function using `provideAppInitializer()`.\n * The function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * Note that the provided initializer is run in the injection context.\n *\n * Previously, this was achieved using the `APP_INITIALIZER` token which is now deprecated.\n *\n * @see {@link APP_INITIALIZER}\n *\n * @usageNotes\n * The following example illustrates how to configure an initialization function using\n * `provideAppInitializer()`\n * ```ts\n * bootstrapApplication(App, {\n *   providers: [\n *     provideAppInitializer(() => {\n *       const http = inject(HttpClient);\n *       return firstValueFrom(\n *         http\n *           .get(\"https://someUrl.com/api/user\")\n *           .pipe(tap(user => { ... }))\n *       );\n *     }),\n *     provideHttpClient(),\n *   ],\n * });\n * ```\n *\n * @publicApi\n */\nfunction provideAppInitializer(initializerFn) {\n    return makeEnvironmentProviders([\n        {\n            provide: APP_INITIALIZER,\n            multi: true,\n            useValue: initializerFn,\n        },\n    ]);\n}\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER} functions.\n *\n * @publicApi\n */\nclass ApplicationInitStatus {\n    // Using non null assertion, these fields are defined below\n    // within the `new Promise` callback (synchronously).\n    resolve;\n    reject;\n    initialized = false;\n    done = false;\n    donePromise = new Promise((res, rej) => {\n        this.resolve = res;\n        this.reject = rej;\n    });\n    appInits = inject(APP_INITIALIZER, { optional: true }) ?? [];\n    injector = inject(Injector);\n    constructor() {\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && !Array.isArray(this.appInits)) {\n            throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `APP_INITIALIZER` token value ' +\n                `(expected an array, but got ${typeof this.appInits}). ` +\n                'Please check that the `APP_INITIALIZER` token is configured as a ' +\n                '`multi: true` provider.');\n        }\n    }\n    /** @internal */\n    runInitializers() {\n        if (this.initialized) {\n            return;\n        }\n        const asyncInitPromises = [];\n        for (const appInits of this.appInits) {\n            const initResult = runInInjectionContext(this.injector, appInits);\n            if (isPromise(initResult)) {\n                asyncInitPromises.push(initResult);\n            }\n            else if (isSubscribable(initResult)) {\n                const observableAsPromise = new Promise((resolve, reject) => {\n                    initResult.subscribe({ complete: resolve, error: reject });\n                });\n                asyncInitPromises.push(observableAsPromise);\n            }\n        }\n        const complete = () => {\n            // @ts-expect-error overwriting a readonly\n            this.done = true;\n            this.resolve();\n        };\n        Promise.all(asyncInitPromises)\n            .then(() => {\n            complete();\n        })\n            .catch((e) => {\n            this.reject(e);\n        });\n        if (asyncInitPromises.length === 0) {\n            complete();\n        }\n        this.initialized = true;\n    }\n    static ɵfac = function ApplicationInitStatus_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ApplicationInitStatus)(); };\n    static ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac, providedIn: 'root' });\n}\n(() => { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], () => [], null); })();\n\n/**\n * A scheduler which manages the execution of effects.\n */\nclass EffectScheduler {\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: EffectScheduler,\n        providedIn: 'root',\n        factory: () => new ZoneAwareEffectScheduler(),\n    });\n}\n/**\n * A wrapper around `ZoneAwareQueueingScheduler` that schedules flushing via the microtask queue\n * when.\n */\nclass ZoneAwareEffectScheduler {\n    queuedEffectCount = 0;\n    queues = new Map();\n    schedule(handle) {\n        this.enqueue(handle);\n    }\n    enqueue(handle) {\n        const zone = handle.zone;\n        if (!this.queues.has(zone)) {\n            this.queues.set(zone, new Set());\n        }\n        const queue = this.queues.get(zone);\n        if (queue.has(handle)) {\n            return;\n        }\n        this.queuedEffectCount++;\n        queue.add(handle);\n    }\n    /**\n     * Run all scheduled effects.\n     *\n     * Execution order of effects within the same zone is guaranteed to be FIFO, but there is no\n     * ordering guarantee between effects scheduled in different zones.\n     */\n    flush() {\n        while (this.queuedEffectCount > 0) {\n            for (const [zone, queue] of this.queues) {\n                // `zone` here must be defined.\n                if (zone === null) {\n                    this.flushQueue(queue);\n                }\n                else {\n                    zone.run(() => this.flushQueue(queue));\n                }\n            }\n        }\n    }\n    flushQueue(queue) {\n        for (const handle of queue) {\n            queue.delete(handle);\n            this.queuedEffectCount--;\n            // TODO: what happens if this throws an error?\n            handle.run();\n        }\n    }\n}\n\n/**\n * A DI token that provides a set of callbacks to\n * be called for every component that is bootstrapped.\n *\n * Each callback must take a `ComponentRef` instance and return nothing.\n *\n * `(componentRef: ComponentRef) => void`\n *\n * @publicApi\n */\nconst APP_BOOTSTRAP_LISTENER = new InjectionToken(ngDevMode ? 'appBootstrapListener' : '');\nfunction publishDefaultGlobalUtils() {\n    ngDevMode && publishDefaultGlobalUtils$1();\n}\n/**\n * Sets the error for an invalid write to a signal to be an Angular `RuntimeError`.\n */\nfunction publishSignalConfiguration() {\n    setThrowInvalidWriteToSignalError$1(() => {\n        throw new RuntimeError(600 /* RuntimeErrorCode.SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT */, ngDevMode && 'Writing to signals is not allowed in a `computed`.');\n    });\n}\nfunction isBoundToModule(cf) {\n    return cf.isBoundToModule;\n}\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @deprecated\n * @publicApi\n */\nclass NgProbeToken {\n    name;\n    token;\n    constructor(name, token) {\n        this.name = name;\n        this.token = token;\n    }\n}\n/** Maximum number of times ApplicationRef will refresh all attached views in a single tick. */\nconst MAXIMUM_REFRESH_RERUNS = 10;\nfunction _callAndReportToErrorHandler(errorHandler, ngZone, callback) {\n    try {\n        const result = callback();\n        if (isPromise(result)) {\n            return result.catch((e) => {\n                ngZone.runOutsideAngular(() => 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(() => 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        return objs.reduce(optionsReducer, dst);\n    }\n    return { ...dst, ...objs };\n}\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\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 * ```ts\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 * ```ts\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 * ```ts\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 * ```ts\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 * ```ts\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 */\nclass ApplicationRef {\n    /** @internal */\n    _runningTick = false;\n    _destroyed = false;\n    _destroyListeners = [];\n    /** @internal */\n    _views = [];\n    internalErrorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER);\n    afterRenderManager = inject(AfterRenderManager);\n    zonelessEnabled = inject(ZONELESS_ENABLED);\n    rootEffectScheduler = inject(EffectScheduler);\n    /**\n     * Current dirty state of the application across a number of dimensions (views, afterRender hooks,\n     * etc).\n     *\n     * A flag set here means that `tick()` will attempt to resolve the dirtiness when executed.\n     *\n     * @internal\n     */\n    dirtyFlags = 0 /* ApplicationRefDirtyFlags.None */;\n    /**\n     * Like `dirtyFlags` but don't cause `tick()` to loop.\n     *\n     * @internal\n     */\n    deferredDirtyFlags = 0 /* ApplicationRefDirtyFlags.None */;\n    /**\n     * Most recent snapshot from the `TracingService`, if any.\n     *\n     * This snapshot attempts to capture the context when `tick()` was first\n     * scheduled. It then runs wrapped in this context.\n     *\n     * @internal\n     */\n    tracingSnapshot = null;\n    // Needed for ComponentFixture temporarily during migration of autoDetect behavior\n    // Eventually the hostView of the fixture should just attach to ApplicationRef.\n    externalTestViews = new Set();\n    /** @internal */\n    afterTick = new Subject();\n    /** @internal */\n    get allViews() {\n        return [...this.externalTestViews.keys(), ...this._views];\n    }\n    /**\n     * Indicates whether this instance was destroyed.\n     */\n    get destroyed() {\n        return this._destroyed;\n    }\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    componentTypes = [];\n    /**\n     * Get a list of components registered to this application.\n     */\n    components = [];\n    /**\n     * Returns an Observable that indicates when the application is stable or unstable.\n     */\n    isStable = inject(PendingTasksInternal).hasPendingTasks.pipe(map((pending) => !pending));\n    constructor() {\n        // Inject the tracing service to initialize it.\n        inject(TracingService, { optional: true });\n    }\n    /**\n     * @returns A promise that resolves when the application becomes stable\n     */\n    whenStable() {\n        let subscription;\n        return new Promise((resolve) => {\n            subscription = this.isStable.subscribe({\n                next: (stable) => {\n                    if (stable) {\n                        resolve();\n                    }\n                },\n            });\n        }).finally(() => {\n            subscription.unsubscribe();\n        });\n    }\n    _injector = inject(EnvironmentInjector);\n    _rendererFactory = null;\n    /**\n     * The `EnvironmentInjector` used to create this application.\n     */\n    get injector() {\n        return this._injector;\n    }\n    /**\n     * Bootstrap a component onto the element identified by its selector or, optionally, to a\n     * specified element.\n     *\n     * @usageNotes\n     * ### Bootstrap process\n     *\n     * When bootstrapping a component, Angular mounts it onto a target DOM element\n     * and kicks off automatic change detection. The target DOM element can be\n     * provided using the `rootSelectorOrNode` argument.\n     *\n     * If the target DOM element is not provided, Angular tries to find one on a page\n     * using the `selector` of the component that is being bootstrapped\n     * (first matched element is used).\n     *\n     * ### Example\n     *\n     * Generally, we define the component to bootstrap in the `bootstrap` array of `NgModule`,\n     * but it requires us to know the component while writing the application code.\n     *\n     * Imagine a situation where we have to wait for an API call to decide about the component to\n     * bootstrap. We can use the `ngDoBootstrap` hook of the `NgModule` and call this method to\n     * dynamically bootstrap a component.\n     *\n     * {@example core/ts/platform/platform.ts region='componentSelector'}\n     *\n     * Optionally, a component can be mounted onto a DOM element that does not match the\n     * selector of the bootstrapped component.\n     *\n     * In the following example, we are providing a CSS selector to match the target element.\n     *\n     * {@example core/ts/platform/platform.ts region='cssSelector'}\n     *\n     * While in this example, we are providing reference to a DOM node.\n     *\n     * {@example core/ts/platform/platform.ts region='domNode'}\n     */\n    bootstrap(componentOrFactory, rootSelectorOrNode) {\n        (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();\n        const isComponentFactory = componentOrFactory instanceof ComponentFactory$1;\n        const initStatus = this._injector.get(ApplicationInitStatus);\n        if (!initStatus.done) {\n            const standalone = !isComponentFactory && isStandalone(componentOrFactory);\n            const errorMessage = (typeof ngDevMode === 'undefined' || ngDevMode) &&\n                'Cannot bootstrap as there are still asynchronous initializers running.' +\n                    (standalone\n                        ? ''\n                        : ' Bootstrap components in the `ngDoBootstrap` method of the root module.');\n            throw new RuntimeError(405 /* RuntimeErrorCode.ASYNC_INITIALIZERS_STILL_RUNNING */, errorMessage);\n        }\n        let componentFactory;\n        if (isComponentFactory) {\n            componentFactory = componentOrFactory;\n        }\n        else {\n            const resolver = this._injector.get(ComponentFactoryResolver$1);\n            componentFactory = resolver.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        const ngModule = isBoundToModule(componentFactory)\n            ? undefined\n            : this._injector.get(NgModuleRef$1);\n        const selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n        const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n        const nativeElement = compRef.location.nativeElement;\n        const testability = compRef.injector.get(TESTABILITY, null);\n        testability?.registerApplication(nativeElement);\n        compRef.onDestroy(() => {\n            this.detachView(compRef.hostView);\n            remove(this.components, compRef);\n            testability?.unregisterApplication(nativeElement);\n        });\n        this._loadComponent(compRef);\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            const _console = this._injector.get(Console);\n            _console.log(`Angular is running in development 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    tick() {\n        if (!this.zonelessEnabled) {\n            this.dirtyFlags |= 1 /* ApplicationRefDirtyFlags.ViewTreeGlobal */;\n        }\n        this._tick();\n    }\n    /** @internal */\n    _tick = () => {\n        if (this.tracingSnapshot !== null) {\n            const snapshot = this.tracingSnapshot;\n            this.tracingSnapshot = null;\n            // Ensure we always run `_tick()` in the context of the most recent snapshot,\n            // if one exists. Snapshots may be reference counted by the implementation so\n            // we want to ensure that if we request a snapshot that we use it.\n            snapshot.run(TracingAction.CHANGE_DETECTION, this._tick);\n            snapshot.dispose();\n            return;\n        }\n        (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();\n        if (this._runningTick) {\n            throw new RuntimeError(101 /* RuntimeErrorCode.RECURSIVE_APPLICATION_REF_TICK */, ngDevMode && 'ApplicationRef.tick is called recursively');\n        }\n        const prevConsumer = setActiveConsumer$1(null);\n        try {\n            this._runningTick = true;\n            this.synchronize();\n            if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                for (let view of this.allViews) {\n                    view.checkNoChanges();\n                }\n            }\n        }\n        catch (e) {\n            // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n            this.internalErrorHandler(e);\n        }\n        finally {\n            this._runningTick = false;\n            setActiveConsumer$1(prevConsumer);\n            this.afterTick.next();\n        }\n    };\n    /**\n     * Performs the core work of synchronizing the application state with the UI, resolving any\n     * pending dirtiness (potentially in a loop).\n     */\n    synchronize() {\n        if (this._rendererFactory === null && !this._injector.destroyed) {\n            this._rendererFactory = this._injector.get(RendererFactory2, null, { optional: true });\n        }\n        // When beginning synchronization, all deferred dirtiness becomes active dirtiness.\n        this.dirtyFlags |= this.deferredDirtyFlags;\n        this.deferredDirtyFlags = 0 /* ApplicationRefDirtyFlags.None */;\n        let runs = 0;\n        while (this.dirtyFlags !== 0 /* ApplicationRefDirtyFlags.None */ && runs++ < MAXIMUM_REFRESH_RERUNS) {\n            this.synchronizeOnce();\n        }\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && runs >= MAXIMUM_REFRESH_RERUNS) {\n            throw new RuntimeError(103 /* RuntimeErrorCode.INFINITE_CHANGE_DETECTION */, ngDevMode &&\n                'Infinite change detection while refreshing application views. ' +\n                    'Ensure views are not calling `markForCheck` on every template execution or ' +\n                    'that afterRender hooks always mark views for check.');\n        }\n    }\n    /**\n     * Perform a single synchronization pass.\n     */\n    synchronizeOnce() {\n        // If we happened to loop, deferred dirtiness can be processed as active dirtiness again.\n        this.dirtyFlags |= this.deferredDirtyFlags;\n        this.deferredDirtyFlags = 0 /* ApplicationRefDirtyFlags.None */;\n        // First, process any dirty root effects.\n        if (this.dirtyFlags & 16 /* ApplicationRefDirtyFlags.RootEffects */) {\n            this.dirtyFlags &= ~16 /* ApplicationRefDirtyFlags.RootEffects */;\n            this.rootEffectScheduler.flush();\n        }\n        // First check dirty views, if there are any.\n        if (this.dirtyFlags & 7 /* ApplicationRefDirtyFlags.ViewTreeAny */) {\n            // Change detection on views starts in targeted mode (only check components if they're\n            // marked as dirty) unless global checking is specifically requested via APIs like\n            // `ApplicationRef.tick()` and the `NgZone` integration.\n            const useGlobalCheck = Boolean(this.dirtyFlags & 1 /* ApplicationRefDirtyFlags.ViewTreeGlobal */);\n            // Clear the view-related dirty flags.\n            this.dirtyFlags &= ~7 /* ApplicationRefDirtyFlags.ViewTreeAny */;\n            // Set the AfterRender bit, as we're checking views and will need to run afterRender hooks.\n            this.dirtyFlags |= 8 /* ApplicationRefDirtyFlags.AfterRender */;\n            // Check all potentially dirty views.\n            for (let { _lView, notifyErrorHandler } of this.allViews) {\n                detectChangesInViewIfRequired(_lView, notifyErrorHandler, useGlobalCheck, this.zonelessEnabled);\n            }\n            // If `markForCheck()` was called during view checking, it will have set the `ViewTreeCheck`\n            // flag. We clear the flag here because, for backwards compatibility, `markForCheck()`\n            // during view checking doesn't cause the view to be re-checked.\n            this.dirtyFlags &= ~4 /* ApplicationRefDirtyFlags.ViewTreeCheck */;\n            // Check if any views are still dirty after checking and we need to loop back.\n            this.syncDirtyFlagsWithViews();\n            if (this.dirtyFlags &\n                (7 /* ApplicationRefDirtyFlags.ViewTreeAny */ | 16 /* ApplicationRefDirtyFlags.RootEffects */)) {\n                // If any views or effects are still dirty after checking, loop back before running render\n                // hooks.\n                return;\n            }\n        }\n        else {\n            // If we skipped refreshing views above, there might still be unflushed animations\n            // because we never called `detectChangesInternal` on the views.\n            this._rendererFactory?.begin?.();\n            this._rendererFactory?.end?.();\n        }\n        // Even if there were no dirty views, afterRender hooks might still be dirty.\n        if (this.dirtyFlags & 8 /* ApplicationRefDirtyFlags.AfterRender */) {\n            this.dirtyFlags &= ~8 /* ApplicationRefDirtyFlags.AfterRender */;\n            this.afterRenderManager.execute();\n            // afterRender hooks might influence dirty flags.\n        }\n        this.syncDirtyFlagsWithViews();\n    }\n    /**\n     * Checks `allViews` for views which require refresh/traversal, and updates `dirtyFlags`\n     * accordingly, with two potential behaviors:\n     *\n     * 1. If any of our views require updating, then this adds the `ViewTreeTraversal` dirty flag.\n     *    This _should_ be a no-op, since the scheduler should've added the flag at the same time the\n     *    view was marked as needing updating.\n     *\n     *    TODO(alxhub): figure out if this behavior is still needed for edge cases.\n     *\n     * 2. If none of our views require updating, then clear the view-related `dirtyFlag`s. This\n     *    happens when the scheduler is notified of a view becoming dirty, but the view itself isn't\n     *    reachable through traversal from our roots (e.g. it's detached from the CD tree).\n     */\n    syncDirtyFlagsWithViews() {\n        if (this.allViews.some(({ _lView }) => requiresRefreshOrTraversal(_lView))) {\n            // If after running all afterRender callbacks new views are dirty, ensure we loop back.\n            this.dirtyFlags |= 2 /* ApplicationRefDirtyFlags.ViewTreeTraversal */;\n            return;\n        }\n        else {\n            // Even though this flag may be set, none of _our_ views require traversal, and so the\n            // `ApplicationRef` doesn't require any repeated checking.\n            this.dirtyFlags &= ~7 /* ApplicationRefDirtyFlags.ViewTreeAny */;\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    attachView(viewRef) {\n        (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();\n        const view = viewRef;\n        this._views.push(view);\n        view.attachToAppRef(this);\n    }\n    /**\n     * Detaches a view from dirty checking again.\n     */\n    detachView(viewRef) {\n        (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();\n        const view = viewRef;\n        remove(this._views, view);\n        view.detachFromAppRef();\n    }\n    _loadComponent(componentRef) {\n        this.attachView(componentRef.hostView);\n        this.tick();\n        this.components.push(componentRef);\n        // Get the listeners lazily to prevent DI cycles.\n        const listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []);\n        if (ngDevMode && !Array.isArray(listeners)) {\n            throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `APP_BOOTSTRAP_LISTENER` token value ' +\n                `(expected an array, but got ${typeof listeners}). ` +\n                'Please check that the `APP_BOOTSTRAP_LISTENER` token is configured as a ' +\n                '`multi: true` provider.');\n        }\n        listeners.forEach((listener) => listener(componentRef));\n    }\n    /** @internal */\n    ngOnDestroy() {\n        if (this._destroyed)\n            return;\n        try {\n            // Call all the lifecycle hooks.\n            this._destroyListeners.forEach((listener) => listener());\n            // Destroy all registered views.\n            this._views.slice().forEach((view) => view.destroy());\n        }\n        finally {\n            // Indicate that this instance is destroyed.\n            this._destroyed = true;\n            // Release all references.\n            this._views = [];\n            this._destroyListeners = [];\n        }\n    }\n    /**\n     * Registers a listener to be called when an instance is destroyed.\n     *\n     * @param callback A callback function to add as a listener.\n     * @returns A function which unregisters a listener.\n     */\n    onDestroy(callback) {\n        (typeof ngDevMode === 'undefined' || ngDevMode) && this.warnIfDestroyed();\n        this._destroyListeners.push(callback);\n        return () => remove(this._destroyListeners, callback);\n    }\n    /**\n     * Destroys an Angular application represented by this `ApplicationRef`. Calling this function\n     * will destroy the associated environment injectors as well as all the bootstrapped components\n     * with their views.\n     */\n    destroy() {\n        if (this._destroyed) {\n            throw new RuntimeError(406 /* RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED */, ngDevMode && 'This instance of the `ApplicationRef` has already been destroyed.');\n        }\n        const injector = this._injector;\n        // Check that this injector instance supports destroy operation.\n        if (injector.destroy && !injector.destroyed) {\n            // Destroying an underlying injector will trigger the `ngOnDestroy` lifecycle\n            // hook, which invokes the remaining cleanup actions.\n            injector.destroy();\n        }\n    }\n    /**\n     * Returns the number of attached views.\n     */\n    get viewCount() {\n        return this._views.length;\n    }\n    warnIfDestroyed() {\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && this._destroyed) {\n            console.warn(formatRuntimeError(406 /* RuntimeErrorCode.APPLICATION_REF_ALREADY_DESTROYED */, 'This instance of the `ApplicationRef` has already been destroyed.'));\n        }\n    }\n    static ɵfac = function ApplicationRef_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ApplicationRef)(); };\n    static ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });\n}\n(() => { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationRef, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], () => [], null); })();\nfunction remove(list, el) {\n    const index = list.indexOf(el);\n    if (index > -1) {\n        list.splice(index, 1);\n    }\n}\nfunction detectChangesInViewIfRequired(lView, notifyErrorHandler, isFirstPass, zonelessEnabled) {\n    // When re-checking, only check views which actually need it.\n    if (!isFirstPass && !requiresRefreshOrTraversal(lView)) {\n        return;\n    }\n    const mode = isFirstPass && !zonelessEnabled\n        ? // The first pass is always in Global mode, which includes `CheckAlways` views.\n            0 /* ChangeDetectionMode.Global */\n        : // Only refresh views with the `RefreshView` flag or views is a changed signal\n            1 /* ChangeDetectionMode.Targeted */;\n    detectChangesInternal(lView, notifyErrorHandler, mode);\n}\n\n/**\n * Schedules triggering of a defer block for `on idle` and `on timer` conditions.\n */\nfunction scheduleDelayedTrigger(scheduleFn) {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    renderPlaceholder(lView, tNode);\n    // Exit early to avoid invoking `scheduleFn`, which would\n    // add `setTimeout` call and potentially delay serialization\n    // on the server unnecessarily.\n    if (!shouldTriggerDeferBlock(0 /* TriggerType.Regular */, lView))\n        return;\n    const injector = lView[INJECTOR];\n    const lDetails = getLDeferBlockDetails(lView, tNode);\n    const cleanupFn = scheduleFn(() => triggerDeferBlock(0 /* TriggerType.Regular */, lView, tNode), injector);\n    storeTriggerCleanupFn(0 /* TriggerType.Regular */, lDetails, cleanupFn);\n}\n/**\n * Schedules prefetching for `on idle` and `on timer` triggers.\n *\n * @param scheduleFn A function that does the scheduling.\n */\nfunction scheduleDelayedPrefetching(scheduleFn, trigger) {\n    if (typeof ngServerMode !== 'undefined' && ngServerMode)\n        return;\n    const lView = getLView();\n    const injector = lView[INJECTOR];\n    // Only trigger the scheduled trigger on the browser\n    // since we don't want to delay the server response.\n    const tNode = getCurrentTNode();\n    const tView = lView[TVIEW];\n    const tDetails = getTDeferBlockDetails(tView, tNode);\n    if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {\n        const lDetails = getLDeferBlockDetails(lView, tNode);\n        const prefetch = () => triggerPrefetching(tDetails, lView, tNode);\n        const cleanupFn = scheduleFn(prefetch, injector);\n        storeTriggerCleanupFn(1 /* TriggerType.Prefetch */, lDetails, cleanupFn);\n    }\n}\n/**\n * Schedules hydration triggering of a defer block for `on idle` and `on timer` conditions.\n */\nfunction scheduleDelayedHydrating(scheduleFn, lView, tNode) {\n    if (typeof ngServerMode !== 'undefined' && ngServerMode)\n        return;\n    // Only trigger the scheduled trigger on the browser\n    // since we don't want to delay the server response.\n    const injector = lView[INJECTOR];\n    const lDetails = getLDeferBlockDetails(lView, tNode);\n    const ssrUniqueId = lDetails[SSR_UNIQUE_ID];\n    ngDevMode && assertSsrIdDefined(ssrUniqueId);\n    const cleanupFn = scheduleFn(() => triggerHydrationFromBlockName(injector, ssrUniqueId), injector);\n    storeTriggerCleanupFn(2 /* TriggerType.Hydrate */, lDetails, cleanupFn);\n}\n/**\n * Trigger prefetching of dependencies for a defer block.\n *\n * @param tDetails Static information about this defer block.\n * @param lView LView of a host view.\n * @param tNode TNode that represents a defer block.\n */\nfunction triggerPrefetching(tDetails, lView, tNode) {\n    triggerResourceLoading(tDetails, lView, tNode);\n}\n/**\n * Trigger loading of defer block dependencies if the process hasn't started yet.\n *\n * @param tDetails Static information about this defer block.\n * @param lView LView of a host view.\n */\nfunction triggerResourceLoading(tDetails, lView, tNode) {\n    const injector = lView[INJECTOR];\n    const tView = lView[TVIEW];\n    if (tDetails.loadingState !== DeferDependenciesLoadingState.NOT_STARTED) {\n        // If the loading status is different from initial one, it means that\n        // the loading of dependencies is in progress and there is nothing to do\n        // in this function. All details can be obtained from the `tDetails` object.\n        return tDetails.loadingPromise ?? Promise.resolve();\n    }\n    const lDetails = getLDeferBlockDetails(lView, tNode);\n    const primaryBlockTNode = getPrimaryBlockTNode(tView, tDetails);\n    // Switch from NOT_STARTED -> IN_PROGRESS state.\n    tDetails.loadingState = DeferDependenciesLoadingState.IN_PROGRESS;\n    // Prefetching is triggered, cleanup all registered prefetch triggers.\n    invokeTriggerCleanupFns(1 /* TriggerType.Prefetch */, lDetails);\n    let dependenciesFn = tDetails.dependencyResolverFn;\n    if (ngDevMode) {\n        // Check if dependency function interceptor is configured.\n        const deferDependencyInterceptor = injector.get(DEFER_BLOCK_DEPENDENCY_INTERCEPTOR, null, {\n            optional: true,\n        });\n        if (deferDependencyInterceptor) {\n            dependenciesFn = deferDependencyInterceptor.intercept(dependenciesFn);\n        }\n    }\n    // Indicate that an application is not stable and has a pending task.\n    const pendingTasks = injector.get(PendingTasksInternal);\n    const taskId = pendingTasks.add();\n    // The `dependenciesFn` might be `null` when all dependencies within\n    // a given defer block were eagerly referenced elsewhere in a file,\n    // thus no dynamic `import()`s were produced.\n    if (!dependenciesFn) {\n        tDetails.loadingPromise = Promise.resolve().then(() => {\n            tDetails.loadingPromise = null;\n            tDetails.loadingState = DeferDependenciesLoadingState.COMPLETE;\n            pendingTasks.remove(taskId);\n        });\n        return tDetails.loadingPromise;\n    }\n    // Start downloading of defer block dependencies.\n    tDetails.loadingPromise = Promise.allSettled(dependenciesFn()).then((results) => {\n        let failed = false;\n        const directiveDefs = [];\n        const pipeDefs = [];\n        for (const result of results) {\n            if (result.status === 'fulfilled') {\n                const dependency = result.value;\n                const directiveDef = getComponentDef(dependency) || getDirectiveDef(dependency);\n                if (directiveDef) {\n                    directiveDefs.push(directiveDef);\n                }\n                else {\n                    const pipeDef = getPipeDef$1(dependency);\n                    if (pipeDef) {\n                        pipeDefs.push(pipeDef);\n                    }\n                }\n            }\n            else {\n                failed = true;\n                break;\n            }\n        }\n        // Loading is completed, we no longer need the loading Promise\n        // and a pending task should also be removed.\n        tDetails.loadingPromise = null;\n        pendingTasks.remove(taskId);\n        if (failed) {\n            tDetails.loadingState = DeferDependenciesLoadingState.FAILED;\n            if (tDetails.errorTmplIndex === null) {\n                const templateLocation = ngDevMode ? getTemplateLocationDetails(lView) : '';\n                const error = new RuntimeError(750 /* RuntimeErrorCode.DEFER_LOADING_FAILED */, ngDevMode &&\n                    'Loading dependencies for `@defer` block failed, ' +\n                        `but no \\`@error\\` block was configured${templateLocation}. ` +\n                        'Consider using the `@error` block to render an error state.');\n                handleError(lView, error);\n            }\n        }\n        else {\n            tDetails.loadingState = DeferDependenciesLoadingState.COMPLETE;\n            // Update directive and pipe registries to add newly downloaded dependencies.\n            const primaryBlockTView = primaryBlockTNode.tView;\n            if (directiveDefs.length > 0) {\n                primaryBlockTView.directiveRegistry = addDepsToRegistry(primaryBlockTView.directiveRegistry, directiveDefs);\n                // Extract providers from all NgModules imported by standalone components\n                // used within this defer block.\n                const directiveTypes = directiveDefs.map((def) => def.type);\n                const providers = internalImportProvidersFrom(false, ...directiveTypes);\n                tDetails.providers = providers;\n            }\n            if (pipeDefs.length > 0) {\n                primaryBlockTView.pipeRegistry = addDepsToRegistry(primaryBlockTView.pipeRegistry, pipeDefs);\n            }\n        }\n    });\n    return tDetails.loadingPromise;\n}\n/**\n * Defines whether we should proceed with triggering a given defer block.\n */\nfunction shouldTriggerDeferBlock(triggerType, lView) {\n    // prevents triggering regular triggers when on the server.\n    if (triggerType === 0 /* TriggerType.Regular */ && typeof ngServerMode !== 'undefined' && ngServerMode) {\n        return false;\n    }\n    // prevents triggering in the case of a test run with manual defer block configuration.\n    const injector = lView[INJECTOR];\n    const config = injector.get(DEFER_BLOCK_CONFIG, null, { optional: true });\n    if (config?.behavior === DeferBlockBehavior.Manual) {\n        return false;\n    }\n    return true;\n}\n/**\n * Attempts to trigger loading of defer block dependencies.\n * If the block is already in a loading, completed or an error state -\n * no additional actions are taken.\n */\nfunction triggerDeferBlock(triggerType, lView, tNode) {\n    const tView = lView[TVIEW];\n    const lContainer = lView[tNode.index];\n    ngDevMode && assertLContainer(lContainer);\n    if (!shouldTriggerDeferBlock(triggerType, lView))\n        return;\n    const lDetails = getLDeferBlockDetails(lView, tNode);\n    const tDetails = getTDeferBlockDetails(tView, tNode);\n    // Defer block is triggered, cleanup all registered trigger functions.\n    invokeAllTriggerCleanupFns(lDetails);\n    switch (tDetails.loadingState) {\n        case DeferDependenciesLoadingState.NOT_STARTED:\n            renderDeferBlockState(DeferBlockState.Loading, tNode, lContainer);\n            triggerResourceLoading(tDetails, lView, tNode);\n            // The `loadingState` might have changed to \"loading\".\n            if (tDetails.loadingState ===\n                DeferDependenciesLoadingState.IN_PROGRESS) {\n                renderDeferStateAfterResourceLoading(tDetails, tNode, lContainer);\n            }\n            break;\n        case DeferDependenciesLoadingState.IN_PROGRESS:\n            renderDeferBlockState(DeferBlockState.Loading, tNode, lContainer);\n            renderDeferStateAfterResourceLoading(tDetails, tNode, lContainer);\n            break;\n        case DeferDependenciesLoadingState.COMPLETE:\n            ngDevMode && assertDeferredDependenciesLoaded(tDetails);\n            renderDeferBlockState(DeferBlockState.Complete, tNode, lContainer);\n            break;\n        case DeferDependenciesLoadingState.FAILED:\n            renderDeferBlockState(DeferBlockState.Error, tNode, lContainer);\n            break;\n        default:\n            if (ngDevMode) {\n                throwError('Unknown defer block state');\n            }\n    }\n}\n/**\n * The core mechanism for incremental hydration. This triggers\n * hydration for all the blocks in the tree that need to be hydrated\n * and keeps track of all those blocks that were hydrated along the way.\n *\n * Note: the `replayQueuedEventsFn` is only provided when hydration is invoked\n * as a result of an event replay (via JsAction). When hydration is invoked from\n * an instruction set (e.g. `deferOnImmediate`) - there is no need to replay any\n * events.\n */\nasync function triggerHydrationFromBlockName(injector, blockName, replayQueuedEventsFn) {\n    const dehydratedBlockRegistry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n    const blocksBeingHydrated = dehydratedBlockRegistry.hydrating;\n    // Make sure we don't hydrate/trigger the same thing multiple times\n    if (blocksBeingHydrated.has(blockName)) {\n        return;\n    }\n    // The parent promise is the possible case of a list of defer blocks already being queued\n    // If it is queued, it'll exist; otherwise it'll be null. The hydration queue will contain all\n    // elements that need to be hydrated, sans any that have promises already\n    const { parentBlockPromise, hydrationQueue } = getParentBlockHydrationQueue(blockName, injector);\n    // The hydrating map in the registry prevents re-triggering hydration for a block that's already in\n    // the hydration queue. Here we generate promises for each of the blocks about to be hydrated\n    populateHydratingStateForQueue(dehydratedBlockRegistry, hydrationQueue);\n    // Trigger resource loading and hydration for the blocks in the queue in the order of highest block\n    // to lowest block. Once a block has finished resource loading, after next render fires after hydration\n    // finishes. The new block will have its defer instruction called and will be in the registry.\n    // Due to timing related to potential nested control flow, this has to be scheduled after the next render.\n    // Indicate that we have some pending async work.\n    const pendingTasks = injector.get(PendingTasksInternal);\n    const taskId = pendingTasks.add();\n    // If the parent block was being hydrated, but the process has\n    // not yet complete, wait until parent block promise settles before\n    // going over dehydrated blocks from the queue.\n    if (parentBlockPromise !== null) {\n        await parentBlockPromise;\n    }\n    // Actually do the triggering and hydration of the queue of blocks\n    for (const dehydratedBlockId of hydrationQueue) {\n        await triggerResourceLoadingForHydration(dehydratedBlockId, dehydratedBlockRegistry);\n        await nextRender(injector);\n        // TODO(incremental-hydration): assert (in dev mode) that a defer block is present in the dehydrated registry\n        // at this point. If not - it means that the block has not been hydrated, for example due to different\n        // `@if` conditions on the client and the server. If we detect this case, we should also do the cleanup\n        // of all child block (promises, registry state, etc).\n        // TODO(incremental-hydration): call `rejectFn` when lDetails[DEFER_BLOCK_STATE] is `DeferBlockState.Error`.\n        blocksBeingHydrated.get(dehydratedBlockId).resolve();\n        // TODO(incremental-hydration): consider adding a wait for stability here\n    }\n    // Await hydration completion for the requested block.\n    await blocksBeingHydrated.get(blockName)?.promise;\n    // All async work is done, remove the taskId from the registry.\n    pendingTasks.remove(taskId);\n    // Replay any queued events, if any exist and the replay operation was requested.\n    if (replayQueuedEventsFn) {\n        replayQueuedEventsFn(hydrationQueue);\n    }\n    // Cleanup after hydration of all affected defer blocks.\n    cleanupHydratedDeferBlocks(dehydratedBlockRegistry.get(blockName), hydrationQueue, dehydratedBlockRegistry, injector.get(ApplicationRef));\n}\n/**\n * Generates a new promise for every defer block in the hydrating queue\n */\nfunction populateHydratingStateForQueue(registry, queue) {\n    for (let blockId of queue) {\n        registry.hydrating.set(blockId, Promise.withResolvers());\n    }\n}\n// Waits for the next render cycle to complete\nfunction nextRender(injector) {\n    return new Promise((resolveFn) => afterNextRender(resolveFn, { injector }));\n}\nasync function triggerResourceLoadingForHydration(dehydratedBlockId, dehydratedBlockRegistry) {\n    const deferBlock = dehydratedBlockRegistry.get(dehydratedBlockId);\n    // Since we trigger hydration for nested defer blocks in a sequence (parent -> child),\n    // there is a chance that a defer block may not be present at hydration time. For example,\n    // when a nested block was in an `@if` condition, which has changed.\n    if (deferBlock === null) {\n        // TODO(incremental-hydration): handle the cleanup for cases when\n        // defer block is no longer present during hydration (e.g. `@if` condition\n        // has changed during hydration/rendering).\n        return;\n    }\n    const { tNode, lView } = deferBlock;\n    const lDetails = getLDeferBlockDetails(lView, tNode);\n    return new Promise((resolve) => {\n        onDeferBlockCompletion(lDetails, resolve);\n        triggerDeferBlock(2 /* TriggerType.Hydrate */, lView, tNode);\n    });\n}\n/**\n * Registers cleanup functions for a defer block when the block has finished\n * fetching and rendering\n */\nfunction onDeferBlockCompletion(lDetails, callback) {\n    if (!Array.isArray(lDetails[ON_COMPLETE_FNS])) {\n        lDetails[ON_COMPLETE_FNS] = [];\n    }\n    lDetails[ON_COMPLETE_FNS].push(callback);\n}\n/**\n * Determines whether specific trigger types should be attached during an instruction firing\n * to ensure the proper triggers for a given type are used.\n */\nfunction shouldAttachTrigger(triggerType, lView, tNode) {\n    if (triggerType === 0 /* TriggerType.Regular */) {\n        return shouldAttachRegularTrigger(lView, tNode);\n    }\n    else if (triggerType === 2 /* TriggerType.Hydrate */) {\n        return !shouldAttachRegularTrigger(lView, tNode);\n    }\n    // TriggerType.Prefetch is active only on the client\n    return !(typeof ngServerMode !== 'undefined' && ngServerMode);\n}\n/**\n * Defines whether a regular trigger logic (e.g. \"on viewport\") should be attached\n * to a defer block. This function defines a condition, which mutually excludes\n * `deferOn*` and `deferHydrateOn*` triggers, to make sure only one of the trigger\n * types is active for a block with the current state.\n */\nfunction shouldAttachRegularTrigger(lView, tNode) {\n    const injector = lView[INJECTOR];\n    const tDetails = getTDeferBlockDetails(lView[TVIEW], tNode);\n    const incrementalHydrationEnabled = isIncrementalHydrationEnabled(injector);\n    const hasHydrateTriggers = tDetails.flags !== null &&\n        (tDetails.flags & 1 /* TDeferDetailsFlags.HasHydrateTriggers */) ===\n            1 /* TDeferDetailsFlags.HasHydrateTriggers */;\n    // On the server:\n    if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n        // Regular triggers are activated on the server when:\n        //  - Either Incremental Hydration is *not* enabled\n        //  - Or Incremental Hydration is enabled, but a given block doesn't have \"hydrate\" triggers\n        return !incrementalHydrationEnabled || !hasHydrateTriggers;\n    }\n    // On the client:\n    const lDetails = getLDeferBlockDetails(lView, tNode);\n    const wasServerSideRendered = lDetails[SSR_UNIQUE_ID] !== null;\n    if (hasHydrateTriggers && wasServerSideRendered && incrementalHydrationEnabled) {\n        return false;\n    }\n    return true;\n}\n/**\n * Retrives a Defer Block's list of hydration triggers\n */\nfunction getHydrateTriggers(tView, tNode) {\n    const tDetails = getTDeferBlockDetails(tView, tNode);\n    return (tDetails.hydrateTriggers ??= new Map());\n}\n/**\n * Loops through all defer block summaries and ensures all the blocks triggers are\n * properly initialized\n */\nfunction processAndInitTriggers(injector, blockData, nodes) {\n    const idleElements = [];\n    const timerElements = [];\n    const viewportElements = [];\n    const immediateElements = [];\n    for (let [blockId, blockSummary] of blockData) {\n        const commentNode = nodes.get(blockId);\n        if (commentNode !== undefined) {\n            const numRootNodes = blockSummary.data[NUM_ROOT_NODES];\n            let currentNode = commentNode;\n            for (let i = 0; i < numRootNodes; i++) {\n                currentNode = currentNode.previousSibling;\n                if (currentNode.nodeType !== Node.ELEMENT_NODE) {\n                    continue;\n                }\n                const elementTrigger = { el: currentNode, blockName: blockId };\n                // hydrate\n                if (blockSummary.hydrate.idle) {\n                    idleElements.push(elementTrigger);\n                }\n                if (blockSummary.hydrate.immediate) {\n                    immediateElements.push(elementTrigger);\n                }\n                if (blockSummary.hydrate.timer !== null) {\n                    elementTrigger.delay = blockSummary.hydrate.timer;\n                    timerElements.push(elementTrigger);\n                }\n                if (blockSummary.hydrate.viewport) {\n                    viewportElements.push(elementTrigger);\n                }\n            }\n        }\n    }\n    setIdleTriggers(injector, idleElements);\n    setImmediateTriggers(injector, immediateElements);\n    setViewportTriggers(injector, viewportElements);\n    setTimerTriggers(injector, timerElements);\n}\nfunction setIdleTriggers(injector, elementTriggers) {\n    for (const elementTrigger of elementTriggers) {\n        const registry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n        const onInvoke = () => triggerHydrationFromBlockName(injector, elementTrigger.blockName);\n        const cleanupFn = onIdle(onInvoke, injector);\n        registry.addCleanupFn(elementTrigger.blockName, cleanupFn);\n    }\n}\nfunction setViewportTriggers(injector, elementTriggers) {\n    if (elementTriggers.length > 0) {\n        const registry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n        for (let elementTrigger of elementTriggers) {\n            const cleanupFn = onViewport(elementTrigger.el, () => triggerHydrationFromBlockName(injector, elementTrigger.blockName), injector);\n            registry.addCleanupFn(elementTrigger.blockName, cleanupFn);\n        }\n    }\n}\nfunction setTimerTriggers(injector, elementTriggers) {\n    for (const elementTrigger of elementTriggers) {\n        const registry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n        const onInvoke = () => triggerHydrationFromBlockName(injector, elementTrigger.blockName);\n        const timerFn = onTimer(elementTrigger.delay);\n        const cleanupFn = timerFn(onInvoke, injector);\n        registry.addCleanupFn(elementTrigger.blockName, cleanupFn);\n    }\n}\nfunction setImmediateTriggers(injector, elementTriggers) {\n    for (const elementTrigger of elementTriggers) {\n        // Note: we intentionally avoid awaiting each call and instead kick off\n        // th hydration process simultaneously for all defer blocks with this trigger;\n        triggerHydrationFromBlockName(injector, elementTrigger.blockName);\n    }\n}\n\n/**\n * Creates runtime data structures for defer blocks.\n *\n * @param index Index of the `defer` instruction.\n * @param primaryTmplIndex Index of the template with the primary block content.\n * @param dependencyResolverFn Function that contains dependencies for this defer block.\n * @param loadingTmplIndex Index of the template with the loading block content.\n * @param placeholderTmplIndex Index of the template with the placeholder block content.\n * @param errorTmplIndex Index of the template with the error block content.\n * @param loadingConfigIndex Index in the constants array of the configuration of the loading.\n *     block.\n * @param placeholderConfigIndex Index in the constants array of the configuration of the\n *     placeholder block.\n * @param enableTimerScheduling Function that enables timer-related scheduling if `after`\n *     or `minimum` parameters are setup on the `@loading` or `@placeholder` blocks.\n * @param flags A set of flags to define a particular behavior (e.g. to indicate that\n *              hydrate triggers are present and regular triggers should be deactivated\n *              in certain scenarios).\n *\n * @codeGenApi\n */\nfunction ɵɵdefer(index, primaryTmplIndex, dependencyResolverFn, loadingTmplIndex, placeholderTmplIndex, errorTmplIndex, loadingConfigIndex, placeholderConfigIndex, enableTimerScheduling, flags) {\n    const lView = getLView();\n    const tView = getTView();\n    const adjustedIndex = index + HEADER_OFFSET;\n    const tNode = declareTemplate(lView, tView, index, null, 0, 0);\n    const injector = lView[INJECTOR];\n    if (tView.firstCreatePass) {\n        performanceMarkFeature('NgDefer');\n        const tDetails = {\n            primaryTmplIndex,\n            loadingTmplIndex: loadingTmplIndex ?? null,\n            placeholderTmplIndex: placeholderTmplIndex ?? null,\n            errorTmplIndex: errorTmplIndex ?? null,\n            placeholderBlockConfig: null,\n            loadingBlockConfig: null,\n            dependencyResolverFn: dependencyResolverFn ?? null,\n            loadingState: DeferDependenciesLoadingState.NOT_STARTED,\n            loadingPromise: null,\n            providers: null,\n            hydrateTriggers: null,\n            prefetchTriggers: null,\n            flags: flags ?? 0 /* TDeferDetailsFlags.Default */,\n        };\n        enableTimerScheduling?.(tView, tDetails, placeholderConfigIndex, loadingConfigIndex);\n        setTDeferBlockDetails(tView, adjustedIndex, tDetails);\n    }\n    const lContainer = lView[adjustedIndex];\n    // If hydration is enabled, looks up dehydrated views in the DOM\n    // using hydration annotation info and stores those views on LContainer.\n    // In client-only mode, this function is a noop.\n    populateDehydratedViewsInLContainer(lContainer, tNode, lView);\n    let ssrBlockState = null;\n    let ssrUniqueId = null;\n    if (lContainer[DEHYDRATED_VIEWS]?.length > 0) {\n        const info = lContainer[DEHYDRATED_VIEWS][0].data;\n        ssrUniqueId = info[DEFER_BLOCK_ID] ?? null;\n        ssrBlockState = info[DEFER_BLOCK_STATE$1];\n    }\n    // Init instance-specific defer details and store it.\n    const lDetails = [\n        null, // NEXT_DEFER_BLOCK_STATE\n        DeferBlockInternalState.Initial, // DEFER_BLOCK_STATE\n        null, // STATE_IS_FROZEN_UNTIL\n        null, // LOADING_AFTER_CLEANUP_FN\n        null, // TRIGGER_CLEANUP_FNS\n        null, // PREFETCH_TRIGGER_CLEANUP_FNS\n        ssrUniqueId, // SSR_UNIQUE_ID\n        ssrBlockState, // SSR_BLOCK_STATE\n        null, // ON_COMPLETE_FNS\n        null, // HYDRATE_TRIGGER_CLEANUP_FNS\n    ];\n    setLDeferBlockDetails(lView, adjustedIndex, lDetails);\n    let registry = null;\n    if (ssrUniqueId !== null) {\n        ngDevMode && assertIncrementalHydrationIsConfigured(injector);\n        // Store this defer block in the registry, to have an access to\n        // internal data structures from hydration runtime code.\n        registry = injector.get(DEHYDRATED_BLOCK_REGISTRY);\n        registry.add(ssrUniqueId, { lView, tNode, lContainer });\n    }\n    const onLViewDestroy = () => {\n        invokeAllTriggerCleanupFns(lDetails);\n        if (ssrUniqueId !== null) {\n            registry?.cleanup([ssrUniqueId]);\n        }\n    };\n    // When defer block is triggered - unsubscribe from LView destroy cleanup.\n    storeTriggerCleanupFn(0 /* TriggerType.Regular */, lDetails, () => removeLViewOnDestroy(lView, onLViewDestroy));\n    storeLViewOnDestroy(lView, onLViewDestroy);\n}\n/**\n * Loads defer block dependencies when a trigger value becomes truthy.\n * @codeGenApi\n */\nfunction ɵɵdeferWhen(rawValue) {\n    const lView = getLView();\n    const tNode = getSelectedTNode();\n    if (!shouldAttachTrigger(0 /* TriggerType.Regular */, lView, tNode))\n        return;\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, rawValue)) {\n        const prevConsumer = setActiveConsumer$1(null);\n        try {\n            const value = Boolean(rawValue); // handle truthy or falsy values\n            const lDetails = getLDeferBlockDetails(lView, tNode);\n            const renderedState = lDetails[DEFER_BLOCK_STATE];\n            if (value === false && renderedState === DeferBlockInternalState.Initial) {\n                // If nothing is rendered yet, render a placeholder (if defined).\n                renderPlaceholder(lView, tNode);\n            }\n            else if (value === true &&\n                (renderedState === DeferBlockInternalState.Initial ||\n                    renderedState === DeferBlockState.Placeholder)) {\n                triggerDeferBlock(0 /* TriggerType.Regular */, lView, tNode);\n            }\n        }\n        finally {\n            setActiveConsumer$1(prevConsumer);\n        }\n    }\n}\n/**\n * Prefetches the deferred content when a value becomes truthy.\n * @codeGenApi\n */\nfunction ɵɵdeferPrefetchWhen(rawValue) {\n    const lView = getLView();\n    const tNode = getSelectedTNode();\n    if (!shouldAttachTrigger(1 /* TriggerType.Prefetch */, lView, tNode))\n        return;\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, rawValue)) {\n        const prevConsumer = setActiveConsumer$1(null);\n        try {\n            const value = Boolean(rawValue); // handle truthy or falsy values\n            const tView = lView[TVIEW];\n            const tNode = getSelectedTNode();\n            const tDetails = getTDeferBlockDetails(tView, tNode);\n            if (value === true && tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {\n                // If loading has not been started yet, trigger it now.\n                triggerPrefetching(tDetails, lView, tNode);\n            }\n        }\n        finally {\n            setActiveConsumer$1(prevConsumer);\n        }\n    }\n}\n/**\n * Hydrates the deferred content when a value becomes truthy.\n * @codeGenApi\n */\nfunction ɵɵdeferHydrateWhen(rawValue) {\n    const lView = getLView();\n    const tNode = getSelectedTNode();\n    if (!shouldAttachTrigger(2 /* TriggerType.Hydrate */, lView, tNode))\n        return;\n    // TODO(incremental-hydration): audit all defer instructions to reduce unnecessary work by\n    // moving function calls inside their relevant control flow blocks\n    const bindingIndex = nextBindingIndex();\n    const tView = getTView();\n    const hydrateTriggers = getHydrateTriggers(tView, tNode);\n    hydrateTriggers.set(6 /* DeferBlockTrigger.When */, null);\n    if (bindingUpdated(lView, bindingIndex, rawValue)) {\n        if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n            // We are on the server and SSR for defer blocks is enabled.\n            triggerDeferBlock(2 /* TriggerType.Hydrate */, lView, tNode);\n        }\n        else {\n            const injector = lView[INJECTOR];\n            const prevConsumer = setActiveConsumer$1(null);\n            try {\n                const value = Boolean(rawValue); // handle truthy or falsy values\n                if (value === true) {\n                    // The `when` condition has changed to `true`, trigger defer block loading\n                    // if the block is either in initial (nothing is rendered) or a placeholder\n                    // state.\n                    const lDetails = getLDeferBlockDetails(lView, tNode);\n                    const ssrUniqueId = lDetails[SSR_UNIQUE_ID];\n                    ngDevMode && assertSsrIdDefined(ssrUniqueId);\n                    triggerHydrationFromBlockName(injector, ssrUniqueId);\n                }\n            }\n            finally {\n                setActiveConsumer$1(prevConsumer);\n            }\n        }\n    }\n}\n/**\n * Specifies that hydration never occurs.\n * @codeGenApi\n */\nfunction ɵɵdeferHydrateNever() {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(2 /* TriggerType.Hydrate */, lView, tNode))\n        return;\n    const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n    hydrateTriggers.set(7 /* DeferBlockTrigger.Never */, null);\n    if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n        // We are on the server and SSR for defer blocks is enabled.\n        triggerDeferBlock(2 /* TriggerType.Hydrate */, lView, tNode);\n    }\n}\n/**\n * Sets up logic to handle the `on idle` deferred trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferOnIdle() {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(0 /* TriggerType.Regular */, lView, tNode))\n        return;\n    scheduleDelayedTrigger(onIdle);\n}\n/**\n * Sets up logic to handle the `prefetch on idle` deferred trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferPrefetchOnIdle() {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(1 /* TriggerType.Prefetch */, lView, tNode))\n        return;\n    scheduleDelayedPrefetching(onIdle, 0 /* DeferBlockTrigger.Idle */);\n}\n/**\n * Sets up logic to handle the `on idle` deferred trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferHydrateOnIdle() {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(2 /* TriggerType.Hydrate */, lView, tNode))\n        return;\n    const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n    hydrateTriggers.set(0 /* DeferBlockTrigger.Idle */, null);\n    if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n        // We are on the server and SSR for defer blocks is enabled.\n        triggerDeferBlock(2 /* TriggerType.Hydrate */, lView, tNode);\n    }\n    else {\n        scheduleDelayedHydrating(onIdle, lView, tNode);\n    }\n}\n/**\n * Sets up logic to handle the `on immediate` deferred trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferOnImmediate() {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(0 /* TriggerType.Regular */, lView, tNode))\n        return;\n    // Render placeholder block only if loading template is not present and we're on\n    // the client to avoid content flickering, since it would be immediately replaced\n    // by the loading block.\n    const tDetails = getTDeferBlockDetails(lView[TVIEW], tNode);\n    if (tDetails.loadingTmplIndex === null) {\n        renderPlaceholder(lView, tNode);\n    }\n    triggerDeferBlock(0 /* TriggerType.Regular */, lView, tNode);\n}\n/**\n * Sets up logic to handle the `prefetch on immediate` deferred trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferPrefetchOnImmediate() {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(1 /* TriggerType.Prefetch */, lView, tNode))\n        return;\n    const tView = lView[TVIEW];\n    const tDetails = getTDeferBlockDetails(tView, tNode);\n    if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {\n        triggerResourceLoading(tDetails, lView, tNode);\n    }\n}\n/**\n * Sets up logic to handle the `on immediate` hydrate trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferHydrateOnImmediate() {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(2 /* TriggerType.Hydrate */, lView, tNode))\n        return;\n    const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n    hydrateTriggers.set(1 /* DeferBlockTrigger.Immediate */, null);\n    if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n        triggerDeferBlock(2 /* TriggerType.Hydrate */, lView, tNode);\n    }\n    else {\n        const injector = lView[INJECTOR];\n        const lDetails = getLDeferBlockDetails(lView, tNode);\n        const ssrUniqueId = lDetails[SSR_UNIQUE_ID];\n        ngDevMode && assertSsrIdDefined(ssrUniqueId);\n        triggerHydrationFromBlockName(injector, ssrUniqueId);\n    }\n}\n/**\n * Creates runtime data structures for the `on timer` deferred trigger.\n * @param delay Amount of time to wait before loading the content.\n * @codeGenApi\n */\nfunction ɵɵdeferOnTimer(delay) {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(0 /* TriggerType.Regular */, lView, tNode))\n        return;\n    scheduleDelayedTrigger(onTimer(delay));\n}\n/**\n * Creates runtime data structures for the `prefetch on timer` deferred trigger.\n * @param delay Amount of time to wait before prefetching the content.\n * @codeGenApi\n */\nfunction ɵɵdeferPrefetchOnTimer(delay) {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(1 /* TriggerType.Prefetch */, lView, tNode))\n        return;\n    scheduleDelayedPrefetching(onTimer(delay), 5 /* DeferBlockTrigger.Timer */);\n}\n/**\n * Creates runtime data structures for the `on timer` hydrate trigger.\n * @param delay Amount of time to wait before loading the content.\n * @codeGenApi\n */\nfunction ɵɵdeferHydrateOnTimer(delay) {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(2 /* TriggerType.Hydrate */, lView, tNode))\n        return;\n    const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n    hydrateTriggers.set(5 /* DeferBlockTrigger.Timer */, { delay });\n    if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n        // We are on the server and SSR for defer blocks is enabled.\n        triggerDeferBlock(2 /* TriggerType.Hydrate */, lView, tNode);\n    }\n    else {\n        scheduleDelayedHydrating(onTimer(delay), lView, tNode);\n    }\n}\n/**\n * Creates runtime data structures for the `on hover` deferred trigger.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferOnHover(triggerIndex, walkUpTimes) {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(0 /* TriggerType.Regular */, lView, tNode))\n        return;\n    renderPlaceholder(lView, tNode);\n    // Avoid adding event listeners when this instruction is invoked on the server.\n    if (!(typeof ngServerMode !== 'undefined' && ngServerMode)) {\n        registerDomTrigger(lView, tNode, triggerIndex, walkUpTimes, onHover, () => triggerDeferBlock(0 /* TriggerType.Regular */, lView, tNode), 0 /* TriggerType.Regular */);\n    }\n}\n/**\n * Creates runtime data structures for the `prefetch on hover` deferred trigger.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferPrefetchOnHover(triggerIndex, walkUpTimes) {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(1 /* TriggerType.Prefetch */, lView, tNode))\n        return;\n    const tView = lView[TVIEW];\n    const tDetails = getTDeferBlockDetails(tView, tNode);\n    if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {\n        registerDomTrigger(lView, tNode, triggerIndex, walkUpTimes, onHover, () => triggerPrefetching(tDetails, lView, tNode), 1 /* TriggerType.Prefetch */);\n    }\n}\n/**\n * Creates runtime data structures for the `on hover` hydrate trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferHydrateOnHover() {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(2 /* TriggerType.Hydrate */, lView, tNode))\n        return;\n    const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n    hydrateTriggers.set(4 /* DeferBlockTrigger.Hover */, null);\n    if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n        // We are on the server and SSR for defer blocks is enabled.\n        triggerDeferBlock(2 /* TriggerType.Hydrate */, lView, tNode);\n    }\n    // The actual triggering of hydration on hover is handled by JSAction in\n    // event_replay.ts.\n}\n/**\n * Creates runtime data structures for the `on interaction` deferred trigger.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferOnInteraction(triggerIndex, walkUpTimes) {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(0 /* TriggerType.Regular */, lView, tNode))\n        return;\n    renderPlaceholder(lView, tNode);\n    // Avoid adding event listeners when this instruction is invoked on the server.\n    if (!(typeof ngServerMode !== 'undefined' && ngServerMode)) {\n        registerDomTrigger(lView, tNode, triggerIndex, walkUpTimes, onInteraction, () => triggerDeferBlock(0 /* TriggerType.Regular */, lView, tNode), 0 /* TriggerType.Regular */);\n    }\n}\n/**\n * Creates runtime data structures for the `prefetch on interaction` deferred trigger.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferPrefetchOnInteraction(triggerIndex, walkUpTimes) {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(1 /* TriggerType.Prefetch */, lView, tNode))\n        return;\n    const tView = lView[TVIEW];\n    const tDetails = getTDeferBlockDetails(tView, tNode);\n    if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {\n        registerDomTrigger(lView, tNode, triggerIndex, walkUpTimes, onInteraction, () => triggerPrefetching(tDetails, lView, tNode), 1 /* TriggerType.Prefetch */);\n    }\n}\n/**\n * Creates runtime data structures for the `on interaction` hydrate trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferHydrateOnInteraction() {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(2 /* TriggerType.Hydrate */, lView, tNode))\n        return;\n    const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n    hydrateTriggers.set(3 /* DeferBlockTrigger.Interaction */, null);\n    if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n        // We are on the server and SSR for defer blocks is enabled.\n        triggerDeferBlock(2 /* TriggerType.Hydrate */, lView, tNode);\n    }\n    // The actual triggering of hydration on interaction is handled by JSAction in\n    // event_replay.ts.\n}\n/**\n * Creates runtime data structures for the `on viewport` deferred trigger.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferOnViewport(triggerIndex, walkUpTimes) {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(0 /* TriggerType.Regular */, lView, tNode))\n        return;\n    renderPlaceholder(lView, tNode);\n    // Avoid adding event listeners when this instruction is invoked on the server.\n    if (!(typeof ngServerMode !== 'undefined' && ngServerMode)) {\n        registerDomTrigger(lView, tNode, triggerIndex, walkUpTimes, onViewport, () => triggerDeferBlock(0 /* TriggerType.Regular */, lView, tNode), 0 /* TriggerType.Regular */);\n    }\n}\n/**\n * Creates runtime data structures for the `prefetch on viewport` deferred trigger.\n * @param triggerIndex Index at which to find the trigger element.\n * @param walkUpTimes Number of times to walk up/down the tree hierarchy to find the trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferPrefetchOnViewport(triggerIndex, walkUpTimes) {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(1 /* TriggerType.Prefetch */, lView, tNode))\n        return;\n    const tView = lView[TVIEW];\n    const tDetails = getTDeferBlockDetails(tView, tNode);\n    if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {\n        registerDomTrigger(lView, tNode, triggerIndex, walkUpTimes, onViewport, () => triggerPrefetching(tDetails, lView, tNode), 1 /* TriggerType.Prefetch */);\n    }\n}\n/**\n * Creates runtime data structures for the `on viewport` hydrate trigger.\n * @codeGenApi\n */\nfunction ɵɵdeferHydrateOnViewport() {\n    const lView = getLView();\n    const tNode = getCurrentTNode();\n    if (!shouldAttachTrigger(2 /* TriggerType.Hydrate */, lView, tNode))\n        return;\n    const hydrateTriggers = getHydrateTriggers(getTView(), tNode);\n    hydrateTriggers.set(2 /* DeferBlockTrigger.Viewport */, null);\n    if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n        // We are on the server and SSR for defer blocks is enabled.\n        triggerDeferBlock(2 /* TriggerType.Hydrate */, lView, tNode);\n    }\n    // The actual triggering of hydration on viewport happens in triggering.ts,\n    // since these instructions won't exist for dehydrated content.\n}\n\n/**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n *                  Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\nfunction ɵɵattribute(name, value, sanitizer, namespace) {\n    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const 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 * 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    let isBindingUpdated = false;\n    let bindingIndex = getBindingIndex();\n    for (let 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    let content = values[0];\n    for (let 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    const 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    const bindingIndex = getBindingIndex();\n    const 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    const bindingIndex = getBindingIndex();\n    const 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    const bindingIndex = getBindingIndex();\n    const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    incrementBindingIndex(4);\n    return different\n        ? prefix +\n            renderStringify(v0) +\n            i0 +\n            renderStringify(v1) +\n            i1 +\n            renderStringify(v2) +\n            i2 +\n            renderStringify(v3) +\n            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    const bindingIndex = getBindingIndex();\n    let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n    incrementBindingIndex(5);\n    return different\n        ? prefix +\n            renderStringify(v0) +\n            i0 +\n            renderStringify(v1) +\n            i1 +\n            renderStringify(v2) +\n            i2 +\n            renderStringify(v3) +\n            i3 +\n            renderStringify(v4) +\n            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    const bindingIndex = getBindingIndex();\n    let 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 +\n            renderStringify(v0) +\n            i0 +\n            renderStringify(v1) +\n            i1 +\n            renderStringify(v2) +\n            i2 +\n            renderStringify(v3) +\n            i3 +\n            renderStringify(v4) +\n            i4 +\n            renderStringify(v5) +\n            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    const bindingIndex = getBindingIndex();\n    let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n    incrementBindingIndex(7);\n    return different\n        ? prefix +\n            renderStringify(v0) +\n            i0 +\n            renderStringify(v1) +\n            i1 +\n            renderStringify(v2) +\n            i2 +\n            renderStringify(v3) +\n            i3 +\n            renderStringify(v4) +\n            i4 +\n            renderStringify(v5) +\n            i5 +\n            renderStringify(v6) +\n            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    const bindingIndex = getBindingIndex();\n    let 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\n        ? prefix +\n            renderStringify(v0) +\n            i0 +\n            renderStringify(v1) +\n            i1 +\n            renderStringify(v2) +\n            i2 +\n            renderStringify(v3) +\n            i3 +\n            renderStringify(v4) +\n            i4 +\n            renderStringify(v5) +\n            i5 +\n            renderStringify(v6) +\n            i6 +\n            renderStringify(v7) +\n            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    const lView = getLView();\n    const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const 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    const lView = getLView();\n    const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const 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    const lView = getLView();\n    const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const 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    const lView = getLView();\n    const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const 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    const lView = getLView();\n    const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const 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    const lView = getLView();\n    const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const 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    const lView = getLView();\n    const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const 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    const lView = getLView();\n    const 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        const 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    const lView = getLView();\n    const interpolated = interpolationV(lView, values);\n    if (interpolated !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);\n        if (ngDevMode) {\n            const interpolationInBetween = [values[0]]; // prefix\n            for (let i = 2; i < values.length; i += 2) {\n                interpolationInBetween.push(values[i]);\n            }\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n        }\n    }\n    return ɵɵattributeInterpolateV;\n}\n\nfunction toTStylingRange(prev, next) {\n    ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n    ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n    return ((prev << 17 /* StylingRange.PREV_SHIFT */) | (next << 2 /* StylingRange.NEXT_SHIFT */));\n}\nfunction getTStylingRangePrev(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;\n}\nfunction getTStylingRangePrevDuplicate(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) == 2 /* StylingRange.PREV_DUPLICATE */;\n}\nfunction setTStylingRangePrev(tStylingRange, previous) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n    return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |\n        (previous << 17 /* StylingRange.PREV_SHIFT */));\n}\nfunction setTStylingRangePrevDuplicate(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);\n}\nfunction getTStylingRangeNext(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;\n}\nfunction setTStylingRangeNext(tStylingRange, next) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);\n    return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //\n        (next << 2 /* StylingRange.NEXT_SHIFT */));\n}\nfunction getTStylingRangeNextDuplicate(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) === 1 /* StylingRange.NEXT_DUPLICATE */;\n}\nfunction setTStylingRangeNextDuplicate(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);\n}\nfunction getTStylingRangeTail(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    const next = getTStylingRangeNext(tStylingRange);\n    return next === 0 ? getTStylingRangePrev(tStylingRange) : next;\n}\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 * ```angular-ts\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 * ```ts\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 * ```ts\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 */\nlet __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    let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n    let tmplHead = getTStylingRangePrev(tBindings);\n    let tmplTail = getTStylingRangeNext(tBindings);\n    tData[index] = tStylingKeyWithStatic;\n    let isKeyDuplicateOfStatic = false;\n    let tStylingKey;\n    if (Array.isArray(tStylingKeyWithStatic)) {\n        // We are case when the `TStylingKey` contains static fields as well.\n        const 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        const 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            const 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] = 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);\n    markDuplicates(tData, tStylingKey, index, false);\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    const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n    if (residual != null /* or undefined */ &&\n        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) {\n    const tStylingAtIndex = tData[index + 1];\n    const isMap = tStylingKey === null;\n    let cursor = isPrevDir\n        ? getTStylingRangePrev(tStylingAtIndex)\n        : getTStylingRangeNext(tStylingAtIndex);\n    let 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 && assertIndexInRange(tData, cursor);\n        const tStylingValueAtCursor = tData[cursor];\n        const tStyleRangeAtCursor = tData[cursor + 1];\n        if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n            foundDuplicate = true;\n            tData[cursor + 1] = isPrevDir\n                ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor)\n                : setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n        }\n        cursor = isPrevDir\n            ? getTStylingRangePrev(tStyleRangeAtCursor)\n            : getTStylingRangeNext(tStyleRangeAtCursor);\n    }\n    if (foundDuplicate) {\n        // if we found a duplicate, than mark ourselves.\n        tData[index + 1] = isPrevDir\n            ? setTStylingRangePrevDuplicate(tStylingAtIndex)\n            : setTStylingRangeNextDuplicate(tStylingAtIndex);\n    }\n}\n/**\n * Determines if two `TStylingKey`s are a match.\n *\n * When computing whether 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) === 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) >= 0; // see if we are matching the key\n    }\n    return false;\n}\n\n// Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\nconst 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 * ```ts\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 * ```ts\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    const 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 * ```ts\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 * ```ts\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    const end = parserState.textEnd;\n    let 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 /* CharCode.COLON */);\n    index = parserState.value = consumeWhitespace(text, index, end);\n    index = parserState.valueEnd = consumeStyleValue(text, index, end);\n    return consumeSeparator(text, index, end, 59 /* CharCode.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 /* CharCode.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 /* CharCode.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    let ch;\n    while (startIndex < endIndex &&\n        ((ch = text.charCodeAt(startIndex)) === 45 /* CharCode.DASH */ ||\n            ch === 95 /* CharCode.UNDERSCORE */ ||\n            ((ch & -33 /* CharCode.UPPER_CASE */) >= 65 /* CharCode.A */ && (ch & -33 /* CharCode.UPPER_CASE */) <= 90 /* CharCode.Z */) ||\n            (ch >= 48 /* CharCode.ZERO */ && ch <= 57 /* CharCode.NINE */))) {\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    let ch1 = -1; // 1st previous character\n    let ch2 = -1; // 2nd previous character\n    let ch3 = -1; // 3rd previous character\n    let i = startIndex;\n    let lastChIndex = i;\n    while (i < endIndex) {\n        const ch = text.charCodeAt(i++);\n        if (ch === 59 /* CharCode.SEMI_COLON */) {\n            return lastChIndex;\n        }\n        else if (ch === 34 /* CharCode.DOUBLE_QUOTE */ || ch === 39 /* CharCode.SINGLE_QUOTE */) {\n            lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n        }\n        else if (startIndex === i - 4 && // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n            ch3 === 85 /* CharCode.U */ &&\n            ch2 === 82 /* CharCode.R */ &&\n            ch1 === 76 /* CharCode.L */ &&\n            ch === 40 /* CharCode.OPEN_PAREN */) {\n            lastChIndex = i = consumeQuotedText(text, 41 /* CharCode.CLOSE_PAREN */, i, endIndex);\n        }\n        else if (ch > 32 /* CharCode.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 /* CharCode.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    let ch1 = -1; // 1st previous character\n    let index = startIndex;\n    while (index < endIndex) {\n        const ch = text.charCodeAt(index++);\n        if (ch == quoteCharCode && ch1 !== 92 /* CharCode.BACK_SLASH */) {\n            return index;\n        }\n        if (ch == 92 /* CharCode.BACK_SLASH */ && ch1 === 92 /* CharCode.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\n        ? 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 '` +\n        text.substring(0, index) +\n        '[>>' +\n        text.substring(index, index + 1) +\n        '<<]' +\n        text.slice(index + 1) +\n        `'. Expecting '${expecting}'.`);\n}\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    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const 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    const inputs = tNode.inputs;\n    const 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 * 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 *\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 (let 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(classKeyValueArraySet, 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 (let 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 suffix suffix for the property (e.g. `em` or `px`)\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingProperty(prop, value, suffix, isClassBased) {\n    const lView = getLView();\n    const 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    const bindingIndex = incrementBindingIndex(2);\n    if (tView.firstUpdatePass) {\n        stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n    }\n    if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n        const tNode = tView.data[getSelectedIndex()];\n        updateStyling(tView, tNode, lView, lView[RENDERER], prop, (lView[bindingIndex + 1] = normalizeSuffix(value, suffix)), 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 `style` can be processed. This is done for tree shaking 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    const tView = getTView();\n    const bindingIndex = incrementBindingIndex(2);\n    if (tView.firstUpdatePass) {\n        stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n    }\n    const 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        const tNode = tView.data[getSelectedIndex()];\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                const 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            let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n            ngDevMode &&\n                isClassBased === false &&\n                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    const 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        const tNode = tData[getSelectedIndex()];\n        ngDevMode && assertDefined(tNode, 'TNode expected');\n        const 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    const hostDirectiveDef = getCurrentDirectiveDef(tData);\n    let 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        const 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        const directiveStylingLast = tNode.directiveStylingLast;\n        const isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n        if (isFirstStylingInstructionInHostBinding) {\n            stylingKey = 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                let 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 = 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    const 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 * ```angular-ts\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 * ```ts\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 * ```ts\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 * ```ts\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    const 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    let residual = undefined;\n    const 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 (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n        const 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    let currentDirective = null;\n    const directiveEnd = tNode.directiveEnd;\n    let 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    const desiredMarker = isClassBased ? 1 /* AttributeMarker.Classes */ : 2 /* AttributeMarker.Styles */;\n    let currentMarker = -1 /* AttributeMarker.ImplicitAttributes */;\n    if (attrs !== null) {\n        for (let i = 0; i < attrs.length; i++) {\n            const 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 `style` can be processed. This is done\n *        for tree shaking 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;\n    const styleKeyValueArray = [];\n    const unwrappedValue = unwrapSafeValue(value);\n    if (Array.isArray(unwrappedValue)) {\n        for (let i = 0; i < unwrappedValue.length; i++) {\n            keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n        }\n    }\n    else if (typeof unwrappedValue === 'object') {\n        for (const 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`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nfunction styleKeyValueArraySet(keyValueArray, key, value) {\n    keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\n}\n/**\n * Class-binding-specific function for setting the `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nfunction classKeyValueArraySet(keyValueArray, key, value) {\n    // We use `classList.add` to eventually add the CSS classes to the DOM node. Any value passed into\n    // `add` is stringified and added to the `class` attribute, e.g. even null, undefined or numbers\n    // will be added. Stringify the key here so that our internal data structure matches the value in\n    // the DOM. The only exceptions are empty strings and strings that contain spaces for which\n    // the browser throws an error. We ignore such values, because the error is somewhat cryptic.\n    const stringKey = String(key);\n    if (stringKey !== '' && !stringKey.includes(' ')) {\n        keyValueArraySet(keyValueArray, stringKey, value);\n    }\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;\n    }\n    let oldIndex = 0;\n    let newIndex = 0;\n    let oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n    let 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        const oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n        const newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n        let setKey = null;\n        let 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 /* TNodeType.AnyRNode */)) {\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    const tData = tView.data;\n    const tRange = tData[bindingIndex + 1];\n    const 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        const 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 is stored at `index + 1`.\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    const isPrevDirection = tNode === null;\n    let value = undefined;\n    while (index > 0) {\n        const rawKey = tData[index];\n        const containsStatics = Array.isArray(rawKey);\n        // Unwrap the key if we contain static values.\n        const key = containsStatics ? rawKey[1] : rawKey;\n        const isStylingMap = key === null;\n        let 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 : undefined;\n        }\n        let currentValue = isStylingMap\n            ? keyValueArrayGet(valueAtLViewIndex, prop)\n            : key === prop\n                ? valueAtLViewIndex\n                : 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        const 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        let 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 * Normalizes and/or adds a suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffix\n */\nfunction normalizeSuffix(value, suffix) {\n    if (value == null || value === '') {\n        // do nothing\n        // Do not add the suffix if the value is going to be empty.\n        // As it produce invalid CSS, which the browsers will automatically omit but Domino will not.\n        // Example: `\"left\": \"px;\"` instead of `\"left\": \"\"`.\n    }\n    else if (typeof suffix === 'string') {\n        value = value + suffix;\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 ? 8 /* TNodeFlags.hasClassInput */ : 16 /* TNodeFlags.hasStyleInput */)) !== 0;\n}\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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const interpolatedValue = interpolationV(lView, values);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Instruction that returns the component instance in which the current instruction is executing.\n * This is a constant-time version of `nextContent` for the case where we know that we need the\n * component instance specifically, rather than the context of a particular template.\n *\n * @codeGenApi\n */\nfunction ɵɵcomponentInstance() {\n    const instance = getLView()[DECLARATION_COMPONENT_VIEW][CONTEXT];\n    ngDevMode && assertDefined(instance, 'Expected component instance to be defined');\n    return instance;\n}\n\n/**\n * A type representing the live collection to be reconciled with any new (incoming) collection. This\n * is an adapter class that makes it possible to work with different internal data structures,\n * regardless of the actual values of the incoming collection.\n */\nclass LiveCollection {\n    destroy(item) {\n        // noop by default\n    }\n    updateValue(index, value) {\n        // noop by default\n    }\n    // operations below could be implemented on top of the operations defined so far, but having\n    // them explicitly allow clear expression of intent and potentially more performant\n    // implementations\n    swap(index1, index2) {\n        const startIdx = Math.min(index1, index2);\n        const endIdx = Math.max(index1, index2);\n        const endItem = this.detach(endIdx);\n        if (endIdx - startIdx > 1) {\n            const startItem = this.detach(startIdx);\n            this.attach(startIdx, endItem);\n            this.attach(endIdx, startItem);\n        }\n        else {\n            this.attach(startIdx, endItem);\n        }\n    }\n    move(prevIndex, newIdx) {\n        this.attach(newIdx, this.detach(prevIndex));\n    }\n}\nfunction valuesMatching(liveIdx, liveValue, newIdx, newValue, trackBy) {\n    if (liveIdx === newIdx && Object.is(liveValue, newValue)) {\n        // matching and no value identity to update\n        return 1;\n    }\n    else if (Object.is(trackBy(liveIdx, liveValue), trackBy(newIdx, newValue))) {\n        // matching but requires value identity update\n        return -1;\n    }\n    return 0;\n}\nfunction recordDuplicateKeys(keyToIdx, key, idx) {\n    const idxSoFar = keyToIdx.get(key);\n    if (idxSoFar !== undefined) {\n        idxSoFar.add(idx);\n    }\n    else {\n        keyToIdx.set(key, new Set([idx]));\n    }\n}\n/**\n * The live collection reconciliation algorithm that perform various in-place operations, so it\n * reflects the content of the new (incoming) collection.\n *\n * The reconciliation algorithm has 2 code paths:\n * - \"fast\" path that don't require any memory allocation;\n * - \"slow\" path that requires additional memory allocation for intermediate data structures used to\n * collect additional information about the live collection.\n * It might happen that the algorithm switches between the two modes in question in a single\n * reconciliation path - generally it tries to stay on the \"fast\" path as much as possible.\n *\n * The overall complexity of the algorithm is O(n + m) for speed and O(n) for memory (where n is the\n * length of the live collection and m is the length of the incoming collection). Given the problem\n * at hand the complexity / performance constraints makes it impossible to perform the absolute\n * minimum of operation to reconcile the 2 collections. The algorithm makes different tradeoffs to\n * stay within reasonable performance bounds and may apply sub-optimal number of operations in\n * certain situations.\n *\n * @param liveCollection the current, live collection;\n * @param newCollection the new, incoming collection;\n * @param trackByFn key generation function that determines equality between items in the life and\n *     incoming collection;\n */\nfunction reconcile(liveCollection, newCollection, trackByFn) {\n    let detachedItems = undefined;\n    let liveKeysInTheFuture = undefined;\n    let liveStartIdx = 0;\n    let liveEndIdx = liveCollection.length - 1;\n    const duplicateKeys = ngDevMode ? new Map() : undefined;\n    if (Array.isArray(newCollection)) {\n        let newEndIdx = newCollection.length - 1;\n        while (liveStartIdx <= liveEndIdx && liveStartIdx <= newEndIdx) {\n            // compare from the beginning\n            const liveStartValue = liveCollection.at(liveStartIdx);\n            const newStartValue = newCollection[liveStartIdx];\n            if (ngDevMode) {\n                recordDuplicateKeys(duplicateKeys, trackByFn(liveStartIdx, newStartValue), liveStartIdx);\n            }\n            const isStartMatching = valuesMatching(liveStartIdx, liveStartValue, liveStartIdx, newStartValue, trackByFn);\n            if (isStartMatching !== 0) {\n                if (isStartMatching < 0) {\n                    liveCollection.updateValue(liveStartIdx, newStartValue);\n                }\n                liveStartIdx++;\n                continue;\n            }\n            // compare from the end\n            // TODO(perf): do _all_ the matching from the end\n            const liveEndValue = liveCollection.at(liveEndIdx);\n            const newEndValue = newCollection[newEndIdx];\n            if (ngDevMode) {\n                recordDuplicateKeys(duplicateKeys, trackByFn(newEndIdx, newEndValue), newEndIdx);\n            }\n            const isEndMatching = valuesMatching(liveEndIdx, liveEndValue, newEndIdx, newEndValue, trackByFn);\n            if (isEndMatching !== 0) {\n                if (isEndMatching < 0) {\n                    liveCollection.updateValue(liveEndIdx, newEndValue);\n                }\n                liveEndIdx--;\n                newEndIdx--;\n                continue;\n            }\n            // Detect swap and moves:\n            const liveStartKey = trackByFn(liveStartIdx, liveStartValue);\n            const liveEndKey = trackByFn(liveEndIdx, liveEndValue);\n            const newStartKey = trackByFn(liveStartIdx, newStartValue);\n            if (Object.is(newStartKey, liveEndKey)) {\n                const newEndKey = trackByFn(newEndIdx, newEndValue);\n                // detect swap on both ends;\n                if (Object.is(newEndKey, liveStartKey)) {\n                    liveCollection.swap(liveStartIdx, liveEndIdx);\n                    liveCollection.updateValue(liveEndIdx, newEndValue);\n                    newEndIdx--;\n                    liveEndIdx--;\n                }\n                else {\n                    // the new item is the same as the live item with the end pointer - this is a move forward\n                    // to an earlier index;\n                    liveCollection.move(liveEndIdx, liveStartIdx);\n                }\n                liveCollection.updateValue(liveStartIdx, newStartValue);\n                liveStartIdx++;\n                continue;\n            }\n            // Fallback to the slow path: we need to learn more about the content of the live and new\n            // collections.\n            detachedItems ??= new UniqueValueMultiKeyMap();\n            liveKeysInTheFuture ??= initLiveItemsInTheFuture(liveCollection, liveStartIdx, liveEndIdx, trackByFn);\n            // Check if I'm inserting a previously detached item: if so, attach it here\n            if (attachPreviouslyDetached(liveCollection, detachedItems, liveStartIdx, newStartKey)) {\n                liveCollection.updateValue(liveStartIdx, newStartValue);\n                liveStartIdx++;\n                liveEndIdx++;\n            }\n            else if (!liveKeysInTheFuture.has(newStartKey)) {\n                // Check if we seen a new item that doesn't exist in the old collection and must be INSERTED\n                const newItem = liveCollection.create(liveStartIdx, newCollection[liveStartIdx]);\n                liveCollection.attach(liveStartIdx, newItem);\n                liveStartIdx++;\n                liveEndIdx++;\n            }\n            else {\n                // We know that the new item exists later on in old collection but we don't know its index\n                // and as the consequence can't move it (don't know where to find it). Detach the old item,\n                // hoping that it unlocks the fast path again.\n                detachedItems.set(liveStartKey, liveCollection.detach(liveStartIdx));\n                liveEndIdx--;\n            }\n        }\n        // Final cleanup steps:\n        // - more items in the new collection => insert\n        while (liveStartIdx <= newEndIdx) {\n            createOrAttach(liveCollection, detachedItems, trackByFn, liveStartIdx, newCollection[liveStartIdx]);\n            liveStartIdx++;\n        }\n    }\n    else if (newCollection != null) {\n        // iterable - immediately fallback to the slow path\n        const newCollectionIterator = newCollection[Symbol.iterator]();\n        let newIterationResult = newCollectionIterator.next();\n        while (!newIterationResult.done && liveStartIdx <= liveEndIdx) {\n            const liveValue = liveCollection.at(liveStartIdx);\n            const newValue = newIterationResult.value;\n            if (ngDevMode) {\n                recordDuplicateKeys(duplicateKeys, trackByFn(liveStartIdx, newValue), liveStartIdx);\n            }\n            const isStartMatching = valuesMatching(liveStartIdx, liveValue, liveStartIdx, newValue, trackByFn);\n            if (isStartMatching !== 0) {\n                // found a match - move on, but update value\n                if (isStartMatching < 0) {\n                    liveCollection.updateValue(liveStartIdx, newValue);\n                }\n                liveStartIdx++;\n                newIterationResult = newCollectionIterator.next();\n            }\n            else {\n                detachedItems ??= new UniqueValueMultiKeyMap();\n                liveKeysInTheFuture ??= initLiveItemsInTheFuture(liveCollection, liveStartIdx, liveEndIdx, trackByFn);\n                // Check if I'm inserting a previously detached item: if so, attach it here\n                const newKey = trackByFn(liveStartIdx, newValue);\n                if (attachPreviouslyDetached(liveCollection, detachedItems, liveStartIdx, newKey)) {\n                    liveCollection.updateValue(liveStartIdx, newValue);\n                    liveStartIdx++;\n                    liveEndIdx++;\n                    newIterationResult = newCollectionIterator.next();\n                }\n                else if (!liveKeysInTheFuture.has(newKey)) {\n                    liveCollection.attach(liveStartIdx, liveCollection.create(liveStartIdx, newValue));\n                    liveStartIdx++;\n                    liveEndIdx++;\n                    newIterationResult = newCollectionIterator.next();\n                }\n                else {\n                    // it is a move forward - detach the current item without advancing in collections\n                    const liveKey = trackByFn(liveStartIdx, liveValue);\n                    detachedItems.set(liveKey, liveCollection.detach(liveStartIdx));\n                    liveEndIdx--;\n                }\n            }\n        }\n        // this is a new item as we run out of the items in the old collection - create or attach a\n        // previously detached one\n        while (!newIterationResult.done) {\n            createOrAttach(liveCollection, detachedItems, trackByFn, liveCollection.length, newIterationResult.value);\n            newIterationResult = newCollectionIterator.next();\n        }\n    }\n    // Cleanups common to the array and iterable:\n    // - more items in the live collection => delete starting from the end;\n    while (liveStartIdx <= liveEndIdx) {\n        liveCollection.destroy(liveCollection.detach(liveEndIdx--));\n    }\n    // - destroy items that were detached but never attached again.\n    detachedItems?.forEach((item) => {\n        liveCollection.destroy(item);\n    });\n    // report duplicate keys (dev mode only)\n    if (ngDevMode) {\n        let duplicatedKeysMsg = [];\n        for (const [key, idxSet] of duplicateKeys) {\n            if (idxSet.size > 1) {\n                const idx = [...idxSet].sort((a, b) => a - b);\n                for (let i = 1; i < idx.length; i++) {\n                    duplicatedKeysMsg.push(`key \"${stringifyForError(key)}\" at index \"${idx[i - 1]}\" and \"${idx[i]}\"`);\n                }\n            }\n        }\n        if (duplicatedKeysMsg.length > 0) {\n            const message = formatRuntimeError(-955 /* RuntimeErrorCode.LOOP_TRACK_DUPLICATE_KEYS */, 'The provided track expression resulted in duplicated keys for a given collection. ' +\n                'Adjust the tracking expression such that it uniquely identifies all the items in the collection. ' +\n                'Duplicated keys were: \\n' +\n                duplicatedKeysMsg.join(', \\n') +\n                '.');\n            // tslint:disable-next-line:no-console\n            console.warn(message);\n        }\n    }\n}\nfunction attachPreviouslyDetached(prevCollection, detachedItems, index, key) {\n    if (detachedItems !== undefined && detachedItems.has(key)) {\n        prevCollection.attach(index, detachedItems.get(key));\n        detachedItems.delete(key);\n        return true;\n    }\n    return false;\n}\nfunction createOrAttach(liveCollection, detachedItems, trackByFn, index, value) {\n    if (!attachPreviouslyDetached(liveCollection, detachedItems, index, trackByFn(index, value))) {\n        const newItem = liveCollection.create(index, value);\n        liveCollection.attach(index, newItem);\n    }\n    else {\n        liveCollection.updateValue(index, value);\n    }\n}\nfunction initLiveItemsInTheFuture(liveCollection, start, end, trackByFn) {\n    const keys = new Set();\n    for (let i = start; i <= end; i++) {\n        keys.add(trackByFn(i, liveCollection.at(i)));\n    }\n    return keys;\n}\n/**\n * A specific, partial implementation of the Map interface with the following characteristics:\n * - allows multiple values for a given key;\n * - maintain FIFO order for multiple values corresponding to a given key;\n * - assumes that all values are unique.\n *\n * The implementation aims at having the minimal overhead for cases where keys are _not_ duplicated\n * (the most common case in the list reconciliation algorithm). To achieve this, the first value for\n * a given key is stored in a regular map. Then, when more values are set for a given key, we\n * maintain a form of linked list in a separate map. To maintain this linked list we assume that all\n * values (in the entire collection) are unique.\n */\nclass UniqueValueMultiKeyMap {\n    // A map from a key to the first value corresponding to this key.\n    kvMap = new Map();\n    // A map that acts as a linked list of values - each value maps to the next value in this \"linked\n    // list\" (this only works if values are unique). Allocated lazily to avoid memory consumption when\n    // there are no duplicated values.\n    _vMap = undefined;\n    has(key) {\n        return this.kvMap.has(key);\n    }\n    delete(key) {\n        if (!this.has(key))\n            return false;\n        const value = this.kvMap.get(key);\n        if (this._vMap !== undefined && this._vMap.has(value)) {\n            this.kvMap.set(key, this._vMap.get(value));\n            this._vMap.delete(value);\n        }\n        else {\n            this.kvMap.delete(key);\n        }\n        return true;\n    }\n    get(key) {\n        return this.kvMap.get(key);\n    }\n    set(key, value) {\n        if (this.kvMap.has(key)) {\n            let prevValue = this.kvMap.get(key);\n            // Note: we don't use `assertNotSame`, because the value needs to be stringified even if\n            // there is no error which can freeze the browser for large values (see #58509).\n            if (ngDevMode && prevValue === value) {\n                throw new Error(`Detected a duplicated value ${value} for the key ${key}`);\n            }\n            if (this._vMap === undefined) {\n                this._vMap = new Map();\n            }\n            const vMap = this._vMap;\n            while (vMap.has(prevValue)) {\n                prevValue = vMap.get(prevValue);\n            }\n            vMap.set(prevValue, value);\n        }\n        else {\n            this.kvMap.set(key, value);\n        }\n    }\n    forEach(cb) {\n        for (let [key, value] of this.kvMap) {\n            cb(value, key);\n            if (this._vMap !== undefined) {\n                const vMap = this._vMap;\n                while (vMap.has(value)) {\n                    value = vMap.get(value);\n                    cb(value, key);\n                }\n            }\n        }\n    }\n}\n\n/**\n * The conditional instruction represents the basic building block on the runtime side to support\n * built-in \"if\" and \"switch\". On the high level this instruction is responsible for adding and\n * removing views selected by a conditional expression.\n *\n * @param matchingTemplateIndex Index of a template TNode representing a conditional view to be\n *     inserted; -1 represents a special case when there is no view to insert.\n * @param contextValue Value that should be exposed as the context of the conditional.\n * @codeGenApi\n */\nfunction ɵɵconditional(matchingTemplateIndex, contextValue) {\n    performanceMarkFeature('NgControlFlow');\n    const hostLView = getLView();\n    const bindingIndex = nextBindingIndex();\n    const prevMatchingTemplateIndex = hostLView[bindingIndex] !== NO_CHANGE ? hostLView[bindingIndex] : -1;\n    const prevContainer = prevMatchingTemplateIndex !== -1\n        ? getLContainer(hostLView, HEADER_OFFSET + prevMatchingTemplateIndex)\n        : undefined;\n    const viewInContainerIdx = 0;\n    if (bindingUpdated(hostLView, bindingIndex, matchingTemplateIndex)) {\n        const prevConsumer = setActiveConsumer$1(null);\n        try {\n            // The index of the view to show changed - remove the previously displayed one\n            // (it is a noop if there are no active views in a container).\n            if (prevContainer !== undefined) {\n                removeLViewFromLContainer(prevContainer, viewInContainerIdx);\n            }\n            // Index -1 is a special case where none of the conditions evaluates to\n            // a truthy value and as the consequence we've got no view to show.\n            if (matchingTemplateIndex !== -1) {\n                const nextLContainerIndex = HEADER_OFFSET + matchingTemplateIndex;\n                const nextContainer = getLContainer(hostLView, nextLContainerIndex);\n                const templateTNode = getExistingTNode(hostLView[TVIEW], nextLContainerIndex);\n                const dehydratedView = findMatchingDehydratedView(nextContainer, templateTNode.tView.ssrId);\n                const embeddedLView = createAndRenderEmbeddedLView(hostLView, templateTNode, contextValue, {\n                    dehydratedView,\n                });\n                addLViewToLContainer(nextContainer, embeddedLView, viewInContainerIdx, shouldAddViewToDom(templateTNode, dehydratedView));\n            }\n        }\n        finally {\n            setActiveConsumer$1(prevConsumer);\n        }\n    }\n    else if (prevContainer !== undefined) {\n        // We might keep displaying the same template but the actual value of the expression could have\n        // changed - re-bind in context.\n        const lView = getLViewFromLContainer(prevContainer, viewInContainerIdx);\n        if (lView !== undefined) {\n            lView[CONTEXT] = contextValue;\n        }\n    }\n}\nclass RepeaterContext {\n    lContainer;\n    $implicit;\n    $index;\n    constructor(lContainer, $implicit, $index) {\n        this.lContainer = lContainer;\n        this.$implicit = $implicit;\n        this.$index = $index;\n    }\n    get $count() {\n        return this.lContainer.length - CONTAINER_HEADER_OFFSET;\n    }\n}\n/**\n * A built-in trackBy function used for situations where users specified collection index as a\n * tracking expression. Having this function body in the runtime avoids unnecessary code generation.\n *\n * @param index\n * @returns\n */\nfunction ɵɵrepeaterTrackByIndex(index) {\n    return index;\n}\n/**\n * A built-in trackBy function used for situations where users specified collection item reference\n * as a tracking expression. Having this function body in the runtime avoids unnecessary code\n * generation.\n *\n * @param index\n * @returns\n */\nfunction ɵɵrepeaterTrackByIdentity(_, value) {\n    return value;\n}\nclass RepeaterMetadata {\n    hasEmptyBlock;\n    trackByFn;\n    liveCollection;\n    constructor(hasEmptyBlock, trackByFn, liveCollection) {\n        this.hasEmptyBlock = hasEmptyBlock;\n        this.trackByFn = trackByFn;\n        this.liveCollection = liveCollection;\n    }\n}\n/**\n * The repeaterCreate instruction runs in the creation part of the template pass and initializes\n * internal data structures required by the update pass of the built-in repeater logic. Repeater\n * metadata are allocated in the data part of LView with the following layout:\n * - LView[HEADER_OFFSET + index] - metadata\n * - LView[HEADER_OFFSET + index + 1] - reference to a template function rendering an item\n * - LView[HEADER_OFFSET + index + 2] - optional reference to a template function rendering an empty\n * block\n *\n * @param index Index at which to store the metadata of the repeater.\n * @param templateFn Reference to the template of the main repeater block.\n * @param decls The number of nodes, local refs, and pipes for the main block.\n * @param vars The number of bindings for the main block.\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param trackByFn Reference to the tracking function.\n * @param trackByUsesComponentInstance Whether the tracking function has any references to the\n *  component instance. If it doesn't, we can avoid rebinding it.\n * @param emptyTemplateFn Reference to the template function of the empty block.\n * @param emptyDecls The number of nodes, local refs, and pipes for the empty block.\n * @param emptyVars The number of bindings for the empty block.\n * @param emptyTagName The name of the empty block container element, if applicable\n * @param emptyAttrsIndex Index of the empty block template attributes in the `consts` array.\n *\n * @codeGenApi\n */\nfunction ɵɵrepeaterCreate(index, templateFn, decls, vars, tagName, attrsIndex, trackByFn, trackByUsesComponentInstance, emptyTemplateFn, emptyDecls, emptyVars, emptyTagName, emptyAttrsIndex) {\n    performanceMarkFeature('NgControlFlow');\n    ngDevMode &&\n        assertFunction(trackByFn, `A track expression must be a function, was ${typeof trackByFn} instead.`);\n    const lView = getLView();\n    const tView = getTView();\n    const hasEmptyBlock = emptyTemplateFn !== undefined;\n    const hostLView = getLView();\n    const boundTrackBy = trackByUsesComponentInstance\n        ? // We only want to bind when necessary, because it produces a\n            // new function. For pure functions it's not necessary.\n            trackByFn.bind(hostLView[DECLARATION_COMPONENT_VIEW][CONTEXT])\n        : trackByFn;\n    const metadata = new RepeaterMetadata(hasEmptyBlock, boundTrackBy);\n    hostLView[HEADER_OFFSET + index] = metadata;\n    declareTemplate(lView, tView, index + 1, templateFn, decls, vars, tagName, getConstant(tView.consts, attrsIndex));\n    if (hasEmptyBlock) {\n        ngDevMode &&\n            assertDefined(emptyDecls, 'Missing number of declarations for the empty repeater block.');\n        ngDevMode &&\n            assertDefined(emptyVars, 'Missing number of bindings for the empty repeater block.');\n        declareTemplate(lView, tView, index + 2, emptyTemplateFn, emptyDecls, emptyVars, emptyTagName, getConstant(tView.consts, emptyAttrsIndex));\n    }\n}\nfunction isViewExpensiveToRecreate(lView) {\n    // assumption: anything more than a text node with a binding is considered \"expensive\"\n    return lView.length - HEADER_OFFSET > 2;\n}\nclass OperationsCounter {\n    created = 0;\n    destroyed = 0;\n    reset() {\n        this.created = 0;\n        this.destroyed = 0;\n    }\n    recordCreate() {\n        this.created++;\n    }\n    recordDestroy() {\n        this.destroyed++;\n    }\n    /**\n     * A method indicating if the entire collection was re-created as part of the reconciliation pass.\n     * Used to warn developers about the usage of a tracking function that might result in excessive\n     * amount of view creation / destroy operations.\n     *\n     * @returns boolean value indicating if a live collection was re-created\n     */\n    wasReCreated(collectionLen) {\n        return collectionLen > 0 && this.created === this.destroyed && this.created === collectionLen;\n    }\n}\nclass LiveCollectionLContainerImpl extends LiveCollection {\n    lContainer;\n    hostLView;\n    templateTNode;\n    operationsCounter = ngDevMode ? new OperationsCounter() : undefined;\n    /**\n     Property indicating if indexes in the repeater context need to be updated following the live\n     collection changes. Index updates are necessary if and only if views are inserted / removed in\n     the middle of LContainer. Adds and removals at the end don't require index updates.\n   */\n    needsIndexUpdate = false;\n    constructor(lContainer, hostLView, templateTNode) {\n        super();\n        this.lContainer = lContainer;\n        this.hostLView = hostLView;\n        this.templateTNode = templateTNode;\n    }\n    get length() {\n        return this.lContainer.length - CONTAINER_HEADER_OFFSET;\n    }\n    at(index) {\n        return this.getLView(index)[CONTEXT].$implicit;\n    }\n    attach(index, lView) {\n        const dehydratedView = lView[HYDRATION];\n        this.needsIndexUpdate ||= index !== this.length;\n        addLViewToLContainer(this.lContainer, lView, index, shouldAddViewToDom(this.templateTNode, dehydratedView));\n    }\n    detach(index) {\n        this.needsIndexUpdate ||= index !== this.length - 1;\n        return detachExistingView(this.lContainer, index);\n    }\n    create(index, value) {\n        const dehydratedView = findMatchingDehydratedView(this.lContainer, this.templateTNode.tView.ssrId);\n        const embeddedLView = createAndRenderEmbeddedLView(this.hostLView, this.templateTNode, new RepeaterContext(this.lContainer, value, index), { dehydratedView });\n        this.operationsCounter?.recordCreate();\n        return embeddedLView;\n    }\n    destroy(lView) {\n        destroyLView(lView[TVIEW], lView);\n        this.operationsCounter?.recordDestroy();\n    }\n    updateValue(index, value) {\n        this.getLView(index)[CONTEXT].$implicit = value;\n    }\n    reset() {\n        this.needsIndexUpdate = false;\n        this.operationsCounter?.reset();\n    }\n    updateIndexes() {\n        if (this.needsIndexUpdate) {\n            for (let i = 0; i < this.length; i++) {\n                this.getLView(i)[CONTEXT].$index = i;\n            }\n        }\n    }\n    getLView(index) {\n        return getExistingLViewFromLContainer(this.lContainer, index);\n    }\n}\n/**\n * The repeater instruction does update-time diffing of a provided collection (against the\n * collection seen previously) and maps changes in the collection to views structure (by adding,\n * removing or moving views as needed).\n * @param collection - the collection instance to be checked for changes\n * @codeGenApi\n */\nfunction ɵɵrepeater(collection) {\n    const prevConsumer = setActiveConsumer$1(null);\n    const metadataSlotIdx = getSelectedIndex();\n    try {\n        const hostLView = getLView();\n        const hostTView = hostLView[TVIEW];\n        const metadata = hostLView[metadataSlotIdx];\n        const containerIndex = metadataSlotIdx + 1;\n        const lContainer = getLContainer(hostLView, containerIndex);\n        if (metadata.liveCollection === undefined) {\n            const itemTemplateTNode = getExistingTNode(hostTView, containerIndex);\n            metadata.liveCollection = new LiveCollectionLContainerImpl(lContainer, hostLView, itemTemplateTNode);\n        }\n        else {\n            metadata.liveCollection.reset();\n        }\n        const liveCollection = metadata.liveCollection;\n        reconcile(liveCollection, collection, metadata.trackByFn);\n        // Warn developers about situations where the entire collection was re-created as part of the\n        // reconciliation pass. Note that this warning might be \"overreacting\" and report cases where\n        // the collection re-creation is the intended behavior. Still, the assumption is that most of\n        // the time it is undesired.\n        if (ngDevMode &&\n            metadata.trackByFn === ɵɵrepeaterTrackByIdentity &&\n            liveCollection.operationsCounter?.wasReCreated(liveCollection.length) &&\n            isViewExpensiveToRecreate(getExistingLViewFromLContainer(lContainer, 0))) {\n            const message = formatRuntimeError(-956 /* RuntimeErrorCode.LOOP_TRACK_RECREATE */, `The configured tracking expression (track by identity) caused re-creation of the entire collection of size ${liveCollection.length}. ` +\n                'This is an expensive operation requiring destruction and subsequent creation of DOM nodes, directives, components etc. ' +\n                'Please review the \"track expression\" and make sure that it uniquely identifies items in a collection.');\n            console.warn(message);\n        }\n        // moves in the container might caused context's index to get out of order, re-adjust if needed\n        liveCollection.updateIndexes();\n        // handle empty blocks\n        if (metadata.hasEmptyBlock) {\n            const bindingIndex = nextBindingIndex();\n            const isCollectionEmpty = liveCollection.length === 0;\n            if (bindingUpdated(hostLView, bindingIndex, isCollectionEmpty)) {\n                const emptyTemplateIndex = metadataSlotIdx + 2;\n                const lContainerForEmpty = getLContainer(hostLView, emptyTemplateIndex);\n                if (isCollectionEmpty) {\n                    const emptyTemplateTNode = getExistingTNode(hostTView, emptyTemplateIndex);\n                    const dehydratedView = findMatchingDehydratedView(lContainerForEmpty, emptyTemplateTNode.tView.ssrId);\n                    const embeddedLView = createAndRenderEmbeddedLView(hostLView, emptyTemplateTNode, undefined, { dehydratedView });\n                    addLViewToLContainer(lContainerForEmpty, embeddedLView, 0, shouldAddViewToDom(emptyTemplateTNode, dehydratedView));\n                }\n                else {\n                    removeLViewFromLContainer(lContainerForEmpty, 0);\n                }\n            }\n        }\n    }\n    finally {\n        setActiveConsumer$1(prevConsumer);\n    }\n}\nfunction getLContainer(lView, index) {\n    const lContainer = lView[index];\n    ngDevMode && assertLContainer(lContainer);\n    return lContainer;\n}\nfunction detachExistingView(lContainer, index) {\n    const existingLView = detachView(lContainer, index);\n    ngDevMode && assertLView(existingLView);\n    return existingLView;\n}\nfunction getExistingLViewFromLContainer(lContainer, index) {\n    const existingLView = getLViewFromLContainer(lContainer, index);\n    ngDevMode && assertLView(existingLView);\n    return existingLView;\n}\nfunction getExistingTNode(tView, index) {\n    const tNode = getTNode(tView, index);\n    ngDevMode && assertTNode(tNode);\n    return tNode;\n}\n\nfunction elementStartFirstCreatePass(index, tView, lView, name, attrsIndex, localRefsIndex) {\n    ngDevMode && assertFirstCreatePass(tView);\n    ngDevMode && ngDevMode.firstCreatePass++;\n    const tViewConsts = tView.consts;\n    const attrs = getConstant(tViewConsts, attrsIndex);\n    const tNode = getOrCreateTNode(tView, index, 2 /* TNodeType.Element */, name, attrs);\n    resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\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 * @returns This function returns itself so that it may be chained.\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    const lView = getLView();\n    const tView = getTView();\n    const adjustedIndex = HEADER_OFFSET + index;\n    ngDevMode &&\n        assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings');\n    ngDevMode && assertIndexInRange(lView, adjustedIndex);\n    const renderer = lView[RENDERER];\n    const tNode = tView.firstCreatePass\n        ? elementStartFirstCreatePass(adjustedIndex, tView, lView, name, attrsIndex, localRefsIndex)\n        : tView.data[adjustedIndex];\n    const native = _locateOrCreateElementNode(tView, lView, tNode, renderer, name, index);\n    lView[adjustedIndex] = native;\n    const hasDirectives = isDirectiveHost(tNode);\n    if (ngDevMode && tView.firstCreatePass) {\n        validateElementIsKnown(native, lView, tNode.value, tView.schemas, hasDirectives);\n    }\n    setCurrentTNode(tNode, true);\n    setupStaticAttributes(renderer, native, tNode);\n    if (!isDetachedByI18n(tNode) && wasLastNodeCreated()) {\n        // In the i18n case, the translation may have removed this element, so only add it if it is not\n        // detached. See `TNodeType.Placeholder` and `LFrame.inI18n` for more context.\n        appendChild(tView, lView, native, tNode);\n    }\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 (hasDirectives) {\n        createDirectivesInstances(tView, lView, tNode);\n        executeContentQueries(tView, tNode, lView);\n    }\n    if (localRefsIndex !== null) {\n        saveResolvedLocalsInData(lView, tNode);\n    }\n    return ɵɵelementStart;\n}\n/**\n * Mark the end of the element.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelementEnd() {\n    let currentTNode = getCurrentTNode();\n    ngDevMode && assertDefined(currentTNode, 'No parent node to close.');\n    if (isCurrentTNodeParent()) {\n        setCurrentTNodeAsNotParent();\n    }\n    else {\n        ngDevMode && assertHasParent(getCurrentTNode());\n        currentTNode = currentTNode.parent;\n        setCurrentTNode(currentTNode, false);\n    }\n    const tNode = currentTNode;\n    ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);\n    if (isSkipHydrationRootTNode(tNode)) {\n        leaveSkipHydrationBlock();\n    }\n    decreaseElementDepthCount();\n    const tView = getTView();\n    if (tView.firstCreatePass) {\n        registerPostOrderHooks(tView, currentTNode);\n        if (isContentQueryHost(currentTNode)) {\n            tView.queries.elementEnd(currentTNode);\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    return ɵɵelementEnd;\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 * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelement(index, name, attrsIndex, localRefsIndex) {\n    ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n    ɵɵelementEnd();\n    return ɵɵelement;\n}\nlet _locateOrCreateElementNode = (tView, lView, tNode, renderer, name, index) => {\n    lastNodeWasCreated(true);\n    return createElementNode(renderer, name, getNamespace$1());\n};\n/**\n * Enables hydration code path (to lookup existing elements in DOM)\n * in addition to the regular creation mode of element nodes.\n */\nfunction locateOrCreateElementNodeImpl(tView, lView, tNode, renderer, name, index) {\n    const hydrationInfo = lView[HYDRATION];\n    const isNodeCreationMode = !hydrationInfo ||\n        isInSkipHydrationBlock$1() ||\n        isDetachedByI18n(tNode) ||\n        isDisconnectedNode$1(hydrationInfo, index);\n    lastNodeWasCreated(isNodeCreationMode);\n    // Regular creation mode.\n    if (isNodeCreationMode) {\n        return createElementNode(renderer, name, getNamespace$1());\n    }\n    // Hydration mode, looking up an existing element in DOM.\n    const native = locateNextRNode(hydrationInfo, tView, lView, tNode);\n    ngDevMode && validateMatchingNode(native, Node.ELEMENT_NODE, name, lView, tNode);\n    ngDevMode && markRNodeAsClaimedByHydration(native);\n    // This element might also be an anchor of a view container.\n    if (getSerializedContainerViews(hydrationInfo, index)) {\n        // Important note: this element acts as an anchor, but it's **not** a part\n        // of the embedded view, so we start the segment **after** this element, taking\n        // a reference to the next sibling. For example, the following template:\n        // `<div #vcrTarget>` is represented in the DOM as `<div></div>...<!--container-->`,\n        // so while processing a `<div>` instruction, point to the next sibling as a\n        // start of a segment.\n        ngDevMode && validateNodeExists(native.nextSibling, lView, tNode);\n        setSegmentHead(hydrationInfo, index, native.nextSibling);\n    }\n    // Checks if the skip hydration attribute is present during hydration so we know to\n    // skip attempting to hydrate this block. We check both TNode and RElement for an\n    // attribute: the RElement case is needed for i18n cases, when we add it to host\n    // elements during the annotation phase (after all internal data structures are setup).\n    if (hydrationInfo &&\n        (hasSkipHydrationAttrOnTNode(tNode) || hasSkipHydrationAttrOnRElement(native))) {\n        if (isComponentHost(tNode)) {\n            enterSkipHydrationBlock(tNode);\n            // Since this isn't hydratable, we need to empty the node\n            // so there's no duplicate content after render\n            clearElementContents(native);\n            ngDevMode && markRNodeAsSkippedByHydration(native);\n        }\n        else if (ngDevMode) {\n            // If this is not a component host, throw an error.\n            // Hydration can be skipped on per-component basis only.\n            throw invalidSkipHydrationHost(native);\n        }\n    }\n    return native;\n}\nfunction enableLocateOrCreateElementNodeImpl() {\n    _locateOrCreateElementNode = locateOrCreateElementNodeImpl;\n}\n\nfunction elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) {\n    ngDevMode && ngDevMode.firstCreatePass++;\n    const tViewConsts = tView.consts;\n    const attrs = getConstant(tViewConsts, attrsIndex);\n    const tNode = getOrCreateTNode(tView, index, 8 /* TNodeType.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    const 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 * @returns This function returns itself so that it may be chained.\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    const lView = getLView();\n    const tView = getTView();\n    const adjustedIndex = index + HEADER_OFFSET;\n    ngDevMode && assertIndexInRange(lView, adjustedIndex);\n    ngDevMode &&\n        assertEqual(getBindingIndex(), tView.bindingStartIndex, 'element containers should be created before any bindings');\n    const tNode = tView.firstCreatePass\n        ? elementContainerStartFirstCreatePass(adjustedIndex, tView, lView, attrsIndex, localRefsIndex)\n        : tView.data[adjustedIndex];\n    setCurrentTNode(tNode, true);\n    const comment = _locateOrCreateElementContainerNode(tView, lView, tNode, index);\n    lView[adjustedIndex] = comment;\n    if (wasLastNodeCreated()) {\n        appendChild(tView, lView, comment, tNode);\n    }\n    attachPatchData(comment, 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    return ɵɵelementContainerStart;\n}\n/**\n * Mark the end of the <ng-container>.\n * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainerEnd() {\n    let currentTNode = getCurrentTNode();\n    const tView = getTView();\n    if (isCurrentTNodeParent()) {\n        setCurrentTNodeAsNotParent();\n    }\n    else {\n        ngDevMode && assertHasParent(currentTNode);\n        currentTNode = currentTNode.parent;\n        setCurrentTNode(currentTNode, false);\n    }\n    ngDevMode && assertTNodeType(currentTNode, 8 /* TNodeType.ElementContainer */);\n    if (tView.firstCreatePass) {\n        registerPostOrderHooks(tView, currentTNode);\n        if (isContentQueryHost(currentTNode)) {\n            tView.queries.elementEnd(currentTNode);\n        }\n    }\n    return ɵɵelementContainerEnd;\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 * @returns This function returns itself so that it may be chained.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainer(index, attrsIndex, localRefsIndex) {\n    ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n    ɵɵelementContainerEnd();\n    return ɵɵelementContainer;\n}\nlet _locateOrCreateElementContainerNode = (tView, lView, tNode, index) => {\n    lastNodeWasCreated(true);\n    return createCommentNode(lView[RENDERER], ngDevMode ? 'ng-container' : '');\n};\n/**\n * Enables hydration code path (to lookup existing elements in DOM)\n * in addition to the regular creation mode of comment nodes that\n * represent <ng-container>'s anchor.\n */\nfunction locateOrCreateElementContainerNode(tView, lView, tNode, index) {\n    let comment;\n    const hydrationInfo = lView[HYDRATION];\n    const isNodeCreationMode = !hydrationInfo ||\n        isInSkipHydrationBlock$1() ||\n        isDisconnectedNode$1(hydrationInfo, index) ||\n        isDetachedByI18n(tNode);\n    lastNodeWasCreated(isNodeCreationMode);\n    // Regular creation mode.\n    if (isNodeCreationMode) {\n        return createCommentNode(lView[RENDERER], ngDevMode ? 'ng-container' : '');\n    }\n    // Hydration mode, looking up existing elements in DOM.\n    const currentRNode = locateNextRNode(hydrationInfo, tView, lView, tNode);\n    ngDevMode && validateNodeExists(currentRNode, lView, tNode);\n    const ngContainerSize = getNgContainerSize(hydrationInfo, index);\n    ngDevMode &&\n        assertNumber(ngContainerSize, 'Unexpected state: hydrating an <ng-container>, ' + 'but no hydration info is available.');\n    setSegmentHead(hydrationInfo, index, currentRNode);\n    comment = siblingAfter(ngContainerSize, currentRNode);\n    if (ngDevMode) {\n        validateMatchingNode(comment, Node.COMMENT_NODE, null, lView, tNode);\n        markRNodeAsClaimedByHydration(comment);\n    }\n    return comment;\n}\nfunction enableLocateOrCreateElementContainerNodeImpl() {\n    _locateOrCreateElementContainerNode = locateOrCreateElementContainerNode;\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 * 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    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const 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 ɵɵsyntheticHostProperty(propName, value, sanitizer) {\n    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        const currentDef = getCurrentDirectiveDef(tView.data);\n        const 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 ɵɵsyntheticHostProperty;\n}\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// THIS CODE IS GENERATED - DO NOT MODIFY.\nconst u = undefined;\nfunction plural(val) {\n    const n = val, i = Math.floor(Math.abs(val)), v = val.toString().replace(/^[^.]*\\.?/, '').length;\n    if (i === 1 && v === 0)\n        return 1;\n    return 5;\n}\nvar localeEn = [\"en\", [[\"a\", \"p\"], [\"AM\", \"PM\"], u], [[\"AM\", \"PM\"], u, u], [[\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"], [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"], [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"], [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"]], u, [[\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"], [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"], [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]], u, [[\"B\", \"A\"], [\"BC\", \"AD\"], [\"Before Christ\", \"Anno Domini\"]], 0, [6, 0], [\"M/d/yy\", \"MMM d, y\", \"MMMM d, y\", \"EEEE, MMMM d, y\"], [\"h:mm a\", \"h:mm:ss a\", \"h:mm:ss a z\", \"h:mm:ss a zzzz\"], [\"{1}, {0}\", u, \"{1} 'at' {0}\", u], [\".\", \",\", \";\", \"%\", \"+\", \"-\", \"E\", \"×\", \"‰\", \"∞\", \"NaN\", \":\"], [\"#,##0.###\", \"#,##0%\", \"¤#,##0.00\", \"#E0\"], \"USD\", \"$\", \"US Dollar\", {}, \"ltr\", plural];\n\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\nlet LOCALE_DATA = {};\n/**\n * Register locale data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n/format-data-locale) to know how to import additional locale\n * 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    const normalizedLocale = normalizeLocale(locale);\n    let match = getLocaleData(normalizedLocale);\n    if (match) {\n        return match;\n    }\n    // let's try to find a parent locale\n    const 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 RuntimeError(701 /* RuntimeErrorCode.MISSING_LOCALE_DATA */, ngDevMode && `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    const 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 {@link NgPlural}\n * @see [Internationalization (i18n) Guide](guide/i18n)\n */\nfunction getLocalePluralCase(locale) {\n    const 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] =\n            _global.ng &&\n                _global.ng.common &&\n                _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\nconst pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n/**\n * Returns the plural case based on the locale\n */\nfunction getPluralCase(value, locale) {\n    const plural = getLocalePluralCase(locale)(parseInt(value, 10));\n    const 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 */\nconst 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 */\nconst USD_CURRENCY_CODE = 'USD';\n\n/**\n * Marks that the next string is an element name.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nconst ELEMENT_MARKER = {\n    marker: 'element',\n};\n/**\n * Marks that the next string is comment text need for ICU.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nconst ICU_MARKER = {\n    marker: 'ICU',\n};\n/**\n * See `I18nCreateOpCodes`\n */\nvar I18nCreateOpCode;\n(function (I18nCreateOpCode) {\n    /**\n     * Number of bits to shift index so that it can be combined with the `APPEND_EAGERLY` and\n     * `COMMENT`.\n     */\n    I18nCreateOpCode[I18nCreateOpCode[\"SHIFT\"] = 2] = \"SHIFT\";\n    /**\n     * Should the node be appended to parent immediately after creation.\n     */\n    I18nCreateOpCode[I18nCreateOpCode[\"APPEND_EAGERLY\"] = 1] = \"APPEND_EAGERLY\";\n    /**\n     * If set the node should be comment (rather than a text) node.\n     */\n    I18nCreateOpCode[I18nCreateOpCode[\"COMMENT\"] = 2] = \"COMMENT\";\n})(I18nCreateOpCode || (I18nCreateOpCode = {}));\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 */\nlet LOCALE_ID$1 = 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    ngDevMode && assertDefined(localeId, `Expected localeId to be defined`);\n    if (typeof localeId === 'string') {\n        LOCALE_ID$1 = 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$1;\n}\n\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * This is used to efficiently update expressions in i18n only when the corresponding input has\n * changed.\n *\n * 1) Each bit represents which of the `ɵɵi18nExp` has changed.\n * 2) There are 32 bits allowed in JS.\n * 3) Bit 32 is special as it is shared for all changes past 32. (In other words if you have more\n * than 32 `ɵɵi18nExp` then all changes past 32nd `ɵɵi18nExp` will be mapped to same bit. This means\n * that we may end up changing more than we need to. But i18n expressions with 32 bindings is rare\n * so in practice it should not be an issue.)\n */\nlet changeMask = 0b0;\n/**\n * Keeps track of which bit needs to be updated in `changeMask`\n *\n * This value gets incremented on every call to `ɵɵi18nExp`\n */\nlet changeMaskCounter = 0;\n/**\n * Keep track of which input bindings in `ɵɵi18nExp` have changed.\n *\n * `setMaskBit` gets invoked by each call to `ɵɵi18nExp`.\n *\n * @param hasChange did `ɵɵi18nExp` detect a change.\n */\nfunction setMaskBit(hasChange) {\n    if (hasChange) {\n        changeMask = changeMask | (1 << Math.min(changeMaskCounter, 31));\n    }\n    changeMaskCounter++;\n}\nfunction applyI18n(tView, lView, index) {\n    if (changeMaskCounter > 0) {\n        ngDevMode && assertDefined(tView, `tView should be defined`);\n        const tI18n = tView.data[index];\n        // When `index` points to an `ɵɵi18nAttributes` then we have an array otherwise `TI18n`\n        const updateOpCodes = Array.isArray(tI18n)\n            ? tI18n\n            : tI18n.update;\n        const bindingsStartIndex = getBindingIndex() - changeMaskCounter - 1;\n        applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask);\n    }\n    // Reset changeMask & maskBit to default for the next update cycle\n    changeMask = 0b0;\n    changeMaskCounter = 0;\n}\nfunction createNodeWithoutHydration(lView, textOrName, nodeType) {\n    const renderer = lView[RENDERER];\n    switch (nodeType) {\n        case Node.COMMENT_NODE:\n            return createCommentNode(renderer, textOrName);\n        case Node.TEXT_NODE:\n            return createTextNode(renderer, textOrName);\n        case Node.ELEMENT_NODE:\n            return createElementNode(renderer, textOrName, null);\n    }\n}\nlet _locateOrCreateNode = (lView, index, textOrName, nodeType) => {\n    lastNodeWasCreated(true);\n    return createNodeWithoutHydration(lView, textOrName, nodeType);\n};\nfunction locateOrCreateNodeImpl(lView, index, textOrName, nodeType) {\n    const hydrationInfo = lView[HYDRATION];\n    const noOffsetIndex = index - HEADER_OFFSET;\n    const isNodeCreationMode = !isI18nHydrationSupportEnabled() ||\n        !hydrationInfo ||\n        isInSkipHydrationBlock$1() ||\n        isDisconnectedNode$1(hydrationInfo, noOffsetIndex);\n    lastNodeWasCreated(isNodeCreationMode);\n    if (isNodeCreationMode) {\n        return createNodeWithoutHydration(lView, textOrName, nodeType);\n    }\n    const native = locateI18nRNodeByIndex(hydrationInfo, noOffsetIndex);\n    // TODO: Improve error handling\n    //\n    // Other hydration paths use validateMatchingNode() in order to provide\n    // detailed information in development mode about the expected DOM.\n    // However, not every node in an i18n block has a TNode. Instead, we\n    // need to be able to use the AST to generate a similar message.\n    ngDevMode && assertDefined(native, 'expected native element');\n    ngDevMode && assertEqual(native.nodeType, nodeType, 'expected matching nodeType');\n    ngDevMode &&\n        nodeType === Node.ELEMENT_NODE &&\n        assertEqual(native.tagName.toLowerCase(), textOrName.toLowerCase(), 'expecting matching tagName');\n    ngDevMode && markRNodeAsClaimedByHydration(native);\n    return native;\n}\nfunction enableLocateOrCreateI18nNodeImpl() {\n    _locateOrCreateNode = locateOrCreateNodeImpl;\n}\n/**\n * Apply `I18nCreateOpCodes` op-codes as stored in `TI18n.create`.\n *\n * Creates text (and comment) nodes which are internationalized.\n *\n * @param lView Current lView\n * @param createOpCodes Set of op-codes to apply\n * @param parentRNode Parent node (so that direct children can be added eagerly) or `null` if it is\n *     a root node.\n * @param insertInFrontOf DOM node that should be used as an anchor.\n */\nfunction applyCreateOpCodes(lView, createOpCodes, parentRNode, insertInFrontOf) {\n    const renderer = lView[RENDERER];\n    for (let i = 0; i < createOpCodes.length; i++) {\n        const opCode = createOpCodes[i++];\n        const text = createOpCodes[i];\n        const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n        const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n        const index = opCode >>> I18nCreateOpCode.SHIFT;\n        let rNode = lView[index];\n        let lastNodeWasCreated = false;\n        if (rNode === null) {\n            // We only create new DOM nodes if they don't already exist: If ICU switches case back to a\n            // case which was already instantiated, no need to create new DOM nodes.\n            rNode = lView[index] = _locateOrCreateNode(lView, index, text, isComment ? Node.COMMENT_NODE : Node.TEXT_NODE);\n            lastNodeWasCreated = wasLastNodeCreated();\n        }\n        if (appendNow && parentRNode !== null && lastNodeWasCreated) {\n            nativeInsertBefore(renderer, parentRNode, rNode, insertInFrontOf, false);\n        }\n    }\n}\n/**\n * Apply `I18nMutateOpCodes` OpCodes.\n *\n * @param tView Current `TView`\n * @param mutableOpCodes Mutable OpCodes to process\n * @param lView Current `LView`\n * @param anchorRNode place where the i18n node should be inserted.\n */\nfunction applyMutableOpCodes(tView, mutableOpCodes, lView, anchorRNode) {\n    ngDevMode && assertDomNode(anchorRNode);\n    const renderer = lView[RENDERER];\n    // `rootIdx` represents the node into which all inserts happen.\n    let rootIdx = null;\n    // `rootRNode` represents the real node into which we insert. This can be different from\n    // `lView[rootIdx]` if we have projection.\n    //  - null we don't have a parent (as can be the case in when we are inserting into a root of\n    //    LView which has no parent.)\n    //  - `RElement` The element representing the root after taking projection into account.\n    let rootRNode;\n    for (let i = 0; i < mutableOpCodes.length; i++) {\n        const opCode = mutableOpCodes[i];\n        if (typeof opCode == 'string') {\n            const textNodeIndex = mutableOpCodes[++i];\n            if (lView[textNodeIndex] === null) {\n                ngDevMode && ngDevMode.rendererCreateTextNode++;\n                ngDevMode && assertIndexInRange(lView, textNodeIndex);\n                lView[textNodeIndex] = _locateOrCreateNode(lView, textNodeIndex, opCode, Node.TEXT_NODE);\n            }\n        }\n        else if (typeof opCode == 'number') {\n            switch (opCode & 1 /* IcuCreateOpCode.MASK_INSTRUCTION */) {\n                case 0 /* IcuCreateOpCode.AppendChild */:\n                    const parentIdx = getParentFromIcuCreateOpCode(opCode);\n                    if (rootIdx === null) {\n                        // The first operation should save the `rootIdx` because the first operation\n                        // must insert into the root. (Only subsequent operations can insert into a dynamic\n                        // parent)\n                        rootIdx = parentIdx;\n                        rootRNode = nativeParentNode(renderer, anchorRNode);\n                    }\n                    let insertInFrontOf;\n                    let parentRNode;\n                    if (parentIdx === rootIdx) {\n                        insertInFrontOf = anchorRNode;\n                        parentRNode = rootRNode;\n                    }\n                    else {\n                        insertInFrontOf = null;\n                        parentRNode = unwrapRNode(lView[parentIdx]);\n                    }\n                    // FIXME(misko): Refactor with `processI18nText`\n                    if (parentRNode !== null) {\n                        // This can happen if the `LView` we are adding to is not attached to a parent `LView`.\n                        // In such a case there is no \"root\" we can attach to. This is fine, as we still need to\n                        // create the elements. When the `LView` gets later added to a parent these \"root\" nodes\n                        // get picked up and added.\n                        ngDevMode && assertDomNode(parentRNode);\n                        const refIdx = getRefFromIcuCreateOpCode(opCode);\n                        ngDevMode && assertGreaterThan(refIdx, HEADER_OFFSET, 'Missing ref');\n                        // `unwrapRNode` is not needed here as all of these point to RNodes as part of the i18n\n                        // which can't have components.\n                        const child = lView[refIdx];\n                        ngDevMode && assertDomNode(child);\n                        nativeInsertBefore(renderer, parentRNode, child, insertInFrontOf, false);\n                        const tIcu = getTIcu(tView, refIdx);\n                        if (tIcu !== null && typeof tIcu === 'object') {\n                            // If we just added a comment node which has ICU then that ICU may have already been\n                            // rendered and therefore we need to re-add it here.\n                            ngDevMode && assertTIcu(tIcu);\n                            const caseIndex = getCurrentICUCaseIndex(tIcu, lView);\n                            if (caseIndex !== null) {\n                                applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, lView[tIcu.anchorIdx]);\n                            }\n                        }\n                    }\n                    break;\n                case 1 /* IcuCreateOpCode.Attr */:\n                    const elementNodeIndex = opCode >>> 1 /* IcuCreateOpCode.SHIFT_REF */;\n                    const attrName = mutableOpCodes[++i];\n                    const attrValue = mutableOpCodes[++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                    setElementAttribute(renderer, getNativeByIndex(elementNodeIndex, lView), null, null, attrName, attrValue, null);\n                    break;\n                default:\n                    if (ngDevMode) {\n                        throw new RuntimeError(700 /* RuntimeErrorCode.INVALID_I18N_STRUCTURE */, `Unable to determine the type of mutate operation for \"${opCode}\"`);\n                    }\n            }\n        }\n        else {\n            switch (opCode) {\n                case ICU_MARKER:\n                    const commentValue = mutableOpCodes[++i];\n                    const commentNodeIndex = mutableOpCodes[++i];\n                    if (lView[commentNodeIndex] === null) {\n                        ngDevMode &&\n                            assertEqual(typeof commentValue, 'string', `Expected \"${commentValue}\" to be a comment node value`);\n                        ngDevMode && ngDevMode.rendererCreateComment++;\n                        ngDevMode && assertIndexInExpandoRange(lView, commentNodeIndex);\n                        const commentRNode = (lView[commentNodeIndex] = _locateOrCreateNode(lView, commentNodeIndex, commentValue, Node.COMMENT_NODE));\n                        // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n                        attachPatchData(commentRNode, lView);\n                    }\n                    break;\n                case ELEMENT_MARKER:\n                    const tagName = mutableOpCodes[++i];\n                    const elementNodeIndex = mutableOpCodes[++i];\n                    if (lView[elementNodeIndex] === null) {\n                        ngDevMode &&\n                            assertEqual(typeof tagName, 'string', `Expected \"${tagName}\" to be an element node tag name`);\n                        ngDevMode && ngDevMode.rendererCreateElement++;\n                        ngDevMode && assertIndexInExpandoRange(lView, elementNodeIndex);\n                        const elementRNode = (lView[elementNodeIndex] = _locateOrCreateNode(lView, elementNodeIndex, tagName, Node.ELEMENT_NODE));\n                        // FIXME(misko): Attaching patch data is only needed for the root (Also add tests)\n                        attachPatchData(elementRNode, lView);\n                    }\n                    break;\n                default:\n                    ngDevMode &&\n                        throwError(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n            }\n        }\n    }\n}\n/**\n * Apply `I18nUpdateOpCodes` OpCodes\n *\n * @param tView Current `TView`\n * @param lView Current `LView`\n * @param updateOpCodes OpCodes to process\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from\n *     `bindingsStartIndex`)\n */\nfunction applyUpdateOpCodes(tView, lView, updateOpCodes, bindingsStartIndex, changeMask) {\n    for (let i = 0; i < updateOpCodes.length; i++) {\n        // bit code to check if we should apply the next update\n        const checkBit = updateOpCodes[i];\n        // Number of opCodes to skip until next set of update codes\n        const skipCodes = updateOpCodes[++i];\n        if (checkBit & changeMask) {\n            // The value has been updated since last checked\n            let value = '';\n            for (let j = i + 1; j <= i + skipCodes; j++) {\n                const opCode = updateOpCodes[j];\n                if (typeof opCode == 'string') {\n                    value += opCode;\n                }\n                else if (typeof opCode == 'number') {\n                    if (opCode < 0) {\n                        // Negative opCode represent `i18nExp` values offset.\n                        value += renderStringify(lView[bindingsStartIndex - opCode]);\n                    }\n                    else {\n                        const nodeIndex = opCode >>> 2 /* I18nUpdateOpCode.SHIFT_REF */;\n                        switch (opCode & 3 /* I18nUpdateOpCode.MASK_OPCODE */) {\n                            case 1 /* I18nUpdateOpCode.Attr */:\n                                const propName = updateOpCodes[++j];\n                                const sanitizeFn = updateOpCodes[++j];\n                                const tNodeOrTagName = tView.data[nodeIndex];\n                                ngDevMode && assertDefined(tNodeOrTagName, 'Experting TNode or string');\n                                if (typeof tNodeOrTagName === 'string') {\n                                    // IF we don't have a `TNode`, then we are an element in ICU (as ICU content does\n                                    // not have TNode), in which case we know that there are no directives, and hence\n                                    // we use attribute setting.\n                                    setElementAttribute(lView[RENDERER], lView[nodeIndex], null, tNodeOrTagName, propName, value, sanitizeFn);\n                                }\n                                else {\n                                    elementPropertyInternal(tView, tNodeOrTagName, lView, propName, value, lView[RENDERER], sanitizeFn, false);\n                                }\n                                break;\n                            case 0 /* I18nUpdateOpCode.Text */:\n                                const rText = lView[nodeIndex];\n                                rText !== null && updateTextNode(lView[RENDERER], rText, value);\n                                break;\n                            case 2 /* I18nUpdateOpCode.IcuSwitch */:\n                                applyIcuSwitchCase(tView, getTIcu(tView, nodeIndex), lView, value);\n                                break;\n                            case 3 /* I18nUpdateOpCode.IcuUpdate */:\n                                applyIcuUpdateCase(tView, getTIcu(tView, nodeIndex), bindingsStartIndex, lView);\n                                break;\n                        }\n                    }\n                }\n            }\n        }\n        else {\n            const opCode = updateOpCodes[i + 1];\n            if (opCode > 0 && (opCode & 3 /* I18nUpdateOpCode.MASK_OPCODE */) === 3 /* I18nUpdateOpCode.IcuUpdate */) {\n                // Special case for the `icuUpdateCase`. It could be that the mask did not match, but\n                // we still need to execute `icuUpdateCase` because the case has changed recently due to\n                // previous `icuSwitchCase` instruction. (`icuSwitchCase` and `icuUpdateCase` always come in\n                // pairs.)\n                const nodeIndex = opCode >>> 2 /* I18nUpdateOpCode.SHIFT_REF */;\n                const tIcu = getTIcu(tView, nodeIndex);\n                const currentIndex = lView[tIcu.currentCaseLViewIndex];\n                if (currentIndex < 0) {\n                    applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView);\n                }\n            }\n        }\n        i += skipCodes;\n    }\n}\n/**\n * Apply OpCodes associated with updating an existing ICU.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param lView Current `LView`\n */\nfunction applyIcuUpdateCase(tView, tIcu, bindingsStartIndex, lView) {\n    ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);\n    let activeCaseIndex = lView[tIcu.currentCaseLViewIndex];\n    if (activeCaseIndex !== null) {\n        let mask = changeMask;\n        if (activeCaseIndex < 0) {\n            // Clear the flag.\n            // Negative number means that the ICU was freshly created and we need to force the update.\n            activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex;\n            // -1 is same as all bits on, which simulates creation since it marks all bits dirty\n            mask = -1;\n        }\n        applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);\n    }\n}\n/**\n * Apply OpCodes associated with switching a case on ICU.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n * @param value Value of the case to update to.\n */\nfunction applyIcuSwitchCase(tView, tIcu, lView, value) {\n    // Rebuild a new case for this ICU\n    const caseIndex = getCaseIndex(tIcu, value);\n    let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n    if (activeCaseIndex !== caseIndex) {\n        applyIcuSwitchCaseRemove(tView, tIcu, lView);\n        lView[tIcu.currentCaseLViewIndex] = caseIndex === null ? null : ~caseIndex;\n        if (caseIndex !== null) {\n            // Add the nodes for the new case\n            const anchorRNode = lView[tIcu.anchorIdx];\n            if (anchorRNode) {\n                ngDevMode && assertDomNode(anchorRNode);\n                applyMutableOpCodes(tView, tIcu.create[caseIndex], lView, anchorRNode);\n            }\n            claimDehydratedIcuCase(lView, tIcu.anchorIdx, caseIndex);\n        }\n    }\n}\n/**\n * Apply OpCodes associated with tearing ICU case.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcu Current `TIcu`\n * @param lView Current `LView`\n */\nfunction applyIcuSwitchCaseRemove(tView, tIcu, lView) {\n    let activeCaseIndex = getCurrentICUCaseIndex(tIcu, lView);\n    if (activeCaseIndex !== null) {\n        const removeCodes = tIcu.remove[activeCaseIndex];\n        for (let i = 0; i < removeCodes.length; i++) {\n            const nodeOrIcuIndex = removeCodes[i];\n            if (nodeOrIcuIndex > 0) {\n                // Positive numbers are `RNode`s.\n                const rNode = getNativeByIndex(nodeOrIcuIndex, lView);\n                rNode !== null && nativeRemoveNode(lView[RENDERER], rNode);\n            }\n            else {\n                // Negative numbers are ICUs\n                applyIcuSwitchCaseRemove(tView, getTIcu(tView, ~nodeOrIcuIndex), lView);\n            }\n        }\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    let index = icuExpression.cases.indexOf(bindingValue);\n    if (index === -1) {\n        switch (icuExpression.type) {\n            case 1 /* IcuType.plural */: {\n                const 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 /* IcuType.select */: {\n                index = icuExpression.cases.indexOf('other');\n                break;\n            }\n        }\n    }\n    return index === -1 ? null : index;\n}\n\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nfunction i18nCreateOpCodesToString(opcodes) {\n    const createOpCodes = opcodes || (Array.isArray(this) ? this : []);\n    let lines = [];\n    for (let i = 0; i < createOpCodes.length; i++) {\n        const opCode = createOpCodes[i++];\n        const text = createOpCodes[i];\n        const isComment = (opCode & I18nCreateOpCode.COMMENT) === I18nCreateOpCode.COMMENT;\n        const appendNow = (opCode & I18nCreateOpCode.APPEND_EAGERLY) === I18nCreateOpCode.APPEND_EAGERLY;\n        const index = opCode >>> I18nCreateOpCode.SHIFT;\n        lines.push(`lView[${index}] = document.${isComment ? 'createComment' : 'createText'}(${JSON.stringify(text)});`);\n        if (appendNow) {\n            lines.push(`parent.appendChild(lView[${index}]);`);\n        }\n    }\n    return lines;\n}\n/**\n * Converts `I18nUpdateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nUpdateOpCodes` if attached as a method.\n * @param opcodes `I18nUpdateOpCodes` if invoked as a function.\n */\nfunction i18nUpdateOpCodesToString(opcodes) {\n    const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n    let lines = [];\n    function consumeOpCode(value) {\n        const ref = value >>> 2 /* I18nUpdateOpCode.SHIFT_REF */;\n        const opCode = value & 3 /* I18nUpdateOpCode.MASK_OPCODE */;\n        switch (opCode) {\n            case 0 /* I18nUpdateOpCode.Text */:\n                return `(lView[${ref}] as Text).textContent = $$$`;\n            case 1 /* I18nUpdateOpCode.Attr */:\n                const attrName = parser.consumeString();\n                const sanitizationFn = parser.consumeFunction();\n                const value = sanitizationFn ? `(${sanitizationFn})($$$)` : '$$$';\n                return `(lView[${ref}] as Element).setAttribute('${attrName}', ${value})`;\n            case 2 /* I18nUpdateOpCode.IcuSwitch */:\n                return `icuSwitchCase(${ref}, $$$)`;\n            case 3 /* I18nUpdateOpCode.IcuUpdate */:\n                return `icuUpdateCase(${ref})`;\n        }\n        throw new Error('unexpected OpCode');\n    }\n    while (parser.hasMore()) {\n        let mask = parser.consumeNumber();\n        let size = parser.consumeNumber();\n        const end = parser.i + size;\n        const statements = [];\n        let statement = '';\n        while (parser.i < end) {\n            let value = parser.consumeNumberOrString();\n            if (typeof value === 'string') {\n                statement += value;\n            }\n            else if (value < 0) {\n                // Negative numbers are ref indexes\n                // Here `i` refers to current binding index. It is to signify that the value is relative,\n                // rather than absolute.\n                statement += '${lView[i' + value + ']}';\n            }\n            else {\n                // Positive numbers are operations.\n                const opCodeText = consumeOpCode(value);\n                statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';');\n                statement = '';\n            }\n        }\n        lines.push(`if (mask & 0b${mask.toString(2)}) { ${statements.join(' ')} }`);\n    }\n    return lines;\n}\n/**\n * Converts `I18nCreateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nCreateOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nCreateOpCodes` if attached as a method.\n * @param opcodes `I18nCreateOpCodes` if invoked as a function.\n */\nfunction icuCreateOpCodesToString(opcodes) {\n    const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n    let lines = [];\n    function consumeOpCode(opCode) {\n        const parent = getParentFromIcuCreateOpCode(opCode);\n        const ref = getRefFromIcuCreateOpCode(opCode);\n        switch (getInstructionFromIcuCreateOpCode(opCode)) {\n            case 0 /* IcuCreateOpCode.AppendChild */:\n                return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`;\n            case 1 /* IcuCreateOpCode.Attr */:\n                return `(lView[${ref}] as Element).setAttribute(\"${parser.consumeString()}\", \"${parser.consumeString()}\")`;\n        }\n        throw new Error('Unexpected OpCode: ' + getInstructionFromIcuCreateOpCode(opCode));\n    }\n    let lastRef = -1;\n    while (parser.hasMore()) {\n        let value = parser.consumeNumberStringOrMarker();\n        if (value === ICU_MARKER) {\n            const text = parser.consumeString();\n            lastRef = parser.consumeNumber();\n            lines.push(`lView[${lastRef}] = document.createComment(\"${text}\")`);\n        }\n        else if (value === ELEMENT_MARKER) {\n            const text = parser.consumeString();\n            lastRef = parser.consumeNumber();\n            lines.push(`lView[${lastRef}] = document.createElement(\"${text}\")`);\n        }\n        else if (typeof value === 'string') {\n            lastRef = parser.consumeNumber();\n            lines.push(`lView[${lastRef}] = document.createTextNode(\"${value}\")`);\n        }\n        else if (typeof value === 'number') {\n            const line = consumeOpCode(value);\n            line && lines.push(line);\n        }\n        else {\n            throw new Error('Unexpected value');\n        }\n    }\n    return lines;\n}\n/**\n * Converts `I18nRemoveOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nRemoveOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nRemoveOpCodes` if attached as a method.\n * @param opcodes `I18nRemoveOpCodes` if invoked as a function.\n */\nfunction i18nRemoveOpCodesToString(opcodes) {\n    const removeCodes = opcodes || (Array.isArray(this) ? this : []);\n    let lines = [];\n    for (let i = 0; i < removeCodes.length; i++) {\n        const nodeOrIcuIndex = removeCodes[i];\n        if (nodeOrIcuIndex > 0) {\n            // Positive numbers are `RNode`s.\n            lines.push(`remove(lView[${nodeOrIcuIndex}])`);\n        }\n        else {\n            // Negative numbers are ICUs\n            lines.push(`removeNestedICU(${~nodeOrIcuIndex})`);\n        }\n    }\n    return lines;\n}\nclass OpCodeParser {\n    i = 0;\n    codes;\n    constructor(codes) {\n        this.codes = codes;\n    }\n    hasMore() {\n        return this.i < this.codes.length;\n    }\n    consumeNumber() {\n        let value = this.codes[this.i++];\n        assertNumber(value, 'expecting number in OpCode');\n        return value;\n    }\n    consumeString() {\n        let value = this.codes[this.i++];\n        assertString(value, 'expecting string in OpCode');\n        return value;\n    }\n    consumeFunction() {\n        let value = this.codes[this.i++];\n        if (value === null || typeof value === 'function') {\n            return value;\n        }\n        throw new Error('expecting function in OpCode');\n    }\n    consumeNumberOrString() {\n        let value = this.codes[this.i++];\n        if (typeof value === 'string') {\n            return value;\n        }\n        assertNumber(value, 'expecting number or string in OpCode');\n        return value;\n    }\n    consumeNumberStringOrMarker() {\n        let value = this.codes[this.i++];\n        if (typeof value === 'string' ||\n            typeof value === 'number' ||\n            value == ICU_MARKER ||\n            value == ELEMENT_MARKER) {\n            return value;\n        }\n        assertNumber(value, 'expecting number, string, ICU_MARKER or ELEMENT_MARKER in OpCode');\n        return value;\n    }\n}\n\nconst BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nconst ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nconst NESTED_ICU = /�(\\d+)�/;\nconst ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\nconst MARKER = `�`;\nconst SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nconst PH_REGEXP = /�(\\/?[#*]\\d+):?\\d*�/gi;\n/**\n * Angular uses the special entity &ngsp; as a placeholder for non-removable space.\n * It's replaced by the 0xE500 PUA (Private Use Areas) unicode character and later on replaced by a\n * space.\n * We are re-implementing the same idea since translations might contain this special character.\n */\nconst NGSP_UNICODE_REGEXP = /\\uE500/g;\nfunction replaceNgsp(value) {\n    return value.replace(NGSP_UNICODE_REGEXP, ' ');\n}\n/**\n * Patch a `debug` property getter on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debugGetter Getter returning a value to patch\n */\nfunction attachDebugGetter(obj, debugGetter) {\n    if (ngDevMode) {\n        Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });\n    }\n    else {\n        throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\n    }\n}\n/**\n * Create dynamic nodes from i18n translation block.\n *\n * - Text nodes are created synchronously\n * - TNodes are linked into tree lazily\n *\n * @param tView Current `TView`\n * @parentTNodeIndex index to the parent TNode of this i18n block\n * @param lView Current `LView`\n * @param index Index of `ɵɵi18nStart` instruction.\n * @param message Message to translate.\n * @param subTemplateIndex Index into the sub template of message translation. (ie in case of\n *     `ngIf`) (-1 otherwise)\n */\nfunction i18nStartFirstCreatePass(tView, parentTNodeIndex, lView, index, message, subTemplateIndex) {\n    const rootTNode = getCurrentParentTNode();\n    const createOpCodes = [];\n    const updateOpCodes = [];\n    const existingTNodeStack = [[]];\n    const astStack = [[]];\n    if (ngDevMode) {\n        attachDebugGetter(createOpCodes, i18nCreateOpCodesToString);\n        attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n    }\n    message = getTranslationForTemplate(message, subTemplateIndex);\n    const msgParts = replaceNgsp(message).split(PH_REGEXP);\n    for (let i = 0; i < msgParts.length; i++) {\n        let value = msgParts[i];\n        if ((i & 1) === 0) {\n            // Even indexes are text (including bindings & ICU expressions)\n            const parts = i18nParseTextIntoPartsAndICU(value);\n            for (let j = 0; j < parts.length; j++) {\n                let part = parts[j];\n                if ((j & 1) === 0) {\n                    // `j` is odd therefore `part` is string\n                    const text = part;\n                    ngDevMode && assertString(text, 'Parsed ICU part should be string');\n                    if (text !== '') {\n                        i18nStartFirstCreatePassProcessTextNode(astStack[0], tView, rootTNode, existingTNodeStack[0], createOpCodes, updateOpCodes, lView, text);\n                    }\n                }\n                else {\n                    // `j` is Even therefor `part` is an `ICUExpression`\n                    const icuExpression = part;\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                    // Note: we intentionally retain the error here by not using `ngDevMode`, because\n                    // the value can change based on the locale and users aren't guaranteed to hit\n                    // an invalid string while they're developing.\n                    if (typeof icuExpression !== 'object') {\n                        throw new Error(`Unable to parse ICU expression in \"${message}\" message.`);\n                    }\n                    const icuContainerTNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodeStack[0], lView, createOpCodes, ngDevMode ? `ICU ${index}:${icuExpression.mainBinding}` : '', true);\n                    const icuNodeIndex = icuContainerTNode.index;\n                    ngDevMode &&\n                        assertGreaterThanOrEqual(icuNodeIndex, HEADER_OFFSET, 'Index must be in absolute LView offset');\n                    icuStart(astStack[0], tView, lView, updateOpCodes, parentTNodeIndex, icuExpression, icuNodeIndex);\n                }\n            }\n        }\n        else {\n            // Odd indexes are placeholders (elements and sub-templates)\n            // At this point value is something like: '/#1:2' (originally coming from '�/#1:2�')\n            const isClosing = value.charCodeAt(0) === 47 /* CharCode.SLASH */;\n            const type = value.charCodeAt(isClosing ? 1 : 0);\n            ngDevMode && assertOneOf(type, 42 /* CharCode.STAR */, 35 /* CharCode.HASH */);\n            const index = HEADER_OFFSET + Number.parseInt(value.substring(isClosing ? 2 : 1));\n            if (isClosing) {\n                existingTNodeStack.shift();\n                astStack.shift();\n                setCurrentTNode(getCurrentParentTNode(), false);\n            }\n            else {\n                const tNode = createTNodePlaceholder(tView, existingTNodeStack[0], index);\n                existingTNodeStack.unshift([]);\n                setCurrentTNode(tNode, true);\n                const placeholderNode = {\n                    kind: 2 /* I18nNodeKind.PLACEHOLDER */,\n                    index,\n                    children: [],\n                    type: type === 35 /* CharCode.HASH */ ? 0 /* I18nPlaceholderType.ELEMENT */ : 1 /* I18nPlaceholderType.SUBTEMPLATE */,\n                };\n                astStack[0].push(placeholderNode);\n                astStack.unshift(placeholderNode.children);\n            }\n        }\n    }\n    tView.data[index] = {\n        create: createOpCodes,\n        update: updateOpCodes,\n        ast: astStack[0],\n        parentTNodeIndex,\n    };\n}\n/**\n * Allocate space in i18n Range add create OpCode instruction to create a text or comment node.\n *\n * @param tView Current `TView` needed to allocate space in i18n range.\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will be\n *     added as part of the `i18nStart` instruction or as part of the `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param lView Current `LView` needed to allocate space in i18n range.\n * @param createOpCodes Array storing `I18nCreateOpCodes` where new opCodes will be added.\n * @param text Text to be added when the `Text` or `Comment` node will be created.\n * @param isICU true if a `Comment` node for ICU (instead of `Text`) node should be created.\n */\nfunction createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, text, isICU) {\n    const i18nNodeIdx = allocExpando(tView, lView, 1, null);\n    let opCode = i18nNodeIdx << I18nCreateOpCode.SHIFT;\n    let parentTNode = getCurrentParentTNode();\n    if (rootTNode === parentTNode) {\n        // FIXME(misko): A null `parentTNode` should represent when we fall of the `LView` boundary.\n        // (there is no parent), but in some circumstances (because we are inconsistent about how we set\n        // `previousOrParentTNode`) it could point to `rootTNode` So this is a work around.\n        parentTNode = null;\n    }\n    if (parentTNode === null) {\n        // If we don't have a parent that means that we can eagerly add nodes.\n        // If we have a parent than these nodes can't be added now (as the parent has not been created\n        // yet) and instead the `parentTNode` is responsible for adding it. See\n        // `TNode.insertBeforeIndex`\n        opCode |= I18nCreateOpCode.APPEND_EAGERLY;\n    }\n    if (isICU) {\n        opCode |= I18nCreateOpCode.COMMENT;\n        ensureIcuContainerVisitorLoaded(loadIcuContainerVisitor);\n    }\n    createOpCodes.push(opCode, text === null ? '' : text);\n    // We store `{{?}}` so that when looking at debug `TNodeType.template` we can see where the\n    // bindings are.\n    const tNode = createTNodeAtIndex(tView, i18nNodeIdx, isICU ? 32 /* TNodeType.Icu */ : 1 /* TNodeType.Text */, text === null ? (ngDevMode ? '{{?}}' : '') : text, null);\n    addTNodeAndUpdateInsertBeforeIndex(existingTNodes, tNode);\n    const tNodeIdx = tNode.index;\n    setCurrentTNode(tNode, false /* Text nodes are self closing */);\n    if (parentTNode !== null && rootTNode !== parentTNode) {\n        // We are a child of deeper node (rather than a direct child of `i18nStart` instruction.)\n        // We have to make sure to add ourselves to the parent.\n        setTNodeInsertBeforeIndex(parentTNode, tNodeIdx);\n    }\n    return tNode;\n}\n/**\n * Processes text node in i18n block.\n *\n * Text nodes can have:\n * - Create instruction in `createOpCodes` for creating the text node.\n * - Allocate spec for text node in i18n range of `LView`\n * - If contains binding:\n *    - bindings => allocate space in i18n range of `LView` to store the binding value.\n *    - populate `updateOpCodes` with update instructions.\n *\n * @param tView Current `TView`\n * @param rootTNode Root `TNode` of the i18n block. This node determines if the new TNode will\n *     be added as part of the `i18nStart` instruction or as part of the\n *     `TNode.insertBeforeIndex`.\n * @param existingTNodes internal state for `addTNodeAndUpdateInsertBeforeIndex`.\n * @param createOpCodes Location where the creation OpCodes will be stored.\n * @param lView Current `LView`\n * @param text The translated text (which may contain binding)\n */\nfunction i18nStartFirstCreatePassProcessTextNode(ast, tView, rootTNode, existingTNodes, createOpCodes, updateOpCodes, lView, text) {\n    const hasBinding = text.match(BINDING_REGEXP);\n    const tNode = createTNodeAndAddOpCode(tView, rootTNode, existingTNodes, lView, createOpCodes, hasBinding ? null : text, false);\n    const index = tNode.index;\n    if (hasBinding) {\n        generateBindingUpdateOpCodes(updateOpCodes, text, index, null, 0, null);\n    }\n    ast.push({ kind: 0 /* I18nNodeKind.TEXT */, index });\n}\n/**\n * See `i18nAttributes` above.\n */\nfunction i18nAttributesFirstPass(tView, index, values) {\n    const previousElement = getCurrentTNode();\n    const previousElementIndex = previousElement.index;\n    const updateOpCodes = [];\n    if (ngDevMode) {\n        attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n    }\n    if (tView.firstCreatePass && tView.data[index] === null) {\n        for (let i = 0; i < values.length; i += 2) {\n            const attrName = values[i];\n            const message = values[i + 1];\n            if (message !== '') {\n                // Check if attribute value contains an ICU and throw an error if that's the case.\n                // ICUs in element attributes are not supported.\n                // Note: we intentionally retain the error here by not using `ngDevMode`, because\n                // the `value` can change based on the locale and users aren't guaranteed to hit\n                // an invalid string while they're developing.\n                if (ICU_REGEXP.test(message)) {\n                    throw new Error(`ICU expressions are not supported in attributes. Message: \"${message}\".`);\n                }\n                // i18n attributes that hit this code path are guaranteed to have bindings, because\n                // the compiler treats static i18n attributes as regular attribute bindings.\n                // Since this may not be the first i18n attribute on this element we need to pass in how\n                // many previous bindings there have already been.\n                generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes), null);\n            }\n        }\n        tView.data[index] = updateOpCodes;\n    }\n}\n/**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param updateOpCodes Place where the update opcodes will be stored.\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 * @param bindingStart The lView index of the next expression that can be bound via an opCode.\n * @returns The mask value for these bindings\n */\nfunction generateBindingUpdateOpCodes(updateOpCodes, str, destinationNode, attrName, bindingStart, sanitizeFn) {\n    ngDevMode &&\n        assertGreaterThanOrEqual(destinationNode, HEADER_OFFSET, 'Index must be in absolute LView offset');\n    const maskIndex = updateOpCodes.length; // Location of mask\n    const sizeIndex = maskIndex + 1; // location of size for skipping\n    updateOpCodes.push(null, null); // Alloc space for mask and size\n    const startIndex = maskIndex + 2; // location of first allocation.\n    if (ngDevMode) {\n        attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n    }\n    const textParts = str.split(BINDING_REGEXP);\n    let mask = 0;\n    for (let j = 0; j < textParts.length; j++) {\n        const textValue = textParts[j];\n        if (j & 1) {\n            // Odd indexes are bindings\n            const bindingIndex = bindingStart + 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 /* I18nUpdateOpCode.SHIFT_REF */) |\n        (attrName ? 1 /* I18nUpdateOpCode.Attr */ : 0 /* I18nUpdateOpCode.Text */));\n    if (attrName) {\n        updateOpCodes.push(attrName, sanitizeFn);\n    }\n    updateOpCodes[maskIndex] = mask;\n    updateOpCodes[sizeIndex] = updateOpCodes.length - startIndex;\n    return mask;\n}\n/**\n * Count the number of bindings in the given `opCodes`.\n *\n * It could be possible to speed this up, by passing the number of bindings found back from\n * `generateBindingUpdateOpCodes()` to `i18nAttributesFirstPass()` but this would then require more\n * complexity in the code and/or transient objects to be created.\n *\n * Since this function is only called once when the template is instantiated, is trivial in the\n * first instance (since `opCodes` will be an empty array), and it is not common for elements to\n * contain multiple i18n bound attributes, it seems like this is a reasonable compromise.\n */\nfunction countBindings(opCodes) {\n    let count = 0;\n    for (let i = 0; i < opCodes.length; i++) {\n        const opCode = opCodes[i];\n        // Bindings are negative numbers.\n        if (typeof opCode === 'number' && opCode < 0) {\n            count++;\n        }\n    }\n    return count;\n}\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\n * have more than 32 bindings this will be hit very rarely. The downside of hitting this corner\n * case is 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}\n/**\n * Removes everything inside the sub-templates of a message.\n */\nfunction removeInnerTemplateTranslation(message) {\n    let match;\n    let res = '';\n    let index = 0;\n    let inTemplate = false;\n    let 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.slice(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\n * translated message can span multiple templates.\n *\n * Example:\n * ```html\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        const start = message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length;\n        const end = message.search(new RegExp(`${MARKER}\\\\/\\\\*\\\\d+:${subTemplateIndex}${MARKER}`));\n        return removeInnerTemplateTranslation(message.substring(start, end));\n    }\n}\n/**\n * Generate the OpCodes for ICU expressions.\n *\n * @param icuExpression\n * @param index Index where the anchor is stored and an optional `TIcuContainerNode`\n *   - `lView[anchorIdx]` points to a `Comment` node representing the anchor for the ICU.\n *   - `tView.data[anchorIdx]` points to the `TIcuContainerNode` if ICU is root (`null` otherwise)\n */\nfunction icuStart(ast, tView, lView, updateOpCodes, parentIdx, icuExpression, anchorIdx) {\n    ngDevMode && assertDefined(icuExpression, 'ICU expression must be defined');\n    let bindingMask = 0;\n    const tIcu = {\n        type: icuExpression.type,\n        currentCaseLViewIndex: allocExpando(tView, lView, 1, null),\n        anchorIdx,\n        cases: [],\n        create: [],\n        remove: [],\n        update: [],\n    };\n    addUpdateIcuSwitch(updateOpCodes, icuExpression, anchorIdx);\n    setTIcu(tView, anchorIdx, tIcu);\n    const values = icuExpression.values;\n    const cases = [];\n    for (let i = 0; i < values.length; i++) {\n        // Each value is an array of strings & other ICU expressions\n        const valueArr = values[i];\n        const nestedIcus = [];\n        for (let j = 0; j < valueArr.length; j++) {\n            const value = valueArr[j];\n            if (typeof value !== 'string') {\n                // It is an nested ICU expression\n                const icuIndex = nestedIcus.push(value) - 1;\n                // Replace nested ICU expression by a comment node\n                valueArr[j] = `<!--�${icuIndex}�-->`;\n            }\n        }\n        const caseAst = [];\n        cases.push(caseAst);\n        bindingMask =\n            parseIcuCase(caseAst, tView, tIcu, lView, updateOpCodes, parentIdx, icuExpression.cases[i], valueArr.join(''), nestedIcus) | bindingMask;\n    }\n    if (bindingMask) {\n        addUpdateIcuUpdate(updateOpCodes, bindingMask, anchorIdx);\n    }\n    ast.push({\n        kind: 3 /* I18nNodeKind.ICU */,\n        index: anchorIdx,\n        cases,\n        currentCaseLViewIndex: tIcu.currentCaseLViewIndex,\n    });\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    const cases = [];\n    const values = [];\n    let icuType = 1 /* IcuType.plural */;\n    let mainBinding = 0;\n    pattern = pattern.replace(ICU_BLOCK_REGEXP, function (str, binding, type) {\n        if (type === 'select') {\n            icuType = 0 /* IcuType.select */;\n        }\n        else {\n            icuType = 1 /* IcuType.plural */;\n        }\n        mainBinding = parseInt(binding.slice(1), 10);\n        return '';\n    });\n    const parts = i18nParseTextIntoPartsAndICU(pattern);\n    // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n    for (let pos = 0; pos < parts.length;) {\n        let key = parts[pos++].trim();\n        if (icuType === 1 /* IcuType.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        const blocks = i18nParseTextIntoPartsAndICU(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, values };\n}\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\n * into keys and cases. Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n * @returns An `Array<string|IcuExpression>` where:\n *   - odd positions: `string` => text between ICU expressions\n *   - even positions: `ICUExpression` => ICU expression parsed into `ICUExpression` record.\n */\nfunction i18nParseTextIntoPartsAndICU(pattern) {\n    if (!pattern) {\n        return [];\n    }\n    let prevPos = 0;\n    const braceStack = [];\n    const results = [];\n    const braces = /[{}]/g;\n    // lastIndex doesn't get set to 0 so we have to.\n    braces.lastIndex = 0;\n    let match;\n    while ((match = braces.exec(pattern))) {\n        const pos = match.index;\n        if (match[0] == '}') {\n            braceStack.pop();\n            if (braceStack.length == 0) {\n                // End of the block.\n                const 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                const substring = pattern.substring(prevPos, pos);\n                results.push(substring);\n                prevPos = pos + 1;\n            }\n            braceStack.push('{');\n        }\n    }\n    const substring = pattern.substring(prevPos);\n    results.push(substring);\n    return results;\n}\n/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n */\nfunction parseIcuCase(ast, tView, tIcu, lView, updateOpCodes, parentIdx, caseName, unsafeCaseHtml, nestedIcus) {\n    const create = [];\n    const remove = [];\n    const update = [];\n    if (ngDevMode) {\n        attachDebugGetter(create, icuCreateOpCodesToString);\n        attachDebugGetter(remove, i18nRemoveOpCodesToString);\n        attachDebugGetter(update, i18nUpdateOpCodesToString);\n    }\n    tIcu.cases.push(caseName);\n    tIcu.create.push(create);\n    tIcu.remove.push(remove);\n    tIcu.update.push(update);\n    const inertBodyHelper = getInertBodyHelper(getDocument());\n    const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeCaseHtml);\n    ngDevMode && assertDefined(inertBodyElement, 'Unable to generate inert body element');\n    const inertRootNode = getTemplateContent(inertBodyElement) || inertBodyElement;\n    if (inertRootNode) {\n        return walkIcuTree(ast, tView, tIcu, lView, updateOpCodes, create, remove, update, inertRootNode, parentIdx, nestedIcus, 0);\n    }\n    else {\n        return 0;\n    }\n}\nfunction walkIcuTree(ast, tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, parentNode, parentIdx, nestedIcus, depth) {\n    let bindingMask = 0;\n    let currentNode = parentNode.firstChild;\n    while (currentNode) {\n        const newIndex = allocExpando(tView, lView, 1, null);\n        switch (currentNode.nodeType) {\n            case Node.ELEMENT_NODE:\n                const element = currentNode;\n                const tagName = element.tagName.toLowerCase();\n                if (VALID_ELEMENTS.hasOwnProperty(tagName)) {\n                    addCreateNodeAndAppend(create, ELEMENT_MARKER, tagName, parentIdx, newIndex);\n                    tView.data[newIndex] = tagName;\n                    const elAttrs = element.attributes;\n                    for (let i = 0; i < elAttrs.length; i++) {\n                        const attr = elAttrs.item(i);\n                        const lowerAttrName = attr.name.toLowerCase();\n                        const hasBinding = !!attr.value.match(BINDING_REGEXP);\n                        // we assume the input string is safe, unless it's using a binding\n                        if (hasBinding) {\n                            if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n                                if (URI_ATTRS[lowerAttrName]) {\n                                    generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, _sanitizeUrl);\n                                }\n                                else {\n                                    generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, null);\n                                }\n                            }\n                            else {\n                                ngDevMode &&\n                                    console.warn(`WARNING: ignoring unsafe attribute value ` +\n                                        `${lowerAttrName} on element ${tagName} ` +\n                                        `(see ${XSS_SECURITY_URL})`);\n                            }\n                        }\n                        else {\n                            addCreateAttribute(create, newIndex, attr);\n                        }\n                    }\n                    const elementNode = {\n                        kind: 1 /* I18nNodeKind.ELEMENT */,\n                        index: newIndex,\n                        children: [],\n                    };\n                    ast.push(elementNode);\n                    // Parse the children of this node (if any)\n                    bindingMask =\n                        walkIcuTree(elementNode.children, tView, tIcu, lView, sharedUpdateOpCodes, create, remove, update, currentNode, newIndex, nestedIcus, depth + 1) | bindingMask;\n                    addRemoveNode(remove, newIndex, depth);\n                }\n                break;\n            case Node.TEXT_NODE:\n                const value = currentNode.textContent || '';\n                const hasBinding = value.match(BINDING_REGEXP);\n                addCreateNodeAndAppend(create, null, hasBinding ? '' : value, parentIdx, newIndex);\n                addRemoveNode(remove, newIndex, depth);\n                if (hasBinding) {\n                    bindingMask =\n                        generateBindingUpdateOpCodes(update, value, newIndex, null, 0, null) | bindingMask;\n                }\n                ast.push({\n                    kind: 0 /* I18nNodeKind.TEXT */,\n                    index: newIndex,\n                });\n                break;\n            case Node.COMMENT_NODE:\n                // Check if the comment node is a placeholder for a nested ICU\n                const isNestedIcu = NESTED_ICU.exec(currentNode.textContent || '');\n                if (isNestedIcu) {\n                    const nestedIcuIndex = parseInt(isNestedIcu[1], 10);\n                    const icuExpression = nestedIcus[nestedIcuIndex];\n                    // Create the comment node that will anchor the ICU expression\n                    addCreateNodeAndAppend(create, ICU_MARKER, ngDevMode ? `nested ICU ${nestedIcuIndex}` : '', parentIdx, newIndex);\n                    icuStart(ast, tView, lView, sharedUpdateOpCodes, parentIdx, icuExpression, newIndex);\n                    addRemoveNestedIcu(remove, newIndex, depth);\n                }\n                break;\n        }\n        currentNode = currentNode.nextSibling;\n    }\n    return bindingMask;\n}\nfunction addRemoveNode(remove, index, depth) {\n    if (depth === 0) {\n        remove.push(index);\n    }\n}\nfunction addRemoveNestedIcu(remove, index, depth) {\n    if (depth === 0) {\n        remove.push(~index); // remove ICU at `index`\n        remove.push(index); // remove ICU comment at `index`\n    }\n}\nfunction addUpdateIcuSwitch(update, icuExpression, index) {\n    update.push(toMaskBit(icuExpression.mainBinding), 2, -1 - icuExpression.mainBinding, (index << 2 /* I18nUpdateOpCode.SHIFT_REF */) | 2 /* I18nUpdateOpCode.IcuSwitch */);\n}\nfunction addUpdateIcuUpdate(update, bindingMask, index) {\n    update.push(bindingMask, 1, (index << 2 /* I18nUpdateOpCode.SHIFT_REF */) | 3 /* I18nUpdateOpCode.IcuUpdate */);\n}\nfunction addCreateNodeAndAppend(create, marker, text, appendToParentIdx, createAtIdx) {\n    if (marker !== null) {\n        create.push(marker);\n    }\n    create.push(text, createAtIdx, icuCreateOpCode(0 /* IcuCreateOpCode.AppendChild */, appendToParentIdx, createAtIdx));\n}\nfunction addCreateAttribute(create, newIndex, attr) {\n    create.push((newIndex << 1 /* IcuCreateOpCode.SHIFT_REF */) | 1 /* IcuCreateOpCode.Attr */, attr.name, attr.value);\n}\n\n// i18nPostprocess consts\nconst ROOT_TEMPLATE_ID = 0;\nconst PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\nconst PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\nconst PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nconst PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;\nconst PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\nconst PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nconst PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\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    /**\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    let result = message;\n    if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n        const matches = {};\n        const templateIdsStack = [ROOT_TEMPLATE_ID];\n        result = result.replace(PP_PLACEHOLDERS_REGEXP, (m, phs, tmpl) => {\n            const content = phs || tmpl;\n            const placeholders = matches[content] || [];\n            if (!placeholders.length) {\n                content.split('|').forEach((placeholder) => {\n                    const match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n                    const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n                    const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n                    placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n                });\n                matches[content] = placeholders;\n            }\n            if (!placeholders.length) {\n                throw new Error(`i18n postprocess: unmatched placeholder - ${content}`);\n            }\n            const currentTemplateId = templateIdsStack[templateIdsStack.length - 1];\n            let idx = 0;\n            // find placeholder index that matches current template id\n            for (let 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            const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx];\n            if (isCloseTemplateTag) {\n                templateIdsStack.pop();\n            }\n            else if (currentTemplateId !== templateId) {\n                templateIdsStack.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, (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, (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, (match, key) => {\n        if (replacements.hasOwnProperty(key)) {\n            const 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/**\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}�`: *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 messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nStart(index, messageIndex, subTemplateIndex = -1) {\n    const tView = getTView();\n    const lView = getLView();\n    const adjustedIndex = HEADER_OFFSET + index;\n    ngDevMode && assertDefined(tView, `tView should be defined`);\n    const message = getConstant(tView.consts, messageIndex);\n    const parentTNode = getCurrentParentTNode();\n    if (tView.firstCreatePass) {\n        i18nStartFirstCreatePass(tView, parentTNode === null ? 0 : parentTNode.index, lView, adjustedIndex, message, subTemplateIndex);\n    }\n    // Set a flag that this LView has i18n blocks.\n    // The flag is later used to determine whether this component should\n    // be hydrated (currently hydration is not supported for i18n blocks).\n    if (tView.type === 2 /* TViewType.Embedded */) {\n        // Annotate host component's LView (not embedded view's LView),\n        // since hydration can be skipped on per-component basis only.\n        const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n        componentLView[FLAGS] |= 32 /* LViewFlags.HasI18n */;\n    }\n    else {\n        lView[FLAGS] |= 32 /* LViewFlags.HasI18n */;\n    }\n    const tI18n = tView.data[adjustedIndex];\n    const sameViewParentTNode = parentTNode === lView[T_HOST] ? null : parentTNode;\n    const parentRNode = getClosestRElement(tView, sameViewParentTNode, lView);\n    // If `parentTNode` is an `ElementContainer` than it has `<!--ng-container--->`.\n    // When we do inserts we have to make sure to insert in front of `<!--ng-container--->`.\n    const insertInFrontOf = parentTNode && parentTNode.type & 8 /* TNodeType.ElementContainer */ ? lView[parentTNode.index] : null;\n    prepareI18nBlockForHydration(lView, adjustedIndex, parentTNode, subTemplateIndex);\n    applyCreateOpCodes(lView, tI18n.create, parentRNode, insertInFrontOf);\n    setInI18nBlock(true);\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    setInI18nBlock(false);\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 messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nfunction ɵɵi18n(index, messageIndex, subTemplateIndex) {\n    ɵɵi18nStart(index, messageIndex, 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, attrsIndex) {\n    const tView = getTView();\n    ngDevMode && assertDefined(tView, `tView should be defined`);\n    const attrs = getConstant(tView.consts, attrsIndex);\n    i18nAttributesFirstPass(tView, index + HEADER_OFFSET, attrs);\n}\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    const lView = getLView();\n    setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));\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    applyI18n(getTView(), getLView(), index + HEADER_OFFSET);\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    return i18nPostprocess(message, replacements);\n}\n\n/**\n * Contains a reference to a function that disables event replay feature\n * for server-side rendered applications. This function is overridden with\n * an actual implementation when the event replay feature is enabled via\n * `withEventReplay()` call.\n */\nlet stashEventListener = (el, eventName, listenerFn) => { };\nfunction setStashFn(fn) {\n    stashEventListener = fn;\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 - this argument is a reminder\n *     from the Renderer3 infrastructure and should be removed from the instruction arguments\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    const lView = getLView();\n    const tView = getTView();\n    const tNode = getCurrentTNode();\n    listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn, 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 ɵɵsyntheticHostListener(eventName, listenerFn) {\n    const tNode = getCurrentTNode();\n    const lView = getLView();\n    const tView = getTView();\n    const currentDef = getCurrentDirectiveDef(tView.data);\n    const renderer = loadComponentRenderer(currentDef, tNode, lView);\n    listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn);\n    return ɵɵsyntheticHostListener;\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    const tCleanup = tView.cleanup;\n    if (tCleanup != null) {\n        for (let i = 0; i < tCleanup.length - 1; i += 2) {\n            const 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                const lCleanup = lView[CLEANUP];\n                const 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, eventTargetResolver) {\n    const isTNodeDirectiveHost = isDirectiveHost(tNode);\n    const firstCreatePass = tView.firstCreatePass;\n    const tCleanup = firstCreatePass && getOrCreateTViewCleanup(tView);\n    const context = lView[CONTEXT];\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    const lCleanup = getOrCreateLViewCleanup(lView);\n    ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */);\n    let processOutputs = true;\n    // Adding a native event listener is applicable when:\n    // - The corresponding TNode represents a DOM element.\n    // - The event target has a resolver (usually resulting in a global object,\n    //   such as `window` or `document`).\n    if (tNode.type & 3 /* TNodeType.AnyRNode */ || eventTargetResolver) {\n        const native = getNativeByTNode(tNode, lView);\n        const target = eventTargetResolver ? eventTargetResolver(native) : native;\n        const lCleanupIndex = lCleanup.length;\n        const idxOrTargetGetter = eventTargetResolver\n            ? (_lView) => eventTargetResolver(unwrapRNode(_lView[tNode.index]))\n            : tNode.index;\n        // In order to match current behavior, native DOM event listeners must be added for all\n        // events (including outputs).\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        let 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            const lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener;\n            lastListenerFn.__ngNextListenerFn__ = listenerFn;\n            existingListener.__ngLastListenerFn__ = listenerFn;\n            processOutputs = false;\n        }\n        else {\n            listenerFn = wrapListener(tNode, lView, context, listenerFn);\n            stashEventListener(native, eventName, listenerFn);\n            const cleanupFn = renderer.listen(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        // Even if there is no native listener to add, we still need to wrap the listener so that OnPush\n        // ancestors are marked dirty when an event occurs.\n        listenerFn = wrapListener(tNode, lView, context, listenerFn);\n    }\n    // subscribe to directive outputs\n    const outputs = tNode.outputs;\n    let props;\n    if (processOutputs && outputs !== null && (props = outputs[eventName])) {\n        const propsLength = props.length;\n        if (propsLength) {\n            for (let i = 0; i < propsLength; i += 2) {\n                const index = props[i];\n                ngDevMode && assertIndexInRange(lView, index);\n                const minifiedName = props[i + 1];\n                const directiveInstance = lView[index];\n                const output = directiveInstance[minifiedName];\n                if (ngDevMode && !isOutputSubscribable(output)) {\n                    throw new Error(`@Output ${minifiedName} not initialized in '${directiveInstance.constructor.name}'.`);\n                }\n                const subscription = output.subscribe(listenerFn);\n                const 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, context, listenerFn, e) {\n    const prevConsumer = setActiveConsumer$1(null);\n    try {\n        profiler(6 /* ProfilerEvent.OutputStart */, context, listenerFn);\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    finally {\n        profiler(7 /* ProfilerEvent.OutputEnd */, context, listenerFn);\n        setActiveConsumer$1(prevConsumer);\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, context, listenerFn) {\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        const startView = tNode.componentOffset > -1 ? getComponentLViewByIndex(tNode.index, lView) : lView;\n        markViewDirty(startView, 5 /* NotificationSource.Listener */);\n        let result = executeListenerWithErrorHandling(lView, context, 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        let nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__;\n        while (nextListenerFn) {\n            // We should prevent default if any of the listeners explicitly return false\n            result = executeListenerWithErrorHandling(lView, context, nextListenerFn, e) && result;\n            nextListenerFn = nextListenerFn.__ngNextListenerFn__;\n        }\n        return result;\n    };\n}\n/**\n * Whether the given value represents a subscribable output.\n *\n * For example, an `EventEmitter, a `Subject`, an `Observable` or an\n * `OutputEmitter`.\n */\nfunction isOutputSubscribable(value) {\n    return (value != null && typeof value.subscribe === 'function');\n}\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 = 1) {\n    return nextContextImpl(level);\n}\n\n/**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\nfunction matchingProjectionSlotIndex(tNode, projectionSlots) {\n    let wildcardNgContentIndex = null;\n    const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n    for (let i = 0; i < projectionSlots.length; i++) {\n        const 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    const 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        const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n        const projectionHeads = (componentNode.projection = newArray(numProjectionSlots, null));\n        const tails = projectionHeads.slice();\n        let componentChild = componentNode.child;\n        while (componentChild !== null) {\n            // Do not project let declarations so they don't occupy a slot.\n            if (componentChild.type !== 128 /* TNodeType.LetDeclaration */) {\n                const slotIndex = projectionSlots\n                    ? matchingProjectionSlotIndex(componentChild, projectionSlots)\n                    : 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            }\n            componentChild = componentChild.next;\n        }\n    }\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 Index of the projection node.\n * @param selectorIndex Index of the slot selector.\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 * @param attrs Static attributes set on the `ng-content` node.\n * @param fallbackTemplateFn Template function with fallback content.\n *   Will be rendered if the slot is empty at runtime.\n * @param fallbackDecls Number of declarations in the fallback template.\n * @param fallbackVars Number of variables in the fallback template.\n *\n * @codeGenApi\n */\nfunction ɵɵprojection(nodeIndex, selectorIndex = 0, attrs, fallbackTemplateFn, fallbackDecls, fallbackVars) {\n    const lView = getLView();\n    const tView = getTView();\n    const fallbackIndex = fallbackTemplateFn ? nodeIndex + 1 : null;\n    // Fallback content needs to be declared no matter whether the slot is empty since different\n    // instances of the component may or may not insert it. Also it needs to be declare *before*\n    // the projection node in order to work correctly with hydration.\n    if (fallbackIndex !== null) {\n        declareTemplate(lView, tView, fallbackIndex, fallbackTemplateFn, fallbackDecls, fallbackVars, null, attrs);\n    }\n    const tProjectionNode = getOrCreateTNode(tView, HEADER_OFFSET + nodeIndex, 16 /* TNodeType.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    }\n    // `<ng-content>` has no content. Even if there's fallback\n    // content, the fallback is shown next to it.\n    setCurrentTNodeAsNotParent();\n    const hydrationInfo = lView[HYDRATION];\n    const isNodeCreationMode = !hydrationInfo || isInSkipHydrationBlock$1();\n    const componentHostNode = lView[DECLARATION_COMPONENT_VIEW][T_HOST];\n    const isEmpty = componentHostNode.projection[tProjectionNode.projection] === null;\n    if (isEmpty && fallbackIndex !== null) {\n        insertFallbackContent(lView, tView, fallbackIndex);\n    }\n    else if (isNodeCreationMode &&\n        (tProjectionNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {\n        // re-distribution of projectable nodes is stored on a component's view level\n        applyProjection(tView, lView, tProjectionNode);\n    }\n}\n/** Inserts the fallback content of a projection slot. Assumes there's no projected content. */\nfunction insertFallbackContent(lView, tView, fallbackIndex) {\n    const adjustedIndex = HEADER_OFFSET + fallbackIndex;\n    const fallbackTNode = tView.data[adjustedIndex];\n    const fallbackLContainer = lView[adjustedIndex];\n    ngDevMode && assertTNode(fallbackTNode);\n    ngDevMode && assertLContainer(fallbackLContainer);\n    const dehydratedView = findMatchingDehydratedView(fallbackLContainer, fallbackTNode.tView.ssrId);\n    const fallbackLView = createAndRenderEmbeddedLView(lView, fallbackTNode, undefined, {\n        dehydratedView,\n    });\n    addLViewToLContainer(fallbackLContainer, fallbackLView, 0, shouldAddViewToDom(fallbackTNode, dehydratedView));\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    const lView = getLView();\n    const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const 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    const lView = getLView();\n    const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const 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    const lView = getLView();\n    const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const 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    const lView = getLView();\n    const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const 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    const lView = getLView();\n    const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const 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    const lView = getLView();\n    const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const 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    const lView = getLView();\n    const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const 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    const lView = getLView();\n    const 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        const tView = getTView();\n        const 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 in between 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    const lView = getLView();\n    const interpolatedValue = interpolationV(lView, values);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        if (ngDevMode) {\n            const interpolationInBetween = [values[0]]; // prefix\n            for (let i = 2; i < values.length; i += 2) {\n                interpolationInBetween.push(values[i]);\n            }\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n        }\n    }\n    return ɵɵpropertyInterpolateV;\n}\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 flags Flags associated with the query\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nfunction ɵɵcontentQuery(directiveIndex, predicate, flags, read) {\n    createContentQuery(directiveIndex, predicate, flags, read);\n}\n/**\n * Creates a new view query by initializing internal data structures.\n *\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nfunction ɵɵviewQuery(predicate, flags, read) {\n    createViewQuery(predicate, flags, read);\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    const lView = getLView();\n    const tView = getTView();\n    const queryIndex = getCurrentQueryIndex();\n    setCurrentQueryIndex(queryIndex + 1);\n    const tQuery = getTQuery(tView, queryIndex);\n    if (queryList.dirty &&\n        isCreationMode(lView) ===\n            ((tQuery.metadata.flags & 2 /* QueryFlags.isStatic */) === 2 /* QueryFlags.isStatic */)) {\n        if (tQuery.matches === null) {\n            queryList.reset([]);\n        }\n        else {\n            const result = getQueryResults(lView, queryIndex);\n            queryList.reset(result, unwrapElementRef);\n            queryList.notifyOnChanges();\n        }\n        return true;\n    }\n    return false;\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}\n\n/**\n * Creates a new content query and binds it to a signal created by an authoring function.\n *\n * @param directiveIndex Current directive index\n * @param target The target signal to which the query should be bound\n * @param predicate The type for which the query will search\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nfunction ɵɵcontentQuerySignal(directiveIndex, target, predicate, flags, read) {\n    bindQueryToSignal(target, createContentQuery(directiveIndex, predicate, flags, read));\n}\n/**\n * Creates a new view query by initializing internal data structures and binding a new query to the\n * target signal.\n *\n * @param target The target signal to assign the query results to.\n * @param predicate The type or label that should match a given query\n * @param flags Flags associated with the query\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nfunction ɵɵviewQuerySignal(target, predicate, flags, read) {\n    bindQueryToSignal(target, createViewQuery(predicate, flags, read));\n}\n/**\n * Advances the current query index by a specified offset.\n *\n * Adjusting the current query index is necessary in cases where a given directive has a mix of\n * zone-based and signal-based queries. The signal-based queries don't require tracking of the\n * current index (those are refreshed on demand and not during change detection) so this instruction\n * is only necessary for backward-compatibility.\n *\n * @param index offset to apply to the current query index (defaults to 1)\n *\n * @codeGenApi\n */\nfunction ɵɵqueryAdvance(indexOffset = 1) {\n    setCurrentQueryIndex(getCurrentQueryIndex() + indexOffset);\n}\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    if (index >= tView.data.length) {\n        tView.data[index] = null;\n        tView.blueprint[index] = null;\n    }\n    lView[index] = 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    const contextLView = getContextLView();\n    return load(contextLView, HEADER_OFFSET + index);\n}\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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const interpolatedValue = interpolationV(lView, values);\n    ɵɵstyleMap(interpolatedValue);\n}\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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const interpolatedValue = interpolationV(lView, values);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolateV;\n}\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    const lView = getLView();\n    const tView = getTView();\n    const adjustedIndex = index + HEADER_OFFSET;\n    ngDevMode &&\n        assertEqual(getBindingIndex(), tView.bindingStartIndex, 'text nodes should be created before any bindings');\n    ngDevMode && assertIndexInRange(lView, adjustedIndex);\n    const tNode = tView.firstCreatePass\n        ? getOrCreateTNode(tView, adjustedIndex, 1 /* TNodeType.Text */, value, null)\n        : tView.data[adjustedIndex];\n    const textNative = _locateOrCreateTextNode(tView, lView, tNode, value, index);\n    lView[adjustedIndex] = textNative;\n    if (wasLastNodeCreated()) {\n        appendChild(tView, lView, textNative, tNode);\n    }\n    // Text nodes are self closing.\n    setCurrentTNode(tNode, false);\n}\nlet _locateOrCreateTextNode = (tView, lView, tNode, value, index) => {\n    lastNodeWasCreated(true);\n    return createTextNode(lView[RENDERER], value);\n};\n/**\n * Enables hydration code path (to lookup existing elements in DOM)\n * in addition to the regular creation mode of text nodes.\n */\nfunction locateOrCreateTextNodeImpl(tView, lView, tNode, value, index) {\n    const hydrationInfo = lView[HYDRATION];\n    const isNodeCreationMode = !hydrationInfo ||\n        isInSkipHydrationBlock$1() ||\n        isDetachedByI18n(tNode) ||\n        isDisconnectedNode$1(hydrationInfo, index);\n    lastNodeWasCreated(isNodeCreationMode);\n    // Regular creation mode.\n    if (isNodeCreationMode) {\n        return createTextNode(lView[RENDERER], value);\n    }\n    // Hydration mode, looking up an existing element in DOM.\n    const textNative = locateNextRNode(hydrationInfo, tView, lView, tNode);\n    ngDevMode && validateMatchingNode(textNative, Node.TEXT_NODE, null, lView, tNode);\n    ngDevMode && markRNodeAsClaimedByHydration(textNative);\n    return textNative;\n}\nfunction enableLocateOrCreateTextNodeImpl() {\n    _locateOrCreateTextNode = locateOrCreateTextNodeImpl;\n}\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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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    const lView = getLView();\n    const 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 LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Update a two-way bound property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property.\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. `twoWayProperty('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵtwoWayProperty(propName, value, sanitizer) {\n    // TODO(crisbeto): perf impact of re-evaluating this on each change detection?\n    if (isWritableSignal(value)) {\n        value = value();\n    }\n    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false);\n        ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n    }\n    return ɵɵtwoWayProperty;\n}\n/**\n * Function used inside two-way listeners to conditionally set the value of the bound expression.\n *\n * @param target Field on which to set the value.\n * @param value Value to be set to the field.\n *\n * @codeGenApi\n */\nfunction ɵɵtwoWayBindingSet(target, value) {\n    const canWrite = isWritableSignal(target);\n    canWrite && target.set(value);\n    return canWrite;\n}\n/**\n * Adds an event listener that updates a two-way binding to the current node.\n *\n * @param eventName Name of the event.\n * @param listenerFn The function to be called when event emits.\n *\n * @codeGenApi\n */\nfunction ɵɵtwoWayListener(eventName, listenerFn) {\n    const lView = getLView();\n    const tView = getTView();\n    const tNode = getCurrentTNode();\n    listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn);\n    return ɵɵtwoWayListener;\n}\n\n/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/** Object that indicates the value of a `@let` declaration that hasn't been initialized yet. */\nconst UNINITIALIZED_LET = {};\n/**\n * Declares an `@let` at a specific data slot. Returns itself to allow chaining.\n *\n * @param index Index at which to declare the `@let`.\n *\n * @codeGenApi\n */\nfunction ɵɵdeclareLet(index) {\n    const tView = getTView();\n    const lView = getLView();\n    const adjustedIndex = index + HEADER_OFFSET;\n    const tNode = getOrCreateTNode(tView, adjustedIndex, 128 /* TNodeType.LetDeclaration */, null, null);\n    setCurrentTNode(tNode, false);\n    store(tView, lView, adjustedIndex, UNINITIALIZED_LET);\n    return ɵɵdeclareLet;\n}\n/**\n * Instruction that stores the value of a `@let` declaration on the current view.\n * Returns the value to allow usage inside variable initializers.\n *\n * @codeGenApi\n */\nfunction ɵɵstoreLet(value) {\n    performanceMarkFeature('NgLet');\n    const tView = getTView();\n    const lView = getLView();\n    const index = getSelectedIndex();\n    store(tView, lView, index, value);\n    return value;\n}\n/**\n * Retrieves the value of a `@let` declaration defined in a parent view.\n *\n * @param index Index of the declaration within the view.\n *\n * @codeGenApi\n */\nfunction ɵɵreadContextLet(index) {\n    const contextLView = getContextLView();\n    const value = load(contextLView, HEADER_OFFSET + index);\n    if (value === UNINITIALIZED_LET) {\n        throw new RuntimeError(314 /* RuntimeErrorCode.UNINITIALIZED_LET_ACCESS */, ngDevMode && 'Attempting to access a @let declaration whose value is not available yet');\n    }\n    return value;\n}\n\n/*\n * This file re-exports all symbols contained in this directory.\n *\n * Why is this file not `index.ts`?\n *\n * There seems to be an inconsistent path resolution of an `index.ts` file\n * when only the parent directory is referenced. This could be due to the\n * node module resolution configuration differing from rollup and/or typescript.\n *\n * With commit\n * https://github.com/angular/angular/commit/d5e3f2c64bd13ce83e7c70788b7fc514ca4a9918\n * the `instructions.ts` file was moved to `instructions/instructions.ts` and an\n * `index.ts` file was used to re-export everything. Having had file names that were\n * importing from `instructions' directly (not the from the sub file or the `index.ts`\n * file) caused strange CI issues. `index.ts` had to be renamed to `all.ts` for this\n * to work.\n *\n * Jira Issue = FW-1184\n */\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    const tView = getTView();\n    if (tView.firstCreatePass) {\n        const isComponent = isComponentDef(def);\n        // The list of view providers is processed first, and the flags are updated\n        resolveProvider(viewProviders, tView.data, tView.blueprint, isComponent, true);\n        // Then, the list of providers is processed, and the flags are updated\n        resolveProvider(providers, tView.data, tView.blueprint, isComponent, false);\n    }\n}\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider(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 (let i = 0; i < provider.length; i++) {\n            resolveProvider(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n        }\n    }\n    else {\n        const tView = getTView();\n        const lView = getLView();\n        const tNode = getCurrentTNode();\n        let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n        const providerFactory = providerToFactory(provider);\n        if (ngDevMode) {\n            const injector = new NodeInjector(tNode, lView);\n            runInInjectorProfilerContext(injector, token, () => {\n                emitProviderConfiguredEvent(provider, isViewProvider);\n            });\n        }\n        const beginIndex = tNode.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n        const endIndex = tNode.directiveStart;\n        const cptViewProvidersCount = tNode.providerIndexes >> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */;\n        if (isTypeProvider(provider) || !provider.multi) {\n            // Single provider case: the factory is created and pushed immediately\n            const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n            const 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 += 1048576 /* TNodeProviderIndexes.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            const existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n            const existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n            const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex];\n            const 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                const 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 += 1048576 /* TNodeProviderIndexes.CptViewProvidersCountShifter */;\n                }\n                lInjectablesBlueprint.push(factory);\n                lView.push(factory);\n            }\n            else {\n                // Cases 1.b and 2.b\n                const indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n                registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1\n                    ? 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    const providerIsTypeProvider = isTypeProvider(provider);\n    const providerIsClassProvider = isClassProvider(provider);\n    if (providerIsTypeProvider || providerIsClassProvider) {\n        // Resolve forward references as `useClass` can hold a forward reference.\n        const classToken = providerIsClassProvider ? resolveForwardRef(provider.useClass) : provider;\n        const prototype = classToken.prototype;\n        const ngOnDestroy = prototype.ngOnDestroy;\n        if (ngOnDestroy) {\n            const hooks = tView.destroyHooks || (tView.destroyHooks = []);\n            if (!providerIsTypeProvider && provider.multi) {\n                ngDevMode &&\n                    assertDefined(indexInFactory, 'indexInFactory when registering multi factory destroy hook');\n                const 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 (let 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    const factories = this.multi;\n    let result;\n    if (this.providerFactory) {\n        const componentCount = this.providerFactory.componentProviders;\n        const 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 (let 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 (let i = 0; i < factories.length; i++) {\n        const 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    const 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    return (definition) => {\n        definition.providersResolver = (def, processProvidersFn) => {\n            return providersResolver(def, //\n            processProvidersFn ? processProvidersFn(providers) : providers, //\n            viewProviders);\n        };\n    };\n}\n\n/**\n * A feature that adds support for external runtime styles for a component.\n * An external runtime style is a URL to a CSS stylesheet that contains the styles\n * for a given component. For browsers, this URL will be used in an appended `link` element\n * when the component is rendered. This feature is typically used for Hot Module Replacement\n * (HMR) of component stylesheets by leveraging preexisting global stylesheet HMR available\n * in most development servers.\n *\n * @codeGenApi\n */\nfunction ɵɵExternalStylesFeature(styleUrls) {\n    return (definition) => {\n        if (styleUrls.length < 1) {\n            return;\n        }\n        definition.getExternalStyles = (encapsulationId) => {\n            // Add encapsulation ID search parameter `ngcomp` to support external style encapsulation as well as the encapsulation mode\n            // for usage tracking.\n            const urls = styleUrls.map((value) => value +\n                '?ngcomp' +\n                (encapsulationId ? '=' + encodeURIComponent(encapsulationId) : '') +\n                '&e=' +\n                definition.encapsulation);\n            return urls;\n        };\n    };\n}\n\n/**\n * Generated next to NgModules to monkey-patch directive and pipe references onto a component's\n * definition, when generating a direct reference in the component file would otherwise create an\n * import cycle.\n *\n * See [this explanation](https://hackmd.io/Odw80D0pR6yfsOjg_7XCJg?view) for more details.\n *\n * @codeGenApi\n */\nfunction ɵɵsetComponentScope(type, directives, pipes) {\n    const def = type.ɵcmp;\n    def.directiveDefs = extractDefListOrFactory(directives, /* pipeDef */ false);\n    def.pipeDefs = extractDefListOrFactory(pipes, /* pipeDef */ true);\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(() => {\n        const ngModuleDef = getNgModuleDef(type, true);\n        ngModuleDef.declarations = convertToTypeArray(scope.declarations || EMPTY_ARRAY);\n        ngModuleDef.imports = convertToTypeArray(scope.imports || EMPTY_ARRAY);\n        ngModuleDef.exports = convertToTypeArray(scope.exports || EMPTY_ARRAY);\n        if (scope.bootstrap) {\n            // This only happens in local compilation mode.\n            ngModuleDef.bootstrap = convertToTypeArray(scope.bootstrap);\n        }\n        depsTracker.registerNgModule(type, scope);\n    });\n}\nfunction convertToTypeArray(values) {\n    if (typeof values === 'function') {\n        return values;\n    }\n    const flattenValues = flatten(values);\n    if (flattenValues.some(isForwardRef)) {\n        return () => flattenValues.map(resolveForwardRef).map(maybeUnwrapModuleWithProviders);\n    }\n    else {\n        return flattenValues.map(maybeUnwrapModuleWithProviders);\n    }\n}\nfunction maybeUnwrapModuleWithProviders(value) {\n    return isModuleWithProviders(value) ? value.ngModule : value;\n}\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    const bindingIndex = getBindingRoot() + slotOffset;\n    const 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    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n    return bindingUpdated(lView, bindingIndex + 4, exp5) || different\n        ? updateBinding(lView, bindingIndex + 5, thisArg\n            ? 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    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n    return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different\n        ? updateBinding(lView, bindingIndex + 6, thisArg\n            ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6)\n            : pureFn(exp1, exp2, exp3, exp4, exp5, exp6))\n        : getBinding(lView, bindingIndex + 6);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\n    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n    return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different\n        ? updateBinding(lView, bindingIndex + 7, thisArg\n            ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7)\n            : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7))\n        : getBinding(lView, bindingIndex + 7);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\n    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n    return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different\n        ? updateBinding(lView, bindingIndex + 8, thisArg\n            ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)\n            : pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8))\n        : getBinding(lView, bindingIndex + 8);\n}\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\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 && assertIndexInRange(lView, returnValueIndex);\n    const 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    const 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    const 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    const 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    const 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    let bindingIndex = bindingRoot + slotOffset;\n    let different = false;\n    for (let i = 0; i < exps.length; i++) {\n        bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n    }\n    return different\n        ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps))\n        : getPureFunctionReturnValue(lView, bindingIndex);\n}\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    const tView = getTView();\n    let pipeDef;\n    const adjustedIndex = index + HEADER_OFFSET;\n    if (tView.firstCreatePass) {\n        // The `getPipeDef` throws if a pipe with a given name is not found\n        // (so we use non-null assertion below).\n        pipeDef = getPipeDef(pipeName, tView.pipeRegistry);\n        tView.data[adjustedIndex] = pipeDef;\n        if (pipeDef.onDestroy) {\n            (tView.destroyHooks ??= []).push(adjustedIndex, pipeDef.onDestroy);\n        }\n    }\n    else {\n        pipeDef = tView.data[adjustedIndex];\n    }\n    const pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n    let previousInjectorProfilerContext;\n    if (ngDevMode) {\n        previousInjectorProfilerContext = setInjectorProfilerContext({\n            injector: new NodeInjector(getCurrentTNode(), getLView()),\n            token: pipeDef.type,\n        });\n    }\n    const previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n    try {\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        const previousIncludeViewProviders = setIncludeViewProviders(false);\n        const pipeInstance = pipeFactory();\n        setIncludeViewProviders(previousIncludeViewProviders);\n        store(tView, getLView(), adjustedIndex, pipeInstance);\n        return pipeInstance;\n    }\n    finally {\n        // we have to restore the injector implementation in finally, just in case the creation of the\n        // pipe throws an error.\n        setInjectImplementation(previousInjectImplementation);\n        ngDevMode && setInjectorProfilerContext(previousInjectorProfilerContext);\n    }\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(name, registry) {\n    if (registry) {\n        if (ngDevMode) {\n            const pipes = registry.filter((pipe) => pipe.name === name);\n            // TODO: Throw an error in the next major\n            if (pipes.length > 1) {\n                console.warn(formatRuntimeError(313 /* RuntimeErrorCode.MULTIPLE_MATCHING_PIPES */, getMultipleMatchingPipesMessage(name)));\n            }\n        }\n        for (let i = registry.length - 1; i >= 0; i--) {\n            const pipeDef = registry[i];\n            if (name === pipeDef.name) {\n                return pipeDef;\n            }\n        }\n    }\n    if (ngDevMode) {\n        throw new RuntimeError(-302 /* RuntimeErrorCode.PIPE_NOT_FOUND */, getPipeNotFoundErrorMessage(name));\n    }\n    return;\n}\n/**\n * Generates a helpful error message for the user when multiple pipes match the name.\n *\n * @param name Name of the pipe\n * @returns The error message\n */\nfunction getMultipleMatchingPipesMessage(name) {\n    const lView = getLView();\n    const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n    const context = declarationLView[CONTEXT];\n    const hostIsStandalone = isHostComponentStandalone(lView);\n    const componentInfoMessage = context ? ` in the '${context.constructor.name}' component` : '';\n    const verifyMessage = `check ${hostIsStandalone ? \"'@Component.imports' of this component\" : 'the imports of this module'}`;\n    const errorMessage = `Multiple pipes match the name \\`${name}\\`${componentInfoMessage}. ${verifyMessage}`;\n    return errorMessage;\n}\n/**\n * Generates a helpful error message for the user when a pipe is not found.\n *\n * @param name Name of the missing pipe\n * @returns The error message\n */\nfunction getPipeNotFoundErrorMessage(name) {\n    const lView = getLView();\n    const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n    const context = declarationLView[CONTEXT];\n    const hostIsStandalone = isHostComponentStandalone(lView);\n    const componentInfoMessage = context ? ` in the '${context.constructor.name}' component` : '';\n    const verifyMessage = `Verify that it is ${hostIsStandalone\n        ? \"included in the '@Component.imports' of this component\"\n        : 'declared or imported in this module'}`;\n    const errorMessage = `The pipe '${name}' could not be found${componentInfoMessage}. ${verifyMessage}`;\n    return errorMessage;\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 offset the binding offset\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind1(index, offset, v1) {\n    const adjustedIndex = index + HEADER_OFFSET;\n    const lView = getLView();\n    const pipeInstance = load(lView, adjustedIndex);\n    return isPure(lView, adjustedIndex)\n        ? pureFunction1Internal(lView, getBindingRoot(), offset, 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    const adjustedIndex = index + HEADER_OFFSET;\n    const lView = getLView();\n    const pipeInstance = load(lView, adjustedIndex);\n    return isPure(lView, adjustedIndex)\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    const adjustedIndex = index + HEADER_OFFSET;\n    const lView = getLView();\n    const pipeInstance = load(lView, adjustedIndex);\n    return isPure(lView, adjustedIndex)\n        ? 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    const adjustedIndex = index + HEADER_OFFSET;\n    const lView = getLView();\n    const pipeInstance = load(lView, adjustedIndex);\n    return isPure(lView, adjustedIndex)\n        ? 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    const adjustedIndex = index + HEADER_OFFSET;\n    const lView = getLView();\n    const pipeInstance = load(lView, adjustedIndex);\n    return isPure(lView, adjustedIndex)\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].pure;\n}\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, lView) {\n    return createTemplateRef(tNode, lView);\n}\n\nfunction ɵɵgetComponentDepsFactory(type, rawImports) {\n    return () => {\n        try {\n            return depsTracker.getComponentDependencies(type, rawImports).dependencies;\n        }\n        catch (e) {\n            console.error(`Computing dependencies in local compilation mode for the component \"${type.name}\" failed with the exception:`, e);\n            throw e;\n        }\n    };\n}\n\n/**\n * Sets the debug info for an Angular class.\n *\n * This runtime is guarded by ngDevMode flag.\n */\nfunction ɵsetClassDebugInfo(type, debugInfo) {\n    const def = getComponentDef(type);\n    if (def !== null) {\n        def.debugInfo = debugInfo;\n    }\n}\n\n/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Replaces the metadata of a component type and re-renders all live instances of the component.\n * @param type Class whose metadata will be replaced.\n * @param applyMetadata Callback that will apply a new set of metadata on the `type` when invoked.\n * @param environment Syntehtic namespace imports that need to be passed along to the callback.\n * @param locals Local symbols from the source location that have to be exposed to the callback.\n * @codeGenApi\n */\nfunction ɵɵreplaceMetadata(type, applyMetadata, namespaces, locals) {\n    ngDevMode && assertComponentDef(type);\n    const oldDef = getComponentDef(type);\n    // The reason `applyMetadata` is a callback that is invoked (almost) immediately is because\n    // the compiler usually produces more code than just the component definition, e.g. there\n    // can be functions for embedded views, the variables for the constant pool and `setClassMetadata`\n    // calls. The callback allows us to keep them isolate from the rest of the app and to invoke\n    // them at the right time.\n    applyMetadata.apply(null, [type, namespaces, ...locals]);\n    // If a `tView` hasn't been created yet, it means that this component hasn't been instantianted\n    // before. In this case there's nothing left for us to do aside from patching it in.\n    if (oldDef.tView) {\n        const trackedViews = getTrackedLViews().values();\n        for (const root of trackedViews) {\n            // Note: we have the additional check, because `IsRoot` can also indicate\n            // a component created through something like `createComponent`.\n            if (root[FLAGS] & 512 /* LViewFlags.IsRoot */ && root[PARENT] === null) {\n                recreateMatchingLViews(oldDef, root);\n            }\n        }\n    }\n}\n/**\n * Finds all LViews matching a specific component definition and recreates them.\n * @param def Component definition to search for.\n * @param rootLView View from which to start the search.\n */\nfunction recreateMatchingLViews(def, rootLView) {\n    ngDevMode &&\n        assertDefined(def.tView, 'Expected a component definition that has been instantiated at least once');\n    const tView = rootLView[TVIEW];\n    // Use `tView` to match the LView since `instanceof` can\n    // produce false positives when using inheritance.\n    if (tView === def.tView) {\n        ngDevMode && assertComponentDef(def.type);\n        recreateLView(getComponentDef(def.type), rootLView);\n        return;\n    }\n    for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n        const current = rootLView[i];\n        if (isLContainer(current)) {\n            for (let i = CONTAINER_HEADER_OFFSET; i < current.length; i++) {\n                recreateMatchingLViews(def, current[i]);\n            }\n        }\n        else if (isLView(current)) {\n            recreateMatchingLViews(def, current);\n        }\n    }\n}\n/**\n * Removes any cached renderers from the factory for the provided type.\n * This is currently used by the HMR logic to ensure Renderers are kept\n * synchronized with any definition metadata updates.\n * @param factory A RendererFactory2 instance.\n * @param def A ComponentDef instance.\n */\nfunction clearRendererCache(factory, def) {\n    // Cast to read a private field.\n    // NOTE: This must be kept synchronized with the renderer factory implementation in platform-browser.\n    factory.rendererByCompId?.delete(def.id);\n}\n/**\n * Recreates an LView in-place from a new component definition.\n * @param def Definition from which to recreate the view.\n * @param lView View to be recreated.\n */\nfunction recreateLView(def, lView) {\n    const instance = lView[CONTEXT];\n    const host = lView[HOST];\n    // In theory the parent can also be an LContainer, but it appears like that's\n    // only the case for embedded views which we won't be replacing here.\n    const parentLView = lView[PARENT];\n    ngDevMode && assertLView(parentLView);\n    const tNode = lView[T_HOST];\n    ngDevMode && assertTNodeType(tNode, 2 /* TNodeType.Element */);\n    // Recreate the TView since the template might've changed.\n    const newTView = getOrCreateComponentTView(def);\n    // Always force the creation of a new renderer to ensure state captured during construction\n    // stays consistent with the new component definition by clearing any old cached factories.\n    const rendererFactory = lView[ENVIRONMENT].rendererFactory;\n    clearRendererCache(rendererFactory, def);\n    // Create a new LView from the new TView, but reusing the existing TNode and DOM node.\n    const newLView = createLView(parentLView, newTView, instance, getInitialLViewFlagsFromDef(def), host, tNode, null, rendererFactory.createRenderer(host, def), null, null, null);\n    // Detach the LView from its current place in the tree so we don't\n    // start traversing any siblings and modifying their structure.\n    replaceLViewInTree(parentLView, lView, newLView, tNode.index);\n    // Destroy the detached LView.\n    destroyLView(lView[TVIEW], lView);\n    // Remove the nodes associated with the destroyed LView. This removes the\n    // descendants, but not the host which we want to stay in place.\n    removeViewFromDOM(lView[TVIEW], lView);\n    // Reset the content projection state of the TNode before the first render.\n    // Note that this has to happen after the LView has been destroyed or we\n    // risk some projected nodes not being removed correctly.\n    resetProjectionState(tNode);\n    // Creation pass for the new view.\n    renderView(newTView, newLView, instance);\n    // Update pass for the new view.\n    refreshView(newTView, newLView, newTView.template, instance);\n}\n/**\n * Replaces one LView in the tree with another one.\n * @param parentLView Parent of the LView being replaced.\n * @param oldLView LView being replaced.\n * @param newLView Replacement LView to be inserted.\n * @param index Index at which the LView should be inserted.\n */\nfunction replaceLViewInTree(parentLView, oldLView, newLView, index) {\n    // Update the sibling whose `NEXT` pointer refers to the old view.\n    for (let i = HEADER_OFFSET; i < parentLView[TVIEW].bindingStartIndex; i++) {\n        const current = parentLView[i];\n        if ((isLView(current) || isLContainer(current)) && current[NEXT] === oldLView) {\n            current[NEXT] = newLView;\n            break;\n        }\n    }\n    // Set the new view as the head, if the old view was first.\n    if (parentLView[CHILD_HEAD] === oldLView) {\n        parentLView[CHILD_HEAD] = newLView;\n    }\n    // Set the new view as the tail, if the old view was last.\n    if (parentLView[CHILD_TAIL] === oldLView) {\n        parentLView[CHILD_TAIL] = newLView;\n    }\n    // Update the `NEXT` pointer to the same as the old view.\n    newLView[NEXT] = oldLView[NEXT];\n    // Clear out the `NEXT` of the old view.\n    oldLView[NEXT] = null;\n    // Insert the new LView at the correct index.\n    parentLView[index] = newLView;\n}\n/**\n * Child nodes mutate the `projection` state of their parent node as they're being projected.\n * This function resets the `project` back to its initial state.\n * @param tNode\n */\nfunction resetProjectionState(tNode) {\n    // The `projection` is mutated by child nodes as they're being projected. We need to\n    // reset it to the initial state so projection works after the template is swapped out.\n    if (tNode.projection !== null) {\n        for (const current of tNode.projection) {\n            if (isTNodeShape(current)) {\n                // Reset `projectionNext` since it can affect the traversal order during projection.\n                current.projectionNext = null;\n                current.flags &= ~2 /* TNodeFlags.isProjected */;\n            }\n        }\n        tNode.projection = null;\n    }\n}\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 */\nconst angularCoreEnv = (() => ({\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    'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory,\n    'ɵɵinject': ɵɵinject,\n    'ɵɵinjectAttribute': ɵɵinjectAttribute,\n    'ɵɵinvalidFactory': ɵɵinvalidFactory,\n    'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n    'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,\n    'ɵɵresetView': ɵɵresetView,\n    'ɵɵHostDirectivesFeature': ɵɵHostDirectivesFeature,\n    'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,\n    'ɵɵProvidersFeature': ɵɵProvidersFeature,\n    'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,\n    'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,\n    'ɵɵInputTransformsFeature': ɵɵInputTransformsFeature,\n    'ɵɵExternalStylesFeature': ɵɵExternalStylesFeature,\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    'ɵɵsyntheticHostProperty': ɵɵsyntheticHostProperty,\n    'ɵɵsyntheticHostListener': ɵɵsyntheticHostListener,\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    'ɵɵqueryAdvance': ɵɵqueryAdvance,\n    'ɵɵviewQuery': ɵɵviewQuery,\n    'ɵɵviewQuerySignal': ɵɵviewQuerySignal,\n    'ɵɵloadQuery': ɵɵloadQuery,\n    'ɵɵcontentQuery': ɵɵcontentQuery,\n    'ɵɵcontentQuerySignal': ɵɵcontentQuerySignal,\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    'ɵɵclassProp': ɵɵclassProp,\n    'ɵɵadvance': ɵɵadvance,\n    'ɵɵtemplate': ɵɵtemplate,\n    'ɵɵconditional': ɵɵconditional,\n    'ɵɵdefer': ɵɵdefer,\n    'ɵɵdeferWhen': ɵɵdeferWhen,\n    'ɵɵdeferOnIdle': ɵɵdeferOnIdle,\n    'ɵɵdeferOnImmediate': ɵɵdeferOnImmediate,\n    'ɵɵdeferOnTimer': ɵɵdeferOnTimer,\n    'ɵɵdeferOnHover': ɵɵdeferOnHover,\n    'ɵɵdeferOnInteraction': ɵɵdeferOnInteraction,\n    'ɵɵdeferOnViewport': ɵɵdeferOnViewport,\n    'ɵɵdeferPrefetchWhen': ɵɵdeferPrefetchWhen,\n    'ɵɵdeferPrefetchOnIdle': ɵɵdeferPrefetchOnIdle,\n    'ɵɵdeferPrefetchOnImmediate': ɵɵdeferPrefetchOnImmediate,\n    'ɵɵdeferPrefetchOnTimer': ɵɵdeferPrefetchOnTimer,\n    'ɵɵdeferPrefetchOnHover': ɵɵdeferPrefetchOnHover,\n    'ɵɵdeferPrefetchOnInteraction': ɵɵdeferPrefetchOnInteraction,\n    'ɵɵdeferPrefetchOnViewport': ɵɵdeferPrefetchOnViewport,\n    'ɵɵdeferHydrateWhen': ɵɵdeferHydrateWhen,\n    'ɵɵdeferHydrateNever': ɵɵdeferHydrateNever,\n    'ɵɵdeferHydrateOnIdle': ɵɵdeferHydrateOnIdle,\n    'ɵɵdeferHydrateOnImmediate': ɵɵdeferHydrateOnImmediate,\n    'ɵɵdeferHydrateOnTimer': ɵɵdeferHydrateOnTimer,\n    'ɵɵdeferHydrateOnHover': ɵɵdeferHydrateOnHover,\n    'ɵɵdeferHydrateOnInteraction': ɵɵdeferHydrateOnInteraction,\n    'ɵɵdeferHydrateOnViewport': ɵɵdeferHydrateOnViewport,\n    'ɵɵdeferEnableTimerScheduling': ɵɵdeferEnableTimerScheduling,\n    'ɵɵrepeater': ɵɵrepeater,\n    'ɵɵrepeaterCreate': ɵɵrepeaterCreate,\n    'ɵɵrepeaterTrackByIndex': ɵɵrepeaterTrackByIndex,\n    'ɵɵrepeaterTrackByIdentity': ɵɵrepeaterTrackByIdentity,\n    'ɵɵcomponentInstance': ɵɵcomponentInstance,\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    'ɵɵregisterNgModuleType': registerNgModuleType,\n    'ɵɵgetComponentDepsFactory': ɵɵgetComponentDepsFactory,\n    'ɵsetClassDebugInfo': ɵsetClassDebugInfo,\n    'ɵɵdeclareLet': ɵɵdeclareLet,\n    'ɵɵstoreLet': ɵɵstoreLet,\n    'ɵɵreadContextLet': ɵɵreadContextLet,\n    'ɵɵsanitizeHtml': ɵɵsanitizeHtml,\n    'ɵɵsanitizeStyle': ɵɵsanitizeStyle,\n    'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,\n    'ɵɵsanitizeScript': ɵɵsanitizeScript,\n    'ɵɵsanitizeUrl': ɵɵsanitizeUrl,\n    'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl,\n    'ɵɵtrustConstantHtml': ɵɵtrustConstantHtml,\n    'ɵɵtrustConstantResourceUrl': ɵɵtrustConstantResourceUrl,\n    'ɵɵvalidateIframeAttribute': ɵɵvalidateIframeAttribute,\n    'forwardRef': forwardRef,\n    'resolveForwardRef': resolveForwardRef,\n    'ɵɵtwoWayProperty': ɵɵtwoWayProperty,\n    'ɵɵtwoWayBindingSet': ɵɵtwoWayBindingSet,\n    'ɵɵtwoWayListener': ɵɵtwoWayListener,\n    'ɵɵreplaceMetadata': ɵɵreplaceMetadata,\n}))();\n\nlet 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\nfunction patchModuleCompilation() {\n    // Does nothing, but exists as a target for patching.\n}\n\nconst 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, ngModule });\n}\nlet 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 (let i = moduleQueue.length - 1; i >= 0; i--) {\n                const { moduleType, ngModule } = moduleQueue[i];\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    patchModuleCompilation();\n    compileNgModuleDefs(moduleType, ngModule);\n    if (ngModule.id !== undefined) {\n        registerNgModuleType(moduleType, ngModule.id);\n    }\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`, `ɵfac` 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 = false) {\n    ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n    ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n    const declarations = flatten(ngModule.declarations || EMPTY_ARRAY);\n    let ngModuleDef = null;\n    Object.defineProperty(moduleType, NG_MOD_DEF, {\n        configurable: true,\n        get: () => {\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                const compiler = getCompilerFacade({\n                    usage: 0 /* JitCompilerUsage.Decorator */,\n                    kind: 'NgModule',\n                    type: moduleType,\n                });\n                ngModuleDef = compiler.compileNgModule(angularCoreEnv, `ng:///${moduleType.name}/ɵmod.js`, {\n                    type: moduleType,\n                    bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY).map(resolveForwardRef),\n                    declarations: declarations.map(resolveForwardRef),\n                    imports: flatten(ngModule.imports || EMPTY_ARRAY)\n                        .map(resolveForwardRef)\n                        .map(expandModuleWithProviders),\n                    exports: flatten(ngModule.exports || EMPTY_ARRAY)\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    let ngFactoryDef = null;\n    Object.defineProperty(moduleType, NG_FACTORY_DEF, {\n        get: () => {\n            if (ngFactoryDef === null) {\n                const compiler = getCompilerFacade({\n                    usage: 0 /* JitCompilerUsage.Decorator */,\n                    kind: 'NgModule',\n                    type: moduleType,\n                });\n                ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${moduleType.name}/ɵfac.js`, {\n                    name: moduleType.name,\n                    type: moduleType,\n                    deps: reflectDependencies(moduleType),\n                    target: compiler.FactoryTarget.NgModule,\n                    typeArgumentCount: 0,\n                });\n            }\n            return ngFactoryDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n    let ngInjectorDef = null;\n    Object.defineProperty(moduleType, NG_INJ_DEF, {\n        get: () => {\n            if (ngInjectorDef === null) {\n                ngDevMode && verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);\n                const meta = {\n                    name: moduleType.name,\n                    type: moduleType,\n                    providers: ngModule.providers || EMPTY_ARRAY,\n                    imports: [\n                        (ngModule.imports || EMPTY_ARRAY).map(resolveForwardRef),\n                        (ngModule.exports || EMPTY_ARRAY).map(resolveForwardRef),\n                    ],\n                };\n                const compiler = getCompilerFacade({\n                    usage: 0 /* JitCompilerUsage.Decorator */,\n                    kind: 'NgModule',\n                    type: moduleType,\n                });\n                ngInjectorDef = compiler.compileInjector(angularCoreEnv, `ng:///${moduleType.name}/ɵinj.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 generateStandaloneInDeclarationsError(type, location) {\n    const prefix = `Unexpected \"${stringifyForError(type)}\" found in the \"declarations\" array of the`;\n    const suffix = `\"${stringifyForError(type)}\" is marked as standalone and can't be declared ` +\n        'in any NgModule - did you intend to import it instead (by adding it to the \"imports\" array)?';\n    return `${prefix} ${location}, ${suffix}`;\n}\nfunction verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {\n    if (verifiedNgModule.get(moduleType))\n        return;\n    // skip verifications of standalone components, directives, and pipes\n    if (isStandalone(moduleType))\n        return;\n    verifiedNgModule.set(moduleType, true);\n    moduleType = resolveForwardRef(moduleType);\n    let 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    const errors = [];\n    const declarations = maybeUnwrapFn(ngModuleDef.declarations);\n    const imports = maybeUnwrapFn(ngModuleDef.imports);\n    flatten(imports)\n        .map(unwrapModuleWithProvidersImports)\n        .forEach((modOrStandaloneCmpt) => {\n        verifySemanticsOfNgModuleImport(modOrStandaloneCmpt, moduleType);\n        verifySemanticsOfNgModuleDef(modOrStandaloneCmpt, false, moduleType);\n    });\n    const exports = maybeUnwrapFn(ngModuleDef.exports);\n    declarations.forEach(verifyDeclarationsHaveDefinitions);\n    declarations.forEach(verifyDirectivesHaveSelector);\n    declarations.forEach((declarationType) => verifyNotStandalone(declarationType, moduleType));\n    const combinedDeclarations = [\n        ...declarations.map(resolveForwardRef),\n        ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef),\n    ];\n    exports.forEach(verifyExportsAreDeclaredOrReExported);\n    declarations.forEach((decl) => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));\n    const ngModule = getAnnotation(moduleType, 'NgModule');\n    if (ngModule) {\n        ngModule.imports &&\n            flatten(ngModule.imports)\n                .map(unwrapModuleWithProvidersImports)\n                .forEach((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    }\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        const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(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        const 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 verifyNotStandalone(type, moduleType) {\n        type = resolveForwardRef(type);\n        const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n        if (def?.standalone) {\n            const location = `\"${stringifyForError(moduleType)}\" NgModule`;\n            errors.push(generateStandaloneInDeclarationsError(type, location));\n        }\n    }\n    function verifyExportsAreDeclaredOrReExported(type) {\n        type = resolveForwardRef(type);\n        const kind = (getComponentDef(type) && 'component') ||\n            (getDirectiveDef(type) && 'directive') ||\n            (getPipeDef$1(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        const existingModule = ownerNgModule.get(type);\n        if (existingModule && existingModule !== moduleType) {\n            if (!suppressErrors) {\n                const 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        const existingModule = ownerNgModule.get(type);\n        if (!existingModule && !isStandalone(type)) {\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        if (isStandalone(type)) {\n            // Note: this error should be the same as the\n            // `NGMODULE_BOOTSTRAP_IS_STANDALONE` one in AOT compiler.\n            errors.push(`The \\`${stringifyForError(type)}\\` class is a standalone component, which can ` +\n                `not be used in the \\`@NgModule.bootstrap\\` array. Use the \\`bootstrapApplication\\` ` +\n                `function for bootstrap instead.`);\n        }\n    }\n    function verifySemanticsOfNgModuleImport(type, importingModule) {\n        type = resolveForwardRef(type);\n        const directiveDef = getComponentDef(type) || getDirectiveDef(type);\n        if (directiveDef !== null && !directiveDef.standalone) {\n            throw new Error(`Unexpected directive '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n        }\n        const pipeDef = getPipeDef$1(type);\n        if (pipeDef !== null && !pipeDef.standalone) {\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    let 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            const proto = Object.getPrototypeOf(decorator);\n            if (proto.ngMetadataName == name) {\n                annotation = decorator;\n            }\n            else if (decorator.type) {\n                const proto = Object.getPrototypeOf(decorator.type);\n                if (proto.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 */\nlet ownerNgModule = new WeakMap();\nlet verifiedNgModule = new WeakMap();\nfunction resetCompiledComponents() {\n    ownerNgModule = new WeakMap();\n    verifiedNgModule = new WeakMap();\n    moduleQueue.length = 0;\n    GENERATED_COMP_IDS.clear();\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    const ngModuleDef = getNgModuleDef(type);\n    // a standalone component, directive or pipe\n    if (ngModuleDef === null) {\n        return [type];\n    }\n    return flatten(maybeUnwrapFn(ngModuleDef.exports).map((type) => {\n        const 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    const declarations = flatten(ngModule.declarations || EMPTY_ARRAY);\n    const transitiveScopes = transitiveScopesFor(moduleType);\n    declarations.forEach((declaration) => {\n        declaration = resolveForwardRef(declaration);\n        if (declaration.hasOwnProperty(NG_COMP_DEF)) {\n            // A `ɵcmp` field exists - go ahead and patch the component directly.\n            const component = declaration;\n            const componentDef = getComponentDef(component);\n            patchComponentDefWithScope(componentDef, transitiveScopes);\n        }\n        else if (!declaration.hasOwnProperty(NG_DIR_DEF) &&\n            !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 = () => Array.from(transitiveScopes.compilation.directives)\n        .map((dir) => dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir) : getDirectiveDef(dir))\n        .filter((def) => !!def);\n    componentDef.pipeDefs = () => Array.from(transitiveScopes.compilation.pipes).map((pipe) => getPipeDef$1(pipe));\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 type\n * (either a NgModule or a standalone component / directive / pipe).\n */\nfunction transitiveScopesFor(type) {\n    if (isNgModule(type)) {\n        if (USE_RUNTIME_DEPS_TRACKER_FOR_JIT) {\n            const scope = depsTracker.getNgModuleScope(type);\n            const def = getNgModuleDef(type, true);\n            return {\n                schemas: def.schemas || null,\n                ...scope,\n            };\n        }\n        else {\n            return transitiveScopesForNgModule(type);\n        }\n    }\n    else if (isStandalone(type)) {\n        const directiveDef = getComponentDef(type) || getDirectiveDef(type);\n        if (directiveDef !== null) {\n            return {\n                schemas: null,\n                compilation: {\n                    directives: new Set(),\n                    pipes: new Set(),\n                },\n                exported: {\n                    directives: new Set([type]),\n                    pipes: new Set(),\n                },\n            };\n        }\n        const pipeDef = getPipeDef$1(type);\n        if (pipeDef !== null) {\n            return {\n                schemas: null,\n                compilation: {\n                    directives: new Set(),\n                    pipes: new Set(),\n                },\n                exported: {\n                    directives: new Set(),\n                    pipes: new Set([type]),\n                },\n            };\n        }\n    }\n    // TODO: change the error message to be more user-facing and take standalone into account\n    throw new Error(`${type.name} does not have a module def (ɵmod property)`);\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 transitiveScopesForNgModule(moduleType) {\n    const def = getNgModuleDef(moduleType, true);\n    if (def.transitiveCompileScopes !== null) {\n        return def.transitiveCompileScopes;\n    }\n    const 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((imported) => {\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        const importedScope = transitiveScopesFor(imported);\n        importedScope.exported.directives.forEach((entry) => scopes.compilation.directives.add(entry));\n        importedScope.exported.pipes.forEach((entry) => scopes.compilation.pipes.add(entry));\n    });\n    maybeUnwrapFn(def.declarations).forEach((declared) => {\n        const declaredWithDefs = declared;\n        if (getPipeDef$1(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((exported) => {\n        const 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            const exportedScope = transitiveScopesFor(exportedType);\n            exportedScope.exported.directives.forEach((entry) => {\n                scopes.compilation.directives.add(entry);\n                scopes.exported.directives.add(entry);\n            });\n            exportedScope.exported.pipes.forEach((entry) => {\n                scopes.compilation.pipes.add(entry);\n                scopes.exported.pipes.add(entry);\n            });\n        }\n        else if (getPipeDef$1(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}\n\n/**\n * Keep track of the compilation depth to avoid reentrancy issues during JIT compilation. This\n * matters in the following scenario:\n *\n * Consider a component 'A' that extends component 'B', both declared in module 'M'. During\n * the compilation of 'A' the definition of 'B' is requested to capture the inheritance chain,\n * potentially triggering compilation of 'B'. If this nested compilation were to trigger\n * `flushModuleScopingQueueAsMuchAsPossible` it may happen that module 'M' is still pending in the\n * queue, resulting in 'A' and 'B' to be patched with the NgModule scope. As the compilation of\n * 'A' is still in progress, this would introduce a circular dependency on its compilation. To avoid\n * this issue, the module scope queue is only flushed for compilations at the depth 0, to ensure\n * all compilations have finished.\n */\nlet compilationDepth = 0;\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    let 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: () => {\n            if (ngComponentDef === null) {\n                const compiler = getCompilerFacade({\n                    usage: 0 /* JitCompilerUsage.Decorator */,\n                    kind: 'component',\n                    type: type,\n                });\n                if (componentNeedsResolution(metadata)) {\n                    const 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                    if (metadata.styleUrl) {\n                        error.push(` - styleUrl: ${metadata.styleUrl}`);\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                const options = getJitOptions();\n                let 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                let encapsulation = metadata.encapsulation;\n                if (encapsulation === undefined) {\n                    if (options !== null && options.defaultEncapsulation !== undefined) {\n                        encapsulation = options.defaultEncapsulation;\n                    }\n                    else {\n                        encapsulation = ViewEncapsulation.Emulated;\n                    }\n                }\n                const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;\n                const meta = {\n                    ...directiveMetadata(type, metadata),\n                    typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl),\n                    template: metadata.template || '',\n                    preserveWhitespaces,\n                    styles: typeof metadata.styles === 'string'\n                        ? [metadata.styles]\n                        : metadata.styles || EMPTY_ARRAY,\n                    animations: metadata.animations,\n                    // JIT components are always compiled against an empty set of `declarations`. Instead, the\n                    // `directiveDefs` and `pipeDefs` are updated at a later point:\n                    //  * for NgModule-based components, they're set when the NgModule which declares the\n                    //    component resolves in the module scoping queue\n                    //  * for standalone components, they're set just below, after `compileComponent`.\n                    declarations: [],\n                    changeDetection: metadata.changeDetection,\n                    encapsulation,\n                    interpolation: metadata.interpolation,\n                    viewProviders: metadata.viewProviders || null,\n                };\n                compilationDepth++;\n                try {\n                    if (meta.usesInheritance) {\n                        addDirectiveDefToUndecoratedParents(type);\n                    }\n                    ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n                    if (meta.isStandalone) {\n                        // Patch the component definition for standalone components with `directiveDefs` and\n                        // `pipeDefs` functions which lazily compute the directives/pipes available in the\n                        // standalone component. Also set `dependencies` to the lazily resolved list of imports.\n                        const imports = flatten(metadata.imports || EMPTY_ARRAY);\n                        const { directiveDefs, pipeDefs } = getStandaloneDefFunctions(type, imports);\n                        ngComponentDef.directiveDefs = directiveDefs;\n                        ngComponentDef.pipeDefs = pipeDefs;\n                        ngComponentDef.dependencies = () => imports.map(resolveForwardRef);\n                    }\n                }\n                finally {\n                    // Ensure that the compilation depth is decremented even when the compilation failed.\n                    compilationDepth--;\n                }\n                if (compilationDepth === 0) {\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                }\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                    const scopes = transitiveScopesFor(type.ngSelectorScope);\n                    patchComponentDefWithScope(ngComponentDef, scopes);\n                }\n                if (metadata.schemas) {\n                    if (meta.isStandalone) {\n                        ngComponentDef.schemas = metadata.schemas;\n                    }\n                    else {\n                        throw new Error(`The 'schemas' was specified for the ${stringifyForError(type)} but is only valid on a component that is standalone.`);\n                    }\n                }\n                else if (meta.isStandalone) {\n                    ngComponentDef.schemas = [];\n                }\n            }\n            return ngComponentDef;\n        },\n        set: (def) => {\n            ngComponentDef = def;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n}\n/**\n * Build memoized `directiveDefs` and `pipeDefs` functions for the component definition of a\n * standalone component, which process `imports` and filter out directives and pipes. The use of\n * memoized functions here allows for the delayed resolution of any `forwardRef`s present in the\n * component's `imports`.\n */\nfunction getStandaloneDefFunctions(type, imports) {\n    let cachedDirectiveDefs = null;\n    let cachedPipeDefs = null;\n    const directiveDefs = () => {\n        if (!USE_RUNTIME_DEPS_TRACKER_FOR_JIT) {\n            if (cachedDirectiveDefs === null) {\n                // Standalone components are always able to self-reference, so include the component's own\n                // definition in its `directiveDefs`.\n                cachedDirectiveDefs = [getComponentDef(type)];\n                const seen = new Set([type]);\n                for (const rawDep of imports) {\n                    ngDevMode && verifyStandaloneImport(rawDep, type);\n                    const dep = resolveForwardRef(rawDep);\n                    if (seen.has(dep)) {\n                        continue;\n                    }\n                    seen.add(dep);\n                    if (!!getNgModuleDef(dep)) {\n                        const scope = transitiveScopesFor(dep);\n                        for (const dir of scope.exported.directives) {\n                            const def = getComponentDef(dir) || getDirectiveDef(dir);\n                            if (def && !seen.has(dir)) {\n                                seen.add(dir);\n                                cachedDirectiveDefs.push(def);\n                            }\n                        }\n                    }\n                    else {\n                        const def = getComponentDef(dep) || getDirectiveDef(dep);\n                        if (def) {\n                            cachedDirectiveDefs.push(def);\n                        }\n                    }\n                }\n            }\n            return cachedDirectiveDefs;\n        }\n        else {\n            if (ngDevMode) {\n                for (const rawDep of imports) {\n                    verifyStandaloneImport(rawDep, type);\n                }\n            }\n            if (!isComponent(type)) {\n                return [];\n            }\n            const scope = depsTracker.getStandaloneComponentScope(type, imports);\n            return [...scope.compilation.directives]\n                .map((p) => (getComponentDef(p) || getDirectiveDef(p)))\n                .filter((d) => d !== null);\n        }\n    };\n    const pipeDefs = () => {\n        if (!USE_RUNTIME_DEPS_TRACKER_FOR_JIT) {\n            if (cachedPipeDefs === null) {\n                cachedPipeDefs = [];\n                const seen = new Set();\n                for (const rawDep of imports) {\n                    const dep = resolveForwardRef(rawDep);\n                    if (seen.has(dep)) {\n                        continue;\n                    }\n                    seen.add(dep);\n                    if (!!getNgModuleDef(dep)) {\n                        const scope = transitiveScopesFor(dep);\n                        for (const pipe of scope.exported.pipes) {\n                            const def = getPipeDef$1(pipe);\n                            if (def && !seen.has(pipe)) {\n                                seen.add(pipe);\n                                cachedPipeDefs.push(def);\n                            }\n                        }\n                    }\n                    else {\n                        const def = getPipeDef$1(dep);\n                        if (def) {\n                            cachedPipeDefs.push(def);\n                        }\n                    }\n                }\n            }\n            return cachedPipeDefs;\n        }\n        else {\n            if (ngDevMode) {\n                for (const rawDep of imports) {\n                    verifyStandaloneImport(rawDep, type);\n                }\n            }\n            if (!isComponent(type)) {\n                return [];\n            }\n            const scope = depsTracker.getStandaloneComponentScope(type, imports);\n            return [...scope.compilation.pipes].map((p) => getPipeDef$1(p)).filter((d) => d !== null);\n        }\n    };\n    return {\n        directiveDefs,\n        pipeDefs,\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    let ngDirectiveDef = null;\n    addDirectiveFactoryDef(type, directive || {});\n    Object.defineProperty(type, NG_DIR_DEF, {\n        get: () => {\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                const meta = getDirectiveMetadata(type, directive || {});\n                const compiler = getCompilerFacade({\n                    usage: 0 /* JitCompilerUsage.Decorator */,\n                    kind: 'directive',\n                    type,\n                });\n                ngDirectiveDef = compiler.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    const name = type && type.name;\n    const sourceMapUrl = `ng:///${name}/ɵdir.js`;\n    const compiler = getCompilerFacade({ usage: 0 /* JitCompilerUsage.Decorator */, kind: 'directive', type });\n    const 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 };\n}\nfunction addDirectiveFactoryDef(type, metadata) {\n    let ngFactoryDef = null;\n    Object.defineProperty(type, NG_FACTORY_DEF, {\n        get: () => {\n            if (ngFactoryDef === null) {\n                const meta = getDirectiveMetadata(type, metadata);\n                const compiler = getCompilerFacade({\n                    usage: 0 /* JitCompilerUsage.Decorator */,\n                    kind: 'directive',\n                    type,\n                });\n                ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${type.name}/ɵfac.js`, {\n                    name: meta.metadata.name,\n                    type: meta.metadata.type,\n                    typeArgumentCount: 0,\n                    deps: reflectDependencies(type),\n                    target: compiler.FactoryTarget.Directive,\n                });\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    const reflect = getReflect();\n    const propMetadata = reflect.ownPropMetadata(type);\n    return {\n        name: type.name,\n        type: type,\n        selector: metadata.selector !== undefined ? metadata.selector : null,\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        isStandalone: metadata.standalone === undefined ? true : !!metadata.standalone,\n        isSignal: !!metadata.signals,\n        hostDirectives: metadata.hostDirectives?.map((directive) => typeof directive === 'function' ? { directive } : directive) || null,\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    const objPrototype = Object.prototype;\n    let 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) &&\n            !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        emitDistinctChangesOnly: !!ann.emitDistinctChangesOnly,\n        isSignal: !!ann.isSignal,\n    };\n}\nfunction extractQueriesMetadata(type, propMetadata, isQueryAnn) {\n    const queriesMeta = [];\n    for (const field in propMetadata) {\n        if (propMetadata.hasOwnProperty(field)) {\n            const annotations = propMetadata[field];\n            annotations.forEach((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.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    return queriesMeta;\n}\nfunction extractExportAs(exportAs) {\n    return exportAs === undefined ? null : splitByComma(exportAs);\n}\nfunction isContentQuery(value) {\n    const name = value.ngMetadataName;\n    return name === 'ContentChild' || name === 'ContentChildren';\n}\nfunction isViewQuery(value) {\n    const 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((piece) => piece.trim());\n}\nconst LIFECYCLE_HOOKS = [\n    'ngOnChanges',\n    'ngOnInit',\n    'ngOnDestroy',\n    'ngDoCheck',\n    'ngAfterViewInit',\n    'ngAfterViewChecked',\n    'ngAfterContentInit',\n    'ngAfterContentChecked',\n];\nfunction shouldAddAbstractDirective(type) {\n    const reflect = getReflect();\n    if (LIFECYCLE_HOOKS.some((hookName) => reflect.hasLifecycleHook(type, hookName))) {\n        return true;\n    }\n    const propMetadata = reflect.propMetadata(type);\n    for (const field in propMetadata) {\n        const annotations = propMetadata[field];\n        for (let i = 0; i < annotations.length; i++) {\n            const current = annotations[i];\n            const metadataName = current.ngMetadataName;\n            if (isInputAnnotation(current) ||\n                isContentQuery(current) ||\n                isViewQuery(current) ||\n                metadataName === 'Output' ||\n                metadataName === 'HostBinding' ||\n                metadataName === 'HostListener') {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n\nfunction compilePipe(type, meta) {\n    let ngPipeDef = null;\n    let ngFactoryDef = null;\n    Object.defineProperty(type, NG_FACTORY_DEF, {\n        get: () => {\n            if (ngFactoryDef === null) {\n                const metadata = getPipeMetadata(type, meta);\n                const compiler = getCompilerFacade({\n                    usage: 0 /* JitCompilerUsage.Decorator */,\n                    kind: 'pipe',\n                    type: metadata.type,\n                });\n                ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${metadata.name}/ɵfac.js`, {\n                    name: metadata.name,\n                    type: metadata.type,\n                    typeArgumentCount: 0,\n                    deps: reflectDependencies(type),\n                    target: compiler.FactoryTarget.Pipe,\n                });\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: () => {\n            if (ngPipeDef === null) {\n                const metadata = getPipeMetadata(type, meta);\n                const compiler = getCompilerFacade({\n                    usage: 0 /* JitCompilerUsage.Decorator */,\n                    kind: 'pipe',\n                    type: metadata.type,\n                });\n                ngPipeDef = compiler.compilePipe(angularCoreEnv, `ng:///${metadata.name}/ɵpipe.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        name: type.name,\n        pipeName: meta.name,\n        pure: meta.pure !== undefined ? meta.pure : true,\n        isStandalone: meta.standalone === undefined ? true : !!meta.standalone,\n    };\n}\n\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\nconst Directive = makeDecorator('Directive', (dir = {}) => dir, undefined, undefined, (type, meta) => compileDirective(type, meta));\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Component = makeDecorator('Component', (c = {}) => ({ changeDetection: ChangeDetectionStrategy.Default, ...c }), Directive, undefined, (type, meta) => compileComponent(type, meta));\n/**\n * @Annotation\n * @publicApi\n */\nconst Pipe = makeDecorator('Pipe', (p) => ({ pure: true, ...p }), undefined, undefined, (type, meta) => compilePipe(type, meta));\n/**\n * @Annotation\n * @publicApi\n */\nconst Input = makePropDecorator('Input', (arg) => {\n    if (!arg) {\n        return {};\n    }\n    return typeof arg === 'string' ? { alias: arg } : arg;\n});\n/**\n * @Annotation\n * @publicApi\n */\nconst Output = makePropDecorator('Output', (alias) => ({ alias }));\n/**\n * @Annotation\n * @publicApi\n */\nconst HostBinding = makePropDecorator('HostBinding', (hostPropertyName) => ({ hostPropertyName }));\n/**\n * @Annotation\n * @publicApi\n */\nconst HostListener = makePropDecorator('HostListener', (eventName, args) => ({ eventName, args }));\n\n/**\n * @Annotation\n */\nconst NgModule = makeDecorator('NgModule', (ngModule) => ngModule, undefined, undefined, \n/**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` option configures the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\n(type, meta) => compileNgModule(type, meta));\n\n/**\n * This indirection is needed to free up Component, etc symbols in the public API\n * to be used by the decorator versions of these annotations.\n */\n\n/**\n * @description Represents the version of Angular\n *\n * @publicApi\n */\nclass Version {\n    full;\n    major;\n    minor;\n    patch;\n    constructor(full) {\n        this.full = full;\n        const parts = full.split('.');\n        this.major = parts[0];\n        this.minor = parts[1];\n        this.patch = parts.slice(2).join('.');\n    }\n}\n/**\n * @publicApi\n */\nconst VERSION = new Version('19.0.5');\n\n/**\n * Combination of NgModuleFactory and ComponentFactories.\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n */\nclass ModuleWithComponentFactories {\n    ngModuleFactory;\n    componentFactories;\n    constructor(ngModuleFactory, componentFactories) {\n        this.ngModuleFactory = ngModuleFactory;\n        this.componentFactories = componentFactories;\n    }\n}\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n */\nclass Compiler {\n    /**\n     * Compiles the given NgModule and all of its components. All templates of the components\n     * have to be inlined.\n     */\n    compileModuleSync(moduleType) {\n        return new NgModuleFactory(moduleType);\n    }\n    /**\n     * Compiles the given NgModule and all of its components\n     */\n    compileModuleAsync(moduleType) {\n        return Promise.resolve(this.compileModuleSync(moduleType));\n    }\n    /**\n     * Same as {@link Compiler#compileModuleSync compileModuleSync} but also creates ComponentFactories for all components.\n     */\n    compileModuleAndAllComponentsSync(moduleType) {\n        const ngModuleFactory = this.compileModuleSync(moduleType);\n        const moduleDef = getNgModuleDef(moduleType);\n        const componentFactories = maybeUnwrapFn(moduleDef.declarations).reduce((factories, declaration) => {\n            const componentDef = getComponentDef(declaration);\n            componentDef && factories.push(new ComponentFactory(componentDef));\n            return factories;\n        }, []);\n        return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n    }\n    /**\n     * Same as {@link Compiler#compileModuleAsync compileModuleAsync} but also creates ComponentFactories for all components.\n     */\n    compileModuleAndAllComponentsAsync(moduleType) {\n        return Promise.resolve(this.compileModuleAndAllComponentsSync(moduleType));\n    }\n    /**\n     * Clears all caches.\n     */\n    clearCache() { }\n    /**\n     * Clears the cache for the given component/ngModule.\n     */\n    clearCacheFor(type) { }\n    /**\n     * Returns the id for a given NgModule, if one is defined and known to the compiler.\n     */\n    getModuleId(moduleType) {\n        return undefined;\n    }\n    static ɵfac = function Compiler_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Compiler)(); };\n    static ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac, providedIn: 'root' });\n}\n(() => { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(Compiler, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], null, null); })();\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nconst COMPILER_OPTIONS = new InjectionToken(ngDevMode ? 'compilerOptions' : '');\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n *\n * @deprecated\n * Ivy JIT mode doesn't require accessing this symbol.\n */\nclass CompilerFactory {\n}\n\nfunction compileNgModuleFactory(injector, options, moduleType) {\n    ngDevMode && assertNgModuleType(moduleType);\n    const moduleFactory = new NgModuleFactory(moduleType);\n    // All of the logic below is irrelevant for AOT-compiled code.\n    if (typeof ngJitMode !== 'undefined' && !ngJitMode) {\n        return Promise.resolve(moduleFactory);\n    }\n    const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\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((opts) => opts.defaultEncapsulation)),\n        preserveWhitespaces: _lastDefined(compilerOptions.map((opts) => opts.preserveWhitespaces)),\n    });\n    if (isComponentResourceResolutionQueueEmpty()) {\n        return Promise.resolve(moduleFactory);\n    }\n    const compilerProviders = compilerOptions.flatMap((option) => option.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    const compiler = getCompilerFacade({\n        usage: 0 /* JitCompilerUsage.Decorator */,\n        kind: 'NgModule',\n        type: moduleType,\n    });\n    const compilerInjector = Injector.create({ providers: compilerProviders });\n    const 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((url) => Promise.resolve(resourceLoader.get(url))).then(() => moduleFactory);\n}\nfunction _lastDefined(args) {\n    for (let i = args.length - 1; i >= 0; i--) {\n        if (args[i] !== undefined) {\n            return args[i];\n        }\n    }\n    return undefined;\n}\n\nclass NgZoneChangeDetectionScheduler {\n    zone = inject(NgZone);\n    changeDetectionScheduler = inject(ChangeDetectionScheduler);\n    applicationRef = inject(ApplicationRef);\n    _onMicrotaskEmptySubscription;\n    initialize() {\n        if (this._onMicrotaskEmptySubscription) {\n            return;\n        }\n        this._onMicrotaskEmptySubscription = this.zone.onMicrotaskEmpty.subscribe({\n            next: () => {\n                // `onMicroTaskEmpty` can happen _during_ the zoneless scheduler change detection because\n                // zone.run(() => {}) will result in `checkStable` at the end of the `zone.run` closure\n                // and emit `onMicrotaskEmpty` synchronously if run coalsecing is false.\n                if (this.changeDetectionScheduler.runningTick) {\n                    return;\n                }\n                this.zone.run(() => {\n                    this.applicationRef.tick();\n                });\n            },\n        });\n    }\n    ngOnDestroy() {\n        this._onMicrotaskEmptySubscription?.unsubscribe();\n    }\n    static ɵfac = function NgZoneChangeDetectionScheduler_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NgZoneChangeDetectionScheduler)(); };\n    static ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: NgZoneChangeDetectionScheduler, factory: NgZoneChangeDetectionScheduler.ɵfac, providedIn: 'root' });\n}\n(() => { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(NgZoneChangeDetectionScheduler, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], null, null); })();\n/**\n * Internal token used to verify that `provideZoneChangeDetection` is not used\n * with the bootstrapModule API.\n */\nconst PROVIDED_NG_ZONE = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'provideZoneChangeDetection token' : '', { factory: () => false });\nfunction internalProvideZoneChangeDetection({ ngZoneFactory, ignoreChangesOutsideZone, scheduleInRootZone, }) {\n    ngZoneFactory ??= () => new NgZone({ ...getNgZoneOptions(), scheduleInRootZone });\n    return [\n        { provide: NgZone, useFactory: ngZoneFactory },\n        {\n            provide: ENVIRONMENT_INITIALIZER,\n            multi: true,\n            useFactory: () => {\n                const ngZoneChangeDetectionScheduler = inject(NgZoneChangeDetectionScheduler, {\n                    optional: true,\n                });\n                if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n                    ngZoneChangeDetectionScheduler === null) {\n                    throw new RuntimeError(402 /* RuntimeErrorCode.MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP */, `A required Injectable was not found in the dependency injection tree. ` +\n                        'If you are bootstrapping an NgModule, make sure that the `BrowserModule` is imported.');\n                }\n                return () => ngZoneChangeDetectionScheduler.initialize();\n            },\n        },\n        {\n            provide: ENVIRONMENT_INITIALIZER,\n            multi: true,\n            useFactory: () => {\n                const service = inject(ZoneStablePendingTask);\n                return () => {\n                    service.initialize();\n                };\n            },\n        },\n        // Always disable scheduler whenever explicitly disabled, even if another place called\n        // `provideZoneChangeDetection` without the 'ignore' option.\n        ignoreChangesOutsideZone === true ? { provide: ZONELESS_SCHEDULER_DISABLED, useValue: true } : [],\n        {\n            provide: SCHEDULE_IN_ROOT_ZONE,\n            useValue: scheduleInRootZone ?? SCHEDULE_IN_ROOT_ZONE_DEFAULT,\n        },\n    ];\n}\n/**\n * Provides `NgZone`-based change detection for the application bootstrapped using\n * `bootstrapApplication`.\n *\n * `NgZone` is already provided in applications by default. This provider allows you to configure\n * options like `eventCoalescing` in the `NgZone`.\n * This provider is not available for `platformBrowser().bootstrapModule`, which uses\n * `BootstrapOptions` instead.\n *\n * @usageNotes\n * ```ts\n * bootstrapApplication(MyApp, {providers: [\n *   provideZoneChangeDetection({eventCoalescing: true}),\n * ]});\n * ```\n *\n * @publicApi\n * @see {@link bootstrapApplication}\n * @see {@link NgZoneOptions}\n */\nfunction provideZoneChangeDetection(options) {\n    const ignoreChangesOutsideZone = options?.ignoreChangesOutsideZone;\n    const scheduleInRootZone = options?.scheduleInRootZone;\n    const zoneProviders = internalProvideZoneChangeDetection({\n        ngZoneFactory: () => {\n            const ngZoneOptions = getNgZoneOptions(options);\n            ngZoneOptions.scheduleInRootZone = scheduleInRootZone;\n            if (ngZoneOptions.shouldCoalesceEventChangeDetection) {\n                performanceMarkFeature('NgZone_CoalesceEvent');\n            }\n            return new NgZone(ngZoneOptions);\n        },\n        ignoreChangesOutsideZone,\n        scheduleInRootZone,\n    });\n    return makeEnvironmentProviders([\n        { provide: PROVIDED_NG_ZONE, useValue: true },\n        { provide: ZONELESS_ENABLED, useValue: false },\n        zoneProviders,\n    ]);\n}\n// Transforms a set of `BootstrapOptions` (supported by the NgModule-based bootstrap APIs) ->\n// `NgZoneOptions` that are recognized by the NgZone constructor. Passing no options will result in\n// a set of default options returned.\nfunction getNgZoneOptions(options) {\n    return {\n        enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,\n        shouldCoalesceEventChangeDetection: options?.eventCoalescing ?? false,\n        shouldCoalesceRunChangeDetection: options?.runCoalescing ?? false,\n    };\n}\nclass ZoneStablePendingTask {\n    subscription = new Subscription();\n    initialized = false;\n    zone = inject(NgZone);\n    pendingTasks = inject(PendingTasksInternal);\n    initialize() {\n        if (this.initialized) {\n            return;\n        }\n        this.initialized = true;\n        let task = null;\n        if (!this.zone.isStable && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {\n            task = this.pendingTasks.add();\n        }\n        this.zone.runOutsideAngular(() => {\n            this.subscription.add(this.zone.onStable.subscribe(() => {\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                queueMicrotask(() => {\n                    if (task !== null &&\n                        !this.zone.hasPendingMacrotasks &&\n                        !this.zone.hasPendingMicrotasks) {\n                        this.pendingTasks.remove(task);\n                        task = null;\n                    }\n                });\n            }));\n        });\n        this.subscription.add(this.zone.onUnstable.subscribe(() => {\n            NgZone.assertInAngularZone();\n            task ??= this.pendingTasks.add();\n        }));\n    }\n    ngOnDestroy() {\n        this.subscription.unsubscribe();\n    }\n    static ɵfac = function ZoneStablePendingTask_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ZoneStablePendingTask)(); };\n    static ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ZoneStablePendingTask, factory: ZoneStablePendingTask.ɵfac, providedIn: 'root' });\n}\n(() => { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ZoneStablePendingTask, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], null, null); })();\n\nconst CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT = 100;\nlet consecutiveMicrotaskNotifications = 0;\nlet stackFromLastFewNotifications = [];\nfunction trackMicrotaskNotificationForDebugging() {\n    consecutiveMicrotaskNotifications++;\n    if (CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT - consecutiveMicrotaskNotifications < 5) {\n        const stack = new Error().stack;\n        if (stack) {\n            stackFromLastFewNotifications.push(stack);\n        }\n    }\n    if (consecutiveMicrotaskNotifications === CONSECUTIVE_MICROTASK_NOTIFICATION_LIMIT) {\n        throw new RuntimeError(103 /* RuntimeErrorCode.INFINITE_CHANGE_DETECTION */, 'Angular could not stabilize because there were endless change notifications within the browser event loop. ' +\n            'The stack from the last several notifications: \\n' +\n            stackFromLastFewNotifications.join('\\n'));\n    }\n}\nclass ChangeDetectionSchedulerImpl {\n    appRef = inject(ApplicationRef);\n    taskService = inject(PendingTasksInternal);\n    ngZone = inject(NgZone);\n    zonelessEnabled = inject(ZONELESS_ENABLED);\n    tracing = inject(TracingService, { optional: true });\n    disableScheduling = inject(ZONELESS_SCHEDULER_DISABLED, { optional: true }) ?? false;\n    zoneIsDefined = typeof Zone !== 'undefined' && !!Zone.root.run;\n    schedulerTickApplyArgs = [{ data: { '__scheduler_tick__': true } }];\n    subscriptions = new Subscription();\n    angularZoneId = this.zoneIsDefined\n        ? this.ngZone._inner?.get(angularZoneInstanceIdProperty)\n        : null;\n    scheduleInRootZone = !this.zonelessEnabled &&\n        this.zoneIsDefined &&\n        (inject(SCHEDULE_IN_ROOT_ZONE, { optional: true }) ?? false);\n    cancelScheduledCallback = null;\n    useMicrotaskScheduler = false;\n    runningTick = false;\n    pendingRenderTaskId = null;\n    constructor() {\n        this.subscriptions.add(this.appRef.afterTick.subscribe(() => {\n            // If the scheduler isn't running a tick but the application ticked, that means\n            // someone called ApplicationRef.tick manually. In this case, we should cancel\n            // any change detections that had been scheduled so we don't run an extra one.\n            if (!this.runningTick) {\n                this.cleanup();\n            }\n        }));\n        this.subscriptions.add(this.ngZone.onUnstable.subscribe(() => {\n            // If the zone becomes unstable when we're not running tick (this happens from the zone.run),\n            // we should cancel any scheduled change detection here because at this point we\n            // know that the zone will stabilize at some point and run change detection itself.\n            if (!this.runningTick) {\n                this.cleanup();\n            }\n        }));\n        // TODO(atscott): These conditions will need to change when zoneless is the default\n        // Instead, they should flip to checking if ZoneJS scheduling is provided\n        this.disableScheduling ||=\n            !this.zonelessEnabled &&\n                // NoopNgZone without enabling zoneless means no scheduling whatsoever\n                (this.ngZone instanceof NoopNgZone ||\n                    // The same goes for the lack of Zone without enabling zoneless scheduling\n                    !this.zoneIsDefined);\n    }\n    notify(source) {\n        if (!this.zonelessEnabled && source === 5 /* NotificationSource.Listener */) {\n            // When the notification comes from a listener, we skip the notification unless the\n            // application has enabled zoneless. Ideally, listeners wouldn't notify the scheduler at all\n            // automatically. We do not know that a developer made a change in the listener callback that\n            // requires an `ApplicationRef.tick` (synchronize templates / run render hooks). We do this\n            // only for an easier migration from OnPush components to zoneless. Because listeners are\n            // usually executed inside the Angular zone and listeners automatically call `markViewDirty`,\n            // developers never needed to manually use `ChangeDetectorRef.markForCheck` or some other API\n            // to make listener callbacks work correctly with `OnPush` components.\n            return;\n        }\n        let force = false;\n        switch (source) {\n            case 0 /* NotificationSource.MarkAncestorsForTraversal */: {\n                this.appRef.dirtyFlags |= 2 /* ApplicationRefDirtyFlags.ViewTreeTraversal */;\n                break;\n            }\n            case 3 /* NotificationSource.DebugApplyChanges */:\n            case 2 /* NotificationSource.DeferBlockStateUpdate */:\n            case 4 /* NotificationSource.MarkForCheck */:\n            case 5 /* NotificationSource.Listener */:\n            case 1 /* NotificationSource.SetInput */: {\n                this.appRef.dirtyFlags |= 4 /* ApplicationRefDirtyFlags.ViewTreeCheck */;\n                break;\n            }\n            case 8 /* NotificationSource.DeferredRenderHook */: {\n                // Render hooks are \"deferred\" when they're triggered from other render hooks. Using the\n                // deferred dirty flags ensures that adding new hooks doesn't automatically trigger a loop\n                // inside tick().\n                this.appRef.deferredDirtyFlags |= 8 /* ApplicationRefDirtyFlags.AfterRender */;\n                break;\n            }\n            case 6 /* NotificationSource.CustomElement */: {\n                // We use `ViewTreeTraversal` to ensure we refresh the element even if this is triggered\n                // during CD. In practice this is a no-op since the elements code also calls via a\n                // `markForRefresh()` API which sends `NotificationSource.MarkAncestorsForTraversal` anyway.\n                this.appRef.dirtyFlags |= 2 /* ApplicationRefDirtyFlags.ViewTreeTraversal */;\n                force = true;\n                break;\n            }\n            case 13 /* NotificationSource.RootEffect */: {\n                this.appRef.dirtyFlags |= 16 /* ApplicationRefDirtyFlags.RootEffects */;\n                // Root effects still force a CD, even if the scheduler is disabled. This ensures that\n                // effects always run, even when triggered from outside the zone when the scheduler is\n                // otherwise disabled.\n                force = true;\n                break;\n            }\n            case 14 /* NotificationSource.ViewEffect */: {\n                // This is technically a no-op, since view effects will also send a\n                // `MarkAncestorsForTraversal` notification. Still, we set this for logical consistency.\n                this.appRef.dirtyFlags |= 2 /* ApplicationRefDirtyFlags.ViewTreeTraversal */;\n                // View effects still force a CD, even if the scheduler is disabled. This ensures that\n                // effects always run, even when triggered from outside the zone when the scheduler is\n                // otherwise disabled.\n                force = true;\n                break;\n            }\n            case 12 /* NotificationSource.PendingTaskRemoved */: {\n                // Removing a pending task via the public API forces a scheduled tick, ensuring that\n                // stability is async and delayed until there was at least an opportunity to run\n                // application synchronization. This prevents some footguns when working with the\n                // public API for pending tasks where developers attempt to update application state\n                // immediately after removing the last task.\n                force = true;\n                break;\n            }\n            case 10 /* NotificationSource.ViewDetachedFromDOM */:\n            case 9 /* NotificationSource.ViewAttached */:\n            case 7 /* NotificationSource.RenderHook */:\n            case 11 /* NotificationSource.AsyncAnimationsLoaded */:\n            default: {\n                // These notifications only schedule a tick but do not change whether we should refresh\n                // views. Instead, we only need to run render hooks unless another notification from the\n                // other set is also received before `tick` happens.\n                this.appRef.dirtyFlags |= 8 /* ApplicationRefDirtyFlags.AfterRender */;\n            }\n        }\n        // If not already defined, attempt to capture a tracing snapshot of this\n        // notification so that the resulting CD run can be attributed to the\n        // context which produced the notification.\n        this.appRef.tracingSnapshot = this.tracing?.snapshot(this.appRef.tracingSnapshot) ?? null;\n        if (!this.shouldScheduleTick(force)) {\n            return;\n        }\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (this.useMicrotaskScheduler) {\n                trackMicrotaskNotificationForDebugging();\n            }\n            else {\n                consecutiveMicrotaskNotifications = 0;\n                stackFromLastFewNotifications.length = 0;\n            }\n        }\n        const scheduleCallback = this.useMicrotaskScheduler\n            ? scheduleCallbackWithMicrotask\n            : scheduleCallbackWithRafRace;\n        this.pendingRenderTaskId = this.taskService.add();\n        if (this.scheduleInRootZone) {\n            this.cancelScheduledCallback = Zone.root.run(() => scheduleCallback(() => this.tick()));\n        }\n        else {\n            this.cancelScheduledCallback = this.ngZone.runOutsideAngular(() => scheduleCallback(() => this.tick()));\n        }\n    }\n    shouldScheduleTick(force) {\n        if ((this.disableScheduling && !force) || this.appRef.destroyed) {\n            return false;\n        }\n        // already scheduled or running\n        if (this.pendingRenderTaskId !== null || this.runningTick || this.appRef._runningTick) {\n            return false;\n        }\n        // If we're inside the zone don't bother with scheduler. Zone will stabilize\n        // eventually and run change detection.\n        if (!this.zonelessEnabled &&\n            this.zoneIsDefined &&\n            Zone.current.get(angularZoneInstanceIdProperty + this.angularZoneId)) {\n            return false;\n        }\n        return true;\n    }\n    /**\n     * Calls ApplicationRef._tick inside the `NgZone`.\n     *\n     * Calling `tick` directly runs change detection and cancels any change detection that had been\n     * scheduled previously.\n     *\n     * @param shouldRefreshViews Passed directly to `ApplicationRef._tick` and skips straight to\n     *     render hooks when `false`.\n     */\n    tick() {\n        // When ngZone.run below exits, onMicrotaskEmpty may emit if the zone is\n        // stable. We want to prevent double ticking so we track whether the tick is\n        // already running and skip it if so.\n        if (this.runningTick || this.appRef.destroyed) {\n            return;\n        }\n        // If we reach the tick and there is no work to be done in ApplicationRef.tick,\n        // skip it altogether and clean up. There may be no work if, for example, the only\n        // event that notified the scheduler was the removal of a pending task.\n        if (this.appRef.dirtyFlags === 0 /* ApplicationRefDirtyFlags.None */) {\n            this.cleanup();\n            return;\n        }\n        // The scheduler used to pass \"whether to check views\" as a boolean flag instead of setting\n        // fine-grained dirtiness flags, and global checking was always used on the first pass. This\n        // created an interesting edge case: if a notification made a view dirty and then ticked via the\n        // scheduler (and not the zone) a global check was still performed.\n        //\n        // Ideally, this would not be the case, and only zone-based ticks would do global passes.\n        // However this is a breaking change and requires fixes in g3. Until this cleanup can be done,\n        // we add the `ViewTreeGlobal` flag to request a global check if any views are dirty in a\n        // scheduled tick (unless zoneless is enabled, in which case global checks aren't really a\n        // thing).\n        //\n        // TODO(alxhub): clean up and remove this workaround as a breaking change.\n        if (!this.zonelessEnabled && this.appRef.dirtyFlags & 7 /* ApplicationRefDirtyFlags.ViewTreeAny */) {\n            this.appRef.dirtyFlags |= 1 /* ApplicationRefDirtyFlags.ViewTreeGlobal */;\n        }\n        const task = this.taskService.add();\n        try {\n            this.ngZone.run(() => {\n                this.runningTick = true;\n                this.appRef._tick();\n            }, undefined, this.schedulerTickApplyArgs);\n        }\n        catch (e) {\n            this.taskService.remove(task);\n            throw e;\n        }\n        finally {\n            this.cleanup();\n        }\n        // If we're notified of a change within 1 microtask of running change\n        // detection, run another round in the same event loop. This allows code\n        // which uses Promise.resolve (see NgModel) to avoid\n        // ExpressionChanged...Error to still be reflected in a single browser\n        // paint, even if that spans multiple rounds of change detection.\n        this.useMicrotaskScheduler = true;\n        scheduleCallbackWithMicrotask(() => {\n            this.useMicrotaskScheduler = false;\n            this.taskService.remove(task);\n        });\n    }\n    ngOnDestroy() {\n        this.subscriptions.unsubscribe();\n        this.cleanup();\n    }\n    cleanup() {\n        this.runningTick = false;\n        this.cancelScheduledCallback?.();\n        this.cancelScheduledCallback = null;\n        // If this is the last task, the service will synchronously emit a stable\n        // notification. If there is a subscriber that then acts in a way that\n        // tries to notify the scheduler again, we need to be able to respond to\n        // schedule a new change detection. Therefore, we should clear the task ID\n        // before removing it from the pending tasks (or the tasks service should\n        // not synchronously emit stable, similar to how Zone stableness only\n        // happens if it's still stable after a microtask).\n        if (this.pendingRenderTaskId !== null) {\n            const taskId = this.pendingRenderTaskId;\n            this.pendingRenderTaskId = null;\n            this.taskService.remove(taskId);\n        }\n    }\n    static ɵfac = function ChangeDetectionSchedulerImpl_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ChangeDetectionSchedulerImpl)(); };\n    static ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ChangeDetectionSchedulerImpl, factory: ChangeDetectionSchedulerImpl.ɵfac, providedIn: 'root' });\n}\n(() => { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ChangeDetectionSchedulerImpl, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], () => [], null); })();\n/**\n * Provides change detection without ZoneJS for the application bootstrapped using\n * `bootstrapApplication`.\n *\n * This function allows you to configure the application to not use the state/state changes of\n * ZoneJS to schedule change detection in the application. This will work when ZoneJS is not present\n * on the page at all or if it exists because something else is using it (either another Angular\n * application which uses ZoneJS for scheduling or some other library that relies on ZoneJS).\n *\n * This can also be added to the `TestBed` providers to configure the test environment to more\n * closely match production behavior. This will help give higher confidence that components are\n * compatible with zoneless change detection.\n *\n * ZoneJS uses browser events to trigger change detection. When using this provider, Angular will\n * instead use Angular APIs to schedule change detection. These APIs include:\n *\n * - `ChangeDetectorRef.markForCheck`\n * - `ComponentRef.setInput`\n * - updating a signal that is read in a template\n * - when bound host or template listeners are triggered\n * - attaching a view that was marked dirty by one of the above\n * - removing a view\n * - registering a render hook (templates are only refreshed if render hooks do one of the above)\n *\n * @usageNotes\n * ```ts\n * bootstrapApplication(MyApp, {providers: [\n *   provideExperimentalZonelessChangeDetection(),\n * ]});\n * ```\n *\n * This API is experimental. Neither the shape, nor the underlying behavior is stable and can change\n * in patch versions. There are known feature gaps and API ergonomic considerations. We will iterate\n * on the exact API based on the feedback and our understanding of the problem and solution space.\n *\n * @publicApi\n * @experimental\n * @see [bootstrapApplication](/api/platform-browser/bootstrapApplication)\n */\nfunction provideExperimentalZonelessChangeDetection() {\n    performanceMarkFeature('NgZoneless');\n    if ((typeof ngDevMode === 'undefined' || ngDevMode) && typeof Zone !== 'undefined' && Zone) {\n        const message = formatRuntimeError(914 /* RuntimeErrorCode.UNEXPECTED_ZONEJS_PRESENT_IN_ZONELESS_MODE */, `The application is using zoneless change detection, but is still loading Zone.js. ` +\n            `Consider removing Zone.js to get the full benefits of zoneless. ` +\n            `In applications using the Angular CLI, Zone.js is typically included in the \"polyfills\" section of the angular.json file.`);\n        console.warn(message);\n    }\n    return makeEnvironmentProviders([\n        { provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl },\n        { provide: NgZone, useClass: NoopNgZone },\n        { provide: ZONELESS_ENABLED, useValue: true },\n        { provide: SCHEDULE_IN_ROOT_ZONE, useValue: false },\n        typeof ngDevMode === 'undefined' || ngDevMode\n            ? [{ provide: PROVIDED_ZONELESS, useValue: true }]\n            : [],\n    ]);\n}\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' &&\n        ngI18nClosureMode &&\n        typeof goog !== 'undefined' &&\n        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 (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;\n    }\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/locale-id) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```ts\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 */\nconst LOCALE_ID = new InjectionToken(ngDevMode ? 'LocaleId' : '', {\n    providedIn: 'root',\n    factory: () => inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),\n});\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/locale-id) for more information.\n *\n * <div class=\"docs-alert docs-alert-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 * ```ts\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 */\nconst DEFAULT_CURRENCY_CODE = new InjectionToken(ngDevMode ? 'DefaultCurrencyCode' : '', {\n    providedIn: 'root',\n    factory: () => USD_CURRENCY_CODE,\n});\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 * ```ts\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 */\nconst TRANSLATIONS = new InjectionToken(ngDevMode ? '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 * ```ts\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 */\nconst TRANSLATIONS_FORMAT = new InjectionToken(ngDevMode ? '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/merge#report-missing-translations) for more information.\n *\n * @usageNotes\n * ### Example\n * ```ts\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// A delay in milliseconds before the scan is run after onLoad, to avoid any\n// potential race conditions with other LCP-related functions. This delay\n// happens outside of the main JavaScript execution and will only effect the timing\n// on when the warning becomes visible in the console.\nconst SCAN_DELAY = 200;\nconst OVERSIZED_IMAGE_TOLERANCE = 1200;\nclass ImagePerformanceWarning {\n    // Map of full image URLs -> original `ngSrc` values.\n    window = null;\n    observer = null;\n    options = inject(IMAGE_CONFIG);\n    isBrowser = inject(PLATFORM_ID) === 'browser';\n    lcpImageUrl;\n    start() {\n        if (!this.isBrowser ||\n            typeof PerformanceObserver === 'undefined' ||\n            (this.options?.disableImageSizeWarning && this.options?.disableImageLazyLoadWarning)) {\n            return;\n        }\n        this.observer = this.initPerformanceObserver();\n        const doc = getDocument();\n        const win = doc.defaultView;\n        if (typeof win !== 'undefined') {\n            this.window = win;\n            // Wait to avoid race conditions where LCP image triggers\n            // load event before it's recorded by the performance observer\n            const waitToScan = () => {\n                setTimeout(this.scanImages.bind(this), SCAN_DELAY);\n            };\n            const setup = () => {\n                // Consider the case when the application is created and destroyed multiple times.\n                // Typically, applications are created instantly once the page is loaded, and the\n                // `window.load` listener is always triggered. However, the `window.load` event will never\n                // be fired if the page is loaded, and the application is created later. Checking for\n                // `readyState` is the easiest way to determine whether the page has been loaded or not.\n                if (doc.readyState === 'complete') {\n                    waitToScan();\n                }\n                else {\n                    this.window?.addEventListener('load', waitToScan, { once: true });\n                }\n            };\n            // Angular doesn't have to run change detection whenever any asynchronous tasks are invoked in\n            // the scope of this functionality.\n            if (typeof Zone !== 'undefined') {\n                Zone.root.run(() => setup());\n            }\n            else {\n                setup();\n            }\n        }\n    }\n    ngOnDestroy() {\n        this.observer?.disconnect();\n    }\n    initPerformanceObserver() {\n        if (typeof PerformanceObserver === 'undefined') {\n            return null;\n        }\n        const observer = new PerformanceObserver((entryList) => {\n            const entries = entryList.getEntries();\n            if (entries.length === 0)\n                return;\n            // We use the latest entry produced by the `PerformanceObserver` as the best\n            // signal on which element is actually an LCP one. As an example, the first image to load on\n            // a page, by virtue of being the only thing on the page so far, is often a LCP candidate\n            // and gets reported by PerformanceObserver, but isn't necessarily the LCP element.\n            const lcpElement = entries[entries.length - 1];\n            // Cast to `any` due to missing `element` on the `LargestContentfulPaint` type of entry.\n            // See https://developer.mozilla.org/en-US/docs/Web/API/LargestContentfulPaint\n            const imgSrc = lcpElement.element?.src ?? '';\n            // Exclude `data:` and `blob:` URLs, since they are fetched resources.\n            if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:'))\n                return;\n            this.lcpImageUrl = imgSrc;\n        });\n        observer.observe({ type: 'largest-contentful-paint', buffered: true });\n        return observer;\n    }\n    scanImages() {\n        const images = getDocument().querySelectorAll('img');\n        let lcpElementFound, lcpElementLoadedCorrectly = false;\n        images.forEach((image) => {\n            if (!this.options?.disableImageSizeWarning) {\n                // Image elements using the NgOptimizedImage directive are excluded,\n                // as that directive has its own version of this check.\n                if (!image.getAttribute('ng-img') && this.isOversized(image)) {\n                    logOversizedImageWarning(image.src);\n                }\n            }\n            if (!this.options?.disableImageLazyLoadWarning && this.lcpImageUrl) {\n                if (image.src === this.lcpImageUrl) {\n                    lcpElementFound = true;\n                    if (image.loading !== 'lazy' || image.getAttribute('ng-img')) {\n                        // This variable is set to true and never goes back to false to account\n                        // for the case where multiple images have the same src url, and some\n                        // have lazy loading while others don't.\n                        // Also ignore NgOptimizedImage because there's a different warning for that.\n                        lcpElementLoadedCorrectly = true;\n                    }\n                }\n            }\n        });\n        if (lcpElementFound &&\n            !lcpElementLoadedCorrectly &&\n            this.lcpImageUrl &&\n            !this.options?.disableImageLazyLoadWarning) {\n            logLazyLCPWarning(this.lcpImageUrl);\n        }\n    }\n    isOversized(image) {\n        if (!this.window) {\n            return false;\n        }\n        // The `isOversized` check may not be applicable or may require adjustments\n        // for several types of image formats or scenarios. Currently, we specify only\n        // `svg`, but this may also include `gif` since their quality isn’t tied to\n        // dimensions in the same way as raster images.\n        const nonOversizedImageExtentions = [\n            // SVG images are vector-based, which means they can scale\n            // to any size without losing quality.\n            '.svg',\n        ];\n        // Convert it to lowercase because this may have uppercase\n        // extensions, such as `IMAGE.SVG`.\n        // We fallback to an empty string because `src` may be `undefined`\n        // if it is explicitly set to `null` by some third-party code\n        // (e.g., `image.src = null`).\n        const imageSource = (image.src || '').toLowerCase();\n        if (nonOversizedImageExtentions.some((extension) => imageSource.endsWith(extension))) {\n            return false;\n        }\n        const computedStyle = this.window.getComputedStyle(image);\n        let renderedWidth = parseFloat(computedStyle.getPropertyValue('width'));\n        let renderedHeight = parseFloat(computedStyle.getPropertyValue('height'));\n        const boxSizing = computedStyle.getPropertyValue('box-sizing');\n        const objectFit = computedStyle.getPropertyValue('object-fit');\n        if (objectFit === `cover`) {\n            // Object fit cover may indicate a use case such as a sprite sheet where\n            // this warning does not apply.\n            return false;\n        }\n        if (boxSizing === 'border-box') {\n            // If the image `box-sizing` is set to `border-box`, we adjust the rendered\n            // dimensions by subtracting padding values.\n            const paddingTop = computedStyle.getPropertyValue('padding-top');\n            const paddingRight = computedStyle.getPropertyValue('padding-right');\n            const paddingBottom = computedStyle.getPropertyValue('padding-bottom');\n            const paddingLeft = computedStyle.getPropertyValue('padding-left');\n            renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft);\n            renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom);\n        }\n        const intrinsicWidth = image.naturalWidth;\n        const intrinsicHeight = image.naturalHeight;\n        const recommendedWidth = this.window.devicePixelRatio * renderedWidth;\n        const recommendedHeight = this.window.devicePixelRatio * renderedHeight;\n        const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;\n        const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;\n        return oversizedWidth || oversizedHeight;\n    }\n    static ɵfac = function ImagePerformanceWarning_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ImagePerformanceWarning)(); };\n    static ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ImagePerformanceWarning, factory: ImagePerformanceWarning.ɵfac, providedIn: 'root' });\n}\n(() => { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ImagePerformanceWarning, [{\n        type: Injectable,\n        args: [{ providedIn: 'root' }]\n    }], null, null); })();\nfunction logLazyLCPWarning(src) {\n    console.warn(formatRuntimeError(-913 /* RuntimeErrorCode.IMAGE_PERFORMANCE_WARNING */, `An image with src ${src} is the Largest Contentful Paint (LCP) element ` +\n        `but was given a \"loading\" value of \"lazy\", which can negatively impact ` +\n        `application loading performance. This warning can be addressed by ` +\n        `changing the loading value of the LCP image to \"eager\", or by using the ` +\n        `NgOptimizedImage directive's prioritization utilities. For more ` +\n        `information about addressing or disabling this warning, see ` +\n        `https://angular.dev/errors/NG0913`));\n}\nfunction logOversizedImageWarning(src) {\n    console.warn(formatRuntimeError(-913 /* RuntimeErrorCode.IMAGE_PERFORMANCE_WARNING */, `An image with src ${src} has intrinsic file dimensions much larger than its ` +\n        `rendered size. This can negatively impact application loading performance. ` +\n        `For more information about addressing or disabling this warning, see ` +\n        `https://angular.dev/errors/NG0913`));\n}\n\n/**\n * Internal token that allows to register extra callbacks that should be invoked during the\n * `PlatformRef.destroy` operation. This token is needed to avoid a direct reference to the\n * `PlatformRef` class (i.e. register the callback via `PlatformRef.onDestroy`), thus making the\n * entire class tree-shakeable.\n */\nconst PLATFORM_DESTROY_LISTENERS = new InjectionToken(ngDevMode ? 'PlatformDestroyListeners' : '');\n\n/**\n * InjectionToken to control root component bootstrap behavior.\n *\n * This token is primarily used in Angular's server-side rendering (SSR) scenarios,\n * particularly by the `@angular/ssr` package, to manage whether the root component\n * should be bootstrapped during the application initialization process.\n *\n * ## Purpose:\n * During SSR route extraction, setting this token to `false` prevents Angular from\n * bootstrapping the root component. This avoids unnecessary component rendering,\n * enabling route extraction without requiring additional APIs or triggering\n * component logic.\n *\n * ## Behavior:\n * - **`false`**: Prevents the root component from being bootstrapped.\n * - **`true`** (default): Proceeds with the normal root component bootstrap process.\n *\n * This mechanism ensures SSR can efficiently separate route extraction logic\n * from component rendering.\n */\nconst ENABLE_ROOT_COMPONENT_BOOTSTRAP = new InjectionToken(ngDevMode ? 'ENABLE_ROOT_COMPONENT_BOOTSTRAP' : '');\nfunction isApplicationBootstrapConfig(config) {\n    return !config.moduleRef;\n}\nfunction bootstrap(config) {\n    const envInjector = isApplicationBootstrapConfig(config)\n        ? config.r3Injector\n        : config.moduleRef.injector;\n    const ngZone = envInjector.get(NgZone);\n    return ngZone.run(() => {\n        if (isApplicationBootstrapConfig(config)) {\n            config.r3Injector.resolveInjectorInitializers();\n        }\n        else {\n            config.moduleRef.resolveInjectorInitializers();\n        }\n        const exceptionHandler = envInjector.get(ErrorHandler, null);\n        if (typeof ngDevMode === 'undefined' || ngDevMode) {\n            if (exceptionHandler === null) {\n                const errorMessage = isApplicationBootstrapConfig(config)\n                    ? 'No `ErrorHandler` found in the Dependency Injection tree.'\n                    : 'No ErrorHandler. Is platform module (BrowserModule) included';\n                throw new RuntimeError(402 /* RuntimeErrorCode.MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP */, errorMessage);\n            }\n            if (envInjector.get(PROVIDED_ZONELESS) && envInjector.get(PROVIDED_NG_ZONE)) {\n                throw new RuntimeError(408 /* RuntimeErrorCode.PROVIDED_BOTH_ZONE_AND_ZONELESS */, 'Invalid change detection configuration: ' +\n                    'provideZoneChangeDetection and provideExperimentalZonelessChangeDetection cannot be used together.');\n            }\n        }\n        let onErrorSubscription;\n        ngZone.runOutsideAngular(() => {\n            onErrorSubscription = ngZone.onError.subscribe({\n                next: (error) => {\n                    exceptionHandler.handleError(error);\n                },\n            });\n        });\n        // If the whole platform is destroyed, invoke the `destroy` method\n        // for all bootstrapped applications as well.\n        if (isApplicationBootstrapConfig(config)) {\n            const destroyListener = () => envInjector.destroy();\n            const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);\n            onPlatformDestroyListeners.add(destroyListener);\n            envInjector.onDestroy(() => {\n                onErrorSubscription.unsubscribe();\n                onPlatformDestroyListeners.delete(destroyListener);\n            });\n        }\n        else {\n            const destroyListener = () => config.moduleRef.destroy();\n            const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);\n            onPlatformDestroyListeners.add(destroyListener);\n            config.moduleRef.onDestroy(() => {\n                remove(config.allPlatformModules, config.moduleRef);\n                onErrorSubscription.unsubscribe();\n                onPlatformDestroyListeners.delete(destroyListener);\n            });\n        }\n        return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {\n            const initStatus = envInjector.get(ApplicationInitStatus);\n            initStatus.runInitializers();\n            return initStatus.donePromise.then(() => {\n                // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n                const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);\n                setLocaleId(localeId || DEFAULT_LOCALE_ID);\n                const enableRootComponentBoostrap = envInjector.get(ENABLE_ROOT_COMPONENT_BOOTSTRAP, true);\n                if (!enableRootComponentBoostrap) {\n                    if (isApplicationBootstrapConfig(config)) {\n                        return envInjector.get(ApplicationRef);\n                    }\n                    config.allPlatformModules.push(config.moduleRef);\n                    return config.moduleRef;\n                }\n                if (typeof ngDevMode === 'undefined' || ngDevMode) {\n                    const imagePerformanceService = envInjector.get(ImagePerformanceWarning);\n                    imagePerformanceService.start();\n                }\n                if (isApplicationBootstrapConfig(config)) {\n                    const appRef = envInjector.get(ApplicationRef);\n                    if (config.rootComponent !== undefined) {\n                        appRef.bootstrap(config.rootComponent);\n                    }\n                    return appRef;\n                }\n                else {\n                    moduleDoBootstrap(config.moduleRef, config.allPlatformModules);\n                    return config.moduleRef;\n                }\n            });\n        });\n    });\n}\nfunction moduleDoBootstrap(moduleRef, allPlatformModules) {\n    const appRef = moduleRef.injector.get(ApplicationRef);\n    if (moduleRef._bootstrapComponents.length > 0) {\n        moduleRef._bootstrapComponents.forEach((f) => appRef.bootstrap(f));\n    }\n    else if (moduleRef.instance.ngDoBootstrap) {\n        moduleRef.instance.ngDoBootstrap(appRef);\n    }\n    else {\n        throw new RuntimeError(-403 /* RuntimeErrorCode.BOOTSTRAP_COMPONENTS_NOT_FOUND */, ngDevMode &&\n            `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, ` +\n                `but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` +\n                `Please define one of these.`);\n    }\n    allPlatformModules.push(moduleRef);\n}\n\n/**\n * The Angular platform is the entry point for Angular on a web page.\n * Each page has exactly one platform. Services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n * A page's platform is initialized implicitly when a platform is created using a platform\n * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.\n *\n * @publicApi\n */\nclass PlatformRef {\n    _injector;\n    _modules = [];\n    _destroyListeners = [];\n    _destroyed = false;\n    /** @internal */\n    constructor(_injector) {\n        this._injector = _injector;\n    }\n    /**\n     * Creates an instance of an `@NgModule` for the given platform.\n     *\n     * @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function\n     *     argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.\n     */\n    bootstrapModuleFactory(moduleFactory, options) {\n        const scheduleInRootZone = options?.scheduleInRootZone;\n        const ngZoneFactory = () => getNgZone(options?.ngZone, {\n            ...getNgZoneOptions({\n                eventCoalescing: options?.ngZoneEventCoalescing,\n                runCoalescing: options?.ngZoneRunCoalescing,\n            }),\n            scheduleInRootZone,\n        });\n        const ignoreChangesOutsideZone = options?.ignoreChangesOutsideZone;\n        const allAppProviders = [\n            internalProvideZoneChangeDetection({\n                ngZoneFactory,\n                ignoreChangesOutsideZone,\n            }),\n            { provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl },\n        ];\n        const moduleRef = createNgModuleRefWithProviders(moduleFactory.moduleType, this.injector, allAppProviders);\n        return bootstrap({\n            moduleRef,\n            allPlatformModules: this._modules,\n            platformInjector: this.injector,\n        });\n    }\n    /**\n     * Creates an instance of an `@NgModule` for a given platform.\n     *\n     * @usageNotes\n     * ### Simple Example\n     *\n     * ```ts\n     * @NgModule({\n     *   imports: [BrowserModule]\n     * })\n     * class MyModule {}\n     *\n     * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n     * ```\n     *\n     */\n    bootstrapModule(moduleType, compilerOptions = []) {\n        const options = optionsReducer({}, compilerOptions);\n        return compileNgModuleFactory(this.injector, options, moduleType).then((moduleFactory) => this.bootstrapModuleFactory(moduleFactory, options));\n    }\n    /**\n     * Registers a listener to be called when the platform is destroyed.\n     */\n    onDestroy(callback) {\n        this._destroyListeners.push(callback);\n    }\n    /**\n     * Retrieves the platform {@link Injector}, which is the parent injector for\n     * every Angular application on the page and provides singleton providers.\n     */\n    get injector() {\n        return this._injector;\n    }\n    /**\n     * Destroys the current Angular platform and all Angular applications on the page.\n     * Destroys all modules and listeners registered with the platform.\n     */\n    destroy() {\n        if (this._destroyed) {\n            throw new RuntimeError(404 /* RuntimeErrorCode.PLATFORM_ALREADY_DESTROYED */, ngDevMode && 'The platform has already been destroyed!');\n        }\n        this._modules.slice().forEach((module) => module.destroy());\n        this._destroyListeners.forEach((listener) => listener());\n        const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null);\n        if (destroyListeners) {\n            destroyListeners.forEach((listener) => listener());\n            destroyListeners.clear();\n        }\n        this._destroyed = true;\n    }\n    /**\n     * Indicates whether this instance was destroyed.\n     */\n    get destroyed() {\n        return this._destroyed;\n    }\n    static ɵfac = function PlatformRef_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PlatformRef)(ɵɵinject(Injector)); };\n    static ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: PlatformRef, factory: PlatformRef.ɵfac, providedIn: 'platform' });\n}\n(() => { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(PlatformRef, [{\n        type: Injectable,\n        args: [{ providedIn: 'platform' }]\n    }], () => [{ type: Injector }], null); })();\n\nlet _platformInjector = null;\n/**\n * Internal token to indicate whether having multiple bootstrapped platform should be allowed (only\n * one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.\n */\nconst ALLOW_MULTIPLE_PLATFORMS = new InjectionToken(ngDevMode ? 'AllowMultipleToken' : '');\n/**\n * Creates a platform.\n * Platforms must be created on launch using this function.\n *\n * @publicApi\n */\nfunction createPlatform(injector) {\n    if (_platformInjector && !_platformInjector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n        throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.');\n    }\n    publishDefaultGlobalUtils();\n    publishSignalConfiguration();\n    _platformInjector = injector;\n    const platform = injector.get(PlatformRef);\n    runPlatformInitializers(injector);\n    return platform;\n}\n/**\n * Creates a factory for a platform. Can be used to provide or override `Providers` specific to\n * your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.\n * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories\n * to build up configurations that might be required by different libraries or parts of the\n * application.\n * @param name Identifies the new platform factory.\n * @param providers A set of dependency providers for platforms created with the new factory.\n *\n * @publicApi\n */\nfunction createPlatformFactory(parentPlatformFactory, name, providers = []) {\n    const desc = `Platform: ${name}`;\n    const marker = new InjectionToken(desc);\n    return (extraProviders = []) => {\n        let platform = getPlatform();\n        if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n            const platformProviders = [\n                ...providers,\n                ...extraProviders,\n                { provide: marker, useValue: true },\n            ];\n            if (parentPlatformFactory) {\n                parentPlatformFactory(platformProviders);\n            }\n            else {\n                createPlatform(createPlatformInjector(platformProviders, desc));\n            }\n        }\n        return assertPlatform(marker);\n    };\n}\n/**\n * Helper function to create an instance of a platform injector (that maintains the 'platform'\n * scope).\n */\nfunction createPlatformInjector(providers = [], name) {\n    return Injector.create({\n        name,\n        providers: [\n            { provide: INJECTOR_SCOPE, useValue: 'platform' },\n            { provide: PLATFORM_DESTROY_LISTENERS, useValue: new Set([() => (_platformInjector = null)]) },\n            ...providers,\n        ],\n    });\n}\n/**\n * Checks that there is currently a platform that contains the given token as a provider.\n *\n * @publicApi\n */\nfunction assertPlatform(requiredToken) {\n    const platform = getPlatform();\n    if (!platform) {\n        throw new RuntimeError(401 /* RuntimeErrorCode.PLATFORM_NOT_FOUND */, ngDevMode && 'No platform exists!');\n    }\n    if ((typeof ngDevMode === 'undefined' || ngDevMode) &&\n        !platform.injector.get(requiredToken, null)) {\n        throw new RuntimeError(400 /* RuntimeErrorCode.MULTIPLE_PLATFORMS */, 'A platform with a different configuration has been created. Please destroy it first.');\n    }\n    return platform;\n}\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nfunction getPlatform() {\n    return _platformInjector?.get(PlatformRef) ?? null;\n}\n/**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n *\n * @publicApi\n */\nfunction destroyPlatform() {\n    getPlatform()?.destroy();\n}\n/**\n * The goal of this function is to bootstrap a platform injector,\n * but avoid referencing `PlatformRef` class.\n * This function is needed for bootstrapping a Standalone Component.\n */\nfunction createOrReusePlatformInjector(providers = []) {\n    // If a platform injector already exists, it means that the platform\n    // is already bootstrapped and no additional actions are required.\n    if (_platformInjector)\n        return _platformInjector;\n    publishDefaultGlobalUtils();\n    // Otherwise, setup a new platform injector and run platform initializers.\n    const injector = createPlatformInjector(providers);\n    _platformInjector = injector;\n    publishSignalConfiguration();\n    runPlatformInitializers(injector);\n    return injector;\n}\n/**\n * @description\n * This function is used to provide initialization functions that will be executed upon\n * initialization of the platform injector.\n *\n * Note that the provided initializer is run in the injection context.\n *\n * Previously, this was achieved using the `PLATFORM_INITIALIZER` token which is now deprecated.\n *\n * @see {@link PLATFORM_INITIALIZER}\n *\n * @publicApi\n */\nfunction providePlatformInitializer(initializerFn) {\n    return makeEnvironmentProviders([\n        {\n            provide: PLATFORM_INITIALIZER,\n            useValue: initializerFn,\n            multi: true,\n        },\n    ]);\n}\nfunction runPlatformInitializers(injector) {\n    const inits = injector.get(PLATFORM_INITIALIZER, null);\n    runInInjectionContext(injector, () => {\n        inits?.forEach((init) => init());\n    });\n}\n\n/**\n * Used to periodically verify no expressions have changed after they were checked.\n *\n * @param options Used to configure when the check will execute.\n *   - `interval` will periodically run exhaustive `checkNoChanges` on application views\n *   - `useNgZoneOnStable` will use ZoneJS to determine when change detection might have run\n *      in an application using ZoneJS to drive change detection. When the `NgZone.onStable` would\n *      have emitted, all views attached to the `ApplicationRef` are checked for changes.\n *   - 'exhaustive' means that all views attached to `ApplicationRef` and all the descendants of those views will be\n *     checked for changes (excluding those subtrees which are detached via `ChangeDetectorRef.detach()`).\n *     This is useful because the check that runs after regular change detection does not work for components using `ChangeDetectionStrategy.OnPush`.\n *     This check is will surface any existing errors hidden by `OnPush` components. By default, this check is exhaustive\n *     and will always check all views, regardless of their \"dirty\" state and `ChangeDetectionStrategy`.\n *\n * When the `useNgZoneOnStable` option is `true`, this function will provide its own `NgZone` implementation and needs\n * to come after any other `NgZone` provider, including `provideZoneChangeDetection()` and `provideExperimentalZonelessChangeDetection()`.\n *\n * @experimental\n * @publicApi\n */\nfunction provideExperimentalCheckNoChangesForDebug(options) {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        if (options.interval === undefined && !options.useNgZoneOnStable) {\n            throw new Error('Must provide one of `useNgZoneOnStable` or `interval`');\n        }\n        const checkNoChangesMode = options?.exhaustive === false\n            ? CheckNoChangesMode.OnlyDirtyViews\n            : CheckNoChangesMode.Exhaustive;\n        return makeEnvironmentProviders([\n            options?.useNgZoneOnStable\n                ? { provide: NgZone, useFactory: () => new DebugNgZoneForCheckNoChanges(checkNoChangesMode) }\n                : [],\n            options?.interval !== undefined\n                ? exhaustiveCheckNoChangesInterval(options.interval, checkNoChangesMode)\n                : [],\n            {\n                provide: ENVIRONMENT_INITIALIZER,\n                multi: true,\n                useValue: () => {\n                    if (options?.useNgZoneOnStable &&\n                        !(inject(NgZone) instanceof DebugNgZoneForCheckNoChanges)) {\n                        throw new Error('`provideExperimentalCheckNoChangesForDebug` with `useNgZoneOnStable` must be after any other provider for `NgZone`.');\n                    }\n                },\n            },\n        ]);\n    }\n    else {\n        return makeEnvironmentProviders([]);\n    }\n}\nclass DebugNgZoneForCheckNoChanges extends NgZone {\n    checkNoChangesMode;\n    applicationRef;\n    scheduler;\n    errorHandler;\n    injector = inject(EnvironmentInjector);\n    constructor(checkNoChangesMode) {\n        const zonelessEnabled = inject(ZONELESS_ENABLED);\n        // Use coalescing to ensure we aren't ever running this check synchronously\n        super({\n            shouldCoalesceEventChangeDetection: true,\n            shouldCoalesceRunChangeDetection: zonelessEnabled,\n        });\n        this.checkNoChangesMode = checkNoChangesMode;\n        if (zonelessEnabled) {\n            // prevent emits to ensure code doesn't rely on these\n            this.onMicrotaskEmpty.emit = () => { };\n            this.onStable.emit = () => {\n                this.scheduler ||= this.injector.get(ChangeDetectionSchedulerImpl);\n                if (this.scheduler.pendingRenderTaskId || this.scheduler.runningTick) {\n                    return;\n                }\n                this.checkApplicationViews();\n            };\n            this.onUnstable.emit = () => { };\n        }\n        else {\n            this.runOutsideAngular(() => {\n                this.onStable.subscribe(() => {\n                    this.checkApplicationViews();\n                });\n            });\n        }\n    }\n    checkApplicationViews() {\n        this.applicationRef ||= this.injector.get(ApplicationRef);\n        for (const view of this.applicationRef.allViews) {\n            try {\n                checkNoChangesInternal(view._lView, this.checkNoChangesMode, view.notifyErrorHandler);\n            }\n            catch (e) {\n                this.errorHandler ||= this.injector.get(ErrorHandler);\n                this.errorHandler.handleError(e);\n            }\n        }\n    }\n}\nfunction exhaustiveCheckNoChangesInterval(interval, checkNoChangesMode) {\n    return {\n        provide: ENVIRONMENT_INITIALIZER,\n        multi: true,\n        useFactory: () => {\n            const applicationRef = inject(ApplicationRef);\n            const errorHandler = inject(ErrorHandler);\n            const scheduler = inject(ChangeDetectionSchedulerImpl);\n            const ngZone = inject(NgZone);\n            return () => {\n                function scheduleCheckNoChanges() {\n                    ngZone.runOutsideAngular(() => {\n                        setTimeout(() => {\n                            if (applicationRef.destroyed) {\n                                return;\n                            }\n                            if (scheduler.pendingRenderTaskId || scheduler.runningTick) {\n                                scheduleCheckNoChanges();\n                                return;\n                            }\n                            for (const view of applicationRef.allViews) {\n                                try {\n                                    checkNoChangesInternal(view._lView, checkNoChangesMode, view.notifyErrorHandler);\n                                }\n                                catch (e) {\n                                    errorHandler.handleError(e);\n                                }\n                            }\n                            scheduleCheckNoChanges();\n                        }, interval);\n                    });\n                }\n                scheduleCheckNoChanges();\n            };\n        },\n    };\n}\n\n/**\n * Returns whether Angular is in development mode.\n *\n * By default, this is true, unless `enableProdMode` is invoked prior to calling this method or the\n * application is built using the Angular CLI with the `optimization` option.\n * @see {@link cli/build ng build}\n *\n * @publicApi\n */\nfunction isDevMode() {\n    return typeof ngDevMode === 'undefined' || !!ngDevMode;\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 * Using this method is discouraged as the Angular CLI will set production mode when using the\n * `optimization` option.\n * @see {@link cli/build ng build}\n *\n * @publicApi\n */\nfunction enableProdMode() {\n    // The below check is there so when ngDevMode is set via terser\n    // `global['ngDevMode'] = false;` is also dropped.\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        _global['ngDevMode'] = false;\n    }\n}\n\n// Public API for render\n\n/**\n * Returns the NgModuleFactory with the given id (specified using [@NgModule.id\n * field](api/core/NgModule#id)), if it exists and has been loaded. Factories for NgModules that do\n * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.\n * @publicApi\n * @deprecated Use `getNgModuleById` instead.\n */\nfunction getModuleFactory(id) {\n    const type = getRegisteredNgModuleType(id);\n    if (!type)\n        throw noModuleError(id);\n    return new NgModuleFactory(type);\n}\n/**\n * Returns the NgModule class with the given id (specified using [@NgModule.id\n * field](api/core/NgModule#id)), if it exists and has been loaded. Classes for NgModules that do\n * not specify an `id` cannot be retrieved. Throws if an NgModule cannot be found.\n * @publicApi\n */\nfunction getNgModuleById(id) {\n    const type = getRegisteredNgModuleType(id);\n    if (!type)\n        throw noModuleError(id);\n    return type;\n}\nfunction noModuleError(id) {\n    return new Error(`No module with ID ${id} loaded`);\n}\n\n/**\n * Base class that 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 re-rendered.\n *\n * @see [Using change detection hooks](guide/components/lifecycle#using-change-detection-hooks)\n * @see [Defining custom change detection](guide/components/lifecycle#defining-custom-change-detection)\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.\n *\n * {@example core/ts/change_detect/change-detection.ts region='mark-for-check'}\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 * {@example core/ts/change_detect/change-detection.ts region='detach'}\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 * {@example core/ts/change_detect/change-detection.ts region='reattach'}\n *\n * @publicApi\n */\nclass ChangeDetectorRef {\n    /**\n     * @internal\n     * @nocollapse\n     */\n    static __NG_ELEMENT_ID__ = injectChangeDetectorRef;\n}\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nfunction injectChangeDetectorRef(flags) {\n    return createViewRef(getCurrentTNode(), getLView(), (flags & 16 /* InternalInjectFlags.ForPipe */) === 16 /* InternalInjectFlags.ForPipe */);\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    if (isComponentHost(tNode) && !isPipe) {\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        const componentView = getComponentLViewByIndex(tNode.index, lView); // look down\n        return new ViewRef$1(componentView, componentView);\n    }\n    else if (tNode.type &\n        (3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */ | 32 /* TNodeType.Icu */ | 128 /* TNodeType.LetDeclaration */)) {\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        const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up\n        return new ViewRef$1(hostComponentView, lView);\n    }\n    return null;\n}\n\n/**\n * Represents an Angular view.\n *\n * @see [Change detection usage](/api/core/ChangeDetectorRef?tab=usage-notes)\n *\n * @publicApi\n */\nclass ViewRef extends ChangeDetectorRef {\n}\n/**\n * Represents an Angular view in a view container.\n * An embedded view 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 {@link 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 * ```html\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 * ```html\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 * ```html\n *   <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```html\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 */\nclass EmbeddedViewRef extends ViewRef {\n}\n\n// Public API for compiler\n\n// This file exists for easily patching NgModuleFactoryLoader in g3\nvar ng_module_factory_loader_impl = {};\n\n/**\n * @publicApi\n */\nclass DebugEventListener {\n    name;\n    callback;\n    constructor(name, callback) {\n        this.name = name;\n        this.callback = callback;\n    }\n}\n/**\n * @publicApi\n */\nfunction asNativeElements(debugEls) {\n    return debugEls.map((el) => el.nativeElement);\n}\n/**\n * @publicApi\n */\nclass DebugNode {\n    /**\n     * The underlying DOM node.\n     */\n    nativeNode;\n    constructor(nativeNode) {\n        this.nativeNode = nativeNode;\n    }\n    /**\n     * The `DebugElement` parent. Will be `null` if this is the root element.\n     */\n    get parent() {\n        const parent = this.nativeNode.parentNode;\n        return parent ? new DebugElement(parent) : null;\n    }\n    /**\n     * The host dependency injector. For example, the root element's component instance injector.\n     */\n    get injector() {\n        return getInjector(this.nativeNode);\n    }\n    /**\n     * The element's own component instance, if it has one.\n     */\n    get componentInstance() {\n        const nativeElement = this.nativeNode;\n        return (nativeElement && (getComponent(nativeElement) || getOwningComponent(nativeElement)));\n    }\n    /**\n     * An object that provides parent context for this element. Often an ancestor component instance\n     * that governs this element.\n     *\n     * When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`\n     * property is the value of the row instance value. For example, the `hero` in `*ngFor=\"let hero\n     * of heroes\"`.\n     */\n    get context() {\n        return getComponent(this.nativeNode) || getContext(this.nativeNode);\n    }\n    /**\n     * The callbacks attached to the component's @Output properties and/or the element's event\n     * properties.\n     */\n    get listeners() {\n        return getListeners(this.nativeNode).filter((listener) => listener.type === 'dom');\n    }\n    /**\n     * Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local\n     * variable name.\n     */\n    get references() {\n        return getLocalRefs(this.nativeNode);\n    }\n    /**\n     * This component's injector lookup tokens. Includes the component itself plus the tokens that the\n     * component lists in its providers metadata.\n     */\n    get providerTokens() {\n        return getInjectionTokens(this.nativeNode);\n    }\n}\n/**\n * @publicApi\n *\n * @see [Component testing scenarios](guide/testing/components-scenarios)\n * @see [Basics of testing components](guide/testing/components-basics)\n * @see [Testing utility APIs](guide/testing/utility-apis)\n */\nclass DebugElement extends DebugNode {\n    constructor(nativeNode) {\n        ngDevMode && assertDomNode(nativeNode);\n        super(nativeNode);\n    }\n    /**\n     * The underlying DOM element at the root of the component.\n     */\n    get nativeElement() {\n        return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;\n    }\n    /**\n     * The element tag name, if it is an element.\n     */\n    get name() {\n        const context = getLContext(this.nativeNode);\n        const lView = context ? context.lView : null;\n        if (lView !== null) {\n            const tData = lView[TVIEW].data;\n            const tNode = tData[context.nodeIndex];\n            return tNode.value;\n        }\n        else {\n            return this.nativeNode.nodeName;\n        }\n    }\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 properties() {\n        const context = getLContext(this.nativeNode);\n        const lView = context ? context.lView : null;\n        if (lView === null) {\n            return {};\n        }\n        const tData = lView[TVIEW].data;\n        const tNode = tData[context.nodeIndex];\n        const 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    /**\n     *  A map of attribute names to attribute values for an element.\n     */\n    // TODO: replace null by undefined in the return type\n    get attributes() {\n        const attributes = {};\n        const element = this.nativeElement;\n        if (!element) {\n            return attributes;\n        }\n        const context = getLContext(element);\n        const lView = context ? context.lView : null;\n        if (lView === null) {\n            return {};\n        }\n        const tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;\n        const 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            let i = 0;\n            while (i < tNodeAttrs.length) {\n                const 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                const attrValue = tNodeAttrs[i + 1];\n                attributes[attrName] = attrValue;\n                lowercaseTNodeAttrs.push(attrName.toLowerCase());\n                i += 2;\n            }\n        }\n        for (const attr of element.attributes) {\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.includes(attr.name)) {\n                attributes[attr.name] = attr.value;\n            }\n        }\n        return attributes;\n    }\n    /**\n     * The inline styles of the DOM element.\n     */\n    // TODO: replace null by undefined in the return type\n    get styles() {\n        const element = this.nativeElement;\n        return (element?.style ?? {});\n    }\n    /**\n     * A map containing the class names on the element as keys.\n     *\n     * This map is derived from the `className` property of the DOM element.\n     *\n     * Note: The values of this object will always be `true`. The class key will not appear in the KV\n     * object if it does not exist on the element.\n     *\n     * @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)\n     */\n    get classes() {\n        const result = {};\n        const element = this.nativeElement;\n        // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n        const className = element.className;\n        const classes = typeof className !== 'string' ? className.baseVal.split(' ') : className.split(' ');\n        classes.forEach((value) => (result[value] = true));\n        return result;\n    }\n    /**\n     * The `childNodes` of the DOM element as a `DebugNode` array.\n     *\n     * @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)\n     */\n    get childNodes() {\n        const childNodes = this.nativeNode.childNodes;\n        const children = [];\n        for (let i = 0; i < childNodes.length; i++) {\n            const element = childNodes[i];\n            children.push(getDebugNode(element));\n        }\n        return children;\n    }\n    /**\n     * The immediate `DebugElement` children. Walk the tree by descending through `children`.\n     */\n    get children() {\n        const nativeElement = this.nativeElement;\n        if (!nativeElement)\n            return [];\n        const childNodes = nativeElement.children;\n        const children = [];\n        for (let i = 0; i < childNodes.length; i++) {\n            const element = childNodes[i];\n            children.push(getDebugNode(element));\n        }\n        return children;\n    }\n    /**\n     * @returns the first `DebugElement` that matches the predicate at any depth in the subtree.\n     */\n    query(predicate) {\n        const results = this.queryAll(predicate);\n        return results[0] || null;\n    }\n    /**\n     * @returns All `DebugElement` matches for the predicate at any depth in the subtree.\n     */\n    queryAll(predicate) {\n        const matches = [];\n        _queryAll(this, predicate, matches, true);\n        return matches;\n    }\n    /**\n     * @returns All `DebugNode` matches for the predicate at any depth in the subtree.\n     */\n    queryAllNodes(predicate) {\n        const matches = [];\n        _queryAll(this, predicate, matches, false);\n        return matches;\n    }\n    /**\n     * Triggers the event by its name if there is a corresponding listener in the element's\n     * `listeners` collection.\n     *\n     * If the event lacks a listener or there's some other problem, consider\n     * calling `nativeElement.dispatchEvent(eventObject)`.\n     *\n     * @param eventName The name of the event to trigger\n     * @param eventObj The _event object_ expected by the handler\n     *\n     * @see [Testing components scenarios](guide/testing/components-scenarios#trigger-event-handler)\n     */\n    triggerEventHandler(eventName, eventObj) {\n        const node = this.nativeNode;\n        const invokedListeners = [];\n        this.listeners.forEach((listener) => {\n            if (listener.name === eventName) {\n                const 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((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                    const unwrappedListener = listener('__ngUnwrap__');\n                    return (invokedListeners.indexOf(unwrappedListener) === -1 &&\n                        unwrappedListener.call(node, eventObj));\n                }\n            });\n        }\n    }\n}\nfunction copyDomProperties(element, properties) {\n    if (element) {\n        // Skip own properties (as those are patched)\n        let obj = Object.getPrototypeOf(element);\n        const NodePrototype = Node.prototype;\n        while (obj !== null && obj !== NodePrototype) {\n            const descriptors = Object.getOwnPropertyDescriptors(obj);\n            for (let 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                    const 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' ||\n        typeof value === 'boolean' ||\n        typeof value === 'number' ||\n        value === null);\n}\nfunction _queryAll(parentElement, predicate, matches, elementsOnly) {\n    const context = getLContext(parentElement.nativeNode);\n    const lView = context ? context.lView : null;\n    if (lView !== null) {\n        const parentTNode = lView[TVIEW].data[context.nodeIndex];\n        _queryNodeChildren(parentTNode, 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 _queryNodeChildren(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {\n    ngDevMode && assertTNodeForLView(tNode, lView);\n    const nativeNode = getNativeByTNodeOrNull(tNode, lView);\n    // For each type of TNode, specific logic is executed.\n    if (tNode.type & (3 /* TNodeType.AnyRNode */ | 8 /* TNodeType.ElementContainer */)) {\n        // Case 1: the TNode is an element\n        // The native node has to be checked.\n        _addQueryMatch(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            const componentView = getComponentLViewByIndex(tNode.index, lView);\n            if (componentView && componentView[TVIEW].firstChild) {\n                _queryNodeChildren(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                _queryNodeChildren(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 dependency\n            //    from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n            // 2. 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        const nodeOrContainer = lView[tNode.index];\n        if (isLContainer(nodeOrContainer)) {\n            _queryNodeChildrenInContainer(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n        }\n    }\n    else if (tNode.type & 4 /* TNodeType.Container */) {\n        // Case 2: the TNode is a container\n        // The native node has to be checked.\n        const lContainer = lView[tNode.index];\n        _addQueryMatch(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n        // Each view inside the container has to be processed.\n        _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n    }\n    else if (tNode.type & 16 /* TNodeType.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        const componentView = lView[DECLARATION_COMPONENT_VIEW];\n        const componentHost = componentView[T_HOST];\n        const head = componentHost.projection[tNode.projection];\n        if (Array.isArray(head)) {\n            for (let nativeNode of head) {\n                _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n            }\n        }\n        else if (head) {\n            const nextLView = componentView[PARENT];\n            const nextTNode = nextLView[TVIEW].data[head.index];\n            _queryNodeChildren(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n        }\n    }\n    else if (tNode.child) {\n        // Case 4: the TNode is a view.\n        _queryNodeChildren(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        const nextTNode = tNode.flags & 2 /* TNodeFlags.isProjected */ ? tNode.projectionNext : tNode.next;\n        if (nextTNode) {\n            _queryNodeChildren(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 _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode) {\n    for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n        const childView = lContainer[i];\n        const firstChild = childView[TVIEW].firstChild;\n        if (firstChild) {\n            _queryNodeChildren(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);\n        }\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 _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {\n    if (rootNativeNode !== nativeNode) {\n        const debugNode = getDebugNode(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 &&\n            debugNode instanceof DebugElement &&\n            predicate(debugNode) &&\n            matches.indexOf(debugNode) === -1) {\n            matches.push(debugNode);\n        }\n        else if (!elementsOnly &&\n            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 where matches are stored\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) {\n    const nodes = parentNode.childNodes;\n    const length = nodes.length;\n    for (let i = 0; i < length; i++) {\n        const node = nodes[i];\n        const debugNode = getDebugNode(node);\n        if (debugNode) {\n            if (elementsOnly &&\n                debugNode instanceof DebugElement &&\n                predicate(debugNode) &&\n                matches.indexOf(debugNode) === -1) {\n                matches.push(debugNode);\n            }\n            else if (!elementsOnly &&\n                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    let bindingIndexes = tNode.propertyBindings;\n    if (bindingIndexes !== null) {\n        for (let i = 0; i < bindingIndexes.length; i++) {\n            const bindingIndex = bindingIndexes[i];\n            const propMetadata = tData[bindingIndex];\n            const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n            const propertyName = metadataParts[0];\n            if (metadataParts.length > 1) {\n                let value = metadataParts[1];\n                for (let 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.\nconst _nativeNodeToDebugNode = new Map();\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\n/**\n * @publicApi\n */\nfunction getDebugNode(nativeNode) {\n    if (nativeNode instanceof Node) {\n        if (!nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY)) {\n            nativeNode[NG_DEBUG_PROPERTY] =\n                nativeNode.nodeType == Node.ELEMENT_NODE\n                    ? new DebugElement(nativeNode)\n                    : new DebugNode(nativeNode);\n        }\n        return nativeNode[NG_DEBUG_PROPERTY];\n    }\n    return null;\n}\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\nclass DefaultIterableDifferFactory {\n    constructor() { }\n    supports(obj) {\n        return isListLikeIterable(obj);\n    }\n    create(trackByFn) {\n        return new DefaultIterableDiffer(trackByFn);\n    }\n}\nconst trackByIdentity = (index, item) => item;\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nclass DefaultIterableDiffer {\n    length = 0;\n    // TODO: confirm the usage of `collection` as it's unused, readonly and on a non public API.\n    collection;\n    // Keeps track of the used records at any point in time (during & across `_check()` calls)\n    _linkedRecords = null;\n    // Keeps track of the removed records at any point in time during `_check()` calls.\n    _unlinkedRecords = null;\n    _previousItHead = null;\n    _itHead = null;\n    _itTail = null;\n    _additionsHead = null;\n    _additionsTail = null;\n    _movesHead = null;\n    _movesTail = null;\n    _removalsHead = null;\n    _removalsTail = null;\n    // Keeps track of records where custom track by is the same, but item identity has changed\n    _identityChangesHead = null;\n    _identityChangesTail = null;\n    _trackByFn;\n    constructor(trackByFn) {\n        this._trackByFn = trackByFn || trackByIdentity;\n    }\n    forEachItem(fn) {\n        let record;\n        for (record = this._itHead; record !== null; record = record._next) {\n            fn(record);\n        }\n    }\n    forEachOperation(fn) {\n        let nextIt = this._itHead;\n        let nextRemove = this._removalsHead;\n        let addRemoveOffset = 0;\n        let moveOffsets = null;\n        while (nextIt || nextRemove) {\n            // Figure out which is the next record to process\n            // Order: remove, add, move\n            const record = !nextRemove ||\n                (nextIt &&\n                    nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets))\n                ? nextIt\n                : nextRemove;\n            const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n            const 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                    const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n                    const localCurrentIndex = currentIndex - addRemoveOffset;\n                    if (localMovePreviousIndex != localCurrentIndex) {\n                        for (let i = 0; i < localMovePreviousIndex; i++) {\n                            const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n                            const index = offset + i;\n                            if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n                                moveOffsets[i] = offset + 1;\n                            }\n                        }\n                        const previousIndex = record.previousIndex;\n                        moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n                    }\n                }\n            }\n            if (adjPreviousIndex !== currentIndex) {\n                fn(record, adjPreviousIndex, currentIndex);\n            }\n        }\n    }\n    forEachPreviousItem(fn) {\n        let record;\n        for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n            fn(record);\n        }\n    }\n    forEachAddedItem(fn) {\n        let record;\n        for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n            fn(record);\n        }\n    }\n    forEachMovedItem(fn) {\n        let record;\n        for (record = this._movesHead; record !== null; record = record._nextMoved) {\n            fn(record);\n        }\n    }\n    forEachRemovedItem(fn) {\n        let record;\n        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n            fn(record);\n        }\n    }\n    forEachIdentityChange(fn) {\n        let record;\n        for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n            fn(record);\n        }\n    }\n    diff(collection) {\n        if (collection == null)\n            collection = [];\n        if (!isListLikeIterable(collection)) {\n            throw new RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode &&\n                `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    onDestroy() { }\n    check(collection) {\n        this._reset();\n        let record = this._itHead;\n        let mayBeDirty = false;\n        let index;\n        let item;\n        let itemTrackBy;\n        if (Array.isArray(collection)) {\n            this.length = collection.length;\n            for (let index = 0; index < this.length; index++) {\n                item = collection[index];\n                itemTrackBy = this._trackByFn(index, item);\n                if (record === null || !Object.is(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 (!Object.is(record.item, item))\n                        this._addIdentityChange(record, item);\n                }\n                record = record._next;\n            }\n        }\n        else {\n            index = 0;\n            iterateListLike(collection, (item) => {\n                itemTrackBy = this._trackByFn(index, item);\n                if (record === null || !Object.is(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 (!Object.is(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    /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n     * changes.\n     */\n    get isDirty() {\n        return (this._additionsHead !== null ||\n            this._movesHead !== null ||\n            this._removalsHead !== null ||\n            this._identityChangesHead !== null);\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    _reset() {\n        if (this.isDirty) {\n            let record;\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 = record._nextMoved) {\n                record.previousIndex = record.currentIndex;\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    _mismatch(record, item, itemTrackBy, index) {\n        // The previous record after which we will append the current one.\n        let 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        // See if we have evicted the item, which used to be at some anterior position of _itHead 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 (!Object.is(record.item, item))\n                this._addIdentityChange(record, item);\n            this._reinsertAfter(record, previousRecord, index);\n        }\n        else {\n            // Attempt to see if the item is at some posterior position of _itHead list.\n            record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n            if (record !== null) {\n                // We have the item in _itHead at/after `index` position. We need to move it forward in the\n                // collection.\n                // But first we need to check if identity changed, so we can update in view if necessary.\n                if (!Object.is(record.item, item))\n                    this._addIdentityChange(record, item);\n                this._moveAfter(record, previousRecord, index);\n            }\n            else {\n                // It is a new item: add it.\n                record = 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    _verifyReinsertion(record, item, itemTrackBy, index) {\n        let 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    _truncate(record) {\n        // Anything after that needs to be removed;\n        while (record !== null) {\n            const 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    _reinsertAfter(record, prevRecord, index) {\n        if (this._unlinkedRecords !== null) {\n            this._unlinkedRecords.remove(record);\n        }\n        const prev = record._prevRemoved;\n        const 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    _moveAfter(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    _addAfter(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    _insertAfter(record, prevRecord, index) {\n        // TODO(vicb):\n        // assert(record != prevRecord);\n        // assert(record._next === null);\n        // assert(record._prev === null);\n        const 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    _remove(record) {\n        return this._addToRemovals(this._unlink(record));\n    }\n    /** @internal */\n    _unlink(record) {\n        if (this._linkedRecords !== null) {\n            this._linkedRecords.remove(record);\n        }\n        const prev = record._prev;\n        const 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    _addToMoves(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    _addToRemovals(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    _addIdentityChange(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}\nclass IterableChangeRecord_ {\n    item;\n    trackById;\n    currentIndex = null;\n    previousIndex = null;\n    /** @internal */\n    _nextPrevious = null;\n    /** @internal */\n    _prev = null;\n    /** @internal */\n    _next = null;\n    /** @internal */\n    _prevDup = null;\n    /** @internal */\n    _nextDup = null;\n    /** @internal */\n    _prevRemoved = null;\n    /** @internal */\n    _nextRemoved = null;\n    /** @internal */\n    _nextAdded = null;\n    /** @internal */\n    _nextMoved = null;\n    /** @internal */\n    _nextIdentityChange = null;\n    constructor(item, trackById) {\n        this.item = item;\n        this.trackById = trackById;\n    }\n}\n// A linked list of IterableChangeRecords with the same IterableChangeRecord_.item\nclass _DuplicateItemRecordList {\n    /** @internal */\n    _head = null;\n    /** @internal */\n    _tail = null;\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    add(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    get(trackById, atOrAfterIndex) {\n        let record;\n        for (record = this._head; record !== null; record = record._nextDup) {\n            if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) &&\n                Object.is(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    remove(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        const prev = record._prevDup;\n        const 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}\nclass _DuplicateMap {\n    map = new Map();\n    put(record) {\n        const key = record.trackById;\n        let 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    get(trackById, atOrAfterIndex) {\n        const key = trackById;\n        const 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    remove(record) {\n        const key = record.trackById;\n        const 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    get isEmpty() {\n        return this.map.size === 0;\n    }\n    clear() {\n        this.map.clear();\n    }\n}\nfunction getPreviousIndex(item, addRemoveOffset, moveOffsets) {\n    const previousIndex = item.previousIndex;\n    if (previousIndex === null)\n        return previousIndex;\n    let moveOffset = 0;\n    if (moveOffsets && previousIndex < moveOffsets.length) {\n        moveOffset = moveOffsets[previousIndex];\n    }\n    return previousIndex + addRemoveOffset + moveOffset;\n}\n\nclass DefaultKeyValueDifferFactory {\n    constructor() { }\n    supports(obj) {\n        return obj instanceof Map || isJsObject(obj);\n    }\n    create() {\n        return new DefaultKeyValueDiffer();\n    }\n}\nclass DefaultKeyValueDiffer {\n    _records = new Map();\n    _mapHead = null;\n    // _appendAfter is used in the check loop\n    _appendAfter = null;\n    _previousMapHead = null;\n    _changesHead = null;\n    _changesTail = null;\n    _additionsHead = null;\n    _additionsTail = null;\n    _removalsHead = null;\n    _removalsTail = null;\n    get isDirty() {\n        return (this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null);\n    }\n    forEachItem(fn) {\n        let record;\n        for (record = this._mapHead; record !== null; record = record._next) {\n            fn(record);\n        }\n    }\n    forEachPreviousItem(fn) {\n        let record;\n        for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n            fn(record);\n        }\n    }\n    forEachChangedItem(fn) {\n        let record;\n        for (record = this._changesHead; record !== null; record = record._nextChanged) {\n            fn(record);\n        }\n    }\n    forEachAddedItem(fn) {\n        let record;\n        for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n            fn(record);\n        }\n    }\n    forEachRemovedItem(fn) {\n        let record;\n        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n            fn(record);\n        }\n    }\n    diff(map) {\n        if (!map) {\n            map = new Map();\n        }\n        else if (!(map instanceof Map || isJsObject(map))) {\n            throw new RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode && `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);\n        }\n        return this.check(map) ? this : null;\n    }\n    onDestroy() { }\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    check(map) {\n        this._reset();\n        let insertBefore = this._mapHead;\n        this._appendAfter = null;\n        this._forEach(map, (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                const 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 (let 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    _insertBeforeOrAppend(before, record) {\n        if (before) {\n            const 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    _getOrCreateRecordForKey(key, value) {\n        if (this._records.has(key)) {\n            const record = this._records.get(key);\n            this._maybeAddToChanges(record, value);\n            const prev = record._prev;\n            const next = record._next;\n            if (prev) {\n                prev._next = next;\n            }\n            if (next) {\n                next._prev = prev;\n            }\n            record._next = null;\n            record._prev = null;\n            return record;\n        }\n        const 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    _reset() {\n        if (this.isDirty) {\n            let record;\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    _maybeAddToChanges(record, newValue) {\n        if (!Object.is(newValue, record.currentValue)) {\n            record.previousValue = record.currentValue;\n            record.currentValue = newValue;\n            this._addToChanges(record);\n        }\n    }\n    _addToAdditions(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    _addToChanges(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    _forEach(obj, fn) {\n        if (obj instanceof Map) {\n            obj.forEach(fn);\n        }\n        else {\n            Object.keys(obj).forEach((k) => fn(obj[k], k));\n        }\n    }\n}\nclass KeyValueChangeRecord_ {\n    key;\n    previousValue = null;\n    currentValue = null;\n    /** @internal */\n    _nextPrevious = null;\n    /** @internal */\n    _next = null;\n    /** @internal */\n    _prev = null;\n    /** @internal */\n    _nextAdded = null;\n    /** @internal */\n    _nextRemoved = null;\n    /** @internal */\n    _nextChanged = null;\n    constructor(key) {\n        this.key = key;\n    }\n}\n\nfunction defaultIterableDiffersFactory() {\n    return new IterableDiffers([new DefaultIterableDifferFactory()]);\n}\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\nclass IterableDiffers {\n    factories;\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: IterableDiffers,\n        providedIn: 'root',\n        factory: defaultIterableDiffersFactory,\n    });\n    constructor(factories) {\n        this.factories = factories;\n    }\n    static create(factories, parent) {\n        if (parent != null) {\n            const 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    static extend(factories) {\n        return {\n            provide: IterableDiffers,\n            useFactory: (parent) => {\n                // if parent is null, it means that we are in the root injector and we have just overridden\n                // the default injection mechanism for IterableDiffers, in such a case just assume\n                // `defaultIterableDiffersFactory`.\n                return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());\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    find(iterable) {\n        const factory = this.factories.find((f) => f.supports(iterable));\n        if (factory != null) {\n            return factory;\n        }\n        else {\n            throw new RuntimeError(901 /* RuntimeErrorCode.NO_SUPPORTING_DIFFER_FACTORY */, ngDevMode &&\n                `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);\n        }\n    }\n}\nfunction getTypeNameForDebugging(type) {\n    return type['name'] || typeof type;\n}\n\nfunction defaultKeyValueDiffersFactory() {\n    return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);\n}\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\nclass KeyValueDiffers {\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: KeyValueDiffers,\n        providedIn: 'root',\n        factory: defaultKeyValueDiffersFactory,\n    });\n    factories;\n    constructor(factories) {\n        this.factories = factories;\n    }\n    static create(factories, parent) {\n        if (parent) {\n            const 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    static extend(factories) {\n        return {\n            provide: KeyValueDiffers,\n            useFactory: (parent) => {\n                // if parent is null, it means that we are in the root injector and we have just overridden\n                // the default injection mechanism for KeyValueDiffers, in such a case just assume\n                // `defaultKeyValueDiffersFactory`.\n                return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());\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    find(kv) {\n        const factory = this.factories.find((f) => f.supports(kv));\n        if (factory) {\n            return factory;\n        }\n        throw new RuntimeError(901 /* RuntimeErrorCode.NO_SUPPORTING_DIFFER_FACTORY */, ngDevMode && `Cannot find a differ supporting object '${kv}'`);\n    }\n}\n\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nconst keyValDiff = [new DefaultKeyValueDifferFactory()];\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nconst iterableDiff = [new DefaultIterableDifferFactory()];\nconst defaultIterableDiffers = new IterableDiffers(iterableDiff);\nconst defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\n\n/**\n * @module\n * @description\n * Change detection enables data binding in Angular.\n */\n\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\nconst platformCore = createPlatformFactory(null, 'core', []);\n\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. Eagerly injects\n * `ApplicationRef` to instantiate it.\n *\n * @publicApi\n */\nclass ApplicationModule {\n    // Inject ApplicationRef to make it eager...\n    constructor(appRef) { }\n    static ɵfac = function ApplicationModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ApplicationModule)(ɵɵinject(ApplicationRef)); };\n    static ɵmod = /*@__PURE__*/ ɵɵdefineNgModule({ type: ApplicationModule });\n    static ɵinj = /*@__PURE__*/ ɵɵdefineInjector({});\n}\n(() => { (typeof ngDevMode === \"undefined\" || ngDevMode) && setClassMetadata(ApplicationModule, [{\n        type: NgModule\n    }], () => [{ type: ApplicationRef }], null); })();\n\n/**\n * The default equality function used for `signal` and `computed`, which uses referential equality.\n */\nfunction defaultEquals(a, b) {\n    return Object.is(a, b);\n}\n\n/**\n * The currently active consumer `ReactiveNode`, if running code in a reactive context.\n *\n * Change this via `setActiveConsumer`.\n */\nlet activeConsumer = null;\nlet inNotificationPhase = false;\n/**\n * Global epoch counter. Incremented whenever a source signal is set.\n */\nlet epoch = 1;\n/**\n * Symbol used to tell `Signal`s apart from other functions.\n *\n * This can be used to auto-unwrap signals in various cases, or to auto-wrap non-signal values.\n */\nconst SIGNAL = /* @__PURE__ */ Symbol('SIGNAL');\nfunction setActiveConsumer(consumer) {\n    const prev = activeConsumer;\n    activeConsumer = consumer;\n    return prev;\n}\nfunction getActiveConsumer() {\n    return activeConsumer;\n}\nfunction isInNotificationPhase() {\n    return inNotificationPhase;\n}\nfunction isReactive(value) {\n    return value[SIGNAL] !== undefined;\n}\nconst REACTIVE_NODE = {\n    version: 0,\n    lastCleanEpoch: 0,\n    dirty: false,\n    producerNode: undefined,\n    producerLastReadVersion: undefined,\n    producerIndexOfThis: undefined,\n    nextProducerIndex: 0,\n    liveConsumerNode: undefined,\n    liveConsumerIndexOfThis: undefined,\n    consumerAllowSignalWrites: false,\n    consumerIsAlwaysLive: false,\n    producerMustRecompute: () => false,\n    producerRecomputeValue: () => { },\n    consumerMarkedDirty: () => { },\n    consumerOnSignalRead: () => { },\n};\n/**\n * Called by implementations when a producer's signal is read.\n */\nfunction producerAccessed(node) {\n    if (inNotificationPhase) {\n        throw new Error(typeof ngDevMode !== 'undefined' && ngDevMode\n            ? `Assertion error: signal read during notification phase`\n            : '');\n    }\n    if (activeConsumer === null) {\n        // Accessed outside of a reactive context, so nothing to record.\n        return;\n    }\n    activeConsumer.consumerOnSignalRead(node);\n    // This producer is the `idx`th dependency of `activeConsumer`.\n    const idx = activeConsumer.nextProducerIndex++;\n    assertConsumerNode(activeConsumer);\n    if (idx < activeConsumer.producerNode.length && activeConsumer.producerNode[idx] !== node) {\n        // There's been a change in producers since the last execution of `activeConsumer`.\n        // `activeConsumer.producerNode[idx]` holds a stale dependency which will be be removed and\n        // replaced with `this`.\n        //\n        // If `activeConsumer` isn't live, then this is a no-op, since we can replace the producer in\n        // `activeConsumer.producerNode` directly. However, if `activeConsumer` is live, then we need\n        // to remove it from the stale producer's `liveConsumer`s.\n        if (consumerIsLive(activeConsumer)) {\n            const staleProducer = activeConsumer.producerNode[idx];\n            producerRemoveLiveConsumerAtIndex(staleProducer, activeConsumer.producerIndexOfThis[idx]);\n            // At this point, the only record of `staleProducer` is the reference at\n            // `activeConsumer.producerNode[idx]` which will be overwritten below.\n        }\n    }\n    if (activeConsumer.producerNode[idx] !== node) {\n        // We're a new dependency of the consumer (at `idx`).\n        activeConsumer.producerNode[idx] = node;\n        // If the active consumer is live, then add it as a live consumer. If not, then use 0 as a\n        // placeholder value.\n        activeConsumer.producerIndexOfThis[idx] = consumerIsLive(activeConsumer)\n            ? producerAddLiveConsumer(node, activeConsumer, idx)\n            : 0;\n    }\n    activeConsumer.producerLastReadVersion[idx] = node.version;\n}\n/**\n * Increment the global epoch counter.\n *\n * Called by source producers (that is, not computeds) whenever their values change.\n */\nfunction producerIncrementEpoch() {\n    epoch++;\n}\n/**\n * Ensure this producer's `version` is up-to-date.\n */\nfunction producerUpdateValueVersion(node) {\n    if (consumerIsLive(node) && !node.dirty) {\n        // A live consumer will be marked dirty by producers, so a clean state means that its version\n        // is guaranteed to be up-to-date.\n        return;\n    }\n    if (!node.dirty && node.lastCleanEpoch === epoch) {\n        // Even non-live consumers can skip polling if they previously found themselves to be clean at\n        // the current epoch, since their dependencies could not possibly have changed (such a change\n        // would've increased the epoch).\n        return;\n    }\n    if (!node.producerMustRecompute(node) && !consumerPollProducersForChange(node)) {\n        // None of our producers report a change since the last time they were read, so no\n        // recomputation of our value is necessary, and we can consider ourselves clean.\n        producerMarkClean(node);\n        return;\n    }\n    node.producerRecomputeValue(node);\n    // After recomputing the value, we're no longer dirty.\n    producerMarkClean(node);\n}\n/**\n * Propagate a dirty notification to live consumers of this producer.\n */\nfunction producerNotifyConsumers(node) {\n    if (node.liveConsumerNode === undefined) {\n        return;\n    }\n    // Prevent signal reads when we're updating the graph\n    const prev = inNotificationPhase;\n    inNotificationPhase = true;\n    try {\n        for (const consumer of node.liveConsumerNode) {\n            if (!consumer.dirty) {\n                consumerMarkDirty(consumer);\n            }\n        }\n    }\n    finally {\n        inNotificationPhase = prev;\n    }\n}\n/**\n * Whether this `ReactiveNode` in its producer capacity is currently allowed to initiate updates,\n * based on the current consumer context.\n */\nfunction producerUpdatesAllowed() {\n    return activeConsumer?.consumerAllowSignalWrites !== false;\n}\nfunction consumerMarkDirty(node) {\n    node.dirty = true;\n    producerNotifyConsumers(node);\n    node.consumerMarkedDirty?.(node);\n}\nfunction producerMarkClean(node) {\n    node.dirty = false;\n    node.lastCleanEpoch = epoch;\n}\n/**\n * Prepare this consumer to run a computation in its reactive context.\n *\n * Must be called by subclasses which represent reactive computations, before those computations\n * begin.\n */\nfunction consumerBeforeComputation(node) {\n    node && (node.nextProducerIndex = 0);\n    return setActiveConsumer(node);\n}\n/**\n * Finalize this consumer's state after a reactive computation has run.\n *\n * Must be called by subclasses which represent reactive computations, after those computations\n * have finished.\n */\nfunction consumerAfterComputation(node, prevConsumer) {\n    setActiveConsumer(prevConsumer);\n    if (!node ||\n        node.producerNode === undefined ||\n        node.producerIndexOfThis === undefined ||\n        node.producerLastReadVersion === undefined) {\n        return;\n    }\n    if (consumerIsLive(node)) {\n        // For live consumers, we need to remove the producer -> consumer edge for any stale producers\n        // which weren't dependencies after the recomputation.\n        for (let i = node.nextProducerIndex; i < node.producerNode.length; i++) {\n            producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n        }\n    }\n    // Truncate the producer tracking arrays.\n    // Perf note: this is essentially truncating the length to `node.nextProducerIndex`, but\n    // benchmarking has shown that individual pop operations are faster.\n    while (node.producerNode.length > node.nextProducerIndex) {\n        node.producerNode.pop();\n        node.producerLastReadVersion.pop();\n        node.producerIndexOfThis.pop();\n    }\n}\n/**\n * Determine whether this consumer has any dependencies which have changed since the last time\n * they were read.\n */\nfunction consumerPollProducersForChange(node) {\n    assertConsumerNode(node);\n    // Poll producers for change.\n    for (let i = 0; i < node.producerNode.length; i++) {\n        const producer = node.producerNode[i];\n        const seenVersion = node.producerLastReadVersion[i];\n        // First check the versions. A mismatch means that the producer's value is known to have\n        // changed since the last time we read it.\n        if (seenVersion !== producer.version) {\n            return true;\n        }\n        // The producer's version is the same as the last time we read it, but it might itself be\n        // stale. Force the producer to recompute its version (calculating a new value if necessary).\n        producerUpdateValueVersion(producer);\n        // Now when we do this check, `producer.version` is guaranteed to be up to date, so if the\n        // versions still match then it has not changed since the last time we read it.\n        if (seenVersion !== producer.version) {\n            return true;\n        }\n    }\n    return false;\n}\n/**\n * Disconnect this consumer from the graph.\n */\nfunction consumerDestroy(node) {\n    assertConsumerNode(node);\n    if (consumerIsLive(node)) {\n        // Drop all connections from the graph to this node.\n        for (let i = 0; i < node.producerNode.length; i++) {\n            producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n        }\n    }\n    // Truncate all the arrays to drop all connection from this node to the graph.\n    node.producerNode.length =\n        node.producerLastReadVersion.length =\n            node.producerIndexOfThis.length =\n                0;\n    if (node.liveConsumerNode) {\n        node.liveConsumerNode.length = node.liveConsumerIndexOfThis.length = 0;\n    }\n}\n/**\n * Add `consumer` as a live consumer of this node.\n *\n * Note that this operation is potentially transitive. If this node becomes live, then it becomes\n * a live consumer of all of its current producers.\n */\nfunction producerAddLiveConsumer(node, consumer, indexOfThis) {\n    assertProducerNode(node);\n    if (node.liveConsumerNode.length === 0 && isConsumerNode(node)) {\n        // When going from 0 to 1 live consumers, we become a live consumer to our producers.\n        for (let i = 0; i < node.producerNode.length; i++) {\n            node.producerIndexOfThis[i] = producerAddLiveConsumer(node.producerNode[i], node, i);\n        }\n    }\n    node.liveConsumerIndexOfThis.push(indexOfThis);\n    return node.liveConsumerNode.push(consumer) - 1;\n}\n/**\n * Remove the live consumer at `idx`.\n */\nfunction producerRemoveLiveConsumerAtIndex(node, idx) {\n    assertProducerNode(node);\n    if (typeof ngDevMode !== 'undefined' && ngDevMode && idx >= node.liveConsumerNode.length) {\n        throw new Error(`Assertion error: active consumer index ${idx} is out of bounds of ${node.liveConsumerNode.length} consumers)`);\n    }\n    if (node.liveConsumerNode.length === 1 && isConsumerNode(node)) {\n        // When removing the last live consumer, we will no longer be live. We need to remove\n        // ourselves from our producers' tracking (which may cause consumer-producers to lose\n        // liveness as well).\n        for (let i = 0; i < node.producerNode.length; i++) {\n            producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n        }\n    }\n    // Move the last value of `liveConsumers` into `idx`. Note that if there's only a single\n    // live consumer, this is a no-op.\n    const lastIdx = node.liveConsumerNode.length - 1;\n    node.liveConsumerNode[idx] = node.liveConsumerNode[lastIdx];\n    node.liveConsumerIndexOfThis[idx] = node.liveConsumerIndexOfThis[lastIdx];\n    // Truncate the array.\n    node.liveConsumerNode.length--;\n    node.liveConsumerIndexOfThis.length--;\n    // If the index is still valid, then we need to fix the index pointer from the producer to this\n    // consumer, and update it from `lastIdx` to `idx` (accounting for the move above).\n    if (idx < node.liveConsumerNode.length) {\n        const idxProducer = node.liveConsumerIndexOfThis[idx];\n        const consumer = node.liveConsumerNode[idx];\n        assertConsumerNode(consumer);\n        consumer.producerIndexOfThis[idxProducer] = idx;\n    }\n}\nfunction consumerIsLive(node) {\n    return node.consumerIsAlwaysLive || (node?.liveConsumerNode?.length ?? 0) > 0;\n}\nfunction assertConsumerNode(node) {\n    node.producerNode ??= [];\n    node.producerIndexOfThis ??= [];\n    node.producerLastReadVersion ??= [];\n}\nfunction assertProducerNode(node) {\n    node.liveConsumerNode ??= [];\n    node.liveConsumerIndexOfThis ??= [];\n}\nfunction isConsumerNode(node) {\n    return node.producerNode !== undefined;\n}\n\n/**\n * Create a computed signal which derives a reactive value from an expression.\n */\nfunction createComputed(computation) {\n    const node = Object.create(COMPUTED_NODE);\n    node.computation = computation;\n    const computed = () => {\n        // Check if the value needs updating before returning it.\n        producerUpdateValueVersion(node);\n        // Record that someone looked at this signal.\n        producerAccessed(node);\n        if (node.value === ERRORED$1) {\n            throw node.error;\n        }\n        return node.value;\n    };\n    computed[SIGNAL] = node;\n    return computed;\n}\n/**\n * A dedicated symbol used before a computed value has been calculated for the first time.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst UNSET$1 = /* @__PURE__ */ Symbol('UNSET');\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * is in progress. Used to detect cycles in computation chains.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst COMPUTING$1 = /* @__PURE__ */ Symbol('COMPUTING');\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * failed. The thrown error is cached until the computation gets dirty again.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst ERRORED$1 = /* @__PURE__ */ Symbol('ERRORED');\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst COMPUTED_NODE = /* @__PURE__ */ (() => {\n    return {\n        ...REACTIVE_NODE,\n        value: UNSET$1,\n        dirty: true,\n        error: null,\n        equal: defaultEquals,\n        producerMustRecompute(node) {\n            // Force a recomputation if there's no current value, or if the current value is in the\n            // process of being calculated (which should throw an error).\n            return node.value === UNSET$1 || node.value === COMPUTING$1;\n        },\n        producerRecomputeValue(node) {\n            if (node.value === COMPUTING$1) {\n                // Our computation somehow led to a cyclic read of itself.\n                throw new Error('Detected cycle in computations.');\n            }\n            const oldValue = node.value;\n            node.value = COMPUTING$1;\n            const prevConsumer = consumerBeforeComputation(node);\n            let newValue;\n            try {\n                newValue = node.computation();\n            }\n            catch (err) {\n                newValue = ERRORED$1;\n                node.error = err;\n            }\n            finally {\n                consumerAfterComputation(node, prevConsumer);\n            }\n            if (oldValue !== UNSET$1 &&\n                oldValue !== ERRORED$1 &&\n                newValue !== ERRORED$1 &&\n                node.equal(oldValue, newValue)) {\n                // No change to `valueVersion` - old and new values are\n                // semantically equivalent.\n                node.value = oldValue;\n                return;\n            }\n            node.value = newValue;\n            node.version++;\n        },\n    };\n})();\n\nfunction defaultThrowError() {\n    throw new Error();\n}\nlet throwInvalidWriteToSignalErrorFn = defaultThrowError;\nfunction throwInvalidWriteToSignalError() {\n    throwInvalidWriteToSignalErrorFn();\n}\nfunction setThrowInvalidWriteToSignalError(fn) {\n    throwInvalidWriteToSignalErrorFn = fn;\n}\n\n/**\n * If set, called after `WritableSignal`s are updated.\n *\n * This hook can be used to achieve various effects, such as running effects synchronously as part\n * of setting a signal.\n */\nlet postSignalSetFn = null;\n/**\n * Create a `Signal` that can be set or updated directly.\n */\nfunction createSignal(initialValue) {\n    const node = Object.create(SIGNAL_NODE);\n    node.value = initialValue;\n    const getter = (() => {\n        producerAccessed(node);\n        return node.value;\n    });\n    getter[SIGNAL] = node;\n    return getter;\n}\nfunction setPostSignalSetFn(fn) {\n    const prev = postSignalSetFn;\n    postSignalSetFn = fn;\n    return prev;\n}\nfunction signalGetFn() {\n    producerAccessed(this);\n    return this.value;\n}\nfunction signalSetFn(node, newValue) {\n    if (!producerUpdatesAllowed()) {\n        throwInvalidWriteToSignalError();\n    }\n    if (!node.equal(node.value, newValue)) {\n        node.value = newValue;\n        signalValueChanged(node);\n    }\n}\nfunction signalUpdateFn(node, updater) {\n    if (!producerUpdatesAllowed()) {\n        throwInvalidWriteToSignalError();\n    }\n    signalSetFn(node, updater(node.value));\n}\nfunction runPostSignalSetFn() {\n    postSignalSetFn?.();\n}\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst SIGNAL_NODE = /* @__PURE__ */ (() => {\n    return {\n        ...REACTIVE_NODE,\n        equal: defaultEquals,\n        value: undefined,\n    };\n})();\nfunction signalValueChanged(node) {\n    node.version++;\n    producerIncrementEpoch();\n    producerNotifyConsumers(node);\n    postSignalSetFn?.();\n}\n\nfunction createWatch(fn, schedule, allowSignalWrites) {\n    const node = Object.create(WATCH_NODE);\n    if (allowSignalWrites) {\n        node.consumerAllowSignalWrites = true;\n    }\n    node.fn = fn;\n    node.schedule = schedule;\n    const registerOnCleanup = (cleanupFn) => {\n        node.cleanupFn = cleanupFn;\n    };\n    function isWatchNodeDestroyed(node) {\n        return node.fn === null && node.schedule === null;\n    }\n    function destroyWatchNode(node) {\n        if (!isWatchNodeDestroyed(node)) {\n            consumerDestroy(node); // disconnect watcher from the reactive graph\n            node.cleanupFn();\n            // nullify references to the integration functions to mark node as destroyed\n            node.fn = null;\n            node.schedule = null;\n            node.cleanupFn = NOOP_CLEANUP_FN;\n        }\n    }\n    const run = () => {\n        if (node.fn === null) {\n            // trying to run a destroyed watch is noop\n            return;\n        }\n        if (isInNotificationPhase()) {\n            throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);\n        }\n        node.dirty = false;\n        if (node.hasRun && !consumerPollProducersForChange(node)) {\n            return;\n        }\n        node.hasRun = true;\n        const prevConsumer = consumerBeforeComputation(node);\n        try {\n            node.cleanupFn();\n            node.cleanupFn = NOOP_CLEANUP_FN;\n            node.fn(registerOnCleanup);\n        }\n        finally {\n            consumerAfterComputation(node, prevConsumer);\n        }\n    };\n    node.ref = {\n        notify: () => consumerMarkDirty(node),\n        run,\n        cleanup: () => node.cleanupFn(),\n        destroy: () => destroyWatchNode(node),\n        [SIGNAL]: node,\n    };\n    return node.ref;\n}\nconst NOOP_CLEANUP_FN = () => { };\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst WATCH_NODE = /* @__PURE__ */ (() => {\n    return {\n        ...REACTIVE_NODE,\n        consumerIsAlwaysLive: true,\n        consumerAllowSignalWrites: false,\n        consumerMarkedDirty: (node) => {\n            if (node.schedule !== null) {\n                node.schedule(node.ref);\n            }\n        },\n        hasRun: false,\n        cleanupFn: NOOP_CLEANUP_FN,\n    };\n})();\n\nfunction setAlternateWeakRefImpl(impl) {\n    // TODO: remove this function\n}\n\n/**\n * Internal create application API that implements the core application creation logic and optional\n * bootstrap logic.\n *\n * Platforms (such as `platform-browser`) may require different set of application and platform\n * providers for an application to function correctly. As a result, platforms may use this function\n * internally and supply the necessary providers during the bootstrap, while exposing\n * platform-specific APIs as a part of their public API.\n *\n * @returns A promise that returns an `ApplicationRef` instance once resolved.\n */\nfunction internalCreateApplication(config) {\n    try {\n        const { rootComponent, appProviders, platformProviders } = config;\n        if ((typeof ngDevMode === 'undefined' || ngDevMode) && rootComponent !== undefined) {\n            assertStandaloneComponentType(rootComponent);\n        }\n        const platformInjector = createOrReusePlatformInjector(platformProviders);\n        // Create root application injector based on a set of providers configured at the platform\n        // bootstrap level as well as providers passed to the bootstrap call by a user.\n        const allAppProviders = [\n            internalProvideZoneChangeDetection({}),\n            { provide: ChangeDetectionScheduler, useExisting: ChangeDetectionSchedulerImpl },\n            ...(appProviders || []),\n        ];\n        const adapter = new EnvironmentNgModuleRefAdapter({\n            providers: allAppProviders,\n            parent: platformInjector,\n            debugName: typeof ngDevMode === 'undefined' || ngDevMode ? 'Environment Injector' : '',\n            // We skip environment initializers because we need to run them inside the NgZone, which\n            // happens after we get the NgZone instance from the Injector.\n            runEnvironmentInitializers: false,\n        });\n        return bootstrap({\n            r3Injector: adapter.injector,\n            platformInjector,\n            rootComponent,\n        });\n    }\n    catch (e) {\n        return Promise.reject(e);\n    }\n}\n\n/**\n * Retrieves all defer blocks in a given LView.\n *\n * @param lView lView with defer blocks\n * @param deferBlocks defer block aggregator array\n */\nfunction getDeferBlocks(lView, deferBlocks) {\n    const tView = lView[TVIEW];\n    for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n        if (isLContainer(lView[i])) {\n            const lContainer = lView[i];\n            // An LContainer may represent an instance of a defer block, in which case\n            // we store it as a result. Otherwise, keep iterating over LContainer views and\n            // look for defer blocks.\n            const isLast = i === tView.bindingStartIndex - 1;\n            if (!isLast) {\n                const tNode = tView.data[i];\n                const tDetails = getTDeferBlockDetails(tView, tNode);\n                if (isTDeferBlockDetails(tDetails)) {\n                    deferBlocks.push({ lContainer, lView, tNode, tDetails });\n                    // This LContainer represents a defer block, so we exit\n                    // this iteration and don't inspect views in this LContainer.\n                    continue;\n                }\n            }\n            for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n                getDeferBlocks(lContainer[i], deferBlocks);\n            }\n        }\n        else if (isLView(lView[i])) {\n            // This is a component, enter the `getDeferBlocks` recursively.\n            getDeferBlocks(lView[i], deferBlocks);\n        }\n    }\n}\n\n/** Apps in which we've enabled event replay.\n *  This is to prevent initializing event replay more than once per app.\n */\nconst appsWithEventReplay = new WeakSet();\n/**\n * The key that represents all replayable elements that are not in defer blocks.\n */\nconst EAGER_CONTENT_LISTENERS_KEY = '';\n/**\n * A list of block events that need to be replayed\n */\nlet blockEventQueue = [];\n/**\n * Determines whether Event Replay feature should be activated on the client.\n */\nfunction shouldEnableEventReplay(injector) {\n    return injector.get(IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT);\n}\n/**\n * Returns a set of providers required to setup support for event replay.\n * Requires hydration to be enabled separately.\n */\nfunction withEventReplay() {\n    const providers = [\n        {\n            provide: IS_EVENT_REPLAY_ENABLED,\n            useFactory: () => {\n                let isEnabled = true;\n                if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n                    // Note: globalThis[CONTRACT_PROPERTY] may be undefined in case Event Replay feature\n                    // is enabled, but there are no events configured in this application, in which case\n                    // we don't activate this feature, since there are no events to replay.\n                    const appId = inject(APP_ID);\n                    isEnabled = !!window._ejsas?.[appId];\n                }\n                if (isEnabled) {\n                    performanceMarkFeature('NgEventReplay');\n                }\n                return isEnabled;\n            },\n        },\n    ];\n    if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n        providers.push({\n            provide: ENVIRONMENT_INITIALIZER,\n            useValue: () => {\n                const injector = inject(Injector);\n                const appRef = injector.get(ApplicationRef);\n                // We have to check for the appRef here due to the possibility of multiple apps\n                // being present on the same page. We only want to enable event replay for the\n                // apps that actually want it.\n                if (!appsWithEventReplay.has(appRef)) {\n                    const jsActionMap = inject(JSACTION_BLOCK_ELEMENT_MAP);\n                    if (shouldEnableEventReplay(injector)) {\n                        setStashFn((rEl, eventName, listenerFn) => {\n                            sharedStashFunction(rEl, eventName, listenerFn);\n                            sharedMapFunction(rEl, jsActionMap);\n                        });\n                    }\n                }\n            },\n            multi: true,\n        }, {\n            provide: APP_BOOTSTRAP_LISTENER,\n            useFactory: () => {\n                const injector = inject(Injector);\n                const appRef = inject(ApplicationRef);\n                return () => {\n                    // We have to check for the appRef here due to the possibility of multiple apps\n                    // being present on the same page. We only want to enable event replay for the\n                    // apps that actually want it.\n                    if (!shouldEnableEventReplay(injector) || appsWithEventReplay.has(appRef)) {\n                        return;\n                    }\n                    appsWithEventReplay.add(appRef);\n                    appRef.onDestroy(() => appsWithEventReplay.delete(appRef));\n                    // Kick off event replay logic once hydration for the initial part\n                    // of the application is completed. This timing is similar to the unclaimed\n                    // dehydrated views cleanup timing.\n                    appRef.whenStable().then(() => {\n                        const eventContractDetails = injector.get(JSACTION_EVENT_CONTRACT);\n                        initEventReplay(eventContractDetails, injector);\n                        const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);\n                        jsActionMap.get(EAGER_CONTENT_LISTENERS_KEY)?.forEach(removeListeners);\n                        jsActionMap.delete(EAGER_CONTENT_LISTENERS_KEY);\n                        const eventContract = eventContractDetails.instance;\n                        // This removes event listeners registered through the container manager,\n                        // as listeners registered on `document.body` might never be removed if we\n                        // don't clean up the contract.\n                        if (isIncrementalHydrationEnabled(injector)) {\n                            // When incremental hydration is enabled, we cannot clean up the event\n                            // contract immediately because we're unaware if there are any deferred\n                            // blocks to hydrate. We can only schedule a contract cleanup when the\n                            // app is destroyed.\n                            appRef.onDestroy(() => eventContract.cleanUp());\n                        }\n                        else {\n                            eventContract.cleanUp();\n                        }\n                    });\n                };\n            },\n            multi: true,\n        });\n    }\n    return providers;\n}\nconst initEventReplay = (eventDelegation, injector) => {\n    const appId = injector.get(APP_ID);\n    // This is set in packages/platform-server/src/utils.ts\n    const earlyJsactionData = window._ejsas[appId];\n    const eventContract = (eventDelegation.instance = new EventContract(new EventContractContainer(earlyJsactionData.c)));\n    for (const et of earlyJsactionData.et) {\n        eventContract.addEvent(et);\n    }\n    for (const et of earlyJsactionData.etc) {\n        eventContract.addEvent(et);\n    }\n    const eventInfos = getAppScopedQueuedEventInfos(appId);\n    eventContract.replayEarlyEventInfos(eventInfos);\n    clearAppScopedEarlyEventContract(appId);\n    const dispatcher = new EventDispatcher((event) => {\n        invokeRegisteredReplayListeners(injector, event, event.currentTarget);\n    });\n    registerDispatcher(eventContract, dispatcher);\n};\n/**\n * Extracts information about all DOM events (added in a template) registered on elements in a give\n * LView. Maps collected events to a corresponding DOM element (an element is used as a key).\n */\nfunction collectDomEventsInfo(tView, lView, eventTypesToReplay) {\n    const domEventsInfo = new Map();\n    const lCleanup = lView[CLEANUP];\n    const tCleanup = tView.cleanup;\n    if (!tCleanup || !lCleanup) {\n        return domEventsInfo;\n    }\n    for (let i = 0; i < tCleanup.length;) {\n        const firstParam = tCleanup[i++];\n        const secondParam = tCleanup[i++];\n        if (typeof firstParam !== 'string') {\n            continue;\n        }\n        const eventType = firstParam;\n        if (!isEarlyEventType(eventType)) {\n            continue;\n        }\n        if (isCaptureEventType(eventType)) {\n            eventTypesToReplay.capture.add(eventType);\n        }\n        else {\n            eventTypesToReplay.regular.add(eventType);\n        }\n        const listenerElement = unwrapRNode(lView[secondParam]);\n        i++; // move the cursor to the next position (location of the listener idx)\n        const 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        const isDomEvent = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0;\n        if (!isDomEvent) {\n            continue;\n        }\n        if (!domEventsInfo.has(listenerElement)) {\n            domEventsInfo.set(listenerElement, [eventType]);\n        }\n        else {\n            domEventsInfo.get(listenerElement).push(eventType);\n        }\n    }\n    return domEventsInfo;\n}\nfunction invokeRegisteredReplayListeners(injector, event, currentTarget) {\n    const blockName = (currentTarget && currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE)) ?? '';\n    if (/d\\d+/.test(blockName)) {\n        hydrateAndInvokeBlockListeners(blockName, injector, event, currentTarget);\n    }\n    else if (event.eventPhase === EventPhase.REPLAY) {\n        invokeListeners(event, currentTarget);\n    }\n}\nfunction hydrateAndInvokeBlockListeners(blockName, injector, event, currentTarget) {\n    blockEventQueue.push({ event, currentTarget });\n    triggerHydrationFromBlockName(injector, blockName, replayQueuedBlockEvents);\n}\nfunction replayQueuedBlockEvents(hydratedBlocks) {\n    // clone the queue\n    const queue = [...blockEventQueue];\n    const hydrated = new Set(hydratedBlocks);\n    // empty it\n    blockEventQueue = [];\n    for (let { event, currentTarget } of queue) {\n        const blockName = currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE);\n        if (hydrated.has(blockName)) {\n            invokeListeners(event, currentTarget);\n        }\n        else {\n            // requeue events that weren't yet hydrated\n            blockEventQueue.push({ event, currentTarget });\n        }\n    }\n}\n\n/**\n * A collection that tracks all serialized views (`ngh` DOM annotations)\n * to avoid duplication. An attempt to add a duplicate view results in the\n * collection returning the index of the previously collected serialized view.\n * This reduces the number of annotations needed for a given page.\n */\nclass SerializedViewCollection {\n    views = [];\n    indexByContent = new Map();\n    add(serializedView) {\n        const viewAsString = JSON.stringify(serializedView);\n        if (!this.indexByContent.has(viewAsString)) {\n            const index = this.views.length;\n            this.views.push(serializedView);\n            this.indexByContent.set(viewAsString, index);\n            return index;\n        }\n        return this.indexByContent.get(viewAsString);\n    }\n    getAll() {\n        return this.views;\n    }\n}\n/**\n * Global counter that is used to generate a unique id for TViews\n * during the serialization process.\n */\nlet tViewSsrId = 0;\n/**\n * Generates a unique id for a given TView and returns this id.\n * The id is also stored on this instance of a TView and reused in\n * subsequent calls.\n *\n * This id is needed to uniquely identify and pick up dehydrated views\n * at runtime.\n */\nfunction getSsrId(tView) {\n    if (!tView.ssrId) {\n        tView.ssrId = `t${tViewSsrId++}`;\n    }\n    return tView.ssrId;\n}\n/**\n * Computes the number of root nodes in a given view\n * (or child nodes in a given container if a tNode is provided).\n */\nfunction calcNumRootNodes(tView, lView, tNode) {\n    const rootNodes = [];\n    collectNativeNodes(tView, lView, tNode, rootNodes);\n    return rootNodes.length;\n}\n/**\n * Computes the number of root nodes in all views in a given LContainer.\n */\nfunction calcNumRootNodesInLContainer(lContainer) {\n    const rootNodes = [];\n    collectNativeNodesInLContainer(lContainer, rootNodes);\n    return rootNodes.length;\n}\n/**\n * Annotates root level component's LView for hydration,\n * see `annotateHostElementForHydration` for additional information.\n */\nfunction annotateComponentLViewForHydration(lView, context, injector) {\n    const hostElement = lView[HOST];\n    // Root elements might also be annotated with the `ngSkipHydration` attribute,\n    // check if it's present before starting the serialization process.\n    if (hostElement && !hostElement.hasAttribute(SKIP_HYDRATION_ATTR_NAME)) {\n        return annotateHostElementForHydration(hostElement, lView, null, context);\n    }\n    return null;\n}\n/**\n * Annotates root level LContainer for hydration. This happens when a root component\n * injects ViewContainerRef, thus making the component an anchor for a view container.\n * This function serializes the component itself as well as all views from the view\n * container.\n */\nfunction annotateLContainerForHydration(lContainer, context, injector) {\n    const componentLView = unwrapLView(lContainer[HOST]);\n    // Serialize the root component itself.\n    const componentLViewNghIndex = annotateComponentLViewForHydration(componentLView, context, injector);\n    if (componentLViewNghIndex === null) {\n        // Component was not serialized (for example, if hydration was skipped by adding\n        // the `ngSkipHydration` attribute or this component uses i18n blocks in the template,\n        // but `withI18nSupport()` was not added), avoid annotating host element with the `ngh`\n        // attribute.\n        return;\n    }\n    const hostElement = unwrapRNode(componentLView[HOST]);\n    // Serialize all views within this view container.\n    const rootLView = lContainer[PARENT];\n    const rootLViewNghIndex = annotateHostElementForHydration(hostElement, rootLView, null, context);\n    const renderer = componentLView[RENDERER];\n    // For cases when a root component also acts as an anchor node for a ViewContainerRef\n    // (for example, when ViewContainerRef is injected in a root component), there is a need\n    // to serialize information about the component itself, as well as an LContainer that\n    // represents this ViewContainerRef. Effectively, we need to serialize 2 pieces of info:\n    // (1) hydration info for the root component itself and (2) hydration info for the\n    // ViewContainerRef instance (an LContainer). Each piece of information is included into\n    // the hydration data (in the TransferState object) separately, thus we end up with 2 ids.\n    // Since we only have 1 root element, we encode both bits of info into a single string:\n    // ids are separated by the `|` char (e.g. `10|25`, where `10` is the ngh for a component view\n    // and 25 is the `ngh` for a root view which holds LContainer).\n    const finalIndex = `${componentLViewNghIndex}|${rootLViewNghIndex}`;\n    renderer.setAttribute(hostElement, NGH_ATTR_NAME, finalIndex);\n}\n/**\n * Annotates all components bootstrapped in a given ApplicationRef\n * with info needed for hydration.\n *\n * @param appRef An instance of an ApplicationRef.\n * @param doc A reference to the current Document instance.\n * @return event types that need to be replayed\n */\nfunction annotateForHydration(appRef, doc) {\n    const injector = appRef.injector;\n    const isI18nHydrationEnabledVal = isI18nHydrationEnabled(injector);\n    const isIncrementalHydrationEnabledVal = isIncrementalHydrationEnabled(injector);\n    const serializedViewCollection = new SerializedViewCollection();\n    const corruptedTextNodes = new Map();\n    const viewRefs = appRef._views;\n    const shouldReplayEvents = injector.get(IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT);\n    const eventTypesToReplay = {\n        regular: new Set(),\n        capture: new Set(),\n    };\n    const deferBlocks = new Map();\n    const appId = appRef.injector.get(APP_ID);\n    for (const viewRef of viewRefs) {\n        const lNode = getLNodeForHydration(viewRef);\n        // An `lView` might be `null` if a `ViewRef` represents\n        // an embedded view (not a component view).\n        if (lNode !== null) {\n            const context = {\n                serializedViewCollection,\n                corruptedTextNodes,\n                isI18nHydrationEnabled: isI18nHydrationEnabledVal,\n                isIncrementalHydrationEnabled: isIncrementalHydrationEnabledVal,\n                i18nChildren: new Map(),\n                eventTypesToReplay,\n                shouldReplayEvents,\n                appId,\n                deferBlocks,\n            };\n            if (isLContainer(lNode)) {\n                annotateLContainerForHydration(lNode, context, injector);\n            }\n            else {\n                annotateComponentLViewForHydration(lNode, context, injector);\n            }\n            insertCorruptedTextNodeMarkers(corruptedTextNodes, doc);\n        }\n    }\n    // Note: we *always* include hydration info key and a corresponding value\n    // into the TransferState, even if the list of serialized views is empty.\n    // This is needed as a signal to the client that the server part of the\n    // hydration logic was setup and enabled correctly. Otherwise, if a client\n    // hydration doesn't find a key in the transfer state - an error is produced.\n    const serializedViews = serializedViewCollection.getAll();\n    const transferState = injector.get(TransferState);\n    transferState.set(NGH_DATA_KEY, serializedViews);\n    if (deferBlocks.size > 0) {\n        const blocks = {};\n        for (const [id, info] of deferBlocks.entries()) {\n            blocks[id] = info;\n        }\n        transferState.set(NGH_DEFER_BLOCKS_KEY, blocks);\n    }\n    return eventTypesToReplay;\n}\n/**\n * Serializes the lContainer data into a list of SerializedView objects,\n * that represent views within this lContainer.\n *\n * @param lContainer the lContainer we are serializing\n * @param tNode the TNode that contains info about this LContainer\n * @param lView that hosts this LContainer\n * @param parentDeferBlockId the defer block id of the parent if it exists\n * @param context the hydration context\n * @returns an array of the `SerializedView` objects\n */\nfunction serializeLContainer(lContainer, tNode, lView, parentDeferBlockId, context) {\n    const views = [];\n    let lastViewAsString = '';\n    for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n        let childLView = lContainer[i];\n        let template;\n        let numRootNodes;\n        let serializedView;\n        if (isRootView(childLView)) {\n            // If this is a root view, get an LView for the underlying component,\n            // because it contains information about the view to serialize.\n            childLView = childLView[HEADER_OFFSET];\n            // If we have an LContainer at this position, this indicates that the\n            // host element was used as a ViewContainerRef anchor (e.g. a `ViewContainerRef`\n            // was injected within the component class). This case requires special handling.\n            if (isLContainer(childLView)) {\n                // Calculate the number of root nodes in all views in a given container\n                // and increment by one to account for an anchor node itself, i.e. in this\n                // scenario we'll have a layout that would look like this:\n                // `<app-root /><#VIEW1><#VIEW2>...<!--container-->`\n                // The `+1` is to capture the `<app-root />` element.\n                numRootNodes = calcNumRootNodesInLContainer(childLView) + 1;\n                annotateLContainerForHydration(childLView, context, lView[INJECTOR]);\n                const componentLView = unwrapLView(childLView[HOST]);\n                serializedView = {\n                    [TEMPLATE_ID]: componentLView[TVIEW].ssrId,\n                    [NUM_ROOT_NODES]: numRootNodes,\n                };\n            }\n        }\n        if (!serializedView) {\n            const childTView = childLView[TVIEW];\n            if (childTView.type === 1 /* TViewType.Component */) {\n                template = childTView.ssrId;\n                // This is a component view, thus it has only 1 root node: the component\n                // host node itself (other nodes would be inside that host node).\n                numRootNodes = 1;\n            }\n            else {\n                template = getSsrId(childTView);\n                numRootNodes = calcNumRootNodes(childTView, childLView, childTView.firstChild);\n            }\n            serializedView = {\n                [TEMPLATE_ID]: template,\n                [NUM_ROOT_NODES]: numRootNodes,\n            };\n            let isHydrateNeverBlock = false;\n            // If this is a defer block, serialize extra info.\n            if (isDeferBlock(lView[TVIEW], tNode)) {\n                const lDetails = getLDeferBlockDetails(lView, tNode);\n                const tDetails = getTDeferBlockDetails(lView[TVIEW], tNode);\n                if (context.isIncrementalHydrationEnabled && tDetails.hydrateTriggers !== null) {\n                    const deferBlockId = `d${context.deferBlocks.size}`;\n                    if (tDetails.hydrateTriggers.has(7 /* DeferBlockTrigger.Never */)) {\n                        isHydrateNeverBlock = true;\n                    }\n                    let rootNodes = [];\n                    collectNativeNodesInLContainer(lContainer, rootNodes);\n                    // Add defer block into info context.deferBlocks\n                    const deferBlockInfo = {\n                        [DEFER_PARENT_BLOCK_ID]: parentDeferBlockId,\n                        [NUM_ROOT_NODES]: rootNodes.length,\n                        [DEFER_BLOCK_STATE$1]: lDetails[DEFER_BLOCK_STATE],\n                    };\n                    const serializedTriggers = serializeHydrateTriggers(tDetails.hydrateTriggers);\n                    if (serializedTriggers.length > 0) {\n                        deferBlockInfo[DEFER_HYDRATE_TRIGGERS] = serializedTriggers;\n                    }\n                    context.deferBlocks.set(deferBlockId, deferBlockInfo);\n                    const node = unwrapRNode(lContainer);\n                    if (node !== undefined) {\n                        if (node.nodeType === Node.COMMENT_NODE) {\n                            annotateDeferBlockAnchorForHydration(node, deferBlockId);\n                        }\n                    }\n                    else {\n                        ngDevMode && validateNodeExists(node, childLView, tNode);\n                        ngDevMode &&\n                            validateMatchingNode(node, Node.COMMENT_NODE, null, childLView, tNode, true);\n                        annotateDeferBlockAnchorForHydration(node, deferBlockId);\n                    }\n                    if (!isHydrateNeverBlock) {\n                        // Add JSAction attributes for root nodes that use some hydration triggers\n                        annotateDeferBlockRootNodesWithJsAction(tDetails, rootNodes, deferBlockId, context);\n                    }\n                    // Use current block id as parent for nested routes.\n                    parentDeferBlockId = deferBlockId;\n                    // Serialize extra info into the view object.\n                    // TODO(incremental-hydration): this should be serialized and included at a different level\n                    // (not at the view level).\n                    serializedView[DEFER_BLOCK_ID] = deferBlockId;\n                }\n                // DEFER_BLOCK_STATE is used for reconciliation in hydration, both regular and incremental.\n                // We need to know which template is rendered when hydrating. So we serialize this state\n                // regardless of hydration type.\n                serializedView[DEFER_BLOCK_STATE$1] = lDetails[DEFER_BLOCK_STATE];\n            }\n            if (!isHydrateNeverBlock) {\n                Object.assign(serializedView, serializeLView(lContainer[i], parentDeferBlockId, context));\n            }\n        }\n        // Check if the previous view has the same shape (for example, it was\n        // produced by the *ngFor), in which case bump the counter on the previous\n        // view instead of including the same information again.\n        const currentViewAsString = JSON.stringify(serializedView);\n        if (views.length > 0 && currentViewAsString === lastViewAsString) {\n            const previousView = views[views.length - 1];\n            previousView[MULTIPLIER] ??= 1;\n            previousView[MULTIPLIER]++;\n        }\n        else {\n            // Record this view as most recently added.\n            lastViewAsString = currentViewAsString;\n            views.push(serializedView);\n        }\n    }\n    return views;\n}\nfunction serializeHydrateTriggers(triggerMap) {\n    const serializableDeferBlockTrigger = new Set([\n        0 /* DeferBlockTrigger.Idle */,\n        1 /* DeferBlockTrigger.Immediate */,\n        2 /* DeferBlockTrigger.Viewport */,\n        5 /* DeferBlockTrigger.Timer */,\n    ]);\n    let triggers = [];\n    for (let [trigger, details] of triggerMap) {\n        if (serializableDeferBlockTrigger.has(trigger)) {\n            if (details === null) {\n                triggers.push(trigger);\n            }\n            else {\n                triggers.push({ trigger, delay: details.delay });\n            }\n        }\n    }\n    return triggers;\n}\n/**\n * Helper function to produce a node path (which navigation steps runtime logic\n * needs to take to locate a node) and stores it in the `NODES` section of the\n * current serialized view.\n */\nfunction appendSerializedNodePath(ngh, tNode, lView, excludedParentNodes) {\n    const noOffsetIndex = tNode.index - HEADER_OFFSET;\n    ngh[NODES] ??= {};\n    // Ensure we don't calculate the path multiple times.\n    ngh[NODES][noOffsetIndex] ??= calcPathForNode(tNode, lView, excludedParentNodes);\n}\n/**\n * Helper function to append information about a disconnected node.\n * This info is needed at runtime to avoid DOM lookups for this element\n * and instead, the element would be created from scratch.\n */\nfunction appendDisconnectedNodeIndex(ngh, tNodeOrNoOffsetIndex) {\n    const noOffsetIndex = typeof tNodeOrNoOffsetIndex === 'number'\n        ? tNodeOrNoOffsetIndex\n        : tNodeOrNoOffsetIndex.index - HEADER_OFFSET;\n    ngh[DISCONNECTED_NODES] ??= [];\n    if (!ngh[DISCONNECTED_NODES].includes(noOffsetIndex)) {\n        ngh[DISCONNECTED_NODES].push(noOffsetIndex);\n    }\n}\n/**\n * Serializes the lView data into a SerializedView object that will later be added\n * to the TransferState storage and referenced using the `ngh` attribute on a host\n * element.\n *\n * @param lView the lView we are serializing\n * @param context the hydration context\n * @returns the `SerializedView` object containing the data to be added to the host node\n */\nfunction serializeLView(lView, parentDeferBlockId = null, context) {\n    const ngh = {};\n    const tView = lView[TVIEW];\n    const i18nChildren = getOrComputeI18nChildren(tView, context);\n    const nativeElementsToEventTypes = context.shouldReplayEvents\n        ? collectDomEventsInfo(tView, lView, context.eventTypesToReplay)\n        : null;\n    // Iterate over DOM element references in an LView.\n    for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n        const tNode = tView.data[i];\n        const noOffsetIndex = i - HEADER_OFFSET;\n        // Attempt to serialize any i18n data for the given slot. We do this first, as i18n\n        // has its own process for serialization.\n        const i18nData = trySerializeI18nBlock(lView, i, context);\n        if (i18nData) {\n            ngh[I18N_DATA] ??= {};\n            ngh[I18N_DATA][noOffsetIndex] = i18nData.caseQueue;\n            for (const nodeNoOffsetIndex of i18nData.disconnectedNodes) {\n                appendDisconnectedNodeIndex(ngh, nodeNoOffsetIndex);\n            }\n            for (const nodeNoOffsetIndex of i18nData.disjointNodes) {\n                const tNode = tView.data[nodeNoOffsetIndex + HEADER_OFFSET];\n                ngDevMode && assertTNode(tNode);\n                appendSerializedNodePath(ngh, tNode, lView, i18nChildren);\n            }\n            continue;\n        }\n        // Skip processing of a given slot in the following cases:\n        // - Local refs (e.g. <div #localRef>) take up an extra slot in LViews\n        //   to store the same element. In this case, there is no information in\n        //   a corresponding slot in TNode data structure.\n        // - When a slot contains something other than a TNode. For example, there\n        //   might be some metadata information about a defer block or a control flow block.\n        if (!isTNodeShape(tNode)) {\n            continue;\n        }\n        // Skip any nodes that are in an i18n block but are considered detached (i.e. not\n        // present in the template). These nodes are disconnected from the DOM tree, and\n        // so we don't want to serialize any information about them.\n        if (isDetachedByI18n(tNode)) {\n            continue;\n        }\n        // Check if a native node that represents a given TNode is disconnected from the DOM tree.\n        // Such nodes must be excluded from the hydration (since the hydration won't be able to\n        // find them), so the TNode ids are collected and used at runtime to skip the hydration.\n        //\n        // This situation may happen during the content projection, when some nodes don't make it\n        // into one of the content projection slots (for example, when there is no default\n        // <ng-content /> slot in projector component's template).\n        if (isDisconnectedNode(tNode, lView) && isContentProjectedNode(tNode)) {\n            appendDisconnectedNodeIndex(ngh, tNode);\n            continue;\n        }\n        if (Array.isArray(tNode.projection)) {\n            for (const projectionHeadTNode of tNode.projection) {\n                // We may have `null`s in slots with no projected content.\n                if (!projectionHeadTNode)\n                    continue;\n                if (!Array.isArray(projectionHeadTNode)) {\n                    // If we process re-projected content (i.e. `<ng-content>`\n                    // appears at projection location), skip annotations for this content\n                    // since all DOM nodes in this projection were handled while processing\n                    // a parent lView, which contains those nodes.\n                    if (!isProjectionTNode(projectionHeadTNode) &&\n                        !isInSkipHydrationBlock(projectionHeadTNode)) {\n                        if (isDisconnectedNode(projectionHeadTNode, lView)) {\n                            // Check whether this node is connected, since we may have a TNode\n                            // in the data structure as a projection segment head, but the\n                            // content projection slot might be disabled (e.g.\n                            // <ng-content *ngIf=\"false\" />).\n                            appendDisconnectedNodeIndex(ngh, projectionHeadTNode);\n                        }\n                        else {\n                            appendSerializedNodePath(ngh, projectionHeadTNode, lView, i18nChildren);\n                        }\n                    }\n                }\n                else {\n                    // If a value is an array, it means that we are processing a projection\n                    // where projectable nodes were passed in as DOM nodes (for example, when\n                    // calling `ViewContainerRef.createComponent(CmpA, {projectableNodes: [...]})`).\n                    //\n                    // In this scenario, nodes can come from anywhere (either created manually,\n                    // accessed via `document.querySelector`, etc) and may be in any state\n                    // (attached or detached from the DOM tree). As a result, we can not reliably\n                    // restore the state for such cases during hydration.\n                    throw unsupportedProjectionOfDomNodes(unwrapRNode(lView[i]));\n                }\n            }\n        }\n        conditionallyAnnotateNodePath(ngh, tNode, lView, i18nChildren);\n        if (isLContainer(lView[i])) {\n            // Serialize information about a template.\n            const embeddedTView = tNode.tView;\n            if (embeddedTView !== null) {\n                ngh[TEMPLATES] ??= {};\n                ngh[TEMPLATES][noOffsetIndex] = getSsrId(embeddedTView);\n            }\n            // Serialize views within this LContainer.\n            const hostNode = lView[i][HOST]; // host node of this container\n            // LView[i][HOST] can be of 2 different types:\n            // - either a DOM node\n            // - or an array that represents an LView of a component\n            if (Array.isArray(hostNode)) {\n                // This is a component, serialize info about it.\n                const targetNode = unwrapRNode(hostNode);\n                if (!targetNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME)) {\n                    annotateHostElementForHydration(targetNode, hostNode, parentDeferBlockId, context);\n                }\n            }\n            ngh[CONTAINERS] ??= {};\n            ngh[CONTAINERS][noOffsetIndex] = serializeLContainer(lView[i], tNode, lView, parentDeferBlockId, context);\n        }\n        else if (Array.isArray(lView[i]) && !isLetDeclaration(tNode)) {\n            // This is a component, annotate the host node with an `ngh` attribute.\n            // Note: Let declarations that return an array are also storing an array in the LView,\n            // we need to exclude them.\n            const targetNode = unwrapRNode(lView[i][HOST]);\n            if (!targetNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME)) {\n                annotateHostElementForHydration(targetNode, lView[i], parentDeferBlockId, context);\n            }\n        }\n        else {\n            // <ng-container> case\n            if (tNode.type & 8 /* TNodeType.ElementContainer */) {\n                // An <ng-container> is represented by the number of\n                // top-level nodes. This information is needed to skip over\n                // those nodes to reach a corresponding anchor node (comment node).\n                ngh[ELEMENT_CONTAINERS] ??= {};\n                ngh[ELEMENT_CONTAINERS][noOffsetIndex] = calcNumRootNodes(tView, lView, tNode.child);\n            }\n            else if (tNode.type & (16 /* TNodeType.Projection */ | 128 /* TNodeType.LetDeclaration */)) {\n                // Current TNode represents an `<ng-content>` slot or `@let` declaration,\n                // thus it has no DOM elements associated with it, so the **next sibling**\n                // node would not be able to find an anchor. In this case, use full path instead.\n                let nextTNode = tNode.next;\n                // Skip over all `<ng-content>` slots and `@let` declarations in a row.\n                while (nextTNode !== null &&\n                    nextTNode.type & (16 /* TNodeType.Projection */ | 128 /* TNodeType.LetDeclaration */)) {\n                    nextTNode = nextTNode.next;\n                }\n                if (nextTNode && !isInSkipHydrationBlock(nextTNode)) {\n                    // Handle a tNode after the `<ng-content>` slot.\n                    appendSerializedNodePath(ngh, nextTNode, lView, i18nChildren);\n                }\n            }\n            else if (tNode.type & 1 /* TNodeType.Text */) {\n                const rNode = unwrapRNode(lView[i]);\n                processTextNodeBeforeSerialization(context, rNode);\n            }\n        }\n        // Attach `jsaction` attribute to elements that have registered listeners,\n        // thus potentially having a need to do an event replay.\n        if (nativeElementsToEventTypes && tNode.type & 2 /* TNodeType.Element */) {\n            const nativeElement = unwrapRNode(lView[i]);\n            if (nativeElementsToEventTypes.has(nativeElement)) {\n                setJSActionAttributes(nativeElement, nativeElementsToEventTypes.get(nativeElement), parentDeferBlockId);\n            }\n        }\n    }\n    return ngh;\n}\n/**\n * Serializes node location in cases when it's needed, specifically:\n *\n *  1. If `tNode.projectionNext` is different from `tNode.next` - it means that\n *     the next `tNode` after projection is different from the one in the original\n *     template. Since hydration relies on `tNode.next`, this serialized info\n *     is required to help runtime code find the node at the correct location.\n *  2. In certain content projection-based use-cases, it's possible that only\n *     a content of a projected element is rendered. In this case, content nodes\n *     require an extra annotation, since runtime logic can't rely on parent-child\n *     connection to identify the location of a node.\n */\nfunction conditionallyAnnotateNodePath(ngh, tNode, lView, excludedParentNodes) {\n    if (isProjectionTNode(tNode)) {\n        // Do not annotate projection nodes (<ng-content />), since\n        // they don't have a corresponding DOM node representing them.\n        return;\n    }\n    // Handle case #1 described above.\n    if (tNode.projectionNext &&\n        tNode.projectionNext !== tNode.next &&\n        !isInSkipHydrationBlock(tNode.projectionNext)) {\n        appendSerializedNodePath(ngh, tNode.projectionNext, lView, excludedParentNodes);\n    }\n    // Handle case #2 described above.\n    // Note: we only do that for the first node (i.e. when `tNode.prev === null`),\n    // the rest of the nodes would rely on the current node location, so no extra\n    // annotation is needed.\n    if (tNode.prev === null &&\n        tNode.parent !== null &&\n        isDisconnectedNode(tNode.parent, lView) &&\n        !isDisconnectedNode(tNode, lView)) {\n        appendSerializedNodePath(ngh, tNode, lView, excludedParentNodes);\n    }\n}\n/**\n * Determines whether a component instance that is represented\n * by a given LView uses `ViewEncapsulation.ShadowDom`.\n */\nfunction componentUsesShadowDomEncapsulation(lView) {\n    const instance = lView[CONTEXT];\n    return instance?.constructor\n        ? getComponentDef(instance.constructor)?.encapsulation === ViewEncapsulation.ShadowDom\n        : false;\n}\n/**\n * Annotates component host element for hydration:\n * - by either adding the `ngh` attribute and collecting hydration-related info\n *   for the serialization and transferring to the client\n * - or by adding the `ngSkipHydration` attribute in case Angular detects that\n *   component contents is not compatible with hydration.\n *\n * @param element The Host element to be annotated\n * @param lView The associated LView\n * @param context The hydration context\n * @returns An index of serialized view from the transfer state object\n *          or `null` when a given component can not be serialized.\n */\nfunction annotateHostElementForHydration(element, lView, parentDeferBlockId, context) {\n    const renderer = lView[RENDERER];\n    if ((hasI18n(lView) && !isI18nHydrationSupportEnabled()) ||\n        componentUsesShadowDomEncapsulation(lView)) {\n        // Attach the skip hydration attribute if this component:\n        // - either has i18n blocks, since hydrating such blocks is not yet supported\n        // - or uses ShadowDom view encapsulation, since Domino doesn't support\n        //   shadow DOM, so we can not guarantee that client and server representations\n        //   would exactly match\n        renderer.setAttribute(element, SKIP_HYDRATION_ATTR_NAME, '');\n        return null;\n    }\n    else {\n        const ngh = serializeLView(lView, parentDeferBlockId, context);\n        const index = context.serializedViewCollection.add(ngh);\n        renderer.setAttribute(element, NGH_ATTR_NAME, index.toString());\n        return index;\n    }\n}\n/**\n * Annotates defer block comment node for hydration:\n *\n * @param comment The Host element to be annotated\n * @param deferBlockId the id of the target defer block\n */\nfunction annotateDeferBlockAnchorForHydration(comment, deferBlockId) {\n    comment.textContent = `ngh=${deferBlockId}`;\n}\n/**\n * Physically inserts the comment nodes to ensure empty text nodes and adjacent\n * text node separators are preserved after server serialization of the DOM.\n * These get swapped back for empty text nodes or separators once hydration happens\n * on the client.\n *\n * @param corruptedTextNodes The Map of text nodes to be replaced with comments\n * @param doc The document\n */\nfunction insertCorruptedTextNodeMarkers(corruptedTextNodes, doc) {\n    for (const [textNode, marker] of corruptedTextNodes) {\n        textNode.after(doc.createComment(marker));\n    }\n}\n/**\n * Detects whether a given TNode represents a node that\n * is being content projected.\n */\nfunction isContentProjectedNode(tNode) {\n    let currentTNode = tNode;\n    while (currentTNode != null) {\n        // If we come across a component host node in parent nodes -\n        // this TNode is in the content projection section.\n        if (isComponentHost(currentTNode)) {\n            return true;\n        }\n        currentTNode = currentTNode.parent;\n    }\n    return false;\n}\n/**\n * Incremental hydration requires that any defer block root node\n * with interaction or hover triggers have all of their root nodes\n * trigger hydration with those events. So we need to make sure all\n * the root nodes of that block have the proper jsaction attribute\n * to ensure hydration is triggered, since the content is dehydrated\n */\nfunction annotateDeferBlockRootNodesWithJsAction(tDetails, rootNodes, parentDeferBlockId, context) {\n    const actionList = convertHydrateTriggersToJsAction(tDetails.hydrateTriggers);\n    for (let et of actionList) {\n        context.eventTypesToReplay.regular.add(et);\n    }\n    if (actionList.length > 0) {\n        const elementNodes = rootNodes.filter((rn) => rn.nodeType === Node.ELEMENT_NODE);\n        for (let rNode of elementNodes) {\n            setJSActionAttributes(rNode, actionList, parentDeferBlockId);\n        }\n    }\n}\n\n/**\n * Indicates whether the hydration-related code was added,\n * prevents adding it multiple times.\n */\nlet isHydrationSupportEnabled = false;\n/**\n * Indicates whether the i18n-related code was added,\n * prevents adding it multiple times.\n *\n * Note: This merely controls whether the code is loaded,\n * while `setIsI18nHydrationSupportEnabled` determines\n * whether i18n blocks are serialized or hydrated.\n */\nlet isI18nHydrationRuntimeSupportEnabled = false;\n/**\n * Indicates whether the incremental hydration code was added,\n * prevents adding it multiple times.\n */\nlet isIncrementalHydrationRuntimeSupportEnabled = false;\n/**\n * Defines a period of time that Angular waits for the `ApplicationRef.isStable` to emit `true`.\n * If there was no event with the `true` value during this time, Angular reports a warning.\n */\nconst APPLICATION_IS_STABLE_TIMEOUT = 10_000;\n/**\n * Brings the necessary hydration code in tree-shakable manner.\n * The code is only present when the `provideClientHydration` is\n * invoked. Otherwise, this code is tree-shaken away during the\n * build optimization step.\n *\n * This technique allows us to swap implementations of methods so\n * tree shaking works appropriately when hydration is disabled or\n * enabled. It brings in the appropriate version of the method that\n * supports hydration only when enabled.\n */\nfunction enableHydrationRuntimeSupport() {\n    if (!isHydrationSupportEnabled) {\n        isHydrationSupportEnabled = true;\n        enableRetrieveHydrationInfoImpl();\n        enableLocateOrCreateElementNodeImpl();\n        enableLocateOrCreateTextNodeImpl();\n        enableLocateOrCreateElementContainerNodeImpl();\n        enableLocateOrCreateContainerAnchorImpl();\n        enableLocateOrCreateContainerRefImpl();\n        enableFindMatchingDehydratedViewImpl();\n        enableApplyRootElementTransformImpl();\n    }\n}\n/**\n * Brings the necessary i18n hydration code in tree-shakable manner.\n * Similar to `enableHydrationRuntimeSupport`, the code is only\n * present when `withI18nSupport` is invoked.\n */\nfunction enableI18nHydrationRuntimeSupport() {\n    if (!isI18nHydrationRuntimeSupportEnabled) {\n        isI18nHydrationRuntimeSupportEnabled = true;\n        enableLocateOrCreateI18nNodeImpl();\n        enablePrepareI18nBlockForHydrationImpl();\n        enableClaimDehydratedIcuCaseImpl();\n    }\n}\n/**\n * Brings the necessary incremental hydration code in tree-shakable manner.\n * Similar to `enableHydrationRuntimeSupport`, the code is only\n * present when `enableIncrementalHydrationRuntimeSupport` is invoked.\n */\nfunction enableIncrementalHydrationRuntimeSupport() {\n    if (!isIncrementalHydrationRuntimeSupportEnabled) {\n        isIncrementalHydrationRuntimeSupportEnabled = true;\n        enableRetrieveDeferBlockDataImpl();\n    }\n}\n/**\n * Outputs a message with hydration stats into a console.\n */\nfunction printHydrationStats(injector) {\n    const console = injector.get(Console);\n    const message = `Angular hydrated ${ngDevMode.hydratedComponents} component(s) ` +\n        `and ${ngDevMode.hydratedNodes} node(s), ` +\n        `${ngDevMode.componentsSkippedHydration} component(s) were skipped. ` +\n        (isIncrementalHydrationEnabled(injector)\n            ? `${ngDevMode.deferBlocksWithIncrementalHydration} defer block(s) were configured to use incremental hydration. `\n            : '') +\n        `Learn more at https://angular.dev/guide/hydration.`;\n    // tslint:disable-next-line:no-console\n    console.log(message);\n}\n/**\n * Returns a Promise that is resolved when an application becomes stable.\n */\nfunction whenStableWithTimeout(appRef, injector) {\n    const whenStablePromise = appRef.whenStable();\n    if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n        const timeoutTime = APPLICATION_IS_STABLE_TIMEOUT;\n        const console = injector.get(Console);\n        const ngZone = injector.get(NgZone);\n        // The following call should not and does not prevent the app to become stable\n        // We cannot use RxJS timer here because the app would remain unstable.\n        // This also avoids an extra change detection cycle.\n        const timeoutId = ngZone.runOutsideAngular(() => {\n            return setTimeout(() => logWarningOnStableTimedout(timeoutTime, console), timeoutTime);\n        });\n        whenStablePromise.finally(() => clearTimeout(timeoutId));\n    }\n    return whenStablePromise;\n}\n/**\n * Defines a name of an attribute that is added to the <body> tag\n * in the `index.html` file in case a given route was configured\n * with `RenderMode.Client`. 'cm' is an abbreviation for \"Client Mode\".\n */\nconst CLIENT_RENDER_MODE_FLAG = 'ngcm';\n/**\n * Checks whether the `RenderMode.Client` was defined for the current route.\n */\nfunction isClientRenderModeEnabled() {\n    const doc = getDocument();\n    return ((typeof ngServerMode === 'undefined' || !ngServerMode) &&\n        doc.body.hasAttribute(CLIENT_RENDER_MODE_FLAG));\n}\n/**\n * Returns a set of providers required to setup hydration support\n * for an application that is server side rendered. This function is\n * included into the `provideClientHydration` public API function from\n * the `platform-browser` package.\n *\n * The function sets up an internal flag that would be recognized during\n * the server side rendering time as well, so there is no need to\n * configure or change anything in NgUniversal to enable the feature.\n */\nfunction withDomHydration() {\n    const providers = [\n        {\n            provide: IS_HYDRATION_DOM_REUSE_ENABLED,\n            useFactory: () => {\n                let isEnabled = true;\n                if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n                    // On the client, verify that the server response contains\n                    // hydration annotations. Otherwise, keep hydration disabled.\n                    const transferState = inject(TransferState, { optional: true });\n                    isEnabled = !!transferState?.get(NGH_DATA_KEY, null);\n                }\n                if (isEnabled) {\n                    performanceMarkFeature('NgHydration');\n                }\n                return isEnabled;\n            },\n        },\n        {\n            provide: ENVIRONMENT_INITIALIZER,\n            useValue: () => {\n                // i18n support is enabled by calling withI18nSupport(), but there's\n                // no way to turn it off (e.g. for tests), so we turn it off by default.\n                setIsI18nHydrationSupportEnabled(false);\n                if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n                    // Since this function is used across both server and client,\n                    // make sure that the runtime code is only added when invoked\n                    // on the client (see the `enableHydrationRuntimeSupport` function\n                    // call below).\n                    return;\n                }\n                if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {\n                    verifySsrContentsIntegrity();\n                    enableHydrationRuntimeSupport();\n                }\n                else if (typeof ngDevMode !== 'undefined' && ngDevMode && !isClientRenderModeEnabled()) {\n                    const console = inject(Console);\n                    const message = formatRuntimeError(-505 /* RuntimeErrorCode.MISSING_HYDRATION_ANNOTATIONS */, 'Angular hydration was requested on the client, but there was no ' +\n                        'serialized information present in the server response, ' +\n                        'thus hydration was not enabled. ' +\n                        'Make sure the `provideClientHydration()` is included into the list ' +\n                        'of providers in the server part of the application configuration.');\n                    // tslint:disable-next-line:no-console\n                    console.warn(message);\n                }\n            },\n            multi: true,\n        },\n    ];\n    if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n        providers.push({\n            provide: PRESERVE_HOST_CONTENT,\n            useFactory: () => {\n                // Preserve host element content only in a browser\n                // environment and when hydration is configured properly.\n                // On a server, an application is rendered from scratch,\n                // so the host content needs to be empty.\n                return inject(IS_HYDRATION_DOM_REUSE_ENABLED);\n            },\n        }, {\n            provide: APP_BOOTSTRAP_LISTENER,\n            useFactory: () => {\n                if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {\n                    const appRef = inject(ApplicationRef);\n                    const injector = inject(Injector);\n                    return () => {\n                        // Wait until an app becomes stable and cleanup all views that\n                        // were not claimed during the application bootstrap process.\n                        // The timing is similar to when we start the serialization process\n                        // on the server.\n                        //\n                        // Note: the cleanup task *MUST* be scheduled within the Angular zone in Zone apps\n                        // to ensure that change detection is properly run afterward.\n                        whenStableWithTimeout(appRef, injector).then(() => {\n                            cleanupDehydratedViews(appRef);\n                            if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n                                countBlocksSkippedByHydration(injector);\n                                printHydrationStats(injector);\n                            }\n                        });\n                    };\n                }\n                return () => { }; // noop\n            },\n            multi: true,\n        });\n    }\n    return makeEnvironmentProviders(providers);\n}\n/**\n * Returns a set of providers required to setup support for i18n hydration.\n * Requires hydration to be enabled separately.\n */\nfunction withI18nSupport() {\n    return [\n        {\n            provide: IS_I18N_HYDRATION_ENABLED,\n            useFactory: () => inject(IS_HYDRATION_DOM_REUSE_ENABLED),\n        },\n        {\n            provide: ENVIRONMENT_INITIALIZER,\n            useValue: () => {\n                if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {\n                    enableI18nHydrationRuntimeSupport();\n                    setIsI18nHydrationSupportEnabled(true);\n                    performanceMarkFeature('NgI18nHydration');\n                }\n            },\n            multi: true,\n        },\n    ];\n}\n/**\n * Returns a set of providers required to setup support for incremental hydration.\n * Requires hydration to be enabled separately.\n * Enabling incremental hydration also enables event replay for the entire app.\n *\n * @developerPreview\n */\nfunction withIncrementalHydration() {\n    const providers = [\n        withEventReplay(),\n        {\n            provide: IS_INCREMENTAL_HYDRATION_ENABLED,\n            useValue: true,\n        },\n        {\n            provide: DEHYDRATED_BLOCK_REGISTRY,\n            useClass: DehydratedBlockRegistry,\n        },\n        {\n            provide: ENVIRONMENT_INITIALIZER,\n            useValue: () => {\n                enableIncrementalHydrationRuntimeSupport();\n                performanceMarkFeature('NgIncrementalHydration');\n            },\n            multi: true,\n        },\n    ];\n    if (typeof ngServerMode === 'undefined' || !ngServerMode) {\n        providers.push({\n            provide: APP_BOOTSTRAP_LISTENER,\n            useFactory: () => {\n                const injector = inject(Injector);\n                const doc = getDocument();\n                return () => {\n                    const deferBlockData = processBlockData(injector);\n                    const commentsByBlockId = gatherDeferBlocksCommentNodes(doc, doc.body);\n                    processAndInitTriggers(injector, deferBlockData, commentsByBlockId);\n                    appendDeferBlocksToJSActionMap(doc, injector);\n                };\n            },\n            multi: true,\n        });\n    }\n    return providers;\n}\n/**\n *\n * @param time The time in ms until the stable timedout warning message is logged\n */\nfunction logWarningOnStableTimedout(time, console) {\n    const message = `Angular hydration expected the ApplicationRef.isStable() to emit \\`true\\`, but it ` +\n        `didn't happen within ${time}ms. Angular hydration logic depends on the application becoming stable ` +\n        `as a signal to complete hydration process.`;\n    console.warn(formatRuntimeError(-506 /* RuntimeErrorCode.HYDRATION_STABLE_TIMEDOUT */, message));\n}\n/**\n * Verifies whether the DOM contains a special marker added during SSR time to make sure\n * there is no SSR'ed contents transformations happen after SSR is completed. Typically that\n * happens either by CDN or during the build process as an optimization to remove comment nodes.\n * Hydration process requires comment nodes produced by Angular to locate correct DOM segments.\n * When this special marker is *not* present - throw an error and do not proceed with hydration,\n * since it will not be able to function correctly.\n *\n * Note: this function is invoked only on the client, so it's safe to use DOM APIs.\n */\nfunction verifySsrContentsIntegrity() {\n    const doc = getDocument();\n    let hydrationMarker;\n    for (const node of doc.body.childNodes) {\n        if (node.nodeType === Node.COMMENT_NODE &&\n            node.textContent?.trim() === SSR_CONTENT_INTEGRITY_MARKER) {\n            hydrationMarker = node;\n            break;\n        }\n    }\n    if (!hydrationMarker) {\n        throw new RuntimeError(-507 /* RuntimeErrorCode.MISSING_SSR_CONTENT_INTEGRITY_MARKER */, typeof ngDevMode !== 'undefined' &&\n            ngDevMode &&\n            'Angular hydration logic detected that HTML content of this page was modified after it ' +\n                'was produced during server side rendering. Make sure that there are no optimizations ' +\n                'that remove comment nodes from HTML enabled on your CDN. Angular hydration ' +\n                'relies on HTML produced by the server, including whitespaces and comment nodes.');\n    }\n}\n\n/**\n * Transforms a value (typically a string) to a boolean.\n * Intended to be used as a transform function of an input.\n *\n *  @usageNotes\n *  ```ts\n *  @Input({ transform: booleanAttribute }) status!: boolean;\n *  ```\n * @param value Value to be transformed.\n *\n * @publicApi\n */\nfunction booleanAttribute(value) {\n    return typeof value === 'boolean' ? value : value != null && value !== 'false';\n}\n/**\n * Transforms a value (typically a string) to a number.\n * Intended to be used as a transform function of an input.\n * @param value Value to be transformed.\n * @param fallbackValue Value to use if the provided value can't be parsed as a number.\n *\n *  @usageNotes\n *  ```ts\n *  @Input({ transform: numberAttribute }) id!: number;\n *  ```\n *\n * @publicApi\n */\nfunction numberAttribute(value, fallbackValue = NaN) {\n    // parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,\n    // and other non-number values as NaN, where Number just uses 0) but it considers the string\n    // '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.\n    const isNumberValue = !isNaN(parseFloat(value)) && !isNaN(Number(value));\n    return isNumberValue ? Number(value) : fallbackValue;\n}\n\nconst PERFORMANCE_MARK_PREFIX = '🅰️';\nlet enablePerfLogging = false;\n/**\n * Function that will start measuring against the performance API\n * Should be used in pair with stopMeasuring\n */\nfunction startMeasuring(label) {\n    if (!enablePerfLogging) {\n        return;\n    }\n    const { startLabel } = labels(label);\n    /* tslint:disable:ban */\n    performance.mark(startLabel);\n    /* tslint:enable:ban */\n}\n/**\n * Function that will stop measuring against the performance API\n * Should be used in pair with stopMeasuring\n */\nfunction stopMeasuring(label) {\n    if (!enablePerfLogging) {\n        return;\n    }\n    const { startLabel, labelName, endLabel } = labels(label);\n    /* tslint:disable:ban */\n    performance.mark(endLabel);\n    performance.measure(labelName, startLabel, endLabel);\n    performance.clearMarks(startLabel);\n    performance.clearMarks(endLabel);\n    /* tslint:enable:ban */\n}\nfunction labels(label) {\n    const labelName = `${PERFORMANCE_MARK_PREFIX}:${label}`;\n    return {\n        labelName,\n        startLabel: `start:${labelName}`,\n        endLabel: `end:${labelName}`,\n    };\n}\nlet warningLogged = false;\n/**\n * This enables an internal performance profiler\n *\n * It should not be imported in application code\n */\nfunction enableProfiling() {\n    if (!warningLogged &&\n        (typeof performance === 'undefined' || !performance.mark || !performance.measure)) {\n        warningLogged = true;\n        console.warn('Performance API is not supported on this platform');\n        return;\n    }\n    enablePerfLogging = true;\n}\nfunction disableProfiling() {\n    enablePerfLogging = false;\n}\n\n/*!\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n/**\n * Gets the class name of the closest component to a node.\n * Warning! this function will return minified names if the name of the component is minified. The\n * consumer of the function is responsible for resolving the minified name to its original name.\n * @param node Node from which to start the search.\n */\nfunction getClosestComponentName(node) {\n    let currentNode = node;\n    while (currentNode) {\n        const lView = readPatchedLView(currentNode);\n        if (lView !== null) {\n            for (let i = HEADER_OFFSET; i < lView.length; i++) {\n                const current = lView[i];\n                if ((!isLView(current) && !isLContainer(current)) || current[HOST] !== currentNode) {\n                    continue;\n                }\n                const tView = lView[TVIEW];\n                const tNode = getTNode(tView, i);\n                if (isComponentHost(tNode)) {\n                    const def = tView.data[tNode.directiveStart + tNode.componentOffset];\n                    const name = def.debugInfo?.className || def.type.name;\n                    // Note: the name may be an empty string if the class name is\n                    // dropped due to minification. In such cases keep going up the tree.\n                    if (name) {\n                        return name;\n                    }\n                    else {\n                        break;\n                    }\n                }\n            }\n        }\n        currentNode = currentNode.parentNode;\n    }\n    return null;\n}\n\n/**\n * Compiles a partial directive declaration object into a full directive definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareDirective(decl) {\n    const compiler = getCompilerFacade({\n        usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n        kind: 'directive',\n        type: decl.type,\n    });\n    return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);\n}\n/**\n * Evaluates the class metadata declaration.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareClassMetadata(decl) {\n    setClassMetadata(decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? null);\n}\n/**\n * Evaluates the class metadata of a component that contains deferred blocks.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareClassMetadataAsync(decl) {\n    setClassMetadataAsync(decl.type, decl.resolveDeferredDeps, (...types) => {\n        const meta = decl.resolveMetadata(...types);\n        setClassMetadata(decl.type, meta.decorators, meta.ctorParameters, meta.propDecorators);\n    });\n}\n/**\n * Compiles a partial component declaration object into a full component definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareComponent(decl) {\n    const compiler = getCompilerFacade({\n        usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n        kind: 'component',\n        type: decl.type,\n    });\n    return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);\n}\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareFactory(decl) {\n    const compiler = getCompilerFacade({\n        usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n        kind: getFactoryKind(decl.target),\n        type: decl.type,\n    });\n    return compiler.compileFactoryDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);\n}\nfunction getFactoryKind(target) {\n    switch (target) {\n        case FactoryTarget.Directive:\n            return 'directive';\n        case FactoryTarget.Component:\n            return 'component';\n        case FactoryTarget.Injectable:\n            return 'injectable';\n        case FactoryTarget.Pipe:\n            return 'pipe';\n        case FactoryTarget.NgModule:\n            return 'NgModule';\n    }\n}\n/**\n * Compiles a partial injectable declaration object into a full injectable definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareInjectable(decl) {\n    const compiler = getCompilerFacade({\n        usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n        kind: 'injectable',\n        type: decl.type,\n    });\n    return compiler.compileInjectableDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);\n}\n/**\n * Compiles a partial injector declaration object into a full injector definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareInjector(decl) {\n    const compiler = getCompilerFacade({\n        usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n        kind: 'NgModule',\n        type: decl.type,\n    });\n    return compiler.compileInjectorDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);\n}\n/**\n * Compiles a partial NgModule declaration object into a full NgModule definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclareNgModule(decl) {\n    const compiler = getCompilerFacade({\n        usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n        kind: 'NgModule',\n        type: decl.type,\n    });\n    return compiler.compileNgModuleDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);\n}\n/**\n * Compiles a partial pipe declaration object into a full pipe definition object.\n *\n * @codeGenApi\n */\nfunction ɵɵngDeclarePipe(decl) {\n    const compiler = getCompilerFacade({\n        usage: 1 /* JitCompilerUsage.PartialDeclaration */,\n        kind: 'pipe',\n        type: decl.type,\n    });\n    return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);\n}\n\n// we reexport these symbols just so that they are retained during the dead code elimination\n\n/**\n * Create a computed `Signal` which derives a reactive value from an expression.\n */\nfunction computed(computation, options) {\n    performanceMarkFeature('NgSignals');\n    const getter = createComputed$1(computation);\n    if (options?.equal) {\n        getter[SIGNAL$1].equal = options.equal;\n    }\n    if (ngDevMode) {\n        getter.toString = () => `[Computed: ${getter()}]`;\n        getter[SIGNAL$1].debugName = options?.debugName;\n    }\n    return getter;\n}\n\nconst identityFn = (v) => v;\n/**\n * Create a linked signal which represents state that is (re)set from a linked reactive expression.\n */\nfunction createLinkedSignal(node) {\n    const linkedSignalGetter = () => {\n        // Check if the value needs updating before returning it.\n        producerUpdateValueVersion$1(node);\n        // Record that someone looked at this signal.\n        producerAccessed$1(node);\n        if (node.value === ERRORED) {\n            throw node.error;\n        }\n        return node.value;\n    };\n    const getter = linkedSignalGetter;\n    getter[SIGNAL$1] = node;\n    if (ngDevMode) {\n        getter.toString = () => `[LinkedSignal: ${getter()}]`;\n    }\n    getter.set = (newValue) => {\n        producerUpdateValueVersion$1(node);\n        signalSetFn$1(node, newValue);\n        producerMarkClean$1(node);\n    };\n    getter.update = (updateFn) => {\n        producerUpdateValueVersion$1(node);\n        signalUpdateFn$1(node, updateFn);\n        producerMarkClean$1(node);\n    };\n    getter.asReadonly = signalAsReadonlyFn.bind(getter);\n    return getter;\n}\nfunction linkedSignal(optionsOrComputation, options) {\n    performanceMarkFeature('NgSignals');\n    const isShorthand = typeof optionsOrComputation === 'function';\n    const node = Object.create(LINKED_SIGNAL_NODE);\n    node.source = isShorthand ? optionsOrComputation : optionsOrComputation.source;\n    if (!isShorthand) {\n        node.computation = optionsOrComputation.computation;\n    }\n    const equal = isShorthand ? options?.equal : optionsOrComputation.equal;\n    if (equal) {\n        node.equal = equal;\n    }\n    return createLinkedSignal(node);\n}\n/**\n * A dedicated symbol used before a state value has been set / calculated for the first time.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst UNSET = /* @__PURE__ */ Symbol('UNSET');\n/**\n * A dedicated symbol used in place of a linked signal value to indicate that a given computation\n * is in progress. Used to detect cycles in computation chains.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst COMPUTING = /* @__PURE__ */ Symbol('COMPUTING');\n/**\n * A dedicated symbol used in place of a linked signal value to indicate that a given computation\n * failed. The thrown error is cached until the computation gets dirty again or the state is set.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst ERRORED = /* @__PURE__ */ Symbol('ERRORED');\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `LINKED_SIGNAL_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst LINKED_SIGNAL_NODE = /* @__PURE__ */ (() => {\n    return {\n        ...REACTIVE_NODE$1,\n        value: UNSET,\n        dirty: true,\n        error: null,\n        equal: defaultEquals$1,\n        computation: identityFn,\n        producerMustRecompute(node) {\n            // Force a recomputation if there's no current value, or if the current value is in the\n            // process of being calculated (which should throw an error).\n            return node.value === UNSET || node.value === COMPUTING;\n        },\n        producerRecomputeValue(node) {\n            if (node.value === COMPUTING) {\n                // Our computation somehow led to a cyclic read of itself.\n                throw new Error('Detected cycle in computations.');\n            }\n            const oldValue = node.value;\n            node.value = COMPUTING;\n            const prevConsumer = consumerBeforeComputation$1(node);\n            let newValue;\n            try {\n                const newSourceValue = node.source();\n                const prev = oldValue === UNSET || oldValue === ERRORED\n                    ? undefined\n                    : {\n                        source: node.sourceValue,\n                        value: oldValue,\n                    };\n                newValue = node.computation(newSourceValue, prev);\n                node.sourceValue = newSourceValue;\n            }\n            catch (err) {\n                newValue = ERRORED;\n                node.error = err;\n            }\n            finally {\n                consumerAfterComputation$1(node, prevConsumer);\n            }\n            if (oldValue !== UNSET && newValue !== ERRORED && node.equal(oldValue, newValue)) {\n                // No change to `valueVersion` - old and new values are\n                // semantically equivalent.\n                node.value = oldValue;\n                return;\n            }\n            node.value = newValue;\n            node.version++;\n        },\n    };\n})();\n\n/**\n * Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function\n * can, optionally, return a value.\n */\nfunction untracked(nonReactiveReadsFn) {\n    const prevConsumer = setActiveConsumer$1(null);\n    // We are not trying to catch any particular errors here, just making sure that the consumers\n    // stack is restored in case of errors.\n    try {\n        return nonReactiveReadsFn();\n    }\n    finally {\n        setActiveConsumer$1(prevConsumer);\n    }\n}\n\nclass ViewContext {\n    view;\n    node;\n    constructor(view, node) {\n        this.view = view;\n        this.node = node;\n    }\n    /**\n     * @internal\n     * @nocollapse\n     */\n    static __NG_ELEMENT_ID__ = injectViewContext;\n}\nfunction injectViewContext() {\n    return new ViewContext(getLView(), getCurrentTNode());\n}\n\n/**\n * Controls whether effects use the legacy `microtaskEffect` by default.\n */\nconst USE_MICROTASK_EFFECT_BY_DEFAULT = false;\n\nclass MicrotaskEffectScheduler extends ZoneAwareEffectScheduler {\n    pendingTasks = inject(PendingTasksInternal);\n    taskId = null;\n    schedule(effect) {\n        // Check whether there are any pending effects _before_ queueing in the base class.\n        super.schedule(effect);\n        if (this.taskId === null) {\n            this.taskId = this.pendingTasks.add();\n            queueMicrotask(() => this.flush());\n        }\n    }\n    flush() {\n        try {\n            super.flush();\n        }\n        finally {\n            if (this.taskId !== null) {\n                this.pendingTasks.remove(this.taskId);\n                this.taskId = null;\n            }\n        }\n    }\n    /** @nocollapse */\n    static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n        token: MicrotaskEffectScheduler,\n        providedIn: 'root',\n        factory: () => new MicrotaskEffectScheduler(),\n    });\n}\n/**\n * Core reactive node for an Angular effect.\n *\n * `EffectHandle` combines the reactive graph's `Watch` base node for effects with the framework's\n * scheduling abstraction (`MicrotaskEffectScheduler`) as well as automatic cleanup via `DestroyRef`\n * if available/requested.\n */\nclass EffectHandle {\n    scheduler;\n    effectFn;\n    zone;\n    injector;\n    unregisterOnDestroy;\n    watcher;\n    constructor(scheduler, effectFn, zone, destroyRef, injector, allowSignalWrites) {\n        this.scheduler = scheduler;\n        this.effectFn = effectFn;\n        this.zone = zone;\n        this.injector = injector;\n        this.watcher = createWatch$1((onCleanup) => this.runEffect(onCleanup), () => this.schedule(), allowSignalWrites);\n        this.unregisterOnDestroy = destroyRef?.onDestroy(() => this.destroy());\n    }\n    runEffect(onCleanup) {\n        try {\n            this.effectFn(onCleanup);\n        }\n        catch (err) {\n            // Inject the `ErrorHandler` here in order to avoid circular DI error\n            // if the effect is used inside of a custom `ErrorHandler`.\n            const errorHandler = this.injector.get(ErrorHandler, null, { optional: true });\n            errorHandler?.handleError(err);\n        }\n    }\n    run() {\n        this.watcher.run();\n    }\n    schedule() {\n        this.scheduler.schedule(this);\n    }\n    destroy() {\n        this.watcher.destroy();\n        this.unregisterOnDestroy?.();\n        // Note: if the effect is currently scheduled, it's not un-scheduled, and so the scheduler will\n        // retain a reference to it. Attempting to execute it will be a no-op.\n    }\n}\n// Just used for the name for the debug error below.\nfunction effect$1() { }\n/**\n * Create a global `Effect` for the given reactive function.\n */\nfunction microtaskEffect(effectFn, options) {\n    performanceMarkFeature('NgSignals');\n    ngDevMode &&\n        assertNotInReactiveContext(effect$1, 'Call `effect` outside of a reactive context. For example, schedule the ' +\n            'effect inside the component constructor.');\n    !options?.injector && assertInInjectionContext(effect$1);\n    const injector = options?.injector ?? inject(Injector);\n    const destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;\n    const handle = new EffectHandle(injector.get(MicrotaskEffectScheduler), effectFn, typeof Zone === 'undefined' ? null : Zone.current, destroyRef, injector, options?.allowSignalWrites ?? false);\n    // Effects need to be marked dirty manually to trigger their initial run. The timing of this\n    // marking matters, because the effects may read signals that track component inputs, which are\n    // only available after those components have had their first update pass.\n    //\n    // We inject `ChangeDetectorRef` optionally, to determine whether this effect is being created in\n    // the context of a component or not. If it is, then we check whether the component has already\n    // run its update pass, and defer the effect's initial scheduling until the update pass if it\n    // hasn't already run.\n    const cdr = injector.get(ChangeDetectorRef, null, { optional: true });\n    if (!cdr || !(cdr._lView[FLAGS] & 8 /* LViewFlags.FirstLViewPass */)) {\n        // This effect is either not running in a view injector, or the view has already\n        // undergone its first change detection pass, which is necessary for any required inputs to be\n        // set.\n        handle.watcher.notify();\n    }\n    else {\n        // Delay the initialization of the effect until the view is fully initialized.\n        (cdr._lView[EFFECTS_TO_SCHEDULE] ??= []).push(handle.watcher.notify);\n    }\n    return handle;\n}\n\nlet useMicrotaskEffectsByDefault = USE_MICROTASK_EFFECT_BY_DEFAULT;\n/**\n * Toggle the flag on whether to use microtask effects (for testing).\n */\nfunction setUseMicrotaskEffectsByDefault(value) {\n    const prev = useMicrotaskEffectsByDefault;\n    useMicrotaskEffectsByDefault = value;\n    return prev;\n}\nclass EffectRefImpl {\n    [SIGNAL$1];\n    constructor(node) {\n        this[SIGNAL$1] = node;\n    }\n    destroy() {\n        this[SIGNAL$1].destroy();\n    }\n}\n/**\n * Registers an \"effect\" that will be scheduled & executed whenever the signals that it reads\n * changes.\n *\n * Angular has two different kinds of effect: component effects and root effects. Component effects\n * are created when `effect()` is called from a component, directive, or within a service of a\n * component/directive. Root effects are created when `effect()` is called from outside the\n * component tree, such as in a root service, or when the `forceRoot` option is provided.\n *\n * The two effect types differ in their timing. Component effects run as a component lifecycle\n * event during Angular's synchronization (change detection) process, and can safely read input\n * signals or create/destroy views that depend on component state. Root effects run as microtasks\n * and have no connection to the component tree or change detection.\n *\n * `effect()` must be run in injection context, unless the `injector` option is manually specified.\n *\n * @developerPreview\n */\nfunction effect(effectFn, options) {\n    if (useMicrotaskEffectsByDefault) {\n        if (ngDevMode && options?.forceRoot) {\n            throw new Error(`Cannot use 'forceRoot' option with microtask effects on`);\n        }\n        return microtaskEffect(effectFn, options);\n    }\n    performanceMarkFeature('NgSignals');\n    ngDevMode &&\n        assertNotInReactiveContext(effect, 'Call `effect` outside of a reactive context. For example, schedule the ' +\n            'effect inside the component constructor.');\n    !options?.injector && assertInInjectionContext(effect);\n    if (ngDevMode && options?.allowSignalWrites !== undefined) {\n        console.warn(`The 'allowSignalWrites' flag is deprecated and no longer impacts effect() (writes are always allowed)`);\n    }\n    const injector = options?.injector ?? inject(Injector);\n    let destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;\n    let node;\n    const viewContext = injector.get(ViewContext, null, { optional: true });\n    const notifier = injector.get(ChangeDetectionScheduler);\n    if (viewContext !== null && !options?.forceRoot) {\n        // This effect was created in the context of a view, and will be associated with the view.\n        node = createViewEffect(viewContext.view, notifier, effectFn);\n        if (destroyRef instanceof NodeInjectorDestroyRef && destroyRef._lView === viewContext.view) {\n            // The effect is being created in the same view as the `DestroyRef` references, so it will be\n            // automatically destroyed without the need for an explicit `DestroyRef` registration.\n            destroyRef = null;\n        }\n    }\n    else {\n        // This effect was created outside the context of a view, and will be scheduled independently.\n        node = createRootEffect(effectFn, injector.get(EffectScheduler), notifier);\n    }\n    node.injector = injector;\n    if (destroyRef !== null) {\n        // If we need to register for cleanup, do that here.\n        node.onDestroyFn = destroyRef.onDestroy(() => node.destroy());\n    }\n    if (ngDevMode) {\n        node.debugName = options?.debugName ?? '';\n    }\n    return new EffectRefImpl(node);\n}\n/**\n * Not public API, which guarantees `EffectScheduler` only ever comes from the application root\n * injector.\n */\nconst APP_EFFECT_SCHEDULER = /* @__PURE__ */ new InjectionToken('', {\n    providedIn: 'root',\n    factory: () => inject(EffectScheduler),\n});\nconst BASE_EFFECT_NODE = \n/* @__PURE__ */ (() => ({\n    ...REACTIVE_NODE$1,\n    consumerIsAlwaysLive: true,\n    consumerAllowSignalWrites: true,\n    dirty: true,\n    hasRun: false,\n    cleanupFns: undefined,\n    zone: null,\n    onDestroyFn: noop,\n    run() {\n        this.dirty = false;\n        if (ngDevMode && isInNotificationPhase$1()) {\n            throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);\n        }\n        if (this.hasRun && !consumerPollProducersForChange$1(this)) {\n            return;\n        }\n        this.hasRun = true;\n        const registerCleanupFn = (cleanupFn) => (this.cleanupFns ??= []).push(cleanupFn);\n        const prevNode = consumerBeforeComputation$1(this);\n        // We clear `setIsRefreshingViews` so that `markForCheck()` within the body of an effect will\n        // cause CD to reach the component in question.\n        const prevRefreshingViews = setIsRefreshingViews(false);\n        try {\n            this.maybeCleanup();\n            this.fn(registerCleanupFn);\n        }\n        finally {\n            setIsRefreshingViews(prevRefreshingViews);\n            consumerAfterComputation$1(this, prevNode);\n        }\n    },\n    maybeCleanup() {\n        if (!this.cleanupFns?.length) {\n            return;\n        }\n        try {\n            // Attempt to run the cleanup functions. Regardless of failure or success, we consider\n            // cleanup \"completed\" and clear the list for the next run of the effect. Note that an error\n            // from the cleanup function will still crash the current run of the effect.\n            while (this.cleanupFns.length) {\n                this.cleanupFns.pop()();\n            }\n        }\n        finally {\n            this.cleanupFns = [];\n        }\n    },\n}))();\nconst ROOT_EFFECT_NODE = \n/* @__PURE__ */ (() => ({\n    ...BASE_EFFECT_NODE,\n    consumerMarkedDirty() {\n        this.scheduler.schedule(this);\n        this.notifier.notify(13 /* NotificationSource.RootEffect */);\n    },\n    destroy() {\n        consumerDestroy$1(this);\n        this.onDestroyFn();\n        this.maybeCleanup();\n    },\n}))();\nconst VIEW_EFFECT_NODE = \n/* @__PURE__ */ (() => ({\n    ...BASE_EFFECT_NODE,\n    consumerMarkedDirty() {\n        this.view[FLAGS] |= 8192 /* LViewFlags.HasChildViewsToRefresh */;\n        markAncestorsForTraversal(this.view);\n        this.notifier.notify(14 /* NotificationSource.ViewEffect */);\n    },\n    destroy() {\n        consumerDestroy$1(this);\n        this.onDestroyFn();\n        this.maybeCleanup();\n        this.view[EFFECTS]?.delete(this);\n    },\n}))();\nfunction createViewEffect(view, notifier, fn) {\n    const node = Object.create(VIEW_EFFECT_NODE);\n    node.view = view;\n    node.zone = typeof Zone !== 'undefined' ? Zone.current : null;\n    node.notifier = notifier;\n    node.fn = fn;\n    view[EFFECTS] ??= new Set();\n    view[EFFECTS].add(node);\n    node.consumerMarkedDirty(node);\n    return node;\n}\nfunction createRootEffect(fn, scheduler, notifier) {\n    const node = Object.create(ROOT_EFFECT_NODE);\n    node.fn = fn;\n    node.scheduler = scheduler;\n    node.notifier = notifier;\n    node.zone = typeof Zone !== 'undefined' ? Zone.current : null;\n    node.scheduler.schedule(node);\n    node.notifier.notify(13 /* NotificationSource.RootEffect */);\n    return node;\n}\n\nconst NOT_SET = Symbol('NOT_SET');\nconst EMPTY_CLEANUP_SET = new Set();\nconst AFTER_RENDER_PHASE_EFFECT_NODE = /* @__PURE__ */ (() => ({\n    ...SIGNAL_NODE$1,\n    consumerIsAlwaysLive: true,\n    consumerAllowSignalWrites: true,\n    value: NOT_SET,\n    cleanup: null,\n    /** Called when the effect becomes dirty */\n    consumerMarkedDirty() {\n        if (this.sequence.impl.executing) {\n            // If hooks are in the middle of executing, then it matters whether this node has yet been\n            // executed within its sequence. If not, then we don't want to notify the scheduler since\n            // this node will be reached naturally.\n            if (this.sequence.lastPhase === null || this.sequence.lastPhase < this.phase) {\n                return;\n            }\n            // If during the execution of a later phase an earlier phase became dirty, then we should not\n            // run any further phases until the earlier one reruns.\n            this.sequence.erroredOrDestroyed = true;\n        }\n        // Either hooks are not running, or we're marking a node dirty that has already run within its\n        // sequence.\n        this.sequence.scheduler.notify(7 /* NotificationSource.RenderHook */);\n    },\n    phaseFn(previousValue) {\n        this.sequence.lastPhase = this.phase;\n        if (!this.dirty) {\n            return this.signal;\n        }\n        this.dirty = false;\n        if (this.value !== NOT_SET && !consumerPollProducersForChange$1(this)) {\n            // None of our producers report a change since the last time they were read, so no\n            // recomputation of our value is necessary.\n            return this.signal;\n        }\n        // Run any needed cleanup functions.\n        try {\n            for (const cleanupFn of this.cleanup ?? EMPTY_CLEANUP_SET) {\n                cleanupFn();\n            }\n        }\n        finally {\n            // Even if a cleanup function errors, ensure it's cleared.\n            this.cleanup?.clear();\n        }\n        // Prepare to call the user's effect callback. If there was a previous phase, then it gave us\n        // its value as a `Signal`, otherwise `previousValue` will be `undefined`.\n        const args = [];\n        if (previousValue !== undefined) {\n            args.push(previousValue);\n        }\n        args.push(this.registerCleanupFn);\n        // Call the user's callback in our reactive context.\n        const prevConsumer = consumerBeforeComputation$1(this);\n        let newValue;\n        try {\n            newValue = this.userFn.apply(null, args);\n        }\n        finally {\n            consumerAfterComputation$1(this, prevConsumer);\n        }\n        if (this.value === NOT_SET || !this.equal(this.value, newValue)) {\n            this.value = newValue;\n            this.version++;\n        }\n        return this.signal;\n    },\n}))();\n/**\n * An `AfterRenderSequence` that manages an `afterRenderEffect`'s phase effects.\n */\nclass AfterRenderEffectSequence extends AfterRenderSequence {\n    scheduler;\n    /**\n     * While this sequence is executing, this tracks the last phase which was called by the\n     * `afterRender` machinery.\n     *\n     * When a phase effect is marked dirty, this is used to determine whether it's already run or not.\n     */\n    lastPhase = null;\n    /**\n     * The reactive nodes for each phase, if a phase effect is defined for that phase.\n     *\n     * These are initialized to `undefined` but set in the constructor.\n     */\n    nodes = [undefined, undefined, undefined, undefined];\n    constructor(impl, effectHooks, scheduler, destroyRef, snapshot = null) {\n        // Note that we also initialize the underlying `AfterRenderSequence` hooks to `undefined` and\n        // populate them as we create reactive nodes below.\n        super(impl, [undefined, undefined, undefined, undefined], false, destroyRef, snapshot);\n        this.scheduler = scheduler;\n        // Setup a reactive node for each phase.\n        for (const phase of AFTER_RENDER_PHASES) {\n            const effectHook = effectHooks[phase];\n            if (effectHook === undefined) {\n                continue;\n            }\n            const node = Object.create(AFTER_RENDER_PHASE_EFFECT_NODE);\n            node.sequence = this;\n            node.phase = phase;\n            node.userFn = effectHook;\n            node.dirty = true;\n            node.signal = (() => {\n                producerAccessed$1(node);\n                return node.value;\n            });\n            node.signal[SIGNAL$1] = node;\n            node.registerCleanupFn = (fn) => (node.cleanup ??= new Set()).add(fn);\n            this.nodes[phase] = node;\n            // Install the upstream hook which runs the `phaseFn` for this phase.\n            this.hooks[phase] = (value) => node.phaseFn(value);\n        }\n    }\n    afterRun() {\n        super.afterRun();\n        // We're done running this sequence, so reset `lastPhase`.\n        this.lastPhase = null;\n    }\n    destroy() {\n        super.destroy();\n        // Run the cleanup functions for each node.\n        for (const node of this.nodes) {\n            for (const fn of node?.cleanup ?? EMPTY_CLEANUP_SET) {\n                fn();\n            }\n        }\n    }\n}\n/**\n * @experimental\n */\nfunction afterRenderEffect(callbackOrSpec, options) {\n    ngDevMode &&\n        assertNotInReactiveContext(afterRenderEffect, 'Call `afterRenderEffect` outside of a reactive context. For example, create the render ' +\n            'effect inside the component constructor`.');\n    !options?.injector && assertInInjectionContext(afterRenderEffect);\n    if (typeof ngServerMode !== 'undefined' && ngServerMode) {\n        return NOOP_AFTER_RENDER_REF;\n    }\n    const injector = options?.injector ?? inject(Injector);\n    const scheduler = injector.get(ChangeDetectionScheduler);\n    const manager = injector.get(AfterRenderManager);\n    const tracing = injector.get(TracingService, null, { optional: true });\n    manager.impl ??= injector.get(AfterRenderImpl);\n    let spec = callbackOrSpec;\n    if (typeof spec === 'function') {\n        spec = { mixedReadWrite: callbackOrSpec };\n    }\n    const sequence = new AfterRenderEffectSequence(manager.impl, [spec.earlyRead, spec.write, spec.mixedReadWrite, spec.read], scheduler, injector.get(DestroyRef), tracing?.snapshot(null));\n    manager.impl.register(sequence);\n    return sequence;\n}\n\n// This file exists to allow the set of reactivity exports to be modified in g3, as these APIs are\n\n/**\n * Status of a `Resource`.\n *\n * @experimental\n */\nvar ResourceStatus;\n(function (ResourceStatus) {\n    /**\n     * The resource has no valid request and will not perform any loading.\n     *\n     * `value()` will be `undefined`.\n     */\n    ResourceStatus[ResourceStatus[\"Idle\"] = 0] = \"Idle\";\n    /**\n     * Loading failed with an error.\n     *\n     * `value()` will be `undefined`.\n     */\n    ResourceStatus[ResourceStatus[\"Error\"] = 1] = \"Error\";\n    /**\n     * The resource is currently loading a new value as a result of a change in its `request`.\n     *\n     * `value()` will be `undefined`.\n     */\n    ResourceStatus[ResourceStatus[\"Loading\"] = 2] = \"Loading\";\n    /**\n     * The resource is currently reloading a fresh value for the same request.\n     *\n     * `value()` will continue to return the previously fetched value during the reloading operation.\n     */\n    ResourceStatus[ResourceStatus[\"Reloading\"] = 3] = \"Reloading\";\n    /**\n     * Loading has completed and the resource has the value returned from the loader.\n     */\n    ResourceStatus[ResourceStatus[\"Resolved\"] = 4] = \"Resolved\";\n    /**\n     * The resource's value was set locally via `.set()` or `.update()`.\n     */\n    ResourceStatus[ResourceStatus[\"Local\"] = 5] = \"Local\";\n})(ResourceStatus || (ResourceStatus = {}));\n\n/**\n * Constructs a `Resource` that projects a reactive request to an asynchronous operation defined by\n * a loader function, which exposes the result of the loading operation via signals.\n *\n * Note that `resource` is intended for _read_ operations, not operations which perform mutations.\n * `resource` will cancel in-progress loads via the `AbortSignal` when destroyed or when a new\n * request object becomes available, which could prematurely abort mutations.\n *\n * @experimental\n */\nfunction resource(options) {\n    options?.injector || assertInInjectionContext(resource);\n    const request = (options.request ?? (() => null));\n    return new WritableResourceImpl(request, options.loader, options.equal, options.injector);\n}\n/**\n * Base class for `WritableResource` which handles the state operations and is unopinionated on the\n * actual async operation.\n *\n * Mainly factored out for better readability.\n */\nclass BaseWritableResource {\n    value;\n    status = signal(ResourceStatus.Idle);\n    error = signal(undefined);\n    rawSetValue;\n    constructor(equal) {\n        this.value = signal(undefined, {\n            equal: equal ? wrapEqualityFn(equal) : undefined,\n        });\n        this.rawSetValue = this.value.set;\n        this.value.set = (value) => this.set(value);\n        this.value.update = (fn) => this.set(fn(untracked(this.value)));\n    }\n    set(value) {\n        // Set the value signal and check whether its `version` changes. This will tell us\n        // if the value signal actually updated or not.\n        const prevVersion = this.value[SIGNAL$1].version;\n        this.rawSetValue(value);\n        if (this.value[SIGNAL$1].version === prevVersion) {\n            // The value must've been equal to the previous, so no need to change states.\n            return;\n        }\n        // We're departing from whatever state the resource was in previously, and entering\n        // Local state.\n        this.onLocalValue();\n        this.status.set(ResourceStatus.Local);\n        this.error.set(undefined);\n    }\n    update(updater) {\n        this.value.update(updater);\n    }\n    isLoading = computed(() => this.status() === ResourceStatus.Loading || this.status() === ResourceStatus.Reloading);\n    hasValue() {\n        return (this.status() === ResourceStatus.Resolved ||\n            this.status() === ResourceStatus.Local ||\n            this.status() === ResourceStatus.Reloading);\n    }\n    asReadonly() {\n        return this;\n    }\n    /**\n     * Put the resource in a state with a given value.\n     */\n    setValueState(status, value = undefined) {\n        this.status.set(status);\n        this.rawSetValue(value);\n        this.error.set(undefined);\n    }\n    /**\n     * Put the resource into the error state.\n     */\n    setErrorState(err) {\n        this.value.set(undefined);\n        // The previous line will set the status to `Local`, so we need to update it.\n        this.status.set(ResourceStatus.Error);\n        this.error.set(err);\n    }\n}\nclass WritableResourceImpl extends BaseWritableResource {\n    loaderFn;\n    request;\n    pendingTasks;\n    effectRef;\n    pendingController;\n    resolvePendingTask = undefined;\n    constructor(requestFn, loaderFn, equal, injector) {\n        super(equal);\n        this.loaderFn = loaderFn;\n        injector = injector ?? inject(Injector);\n        this.pendingTasks = injector.get(PendingTasks);\n        this.request = computed(() => ({\n            // The current request as defined for this resource.\n            request: requestFn(),\n            // A counter signal which increments from 0, re-initialized for each request (similar to the\n            // `linkedSignal` pattern). A value other than 0 indicates a refresh operation.\n            reload: signal(0),\n        }));\n        // The actual data-fetching effect.\n        this.effectRef = effect(this.loadEffect.bind(this), { injector, manualCleanup: true });\n        // Cancel any pending request when the resource itself is destroyed.\n        injector.get(DestroyRef).onDestroy(() => this.destroy());\n    }\n    reload() {\n        // We don't want to restart in-progress loads.\n        const status = untracked(this.status);\n        if (status === ResourceStatus.Idle ||\n            status === ResourceStatus.Loading ||\n            status === ResourceStatus.Reloading) {\n            return false;\n        }\n        untracked(this.request).reload.update((v) => v + 1);\n        return true;\n    }\n    destroy() {\n        this.effectRef.destroy();\n        this.abortInProgressLoad();\n        this.setValueState(ResourceStatus.Idle);\n    }\n    async loadEffect() {\n        // Capture the status before any state transitions.\n        const previousStatus = untracked(this.status);\n        // Cancel any previous loading attempts.\n        this.abortInProgressLoad();\n        const request = this.request();\n        if (request.request === undefined) {\n            // An undefined request means there's nothing to load.\n            this.setValueState(ResourceStatus.Idle);\n            return;\n        }\n        // Subscribing here allows us to refresh the load later by updating the refresh signal. At the\n        // same time, we update the status according to whether we're reloading or loading.\n        if (request.reload() === 0) {\n            this.setValueState(ResourceStatus.Loading); // value becomes undefined\n        }\n        else {\n            this.status.set(ResourceStatus.Reloading); // value persists\n        }\n        // Capturing _this_ load's pending task in a local variable is important here. We may attempt to\n        // resolve it twice:\n        //\n        //  1. when the loading function promise resolves/rejects\n        //  2. when cancelling the loading operation\n        //\n        // After the loading operation is cancelled, `this.resolvePendingTask` no longer represents this\n        // particular task, but this `await` may eventually resolve/reject. Thus, when we cancel in\n        // response to (1) below, we need to cancel the locally saved task.\n        const resolvePendingTask = (this.resolvePendingTask = this.pendingTasks.add());\n        const { signal: abortSignal } = (this.pendingController = new AbortController());\n        try {\n            // The actual loading is run through `untracked` - only the request side of `resource` is\n            // reactive. This avoids any confusion with signals tracking or not tracking depending on\n            // which side of the `await` they are.\n            const result = await untracked(() => this.loaderFn({\n                abortSignal,\n                request: request.request,\n                previous: {\n                    status: previousStatus,\n                },\n            }));\n            if (abortSignal.aborted) {\n                // This load operation was cancelled.\n                return;\n            }\n            // Success :)\n            this.setValueState(ResourceStatus.Resolved, result);\n        }\n        catch (err) {\n            if (abortSignal.aborted) {\n                // This load operation was cancelled.\n                return;\n            }\n            // Fail :(\n            this.setErrorState(err);\n        }\n        finally {\n            // Resolve the pending task now that loading is done.\n            resolvePendingTask();\n        }\n    }\n    abortInProgressLoad() {\n        this.pendingController?.abort();\n        this.pendingController = undefined;\n        // Once the load is aborted, we no longer want to block stability on its resolution.\n        this.resolvePendingTask?.();\n        this.resolvePendingTask = undefined;\n    }\n    onLocalValue() {\n        this.abortInProgressLoad();\n    }\n}\n/**\n * Wraps an equality function to handle either value being `undefined`.\n */\nfunction wrapEqualityFn(equal) {\n    return (a, b) => (a === undefined || b === undefined ? a === b : equal(a, b));\n}\n\n/**\n * Creates a `ComponentRef` instance based on provided component type and a set of options.\n *\n * @usageNotes\n *\n * The example below demonstrates how the `createComponent` function can be used\n * to create an instance of a ComponentRef dynamically and attach it to an ApplicationRef,\n * so that it gets included into change detection cycles.\n *\n * Note: the example uses standalone components, but the function can also be used for\n * non-standalone components (declared in an NgModule) as well.\n *\n * ```angular-ts\n * @Component({\n *   standalone: true,\n *   template: `Hello {{ name }}!`\n * })\n * class HelloComponent {\n *   name = 'Angular';\n * }\n *\n * @Component({\n *   standalone: true,\n *   template: `<div id=\"hello-component-host\"></div>`\n * })\n * class RootComponent {}\n *\n * // Bootstrap an application.\n * const applicationRef = await bootstrapApplication(RootComponent);\n *\n * // Locate a DOM node that would be used as a host.\n * const hostElement = document.getElementById('hello-component-host');\n *\n * // Get an `EnvironmentInjector` instance from the `ApplicationRef`.\n * const environmentInjector = applicationRef.injector;\n *\n * // We can now create a `ComponentRef` instance.\n * const componentRef = createComponent(HelloComponent, {hostElement, environmentInjector});\n *\n * // Last step is to register the newly created ref using the `ApplicationRef` instance\n * // to include the component view into change detection cycles.\n * applicationRef.attachView(componentRef.hostView);\n * componentRef.changeDetectorRef.detectChanges();\n * ```\n *\n * @param component Component class reference.\n * @param options Set of options to use:\n *  * `environmentInjector`: An `EnvironmentInjector` instance to be used for the component.\n *  * `hostElement` (optional): A DOM node that should act as a host node for the component. If not\n * provided, Angular creates one based on the tag name used in the component selector (and falls\n * back to using `div` if selector doesn't have tag name info).\n *  * `elementInjector` (optional): An `ElementInjector` instance, see additional info about it\n * [here](guide/di/hierarchical-dependency-injection#elementinjector).\n *  * `projectableNodes` (optional): A list of DOM nodes that should be projected through\n * [`<ng-content>`](api/core/ng-content) of the new component instance, e.g.,\n * `[[element1, element2]]`: projects `element1` and `element2` into the same `<ng-content>`.\n * `[[element1, element2], [element3]]`: projects `element1` and `element2` into one `<ng-content>`,\n * and `element3` into a separate `<ng-content>`.\n * @returns ComponentRef instance that represents a given Component.\n *\n * @publicApi\n */\nfunction createComponent(component, options) {\n    ngDevMode && assertComponentDef(component);\n    const componentDef = getComponentDef(component);\n    const elementInjector = options.elementInjector || getNullInjector();\n    const factory = new ComponentFactory(componentDef);\n    return factory.create(elementInjector, options.projectableNodes, options.hostElement, options.environmentInjector);\n}\n/**\n * Creates an object that allows to retrieve component metadata.\n *\n * @usageNotes\n *\n * The example below demonstrates how to use the function and how the fields\n * of the returned object map to the component metadata.\n *\n * ```angular-ts\n * @Component({\n *   standalone: true,\n *   selector: 'foo-component',\n *   template: `\n *     <ng-content></ng-content>\n *     <ng-content select=\"content-selector-a\"></ng-content>\n *   `,\n * })\n * class FooComponent {\n *   @Input('inputName') inputPropName: string;\n *   @Output('outputName') outputPropName = new EventEmitter<void>();\n * }\n *\n * const mirror = reflectComponentType(FooComponent);\n * expect(mirror.type).toBe(FooComponent);\n * expect(mirror.selector).toBe('foo-component');\n * expect(mirror.isStandalone).toBe(true);\n * expect(mirror.inputs).toEqual([{propName: 'inputName', templateName: 'inputPropName'}]);\n * expect(mirror.outputs).toEqual([{propName: 'outputName', templateName: 'outputPropName'}]);\n * expect(mirror.ngContentSelectors).toEqual([\n *   '*',                 // first `<ng-content>` in a template, the selector defaults to `*`\n *   'content-selector-a' // second `<ng-content>` in a template\n * ]);\n * ```\n *\n * @param component Component class reference.\n * @returns An object that allows to retrieve component metadata.\n *\n * @publicApi\n */\nfunction reflectComponentType(component) {\n    const componentDef = getComponentDef(component);\n    if (!componentDef)\n        return null;\n    const factory = new ComponentFactory(componentDef);\n    return {\n        get selector() {\n            return factory.selector;\n        },\n        get type() {\n            return factory.componentType;\n        },\n        get inputs() {\n            return factory.inputs;\n        },\n        get outputs() {\n            return factory.outputs;\n        },\n        get ngContentSelectors() {\n            return factory.ngContentSelectors;\n        },\n        get isStandalone() {\n            return componentDef.standalone;\n        },\n        get isSignal() {\n            return componentDef.signals;\n        },\n    };\n}\n\n/**\n * Merge multiple application configurations from left to right.\n *\n * @param configs Two or more configurations to be merged.\n * @returns A merged [ApplicationConfig](api/core/ApplicationConfig).\n *\n * @publicApi\n */\nfunction mergeApplicationConfig(...configs) {\n    return configs.reduce((prev, curr) => {\n        return Object.assign(prev, curr, { providers: [...prev.providers, ...curr.providers] });\n    }, { providers: [] });\n}\n\n/**\n * Injection token representing the current HTTP request object.\n *\n * Use this token to access the current request when handling server-side\n * rendering (SSR).\n *\n * @remarks\n * This token may be `null` in the following scenarios:\n *\n * * During the build processes.\n * * When the application is rendered in the browser (client-side rendering).\n * * When performing static site generation (SSG).\n * * During route extraction in development (at the time of the request).\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request | `Request` on MDN}\n *\n * @developerPreview\n */\nconst REQUEST = new InjectionToken('REQUEST', {\n    providedIn: 'platform',\n    factory: () => null,\n});\n/**\n * Injection token for response initialization options.\n *\n * Use this token to provide response options for configuring or initializing\n * HTTP responses in server-side rendering or API endpoints.\n *\n * @remarks\n * This token may be `null` in the following scenarios:\n *\n * * During the build processes.\n * * When the application is rendered in the browser (client-side rendering).\n * * When performing static site generation (SSG).\n * * During route extraction in development (at the time of the request).\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response | `ResponseInit` on MDN}\n *\n * @developerPreview\n */\nconst RESPONSE_INIT = new InjectionToken('RESPONSE_INIT', {\n    providedIn: 'platform',\n    factory: () => null,\n});\n/**\n * Injection token for additional request context.\n *\n * Use this token to pass custom metadata or context related to the current request in server-side rendering.\n *\n * @remarks\n * This token is only available during server-side rendering and will be `null` in other contexts.\n *\n * @developerPreview\n */\nconst REQUEST_CONTEXT = new InjectionToken('REQUEST_CONTEXT', {\n    providedIn: 'platform',\n    factory: () => null,\n});\n\n/**\n * @module\n * @description\n * Entry point from which you should import all public core APIs.\n */\nif (typeof ngDevMode !== 'undefined' && 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 ??= 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 * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/* This file is not used to build this module. It is only used during editing\n * by the TypeScript language service and during build for verification. `ngc`\n * replaces this file with production index.ts when it rewrites private symbol\n * names.\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, AfterRenderPhase, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CSP_NONCE, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, DestroyRef, Directive, ENVIRONMENT_INITIALIZER, ElementRef, EmbeddedViewRef, EnvironmentInjector, ErrorHandler, EventEmitter, HOST_TAG_NAME, Host, HostAttributeToken, HostBinding, HostListener, INJECTOR$1 as INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, OutputEmitterRef, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, PendingTasks, Pipe, PlatformRef, Query, QueryList, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, Renderer2, RendererFactory2, RendererStyleFlags2, ResourceStatus, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, TransferState, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation, ViewRef, afterNextRender, afterRender, afterRenderEffect, asNativeElements, assertInInjectionContext, assertNotInReactiveContext, assertPlatform, booleanAttribute, computed, contentChild, contentChildren, createComponent, createEnvironmentInjector, createNgModule, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, effect, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, importProvidersFrom, inject, input, isDevMode, isSignal, isStandalone, linkedSignal, makeEnvironmentProviders, makeStateKey, mergeApplicationConfig, model, numberAttribute, output, platformCore, provideAppInitializer, provideEnvironmentInitializer, provideExperimentalCheckNoChangesForDebug, provideExperimentalZonelessChangeDetection, providePlatformInitializer, provideZoneChangeDetection, reflectComponentType, resolveForwardRef, resource, runInInjectionContext, setTestabilityGetter, signal, untracked, viewChild, viewChildren, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, AfterRenderManager as ɵAfterRenderManager, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ChangeDetectionScheduler as ɵChangeDetectionScheduler, ChangeDetectionSchedulerImpl as ɵChangeDetectionSchedulerImpl, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, DEFER_BLOCK_CONFIG as ɵDEFER_BLOCK_CONFIG, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR as ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DeferBlockBehavior as ɵDeferBlockBehavior, DeferBlockState as ɵDeferBlockState, ENABLE_ROOT_COMPONENT_BOOTSTRAP as ɵENABLE_ROOT_COMPONENT_BOOTSTRAP, EffectScheduler as ɵEffectScheduler, IMAGE_CONFIG as ɵIMAGE_CONFIG, IMAGE_CONFIG_DEFAULTS as ɵIMAGE_CONFIG_DEFAULTS, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, ɵINPUT_SIGNAL_BRAND_WRITE_TYPE, INTERNAL_APPLICATION_ERROR_HANDLER as ɵINTERNAL_APPLICATION_ERROR_HANDLER, IS_HYDRATION_DOM_REUSE_ENABLED as ɵIS_HYDRATION_DOM_REUSE_ENABLED, IS_INCREMENTAL_HYDRATION_ENABLED as ɵIS_INCREMENTAL_HYDRATION_ENABLED, JSACTION_EVENT_CONTRACT as ɵJSACTION_EVENT_CONTRACT, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, MicrotaskEffectScheduler as ɵMicrotaskEffectScheduler, 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 as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, PERFORMANCE_MARK_PREFIX as ɵPERFORMANCE_MARK_PREFIX, PROVIDED_NG_ZONE as ɵPROVIDED_NG_ZONE, PendingTasksInternal as ɵPendingTasksInternal, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, SSR_CONTENT_INTEGRITY_MARKER as ɵSSR_CONTENT_INTEGRITY_MARKER, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, TracingAction as ɵTracingAction, TracingService as ɵTracingService, USE_RUNTIME_DEPS_TRACKER_FOR_JIT as ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT, ViewRef$1 as ɵViewRef, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, ZONELESS_ENABLED as ɵZONELESS_ENABLED, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, annotateForHydration as ɵannotateForHydration, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, depsTracker as ɵdepsTracker, detectChangesInViewIfRequired as ɵdetectChangesInViewIfRequired, devModeEqual as ɵdevModeEqual, disableProfiling as ɵdisableProfiling, enableProfiling as ɵenableProfiling, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, formatRuntimeError as ɵformatRuntimeError, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadataFn as ɵgetAsyncClassMetadataFn, getClosestComponentName as ɵgetClosestComponentName, getDebugNode as ɵgetDebugNode, getDeferBlocks as ɵgetDeferBlocks, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getOutputDestroyRef as ɵgetOutputDestroyRef, getSanitizationBypassType as ɵgetSanitizationBypassType, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalCreateApplication as ɵinternalCreateApplication, internalProvideZoneChangeDetection as ɵinternalProvideZoneChangeDetection, isBoundToModule as ɵisBoundToModule, isComponentDefPendingResolution as ɵisComponentDefPendingResolution, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, isNgModule as ɵisNgModule, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, microtaskEffect as ɵmicrotaskEffect, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, performanceMarkFeature as ɵperformanceMarkFeature, publishExternalGlobalUtil as ɵpublishExternalGlobalUtil, readHydrationInfo as ɵreadHydrationInfo, registerLocaleData as ɵregisterLocaleData, renderDeferBlockState as ɵrenderDeferBlockState, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, restoreComponentResolutionQueue as ɵrestoreComponentResolutionQueue, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setAlternateWeakRefImpl as ɵsetAlternateWeakRefImpl, ɵsetClassDebugInfo, setClassMetadata as ɵsetClassMetadata, setClassMetadataAsync as ɵsetClassMetadataAsync, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setInjectorProfilerContext as ɵsetInjectorProfilerContext, setLocaleId as ɵsetLocaleId, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, startMeasuring as ɵstartMeasuring, stopMeasuring as ɵstopMeasuring, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, truncateMiddle as ɵtruncateMiddle, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵunwrapWritableSignal, withDomHydration as ɵwithDomHydration, withEventReplay as ɵwithEventReplay, withI18nSupport as ɵwithI18nSupport, withIncrementalHydration as ɵwithIncrementalHydration, ɵɵCopyDefinitionFeature, ɵɵExternalStylesFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵInputTransformsFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcomponentInstance, ɵɵconditional, ɵɵcontentQuery, ɵɵcontentQuerySignal, ɵɵdeclareLet, ɵɵdefer, ɵɵdeferEnableTimerScheduling, ɵɵdeferHydrateNever, ɵɵdeferHydrateOnHover, ɵɵdeferHydrateOnIdle, ɵɵdeferHydrateOnImmediate, ɵɵdeferHydrateOnInteraction, ɵɵdeferHydrateOnTimer, ɵɵdeferHydrateOnViewport, ɵɵdeferHydrateWhen, ɵɵdeferOnHover, ɵɵdeferOnIdle, ɵɵdeferOnImmediate, ɵɵdeferOnInteraction, ɵɵdeferOnTimer, ɵɵdeferOnViewport, ɵɵdeferPrefetchOnHover, ɵɵdeferPrefetchOnIdle, ɵɵdeferPrefetchOnImmediate, ɵɵdeferPrefetchOnInteraction, ɵɵdeferPrefetchOnTimer, ɵɵdeferPrefetchOnViewport, ɵɵdeferPrefetchWhen, ɵɵdeferWhen, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetComponentDepsFactory, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareClassMetadataAsync, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵ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, ɵɵqueryAdvance, ɵɵqueryRefresh, ɵɵreadContextLet, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵreplaceMetadata, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstoreLet, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵtwoWayBindingSet, ɵɵtwoWayListener, ɵɵtwoWayProperty, ɵɵvalidateIframeAttribute, ɵɵviewQuery, ɵɵviewQuerySignal };\n","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n  try {\n    var i = n[a](c),\n      u = i.value;\n  } catch (n) {\n    return void e(n);\n  }\n  i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n  return function () {\n    var t = this,\n      e = arguments;\n    return new Promise(function (r, o) {\n      var a = n.apply(t, e);\n      function _next(n) {\n        asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n      }\n      function _throw(n) {\n        asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n      }\n      _next(void 0);\n    });\n  };\n}\nexport { _asyncToGenerator as default };"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,206,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,237,262,263,264,265,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310]}