@angular/core 22.0.0-next.0 → 22.0.0-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/fesm2022/_attribute-chunk.mjs +1 -1
  2. package/fesm2022/_debug_node-chunk.mjs +2425 -1941
  3. package/fesm2022/_debug_node-chunk.mjs.map +1 -1
  4. package/fesm2022/_effect-chunk.mjs +3 -5
  5. package/fesm2022/_effect-chunk.mjs.map +1 -1
  6. package/fesm2022/_not_found-chunk.mjs +1 -1
  7. package/fesm2022/_not_found-chunk.mjs.map +1 -1
  8. package/fesm2022/_pending_tasks-chunk.mjs +47 -44
  9. package/fesm2022/_pending_tasks-chunk.mjs.map +1 -1
  10. package/fesm2022/_resource-chunk.mjs +55 -18
  11. package/fesm2022/_resource-chunk.mjs.map +1 -1
  12. package/fesm2022/_untracked-chunk.mjs +10 -7
  13. package/fesm2022/_untracked-chunk.mjs.map +1 -1
  14. package/fesm2022/_weak_ref-chunk.mjs +1 -1
  15. package/fesm2022/_weak_ref-chunk.mjs.map +1 -1
  16. package/fesm2022/core.mjs +2332 -1884
  17. package/fesm2022/core.mjs.map +1 -1
  18. package/fesm2022/primitives-di.mjs +1 -1
  19. package/fesm2022/primitives-di.mjs.map +1 -1
  20. package/fesm2022/primitives-event-dispatch.mjs +2 -24
  21. package/fesm2022/primitives-event-dispatch.mjs.map +1 -1
  22. package/fesm2022/primitives-signals.mjs +2 -2
  23. package/fesm2022/primitives-signals.mjs.map +1 -1
  24. package/fesm2022/rxjs-interop.mjs +6 -3
  25. package/fesm2022/rxjs-interop.mjs.map +1 -1
  26. package/fesm2022/testing.mjs +56 -25
  27. package/fesm2022/testing.mjs.map +1 -1
  28. package/package.json +2 -2
  29. package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
  30. package/schematics/bundles/can-match-snapshot-required.cjs +104 -0
  31. package/schematics/bundles/change-detection-eager.cjs +4 -7
  32. package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
  33. package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
  34. package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
  35. package/schematics/bundles/control-flow-migration.cjs +1 -1
  36. package/schematics/bundles/http-xhr-backend.cjs +6 -11
  37. package/schematics/bundles/imports-CKV-ITqD.cjs +1 -1
  38. package/schematics/bundles/incremental-hydration.cjs +91 -0
  39. package/schematics/bundles/{index-BtLcQH8g.cjs → index-DADA7AvC.cjs} +7 -3
  40. package/schematics/bundles/inject-migration.cjs +26 -18
  41. package/schematics/bundles/json-file-Drblb4E1.cjs +1916 -0
  42. package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
  43. package/schematics/bundles/{migrate_ts_type_references-MWoZx-Cb.cjs → migrate_ts_type_references-CdaIOlGY.cjs} +48 -28
  44. package/schematics/bundles/model-output.cjs +200 -0
  45. package/schematics/bundles/ng_component_template-DPAF1aEA.cjs +1 -1
  46. package/schematics/bundles/ng_decorators-IVztR9rk.cjs +1 -1
  47. package/schematics/bundles/ngclass-to-class-migration.cjs +14 -6
  48. package/schematics/bundles/ngstyle-to-style-migration.cjs +14 -6
  49. package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
  50. package/schematics/bundles/output-migration.cjs +2 -2
  51. package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
  52. package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
  53. package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
  54. package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
  55. package/schematics/bundles/route-lazy-loading.cjs +22 -2
  56. package/schematics/bundles/router-testing-module-migration.cjs +1 -1
  57. package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
  58. package/schematics/bundles/signal-input-migration.cjs +3 -3
  59. package/schematics/bundles/signal-queries-migration.cjs +3 -3
  60. package/schematics/bundles/signals.cjs +3 -3
  61. package/schematics/bundles/standalone-migration.cjs +29 -17
  62. package/schematics/bundles/strict-safe-navigation-narrow.cjs +32 -0
  63. package/schematics/bundles/strict-templates-default.cjs +63 -0
  64. package/schematics/migrations.json +25 -0
  65. package/types/_api-chunk.d.ts +22 -4
  66. package/types/_chrome_dev_tools_performance-chunk.d.ts +4 -3
  67. package/types/{_discovery-chunk.d.ts → _debug_node-chunk.d.ts} +2157 -2258
  68. package/types/_effect-chunk.d.ts +1 -1
  69. package/types/_event_dispatcher-chunk.d.ts +1 -1
  70. package/types/_formatter-chunk.d.ts +1 -1
  71. package/types/_weak_ref-chunk.d.ts +1 -1
  72. package/types/core.d.ts +6488 -6285
  73. package/types/primitives-di.d.ts +1 -1
  74. package/types/primitives-event-dispatch.d.ts +1 -1
  75. package/types/primitives-signals.d.ts +1 -1
  76. package/types/rxjs-interop.d.ts +2 -1
  77. package/types/testing.d.ts +6 -6
package/fesm2022/core.mjs CHANGED
@@ -1,24 +1,24 @@
1
1
  /**
2
- * @license Angular v22.0.0-next.0
2
+ * @license Angular v22.0.0-next.10
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
6
6
 
7
- import { RuntimeError, InjectionToken, getCurrentTNode, assertInInjectionContext, signalAsReadonlyFn, assertNgModuleType, Injector, inject, NgZone, ChangeDetectionScheduler, INTERNAL_APPLICATION_ERROR_HANDLER, ɵɵdefineInjectable as __defineInjectable, ZONELESS_ENABLED, ENVIRONMENT_INITIALIZER, SCHEDULE_IN_ROOT_ZONE, SCHEDULE_IN_ROOT_ZONE_DEFAULT, makeEnvironmentProviders, PendingTasksInternal, formatRuntimeError, ERROR_DETAILS_PAGE_BASE_URL, PROVIDED_ZONELESS, stringify, ɵɵinject as __inject, errorHandlerEnvironmentInitializer, INJECTOR_SCOPE, runInInjectionContext, provideEnvironmentInitializer, ErrorHandler, _global, unwrapRNode, CLEANUP, DOCUMENT, DOC_PAGE_BASE_URL, DEBUG_TASK_TRACKER, isComponentHost, getComponentLViewByIndex, getLView, DECLARATION_COMPONENT_VIEW, ɵɵdefineInjector as __defineInjector, isLContainer, HOST, hasI18n, unwrapLView, RENDERER, assertTNode, isProjectionTNode, getComponentDef, PARENT, isRootView, HEADER_OFFSET, TVIEW, CONTEXT, CONTAINER_HEADER_OFFSET, isLView, getTNode, assertNotInReactiveContext, ViewContext, DestroyRef, setInjectorProfilerContext, emitAfterRenderEffectPhaseCreatedEvent, getNullInjector } from './_pending_tasks-chunk.mjs';
8
- export { EnvironmentInjector, EventEmitter, INJECTOR, PendingTasks, VERSION, Version, effect, forwardRef, importProvidersFrom, isStandalone, provideBrowserGlobalErrorListeners, resolveForwardRef, signal, EffectScheduler as ɵEffectScheduler, 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, NoopNgZone as ɵNoopNgZone, R3Injector as ɵR3Injector, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, getInjectableDef as ɵgetInjectableDef, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, store as ɵstore, truncateMiddle as ɵtruncateMiddle, ɵunwrapWritableSignal, ɵɵdisableBindings, ɵɵenableBindings, ɵɵinvalidFactoryDep, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵresetView, ɵɵrestoreView } from './_pending_tasks-chunk.mjs';
9
- import { SIGNAL_NODE, signalSetFn, SIGNAL, producerAccessed, consumerDestroy, consumerPollProducersForChange, consumerBeforeComputation, consumerAfterComputation } from './_effect-chunk.mjs';
10
- import { ɵɵinjectAttribute as __injectAttribute, createMultiResultQuerySignalFn, createSingleResultOptionalQuerySignalFn, createSingleResultRequiredQuerySignalFn, makePropDecorator, NgModuleFactory, COMPILER_OPTIONS, setJitOptions, isComponentResourceResolutionQueueEmpty, getCompilerFacade, resolveComponentResources, ApplicationRef, setClassMetadata, Injectable, performanceMarkFeature, IMAGE_CONFIG, getDocument, remove, isPromise, ApplicationInitStatus, LOCALE_ID, DEFAULT_LOCALE_ID, setLocaleId, createNgModuleRefWithProviders, optionsReducer, provideZonelessChangeDetectionInternal, validAppIdInitializer, publishDefaultGlobalUtils, PLATFORM_INITIALIZER, publishSignalConfiguration, ChangeDetectionSchedulerImpl, checkNoChangesInternal, UseExhaustiveCheckNoChanges, JSACTION_BLOCK_ELEMENT_MAP, APP_ID, setStashFn, APP_BOOTSTRAP_LISTENER, JSACTION_EVENT_CONTRACT, removeListeners, isIncrementalHydrationEnabled, DEFER_BLOCK_SSR_ID_ATTRIBUTE, invokeListeners, EVENT_REPLAY_QUEUE, triggerHydrationFromBlockName, IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT, sharedStashFunction, sharedMapFunction, enableStashEventListenerImpl, IS_I18N_HYDRATION_ENABLED, IS_HYDRATION_DOM_REUSE_ENABLED, IS_INCREMENTAL_HYDRATION_ENABLED, DEHYDRATED_BLOCK_REGISTRY, DehydratedBlockRegistry, processBlockData, gatherDeferBlocksCommentNodes, processAndInitTriggers, appendDeferBlocksToJSActionMap, TransferState, NGH_DATA_KEY, verifySsrContentsIntegrity, Console, PRESERVE_HOST_CONTENT, cleanupDehydratedViews, countBlocksSkippedByHydration, enableRetrieveHydrationInfoImpl, enableLocateOrCreateElementNodeImpl, enableLocateOrCreateTextNodeImpl, enableLocateOrCreateElementContainerNodeImpl, enableLocateOrCreateContainerAnchorImpl, enableLocateOrCreateContainerRefImpl, enableFindMatchingDehydratedViewImpl, enableApplyRootElementTransformImpl, enableLocateOrCreateI18nNodeImpl, enablePrepareI18nBlockForHydrationImpl, setIsI18nHydrationSupportEnabled, enableClaimDehydratedIcuCaseImpl, enableRetrieveDeferBlockDataImpl, provideAppInitializer, getRegisteredNgModuleType, ViewRef as ViewRef$1, isListLikeIterable, iterateListLike, isJsObject, ɵɵdefineNgModule as __defineNgModule, NgModule, profiler, assertStandaloneComponentType, EnvironmentNgModuleRefAdapter, ProfilerEvent, isI18nHydrationEnabled, NGH_DEFER_BLOCKS_KEY, SKIP_HYDRATION_ATTR_NAME, NGH_ATTR_NAME, getLNodeForHydration, isI18nHydrationSupportEnabled, getOrComputeI18nChildren, trySerializeI18nBlock, I18N_DATA, isTNodeShape, isDetachedByI18n, TEMPLATES, isDisconnectedNode, isInSkipHydrationBlock, unsupportedProjectionOfDomNodes, CONTAINERS, isLetDeclaration, ELEMENT_CONTAINERS, processTextNodeBeforeSerialization, setJSActionAttributes, ViewEncapsulation as ViewEncapsulation$1, collectNativeNodes, TEMPLATE_ID, NUM_ROOT_NODES, isDeferBlock, getLDeferBlockDetails, getTDeferBlockDetails, collectNativeNodesInLContainer, validateNodeExists, validateMatchingNode, DEFER_BLOCK_ID, DEFER_BLOCK_STATE, DEFER_BLOCK_STATE$1, MULTIPLIER, NODES, calcPathForNode, DISCONNECTED_NODES, convertHydrateTriggersToJsAction, DEFER_HYDRATE_TRIGGERS, DEFER_PARENT_BLOCK_ID, readPatchedLView, angularCoreEnv, setClassMetadataAsync, NOOP_AFTER_RENDER_REF, AfterRenderManager, TracingService, AfterRenderImpl, AfterRenderSequence, AFTER_RENDER_PHASES, isSignal, assertComponentDef, ComponentFactory } from './_debug_node-chunk.mjs';
11
- export { ANIMATION_MODULE_TYPE, APP_INITIALIZER, Attribute, CSP_NONCE, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver, ComponentRef, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, Directive, ElementRef, Host, HostBinding, HostListener, Inject, Input, MAX_ANIMATION_TIMEOUT, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, Optional, Output, PLATFORM_ID, Pipe, QueryList, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, ViewContainerRef, afterEveryRender, afterNextRender, asNativeElements, createEnvironmentInjector, createNgModule, createNgModuleRef, enableProfiling, getDebugNode, inputBinding, isWritableSignal, makeStateKey, outputBinding, provideIdleServiceWith, provideNgReflectAttributes, provideZonelessChangeDetection, setTestabilityGetter, twoWayBinding, ANIMATIONS_DISABLED as ɵANIMATIONS_DISABLED, AcxChangeDetectionStrategy as ɵAcxChangeDetectionStrategy, AcxViewEncapsulation as ɵAcxViewEncapsulation, ComponentFactory$1 as ɵComponentFactory, DEFER_BLOCK_CONFIG as ɵDEFER_BLOCK_CONFIG, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR as ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DeferBlockBehavior as ɵDeferBlockBehavior, DeferBlockState as ɵDeferBlockState, HydrationStatus as ɵHydrationStatus, IMAGE_CONFIG_DEFAULTS as ɵIMAGE_CONFIG_DEFAULTS, IS_ENABLED_BLOCKING_INITIAL_NAVIGATION as ɵIS_ENABLED_BLOCKING_INITIAL_NAVIGATION, LContext as ɵLContext, LocaleDataIndex as ɵLocaleDataIndex, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, ReflectionCapabilities as ɵReflectionCapabilities, ComponentRef$1 as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, SSR_CONTENT_INTEGRITY_MARKER as ɵSSR_CONTENT_INTEGRITY_MARKER, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, TimerScheduler as ɵTimerScheduler, TracingAction as ɵTracingAction, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allLeavingAnimations as ɵallLeavingAnimations, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, 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, compilePipe as ɵcompilePipe, depsTracker as ɵdepsTracker, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadataFn as ɵgetAsyncClassMetadataFn, getDebugNode as ɵgetDebugNode, getDeferBlocks as ɵgetDeferBlocks, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, getTransferState as ɵgetTransferState, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, inferTagNameFromDefinition as ɵinferTagNameFromDefinition, isBoundToModule as ɵisBoundToModule, isComponentDefPendingResolution as ɵisComponentDefPendingResolution, isNgModule as ɵisNgModule, isSubscribable as ɵisSubscribable, isViewDirty as ɵisViewDirty, markForRefresh as ɵmarkForRefresh, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, promiseWithResolvers as ɵpromiseWithResolvers, publishExternalGlobalUtil as ɵpublishExternalGlobalUtil, readHydrationInfo as ɵreadHydrationInfo, registerLocaleData as ɵregisterLocaleData, renderDeferBlockState as ɵrenderDeferBlockState, resetCompiledComponents as ɵresetCompiledComponents, resetIncrementalHydrationEnabledWarnedForTests as ɵresetIncrementalHydrationEnabledWarnedForTests, resetJitOptions as ɵresetJitOptions, restoreComponentResolutionQueue as ɵrestoreComponentResolutionQueue, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, ɵsetClassDebugInfo, setDocument as ɵsetDocument, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵɵControlFeature, ɵɵExternalStylesFeature, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵanimateEnter, ɵɵanimateEnterListener, ɵɵanimateLeave, ɵɵanimateLeaveListener, ɵɵariaProperty, ɵɵarrowFunction, ɵɵattachSourceLocations, ɵɵattribute, ɵɵclassMap, ɵɵclassProp, ɵɵcomponentInstance, ɵɵconditional, ɵɵconditionalBranchCreate, ɵɵconditionalCreate, ɵɵcontentQuery, ɵɵcontentQuerySignal, ɵɵcontrol, ɵɵcontrolCreate, ɵɵ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, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdomElement, ɵɵdomElementContainer, ɵɵdomElementContainerEnd, ɵɵdomElementContainerStart, ɵɵdomElementEnd, ɵɵdomElementStart, ɵɵdomListener, ɵɵdomProperty, ɵɵdomTemplate, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵgetComponentDepsFactory, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵgetReplaceMetadataURL, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinterpolate, ɵɵinterpolate1, ɵɵinterpolate2, ɵɵinterpolate3, ɵɵinterpolate4, ɵɵinterpolate5, ɵɵinterpolate6, ɵɵinterpolate7, ɵɵinterpolate8, ɵɵinterpolateV, ɵɵinvalidFactory, ɵɵlistener, ɵɵloadQuery, ɵɵnextContext, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryAdvance, ɵɵqueryRefresh, ɵɵreadContextLet, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵreplaceMetadata, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstoreLet, ɵɵstyleMap, ɵɵstyleProp, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵtwoWayBindingSet, ɵɵtwoWayListener, ɵɵtwoWayProperty, ɵɵvalidateAttribute, ɵɵviewQuery, ɵɵviewQuerySignal } from './_debug_node-chunk.mjs';
12
- import { OutputEmitterRef, computed, ResourceValueError } from './_resource-chunk.mjs';
13
- export { ResourceDependencyError, ResourceParamsStatus, linkedSignal, resource, untracked, ResourceImpl as ɵResourceImpl, encapsulateResourceError as ɵencapsulateResourceError, getOutputDestroyRef as ɵgetOutputDestroyRef } from './_resource-chunk.mjs';
7
+ import { ɵɵinjectAttribute as __injectAttribute, promiseWithResolvers, IDLE_SERVICE, getCompilerFacade, angularCoreDiEnv, reflectDependencies, makeDecorator, createMultiResultQuerySignalFn, createSingleResultRequiredQuerySignalFn, createSingleResultOptionalQuerySignalFn, makePropDecorator, ɵɵdefineNgModule as __defineNgModule, ApplicationRef, setClassMetadata, NgModule, IS_EVENT_REPLAY_ENABLED, APP_ID, setStashFn, APP_BOOTSTRAP_LISTENER, JSACTION_EVENT_CONTRACT, JSACTION_BLOCK_ELEMENT_MAP, removeListeners, isIncrementalHydrationEnabled, performanceMarkFeature, EVENT_REPLAY_ENABLED_DEFAULT, sharedStashFunction, sharedMapFunction, DEFER_BLOCK_SSR_ID_ATTRIBUTE, invokeListeners, EVENT_REPLAY_QUEUE, triggerHydrationFromBlockName, enableStashEventListenerImpl, IS_HYDRATION_DOM_REUSE_ENABLED, IS_I18N_HYDRATION_ENABLED, IS_INCREMENTAL_HYDRATION_ENABLED, DehydratedBlockRegistry, DEHYDRATED_BLOCK_REGISTRY, processBlockData, gatherDeferBlocksCommentNodes, processAndInitTriggers, appendDeferBlocksToJSActionMap, NGH_DATA_KEY, verifySsrContentsIntegrity, enableRetrieveHydrationInfoImpl, enableLocateOrCreateElementNodeImpl, enableLocateOrCreateTextNodeImpl, enableLocateOrCreateContainerRefImpl, enableFindMatchingDehydratedViewImpl, enableLocateOrCreateElementContainerNodeImpl, enableLocateOrCreateContainerAnchorImpl, enableApplyRootElementTransformImpl, TransferState, setIsI18nHydrationSupportEnabled, Console, PRESERVE_HOST_CONTENT, cleanupDehydratedViews, countBlocksSkippedByHydration, enableLocateOrCreateI18nNodeImpl, enablePrepareI18nBlockForHydrationImpl, enableClaimDehydratedIcuCaseImpl, enableRetrieveDeferBlockDataImpl, provideAppInitializer, isListLikeIterable, iterateListLike, isJsObject, ViewRef as ViewRef$1, checkNoChangesInternal, ChangeDetectionSchedulerImpl, UseExhaustiveCheckNoChanges, Injectable, NgModuleFactory, COMPILER_OPTIONS, setJitOptions, isComponentResourceResolutionQueueEmpty, resolveComponentResources, IMAGE_CONFIG, getDocument, remove, isPromise, ApplicationInitStatus, LOCALE_ID, DEFAULT_LOCALE_ID, setLocaleId, createNgModuleRefWithProviders, optionsReducer, validAppIdInitializer, provideZonelessChangeDetectionInternal, getInjectorMetadata, getInjectorProviders, getNodeInjectorTNode, getLContext, walkLViewDirectives, NodeInjector, ChainedInjector, getInjector, getSignalGraph, publishDefaultGlobalUtils, PLATFORM_INITIALIZER, publishSignalConfiguration, profiler, assertStandaloneComponentType, EnvironmentNgModuleRefAdapter, ProfilerEvent, isI18nHydrationEnabled, NGH_DEFER_BLOCKS_KEY, getLNodeForHydration, NGH_ATTR_NAME, SKIP_HYDRATION_ATTR_NAME, isI18nHydrationSupportEnabled, ViewEncapsulation as ViewEncapsulation$1, getOrComputeI18nChildren, trySerializeI18nBlock, I18N_DATA, isTNodeShape, isDetachedByI18n, TEMPLATES, isDisconnectedNode, isInSkipHydrationBlock, unsupportedProjectionOfDomNodes, CONTAINERS, isLetDeclaration, ELEMENT_CONTAINERS, processTextNodeBeforeSerialization, setJSActionAttributes, DISCONNECTED_NODES, NODES, calcPathForNode, NUM_ROOT_NODES, TEMPLATE_ID, isDeferBlock, getLDeferBlockDetails, getTDeferBlockDetails, collectNativeNodesInLContainer, validateNodeExists, validateMatchingNode, DEFER_BLOCK_ID, DEFER_BLOCK_STATE, DEFER_BLOCK_STATE$1, MULTIPLIER, collectNativeNodes, convertHydrateTriggersToJsAction, DEFER_HYDRATE_TRIGGERS, DEFER_PARENT_BLOCK_ID, NOOP_AFTER_RENDER_REF, AfterRenderManager, TracingService, AfterRenderImpl, AfterRenderSequence, AFTER_RENDER_PHASES, setClassMetadataAsync, angularCoreEnv, getRegisteredNgModuleType, assertComponentDef, ComponentFactory } from './_debug_node-chunk.mjs';
8
+ export { ANIMATION_MODULE_TYPE, APP_INITIALIZER, Attribute, CSP_NONCE, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Compiler, CompilerFactory, Component, ComponentRef, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, Directive, ElementRef, Host, HostBinding, HostListener, Inject, Input, MAX_ANIMATION_TIMEOUT, MissingTranslationStrategy, NO_ERRORS_SCHEMA, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, Optional, Output, PLATFORM_ID, Pipe, QueryList, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, ViewContainerRef, afterEveryRender, afterNextRender, asNativeElements, createEnvironmentInjector, createNgModule, enableProfiling, getDebugNode, inputBinding, makeStateKey, outputBinding, provideIdleServiceWith, provideNgReflectAttributes, provideZonelessChangeDetection, setTestabilityGetter, twoWayBinding, ANIMATIONS_DISABLED as ɵANIMATIONS_DISABLED, AcxChangeDetectionStrategy as ɵAcxChangeDetectionStrategy, AcxViewEncapsulation as ɵAcxViewEncapsulation, ControlFlowBlockType as ɵControlFlowBlockType, DEFER_BLOCK_CONFIG as ɵDEFER_BLOCK_CONFIG, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR as ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DeferBlockBehavior as ɵDeferBlockBehavior, DeferBlockState as ɵDeferBlockState, HydrationStatus as ɵHydrationStatus, IMAGE_CONFIG_DEFAULTS as ɵIMAGE_CONFIG_DEFAULTS, IS_ENABLED_BLOCKING_INITIAL_NAVIGATION as ɵIS_ENABLED_BLOCKING_INITIAL_NAVIGATION, LContext as ɵLContext, LocaleDataIndex as ɵLocaleDataIndex, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, ReflectionCapabilities as ɵReflectionCapabilities, ComponentRef$1 as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, SHARED_STYLES_HOST as ɵSHARED_STYLES_HOST, SSR_CONTENT_INTEGRITY_MARKER as ɵSSR_CONTENT_INTEGRITY_MARKER, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, TimerScheduler as ɵTimerScheduler, TracingAction as ɵTracingAction, USE_PENDING_TASKS as ɵUSE_PENDING_TASKS, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allLeavingAnimations as ɵallLeavingAnimations, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, 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, compilePipe as ɵcompilePipe, depsTracker as ɵdepsTracker, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadataFn as ɵgetAsyncClassMetadataFn, getClosestComponentName as ɵgetClosestComponentName, getDeferBlocks as ɵgetDeferBlocks, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, getTransferState as ɵgetTransferState, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, inferTagNameFromDefinition as ɵinferTagNameFromDefinition, isComponentDefPendingResolution as ɵisComponentDefPendingResolution, isNgModule as ɵisNgModule, isSubscribable as ɵisSubscribable, isViewDirty as ɵisViewDirty, markForRefresh as ɵmarkForRefresh, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishExternalGlobalUtil as ɵpublishExternalGlobalUtil, readHydrationInfo as ɵreadHydrationInfo, registerLocaleData as ɵregisterLocaleData, renderDeferBlockState as ɵrenderDeferBlockState, resetCompiledComponents as ɵresetCompiledComponents, resetIncrementalHydrationEnabledWarnedForTests as ɵresetIncrementalHydrationEnabledWarnedForTests, resetJitOptions as ɵresetJitOptions, restoreComponentResolutionQueue as ɵrestoreComponentResolutionQueue, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, ɵsetClassDebugInfo, setDocument as ɵsetDocument, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵɵControlFeature, ɵɵExternalStylesFeature, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵanimateEnter, ɵɵanimateEnterListener, ɵɵanimateLeave, ɵɵanimateLeaveListener, ɵɵariaProperty, ɵɵarrowFunction, ɵɵattachSourceLocations, ɵɵattribute, ɵɵclassMap, ɵɵclassProp, ɵɵcomponentInstance, ɵɵconditional, ɵɵconditionalBranchCreate, ɵɵconditionalCreate, ɵɵcontentQuery, ɵɵcontentQuerySignal, ɵɵcontrol, ɵɵcontrolCreate, ɵɵ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, ɵɵdefinePipe, ɵɵdefineService, ɵɵdirectiveInject, ɵɵdomElement, ɵɵdomElementContainer, ɵɵdomElementContainerEnd, ɵɵdomElementContainerStart, ɵɵdomElementEnd, ɵɵdomElementStart, ɵɵdomListener, ɵɵdomProperty, ɵɵdomTemplate, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵgetComponentDepsFactory, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵgetReplaceMetadataURL, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinterpolate, ɵɵinterpolate1, ɵɵinterpolate2, ɵɵinterpolate3, ɵɵinterpolate4, ɵɵinterpolate5, ɵɵinterpolate6, ɵɵinterpolate7, ɵɵinterpolate8, ɵɵinterpolateV, ɵɵinvalidFactory, ɵɵlistener, ɵɵloadQuery, ɵɵnextContext, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryAdvance, ɵɵqueryRefresh, ɵɵreadContextLet, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵreplaceMetadata, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstoreLet, ɵɵstyleMap, ɵɵstyleProp, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵtwoWayBindingSet, ɵɵtwoWayListener, ɵɵtwoWayProperty, ɵɵvalidateAttribute, ɵɵviewQuery, ɵɵviewQuerySignal } from './_debug_node-chunk.mjs';
9
+ import { RuntimeError, InjectionToken, getCurrentTNode, assertInInjectionContext, inject, Injector, NG_PROV_DEF, NG_FACTORY_DEF, signalAsReadonlyFn, ɵɵinject as __inject, ɵɵdefineInjector as __defineInjector, ENVIRONMENT_INITIALIZER, unwrapRNode, CLEANUP, makeEnvironmentProviders, formatRuntimeError, DOCUMENT, ChangeDetectionScheduler, NgZone, DOC_PAGE_BASE_URL, DEBUG_TASK_TRACKER, stringify, ɵɵdefineInjectable as __defineInjectable, isComponentHost, getComponentLViewByIndex, DECLARATION_COMPONENT_VIEW, getLView, provideEnvironmentInitializer, ErrorHandler, ZONELESS_ENABLED, SCHEDULE_IN_ROOT_ZONE_DEFAULT, SCHEDULE_IN_ROOT_ZONE, INTERNAL_APPLICATION_ERROR_HANDLER, PendingTasksInternal, assertNgModuleType, ERROR_DETAILS_PAGE_BASE_URL, PROVIDED_ZONELESS, errorHandlerEnvironmentInitializer, TVIEW, getLViewParent, R3Injector, NullInjector, INJECTOR, T_HOST, runInInjectionContext, INJECTOR_SCOPE, isLContainer, hasI18n, RENDERER, unwrapLView, HOST, getComponentDef, assertTNode, isProjectionTNode, PARENT, CONTEXT, HEADER_OFFSET, isRootView, CONTAINER_HEADER_OFFSET, assertNotInReactiveContext, ViewContext, DestroyRef, setInjectorProfilerContext, emitAfterRenderEffectPhaseCreatedEvent, getNullInjector, isSignal, effect, _global } from './_pending_tasks-chunk.mjs';
10
+ export { EnvironmentInjector, EventEmitter, INJECTOR$1 as INJECTOR, PendingTasks, VERSION, Version, forwardRef, importProvidersFrom, isStandalone, isWritableSignal, provideBrowserGlobalErrorListeners, resolveForwardRef, signal, EffectScheduler as ɵEffectScheduler, 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, NoopNgZone as ɵNoopNgZone, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, getInjectableDef as ɵgetInjectableDef, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, store as ɵstore, truncateMiddle as ɵtruncateMiddle, ɵunwrapWritableSignal, ɵɵdisableBindings, ɵɵenableBindings, ɵɵinvalidFactoryDep, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵresetView, ɵɵrestoreView } from './_pending_tasks-chunk.mjs';
11
+ import { OutputEmitterRef, computed, ResourceValueError, linkedSignal, isInParamsFunction, invalidResourceCreationInParams, setInParamsFunction, rethrowFatalErrors, untracked } from './_resource-chunk.mjs';
12
+ export { ResourceDependencyError, ResourceParamsStatus, resource, ResourceImpl as ɵResourceImpl, encapsulateResourceError as ɵencapsulateResourceError, getOutputDestroyRef as ɵgetOutputDestroyRef } from './_resource-chunk.mjs';
14
13
  import { Subscription } from 'rxjs';
15
- import { clearAppScopedEarlyEventContract, EventContract, EventContractContainer, EventDispatcher, registerDispatcher, EventPhase, getAppScopedQueuedEventInfos, isEarlyEventType, isCaptureEventType } from './primitives-event-dispatch.mjs';
14
+ import { SIGNAL_NODE, signalSetFn, SIGNAL, producerAccessed, consumerDestroy, consumerPollProducersForChange, consumerBeforeComputation, consumerAfterComputation } from './_effect-chunk.mjs';
15
+ import { clearAppScopedEarlyEventContract, EventContract, EventContractContainer, EventDispatcher, registerDispatcher, getAppScopedQueuedEventInfos, EventPhase, isEarlyEventType, isCaptureEventType } from './primitives-event-dispatch.mjs';
16
16
  export { setAlternateWeakRefImpl as ɵsetAlternateWeakRefImpl } from './_weak_ref-chunk.mjs';
17
17
  export { setCurrentInjector as ɵsetCurrentInjector } from './_not_found-chunk.mjs';
18
18
  import '@angular/core/primitives/signals';
19
- import '@angular/core/primitives/di';
20
19
  import 'rxjs/operators';
21
20
  import './_attribute-chunk.mjs';
21
+ import '@angular/core/primitives/di';
22
22
  import './_untracked-chunk.mjs';
23
23
 
24
24
  const REQUIRED_UNSET_VALUE = /* @__PURE__ */Symbol('InputSignalNode#UNSET');
@@ -57,28 +57,6 @@ function createInputSignal(initialValue, options) {
57
57
  return inputValueFn;
58
58
  }
59
59
 
60
- var FactoryTarget;
61
- (function (FactoryTarget) {
62
- FactoryTarget[FactoryTarget["Directive"] = 0] = "Directive";
63
- FactoryTarget[FactoryTarget["Component"] = 1] = "Component";
64
- FactoryTarget[FactoryTarget["Injectable"] = 2] = "Injectable";
65
- FactoryTarget[FactoryTarget["Pipe"] = 3] = "Pipe";
66
- FactoryTarget[FactoryTarget["NgModule"] = 4] = "NgModule";
67
- })(FactoryTarget || (FactoryTarget = {}));
68
- var R3TemplateDependencyKind;
69
- (function (R3TemplateDependencyKind) {
70
- R3TemplateDependencyKind[R3TemplateDependencyKind["Directive"] = 0] = "Directive";
71
- R3TemplateDependencyKind[R3TemplateDependencyKind["Pipe"] = 1] = "Pipe";
72
- R3TemplateDependencyKind[R3TemplateDependencyKind["NgModule"] = 2] = "NgModule";
73
- })(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
74
- var ViewEncapsulation;
75
- (function (ViewEncapsulation) {
76
- ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated";
77
- ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None";
78
- ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom";
79
- ViewEncapsulation[ViewEncapsulation["ExperimentalIsolatedShadowDom"] = 4] = "ExperimentalIsolatedShadowDom";
80
- })(ViewEncapsulation || (ViewEncapsulation = {}));
81
-
82
60
  var Framework;
83
61
  (function (Framework) {
84
62
  Framework["Angular"] = "angular";
@@ -127,6 +105,113 @@ function getDevModeNodeName(tNode) {
127
105
  }
128
106
  }
129
107
 
108
+ function injectAsync(loader, options) {
109
+ if (ngDevMode) {
110
+ assertInInjectionContext(injectAsync);
111
+ }
112
+ const injector = inject(Injector);
113
+ let loadedPromise = null;
114
+ const load = () => {
115
+ if (!loadedPromise) {
116
+ loadedPromise = loader();
117
+ }
118
+ return loadedPromise;
119
+ };
120
+ if (options?.prefetch) {
121
+ options.prefetch().then(() => load());
122
+ }
123
+ return () => load().then(type => injector.get(type));
124
+ }
125
+ function onIdle(options) {
126
+ if (ngDevMode) {
127
+ assertInInjectionContext(injectAsync);
128
+ }
129
+ const idleService = inject(IDLE_SERVICE);
130
+ const {
131
+ promise,
132
+ resolve
133
+ } = promiseWithResolvers();
134
+ idleService.requestOnIdle(() => resolve(), options);
135
+ return promise;
136
+ }
137
+
138
+ var FactoryTarget;
139
+ (function (FactoryTarget) {
140
+ FactoryTarget[FactoryTarget["Directive"] = 0] = "Directive";
141
+ FactoryTarget[FactoryTarget["Component"] = 1] = "Component";
142
+ FactoryTarget[FactoryTarget["Injectable"] = 2] = "Injectable";
143
+ FactoryTarget[FactoryTarget["Pipe"] = 3] = "Pipe";
144
+ FactoryTarget[FactoryTarget["NgModule"] = 4] = "NgModule";
145
+ FactoryTarget[FactoryTarget["Service"] = 5] = "Service";
146
+ })(FactoryTarget || (FactoryTarget = {}));
147
+ var R3TemplateDependencyKind;
148
+ (function (R3TemplateDependencyKind) {
149
+ R3TemplateDependencyKind[R3TemplateDependencyKind["Directive"] = 0] = "Directive";
150
+ R3TemplateDependencyKind[R3TemplateDependencyKind["Pipe"] = 1] = "Pipe";
151
+ R3TemplateDependencyKind[R3TemplateDependencyKind["NgModule"] = 2] = "NgModule";
152
+ })(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
153
+ var ViewEncapsulation;
154
+ (function (ViewEncapsulation) {
155
+ ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated";
156
+ ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None";
157
+ ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom";
158
+ ViewEncapsulation[ViewEncapsulation["ExperimentalIsolatedShadowDom"] = 4] = "ExperimentalIsolatedShadowDom";
159
+ })(ViewEncapsulation || (ViewEncapsulation = {}));
160
+
161
+ function compileService(type, meta) {
162
+ let def = null;
163
+ let factoryDef = null;
164
+ if (!type.hasOwnProperty(NG_PROV_DEF)) {
165
+ Object.defineProperty(type, NG_PROV_DEF, {
166
+ get: () => {
167
+ if (def === null) {
168
+ const compiler = getCompilerFacade({
169
+ usage: 0,
170
+ kind: 'service',
171
+ type
172
+ });
173
+ def = compiler.compileService(angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getServiceMetadata(type, meta));
174
+ }
175
+ return def;
176
+ }
177
+ });
178
+ }
179
+ if (!type.hasOwnProperty(NG_FACTORY_DEF)) {
180
+ Object.defineProperty(type, NG_FACTORY_DEF, {
181
+ get: () => {
182
+ if (factoryDef === null) {
183
+ const compiler = getCompilerFacade({
184
+ usage: 0,
185
+ kind: 'service',
186
+ type
187
+ });
188
+ factoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {
189
+ name: type.name,
190
+ type,
191
+ typeArgumentCount: 0,
192
+ deps: reflectDependencies(type),
193
+ target: compiler.FactoryTarget.Service
194
+ });
195
+ }
196
+ return factoryDef;
197
+ },
198
+ configurable: true
199
+ });
200
+ }
201
+ }
202
+ function getServiceMetadata(type, srcMeta) {
203
+ const compilerMeta = {
204
+ name: type.name,
205
+ type: type,
206
+ typeArgumentCount: 0,
207
+ autoProvided: srcMeta?.autoProvided,
208
+ factory: srcMeta?.factory
209
+ };
210
+ return compilerMeta;
211
+ }
212
+
213
+ const Service = makeDecorator('Service', undefined, undefined, undefined, (type, meta) => compileService(type, meta));
214
+
130
215
  function output(opts) {
131
216
  ngDevMode && assertInInjectionContext(output);
132
217
  return new OutputEmitterRef();
@@ -145,38 +230,6 @@ const input = (() => {
145
230
  return inputFunction;
146
231
  })();
147
232
 
148
- function viewChildFn(locator, opts) {
149
- ngDevMode && assertInInjectionContext(viewChild);
150
- return createSingleResultOptionalQuerySignalFn(opts);
151
- }
152
- function viewChildRequiredFn(locator, opts) {
153
- ngDevMode && assertInInjectionContext(viewChild);
154
- return createSingleResultRequiredQuerySignalFn(opts);
155
- }
156
- const viewChild = (() => {
157
- viewChildFn.required = viewChildRequiredFn;
158
- return viewChildFn;
159
- })();
160
- function viewChildren(locator, opts) {
161
- ngDevMode && assertInInjectionContext(viewChildren);
162
- return createMultiResultQuerySignalFn(opts);
163
- }
164
- function contentChildFn(locator, opts) {
165
- ngDevMode && assertInInjectionContext(contentChild);
166
- return createSingleResultOptionalQuerySignalFn(opts);
167
- }
168
- function contentChildRequiredFn(locator, opts) {
169
- ngDevMode && assertInInjectionContext(contentChildren);
170
- return createSingleResultRequiredQuerySignalFn(opts);
171
- }
172
- const contentChild = (() => {
173
- contentChildFn.required = contentChildRequiredFn;
174
- return contentChildFn;
175
- })();
176
- function contentChildren(locator, opts) {
177
- return createMultiResultQuerySignalFn(opts);
178
- }
179
-
180
233
  function createModelSignal(initialValue, opts) {
181
234
  const node = Object.create(INPUT_SIGNAL_NODE);
182
235
  const emitterRef = new OutputEmitterRef();
@@ -225,6 +278,48 @@ const model = (() => {
225
278
  return modelFunction;
226
279
  })();
227
280
 
281
+ function viewChildFn(locator, opts) {
282
+ ngDevMode && assertInInjectionContext(viewChild);
283
+ return createSingleResultOptionalQuerySignalFn(opts);
284
+ }
285
+ function viewChildRequiredFn(locator, opts) {
286
+ ngDevMode && assertInInjectionContext(viewChild);
287
+ return createSingleResultRequiredQuerySignalFn(opts);
288
+ }
289
+ const viewChild = (() => {
290
+ viewChildFn.required = viewChildRequiredFn;
291
+ return viewChildFn;
292
+ })();
293
+ function viewChildren(locator, opts) {
294
+ ngDevMode && assertInInjectionContext(viewChildren);
295
+ return createMultiResultQuerySignalFn(opts);
296
+ }
297
+ function contentChildFn(locator, opts) {
298
+ ngDevMode && assertInInjectionContext(contentChild);
299
+ return createSingleResultOptionalQuerySignalFn(opts);
300
+ }
301
+ function contentChildRequiredFn(locator, opts) {
302
+ ngDevMode && assertInInjectionContext(contentChildren);
303
+ return createSingleResultRequiredQuerySignalFn(opts);
304
+ }
305
+ const contentChild = (() => {
306
+ contentChildFn.required = contentChildRequiredFn;
307
+ return contentChildFn;
308
+ })();
309
+ function contentChildren(locator, opts) {
310
+ return createMultiResultQuerySignalFn(opts);
311
+ }
312
+
313
+ function mergeApplicationConfig(...configs) {
314
+ return configs.reduce((prev, curr) => {
315
+ return Object.assign(prev, curr, {
316
+ providers: [...prev.providers, ...curr.providers]
317
+ });
318
+ }, {
319
+ providers: []
320
+ });
321
+ }
322
+
228
323
  const emitDistinctChangesOnlyDefaultValue = true;
229
324
  class Query {}
230
325
  const ContentChildren = makePropDecorator('ContentChildren', (selector, opts = {}) => ({
@@ -258,1870 +353,2134 @@ const ViewChild = makePropDecorator('ViewChild', (selector, opts) => ({
258
353
  ...opts
259
354
  }), Query);
260
355
 
261
- function compileNgModuleFactory(injector, options, moduleType) {
262
- ngDevMode && assertNgModuleType(moduleType);
263
- const moduleFactory = new NgModuleFactory(moduleType);
264
- if (typeof ngJitMode !== 'undefined' && !ngJitMode) {
265
- return Promise.resolve(moduleFactory);
266
- }
267
- const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);
268
- setJitOptions({
269
- defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)),
270
- preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces))
271
- });
272
- if (isComponentResourceResolutionQueueEmpty()) {
273
- return Promise.resolve(moduleFactory);
274
- }
275
- const compilerProviders = compilerOptions.flatMap(option => option.providers ?? []);
276
- if (compilerProviders.length === 0) {
277
- return Promise.resolve(moduleFactory);
278
- }
279
- const compiler = getCompilerFacade({
280
- usage: 0,
281
- kind: 'NgModule',
282
- type: moduleType
283
- });
284
- const compilerInjector = Injector.create({
285
- providers: compilerProviders
286
- });
287
- const resourceLoader = compilerInjector.get(compiler.ResourceLoader);
288
- return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url))).then(() => moduleFactory);
289
- }
290
- function _lastDefined(args) {
291
- for (let i = args.length - 1; i >= 0; i--) {
292
- if (args[i] !== undefined) {
293
- return args[i];
294
- }
295
- }
296
- return undefined;
297
- }
298
-
299
- class NgZoneChangeDetectionScheduler {
300
- zone = inject(NgZone);
301
- changeDetectionScheduler = inject(ChangeDetectionScheduler);
302
- applicationRef = inject(ApplicationRef);
303
- applicationErrorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER);
304
- _onMicrotaskEmptySubscription;
305
- initialize() {
306
- if (this._onMicrotaskEmptySubscription) {
307
- return;
308
- }
309
- this._onMicrotaskEmptySubscription = this.zone.onMicrotaskEmpty.subscribe({
310
- next: () => {
311
- if (this.changeDetectionScheduler.runningTick) {
312
- return;
313
- }
314
- this.zone.run(() => {
315
- try {
316
- this.applicationRef.dirtyFlags |= 1;
317
- this.applicationRef._tick();
318
- } catch (e) {
319
- this.applicationErrorHandler(e);
320
- }
321
- });
322
- }
323
- });
324
- }
325
- ngOnDestroy() {
326
- this._onMicrotaskEmptySubscription?.unsubscribe();
327
- }
328
- static ɵfac = function NgZoneChangeDetectionScheduler_Factory(__ngFactoryType__) {
329
- return new (__ngFactoryType__ || NgZoneChangeDetectionScheduler)();
356
+ class ApplicationModule {
357
+ constructor(appRef) {}
358
+ static ɵfac = function ApplicationModule_Factory(__ngFactoryType__) {
359
+ return new (__ngFactoryType__ || ApplicationModule)(__inject(ApplicationRef));
330
360
  };
331
- static ɵprov = /*@__PURE__*/__defineInjectable({
332
- token: NgZoneChangeDetectionScheduler,
333
- factory: NgZoneChangeDetectionScheduler.ɵfac,
334
- providedIn: 'root'
361
+ static ɵmod = /*@__PURE__*/__defineNgModule({
362
+ type: ApplicationModule
335
363
  });
364
+ static ɵinj = /*@__PURE__*/__defineInjector({});
336
365
  }
337
366
  (() => {
338
- (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgZoneChangeDetectionScheduler, [{
339
- type: Injectable,
340
- args: [{
341
- providedIn: 'root'
342
- }]
343
- }], null, null);
367
+ (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
368
+ type: NgModule
369
+ }], () => [{
370
+ type: ApplicationRef
371
+ }], null);
344
372
  })();
345
- const PROVIDED_NG_ZONE = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'provideZoneChangeDetection token' : '', {
346
- factory: () => false
373
+
374
+ const REQUEST = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST' : '', {
375
+ providedIn: 'platform',
376
+ factory: () => null
347
377
  });
348
- function internalProvideZoneChangeDetection({
349
- ngZoneFactory,
350
- scheduleInRootZone
351
- }) {
352
- ngZoneFactory ??= () => new NgZone({
353
- ...getNgZoneOptions(),
354
- scheduleInRootZone
355
- });
356
- return [{
357
- provide: ZONELESS_ENABLED,
358
- useValue: false
359
- }, {
360
- provide: NgZone,
361
- useFactory: ngZoneFactory
362
- }, {
363
- provide: ENVIRONMENT_INITIALIZER,
364
- multi: true,
378
+ const RESPONSE_INIT = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'RESPONSE_INIT' : '', {
379
+ providedIn: 'platform',
380
+ factory: () => null
381
+ });
382
+ const REQUEST_CONTEXT = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST_CONTEXT' : '', {
383
+ providedIn: 'platform',
384
+ factory: () => null
385
+ });
386
+
387
+ const appsWithEventReplay = new WeakSet();
388
+ const EAGER_CONTENT_LISTENERS_KEY = '';
389
+ function shouldEnableEventReplay(injector) {
390
+ return injector.get(IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT);
391
+ }
392
+ function withEventReplay() {
393
+ const providers = [{
394
+ provide: IS_EVENT_REPLAY_ENABLED,
365
395
  useFactory: () => {
366
- const ngZoneChangeDetectionScheduler = inject(NgZoneChangeDetectionScheduler, {
367
- optional: true
368
- });
369
- if ((typeof ngDevMode === 'undefined' || ngDevMode) && ngZoneChangeDetectionScheduler === null) {
370
- throw new RuntimeError(402, `A required Injectable was not found in the dependency injection tree. ` + 'If you are bootstrapping an NgModule, make sure that the `BrowserModule` is imported.');
396
+ let isEnabled = true;
397
+ if (typeof ngServerMode === 'undefined' || !ngServerMode) {
398
+ const appId = inject(APP_ID);
399
+ isEnabled = !!window._ejsas?.[appId];
371
400
  }
372
- return () => ngZoneChangeDetectionScheduler.initialize();
373
- }
374
- }, {
375
- provide: ENVIRONMENT_INITIALIZER,
376
- multi: true,
377
- useFactory: () => {
378
- const service = inject(ZoneStablePendingTask);
379
- return () => {
380
- service.initialize();
381
- };
401
+ if (isEnabled) {
402
+ performanceMarkFeature('NgEventReplay');
403
+ }
404
+ return isEnabled;
382
405
  }
383
- }, {
384
- provide: SCHEDULE_IN_ROOT_ZONE,
385
- useValue: scheduleInRootZone ?? SCHEDULE_IN_ROOT_ZONE_DEFAULT
386
406
  }];
407
+ if (typeof ngServerMode === 'undefined' || !ngServerMode) {
408
+ providers.push({
409
+ provide: ENVIRONMENT_INITIALIZER,
410
+ useValue: () => {
411
+ const appRef = inject(ApplicationRef);
412
+ const {
413
+ injector
414
+ } = appRef;
415
+ if (!appsWithEventReplay.has(appRef)) {
416
+ const jsActionMap = inject(JSACTION_BLOCK_ELEMENT_MAP);
417
+ if (shouldEnableEventReplay(injector)) {
418
+ enableStashEventListenerImpl();
419
+ const appId = injector.get(APP_ID);
420
+ const clearStashFn = setStashFn(appId, (rEl, eventName, listenerFn) => {
421
+ if (rEl.nodeType !== Node.ELEMENT_NODE) return;
422
+ sharedStashFunction(rEl, eventName, listenerFn);
423
+ sharedMapFunction(rEl, jsActionMap);
424
+ });
425
+ appRef.onDestroy(clearStashFn);
426
+ }
427
+ }
428
+ },
429
+ multi: true
430
+ }, {
431
+ provide: APP_BOOTSTRAP_LISTENER,
432
+ useFactory: () => {
433
+ const appRef = inject(ApplicationRef);
434
+ const {
435
+ injector
436
+ } = appRef;
437
+ return () => {
438
+ if (!shouldEnableEventReplay(injector) || appsWithEventReplay.has(appRef)) {
439
+ return;
440
+ }
441
+ appsWithEventReplay.add(appRef);
442
+ const appId = injector.get(APP_ID);
443
+ appRef.onDestroy(() => {
444
+ appsWithEventReplay.delete(appRef);
445
+ if (typeof ngServerMode !== 'undefined' && !ngServerMode) {
446
+ clearAppScopedEarlyEventContract(appId);
447
+ }
448
+ });
449
+ appRef.whenStable().then(() => {
450
+ if (appRef.destroyed) {
451
+ return;
452
+ }
453
+ const eventContractDetails = injector.get(JSACTION_EVENT_CONTRACT);
454
+ initEventReplay(eventContractDetails, injector);
455
+ const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);
456
+ jsActionMap.get(EAGER_CONTENT_LISTENERS_KEY)?.forEach(removeListeners);
457
+ jsActionMap.delete(EAGER_CONTENT_LISTENERS_KEY);
458
+ const eventContract = eventContractDetails.instance;
459
+ if (isIncrementalHydrationEnabled(injector)) {
460
+ appRef.onDestroy(() => eventContract.cleanUp());
461
+ } else {
462
+ eventContract.cleanUp();
463
+ }
464
+ });
465
+ };
466
+ },
467
+ multi: true
468
+ });
469
+ }
470
+ return providers;
387
471
  }
388
- function provideZoneChangeDetection(options) {
389
- const scheduleInRootZone = options?.scheduleInRootZone;
390
- const zoneProviders = internalProvideZoneChangeDetection({
391
- ngZoneFactory: () => {
392
- const ngZoneOptions = getNgZoneOptions(options);
393
- ngZoneOptions.scheduleInRootZone = scheduleInRootZone;
394
- if (ngZoneOptions.shouldCoalesceEventChangeDetection) {
395
- performanceMarkFeature('NgZone_CoalesceEvent');
396
- }
397
- return new NgZone(ngZoneOptions);
398
- },
399
- scheduleInRootZone
472
+ const initEventReplay = (eventDelegation, injector) => {
473
+ const appId = injector.get(APP_ID);
474
+ const earlyJsactionData = window._ejsas[appId];
475
+ const eventContract = eventDelegation.instance = new EventContract(new EventContractContainer(earlyJsactionData.c));
476
+ for (const et of earlyJsactionData.et) {
477
+ eventContract.addEvent(et);
478
+ }
479
+ for (const et of earlyJsactionData.etc) {
480
+ eventContract.addEvent(et);
481
+ }
482
+ const eventInfos = getAppScopedQueuedEventInfos(appId);
483
+ eventContract.replayEarlyEventInfos(eventInfos);
484
+ clearAppScopedEarlyEventContract(appId);
485
+ const dispatcher = new EventDispatcher(event => {
486
+ invokeRegisteredReplayListeners(injector, event, event.currentTarget);
400
487
  });
401
- return makeEnvironmentProviders([{
402
- provide: PROVIDED_NG_ZONE,
403
- useValue: true
404
- }, zoneProviders]);
405
- }
406
- function getNgZoneOptions(options) {
407
- return {
408
- enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,
409
- shouldCoalesceEventChangeDetection: options?.eventCoalescing ?? false,
410
- shouldCoalesceRunChangeDetection: options?.runCoalescing ?? false
411
- };
412
- }
413
- class ZoneStablePendingTask {
414
- subscription = new Subscription();
415
- initialized = false;
416
- zone = inject(NgZone);
417
- pendingTasks = inject(PendingTasksInternal);
418
- initialize() {
419
- if (this.initialized) {
420
- return;
488
+ registerDispatcher(eventContract, dispatcher);
489
+ };
490
+ function collectDomEventsInfo(tView, lView, eventTypesToReplay) {
491
+ const domEventsInfo = new Map();
492
+ const lCleanup = lView[CLEANUP];
493
+ const tCleanup = tView.cleanup;
494
+ if (!tCleanup || !lCleanup) {
495
+ return domEventsInfo;
496
+ }
497
+ for (let i = 0; i < tCleanup.length;) {
498
+ const firstParam = tCleanup[i++];
499
+ const secondParam = tCleanup[i++];
500
+ if (typeof firstParam !== 'string') {
501
+ continue;
421
502
  }
422
- this.initialized = true;
423
- let task = null;
424
- if (!this.zone.isStable && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {
425
- task = this.pendingTasks.add();
503
+ const eventType = firstParam;
504
+ if (!isEarlyEventType(eventType)) {
505
+ continue;
506
+ }
507
+ if (isCaptureEventType(eventType)) {
508
+ eventTypesToReplay.capture.add(eventType);
509
+ } else {
510
+ eventTypesToReplay.regular.add(eventType);
511
+ }
512
+ const listenerElement = unwrapRNode(lView[secondParam]);
513
+ i++;
514
+ const useCaptureOrIndx = tCleanup[i++];
515
+ const isDomEvent = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0;
516
+ if (!isDomEvent) {
517
+ continue;
518
+ }
519
+ if (!domEventsInfo.has(listenerElement)) {
520
+ domEventsInfo.set(listenerElement, [eventType]);
521
+ } else {
522
+ domEventsInfo.get(listenerElement).push(eventType);
426
523
  }
427
- this.zone.runOutsideAngular(() => {
428
- this.subscription.add(this.zone.onStable.subscribe(() => {
429
- NgZone.assertNotInAngularZone();
430
- queueMicrotask(() => {
431
- if (task !== null && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {
432
- this.pendingTasks.remove(task);
433
- task = null;
434
- }
435
- });
436
- }));
437
- });
438
- this.subscription.add(this.zone.onUnstable.subscribe(() => {
439
- NgZone.assertInAngularZone();
440
- task ??= this.pendingTasks.add();
441
- }));
442
524
  }
443
- ngOnDestroy() {
444
- this.subscription.unsubscribe();
525
+ return domEventsInfo;
526
+ }
527
+ function invokeRegisteredReplayListeners(injector, event, currentTarget) {
528
+ const blockName = (currentTarget && currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE)) ?? '';
529
+ if (/d\d+/.test(blockName)) {
530
+ hydrateAndInvokeBlockListeners(blockName, injector, event, currentTarget);
531
+ } else if (event.eventPhase === EventPhase.REPLAY) {
532
+ invokeListeners(event, currentTarget);
445
533
  }
446
- static ɵfac = function ZoneStablePendingTask_Factory(__ngFactoryType__) {
447
- return new (__ngFactoryType__ || ZoneStablePendingTask)();
448
- };
449
- static ɵprov = /*@__PURE__*/__defineInjectable({
450
- token: ZoneStablePendingTask,
451
- factory: ZoneStablePendingTask.ɵfac,
452
- providedIn: 'root'
534
+ }
535
+ function hydrateAndInvokeBlockListeners(blockName, injector, event, currentTarget) {
536
+ const queue = injector.get(EVENT_REPLAY_QUEUE);
537
+ queue.push({
538
+ event,
539
+ currentTarget
453
540
  });
541
+ triggerHydrationFromBlockName(injector, blockName, createReplayQueuedBlockEventsFn(queue));
454
542
  }
455
- (() => {
456
- (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ZoneStablePendingTask, [{
457
- type: Injectable,
458
- args: [{
459
- providedIn: 'root'
460
- }]
461
- }], null, null);
462
- })();
463
-
464
- const SCAN_DELAY = 200;
465
- const OVERSIZED_IMAGE_TOLERANCE = 1200;
466
- class ImagePerformanceWarning {
467
- window = null;
468
- observer = null;
469
- options = inject(IMAGE_CONFIG);
470
- lcpImageUrl;
471
- start() {
472
- if (typeof ngServerMode !== 'undefined' && ngServerMode || typeof PerformanceObserver === 'undefined' || this.options?.disableImageSizeWarning && this.options?.disableImageLazyLoadWarning) {
473
- return;
474
- }
475
- this.observer = this.initPerformanceObserver();
476
- const doc = getDocument();
477
- const win = doc.defaultView;
478
- if (win) {
479
- this.window = win;
480
- const waitToScan = () => {
481
- setTimeout(this.scanImages.bind(this), SCAN_DELAY);
482
- };
483
- const setup = () => {
484
- if (doc.readyState === 'complete') {
485
- waitToScan();
486
- } else {
487
- this.window?.addEventListener('load', waitToScan, {
488
- once: true
489
- });
490
- }
491
- };
492
- if (typeof Zone !== 'undefined') {
493
- Zone.root.run(() => setup());
543
+ function createReplayQueuedBlockEventsFn(queue) {
544
+ return hydratedBlocks => {
545
+ const hydrated = new Set(hydratedBlocks);
546
+ const newQueue = [];
547
+ for (let {
548
+ event,
549
+ currentTarget
550
+ } of queue) {
551
+ const blockName = currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE);
552
+ if (hydrated.has(blockName)) {
553
+ invokeListeners(event, currentTarget);
494
554
  } else {
495
- setup();
555
+ newQueue.push({
556
+ event,
557
+ currentTarget
558
+ });
496
559
  }
497
560
  }
561
+ queue.length = 0;
562
+ queue.push(...newQueue);
563
+ };
564
+ }
565
+
566
+ let isHydrationSupportEnabled = false;
567
+ let isI18nHydrationRuntimeSupportEnabled = false;
568
+ let isIncrementalHydrationRuntimeSupportEnabled = false;
569
+ const APPLICATION_IS_STABLE_TIMEOUT = 10_000;
570
+ function enableHydrationRuntimeSupport() {
571
+ if (!isHydrationSupportEnabled) {
572
+ isHydrationSupportEnabled = true;
573
+ enableRetrieveHydrationInfoImpl();
574
+ enableLocateOrCreateElementNodeImpl();
575
+ enableLocateOrCreateTextNodeImpl();
576
+ enableLocateOrCreateElementContainerNodeImpl();
577
+ enableLocateOrCreateContainerAnchorImpl();
578
+ enableLocateOrCreateContainerRefImpl();
579
+ enableFindMatchingDehydratedViewImpl();
580
+ enableApplyRootElementTransformImpl();
498
581
  }
499
- ngOnDestroy() {
500
- this.observer?.disconnect();
501
- }
502
- initPerformanceObserver() {
503
- if (typeof PerformanceObserver === 'undefined') {
504
- return null;
505
- }
506
- const observer = new PerformanceObserver(entryList => {
507
- const entries = entryList.getEntries();
508
- if (entries.length === 0) return;
509
- const lcpElement = entries[entries.length - 1];
510
- const imgSrc = lcpElement.element?.src ?? '';
511
- if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:')) return;
512
- this.lcpImageUrl = imgSrc;
513
- });
514
- observer.observe({
515
- type: 'largest-contentful-paint',
516
- buffered: true
517
- });
518
- return observer;
519
- }
520
- scanImages() {
521
- const images = getDocument().querySelectorAll('img');
522
- let lcpElementFound,
523
- lcpElementLoadedCorrectly = false;
524
- for (let index = 0; index < images.length; index++) {
525
- const image = images[index];
526
- if (!image) {
527
- continue;
528
- }
529
- if (!this.options?.disableImageSizeWarning) {
530
- if (!image.getAttribute('ng-img') && this.isOversized(image)) {
531
- logOversizedImageWarning(image.src);
532
- }
533
- }
534
- if (!this.options?.disableImageLazyLoadWarning && this.lcpImageUrl) {
535
- if (image.src === this.lcpImageUrl) {
536
- lcpElementFound = true;
537
- if (image.loading !== 'lazy' || image.getAttribute('ng-img')) {
538
- lcpElementLoadedCorrectly = true;
539
- }
540
- }
541
- }
542
- }
543
- if (lcpElementFound && !lcpElementLoadedCorrectly && this.lcpImageUrl && !this.options?.disableImageLazyLoadWarning) {
544
- logLazyLCPWarning(this.lcpImageUrl);
545
- }
582
+ }
583
+ function enableI18nHydrationRuntimeSupport() {
584
+ if (!isI18nHydrationRuntimeSupportEnabled) {
585
+ isI18nHydrationRuntimeSupportEnabled = true;
586
+ enableLocateOrCreateI18nNodeImpl();
587
+ enablePrepareI18nBlockForHydrationImpl();
588
+ enableClaimDehydratedIcuCaseImpl();
546
589
  }
547
- isOversized(image) {
548
- if (!this.window) {
549
- return false;
550
- }
551
- const nonOversizedImageExtentions = ['.svg'];
552
- const imageSource = (image.src || '').toLowerCase();
553
- if (nonOversizedImageExtentions.some(extension => imageSource.endsWith(extension))) {
554
- return false;
555
- }
556
- const computedStyle = this.window.getComputedStyle(image);
557
- let renderedWidth = parseFloat(computedStyle.getPropertyValue('width'));
558
- let renderedHeight = parseFloat(computedStyle.getPropertyValue('height'));
559
- const boxSizing = computedStyle.getPropertyValue('box-sizing');
560
- const objectFit = computedStyle.getPropertyValue('object-fit');
561
- if (objectFit === `cover`) {
562
- return false;
563
- }
564
- if (boxSizing === 'border-box') {
565
- const paddingTop = computedStyle.getPropertyValue('padding-top');
566
- const paddingRight = computedStyle.getPropertyValue('padding-right');
567
- const paddingBottom = computedStyle.getPropertyValue('padding-bottom');
568
- const paddingLeft = computedStyle.getPropertyValue('padding-left');
569
- renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft);
570
- renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom);
571
- }
572
- const intrinsicWidth = image.naturalWidth;
573
- const intrinsicHeight = image.naturalHeight;
574
- const recommendedWidth = this.window.devicePixelRatio * renderedWidth;
575
- const recommendedHeight = this.window.devicePixelRatio * renderedHeight;
576
- const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;
577
- const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;
578
- return oversizedWidth || oversizedHeight;
590
+ }
591
+ function enableIncrementalHydrationRuntimeSupport() {
592
+ if (!isIncrementalHydrationRuntimeSupportEnabled) {
593
+ isIncrementalHydrationRuntimeSupportEnabled = true;
594
+ enableRetrieveDeferBlockDataImpl();
579
595
  }
580
- static ɵfac = function ImagePerformanceWarning_Factory(__ngFactoryType__) {
581
- return new (__ngFactoryType__ || ImagePerformanceWarning)();
582
- };
583
- static ɵprov = /*@__PURE__*/__defineInjectable({
584
- token: ImagePerformanceWarning,
585
- factory: ImagePerformanceWarning.ɵfac,
586
- providedIn: 'root'
587
- });
588
596
  }
589
- (() => {
590
- (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ImagePerformanceWarning, [{
591
- type: Injectable,
592
- args: [{
593
- providedIn: 'root'
594
- }]
595
- }], null, null);
596
- })();
597
- function logLazyLCPWarning(src) {
598
- console.warn(formatRuntimeError(-913, `An image with src ${src} is the Largest Contentful Paint (LCP) element ` + `but was given a "loading" value of "lazy", which can negatively impact ` + `application loading performance. This warning can be addressed by ` + `changing the loading value of the LCP image to "eager", or by using the ` + `NgOptimizedImage directive's prioritization utilities. For more ` + `information about addressing or disabling this warning, see ` + `${ERROR_DETAILS_PAGE_BASE_URL}/NG0913`));
597
+ function printHydrationStats(injector) {
598
+ const console = injector.get(Console);
599
+ const message = `Angular hydrated ${ngDevMode.hydratedComponents} component(s) ` + `and ${ngDevMode.hydratedNodes} node(s), ` + `${ngDevMode.componentsSkippedHydration} component(s) were skipped. ` + (isIncrementalHydrationEnabled(injector) ? `${ngDevMode.deferBlocksWithIncrementalHydration} defer block(s) were configured to use incremental hydration. ` : '') + `Learn more at ${DOC_PAGE_BASE_URL}/guide/hydration.`;
600
+ console.log(message);
599
601
  }
600
- function logOversizedImageWarning(src) {
601
- console.warn(formatRuntimeError(-913, `An image with src ${src} has intrinsic file dimensions much larger than its ` + `rendered size. This can negatively impact application loading performance. ` + `For more information about addressing or disabling this warning, see ` + `${ERROR_DETAILS_PAGE_BASE_URL}/NG0913`));
602
+ function whenStableWithTimeout(appRef) {
603
+ const whenStablePromise = appRef.whenStable();
604
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
605
+ const timeoutTime = APPLICATION_IS_STABLE_TIMEOUT;
606
+ const console = appRef.injector.get(Console);
607
+ const ngZone = appRef.injector.get(NgZone);
608
+ const timeoutId = ngZone.runOutsideAngular(() => {
609
+ return setTimeout(() => logWarningOnStableTimedout(timeoutTime, console), timeoutTime);
610
+ });
611
+ whenStablePromise.finally(() => clearTimeout(timeoutId));
612
+ }
613
+ return whenStablePromise;
602
614
  }
603
-
604
- const PLATFORM_DESTROY_LISTENERS = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'PlatformDestroyListeners' : '');
605
-
606
- const ENABLE_ROOT_COMPONENT_BOOTSTRAP = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'ENABLE_ROOT_COMPONENT_BOOTSTRAP' : '');
607
- function isApplicationBootstrapConfig(config) {
608
- return !config.moduleRef;
615
+ const CLIENT_RENDER_MODE_FLAG = 'ngcm';
616
+ function isClientRenderModeEnabled(doc) {
617
+ return (typeof ngServerMode === 'undefined' || !ngServerMode) && doc.body.hasAttribute(CLIENT_RENDER_MODE_FLAG);
609
618
  }
610
- function bootstrap(config) {
611
- const envInjector = isApplicationBootstrapConfig(config) ? config.r3Injector : config.moduleRef.injector;
612
- const ngZone = envInjector.get(NgZone);
613
- return ngZone.run(() => {
614
- if (isApplicationBootstrapConfig(config)) {
615
- config.r3Injector.resolveInjectorInitializers();
616
- } else {
617
- config.moduleRef.resolveInjectorInitializers();
618
- }
619
- const exceptionHandler = envInjector.get(INTERNAL_APPLICATION_ERROR_HANDLER);
620
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
621
- if (envInjector.get(PROVIDED_ZONELESS) && envInjector.get(PROVIDED_NG_ZONE)) {
622
- console.warn(formatRuntimeError(408, 'Both provideZoneChangeDetection and provideZonelessChangeDetection are provided. ' + 'This is likely a mistake. Update the application providers to use only one of the two.'));
619
+ function withDomHydration() {
620
+ const providers = [{
621
+ provide: IS_HYDRATION_DOM_REUSE_ENABLED,
622
+ useFactory: () => {
623
+ let isEnabled = true;
624
+ if (typeof ngServerMode === 'undefined' || !ngServerMode) {
625
+ const transferState = inject(TransferState, {
626
+ optional: true
627
+ });
628
+ isEnabled = !!transferState?.get(NGH_DATA_KEY, null);
623
629
  }
630
+ if (isEnabled) {
631
+ performanceMarkFeature('NgHydration');
632
+ }
633
+ return isEnabled;
624
634
  }
625
- let onErrorSubscription;
626
- ngZone.runOutsideAngular(() => {
627
- onErrorSubscription = ngZone.onError.subscribe({
628
- next: exceptionHandler
629
- });
630
- });
631
- if (isApplicationBootstrapConfig(config)) {
632
- const destroyListener = () => envInjector.destroy();
633
- const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);
634
- onPlatformDestroyListeners.add(destroyListener);
635
- envInjector.onDestroy(() => {
636
- onErrorSubscription.unsubscribe();
637
- onPlatformDestroyListeners.delete(destroyListener);
638
- });
639
- } else {
640
- const destroyListener = () => config.moduleRef.destroy();
641
- const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);
642
- onPlatformDestroyListeners.add(destroyListener);
643
- config.moduleRef.onDestroy(() => {
644
- remove(config.allPlatformModules, config.moduleRef);
645
- onErrorSubscription.unsubscribe();
646
- onPlatformDestroyListeners.delete(destroyListener);
647
- });
648
- }
649
- return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {
650
- const pendingTasks = envInjector.get(PendingTasksInternal);
651
- const taskId = pendingTasks.add();
652
- const initStatus = envInjector.get(ApplicationInitStatus);
653
- initStatus.runInitializers();
654
- return initStatus.donePromise.then(() => {
655
- const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);
656
- setLocaleId(localeId || DEFAULT_LOCALE_ID);
657
- const enableRootComponentbootstrap = envInjector.get(ENABLE_ROOT_COMPONENT_BOOTSTRAP, true);
658
- if (!enableRootComponentbootstrap) {
659
- if (isApplicationBootstrapConfig(config)) {
660
- return envInjector.get(ApplicationRef);
661
- }
662
- config.allPlatformModules.push(config.moduleRef);
663
- return config.moduleRef;
664
- }
665
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
666
- const imagePerformanceService = envInjector.get(ImagePerformanceWarning);
667
- imagePerformanceService.start();
668
- }
669
- if (isApplicationBootstrapConfig(config)) {
670
- const appRef = envInjector.get(ApplicationRef);
671
- if (config.rootComponent !== undefined) {
672
- appRef.bootstrap(config.rootComponent);
673
- }
674
- return appRef;
675
- } else {
676
- moduleBootstrapImpl?.(config.moduleRef, config.allPlatformModules);
677
- return config.moduleRef;
635
+ }, {
636
+ provide: ENVIRONMENT_INITIALIZER,
637
+ useValue: () => {
638
+ setIsI18nHydrationSupportEnabled(false);
639
+ if (typeof ngServerMode !== 'undefined' && ngServerMode) {
640
+ return;
641
+ }
642
+ const doc = inject(DOCUMENT);
643
+ if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
644
+ verifySsrContentsIntegrity(doc);
645
+ enableHydrationRuntimeSupport();
646
+ } else if (typeof ngDevMode !== 'undefined' && ngDevMode && !isClientRenderModeEnabled(doc)) {
647
+ const console = inject(Console);
648
+ const message = formatRuntimeError(-505, 'Angular hydration was requested on the client, but there was no ' + 'serialized information present in the server response, ' + 'thus hydration was not enabled. ' + 'Make sure the `provideClientHydration()` is included into the list ' + 'of providers in the server part of the application configuration.');
649
+ console.warn(message);
650
+ }
651
+ },
652
+ multi: true
653
+ }];
654
+ if (typeof ngServerMode === 'undefined' || !ngServerMode) {
655
+ providers.push({
656
+ provide: PRESERVE_HOST_CONTENT,
657
+ useFactory: () => {
658
+ return inject(IS_HYDRATION_DOM_REUSE_ENABLED);
659
+ }
660
+ }, {
661
+ provide: APP_BOOTSTRAP_LISTENER,
662
+ useFactory: () => {
663
+ const scheduler = inject(ChangeDetectionScheduler);
664
+ if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
665
+ const appRef = inject(ApplicationRef);
666
+ return () => {
667
+ whenStableWithTimeout(appRef).then(() => {
668
+ if (appRef.destroyed) {
669
+ return;
670
+ }
671
+ cleanupDehydratedViews(appRef);
672
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
673
+ countBlocksSkippedByHydration(appRef.injector);
674
+ printHydrationStats(appRef.injector);
675
+ }
676
+ scheduler.notify(7);
677
+ });
678
+ };
678
679
  }
679
- }).finally(() => void pendingTasks.remove(taskId));
680
+ return () => {};
681
+ },
682
+ multi: true
680
683
  });
681
- });
684
+ }
685
+ return makeEnvironmentProviders(providers);
682
686
  }
683
- let moduleBootstrapImpl;
684
- function setModuleBootstrapImpl() {
685
- moduleBootstrapImpl = _moduleDoBootstrap;
687
+ function withI18nSupport() {
688
+ return [{
689
+ provide: IS_I18N_HYDRATION_ENABLED,
690
+ useFactory: () => inject(IS_HYDRATION_DOM_REUSE_ENABLED)
691
+ }, {
692
+ provide: ENVIRONMENT_INITIALIZER,
693
+ useValue: () => {
694
+ if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
695
+ enableI18nHydrationRuntimeSupport();
696
+ setIsI18nHydrationSupportEnabled(true);
697
+ performanceMarkFeature('NgI18nHydration');
698
+ }
699
+ },
700
+ multi: true
701
+ }];
686
702
  }
687
- function _moduleDoBootstrap(moduleRef, allPlatformModules) {
688
- const appRef = moduleRef.injector.get(ApplicationRef);
689
- if (moduleRef._bootstrapComponents.length > 0) {
690
- moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));
691
- } else if (moduleRef.instance.ngDoBootstrap) {
692
- moduleRef.instance.ngDoBootstrap(appRef);
693
- } else {
694
- throw new RuntimeError(-403, ngDevMode && `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, ` + `but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. ` + `Please define one of these.`);
703
+ function withIncrementalHydration() {
704
+ const providers = [withEventReplay(), {
705
+ provide: IS_INCREMENTAL_HYDRATION_ENABLED,
706
+ useValue: true
707
+ }, {
708
+ provide: DEHYDRATED_BLOCK_REGISTRY,
709
+ useClass: DehydratedBlockRegistry
710
+ }, {
711
+ provide: ENVIRONMENT_INITIALIZER,
712
+ useValue: () => {
713
+ enableIncrementalHydrationRuntimeSupport();
714
+ performanceMarkFeature('NgIncrementalHydration');
715
+ },
716
+ multi: true
717
+ }];
718
+ if (typeof ngServerMode === 'undefined' || !ngServerMode) {
719
+ providers.push({
720
+ provide: APP_BOOTSTRAP_LISTENER,
721
+ useFactory: () => {
722
+ const injector = inject(Injector);
723
+ const doc = inject(DOCUMENT);
724
+ return () => {
725
+ const deferBlockData = processBlockData(injector);
726
+ const commentsByBlockId = gatherDeferBlocksCommentNodes(doc, doc.body);
727
+ processAndInitTriggers(injector, deferBlockData, commentsByBlockId);
728
+ appendDeferBlocksToJSActionMap(doc, injector);
729
+ };
730
+ },
731
+ multi: true
732
+ });
695
733
  }
696
- allPlatformModules.push(moduleRef);
734
+ return providers;
697
735
  }
698
- function _callAndReportToErrorHandler(errorHandler, ngZone, callback) {
699
- try {
700
- const result = callback();
701
- if (isPromise(result)) {
702
- return result.catch(e => {
703
- ngZone.runOutsideAngular(() => errorHandler(e));
704
- throw e;
705
- });
706
- }
707
- return result;
708
- } catch (e) {
709
- ngZone.runOutsideAngular(() => errorHandler(e));
710
- throw e;
711
- }
736
+ function logWarningOnStableTimedout(time, console) {
737
+ const message = `Angular hydration expected the ApplicationRef.isStable() to emit \`true\`, but it ` + `didn't happen within ${time}ms. Angular hydration logic depends on the application becoming stable ` + `as a signal to complete hydration process.`;
738
+ console.warn(formatRuntimeError(-506, message));
712
739
  }
713
740
 
714
- class PlatformRef {
715
- _injector;
716
- _modules = [];
717
- _destroyListeners = [];
718
- _destroyed = false;
719
- constructor(_injector) {
720
- this._injector = _injector;
721
- }
722
- bootstrapModuleFactory(moduleFactory, options) {
723
- const allAppProviders = [provideZonelessChangeDetectionInternal(), ...(options?.applicationProviders ?? []), errorHandlerEnvironmentInitializer, ...(ngDevMode ? [validAppIdInitializer] : [])];
724
- const moduleRef = createNgModuleRefWithProviders(moduleFactory.moduleType, this.injector, allAppProviders);
725
- setModuleBootstrapImpl();
726
- return bootstrap({
727
- moduleRef,
728
- allPlatformModules: this._modules,
729
- platformInjector: this.injector
730
- });
731
- }
732
- bootstrapModule(moduleType, compilerOptions = []) {
733
- const options = optionsReducer({}, compilerOptions);
734
- setModuleBootstrapImpl();
735
- return compileNgModuleFactory(this.injector, options, moduleType).then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));
736
- }
737
- onDestroy(callback) {
738
- this._destroyListeners.push(callback);
741
+ const STABILITY_WARNING_THRESHOLD = APPLICATION_IS_STABLE_TIMEOUT - 1_000;
742
+ class DebugTaskTrackerImpl {
743
+ openTasks = new Map();
744
+ add(taskId) {
745
+ this.openTasks.set(taskId, new Error('Task stack tracking error'));
739
746
  }
740
- get injector() {
741
- return this._injector;
747
+ remove(taskId) {
748
+ this.openTasks.delete(taskId);
742
749
  }
743
- destroy() {
744
- if (this._destroyed) {
745
- throw new RuntimeError(404, ngDevMode && 'The platform has already been destroyed!');
750
+ }
751
+ function provideStabilityDebugging() {
752
+ const taskTracker = new DebugTaskTrackerImpl();
753
+ const {
754
+ openTasks
755
+ } = taskTracker;
756
+ return makeEnvironmentProviders([{
757
+ provide: DEBUG_TASK_TRACKER,
758
+ useValue: taskTracker
759
+ }, provideAppInitializer(() => {
760
+ if (typeof ngDevMode === 'undefined' || !ngDevMode) {
761
+ console.warn('Stability debugging utility was provided in production mode. ' + 'This will cause debug code to be included in production bundles. ' + 'If this is intentional because you are debugging stability issues in a production environment, you can ignore this warning.');
746
762
  }
747
- this._modules.slice().forEach(module => module.destroy());
748
- this._destroyListeners.forEach(listener => listener());
749
- const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null);
750
- if (destroyListeners) {
751
- destroyListeners.forEach(listener => listener());
752
- destroyListeners.clear();
763
+ const ngZone = inject(NgZone);
764
+ const applicationRef = inject(ApplicationRef);
765
+ let _taskTrackingZone = null;
766
+ if (typeof Zone !== 'undefined') {
767
+ ngZone.run(() => {
768
+ _taskTrackingZone = Zone.current.get('TaskTrackingZone');
769
+ });
753
770
  }
754
- this._destroyed = true;
771
+ ngZone.runOutsideAngular(() => {
772
+ const timeoutId = setTimeout(() => {
773
+ console.debug(`---- Application did not stabilize within ${STABILITY_WARNING_THRESHOLD / 1000} seconds ----`);
774
+ if (typeof Zone !== 'undefined' && !_taskTrackingZone) {
775
+ console.info('Zone.js is present but no TaskTrackingZone found. To enable better debugging of tasks in the Angular Zone, ' + 'import "zone.js/plugins/task-tracking" in your application.');
776
+ }
777
+ if (_taskTrackingZone?.macroTasks?.length) {
778
+ console.group('Macrotasks keeping Angular Zone unstable:');
779
+ for (const t of _taskTrackingZone?.macroTasks ?? []) {
780
+ console.debug(t.creationLocation.stack);
781
+ }
782
+ console.groupEnd();
783
+ }
784
+ console.group('PendingTasks keeping application unstable:');
785
+ for (const error of openTasks.values()) {
786
+ console.debug(error.stack);
787
+ }
788
+ console.groupEnd();
789
+ }, STABILITY_WARNING_THRESHOLD);
790
+ applicationRef.whenStable().then(() => {
791
+ clearTimeout(timeoutId);
792
+ });
793
+ });
794
+ })]);
795
+ }
796
+
797
+ class DefaultIterableDifferFactory {
798
+ supports(obj) {
799
+ return isListLikeIterable(obj);
755
800
  }
756
- get destroyed() {
757
- return this._destroyed;
801
+ create(trackByFn) {
802
+ return new DefaultIterableDiffer(trackByFn);
758
803
  }
759
- static ɵfac = function PlatformRef_Factory(__ngFactoryType__) {
760
- return new (__ngFactoryType__ || PlatformRef)(__inject(Injector));
761
- };
762
- static ɵprov = /*@__PURE__*/__defineInjectable({
763
- token: PlatformRef,
764
- factory: PlatformRef.ɵfac,
765
- providedIn: 'platform'
766
- });
767
804
  }
768
- (() => {
769
- (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{
770
- type: Injectable,
771
- args: [{
772
- providedIn: 'platform'
773
- }]
774
- }], () => [{
775
- type: Injector
776
- }], null);
777
- })();
778
-
779
- let _platformInjector = null;
780
- function createPlatform(injector) {
781
- if (getPlatform()) {
782
- throw new RuntimeError(400, ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.');
805
+ const trackByIdentity = (index, item) => item;
806
+ class DefaultIterableDiffer {
807
+ length = 0;
808
+ collection;
809
+ _linkedRecords = null;
810
+ _unlinkedRecords = null;
811
+ _previousItHead = null;
812
+ _itHead = null;
813
+ _itTail = null;
814
+ _additionsHead = null;
815
+ _additionsTail = null;
816
+ _movesHead = null;
817
+ _movesTail = null;
818
+ _removalsHead = null;
819
+ _removalsTail = null;
820
+ _identityChangesHead = null;
821
+ _identityChangesTail = null;
822
+ _trackByFn;
823
+ constructor(trackByFn) {
824
+ this._trackByFn = trackByFn || trackByIdentity;
783
825
  }
784
- publishDefaultGlobalUtils();
785
- publishSignalConfiguration();
786
- _platformInjector = typeof ngServerMode === 'undefined' || !ngServerMode ? injector : null;
787
- const platform = injector.get(PlatformRef);
788
- runPlatformInitializers(injector);
789
- return platform;
790
- }
791
- function createPlatformFactory(parentPlatformFactory, name, providers = []) {
792
- const desc = `Platform: ${name}`;
793
- const marker = new InjectionToken(desc);
794
- return (extraProviders = []) => {
795
- let platform = getPlatform();
796
- if (!platform) {
797
- const platformProviders = [...providers, ...extraProviders, {
798
- provide: marker,
799
- useValue: true
800
- }];
801
- platform = parentPlatformFactory?.(platformProviders) ?? createPlatform(createPlatformInjector(platformProviders, desc));
826
+ forEachItem(fn) {
827
+ let record;
828
+ for (record = this._itHead; record !== null; record = record._next) {
829
+ fn(record);
802
830
  }
803
- return typeof ngServerMode !== 'undefined' && ngServerMode ? platform : assertPlatform(marker);
804
- };
805
- }
806
- function createPlatformInjector(providers = [], name) {
807
- return Injector.create({
808
- name,
809
- providers: [{
810
- provide: INJECTOR_SCOPE,
811
- useValue: 'platform'
812
- }, {
813
- provide: PLATFORM_DESTROY_LISTENERS,
814
- useValue: new Set([() => _platformInjector = null])
815
- }, ...providers]
816
- });
817
- }
818
- function assertPlatform(requiredToken) {
819
- const platform = getPlatform();
820
- if (!platform) {
821
- throw new RuntimeError(-401, ngDevMode && 'No platform exists!');
822
831
  }
823
- if ((typeof ngDevMode === 'undefined' || ngDevMode) && !platform.injector.get(requiredToken, null)) {
824
- throw new RuntimeError(400, 'A platform with a different configuration has been created. Please destroy it first.');
832
+ forEachOperation(fn) {
833
+ let nextIt = this._itHead;
834
+ let nextRemove = this._removalsHead;
835
+ let addRemoveOffset = 0;
836
+ let moveOffsets = null;
837
+ while (nextIt || nextRemove) {
838
+ const record = !nextRemove || nextIt && nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ? nextIt : nextRemove;
839
+ const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);
840
+ const currentIndex = record.currentIndex;
841
+ if (record === nextRemove) {
842
+ addRemoveOffset--;
843
+ nextRemove = nextRemove._nextRemoved;
844
+ } else {
845
+ nextIt = nextIt._next;
846
+ if (record.previousIndex == null) {
847
+ addRemoveOffset++;
848
+ } else {
849
+ if (!moveOffsets) moveOffsets = [];
850
+ const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;
851
+ const localCurrentIndex = currentIndex - addRemoveOffset;
852
+ if (localMovePreviousIndex != localCurrentIndex) {
853
+ for (let i = 0; i < localMovePreviousIndex; i++) {
854
+ const offset = i < moveOffsets.length ? moveOffsets[i] : moveOffsets[i] = 0;
855
+ const index = offset + i;
856
+ if (localCurrentIndex <= index && index < localMovePreviousIndex) {
857
+ moveOffsets[i] = offset + 1;
858
+ }
859
+ }
860
+ const previousIndex = record.previousIndex;
861
+ moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;
862
+ }
863
+ }
864
+ }
865
+ if (adjPreviousIndex !== currentIndex) {
866
+ fn(record, adjPreviousIndex, currentIndex);
867
+ }
868
+ }
825
869
  }
826
- return platform;
827
- }
828
- function getPlatform() {
829
- if (typeof ngServerMode !== 'undefined' && ngServerMode) {
830
- return null;
870
+ forEachPreviousItem(fn) {
871
+ let record;
872
+ for (record = this._previousItHead; record !== null; record = record._nextPrevious) {
873
+ fn(record);
874
+ }
831
875
  }
832
- return _platformInjector?.get(PlatformRef) ?? null;
833
- }
834
- function destroyPlatform() {
835
- getPlatform()?.destroy();
836
- }
837
- function createOrReusePlatformInjector(providers = []) {
838
- if (_platformInjector) return _platformInjector;
839
- publishDefaultGlobalUtils();
840
- const injector = createPlatformInjector(providers);
841
- if (typeof ngServerMode === 'undefined' || !ngServerMode) {
842
- _platformInjector = injector;
876
+ forEachAddedItem(fn) {
877
+ let record;
878
+ for (record = this._additionsHead; record !== null; record = record._nextAdded) {
879
+ fn(record);
880
+ }
843
881
  }
844
- publishSignalConfiguration();
845
- runPlatformInitializers(injector);
846
- return injector;
847
- }
848
- function providePlatformInitializer(initializerFn) {
849
- return {
850
- provide: PLATFORM_INITIALIZER,
851
- useValue: initializerFn,
852
- multi: true
853
- };
854
- }
855
- function runPlatformInitializers(injector) {
856
- const inits = injector.get(PLATFORM_INITIALIZER, null);
857
- runInInjectionContext(injector, () => {
858
- inits?.forEach(init => init());
859
- });
860
- }
861
-
862
- function exhaustiveCheckNoChangesInterval(interval) {
863
- return provideEnvironmentInitializer(() => {
864
- const applicationRef = inject(ApplicationRef);
865
- const errorHandler = inject(ErrorHandler);
866
- const scheduler = inject(ChangeDetectionSchedulerImpl);
867
- const ngZone = inject(NgZone);
868
- function scheduleCheckNoChanges() {
869
- ngZone.runOutsideAngular(() => {
870
- setTimeout(() => {
871
- if (applicationRef.destroyed) {
872
- return;
873
- }
874
- if (scheduler.pendingRenderTaskId || scheduler.runningTick) {
875
- scheduleCheckNoChanges();
876
- return;
882
+ forEachMovedItem(fn) {
883
+ let record;
884
+ for (record = this._movesHead; record !== null; record = record._nextMoved) {
885
+ fn(record);
886
+ }
887
+ }
888
+ forEachRemovedItem(fn) {
889
+ let record;
890
+ for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
891
+ fn(record);
892
+ }
893
+ }
894
+ forEachIdentityChange(fn) {
895
+ let record;
896
+ for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {
897
+ fn(record);
898
+ }
899
+ }
900
+ diff(collection) {
901
+ if (collection == null) collection = [];
902
+ if (!isListLikeIterable(collection)) {
903
+ throw new RuntimeError(900, ngDevMode && `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);
904
+ }
905
+ if (this.check(collection)) {
906
+ return this;
907
+ } else {
908
+ return null;
909
+ }
910
+ }
911
+ onDestroy() {}
912
+ check(collection) {
913
+ this._reset();
914
+ let record = this._itHead;
915
+ let mayBeDirty = false;
916
+ let index;
917
+ let item;
918
+ let itemTrackBy;
919
+ if (Array.isArray(collection)) {
920
+ this.length = collection.length;
921
+ for (let index = 0; index < this.length; index++) {
922
+ item = collection[index];
923
+ itemTrackBy = this._trackByFn(index, item);
924
+ if (record === null || !Object.is(record.trackById, itemTrackBy)) {
925
+ record = this._mismatch(record, item, itemTrackBy, index);
926
+ mayBeDirty = true;
927
+ } else {
928
+ if (mayBeDirty) {
929
+ record = this._verifyReinsertion(record, item, itemTrackBy, index);
877
930
  }
878
- for (const view of applicationRef.allViews) {
879
- try {
880
- checkNoChangesInternal(view._lView, true);
881
- } catch (e) {
882
- errorHandler.handleError(e);
883
- }
931
+ if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
932
+ }
933
+ record = record._next;
934
+ }
935
+ } else {
936
+ index = 0;
937
+ iterateListLike(collection, item => {
938
+ itemTrackBy = this._trackByFn(index, item);
939
+ if (record === null || !Object.is(record.trackById, itemTrackBy)) {
940
+ record = this._mismatch(record, item, itemTrackBy, index);
941
+ mayBeDirty = true;
942
+ } else {
943
+ if (mayBeDirty) {
944
+ record = this._verifyReinsertion(record, item, itemTrackBy, index);
884
945
  }
885
- scheduleCheckNoChanges();
886
- }, interval);
946
+ if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
947
+ }
948
+ record = record._next;
949
+ index++;
887
950
  });
951
+ this.length = index;
888
952
  }
889
- scheduleCheckNoChanges();
890
- });
891
- }
892
-
893
- function provideCheckNoChangesConfig(options) {
894
- return makeEnvironmentProviders(typeof ngDevMode === 'undefined' || ngDevMode ? [{
895
- provide: UseExhaustiveCheckNoChanges,
896
- useValue: options.exhaustive
897
- }, options?.interval !== undefined ? exhaustiveCheckNoChangesInterval(options.interval) : []] : []);
898
- }
899
-
900
- function isDevMode() {
901
- return typeof ngDevMode === 'undefined' || !!ngDevMode;
902
- }
903
- function enableProdMode() {
904
- if (typeof ngDevMode === 'undefined' || ngDevMode) {
905
- _global['ngDevMode'] = false;
953
+ this._truncate(record);
954
+ this.collection = collection;
955
+ return this.isDirty;
906
956
  }
907
- }
908
-
909
- const appsWithEventReplay = new WeakSet();
910
- const EAGER_CONTENT_LISTENERS_KEY = '';
911
- function shouldEnableEventReplay(injector) {
912
- return injector.get(IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT);
913
- }
914
- function withEventReplay() {
915
- const providers = [{
916
- provide: IS_EVENT_REPLAY_ENABLED,
917
- useFactory: () => {
918
- let isEnabled = true;
919
- if (typeof ngServerMode === 'undefined' || !ngServerMode) {
920
- const appId = inject(APP_ID);
921
- isEnabled = !!window._ejsas?.[appId];
957
+ get isDirty() {
958
+ return this._additionsHead !== null || this._movesHead !== null || this._removalsHead !== null || this._identityChangesHead !== null;
959
+ }
960
+ _reset() {
961
+ if (this.isDirty) {
962
+ let record;
963
+ for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {
964
+ record._nextPrevious = record._next;
922
965
  }
923
- if (isEnabled) {
924
- performanceMarkFeature('NgEventReplay');
966
+ for (record = this._additionsHead; record !== null; record = record._nextAdded) {
967
+ record.previousIndex = record.currentIndex;
925
968
  }
926
- return isEnabled;
969
+ this._additionsHead = this._additionsTail = null;
970
+ for (record = this._movesHead; record !== null; record = record._nextMoved) {
971
+ record.previousIndex = record.currentIndex;
972
+ }
973
+ this._movesHead = this._movesTail = null;
974
+ this._removalsHead = this._removalsTail = null;
975
+ this._identityChangesHead = this._identityChangesTail = null;
927
976
  }
928
- }];
929
- if (typeof ngServerMode === 'undefined' || !ngServerMode) {
930
- providers.push({
931
- provide: ENVIRONMENT_INITIALIZER,
932
- useValue: () => {
933
- const appRef = inject(ApplicationRef);
934
- const {
935
- injector
936
- } = appRef;
937
- if (!appsWithEventReplay.has(appRef)) {
938
- const jsActionMap = inject(JSACTION_BLOCK_ELEMENT_MAP);
939
- if (shouldEnableEventReplay(injector)) {
940
- enableStashEventListenerImpl();
941
- const appId = injector.get(APP_ID);
942
- const clearStashFn = setStashFn(appId, (rEl, eventName, listenerFn) => {
943
- if (rEl.nodeType !== Node.ELEMENT_NODE) return;
944
- sharedStashFunction(rEl, eventName, listenerFn);
945
- sharedMapFunction(rEl, jsActionMap);
946
- });
947
- appRef.onDestroy(clearStashFn);
948
- }
949
- }
950
- },
951
- multi: true
952
- }, {
953
- provide: APP_BOOTSTRAP_LISTENER,
954
- useFactory: () => {
955
- const appRef = inject(ApplicationRef);
956
- const {
957
- injector
958
- } = appRef;
959
- return () => {
960
- if (!shouldEnableEventReplay(injector) || appsWithEventReplay.has(appRef)) {
961
- return;
962
- }
963
- appsWithEventReplay.add(appRef);
964
- const appId = injector.get(APP_ID);
965
- appRef.onDestroy(() => {
966
- appsWithEventReplay.delete(appRef);
967
- if (typeof ngServerMode !== 'undefined' && !ngServerMode) {
968
- clearAppScopedEarlyEventContract(appId);
969
- }
970
- });
971
- appRef.whenStable().then(() => {
972
- if (appRef.destroyed) {
973
- return;
974
- }
975
- const eventContractDetails = injector.get(JSACTION_EVENT_CONTRACT);
976
- initEventReplay(eventContractDetails, injector);
977
- const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);
978
- jsActionMap.get(EAGER_CONTENT_LISTENERS_KEY)?.forEach(removeListeners);
979
- jsActionMap.delete(EAGER_CONTENT_LISTENERS_KEY);
980
- const eventContract = eventContractDetails.instance;
981
- if (isIncrementalHydrationEnabled(injector)) {
982
- appRef.onDestroy(() => eventContract.cleanUp());
983
- } else {
984
- eventContract.cleanUp();
985
- }
986
- });
987
- };
988
- },
989
- multi: true
990
- });
991
977
  }
992
- return providers;
993
- }
994
- const initEventReplay = (eventDelegation, injector) => {
995
- const appId = injector.get(APP_ID);
996
- const earlyJsactionData = window._ejsas[appId];
997
- const eventContract = eventDelegation.instance = new EventContract(new EventContractContainer(earlyJsactionData.c));
998
- for (const et of earlyJsactionData.et) {
999
- eventContract.addEvent(et);
978
+ _mismatch(record, item, itemTrackBy, index) {
979
+ let previousRecord;
980
+ if (record === null) {
981
+ previousRecord = this._itTail;
982
+ } else {
983
+ previousRecord = record._prev;
984
+ this._remove(record);
985
+ }
986
+ record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
987
+ if (record !== null) {
988
+ if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
989
+ this._reinsertAfter(record, previousRecord, index);
990
+ } else {
991
+ record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);
992
+ if (record !== null) {
993
+ if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
994
+ this._moveAfter(record, previousRecord, index);
995
+ } else {
996
+ record = this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);
997
+ }
998
+ }
999
+ return record;
1000
1000
  }
1001
- for (const et of earlyJsactionData.etc) {
1002
- eventContract.addEvent(et);
1001
+ _verifyReinsertion(record, item, itemTrackBy, index) {
1002
+ let reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
1003
+ if (reinsertRecord !== null) {
1004
+ record = this._reinsertAfter(reinsertRecord, record._prev, index);
1005
+ } else if (record.currentIndex != index) {
1006
+ record.currentIndex = index;
1007
+ this._addToMoves(record, index);
1008
+ }
1009
+ return record;
1003
1010
  }
1004
- const eventInfos = getAppScopedQueuedEventInfos(appId);
1005
- eventContract.replayEarlyEventInfos(eventInfos);
1006
- clearAppScopedEarlyEventContract(appId);
1007
- const dispatcher = new EventDispatcher(event => {
1008
- invokeRegisteredReplayListeners(injector, event, event.currentTarget);
1009
- });
1010
- registerDispatcher(eventContract, dispatcher);
1011
- };
1012
- function collectDomEventsInfo(tView, lView, eventTypesToReplay) {
1013
- const domEventsInfo = new Map();
1014
- const lCleanup = lView[CLEANUP];
1015
- const tCleanup = tView.cleanup;
1016
- if (!tCleanup || !lCleanup) {
1017
- return domEventsInfo;
1011
+ _truncate(record) {
1012
+ while (record !== null) {
1013
+ const nextRecord = record._next;
1014
+ this._addToRemovals(this._unlink(record));
1015
+ record = nextRecord;
1016
+ }
1017
+ if (this._unlinkedRecords !== null) {
1018
+ this._unlinkedRecords.clear();
1019
+ }
1020
+ if (this._additionsTail !== null) {
1021
+ this._additionsTail._nextAdded = null;
1022
+ }
1023
+ if (this._movesTail !== null) {
1024
+ this._movesTail._nextMoved = null;
1025
+ }
1026
+ if (this._itTail !== null) {
1027
+ this._itTail._next = null;
1028
+ }
1029
+ if (this._removalsTail !== null) {
1030
+ this._removalsTail._nextRemoved = null;
1031
+ }
1032
+ if (this._identityChangesTail !== null) {
1033
+ this._identityChangesTail._nextIdentityChange = null;
1034
+ }
1018
1035
  }
1019
- for (let i = 0; i < tCleanup.length;) {
1020
- const firstParam = tCleanup[i++];
1021
- const secondParam = tCleanup[i++];
1022
- if (typeof firstParam !== 'string') {
1023
- continue;
1036
+ _reinsertAfter(record, prevRecord, index) {
1037
+ if (this._unlinkedRecords !== null) {
1038
+ this._unlinkedRecords.remove(record);
1024
1039
  }
1025
- const eventType = firstParam;
1026
- if (!isEarlyEventType(eventType)) {
1027
- continue;
1040
+ const prev = record._prevRemoved;
1041
+ const next = record._nextRemoved;
1042
+ if (prev === null) {
1043
+ this._removalsHead = next;
1044
+ } else {
1045
+ prev._nextRemoved = next;
1046
+ }
1047
+ if (next === null) {
1048
+ this._removalsTail = prev;
1049
+ } else {
1050
+ next._prevRemoved = prev;
1051
+ }
1052
+ this._insertAfter(record, prevRecord, index);
1053
+ this._addToMoves(record, index);
1054
+ return record;
1055
+ }
1056
+ _moveAfter(record, prevRecord, index) {
1057
+ this._unlink(record);
1058
+ this._insertAfter(record, prevRecord, index);
1059
+ this._addToMoves(record, index);
1060
+ return record;
1061
+ }
1062
+ _addAfter(record, prevRecord, index) {
1063
+ this._insertAfter(record, prevRecord, index);
1064
+ if (this._additionsTail === null) {
1065
+ this._additionsTail = this._additionsHead = record;
1066
+ } else {
1067
+ this._additionsTail = this._additionsTail._nextAdded = record;
1068
+ }
1069
+ return record;
1070
+ }
1071
+ _insertAfter(record, prevRecord, index) {
1072
+ const next = prevRecord === null ? this._itHead : prevRecord._next;
1073
+ record._next = next;
1074
+ record._prev = prevRecord;
1075
+ if (next === null) {
1076
+ this._itTail = record;
1077
+ } else {
1078
+ next._prev = record;
1079
+ }
1080
+ if (prevRecord === null) {
1081
+ this._itHead = record;
1082
+ } else {
1083
+ prevRecord._next = record;
1084
+ }
1085
+ if (this._linkedRecords === null) {
1086
+ this._linkedRecords = new _DuplicateMap();
1087
+ }
1088
+ this._linkedRecords.put(record);
1089
+ record.currentIndex = index;
1090
+ return record;
1091
+ }
1092
+ _remove(record) {
1093
+ return this._addToRemovals(this._unlink(record));
1094
+ }
1095
+ _unlink(record) {
1096
+ if (this._linkedRecords !== null) {
1097
+ this._linkedRecords.remove(record);
1028
1098
  }
1029
- if (isCaptureEventType(eventType)) {
1030
- eventTypesToReplay.capture.add(eventType);
1099
+ const prev = record._prev;
1100
+ const next = record._next;
1101
+ if (prev === null) {
1102
+ this._itHead = next;
1031
1103
  } else {
1032
- eventTypesToReplay.regular.add(eventType);
1033
- }
1034
- const listenerElement = unwrapRNode(lView[secondParam]);
1035
- i++;
1036
- const useCaptureOrIndx = tCleanup[i++];
1037
- const isDomEvent = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0;
1038
- if (!isDomEvent) {
1039
- continue;
1104
+ prev._next = next;
1040
1105
  }
1041
- if (!domEventsInfo.has(listenerElement)) {
1042
- domEventsInfo.set(listenerElement, [eventType]);
1106
+ if (next === null) {
1107
+ this._itTail = prev;
1043
1108
  } else {
1044
- domEventsInfo.get(listenerElement).push(eventType);
1109
+ next._prev = prev;
1045
1110
  }
1111
+ return record;
1046
1112
  }
1047
- return domEventsInfo;
1048
- }
1049
- function invokeRegisteredReplayListeners(injector, event, currentTarget) {
1050
- const blockName = (currentTarget && currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE)) ?? '';
1051
- if (/d\d+/.test(blockName)) {
1052
- hydrateAndInvokeBlockListeners(blockName, injector, event, currentTarget);
1053
- } else if (event.eventPhase === EventPhase.REPLAY) {
1054
- invokeListeners(event, currentTarget);
1055
- }
1056
- }
1057
- function hydrateAndInvokeBlockListeners(blockName, injector, event, currentTarget) {
1058
- const queue = injector.get(EVENT_REPLAY_QUEUE);
1059
- queue.push({
1060
- event,
1061
- currentTarget
1062
- });
1063
- triggerHydrationFromBlockName(injector, blockName, createReplayQueuedBlockEventsFn(queue));
1064
- }
1065
- function createReplayQueuedBlockEventsFn(queue) {
1066
- return hydratedBlocks => {
1067
- const hydrated = new Set(hydratedBlocks);
1068
- const newQueue = [];
1069
- for (let {
1070
- event,
1071
- currentTarget
1072
- } of queue) {
1073
- const blockName = currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE);
1074
- if (hydrated.has(blockName)) {
1075
- invokeListeners(event, currentTarget);
1076
- } else {
1077
- newQueue.push({
1078
- event,
1079
- currentTarget
1080
- });
1081
- }
1113
+ _addToMoves(record, toIndex) {
1114
+ if (record.previousIndex === toIndex) {
1115
+ return record;
1082
1116
  }
1083
- queue.length = 0;
1084
- queue.push(...newQueue);
1085
- };
1086
- }
1087
-
1088
- let isHydrationSupportEnabled = false;
1089
- let isI18nHydrationRuntimeSupportEnabled = false;
1090
- let isIncrementalHydrationRuntimeSupportEnabled = false;
1091
- const APPLICATION_IS_STABLE_TIMEOUT = 10_000;
1092
- function enableHydrationRuntimeSupport() {
1093
- if (!isHydrationSupportEnabled) {
1094
- isHydrationSupportEnabled = true;
1095
- enableRetrieveHydrationInfoImpl();
1096
- enableLocateOrCreateElementNodeImpl();
1097
- enableLocateOrCreateTextNodeImpl();
1098
- enableLocateOrCreateElementContainerNodeImpl();
1099
- enableLocateOrCreateContainerAnchorImpl();
1100
- enableLocateOrCreateContainerRefImpl();
1101
- enableFindMatchingDehydratedViewImpl();
1102
- enableApplyRootElementTransformImpl();
1103
- }
1104
- }
1105
- function enableI18nHydrationRuntimeSupport() {
1106
- if (!isI18nHydrationRuntimeSupportEnabled) {
1107
- isI18nHydrationRuntimeSupportEnabled = true;
1108
- enableLocateOrCreateI18nNodeImpl();
1109
- enablePrepareI18nBlockForHydrationImpl();
1110
- enableClaimDehydratedIcuCaseImpl();
1111
- }
1112
- }
1113
- function enableIncrementalHydrationRuntimeSupport() {
1114
- if (!isIncrementalHydrationRuntimeSupportEnabled) {
1115
- isIncrementalHydrationRuntimeSupportEnabled = true;
1116
- enableRetrieveDeferBlockDataImpl();
1117
- }
1118
- }
1119
- function printHydrationStats(injector) {
1120
- const console = injector.get(Console);
1121
- const message = `Angular hydrated ${ngDevMode.hydratedComponents} component(s) ` + `and ${ngDevMode.hydratedNodes} node(s), ` + `${ngDevMode.componentsSkippedHydration} component(s) were skipped. ` + (isIncrementalHydrationEnabled(injector) ? `${ngDevMode.deferBlocksWithIncrementalHydration} defer block(s) were configured to use incremental hydration. ` : '') + `Learn more at ${DOC_PAGE_BASE_URL}/guide/hydration.`;
1122
- console.log(message);
1123
- }
1124
- function whenStableWithTimeout(appRef) {
1125
- const whenStablePromise = appRef.whenStable();
1126
- if (typeof ngDevMode !== 'undefined' && ngDevMode) {
1127
- const timeoutTime = APPLICATION_IS_STABLE_TIMEOUT;
1128
- const console = appRef.injector.get(Console);
1129
- const ngZone = appRef.injector.get(NgZone);
1130
- const timeoutId = ngZone.runOutsideAngular(() => {
1131
- return setTimeout(() => logWarningOnStableTimedout(timeoutTime, console), timeoutTime);
1132
- });
1133
- whenStablePromise.finally(() => clearTimeout(timeoutId));
1117
+ if (this._movesTail === null) {
1118
+ this._movesTail = this._movesHead = record;
1119
+ } else {
1120
+ this._movesTail = this._movesTail._nextMoved = record;
1121
+ }
1122
+ return record;
1134
1123
  }
1135
- return whenStablePromise;
1136
- }
1137
- const CLIENT_RENDER_MODE_FLAG = 'ngcm';
1138
- function isClientRenderModeEnabled(doc) {
1139
- return (typeof ngServerMode === 'undefined' || !ngServerMode) && doc.body.hasAttribute(CLIENT_RENDER_MODE_FLAG);
1140
- }
1141
- function withDomHydration() {
1142
- const providers = [{
1143
- provide: IS_HYDRATION_DOM_REUSE_ENABLED,
1144
- useFactory: () => {
1145
- let isEnabled = true;
1146
- if (typeof ngServerMode === 'undefined' || !ngServerMode) {
1147
- const transferState = inject(TransferState, {
1148
- optional: true
1149
- });
1150
- isEnabled = !!transferState?.get(NGH_DATA_KEY, null);
1151
- }
1152
- if (isEnabled) {
1153
- performanceMarkFeature('NgHydration');
1154
- }
1155
- return isEnabled;
1124
+ _addToRemovals(record) {
1125
+ if (this._unlinkedRecords === null) {
1126
+ this._unlinkedRecords = new _DuplicateMap();
1156
1127
  }
1157
- }, {
1158
- provide: ENVIRONMENT_INITIALIZER,
1159
- useValue: () => {
1160
- setIsI18nHydrationSupportEnabled(false);
1161
- if (typeof ngServerMode !== 'undefined' && ngServerMode) {
1162
- return;
1163
- }
1164
- const doc = inject(DOCUMENT);
1165
- if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
1166
- verifySsrContentsIntegrity(doc);
1167
- enableHydrationRuntimeSupport();
1168
- } else if (typeof ngDevMode !== 'undefined' && ngDevMode && !isClientRenderModeEnabled(doc)) {
1169
- const console = inject(Console);
1170
- const message = formatRuntimeError(-505, 'Angular hydration was requested on the client, but there was no ' + 'serialized information present in the server response, ' + 'thus hydration was not enabled. ' + 'Make sure the `provideClientHydration()` is included into the list ' + 'of providers in the server part of the application configuration.');
1171
- console.warn(message);
1172
- }
1173
- },
1174
- multi: true
1175
- }];
1176
- if (typeof ngServerMode === 'undefined' || !ngServerMode) {
1177
- providers.push({
1178
- provide: PRESERVE_HOST_CONTENT,
1179
- useFactory: () => {
1180
- return inject(IS_HYDRATION_DOM_REUSE_ENABLED);
1181
- }
1182
- }, {
1183
- provide: APP_BOOTSTRAP_LISTENER,
1184
- useFactory: () => {
1185
- const scheduler = inject(ChangeDetectionScheduler);
1186
- if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
1187
- const appRef = inject(ApplicationRef);
1188
- return () => {
1189
- whenStableWithTimeout(appRef).then(() => {
1190
- if (appRef.destroyed) {
1191
- return;
1192
- }
1193
- cleanupDehydratedViews(appRef);
1194
- if (typeof ngDevMode !== 'undefined' && ngDevMode) {
1195
- countBlocksSkippedByHydration(appRef.injector);
1196
- printHydrationStats(appRef.injector);
1197
- }
1198
- scheduler.notify(7);
1199
- });
1200
- };
1201
- }
1202
- return () => {};
1203
- },
1204
- multi: true
1205
- });
1128
+ this._unlinkedRecords.put(record);
1129
+ record.currentIndex = null;
1130
+ record._nextRemoved = null;
1131
+ if (this._removalsTail === null) {
1132
+ this._removalsTail = this._removalsHead = record;
1133
+ record._prevRemoved = null;
1134
+ } else {
1135
+ record._prevRemoved = this._removalsTail;
1136
+ this._removalsTail = this._removalsTail._nextRemoved = record;
1137
+ }
1138
+ return record;
1206
1139
  }
1207
- return makeEnvironmentProviders(providers);
1208
- }
1209
- function withI18nSupport() {
1210
- return [{
1211
- provide: IS_I18N_HYDRATION_ENABLED,
1212
- useFactory: () => inject(IS_HYDRATION_DOM_REUSE_ENABLED)
1213
- }, {
1214
- provide: ENVIRONMENT_INITIALIZER,
1215
- useValue: () => {
1216
- if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
1217
- enableI18nHydrationRuntimeSupport();
1218
- setIsI18nHydrationSupportEnabled(true);
1219
- performanceMarkFeature('NgI18nHydration');
1220
- }
1221
- },
1222
- multi: true
1223
- }];
1224
- }
1225
- function withIncrementalHydration() {
1226
- const providers = [withEventReplay(), {
1227
- provide: IS_INCREMENTAL_HYDRATION_ENABLED,
1228
- useValue: true
1229
- }, {
1230
- provide: DEHYDRATED_BLOCK_REGISTRY,
1231
- useClass: DehydratedBlockRegistry
1232
- }, {
1233
- provide: ENVIRONMENT_INITIALIZER,
1234
- useValue: () => {
1235
- enableIncrementalHydrationRuntimeSupport();
1236
- performanceMarkFeature('NgIncrementalHydration');
1237
- },
1238
- multi: true
1239
- }];
1240
- if (typeof ngServerMode === 'undefined' || !ngServerMode) {
1241
- providers.push({
1242
- provide: APP_BOOTSTRAP_LISTENER,
1243
- useFactory: () => {
1244
- const injector = inject(Injector);
1245
- const doc = inject(DOCUMENT);
1246
- return () => {
1247
- const deferBlockData = processBlockData(injector);
1248
- const commentsByBlockId = gatherDeferBlocksCommentNodes(doc, doc.body);
1249
- processAndInitTriggers(injector, deferBlockData, commentsByBlockId);
1250
- appendDeferBlocksToJSActionMap(doc, injector);
1251
- };
1252
- },
1253
- multi: true
1254
- });
1140
+ _addIdentityChange(record, item) {
1141
+ record.item = item;
1142
+ if (this._identityChangesTail === null) {
1143
+ this._identityChangesTail = this._identityChangesHead = record;
1144
+ } else {
1145
+ this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;
1146
+ }
1147
+ return record;
1255
1148
  }
1256
- return providers;
1257
1149
  }
1258
- function logWarningOnStableTimedout(time, console) {
1259
- const message = `Angular hydration expected the ApplicationRef.isStable() to emit \`true\`, but it ` + `didn't happen within ${time}ms. Angular hydration logic depends on the application becoming stable ` + `as a signal to complete hydration process.`;
1260
- console.warn(formatRuntimeError(-506, message));
1150
+ class IterableChangeRecord_ {
1151
+ item;
1152
+ trackById;
1153
+ currentIndex = null;
1154
+ previousIndex = null;
1155
+ _nextPrevious = null;
1156
+ _prev = null;
1157
+ _next = null;
1158
+ _prevDup = null;
1159
+ _nextDup = null;
1160
+ _prevRemoved = null;
1161
+ _nextRemoved = null;
1162
+ _nextAdded = null;
1163
+ _nextMoved = null;
1164
+ _nextIdentityChange = null;
1165
+ constructor(item, trackById) {
1166
+ this.item = item;
1167
+ this.trackById = trackById;
1168
+ }
1261
1169
  }
1262
-
1263
- const STABILITY_WARNING_THRESHOLD = APPLICATION_IS_STABLE_TIMEOUT - 1_000;
1264
- class DebugTaskTrackerImpl {
1265
- openTasks = new Map();
1266
- add(taskId) {
1267
- this.openTasks.set(taskId, new Error('Task stack tracking error'));
1170
+ class _DuplicateItemRecordList {
1171
+ _head = null;
1172
+ _tail = null;
1173
+ add(record) {
1174
+ if (this._head === null) {
1175
+ this._head = this._tail = record;
1176
+ record._nextDup = null;
1177
+ record._prevDup = null;
1178
+ } else {
1179
+ this._tail._nextDup = record;
1180
+ record._prevDup = this._tail;
1181
+ record._nextDup = null;
1182
+ this._tail = record;
1183
+ }
1268
1184
  }
1269
- remove(taskId) {
1270
- this.openTasks.delete(taskId);
1185
+ get(trackById, atOrAfterIndex) {
1186
+ let record;
1187
+ for (record = this._head; record !== null; record = record._nextDup) {
1188
+ if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) && Object.is(record.trackById, trackById)) {
1189
+ return record;
1190
+ }
1191
+ }
1192
+ return null;
1271
1193
  }
1272
- }
1273
- function provideStabilityDebugging() {
1274
- const taskTracker = new DebugTaskTrackerImpl();
1275
- const {
1276
- openTasks
1277
- } = taskTracker;
1278
- return makeEnvironmentProviders([{
1279
- provide: DEBUG_TASK_TRACKER,
1280
- useValue: taskTracker
1281
- }, provideAppInitializer(() => {
1282
- if (typeof ngDevMode === 'undefined' || !ngDevMode) {
1283
- console.warn('Stability debugging utility was provided in production mode. ' + 'This will cause debug code to be included in production bundles. ' + 'If this is intentional because you are debugging stability issues in a production environment, you can ignore this warning.');
1194
+ remove(record) {
1195
+ const prev = record._prevDup;
1196
+ const next = record._nextDup;
1197
+ if (prev === null) {
1198
+ this._head = next;
1199
+ } else {
1200
+ prev._nextDup = next;
1284
1201
  }
1285
- const ngZone = inject(NgZone);
1286
- const applicationRef = inject(ApplicationRef);
1287
- let _taskTrackingZone = null;
1288
- if (typeof Zone !== 'undefined') {
1289
- ngZone.run(() => {
1290
- _taskTrackingZone = Zone.current.get('TaskTrackingZone');
1291
- });
1202
+ if (next === null) {
1203
+ this._tail = prev;
1204
+ } else {
1205
+ next._prevDup = prev;
1292
1206
  }
1293
- ngZone.runOutsideAngular(() => {
1294
- const timeoutId = setTimeout(() => {
1295
- console.debug(`---- Application did not stabilize within ${STABILITY_WARNING_THRESHOLD / 1000} seconds ----`);
1296
- if (typeof Zone !== 'undefined' && !_taskTrackingZone) {
1297
- console.info('Zone.js is present but no TaskTrackingZone found. To enable better debugging of tasks in the Angular Zone, ' + 'import "zone.js/plugins/task-tracking" in your application.');
1298
- }
1299
- if (_taskTrackingZone?.macroTasks?.length) {
1300
- console.group('Macrotasks keeping Angular Zone unstable:');
1301
- for (const t of _taskTrackingZone?.macroTasks ?? []) {
1302
- console.debug(t.creationLocation.stack);
1303
- }
1304
- console.groupEnd();
1305
- }
1306
- console.group('PendingTasks keeping application unstable:');
1307
- for (const error of openTasks.values()) {
1308
- console.debug(error.stack);
1309
- }
1310
- console.groupEnd();
1311
- }, STABILITY_WARNING_THRESHOLD);
1312
- applicationRef.whenStable().then(() => {
1313
- clearTimeout(timeoutId);
1314
- });
1315
- });
1316
- })]);
1317
- }
1318
-
1319
- function getModuleFactory(id) {
1320
- const type = getRegisteredNgModuleType(id);
1321
- if (!type) throw noModuleError(id);
1322
- return new NgModuleFactory(type);
1323
- }
1324
- function getNgModuleById(id) {
1325
- const type = getRegisteredNgModuleType(id);
1326
- if (!type) throw noModuleError(id);
1327
- return type;
1328
- }
1329
- function noModuleError(id) {
1330
- return new RuntimeError(920, ngDevMode && `No module with ID ${id} loaded`);
1331
- }
1332
-
1333
- class ChangeDetectorRef {
1334
- static __NG_ELEMENT_ID__ = injectChangeDetectorRef;
1207
+ return this._head === null;
1208
+ }
1335
1209
  }
1336
- function injectChangeDetectorRef(flags) {
1337
- return createViewRef(getCurrentTNode(), getLView(), (flags & 16) === 16);
1210
+ class _DuplicateMap {
1211
+ map = new Map();
1212
+ put(record) {
1213
+ const key = record.trackById;
1214
+ let duplicates = this.map.get(key);
1215
+ if (!duplicates) {
1216
+ duplicates = new _DuplicateItemRecordList();
1217
+ this.map.set(key, duplicates);
1218
+ }
1219
+ duplicates.add(record);
1220
+ }
1221
+ get(trackById, atOrAfterIndex) {
1222
+ const key = trackById;
1223
+ const recordList = this.map.get(key);
1224
+ return recordList ? recordList.get(trackById, atOrAfterIndex) : null;
1225
+ }
1226
+ remove(record) {
1227
+ const key = record.trackById;
1228
+ const recordList = this.map.get(key);
1229
+ if (recordList.remove(record)) {
1230
+ this.map.delete(key);
1231
+ }
1232
+ return record;
1233
+ }
1234
+ get isEmpty() {
1235
+ return this.map.size === 0;
1236
+ }
1237
+ clear() {
1238
+ this.map.clear();
1239
+ }
1338
1240
  }
1339
- function createViewRef(tNode, lView, isPipe) {
1340
- if (isComponentHost(tNode) && !isPipe) {
1341
- const componentView = getComponentLViewByIndex(tNode.index, lView);
1342
- return new ViewRef$1(componentView, componentView);
1343
- } else if (tNode.type & (3 | 12 | 32 | 128)) {
1344
- const hostComponentView = lView[DECLARATION_COMPONENT_VIEW];
1345
- return new ViewRef$1(hostComponentView, lView);
1241
+ function getPreviousIndex(item, addRemoveOffset, moveOffsets) {
1242
+ const previousIndex = item.previousIndex;
1243
+ if (previousIndex === null) return previousIndex;
1244
+ let moveOffset = 0;
1245
+ if (moveOffsets && previousIndex < moveOffsets.length) {
1246
+ moveOffset = moveOffsets[previousIndex];
1346
1247
  }
1347
- return null;
1248
+ return previousIndex + addRemoveOffset + moveOffset;
1348
1249
  }
1349
1250
 
1350
- class ViewRef extends ChangeDetectorRef {}
1351
- class EmbeddedViewRef extends ViewRef {}
1352
-
1353
- class DefaultIterableDifferFactory {
1251
+ class DefaultKeyValueDifferFactory {
1354
1252
  supports(obj) {
1355
- return isListLikeIterable(obj);
1253
+ return obj instanceof Map || isJsObject(obj);
1356
1254
  }
1357
- create(trackByFn) {
1358
- return new DefaultIterableDiffer(trackByFn);
1255
+ create() {
1256
+ return new DefaultKeyValueDiffer();
1359
1257
  }
1360
1258
  }
1361
- const trackByIdentity = (index, item) => item;
1362
- class DefaultIterableDiffer {
1363
- length = 0;
1364
- collection;
1365
- _linkedRecords = null;
1366
- _unlinkedRecords = null;
1367
- _previousItHead = null;
1368
- _itHead = null;
1369
- _itTail = null;
1259
+ class DefaultKeyValueDiffer {
1260
+ _records = new Map();
1261
+ _mapHead = null;
1262
+ _appendAfter = null;
1263
+ _previousMapHead = null;
1264
+ _changesHead = null;
1265
+ _changesTail = null;
1370
1266
  _additionsHead = null;
1371
1267
  _additionsTail = null;
1372
- _movesHead = null;
1373
- _movesTail = null;
1374
1268
  _removalsHead = null;
1375
- _removalsTail = null;
1376
- _identityChangesHead = null;
1377
- _identityChangesTail = null;
1378
- _trackByFn;
1379
- constructor(trackByFn) {
1380
- this._trackByFn = trackByFn || trackByIdentity;
1381
- }
1382
- forEachItem(fn) {
1383
- let record;
1384
- for (record = this._itHead; record !== null; record = record._next) {
1385
- fn(record);
1386
- }
1387
- }
1388
- forEachOperation(fn) {
1389
- let nextIt = this._itHead;
1390
- let nextRemove = this._removalsHead;
1391
- let addRemoveOffset = 0;
1392
- let moveOffsets = null;
1393
- while (nextIt || nextRemove) {
1394
- const record = !nextRemove || nextIt && nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ? nextIt : nextRemove;
1395
- const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);
1396
- const currentIndex = record.currentIndex;
1397
- if (record === nextRemove) {
1398
- addRemoveOffset--;
1399
- nextRemove = nextRemove._nextRemoved;
1400
- } else {
1401
- nextIt = nextIt._next;
1402
- if (record.previousIndex == null) {
1403
- addRemoveOffset++;
1404
- } else {
1405
- if (!moveOffsets) moveOffsets = [];
1406
- const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;
1407
- const localCurrentIndex = currentIndex - addRemoveOffset;
1408
- if (localMovePreviousIndex != localCurrentIndex) {
1409
- for (let i = 0; i < localMovePreviousIndex; i++) {
1410
- const offset = i < moveOffsets.length ? moveOffsets[i] : moveOffsets[i] = 0;
1411
- const index = offset + i;
1412
- if (localCurrentIndex <= index && index < localMovePreviousIndex) {
1413
- moveOffsets[i] = offset + 1;
1414
- }
1415
- }
1416
- const previousIndex = record.previousIndex;
1417
- moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;
1418
- }
1419
- }
1420
- }
1421
- if (adjPreviousIndex !== currentIndex) {
1422
- fn(record, adjPreviousIndex, currentIndex);
1423
- }
1424
- }
1269
+ get isDirty() {
1270
+ return this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null;
1425
1271
  }
1426
- forEachPreviousItem(fn) {
1272
+ forEachItem(fn) {
1427
1273
  let record;
1428
- for (record = this._previousItHead; record !== null; record = record._nextPrevious) {
1274
+ for (record = this._mapHead; record !== null; record = record._next) {
1429
1275
  fn(record);
1430
1276
  }
1431
1277
  }
1432
- forEachAddedItem(fn) {
1278
+ forEachPreviousItem(fn) {
1433
1279
  let record;
1434
- for (record = this._additionsHead; record !== null; record = record._nextAdded) {
1280
+ for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {
1435
1281
  fn(record);
1436
1282
  }
1437
1283
  }
1438
- forEachMovedItem(fn) {
1284
+ forEachChangedItem(fn) {
1439
1285
  let record;
1440
- for (record = this._movesHead; record !== null; record = record._nextMoved) {
1286
+ for (record = this._changesHead; record !== null; record = record._nextChanged) {
1441
1287
  fn(record);
1442
1288
  }
1443
1289
  }
1444
- forEachRemovedItem(fn) {
1290
+ forEachAddedItem(fn) {
1445
1291
  let record;
1446
- for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
1292
+ for (record = this._additionsHead; record !== null; record = record._nextAdded) {
1447
1293
  fn(record);
1448
1294
  }
1449
1295
  }
1450
- forEachIdentityChange(fn) {
1296
+ forEachRemovedItem(fn) {
1451
1297
  let record;
1452
- for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {
1298
+ for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
1453
1299
  fn(record);
1454
1300
  }
1455
1301
  }
1456
- diff(collection) {
1457
- if (collection == null) collection = [];
1458
- if (!isListLikeIterable(collection)) {
1459
- throw new RuntimeError(900, ngDevMode && `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);
1460
- }
1461
- if (this.check(collection)) {
1462
- return this;
1463
- } else {
1464
- return null;
1302
+ diff(map) {
1303
+ if (!map) {
1304
+ map = new Map();
1305
+ } else if (!(map instanceof Map || isJsObject(map))) {
1306
+ throw new RuntimeError(900, ngDevMode && `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);
1465
1307
  }
1308
+ return this.check(map) ? this : null;
1466
1309
  }
1467
- onDestroy() {}
1468
- check(collection) {
1310
+ check(map) {
1469
1311
  this._reset();
1470
- let record = this._itHead;
1471
- let mayBeDirty = false;
1472
- let index;
1473
- let item;
1474
- let itemTrackBy;
1475
- if (Array.isArray(collection)) {
1476
- this.length = collection.length;
1477
- for (let index = 0; index < this.length; index++) {
1478
- item = collection[index];
1479
- itemTrackBy = this._trackByFn(index, item);
1480
- if (record === null || !Object.is(record.trackById, itemTrackBy)) {
1481
- record = this._mismatch(record, item, itemTrackBy, index);
1482
- mayBeDirty = true;
1483
- } else {
1484
- if (mayBeDirty) {
1485
- record = this._verifyReinsertion(record, item, itemTrackBy, index);
1486
- }
1487
- if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
1488
- }
1489
- record = record._next;
1312
+ let insertBefore = this._mapHead;
1313
+ this._appendAfter = null;
1314
+ this._forEach(map, (value, key) => {
1315
+ if (insertBefore && insertBefore.key === key) {
1316
+ this._maybeAddToChanges(insertBefore, value);
1317
+ this._appendAfter = insertBefore;
1318
+ insertBefore = insertBefore._next;
1319
+ } else {
1320
+ const record = this._getOrCreateRecordForKey(key, value);
1321
+ insertBefore = this._insertBeforeOrAppend(insertBefore, record);
1490
1322
  }
1491
- } else {
1492
- index = 0;
1493
- iterateListLike(collection, item => {
1494
- itemTrackBy = this._trackByFn(index, item);
1495
- if (record === null || !Object.is(record.trackById, itemTrackBy)) {
1496
- record = this._mismatch(record, item, itemTrackBy, index);
1497
- mayBeDirty = true;
1498
- } else {
1499
- if (mayBeDirty) {
1500
- record = this._verifyReinsertion(record, item, itemTrackBy, index);
1501
- }
1502
- if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
1323
+ });
1324
+ if (insertBefore) {
1325
+ if (insertBefore._prev) {
1326
+ insertBefore._prev._next = null;
1327
+ }
1328
+ this._removalsHead = insertBefore;
1329
+ for (let record = insertBefore; record !== null; record = record._nextRemoved) {
1330
+ if (record === this._mapHead) {
1331
+ this._mapHead = null;
1503
1332
  }
1504
- record = record._next;
1505
- index++;
1506
- });
1507
- this.length = index;
1333
+ this._records.delete(record.key);
1334
+ record._nextRemoved = record._next;
1335
+ record.previousValue = record.currentValue;
1336
+ record.currentValue = null;
1337
+ record._prev = null;
1338
+ record._next = null;
1339
+ }
1508
1340
  }
1509
- this._truncate(record);
1510
- this.collection = collection;
1341
+ if (this._changesTail) this._changesTail._nextChanged = null;
1342
+ if (this._additionsTail) this._additionsTail._nextAdded = null;
1511
1343
  return this.isDirty;
1512
1344
  }
1513
- get isDirty() {
1514
- return this._additionsHead !== null || this._movesHead !== null || this._removalsHead !== null || this._identityChangesHead !== null;
1345
+ _insertBeforeOrAppend(before, record) {
1346
+ if (before) {
1347
+ const prev = before._prev;
1348
+ record._next = before;
1349
+ record._prev = prev;
1350
+ before._prev = record;
1351
+ if (prev) {
1352
+ prev._next = record;
1353
+ }
1354
+ if (before === this._mapHead) {
1355
+ this._mapHead = record;
1356
+ }
1357
+ this._appendAfter = before;
1358
+ return before;
1359
+ }
1360
+ if (this._appendAfter) {
1361
+ this._appendAfter._next = record;
1362
+ record._prev = this._appendAfter;
1363
+ } else {
1364
+ this._mapHead = record;
1365
+ }
1366
+ this._appendAfter = record;
1367
+ return null;
1368
+ }
1369
+ _getOrCreateRecordForKey(key, value) {
1370
+ if (this._records.has(key)) {
1371
+ const record = this._records.get(key);
1372
+ this._maybeAddToChanges(record, value);
1373
+ const prev = record._prev;
1374
+ const next = record._next;
1375
+ if (prev) {
1376
+ prev._next = next;
1377
+ }
1378
+ if (next) {
1379
+ next._prev = prev;
1380
+ }
1381
+ record._next = null;
1382
+ record._prev = null;
1383
+ return record;
1384
+ }
1385
+ const record = new KeyValueChangeRecord_(key);
1386
+ this._records.set(key, record);
1387
+ record.currentValue = value;
1388
+ this._addToAdditions(record);
1389
+ return record;
1515
1390
  }
1516
1391
  _reset() {
1517
1392
  if (this.isDirty) {
1518
1393
  let record;
1519
- for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {
1394
+ this._previousMapHead = this._mapHead;
1395
+ for (record = this._previousMapHead; record !== null; record = record._next) {
1520
1396
  record._nextPrevious = record._next;
1521
1397
  }
1522
- for (record = this._additionsHead; record !== null; record = record._nextAdded) {
1523
- record.previousIndex = record.currentIndex;
1398
+ for (record = this._changesHead; record !== null; record = record._nextChanged) {
1399
+ record.previousValue = record.currentValue;
1524
1400
  }
1525
- this._additionsHead = this._additionsTail = null;
1526
- for (record = this._movesHead; record !== null; record = record._nextMoved) {
1527
- record.previousIndex = record.currentIndex;
1401
+ for (record = this._additionsHead; record != null; record = record._nextAdded) {
1402
+ record.previousValue = record.currentValue;
1528
1403
  }
1529
- this._movesHead = this._movesTail = null;
1530
- this._removalsHead = this._removalsTail = null;
1531
- this._identityChangesHead = this._identityChangesTail = null;
1404
+ this._changesHead = this._changesTail = null;
1405
+ this._additionsHead = this._additionsTail = null;
1406
+ this._removalsHead = null;
1532
1407
  }
1533
1408
  }
1534
- _mismatch(record, item, itemTrackBy, index) {
1535
- let previousRecord;
1536
- if (record === null) {
1537
- previousRecord = this._itTail;
1409
+ _maybeAddToChanges(record, newValue) {
1410
+ if (!Object.is(newValue, record.currentValue)) {
1411
+ record.previousValue = record.currentValue;
1412
+ record.currentValue = newValue;
1413
+ this._addToChanges(record);
1414
+ }
1415
+ }
1416
+ _addToAdditions(record) {
1417
+ if (this._additionsHead === null) {
1418
+ this._additionsHead = this._additionsTail = record;
1538
1419
  } else {
1539
- previousRecord = record._prev;
1540
- this._remove(record);
1420
+ this._additionsTail._nextAdded = record;
1421
+ this._additionsTail = record;
1541
1422
  }
1542
- record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
1543
- if (record !== null) {
1544
- if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
1545
- this._reinsertAfter(record, previousRecord, index);
1423
+ }
1424
+ _addToChanges(record) {
1425
+ if (this._changesHead === null) {
1426
+ this._changesHead = this._changesTail = record;
1546
1427
  } else {
1547
- record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);
1548
- if (record !== null) {
1549
- if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
1550
- this._moveAfter(record, previousRecord, index);
1551
- } else {
1552
- record = this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);
1428
+ this._changesTail._nextChanged = record;
1429
+ this._changesTail = record;
1430
+ }
1431
+ }
1432
+ _forEach(obj, fn) {
1433
+ if (obj instanceof Map) {
1434
+ obj.forEach(fn);
1435
+ } else {
1436
+ Object.keys(obj).forEach(k => fn(obj[k], k));
1437
+ }
1438
+ }
1439
+ }
1440
+ class KeyValueChangeRecord_ {
1441
+ key;
1442
+ previousValue = null;
1443
+ currentValue = null;
1444
+ _nextPrevious = null;
1445
+ _next = null;
1446
+ _prev = null;
1447
+ _nextAdded = null;
1448
+ _nextRemoved = null;
1449
+ _nextChanged = null;
1450
+ constructor(key) {
1451
+ this.key = key;
1452
+ }
1453
+ }
1454
+
1455
+ function defaultIterableDiffersFactory() {
1456
+ return new IterableDiffers([new DefaultIterableDifferFactory()]);
1457
+ }
1458
+ class IterableDiffers {
1459
+ factories;
1460
+ static ɵprov =
1461
+ /* @__PURE__ */
1462
+ __defineInjectable({
1463
+ token: IterableDiffers,
1464
+ providedIn: 'root',
1465
+ factory: defaultIterableDiffersFactory
1466
+ });
1467
+ constructor(factories) {
1468
+ this.factories = factories;
1469
+ }
1470
+ static create(factories, parent) {
1471
+ if (parent != null) {
1472
+ const copied = parent.factories.slice();
1473
+ factories = factories.concat(copied);
1474
+ }
1475
+ return new IterableDiffers(factories);
1476
+ }
1477
+ static extend(factories) {
1478
+ return {
1479
+ provide: IterableDiffers,
1480
+ useFactory: () => {
1481
+ const parent = inject(IterableDiffers, {
1482
+ optional: true,
1483
+ skipSelf: true
1484
+ });
1485
+ return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());
1553
1486
  }
1487
+ };
1488
+ }
1489
+ find(iterable) {
1490
+ const factory = this.factories.find(f => f.supports(iterable));
1491
+ if (factory != null) {
1492
+ return factory;
1493
+ } else {
1494
+ throw new RuntimeError(901, ngDevMode && `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);
1554
1495
  }
1555
- return record;
1556
1496
  }
1557
- _verifyReinsertion(record, item, itemTrackBy, index) {
1558
- let reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
1559
- if (reinsertRecord !== null) {
1560
- record = this._reinsertAfter(reinsertRecord, record._prev, index);
1561
- } else if (record.currentIndex != index) {
1562
- record.currentIndex = index;
1563
- this._addToMoves(record, index);
1497
+ }
1498
+ function getTypeNameForDebugging(type) {
1499
+ return type['name'] || typeof type;
1500
+ }
1501
+
1502
+ function defaultKeyValueDiffersFactory() {
1503
+ return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);
1504
+ }
1505
+ class KeyValueDiffers {
1506
+ static ɵprov =
1507
+ /* @__PURE__ */
1508
+ __defineInjectable({
1509
+ token: KeyValueDiffers,
1510
+ providedIn: 'root',
1511
+ factory: defaultKeyValueDiffersFactory
1512
+ });
1513
+ factories;
1514
+ constructor(factories) {
1515
+ this.factories = factories;
1516
+ }
1517
+ static create(factories, parent) {
1518
+ if (parent) {
1519
+ const copied = parent.factories.slice();
1520
+ factories = factories.concat(copied);
1564
1521
  }
1565
- return record;
1522
+ return new KeyValueDiffers(factories);
1566
1523
  }
1567
- _truncate(record) {
1568
- while (record !== null) {
1569
- const nextRecord = record._next;
1570
- this._addToRemovals(this._unlink(record));
1571
- record = nextRecord;
1524
+ static extend(factories) {
1525
+ return {
1526
+ provide: KeyValueDiffers,
1527
+ useFactory: () => {
1528
+ const parent = inject(KeyValueDiffers, {
1529
+ optional: true,
1530
+ skipSelf: true
1531
+ });
1532
+ return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());
1533
+ }
1534
+ };
1535
+ }
1536
+ find(kv) {
1537
+ const factory = this.factories.find(f => f.supports(kv));
1538
+ if (factory) {
1539
+ return factory;
1572
1540
  }
1573
- if (this._unlinkedRecords !== null) {
1574
- this._unlinkedRecords.clear();
1541
+ throw new RuntimeError(901, ngDevMode && `Cannot find a differ supporting object '${kv}'`);
1542
+ }
1543
+ }
1544
+
1545
+ class ChangeDetectorRef {
1546
+ static __NG_ELEMENT_ID__ = injectChangeDetectorRef;
1547
+ }
1548
+ function injectChangeDetectorRef(flags) {
1549
+ return createViewRef(getCurrentTNode(), getLView(), (flags & 16) === 16);
1550
+ }
1551
+ function createViewRef(tNode, lView, isPipe) {
1552
+ if (isComponentHost(tNode) && !isPipe) {
1553
+ const componentView = getComponentLViewByIndex(tNode.index, lView);
1554
+ return new ViewRef$1(componentView, componentView);
1555
+ } else if (tNode.type & (3 | 12 | 32 | 128)) {
1556
+ const hostComponentView = lView[DECLARATION_COMPONENT_VIEW];
1557
+ return new ViewRef$1(hostComponentView, lView);
1558
+ }
1559
+ return null;
1560
+ }
1561
+
1562
+ const keyValDiff = [new DefaultKeyValueDifferFactory()];
1563
+ const iterableDiff = [new DefaultIterableDifferFactory()];
1564
+ const defaultIterableDiffers = new IterableDiffers(iterableDiff);
1565
+ const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
1566
+
1567
+ function exhaustiveCheckNoChangesInterval(interval) {
1568
+ return provideEnvironmentInitializer(() => {
1569
+ const applicationRef = inject(ApplicationRef);
1570
+ const errorHandler = inject(ErrorHandler);
1571
+ const scheduler = inject(ChangeDetectionSchedulerImpl);
1572
+ const ngZone = inject(NgZone);
1573
+ function scheduleCheckNoChanges() {
1574
+ ngZone.runOutsideAngular(() => {
1575
+ setTimeout(() => {
1576
+ if (applicationRef.destroyed) {
1577
+ return;
1578
+ }
1579
+ if (scheduler.pendingRenderTaskId || scheduler.runningTick) {
1580
+ scheduleCheckNoChanges();
1581
+ return;
1582
+ }
1583
+ for (const view of applicationRef.allViews) {
1584
+ try {
1585
+ checkNoChangesInternal(view._lView, true);
1586
+ } catch (e) {
1587
+ errorHandler.handleError(e);
1588
+ }
1589
+ }
1590
+ scheduleCheckNoChanges();
1591
+ }, interval);
1592
+ });
1575
1593
  }
1576
- if (this._additionsTail !== null) {
1577
- this._additionsTail._nextAdded = null;
1594
+ scheduleCheckNoChanges();
1595
+ });
1596
+ }
1597
+
1598
+ function provideCheckNoChangesConfig(options) {
1599
+ return makeEnvironmentProviders(typeof ngDevMode === 'undefined' || ngDevMode ? [{
1600
+ provide: UseExhaustiveCheckNoChanges,
1601
+ useValue: options.exhaustive
1602
+ }, options?.interval !== undefined ? exhaustiveCheckNoChangesInterval(options.interval) : []] : []);
1603
+ }
1604
+
1605
+ class NgZoneChangeDetectionScheduler {
1606
+ zone = inject(NgZone);
1607
+ changeDetectionScheduler = inject(ChangeDetectionScheduler);
1608
+ applicationRef = inject(ApplicationRef);
1609
+ applicationErrorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER);
1610
+ _onMicrotaskEmptySubscription;
1611
+ initialize() {
1612
+ if (this._onMicrotaskEmptySubscription) {
1613
+ return;
1578
1614
  }
1579
- if (this._movesTail !== null) {
1580
- this._movesTail._nextMoved = null;
1615
+ this._onMicrotaskEmptySubscription = this.zone.onMicrotaskEmpty.subscribe({
1616
+ next: () => {
1617
+ if (this.changeDetectionScheduler.runningTick) {
1618
+ return;
1619
+ }
1620
+ this.zone.run(() => {
1621
+ try {
1622
+ this.applicationRef.dirtyFlags |= 1;
1623
+ this.applicationRef._tick();
1624
+ } catch (e) {
1625
+ this.applicationErrorHandler(e);
1626
+ }
1627
+ });
1628
+ }
1629
+ });
1630
+ }
1631
+ ngOnDestroy() {
1632
+ this._onMicrotaskEmptySubscription?.unsubscribe();
1633
+ }
1634
+ static ɵfac = function NgZoneChangeDetectionScheduler_Factory(__ngFactoryType__) {
1635
+ return new (__ngFactoryType__ || NgZoneChangeDetectionScheduler)();
1636
+ };
1637
+ static ɵprov = /*@__PURE__*/__defineInjectable({
1638
+ token: NgZoneChangeDetectionScheduler,
1639
+ factory: NgZoneChangeDetectionScheduler.ɵfac,
1640
+ providedIn: 'root'
1641
+ });
1642
+ }
1643
+ (() => {
1644
+ (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgZoneChangeDetectionScheduler, [{
1645
+ type: Injectable,
1646
+ args: [{
1647
+ providedIn: 'root'
1648
+ }]
1649
+ }], null, null);
1650
+ })();
1651
+ const PROVIDED_NG_ZONE = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'provideZoneChangeDetection token' : '', {
1652
+ factory: () => false
1653
+ });
1654
+ function internalProvideZoneChangeDetection({
1655
+ ngZoneFactory,
1656
+ scheduleInRootZone
1657
+ }) {
1658
+ ngZoneFactory ??= () => new NgZone({
1659
+ ...getNgZoneOptions(),
1660
+ scheduleInRootZone
1661
+ });
1662
+ return [{
1663
+ provide: ZONELESS_ENABLED,
1664
+ useValue: false
1665
+ }, {
1666
+ provide: NgZone,
1667
+ useFactory: ngZoneFactory
1668
+ }, {
1669
+ provide: ENVIRONMENT_INITIALIZER,
1670
+ multi: true,
1671
+ useFactory: () => {
1672
+ const ngZoneChangeDetectionScheduler = inject(NgZoneChangeDetectionScheduler, {
1673
+ optional: true
1674
+ });
1675
+ if ((typeof ngDevMode === 'undefined' || ngDevMode) && ngZoneChangeDetectionScheduler === null) {
1676
+ throw new RuntimeError(402, `A required Injectable was not found in the dependency injection tree. ` + 'If you are bootstrapping an NgModule, make sure that the `BrowserModule` is imported.');
1677
+ }
1678
+ return () => ngZoneChangeDetectionScheduler.initialize();
1581
1679
  }
1582
- if (this._itTail !== null) {
1583
- this._itTail._next = null;
1680
+ }, {
1681
+ provide: ENVIRONMENT_INITIALIZER,
1682
+ multi: true,
1683
+ useFactory: () => {
1684
+ const service = inject(ZoneStablePendingTask);
1685
+ return () => {
1686
+ service.initialize();
1687
+ };
1584
1688
  }
1585
- if (this._removalsTail !== null) {
1586
- this._removalsTail._nextRemoved = null;
1689
+ }, {
1690
+ provide: SCHEDULE_IN_ROOT_ZONE,
1691
+ useValue: scheduleInRootZone ?? SCHEDULE_IN_ROOT_ZONE_DEFAULT
1692
+ }];
1693
+ }
1694
+ function provideZoneChangeDetection(options) {
1695
+ const scheduleInRootZone = options?.scheduleInRootZone;
1696
+ const zoneProviders = internalProvideZoneChangeDetection({
1697
+ ngZoneFactory: () => {
1698
+ const ngZoneOptions = getNgZoneOptions(options);
1699
+ ngZoneOptions.scheduleInRootZone = scheduleInRootZone;
1700
+ if (ngZoneOptions.shouldCoalesceEventChangeDetection) {
1701
+ performanceMarkFeature('NgZone_CoalesceEvent');
1702
+ }
1703
+ return new NgZone(ngZoneOptions);
1704
+ },
1705
+ scheduleInRootZone
1706
+ });
1707
+ return makeEnvironmentProviders([{
1708
+ provide: PROVIDED_NG_ZONE,
1709
+ useValue: true
1710
+ }, zoneProviders]);
1711
+ }
1712
+ function getNgZoneOptions(options) {
1713
+ return {
1714
+ enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,
1715
+ shouldCoalesceEventChangeDetection: options?.eventCoalescing ?? false,
1716
+ shouldCoalesceRunChangeDetection: options?.runCoalescing ?? false
1717
+ };
1718
+ }
1719
+ class ZoneStablePendingTask {
1720
+ subscription = new Subscription();
1721
+ initialized = false;
1722
+ zone = inject(NgZone);
1723
+ pendingTasks = inject(PendingTasksInternal);
1724
+ initialize() {
1725
+ if (this.initialized) {
1726
+ return;
1587
1727
  }
1588
- if (this._identityChangesTail !== null) {
1589
- this._identityChangesTail._nextIdentityChange = null;
1728
+ this.initialized = true;
1729
+ let task = null;
1730
+ if (!this.zone.isStable && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {
1731
+ task = this.pendingTasks.add();
1590
1732
  }
1733
+ this.zone.runOutsideAngular(() => {
1734
+ this.subscription.add(this.zone.onStable.subscribe(() => {
1735
+ NgZone.assertNotInAngularZone();
1736
+ queueMicrotask(() => {
1737
+ if (task !== null && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {
1738
+ this.pendingTasks.remove(task);
1739
+ task = null;
1740
+ }
1741
+ });
1742
+ }));
1743
+ });
1744
+ this.subscription.add(this.zone.onUnstable.subscribe(() => {
1745
+ NgZone.assertInAngularZone();
1746
+ task ??= this.pendingTasks.add();
1747
+ }));
1591
1748
  }
1592
- _reinsertAfter(record, prevRecord, index) {
1593
- if (this._unlinkedRecords !== null) {
1594
- this._unlinkedRecords.remove(record);
1595
- }
1596
- const prev = record._prevRemoved;
1597
- const next = record._nextRemoved;
1598
- if (prev === null) {
1599
- this._removalsHead = next;
1600
- } else {
1601
- prev._nextRemoved = next;
1602
- }
1603
- if (next === null) {
1604
- this._removalsTail = prev;
1605
- } else {
1606
- next._prevRemoved = prev;
1607
- }
1608
- this._insertAfter(record, prevRecord, index);
1609
- this._addToMoves(record, index);
1610
- return record;
1749
+ ngOnDestroy() {
1750
+ this.subscription.unsubscribe();
1611
1751
  }
1612
- _moveAfter(record, prevRecord, index) {
1613
- this._unlink(record);
1614
- this._insertAfter(record, prevRecord, index);
1615
- this._addToMoves(record, index);
1616
- return record;
1752
+ static ɵfac = function ZoneStablePendingTask_Factory(__ngFactoryType__) {
1753
+ return new (__ngFactoryType__ || ZoneStablePendingTask)();
1754
+ };
1755
+ static ɵprov = /*@__PURE__*/__defineInjectable({
1756
+ token: ZoneStablePendingTask,
1757
+ factory: ZoneStablePendingTask.ɵfac,
1758
+ providedIn: 'root'
1759
+ });
1760
+ }
1761
+ (() => {
1762
+ (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ZoneStablePendingTask, [{
1763
+ type: Injectable,
1764
+ args: [{
1765
+ providedIn: 'root'
1766
+ }]
1767
+ }], null, null);
1768
+ })();
1769
+
1770
+ function compileNgModuleFactory(injector, options, moduleType) {
1771
+ ngDevMode && assertNgModuleType(moduleType);
1772
+ const moduleFactory = new NgModuleFactory(moduleType);
1773
+ if (typeof ngJitMode !== 'undefined' && !ngJitMode) {
1774
+ return Promise.resolve(moduleFactory);
1617
1775
  }
1618
- _addAfter(record, prevRecord, index) {
1619
- this._insertAfter(record, prevRecord, index);
1620
- if (this._additionsTail === null) {
1621
- this._additionsTail = this._additionsHead = record;
1622
- } else {
1623
- this._additionsTail = this._additionsTail._nextAdded = record;
1624
- }
1625
- return record;
1776
+ const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);
1777
+ setJitOptions({
1778
+ defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)),
1779
+ preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces))
1780
+ });
1781
+ if (isComponentResourceResolutionQueueEmpty()) {
1782
+ return Promise.resolve(moduleFactory);
1626
1783
  }
1627
- _insertAfter(record, prevRecord, index) {
1628
- const next = prevRecord === null ? this._itHead : prevRecord._next;
1629
- record._next = next;
1630
- record._prev = prevRecord;
1631
- if (next === null) {
1632
- this._itTail = record;
1633
- } else {
1634
- next._prev = record;
1784
+ const compilerProviders = compilerOptions.flatMap(option => option.providers ?? []);
1785
+ if (compilerProviders.length === 0) {
1786
+ return Promise.resolve(moduleFactory);
1787
+ }
1788
+ const compiler = getCompilerFacade({
1789
+ usage: 0,
1790
+ kind: 'NgModule',
1791
+ type: moduleType
1792
+ });
1793
+ const compilerInjector = Injector.create({
1794
+ providers: compilerProviders
1795
+ });
1796
+ const resourceLoader = compilerInjector.get(compiler.ResourceLoader);
1797
+ return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url))).then(() => moduleFactory);
1798
+ }
1799
+ function _lastDefined(args) {
1800
+ for (let i = args.length - 1; i >= 0; i--) {
1801
+ if (args[i] !== undefined) {
1802
+ return args[i];
1635
1803
  }
1636
- if (prevRecord === null) {
1637
- this._itHead = record;
1638
- } else {
1639
- prevRecord._next = record;
1804
+ }
1805
+ return undefined;
1806
+ }
1807
+
1808
+ const SCAN_DELAY = 200;
1809
+ const OVERSIZED_IMAGE_TOLERANCE = 1200;
1810
+ class ImagePerformanceWarning {
1811
+ window = null;
1812
+ observer = null;
1813
+ options = inject(IMAGE_CONFIG);
1814
+ lcpImageUrl;
1815
+ start() {
1816
+ if (typeof ngServerMode !== 'undefined' && ngServerMode || typeof PerformanceObserver === 'undefined' || this.options?.disableImageSizeWarning && this.options?.disableImageLazyLoadWarning) {
1817
+ return;
1640
1818
  }
1641
- if (this._linkedRecords === null) {
1642
- this._linkedRecords = new _DuplicateMap();
1819
+ this.observer = this.initPerformanceObserver();
1820
+ const doc = getDocument();
1821
+ const win = doc.defaultView;
1822
+ if (win) {
1823
+ this.window = win;
1824
+ const waitToScan = () => {
1825
+ setTimeout(this.scanImages.bind(this), SCAN_DELAY);
1826
+ };
1827
+ const setup = () => {
1828
+ if (doc.readyState === 'complete') {
1829
+ waitToScan();
1830
+ } else {
1831
+ this.window?.addEventListener('load', waitToScan, {
1832
+ once: true
1833
+ });
1834
+ }
1835
+ };
1836
+ if (typeof Zone !== 'undefined') {
1837
+ Zone.root.run(() => setup());
1838
+ } else {
1839
+ setup();
1840
+ }
1643
1841
  }
1644
- this._linkedRecords.put(record);
1645
- record.currentIndex = index;
1646
- return record;
1647
1842
  }
1648
- _remove(record) {
1649
- return this._addToRemovals(this._unlink(record));
1843
+ ngOnDestroy() {
1844
+ this.observer?.disconnect();
1650
1845
  }
1651
- _unlink(record) {
1652
- if (this._linkedRecords !== null) {
1653
- this._linkedRecords.remove(record);
1654
- }
1655
- const prev = record._prev;
1656
- const next = record._next;
1657
- if (prev === null) {
1658
- this._itHead = next;
1659
- } else {
1660
- prev._next = next;
1661
- }
1662
- if (next === null) {
1663
- this._itTail = prev;
1664
- } else {
1665
- next._prev = prev;
1846
+ initPerformanceObserver() {
1847
+ if (typeof PerformanceObserver === 'undefined') {
1848
+ return null;
1666
1849
  }
1667
- return record;
1850
+ const observer = new PerformanceObserver(entryList => {
1851
+ const entries = entryList.getEntries();
1852
+ if (entries.length === 0) return;
1853
+ const lcpElement = entries[entries.length - 1];
1854
+ const imgSrc = lcpElement.element?.src ?? '';
1855
+ if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:')) return;
1856
+ this.lcpImageUrl = imgSrc;
1857
+ });
1858
+ observer.observe({
1859
+ type: 'largest-contentful-paint',
1860
+ buffered: true
1861
+ });
1862
+ return observer;
1668
1863
  }
1669
- _addToMoves(record, toIndex) {
1670
- if (record.previousIndex === toIndex) {
1671
- return record;
1864
+ scanImages() {
1865
+ const images = getDocument().querySelectorAll('img');
1866
+ let lcpElementFound,
1867
+ lcpElementLoadedCorrectly = false;
1868
+ for (let index = 0; index < images.length; index++) {
1869
+ const image = images[index];
1870
+ if (!image) {
1871
+ continue;
1872
+ }
1873
+ if (!this.options?.disableImageSizeWarning) {
1874
+ if (!image.getAttribute('ng-img') && this.isOversized(image)) {
1875
+ logOversizedImageWarning(image.src);
1876
+ }
1877
+ }
1878
+ if (!this.options?.disableImageLazyLoadWarning && this.lcpImageUrl) {
1879
+ if (image.src === this.lcpImageUrl) {
1880
+ lcpElementFound = true;
1881
+ if (image.loading !== 'lazy' || image.getAttribute('ng-img')) {
1882
+ lcpElementLoadedCorrectly = true;
1883
+ }
1884
+ }
1885
+ }
1672
1886
  }
1673
- if (this._movesTail === null) {
1674
- this._movesTail = this._movesHead = record;
1675
- } else {
1676
- this._movesTail = this._movesTail._nextMoved = record;
1887
+ if (lcpElementFound && !lcpElementLoadedCorrectly && this.lcpImageUrl && !this.options?.disableImageLazyLoadWarning) {
1888
+ logLazyLCPWarning(this.lcpImageUrl);
1677
1889
  }
1678
- return record;
1679
1890
  }
1680
- _addToRemovals(record) {
1681
- if (this._unlinkedRecords === null) {
1682
- this._unlinkedRecords = new _DuplicateMap();
1891
+ isOversized(image) {
1892
+ if (!this.window) {
1893
+ return false;
1683
1894
  }
1684
- this._unlinkedRecords.put(record);
1685
- record.currentIndex = null;
1686
- record._nextRemoved = null;
1687
- if (this._removalsTail === null) {
1688
- this._removalsTail = this._removalsHead = record;
1689
- record._prevRemoved = null;
1690
- } else {
1691
- record._prevRemoved = this._removalsTail;
1692
- this._removalsTail = this._removalsTail._nextRemoved = record;
1895
+ const nonOversizedImageExtentions = ['.svg'];
1896
+ const imageSource = (image.src || '').toLowerCase();
1897
+ if (nonOversizedImageExtentions.some(extension => imageSource.endsWith(extension))) {
1898
+ return false;
1693
1899
  }
1694
- return record;
1695
- }
1696
- _addIdentityChange(record, item) {
1697
- record.item = item;
1698
- if (this._identityChangesTail === null) {
1699
- this._identityChangesTail = this._identityChangesHead = record;
1700
- } else {
1701
- this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;
1900
+ const computedStyle = this.window.getComputedStyle(image);
1901
+ let renderedWidth = parseFloat(computedStyle.getPropertyValue('width'));
1902
+ let renderedHeight = parseFloat(computedStyle.getPropertyValue('height'));
1903
+ const boxSizing = computedStyle.getPropertyValue('box-sizing');
1904
+ const objectFit = computedStyle.getPropertyValue('object-fit');
1905
+ if (objectFit === `cover`) {
1906
+ return false;
1702
1907
  }
1703
- return record;
1908
+ if (boxSizing === 'border-box') {
1909
+ const paddingTop = computedStyle.getPropertyValue('padding-top');
1910
+ const paddingRight = computedStyle.getPropertyValue('padding-right');
1911
+ const paddingBottom = computedStyle.getPropertyValue('padding-bottom');
1912
+ const paddingLeft = computedStyle.getPropertyValue('padding-left');
1913
+ renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft);
1914
+ renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom);
1915
+ }
1916
+ const intrinsicWidth = image.naturalWidth;
1917
+ const intrinsicHeight = image.naturalHeight;
1918
+ const recommendedWidth = this.window.devicePixelRatio * renderedWidth;
1919
+ const recommendedHeight = this.window.devicePixelRatio * renderedHeight;
1920
+ const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;
1921
+ const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;
1922
+ return oversizedWidth || oversizedHeight;
1704
1923
  }
1924
+ static ɵfac = function ImagePerformanceWarning_Factory(__ngFactoryType__) {
1925
+ return new (__ngFactoryType__ || ImagePerformanceWarning)();
1926
+ };
1927
+ static ɵprov = /*@__PURE__*/__defineInjectable({
1928
+ token: ImagePerformanceWarning,
1929
+ factory: ImagePerformanceWarning.ɵfac,
1930
+ providedIn: 'root'
1931
+ });
1705
1932
  }
1706
- class IterableChangeRecord_ {
1707
- item;
1708
- trackById;
1709
- currentIndex = null;
1710
- previousIndex = null;
1711
- _nextPrevious = null;
1712
- _prev = null;
1713
- _next = null;
1714
- _prevDup = null;
1715
- _nextDup = null;
1716
- _prevRemoved = null;
1717
- _nextRemoved = null;
1718
- _nextAdded = null;
1719
- _nextMoved = null;
1720
- _nextIdentityChange = null;
1721
- constructor(item, trackById) {
1722
- this.item = item;
1723
- this.trackById = trackById;
1724
- }
1933
+ (() => {
1934
+ (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ImagePerformanceWarning, [{
1935
+ type: Injectable,
1936
+ args: [{
1937
+ providedIn: 'root'
1938
+ }]
1939
+ }], null, null);
1940
+ })();
1941
+ function logLazyLCPWarning(src) {
1942
+ console.warn(formatRuntimeError(-913, `An image with src ${src} is the Largest Contentful Paint (LCP) element ` + `but was given a "loading" value of "lazy", which can negatively impact ` + `application loading performance. This warning can be addressed by ` + `changing the loading value of the LCP image to "eager", or by using the ` + `NgOptimizedImage directive's prioritization utilities. For more ` + `information about addressing or disabling this warning, see ` + `${ERROR_DETAILS_PAGE_BASE_URL}/NG0913`));
1725
1943
  }
1726
- class _DuplicateItemRecordList {
1727
- _head = null;
1728
- _tail = null;
1729
- add(record) {
1730
- if (this._head === null) {
1731
- this._head = this._tail = record;
1732
- record._nextDup = null;
1733
- record._prevDup = null;
1944
+ function logOversizedImageWarning(src) {
1945
+ console.warn(formatRuntimeError(-913, `An image with src ${src} has intrinsic file dimensions much larger than its ` + `rendered size. This can negatively impact application loading performance. ` + `For more information about addressing or disabling this warning, see ` + `${ERROR_DETAILS_PAGE_BASE_URL}/NG0913`));
1946
+ }
1947
+
1948
+ const PLATFORM_DESTROY_LISTENERS = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'PlatformDestroyListeners' : '');
1949
+
1950
+ const ENABLE_ROOT_COMPONENT_BOOTSTRAP = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'ENABLE_ROOT_COMPONENT_BOOTSTRAP' : '');
1951
+ function isApplicationBootstrapConfig(config) {
1952
+ return !config.moduleRef;
1953
+ }
1954
+ function bootstrap(config) {
1955
+ const envInjector = isApplicationBootstrapConfig(config) ? config.r3Injector : config.moduleRef.injector;
1956
+ const ngZone = envInjector.get(NgZone);
1957
+ return ngZone.run(() => {
1958
+ if (isApplicationBootstrapConfig(config)) {
1959
+ config.r3Injector.resolveInjectorInitializers();
1734
1960
  } else {
1735
- this._tail._nextDup = record;
1736
- record._prevDup = this._tail;
1737
- record._nextDup = null;
1738
- this._tail = record;
1961
+ config.moduleRef.resolveInjectorInitializers();
1739
1962
  }
1740
- }
1741
- get(trackById, atOrAfterIndex) {
1742
- let record;
1743
- for (record = this._head; record !== null; record = record._nextDup) {
1744
- if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) && Object.is(record.trackById, trackById)) {
1745
- return record;
1963
+ const exceptionHandler = envInjector.get(INTERNAL_APPLICATION_ERROR_HANDLER);
1964
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
1965
+ if (envInjector.get(PROVIDED_ZONELESS) && envInjector.get(PROVIDED_NG_ZONE)) {
1966
+ console.warn(formatRuntimeError(408, 'Both provideZoneChangeDetection and provideZonelessChangeDetection are provided. ' + 'This is likely a mistake. Update the application providers to use only one of the two.'));
1746
1967
  }
1747
1968
  }
1748
- return null;
1749
- }
1750
- remove(record) {
1751
- const prev = record._prevDup;
1752
- const next = record._nextDup;
1753
- if (prev === null) {
1754
- this._head = next;
1755
- } else {
1756
- prev._nextDup = next;
1757
- }
1758
- if (next === null) {
1759
- this._tail = prev;
1969
+ let onErrorSubscription;
1970
+ ngZone.runOutsideAngular(() => {
1971
+ onErrorSubscription = ngZone.onError.subscribe({
1972
+ next: exceptionHandler
1973
+ });
1974
+ });
1975
+ if (isApplicationBootstrapConfig(config)) {
1976
+ const destroyListener = () => envInjector.destroy();
1977
+ const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);
1978
+ onPlatformDestroyListeners.add(destroyListener);
1979
+ envInjector.onDestroy(() => {
1980
+ onErrorSubscription.unsubscribe();
1981
+ onPlatformDestroyListeners.delete(destroyListener);
1982
+ });
1760
1983
  } else {
1761
- next._prevDup = prev;
1984
+ const destroyListener = () => config.moduleRef.destroy();
1985
+ const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);
1986
+ onPlatformDestroyListeners.add(destroyListener);
1987
+ config.moduleRef.onDestroy(() => {
1988
+ remove(config.allPlatformModules, config.moduleRef);
1989
+ onErrorSubscription.unsubscribe();
1990
+ onPlatformDestroyListeners.delete(destroyListener);
1991
+ });
1762
1992
  }
1763
- return this._head === null;
1764
- }
1993
+ return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {
1994
+ const pendingTasks = envInjector.get(PendingTasksInternal);
1995
+ const taskId = pendingTasks.add();
1996
+ const initStatus = envInjector.get(ApplicationInitStatus);
1997
+ initStatus.runInitializers();
1998
+ return initStatus.donePromise.then(() => {
1999
+ const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);
2000
+ setLocaleId(localeId || DEFAULT_LOCALE_ID);
2001
+ const enableRootComponentbootstrap = envInjector.get(ENABLE_ROOT_COMPONENT_BOOTSTRAP, true);
2002
+ if (!enableRootComponentbootstrap) {
2003
+ if (isApplicationBootstrapConfig(config)) {
2004
+ return envInjector.get(ApplicationRef);
2005
+ }
2006
+ config.allPlatformModules.push(config.moduleRef);
2007
+ return config.moduleRef;
2008
+ }
2009
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
2010
+ const imagePerformanceService = envInjector.get(ImagePerformanceWarning);
2011
+ imagePerformanceService.start();
2012
+ }
2013
+ if (isApplicationBootstrapConfig(config)) {
2014
+ const appRef = envInjector.get(ApplicationRef);
2015
+ if (config.rootComponent !== undefined) {
2016
+ appRef.bootstrap(config.rootComponent);
2017
+ }
2018
+ return appRef;
2019
+ } else {
2020
+ moduleBootstrapImpl?.(config.moduleRef, config.allPlatformModules);
2021
+ return config.moduleRef;
2022
+ }
2023
+ }).finally(() => void pendingTasks.remove(taskId));
2024
+ });
2025
+ });
1765
2026
  }
1766
- class _DuplicateMap {
1767
- map = new Map();
1768
- put(record) {
1769
- const key = record.trackById;
1770
- let duplicates = this.map.get(key);
1771
- if (!duplicates) {
1772
- duplicates = new _DuplicateItemRecordList();
1773
- this.map.set(key, duplicates);
1774
- }
1775
- duplicates.add(record);
1776
- }
1777
- get(trackById, atOrAfterIndex) {
1778
- const key = trackById;
1779
- const recordList = this.map.get(key);
1780
- return recordList ? recordList.get(trackById, atOrAfterIndex) : null;
1781
- }
1782
- remove(record) {
1783
- const key = record.trackById;
1784
- const recordList = this.map.get(key);
1785
- if (recordList.remove(record)) {
1786
- this.map.delete(key);
1787
- }
1788
- return record;
1789
- }
1790
- get isEmpty() {
1791
- return this.map.size === 0;
1792
- }
1793
- clear() {
1794
- this.map.clear();
2027
+ let moduleBootstrapImpl;
2028
+ function setModuleBootstrapImpl() {
2029
+ moduleBootstrapImpl = _moduleDoBootstrap;
2030
+ }
2031
+ function _moduleDoBootstrap(moduleRef, allPlatformModules) {
2032
+ const appRef = moduleRef.injector.get(ApplicationRef);
2033
+ if (moduleRef._bootstrapComponents.length > 0) {
2034
+ moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));
2035
+ } else if (moduleRef.instance.ngDoBootstrap) {
2036
+ moduleRef.instance.ngDoBootstrap(appRef);
2037
+ } else {
2038
+ throw new RuntimeError(-403, ngDevMode && `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, ` + `but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. ` + `Please define one of these.`);
1795
2039
  }
2040
+ allPlatformModules.push(moduleRef);
1796
2041
  }
1797
- function getPreviousIndex(item, addRemoveOffset, moveOffsets) {
1798
- const previousIndex = item.previousIndex;
1799
- if (previousIndex === null) return previousIndex;
1800
- let moveOffset = 0;
1801
- if (moveOffsets && previousIndex < moveOffsets.length) {
1802
- moveOffset = moveOffsets[previousIndex];
2042
+ function _callAndReportToErrorHandler(errorHandler, ngZone, callback) {
2043
+ try {
2044
+ const result = callback();
2045
+ if (isPromise(result)) {
2046
+ return result.catch(e => {
2047
+ ngZone.runOutsideAngular(() => errorHandler(e));
2048
+ throw e;
2049
+ });
2050
+ }
2051
+ return result;
2052
+ } catch (e) {
2053
+ ngZone.runOutsideAngular(() => errorHandler(e));
2054
+ throw e;
1803
2055
  }
1804
- return previousIndex + addRemoveOffset + moveOffset;
1805
2056
  }
1806
2057
 
1807
- class DefaultKeyValueDifferFactory {
1808
- supports(obj) {
1809
- return obj instanceof Map || isJsObject(obj);
1810
- }
1811
- create() {
1812
- return new DefaultKeyValueDiffer();
2058
+ class PlatformRef {
2059
+ _injector;
2060
+ _modules = [];
2061
+ _destroyListeners = [];
2062
+ _destroyed = false;
2063
+ constructor(_injector) {
2064
+ this._injector = _injector;
1813
2065
  }
1814
- }
1815
- class DefaultKeyValueDiffer {
1816
- _records = new Map();
1817
- _mapHead = null;
1818
- _appendAfter = null;
1819
- _previousMapHead = null;
1820
- _changesHead = null;
1821
- _changesTail = null;
1822
- _additionsHead = null;
1823
- _additionsTail = null;
1824
- _removalsHead = null;
1825
- get isDirty() {
1826
- return this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null;
2066
+ bootstrapModuleFactory(moduleFactory, options) {
2067
+ const allAppProviders = [provideZonelessChangeDetectionInternal(), ...(options?.applicationProviders ?? []), errorHandlerEnvironmentInitializer, ...(ngDevMode ? [validAppIdInitializer] : [])];
2068
+ const moduleRef = createNgModuleRefWithProviders(moduleFactory.moduleType, this.injector, allAppProviders);
2069
+ setModuleBootstrapImpl();
2070
+ return bootstrap({
2071
+ moduleRef,
2072
+ allPlatformModules: this._modules,
2073
+ platformInjector: this.injector
2074
+ });
1827
2075
  }
1828
- forEachItem(fn) {
1829
- let record;
1830
- for (record = this._mapHead; record !== null; record = record._next) {
1831
- fn(record);
1832
- }
2076
+ bootstrapModule(moduleType, compilerOptions = []) {
2077
+ const options = optionsReducer({}, compilerOptions);
2078
+ setModuleBootstrapImpl();
2079
+ return compileNgModuleFactory(this.injector, options, moduleType).then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));
1833
2080
  }
1834
- forEachPreviousItem(fn) {
1835
- let record;
1836
- for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {
1837
- fn(record);
1838
- }
2081
+ onDestroy(callback) {
2082
+ this._destroyListeners.push(callback);
1839
2083
  }
1840
- forEachChangedItem(fn) {
1841
- let record;
1842
- for (record = this._changesHead; record !== null; record = record._nextChanged) {
1843
- fn(record);
1844
- }
2084
+ get injector() {
2085
+ return this._injector;
1845
2086
  }
1846
- forEachAddedItem(fn) {
1847
- let record;
1848
- for (record = this._additionsHead; record !== null; record = record._nextAdded) {
1849
- fn(record);
2087
+ destroy() {
2088
+ if (this._destroyed) {
2089
+ throw new RuntimeError(404, ngDevMode && 'The platform has already been destroyed!');
1850
2090
  }
1851
- }
1852
- forEachRemovedItem(fn) {
1853
- let record;
1854
- for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
1855
- fn(record);
2091
+ this._modules.slice().forEach(module => module.destroy());
2092
+ this._destroyListeners.forEach(listener => listener());
2093
+ const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null);
2094
+ if (destroyListeners) {
2095
+ destroyListeners.forEach(listener => listener());
2096
+ destroyListeners.clear();
1856
2097
  }
2098
+ this._destroyed = true;
1857
2099
  }
1858
- diff(map) {
1859
- if (!map) {
1860
- map = new Map();
1861
- } else if (!(map instanceof Map || isJsObject(map))) {
1862
- throw new RuntimeError(900, ngDevMode && `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);
1863
- }
1864
- return this.check(map) ? this : null;
2100
+ get destroyed() {
2101
+ return this._destroyed;
1865
2102
  }
1866
- check(map) {
1867
- this._reset();
1868
- let insertBefore = this._mapHead;
1869
- this._appendAfter = null;
1870
- this._forEach(map, (value, key) => {
1871
- if (insertBefore && insertBefore.key === key) {
1872
- this._maybeAddToChanges(insertBefore, value);
1873
- this._appendAfter = insertBefore;
1874
- insertBefore = insertBefore._next;
1875
- } else {
1876
- const record = this._getOrCreateRecordForKey(key, value);
1877
- insertBefore = this._insertBeforeOrAppend(insertBefore, record);
1878
- }
2103
+ static ɵfac = function PlatformRef_Factory(__ngFactoryType__) {
2104
+ return new (__ngFactoryType__ || PlatformRef)(__inject(Injector));
2105
+ };
2106
+ static ɵprov = /*@__PURE__*/__defineInjectable({
2107
+ token: PlatformRef,
2108
+ factory: PlatformRef.ɵfac,
2109
+ providedIn: 'platform'
2110
+ });
2111
+ }
2112
+ (() => {
2113
+ (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{
2114
+ type: Injectable,
2115
+ args: [{
2116
+ providedIn: 'platform'
2117
+ }]
2118
+ }], () => [{
2119
+ type: Injector
2120
+ }], null);
2121
+ })();
2122
+
2123
+ function serializeInjector(injector) {
2124
+ const metadata = getInjectorMetadata(injector);
2125
+ if (metadata?.type === 'null') {
2126
+ return {
2127
+ name: 'Null Injector',
2128
+ type: 'null',
2129
+ providers: [],
2130
+ children: []
2131
+ };
2132
+ }
2133
+ let allProviders = [];
2134
+ if (metadata?.type === 'element' || metadata?.type === 'environment') {
2135
+ allProviders = getInjectorProviders(injector).map(record => {
2136
+ return {
2137
+ token: record.token,
2138
+ value: injector.get(record.token, null, {
2139
+ optional: true,
2140
+ self: true
2141
+ })
2142
+ };
1879
2143
  });
1880
- if (insertBefore) {
1881
- if (insertBefore._prev) {
1882
- insertBefore._prev._next = null;
1883
- }
1884
- this._removalsHead = insertBefore;
1885
- for (let record = insertBefore; record !== null; record = record._nextRemoved) {
1886
- if (record === this._mapHead) {
1887
- this._mapHead = null;
1888
- }
1889
- this._records.delete(record.key);
1890
- record._nextRemoved = record._next;
1891
- record.previousValue = record.currentValue;
1892
- record.currentValue = null;
1893
- record._prev = null;
1894
- record._next = null;
1895
- }
1896
- }
1897
- if (this._changesTail) this._changesTail._nextChanged = null;
1898
- if (this._additionsTail) this._additionsTail._nextAdded = null;
1899
- return this.isDirty;
1900
2144
  }
1901
- _insertBeforeOrAppend(before, record) {
1902
- if (before) {
1903
- const prev = before._prev;
1904
- record._next = before;
1905
- record._prev = prev;
1906
- before._prev = record;
1907
- if (prev) {
1908
- prev._next = record;
1909
- }
1910
- if (before === this._mapHead) {
1911
- this._mapHead = record;
1912
- }
1913
- this._appendAfter = before;
1914
- return before;
1915
- }
1916
- if (this._appendAfter) {
1917
- this._appendAfter._next = record;
1918
- record._prev = this._appendAfter;
1919
- } else {
1920
- this._mapHead = record;
1921
- }
1922
- this._appendAfter = record;
1923
- return null;
2145
+ if (metadata?.type === 'element') {
2146
+ const tNode = getNodeInjectorTNode(injector);
2147
+ const viewProvidersCount = tNode ? tNode.providerIndexes >> 20 : 0;
2148
+ const viewProviders = allProviders.slice(0, viewProvidersCount);
2149
+ const resolvedProviders = allProviders.slice(viewProvidersCount);
2150
+ return {
2151
+ name: injector.constructor.name,
2152
+ type: 'element',
2153
+ providers: resolvedProviders,
2154
+ viewProviders,
2155
+ children: [],
2156
+ hostElement: metadata.source
2157
+ };
1924
2158
  }
1925
- _getOrCreateRecordForKey(key, value) {
1926
- if (this._records.has(key)) {
1927
- const record = this._records.get(key);
1928
- this._maybeAddToChanges(record, value);
1929
- const prev = record._prev;
1930
- const next = record._next;
1931
- if (prev) {
1932
- prev._next = next;
1933
- }
1934
- if (next) {
1935
- next._prev = prev;
1936
- }
1937
- record._next = null;
1938
- record._prev = null;
1939
- return record;
2159
+ return {
2160
+ name: metadata?.source ?? injector.constructor.name ?? 'Unknown Injector',
2161
+ type: 'environment',
2162
+ providers: allProviders,
2163
+ children: []
2164
+ };
2165
+ }
2166
+
2167
+ const diGraphTool = {
2168
+ name: 'angular:di_graph',
2169
+ description: `
2170
+ Exposes the Angular Dependency Injection (DI) graph of the application.
2171
+
2172
+ This tool extracts both the element injector tree (associated with DOM elements and components)
2173
+ and the environment injector tree (associated with modules and standalone application roots).
2174
+ It captures the relationship structure and the providers resolved at each level.
2175
+
2176
+ Returns:
2177
+ - \`elementInjectorRoots\`: An array of root element injectors (one for each Angular application
2178
+ root found). Each node forms a tree hierarchy:
2179
+ - \`name\`: The constructor name of this injector.
2180
+ - \`type\`: 'element'.
2181
+ - \`providers\`: Array of providers configured on this injector.
2182
+ - \`token\`: The DI token.
2183
+ - \`value\`: The resolved value of that provider if it was instantiated.
2184
+ - \`hostElement\`: The DOM element that this injector is associated with.
2185
+ - \`children\`: Array of child element injectors.
2186
+ - \`environmentInjectorRoot\`: The root environment injector. It forms a tree hierarchy of nodes
2187
+ representing all environment injectors:
2188
+ - \`name\`: The identifier for the environment injector.
2189
+ - \`type\`: 'environment' or 'null'.
2190
+ - \`providers\`: Array of providers configured on this injector.
2191
+ - \`token\`: The DI token.
2192
+ - \`value\`: The resolved value of that provider if it was instantiated.
2193
+ - \`children\`: Array of child environment injectors.
2194
+ `.trim(),
2195
+ inputSchema: {
2196
+ type: 'object',
2197
+ properties: {}
2198
+ },
2199
+ execute: async () => {
2200
+ const roots = Array.from(document.querySelectorAll('[ng-version]'));
2201
+ if (roots.length === 0) {
2202
+ throw new Error('Could not find Angular root element ([ng-version]) on the page.');
1940
2203
  }
1941
- const record = new KeyValueChangeRecord_(key);
1942
- this._records.set(key, record);
1943
- record.currentValue = value;
1944
- this._addToAdditions(record);
1945
- return record;
2204
+ return discoverDiGraph(roots);
1946
2205
  }
1947
- _reset() {
1948
- if (this.isDirty) {
1949
- let record;
1950
- this._previousMapHead = this._mapHead;
1951
- for (record = this._previousMapHead; record !== null; record = record._next) {
1952
- record._nextPrevious = record._next;
1953
- }
1954
- for (record = this._changesHead; record !== null; record = record._nextChanged) {
1955
- record.previousValue = record.currentValue;
1956
- }
1957
- for (record = this._additionsHead; record != null; record = record._nextAdded) {
1958
- record.previousValue = record.currentValue;
1959
- }
1960
- this._changesHead = this._changesTail = null;
1961
- this._additionsHead = this._additionsTail = null;
1962
- this._removalsHead = null;
2206
+ };
2207
+ function discoverDiGraph(roots) {
2208
+ const rootLViews = roots.map(root => {
2209
+ const lContext = getLContext(root);
2210
+ if (!lContext?.lView) {
2211
+ throw new Error(`Could not find an \`LView\` for root \`<${root.tagName.toLowerCase()}>\`, is it an Angular component?`);
1963
2212
  }
1964
- }
1965
- _maybeAddToChanges(record, newValue) {
1966
- if (!Object.is(newValue, record.currentValue)) {
1967
- record.previousValue = record.currentValue;
1968
- record.currentValue = newValue;
1969
- this._addToChanges(record);
2213
+ return lContext.lView;
2214
+ });
2215
+ return {
2216
+ elementInjectorRoots: rootLViews.map(rootLView => walkElementInjectors(rootLView)),
2217
+ environmentInjectorRoot: collectEnvInjectors(rootLViews)
2218
+ };
2219
+ }
2220
+ function walkElementInjectors(rootLView) {
2221
+ if (rootLView[TVIEW].type !== 0) {
2222
+ throw new Error(`Expected a root LView but got type: \`${rootLView[TVIEW].type}\`.`);
2223
+ }
2224
+ const stack = [];
2225
+ for (const [tNode, lView] of walkLViewDirectives(rootLView)) {
2226
+ const injector = new NodeInjector(tNode, lView);
2227
+ const serialized = serializeInjector(injector);
2228
+ while (stack.length > 0) {
2229
+ const [lastTNode, lastLView, lastInjector] = stack[stack.length - 1];
2230
+ const isDescendantInSameView = isTNodeDescendant(tNode, lastTNode);
2231
+ const isDescendantInDifferentView = isLViewDescendantOfTNode(lView, lastLView, lastTNode);
2232
+ if (isDescendantInSameView || isDescendantInDifferentView) {
2233
+ lastInjector.children.push(serialized);
2234
+ break;
2235
+ } else {
2236
+ stack.pop();
2237
+ }
1970
2238
  }
1971
- }
1972
- _addToAdditions(record) {
1973
- if (this._additionsHead === null) {
1974
- this._additionsHead = this._additionsTail = record;
2239
+ stack.push([tNode, lView, serialized]);
2240
+ }
2241
+ if (stack.length === 0) {
2242
+ throw new Error(`Expected at least one component/directive in the root \`LView\`.`);
2243
+ }
2244
+ const [,, rootInjector] = stack[0];
2245
+ return rootInjector;
2246
+ }
2247
+ function collectEnvInjectors(rootLViews) {
2248
+ const serializedEnvInjectorMap = new Map();
2249
+ let rootEnvInjector = undefined;
2250
+ function serializeAncestors(injector) {
2251
+ const existing = serializedEnvInjectorMap.get(injector);
2252
+ if (existing) return existing;
2253
+ const serialized = serializeInjector(injector);
2254
+ serializedEnvInjectorMap.set(injector, serialized);
2255
+ const parentInjector = getParentEnvInjector(injector);
2256
+ if (parentInjector) {
2257
+ const parentSerialized = serializeAncestors(parentInjector);
2258
+ parentSerialized.children.push(serialized);
1975
2259
  } else {
1976
- this._additionsTail._nextAdded = record;
1977
- this._additionsTail = record;
2260
+ if (!rootEnvInjector) {
2261
+ rootEnvInjector = serialized;
2262
+ } else if (rootEnvInjector !== serialized) {
2263
+ throw new Error('Expected only one root environment injector, but found multiple.', {
2264
+ cause: {
2265
+ firstRoot: rootEnvInjector,
2266
+ secondRoot: serialized
2267
+ }
2268
+ });
2269
+ }
1978
2270
  }
2271
+ return serialized;
1979
2272
  }
1980
- _addToChanges(record) {
1981
- if (this._changesHead === null) {
1982
- this._changesHead = this._changesTail = record;
1983
- } else {
1984
- this._changesTail._nextChanged = record;
1985
- this._changesTail = record;
2273
+ for (const rootLView of rootLViews) {
2274
+ for (const [, lView] of walkLViewDirectives(rootLView)) {
2275
+ serializeAncestors(lView[INJECTOR]);
1986
2276
  }
1987
2277
  }
1988
- _forEach(obj, fn) {
1989
- if (obj instanceof Map) {
1990
- obj.forEach(fn);
1991
- } else {
1992
- Object.keys(obj).forEach(k => fn(obj[k], k));
1993
- }
2278
+ if (!rootEnvInjector) {
2279
+ throw new Error('Expected a root environment injector but did not find one.');
1994
2280
  }
2281
+ return rootEnvInjector;
1995
2282
  }
1996
- class KeyValueChangeRecord_ {
1997
- key;
1998
- previousValue = null;
1999
- currentValue = null;
2000
- _nextPrevious = null;
2001
- _next = null;
2002
- _prev = null;
2003
- _nextAdded = null;
2004
- _nextRemoved = null;
2005
- _nextChanged = null;
2006
- constructor(key) {
2007
- this.key = key;
2283
+ function isTNodeDescendant(node, ancestor) {
2284
+ let curr = node;
2285
+ while (curr) {
2286
+ if (curr === ancestor) return true;
2287
+ curr = curr.parent;
2008
2288
  }
2289
+ return false;
2009
2290
  }
2010
-
2011
- function defaultIterableDiffersFactory() {
2012
- return new IterableDiffers([new DefaultIterableDifferFactory()]);
2013
- }
2014
- class IterableDiffers {
2015
- factories;
2016
- static ɵprov =
2017
- /* @__PURE__ */
2018
- __defineInjectable({
2019
- token: IterableDiffers,
2020
- providedIn: 'root',
2021
- factory: defaultIterableDiffersFactory
2022
- });
2023
- constructor(factories) {
2024
- this.factories = factories;
2291
+ function isLViewDescendantOfTNode(lView, parentLView, parentTNode) {
2292
+ let currentLView = lView;
2293
+ let hostTNode = null;
2294
+ while (currentLView && currentLView !== parentLView) {
2295
+ hostTNode = currentLView[T_HOST];
2296
+ currentLView = getLViewParent(currentLView);
2297
+ }
2298
+ return currentLView === parentLView && hostTNode !== null && isTNodeDescendant(hostTNode, parentTNode);
2299
+ }
2300
+ function getParentEnvInjector(injector) {
2301
+ if (injector instanceof ChainedInjector) {
2302
+ const chainedInjector = injector;
2303
+ return chainedInjector.parentInjector;
2304
+ } else if (injector instanceof R3Injector) {
2305
+ return injector.parent;
2306
+ } else if (injector instanceof NullInjector) {
2307
+ return undefined;
2308
+ } else {
2309
+ throw new Error(`Unknown injector type: "${injector.constructor.name}".`);
2025
2310
  }
2026
- static create(factories, parent) {
2027
- if (parent != null) {
2028
- const copied = parent.factories.slice();
2029
- factories = factories.concat(copied);
2311
+ }
2312
+
2313
+ const signalGraphTool = {
2314
+ name: 'angular:signal_graph',
2315
+ description: `
2316
+ Exposes the Angular signal dependency graph for a given DOM element.
2317
+
2318
+ This tool extracts the reactive dependency graph (signals, computeds, and effects) that
2319
+ are transitive dependencies of the effects of that element. It will include signals
2320
+ authored in other components/services and depended upon by the target component, but
2321
+ will *not* include signals only used in descendant components effects.
2322
+
2323
+ Params:
2324
+ - \`target\`: The element to get the signal graph for. Must be the host element of an
2325
+ Angular component.
2326
+
2327
+ Returns:
2328
+ - \`nodes\`: An array of reactive nodes discovered in the context. Each node contains:
2329
+ - \`kind\`: The type of reactive node ('signal', 'computed', 'effect', or 'template'
2330
+ for component template effects).
2331
+ - \`value\`: The current evaluated value of the node (if applicable).
2332
+ - \`label\`: The symbol name of the associated signal if available (ex.
2333
+ \`const foo = signal(0);\` has \`label: 'foo'\`).
2334
+ - \`epoch\`: The internal version number of the node's value.
2335
+ - \`edges\`: An array of dependency links representing which nodes read from which other
2336
+ nodes.
2337
+ - \`consumer\`: The index in the \`nodes\` array of the node that depends on the value.
2338
+ - \`producer\`: The index in the \`nodes\` array of the node that provides the value.
2339
+
2340
+ Example: An edge with \`{consumer: 2, producer: 0}\` means that \`nodes[2]\` (e.g. an
2341
+ \`effect\`) reads the value of \`nodes[0]\` (e.g. a \`signal\`).
2342
+ `.trim(),
2343
+ inputSchema: {
2344
+ type: 'object',
2345
+ properties: {
2346
+ target: {
2347
+ type: 'object',
2348
+ description: 'The element to get the signal graph for.',
2349
+ 'x-mcp-type': 'HTMLElement'
2350
+ }
2351
+ },
2352
+ required: ['target']
2353
+ },
2354
+ execute: async ({
2355
+ target
2356
+ }) => {
2357
+ if (!(target instanceof HTMLElement)) {
2358
+ throw new Error('Invalid input: "target" must be an HTMLElement.');
2030
2359
  }
2031
- return new IterableDiffers(factories);
2032
- }
2033
- static extend(factories) {
2360
+ const injector = getInjector(target);
2361
+ if (injector instanceof NullInjector) {
2362
+ throw new Error('Invalid input: "target" is not the host element of an Angular component.');
2363
+ }
2364
+ const graph = getSignalGraph(injector);
2034
2365
  return {
2035
- provide: IterableDiffers,
2036
- useFactory: () => {
2037
- const parent = inject(IterableDiffers, {
2038
- optional: true,
2039
- skipSelf: true
2040
- });
2041
- return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());
2042
- }
2366
+ nodes: graph.nodes.map(({
2367
+ id,
2368
+ debuggableFn,
2369
+ ...node
2370
+ }) => node),
2371
+ edges: graph.edges
2043
2372
  };
2044
2373
  }
2045
- find(iterable) {
2046
- const factory = this.factories.find(f => f.supports(iterable));
2047
- if (factory != null) {
2048
- return factory;
2049
- } else {
2050
- throw new RuntimeError(901, ngDevMode && `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);
2051
- }
2374
+ };
2375
+
2376
+ function registerAiTools() {
2377
+ if (typeof window === 'undefined' || !window.addEventListener) return () => {};
2378
+ function listener(inputEvent) {
2379
+ const event = inputEvent;
2380
+ event.respondWith({
2381
+ name: 'Angular',
2382
+ tools: [diGraphTool, signalGraphTool]
2383
+ });
2052
2384
  }
2053
- }
2054
- function getTypeNameForDebugging(type) {
2055
- return type['name'] || typeof type;
2385
+ window.addEventListener('devtoolstooldiscovery', listener);
2386
+ return () => {
2387
+ window.removeEventListener('devtoolstooldiscovery', listener);
2388
+ };
2056
2389
  }
2057
2390
 
2058
- function defaultKeyValueDiffersFactory() {
2059
- return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);
2391
+ let _platformInjector = null;
2392
+ let _unregisterAiTools = null;
2393
+ function createPlatform(injector) {
2394
+ if (getPlatform()) {
2395
+ throw new RuntimeError(400, ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.');
2396
+ }
2397
+ publishDefaultGlobalUtils();
2398
+ publishSignalConfiguration();
2399
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
2400
+ _unregisterAiTools = registerAiTools();
2401
+ }
2402
+ _platformInjector = typeof ngServerMode === 'undefined' || !ngServerMode ? injector : null;
2403
+ const platform = injector.get(PlatformRef);
2404
+ runPlatformInitializers(injector);
2405
+ return platform;
2060
2406
  }
2061
- class KeyValueDiffers {
2062
- static ɵprov =
2063
- /* @__PURE__ */
2064
- __defineInjectable({
2065
- token: KeyValueDiffers,
2066
- providedIn: 'root',
2067
- factory: defaultKeyValueDiffersFactory
2407
+ function createPlatformFactory(parentPlatformFactory, name, providers = []) {
2408
+ const desc = `Platform: ${name}`;
2409
+ const marker = new InjectionToken(desc);
2410
+ return (extraProviders = []) => {
2411
+ let platform = getPlatform();
2412
+ if (!platform) {
2413
+ const platformProviders = [...providers, ...extraProviders, {
2414
+ provide: marker,
2415
+ useValue: true
2416
+ }];
2417
+ platform = parentPlatformFactory?.(platformProviders) ?? createPlatform(createPlatformInjector(platformProviders, desc));
2418
+ }
2419
+ return typeof ngServerMode !== 'undefined' && ngServerMode ? platform : assertPlatform(marker);
2420
+ };
2421
+ }
2422
+ function createPlatformInjector(providers = [], name) {
2423
+ return Injector.create({
2424
+ name,
2425
+ providers: [{
2426
+ provide: INJECTOR_SCOPE,
2427
+ useValue: 'platform'
2428
+ }, {
2429
+ provide: PLATFORM_DESTROY_LISTENERS,
2430
+ useValue: new Set([() => _platformInjector = null])
2431
+ }, ...providers]
2068
2432
  });
2069
- factories;
2070
- constructor(factories) {
2071
- this.factories = factories;
2433
+ }
2434
+ function assertPlatform(requiredToken) {
2435
+ const platform = getPlatform();
2436
+ if (!platform) {
2437
+ throw new RuntimeError(-401, ngDevMode && 'No platform exists!');
2072
2438
  }
2073
- static create(factories, parent) {
2074
- if (parent) {
2075
- const copied = parent.factories.slice();
2076
- factories = factories.concat(copied);
2077
- }
2078
- return new KeyValueDiffers(factories);
2439
+ if ((typeof ngDevMode === 'undefined' || ngDevMode) && !platform.injector.get(requiredToken, null)) {
2440
+ throw new RuntimeError(400, 'A platform with a different configuration has been created. Please destroy it first.');
2079
2441
  }
2080
- static extend(factories) {
2081
- return {
2082
- provide: KeyValueDiffers,
2083
- useFactory: () => {
2084
- const parent = inject(KeyValueDiffers, {
2085
- optional: true,
2086
- skipSelf: true
2087
- });
2088
- return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());
2089
- }
2090
- };
2442
+ return platform;
2443
+ }
2444
+ function getPlatform() {
2445
+ if (typeof ngServerMode !== 'undefined' && ngServerMode) {
2446
+ return null;
2091
2447
  }
2092
- find(kv) {
2093
- const factory = this.factories.find(f => f.supports(kv));
2094
- if (factory) {
2095
- return factory;
2096
- }
2097
- throw new RuntimeError(901, ngDevMode && `Cannot find a differ supporting object '${kv}'`);
2448
+ return _platformInjector?.get(PlatformRef) ?? null;
2449
+ }
2450
+ function destroyPlatform() {
2451
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
2452
+ _unregisterAiTools?.();
2453
+ _unregisterAiTools = null;
2098
2454
  }
2455
+ getPlatform()?.destroy();
2099
2456
  }
2100
-
2101
- const keyValDiff = [new DefaultKeyValueDifferFactory()];
2102
- const iterableDiff = [new DefaultIterableDifferFactory()];
2103
- const defaultIterableDiffers = new IterableDiffers(iterableDiff);
2104
- const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
2105
-
2106
- const platformCore = createPlatformFactory(null, 'core', []);
2107
-
2108
- class ApplicationModule {
2109
- constructor(appRef) {}
2110
- static ɵfac = function ApplicationModule_Factory(__ngFactoryType__) {
2111
- return new (__ngFactoryType__ || ApplicationModule)(__inject(ApplicationRef));
2457
+ function createOrReusePlatformInjector(providers = []) {
2458
+ if (_platformInjector) return _platformInjector;
2459
+ publishDefaultGlobalUtils();
2460
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
2461
+ _unregisterAiTools = registerAiTools();
2462
+ }
2463
+ const injector = createPlatformInjector(providers);
2464
+ if (typeof ngServerMode === 'undefined' || !ngServerMode) {
2465
+ _platformInjector = injector;
2466
+ }
2467
+ publishSignalConfiguration();
2468
+ runPlatformInitializers(injector);
2469
+ return injector;
2470
+ }
2471
+ function providePlatformInitializer(initializerFn) {
2472
+ return {
2473
+ provide: PLATFORM_INITIALIZER,
2474
+ useValue: initializerFn,
2475
+ multi: true
2112
2476
  };
2113
- static ɵmod = /*@__PURE__*/__defineNgModule({
2114
- type: ApplicationModule
2477
+ }
2478
+ function runPlatformInitializers(injector) {
2479
+ const inits = injector.get(PLATFORM_INITIALIZER, null);
2480
+ runInInjectionContext(injector, () => {
2481
+ inits?.forEach(init => init());
2115
2482
  });
2116
- static ɵinj = /*@__PURE__*/__defineInjector({});
2117
2483
  }
2118
- (() => {
2119
- (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
2120
- type: NgModule
2121
- }], () => [{
2122
- type: ApplicationRef
2123
- }], null);
2124
- })();
2125
2484
 
2126
2485
  function internalCreateApplication(config) {
2127
2486
  const {
@@ -2225,7 +2584,7 @@ function annotateForHydration(appRef, doc) {
2225
2584
  capture: new Set()
2226
2585
  };
2227
2586
  const deferBlocks = new Map();
2228
- const appId = appRef.injector.get(APP_ID);
2587
+ appRef.injector.get(APP_ID);
2229
2588
  for (const viewRef of viewRefs) {
2230
2589
  const lNode = getLNodeForHydration(viewRef);
2231
2590
  if (lNode !== null) {
@@ -2237,7 +2596,6 @@ function annotateForHydration(appRef, doc) {
2237
2596
  i18nChildren: new Map(),
2238
2597
  eventTypesToReplay,
2239
2598
  shouldReplayEvents,
2240
- appId,
2241
2599
  deferBlocks
2242
2600
  };
2243
2601
  if (isLContainer(lNode)) {
@@ -2561,147 +2919,39 @@ function stopMeasuring(label) {
2561
2919
  if (!enablePerfLogging) {
2562
2920
  return;
2563
2921
  }
2564
- const {
2565
- startLabel,
2566
- labelName,
2567
- endLabel
2568
- } = labels(label);
2569
- performance.mark(endLabel);
2570
- performance.measure(labelName, startLabel, endLabel);
2571
- performance.clearMarks(startLabel);
2572
- performance.clearMarks(endLabel);
2573
- }
2574
- function labels(label) {
2575
- const labelName = `${PERFORMANCE_MARK_PREFIX}:${label}`;
2576
- return {
2577
- labelName,
2578
- startLabel: `start:${labelName}`,
2579
- endLabel: `end:${labelName}`
2580
- };
2581
- }
2582
- let warningLogged = false;
2583
- function enableProfiling() {
2584
- if (!warningLogged && (typeof performance === 'undefined' || !performance.mark || !performance.measure)) {
2585
- warningLogged = true;
2586
- console.warn('Performance API is not supported on this platform');
2587
- return;
2588
- }
2589
- enablePerfLogging = true;
2590
- }
2591
- function disableProfiling() {
2592
- enablePerfLogging = false;
2593
- }
2594
-
2595
- function getClosestComponentName(node) {
2596
- let currentNode = node;
2597
- while (currentNode) {
2598
- const lView = readPatchedLView(currentNode);
2599
- if (lView !== null) {
2600
- for (let i = HEADER_OFFSET; i < lView.length; i++) {
2601
- const current = lView[i];
2602
- if (!isLView(current) && !isLContainer(current) || current[HOST] !== currentNode) {
2603
- continue;
2604
- }
2605
- const tView = lView[TVIEW];
2606
- const tNode = getTNode(tView, i);
2607
- if (isComponentHost(tNode)) {
2608
- const def = tView.data[tNode.directiveStart + tNode.componentOffset];
2609
- const name = def.debugInfo?.className || def.type.name;
2610
- if (name) {
2611
- return name;
2612
- } else {
2613
- break;
2614
- }
2615
- }
2616
- }
2617
- }
2618
- currentNode = currentNode.parentNode;
2619
- }
2620
- return null;
2621
- }
2622
-
2623
- function ɵassertType(value) {}
2624
-
2625
- function ɵɵngDeclareDirective(decl) {
2626
- const compiler = getCompilerFacade({
2627
- usage: 1,
2628
- kind: 'directive',
2629
- type: decl.type
2630
- });
2631
- return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
2632
- }
2633
- function ɵɵngDeclareClassMetadata(decl) {
2634
- setClassMetadata(decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? null);
2635
- }
2636
- function ɵɵngDeclareClassMetadataAsync(decl) {
2637
- setClassMetadataAsync(decl.type, decl.resolveDeferredDeps, (...types) => {
2638
- const meta = decl.resolveMetadata(...types);
2639
- setClassMetadata(decl.type, meta.decorators, meta.ctorParameters, meta.propDecorators);
2640
- });
2641
- }
2642
- function ɵɵngDeclareComponent(decl) {
2643
- const compiler = getCompilerFacade({
2644
- usage: 1,
2645
- kind: 'component',
2646
- type: decl.type
2647
- });
2648
- return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);
2649
- }
2650
- function ɵɵngDeclareFactory(decl) {
2651
- const compiler = getCompilerFacade({
2652
- usage: 1,
2653
- kind: getFactoryKind(decl.target),
2654
- type: decl.type
2655
- });
2656
- return compiler.compileFactoryDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
2657
- }
2658
- function getFactoryKind(target) {
2659
- switch (target) {
2660
- case FactoryTarget.Directive:
2661
- return 'directive';
2662
- case FactoryTarget.Component:
2663
- return 'component';
2664
- case FactoryTarget.Injectable:
2665
- return 'injectable';
2666
- case FactoryTarget.Pipe:
2667
- return 'pipe';
2668
- case FactoryTarget.NgModule:
2669
- return 'NgModule';
2670
- }
2671
- }
2672
- function ɵɵngDeclareInjectable(decl) {
2673
- const compiler = getCompilerFacade({
2674
- usage: 1,
2675
- kind: 'injectable',
2676
- type: decl.type
2677
- });
2678
- return compiler.compileInjectableDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);
2922
+ const {
2923
+ startLabel,
2924
+ labelName,
2925
+ endLabel
2926
+ } = labels(label);
2927
+ performance.mark(endLabel);
2928
+ performance.measure(labelName, startLabel, endLabel);
2929
+ performance.clearMarks(startLabel);
2930
+ performance.clearMarks(endLabel);
2679
2931
  }
2680
- function ɵɵngDeclareInjector(decl) {
2681
- const compiler = getCompilerFacade({
2682
- usage: 1,
2683
- kind: 'NgModule',
2684
- type: decl.type
2685
- });
2686
- return compiler.compileInjectorDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);
2932
+ function labels(label) {
2933
+ const labelName = `${PERFORMANCE_MARK_PREFIX}:${label}`;
2934
+ return {
2935
+ labelName,
2936
+ startLabel: `start:${labelName}`,
2937
+ endLabel: `end:${labelName}`
2938
+ };
2687
2939
  }
2688
- function ɵɵngDeclareNgModule(decl) {
2689
- const compiler = getCompilerFacade({
2690
- usage: 1,
2691
- kind: 'NgModule',
2692
- type: decl.type
2693
- });
2694
- return compiler.compileNgModuleDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);
2940
+ let warningLogged = false;
2941
+ function enableProfiling() {
2942
+ if (!warningLogged && (typeof performance === 'undefined' || !performance.mark || !performance.measure)) {
2943
+ warningLogged = true;
2944
+ console.warn('Performance API is not supported on this platform');
2945
+ return;
2946
+ }
2947
+ enablePerfLogging = true;
2695
2948
  }
2696
- function ɵɵngDeclarePipe(decl) {
2697
- const compiler = getCompilerFacade({
2698
- usage: 1,
2699
- kind: 'pipe',
2700
- type: decl.type
2701
- });
2702
- return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);
2949
+ function disableProfiling() {
2950
+ enablePerfLogging = false;
2703
2951
  }
2704
2952
 
2953
+ function ɵassertType(value) {}
2954
+
2705
2955
  const NOT_SET = /* @__PURE__ */Symbol('NOT_SET');
2706
2956
  const EMPTY_CLEANUP_SET = /* @__PURE__ */new Set();
2707
2957
  const AFTER_RENDER_PHASE_EFFECT_NODE = /* @__PURE__ */(() => ({
@@ -2863,31 +3113,114 @@ function phaseDebugName(phase) {
2863
3113
  }
2864
3114
  }
2865
3115
 
2866
- function resourceFromSnapshots(source) {
2867
- return new SnapshotResource(isSignal(source) ? source : computed(source));
3116
+ function ɵɵngDeclareDirective(decl) {
3117
+ const compiler = getCompilerFacade({
3118
+ usage: 1,
3119
+ kind: 'directive',
3120
+ type: decl.type
3121
+ });
3122
+ return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
2868
3123
  }
2869
- class SnapshotResource {
2870
- snapshot;
2871
- constructor(snapshot) {
2872
- this.snapshot = snapshot;
2873
- }
2874
- get state() {
2875
- return this.snapshot();
2876
- }
2877
- value = computed(() => {
2878
- if (this.state.status === 'error') {
2879
- throw new ResourceValueError(this.state.error);
2880
- }
2881
- return this.state.value;
3124
+ function ɵɵngDeclareClassMetadata(decl) {
3125
+ setClassMetadata(decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? null);
3126
+ }
3127
+ function ɵɵngDeclareClassMetadataAsync(decl) {
3128
+ setClassMetadataAsync(decl.type, decl.resolveDeferredDeps, (...types) => {
3129
+ const meta = decl.resolveMetadata(...types);
3130
+ setClassMetadata(decl.type, meta.decorators, meta.ctorParameters, meta.propDecorators);
2882
3131
  });
2883
- status = computed(() => this.state.status);
2884
- error = computed(() => this.state.status === 'error' ? this.state.error : undefined);
2885
- isLoading = computed(() => this.state.status === 'loading' || this.state.status === 'reloading');
2886
- isValueDefined = computed(() => this.state.status !== 'error' && this.state.value !== undefined);
2887
- hasValue() {
2888
- return this.isValueDefined();
3132
+ }
3133
+ function ɵɵngDeclareComponent(decl) {
3134
+ const compiler = getCompilerFacade({
3135
+ usage: 1,
3136
+ kind: 'component',
3137
+ type: decl.type
3138
+ });
3139
+ return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);
3140
+ }
3141
+ function ɵɵngDeclareFactory(decl) {
3142
+ const compiler = getCompilerFacade({
3143
+ usage: 1,
3144
+ kind: getFactoryKind(decl.target),
3145
+ type: decl.type
3146
+ });
3147
+ return compiler.compileFactoryDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
3148
+ }
3149
+ function getFactoryKind(target) {
3150
+ switch (target) {
3151
+ case FactoryTarget.Directive:
3152
+ return 'directive';
3153
+ case FactoryTarget.Component:
3154
+ return 'component';
3155
+ case FactoryTarget.Injectable:
3156
+ return 'injectable';
3157
+ case FactoryTarget.Pipe:
3158
+ return 'pipe';
3159
+ case FactoryTarget.NgModule:
3160
+ return 'NgModule';
3161
+ case FactoryTarget.Service:
3162
+ return 'service';
2889
3163
  }
2890
3164
  }
3165
+ function ɵɵngDeclareInjectable(decl) {
3166
+ const compiler = getCompilerFacade({
3167
+ usage: 1,
3168
+ kind: 'injectable',
3169
+ type: decl.type
3170
+ });
3171
+ return compiler.compileInjectableDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);
3172
+ }
3173
+ function ɵɵngDeclareInjector(decl) {
3174
+ const compiler = getCompilerFacade({
3175
+ usage: 1,
3176
+ kind: 'NgModule',
3177
+ type: decl.type
3178
+ });
3179
+ return compiler.compileInjectorDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);
3180
+ }
3181
+ function ɵɵngDeclareNgModule(decl) {
3182
+ const compiler = getCompilerFacade({
3183
+ usage: 1,
3184
+ kind: 'NgModule',
3185
+ type: decl.type
3186
+ });
3187
+ return compiler.compileNgModuleDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);
3188
+ }
3189
+ function ɵɵngDeclarePipe(decl) {
3190
+ const compiler = getCompilerFacade({
3191
+ usage: 1,
3192
+ kind: 'pipe',
3193
+ type: decl.type
3194
+ });
3195
+ return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);
3196
+ }
3197
+ function ɵɵngDeclareService(decl) {
3198
+ const compiler = getCompilerFacade({
3199
+ usage: 1,
3200
+ kind: 'service',
3201
+ type: decl.type
3202
+ });
3203
+ return compiler.compileServiceDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);
3204
+ }
3205
+
3206
+ function getModuleFactory(id) {
3207
+ const type = getRegisteredNgModuleType(id);
3208
+ if (!type) throw noModuleError(id);
3209
+ return new NgModuleFactory(type);
3210
+ }
3211
+ function getNgModuleById(id) {
3212
+ const type = getRegisteredNgModuleType(id);
3213
+ if (!type) throw noModuleError(id);
3214
+ return type;
3215
+ }
3216
+ function noModuleError(id) {
3217
+ return new RuntimeError(920, ngDevMode && `No module with ID ${id} loaded`);
3218
+ }
3219
+
3220
+ class ViewRef extends ChangeDetectorRef {}
3221
+ class EmbeddedViewRef extends ViewRef {}
3222
+
3223
+ const platformCore = createPlatformFactory(null, 'core', []);
2891
3224
 
2892
3225
  function createComponent(component, options) {
2893
3226
  ngDevMode && assertComponentDef(component);
@@ -2925,28 +3258,143 @@ function reflectComponentType(component) {
2925
3258
  };
2926
3259
  }
2927
3260
 
2928
- function mergeApplicationConfig(...configs) {
2929
- return configs.reduce((prev, curr) => {
2930
- return Object.assign(prev, curr, {
2931
- providers: [...prev.providers, ...curr.providers]
2932
- });
3261
+ function resourceFromSnapshots(source) {
3262
+ return new SnapshotResource(isSignal(source) ? source : computed(source));
3263
+ }
3264
+ class SnapshotResource {
3265
+ snapshot;
3266
+ constructor(snapshot) {
3267
+ this.snapshot = snapshot;
3268
+ }
3269
+ get state() {
3270
+ return this.snapshot();
3271
+ }
3272
+ value = computed(() => {
3273
+ if (this.state.status === 'error') {
3274
+ throw new ResourceValueError(this.state.error);
3275
+ }
3276
+ return this.state.value;
3277
+ });
3278
+ status = computed(() => this.state.status);
3279
+ error = computed(() => this.state.status === 'error' ? this.state.error : undefined);
3280
+ isLoading = computed(() => this.state.status === 'loading' || this.state.status === 'reloading');
3281
+ isValueDefined = computed(() => this.state.status !== 'error' && this.state.value !== undefined);
3282
+ hasValue() {
3283
+ return this.isValueDefined();
3284
+ }
3285
+ }
3286
+
3287
+ function debounced(source, wait, options) {
3288
+ if (isInParamsFunction()) {
3289
+ throw invalidResourceCreationInParams();
3290
+ }
3291
+ if (ngDevMode && !options?.injector) {
3292
+ assertInInjectionContext(debounced);
3293
+ }
3294
+ const injector = options?.injector ?? inject(Injector);
3295
+ let active;
3296
+ let pendingValue;
3297
+ injector.get(DestroyRef).onDestroy(() => {
3298
+ active = undefined;
3299
+ });
3300
+ const state = linkedSignal({
3301
+ source: () => {
3302
+ try {
3303
+ setInParamsFunction(true);
3304
+ return {
3305
+ value: source(),
3306
+ thrown: false
3307
+ };
3308
+ } catch (err) {
3309
+ rethrowFatalErrors(err);
3310
+ return {
3311
+ error: err,
3312
+ thrown: true
3313
+ };
3314
+ } finally {
3315
+ setInParamsFunction(false);
3316
+ }
3317
+ },
3318
+ computation: (res, previous) => {
3319
+ if (previous !== undefined) {
3320
+ return previous.value;
3321
+ }
3322
+ if (res.thrown) {
3323
+ return {
3324
+ status: 'error',
3325
+ error: res.error
3326
+ };
3327
+ }
3328
+ return {
3329
+ status: 'resolved',
3330
+ value: res.value
3331
+ };
3332
+ }
3333
+ });
3334
+ effect(() => {
3335
+ let value;
3336
+ try {
3337
+ setInParamsFunction(true);
3338
+ value = source();
3339
+ } catch (err) {
3340
+ rethrowFatalErrors(err);
3341
+ state.set({
3342
+ status: 'error',
3343
+ error: err
3344
+ });
3345
+ active = pendingValue = undefined;
3346
+ return;
3347
+ } finally {
3348
+ setInParamsFunction(false);
3349
+ }
3350
+ const currentState = untracked(state);
3351
+ const equal = options?.equal ?? Object.is;
3352
+ if (currentState.status === 'reloading' || currentState.status === 'loading') {
3353
+ if (equal(value, pendingValue)) return;
3354
+ } else if (currentState.status === 'resolved') {
3355
+ if (equal(value, currentState.value)) return;
3356
+ }
3357
+ const waitFn = typeof wait === 'number' ? () => new Promise(resolve => setTimeout(resolve, wait)) : wait;
3358
+ const result = waitFn(value, currentState);
3359
+ if (result === undefined) {
3360
+ state.set({
3361
+ status: 'resolved',
3362
+ value
3363
+ });
3364
+ active = pendingValue = undefined;
3365
+ } else {
3366
+ if (currentState.status !== 'loading' && currentState.status !== 'error') {
3367
+ state.set({
3368
+ status: 'loading',
3369
+ value: currentState.value
3370
+ });
3371
+ }
3372
+ active = result;
3373
+ pendingValue = value;
3374
+ result.then(() => {
3375
+ if (active === result) {
3376
+ state.set({
3377
+ status: 'resolved',
3378
+ value
3379
+ });
3380
+ active = pendingValue = undefined;
3381
+ }
3382
+ });
3383
+ }
2933
3384
  }, {
2934
- providers: []
3385
+ injector
2935
3386
  });
3387
+ return resourceFromSnapshots(state);
2936
3388
  }
2937
3389
 
2938
- const REQUEST = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST' : '', {
2939
- providedIn: 'platform',
2940
- factory: () => null
2941
- });
2942
- const RESPONSE_INIT = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'RESPONSE_INIT' : '', {
2943
- providedIn: 'platform',
2944
- factory: () => null
2945
- });
2946
- const REQUEST_CONTEXT = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST_CONTEXT' : '', {
2947
- providedIn: 'platform',
2948
- factory: () => null
2949
- });
3390
+ function isDevMode() {
3391
+ return typeof ngDevMode === 'undefined' || !!ngDevMode;
3392
+ }
3393
+ function enableProdMode() {
3394
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
3395
+ _global['ngDevMode'] = false;
3396
+ }
3397
+ }
2950
3398
 
2951
- export { APP_BOOTSTRAP_LISTENER, APP_ID, ApplicationInitStatus, ApplicationModule, ApplicationRef, COMPILER_OPTIONS, ChangeDetectorRef, ContentChild, ContentChildren, DOCUMENT, DefaultIterableDiffer, DestroyRef, ENVIRONMENT_INITIALIZER, EmbeddedViewRef, ErrorHandler, HOST_TAG_NAME, HostAttributeToken, Injectable, InjectionToken, Injector, IterableDiffers, KeyValueDiffers, LOCALE_ID, NgModule, NgZone, OutputEmitterRef, PLATFORM_INITIALIZER, PlatformRef, Query, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, TransferState, ViewChild, ViewChildren, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, afterRenderEffect, assertInInjectionContext, assertNotInReactiveContext, assertPlatform, booleanAttribute, computed, contentChild, contentChildren, createComponent, createPlatform, createPlatformFactory, destroyPlatform, enableProdMode, getModuleFactory, getNgModuleById, getPlatform, inject, input, isDevMode, isSignal, makeEnvironmentProviders, mergeApplicationConfig, model, numberAttribute, output, platformCore, provideAppInitializer, provideCheckNoChangesConfig, provideEnvironmentInitializer, providePlatformInitializer, provideStabilityDebugging, provideZoneChangeDetection, reflectComponentType, resourceFromSnapshots, runInInjectionContext, viewChild, viewChildren, AfterRenderManager as ɵAfterRenderManager, CLIENT_RENDER_MODE_FLAG as ɵCLIENT_RENDER_MODE_FLAG, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ChangeDetectionScheduler as ɵChangeDetectionScheduler, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, DEHYDRATED_BLOCK_REGISTRY as ɵDEHYDRATED_BLOCK_REGISTRY, ENABLE_ROOT_COMPONENT_BOOTSTRAP as ɵENABLE_ROOT_COMPONENT_BOOTSTRAP, EVENT_REPLAY_QUEUE as ɵEVENT_REPLAY_QUEUE, Framework as ɵFramework, IMAGE_CONFIG as ɵIMAGE_CONFIG, 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_BLOCK_ELEMENT_MAP as ɵJSACTION_BLOCK_ELEMENT_MAP, JSACTION_EVENT_CONTRACT as ɵJSACTION_EVENT_CONTRACT, NgModuleFactory as ɵNgModuleFactory, PERFORMANCE_MARK_PREFIX as ɵPERFORMANCE_MARK_PREFIX, PROVIDED_NG_ZONE as ɵPROVIDED_NG_ZONE, PROVIDED_ZONELESS as ɵPROVIDED_ZONELESS, PendingTasksInternal as ɵPendingTasksInternal, ProfilerEvent as ɵProfilerEvent, ComponentFactory as ɵRender3ComponentFactory, RuntimeError as ɵRuntimeError, SIGNAL as ɵSIGNAL, TracingService as ɵTracingService, ViewRef$1 as ɵViewRef, ZONELESS_ENABLED as ɵZONELESS_ENABLED, annotateForHydration as ɵannotateForHydration, ɵassertType, compileNgModuleFactory as ɵcompileNgModuleFactory, createOrReusePlatformInjector as ɵcreateOrReusePlatformInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, disableProfiling as ɵdisableProfiling, enableProfiling as ɵenableProfiling, formatRuntimeError as ɵformatRuntimeError, getClosestComponentName as ɵgetClosestComponentName, getComponentDef as ɵgetComponentDef, getDocument as ɵgetDocument, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalCreateApplication as ɵinternalCreateApplication, internalProvideZoneChangeDetection as ɵinternalProvideZoneChangeDetection, isPromise as ɵisPromise, performanceMarkFeature as ɵperformanceMarkFeature, provideZonelessChangeDetectionInternal as ɵprovideZonelessChangeDetectionInternal, resolveComponentResources as ɵresolveComponentResources, setClassMetadata as ɵsetClassMetadata, setClassMetadataAsync as ɵsetClassMetadataAsync, setInjectorProfilerContext as ɵsetInjectorProfilerContext, setLocaleId as ɵsetLocaleId, startMeasuring as ɵstartMeasuring, stopMeasuring as ɵstopMeasuring, stringify as ɵstringify, withDomHydration as ɵwithDomHydration, withEventReplay as ɵwithEventReplay, withI18nSupport as ɵwithI18nSupport, withIncrementalHydration as ɵwithIncrementalHydration, FactoryTarget as ɵɵFactoryTarget, __defineInjectable as ɵɵdefineInjectable, __defineInjector as ɵɵdefineInjector, __defineNgModule as ɵɵdefineNgModule, __inject as ɵɵinject, __injectAttribute as ɵɵinjectAttribute, ɵɵngDeclareClassMetadata, ɵɵngDeclareClassMetadataAsync, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe };
3399
+ export { APP_BOOTSTRAP_LISTENER, APP_ID, ApplicationInitStatus, ApplicationModule, ApplicationRef, COMPILER_OPTIONS, ChangeDetectorRef, ContentChild, ContentChildren, DOCUMENT, DefaultIterableDiffer, DestroyRef, ENVIRONMENT_INITIALIZER, EmbeddedViewRef, ErrorHandler, HOST_TAG_NAME, HostAttributeToken, Injectable, InjectionToken, Injector, IterableDiffers, KeyValueDiffers, LOCALE_ID, NgModule, NgZone, OutputEmitterRef, PLATFORM_INITIALIZER, PlatformRef, Query, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, Service, TransferState, ViewChild, ViewChildren, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, afterRenderEffect, assertInInjectionContext, assertNotInReactiveContext, assertPlatform, booleanAttribute, computed, contentChild, contentChildren, createComponent, createPlatform, createPlatformFactory, debounced, destroyPlatform, effect, enableProdMode, getModuleFactory, getNgModuleById, getPlatform, inject, injectAsync, input, isDevMode, isSignal, linkedSignal, makeEnvironmentProviders, mergeApplicationConfig, model, numberAttribute, onIdle, output, platformCore, provideAppInitializer, provideCheckNoChangesConfig, provideEnvironmentInitializer, providePlatformInitializer, provideStabilityDebugging, provideZoneChangeDetection, reflectComponentType, resourceFromSnapshots, runInInjectionContext, untracked, viewChild, viewChildren, AfterRenderManager as ɵAfterRenderManager, CLIENT_RENDER_MODE_FLAG as ɵCLIENT_RENDER_MODE_FLAG, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ChangeDetectionScheduler as ɵChangeDetectionScheduler, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, DEHYDRATED_BLOCK_REGISTRY as ɵDEHYDRATED_BLOCK_REGISTRY, ENABLE_ROOT_COMPONENT_BOOTSTRAP as ɵENABLE_ROOT_COMPONENT_BOOTSTRAP, EVENT_REPLAY_QUEUE as ɵEVENT_REPLAY_QUEUE, Framework as ɵFramework, IMAGE_CONFIG as ɵIMAGE_CONFIG, 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_BLOCK_ELEMENT_MAP as ɵJSACTION_BLOCK_ELEMENT_MAP, JSACTION_EVENT_CONTRACT as ɵJSACTION_EVENT_CONTRACT, NG_PROV_DEF as ɵNG_PROV_DEF, NgModuleFactory as ɵNgModuleFactory, PERFORMANCE_MARK_PREFIX as ɵPERFORMANCE_MARK_PREFIX, PROVIDED_NG_ZONE as ɵPROVIDED_NG_ZONE, PROVIDED_ZONELESS as ɵPROVIDED_ZONELESS, PendingTasksInternal as ɵPendingTasksInternal, ProfilerEvent as ɵProfilerEvent, R3Injector as ɵR3Injector, ComponentFactory as ɵRender3ComponentFactory, RuntimeError as ɵRuntimeError, SIGNAL as ɵSIGNAL, TracingService as ɵTracingService, ViewRef$1 as ɵViewRef, ZONELESS_ENABLED as ɵZONELESS_ENABLED, annotateForHydration as ɵannotateForHydration, ɵassertType, compileNgModuleFactory as ɵcompileNgModuleFactory, createOrReusePlatformInjector as ɵcreateOrReusePlatformInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, disableProfiling as ɵdisableProfiling, enableProfiling as ɵenableProfiling, formatRuntimeError as ɵformatRuntimeError, getComponentDef as ɵgetComponentDef, getDocument as ɵgetDocument, getLContext as ɵgetLContext, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalCreateApplication as ɵinternalCreateApplication, internalProvideZoneChangeDetection as ɵinternalProvideZoneChangeDetection, isPromise as ɵisPromise, performanceMarkFeature as ɵperformanceMarkFeature, promiseWithResolvers as ɵpromiseWithResolvers, provideZonelessChangeDetectionInternal as ɵprovideZonelessChangeDetectionInternal, resolveComponentResources as ɵresolveComponentResources, setClassMetadata as ɵsetClassMetadata, setClassMetadataAsync as ɵsetClassMetadataAsync, setInjectorProfilerContext as ɵsetInjectorProfilerContext, setLocaleId as ɵsetLocaleId, startMeasuring as ɵstartMeasuring, stopMeasuring as ɵstopMeasuring, stringify as ɵstringify, withDomHydration as ɵwithDomHydration, withEventReplay as ɵwithEventReplay, withI18nSupport as ɵwithI18nSupport, withIncrementalHydration as ɵwithIncrementalHydration, FactoryTarget as ɵɵFactoryTarget, __defineInjectable as ɵɵdefineInjectable, __defineInjector as ɵɵdefineInjector, __defineNgModule as ɵɵdefineNgModule, __inject as ɵɵinject, __injectAttribute as ɵɵinjectAttribute, ɵɵngDeclareClassMetadata, ɵɵngDeclareClassMetadataAsync, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵngDeclareService };
2952
3400
  //# sourceMappingURL=core.mjs.map