@absolutejs/absolute 0.19.0-beta.212 → 0.19.0-beta.214

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 (57) hide show
  1. package/.absolutejs/cache/angular-linker/03f269392dcdbe53b0482927caa1ff17.js +33 -0
  2. package/.absolutejs/cache/angular-linker/341d75bd709b8e3da5e0191e3ae7ff34.js +2029 -0
  3. package/.absolutejs/cache/angular-linker/54161bce55bb149350556317e341619b.js +2872 -0
  4. package/.absolutejs/cache/angular-linker/58ef0a50d4370cda2b180a0e28ccc9a0.js +381 -0
  5. package/.absolutejs/cache/angular-linker/6d5602e0777a6bf3dc286d1418e37eeb.js +593 -0
  6. package/.absolutejs/cache/angular-linker/73f3352125fe12196d76075dab653b06.js +2836 -0
  7. package/.absolutejs/cache/angular-linker/8d0343b38de78de9075d2b7aaef4a0d6.js +693 -0
  8. package/.absolutejs/cache/angular-linker/cd4015dfcb0e8b06d279f929ba472d70.js +122 -0
  9. package/.absolutejs/cache/angular-linker/d7949b8b530e790ee1d7c5f4d9f4e561.js +314 -0
  10. package/.absolutejs/cache/angular-linker/e1bf85e34581dfb0ed6555e030c158e2.js +1351 -0
  11. package/.absolutejs/prettier.cache.json +236 -0
  12. package/.absolutejs/tsc.tsbuildinfo +1 -0
  13. package/.absolutejs/tsconfig.tsbuildinfo +1 -1
  14. package/.absolutejs/tsconfig.vue-check.json +6 -0
  15. package/.absolutejs/vue-tsc.tsbuildinfo +1 -1
  16. package/build/.cache/images/47f6059ee156360b7a041933b4978cbcb2011a1c9a67d833558d233472be079b.data +0 -0
  17. package/build/.cache/images/47f6059ee156360b7a041933b4978cbcb2011a1c9a67d833558d233472be079b.meta +1 -0
  18. package/build/.cache/images/5099ad2f32e4636aa812b97dd0dff1d1b439e24b5e97b2d55fe4f77367f461a4.data +0 -0
  19. package/build/.cache/images/5099ad2f32e4636aa812b97dd0dff1d1b439e24b5e97b2d55fe4f77367f461a4.meta +1 -0
  20. package/build/.cache/images/6ee00034d791ddd8b7f3ec800a222632adaf1e8c9fcedc480c773466fc10d1d5.data +0 -0
  21. package/build/.cache/images/6ee00034d791ddd8b7f3ec800a222632adaf1e8c9fcedc480c773466fc10d1d5.meta +1 -0
  22. package/build/.cache/images/70714161d457f1df2ede250334bd6060a38a652f10f043791c77d853f3005930.data +0 -0
  23. package/build/.cache/images/70714161d457f1df2ede250334bd6060a38a652f10f043791c77d853f3005930.meta +1 -0
  24. package/build/.cache/images/7eda684ed9d49b20bd3f8a52c1d2567c7c01a8b73fd7f880a103c0ec3c14f475.data +0 -0
  25. package/build/.cache/images/7eda684ed9d49b20bd3f8a52c1d2567c7c01a8b73fd7f880a103c0ec3c14f475.meta +1 -0
  26. package/build/.cache/images/926071f8d8f974eb91ccf882b478526c5926bc6693d663cdd304c57e7b3e0746.data +0 -0
  27. package/build/.cache/images/926071f8d8f974eb91ccf882b478526c5926bc6693d663cdd304c57e7b3e0746.meta +1 -0
  28. package/build/.cache/images/99fa4c4518e49ec0b205f2c67f9d535672053b80c8637540f9ce759ae5f6bbce.data +0 -0
  29. package/build/.cache/images/99fa4c4518e49ec0b205f2c67f9d535672053b80c8637540f9ce759ae5f6bbce.meta +1 -0
  30. package/build/.cache/images/d6ecd32c804dc52e56da07bd7d05876ff7f02e2e193baa94e15d1cf9022404d7.data +0 -0
  31. package/build/.cache/images/d6ecd32c804dc52e56da07bd7d05876ff7f02e2e193baa94e15d1cf9022404d7.meta +1 -0
  32. package/build/.cache/images/e68219762a1b21ec08ddaf67023cbd689c7f23ab406efa076007b36e4d5844d4.data +0 -0
  33. package/build/.cache/images/e68219762a1b21ec08ddaf67023cbd689c7f23ab406efa076007b36e4d5844d4.meta +1 -0
  34. package/build/.cache/images/e6c1d2e1ea4f97ba38de446e595eb7e0a54f50e282f4d3e02d94d9fd17057066.data +0 -0
  35. package/build/.cache/images/e6c1d2e1ea4f97ba38de446e595eb7e0a54f50e282f4d3e02d94d9fd17057066.meta +1 -0
  36. package/build/.cache/images/f422de3006871f116d1e262ada57671fd9a77d6922b565de81cdc7c574fdccb2.data +0 -0
  37. package/build/.cache/images/f422de3006871f116d1e262ada57671fd9a77d6922b565de81cdc7c574fdccb2.meta +1 -0
  38. package/build/assets/jpg/test.jpg +0 -0
  39. package/build/sitemap.xml +3 -0
  40. package/dist/{Image-599vc5xz.vue → Image-k52pzpdh.vue} +71 -37
  41. package/dist/angular/components/image.component.js +27 -19
  42. package/dist/angular/index.js.map +2 -2
  43. package/dist/build.js +6 -12
  44. package/dist/build.js.map +5 -5
  45. package/dist/cli/index.js +53 -11
  46. package/dist/image-client/imageClient.js +1 -10
  47. package/dist/index.js +6 -12
  48. package/dist/index.js.map +6 -6
  49. package/dist/react/components/browser/index.js +1 -10
  50. package/dist/react/components/index.js +6 -12
  51. package/dist/react/components/index.js.map +4 -4
  52. package/dist/svelte/components/Image.svelte +8 -5
  53. package/dist/vue/components/Image.vue +71 -37
  54. package/dist/vue/components/index.js +1 -1
  55. package/package.json +1 -1
  56. package/scripts/build.ts +308 -295
  57. package/types/metadata.ts +7 -1
@@ -0,0 +1,2872 @@
1
+ /**
2
+ * @license Angular v21.2.6
3
+ * (c) 2010-2026 Google LLC. https://angular.dev/
4
+ * License: MIT
5
+ */
6
+
7
+ import { ɵɵinjectAttribute as __injectAttribute, createMultiResultQuerySignalFn, createSingleResultRequiredQuerySignalFn, createSingleResultOptionalQuerySignalFn, makePropDecorator, NgModuleFactory, COMPILER_OPTIONS, setJitOptions, isComponentResourceResolutionQueueEmpty, getCompilerFacade, resolveComponentResources, performanceMarkFeature, ApplicationRef, setClassMetadata, Injectable, IMAGE_CONFIG, getDocument, remove, isPromise, ApplicationInitStatus, LOCALE_ID, DEFAULT_LOCALE_ID, setLocaleId, createNgModuleRefWithProviders, optionsReducer, validAppIdInitializer, provideZonelessChangeDetectionInternal, publishDefaultGlobalUtils, PLATFORM_INITIALIZER, publishSignalConfiguration, checkNoChangesInternal, ChangeDetectionSchedulerImpl, UseExhaustiveCheckNoChanges, IS_EVENT_REPLAY_ENABLED, APP_ID, setStashFn, APP_BOOTSTRAP_LISTENER, JSACTION_EVENT_CONTRACT, JSACTION_BLOCK_ELEMENT_MAP, removeListeners, isIncrementalHydrationEnabled, 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, getRegisteredNgModuleType, ViewRef as ViewRef$1, isListLikeIterable, iterateListLike, isJsObject, ɵɵdefineNgModule as __defineNgModule, NgModule, 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, setClassMetadataAsync, angularCoreEnv, NOOP_AFTER_RENDER_REF, AfterRenderManager, TracingService, AfterRenderImpl, AfterRenderSequence, AFTER_RENDER_PHASES, isSignal, assertComponentDef, ComponentFactory } from './_debug_node-chunk.mjs';
8
+ 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, 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, getClosestComponentName as ɵgetClosestComponentName, 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';
9
+ import { RuntimeError, InjectionToken, getCurrentTNode, assertInInjectionContext, signalAsReadonlyFn, assertNgModuleType, Injector, makeEnvironmentProviders, ZONELESS_ENABLED, NgZone, ENVIRONMENT_INITIALIZER, SCHEDULE_IN_ROOT_ZONE_DEFAULT, SCHEDULE_IN_ROOT_ZONE, inject, ChangeDetectionScheduler, INTERNAL_APPLICATION_ERROR_HANDLER, ɵɵdefineInjectable as __defineInjectable, PendingTasksInternal, formatRuntimeError, ERROR_DETAILS_PAGE_BASE_URL, PROVIDED_ZONELESS, stringify, ɵɵinject as __inject, errorHandlerEnvironmentInitializer, runInInjectionContext, INJECTOR_SCOPE, provideEnvironmentInitializer, ErrorHandler, _global, unwrapRNode, CLEANUP, DOCUMENT, DOC_PAGE_BASE_URL, DEBUG_TASK_TRACKER, isComponentHost, getComponentLViewByIndex, DECLARATION_COMPONENT_VIEW, getLView, ɵɵdefineInjector as __defineInjector, isLContainer, hasI18n, RENDERER, unwrapLView, HOST, getComponentDef, assertTNode, isProjectionTNode, PARENT, CONTEXT, HEADER_OFFSET, TVIEW, isRootView, CONTAINER_HEADER_OFFSET, assertNotInReactiveContext, ViewContext, DestroyRef, setInjectorProfilerContext, emitAfterRenderEffectPhaseCreatedEvent, getNullInjector } from './_effect-chunk2.mjs';
10
+ 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 './_effect-chunk2.mjs';
11
+ import { OutputEmitterRef, computed, ResourceValueError } from './_resource-chunk.mjs';
12
+ export { linkedSignal, resource, untracked, ResourceImpl as ɵResourceImpl, encapsulateResourceError as ɵencapsulateResourceError, getOutputDestroyRef as ɵgetOutputDestroyRef } from './_resource-chunk.mjs';
13
+ import { Subscription } from 'rxjs';
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
+ export { setAlternateWeakRefImpl as ɵsetAlternateWeakRefImpl } from './_weak_ref-chunk.mjs';
17
+ export { setCurrentInjector as ɵsetCurrentInjector } from './_not_found-chunk.mjs';
18
+ import '@angular/core/primitives/signals';
19
+ import 'rxjs/operators';
20
+ import './_attribute-chunk.mjs';
21
+ import '@angular/core/primitives/di';
22
+ import './_untracked-chunk.mjs';
23
+ const REQUIRED_UNSET_VALUE = /* @__PURE__ */Symbol('InputSignalNode#UNSET');
24
+ const INPUT_SIGNAL_NODE = /* @__PURE__ */(() => {
25
+ return {
26
+ ...SIGNAL_NODE,
27
+ transformFn: undefined,
28
+ applyValueToInputSignal(node, value) {
29
+ signalSetFn(node, value);
30
+ }
31
+ };
32
+ })();
33
+ const ɵINPUT_SIGNAL_BRAND_WRITE_TYPE = /* @__PURE__ */Symbol();
34
+ function createInputSignal(initialValue, options) {
35
+ const node = Object.create(INPUT_SIGNAL_NODE);
36
+ node.value = initialValue;
37
+ node.transformFn = options?.transform;
38
+ function inputValueFn() {
39
+ producerAccessed(node);
40
+ if (node.value === REQUIRED_UNSET_VALUE) {
41
+ let message = null;
42
+ if (ngDevMode) {
43
+ const name = options?.debugName ?? options?.alias;
44
+ message = `Input${name ? ` "${name}"` : ''} is required but no value is available yet.`;
45
+ }
46
+ throw new RuntimeError(-950, message);
47
+ }
48
+ return node.value;
49
+ }
50
+ inputValueFn[SIGNAL] = node;
51
+ if (ngDevMode) {
52
+ inputValueFn.toString = () => `[Input Signal: ${inputValueFn()}]`;
53
+ node.debugName = options?.debugName;
54
+ }
55
+ return inputValueFn;
56
+ }
57
+ var FactoryTarget;
58
+ (function (FactoryTarget) {
59
+ FactoryTarget[FactoryTarget["Directive"] = 0] = "Directive";
60
+ FactoryTarget[FactoryTarget["Component"] = 1] = "Component";
61
+ FactoryTarget[FactoryTarget["Injectable"] = 2] = "Injectable";
62
+ FactoryTarget[FactoryTarget["Pipe"] = 3] = "Pipe";
63
+ FactoryTarget[FactoryTarget["NgModule"] = 4] = "NgModule";
64
+ })(FactoryTarget || (FactoryTarget = {}));
65
+ var R3TemplateDependencyKind;
66
+ (function (R3TemplateDependencyKind) {
67
+ R3TemplateDependencyKind[R3TemplateDependencyKind["Directive"] = 0] = "Directive";
68
+ R3TemplateDependencyKind[R3TemplateDependencyKind["Pipe"] = 1] = "Pipe";
69
+ R3TemplateDependencyKind[R3TemplateDependencyKind["NgModule"] = 2] = "NgModule";
70
+ })(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
71
+ var ViewEncapsulation;
72
+ (function (ViewEncapsulation) {
73
+ ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated";
74
+ ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None";
75
+ ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom";
76
+ ViewEncapsulation[ViewEncapsulation["ExperimentalIsolatedShadowDom"] = 4] = "ExperimentalIsolatedShadowDom";
77
+ })(ViewEncapsulation || (ViewEncapsulation = {}));
78
+ var Framework;
79
+ (function (Framework) {
80
+ Framework["Angular"] = "angular";
81
+ Framework["ACX"] = "acx";
82
+ Framework["Wiz"] = "wiz";
83
+ })(Framework || (Framework = {}));
84
+ class HostAttributeToken {
85
+ attributeName;
86
+ constructor(attributeName) {
87
+ this.attributeName = attributeName;
88
+ }
89
+ __NG_ELEMENT_ID__ = () => __injectAttribute(this.attributeName);
90
+ toString() {
91
+ return `HostAttributeToken ${this.attributeName}`;
92
+ }
93
+ }
94
+ const HOST_TAG_NAME = /* @__PURE__ */(() => {
95
+ const HOST_TAG_NAME_TOKEN = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'HOST_TAG_NAME' : '');
96
+ HOST_TAG_NAME_TOKEN.__NG_ELEMENT_ID__ = flags => {
97
+ const tNode = getCurrentTNode();
98
+ if (tNode === null) {
99
+ throw new RuntimeError(-204, ngDevMode && 'HOST_TAG_NAME can only be injected in directives and components ' + 'during construction time (in a class constructor or as a class field initializer)');
100
+ }
101
+ if (tNode.type & 2) {
102
+ return tNode.value;
103
+ }
104
+ if (flags & 8) {
105
+ return null;
106
+ }
107
+ throw new RuntimeError(-204, ngDevMode && `HOST_TAG_NAME was used on ${getDevModeNodeName(tNode)} which doesn't have an underlying element in the DOM. ` + `This is invalid, and so the dependency should be marked as optional.`);
108
+ };
109
+ return HOST_TAG_NAME_TOKEN;
110
+ })();
111
+ function getDevModeNodeName(tNode) {
112
+ if (tNode.type & 8) {
113
+ return 'an <ng-container>';
114
+ } else if (tNode.type & 4) {
115
+ return 'an <ng-template>';
116
+ } else if (tNode.type & 128) {
117
+ return 'an @let declaration';
118
+ } else {
119
+ return 'a node';
120
+ }
121
+ }
122
+ function output(opts) {
123
+ ngDevMode && assertInInjectionContext(output);
124
+ return new OutputEmitterRef();
125
+ }
126
+ function inputFunction(initialValue, opts) {
127
+ ngDevMode && assertInInjectionContext(input);
128
+ return createInputSignal(initialValue, opts);
129
+ }
130
+ function inputRequiredFunction(opts) {
131
+ ngDevMode && assertInInjectionContext(input);
132
+ return createInputSignal(REQUIRED_UNSET_VALUE, opts);
133
+ }
134
+ const input = (() => {
135
+ inputFunction.required = inputRequiredFunction;
136
+ return inputFunction;
137
+ })();
138
+ function viewChildFn(locator, opts) {
139
+ ngDevMode && assertInInjectionContext(viewChild);
140
+ return createSingleResultOptionalQuerySignalFn(opts);
141
+ }
142
+ function viewChildRequiredFn(locator, opts) {
143
+ ngDevMode && assertInInjectionContext(viewChild);
144
+ return createSingleResultRequiredQuerySignalFn(opts);
145
+ }
146
+ const viewChild = (() => {
147
+ viewChildFn.required = viewChildRequiredFn;
148
+ return viewChildFn;
149
+ })();
150
+ function viewChildren(locator, opts) {
151
+ ngDevMode && assertInInjectionContext(viewChildren);
152
+ return createMultiResultQuerySignalFn(opts);
153
+ }
154
+ function contentChildFn(locator, opts) {
155
+ ngDevMode && assertInInjectionContext(contentChild);
156
+ return createSingleResultOptionalQuerySignalFn(opts);
157
+ }
158
+ function contentChildRequiredFn(locator, opts) {
159
+ ngDevMode && assertInInjectionContext(contentChildren);
160
+ return createSingleResultRequiredQuerySignalFn(opts);
161
+ }
162
+ const contentChild = (() => {
163
+ contentChildFn.required = contentChildRequiredFn;
164
+ return contentChildFn;
165
+ })();
166
+ function contentChildren(locator, opts) {
167
+ return createMultiResultQuerySignalFn(opts);
168
+ }
169
+ function createModelSignal(initialValue, opts) {
170
+ const node = Object.create(INPUT_SIGNAL_NODE);
171
+ const emitterRef = new OutputEmitterRef();
172
+ node.value = initialValue;
173
+ function getter() {
174
+ producerAccessed(node);
175
+ assertModelSet(node.value);
176
+ return node.value;
177
+ }
178
+ getter[SIGNAL] = node;
179
+ getter.asReadonly = signalAsReadonlyFn.bind(getter);
180
+ getter.set = newValue => {
181
+ if (!node.equal(node.value, newValue)) {
182
+ signalSetFn(node, newValue);
183
+ emitterRef.emit(newValue);
184
+ }
185
+ };
186
+ getter.update = updateFn => {
187
+ assertModelSet(node.value);
188
+ getter.set(updateFn(node.value));
189
+ };
190
+ getter.subscribe = emitterRef.subscribe.bind(emitterRef);
191
+ getter.destroyRef = emitterRef.destroyRef;
192
+ if (ngDevMode) {
193
+ getter.toString = () => `[Model Signal: ${getter()}]`;
194
+ node.debugName = opts?.debugName;
195
+ }
196
+ return getter;
197
+ }
198
+ function assertModelSet(value) {
199
+ if (value === REQUIRED_UNSET_VALUE) {
200
+ throw new RuntimeError(952, ngDevMode && 'Model is required but no value is available yet.');
201
+ }
202
+ }
203
+ function modelFunction(initialValue, opts) {
204
+ ngDevMode && assertInInjectionContext(model);
205
+ return createModelSignal(initialValue, opts);
206
+ }
207
+ function modelRequiredFunction(opts) {
208
+ ngDevMode && assertInInjectionContext(model);
209
+ return createModelSignal(REQUIRED_UNSET_VALUE, opts);
210
+ }
211
+ const model = (() => {
212
+ modelFunction.required = modelRequiredFunction;
213
+ return modelFunction;
214
+ })();
215
+ const emitDistinctChangesOnlyDefaultValue = true;
216
+ class Query {}
217
+ const ContentChildren = makePropDecorator('ContentChildren', (selector, opts = {}) => ({
218
+ selector,
219
+ first: false,
220
+ isViewQuery: false,
221
+ descendants: false,
222
+ emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,
223
+ ...opts
224
+ }), Query);
225
+ const ContentChild = makePropDecorator('ContentChild', (selector, opts = {}) => ({
226
+ selector,
227
+ first: true,
228
+ isViewQuery: false,
229
+ descendants: true,
230
+ ...opts
231
+ }), Query);
232
+ const ViewChildren = makePropDecorator('ViewChildren', (selector, opts = {}) => ({
233
+ selector,
234
+ first: false,
235
+ isViewQuery: true,
236
+ descendants: true,
237
+ emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,
238
+ ...opts
239
+ }), Query);
240
+ const ViewChild = makePropDecorator('ViewChild', (selector, opts) => ({
241
+ selector,
242
+ first: true,
243
+ isViewQuery: true,
244
+ descendants: true,
245
+ ...opts
246
+ }), Query);
247
+ function compileNgModuleFactory(injector, options, moduleType) {
248
+ ngDevMode && assertNgModuleType(moduleType);
249
+ const moduleFactory = new NgModuleFactory(moduleType);
250
+ if (typeof ngJitMode !== 'undefined' && !ngJitMode) {
251
+ return Promise.resolve(moduleFactory);
252
+ }
253
+ const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);
254
+ setJitOptions({
255
+ defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)),
256
+ preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces))
257
+ });
258
+ if (isComponentResourceResolutionQueueEmpty()) {
259
+ return Promise.resolve(moduleFactory);
260
+ }
261
+ const compilerProviders = compilerOptions.flatMap(option => option.providers ?? []);
262
+ if (compilerProviders.length === 0) {
263
+ return Promise.resolve(moduleFactory);
264
+ }
265
+ const compiler = getCompilerFacade({
266
+ usage: 0,
267
+ kind: 'NgModule',
268
+ type: moduleType
269
+ });
270
+ const compilerInjector = Injector.create({
271
+ providers: compilerProviders
272
+ });
273
+ const resourceLoader = compilerInjector.get(compiler.ResourceLoader);
274
+ return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url))).then(() => moduleFactory);
275
+ }
276
+ function _lastDefined(args) {
277
+ for (let i = args.length - 1; i >= 0; i--) {
278
+ if (args[i] !== undefined) {
279
+ return args[i];
280
+ }
281
+ }
282
+ return undefined;
283
+ }
284
+ class NgZoneChangeDetectionScheduler {
285
+ zone = inject(NgZone);
286
+ changeDetectionScheduler = inject(ChangeDetectionScheduler);
287
+ applicationRef = inject(ApplicationRef);
288
+ applicationErrorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER);
289
+ _onMicrotaskEmptySubscription;
290
+ initialize() {
291
+ if (this._onMicrotaskEmptySubscription) {
292
+ return;
293
+ }
294
+ this._onMicrotaskEmptySubscription = this.zone.onMicrotaskEmpty.subscribe({
295
+ next: () => {
296
+ if (this.changeDetectionScheduler.runningTick) {
297
+ return;
298
+ }
299
+ this.zone.run(() => {
300
+ try {
301
+ this.applicationRef.dirtyFlags |= 1;
302
+ this.applicationRef._tick();
303
+ } catch (e) {
304
+ this.applicationErrorHandler(e);
305
+ }
306
+ });
307
+ }
308
+ });
309
+ }
310
+ ngOnDestroy() {
311
+ this._onMicrotaskEmptySubscription?.unsubscribe();
312
+ }
313
+ static ɵfac = function NgZoneChangeDetectionScheduler_Factory(__ngFactoryType__) {
314
+ return new (__ngFactoryType__ || NgZoneChangeDetectionScheduler)();
315
+ };
316
+ static ɵprov = /*@__PURE__*/__defineInjectable({
317
+ token: NgZoneChangeDetectionScheduler,
318
+ factory: NgZoneChangeDetectionScheduler.ɵfac,
319
+ providedIn: 'root'
320
+ });
321
+ }
322
+ (() => {
323
+ (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgZoneChangeDetectionScheduler, [{
324
+ type: Injectable,
325
+ args: [{
326
+ providedIn: 'root'
327
+ }]
328
+ }], null, null);
329
+ })();
330
+ const PROVIDED_NG_ZONE = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'provideZoneChangeDetection token' : '', {
331
+ factory: () => false
332
+ });
333
+ function internalProvideZoneChangeDetection({
334
+ ngZoneFactory,
335
+ scheduleInRootZone
336
+ }) {
337
+ ngZoneFactory ??= () => new NgZone({
338
+ ...getNgZoneOptions(),
339
+ scheduleInRootZone
340
+ });
341
+ return [{
342
+ provide: ZONELESS_ENABLED,
343
+ useValue: false
344
+ }, {
345
+ provide: NgZone,
346
+ useFactory: ngZoneFactory
347
+ }, {
348
+ provide: ENVIRONMENT_INITIALIZER,
349
+ multi: true,
350
+ useFactory: () => {
351
+ const ngZoneChangeDetectionScheduler = inject(NgZoneChangeDetectionScheduler, {
352
+ optional: true
353
+ });
354
+ if ((typeof ngDevMode === 'undefined' || ngDevMode) && ngZoneChangeDetectionScheduler === null) {
355
+ 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.');
356
+ }
357
+ return () => ngZoneChangeDetectionScheduler.initialize();
358
+ }
359
+ }, {
360
+ provide: ENVIRONMENT_INITIALIZER,
361
+ multi: true,
362
+ useFactory: () => {
363
+ const service = inject(ZoneStablePendingTask);
364
+ return () => {
365
+ service.initialize();
366
+ };
367
+ }
368
+ }, {
369
+ provide: SCHEDULE_IN_ROOT_ZONE,
370
+ useValue: scheduleInRootZone ?? SCHEDULE_IN_ROOT_ZONE_DEFAULT
371
+ }];
372
+ }
373
+ function provideZoneChangeDetection(options) {
374
+ const scheduleInRootZone = options?.scheduleInRootZone;
375
+ const zoneProviders = internalProvideZoneChangeDetection({
376
+ ngZoneFactory: () => {
377
+ const ngZoneOptions = getNgZoneOptions(options);
378
+ ngZoneOptions.scheduleInRootZone = scheduleInRootZone;
379
+ if (ngZoneOptions.shouldCoalesceEventChangeDetection) {
380
+ performanceMarkFeature('NgZone_CoalesceEvent');
381
+ }
382
+ return new NgZone(ngZoneOptions);
383
+ },
384
+ scheduleInRootZone
385
+ });
386
+ return makeEnvironmentProviders([{
387
+ provide: PROVIDED_NG_ZONE,
388
+ useValue: true
389
+ }, zoneProviders]);
390
+ }
391
+ function getNgZoneOptions(options) {
392
+ return {
393
+ enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,
394
+ shouldCoalesceEventChangeDetection: options?.eventCoalescing ?? false,
395
+ shouldCoalesceRunChangeDetection: options?.runCoalescing ?? false
396
+ };
397
+ }
398
+ class ZoneStablePendingTask {
399
+ subscription = new Subscription();
400
+ initialized = false;
401
+ zone = inject(NgZone);
402
+ pendingTasks = inject(PendingTasksInternal);
403
+ initialize() {
404
+ if (this.initialized) {
405
+ return;
406
+ }
407
+ this.initialized = true;
408
+ let task = null;
409
+ if (!this.zone.isStable && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {
410
+ task = this.pendingTasks.add();
411
+ }
412
+ this.zone.runOutsideAngular(() => {
413
+ this.subscription.add(this.zone.onStable.subscribe(() => {
414
+ NgZone.assertNotInAngularZone();
415
+ queueMicrotask(() => {
416
+ if (task !== null && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {
417
+ this.pendingTasks.remove(task);
418
+ task = null;
419
+ }
420
+ });
421
+ }));
422
+ });
423
+ this.subscription.add(this.zone.onUnstable.subscribe(() => {
424
+ NgZone.assertInAngularZone();
425
+ task ??= this.pendingTasks.add();
426
+ }));
427
+ }
428
+ ngOnDestroy() {
429
+ this.subscription.unsubscribe();
430
+ }
431
+ static ɵfac = function ZoneStablePendingTask_Factory(__ngFactoryType__) {
432
+ return new (__ngFactoryType__ || ZoneStablePendingTask)();
433
+ };
434
+ static ɵprov = /*@__PURE__*/__defineInjectable({
435
+ token: ZoneStablePendingTask,
436
+ factory: ZoneStablePendingTask.ɵfac,
437
+ providedIn: 'root'
438
+ });
439
+ }
440
+ (() => {
441
+ (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ZoneStablePendingTask, [{
442
+ type: Injectable,
443
+ args: [{
444
+ providedIn: 'root'
445
+ }]
446
+ }], null, null);
447
+ })();
448
+ const SCAN_DELAY = 200;
449
+ const OVERSIZED_IMAGE_TOLERANCE = 1200;
450
+ class ImagePerformanceWarning {
451
+ window = null;
452
+ observer = null;
453
+ options = inject(IMAGE_CONFIG);
454
+ lcpImageUrl;
455
+ start() {
456
+ if (typeof ngServerMode !== 'undefined' && ngServerMode || typeof PerformanceObserver === 'undefined' || this.options?.disableImageSizeWarning && this.options?.disableImageLazyLoadWarning) {
457
+ return;
458
+ }
459
+ this.observer = this.initPerformanceObserver();
460
+ const doc = getDocument();
461
+ const win = doc.defaultView;
462
+ if (win) {
463
+ this.window = win;
464
+ const waitToScan = () => {
465
+ setTimeout(this.scanImages.bind(this), SCAN_DELAY);
466
+ };
467
+ const setup = () => {
468
+ if (doc.readyState === 'complete') {
469
+ waitToScan();
470
+ } else {
471
+ this.window?.addEventListener('load', waitToScan, {
472
+ once: true
473
+ });
474
+ }
475
+ };
476
+ if (typeof Zone !== 'undefined') {
477
+ Zone.root.run(() => setup());
478
+ } else {
479
+ setup();
480
+ }
481
+ }
482
+ }
483
+ ngOnDestroy() {
484
+ this.observer?.disconnect();
485
+ }
486
+ initPerformanceObserver() {
487
+ if (typeof PerformanceObserver === 'undefined') {
488
+ return null;
489
+ }
490
+ const observer = new PerformanceObserver(entryList => {
491
+ const entries = entryList.getEntries();
492
+ if (entries.length === 0) return;
493
+ const lcpElement = entries[entries.length - 1];
494
+ const imgSrc = lcpElement.element?.src ?? '';
495
+ if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:')) return;
496
+ this.lcpImageUrl = imgSrc;
497
+ });
498
+ observer.observe({
499
+ type: 'largest-contentful-paint',
500
+ buffered: true
501
+ });
502
+ return observer;
503
+ }
504
+ scanImages() {
505
+ const images = getDocument().querySelectorAll('img');
506
+ let lcpElementFound,
507
+ lcpElementLoadedCorrectly = false;
508
+ for (let index = 0; index < images.length; index++) {
509
+ const image = images[index];
510
+ if (!image) {
511
+ continue;
512
+ }
513
+ if (!this.options?.disableImageSizeWarning) {
514
+ if (!image.getAttribute('ng-img') && this.isOversized(image)) {
515
+ logOversizedImageWarning(image.src);
516
+ }
517
+ }
518
+ if (!this.options?.disableImageLazyLoadWarning && this.lcpImageUrl) {
519
+ if (image.src === this.lcpImageUrl) {
520
+ lcpElementFound = true;
521
+ if (image.loading !== 'lazy' || image.getAttribute('ng-img')) {
522
+ lcpElementLoadedCorrectly = true;
523
+ }
524
+ }
525
+ }
526
+ }
527
+ if (lcpElementFound && !lcpElementLoadedCorrectly && this.lcpImageUrl && !this.options?.disableImageLazyLoadWarning) {
528
+ logLazyLCPWarning(this.lcpImageUrl);
529
+ }
530
+ }
531
+ isOversized(image) {
532
+ if (!this.window) {
533
+ return false;
534
+ }
535
+ const nonOversizedImageExtentions = ['.svg'];
536
+ const imageSource = (image.src || '').toLowerCase();
537
+ if (nonOversizedImageExtentions.some(extension => imageSource.endsWith(extension))) {
538
+ return false;
539
+ }
540
+ const computedStyle = this.window.getComputedStyle(image);
541
+ let renderedWidth = parseFloat(computedStyle.getPropertyValue('width'));
542
+ let renderedHeight = parseFloat(computedStyle.getPropertyValue('height'));
543
+ const boxSizing = computedStyle.getPropertyValue('box-sizing');
544
+ const objectFit = computedStyle.getPropertyValue('object-fit');
545
+ if (objectFit === `cover`) {
546
+ return false;
547
+ }
548
+ if (boxSizing === 'border-box') {
549
+ const paddingTop = computedStyle.getPropertyValue('padding-top');
550
+ const paddingRight = computedStyle.getPropertyValue('padding-right');
551
+ const paddingBottom = computedStyle.getPropertyValue('padding-bottom');
552
+ const paddingLeft = computedStyle.getPropertyValue('padding-left');
553
+ renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft);
554
+ renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom);
555
+ }
556
+ const intrinsicWidth = image.naturalWidth;
557
+ const intrinsicHeight = image.naturalHeight;
558
+ const recommendedWidth = this.window.devicePixelRatio * renderedWidth;
559
+ const recommendedHeight = this.window.devicePixelRatio * renderedHeight;
560
+ const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;
561
+ const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;
562
+ return oversizedWidth || oversizedHeight;
563
+ }
564
+ static ɵfac = function ImagePerformanceWarning_Factory(__ngFactoryType__) {
565
+ return new (__ngFactoryType__ || ImagePerformanceWarning)();
566
+ };
567
+ static ɵprov = /*@__PURE__*/__defineInjectable({
568
+ token: ImagePerformanceWarning,
569
+ factory: ImagePerformanceWarning.ɵfac,
570
+ providedIn: 'root'
571
+ });
572
+ }
573
+ (() => {
574
+ (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ImagePerformanceWarning, [{
575
+ type: Injectable,
576
+ args: [{
577
+ providedIn: 'root'
578
+ }]
579
+ }], null, null);
580
+ })();
581
+ function logLazyLCPWarning(src) {
582
+ 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`));
583
+ }
584
+ function logOversizedImageWarning(src) {
585
+ 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`));
586
+ }
587
+ const PLATFORM_DESTROY_LISTENERS = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'PlatformDestroyListeners' : '');
588
+ const ENABLE_ROOT_COMPONENT_BOOTSTRAP = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'ENABLE_ROOT_COMPONENT_BOOTSTRAP' : '');
589
+ function isApplicationBootstrapConfig(config) {
590
+ return !config.moduleRef;
591
+ }
592
+ function bootstrap(config) {
593
+ const envInjector = isApplicationBootstrapConfig(config) ? config.r3Injector : config.moduleRef.injector;
594
+ const ngZone = envInjector.get(NgZone);
595
+ return ngZone.run(() => {
596
+ if (isApplicationBootstrapConfig(config)) {
597
+ config.r3Injector.resolveInjectorInitializers();
598
+ } else {
599
+ config.moduleRef.resolveInjectorInitializers();
600
+ }
601
+ const exceptionHandler = envInjector.get(INTERNAL_APPLICATION_ERROR_HANDLER);
602
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
603
+ if (envInjector.get(PROVIDED_ZONELESS) && envInjector.get(PROVIDED_NG_ZONE)) {
604
+ 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.'));
605
+ }
606
+ }
607
+ let onErrorSubscription;
608
+ ngZone.runOutsideAngular(() => {
609
+ onErrorSubscription = ngZone.onError.subscribe({
610
+ next: exceptionHandler
611
+ });
612
+ });
613
+ if (isApplicationBootstrapConfig(config)) {
614
+ const destroyListener = () => envInjector.destroy();
615
+ const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);
616
+ onPlatformDestroyListeners.add(destroyListener);
617
+ envInjector.onDestroy(() => {
618
+ onErrorSubscription.unsubscribe();
619
+ onPlatformDestroyListeners.delete(destroyListener);
620
+ });
621
+ } else {
622
+ const destroyListener = () => config.moduleRef.destroy();
623
+ const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);
624
+ onPlatformDestroyListeners.add(destroyListener);
625
+ config.moduleRef.onDestroy(() => {
626
+ remove(config.allPlatformModules, config.moduleRef);
627
+ onErrorSubscription.unsubscribe();
628
+ onPlatformDestroyListeners.delete(destroyListener);
629
+ });
630
+ }
631
+ return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {
632
+ const pendingTasks = envInjector.get(PendingTasksInternal);
633
+ const taskId = pendingTasks.add();
634
+ const initStatus = envInjector.get(ApplicationInitStatus);
635
+ initStatus.runInitializers();
636
+ return initStatus.donePromise.then(() => {
637
+ const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);
638
+ setLocaleId(localeId || DEFAULT_LOCALE_ID);
639
+ const enableRootComponentbootstrap = envInjector.get(ENABLE_ROOT_COMPONENT_BOOTSTRAP, true);
640
+ if (!enableRootComponentbootstrap) {
641
+ if (isApplicationBootstrapConfig(config)) {
642
+ return envInjector.get(ApplicationRef);
643
+ }
644
+ config.allPlatformModules.push(config.moduleRef);
645
+ return config.moduleRef;
646
+ }
647
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
648
+ const imagePerformanceService = envInjector.get(ImagePerformanceWarning);
649
+ imagePerformanceService.start();
650
+ }
651
+ if (isApplicationBootstrapConfig(config)) {
652
+ const appRef = envInjector.get(ApplicationRef);
653
+ if (config.rootComponent !== undefined) {
654
+ appRef.bootstrap(config.rootComponent);
655
+ }
656
+ return appRef;
657
+ } else {
658
+ moduleBootstrapImpl?.(config.moduleRef, config.allPlatformModules);
659
+ return config.moduleRef;
660
+ }
661
+ }).finally(() => void pendingTasks.remove(taskId));
662
+ });
663
+ });
664
+ }
665
+ let moduleBootstrapImpl;
666
+ function setModuleBootstrapImpl() {
667
+ moduleBootstrapImpl = _moduleDoBootstrap;
668
+ }
669
+ function _moduleDoBootstrap(moduleRef, allPlatformModules) {
670
+ const appRef = moduleRef.injector.get(ApplicationRef);
671
+ if (moduleRef._bootstrapComponents.length > 0) {
672
+ moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));
673
+ } else if (moduleRef.instance.ngDoBootstrap) {
674
+ moduleRef.instance.ngDoBootstrap(appRef);
675
+ } else {
676
+ 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.`);
677
+ }
678
+ allPlatformModules.push(moduleRef);
679
+ }
680
+ function _callAndReportToErrorHandler(errorHandler, ngZone, callback) {
681
+ try {
682
+ const result = callback();
683
+ if (isPromise(result)) {
684
+ return result.catch(e => {
685
+ ngZone.runOutsideAngular(() => errorHandler(e));
686
+ throw e;
687
+ });
688
+ }
689
+ return result;
690
+ } catch (e) {
691
+ ngZone.runOutsideAngular(() => errorHandler(e));
692
+ throw e;
693
+ }
694
+ }
695
+ class PlatformRef {
696
+ _injector;
697
+ _modules = [];
698
+ _destroyListeners = [];
699
+ _destroyed = false;
700
+ constructor(_injector) {
701
+ this._injector = _injector;
702
+ }
703
+ bootstrapModuleFactory(moduleFactory, options) {
704
+ const allAppProviders = [provideZonelessChangeDetectionInternal(), ...(options?.applicationProviders ?? []), errorHandlerEnvironmentInitializer, ...(ngDevMode ? [validAppIdInitializer] : [])];
705
+ const moduleRef = createNgModuleRefWithProviders(moduleFactory.moduleType, this.injector, allAppProviders);
706
+ setModuleBootstrapImpl();
707
+ return bootstrap({
708
+ moduleRef,
709
+ allPlatformModules: this._modules,
710
+ platformInjector: this.injector
711
+ });
712
+ }
713
+ bootstrapModule(moduleType, compilerOptions = []) {
714
+ const options = optionsReducer({}, compilerOptions);
715
+ setModuleBootstrapImpl();
716
+ return compileNgModuleFactory(this.injector, options, moduleType).then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));
717
+ }
718
+ onDestroy(callback) {
719
+ this._destroyListeners.push(callback);
720
+ }
721
+ get injector() {
722
+ return this._injector;
723
+ }
724
+ destroy() {
725
+ if (this._destroyed) {
726
+ throw new RuntimeError(404, ngDevMode && 'The platform has already been destroyed!');
727
+ }
728
+ this._modules.slice().forEach(module => module.destroy());
729
+ this._destroyListeners.forEach(listener => listener());
730
+ const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null);
731
+ if (destroyListeners) {
732
+ destroyListeners.forEach(listener => listener());
733
+ destroyListeners.clear();
734
+ }
735
+ this._destroyed = true;
736
+ }
737
+ get destroyed() {
738
+ return this._destroyed;
739
+ }
740
+ static ɵfac = function PlatformRef_Factory(__ngFactoryType__) {
741
+ return new (__ngFactoryType__ || PlatformRef)(__inject(Injector));
742
+ };
743
+ static ɵprov = /*@__PURE__*/__defineInjectable({
744
+ token: PlatformRef,
745
+ factory: PlatformRef.ɵfac,
746
+ providedIn: 'platform'
747
+ });
748
+ }
749
+ (() => {
750
+ (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{
751
+ type: Injectable,
752
+ args: [{
753
+ providedIn: 'platform'
754
+ }]
755
+ }], () => [{
756
+ type: Injector
757
+ }], null);
758
+ })();
759
+ let _platformInjector = null;
760
+ function createPlatform(injector) {
761
+ if (getPlatform()) {
762
+ throw new RuntimeError(400, ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.');
763
+ }
764
+ publishDefaultGlobalUtils();
765
+ publishSignalConfiguration();
766
+ _platformInjector = typeof ngServerMode === 'undefined' || !ngServerMode ? injector : null;
767
+ const platform = injector.get(PlatformRef);
768
+ runPlatformInitializers(injector);
769
+ return platform;
770
+ }
771
+ function createPlatformFactory(parentPlatformFactory, name, providers = []) {
772
+ const desc = `Platform: ${name}`;
773
+ const marker = new InjectionToken(desc);
774
+ return (extraProviders = []) => {
775
+ let platform = getPlatform();
776
+ if (!platform) {
777
+ const platformProviders = [...providers, ...extraProviders, {
778
+ provide: marker,
779
+ useValue: true
780
+ }];
781
+ platform = parentPlatformFactory?.(platformProviders) ?? createPlatform(createPlatformInjector(platformProviders, desc));
782
+ }
783
+ return typeof ngServerMode !== 'undefined' && ngServerMode ? platform : assertPlatform(marker);
784
+ };
785
+ }
786
+ function createPlatformInjector(providers = [], name) {
787
+ return Injector.create({
788
+ name,
789
+ providers: [{
790
+ provide: INJECTOR_SCOPE,
791
+ useValue: 'platform'
792
+ }, {
793
+ provide: PLATFORM_DESTROY_LISTENERS,
794
+ useValue: new Set([() => _platformInjector = null])
795
+ }, ...providers]
796
+ });
797
+ }
798
+ function assertPlatform(requiredToken) {
799
+ const platform = getPlatform();
800
+ if (!platform) {
801
+ throw new RuntimeError(-401, ngDevMode && 'No platform exists!');
802
+ }
803
+ if ((typeof ngDevMode === 'undefined' || ngDevMode) && !platform.injector.get(requiredToken, null)) {
804
+ throw new RuntimeError(400, 'A platform with a different configuration has been created. Please destroy it first.');
805
+ }
806
+ return platform;
807
+ }
808
+ function getPlatform() {
809
+ if (typeof ngServerMode !== 'undefined' && ngServerMode) {
810
+ return null;
811
+ }
812
+ return _platformInjector?.get(PlatformRef) ?? null;
813
+ }
814
+ function destroyPlatform() {
815
+ getPlatform()?.destroy();
816
+ }
817
+ function createOrReusePlatformInjector(providers = []) {
818
+ if (_platformInjector) return _platformInjector;
819
+ publishDefaultGlobalUtils();
820
+ const injector = createPlatformInjector(providers);
821
+ if (typeof ngServerMode === 'undefined' || !ngServerMode) {
822
+ _platformInjector = injector;
823
+ }
824
+ publishSignalConfiguration();
825
+ runPlatformInitializers(injector);
826
+ return injector;
827
+ }
828
+ function providePlatformInitializer(initializerFn) {
829
+ return {
830
+ provide: PLATFORM_INITIALIZER,
831
+ useValue: initializerFn,
832
+ multi: true
833
+ };
834
+ }
835
+ function runPlatformInitializers(injector) {
836
+ const inits = injector.get(PLATFORM_INITIALIZER, null);
837
+ runInInjectionContext(injector, () => {
838
+ inits?.forEach(init => init());
839
+ });
840
+ }
841
+ function exhaustiveCheckNoChangesInterval(interval) {
842
+ return provideEnvironmentInitializer(() => {
843
+ const applicationRef = inject(ApplicationRef);
844
+ const errorHandler = inject(ErrorHandler);
845
+ const scheduler = inject(ChangeDetectionSchedulerImpl);
846
+ const ngZone = inject(NgZone);
847
+ function scheduleCheckNoChanges() {
848
+ ngZone.runOutsideAngular(() => {
849
+ setTimeout(() => {
850
+ if (applicationRef.destroyed) {
851
+ return;
852
+ }
853
+ if (scheduler.pendingRenderTaskId || scheduler.runningTick) {
854
+ scheduleCheckNoChanges();
855
+ return;
856
+ }
857
+ for (const view of applicationRef.allViews) {
858
+ try {
859
+ checkNoChangesInternal(view._lView, true);
860
+ } catch (e) {
861
+ errorHandler.handleError(e);
862
+ }
863
+ }
864
+ scheduleCheckNoChanges();
865
+ }, interval);
866
+ });
867
+ }
868
+ scheduleCheckNoChanges();
869
+ });
870
+ }
871
+ function provideCheckNoChangesConfig(options) {
872
+ return makeEnvironmentProviders(typeof ngDevMode === 'undefined' || ngDevMode ? [{
873
+ provide: UseExhaustiveCheckNoChanges,
874
+ useValue: options.exhaustive
875
+ }, options?.interval !== undefined ? exhaustiveCheckNoChangesInterval(options.interval) : []] : []);
876
+ }
877
+ function isDevMode() {
878
+ return typeof ngDevMode === 'undefined' || !!ngDevMode;
879
+ }
880
+ function enableProdMode() {
881
+ if (typeof ngDevMode === 'undefined' || ngDevMode) {
882
+ _global['ngDevMode'] = false;
883
+ }
884
+ }
885
+ const appsWithEventReplay = new WeakSet();
886
+ const EAGER_CONTENT_LISTENERS_KEY = '';
887
+ function shouldEnableEventReplay(injector) {
888
+ return injector.get(IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT);
889
+ }
890
+ function withEventReplay() {
891
+ const providers = [{
892
+ provide: IS_EVENT_REPLAY_ENABLED,
893
+ useFactory: () => {
894
+ let isEnabled = true;
895
+ if (typeof ngServerMode === 'undefined' || !ngServerMode) {
896
+ const appId = inject(APP_ID);
897
+ isEnabled = !!window._ejsas?.[appId];
898
+ }
899
+ if (isEnabled) {
900
+ performanceMarkFeature('NgEventReplay');
901
+ }
902
+ return isEnabled;
903
+ }
904
+ }];
905
+ if (typeof ngServerMode === 'undefined' || !ngServerMode) {
906
+ providers.push({
907
+ provide: ENVIRONMENT_INITIALIZER,
908
+ useValue: () => {
909
+ const appRef = inject(ApplicationRef);
910
+ const {
911
+ injector
912
+ } = appRef;
913
+ if (!appsWithEventReplay.has(appRef)) {
914
+ const jsActionMap = inject(JSACTION_BLOCK_ELEMENT_MAP);
915
+ if (shouldEnableEventReplay(injector)) {
916
+ enableStashEventListenerImpl();
917
+ const appId = injector.get(APP_ID);
918
+ const clearStashFn = setStashFn(appId, (rEl, eventName, listenerFn) => {
919
+ if (rEl.nodeType !== Node.ELEMENT_NODE) return;
920
+ sharedStashFunction(rEl, eventName, listenerFn);
921
+ sharedMapFunction(rEl, jsActionMap);
922
+ });
923
+ appRef.onDestroy(clearStashFn);
924
+ }
925
+ }
926
+ },
927
+ multi: true
928
+ }, {
929
+ provide: APP_BOOTSTRAP_LISTENER,
930
+ useFactory: () => {
931
+ const appRef = inject(ApplicationRef);
932
+ const {
933
+ injector
934
+ } = appRef;
935
+ return () => {
936
+ if (!shouldEnableEventReplay(injector) || appsWithEventReplay.has(appRef)) {
937
+ return;
938
+ }
939
+ appsWithEventReplay.add(appRef);
940
+ const appId = injector.get(APP_ID);
941
+ appRef.onDestroy(() => {
942
+ appsWithEventReplay.delete(appRef);
943
+ if (typeof ngServerMode !== 'undefined' && !ngServerMode) {
944
+ clearAppScopedEarlyEventContract(appId);
945
+ }
946
+ });
947
+ appRef.whenStable().then(() => {
948
+ if (appRef.destroyed) {
949
+ return;
950
+ }
951
+ const eventContractDetails = injector.get(JSACTION_EVENT_CONTRACT);
952
+ initEventReplay(eventContractDetails, injector);
953
+ const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);
954
+ jsActionMap.get(EAGER_CONTENT_LISTENERS_KEY)?.forEach(removeListeners);
955
+ jsActionMap.delete(EAGER_CONTENT_LISTENERS_KEY);
956
+ const eventContract = eventContractDetails.instance;
957
+ if (isIncrementalHydrationEnabled(injector)) {
958
+ appRef.onDestroy(() => eventContract.cleanUp());
959
+ } else {
960
+ eventContract.cleanUp();
961
+ }
962
+ });
963
+ };
964
+ },
965
+ multi: true
966
+ });
967
+ }
968
+ return providers;
969
+ }
970
+ const initEventReplay = (eventDelegation, injector) => {
971
+ const appId = injector.get(APP_ID);
972
+ const earlyJsactionData = window._ejsas[appId];
973
+ const eventContract = eventDelegation.instance = new EventContract(new EventContractContainer(earlyJsactionData.c));
974
+ for (const et of earlyJsactionData.et) {
975
+ eventContract.addEvent(et);
976
+ }
977
+ for (const et of earlyJsactionData.etc) {
978
+ eventContract.addEvent(et);
979
+ }
980
+ const eventInfos = getAppScopedQueuedEventInfos(appId);
981
+ eventContract.replayEarlyEventInfos(eventInfos);
982
+ clearAppScopedEarlyEventContract(appId);
983
+ const dispatcher = new EventDispatcher(event => {
984
+ invokeRegisteredReplayListeners(injector, event, event.currentTarget);
985
+ });
986
+ registerDispatcher(eventContract, dispatcher);
987
+ };
988
+ function collectDomEventsInfo(tView, lView, eventTypesToReplay) {
989
+ const domEventsInfo = new Map();
990
+ const lCleanup = lView[CLEANUP];
991
+ const tCleanup = tView.cleanup;
992
+ if (!tCleanup || !lCleanup) {
993
+ return domEventsInfo;
994
+ }
995
+ for (let i = 0; i < tCleanup.length;) {
996
+ const firstParam = tCleanup[i++];
997
+ const secondParam = tCleanup[i++];
998
+ if (typeof firstParam !== 'string') {
999
+ continue;
1000
+ }
1001
+ const eventType = firstParam;
1002
+ if (!isEarlyEventType(eventType)) {
1003
+ continue;
1004
+ }
1005
+ if (isCaptureEventType(eventType)) {
1006
+ eventTypesToReplay.capture.add(eventType);
1007
+ } else {
1008
+ eventTypesToReplay.regular.add(eventType);
1009
+ }
1010
+ const listenerElement = unwrapRNode(lView[secondParam]);
1011
+ i++;
1012
+ const useCaptureOrIndx = tCleanup[i++];
1013
+ const isDomEvent = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0;
1014
+ if (!isDomEvent) {
1015
+ continue;
1016
+ }
1017
+ if (!domEventsInfo.has(listenerElement)) {
1018
+ domEventsInfo.set(listenerElement, [eventType]);
1019
+ } else {
1020
+ domEventsInfo.get(listenerElement).push(eventType);
1021
+ }
1022
+ }
1023
+ return domEventsInfo;
1024
+ }
1025
+ function invokeRegisteredReplayListeners(injector, event, currentTarget) {
1026
+ const blockName = (currentTarget && currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE)) ?? '';
1027
+ if (/d\d+/.test(blockName)) {
1028
+ hydrateAndInvokeBlockListeners(blockName, injector, event, currentTarget);
1029
+ } else if (event.eventPhase === EventPhase.REPLAY) {
1030
+ invokeListeners(event, currentTarget);
1031
+ }
1032
+ }
1033
+ function hydrateAndInvokeBlockListeners(blockName, injector, event, currentTarget) {
1034
+ const queue = injector.get(EVENT_REPLAY_QUEUE);
1035
+ queue.push({
1036
+ event,
1037
+ currentTarget
1038
+ });
1039
+ triggerHydrationFromBlockName(injector, blockName, createReplayQueuedBlockEventsFn(queue));
1040
+ }
1041
+ function createReplayQueuedBlockEventsFn(queue) {
1042
+ return hydratedBlocks => {
1043
+ const hydrated = new Set(hydratedBlocks);
1044
+ const newQueue = [];
1045
+ for (let {
1046
+ event,
1047
+ currentTarget
1048
+ } of queue) {
1049
+ const blockName = currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE);
1050
+ if (hydrated.has(blockName)) {
1051
+ invokeListeners(event, currentTarget);
1052
+ } else {
1053
+ newQueue.push({
1054
+ event,
1055
+ currentTarget
1056
+ });
1057
+ }
1058
+ }
1059
+ queue.length = 0;
1060
+ queue.push(...newQueue);
1061
+ };
1062
+ }
1063
+ let isHydrationSupportEnabled = false;
1064
+ let isI18nHydrationRuntimeSupportEnabled = false;
1065
+ let isIncrementalHydrationRuntimeSupportEnabled = false;
1066
+ const APPLICATION_IS_STABLE_TIMEOUT = 10_000;
1067
+ function enableHydrationRuntimeSupport() {
1068
+ if (!isHydrationSupportEnabled) {
1069
+ isHydrationSupportEnabled = true;
1070
+ enableRetrieveHydrationInfoImpl();
1071
+ enableLocateOrCreateElementNodeImpl();
1072
+ enableLocateOrCreateTextNodeImpl();
1073
+ enableLocateOrCreateElementContainerNodeImpl();
1074
+ enableLocateOrCreateContainerAnchorImpl();
1075
+ enableLocateOrCreateContainerRefImpl();
1076
+ enableFindMatchingDehydratedViewImpl();
1077
+ enableApplyRootElementTransformImpl();
1078
+ }
1079
+ }
1080
+ function enableI18nHydrationRuntimeSupport() {
1081
+ if (!isI18nHydrationRuntimeSupportEnabled) {
1082
+ isI18nHydrationRuntimeSupportEnabled = true;
1083
+ enableLocateOrCreateI18nNodeImpl();
1084
+ enablePrepareI18nBlockForHydrationImpl();
1085
+ enableClaimDehydratedIcuCaseImpl();
1086
+ }
1087
+ }
1088
+ function enableIncrementalHydrationRuntimeSupport() {
1089
+ if (!isIncrementalHydrationRuntimeSupportEnabled) {
1090
+ isIncrementalHydrationRuntimeSupportEnabled = true;
1091
+ enableRetrieveDeferBlockDataImpl();
1092
+ }
1093
+ }
1094
+ function printHydrationStats(injector) {
1095
+ const console = injector.get(Console);
1096
+ 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.`;
1097
+ console.log(message);
1098
+ }
1099
+ function whenStableWithTimeout(appRef) {
1100
+ const whenStablePromise = appRef.whenStable();
1101
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
1102
+ const timeoutTime = APPLICATION_IS_STABLE_TIMEOUT;
1103
+ const console = appRef.injector.get(Console);
1104
+ const ngZone = appRef.injector.get(NgZone);
1105
+ const timeoutId = ngZone.runOutsideAngular(() => {
1106
+ return setTimeout(() => logWarningOnStableTimedout(timeoutTime, console), timeoutTime);
1107
+ });
1108
+ whenStablePromise.finally(() => clearTimeout(timeoutId));
1109
+ }
1110
+ return whenStablePromise;
1111
+ }
1112
+ const CLIENT_RENDER_MODE_FLAG = 'ngcm';
1113
+ function isClientRenderModeEnabled(doc) {
1114
+ return (typeof ngServerMode === 'undefined' || !ngServerMode) && doc.body.hasAttribute(CLIENT_RENDER_MODE_FLAG);
1115
+ }
1116
+ function withDomHydration() {
1117
+ const providers = [{
1118
+ provide: IS_HYDRATION_DOM_REUSE_ENABLED,
1119
+ useFactory: () => {
1120
+ let isEnabled = true;
1121
+ if (typeof ngServerMode === 'undefined' || !ngServerMode) {
1122
+ const transferState = inject(TransferState, {
1123
+ optional: true
1124
+ });
1125
+ isEnabled = !!transferState?.get(NGH_DATA_KEY, null);
1126
+ }
1127
+ if (isEnabled) {
1128
+ performanceMarkFeature('NgHydration');
1129
+ }
1130
+ return isEnabled;
1131
+ }
1132
+ }, {
1133
+ provide: ENVIRONMENT_INITIALIZER,
1134
+ useValue: () => {
1135
+ setIsI18nHydrationSupportEnabled(false);
1136
+ if (typeof ngServerMode !== 'undefined' && ngServerMode) {
1137
+ return;
1138
+ }
1139
+ const doc = inject(DOCUMENT);
1140
+ if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
1141
+ verifySsrContentsIntegrity(doc);
1142
+ enableHydrationRuntimeSupport();
1143
+ } else if (typeof ngDevMode !== 'undefined' && ngDevMode && !isClientRenderModeEnabled(doc)) {
1144
+ const console = inject(Console);
1145
+ 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.');
1146
+ console.warn(message);
1147
+ }
1148
+ },
1149
+ multi: true
1150
+ }];
1151
+ if (typeof ngServerMode === 'undefined' || !ngServerMode) {
1152
+ providers.push({
1153
+ provide: PRESERVE_HOST_CONTENT,
1154
+ useFactory: () => {
1155
+ return inject(IS_HYDRATION_DOM_REUSE_ENABLED);
1156
+ }
1157
+ }, {
1158
+ provide: APP_BOOTSTRAP_LISTENER,
1159
+ useFactory: () => {
1160
+ const scheduler = inject(ChangeDetectionScheduler);
1161
+ if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
1162
+ const appRef = inject(ApplicationRef);
1163
+ return () => {
1164
+ whenStableWithTimeout(appRef).then(() => {
1165
+ if (appRef.destroyed) {
1166
+ return;
1167
+ }
1168
+ cleanupDehydratedViews(appRef);
1169
+ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
1170
+ countBlocksSkippedByHydration(appRef.injector);
1171
+ printHydrationStats(appRef.injector);
1172
+ }
1173
+ scheduler.notify(7);
1174
+ });
1175
+ };
1176
+ }
1177
+ return () => {};
1178
+ },
1179
+ multi: true
1180
+ });
1181
+ }
1182
+ return makeEnvironmentProviders(providers);
1183
+ }
1184
+ function withI18nSupport() {
1185
+ return [{
1186
+ provide: IS_I18N_HYDRATION_ENABLED,
1187
+ useFactory: () => inject(IS_HYDRATION_DOM_REUSE_ENABLED)
1188
+ }, {
1189
+ provide: ENVIRONMENT_INITIALIZER,
1190
+ useValue: () => {
1191
+ if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
1192
+ enableI18nHydrationRuntimeSupport();
1193
+ setIsI18nHydrationSupportEnabled(true);
1194
+ performanceMarkFeature('NgI18nHydration');
1195
+ }
1196
+ },
1197
+ multi: true
1198
+ }];
1199
+ }
1200
+ function withIncrementalHydration() {
1201
+ const providers = [withEventReplay(), {
1202
+ provide: IS_INCREMENTAL_HYDRATION_ENABLED,
1203
+ useValue: true
1204
+ }, {
1205
+ provide: DEHYDRATED_BLOCK_REGISTRY,
1206
+ useClass: DehydratedBlockRegistry
1207
+ }, {
1208
+ provide: ENVIRONMENT_INITIALIZER,
1209
+ useValue: () => {
1210
+ enableIncrementalHydrationRuntimeSupport();
1211
+ performanceMarkFeature('NgIncrementalHydration');
1212
+ },
1213
+ multi: true
1214
+ }];
1215
+ if (typeof ngServerMode === 'undefined' || !ngServerMode) {
1216
+ providers.push({
1217
+ provide: APP_BOOTSTRAP_LISTENER,
1218
+ useFactory: () => {
1219
+ const injector = inject(Injector);
1220
+ const doc = inject(DOCUMENT);
1221
+ return () => {
1222
+ const deferBlockData = processBlockData(injector);
1223
+ const commentsByBlockId = gatherDeferBlocksCommentNodes(doc, doc.body);
1224
+ processAndInitTriggers(injector, deferBlockData, commentsByBlockId);
1225
+ appendDeferBlocksToJSActionMap(doc, injector);
1226
+ };
1227
+ },
1228
+ multi: true
1229
+ });
1230
+ }
1231
+ return providers;
1232
+ }
1233
+ function logWarningOnStableTimedout(time, console) {
1234
+ 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.`;
1235
+ console.warn(formatRuntimeError(-506, message));
1236
+ }
1237
+ const STABILITY_WARNING_THRESHOLD = APPLICATION_IS_STABLE_TIMEOUT - 1_000;
1238
+ class DebugTaskTrackerImpl {
1239
+ openTasks = new Map();
1240
+ add(taskId) {
1241
+ this.openTasks.set(taskId, new Error('Task stack tracking error'));
1242
+ }
1243
+ remove(taskId) {
1244
+ this.openTasks.delete(taskId);
1245
+ }
1246
+ }
1247
+ function provideStabilityDebugging() {
1248
+ const taskTracker = new DebugTaskTrackerImpl();
1249
+ const {
1250
+ openTasks
1251
+ } = taskTracker;
1252
+ return makeEnvironmentProviders([{
1253
+ provide: DEBUG_TASK_TRACKER,
1254
+ useValue: taskTracker
1255
+ }, provideAppInitializer(() => {
1256
+ if (typeof ngDevMode === 'undefined' || !ngDevMode) {
1257
+ 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.');
1258
+ }
1259
+ const ngZone = inject(NgZone);
1260
+ const applicationRef = inject(ApplicationRef);
1261
+ let _taskTrackingZone = null;
1262
+ if (typeof Zone !== 'undefined') {
1263
+ ngZone.run(() => {
1264
+ _taskTrackingZone = Zone.current.get('TaskTrackingZone');
1265
+ });
1266
+ }
1267
+ ngZone.runOutsideAngular(() => {
1268
+ const timeoutId = setTimeout(() => {
1269
+ console.debug(`---- Application did not stabilize within ${STABILITY_WARNING_THRESHOLD / 1000} seconds ----`);
1270
+ if (typeof Zone !== 'undefined' && !_taskTrackingZone) {
1271
+ 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.');
1272
+ }
1273
+ if (_taskTrackingZone?.macroTasks?.length) {
1274
+ console.group('Macrotasks keeping Angular Zone unstable:');
1275
+ for (const t of _taskTrackingZone?.macroTasks ?? []) {
1276
+ console.debug(t.creationLocation.stack);
1277
+ }
1278
+ console.groupEnd();
1279
+ }
1280
+ console.group('PendingTasks keeping application unstable:');
1281
+ for (const error of openTasks.values()) {
1282
+ console.debug(error.stack);
1283
+ }
1284
+ console.groupEnd();
1285
+ }, STABILITY_WARNING_THRESHOLD);
1286
+ applicationRef.whenStable().then(() => {
1287
+ clearTimeout(timeoutId);
1288
+ });
1289
+ });
1290
+ })]);
1291
+ }
1292
+ function getModuleFactory(id) {
1293
+ const type = getRegisteredNgModuleType(id);
1294
+ if (!type) throw noModuleError(id);
1295
+ return new NgModuleFactory(type);
1296
+ }
1297
+ function getNgModuleById(id) {
1298
+ const type = getRegisteredNgModuleType(id);
1299
+ if (!type) throw noModuleError(id);
1300
+ return type;
1301
+ }
1302
+ function noModuleError(id) {
1303
+ return new RuntimeError(920, ngDevMode && `No module with ID ${id} loaded`);
1304
+ }
1305
+ class ChangeDetectorRef {
1306
+ static __NG_ELEMENT_ID__ = injectChangeDetectorRef;
1307
+ }
1308
+ function injectChangeDetectorRef(flags) {
1309
+ return createViewRef(getCurrentTNode(), getLView(), (flags & 16) === 16);
1310
+ }
1311
+ function createViewRef(tNode, lView, isPipe) {
1312
+ if (isComponentHost(tNode) && !isPipe) {
1313
+ const componentView = getComponentLViewByIndex(tNode.index, lView);
1314
+ return new ViewRef$1(componentView, componentView);
1315
+ } else if (tNode.type & (3 | 12 | 32 | 128)) {
1316
+ const hostComponentView = lView[DECLARATION_COMPONENT_VIEW];
1317
+ return new ViewRef$1(hostComponentView, lView);
1318
+ }
1319
+ return null;
1320
+ }
1321
+ class ViewRef extends ChangeDetectorRef {}
1322
+ class EmbeddedViewRef extends ViewRef {}
1323
+ class DefaultIterableDifferFactory {
1324
+ supports(obj) {
1325
+ return isListLikeIterable(obj);
1326
+ }
1327
+ create(trackByFn) {
1328
+ return new DefaultIterableDiffer(trackByFn);
1329
+ }
1330
+ }
1331
+ const trackByIdentity = (index, item) => item;
1332
+ class DefaultIterableDiffer {
1333
+ length = 0;
1334
+ collection;
1335
+ _linkedRecords = null;
1336
+ _unlinkedRecords = null;
1337
+ _previousItHead = null;
1338
+ _itHead = null;
1339
+ _itTail = null;
1340
+ _additionsHead = null;
1341
+ _additionsTail = null;
1342
+ _movesHead = null;
1343
+ _movesTail = null;
1344
+ _removalsHead = null;
1345
+ _removalsTail = null;
1346
+ _identityChangesHead = null;
1347
+ _identityChangesTail = null;
1348
+ _trackByFn;
1349
+ constructor(trackByFn) {
1350
+ this._trackByFn = trackByFn || trackByIdentity;
1351
+ }
1352
+ forEachItem(fn) {
1353
+ let record;
1354
+ for (record = this._itHead; record !== null; record = record._next) {
1355
+ fn(record);
1356
+ }
1357
+ }
1358
+ forEachOperation(fn) {
1359
+ let nextIt = this._itHead;
1360
+ let nextRemove = this._removalsHead;
1361
+ let addRemoveOffset = 0;
1362
+ let moveOffsets = null;
1363
+ while (nextIt || nextRemove) {
1364
+ const record = !nextRemove || nextIt && nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ? nextIt : nextRemove;
1365
+ const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);
1366
+ const currentIndex = record.currentIndex;
1367
+ if (record === nextRemove) {
1368
+ addRemoveOffset--;
1369
+ nextRemove = nextRemove._nextRemoved;
1370
+ } else {
1371
+ nextIt = nextIt._next;
1372
+ if (record.previousIndex == null) {
1373
+ addRemoveOffset++;
1374
+ } else {
1375
+ if (!moveOffsets) moveOffsets = [];
1376
+ const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;
1377
+ const localCurrentIndex = currentIndex - addRemoveOffset;
1378
+ if (localMovePreviousIndex != localCurrentIndex) {
1379
+ for (let i = 0; i < localMovePreviousIndex; i++) {
1380
+ const offset = i < moveOffsets.length ? moveOffsets[i] : moveOffsets[i] = 0;
1381
+ const index = offset + i;
1382
+ if (localCurrentIndex <= index && index < localMovePreviousIndex) {
1383
+ moveOffsets[i] = offset + 1;
1384
+ }
1385
+ }
1386
+ const previousIndex = record.previousIndex;
1387
+ moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;
1388
+ }
1389
+ }
1390
+ }
1391
+ if (adjPreviousIndex !== currentIndex) {
1392
+ fn(record, adjPreviousIndex, currentIndex);
1393
+ }
1394
+ }
1395
+ }
1396
+ forEachPreviousItem(fn) {
1397
+ let record;
1398
+ for (record = this._previousItHead; record !== null; record = record._nextPrevious) {
1399
+ fn(record);
1400
+ }
1401
+ }
1402
+ forEachAddedItem(fn) {
1403
+ let record;
1404
+ for (record = this._additionsHead; record !== null; record = record._nextAdded) {
1405
+ fn(record);
1406
+ }
1407
+ }
1408
+ forEachMovedItem(fn) {
1409
+ let record;
1410
+ for (record = this._movesHead; record !== null; record = record._nextMoved) {
1411
+ fn(record);
1412
+ }
1413
+ }
1414
+ forEachRemovedItem(fn) {
1415
+ let record;
1416
+ for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
1417
+ fn(record);
1418
+ }
1419
+ }
1420
+ forEachIdentityChange(fn) {
1421
+ let record;
1422
+ for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {
1423
+ fn(record);
1424
+ }
1425
+ }
1426
+ diff(collection) {
1427
+ if (collection == null) collection = [];
1428
+ if (!isListLikeIterable(collection)) {
1429
+ throw new RuntimeError(900, ngDevMode && `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);
1430
+ }
1431
+ if (this.check(collection)) {
1432
+ return this;
1433
+ } else {
1434
+ return null;
1435
+ }
1436
+ }
1437
+ onDestroy() {}
1438
+ check(collection) {
1439
+ this._reset();
1440
+ let record = this._itHead;
1441
+ let mayBeDirty = false;
1442
+ let index;
1443
+ let item;
1444
+ let itemTrackBy;
1445
+ if (Array.isArray(collection)) {
1446
+ this.length = collection.length;
1447
+ for (let index = 0; index < this.length; index++) {
1448
+ item = collection[index];
1449
+ itemTrackBy = this._trackByFn(index, item);
1450
+ if (record === null || !Object.is(record.trackById, itemTrackBy)) {
1451
+ record = this._mismatch(record, item, itemTrackBy, index);
1452
+ mayBeDirty = true;
1453
+ } else {
1454
+ if (mayBeDirty) {
1455
+ record = this._verifyReinsertion(record, item, itemTrackBy, index);
1456
+ }
1457
+ if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
1458
+ }
1459
+ record = record._next;
1460
+ }
1461
+ } else {
1462
+ index = 0;
1463
+ iterateListLike(collection, item => {
1464
+ itemTrackBy = this._trackByFn(index, item);
1465
+ if (record === null || !Object.is(record.trackById, itemTrackBy)) {
1466
+ record = this._mismatch(record, item, itemTrackBy, index);
1467
+ mayBeDirty = true;
1468
+ } else {
1469
+ if (mayBeDirty) {
1470
+ record = this._verifyReinsertion(record, item, itemTrackBy, index);
1471
+ }
1472
+ if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
1473
+ }
1474
+ record = record._next;
1475
+ index++;
1476
+ });
1477
+ this.length = index;
1478
+ }
1479
+ this._truncate(record);
1480
+ this.collection = collection;
1481
+ return this.isDirty;
1482
+ }
1483
+ get isDirty() {
1484
+ return this._additionsHead !== null || this._movesHead !== null || this._removalsHead !== null || this._identityChangesHead !== null;
1485
+ }
1486
+ _reset() {
1487
+ if (this.isDirty) {
1488
+ let record;
1489
+ for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {
1490
+ record._nextPrevious = record._next;
1491
+ }
1492
+ for (record = this._additionsHead; record !== null; record = record._nextAdded) {
1493
+ record.previousIndex = record.currentIndex;
1494
+ }
1495
+ this._additionsHead = this._additionsTail = null;
1496
+ for (record = this._movesHead; record !== null; record = record._nextMoved) {
1497
+ record.previousIndex = record.currentIndex;
1498
+ }
1499
+ this._movesHead = this._movesTail = null;
1500
+ this._removalsHead = this._removalsTail = null;
1501
+ this._identityChangesHead = this._identityChangesTail = null;
1502
+ }
1503
+ }
1504
+ _mismatch(record, item, itemTrackBy, index) {
1505
+ let previousRecord;
1506
+ if (record === null) {
1507
+ previousRecord = this._itTail;
1508
+ } else {
1509
+ previousRecord = record._prev;
1510
+ this._remove(record);
1511
+ }
1512
+ record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
1513
+ if (record !== null) {
1514
+ if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
1515
+ this._reinsertAfter(record, previousRecord, index);
1516
+ } else {
1517
+ record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);
1518
+ if (record !== null) {
1519
+ if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
1520
+ this._moveAfter(record, previousRecord, index);
1521
+ } else {
1522
+ record = this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);
1523
+ }
1524
+ }
1525
+ return record;
1526
+ }
1527
+ _verifyReinsertion(record, item, itemTrackBy, index) {
1528
+ let reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
1529
+ if (reinsertRecord !== null) {
1530
+ record = this._reinsertAfter(reinsertRecord, record._prev, index);
1531
+ } else if (record.currentIndex != index) {
1532
+ record.currentIndex = index;
1533
+ this._addToMoves(record, index);
1534
+ }
1535
+ return record;
1536
+ }
1537
+ _truncate(record) {
1538
+ while (record !== null) {
1539
+ const nextRecord = record._next;
1540
+ this._addToRemovals(this._unlink(record));
1541
+ record = nextRecord;
1542
+ }
1543
+ if (this._unlinkedRecords !== null) {
1544
+ this._unlinkedRecords.clear();
1545
+ }
1546
+ if (this._additionsTail !== null) {
1547
+ this._additionsTail._nextAdded = null;
1548
+ }
1549
+ if (this._movesTail !== null) {
1550
+ this._movesTail._nextMoved = null;
1551
+ }
1552
+ if (this._itTail !== null) {
1553
+ this._itTail._next = null;
1554
+ }
1555
+ if (this._removalsTail !== null) {
1556
+ this._removalsTail._nextRemoved = null;
1557
+ }
1558
+ if (this._identityChangesTail !== null) {
1559
+ this._identityChangesTail._nextIdentityChange = null;
1560
+ }
1561
+ }
1562
+ _reinsertAfter(record, prevRecord, index) {
1563
+ if (this._unlinkedRecords !== null) {
1564
+ this._unlinkedRecords.remove(record);
1565
+ }
1566
+ const prev = record._prevRemoved;
1567
+ const next = record._nextRemoved;
1568
+ if (prev === null) {
1569
+ this._removalsHead = next;
1570
+ } else {
1571
+ prev._nextRemoved = next;
1572
+ }
1573
+ if (next === null) {
1574
+ this._removalsTail = prev;
1575
+ } else {
1576
+ next._prevRemoved = prev;
1577
+ }
1578
+ this._insertAfter(record, prevRecord, index);
1579
+ this._addToMoves(record, index);
1580
+ return record;
1581
+ }
1582
+ _moveAfter(record, prevRecord, index) {
1583
+ this._unlink(record);
1584
+ this._insertAfter(record, prevRecord, index);
1585
+ this._addToMoves(record, index);
1586
+ return record;
1587
+ }
1588
+ _addAfter(record, prevRecord, index) {
1589
+ this._insertAfter(record, prevRecord, index);
1590
+ if (this._additionsTail === null) {
1591
+ this._additionsTail = this._additionsHead = record;
1592
+ } else {
1593
+ this._additionsTail = this._additionsTail._nextAdded = record;
1594
+ }
1595
+ return record;
1596
+ }
1597
+ _insertAfter(record, prevRecord, index) {
1598
+ const next = prevRecord === null ? this._itHead : prevRecord._next;
1599
+ record._next = next;
1600
+ record._prev = prevRecord;
1601
+ if (next === null) {
1602
+ this._itTail = record;
1603
+ } else {
1604
+ next._prev = record;
1605
+ }
1606
+ if (prevRecord === null) {
1607
+ this._itHead = record;
1608
+ } else {
1609
+ prevRecord._next = record;
1610
+ }
1611
+ if (this._linkedRecords === null) {
1612
+ this._linkedRecords = new _DuplicateMap();
1613
+ }
1614
+ this._linkedRecords.put(record);
1615
+ record.currentIndex = index;
1616
+ return record;
1617
+ }
1618
+ _remove(record) {
1619
+ return this._addToRemovals(this._unlink(record));
1620
+ }
1621
+ _unlink(record) {
1622
+ if (this._linkedRecords !== null) {
1623
+ this._linkedRecords.remove(record);
1624
+ }
1625
+ const prev = record._prev;
1626
+ const next = record._next;
1627
+ if (prev === null) {
1628
+ this._itHead = next;
1629
+ } else {
1630
+ prev._next = next;
1631
+ }
1632
+ if (next === null) {
1633
+ this._itTail = prev;
1634
+ } else {
1635
+ next._prev = prev;
1636
+ }
1637
+ return record;
1638
+ }
1639
+ _addToMoves(record, toIndex) {
1640
+ if (record.previousIndex === toIndex) {
1641
+ return record;
1642
+ }
1643
+ if (this._movesTail === null) {
1644
+ this._movesTail = this._movesHead = record;
1645
+ } else {
1646
+ this._movesTail = this._movesTail._nextMoved = record;
1647
+ }
1648
+ return record;
1649
+ }
1650
+ _addToRemovals(record) {
1651
+ if (this._unlinkedRecords === null) {
1652
+ this._unlinkedRecords = new _DuplicateMap();
1653
+ }
1654
+ this._unlinkedRecords.put(record);
1655
+ record.currentIndex = null;
1656
+ record._nextRemoved = null;
1657
+ if (this._removalsTail === null) {
1658
+ this._removalsTail = this._removalsHead = record;
1659
+ record._prevRemoved = null;
1660
+ } else {
1661
+ record._prevRemoved = this._removalsTail;
1662
+ this._removalsTail = this._removalsTail._nextRemoved = record;
1663
+ }
1664
+ return record;
1665
+ }
1666
+ _addIdentityChange(record, item) {
1667
+ record.item = item;
1668
+ if (this._identityChangesTail === null) {
1669
+ this._identityChangesTail = this._identityChangesHead = record;
1670
+ } else {
1671
+ this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;
1672
+ }
1673
+ return record;
1674
+ }
1675
+ }
1676
+ class IterableChangeRecord_ {
1677
+ item;
1678
+ trackById;
1679
+ currentIndex = null;
1680
+ previousIndex = null;
1681
+ _nextPrevious = null;
1682
+ _prev = null;
1683
+ _next = null;
1684
+ _prevDup = null;
1685
+ _nextDup = null;
1686
+ _prevRemoved = null;
1687
+ _nextRemoved = null;
1688
+ _nextAdded = null;
1689
+ _nextMoved = null;
1690
+ _nextIdentityChange = null;
1691
+ constructor(item, trackById) {
1692
+ this.item = item;
1693
+ this.trackById = trackById;
1694
+ }
1695
+ }
1696
+ class _DuplicateItemRecordList {
1697
+ _head = null;
1698
+ _tail = null;
1699
+ add(record) {
1700
+ if (this._head === null) {
1701
+ this._head = this._tail = record;
1702
+ record._nextDup = null;
1703
+ record._prevDup = null;
1704
+ } else {
1705
+ this._tail._nextDup = record;
1706
+ record._prevDup = this._tail;
1707
+ record._nextDup = null;
1708
+ this._tail = record;
1709
+ }
1710
+ }
1711
+ get(trackById, atOrAfterIndex) {
1712
+ let record;
1713
+ for (record = this._head; record !== null; record = record._nextDup) {
1714
+ if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) && Object.is(record.trackById, trackById)) {
1715
+ return record;
1716
+ }
1717
+ }
1718
+ return null;
1719
+ }
1720
+ remove(record) {
1721
+ const prev = record._prevDup;
1722
+ const next = record._nextDup;
1723
+ if (prev === null) {
1724
+ this._head = next;
1725
+ } else {
1726
+ prev._nextDup = next;
1727
+ }
1728
+ if (next === null) {
1729
+ this._tail = prev;
1730
+ } else {
1731
+ next._prevDup = prev;
1732
+ }
1733
+ return this._head === null;
1734
+ }
1735
+ }
1736
+ class _DuplicateMap {
1737
+ map = new Map();
1738
+ put(record) {
1739
+ const key = record.trackById;
1740
+ let duplicates = this.map.get(key);
1741
+ if (!duplicates) {
1742
+ duplicates = new _DuplicateItemRecordList();
1743
+ this.map.set(key, duplicates);
1744
+ }
1745
+ duplicates.add(record);
1746
+ }
1747
+ get(trackById, atOrAfterIndex) {
1748
+ const key = trackById;
1749
+ const recordList = this.map.get(key);
1750
+ return recordList ? recordList.get(trackById, atOrAfterIndex) : null;
1751
+ }
1752
+ remove(record) {
1753
+ const key = record.trackById;
1754
+ const recordList = this.map.get(key);
1755
+ if (recordList.remove(record)) {
1756
+ this.map.delete(key);
1757
+ }
1758
+ return record;
1759
+ }
1760
+ get isEmpty() {
1761
+ return this.map.size === 0;
1762
+ }
1763
+ clear() {
1764
+ this.map.clear();
1765
+ }
1766
+ }
1767
+ function getPreviousIndex(item, addRemoveOffset, moveOffsets) {
1768
+ const previousIndex = item.previousIndex;
1769
+ if (previousIndex === null) return previousIndex;
1770
+ let moveOffset = 0;
1771
+ if (moveOffsets && previousIndex < moveOffsets.length) {
1772
+ moveOffset = moveOffsets[previousIndex];
1773
+ }
1774
+ return previousIndex + addRemoveOffset + moveOffset;
1775
+ }
1776
+ class DefaultKeyValueDifferFactory {
1777
+ supports(obj) {
1778
+ return obj instanceof Map || isJsObject(obj);
1779
+ }
1780
+ create() {
1781
+ return new DefaultKeyValueDiffer();
1782
+ }
1783
+ }
1784
+ class DefaultKeyValueDiffer {
1785
+ _records = new Map();
1786
+ _mapHead = null;
1787
+ _appendAfter = null;
1788
+ _previousMapHead = null;
1789
+ _changesHead = null;
1790
+ _changesTail = null;
1791
+ _additionsHead = null;
1792
+ _additionsTail = null;
1793
+ _removalsHead = null;
1794
+ get isDirty() {
1795
+ return this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null;
1796
+ }
1797
+ forEachItem(fn) {
1798
+ let record;
1799
+ for (record = this._mapHead; record !== null; record = record._next) {
1800
+ fn(record);
1801
+ }
1802
+ }
1803
+ forEachPreviousItem(fn) {
1804
+ let record;
1805
+ for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {
1806
+ fn(record);
1807
+ }
1808
+ }
1809
+ forEachChangedItem(fn) {
1810
+ let record;
1811
+ for (record = this._changesHead; record !== null; record = record._nextChanged) {
1812
+ fn(record);
1813
+ }
1814
+ }
1815
+ forEachAddedItem(fn) {
1816
+ let record;
1817
+ for (record = this._additionsHead; record !== null; record = record._nextAdded) {
1818
+ fn(record);
1819
+ }
1820
+ }
1821
+ forEachRemovedItem(fn) {
1822
+ let record;
1823
+ for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
1824
+ fn(record);
1825
+ }
1826
+ }
1827
+ diff(map) {
1828
+ if (!map) {
1829
+ map = new Map();
1830
+ } else if (!(map instanceof Map || isJsObject(map))) {
1831
+ throw new RuntimeError(900, ngDevMode && `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);
1832
+ }
1833
+ return this.check(map) ? this : null;
1834
+ }
1835
+ check(map) {
1836
+ this._reset();
1837
+ let insertBefore = this._mapHead;
1838
+ this._appendAfter = null;
1839
+ this._forEach(map, (value, key) => {
1840
+ if (insertBefore && insertBefore.key === key) {
1841
+ this._maybeAddToChanges(insertBefore, value);
1842
+ this._appendAfter = insertBefore;
1843
+ insertBefore = insertBefore._next;
1844
+ } else {
1845
+ const record = this._getOrCreateRecordForKey(key, value);
1846
+ insertBefore = this._insertBeforeOrAppend(insertBefore, record);
1847
+ }
1848
+ });
1849
+ if (insertBefore) {
1850
+ if (insertBefore._prev) {
1851
+ insertBefore._prev._next = null;
1852
+ }
1853
+ this._removalsHead = insertBefore;
1854
+ for (let record = insertBefore; record !== null; record = record._nextRemoved) {
1855
+ if (record === this._mapHead) {
1856
+ this._mapHead = null;
1857
+ }
1858
+ this._records.delete(record.key);
1859
+ record._nextRemoved = record._next;
1860
+ record.previousValue = record.currentValue;
1861
+ record.currentValue = null;
1862
+ record._prev = null;
1863
+ record._next = null;
1864
+ }
1865
+ }
1866
+ if (this._changesTail) this._changesTail._nextChanged = null;
1867
+ if (this._additionsTail) this._additionsTail._nextAdded = null;
1868
+ return this.isDirty;
1869
+ }
1870
+ _insertBeforeOrAppend(before, record) {
1871
+ if (before) {
1872
+ const prev = before._prev;
1873
+ record._next = before;
1874
+ record._prev = prev;
1875
+ before._prev = record;
1876
+ if (prev) {
1877
+ prev._next = record;
1878
+ }
1879
+ if (before === this._mapHead) {
1880
+ this._mapHead = record;
1881
+ }
1882
+ this._appendAfter = before;
1883
+ return before;
1884
+ }
1885
+ if (this._appendAfter) {
1886
+ this._appendAfter._next = record;
1887
+ record._prev = this._appendAfter;
1888
+ } else {
1889
+ this._mapHead = record;
1890
+ }
1891
+ this._appendAfter = record;
1892
+ return null;
1893
+ }
1894
+ _getOrCreateRecordForKey(key, value) {
1895
+ if (this._records.has(key)) {
1896
+ const record = this._records.get(key);
1897
+ this._maybeAddToChanges(record, value);
1898
+ const prev = record._prev;
1899
+ const next = record._next;
1900
+ if (prev) {
1901
+ prev._next = next;
1902
+ }
1903
+ if (next) {
1904
+ next._prev = prev;
1905
+ }
1906
+ record._next = null;
1907
+ record._prev = null;
1908
+ return record;
1909
+ }
1910
+ const record = new KeyValueChangeRecord_(key);
1911
+ this._records.set(key, record);
1912
+ record.currentValue = value;
1913
+ this._addToAdditions(record);
1914
+ return record;
1915
+ }
1916
+ _reset() {
1917
+ if (this.isDirty) {
1918
+ let record;
1919
+ this._previousMapHead = this._mapHead;
1920
+ for (record = this._previousMapHead; record !== null; record = record._next) {
1921
+ record._nextPrevious = record._next;
1922
+ }
1923
+ for (record = this._changesHead; record !== null; record = record._nextChanged) {
1924
+ record.previousValue = record.currentValue;
1925
+ }
1926
+ for (record = this._additionsHead; record != null; record = record._nextAdded) {
1927
+ record.previousValue = record.currentValue;
1928
+ }
1929
+ this._changesHead = this._changesTail = null;
1930
+ this._additionsHead = this._additionsTail = null;
1931
+ this._removalsHead = null;
1932
+ }
1933
+ }
1934
+ _maybeAddToChanges(record, newValue) {
1935
+ if (!Object.is(newValue, record.currentValue)) {
1936
+ record.previousValue = record.currentValue;
1937
+ record.currentValue = newValue;
1938
+ this._addToChanges(record);
1939
+ }
1940
+ }
1941
+ _addToAdditions(record) {
1942
+ if (this._additionsHead === null) {
1943
+ this._additionsHead = this._additionsTail = record;
1944
+ } else {
1945
+ this._additionsTail._nextAdded = record;
1946
+ this._additionsTail = record;
1947
+ }
1948
+ }
1949
+ _addToChanges(record) {
1950
+ if (this._changesHead === null) {
1951
+ this._changesHead = this._changesTail = record;
1952
+ } else {
1953
+ this._changesTail._nextChanged = record;
1954
+ this._changesTail = record;
1955
+ }
1956
+ }
1957
+ _forEach(obj, fn) {
1958
+ if (obj instanceof Map) {
1959
+ obj.forEach(fn);
1960
+ } else {
1961
+ Object.keys(obj).forEach(k => fn(obj[k], k));
1962
+ }
1963
+ }
1964
+ }
1965
+ class KeyValueChangeRecord_ {
1966
+ key;
1967
+ previousValue = null;
1968
+ currentValue = null;
1969
+ _nextPrevious = null;
1970
+ _next = null;
1971
+ _prev = null;
1972
+ _nextAdded = null;
1973
+ _nextRemoved = null;
1974
+ _nextChanged = null;
1975
+ constructor(key) {
1976
+ this.key = key;
1977
+ }
1978
+ }
1979
+ function defaultIterableDiffersFactory() {
1980
+ return new IterableDiffers([new DefaultIterableDifferFactory()]);
1981
+ }
1982
+ class IterableDiffers {
1983
+ factories;
1984
+ static ɵprov = /* @__PURE__ */
1985
+ __defineInjectable({
1986
+ token: IterableDiffers,
1987
+ providedIn: 'root',
1988
+ factory: defaultIterableDiffersFactory
1989
+ });
1990
+ constructor(factories) {
1991
+ this.factories = factories;
1992
+ }
1993
+ static create(factories, parent) {
1994
+ if (parent != null) {
1995
+ const copied = parent.factories.slice();
1996
+ factories = factories.concat(copied);
1997
+ }
1998
+ return new IterableDiffers(factories);
1999
+ }
2000
+ static extend(factories) {
2001
+ return {
2002
+ provide: IterableDiffers,
2003
+ useFactory: () => {
2004
+ const parent = inject(IterableDiffers, {
2005
+ optional: true,
2006
+ skipSelf: true
2007
+ });
2008
+ return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());
2009
+ }
2010
+ };
2011
+ }
2012
+ find(iterable) {
2013
+ const factory = this.factories.find(f => f.supports(iterable));
2014
+ if (factory != null) {
2015
+ return factory;
2016
+ } else {
2017
+ throw new RuntimeError(901, ngDevMode && `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);
2018
+ }
2019
+ }
2020
+ }
2021
+ function getTypeNameForDebugging(type) {
2022
+ return type['name'] || typeof type;
2023
+ }
2024
+ function defaultKeyValueDiffersFactory() {
2025
+ return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);
2026
+ }
2027
+ class KeyValueDiffers {
2028
+ static ɵprov = /* @__PURE__ */
2029
+ __defineInjectable({
2030
+ token: KeyValueDiffers,
2031
+ providedIn: 'root',
2032
+ factory: defaultKeyValueDiffersFactory
2033
+ });
2034
+ factories;
2035
+ constructor(factories) {
2036
+ this.factories = factories;
2037
+ }
2038
+ static create(factories, parent) {
2039
+ if (parent) {
2040
+ const copied = parent.factories.slice();
2041
+ factories = factories.concat(copied);
2042
+ }
2043
+ return new KeyValueDiffers(factories);
2044
+ }
2045
+ static extend(factories) {
2046
+ return {
2047
+ provide: KeyValueDiffers,
2048
+ useFactory: () => {
2049
+ const parent = inject(KeyValueDiffers, {
2050
+ optional: true,
2051
+ skipSelf: true
2052
+ });
2053
+ return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());
2054
+ }
2055
+ };
2056
+ }
2057
+ find(kv) {
2058
+ const factory = this.factories.find(f => f.supports(kv));
2059
+ if (factory) {
2060
+ return factory;
2061
+ }
2062
+ throw new RuntimeError(901, ngDevMode && `Cannot find a differ supporting object '${kv}'`);
2063
+ }
2064
+ }
2065
+ const keyValDiff = [new DefaultKeyValueDifferFactory()];
2066
+ const iterableDiff = [new DefaultIterableDifferFactory()];
2067
+ const defaultIterableDiffers = new IterableDiffers(iterableDiff);
2068
+ const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
2069
+ const platformCore = createPlatformFactory(null, 'core', []);
2070
+ class ApplicationModule {
2071
+ constructor(appRef) {}
2072
+ static ɵfac = function ApplicationModule_Factory(__ngFactoryType__) {
2073
+ return new (__ngFactoryType__ || ApplicationModule)(__inject(ApplicationRef));
2074
+ };
2075
+ static ɵmod = /*@__PURE__*/__defineNgModule({
2076
+ type: ApplicationModule
2077
+ });
2078
+ static ɵinj = /*@__PURE__*/__defineInjector({});
2079
+ }
2080
+ (() => {
2081
+ (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
2082
+ type: NgModule
2083
+ }], () => [{
2084
+ type: ApplicationRef
2085
+ }], null);
2086
+ })();
2087
+ function internalCreateApplication(config) {
2088
+ const {
2089
+ rootComponent,
2090
+ appProviders,
2091
+ platformProviders,
2092
+ platformRef
2093
+ } = config;
2094
+ profiler(ProfilerEvent.BootstrapApplicationStart);
2095
+ if (typeof ngServerMode !== 'undefined' && ngServerMode && !platformRef) {
2096
+ throw new RuntimeError(-401, ngDevMode && 'Missing Platform: This may be due to using `bootstrapApplication` on the server without passing a `BootstrapContext`. ' + 'Please make sure that `bootstrapApplication` is called with a `context` argument.');
2097
+ }
2098
+ try {
2099
+ const platformInjector = platformRef?.injector ?? createOrReusePlatformInjector(platformProviders);
2100
+ if ((typeof ngDevMode === 'undefined' || ngDevMode) && rootComponent !== undefined) {
2101
+ assertStandaloneComponentType(rootComponent);
2102
+ }
2103
+ const allAppProviders = [provideZonelessChangeDetectionInternal(), errorHandlerEnvironmentInitializer, ...(ngDevMode ? [validAppIdInitializer] : []), ...(appProviders || [])];
2104
+ const adapter = new EnvironmentNgModuleRefAdapter({
2105
+ providers: allAppProviders,
2106
+ parent: platformInjector,
2107
+ debugName: typeof ngDevMode === 'undefined' || ngDevMode ? 'Environment Injector' : '',
2108
+ runEnvironmentInitializers: false
2109
+ });
2110
+ return bootstrap({
2111
+ r3Injector: adapter.injector,
2112
+ platformInjector,
2113
+ rootComponent
2114
+ });
2115
+ } catch (e) {
2116
+ return Promise.reject(e);
2117
+ } finally {
2118
+ profiler(ProfilerEvent.BootstrapApplicationEnd);
2119
+ }
2120
+ }
2121
+ class SerializedViewCollection {
2122
+ views = [];
2123
+ indexByContent = new Map();
2124
+ add(serializedView) {
2125
+ const viewAsString = JSON.stringify(serializedView);
2126
+ if (!this.indexByContent.has(viewAsString)) {
2127
+ const index = this.views.length;
2128
+ this.views.push(serializedView);
2129
+ this.indexByContent.set(viewAsString, index);
2130
+ return index;
2131
+ }
2132
+ return this.indexByContent.get(viewAsString);
2133
+ }
2134
+ getAll() {
2135
+ return this.views;
2136
+ }
2137
+ }
2138
+ let tViewSsrId = 0;
2139
+ function getSsrId(tView) {
2140
+ if (!tView.ssrId) {
2141
+ tView.ssrId = `t${tViewSsrId++}`;
2142
+ }
2143
+ return tView.ssrId;
2144
+ }
2145
+ function calcNumRootNodes(tView, lView, tNode) {
2146
+ const rootNodes = [];
2147
+ collectNativeNodes(tView, lView, tNode, rootNodes);
2148
+ return rootNodes.length;
2149
+ }
2150
+ function calcNumRootNodesInLContainer(lContainer) {
2151
+ const rootNodes = [];
2152
+ collectNativeNodesInLContainer(lContainer, rootNodes);
2153
+ return rootNodes.length;
2154
+ }
2155
+ function annotateComponentLViewForHydration(lView, context) {
2156
+ const hostElement = lView[HOST];
2157
+ if (hostElement && !hostElement.hasAttribute(SKIP_HYDRATION_ATTR_NAME)) {
2158
+ return annotateHostElementForHydration(hostElement, lView, null, context);
2159
+ }
2160
+ return null;
2161
+ }
2162
+ function annotateLContainerForHydration(lContainer, context) {
2163
+ const componentLView = unwrapLView(lContainer[HOST]);
2164
+ const componentLViewNghIndex = annotateComponentLViewForHydration(componentLView, context);
2165
+ if (componentLViewNghIndex === null) {
2166
+ return;
2167
+ }
2168
+ const hostElement = unwrapRNode(componentLView[HOST]);
2169
+ const rootLView = lContainer[PARENT];
2170
+ const rootLViewNghIndex = annotateHostElementForHydration(hostElement, rootLView, null, context);
2171
+ const renderer = componentLView[RENDERER];
2172
+ const finalIndex = `${componentLViewNghIndex}|${rootLViewNghIndex}`;
2173
+ renderer.setAttribute(hostElement, NGH_ATTR_NAME, finalIndex);
2174
+ }
2175
+ function annotateForHydration(appRef, doc) {
2176
+ const injector = appRef.injector;
2177
+ const isI18nHydrationEnabledVal = isI18nHydrationEnabled(injector);
2178
+ const isIncrementalHydrationEnabledVal = isIncrementalHydrationEnabled(injector);
2179
+ const serializedViewCollection = new SerializedViewCollection();
2180
+ const corruptedTextNodes = new Map();
2181
+ const viewRefs = appRef._views;
2182
+ const shouldReplayEvents = injector.get(IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT);
2183
+ const eventTypesToReplay = {
2184
+ regular: new Set(),
2185
+ capture: new Set()
2186
+ };
2187
+ const deferBlocks = new Map();
2188
+ appRef.injector.get(APP_ID);
2189
+ for (const viewRef of viewRefs) {
2190
+ const lNode = getLNodeForHydration(viewRef);
2191
+ if (lNode !== null) {
2192
+ const context = {
2193
+ serializedViewCollection,
2194
+ corruptedTextNodes,
2195
+ isI18nHydrationEnabled: isI18nHydrationEnabledVal,
2196
+ isIncrementalHydrationEnabled: isIncrementalHydrationEnabledVal,
2197
+ i18nChildren: new Map(),
2198
+ eventTypesToReplay,
2199
+ shouldReplayEvents,
2200
+ deferBlocks
2201
+ };
2202
+ if (isLContainer(lNode)) {
2203
+ annotateLContainerForHydration(lNode, context);
2204
+ } else {
2205
+ annotateComponentLViewForHydration(lNode, context);
2206
+ }
2207
+ insertCorruptedTextNodeMarkers(corruptedTextNodes, doc);
2208
+ }
2209
+ }
2210
+ const serializedViews = serializedViewCollection.getAll();
2211
+ const transferState = injector.get(TransferState);
2212
+ transferState.set(NGH_DATA_KEY, serializedViews);
2213
+ if (deferBlocks.size > 0) {
2214
+ const blocks = {};
2215
+ for (const [id, info] of deferBlocks.entries()) {
2216
+ blocks[id] = info;
2217
+ }
2218
+ transferState.set(NGH_DEFER_BLOCKS_KEY, blocks);
2219
+ }
2220
+ return eventTypesToReplay;
2221
+ }
2222
+ function serializeLContainer(lContainer, tNode, lView, parentDeferBlockId, context) {
2223
+ const views = [];
2224
+ let lastViewAsString = '';
2225
+ for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
2226
+ let childLView = lContainer[i];
2227
+ let template;
2228
+ let numRootNodes;
2229
+ let serializedView;
2230
+ if (isRootView(childLView)) {
2231
+ childLView = childLView[HEADER_OFFSET];
2232
+ if (isLContainer(childLView)) {
2233
+ numRootNodes = calcNumRootNodesInLContainer(childLView) + 1;
2234
+ annotateLContainerForHydration(childLView, context);
2235
+ const componentLView = unwrapLView(childLView[HOST]);
2236
+ serializedView = {
2237
+ [TEMPLATE_ID]: componentLView[TVIEW].ssrId,
2238
+ [NUM_ROOT_NODES]: numRootNodes
2239
+ };
2240
+ }
2241
+ }
2242
+ if (!serializedView) {
2243
+ const childTView = childLView[TVIEW];
2244
+ if (childTView.type === 1) {
2245
+ template = childTView.ssrId;
2246
+ numRootNodes = 1;
2247
+ } else {
2248
+ template = getSsrId(childTView);
2249
+ numRootNodes = calcNumRootNodes(childTView, childLView, childTView.firstChild);
2250
+ }
2251
+ serializedView = {
2252
+ [TEMPLATE_ID]: template,
2253
+ [NUM_ROOT_NODES]: numRootNodes
2254
+ };
2255
+ let isHydrateNeverBlock = false;
2256
+ if (isDeferBlock(lView[TVIEW], tNode)) {
2257
+ const lDetails = getLDeferBlockDetails(lView, tNode);
2258
+ const tDetails = getTDeferBlockDetails(lView[TVIEW], tNode);
2259
+ if (context.isIncrementalHydrationEnabled && tDetails.hydrateTriggers !== null) {
2260
+ const deferBlockId = `d${context.deferBlocks.size}`;
2261
+ if (tDetails.hydrateTriggers.has(7)) {
2262
+ isHydrateNeverBlock = true;
2263
+ }
2264
+ let rootNodes = [];
2265
+ collectNativeNodesInLContainer(lContainer, rootNodes);
2266
+ const deferBlockInfo = {
2267
+ [NUM_ROOT_NODES]: rootNodes.length,
2268
+ [DEFER_BLOCK_STATE]: lDetails[DEFER_BLOCK_STATE$1]
2269
+ };
2270
+ const serializedTriggers = serializeHydrateTriggers(tDetails.hydrateTriggers);
2271
+ if (serializedTriggers.length > 0) {
2272
+ deferBlockInfo[DEFER_HYDRATE_TRIGGERS] = serializedTriggers;
2273
+ }
2274
+ if (parentDeferBlockId !== null) {
2275
+ deferBlockInfo[DEFER_PARENT_BLOCK_ID] = parentDeferBlockId;
2276
+ }
2277
+ context.deferBlocks.set(deferBlockId, deferBlockInfo);
2278
+ const node = unwrapRNode(lContainer);
2279
+ if (node !== undefined) {
2280
+ if (node.nodeType === Node.COMMENT_NODE) {
2281
+ annotateDeferBlockAnchorForHydration(node, deferBlockId);
2282
+ }
2283
+ } else {
2284
+ ngDevMode && validateNodeExists(node, childLView, tNode);
2285
+ ngDevMode && validateMatchingNode(node, Node.COMMENT_NODE, null, childLView, tNode, true);
2286
+ annotateDeferBlockAnchorForHydration(node, deferBlockId);
2287
+ }
2288
+ if (!isHydrateNeverBlock) {
2289
+ annotateDeferBlockRootNodesWithJsAction(tDetails, rootNodes, deferBlockId, context);
2290
+ }
2291
+ parentDeferBlockId = deferBlockId;
2292
+ serializedView[DEFER_BLOCK_ID] = deferBlockId;
2293
+ }
2294
+ serializedView[DEFER_BLOCK_STATE] = lDetails[DEFER_BLOCK_STATE$1];
2295
+ }
2296
+ if (!isHydrateNeverBlock) {
2297
+ Object.assign(serializedView, serializeLView(lContainer[i], parentDeferBlockId, context));
2298
+ }
2299
+ }
2300
+ const currentViewAsString = JSON.stringify(serializedView);
2301
+ if (views.length > 0 && currentViewAsString === lastViewAsString) {
2302
+ const previousView = views[views.length - 1];
2303
+ previousView[MULTIPLIER] ??= 1;
2304
+ previousView[MULTIPLIER]++;
2305
+ } else {
2306
+ lastViewAsString = currentViewAsString;
2307
+ views.push(serializedView);
2308
+ }
2309
+ }
2310
+ return views;
2311
+ }
2312
+ function serializeHydrateTriggers(triggerMap) {
2313
+ const serializableDeferBlockTrigger = new Set([0, 1, 2, 5]);
2314
+ let triggers = [];
2315
+ for (let [trigger, details] of triggerMap) {
2316
+ if (serializableDeferBlockTrigger.has(trigger)) {
2317
+ if (details === null) {
2318
+ triggers.push(trigger);
2319
+ } else if (details.type === 5) {
2320
+ triggers.push({
2321
+ trigger,
2322
+ delay: details.delay
2323
+ });
2324
+ } else {
2325
+ triggers.push({
2326
+ trigger,
2327
+ intersectionObserverOptions: details.intersectionObserverOptions
2328
+ });
2329
+ }
2330
+ }
2331
+ }
2332
+ return triggers;
2333
+ }
2334
+ function appendSerializedNodePath(ngh, tNode, lView, excludedParentNodes) {
2335
+ const noOffsetIndex = tNode.index - HEADER_OFFSET;
2336
+ ngh[NODES] ??= {};
2337
+ ngh[NODES][noOffsetIndex] ??= calcPathForNode(tNode, lView, excludedParentNodes);
2338
+ }
2339
+ function appendDisconnectedNodeIndex(ngh, tNodeOrNoOffsetIndex) {
2340
+ const noOffsetIndex = typeof tNodeOrNoOffsetIndex === 'number' ? tNodeOrNoOffsetIndex : tNodeOrNoOffsetIndex.index - HEADER_OFFSET;
2341
+ ngh[DISCONNECTED_NODES] ??= [];
2342
+ if (!ngh[DISCONNECTED_NODES].includes(noOffsetIndex)) {
2343
+ ngh[DISCONNECTED_NODES].push(noOffsetIndex);
2344
+ }
2345
+ }
2346
+ function serializeLView(lView, parentDeferBlockId = null, context) {
2347
+ const ngh = {};
2348
+ const tView = lView[TVIEW];
2349
+ const i18nChildren = getOrComputeI18nChildren(tView, context);
2350
+ const nativeElementsToEventTypes = context.shouldReplayEvents ? collectDomEventsInfo(tView, lView, context.eventTypesToReplay) : null;
2351
+ for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {
2352
+ const tNode = tView.data[i];
2353
+ const noOffsetIndex = i - HEADER_OFFSET;
2354
+ const i18nData = trySerializeI18nBlock(lView, i, context);
2355
+ if (i18nData) {
2356
+ ngh[I18N_DATA] ??= {};
2357
+ ngh[I18N_DATA][noOffsetIndex] = i18nData.caseQueue;
2358
+ for (const nodeNoOffsetIndex of i18nData.disconnectedNodes) {
2359
+ appendDisconnectedNodeIndex(ngh, nodeNoOffsetIndex);
2360
+ }
2361
+ for (const nodeNoOffsetIndex of i18nData.disjointNodes) {
2362
+ const tNode = tView.data[nodeNoOffsetIndex + HEADER_OFFSET];
2363
+ ngDevMode && assertTNode(tNode);
2364
+ appendSerializedNodePath(ngh, tNode, lView, i18nChildren);
2365
+ }
2366
+ continue;
2367
+ }
2368
+ if (!isTNodeShape(tNode)) {
2369
+ continue;
2370
+ }
2371
+ if (isDetachedByI18n(tNode)) {
2372
+ continue;
2373
+ }
2374
+ if (isLContainer(lView[i]) && tNode.tView) {
2375
+ ngh[TEMPLATES] ??= {};
2376
+ ngh[TEMPLATES][noOffsetIndex] = getSsrId(tNode.tView);
2377
+ }
2378
+ if (isDisconnectedNode(tNode, lView) && isContentProjectedNode(tNode)) {
2379
+ appendDisconnectedNodeIndex(ngh, tNode);
2380
+ continue;
2381
+ }
2382
+ if (Array.isArray(tNode.projection)) {
2383
+ for (const projectionHeadTNode of tNode.projection) {
2384
+ if (!projectionHeadTNode) continue;
2385
+ if (!Array.isArray(projectionHeadTNode)) {
2386
+ if (!isProjectionTNode(projectionHeadTNode) && !isInSkipHydrationBlock(projectionHeadTNode)) {
2387
+ if (isDisconnectedNode(projectionHeadTNode, lView)) {
2388
+ appendDisconnectedNodeIndex(ngh, projectionHeadTNode);
2389
+ } else {
2390
+ appendSerializedNodePath(ngh, projectionHeadTNode, lView, i18nChildren);
2391
+ }
2392
+ }
2393
+ } else {
2394
+ throw unsupportedProjectionOfDomNodes(unwrapRNode(lView[i]));
2395
+ }
2396
+ }
2397
+ }
2398
+ conditionallyAnnotateNodePath(ngh, tNode, lView, i18nChildren);
2399
+ if (isLContainer(lView[i])) {
2400
+ const hostNode = lView[i][HOST];
2401
+ if (Array.isArray(hostNode)) {
2402
+ const targetNode = unwrapRNode(hostNode);
2403
+ if (!targetNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME)) {
2404
+ annotateHostElementForHydration(targetNode, hostNode, parentDeferBlockId, context);
2405
+ }
2406
+ }
2407
+ ngh[CONTAINERS] ??= {};
2408
+ ngh[CONTAINERS][noOffsetIndex] = serializeLContainer(lView[i], tNode, lView, parentDeferBlockId, context);
2409
+ } else if (Array.isArray(lView[i]) && !isLetDeclaration(tNode)) {
2410
+ const targetNode = unwrapRNode(lView[i][HOST]);
2411
+ if (!targetNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME)) {
2412
+ annotateHostElementForHydration(targetNode, lView[i], parentDeferBlockId, context);
2413
+ }
2414
+ } else {
2415
+ if (tNode.type & 8) {
2416
+ ngh[ELEMENT_CONTAINERS] ??= {};
2417
+ ngh[ELEMENT_CONTAINERS][noOffsetIndex] = calcNumRootNodes(tView, lView, tNode.child);
2418
+ } else if (tNode.type & (16 | 128)) {
2419
+ let nextTNode = tNode.next;
2420
+ while (nextTNode !== null && nextTNode.type & (16 | 128)) {
2421
+ nextTNode = nextTNode.next;
2422
+ }
2423
+ if (nextTNode && !isInSkipHydrationBlock(nextTNode)) {
2424
+ appendSerializedNodePath(ngh, nextTNode, lView, i18nChildren);
2425
+ }
2426
+ } else if (tNode.type & 1) {
2427
+ const rNode = unwrapRNode(lView[i]);
2428
+ processTextNodeBeforeSerialization(context, rNode);
2429
+ }
2430
+ }
2431
+ if (nativeElementsToEventTypes && tNode.type & 2) {
2432
+ const nativeElement = unwrapRNode(lView[i]);
2433
+ if (nativeElementsToEventTypes.has(nativeElement)) {
2434
+ setJSActionAttributes(nativeElement, nativeElementsToEventTypes.get(nativeElement), parentDeferBlockId);
2435
+ }
2436
+ }
2437
+ }
2438
+ return ngh;
2439
+ }
2440
+ function conditionallyAnnotateNodePath(ngh, tNode, lView, excludedParentNodes) {
2441
+ if (isProjectionTNode(tNode)) {
2442
+ return;
2443
+ }
2444
+ if (tNode.projectionNext && tNode.projectionNext !== tNode.next && !isInSkipHydrationBlock(tNode.projectionNext)) {
2445
+ appendSerializedNodePath(ngh, tNode.projectionNext, lView, excludedParentNodes);
2446
+ }
2447
+ if (tNode.prev === null && tNode.parent !== null && isDisconnectedNode(tNode.parent, lView) && !isDisconnectedNode(tNode, lView)) {
2448
+ appendSerializedNodePath(ngh, tNode, lView, excludedParentNodes);
2449
+ }
2450
+ }
2451
+ function componentUsesShadowDomEncapsulation(lView) {
2452
+ const instance = lView[CONTEXT];
2453
+ if (!instance?.constructor) return false;
2454
+ const def = getComponentDef(instance.constructor);
2455
+ return def?.encapsulation === ViewEncapsulation$1.ShadowDom || def?.encapsulation === ViewEncapsulation$1.ExperimentalIsolatedShadowDom;
2456
+ }
2457
+ function annotateHostElementForHydration(element, lView, parentDeferBlockId, context) {
2458
+ const renderer = lView[RENDERER];
2459
+ if (hasI18n(lView) && !isI18nHydrationSupportEnabled() || componentUsesShadowDomEncapsulation(lView)) {
2460
+ renderer.setAttribute(element, SKIP_HYDRATION_ATTR_NAME, '');
2461
+ return null;
2462
+ } else {
2463
+ const ngh = serializeLView(lView, parentDeferBlockId, context);
2464
+ const index = context.serializedViewCollection.add(ngh);
2465
+ renderer.setAttribute(element, NGH_ATTR_NAME, index.toString());
2466
+ return index;
2467
+ }
2468
+ }
2469
+ function annotateDeferBlockAnchorForHydration(comment, deferBlockId) {
2470
+ comment.textContent = `ngh=${deferBlockId}`;
2471
+ }
2472
+ function insertCorruptedTextNodeMarkers(corruptedTextNodes, doc) {
2473
+ for (const [textNode, marker] of corruptedTextNodes) {
2474
+ textNode.after(doc.createComment(marker));
2475
+ }
2476
+ }
2477
+ function isContentProjectedNode(tNode) {
2478
+ let currentTNode = tNode;
2479
+ while (currentTNode != null) {
2480
+ if (isComponentHost(currentTNode)) {
2481
+ return true;
2482
+ }
2483
+ currentTNode = currentTNode.parent;
2484
+ }
2485
+ return false;
2486
+ }
2487
+ function annotateDeferBlockRootNodesWithJsAction(tDetails, rootNodes, parentDeferBlockId, context) {
2488
+ const actionList = convertHydrateTriggersToJsAction(tDetails.hydrateTriggers);
2489
+ for (let et of actionList) {
2490
+ context.eventTypesToReplay.regular.add(et);
2491
+ }
2492
+ if (actionList.length > 0) {
2493
+ const elementNodes = rootNodes.filter(rn => rn.nodeType === Node.ELEMENT_NODE);
2494
+ for (let rNode of elementNodes) {
2495
+ setJSActionAttributes(rNode, actionList, parentDeferBlockId);
2496
+ }
2497
+ }
2498
+ }
2499
+ function booleanAttribute(value) {
2500
+ return typeof value === 'boolean' ? value : value != null && value !== 'false';
2501
+ }
2502
+ function numberAttribute(value, fallbackValue = NaN) {
2503
+ const isNumberValue = !isNaN(parseFloat(value)) && !isNaN(Number(value));
2504
+ return isNumberValue ? Number(value) : fallbackValue;
2505
+ }
2506
+ const PERFORMANCE_MARK_PREFIX = '🅰️';
2507
+ let enablePerfLogging = false;
2508
+ function startMeasuring(label) {
2509
+ if (!enablePerfLogging) {
2510
+ return;
2511
+ }
2512
+ const {
2513
+ startLabel
2514
+ } = labels(label);
2515
+ performance.mark(startLabel);
2516
+ }
2517
+ function stopMeasuring(label) {
2518
+ if (!enablePerfLogging) {
2519
+ return;
2520
+ }
2521
+ const {
2522
+ startLabel,
2523
+ labelName,
2524
+ endLabel
2525
+ } = labels(label);
2526
+ performance.mark(endLabel);
2527
+ performance.measure(labelName, startLabel, endLabel);
2528
+ performance.clearMarks(startLabel);
2529
+ performance.clearMarks(endLabel);
2530
+ }
2531
+ function labels(label) {
2532
+ const labelName = `${PERFORMANCE_MARK_PREFIX}:${label}`;
2533
+ return {
2534
+ labelName,
2535
+ startLabel: `start:${labelName}`,
2536
+ endLabel: `end:${labelName}`
2537
+ };
2538
+ }
2539
+ let warningLogged = false;
2540
+ function enableProfiling() {
2541
+ if (!warningLogged && (typeof performance === 'undefined' || !performance.mark || !performance.measure)) {
2542
+ warningLogged = true;
2543
+ console.warn('Performance API is not supported on this platform');
2544
+ return;
2545
+ }
2546
+ enablePerfLogging = true;
2547
+ }
2548
+ function disableProfiling() {
2549
+ enablePerfLogging = false;
2550
+ }
2551
+ function ɵassertType(value) {}
2552
+ function ɵɵngDeclareDirective(decl) {
2553
+ const compiler = getCompilerFacade({
2554
+ usage: 1,
2555
+ kind: 'directive',
2556
+ type: decl.type
2557
+ });
2558
+ return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
2559
+ }
2560
+ function ɵɵngDeclareClassMetadata(decl) {
2561
+ setClassMetadata(decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? null);
2562
+ }
2563
+ function ɵɵngDeclareClassMetadataAsync(decl) {
2564
+ setClassMetadataAsync(decl.type, decl.resolveDeferredDeps, (...types) => {
2565
+ const meta = decl.resolveMetadata(...types);
2566
+ setClassMetadata(decl.type, meta.decorators, meta.ctorParameters, meta.propDecorators);
2567
+ });
2568
+ }
2569
+ function ɵɵngDeclareComponent(decl) {
2570
+ const compiler = getCompilerFacade({
2571
+ usage: 1,
2572
+ kind: 'component',
2573
+ type: decl.type
2574
+ });
2575
+ return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);
2576
+ }
2577
+ function ɵɵngDeclareFactory(decl) {
2578
+ const compiler = getCompilerFacade({
2579
+ usage: 1,
2580
+ kind: getFactoryKind(decl.target),
2581
+ type: decl.type
2582
+ });
2583
+ return compiler.compileFactoryDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
2584
+ }
2585
+ function getFactoryKind(target) {
2586
+ switch (target) {
2587
+ case FactoryTarget.Directive:
2588
+ return 'directive';
2589
+ case FactoryTarget.Component:
2590
+ return 'component';
2591
+ case FactoryTarget.Injectable:
2592
+ return 'injectable';
2593
+ case FactoryTarget.Pipe:
2594
+ return 'pipe';
2595
+ case FactoryTarget.NgModule:
2596
+ return 'NgModule';
2597
+ }
2598
+ }
2599
+ function ɵɵngDeclareInjectable(decl) {
2600
+ const compiler = getCompilerFacade({
2601
+ usage: 1,
2602
+ kind: 'injectable',
2603
+ type: decl.type
2604
+ });
2605
+ return compiler.compileInjectableDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);
2606
+ }
2607
+ function ɵɵngDeclareInjector(decl) {
2608
+ const compiler = getCompilerFacade({
2609
+ usage: 1,
2610
+ kind: 'NgModule',
2611
+ type: decl.type
2612
+ });
2613
+ return compiler.compileInjectorDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);
2614
+ }
2615
+ function ɵɵngDeclareNgModule(decl) {
2616
+ const compiler = getCompilerFacade({
2617
+ usage: 1,
2618
+ kind: 'NgModule',
2619
+ type: decl.type
2620
+ });
2621
+ return compiler.compileNgModuleDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);
2622
+ }
2623
+ function ɵɵngDeclarePipe(decl) {
2624
+ const compiler = getCompilerFacade({
2625
+ usage: 1,
2626
+ kind: 'pipe',
2627
+ type: decl.type
2628
+ });
2629
+ return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);
2630
+ }
2631
+ const NOT_SET = /* @__PURE__ */Symbol('NOT_SET');
2632
+ const EMPTY_CLEANUP_SET = /* @__PURE__ */new Set();
2633
+ const AFTER_RENDER_PHASE_EFFECT_NODE = /* @__PURE__ */(() => ({
2634
+ ...SIGNAL_NODE,
2635
+ kind: 'afterRenderEffectPhase',
2636
+ consumerIsAlwaysLive: true,
2637
+ consumerAllowSignalWrites: true,
2638
+ value: NOT_SET,
2639
+ cleanup: null,
2640
+ consumerMarkedDirty() {
2641
+ if (this.sequence.impl.executing) {
2642
+ if (this.sequence.lastPhase === null || this.sequence.lastPhase < this.phase) {
2643
+ return;
2644
+ }
2645
+ this.sequence.erroredOrDestroyed = true;
2646
+ }
2647
+ this.sequence.scheduler.notify(7);
2648
+ },
2649
+ phaseFn(previousValue) {
2650
+ this.sequence.lastPhase = this.phase;
2651
+ if (!this.dirty) {
2652
+ return this.signal;
2653
+ }
2654
+ this.dirty = false;
2655
+ if (this.value !== NOT_SET && !consumerPollProducersForChange(this)) {
2656
+ return this.signal;
2657
+ }
2658
+ try {
2659
+ for (const cleanupFn of this.cleanup ?? EMPTY_CLEANUP_SET) {
2660
+ cleanupFn();
2661
+ }
2662
+ } finally {
2663
+ this.cleanup?.clear();
2664
+ }
2665
+ const args = [];
2666
+ if (previousValue !== undefined) {
2667
+ args.push(previousValue);
2668
+ }
2669
+ args.push(this.registerCleanupFn);
2670
+ const prevConsumer = consumerBeforeComputation(this);
2671
+ let newValue;
2672
+ try {
2673
+ newValue = this.userFn.apply(null, args);
2674
+ } finally {
2675
+ consumerAfterComputation(this, prevConsumer);
2676
+ }
2677
+ if (this.value === NOT_SET || !this.equal(this.value, newValue)) {
2678
+ this.value = newValue;
2679
+ this.version++;
2680
+ }
2681
+ return this.signal;
2682
+ }
2683
+ }))();
2684
+ class AfterRenderEffectSequence extends AfterRenderSequence {
2685
+ scheduler;
2686
+ lastPhase = null;
2687
+ nodes = [undefined, undefined, undefined, undefined];
2688
+ onDestroyFns = null;
2689
+ constructor(impl, effectHooks, view, scheduler, injector, snapshot = null) {
2690
+ super(impl, [undefined, undefined, undefined, undefined], view, false, injector.get(DestroyRef), snapshot);
2691
+ this.scheduler = scheduler;
2692
+ for (const phase of AFTER_RENDER_PHASES) {
2693
+ const effectHook = effectHooks[phase];
2694
+ if (effectHook === undefined) {
2695
+ continue;
2696
+ }
2697
+ const node = Object.create(AFTER_RENDER_PHASE_EFFECT_NODE);
2698
+ node.sequence = this;
2699
+ node.phase = phase;
2700
+ node.userFn = effectHook;
2701
+ node.dirty = true;
2702
+ node.signal = () => {
2703
+ producerAccessed(node);
2704
+ return node.value;
2705
+ };
2706
+ node.signal[SIGNAL] = node;
2707
+ node.registerCleanupFn = fn => (node.cleanup ??= new Set()).add(fn);
2708
+ this.nodes[phase] = node;
2709
+ this.hooks[phase] = value => node.phaseFn(value);
2710
+ if (ngDevMode) {
2711
+ setupDebugInfo(node, injector);
2712
+ }
2713
+ }
2714
+ }
2715
+ afterRun() {
2716
+ super.afterRun();
2717
+ this.lastPhase = null;
2718
+ }
2719
+ destroy() {
2720
+ if (this.onDestroyFns !== null) {
2721
+ for (const fn of this.onDestroyFns) {
2722
+ fn();
2723
+ }
2724
+ }
2725
+ super.destroy();
2726
+ for (const node of this.nodes) {
2727
+ if (node) {
2728
+ try {
2729
+ for (const fn of node.cleanup ?? EMPTY_CLEANUP_SET) {
2730
+ fn();
2731
+ }
2732
+ } finally {
2733
+ consumerDestroy(node);
2734
+ }
2735
+ }
2736
+ }
2737
+ }
2738
+ }
2739
+ function afterRenderEffect(callbackOrSpec, options) {
2740
+ ngDevMode && assertNotInReactiveContext(afterRenderEffect, 'Call `afterRenderEffect` outside of a reactive context. For example, create the render ' + 'effect inside the component constructor`.');
2741
+ if (ngDevMode && !options?.injector) {
2742
+ assertInInjectionContext(afterRenderEffect);
2743
+ }
2744
+ if (typeof ngServerMode !== 'undefined' && ngServerMode) {
2745
+ return NOOP_AFTER_RENDER_REF;
2746
+ }
2747
+ const injector = options?.injector ?? inject(Injector);
2748
+ const scheduler = injector.get(ChangeDetectionScheduler);
2749
+ const manager = injector.get(AfterRenderManager);
2750
+ const tracing = injector.get(TracingService, null, {
2751
+ optional: true
2752
+ });
2753
+ manager.impl ??= injector.get(AfterRenderImpl);
2754
+ let spec = callbackOrSpec;
2755
+ if (typeof spec === 'function') {
2756
+ spec = {
2757
+ mixedReadWrite: callbackOrSpec
2758
+ };
2759
+ }
2760
+ const viewContext = injector.get(ViewContext, null, {
2761
+ optional: true
2762
+ });
2763
+ const sequence = new AfterRenderEffectSequence(manager.impl, [spec.earlyRead, spec.write, spec.mixedReadWrite, spec.read], viewContext?.view, scheduler, injector, tracing?.snapshot(null));
2764
+ manager.impl.register(sequence);
2765
+ return sequence;
2766
+ }
2767
+ function setupDebugInfo(node, injector) {
2768
+ node.debugName = `afterRenderEffect - ${phaseDebugName(node.phase)} phase`;
2769
+ const prevInjectorProfilerContext = setInjectorProfilerContext({
2770
+ injector,
2771
+ token: null
2772
+ });
2773
+ try {
2774
+ emitAfterRenderEffectPhaseCreatedEvent(node);
2775
+ } finally {
2776
+ setInjectorProfilerContext(prevInjectorProfilerContext);
2777
+ }
2778
+ }
2779
+ function phaseDebugName(phase) {
2780
+ switch (phase) {
2781
+ case 0:
2782
+ return 'EarlyRead';
2783
+ case 1:
2784
+ return 'Write';
2785
+ case 2:
2786
+ return 'MixedReadWrite';
2787
+ case 3:
2788
+ return 'Read';
2789
+ }
2790
+ }
2791
+ function resourceFromSnapshots(source) {
2792
+ return new SnapshotResource(isSignal(source) ? source : computed(source));
2793
+ }
2794
+ class SnapshotResource {
2795
+ snapshot;
2796
+ constructor(snapshot) {
2797
+ this.snapshot = snapshot;
2798
+ }
2799
+ get state() {
2800
+ return this.snapshot();
2801
+ }
2802
+ value = computed(() => {
2803
+ if (this.state.status === 'error') {
2804
+ throw new ResourceValueError(this.state.error);
2805
+ }
2806
+ return this.state.value;
2807
+ });
2808
+ status = computed(() => this.state.status);
2809
+ error = computed(() => this.state.status === 'error' ? this.state.error : undefined);
2810
+ isLoading = computed(() => this.state.status === 'loading' || this.state.status === 'reloading');
2811
+ isValueDefined = computed(() => this.state.status !== 'error' && this.state.value !== undefined);
2812
+ hasValue() {
2813
+ return this.isValueDefined();
2814
+ }
2815
+ }
2816
+ function createComponent(component, options) {
2817
+ ngDevMode && assertComponentDef(component);
2818
+ const componentDef = getComponentDef(component);
2819
+ const elementInjector = options.elementInjector || getNullInjector();
2820
+ const factory = new ComponentFactory(componentDef);
2821
+ return factory.create(elementInjector, options.projectableNodes, options.hostElement, options.environmentInjector, options.directives, options.bindings);
2822
+ }
2823
+ function reflectComponentType(component) {
2824
+ const componentDef = getComponentDef(component);
2825
+ if (!componentDef) return null;
2826
+ const factory = new ComponentFactory(componentDef);
2827
+ return {
2828
+ get selector() {
2829
+ return factory.selector;
2830
+ },
2831
+ get type() {
2832
+ return factory.componentType;
2833
+ },
2834
+ get inputs() {
2835
+ return factory.inputs;
2836
+ },
2837
+ get outputs() {
2838
+ return factory.outputs;
2839
+ },
2840
+ get ngContentSelectors() {
2841
+ return factory.ngContentSelectors;
2842
+ },
2843
+ get isStandalone() {
2844
+ return componentDef.standalone;
2845
+ },
2846
+ get isSignal() {
2847
+ return componentDef.signals;
2848
+ }
2849
+ };
2850
+ }
2851
+ function mergeApplicationConfig(...configs) {
2852
+ return configs.reduce((prev, curr) => {
2853
+ return Object.assign(prev, curr, {
2854
+ providers: [...prev.providers, ...curr.providers]
2855
+ });
2856
+ }, {
2857
+ providers: []
2858
+ });
2859
+ }
2860
+ const REQUEST = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST' : '', {
2861
+ providedIn: 'platform',
2862
+ factory: () => null
2863
+ });
2864
+ const RESPONSE_INIT = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'RESPONSE_INIT' : '', {
2865
+ providedIn: 'platform',
2866
+ factory: () => null
2867
+ });
2868
+ const REQUEST_CONTEXT = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST_CONTEXT' : '', {
2869
+ providedIn: 'platform',
2870
+ factory: () => null
2871
+ });
2872
+ 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, 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 };