@angular/core 22.0.0-next.1 → 22.0.0-next.2
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.
- package/fesm2022/_attribute-chunk.mjs +1 -1
- package/fesm2022/_debug_node-chunk.mjs +376 -326
- package/fesm2022/_debug_node-chunk.mjs.map +1 -1
- package/fesm2022/_effect-chunk.mjs +3 -5
- package/fesm2022/_effect-chunk.mjs.map +1 -1
- package/fesm2022/_not_found-chunk.mjs +1 -1
- package/fesm2022/_pending_tasks-chunk.mjs +6 -5
- package/fesm2022/_pending_tasks-chunk.mjs.map +1 -1
- package/fesm2022/_resource-chunk.mjs +31 -8
- package/fesm2022/_resource-chunk.mjs.map +1 -1
- package/fesm2022/_untracked-chunk.mjs +2 -3
- package/fesm2022/_untracked-chunk.mjs.map +1 -1
- package/fesm2022/_weak_ref-chunk.mjs +1 -1
- package/fesm2022/core.mjs +1923 -1871
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives-di.mjs +1 -1
- package/fesm2022/primitives-event-dispatch.mjs +1 -1
- package/fesm2022/primitives-signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +2 -2
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/package.json +2 -2
- package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
- package/schematics/bundles/change-detection-eager.cjs +1 -1
- package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
- package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
- package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
- package/schematics/bundles/control-flow-migration.cjs +1 -1
- package/schematics/bundles/http-xhr-backend.cjs +1 -1
- package/schematics/bundles/imports-CKV-ITqD.cjs +1 -1
- package/schematics/bundles/index-BtLcQH8g.cjs +1 -1
- package/schematics/bundles/inject-migration.cjs +1 -1
- package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
- package/schematics/bundles/migrate_ts_type_references-MWoZx-Cb.cjs +1 -1
- package/schematics/bundles/ng_component_template-DPAF1aEA.cjs +1 -1
- package/schematics/bundles/ng_decorators-IVztR9rk.cjs +1 -1
- package/schematics/bundles/ngclass-to-class-migration.cjs +1 -1
- package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
- package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +1 -1
- package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
- package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
- package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
- package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +1 -1
- package/schematics/bundles/router-testing-module-migration.cjs +1 -1
- package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
- package/schematics/bundles/signal-input-migration.cjs +1 -1
- package/schematics/bundles/signal-queries-migration.cjs +1 -1
- package/schematics/bundles/signals.cjs +1 -1
- package/schematics/bundles/standalone-migration.cjs +1 -1
- package/types/_api-chunk.d.ts +9 -2
- package/types/_chrome_dev_tools_performance-chunk.d.ts +3 -2
- package/types/{_discovery-chunk.d.ts → _debug_node-chunk.d.ts} +2255 -2217
- package/types/_effect-chunk.d.ts +1 -1
- package/types/_event_dispatcher-chunk.d.ts +1 -1
- package/types/_formatter-chunk.d.ts +1 -1
- package/types/_weak_ref-chunk.d.ts +1 -1
- package/types/core.d.ts +6257 -6242
- package/types/primitives-di.d.ts +1 -1
- package/types/primitives-event-dispatch.d.ts +1 -1
- package/types/primitives-signals.d.ts +1 -1
- package/types/rxjs-interop.d.ts +2 -1
- package/types/testing.d.ts +5 -5
package/fesm2022/core.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.0.0-next.
|
|
2
|
+
* @license Angular v22.0.0-next.2
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { RuntimeError, InjectionToken, getCurrentTNode, assertInInjectionContext, signalAsReadonlyFn,
|
|
8
|
-
export { EnvironmentInjector, EventEmitter, INJECTOR, PendingTasks, VERSION, Version,
|
|
7
|
+
import { RuntimeError, InjectionToken, getCurrentTNode, assertInInjectionContext, signalAsReadonlyFn, ɵɵinject as __inject, ɵɵdefineInjector as __defineInjector, ENVIRONMENT_INITIALIZER, inject, unwrapRNode, CLEANUP, makeEnvironmentProviders, Injector, DOCUMENT, formatRuntimeError, ChangeDetectionScheduler, DOC_PAGE_BASE_URL, NgZone, DEBUG_TASK_TRACKER, stringify, ɵɵdefineInjectable as __defineInjectable, isComponentHost, getComponentLViewByIndex, getLView, DECLARATION_COMPONENT_VIEW, provideEnvironmentInitializer, ErrorHandler, INTERNAL_APPLICATION_ERROR_HANDLER, ZONELESS_ENABLED, SCHEDULE_IN_ROOT_ZONE, SCHEDULE_IN_ROOT_ZONE_DEFAULT, PendingTasksInternal, assertNgModuleType, ERROR_DETAILS_PAGE_BASE_URL, PROVIDED_ZONELESS, errorHandlerEnvironmentInitializer, INJECTOR_SCOPE, runInInjectionContext, isLContainer, HOST, hasI18n, unwrapLView, RENDERER, assertTNode, isProjectionTNode, getComponentDef, PARENT, isRootView, HEADER_OFFSET, TVIEW, CONTEXT, CONTAINER_HEADER_OFFSET, assertNotInReactiveContext, ViewContext, DestroyRef, setInjectorProfilerContext, emitAfterRenderEffectPhaseCreatedEvent, getNullInjector, signal, effect, _global } from './_pending_tasks-chunk.mjs';
|
|
8
|
+
export { EnvironmentInjector, EventEmitter, INJECTOR, PendingTasks, VERSION, Version, forwardRef, importProvidersFrom, isStandalone, provideBrowserGlobalErrorListeners, resolveForwardRef, EffectScheduler as ɵEffectScheduler, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NoopNgZone as ɵNoopNgZone, R3Injector as ɵR3Injector, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, getInjectableDef as ɵgetInjectableDef, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, store as ɵstore, truncateMiddle as ɵtruncateMiddle, ɵunwrapWritableSignal, ɵɵdisableBindings, ɵɵenableBindings, ɵɵinvalidFactoryDep, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵresetView, ɵɵrestoreView } from './_pending_tasks-chunk.mjs';
|
|
9
9
|
import { SIGNAL_NODE, signalSetFn, SIGNAL, producerAccessed, consumerDestroy, consumerPollProducersForChange, consumerBeforeComputation, consumerAfterComputation } from './_effect-chunk.mjs';
|
|
10
|
-
import {
|
|
11
|
-
export {
|
|
12
|
-
import {
|
|
13
|
-
export {
|
|
14
|
-
import { Subscription } from 'rxjs';
|
|
10
|
+
import { OutputEmitterRef, computed, ResourceValueError, isInParamsFunction, invalidResourceCreationInParams, untracked, setInParamsFunction, rethrowFatalErrors } from './_resource-chunk.mjs';
|
|
11
|
+
export { ResourceDependencyError, ResourceParamsStatus, linkedSignal, resource, ResourceImpl as ɵResourceImpl, encapsulateResourceError as ɵencapsulateResourceError, getOutputDestroyRef as ɵgetOutputDestroyRef } from './_resource-chunk.mjs';
|
|
12
|
+
import { ɵɵinjectAttribute as __injectAttribute, createMultiResultQuerySignalFn, createSingleResultOptionalQuerySignalFn, createSingleResultRequiredQuerySignalFn, makePropDecorator, ApplicationRef, ɵɵdefineNgModule as __defineNgModule, setClassMetadata, NgModule, JSACTION_BLOCK_ELEMENT_MAP, APP_ID, setStashFn, APP_BOOTSTRAP_LISTENER, JSACTION_EVENT_CONTRACT, removeListeners, isIncrementalHydrationEnabled, DEFER_BLOCK_SSR_ID_ATTRIBUTE, invokeListeners, EVENT_REPLAY_QUEUE, triggerHydrationFromBlockName, IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT, performanceMarkFeature, sharedStashFunction, sharedMapFunction, enableStashEventListenerImpl, IS_I18N_HYDRATION_ENABLED, IS_HYDRATION_DOM_REUSE_ENABLED, IS_INCREMENTAL_HYDRATION_ENABLED, DEHYDRATED_BLOCK_REGISTRY, DehydratedBlockRegistry, processBlockData, gatherDeferBlocksCommentNodes, processAndInitTriggers, appendDeferBlocksToJSActionMap, TransferState, NGH_DATA_KEY, verifySsrContentsIntegrity, Console, PRESERVE_HOST_CONTENT, cleanupDehydratedViews, countBlocksSkippedByHydration, enableRetrieveHydrationInfoImpl, enableLocateOrCreateElementNodeImpl, enableLocateOrCreateTextNodeImpl, enableLocateOrCreateElementContainerNodeImpl, enableLocateOrCreateContainerAnchorImpl, enableLocateOrCreateContainerRefImpl, enableFindMatchingDehydratedViewImpl, enableApplyRootElementTransformImpl, enableLocateOrCreateI18nNodeImpl, enablePrepareI18nBlockForHydrationImpl, setIsI18nHydrationSupportEnabled, enableClaimDehydratedIcuCaseImpl, enableRetrieveDeferBlockDataImpl, provideAppInitializer, isListLikeIterable, iterateListLike, isJsObject, ViewRef as ViewRef$1, ChangeDetectionSchedulerImpl, checkNoChangesInternal, UseExhaustiveCheckNoChanges, Injectable, NgModuleFactory, COMPILER_OPTIONS, setJitOptions, isComponentResourceResolutionQueueEmpty, getCompilerFacade, resolveComponentResources, IMAGE_CONFIG, getDocument, remove, isPromise, ApplicationInitStatus, LOCALE_ID, DEFAULT_LOCALE_ID, setLocaleId, createNgModuleRefWithProviders, optionsReducer, provideZonelessChangeDetectionInternal, validAppIdInitializer, publishDefaultGlobalUtils, PLATFORM_INITIALIZER, publishSignalConfiguration, profiler, assertStandaloneComponentType, EnvironmentNgModuleRefAdapter, ProfilerEvent, isI18nHydrationEnabled, NGH_DEFER_BLOCKS_KEY, SKIP_HYDRATION_ATTR_NAME, NGH_ATTR_NAME, getLNodeForHydration, isI18nHydrationSupportEnabled, getOrComputeI18nChildren, trySerializeI18nBlock, I18N_DATA, isTNodeShape, isDetachedByI18n, TEMPLATES, isDisconnectedNode, isInSkipHydrationBlock, unsupportedProjectionOfDomNodes, CONTAINERS, isLetDeclaration, ELEMENT_CONTAINERS, processTextNodeBeforeSerialization, setJSActionAttributes, ViewEncapsulation as ViewEncapsulation$1, collectNativeNodes, TEMPLATE_ID, NUM_ROOT_NODES, isDeferBlock, getLDeferBlockDetails, getTDeferBlockDetails, collectNativeNodesInLContainer, validateNodeExists, validateMatchingNode, DEFER_BLOCK_ID, DEFER_BLOCK_STATE, DEFER_BLOCK_STATE$1, MULTIPLIER, NODES, calcPathForNode, DISCONNECTED_NODES, convertHydrateTriggersToJsAction, DEFER_HYDRATE_TRIGGERS, DEFER_PARENT_BLOCK_ID, NOOP_AFTER_RENDER_REF, AfterRenderManager, TracingService, AfterRenderImpl, AfterRenderSequence, AFTER_RENDER_PHASES, angularCoreEnv, setClassMetadataAsync, getRegisteredNgModuleType, assertComponentDef, ComponentFactory, isSignal } from './_debug_node-chunk.mjs';
|
|
13
|
+
export { ANIMATION_MODULE_TYPE, APP_INITIALIZER, Attribute, CSP_NONCE, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver, ComponentRef$1 as 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, enableProfiling, getDebugNode, inputBinding, isWritableSignal, makeStateKey, outputBinding, provideIdleServiceWith, provideNgReflectAttributes, provideZonelessChangeDetection, setTestabilityGetter, twoWayBinding, ANIMATIONS_DISABLED as ɵANIMATIONS_DISABLED, AcxChangeDetectionStrategy as ɵAcxChangeDetectionStrategy, AcxViewEncapsulation as ɵAcxViewEncapsulation, ComponentFactory$1 as ɵComponentFactory, DEFER_BLOCK_CONFIG as ɵDEFER_BLOCK_CONFIG, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR as ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DeferBlockBehavior as ɵDeferBlockBehavior, DeferBlockState as ɵDeferBlockState, HydrationStatus as ɵHydrationStatus, IMAGE_CONFIG_DEFAULTS as ɵIMAGE_CONFIG_DEFAULTS, IS_ENABLED_BLOCKING_INITIAL_NAVIGATION as ɵIS_ENABLED_BLOCKING_INITIAL_NAVIGATION, LContext as ɵLContext, LocaleDataIndex as ɵLocaleDataIndex, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, ReflectionCapabilities as ɵReflectionCapabilities, ComponentRef 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';
|
|
15
14
|
import { clearAppScopedEarlyEventContract, EventContract, EventContractContainer, EventDispatcher, registerDispatcher, EventPhase, getAppScopedQueuedEventInfos, isEarlyEventType, isCaptureEventType } from './primitives-event-dispatch.mjs';
|
|
15
|
+
import { Subscription } from 'rxjs';
|
|
16
16
|
export { setAlternateWeakRefImpl as ɵsetAlternateWeakRefImpl } from './_weak_ref-chunk.mjs';
|
|
17
17
|
export { setCurrentInjector as ɵsetCurrentInjector } from './_not_found-chunk.mjs';
|
|
18
18
|
import '@angular/core/primitives/signals';
|
|
19
19
|
import '@angular/core/primitives/di';
|
|
20
|
+
import './_untracked-chunk.mjs';
|
|
20
21
|
import 'rxjs/operators';
|
|
21
22
|
import './_attribute-chunk.mjs';
|
|
22
|
-
import './_untracked-chunk.mjs';
|
|
23
23
|
|
|
24
24
|
const REQUIRED_UNSET_VALUE = /* @__PURE__ */Symbol('InputSignalNode#UNSET');
|
|
25
25
|
const INPUT_SIGNAL_NODE = /* @__PURE__ */(() => {
|
|
@@ -145,38 +145,6 @@ const input = (() => {
|
|
|
145
145
|
return inputFunction;
|
|
146
146
|
})();
|
|
147
147
|
|
|
148
|
-
function viewChildFn(locator, opts) {
|
|
149
|
-
ngDevMode && assertInInjectionContext(viewChild);
|
|
150
|
-
return createSingleResultOptionalQuerySignalFn(opts);
|
|
151
|
-
}
|
|
152
|
-
function viewChildRequiredFn(locator, opts) {
|
|
153
|
-
ngDevMode && assertInInjectionContext(viewChild);
|
|
154
|
-
return createSingleResultRequiredQuerySignalFn(opts);
|
|
155
|
-
}
|
|
156
|
-
const viewChild = (() => {
|
|
157
|
-
viewChildFn.required = viewChildRequiredFn;
|
|
158
|
-
return viewChildFn;
|
|
159
|
-
})();
|
|
160
|
-
function viewChildren(locator, opts) {
|
|
161
|
-
ngDevMode && assertInInjectionContext(viewChildren);
|
|
162
|
-
return createMultiResultQuerySignalFn(opts);
|
|
163
|
-
}
|
|
164
|
-
function contentChildFn(locator, opts) {
|
|
165
|
-
ngDevMode && assertInInjectionContext(contentChild);
|
|
166
|
-
return createSingleResultOptionalQuerySignalFn(opts);
|
|
167
|
-
}
|
|
168
|
-
function contentChildRequiredFn(locator, opts) {
|
|
169
|
-
ngDevMode && assertInInjectionContext(contentChildren);
|
|
170
|
-
return createSingleResultRequiredQuerySignalFn(opts);
|
|
171
|
-
}
|
|
172
|
-
const contentChild = (() => {
|
|
173
|
-
contentChildFn.required = contentChildRequiredFn;
|
|
174
|
-
return contentChildFn;
|
|
175
|
-
})();
|
|
176
|
-
function contentChildren(locator, opts) {
|
|
177
|
-
return createMultiResultQuerySignalFn(opts);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
148
|
function createModelSignal(initialValue, opts) {
|
|
181
149
|
const node = Object.create(INPUT_SIGNAL_NODE);
|
|
182
150
|
const emitterRef = new OutputEmitterRef();
|
|
@@ -225,6 +193,48 @@ const model = (() => {
|
|
|
225
193
|
return modelFunction;
|
|
226
194
|
})();
|
|
227
195
|
|
|
196
|
+
function viewChildFn(locator, opts) {
|
|
197
|
+
ngDevMode && assertInInjectionContext(viewChild);
|
|
198
|
+
return createSingleResultOptionalQuerySignalFn(opts);
|
|
199
|
+
}
|
|
200
|
+
function viewChildRequiredFn(locator, opts) {
|
|
201
|
+
ngDevMode && assertInInjectionContext(viewChild);
|
|
202
|
+
return createSingleResultRequiredQuerySignalFn(opts);
|
|
203
|
+
}
|
|
204
|
+
const viewChild = (() => {
|
|
205
|
+
viewChildFn.required = viewChildRequiredFn;
|
|
206
|
+
return viewChildFn;
|
|
207
|
+
})();
|
|
208
|
+
function viewChildren(locator, opts) {
|
|
209
|
+
ngDevMode && assertInInjectionContext(viewChildren);
|
|
210
|
+
return createMultiResultQuerySignalFn(opts);
|
|
211
|
+
}
|
|
212
|
+
function contentChildFn(locator, opts) {
|
|
213
|
+
ngDevMode && assertInInjectionContext(contentChild);
|
|
214
|
+
return createSingleResultOptionalQuerySignalFn(opts);
|
|
215
|
+
}
|
|
216
|
+
function contentChildRequiredFn(locator, opts) {
|
|
217
|
+
ngDevMode && assertInInjectionContext(contentChildren);
|
|
218
|
+
return createSingleResultRequiredQuerySignalFn(opts);
|
|
219
|
+
}
|
|
220
|
+
const contentChild = (() => {
|
|
221
|
+
contentChildFn.required = contentChildRequiredFn;
|
|
222
|
+
return contentChildFn;
|
|
223
|
+
})();
|
|
224
|
+
function contentChildren(locator, opts) {
|
|
225
|
+
return createMultiResultQuerySignalFn(opts);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function mergeApplicationConfig(...configs) {
|
|
229
|
+
return configs.reduce((prev, curr) => {
|
|
230
|
+
return Object.assign(prev, curr, {
|
|
231
|
+
providers: [...prev.providers, ...curr.providers]
|
|
232
|
+
});
|
|
233
|
+
}, {
|
|
234
|
+
providers: []
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
|
|
228
238
|
const emitDistinctChangesOnlyDefaultValue = true;
|
|
229
239
|
class Query {}
|
|
230
240
|
const ContentChildren = makePropDecorator('ContentChildren', (selector, opts = {}) => ({
|
|
@@ -258,1186 +268,943 @@ const ViewChild = makePropDecorator('ViewChild', (selector, opts) => ({
|
|
|
258
268
|
...opts
|
|
259
269
|
}), Query);
|
|
260
270
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
return Promise.resolve(moduleFactory);
|
|
266
|
-
}
|
|
267
|
-
const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);
|
|
268
|
-
setJitOptions({
|
|
269
|
-
defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)),
|
|
270
|
-
preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces))
|
|
271
|
-
});
|
|
272
|
-
if (isComponentResourceResolutionQueueEmpty()) {
|
|
273
|
-
return Promise.resolve(moduleFactory);
|
|
274
|
-
}
|
|
275
|
-
const compilerProviders = compilerOptions.flatMap(option => option.providers ?? []);
|
|
276
|
-
if (compilerProviders.length === 0) {
|
|
277
|
-
return Promise.resolve(moduleFactory);
|
|
278
|
-
}
|
|
279
|
-
const compiler = getCompilerFacade({
|
|
280
|
-
usage: 0,
|
|
281
|
-
kind: 'NgModule',
|
|
282
|
-
type: moduleType
|
|
283
|
-
});
|
|
284
|
-
const compilerInjector = Injector.create({
|
|
285
|
-
providers: compilerProviders
|
|
286
|
-
});
|
|
287
|
-
const resourceLoader = compilerInjector.get(compiler.ResourceLoader);
|
|
288
|
-
return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url))).then(() => moduleFactory);
|
|
289
|
-
}
|
|
290
|
-
function _lastDefined(args) {
|
|
291
|
-
for (let i = args.length - 1; i >= 0; i--) {
|
|
292
|
-
if (args[i] !== undefined) {
|
|
293
|
-
return args[i];
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
return undefined;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
class NgZoneChangeDetectionScheduler {
|
|
300
|
-
zone = inject(NgZone);
|
|
301
|
-
changeDetectionScheduler = inject(ChangeDetectionScheduler);
|
|
302
|
-
applicationRef = inject(ApplicationRef);
|
|
303
|
-
applicationErrorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER);
|
|
304
|
-
_onMicrotaskEmptySubscription;
|
|
305
|
-
initialize() {
|
|
306
|
-
if (this._onMicrotaskEmptySubscription) {
|
|
307
|
-
return;
|
|
308
|
-
}
|
|
309
|
-
this._onMicrotaskEmptySubscription = this.zone.onMicrotaskEmpty.subscribe({
|
|
310
|
-
next: () => {
|
|
311
|
-
if (this.changeDetectionScheduler.runningTick) {
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
this.zone.run(() => {
|
|
315
|
-
try {
|
|
316
|
-
this.applicationRef.dirtyFlags |= 1;
|
|
317
|
-
this.applicationRef._tick();
|
|
318
|
-
} catch (e) {
|
|
319
|
-
this.applicationErrorHandler(e);
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
ngOnDestroy() {
|
|
326
|
-
this._onMicrotaskEmptySubscription?.unsubscribe();
|
|
327
|
-
}
|
|
328
|
-
static ɵfac = function NgZoneChangeDetectionScheduler_Factory(__ngFactoryType__) {
|
|
329
|
-
return new (__ngFactoryType__ || NgZoneChangeDetectionScheduler)();
|
|
271
|
+
class ApplicationModule {
|
|
272
|
+
constructor(appRef) {}
|
|
273
|
+
static ɵfac = function ApplicationModule_Factory(__ngFactoryType__) {
|
|
274
|
+
return new (__ngFactoryType__ || ApplicationModule)(__inject(ApplicationRef));
|
|
330
275
|
};
|
|
331
|
-
static
|
|
332
|
-
|
|
333
|
-
factory: NgZoneChangeDetectionScheduler.ɵfac,
|
|
334
|
-
providedIn: 'root'
|
|
276
|
+
static ɵmod = /*@__PURE__*/__defineNgModule({
|
|
277
|
+
type: ApplicationModule
|
|
335
278
|
});
|
|
279
|
+
static ɵinj = /*@__PURE__*/__defineInjector({});
|
|
336
280
|
}
|
|
337
281
|
(() => {
|
|
338
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(
|
|
339
|
-
type:
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}], null, null);
|
|
282
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
|
|
283
|
+
type: NgModule
|
|
284
|
+
}], () => [{
|
|
285
|
+
type: ApplicationRef
|
|
286
|
+
}], null);
|
|
344
287
|
})();
|
|
345
|
-
|
|
346
|
-
|
|
288
|
+
|
|
289
|
+
const REQUEST = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST' : '', {
|
|
290
|
+
providedIn: 'platform',
|
|
291
|
+
factory: () => null
|
|
347
292
|
});
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
})
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
293
|
+
const RESPONSE_INIT = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'RESPONSE_INIT' : '', {
|
|
294
|
+
providedIn: 'platform',
|
|
295
|
+
factory: () => null
|
|
296
|
+
});
|
|
297
|
+
const REQUEST_CONTEXT = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST_CONTEXT' : '', {
|
|
298
|
+
providedIn: 'platform',
|
|
299
|
+
factory: () => null
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
const appsWithEventReplay = new WeakSet();
|
|
303
|
+
const EAGER_CONTENT_LISTENERS_KEY = '';
|
|
304
|
+
function shouldEnableEventReplay(injector) {
|
|
305
|
+
return injector.get(IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT);
|
|
306
|
+
}
|
|
307
|
+
function withEventReplay() {
|
|
308
|
+
const providers = [{
|
|
309
|
+
provide: IS_EVENT_REPLAY_ENABLED,
|
|
365
310
|
useFactory: () => {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
throw new RuntimeError(402, `A required Injectable was not found in the dependency injection tree. ` + 'If you are bootstrapping an NgModule, make sure that the `BrowserModule` is imported.');
|
|
311
|
+
let isEnabled = true;
|
|
312
|
+
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
313
|
+
const appId = inject(APP_ID);
|
|
314
|
+
isEnabled = !!window._ejsas?.[appId];
|
|
371
315
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
multi: true,
|
|
377
|
-
useFactory: () => {
|
|
378
|
-
const service = inject(ZoneStablePendingTask);
|
|
379
|
-
return () => {
|
|
380
|
-
service.initialize();
|
|
381
|
-
};
|
|
316
|
+
if (isEnabled) {
|
|
317
|
+
performanceMarkFeature('NgEventReplay');
|
|
318
|
+
}
|
|
319
|
+
return isEnabled;
|
|
382
320
|
}
|
|
383
|
-
}, {
|
|
384
|
-
provide: SCHEDULE_IN_ROOT_ZONE,
|
|
385
|
-
useValue: scheduleInRootZone ?? SCHEDULE_IN_ROOT_ZONE_DEFAULT
|
|
386
321
|
}];
|
|
322
|
+
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
323
|
+
providers.push({
|
|
324
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
325
|
+
useValue: () => {
|
|
326
|
+
const appRef = inject(ApplicationRef);
|
|
327
|
+
const {
|
|
328
|
+
injector
|
|
329
|
+
} = appRef;
|
|
330
|
+
if (!appsWithEventReplay.has(appRef)) {
|
|
331
|
+
const jsActionMap = inject(JSACTION_BLOCK_ELEMENT_MAP);
|
|
332
|
+
if (shouldEnableEventReplay(injector)) {
|
|
333
|
+
enableStashEventListenerImpl();
|
|
334
|
+
const appId = injector.get(APP_ID);
|
|
335
|
+
const clearStashFn = setStashFn(appId, (rEl, eventName, listenerFn) => {
|
|
336
|
+
if (rEl.nodeType !== Node.ELEMENT_NODE) return;
|
|
337
|
+
sharedStashFunction(rEl, eventName, listenerFn);
|
|
338
|
+
sharedMapFunction(rEl, jsActionMap);
|
|
339
|
+
});
|
|
340
|
+
appRef.onDestroy(clearStashFn);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
multi: true
|
|
345
|
+
}, {
|
|
346
|
+
provide: APP_BOOTSTRAP_LISTENER,
|
|
347
|
+
useFactory: () => {
|
|
348
|
+
const appRef = inject(ApplicationRef);
|
|
349
|
+
const {
|
|
350
|
+
injector
|
|
351
|
+
} = appRef;
|
|
352
|
+
return () => {
|
|
353
|
+
if (!shouldEnableEventReplay(injector) || appsWithEventReplay.has(appRef)) {
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
appsWithEventReplay.add(appRef);
|
|
357
|
+
const appId = injector.get(APP_ID);
|
|
358
|
+
appRef.onDestroy(() => {
|
|
359
|
+
appsWithEventReplay.delete(appRef);
|
|
360
|
+
if (typeof ngServerMode !== 'undefined' && !ngServerMode) {
|
|
361
|
+
clearAppScopedEarlyEventContract(appId);
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
appRef.whenStable().then(() => {
|
|
365
|
+
if (appRef.destroyed) {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
const eventContractDetails = injector.get(JSACTION_EVENT_CONTRACT);
|
|
369
|
+
initEventReplay(eventContractDetails, injector);
|
|
370
|
+
const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);
|
|
371
|
+
jsActionMap.get(EAGER_CONTENT_LISTENERS_KEY)?.forEach(removeListeners);
|
|
372
|
+
jsActionMap.delete(EAGER_CONTENT_LISTENERS_KEY);
|
|
373
|
+
const eventContract = eventContractDetails.instance;
|
|
374
|
+
if (isIncrementalHydrationEnabled(injector)) {
|
|
375
|
+
appRef.onDestroy(() => eventContract.cleanUp());
|
|
376
|
+
} else {
|
|
377
|
+
eventContract.cleanUp();
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
};
|
|
381
|
+
},
|
|
382
|
+
multi: true
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
return providers;
|
|
387
386
|
}
|
|
388
|
-
|
|
389
|
-
const
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
406
|
-
function
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
initialize() {
|
|
419
|
-
if (this.initialized) {
|
|
420
|
-
return;
|
|
387
|
+
const initEventReplay = (eventDelegation, injector) => {
|
|
388
|
+
const appId = injector.get(APP_ID);
|
|
389
|
+
const earlyJsactionData = window._ejsas[appId];
|
|
390
|
+
const eventContract = eventDelegation.instance = new EventContract(new EventContractContainer(earlyJsactionData.c));
|
|
391
|
+
for (const et of earlyJsactionData.et) {
|
|
392
|
+
eventContract.addEvent(et);
|
|
393
|
+
}
|
|
394
|
+
for (const et of earlyJsactionData.etc) {
|
|
395
|
+
eventContract.addEvent(et);
|
|
396
|
+
}
|
|
397
|
+
const eventInfos = getAppScopedQueuedEventInfos(appId);
|
|
398
|
+
eventContract.replayEarlyEventInfos(eventInfos);
|
|
399
|
+
clearAppScopedEarlyEventContract(appId);
|
|
400
|
+
const dispatcher = new EventDispatcher(event => {
|
|
401
|
+
invokeRegisteredReplayListeners(injector, event, event.currentTarget);
|
|
402
|
+
});
|
|
403
|
+
registerDispatcher(eventContract, dispatcher);
|
|
404
|
+
};
|
|
405
|
+
function collectDomEventsInfo(tView, lView, eventTypesToReplay) {
|
|
406
|
+
const domEventsInfo = new Map();
|
|
407
|
+
const lCleanup = lView[CLEANUP];
|
|
408
|
+
const tCleanup = tView.cleanup;
|
|
409
|
+
if (!tCleanup || !lCleanup) {
|
|
410
|
+
return domEventsInfo;
|
|
411
|
+
}
|
|
412
|
+
for (let i = 0; i < tCleanup.length;) {
|
|
413
|
+
const firstParam = tCleanup[i++];
|
|
414
|
+
const secondParam = tCleanup[i++];
|
|
415
|
+
if (typeof firstParam !== 'string') {
|
|
416
|
+
continue;
|
|
421
417
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
418
|
+
const eventType = firstParam;
|
|
419
|
+
if (!isEarlyEventType(eventType)) {
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
if (isCaptureEventType(eventType)) {
|
|
423
|
+
eventTypesToReplay.capture.add(eventType);
|
|
424
|
+
} else {
|
|
425
|
+
eventTypesToReplay.regular.add(eventType);
|
|
426
|
+
}
|
|
427
|
+
const listenerElement = unwrapRNode(lView[secondParam]);
|
|
428
|
+
i++;
|
|
429
|
+
const useCaptureOrIndx = tCleanup[i++];
|
|
430
|
+
const isDomEvent = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0;
|
|
431
|
+
if (!isDomEvent) {
|
|
432
|
+
continue;
|
|
433
|
+
}
|
|
434
|
+
if (!domEventsInfo.has(listenerElement)) {
|
|
435
|
+
domEventsInfo.set(listenerElement, [eventType]);
|
|
436
|
+
} else {
|
|
437
|
+
domEventsInfo.get(listenerElement).push(eventType);
|
|
426
438
|
}
|
|
427
|
-
this.zone.runOutsideAngular(() => {
|
|
428
|
-
this.subscription.add(this.zone.onStable.subscribe(() => {
|
|
429
|
-
NgZone.assertNotInAngularZone();
|
|
430
|
-
queueMicrotask(() => {
|
|
431
|
-
if (task !== null && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {
|
|
432
|
-
this.pendingTasks.remove(task);
|
|
433
|
-
task = null;
|
|
434
|
-
}
|
|
435
|
-
});
|
|
436
|
-
}));
|
|
437
|
-
});
|
|
438
|
-
this.subscription.add(this.zone.onUnstable.subscribe(() => {
|
|
439
|
-
NgZone.assertInAngularZone();
|
|
440
|
-
task ??= this.pendingTasks.add();
|
|
441
|
-
}));
|
|
442
439
|
}
|
|
443
|
-
|
|
444
|
-
|
|
440
|
+
return domEventsInfo;
|
|
441
|
+
}
|
|
442
|
+
function invokeRegisteredReplayListeners(injector, event, currentTarget) {
|
|
443
|
+
const blockName = (currentTarget && currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE)) ?? '';
|
|
444
|
+
if (/d\d+/.test(blockName)) {
|
|
445
|
+
hydrateAndInvokeBlockListeners(blockName, injector, event, currentTarget);
|
|
446
|
+
} else if (event.eventPhase === EventPhase.REPLAY) {
|
|
447
|
+
invokeListeners(event, currentTarget);
|
|
445
448
|
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
providedIn: 'root'
|
|
449
|
+
}
|
|
450
|
+
function hydrateAndInvokeBlockListeners(blockName, injector, event, currentTarget) {
|
|
451
|
+
const queue = injector.get(EVENT_REPLAY_QUEUE);
|
|
452
|
+
queue.push({
|
|
453
|
+
event,
|
|
454
|
+
currentTarget
|
|
453
455
|
});
|
|
456
|
+
triggerHydrationFromBlockName(injector, blockName, createReplayQueuedBlockEventsFn(queue));
|
|
454
457
|
}
|
|
455
|
-
(
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
})
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
class ImagePerformanceWarning {
|
|
467
|
-
window = null;
|
|
468
|
-
observer = null;
|
|
469
|
-
options = inject(IMAGE_CONFIG);
|
|
470
|
-
lcpImageUrl;
|
|
471
|
-
start() {
|
|
472
|
-
if (typeof ngServerMode !== 'undefined' && ngServerMode || typeof PerformanceObserver === 'undefined' || this.options?.disableImageSizeWarning && this.options?.disableImageLazyLoadWarning) {
|
|
473
|
-
return;
|
|
474
|
-
}
|
|
475
|
-
this.observer = this.initPerformanceObserver();
|
|
476
|
-
const doc = getDocument();
|
|
477
|
-
const win = doc.defaultView;
|
|
478
|
-
if (win) {
|
|
479
|
-
this.window = win;
|
|
480
|
-
const waitToScan = () => {
|
|
481
|
-
setTimeout(this.scanImages.bind(this), SCAN_DELAY);
|
|
482
|
-
};
|
|
483
|
-
const setup = () => {
|
|
484
|
-
if (doc.readyState === 'complete') {
|
|
485
|
-
waitToScan();
|
|
486
|
-
} else {
|
|
487
|
-
this.window?.addEventListener('load', waitToScan, {
|
|
488
|
-
once: true
|
|
489
|
-
});
|
|
490
|
-
}
|
|
491
|
-
};
|
|
492
|
-
if (typeof Zone !== 'undefined') {
|
|
493
|
-
Zone.root.run(() => setup());
|
|
458
|
+
function createReplayQueuedBlockEventsFn(queue) {
|
|
459
|
+
return hydratedBlocks => {
|
|
460
|
+
const hydrated = new Set(hydratedBlocks);
|
|
461
|
+
const newQueue = [];
|
|
462
|
+
for (let {
|
|
463
|
+
event,
|
|
464
|
+
currentTarget
|
|
465
|
+
} of queue) {
|
|
466
|
+
const blockName = currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE);
|
|
467
|
+
if (hydrated.has(blockName)) {
|
|
468
|
+
invokeListeners(event, currentTarget);
|
|
494
469
|
} else {
|
|
495
|
-
|
|
470
|
+
newQueue.push({
|
|
471
|
+
event,
|
|
472
|
+
currentTarget
|
|
473
|
+
});
|
|
496
474
|
}
|
|
497
475
|
}
|
|
476
|
+
queue.length = 0;
|
|
477
|
+
queue.push(...newQueue);
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
let isHydrationSupportEnabled = false;
|
|
482
|
+
let isI18nHydrationRuntimeSupportEnabled = false;
|
|
483
|
+
let isIncrementalHydrationRuntimeSupportEnabled = false;
|
|
484
|
+
const APPLICATION_IS_STABLE_TIMEOUT = 10_000;
|
|
485
|
+
function enableHydrationRuntimeSupport() {
|
|
486
|
+
if (!isHydrationSupportEnabled) {
|
|
487
|
+
isHydrationSupportEnabled = true;
|
|
488
|
+
enableRetrieveHydrationInfoImpl();
|
|
489
|
+
enableLocateOrCreateElementNodeImpl();
|
|
490
|
+
enableLocateOrCreateTextNodeImpl();
|
|
491
|
+
enableLocateOrCreateElementContainerNodeImpl();
|
|
492
|
+
enableLocateOrCreateContainerAnchorImpl();
|
|
493
|
+
enableLocateOrCreateContainerRefImpl();
|
|
494
|
+
enableFindMatchingDehydratedViewImpl();
|
|
495
|
+
enableApplyRootElementTransformImpl();
|
|
498
496
|
}
|
|
499
|
-
|
|
500
|
-
|
|
497
|
+
}
|
|
498
|
+
function enableI18nHydrationRuntimeSupport() {
|
|
499
|
+
if (!isI18nHydrationRuntimeSupportEnabled) {
|
|
500
|
+
isI18nHydrationRuntimeSupportEnabled = true;
|
|
501
|
+
enableLocateOrCreateI18nNodeImpl();
|
|
502
|
+
enablePrepareI18nBlockForHydrationImpl();
|
|
503
|
+
enableClaimDehydratedIcuCaseImpl();
|
|
501
504
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
505
|
+
}
|
|
506
|
+
function enableIncrementalHydrationRuntimeSupport() {
|
|
507
|
+
if (!isIncrementalHydrationRuntimeSupportEnabled) {
|
|
508
|
+
isIncrementalHydrationRuntimeSupportEnabled = true;
|
|
509
|
+
enableRetrieveDeferBlockDataImpl();
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
function printHydrationStats(injector) {
|
|
513
|
+
const console = injector.get(Console);
|
|
514
|
+
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.`;
|
|
515
|
+
console.log(message);
|
|
516
|
+
}
|
|
517
|
+
function whenStableWithTimeout(appRef) {
|
|
518
|
+
const whenStablePromise = appRef.whenStable();
|
|
519
|
+
if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
520
|
+
const timeoutTime = APPLICATION_IS_STABLE_TIMEOUT;
|
|
521
|
+
const console = appRef.injector.get(Console);
|
|
522
|
+
const ngZone = appRef.injector.get(NgZone);
|
|
523
|
+
const timeoutId = ngZone.runOutsideAngular(() => {
|
|
524
|
+
return setTimeout(() => logWarningOnStableTimedout(timeoutTime, console), timeoutTime);
|
|
517
525
|
});
|
|
518
|
-
|
|
526
|
+
whenStablePromise.finally(() => clearTimeout(timeoutId));
|
|
519
527
|
}
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
528
|
+
return whenStablePromise;
|
|
529
|
+
}
|
|
530
|
+
const CLIENT_RENDER_MODE_FLAG = 'ngcm';
|
|
531
|
+
function isClientRenderModeEnabled(doc) {
|
|
532
|
+
return (typeof ngServerMode === 'undefined' || !ngServerMode) && doc.body.hasAttribute(CLIENT_RENDER_MODE_FLAG);
|
|
533
|
+
}
|
|
534
|
+
function withDomHydration() {
|
|
535
|
+
const providers = [{
|
|
536
|
+
provide: IS_HYDRATION_DOM_REUSE_ENABLED,
|
|
537
|
+
useFactory: () => {
|
|
538
|
+
let isEnabled = true;
|
|
539
|
+
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
540
|
+
const transferState = inject(TransferState, {
|
|
541
|
+
optional: true
|
|
542
|
+
});
|
|
543
|
+
isEnabled = !!transferState?.get(NGH_DATA_KEY, null);
|
|
533
544
|
}
|
|
534
|
-
if (
|
|
535
|
-
|
|
536
|
-
lcpElementFound = true;
|
|
537
|
-
if (image.loading !== 'lazy' || image.getAttribute('ng-img')) {
|
|
538
|
-
lcpElementLoadedCorrectly = true;
|
|
539
|
-
}
|
|
540
|
-
}
|
|
545
|
+
if (isEnabled) {
|
|
546
|
+
performanceMarkFeature('NgHydration');
|
|
541
547
|
}
|
|
548
|
+
return isEnabled;
|
|
542
549
|
}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
550
|
+
}, {
|
|
551
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
552
|
+
useValue: () => {
|
|
553
|
+
setIsI18nHydrationSupportEnabled(false);
|
|
554
|
+
if (typeof ngServerMode !== 'undefined' && ngServerMode) {
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
const doc = inject(DOCUMENT);
|
|
558
|
+
if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
|
|
559
|
+
verifySsrContentsIntegrity(doc);
|
|
560
|
+
enableHydrationRuntimeSupport();
|
|
561
|
+
} else if (typeof ngDevMode !== 'undefined' && ngDevMode && !isClientRenderModeEnabled(doc)) {
|
|
562
|
+
const console = inject(Console);
|
|
563
|
+
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.');
|
|
564
|
+
console.warn(message);
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
multi: true
|
|
568
|
+
}];
|
|
569
|
+
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
570
|
+
providers.push({
|
|
571
|
+
provide: PRESERVE_HOST_CONTENT,
|
|
572
|
+
useFactory: () => {
|
|
573
|
+
return inject(IS_HYDRATION_DOM_REUSE_ENABLED);
|
|
574
|
+
}
|
|
575
|
+
}, {
|
|
576
|
+
provide: APP_BOOTSTRAP_LISTENER,
|
|
577
|
+
useFactory: () => {
|
|
578
|
+
const scheduler = inject(ChangeDetectionScheduler);
|
|
579
|
+
if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
|
|
580
|
+
const appRef = inject(ApplicationRef);
|
|
581
|
+
return () => {
|
|
582
|
+
whenStableWithTimeout(appRef).then(() => {
|
|
583
|
+
if (appRef.destroyed) {
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
cleanupDehydratedViews(appRef);
|
|
587
|
+
if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
588
|
+
countBlocksSkippedByHydration(appRef.injector);
|
|
589
|
+
printHydrationStats(appRef.injector);
|
|
590
|
+
}
|
|
591
|
+
scheduler.notify(7);
|
|
592
|
+
});
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
return () => {};
|
|
596
|
+
},
|
|
597
|
+
multi: true
|
|
598
|
+
});
|
|
579
599
|
}
|
|
580
|
-
|
|
581
|
-
return new (__ngFactoryType__ || ImagePerformanceWarning)();
|
|
582
|
-
};
|
|
583
|
-
static ɵprov = /*@__PURE__*/__defineInjectable({
|
|
584
|
-
token: ImagePerformanceWarning,
|
|
585
|
-
factory: ImagePerformanceWarning.ɵfac,
|
|
586
|
-
providedIn: 'root'
|
|
587
|
-
});
|
|
600
|
+
return makeEnvironmentProviders(providers);
|
|
588
601
|
}
|
|
589
|
-
(
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
602
|
+
function withI18nSupport() {
|
|
603
|
+
return [{
|
|
604
|
+
provide: IS_I18N_HYDRATION_ENABLED,
|
|
605
|
+
useFactory: () => inject(IS_HYDRATION_DOM_REUSE_ENABLED)
|
|
606
|
+
}, {
|
|
607
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
608
|
+
useValue: () => {
|
|
609
|
+
if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
|
|
610
|
+
enableI18nHydrationRuntimeSupport();
|
|
611
|
+
setIsI18nHydrationSupportEnabled(true);
|
|
612
|
+
performanceMarkFeature('NgI18nHydration');
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
multi: true
|
|
616
|
+
}];
|
|
599
617
|
}
|
|
600
|
-
function
|
|
601
|
-
|
|
618
|
+
function withIncrementalHydration() {
|
|
619
|
+
const providers = [withEventReplay(), {
|
|
620
|
+
provide: IS_INCREMENTAL_HYDRATION_ENABLED,
|
|
621
|
+
useValue: true
|
|
622
|
+
}, {
|
|
623
|
+
provide: DEHYDRATED_BLOCK_REGISTRY,
|
|
624
|
+
useClass: DehydratedBlockRegistry
|
|
625
|
+
}, {
|
|
626
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
627
|
+
useValue: () => {
|
|
628
|
+
enableIncrementalHydrationRuntimeSupport();
|
|
629
|
+
performanceMarkFeature('NgIncrementalHydration');
|
|
630
|
+
},
|
|
631
|
+
multi: true
|
|
632
|
+
}];
|
|
633
|
+
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
634
|
+
providers.push({
|
|
635
|
+
provide: APP_BOOTSTRAP_LISTENER,
|
|
636
|
+
useFactory: () => {
|
|
637
|
+
const injector = inject(Injector);
|
|
638
|
+
const doc = inject(DOCUMENT);
|
|
639
|
+
return () => {
|
|
640
|
+
const deferBlockData = processBlockData(injector);
|
|
641
|
+
const commentsByBlockId = gatherDeferBlocksCommentNodes(doc, doc.body);
|
|
642
|
+
processAndInitTriggers(injector, deferBlockData, commentsByBlockId);
|
|
643
|
+
appendDeferBlocksToJSActionMap(doc, injector);
|
|
644
|
+
};
|
|
645
|
+
},
|
|
646
|
+
multi: true
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
return providers;
|
|
650
|
+
}
|
|
651
|
+
function logWarningOnStableTimedout(time, console) {
|
|
652
|
+
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.`;
|
|
653
|
+
console.warn(formatRuntimeError(-506, message));
|
|
602
654
|
}
|
|
603
655
|
|
|
604
|
-
const
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
656
|
+
const STABILITY_WARNING_THRESHOLD = APPLICATION_IS_STABLE_TIMEOUT - 1_000;
|
|
657
|
+
class DebugTaskTrackerImpl {
|
|
658
|
+
openTasks = new Map();
|
|
659
|
+
add(taskId) {
|
|
660
|
+
this.openTasks.set(taskId, new Error('Task stack tracking error'));
|
|
661
|
+
}
|
|
662
|
+
remove(taskId) {
|
|
663
|
+
this.openTasks.delete(taskId);
|
|
664
|
+
}
|
|
609
665
|
}
|
|
610
|
-
function
|
|
611
|
-
const
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
if (envInjector.get(PROVIDED_ZONELESS) && envInjector.get(PROVIDED_NG_ZONE)) {
|
|
622
|
-
console.warn(formatRuntimeError(408, 'Both provideZoneChangeDetection and provideZonelessChangeDetection are provided. ' + 'This is likely a mistake. Update the application providers to use only one of the two.'));
|
|
623
|
-
}
|
|
666
|
+
function provideStabilityDebugging() {
|
|
667
|
+
const taskTracker = new DebugTaskTrackerImpl();
|
|
668
|
+
const {
|
|
669
|
+
openTasks
|
|
670
|
+
} = taskTracker;
|
|
671
|
+
return makeEnvironmentProviders([{
|
|
672
|
+
provide: DEBUG_TASK_TRACKER,
|
|
673
|
+
useValue: taskTracker
|
|
674
|
+
}, provideAppInitializer(() => {
|
|
675
|
+
if (typeof ngDevMode === 'undefined' || !ngDevMode) {
|
|
676
|
+
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.');
|
|
624
677
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
if (isApplicationBootstrapConfig(config)) {
|
|
632
|
-
const destroyListener = () => envInjector.destroy();
|
|
633
|
-
const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);
|
|
634
|
-
onPlatformDestroyListeners.add(destroyListener);
|
|
635
|
-
envInjector.onDestroy(() => {
|
|
636
|
-
onErrorSubscription.unsubscribe();
|
|
637
|
-
onPlatformDestroyListeners.delete(destroyListener);
|
|
638
|
-
});
|
|
639
|
-
} else {
|
|
640
|
-
const destroyListener = () => config.moduleRef.destroy();
|
|
641
|
-
const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);
|
|
642
|
-
onPlatformDestroyListeners.add(destroyListener);
|
|
643
|
-
config.moduleRef.onDestroy(() => {
|
|
644
|
-
remove(config.allPlatformModules, config.moduleRef);
|
|
645
|
-
onErrorSubscription.unsubscribe();
|
|
646
|
-
onPlatformDestroyListeners.delete(destroyListener);
|
|
678
|
+
const ngZone = inject(NgZone);
|
|
679
|
+
const applicationRef = inject(ApplicationRef);
|
|
680
|
+
let _taskTrackingZone = null;
|
|
681
|
+
if (typeof Zone !== 'undefined') {
|
|
682
|
+
ngZone.run(() => {
|
|
683
|
+
_taskTrackingZone = Zone.current.get('TaskTrackingZone');
|
|
647
684
|
});
|
|
648
685
|
}
|
|
649
|
-
|
|
650
|
-
const
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
return initStatus.donePromise.then(() => {
|
|
655
|
-
const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);
|
|
656
|
-
setLocaleId(localeId || DEFAULT_LOCALE_ID);
|
|
657
|
-
const enableRootComponentbootstrap = envInjector.get(ENABLE_ROOT_COMPONENT_BOOTSTRAP, true);
|
|
658
|
-
if (!enableRootComponentbootstrap) {
|
|
659
|
-
if (isApplicationBootstrapConfig(config)) {
|
|
660
|
-
return envInjector.get(ApplicationRef);
|
|
661
|
-
}
|
|
662
|
-
config.allPlatformModules.push(config.moduleRef);
|
|
663
|
-
return config.moduleRef;
|
|
664
|
-
}
|
|
665
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
666
|
-
const imagePerformanceService = envInjector.get(ImagePerformanceWarning);
|
|
667
|
-
imagePerformanceService.start();
|
|
686
|
+
ngZone.runOutsideAngular(() => {
|
|
687
|
+
const timeoutId = setTimeout(() => {
|
|
688
|
+
console.debug(`---- Application did not stabilize within ${STABILITY_WARNING_THRESHOLD / 1000} seconds ----`);
|
|
689
|
+
if (typeof Zone !== 'undefined' && !_taskTrackingZone) {
|
|
690
|
+
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.');
|
|
668
691
|
}
|
|
669
|
-
if (
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
692
|
+
if (_taskTrackingZone?.macroTasks?.length) {
|
|
693
|
+
console.group('Macrotasks keeping Angular Zone unstable:');
|
|
694
|
+
for (const t of _taskTrackingZone?.macroTasks ?? []) {
|
|
695
|
+
console.debug(t.creationLocation.stack);
|
|
673
696
|
}
|
|
674
|
-
|
|
675
|
-
} else {
|
|
676
|
-
moduleBootstrapImpl?.(config.moduleRef, config.allPlatformModules);
|
|
677
|
-
return config.moduleRef;
|
|
697
|
+
console.groupEnd();
|
|
678
698
|
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));
|
|
691
|
-
} else if (moduleRef.instance.ngDoBootstrap) {
|
|
692
|
-
moduleRef.instance.ngDoBootstrap(appRef);
|
|
693
|
-
} else {
|
|
694
|
-
throw new RuntimeError(-403, ngDevMode && `The module ${stringify(moduleRef.instance.constructor)} was bootstrapped, ` + `but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. ` + `Please define one of these.`);
|
|
695
|
-
}
|
|
696
|
-
allPlatformModules.push(moduleRef);
|
|
697
|
-
}
|
|
698
|
-
function _callAndReportToErrorHandler(errorHandler, ngZone, callback) {
|
|
699
|
-
try {
|
|
700
|
-
const result = callback();
|
|
701
|
-
if (isPromise(result)) {
|
|
702
|
-
return result.catch(e => {
|
|
703
|
-
ngZone.runOutsideAngular(() => errorHandler(e));
|
|
704
|
-
throw e;
|
|
705
|
-
});
|
|
706
|
-
}
|
|
707
|
-
return result;
|
|
708
|
-
} catch (e) {
|
|
709
|
-
ngZone.runOutsideAngular(() => errorHandler(e));
|
|
710
|
-
throw e;
|
|
711
|
-
}
|
|
699
|
+
console.group('PendingTasks keeping application unstable:');
|
|
700
|
+
for (const error of openTasks.values()) {
|
|
701
|
+
console.debug(error.stack);
|
|
702
|
+
}
|
|
703
|
+
console.groupEnd();
|
|
704
|
+
}, STABILITY_WARNING_THRESHOLD);
|
|
705
|
+
applicationRef.whenStable().then(() => {
|
|
706
|
+
clearTimeout(timeoutId);
|
|
707
|
+
});
|
|
708
|
+
});
|
|
709
|
+
})]);
|
|
712
710
|
}
|
|
713
711
|
|
|
714
|
-
class
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
_destroyListeners = [];
|
|
718
|
-
_destroyed = false;
|
|
719
|
-
constructor(_injector) {
|
|
720
|
-
this._injector = _injector;
|
|
721
|
-
}
|
|
722
|
-
bootstrapModuleFactory(moduleFactory, options) {
|
|
723
|
-
const allAppProviders = [provideZonelessChangeDetectionInternal(), ...(options?.applicationProviders ?? []), errorHandlerEnvironmentInitializer, ...(ngDevMode ? [validAppIdInitializer] : [])];
|
|
724
|
-
const moduleRef = createNgModuleRefWithProviders(moduleFactory.moduleType, this.injector, allAppProviders);
|
|
725
|
-
setModuleBootstrapImpl();
|
|
726
|
-
return bootstrap({
|
|
727
|
-
moduleRef,
|
|
728
|
-
allPlatformModules: this._modules,
|
|
729
|
-
platformInjector: this.injector
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
bootstrapModule(moduleType, compilerOptions = []) {
|
|
733
|
-
const options = optionsReducer({}, compilerOptions);
|
|
734
|
-
setModuleBootstrapImpl();
|
|
735
|
-
return compileNgModuleFactory(this.injector, options, moduleType).then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));
|
|
712
|
+
class DefaultIterableDifferFactory {
|
|
713
|
+
supports(obj) {
|
|
714
|
+
return isListLikeIterable(obj);
|
|
736
715
|
}
|
|
737
|
-
|
|
738
|
-
|
|
716
|
+
create(trackByFn) {
|
|
717
|
+
return new DefaultIterableDiffer(trackByFn);
|
|
739
718
|
}
|
|
740
|
-
|
|
741
|
-
|
|
719
|
+
}
|
|
720
|
+
const trackByIdentity = (index, item) => item;
|
|
721
|
+
class DefaultIterableDiffer {
|
|
722
|
+
length = 0;
|
|
723
|
+
collection;
|
|
724
|
+
_linkedRecords = null;
|
|
725
|
+
_unlinkedRecords = null;
|
|
726
|
+
_previousItHead = null;
|
|
727
|
+
_itHead = null;
|
|
728
|
+
_itTail = null;
|
|
729
|
+
_additionsHead = null;
|
|
730
|
+
_additionsTail = null;
|
|
731
|
+
_movesHead = null;
|
|
732
|
+
_movesTail = null;
|
|
733
|
+
_removalsHead = null;
|
|
734
|
+
_removalsTail = null;
|
|
735
|
+
_identityChangesHead = null;
|
|
736
|
+
_identityChangesTail = null;
|
|
737
|
+
_trackByFn;
|
|
738
|
+
constructor(trackByFn) {
|
|
739
|
+
this._trackByFn = trackByFn || trackByIdentity;
|
|
742
740
|
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
741
|
+
forEachItem(fn) {
|
|
742
|
+
let record;
|
|
743
|
+
for (record = this._itHead; record !== null; record = record._next) {
|
|
744
|
+
fn(record);
|
|
746
745
|
}
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
746
|
+
}
|
|
747
|
+
forEachOperation(fn) {
|
|
748
|
+
let nextIt = this._itHead;
|
|
749
|
+
let nextRemove = this._removalsHead;
|
|
750
|
+
let addRemoveOffset = 0;
|
|
751
|
+
let moveOffsets = null;
|
|
752
|
+
while (nextIt || nextRemove) {
|
|
753
|
+
const record = !nextRemove || nextIt && nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ? nextIt : nextRemove;
|
|
754
|
+
const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);
|
|
755
|
+
const currentIndex = record.currentIndex;
|
|
756
|
+
if (record === nextRemove) {
|
|
757
|
+
addRemoveOffset--;
|
|
758
|
+
nextRemove = nextRemove._nextRemoved;
|
|
759
|
+
} else {
|
|
760
|
+
nextIt = nextIt._next;
|
|
761
|
+
if (record.previousIndex == null) {
|
|
762
|
+
addRemoveOffset++;
|
|
763
|
+
} else {
|
|
764
|
+
if (!moveOffsets) moveOffsets = [];
|
|
765
|
+
const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;
|
|
766
|
+
const localCurrentIndex = currentIndex - addRemoveOffset;
|
|
767
|
+
if (localMovePreviousIndex != localCurrentIndex) {
|
|
768
|
+
for (let i = 0; i < localMovePreviousIndex; i++) {
|
|
769
|
+
const offset = i < moveOffsets.length ? moveOffsets[i] : moveOffsets[i] = 0;
|
|
770
|
+
const index = offset + i;
|
|
771
|
+
if (localCurrentIndex <= index && index < localMovePreviousIndex) {
|
|
772
|
+
moveOffsets[i] = offset + 1;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
const previousIndex = record.previousIndex;
|
|
776
|
+
moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
if (adjPreviousIndex !== currentIndex) {
|
|
781
|
+
fn(record, adjPreviousIndex, currentIndex);
|
|
782
|
+
}
|
|
753
783
|
}
|
|
754
|
-
this._destroyed = true;
|
|
755
784
|
}
|
|
756
|
-
|
|
757
|
-
|
|
785
|
+
forEachPreviousItem(fn) {
|
|
786
|
+
let record;
|
|
787
|
+
for (record = this._previousItHead; record !== null; record = record._nextPrevious) {
|
|
788
|
+
fn(record);
|
|
789
|
+
}
|
|
758
790
|
}
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
factory: PlatformRef.ɵfac,
|
|
765
|
-
providedIn: 'platform'
|
|
766
|
-
});
|
|
767
|
-
}
|
|
768
|
-
(() => {
|
|
769
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{
|
|
770
|
-
type: Injectable,
|
|
771
|
-
args: [{
|
|
772
|
-
providedIn: 'platform'
|
|
773
|
-
}]
|
|
774
|
-
}], () => [{
|
|
775
|
-
type: Injector
|
|
776
|
-
}], null);
|
|
777
|
-
})();
|
|
778
|
-
|
|
779
|
-
let _platformInjector = null;
|
|
780
|
-
function createPlatform(injector) {
|
|
781
|
-
if (getPlatform()) {
|
|
782
|
-
throw new RuntimeError(400, ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.');
|
|
791
|
+
forEachAddedItem(fn) {
|
|
792
|
+
let record;
|
|
793
|
+
for (record = this._additionsHead; record !== null; record = record._nextAdded) {
|
|
794
|
+
fn(record);
|
|
795
|
+
}
|
|
783
796
|
}
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
runPlatformInitializers(injector);
|
|
789
|
-
return platform;
|
|
790
|
-
}
|
|
791
|
-
function createPlatformFactory(parentPlatformFactory, name, providers = []) {
|
|
792
|
-
const desc = `Platform: ${name}`;
|
|
793
|
-
const marker = new InjectionToken(desc);
|
|
794
|
-
return (extraProviders = []) => {
|
|
795
|
-
let platform = getPlatform();
|
|
796
|
-
if (!platform) {
|
|
797
|
-
const platformProviders = [...providers, ...extraProviders, {
|
|
798
|
-
provide: marker,
|
|
799
|
-
useValue: true
|
|
800
|
-
}];
|
|
801
|
-
platform = parentPlatformFactory?.(platformProviders) ?? createPlatform(createPlatformInjector(platformProviders, desc));
|
|
797
|
+
forEachMovedItem(fn) {
|
|
798
|
+
let record;
|
|
799
|
+
for (record = this._movesHead; record !== null; record = record._nextMoved) {
|
|
800
|
+
fn(record);
|
|
802
801
|
}
|
|
803
|
-
return typeof ngServerMode !== 'undefined' && ngServerMode ? platform : assertPlatform(marker);
|
|
804
|
-
};
|
|
805
|
-
}
|
|
806
|
-
function createPlatformInjector(providers = [], name) {
|
|
807
|
-
return Injector.create({
|
|
808
|
-
name,
|
|
809
|
-
providers: [{
|
|
810
|
-
provide: INJECTOR_SCOPE,
|
|
811
|
-
useValue: 'platform'
|
|
812
|
-
}, {
|
|
813
|
-
provide: PLATFORM_DESTROY_LISTENERS,
|
|
814
|
-
useValue: new Set([() => _platformInjector = null])
|
|
815
|
-
}, ...providers]
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
function assertPlatform(requiredToken) {
|
|
819
|
-
const platform = getPlatform();
|
|
820
|
-
if (!platform) {
|
|
821
|
-
throw new RuntimeError(-401, ngDevMode && 'No platform exists!');
|
|
822
802
|
}
|
|
823
|
-
|
|
824
|
-
|
|
803
|
+
forEachRemovedItem(fn) {
|
|
804
|
+
let record;
|
|
805
|
+
for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
|
|
806
|
+
fn(record);
|
|
807
|
+
}
|
|
825
808
|
}
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
809
|
+
forEachIdentityChange(fn) {
|
|
810
|
+
let record;
|
|
811
|
+
for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {
|
|
812
|
+
fn(record);
|
|
813
|
+
}
|
|
831
814
|
}
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
_platformInjector = injector;
|
|
815
|
+
diff(collection) {
|
|
816
|
+
if (collection == null) collection = [];
|
|
817
|
+
if (!isListLikeIterable(collection)) {
|
|
818
|
+
throw new RuntimeError(900, ngDevMode && `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);
|
|
819
|
+
}
|
|
820
|
+
if (this.check(collection)) {
|
|
821
|
+
return this;
|
|
822
|
+
} else {
|
|
823
|
+
return null;
|
|
824
|
+
}
|
|
843
825
|
}
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
return provideEnvironmentInitializer(() => {
|
|
864
|
-
const applicationRef = inject(ApplicationRef);
|
|
865
|
-
const errorHandler = inject(ErrorHandler);
|
|
866
|
-
const scheduler = inject(ChangeDetectionSchedulerImpl);
|
|
867
|
-
const ngZone = inject(NgZone);
|
|
868
|
-
function scheduleCheckNoChanges() {
|
|
869
|
-
ngZone.runOutsideAngular(() => {
|
|
870
|
-
setTimeout(() => {
|
|
871
|
-
if (applicationRef.destroyed) {
|
|
872
|
-
return;
|
|
873
|
-
}
|
|
874
|
-
if (scheduler.pendingRenderTaskId || scheduler.runningTick) {
|
|
875
|
-
scheduleCheckNoChanges();
|
|
876
|
-
return;
|
|
826
|
+
onDestroy() {}
|
|
827
|
+
check(collection) {
|
|
828
|
+
this._reset();
|
|
829
|
+
let record = this._itHead;
|
|
830
|
+
let mayBeDirty = false;
|
|
831
|
+
let index;
|
|
832
|
+
let item;
|
|
833
|
+
let itemTrackBy;
|
|
834
|
+
if (Array.isArray(collection)) {
|
|
835
|
+
this.length = collection.length;
|
|
836
|
+
for (let index = 0; index < this.length; index++) {
|
|
837
|
+
item = collection[index];
|
|
838
|
+
itemTrackBy = this._trackByFn(index, item);
|
|
839
|
+
if (record === null || !Object.is(record.trackById, itemTrackBy)) {
|
|
840
|
+
record = this._mismatch(record, item, itemTrackBy, index);
|
|
841
|
+
mayBeDirty = true;
|
|
842
|
+
} else {
|
|
843
|
+
if (mayBeDirty) {
|
|
844
|
+
record = this._verifyReinsertion(record, item, itemTrackBy, index);
|
|
877
845
|
}
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
846
|
+
if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
|
|
847
|
+
}
|
|
848
|
+
record = record._next;
|
|
849
|
+
}
|
|
850
|
+
} else {
|
|
851
|
+
index = 0;
|
|
852
|
+
iterateListLike(collection, item => {
|
|
853
|
+
itemTrackBy = this._trackByFn(index, item);
|
|
854
|
+
if (record === null || !Object.is(record.trackById, itemTrackBy)) {
|
|
855
|
+
record = this._mismatch(record, item, itemTrackBy, index);
|
|
856
|
+
mayBeDirty = true;
|
|
857
|
+
} else {
|
|
858
|
+
if (mayBeDirty) {
|
|
859
|
+
record = this._verifyReinsertion(record, item, itemTrackBy, index);
|
|
884
860
|
}
|
|
885
|
-
|
|
886
|
-
}
|
|
861
|
+
if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
|
|
862
|
+
}
|
|
863
|
+
record = record._next;
|
|
864
|
+
index++;
|
|
887
865
|
});
|
|
866
|
+
this.length = index;
|
|
888
867
|
}
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
function provideCheckNoChangesConfig(options) {
|
|
894
|
-
return makeEnvironmentProviders(typeof ngDevMode === 'undefined' || ngDevMode ? [{
|
|
895
|
-
provide: UseExhaustiveCheckNoChanges,
|
|
896
|
-
useValue: options.exhaustive
|
|
897
|
-
}, options?.interval !== undefined ? exhaustiveCheckNoChangesInterval(options.interval) : []] : []);
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
function isDevMode() {
|
|
901
|
-
return typeof ngDevMode === 'undefined' || !!ngDevMode;
|
|
902
|
-
}
|
|
903
|
-
function enableProdMode() {
|
|
904
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
905
|
-
_global['ngDevMode'] = false;
|
|
868
|
+
this._truncate(record);
|
|
869
|
+
this.collection = collection;
|
|
870
|
+
return this.isDirty;
|
|
906
871
|
}
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
const providers = [{
|
|
916
|
-
provide: IS_EVENT_REPLAY_ENABLED,
|
|
917
|
-
useFactory: () => {
|
|
918
|
-
let isEnabled = true;
|
|
919
|
-
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
920
|
-
const appId = inject(APP_ID);
|
|
921
|
-
isEnabled = !!window._ejsas?.[appId];
|
|
872
|
+
get isDirty() {
|
|
873
|
+
return this._additionsHead !== null || this._movesHead !== null || this._removalsHead !== null || this._identityChangesHead !== null;
|
|
874
|
+
}
|
|
875
|
+
_reset() {
|
|
876
|
+
if (this.isDirty) {
|
|
877
|
+
let record;
|
|
878
|
+
for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {
|
|
879
|
+
record._nextPrevious = record._next;
|
|
922
880
|
}
|
|
923
|
-
|
|
924
|
-
|
|
881
|
+
for (record = this._additionsHead; record !== null; record = record._nextAdded) {
|
|
882
|
+
record.previousIndex = record.currentIndex;
|
|
925
883
|
}
|
|
926
|
-
|
|
884
|
+
this._additionsHead = this._additionsTail = null;
|
|
885
|
+
for (record = this._movesHead; record !== null; record = record._nextMoved) {
|
|
886
|
+
record.previousIndex = record.currentIndex;
|
|
887
|
+
}
|
|
888
|
+
this._movesHead = this._movesTail = null;
|
|
889
|
+
this._removalsHead = this._removalsTail = null;
|
|
890
|
+
this._identityChangesHead = this._identityChangesTail = null;
|
|
927
891
|
}
|
|
928
|
-
}];
|
|
929
|
-
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
930
|
-
providers.push({
|
|
931
|
-
provide: ENVIRONMENT_INITIALIZER,
|
|
932
|
-
useValue: () => {
|
|
933
|
-
const appRef = inject(ApplicationRef);
|
|
934
|
-
const {
|
|
935
|
-
injector
|
|
936
|
-
} = appRef;
|
|
937
|
-
if (!appsWithEventReplay.has(appRef)) {
|
|
938
|
-
const jsActionMap = inject(JSACTION_BLOCK_ELEMENT_MAP);
|
|
939
|
-
if (shouldEnableEventReplay(injector)) {
|
|
940
|
-
enableStashEventListenerImpl();
|
|
941
|
-
const appId = injector.get(APP_ID);
|
|
942
|
-
const clearStashFn = setStashFn(appId, (rEl, eventName, listenerFn) => {
|
|
943
|
-
if (rEl.nodeType !== Node.ELEMENT_NODE) return;
|
|
944
|
-
sharedStashFunction(rEl, eventName, listenerFn);
|
|
945
|
-
sharedMapFunction(rEl, jsActionMap);
|
|
946
|
-
});
|
|
947
|
-
appRef.onDestroy(clearStashFn);
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
},
|
|
951
|
-
multi: true
|
|
952
|
-
}, {
|
|
953
|
-
provide: APP_BOOTSTRAP_LISTENER,
|
|
954
|
-
useFactory: () => {
|
|
955
|
-
const appRef = inject(ApplicationRef);
|
|
956
|
-
const {
|
|
957
|
-
injector
|
|
958
|
-
} = appRef;
|
|
959
|
-
return () => {
|
|
960
|
-
if (!shouldEnableEventReplay(injector) || appsWithEventReplay.has(appRef)) {
|
|
961
|
-
return;
|
|
962
|
-
}
|
|
963
|
-
appsWithEventReplay.add(appRef);
|
|
964
|
-
const appId = injector.get(APP_ID);
|
|
965
|
-
appRef.onDestroy(() => {
|
|
966
|
-
appsWithEventReplay.delete(appRef);
|
|
967
|
-
if (typeof ngServerMode !== 'undefined' && !ngServerMode) {
|
|
968
|
-
clearAppScopedEarlyEventContract(appId);
|
|
969
|
-
}
|
|
970
|
-
});
|
|
971
|
-
appRef.whenStable().then(() => {
|
|
972
|
-
if (appRef.destroyed) {
|
|
973
|
-
return;
|
|
974
|
-
}
|
|
975
|
-
const eventContractDetails = injector.get(JSACTION_EVENT_CONTRACT);
|
|
976
|
-
initEventReplay(eventContractDetails, injector);
|
|
977
|
-
const jsActionMap = injector.get(JSACTION_BLOCK_ELEMENT_MAP);
|
|
978
|
-
jsActionMap.get(EAGER_CONTENT_LISTENERS_KEY)?.forEach(removeListeners);
|
|
979
|
-
jsActionMap.delete(EAGER_CONTENT_LISTENERS_KEY);
|
|
980
|
-
const eventContract = eventContractDetails.instance;
|
|
981
|
-
if (isIncrementalHydrationEnabled(injector)) {
|
|
982
|
-
appRef.onDestroy(() => eventContract.cleanUp());
|
|
983
|
-
} else {
|
|
984
|
-
eventContract.cleanUp();
|
|
985
|
-
}
|
|
986
|
-
});
|
|
987
|
-
};
|
|
988
|
-
},
|
|
989
|
-
multi: true
|
|
990
|
-
});
|
|
991
892
|
}
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
893
|
+
_mismatch(record, item, itemTrackBy, index) {
|
|
894
|
+
let previousRecord;
|
|
895
|
+
if (record === null) {
|
|
896
|
+
previousRecord = this._itTail;
|
|
897
|
+
} else {
|
|
898
|
+
previousRecord = record._prev;
|
|
899
|
+
this._remove(record);
|
|
900
|
+
}
|
|
901
|
+
record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
|
|
902
|
+
if (record !== null) {
|
|
903
|
+
if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
|
|
904
|
+
this._reinsertAfter(record, previousRecord, index);
|
|
905
|
+
} else {
|
|
906
|
+
record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);
|
|
907
|
+
if (record !== null) {
|
|
908
|
+
if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
|
|
909
|
+
this._moveAfter(record, previousRecord, index);
|
|
910
|
+
} else {
|
|
911
|
+
record = this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
return record;
|
|
1000
915
|
}
|
|
1001
|
-
|
|
1002
|
-
|
|
916
|
+
_verifyReinsertion(record, item, itemTrackBy, index) {
|
|
917
|
+
let reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
|
|
918
|
+
if (reinsertRecord !== null) {
|
|
919
|
+
record = this._reinsertAfter(reinsertRecord, record._prev, index);
|
|
920
|
+
} else if (record.currentIndex != index) {
|
|
921
|
+
record.currentIndex = index;
|
|
922
|
+
this._addToMoves(record, index);
|
|
923
|
+
}
|
|
924
|
+
return record;
|
|
1003
925
|
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
926
|
+
_truncate(record) {
|
|
927
|
+
while (record !== null) {
|
|
928
|
+
const nextRecord = record._next;
|
|
929
|
+
this._addToRemovals(this._unlink(record));
|
|
930
|
+
record = nextRecord;
|
|
931
|
+
}
|
|
932
|
+
if (this._unlinkedRecords !== null) {
|
|
933
|
+
this._unlinkedRecords.clear();
|
|
934
|
+
}
|
|
935
|
+
if (this._additionsTail !== null) {
|
|
936
|
+
this._additionsTail._nextAdded = null;
|
|
937
|
+
}
|
|
938
|
+
if (this._movesTail !== null) {
|
|
939
|
+
this._movesTail._nextMoved = null;
|
|
940
|
+
}
|
|
941
|
+
if (this._itTail !== null) {
|
|
942
|
+
this._itTail._next = null;
|
|
943
|
+
}
|
|
944
|
+
if (this._removalsTail !== null) {
|
|
945
|
+
this._removalsTail._nextRemoved = null;
|
|
946
|
+
}
|
|
947
|
+
if (this._identityChangesTail !== null) {
|
|
948
|
+
this._identityChangesTail._nextIdentityChange = null;
|
|
949
|
+
}
|
|
1018
950
|
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
951
|
+
_reinsertAfter(record, prevRecord, index) {
|
|
952
|
+
if (this._unlinkedRecords !== null) {
|
|
953
|
+
this._unlinkedRecords.remove(record);
|
|
954
|
+
}
|
|
955
|
+
const prev = record._prevRemoved;
|
|
956
|
+
const next = record._nextRemoved;
|
|
957
|
+
if (prev === null) {
|
|
958
|
+
this._removalsHead = next;
|
|
959
|
+
} else {
|
|
960
|
+
prev._nextRemoved = next;
|
|
1024
961
|
}
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
962
|
+
if (next === null) {
|
|
963
|
+
this._removalsTail = prev;
|
|
964
|
+
} else {
|
|
965
|
+
next._prevRemoved = prev;
|
|
1028
966
|
}
|
|
1029
|
-
|
|
1030
|
-
|
|
967
|
+
this._insertAfter(record, prevRecord, index);
|
|
968
|
+
this._addToMoves(record, index);
|
|
969
|
+
return record;
|
|
970
|
+
}
|
|
971
|
+
_moveAfter(record, prevRecord, index) {
|
|
972
|
+
this._unlink(record);
|
|
973
|
+
this._insertAfter(record, prevRecord, index);
|
|
974
|
+
this._addToMoves(record, index);
|
|
975
|
+
return record;
|
|
976
|
+
}
|
|
977
|
+
_addAfter(record, prevRecord, index) {
|
|
978
|
+
this._insertAfter(record, prevRecord, index);
|
|
979
|
+
if (this._additionsTail === null) {
|
|
980
|
+
this._additionsTail = this._additionsHead = record;
|
|
1031
981
|
} else {
|
|
1032
|
-
|
|
982
|
+
this._additionsTail = this._additionsTail._nextAdded = record;
|
|
1033
983
|
}
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1039
|
-
|
|
984
|
+
return record;
|
|
985
|
+
}
|
|
986
|
+
_insertAfter(record, prevRecord, index) {
|
|
987
|
+
const next = prevRecord === null ? this._itHead : prevRecord._next;
|
|
988
|
+
record._next = next;
|
|
989
|
+
record._prev = prevRecord;
|
|
990
|
+
if (next === null) {
|
|
991
|
+
this._itTail = record;
|
|
992
|
+
} else {
|
|
993
|
+
next._prev = record;
|
|
1040
994
|
}
|
|
1041
|
-
if (
|
|
1042
|
-
|
|
995
|
+
if (prevRecord === null) {
|
|
996
|
+
this._itHead = record;
|
|
1043
997
|
} else {
|
|
1044
|
-
|
|
998
|
+
prevRecord._next = record;
|
|
999
|
+
}
|
|
1000
|
+
if (this._linkedRecords === null) {
|
|
1001
|
+
this._linkedRecords = new _DuplicateMap();
|
|
1045
1002
|
}
|
|
1003
|
+
this._linkedRecords.put(record);
|
|
1004
|
+
record.currentIndex = index;
|
|
1005
|
+
return record;
|
|
1046
1006
|
}
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
function invokeRegisteredReplayListeners(injector, event, currentTarget) {
|
|
1050
|
-
const blockName = (currentTarget && currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE)) ?? '';
|
|
1051
|
-
if (/d\d+/.test(blockName)) {
|
|
1052
|
-
hydrateAndInvokeBlockListeners(blockName, injector, event, currentTarget);
|
|
1053
|
-
} else if (event.eventPhase === EventPhase.REPLAY) {
|
|
1054
|
-
invokeListeners(event, currentTarget);
|
|
1007
|
+
_remove(record) {
|
|
1008
|
+
return this._addToRemovals(this._unlink(record));
|
|
1055
1009
|
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
queue.push({
|
|
1060
|
-
event,
|
|
1061
|
-
currentTarget
|
|
1062
|
-
});
|
|
1063
|
-
triggerHydrationFromBlockName(injector, blockName, createReplayQueuedBlockEventsFn(queue));
|
|
1064
|
-
}
|
|
1065
|
-
function createReplayQueuedBlockEventsFn(queue) {
|
|
1066
|
-
return hydratedBlocks => {
|
|
1067
|
-
const hydrated = new Set(hydratedBlocks);
|
|
1068
|
-
const newQueue = [];
|
|
1069
|
-
for (let {
|
|
1070
|
-
event,
|
|
1071
|
-
currentTarget
|
|
1072
|
-
} of queue) {
|
|
1073
|
-
const blockName = currentTarget.getAttribute(DEFER_BLOCK_SSR_ID_ATTRIBUTE);
|
|
1074
|
-
if (hydrated.has(blockName)) {
|
|
1075
|
-
invokeListeners(event, currentTarget);
|
|
1076
|
-
} else {
|
|
1077
|
-
newQueue.push({
|
|
1078
|
-
event,
|
|
1079
|
-
currentTarget
|
|
1080
|
-
});
|
|
1081
|
-
}
|
|
1010
|
+
_unlink(record) {
|
|
1011
|
+
if (this._linkedRecords !== null) {
|
|
1012
|
+
this._linkedRecords.remove(record);
|
|
1082
1013
|
}
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
enableLocateOrCreateElementNodeImpl();
|
|
1097
|
-
enableLocateOrCreateTextNodeImpl();
|
|
1098
|
-
enableLocateOrCreateElementContainerNodeImpl();
|
|
1099
|
-
enableLocateOrCreateContainerAnchorImpl();
|
|
1100
|
-
enableLocateOrCreateContainerRefImpl();
|
|
1101
|
-
enableFindMatchingDehydratedViewImpl();
|
|
1102
|
-
enableApplyRootElementTransformImpl();
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
function enableI18nHydrationRuntimeSupport() {
|
|
1106
|
-
if (!isI18nHydrationRuntimeSupportEnabled) {
|
|
1107
|
-
isI18nHydrationRuntimeSupportEnabled = true;
|
|
1108
|
-
enableLocateOrCreateI18nNodeImpl();
|
|
1109
|
-
enablePrepareI18nBlockForHydrationImpl();
|
|
1110
|
-
enableClaimDehydratedIcuCaseImpl();
|
|
1014
|
+
const prev = record._prev;
|
|
1015
|
+
const next = record._next;
|
|
1016
|
+
if (prev === null) {
|
|
1017
|
+
this._itHead = next;
|
|
1018
|
+
} else {
|
|
1019
|
+
prev._next = next;
|
|
1020
|
+
}
|
|
1021
|
+
if (next === null) {
|
|
1022
|
+
this._itTail = prev;
|
|
1023
|
+
} else {
|
|
1024
|
+
next._prev = prev;
|
|
1025
|
+
}
|
|
1026
|
+
return record;
|
|
1111
1027
|
}
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1028
|
+
_addToMoves(record, toIndex) {
|
|
1029
|
+
if (record.previousIndex === toIndex) {
|
|
1030
|
+
return record;
|
|
1031
|
+
}
|
|
1032
|
+
if (this._movesTail === null) {
|
|
1033
|
+
this._movesTail = this._movesHead = record;
|
|
1034
|
+
} else {
|
|
1035
|
+
this._movesTail = this._movesTail._nextMoved = record;
|
|
1036
|
+
}
|
|
1037
|
+
return record;
|
|
1117
1038
|
}
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
whenStablePromise.finally(() => clearTimeout(timeoutId));
|
|
1039
|
+
_addToRemovals(record) {
|
|
1040
|
+
if (this._unlinkedRecords === null) {
|
|
1041
|
+
this._unlinkedRecords = new _DuplicateMap();
|
|
1042
|
+
}
|
|
1043
|
+
this._unlinkedRecords.put(record);
|
|
1044
|
+
record.currentIndex = null;
|
|
1045
|
+
record._nextRemoved = null;
|
|
1046
|
+
if (this._removalsTail === null) {
|
|
1047
|
+
this._removalsTail = this._removalsHead = record;
|
|
1048
|
+
record._prevRemoved = null;
|
|
1049
|
+
} else {
|
|
1050
|
+
record._prevRemoved = this._removalsTail;
|
|
1051
|
+
this._removalsTail = this._removalsTail._nextRemoved = record;
|
|
1052
|
+
}
|
|
1053
|
+
return record;
|
|
1134
1054
|
}
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
function withDomHydration() {
|
|
1142
|
-
const providers = [{
|
|
1143
|
-
provide: IS_HYDRATION_DOM_REUSE_ENABLED,
|
|
1144
|
-
useFactory: () => {
|
|
1145
|
-
let isEnabled = true;
|
|
1146
|
-
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
1147
|
-
const transferState = inject(TransferState, {
|
|
1148
|
-
optional: true
|
|
1149
|
-
});
|
|
1150
|
-
isEnabled = !!transferState?.get(NGH_DATA_KEY, null);
|
|
1151
|
-
}
|
|
1152
|
-
if (isEnabled) {
|
|
1153
|
-
performanceMarkFeature('NgHydration');
|
|
1154
|
-
}
|
|
1155
|
-
return isEnabled;
|
|
1055
|
+
_addIdentityChange(record, item) {
|
|
1056
|
+
record.item = item;
|
|
1057
|
+
if (this._identityChangesTail === null) {
|
|
1058
|
+
this._identityChangesTail = this._identityChangesHead = record;
|
|
1059
|
+
} else {
|
|
1060
|
+
this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;
|
|
1156
1061
|
}
|
|
1157
|
-
|
|
1158
|
-
provide: ENVIRONMENT_INITIALIZER,
|
|
1159
|
-
useValue: () => {
|
|
1160
|
-
setIsI18nHydrationSupportEnabled(false);
|
|
1161
|
-
if (typeof ngServerMode !== 'undefined' && ngServerMode) {
|
|
1162
|
-
return;
|
|
1163
|
-
}
|
|
1164
|
-
const doc = inject(DOCUMENT);
|
|
1165
|
-
if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
|
|
1166
|
-
verifySsrContentsIntegrity(doc);
|
|
1167
|
-
enableHydrationRuntimeSupport();
|
|
1168
|
-
} else if (typeof ngDevMode !== 'undefined' && ngDevMode && !isClientRenderModeEnabled(doc)) {
|
|
1169
|
-
const console = inject(Console);
|
|
1170
|
-
const message = formatRuntimeError(-505, 'Angular hydration was requested on the client, but there was no ' + 'serialized information present in the server response, ' + 'thus hydration was not enabled. ' + 'Make sure the `provideClientHydration()` is included into the list ' + 'of providers in the server part of the application configuration.');
|
|
1171
|
-
console.warn(message);
|
|
1172
|
-
}
|
|
1173
|
-
},
|
|
1174
|
-
multi: true
|
|
1175
|
-
}];
|
|
1176
|
-
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
1177
|
-
providers.push({
|
|
1178
|
-
provide: PRESERVE_HOST_CONTENT,
|
|
1179
|
-
useFactory: () => {
|
|
1180
|
-
return inject(IS_HYDRATION_DOM_REUSE_ENABLED);
|
|
1181
|
-
}
|
|
1182
|
-
}, {
|
|
1183
|
-
provide: APP_BOOTSTRAP_LISTENER,
|
|
1184
|
-
useFactory: () => {
|
|
1185
|
-
const scheduler = inject(ChangeDetectionScheduler);
|
|
1186
|
-
if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
|
|
1187
|
-
const appRef = inject(ApplicationRef);
|
|
1188
|
-
return () => {
|
|
1189
|
-
whenStableWithTimeout(appRef).then(() => {
|
|
1190
|
-
if (appRef.destroyed) {
|
|
1191
|
-
return;
|
|
1192
|
-
}
|
|
1193
|
-
cleanupDehydratedViews(appRef);
|
|
1194
|
-
if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
1195
|
-
countBlocksSkippedByHydration(appRef.injector);
|
|
1196
|
-
printHydrationStats(appRef.injector);
|
|
1197
|
-
}
|
|
1198
|
-
scheduler.notify(7);
|
|
1199
|
-
});
|
|
1200
|
-
};
|
|
1201
|
-
}
|
|
1202
|
-
return () => {};
|
|
1203
|
-
},
|
|
1204
|
-
multi: true
|
|
1205
|
-
});
|
|
1062
|
+
return record;
|
|
1206
1063
|
}
|
|
1207
|
-
return makeEnvironmentProviders(providers);
|
|
1208
|
-
}
|
|
1209
|
-
function withI18nSupport() {
|
|
1210
|
-
return [{
|
|
1211
|
-
provide: IS_I18N_HYDRATION_ENABLED,
|
|
1212
|
-
useFactory: () => inject(IS_HYDRATION_DOM_REUSE_ENABLED)
|
|
1213
|
-
}, {
|
|
1214
|
-
provide: ENVIRONMENT_INITIALIZER,
|
|
1215
|
-
useValue: () => {
|
|
1216
|
-
if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
|
|
1217
|
-
enableI18nHydrationRuntimeSupport();
|
|
1218
|
-
setIsI18nHydrationSupportEnabled(true);
|
|
1219
|
-
performanceMarkFeature('NgI18nHydration');
|
|
1220
|
-
}
|
|
1221
|
-
},
|
|
1222
|
-
multi: true
|
|
1223
|
-
}];
|
|
1224
1064
|
}
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
useFactory: () => {
|
|
1244
|
-
const injector = inject(Injector);
|
|
1245
|
-
const doc = inject(DOCUMENT);
|
|
1246
|
-
return () => {
|
|
1247
|
-
const deferBlockData = processBlockData(injector);
|
|
1248
|
-
const commentsByBlockId = gatherDeferBlocksCommentNodes(doc, doc.body);
|
|
1249
|
-
processAndInitTriggers(injector, deferBlockData, commentsByBlockId);
|
|
1250
|
-
appendDeferBlocksToJSActionMap(doc, injector);
|
|
1251
|
-
};
|
|
1252
|
-
},
|
|
1253
|
-
multi: true
|
|
1254
|
-
});
|
|
1065
|
+
class IterableChangeRecord_ {
|
|
1066
|
+
item;
|
|
1067
|
+
trackById;
|
|
1068
|
+
currentIndex = null;
|
|
1069
|
+
previousIndex = null;
|
|
1070
|
+
_nextPrevious = null;
|
|
1071
|
+
_prev = null;
|
|
1072
|
+
_next = null;
|
|
1073
|
+
_prevDup = null;
|
|
1074
|
+
_nextDup = null;
|
|
1075
|
+
_prevRemoved = null;
|
|
1076
|
+
_nextRemoved = null;
|
|
1077
|
+
_nextAdded = null;
|
|
1078
|
+
_nextMoved = null;
|
|
1079
|
+
_nextIdentityChange = null;
|
|
1080
|
+
constructor(item, trackById) {
|
|
1081
|
+
this.item = item;
|
|
1082
|
+
this.trackById = trackById;
|
|
1255
1083
|
}
|
|
1256
|
-
return providers;
|
|
1257
|
-
}
|
|
1258
|
-
function logWarningOnStableTimedout(time, console) {
|
|
1259
|
-
const message = `Angular hydration expected the ApplicationRef.isStable() to emit \`true\`, but it ` + `didn't happen within ${time}ms. Angular hydration logic depends on the application becoming stable ` + `as a signal to complete hydration process.`;
|
|
1260
|
-
console.warn(formatRuntimeError(-506, message));
|
|
1261
1084
|
}
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1085
|
+
class _DuplicateItemRecordList {
|
|
1086
|
+
_head = null;
|
|
1087
|
+
_tail = null;
|
|
1088
|
+
add(record) {
|
|
1089
|
+
if (this._head === null) {
|
|
1090
|
+
this._head = this._tail = record;
|
|
1091
|
+
record._nextDup = null;
|
|
1092
|
+
record._prevDup = null;
|
|
1093
|
+
} else {
|
|
1094
|
+
this._tail._nextDup = record;
|
|
1095
|
+
record._prevDup = this._tail;
|
|
1096
|
+
record._nextDup = null;
|
|
1097
|
+
this._tail = record;
|
|
1098
|
+
}
|
|
1268
1099
|
}
|
|
1269
|
-
|
|
1270
|
-
|
|
1100
|
+
get(trackById, atOrAfterIndex) {
|
|
1101
|
+
let record;
|
|
1102
|
+
for (record = this._head; record !== null; record = record._nextDup) {
|
|
1103
|
+
if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) && Object.is(record.trackById, trackById)) {
|
|
1104
|
+
return record;
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
return null;
|
|
1271
1108
|
}
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
provide: DEBUG_TASK_TRACKER,
|
|
1280
|
-
useValue: taskTracker
|
|
1281
|
-
}, provideAppInitializer(() => {
|
|
1282
|
-
if (typeof ngDevMode === 'undefined' || !ngDevMode) {
|
|
1283
|
-
console.warn('Stability debugging utility was provided in production mode. ' + 'This will cause debug code to be included in production bundles. ' + 'If this is intentional because you are debugging stability issues in a production environment, you can ignore this warning.');
|
|
1109
|
+
remove(record) {
|
|
1110
|
+
const prev = record._prevDup;
|
|
1111
|
+
const next = record._nextDup;
|
|
1112
|
+
if (prev === null) {
|
|
1113
|
+
this._head = next;
|
|
1114
|
+
} else {
|
|
1115
|
+
prev._nextDup = next;
|
|
1284
1116
|
}
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
ngZone.run(() => {
|
|
1290
|
-
_taskTrackingZone = Zone.current.get('TaskTrackingZone');
|
|
1291
|
-
});
|
|
1117
|
+
if (next === null) {
|
|
1118
|
+
this._tail = prev;
|
|
1119
|
+
} else {
|
|
1120
|
+
next._prevDup = prev;
|
|
1292
1121
|
}
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
console.debug(`---- Application did not stabilize within ${STABILITY_WARNING_THRESHOLD / 1000} seconds ----`);
|
|
1296
|
-
if (typeof Zone !== 'undefined' && !_taskTrackingZone) {
|
|
1297
|
-
console.info('Zone.js is present but no TaskTrackingZone found. To enable better debugging of tasks in the Angular Zone, ' + 'import "zone.js/plugins/task-tracking" in your application.');
|
|
1298
|
-
}
|
|
1299
|
-
if (_taskTrackingZone?.macroTasks?.length) {
|
|
1300
|
-
console.group('Macrotasks keeping Angular Zone unstable:');
|
|
1301
|
-
for (const t of _taskTrackingZone?.macroTasks ?? []) {
|
|
1302
|
-
console.debug(t.creationLocation.stack);
|
|
1303
|
-
}
|
|
1304
|
-
console.groupEnd();
|
|
1305
|
-
}
|
|
1306
|
-
console.group('PendingTasks keeping application unstable:');
|
|
1307
|
-
for (const error of openTasks.values()) {
|
|
1308
|
-
console.debug(error.stack);
|
|
1309
|
-
}
|
|
1310
|
-
console.groupEnd();
|
|
1311
|
-
}, STABILITY_WARNING_THRESHOLD);
|
|
1312
|
-
applicationRef.whenStable().then(() => {
|
|
1313
|
-
clearTimeout(timeoutId);
|
|
1314
|
-
});
|
|
1315
|
-
});
|
|
1316
|
-
})]);
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
function getModuleFactory(id) {
|
|
1320
|
-
const type = getRegisteredNgModuleType(id);
|
|
1321
|
-
if (!type) throw noModuleError(id);
|
|
1322
|
-
return new NgModuleFactory(type);
|
|
1323
|
-
}
|
|
1324
|
-
function getNgModuleById(id) {
|
|
1325
|
-
const type = getRegisteredNgModuleType(id);
|
|
1326
|
-
if (!type) throw noModuleError(id);
|
|
1327
|
-
return type;
|
|
1328
|
-
}
|
|
1329
|
-
function noModuleError(id) {
|
|
1330
|
-
return new RuntimeError(920, ngDevMode && `No module with ID ${id} loaded`);
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
class ChangeDetectorRef {
|
|
1334
|
-
static __NG_ELEMENT_ID__ = injectChangeDetectorRef;
|
|
1122
|
+
return this._head === null;
|
|
1123
|
+
}
|
|
1335
1124
|
}
|
|
1336
|
-
|
|
1337
|
-
|
|
1125
|
+
class _DuplicateMap {
|
|
1126
|
+
map = new Map();
|
|
1127
|
+
put(record) {
|
|
1128
|
+
const key = record.trackById;
|
|
1129
|
+
let duplicates = this.map.get(key);
|
|
1130
|
+
if (!duplicates) {
|
|
1131
|
+
duplicates = new _DuplicateItemRecordList();
|
|
1132
|
+
this.map.set(key, duplicates);
|
|
1133
|
+
}
|
|
1134
|
+
duplicates.add(record);
|
|
1135
|
+
}
|
|
1136
|
+
get(trackById, atOrAfterIndex) {
|
|
1137
|
+
const key = trackById;
|
|
1138
|
+
const recordList = this.map.get(key);
|
|
1139
|
+
return recordList ? recordList.get(trackById, atOrAfterIndex) : null;
|
|
1140
|
+
}
|
|
1141
|
+
remove(record) {
|
|
1142
|
+
const key = record.trackById;
|
|
1143
|
+
const recordList = this.map.get(key);
|
|
1144
|
+
if (recordList.remove(record)) {
|
|
1145
|
+
this.map.delete(key);
|
|
1146
|
+
}
|
|
1147
|
+
return record;
|
|
1148
|
+
}
|
|
1149
|
+
get isEmpty() {
|
|
1150
|
+
return this.map.size === 0;
|
|
1151
|
+
}
|
|
1152
|
+
clear() {
|
|
1153
|
+
this.map.clear();
|
|
1154
|
+
}
|
|
1338
1155
|
}
|
|
1339
|
-
function
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
return new ViewRef$1(hostComponentView, lView);
|
|
1156
|
+
function getPreviousIndex(item, addRemoveOffset, moveOffsets) {
|
|
1157
|
+
const previousIndex = item.previousIndex;
|
|
1158
|
+
if (previousIndex === null) return previousIndex;
|
|
1159
|
+
let moveOffset = 0;
|
|
1160
|
+
if (moveOffsets && previousIndex < moveOffsets.length) {
|
|
1161
|
+
moveOffset = moveOffsets[previousIndex];
|
|
1346
1162
|
}
|
|
1347
|
-
return
|
|
1163
|
+
return previousIndex + addRemoveOffset + moveOffset;
|
|
1348
1164
|
}
|
|
1349
1165
|
|
|
1350
|
-
class
|
|
1351
|
-
class EmbeddedViewRef extends ViewRef {}
|
|
1352
|
-
|
|
1353
|
-
class DefaultIterableDifferFactory {
|
|
1166
|
+
class DefaultKeyValueDifferFactory {
|
|
1354
1167
|
supports(obj) {
|
|
1355
|
-
return
|
|
1168
|
+
return obj instanceof Map || isJsObject(obj);
|
|
1356
1169
|
}
|
|
1357
|
-
create(
|
|
1358
|
-
return new
|
|
1170
|
+
create() {
|
|
1171
|
+
return new DefaultKeyValueDiffer();
|
|
1359
1172
|
}
|
|
1360
1173
|
}
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
_itHead = null;
|
|
1369
|
-
_itTail = null;
|
|
1174
|
+
class DefaultKeyValueDiffer {
|
|
1175
|
+
_records = new Map();
|
|
1176
|
+
_mapHead = null;
|
|
1177
|
+
_appendAfter = null;
|
|
1178
|
+
_previousMapHead = null;
|
|
1179
|
+
_changesHead = null;
|
|
1180
|
+
_changesTail = null;
|
|
1370
1181
|
_additionsHead = null;
|
|
1371
1182
|
_additionsTail = null;
|
|
1372
|
-
_movesHead = null;
|
|
1373
|
-
_movesTail = null;
|
|
1374
1183
|
_removalsHead = null;
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
_identityChangesTail = null;
|
|
1378
|
-
_trackByFn;
|
|
1379
|
-
constructor(trackByFn) {
|
|
1380
|
-
this._trackByFn = trackByFn || trackByIdentity;
|
|
1184
|
+
get isDirty() {
|
|
1185
|
+
return this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null;
|
|
1381
1186
|
}
|
|
1382
1187
|
forEachItem(fn) {
|
|
1383
1188
|
let record;
|
|
1384
|
-
for (record = this.
|
|
1189
|
+
for (record = this._mapHead; record !== null; record = record._next) {
|
|
1385
1190
|
fn(record);
|
|
1386
1191
|
}
|
|
1387
1192
|
}
|
|
1388
|
-
forEachOperation(fn) {
|
|
1389
|
-
let nextIt = this._itHead;
|
|
1390
|
-
let nextRemove = this._removalsHead;
|
|
1391
|
-
let addRemoveOffset = 0;
|
|
1392
|
-
let moveOffsets = null;
|
|
1393
|
-
while (nextIt || nextRemove) {
|
|
1394
|
-
const record = !nextRemove || nextIt && nextIt.currentIndex < getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ? nextIt : nextRemove;
|
|
1395
|
-
const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);
|
|
1396
|
-
const currentIndex = record.currentIndex;
|
|
1397
|
-
if (record === nextRemove) {
|
|
1398
|
-
addRemoveOffset--;
|
|
1399
|
-
nextRemove = nextRemove._nextRemoved;
|
|
1400
|
-
} else {
|
|
1401
|
-
nextIt = nextIt._next;
|
|
1402
|
-
if (record.previousIndex == null) {
|
|
1403
|
-
addRemoveOffset++;
|
|
1404
|
-
} else {
|
|
1405
|
-
if (!moveOffsets) moveOffsets = [];
|
|
1406
|
-
const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;
|
|
1407
|
-
const localCurrentIndex = currentIndex - addRemoveOffset;
|
|
1408
|
-
if (localMovePreviousIndex != localCurrentIndex) {
|
|
1409
|
-
for (let i = 0; i < localMovePreviousIndex; i++) {
|
|
1410
|
-
const offset = i < moveOffsets.length ? moveOffsets[i] : moveOffsets[i] = 0;
|
|
1411
|
-
const index = offset + i;
|
|
1412
|
-
if (localCurrentIndex <= index && index < localMovePreviousIndex) {
|
|
1413
|
-
moveOffsets[i] = offset + 1;
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
const previousIndex = record.previousIndex;
|
|
1417
|
-
moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
if (adjPreviousIndex !== currentIndex) {
|
|
1422
|
-
fn(record, adjPreviousIndex, currentIndex);
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
}
|
|
1426
1193
|
forEachPreviousItem(fn) {
|
|
1427
1194
|
let record;
|
|
1428
|
-
for (record = this.
|
|
1195
|
+
for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {
|
|
1429
1196
|
fn(record);
|
|
1430
1197
|
}
|
|
1431
1198
|
}
|
|
1432
|
-
|
|
1199
|
+
forEachChangedItem(fn) {
|
|
1433
1200
|
let record;
|
|
1434
|
-
for (record = this.
|
|
1201
|
+
for (record = this._changesHead; record !== null; record = record._nextChanged) {
|
|
1435
1202
|
fn(record);
|
|
1436
1203
|
}
|
|
1437
1204
|
}
|
|
1438
|
-
|
|
1205
|
+
forEachAddedItem(fn) {
|
|
1439
1206
|
let record;
|
|
1440
|
-
for (record = this.
|
|
1207
|
+
for (record = this._additionsHead; record !== null; record = record._nextAdded) {
|
|
1441
1208
|
fn(record);
|
|
1442
1209
|
}
|
|
1443
1210
|
}
|
|
@@ -1447,681 +1214,909 @@ class DefaultIterableDiffer {
|
|
|
1447
1214
|
fn(record);
|
|
1448
1215
|
}
|
|
1449
1216
|
}
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
}
|
|
1456
|
-
diff(collection) {
|
|
1457
|
-
if (collection == null) collection = [];
|
|
1458
|
-
if (!isListLikeIterable(collection)) {
|
|
1459
|
-
throw new RuntimeError(900, ngDevMode && `Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);
|
|
1460
|
-
}
|
|
1461
|
-
if (this.check(collection)) {
|
|
1462
|
-
return this;
|
|
1463
|
-
} else {
|
|
1464
|
-
return null;
|
|
1217
|
+
diff(map) {
|
|
1218
|
+
if (!map) {
|
|
1219
|
+
map = new Map();
|
|
1220
|
+
} else if (!(map instanceof Map || isJsObject(map))) {
|
|
1221
|
+
throw new RuntimeError(900, ngDevMode && `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);
|
|
1465
1222
|
}
|
|
1223
|
+
return this.check(map) ? this : null;
|
|
1466
1224
|
}
|
|
1467
|
-
|
|
1468
|
-
check(collection) {
|
|
1225
|
+
check(map) {
|
|
1469
1226
|
this._reset();
|
|
1470
|
-
let
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
if (record === null || !Object.is(record.trackById, itemTrackBy)) {
|
|
1481
|
-
record = this._mismatch(record, item, itemTrackBy, index);
|
|
1482
|
-
mayBeDirty = true;
|
|
1483
|
-
} else {
|
|
1484
|
-
if (mayBeDirty) {
|
|
1485
|
-
record = this._verifyReinsertion(record, item, itemTrackBy, index);
|
|
1486
|
-
}
|
|
1487
|
-
if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
|
|
1488
|
-
}
|
|
1489
|
-
record = record._next;
|
|
1227
|
+
let insertBefore = this._mapHead;
|
|
1228
|
+
this._appendAfter = null;
|
|
1229
|
+
this._forEach(map, (value, key) => {
|
|
1230
|
+
if (insertBefore && insertBefore.key === key) {
|
|
1231
|
+
this._maybeAddToChanges(insertBefore, value);
|
|
1232
|
+
this._appendAfter = insertBefore;
|
|
1233
|
+
insertBefore = insertBefore._next;
|
|
1234
|
+
} else {
|
|
1235
|
+
const record = this._getOrCreateRecordForKey(key, value);
|
|
1236
|
+
insertBefore = this._insertBeforeOrAppend(insertBefore, record);
|
|
1490
1237
|
}
|
|
1491
|
-
}
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
record = this._verifyReinsertion(record, item, itemTrackBy, index);
|
|
1501
|
-
}
|
|
1502
|
-
if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
|
|
1238
|
+
});
|
|
1239
|
+
if (insertBefore) {
|
|
1240
|
+
if (insertBefore._prev) {
|
|
1241
|
+
insertBefore._prev._next = null;
|
|
1242
|
+
}
|
|
1243
|
+
this._removalsHead = insertBefore;
|
|
1244
|
+
for (let record = insertBefore; record !== null; record = record._nextRemoved) {
|
|
1245
|
+
if (record === this._mapHead) {
|
|
1246
|
+
this._mapHead = null;
|
|
1503
1247
|
}
|
|
1504
|
-
record
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1248
|
+
this._records.delete(record.key);
|
|
1249
|
+
record._nextRemoved = record._next;
|
|
1250
|
+
record.previousValue = record.currentValue;
|
|
1251
|
+
record.currentValue = null;
|
|
1252
|
+
record._prev = null;
|
|
1253
|
+
record._next = null;
|
|
1254
|
+
}
|
|
1508
1255
|
}
|
|
1509
|
-
this.
|
|
1510
|
-
this.
|
|
1256
|
+
if (this._changesTail) this._changesTail._nextChanged = null;
|
|
1257
|
+
if (this._additionsTail) this._additionsTail._nextAdded = null;
|
|
1511
1258
|
return this.isDirty;
|
|
1512
1259
|
}
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
}
|
|
1522
|
-
for (record = this._additionsHead; record !== null; record = record._nextAdded) {
|
|
1523
|
-
record.previousIndex = record.currentIndex;
|
|
1260
|
+
_insertBeforeOrAppend(before, record) {
|
|
1261
|
+
if (before) {
|
|
1262
|
+
const prev = before._prev;
|
|
1263
|
+
record._next = before;
|
|
1264
|
+
record._prev = prev;
|
|
1265
|
+
before._prev = record;
|
|
1266
|
+
if (prev) {
|
|
1267
|
+
prev._next = record;
|
|
1524
1268
|
}
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
record.previousIndex = record.currentIndex;
|
|
1269
|
+
if (before === this._mapHead) {
|
|
1270
|
+
this._mapHead = record;
|
|
1528
1271
|
}
|
|
1529
|
-
this.
|
|
1530
|
-
|
|
1531
|
-
this._identityChangesHead = this._identityChangesTail = null;
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
_mismatch(record, item, itemTrackBy, index) {
|
|
1535
|
-
let previousRecord;
|
|
1536
|
-
if (record === null) {
|
|
1537
|
-
previousRecord = this._itTail;
|
|
1538
|
-
} else {
|
|
1539
|
-
previousRecord = record._prev;
|
|
1540
|
-
this._remove(record);
|
|
1272
|
+
this._appendAfter = before;
|
|
1273
|
+
return before;
|
|
1541
1274
|
}
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
this._reinsertAfter(record, previousRecord, index);
|
|
1275
|
+
if (this._appendAfter) {
|
|
1276
|
+
this._appendAfter._next = record;
|
|
1277
|
+
record._prev = this._appendAfter;
|
|
1546
1278
|
} else {
|
|
1547
|
-
|
|
1548
|
-
if (record !== null) {
|
|
1549
|
-
if (!Object.is(record.item, item)) this._addIdentityChange(record, item);
|
|
1550
|
-
this._moveAfter(record, previousRecord, index);
|
|
1551
|
-
} else {
|
|
1552
|
-
record = this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
return record;
|
|
1556
|
-
}
|
|
1557
|
-
_verifyReinsertion(record, item, itemTrackBy, index) {
|
|
1558
|
-
let reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);
|
|
1559
|
-
if (reinsertRecord !== null) {
|
|
1560
|
-
record = this._reinsertAfter(reinsertRecord, record._prev, index);
|
|
1561
|
-
} else if (record.currentIndex != index) {
|
|
1562
|
-
record.currentIndex = index;
|
|
1563
|
-
this._addToMoves(record, index);
|
|
1564
|
-
}
|
|
1565
|
-
return record;
|
|
1566
|
-
}
|
|
1567
|
-
_truncate(record) {
|
|
1568
|
-
while (record !== null) {
|
|
1569
|
-
const nextRecord = record._next;
|
|
1570
|
-
this._addToRemovals(this._unlink(record));
|
|
1571
|
-
record = nextRecord;
|
|
1572
|
-
}
|
|
1573
|
-
if (this._unlinkedRecords !== null) {
|
|
1574
|
-
this._unlinkedRecords.clear();
|
|
1575
|
-
}
|
|
1576
|
-
if (this._additionsTail !== null) {
|
|
1577
|
-
this._additionsTail._nextAdded = null;
|
|
1578
|
-
}
|
|
1579
|
-
if (this._movesTail !== null) {
|
|
1580
|
-
this._movesTail._nextMoved = null;
|
|
1581
|
-
}
|
|
1582
|
-
if (this._itTail !== null) {
|
|
1583
|
-
this._itTail._next = null;
|
|
1584
|
-
}
|
|
1585
|
-
if (this._removalsTail !== null) {
|
|
1586
|
-
this._removalsTail._nextRemoved = null;
|
|
1587
|
-
}
|
|
1588
|
-
if (this._identityChangesTail !== null) {
|
|
1589
|
-
this._identityChangesTail._nextIdentityChange = null;
|
|
1279
|
+
this._mapHead = record;
|
|
1590
1280
|
}
|
|
1281
|
+
this._appendAfter = record;
|
|
1282
|
+
return null;
|
|
1591
1283
|
}
|
|
1592
|
-
|
|
1593
|
-
if (this.
|
|
1594
|
-
this.
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1284
|
+
_getOrCreateRecordForKey(key, value) {
|
|
1285
|
+
if (this._records.has(key)) {
|
|
1286
|
+
const record = this._records.get(key);
|
|
1287
|
+
this._maybeAddToChanges(record, value);
|
|
1288
|
+
const prev = record._prev;
|
|
1289
|
+
const next = record._next;
|
|
1290
|
+
if (prev) {
|
|
1291
|
+
prev._next = next;
|
|
1292
|
+
}
|
|
1293
|
+
if (next) {
|
|
1294
|
+
next._prev = prev;
|
|
1295
|
+
}
|
|
1296
|
+
record._next = null;
|
|
1297
|
+
record._prev = null;
|
|
1298
|
+
return record;
|
|
1607
1299
|
}
|
|
1608
|
-
|
|
1609
|
-
this.
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
_moveAfter(record, prevRecord, index) {
|
|
1613
|
-
this._unlink(record);
|
|
1614
|
-
this._insertAfter(record, prevRecord, index);
|
|
1615
|
-
this._addToMoves(record, index);
|
|
1300
|
+
const record = new KeyValueChangeRecord_(key);
|
|
1301
|
+
this._records.set(key, record);
|
|
1302
|
+
record.currentValue = value;
|
|
1303
|
+
this._addToAdditions(record);
|
|
1616
1304
|
return record;
|
|
1617
1305
|
}
|
|
1618
|
-
|
|
1619
|
-
this.
|
|
1620
|
-
|
|
1621
|
-
this.
|
|
1622
|
-
|
|
1623
|
-
|
|
1306
|
+
_reset() {
|
|
1307
|
+
if (this.isDirty) {
|
|
1308
|
+
let record;
|
|
1309
|
+
this._previousMapHead = this._mapHead;
|
|
1310
|
+
for (record = this._previousMapHead; record !== null; record = record._next) {
|
|
1311
|
+
record._nextPrevious = record._next;
|
|
1312
|
+
}
|
|
1313
|
+
for (record = this._changesHead; record !== null; record = record._nextChanged) {
|
|
1314
|
+
record.previousValue = record.currentValue;
|
|
1315
|
+
}
|
|
1316
|
+
for (record = this._additionsHead; record != null; record = record._nextAdded) {
|
|
1317
|
+
record.previousValue = record.currentValue;
|
|
1318
|
+
}
|
|
1319
|
+
this._changesHead = this._changesTail = null;
|
|
1320
|
+
this._additionsHead = this._additionsTail = null;
|
|
1321
|
+
this._removalsHead = null;
|
|
1624
1322
|
}
|
|
1625
|
-
return record;
|
|
1626
1323
|
}
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
this._itTail = record;
|
|
1633
|
-
} else {
|
|
1634
|
-
next._prev = record;
|
|
1324
|
+
_maybeAddToChanges(record, newValue) {
|
|
1325
|
+
if (!Object.is(newValue, record.currentValue)) {
|
|
1326
|
+
record.previousValue = record.currentValue;
|
|
1327
|
+
record.currentValue = newValue;
|
|
1328
|
+
this._addToChanges(record);
|
|
1635
1329
|
}
|
|
1636
|
-
|
|
1637
|
-
|
|
1330
|
+
}
|
|
1331
|
+
_addToAdditions(record) {
|
|
1332
|
+
if (this._additionsHead === null) {
|
|
1333
|
+
this._additionsHead = this._additionsTail = record;
|
|
1638
1334
|
} else {
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
if (this._linkedRecords === null) {
|
|
1642
|
-
this._linkedRecords = new _DuplicateMap();
|
|
1335
|
+
this._additionsTail._nextAdded = record;
|
|
1336
|
+
this._additionsTail = record;
|
|
1643
1337
|
}
|
|
1644
|
-
this._linkedRecords.put(record);
|
|
1645
|
-
record.currentIndex = index;
|
|
1646
|
-
return record;
|
|
1647
|
-
}
|
|
1648
|
-
_remove(record) {
|
|
1649
|
-
return this._addToRemovals(this._unlink(record));
|
|
1650
1338
|
}
|
|
1651
|
-
|
|
1652
|
-
if (this.
|
|
1653
|
-
this.
|
|
1654
|
-
}
|
|
1655
|
-
const prev = record._prev;
|
|
1656
|
-
const next = record._next;
|
|
1657
|
-
if (prev === null) {
|
|
1658
|
-
this._itHead = next;
|
|
1339
|
+
_addToChanges(record) {
|
|
1340
|
+
if (this._changesHead === null) {
|
|
1341
|
+
this._changesHead = this._changesTail = record;
|
|
1659
1342
|
} else {
|
|
1660
|
-
|
|
1343
|
+
this._changesTail._nextChanged = record;
|
|
1344
|
+
this._changesTail = record;
|
|
1661
1345
|
}
|
|
1662
|
-
|
|
1663
|
-
|
|
1346
|
+
}
|
|
1347
|
+
_forEach(obj, fn) {
|
|
1348
|
+
if (obj instanceof Map) {
|
|
1349
|
+
obj.forEach(fn);
|
|
1664
1350
|
} else {
|
|
1665
|
-
|
|
1351
|
+
Object.keys(obj).forEach(k => fn(obj[k], k));
|
|
1666
1352
|
}
|
|
1667
|
-
return record;
|
|
1668
1353
|
}
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1354
|
+
}
|
|
1355
|
+
class KeyValueChangeRecord_ {
|
|
1356
|
+
key;
|
|
1357
|
+
previousValue = null;
|
|
1358
|
+
currentValue = null;
|
|
1359
|
+
_nextPrevious = null;
|
|
1360
|
+
_next = null;
|
|
1361
|
+
_prev = null;
|
|
1362
|
+
_nextAdded = null;
|
|
1363
|
+
_nextRemoved = null;
|
|
1364
|
+
_nextChanged = null;
|
|
1365
|
+
constructor(key) {
|
|
1366
|
+
this.key = key;
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
function defaultIterableDiffersFactory() {
|
|
1371
|
+
return new IterableDiffers([new DefaultIterableDifferFactory()]);
|
|
1372
|
+
}
|
|
1373
|
+
class IterableDiffers {
|
|
1374
|
+
factories;
|
|
1375
|
+
static ɵprov =
|
|
1376
|
+
/* @__PURE__ */
|
|
1377
|
+
__defineInjectable({
|
|
1378
|
+
token: IterableDiffers,
|
|
1379
|
+
providedIn: 'root',
|
|
1380
|
+
factory: defaultIterableDiffersFactory
|
|
1381
|
+
});
|
|
1382
|
+
constructor(factories) {
|
|
1383
|
+
this.factories = factories;
|
|
1384
|
+
}
|
|
1385
|
+
static create(factories, parent) {
|
|
1386
|
+
if (parent != null) {
|
|
1387
|
+
const copied = parent.factories.slice();
|
|
1388
|
+
factories = factories.concat(copied);
|
|
1672
1389
|
}
|
|
1673
|
-
|
|
1674
|
-
|
|
1390
|
+
return new IterableDiffers(factories);
|
|
1391
|
+
}
|
|
1392
|
+
static extend(factories) {
|
|
1393
|
+
return {
|
|
1394
|
+
provide: IterableDiffers,
|
|
1395
|
+
useFactory: () => {
|
|
1396
|
+
const parent = inject(IterableDiffers, {
|
|
1397
|
+
optional: true,
|
|
1398
|
+
skipSelf: true
|
|
1399
|
+
});
|
|
1400
|
+
return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());
|
|
1401
|
+
}
|
|
1402
|
+
};
|
|
1403
|
+
}
|
|
1404
|
+
find(iterable) {
|
|
1405
|
+
const factory = this.factories.find(f => f.supports(iterable));
|
|
1406
|
+
if (factory != null) {
|
|
1407
|
+
return factory;
|
|
1675
1408
|
} else {
|
|
1676
|
-
|
|
1409
|
+
throw new RuntimeError(901, ngDevMode && `Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);
|
|
1677
1410
|
}
|
|
1678
|
-
return record;
|
|
1679
1411
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1412
|
+
}
|
|
1413
|
+
function getTypeNameForDebugging(type) {
|
|
1414
|
+
return type['name'] || typeof type;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
function defaultKeyValueDiffersFactory() {
|
|
1418
|
+
return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]);
|
|
1419
|
+
}
|
|
1420
|
+
class KeyValueDiffers {
|
|
1421
|
+
static ɵprov =
|
|
1422
|
+
/* @__PURE__ */
|
|
1423
|
+
__defineInjectable({
|
|
1424
|
+
token: KeyValueDiffers,
|
|
1425
|
+
providedIn: 'root',
|
|
1426
|
+
factory: defaultKeyValueDiffersFactory
|
|
1427
|
+
});
|
|
1428
|
+
factories;
|
|
1429
|
+
constructor(factories) {
|
|
1430
|
+
this.factories = factories;
|
|
1431
|
+
}
|
|
1432
|
+
static create(factories, parent) {
|
|
1433
|
+
if (parent) {
|
|
1434
|
+
const copied = parent.factories.slice();
|
|
1435
|
+
factories = factories.concat(copied);
|
|
1683
1436
|
}
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1437
|
+
return new KeyValueDiffers(factories);
|
|
1438
|
+
}
|
|
1439
|
+
static extend(factories) {
|
|
1440
|
+
return {
|
|
1441
|
+
provide: KeyValueDiffers,
|
|
1442
|
+
useFactory: () => {
|
|
1443
|
+
const parent = inject(KeyValueDiffers, {
|
|
1444
|
+
optional: true,
|
|
1445
|
+
skipSelf: true
|
|
1446
|
+
});
|
|
1447
|
+
return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());
|
|
1448
|
+
}
|
|
1449
|
+
};
|
|
1450
|
+
}
|
|
1451
|
+
find(kv) {
|
|
1452
|
+
const factory = this.factories.find(f => f.supports(kv));
|
|
1453
|
+
if (factory) {
|
|
1454
|
+
return factory;
|
|
1693
1455
|
}
|
|
1694
|
-
|
|
1456
|
+
throw new RuntimeError(901, ngDevMode && `Cannot find a differ supporting object '${kv}'`);
|
|
1695
1457
|
}
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
class ChangeDetectorRef {
|
|
1461
|
+
static __NG_ELEMENT_ID__ = injectChangeDetectorRef;
|
|
1462
|
+
}
|
|
1463
|
+
function injectChangeDetectorRef(flags) {
|
|
1464
|
+
return createViewRef(getCurrentTNode(), getLView(), (flags & 16) === 16);
|
|
1465
|
+
}
|
|
1466
|
+
function createViewRef(tNode, lView, isPipe) {
|
|
1467
|
+
if (isComponentHost(tNode) && !isPipe) {
|
|
1468
|
+
const componentView = getComponentLViewByIndex(tNode.index, lView);
|
|
1469
|
+
return new ViewRef$1(componentView, componentView);
|
|
1470
|
+
} else if (tNode.type & (3 | 12 | 32 | 128)) {
|
|
1471
|
+
const hostComponentView = lView[DECLARATION_COMPONENT_VIEW];
|
|
1472
|
+
return new ViewRef$1(hostComponentView, lView);
|
|
1473
|
+
}
|
|
1474
|
+
return null;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
const keyValDiff = [new DefaultKeyValueDifferFactory()];
|
|
1478
|
+
const iterableDiff = [new DefaultIterableDifferFactory()];
|
|
1479
|
+
const defaultIterableDiffers = new IterableDiffers(iterableDiff);
|
|
1480
|
+
const defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);
|
|
1481
|
+
|
|
1482
|
+
function exhaustiveCheckNoChangesInterval(interval) {
|
|
1483
|
+
return provideEnvironmentInitializer(() => {
|
|
1484
|
+
const applicationRef = inject(ApplicationRef);
|
|
1485
|
+
const errorHandler = inject(ErrorHandler);
|
|
1486
|
+
const scheduler = inject(ChangeDetectionSchedulerImpl);
|
|
1487
|
+
const ngZone = inject(NgZone);
|
|
1488
|
+
function scheduleCheckNoChanges() {
|
|
1489
|
+
ngZone.runOutsideAngular(() => {
|
|
1490
|
+
setTimeout(() => {
|
|
1491
|
+
if (applicationRef.destroyed) {
|
|
1492
|
+
return;
|
|
1493
|
+
}
|
|
1494
|
+
if (scheduler.pendingRenderTaskId || scheduler.runningTick) {
|
|
1495
|
+
scheduleCheckNoChanges();
|
|
1496
|
+
return;
|
|
1497
|
+
}
|
|
1498
|
+
for (const view of applicationRef.allViews) {
|
|
1499
|
+
try {
|
|
1500
|
+
checkNoChangesInternal(view._lView, true);
|
|
1501
|
+
} catch (e) {
|
|
1502
|
+
errorHandler.handleError(e);
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
scheduleCheckNoChanges();
|
|
1506
|
+
}, interval);
|
|
1507
|
+
});
|
|
1702
1508
|
}
|
|
1703
|
-
|
|
1704
|
-
}
|
|
1509
|
+
scheduleCheckNoChanges();
|
|
1510
|
+
});
|
|
1705
1511
|
}
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
_prev = null;
|
|
1713
|
-
_next = null;
|
|
1714
|
-
_prevDup = null;
|
|
1715
|
-
_nextDup = null;
|
|
1716
|
-
_prevRemoved = null;
|
|
1717
|
-
_nextRemoved = null;
|
|
1718
|
-
_nextAdded = null;
|
|
1719
|
-
_nextMoved = null;
|
|
1720
|
-
_nextIdentityChange = null;
|
|
1721
|
-
constructor(item, trackById) {
|
|
1722
|
-
this.item = item;
|
|
1723
|
-
this.trackById = trackById;
|
|
1724
|
-
}
|
|
1512
|
+
|
|
1513
|
+
function provideCheckNoChangesConfig(options) {
|
|
1514
|
+
return makeEnvironmentProviders(typeof ngDevMode === 'undefined' || ngDevMode ? [{
|
|
1515
|
+
provide: UseExhaustiveCheckNoChanges,
|
|
1516
|
+
useValue: options.exhaustive
|
|
1517
|
+
}, options?.interval !== undefined ? exhaustiveCheckNoChangesInterval(options.interval) : []] : []);
|
|
1725
1518
|
}
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
record._prevDup = this._tail;
|
|
1737
|
-
record._nextDup = null;
|
|
1738
|
-
this._tail = record;
|
|
1519
|
+
|
|
1520
|
+
class NgZoneChangeDetectionScheduler {
|
|
1521
|
+
zone = inject(NgZone);
|
|
1522
|
+
changeDetectionScheduler = inject(ChangeDetectionScheduler);
|
|
1523
|
+
applicationRef = inject(ApplicationRef);
|
|
1524
|
+
applicationErrorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER);
|
|
1525
|
+
_onMicrotaskEmptySubscription;
|
|
1526
|
+
initialize() {
|
|
1527
|
+
if (this._onMicrotaskEmptySubscription) {
|
|
1528
|
+
return;
|
|
1739
1529
|
}
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1530
|
+
this._onMicrotaskEmptySubscription = this.zone.onMicrotaskEmpty.subscribe({
|
|
1531
|
+
next: () => {
|
|
1532
|
+
if (this.changeDetectionScheduler.runningTick) {
|
|
1533
|
+
return;
|
|
1534
|
+
}
|
|
1535
|
+
this.zone.run(() => {
|
|
1536
|
+
try {
|
|
1537
|
+
this.applicationRef.dirtyFlags |= 1;
|
|
1538
|
+
this.applicationRef._tick();
|
|
1539
|
+
} catch (e) {
|
|
1540
|
+
this.applicationErrorHandler(e);
|
|
1541
|
+
}
|
|
1542
|
+
});
|
|
1746
1543
|
}
|
|
1747
|
-
}
|
|
1748
|
-
return null;
|
|
1544
|
+
});
|
|
1749
1545
|
}
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1546
|
+
ngOnDestroy() {
|
|
1547
|
+
this._onMicrotaskEmptySubscription?.unsubscribe();
|
|
1548
|
+
}
|
|
1549
|
+
static ɵfac = function NgZoneChangeDetectionScheduler_Factory(__ngFactoryType__) {
|
|
1550
|
+
return new (__ngFactoryType__ || NgZoneChangeDetectionScheduler)();
|
|
1551
|
+
};
|
|
1552
|
+
static ɵprov = /*@__PURE__*/__defineInjectable({
|
|
1553
|
+
token: NgZoneChangeDetectionScheduler,
|
|
1554
|
+
factory: NgZoneChangeDetectionScheduler.ɵfac,
|
|
1555
|
+
providedIn: 'root'
|
|
1556
|
+
});
|
|
1557
|
+
}
|
|
1558
|
+
(() => {
|
|
1559
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(NgZoneChangeDetectionScheduler, [{
|
|
1560
|
+
type: Injectable,
|
|
1561
|
+
args: [{
|
|
1562
|
+
providedIn: 'root'
|
|
1563
|
+
}]
|
|
1564
|
+
}], null, null);
|
|
1565
|
+
})();
|
|
1566
|
+
const PROVIDED_NG_ZONE = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'provideZoneChangeDetection token' : '', {
|
|
1567
|
+
factory: () => false
|
|
1568
|
+
});
|
|
1569
|
+
function internalProvideZoneChangeDetection({
|
|
1570
|
+
ngZoneFactory,
|
|
1571
|
+
scheduleInRootZone
|
|
1572
|
+
}) {
|
|
1573
|
+
ngZoneFactory ??= () => new NgZone({
|
|
1574
|
+
...getNgZoneOptions(),
|
|
1575
|
+
scheduleInRootZone
|
|
1576
|
+
});
|
|
1577
|
+
return [{
|
|
1578
|
+
provide: ZONELESS_ENABLED,
|
|
1579
|
+
useValue: false
|
|
1580
|
+
}, {
|
|
1581
|
+
provide: NgZone,
|
|
1582
|
+
useFactory: ngZoneFactory
|
|
1583
|
+
}, {
|
|
1584
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
1585
|
+
multi: true,
|
|
1586
|
+
useFactory: () => {
|
|
1587
|
+
const ngZoneChangeDetectionScheduler = inject(NgZoneChangeDetectionScheduler, {
|
|
1588
|
+
optional: true
|
|
1589
|
+
});
|
|
1590
|
+
if ((typeof ngDevMode === 'undefined' || ngDevMode) && ngZoneChangeDetectionScheduler === null) {
|
|
1591
|
+
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.');
|
|
1592
|
+
}
|
|
1593
|
+
return () => ngZoneChangeDetectionScheduler.initialize();
|
|
1757
1594
|
}
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1595
|
+
}, {
|
|
1596
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
1597
|
+
multi: true,
|
|
1598
|
+
useFactory: () => {
|
|
1599
|
+
const service = inject(ZoneStablePendingTask);
|
|
1600
|
+
return () => {
|
|
1601
|
+
service.initialize();
|
|
1602
|
+
};
|
|
1762
1603
|
}
|
|
1763
|
-
|
|
1764
|
-
|
|
1604
|
+
}, {
|
|
1605
|
+
provide: SCHEDULE_IN_ROOT_ZONE,
|
|
1606
|
+
useValue: scheduleInRootZone ?? SCHEDULE_IN_ROOT_ZONE_DEFAULT
|
|
1607
|
+
}];
|
|
1765
1608
|
}
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1609
|
+
function provideZoneChangeDetection(options) {
|
|
1610
|
+
const scheduleInRootZone = options?.scheduleInRootZone;
|
|
1611
|
+
const zoneProviders = internalProvideZoneChangeDetection({
|
|
1612
|
+
ngZoneFactory: () => {
|
|
1613
|
+
const ngZoneOptions = getNgZoneOptions(options);
|
|
1614
|
+
ngZoneOptions.scheduleInRootZone = scheduleInRootZone;
|
|
1615
|
+
if (ngZoneOptions.shouldCoalesceEventChangeDetection) {
|
|
1616
|
+
performanceMarkFeature('NgZone_CoalesceEvent');
|
|
1617
|
+
}
|
|
1618
|
+
return new NgZone(ngZoneOptions);
|
|
1619
|
+
},
|
|
1620
|
+
scheduleInRootZone
|
|
1621
|
+
});
|
|
1622
|
+
return makeEnvironmentProviders([{
|
|
1623
|
+
provide: PROVIDED_NG_ZONE,
|
|
1624
|
+
useValue: true
|
|
1625
|
+
}, zoneProviders]);
|
|
1626
|
+
}
|
|
1627
|
+
function getNgZoneOptions(options) {
|
|
1628
|
+
return {
|
|
1629
|
+
enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,
|
|
1630
|
+
shouldCoalesceEventChangeDetection: options?.eventCoalescing ?? false,
|
|
1631
|
+
shouldCoalesceRunChangeDetection: options?.runCoalescing ?? false
|
|
1632
|
+
};
|
|
1633
|
+
}
|
|
1634
|
+
class ZoneStablePendingTask {
|
|
1635
|
+
subscription = new Subscription();
|
|
1636
|
+
initialized = false;
|
|
1637
|
+
zone = inject(NgZone);
|
|
1638
|
+
pendingTasks = inject(PendingTasksInternal);
|
|
1639
|
+
initialize() {
|
|
1640
|
+
if (this.initialized) {
|
|
1641
|
+
return;
|
|
1774
1642
|
}
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
const recordList = this.map.get(key);
|
|
1780
|
-
return recordList ? recordList.get(trackById, atOrAfterIndex) : null;
|
|
1781
|
-
}
|
|
1782
|
-
remove(record) {
|
|
1783
|
-
const key = record.trackById;
|
|
1784
|
-
const recordList = this.map.get(key);
|
|
1785
|
-
if (recordList.remove(record)) {
|
|
1786
|
-
this.map.delete(key);
|
|
1643
|
+
this.initialized = true;
|
|
1644
|
+
let task = null;
|
|
1645
|
+
if (!this.zone.isStable && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {
|
|
1646
|
+
task = this.pendingTasks.add();
|
|
1787
1647
|
}
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1648
|
+
this.zone.runOutsideAngular(() => {
|
|
1649
|
+
this.subscription.add(this.zone.onStable.subscribe(() => {
|
|
1650
|
+
NgZone.assertNotInAngularZone();
|
|
1651
|
+
queueMicrotask(() => {
|
|
1652
|
+
if (task !== null && !this.zone.hasPendingMacrotasks && !this.zone.hasPendingMicrotasks) {
|
|
1653
|
+
this.pendingTasks.remove(task);
|
|
1654
|
+
task = null;
|
|
1655
|
+
}
|
|
1656
|
+
});
|
|
1657
|
+
}));
|
|
1658
|
+
});
|
|
1659
|
+
this.subscription.add(this.zone.onUnstable.subscribe(() => {
|
|
1660
|
+
NgZone.assertInAngularZone();
|
|
1661
|
+
task ??= this.pendingTasks.add();
|
|
1662
|
+
}));
|
|
1795
1663
|
}
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
const previousIndex = item.previousIndex;
|
|
1799
|
-
if (previousIndex === null) return previousIndex;
|
|
1800
|
-
let moveOffset = 0;
|
|
1801
|
-
if (moveOffsets && previousIndex < moveOffsets.length) {
|
|
1802
|
-
moveOffset = moveOffsets[previousIndex];
|
|
1664
|
+
ngOnDestroy() {
|
|
1665
|
+
this.subscription.unsubscribe();
|
|
1803
1666
|
}
|
|
1804
|
-
|
|
1667
|
+
static ɵfac = function ZoneStablePendingTask_Factory(__ngFactoryType__) {
|
|
1668
|
+
return new (__ngFactoryType__ || ZoneStablePendingTask)();
|
|
1669
|
+
};
|
|
1670
|
+
static ɵprov = /*@__PURE__*/__defineInjectable({
|
|
1671
|
+
token: ZoneStablePendingTask,
|
|
1672
|
+
factory: ZoneStablePendingTask.ɵfac,
|
|
1673
|
+
providedIn: 'root'
|
|
1674
|
+
});
|
|
1805
1675
|
}
|
|
1676
|
+
(() => {
|
|
1677
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ZoneStablePendingTask, [{
|
|
1678
|
+
type: Injectable,
|
|
1679
|
+
args: [{
|
|
1680
|
+
providedIn: 'root'
|
|
1681
|
+
}]
|
|
1682
|
+
}], null, null);
|
|
1683
|
+
})();
|
|
1806
1684
|
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
return new DefaultKeyValueDiffer();
|
|
1685
|
+
function compileNgModuleFactory(injector, options, moduleType) {
|
|
1686
|
+
ngDevMode && assertNgModuleType(moduleType);
|
|
1687
|
+
const moduleFactory = new NgModuleFactory(moduleType);
|
|
1688
|
+
if (typeof ngJitMode !== 'undefined' && !ngJitMode) {
|
|
1689
|
+
return Promise.resolve(moduleFactory);
|
|
1813
1690
|
}
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
_changesTail = null;
|
|
1822
|
-
_additionsHead = null;
|
|
1823
|
-
_additionsTail = null;
|
|
1824
|
-
_removalsHead = null;
|
|
1825
|
-
get isDirty() {
|
|
1826
|
-
return this._additionsHead !== null || this._changesHead !== null || this._removalsHead !== null;
|
|
1691
|
+
const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);
|
|
1692
|
+
setJitOptions({
|
|
1693
|
+
defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)),
|
|
1694
|
+
preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces))
|
|
1695
|
+
});
|
|
1696
|
+
if (isComponentResourceResolutionQueueEmpty()) {
|
|
1697
|
+
return Promise.resolve(moduleFactory);
|
|
1827
1698
|
}
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
fn(record);
|
|
1832
|
-
}
|
|
1699
|
+
const compilerProviders = compilerOptions.flatMap(option => option.providers ?? []);
|
|
1700
|
+
if (compilerProviders.length === 0) {
|
|
1701
|
+
return Promise.resolve(moduleFactory);
|
|
1833
1702
|
}
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1703
|
+
const compiler = getCompilerFacade({
|
|
1704
|
+
usage: 0,
|
|
1705
|
+
kind: 'NgModule',
|
|
1706
|
+
type: moduleType
|
|
1707
|
+
});
|
|
1708
|
+
const compilerInjector = Injector.create({
|
|
1709
|
+
providers: compilerProviders
|
|
1710
|
+
});
|
|
1711
|
+
const resourceLoader = compilerInjector.get(compiler.ResourceLoader);
|
|
1712
|
+
return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url))).then(() => moduleFactory);
|
|
1713
|
+
}
|
|
1714
|
+
function _lastDefined(args) {
|
|
1715
|
+
for (let i = args.length - 1; i >= 0; i--) {
|
|
1716
|
+
if (args[i] !== undefined) {
|
|
1717
|
+
return args[i];
|
|
1838
1718
|
}
|
|
1839
1719
|
}
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1720
|
+
return undefined;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
const SCAN_DELAY = 200;
|
|
1724
|
+
const OVERSIZED_IMAGE_TOLERANCE = 1200;
|
|
1725
|
+
class ImagePerformanceWarning {
|
|
1726
|
+
window = null;
|
|
1727
|
+
observer = null;
|
|
1728
|
+
options = inject(IMAGE_CONFIG);
|
|
1729
|
+
lcpImageUrl;
|
|
1730
|
+
start() {
|
|
1731
|
+
if (typeof ngServerMode !== 'undefined' && ngServerMode || typeof PerformanceObserver === 'undefined' || this.options?.disableImageSizeWarning && this.options?.disableImageLazyLoadWarning) {
|
|
1732
|
+
return;
|
|
1844
1733
|
}
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1734
|
+
this.observer = this.initPerformanceObserver();
|
|
1735
|
+
const doc = getDocument();
|
|
1736
|
+
const win = doc.defaultView;
|
|
1737
|
+
if (win) {
|
|
1738
|
+
this.window = win;
|
|
1739
|
+
const waitToScan = () => {
|
|
1740
|
+
setTimeout(this.scanImages.bind(this), SCAN_DELAY);
|
|
1741
|
+
};
|
|
1742
|
+
const setup = () => {
|
|
1743
|
+
if (doc.readyState === 'complete') {
|
|
1744
|
+
waitToScan();
|
|
1745
|
+
} else {
|
|
1746
|
+
this.window?.addEventListener('load', waitToScan, {
|
|
1747
|
+
once: true
|
|
1748
|
+
});
|
|
1749
|
+
}
|
|
1750
|
+
};
|
|
1751
|
+
if (typeof Zone !== 'undefined') {
|
|
1752
|
+
Zone.root.run(() => setup());
|
|
1753
|
+
} else {
|
|
1754
|
+
setup();
|
|
1755
|
+
}
|
|
1850
1756
|
}
|
|
1851
1757
|
}
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
|
|
1855
|
-
fn(record);
|
|
1856
|
-
}
|
|
1758
|
+
ngOnDestroy() {
|
|
1759
|
+
this.observer?.disconnect();
|
|
1857
1760
|
}
|
|
1858
|
-
|
|
1859
|
-
if (
|
|
1860
|
-
|
|
1861
|
-
} else if (!(map instanceof Map || isJsObject(map))) {
|
|
1862
|
-
throw new RuntimeError(900, ngDevMode && `Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);
|
|
1761
|
+
initPerformanceObserver() {
|
|
1762
|
+
if (typeof PerformanceObserver === 'undefined') {
|
|
1763
|
+
return null;
|
|
1863
1764
|
}
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
if (insertBefore && insertBefore.key === key) {
|
|
1872
|
-
this._maybeAddToChanges(insertBefore, value);
|
|
1873
|
-
this._appendAfter = insertBefore;
|
|
1874
|
-
insertBefore = insertBefore._next;
|
|
1875
|
-
} else {
|
|
1876
|
-
const record = this._getOrCreateRecordForKey(key, value);
|
|
1877
|
-
insertBefore = this._insertBeforeOrAppend(insertBefore, record);
|
|
1878
|
-
}
|
|
1765
|
+
const observer = new PerformanceObserver(entryList => {
|
|
1766
|
+
const entries = entryList.getEntries();
|
|
1767
|
+
if (entries.length === 0) return;
|
|
1768
|
+
const lcpElement = entries[entries.length - 1];
|
|
1769
|
+
const imgSrc = lcpElement.element?.src ?? '';
|
|
1770
|
+
if (imgSrc.startsWith('data:') || imgSrc.startsWith('blob:')) return;
|
|
1771
|
+
this.lcpImageUrl = imgSrc;
|
|
1879
1772
|
});
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1773
|
+
observer.observe({
|
|
1774
|
+
type: 'largest-contentful-paint',
|
|
1775
|
+
buffered: true
|
|
1776
|
+
});
|
|
1777
|
+
return observer;
|
|
1778
|
+
}
|
|
1779
|
+
scanImages() {
|
|
1780
|
+
const images = getDocument().querySelectorAll('img');
|
|
1781
|
+
let lcpElementFound,
|
|
1782
|
+
lcpElementLoadedCorrectly = false;
|
|
1783
|
+
for (let index = 0; index < images.length; index++) {
|
|
1784
|
+
const image = images[index];
|
|
1785
|
+
if (!image) {
|
|
1786
|
+
continue;
|
|
1883
1787
|
}
|
|
1884
|
-
this.
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
this._mapHead = null;
|
|
1788
|
+
if (!this.options?.disableImageSizeWarning) {
|
|
1789
|
+
if (!image.getAttribute('ng-img') && this.isOversized(image)) {
|
|
1790
|
+
logOversizedImageWarning(image.src);
|
|
1888
1791
|
}
|
|
1889
|
-
this._records.delete(record.key);
|
|
1890
|
-
record._nextRemoved = record._next;
|
|
1891
|
-
record.previousValue = record.currentValue;
|
|
1892
|
-
record.currentValue = null;
|
|
1893
|
-
record._prev = null;
|
|
1894
|
-
record._next = null;
|
|
1895
|
-
}
|
|
1896
|
-
}
|
|
1897
|
-
if (this._changesTail) this._changesTail._nextChanged = null;
|
|
1898
|
-
if (this._additionsTail) this._additionsTail._nextAdded = null;
|
|
1899
|
-
return this.isDirty;
|
|
1900
|
-
}
|
|
1901
|
-
_insertBeforeOrAppend(before, record) {
|
|
1902
|
-
if (before) {
|
|
1903
|
-
const prev = before._prev;
|
|
1904
|
-
record._next = before;
|
|
1905
|
-
record._prev = prev;
|
|
1906
|
-
before._prev = record;
|
|
1907
|
-
if (prev) {
|
|
1908
|
-
prev._next = record;
|
|
1909
1792
|
}
|
|
1910
|
-
if (
|
|
1911
|
-
this.
|
|
1793
|
+
if (!this.options?.disableImageLazyLoadWarning && this.lcpImageUrl) {
|
|
1794
|
+
if (image.src === this.lcpImageUrl) {
|
|
1795
|
+
lcpElementFound = true;
|
|
1796
|
+
if (image.loading !== 'lazy' || image.getAttribute('ng-img')) {
|
|
1797
|
+
lcpElementLoadedCorrectly = true;
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1912
1800
|
}
|
|
1913
|
-
this._appendAfter = before;
|
|
1914
|
-
return before;
|
|
1915
1801
|
}
|
|
1916
|
-
if (this.
|
|
1917
|
-
this.
|
|
1918
|
-
record._prev = this._appendAfter;
|
|
1919
|
-
} else {
|
|
1920
|
-
this._mapHead = record;
|
|
1802
|
+
if (lcpElementFound && !lcpElementLoadedCorrectly && this.lcpImageUrl && !this.options?.disableImageLazyLoadWarning) {
|
|
1803
|
+
logLazyLCPWarning(this.lcpImageUrl);
|
|
1921
1804
|
}
|
|
1922
|
-
this._appendAfter = record;
|
|
1923
|
-
return null;
|
|
1924
1805
|
}
|
|
1925
|
-
|
|
1926
|
-
if (this.
|
|
1927
|
-
|
|
1928
|
-
this._maybeAddToChanges(record, value);
|
|
1929
|
-
const prev = record._prev;
|
|
1930
|
-
const next = record._next;
|
|
1931
|
-
if (prev) {
|
|
1932
|
-
prev._next = next;
|
|
1933
|
-
}
|
|
1934
|
-
if (next) {
|
|
1935
|
-
next._prev = prev;
|
|
1936
|
-
}
|
|
1937
|
-
record._next = null;
|
|
1938
|
-
record._prev = null;
|
|
1939
|
-
return record;
|
|
1806
|
+
isOversized(image) {
|
|
1807
|
+
if (!this.window) {
|
|
1808
|
+
return false;
|
|
1940
1809
|
}
|
|
1941
|
-
const
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
return record;
|
|
1946
|
-
}
|
|
1947
|
-
_reset() {
|
|
1948
|
-
if (this.isDirty) {
|
|
1949
|
-
let record;
|
|
1950
|
-
this._previousMapHead = this._mapHead;
|
|
1951
|
-
for (record = this._previousMapHead; record !== null; record = record._next) {
|
|
1952
|
-
record._nextPrevious = record._next;
|
|
1953
|
-
}
|
|
1954
|
-
for (record = this._changesHead; record !== null; record = record._nextChanged) {
|
|
1955
|
-
record.previousValue = record.currentValue;
|
|
1956
|
-
}
|
|
1957
|
-
for (record = this._additionsHead; record != null; record = record._nextAdded) {
|
|
1958
|
-
record.previousValue = record.currentValue;
|
|
1959
|
-
}
|
|
1960
|
-
this._changesHead = this._changesTail = null;
|
|
1961
|
-
this._additionsHead = this._additionsTail = null;
|
|
1962
|
-
this._removalsHead = null;
|
|
1810
|
+
const nonOversizedImageExtentions = ['.svg'];
|
|
1811
|
+
const imageSource = (image.src || '').toLowerCase();
|
|
1812
|
+
if (nonOversizedImageExtentions.some(extension => imageSource.endsWith(extension))) {
|
|
1813
|
+
return false;
|
|
1963
1814
|
}
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1815
|
+
const computedStyle = this.window.getComputedStyle(image);
|
|
1816
|
+
let renderedWidth = parseFloat(computedStyle.getPropertyValue('width'));
|
|
1817
|
+
let renderedHeight = parseFloat(computedStyle.getPropertyValue('height'));
|
|
1818
|
+
const boxSizing = computedStyle.getPropertyValue('box-sizing');
|
|
1819
|
+
const objectFit = computedStyle.getPropertyValue('object-fit');
|
|
1820
|
+
if (objectFit === `cover`) {
|
|
1821
|
+
return false;
|
|
1970
1822
|
}
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1823
|
+
if (boxSizing === 'border-box') {
|
|
1824
|
+
const paddingTop = computedStyle.getPropertyValue('padding-top');
|
|
1825
|
+
const paddingRight = computedStyle.getPropertyValue('padding-right');
|
|
1826
|
+
const paddingBottom = computedStyle.getPropertyValue('padding-bottom');
|
|
1827
|
+
const paddingLeft = computedStyle.getPropertyValue('padding-left');
|
|
1828
|
+
renderedWidth -= parseFloat(paddingRight) + parseFloat(paddingLeft);
|
|
1829
|
+
renderedHeight -= parseFloat(paddingTop) + parseFloat(paddingBottom);
|
|
1978
1830
|
}
|
|
1831
|
+
const intrinsicWidth = image.naturalWidth;
|
|
1832
|
+
const intrinsicHeight = image.naturalHeight;
|
|
1833
|
+
const recommendedWidth = this.window.devicePixelRatio * renderedWidth;
|
|
1834
|
+
const recommendedHeight = this.window.devicePixelRatio * renderedHeight;
|
|
1835
|
+
const oversizedWidth = intrinsicWidth - recommendedWidth >= OVERSIZED_IMAGE_TOLERANCE;
|
|
1836
|
+
const oversizedHeight = intrinsicHeight - recommendedHeight >= OVERSIZED_IMAGE_TOLERANCE;
|
|
1837
|
+
return oversizedWidth || oversizedHeight;
|
|
1979
1838
|
}
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1839
|
+
static ɵfac = function ImagePerformanceWarning_Factory(__ngFactoryType__) {
|
|
1840
|
+
return new (__ngFactoryType__ || ImagePerformanceWarning)();
|
|
1841
|
+
};
|
|
1842
|
+
static ɵprov = /*@__PURE__*/__defineInjectable({
|
|
1843
|
+
token: ImagePerformanceWarning,
|
|
1844
|
+
factory: ImagePerformanceWarning.ɵfac,
|
|
1845
|
+
providedIn: 'root'
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
(() => {
|
|
1849
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ImagePerformanceWarning, [{
|
|
1850
|
+
type: Injectable,
|
|
1851
|
+
args: [{
|
|
1852
|
+
providedIn: 'root'
|
|
1853
|
+
}]
|
|
1854
|
+
}], null, null);
|
|
1855
|
+
})();
|
|
1856
|
+
function logLazyLCPWarning(src) {
|
|
1857
|
+
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`));
|
|
1858
|
+
}
|
|
1859
|
+
function logOversizedImageWarning(src) {
|
|
1860
|
+
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`));
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
const PLATFORM_DESTROY_LISTENERS = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'PlatformDestroyListeners' : '');
|
|
1864
|
+
|
|
1865
|
+
const ENABLE_ROOT_COMPONENT_BOOTSTRAP = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'ENABLE_ROOT_COMPONENT_BOOTSTRAP' : '');
|
|
1866
|
+
function isApplicationBootstrapConfig(config) {
|
|
1867
|
+
return !config.moduleRef;
|
|
1868
|
+
}
|
|
1869
|
+
function bootstrap(config) {
|
|
1870
|
+
const envInjector = isApplicationBootstrapConfig(config) ? config.r3Injector : config.moduleRef.injector;
|
|
1871
|
+
const ngZone = envInjector.get(NgZone);
|
|
1872
|
+
return ngZone.run(() => {
|
|
1873
|
+
if (isApplicationBootstrapConfig(config)) {
|
|
1874
|
+
config.r3Injector.resolveInjectorInitializers();
|
|
1983
1875
|
} else {
|
|
1984
|
-
|
|
1985
|
-
this._changesTail = record;
|
|
1876
|
+
config.moduleRef.resolveInjectorInitializers();
|
|
1986
1877
|
}
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1878
|
+
const exceptionHandler = envInjector.get(INTERNAL_APPLICATION_ERROR_HANDLER);
|
|
1879
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
1880
|
+
if (envInjector.get(PROVIDED_ZONELESS) && envInjector.get(PROVIDED_NG_ZONE)) {
|
|
1881
|
+
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.'));
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
let onErrorSubscription;
|
|
1885
|
+
ngZone.runOutsideAngular(() => {
|
|
1886
|
+
onErrorSubscription = ngZone.onError.subscribe({
|
|
1887
|
+
next: exceptionHandler
|
|
1888
|
+
});
|
|
1889
|
+
});
|
|
1890
|
+
if (isApplicationBootstrapConfig(config)) {
|
|
1891
|
+
const destroyListener = () => envInjector.destroy();
|
|
1892
|
+
const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);
|
|
1893
|
+
onPlatformDestroyListeners.add(destroyListener);
|
|
1894
|
+
envInjector.onDestroy(() => {
|
|
1895
|
+
onErrorSubscription.unsubscribe();
|
|
1896
|
+
onPlatformDestroyListeners.delete(destroyListener);
|
|
1897
|
+
});
|
|
1991
1898
|
} else {
|
|
1992
|
-
|
|
1899
|
+
const destroyListener = () => config.moduleRef.destroy();
|
|
1900
|
+
const onPlatformDestroyListeners = config.platformInjector.get(PLATFORM_DESTROY_LISTENERS);
|
|
1901
|
+
onPlatformDestroyListeners.add(destroyListener);
|
|
1902
|
+
config.moduleRef.onDestroy(() => {
|
|
1903
|
+
remove(config.allPlatformModules, config.moduleRef);
|
|
1904
|
+
onErrorSubscription.unsubscribe();
|
|
1905
|
+
onPlatformDestroyListeners.delete(destroyListener);
|
|
1906
|
+
});
|
|
1993
1907
|
}
|
|
1908
|
+
return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {
|
|
1909
|
+
const pendingTasks = envInjector.get(PendingTasksInternal);
|
|
1910
|
+
const taskId = pendingTasks.add();
|
|
1911
|
+
const initStatus = envInjector.get(ApplicationInitStatus);
|
|
1912
|
+
initStatus.runInitializers();
|
|
1913
|
+
return initStatus.donePromise.then(() => {
|
|
1914
|
+
const localeId = envInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);
|
|
1915
|
+
setLocaleId(localeId || DEFAULT_LOCALE_ID);
|
|
1916
|
+
const enableRootComponentbootstrap = envInjector.get(ENABLE_ROOT_COMPONENT_BOOTSTRAP, true);
|
|
1917
|
+
if (!enableRootComponentbootstrap) {
|
|
1918
|
+
if (isApplicationBootstrapConfig(config)) {
|
|
1919
|
+
return envInjector.get(ApplicationRef);
|
|
1920
|
+
}
|
|
1921
|
+
config.allPlatformModules.push(config.moduleRef);
|
|
1922
|
+
return config.moduleRef;
|
|
1923
|
+
}
|
|
1924
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
1925
|
+
const imagePerformanceService = envInjector.get(ImagePerformanceWarning);
|
|
1926
|
+
imagePerformanceService.start();
|
|
1927
|
+
}
|
|
1928
|
+
if (isApplicationBootstrapConfig(config)) {
|
|
1929
|
+
const appRef = envInjector.get(ApplicationRef);
|
|
1930
|
+
if (config.rootComponent !== undefined) {
|
|
1931
|
+
appRef.bootstrap(config.rootComponent);
|
|
1932
|
+
}
|
|
1933
|
+
return appRef;
|
|
1934
|
+
} else {
|
|
1935
|
+
moduleBootstrapImpl?.(config.moduleRef, config.allPlatformModules);
|
|
1936
|
+
return config.moduleRef;
|
|
1937
|
+
}
|
|
1938
|
+
}).finally(() => void pendingTasks.remove(taskId));
|
|
1939
|
+
});
|
|
1940
|
+
});
|
|
1941
|
+
}
|
|
1942
|
+
let moduleBootstrapImpl;
|
|
1943
|
+
function setModuleBootstrapImpl() {
|
|
1944
|
+
moduleBootstrapImpl = _moduleDoBootstrap;
|
|
1945
|
+
}
|
|
1946
|
+
function _moduleDoBootstrap(moduleRef, allPlatformModules) {
|
|
1947
|
+
const appRef = moduleRef.injector.get(ApplicationRef);
|
|
1948
|
+
if (moduleRef._bootstrapComponents.length > 0) {
|
|
1949
|
+
moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));
|
|
1950
|
+
} else if (moduleRef.instance.ngDoBootstrap) {
|
|
1951
|
+
moduleRef.instance.ngDoBootstrap(appRef);
|
|
1952
|
+
} else {
|
|
1953
|
+
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.`);
|
|
1994
1954
|
}
|
|
1955
|
+
allPlatformModules.push(moduleRef);
|
|
1995
1956
|
}
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
1957
|
+
function _callAndReportToErrorHandler(errorHandler, ngZone, callback) {
|
|
1958
|
+
try {
|
|
1959
|
+
const result = callback();
|
|
1960
|
+
if (isPromise(result)) {
|
|
1961
|
+
return result.catch(e => {
|
|
1962
|
+
ngZone.runOutsideAngular(() => errorHandler(e));
|
|
1963
|
+
throw e;
|
|
1964
|
+
});
|
|
1965
|
+
}
|
|
1966
|
+
return result;
|
|
1967
|
+
} catch (e) {
|
|
1968
|
+
ngZone.runOutsideAngular(() => errorHandler(e));
|
|
1969
|
+
throw e;
|
|
2008
1970
|
}
|
|
2009
1971
|
}
|
|
2010
1972
|
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
__defineInjectable({
|
|
2019
|
-
token: IterableDiffers,
|
|
2020
|
-
providedIn: 'root',
|
|
2021
|
-
factory: defaultIterableDiffersFactory
|
|
2022
|
-
});
|
|
2023
|
-
constructor(factories) {
|
|
2024
|
-
this.factories = factories;
|
|
1973
|
+
class PlatformRef {
|
|
1974
|
+
_injector;
|
|
1975
|
+
_modules = [];
|
|
1976
|
+
_destroyListeners = [];
|
|
1977
|
+
_destroyed = false;
|
|
1978
|
+
constructor(_injector) {
|
|
1979
|
+
this._injector = _injector;
|
|
2025
1980
|
}
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
1981
|
+
bootstrapModuleFactory(moduleFactory, options) {
|
|
1982
|
+
const allAppProviders = [provideZonelessChangeDetectionInternal(), ...(options?.applicationProviders ?? []), errorHandlerEnvironmentInitializer, ...(ngDevMode ? [validAppIdInitializer] : [])];
|
|
1983
|
+
const moduleRef = createNgModuleRefWithProviders(moduleFactory.moduleType, this.injector, allAppProviders);
|
|
1984
|
+
setModuleBootstrapImpl();
|
|
1985
|
+
return bootstrap({
|
|
1986
|
+
moduleRef,
|
|
1987
|
+
allPlatformModules: this._modules,
|
|
1988
|
+
platformInjector: this.injector
|
|
1989
|
+
});
|
|
2032
1990
|
}
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
const parent = inject(IterableDiffers, {
|
|
2038
|
-
optional: true,
|
|
2039
|
-
skipSelf: true
|
|
2040
|
-
});
|
|
2041
|
-
return IterableDiffers.create(factories, parent || defaultIterableDiffersFactory());
|
|
2042
|
-
}
|
|
2043
|
-
};
|
|
1991
|
+
bootstrapModule(moduleType, compilerOptions = []) {
|
|
1992
|
+
const options = optionsReducer({}, compilerOptions);
|
|
1993
|
+
setModuleBootstrapImpl();
|
|
1994
|
+
return compileNgModuleFactory(this.injector, options, moduleType).then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));
|
|
2044
1995
|
}
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
1996
|
+
onDestroy(callback) {
|
|
1997
|
+
this._destroyListeners.push(callback);
|
|
1998
|
+
}
|
|
1999
|
+
get injector() {
|
|
2000
|
+
return this._injector;
|
|
2001
|
+
}
|
|
2002
|
+
destroy() {
|
|
2003
|
+
if (this._destroyed) {
|
|
2004
|
+
throw new RuntimeError(404, ngDevMode && 'The platform has already been destroyed!');
|
|
2005
|
+
}
|
|
2006
|
+
this._modules.slice().forEach(module => module.destroy());
|
|
2007
|
+
this._destroyListeners.forEach(listener => listener());
|
|
2008
|
+
const destroyListeners = this._injector.get(PLATFORM_DESTROY_LISTENERS, null);
|
|
2009
|
+
if (destroyListeners) {
|
|
2010
|
+
destroyListeners.forEach(listener => listener());
|
|
2011
|
+
destroyListeners.clear();
|
|
2051
2012
|
}
|
|
2013
|
+
this._destroyed = true;
|
|
2014
|
+
}
|
|
2015
|
+
get destroyed() {
|
|
2016
|
+
return this._destroyed;
|
|
2052
2017
|
}
|
|
2018
|
+
static ɵfac = function PlatformRef_Factory(__ngFactoryType__) {
|
|
2019
|
+
return new (__ngFactoryType__ || PlatformRef)(__inject(Injector));
|
|
2020
|
+
};
|
|
2021
|
+
static ɵprov = /*@__PURE__*/__defineInjectable({
|
|
2022
|
+
token: PlatformRef,
|
|
2023
|
+
factory: PlatformRef.ɵfac,
|
|
2024
|
+
providedIn: 'platform'
|
|
2025
|
+
});
|
|
2053
2026
|
}
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2027
|
+
(() => {
|
|
2028
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(PlatformRef, [{
|
|
2029
|
+
type: Injectable,
|
|
2030
|
+
args: [{
|
|
2031
|
+
providedIn: 'platform'
|
|
2032
|
+
}]
|
|
2033
|
+
}], () => [{
|
|
2034
|
+
type: Injector
|
|
2035
|
+
}], null);
|
|
2036
|
+
})();
|
|
2057
2037
|
|
|
2058
|
-
|
|
2059
|
-
|
|
2038
|
+
let _platformInjector = null;
|
|
2039
|
+
function createPlatform(injector) {
|
|
2040
|
+
if (getPlatform()) {
|
|
2041
|
+
throw new RuntimeError(400, ngDevMode && 'There can be only one platform. Destroy the previous one to create a new one.');
|
|
2042
|
+
}
|
|
2043
|
+
publishDefaultGlobalUtils();
|
|
2044
|
+
publishSignalConfiguration();
|
|
2045
|
+
_platformInjector = typeof ngServerMode === 'undefined' || !ngServerMode ? injector : null;
|
|
2046
|
+
const platform = injector.get(PlatformRef);
|
|
2047
|
+
runPlatformInitializers(injector);
|
|
2048
|
+
return platform;
|
|
2060
2049
|
}
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2050
|
+
function createPlatformFactory(parentPlatformFactory, name, providers = []) {
|
|
2051
|
+
const desc = `Platform: ${name}`;
|
|
2052
|
+
const marker = new InjectionToken(desc);
|
|
2053
|
+
return (extraProviders = []) => {
|
|
2054
|
+
let platform = getPlatform();
|
|
2055
|
+
if (!platform) {
|
|
2056
|
+
const platformProviders = [...providers, ...extraProviders, {
|
|
2057
|
+
provide: marker,
|
|
2058
|
+
useValue: true
|
|
2059
|
+
}];
|
|
2060
|
+
platform = parentPlatformFactory?.(platformProviders) ?? createPlatform(createPlatformInjector(platformProviders, desc));
|
|
2061
|
+
}
|
|
2062
|
+
return typeof ngServerMode !== 'undefined' && ngServerMode ? platform : assertPlatform(marker);
|
|
2063
|
+
};
|
|
2064
|
+
}
|
|
2065
|
+
function createPlatformInjector(providers = [], name) {
|
|
2066
|
+
return Injector.create({
|
|
2067
|
+
name,
|
|
2068
|
+
providers: [{
|
|
2069
|
+
provide: INJECTOR_SCOPE,
|
|
2070
|
+
useValue: 'platform'
|
|
2071
|
+
}, {
|
|
2072
|
+
provide: PLATFORM_DESTROY_LISTENERS,
|
|
2073
|
+
useValue: new Set([() => _platformInjector = null])
|
|
2074
|
+
}, ...providers]
|
|
2068
2075
|
});
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2076
|
+
}
|
|
2077
|
+
function assertPlatform(requiredToken) {
|
|
2078
|
+
const platform = getPlatform();
|
|
2079
|
+
if (!platform) {
|
|
2080
|
+
throw new RuntimeError(-401, ngDevMode && 'No platform exists!');
|
|
2072
2081
|
}
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
const copied = parent.factories.slice();
|
|
2076
|
-
factories = factories.concat(copied);
|
|
2077
|
-
}
|
|
2078
|
-
return new KeyValueDiffers(factories);
|
|
2082
|
+
if ((typeof ngDevMode === 'undefined' || ngDevMode) && !platform.injector.get(requiredToken, null)) {
|
|
2083
|
+
throw new RuntimeError(400, 'A platform with a different configuration has been created. Please destroy it first.');
|
|
2079
2084
|
}
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
optional: true,
|
|
2086
|
-
skipSelf: true
|
|
2087
|
-
});
|
|
2088
|
-
return KeyValueDiffers.create(factories, parent || defaultKeyValueDiffersFactory());
|
|
2089
|
-
}
|
|
2090
|
-
};
|
|
2085
|
+
return platform;
|
|
2086
|
+
}
|
|
2087
|
+
function getPlatform() {
|
|
2088
|
+
if (typeof ngServerMode !== 'undefined' && ngServerMode) {
|
|
2089
|
+
return null;
|
|
2091
2090
|
}
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2091
|
+
return _platformInjector?.get(PlatformRef) ?? null;
|
|
2092
|
+
}
|
|
2093
|
+
function destroyPlatform() {
|
|
2094
|
+
getPlatform()?.destroy();
|
|
2095
|
+
}
|
|
2096
|
+
function createOrReusePlatformInjector(providers = []) {
|
|
2097
|
+
if (_platformInjector) return _platformInjector;
|
|
2098
|
+
publishDefaultGlobalUtils();
|
|
2099
|
+
const injector = createPlatformInjector(providers);
|
|
2100
|
+
if (typeof ngServerMode === 'undefined' || !ngServerMode) {
|
|
2101
|
+
_platformInjector = injector;
|
|
2098
2102
|
}
|
|
2103
|
+
publishSignalConfiguration();
|
|
2104
|
+
runPlatformInitializers(injector);
|
|
2105
|
+
return injector;
|
|
2099
2106
|
}
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
const platformCore = createPlatformFactory(null, 'core', []);
|
|
2107
|
-
|
|
2108
|
-
class ApplicationModule {
|
|
2109
|
-
constructor(appRef) {}
|
|
2110
|
-
static ɵfac = function ApplicationModule_Factory(__ngFactoryType__) {
|
|
2111
|
-
return new (__ngFactoryType__ || ApplicationModule)(__inject(ApplicationRef));
|
|
2107
|
+
function providePlatformInitializer(initializerFn) {
|
|
2108
|
+
return {
|
|
2109
|
+
provide: PLATFORM_INITIALIZER,
|
|
2110
|
+
useValue: initializerFn,
|
|
2111
|
+
multi: true
|
|
2112
2112
|
};
|
|
2113
|
-
|
|
2114
|
-
|
|
2113
|
+
}
|
|
2114
|
+
function runPlatformInitializers(injector) {
|
|
2115
|
+
const inits = injector.get(PLATFORM_INITIALIZER, null);
|
|
2116
|
+
runInInjectionContext(injector, () => {
|
|
2117
|
+
inits?.forEach(init => init());
|
|
2115
2118
|
});
|
|
2116
|
-
static ɵinj = /*@__PURE__*/__defineInjector({});
|
|
2117
2119
|
}
|
|
2118
|
-
(() => {
|
|
2119
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
|
|
2120
|
-
type: NgModule
|
|
2121
|
-
}], () => [{
|
|
2122
|
-
type: ApplicationRef
|
|
2123
|
-
}], null);
|
|
2124
|
-
})();
|
|
2125
2120
|
|
|
2126
2121
|
function internalCreateApplication(config) {
|
|
2127
2122
|
const {
|
|
@@ -2545,163 +2540,55 @@ function numberAttribute(value, fallbackValue = NaN) {
|
|
|
2545
2540
|
const isNumberValue = !isNaN(parseFloat(value)) && !isNaN(Number(value));
|
|
2546
2541
|
return isNumberValue ? Number(value) : fallbackValue;
|
|
2547
2542
|
}
|
|
2548
|
-
|
|
2549
|
-
const PERFORMANCE_MARK_PREFIX = '🅰️';
|
|
2550
|
-
let enablePerfLogging = false;
|
|
2551
|
-
function startMeasuring(label) {
|
|
2552
|
-
if (!enablePerfLogging) {
|
|
2553
|
-
return;
|
|
2554
|
-
}
|
|
2555
|
-
const {
|
|
2556
|
-
startLabel
|
|
2557
|
-
} = labels(label);
|
|
2558
|
-
performance.mark(startLabel);
|
|
2559
|
-
}
|
|
2560
|
-
function stopMeasuring(label) {
|
|
2561
|
-
if (!enablePerfLogging) {
|
|
2562
|
-
return;
|
|
2563
|
-
}
|
|
2564
|
-
const {
|
|
2565
|
-
startLabel,
|
|
2566
|
-
labelName,
|
|
2567
|
-
endLabel
|
|
2568
|
-
} = labels(label);
|
|
2569
|
-
performance.mark(endLabel);
|
|
2570
|
-
performance.measure(labelName, startLabel, endLabel);
|
|
2571
|
-
performance.clearMarks(startLabel);
|
|
2572
|
-
performance.clearMarks(endLabel);
|
|
2573
|
-
}
|
|
2574
|
-
function labels(label) {
|
|
2575
|
-
const labelName = `${PERFORMANCE_MARK_PREFIX}:${label}`;
|
|
2576
|
-
return {
|
|
2577
|
-
labelName,
|
|
2578
|
-
startLabel: `start:${labelName}`,
|
|
2579
|
-
endLabel: `end:${labelName}`
|
|
2580
|
-
};
|
|
2581
|
-
}
|
|
2582
|
-
let warningLogged = false;
|
|
2583
|
-
function enableProfiling() {
|
|
2584
|
-
if (!warningLogged && (typeof performance === 'undefined' || !performance.mark || !performance.measure)) {
|
|
2585
|
-
warningLogged = true;
|
|
2586
|
-
console.warn('Performance API is not supported on this platform');
|
|
2587
|
-
return;
|
|
2588
|
-
}
|
|
2589
|
-
enablePerfLogging = true;
|
|
2590
|
-
}
|
|
2591
|
-
function disableProfiling() {
|
|
2592
|
-
enablePerfLogging = false;
|
|
2593
|
-
}
|
|
2594
|
-
|
|
2595
|
-
function getClosestComponentName(node) {
|
|
2596
|
-
let currentNode = node;
|
|
2597
|
-
while (currentNode) {
|
|
2598
|
-
const lView = readPatchedLView(currentNode);
|
|
2599
|
-
if (lView !== null) {
|
|
2600
|
-
for (let i = HEADER_OFFSET; i < lView.length; i++) {
|
|
2601
|
-
const current = lView[i];
|
|
2602
|
-
if (!isLView(current) && !isLContainer(current) || current[HOST] !== currentNode) {
|
|
2603
|
-
continue;
|
|
2604
|
-
}
|
|
2605
|
-
const tView = lView[TVIEW];
|
|
2606
|
-
const tNode = getTNode(tView, i);
|
|
2607
|
-
if (isComponentHost(tNode)) {
|
|
2608
|
-
const def = tView.data[tNode.directiveStart + tNode.componentOffset];
|
|
2609
|
-
const name = def.debugInfo?.className || def.type.name;
|
|
2610
|
-
if (name) {
|
|
2611
|
-
return name;
|
|
2612
|
-
} else {
|
|
2613
|
-
break;
|
|
2614
|
-
}
|
|
2615
|
-
}
|
|
2616
|
-
}
|
|
2617
|
-
}
|
|
2618
|
-
currentNode = currentNode.parentNode;
|
|
2619
|
-
}
|
|
2620
|
-
return null;
|
|
2621
|
-
}
|
|
2622
|
-
|
|
2623
|
-
function ɵassertType(value) {}
|
|
2624
|
-
|
|
2625
|
-
function ɵɵngDeclareDirective(decl) {
|
|
2626
|
-
const compiler = getCompilerFacade({
|
|
2627
|
-
usage: 1,
|
|
2628
|
-
kind: 'directive',
|
|
2629
|
-
type: decl.type
|
|
2630
|
-
});
|
|
2631
|
-
return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
|
|
2632
|
-
}
|
|
2633
|
-
function ɵɵngDeclareClassMetadata(decl) {
|
|
2634
|
-
setClassMetadata(decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? null);
|
|
2635
|
-
}
|
|
2636
|
-
function ɵɵngDeclareClassMetadataAsync(decl) {
|
|
2637
|
-
setClassMetadataAsync(decl.type, decl.resolveDeferredDeps, (...types) => {
|
|
2638
|
-
const meta = decl.resolveMetadata(...types);
|
|
2639
|
-
setClassMetadata(decl.type, meta.decorators, meta.ctorParameters, meta.propDecorators);
|
|
2640
|
-
});
|
|
2641
|
-
}
|
|
2642
|
-
function ɵɵngDeclareComponent(decl) {
|
|
2643
|
-
const compiler = getCompilerFacade({
|
|
2644
|
-
usage: 1,
|
|
2645
|
-
kind: 'component',
|
|
2646
|
-
type: decl.type
|
|
2647
|
-
});
|
|
2648
|
-
return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);
|
|
2649
|
-
}
|
|
2650
|
-
function ɵɵngDeclareFactory(decl) {
|
|
2651
|
-
const compiler = getCompilerFacade({
|
|
2652
|
-
usage: 1,
|
|
2653
|
-
kind: getFactoryKind(decl.target),
|
|
2654
|
-
type: decl.type
|
|
2655
|
-
});
|
|
2656
|
-
return compiler.compileFactoryDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
|
|
2657
|
-
}
|
|
2658
|
-
function getFactoryKind(target) {
|
|
2659
|
-
switch (target) {
|
|
2660
|
-
case FactoryTarget.Directive:
|
|
2661
|
-
return 'directive';
|
|
2662
|
-
case FactoryTarget.Component:
|
|
2663
|
-
return 'component';
|
|
2664
|
-
case FactoryTarget.Injectable:
|
|
2665
|
-
return 'injectable';
|
|
2666
|
-
case FactoryTarget.Pipe:
|
|
2667
|
-
return 'pipe';
|
|
2668
|
-
case FactoryTarget.NgModule:
|
|
2669
|
-
return 'NgModule';
|
|
2543
|
+
|
|
2544
|
+
const PERFORMANCE_MARK_PREFIX = '🅰️';
|
|
2545
|
+
let enablePerfLogging = false;
|
|
2546
|
+
function startMeasuring(label) {
|
|
2547
|
+
if (!enablePerfLogging) {
|
|
2548
|
+
return;
|
|
2670
2549
|
}
|
|
2550
|
+
const {
|
|
2551
|
+
startLabel
|
|
2552
|
+
} = labels(label);
|
|
2553
|
+
performance.mark(startLabel);
|
|
2671
2554
|
}
|
|
2672
|
-
function
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2555
|
+
function stopMeasuring(label) {
|
|
2556
|
+
if (!enablePerfLogging) {
|
|
2557
|
+
return;
|
|
2558
|
+
}
|
|
2559
|
+
const {
|
|
2560
|
+
startLabel,
|
|
2561
|
+
labelName,
|
|
2562
|
+
endLabel
|
|
2563
|
+
} = labels(label);
|
|
2564
|
+
performance.mark(endLabel);
|
|
2565
|
+
performance.measure(labelName, startLabel, endLabel);
|
|
2566
|
+
performance.clearMarks(startLabel);
|
|
2567
|
+
performance.clearMarks(endLabel);
|
|
2679
2568
|
}
|
|
2680
|
-
function
|
|
2681
|
-
const
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2569
|
+
function labels(label) {
|
|
2570
|
+
const labelName = `${PERFORMANCE_MARK_PREFIX}:${label}`;
|
|
2571
|
+
return {
|
|
2572
|
+
labelName,
|
|
2573
|
+
startLabel: `start:${labelName}`,
|
|
2574
|
+
endLabel: `end:${labelName}`
|
|
2575
|
+
};
|
|
2687
2576
|
}
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2577
|
+
let warningLogged = false;
|
|
2578
|
+
function enableProfiling() {
|
|
2579
|
+
if (!warningLogged && (typeof performance === 'undefined' || !performance.mark || !performance.measure)) {
|
|
2580
|
+
warningLogged = true;
|
|
2581
|
+
console.warn('Performance API is not supported on this platform');
|
|
2582
|
+
return;
|
|
2583
|
+
}
|
|
2584
|
+
enablePerfLogging = true;
|
|
2695
2585
|
}
|
|
2696
|
-
function
|
|
2697
|
-
|
|
2698
|
-
usage: 1,
|
|
2699
|
-
kind: 'pipe',
|
|
2700
|
-
type: decl.type
|
|
2701
|
-
});
|
|
2702
|
-
return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);
|
|
2586
|
+
function disableProfiling() {
|
|
2587
|
+
enablePerfLogging = false;
|
|
2703
2588
|
}
|
|
2704
2589
|
|
|
2590
|
+
function ɵassertType(value) {}
|
|
2591
|
+
|
|
2705
2592
|
const NOT_SET = /* @__PURE__ */Symbol('NOT_SET');
|
|
2706
2593
|
const EMPTY_CLEANUP_SET = /* @__PURE__ */new Set();
|
|
2707
2594
|
const AFTER_RENDER_PHASE_EFFECT_NODE = /* @__PURE__ */(() => ({
|
|
@@ -2863,31 +2750,104 @@ function phaseDebugName(phase) {
|
|
|
2863
2750
|
}
|
|
2864
2751
|
}
|
|
2865
2752
|
|
|
2866
|
-
function
|
|
2867
|
-
|
|
2753
|
+
function ɵɵngDeclareDirective(decl) {
|
|
2754
|
+
const compiler = getCompilerFacade({
|
|
2755
|
+
usage: 1,
|
|
2756
|
+
kind: 'directive',
|
|
2757
|
+
type: decl.type
|
|
2758
|
+
});
|
|
2759
|
+
return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
|
|
2868
2760
|
}
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
}
|
|
2877
|
-
value = computed(() => {
|
|
2878
|
-
if (this.state.status === 'error') {
|
|
2879
|
-
throw new ResourceValueError(this.state.error);
|
|
2880
|
-
}
|
|
2881
|
-
return this.state.value;
|
|
2761
|
+
function ɵɵngDeclareClassMetadata(decl) {
|
|
2762
|
+
setClassMetadata(decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? null);
|
|
2763
|
+
}
|
|
2764
|
+
function ɵɵngDeclareClassMetadataAsync(decl) {
|
|
2765
|
+
setClassMetadataAsync(decl.type, decl.resolveDeferredDeps, (...types) => {
|
|
2766
|
+
const meta = decl.resolveMetadata(...types);
|
|
2767
|
+
setClassMetadata(decl.type, meta.decorators, meta.ctorParameters, meta.propDecorators);
|
|
2882
2768
|
});
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2769
|
+
}
|
|
2770
|
+
function ɵɵngDeclareComponent(decl) {
|
|
2771
|
+
const compiler = getCompilerFacade({
|
|
2772
|
+
usage: 1,
|
|
2773
|
+
kind: 'component',
|
|
2774
|
+
type: decl.type
|
|
2775
|
+
});
|
|
2776
|
+
return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);
|
|
2777
|
+
}
|
|
2778
|
+
function ɵɵngDeclareFactory(decl) {
|
|
2779
|
+
const compiler = getCompilerFacade({
|
|
2780
|
+
usage: 1,
|
|
2781
|
+
kind: getFactoryKind(decl.target),
|
|
2782
|
+
type: decl.type
|
|
2783
|
+
});
|
|
2784
|
+
return compiler.compileFactoryDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
|
|
2785
|
+
}
|
|
2786
|
+
function getFactoryKind(target) {
|
|
2787
|
+
switch (target) {
|
|
2788
|
+
case FactoryTarget.Directive:
|
|
2789
|
+
return 'directive';
|
|
2790
|
+
case FactoryTarget.Component:
|
|
2791
|
+
return 'component';
|
|
2792
|
+
case FactoryTarget.Injectable:
|
|
2793
|
+
return 'injectable';
|
|
2794
|
+
case FactoryTarget.Pipe:
|
|
2795
|
+
return 'pipe';
|
|
2796
|
+
case FactoryTarget.NgModule:
|
|
2797
|
+
return 'NgModule';
|
|
2889
2798
|
}
|
|
2890
2799
|
}
|
|
2800
|
+
function ɵɵngDeclareInjectable(decl) {
|
|
2801
|
+
const compiler = getCompilerFacade({
|
|
2802
|
+
usage: 1,
|
|
2803
|
+
kind: 'injectable',
|
|
2804
|
+
type: decl.type
|
|
2805
|
+
});
|
|
2806
|
+
return compiler.compileInjectableDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);
|
|
2807
|
+
}
|
|
2808
|
+
function ɵɵngDeclareInjector(decl) {
|
|
2809
|
+
const compiler = getCompilerFacade({
|
|
2810
|
+
usage: 1,
|
|
2811
|
+
kind: 'NgModule',
|
|
2812
|
+
type: decl.type
|
|
2813
|
+
});
|
|
2814
|
+
return compiler.compileInjectorDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);
|
|
2815
|
+
}
|
|
2816
|
+
function ɵɵngDeclareNgModule(decl) {
|
|
2817
|
+
const compiler = getCompilerFacade({
|
|
2818
|
+
usage: 1,
|
|
2819
|
+
kind: 'NgModule',
|
|
2820
|
+
type: decl.type
|
|
2821
|
+
});
|
|
2822
|
+
return compiler.compileNgModuleDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);
|
|
2823
|
+
}
|
|
2824
|
+
function ɵɵngDeclarePipe(decl) {
|
|
2825
|
+
const compiler = getCompilerFacade({
|
|
2826
|
+
usage: 1,
|
|
2827
|
+
kind: 'pipe',
|
|
2828
|
+
type: decl.type
|
|
2829
|
+
});
|
|
2830
|
+
return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);
|
|
2831
|
+
}
|
|
2832
|
+
|
|
2833
|
+
function getModuleFactory(id) {
|
|
2834
|
+
const type = getRegisteredNgModuleType(id);
|
|
2835
|
+
if (!type) throw noModuleError(id);
|
|
2836
|
+
return new NgModuleFactory(type);
|
|
2837
|
+
}
|
|
2838
|
+
function getNgModuleById(id) {
|
|
2839
|
+
const type = getRegisteredNgModuleType(id);
|
|
2840
|
+
if (!type) throw noModuleError(id);
|
|
2841
|
+
return type;
|
|
2842
|
+
}
|
|
2843
|
+
function noModuleError(id) {
|
|
2844
|
+
return new RuntimeError(920, ngDevMode && `No module with ID ${id} loaded`);
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
class ViewRef extends ChangeDetectorRef {}
|
|
2848
|
+
class EmbeddedViewRef extends ViewRef {}
|
|
2849
|
+
|
|
2850
|
+
const platformCore = createPlatformFactory(null, 'core', []);
|
|
2891
2851
|
|
|
2892
2852
|
function createComponent(component, options) {
|
|
2893
2853
|
ngDevMode && assertComponentDef(component);
|
|
@@ -2925,28 +2885,120 @@ function reflectComponentType(component) {
|
|
|
2925
2885
|
};
|
|
2926
2886
|
}
|
|
2927
2887
|
|
|
2928
|
-
function
|
|
2929
|
-
return
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2888
|
+
function resourceFromSnapshots(source) {
|
|
2889
|
+
return new SnapshotResource(isSignal(source) ? source : computed(source));
|
|
2890
|
+
}
|
|
2891
|
+
class SnapshotResource {
|
|
2892
|
+
snapshot;
|
|
2893
|
+
constructor(snapshot) {
|
|
2894
|
+
this.snapshot = snapshot;
|
|
2895
|
+
}
|
|
2896
|
+
get state() {
|
|
2897
|
+
return this.snapshot();
|
|
2898
|
+
}
|
|
2899
|
+
value = computed(() => {
|
|
2900
|
+
if (this.state.status === 'error') {
|
|
2901
|
+
throw new ResourceValueError(this.state.error);
|
|
2902
|
+
}
|
|
2903
|
+
return this.state.value;
|
|
2904
|
+
});
|
|
2905
|
+
status = computed(() => this.state.status);
|
|
2906
|
+
error = computed(() => this.state.status === 'error' ? this.state.error : undefined);
|
|
2907
|
+
isLoading = computed(() => this.state.status === 'loading' || this.state.status === 'reloading');
|
|
2908
|
+
isValueDefined = computed(() => this.state.status !== 'error' && this.state.value !== undefined);
|
|
2909
|
+
hasValue() {
|
|
2910
|
+
return this.isValueDefined();
|
|
2911
|
+
}
|
|
2912
|
+
}
|
|
2913
|
+
|
|
2914
|
+
function debounced(source, wait, options) {
|
|
2915
|
+
if (isInParamsFunction()) {
|
|
2916
|
+
throw invalidResourceCreationInParams();
|
|
2917
|
+
}
|
|
2918
|
+
if (ngDevMode && !options?.injector) {
|
|
2919
|
+
assertInInjectionContext(debounced);
|
|
2920
|
+
}
|
|
2921
|
+
const injector = options?.injector ?? inject(Injector);
|
|
2922
|
+
const state = signal({
|
|
2923
|
+
status: 'resolved',
|
|
2924
|
+
value: untracked(() => {
|
|
2925
|
+
try {
|
|
2926
|
+
setInParamsFunction(true);
|
|
2927
|
+
return source();
|
|
2928
|
+
} finally {
|
|
2929
|
+
setInParamsFunction(false);
|
|
2930
|
+
}
|
|
2931
|
+
})
|
|
2932
|
+
});
|
|
2933
|
+
let active;
|
|
2934
|
+
let pendingValue;
|
|
2935
|
+
injector.get(DestroyRef).onDestroy(() => {
|
|
2936
|
+
active = undefined;
|
|
2937
|
+
});
|
|
2938
|
+
effect(() => {
|
|
2939
|
+
let value;
|
|
2940
|
+
try {
|
|
2941
|
+
setInParamsFunction(true);
|
|
2942
|
+
value = source();
|
|
2943
|
+
} catch (err) {
|
|
2944
|
+
rethrowFatalErrors(err);
|
|
2945
|
+
state.set({
|
|
2946
|
+
status: 'error',
|
|
2947
|
+
error: err
|
|
2948
|
+
});
|
|
2949
|
+
active = pendingValue = undefined;
|
|
2950
|
+
return;
|
|
2951
|
+
} finally {
|
|
2952
|
+
setInParamsFunction(false);
|
|
2953
|
+
}
|
|
2954
|
+
const currentState = untracked(state);
|
|
2955
|
+
const equal = options?.equal ?? Object.is;
|
|
2956
|
+
if (currentState.status === 'reloading') {
|
|
2957
|
+
if (equal(value, pendingValue)) return;
|
|
2958
|
+
} else if (currentState.status === 'resolved') {
|
|
2959
|
+
if (equal(value, currentState.value)) return;
|
|
2960
|
+
}
|
|
2961
|
+
const waitFn = typeof wait === 'number' ? () => new Promise(resolve => setTimeout(resolve, wait)) : wait;
|
|
2962
|
+
const result = waitFn(value, currentState);
|
|
2963
|
+
if (result === undefined) {
|
|
2964
|
+
state.set({
|
|
2965
|
+
status: 'resolved',
|
|
2966
|
+
value
|
|
2967
|
+
});
|
|
2968
|
+
active = pendingValue = undefined;
|
|
2969
|
+
} else {
|
|
2970
|
+
if (currentState.status !== 'loading' && currentState.status !== 'error') {
|
|
2971
|
+
state.set({
|
|
2972
|
+
status: 'loading',
|
|
2973
|
+
value: currentState.value
|
|
2974
|
+
});
|
|
2975
|
+
}
|
|
2976
|
+
active = result;
|
|
2977
|
+
pendingValue = value;
|
|
2978
|
+
result.then(() => {
|
|
2979
|
+
if (active === result) {
|
|
2980
|
+
state.set({
|
|
2981
|
+
status: 'resolved',
|
|
2982
|
+
value
|
|
2983
|
+
});
|
|
2984
|
+
active = pendingValue = undefined;
|
|
2985
|
+
}
|
|
2986
|
+
});
|
|
2987
|
+
}
|
|
2933
2988
|
}, {
|
|
2934
|
-
|
|
2989
|
+
injector
|
|
2935
2990
|
});
|
|
2991
|
+
return resourceFromSnapshots(state);
|
|
2936
2992
|
}
|
|
2937
2993
|
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
}
|
|
2946
|
-
const REQUEST_CONTEXT = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST_CONTEXT' : '', {
|
|
2947
|
-
providedIn: 'platform',
|
|
2948
|
-
factory: () => null
|
|
2949
|
-
});
|
|
2994
|
+
function isDevMode() {
|
|
2995
|
+
return typeof ngDevMode === 'undefined' || !!ngDevMode;
|
|
2996
|
+
}
|
|
2997
|
+
function enableProdMode() {
|
|
2998
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
2999
|
+
_global['ngDevMode'] = false;
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
2950
3002
|
|
|
2951
|
-
export { APP_BOOTSTRAP_LISTENER, APP_ID, ApplicationInitStatus, ApplicationModule, ApplicationRef, COMPILER_OPTIONS, ChangeDetectorRef, ContentChild, ContentChildren, DOCUMENT, DefaultIterableDiffer, DestroyRef, ENVIRONMENT_INITIALIZER, EmbeddedViewRef, ErrorHandler, HOST_TAG_NAME, HostAttributeToken, Injectable, InjectionToken, Injector, IterableDiffers, KeyValueDiffers, LOCALE_ID, NgModule, NgZone, OutputEmitterRef, PLATFORM_INITIALIZER, PlatformRef, Query, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, TransferState, ViewChild, ViewChildren, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, afterRenderEffect, assertInInjectionContext, assertNotInReactiveContext, assertPlatform, booleanAttribute, computed, contentChild, contentChildren, createComponent, createPlatform, createPlatformFactory, destroyPlatform, enableProdMode, getModuleFactory, getNgModuleById, getPlatform, inject, input, isDevMode, isSignal, makeEnvironmentProviders, mergeApplicationConfig, model, numberAttribute, output, platformCore, provideAppInitializer, provideCheckNoChangesConfig, provideEnvironmentInitializer, providePlatformInitializer, provideStabilityDebugging, provideZoneChangeDetection, reflectComponentType, resourceFromSnapshots, runInInjectionContext, viewChild, viewChildren, AfterRenderManager as ɵAfterRenderManager, CLIENT_RENDER_MODE_FLAG as ɵCLIENT_RENDER_MODE_FLAG, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ChangeDetectionScheduler as ɵChangeDetectionScheduler, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, DEHYDRATED_BLOCK_REGISTRY as ɵDEHYDRATED_BLOCK_REGISTRY, ENABLE_ROOT_COMPONENT_BOOTSTRAP as ɵENABLE_ROOT_COMPONENT_BOOTSTRAP, EVENT_REPLAY_QUEUE as ɵEVENT_REPLAY_QUEUE, Framework as ɵFramework, IMAGE_CONFIG as ɵIMAGE_CONFIG, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, ɵINPUT_SIGNAL_BRAND_WRITE_TYPE, INTERNAL_APPLICATION_ERROR_HANDLER as ɵINTERNAL_APPLICATION_ERROR_HANDLER, IS_HYDRATION_DOM_REUSE_ENABLED as ɵIS_HYDRATION_DOM_REUSE_ENABLED, IS_INCREMENTAL_HYDRATION_ENABLED as ɵIS_INCREMENTAL_HYDRATION_ENABLED, JSACTION_BLOCK_ELEMENT_MAP as ɵJSACTION_BLOCK_ELEMENT_MAP, JSACTION_EVENT_CONTRACT as ɵJSACTION_EVENT_CONTRACT, NgModuleFactory as ɵNgModuleFactory, PERFORMANCE_MARK_PREFIX as ɵPERFORMANCE_MARK_PREFIX, PROVIDED_NG_ZONE as ɵPROVIDED_NG_ZONE, PROVIDED_ZONELESS as ɵPROVIDED_ZONELESS, PendingTasksInternal as ɵPendingTasksInternal, ProfilerEvent as ɵProfilerEvent, ComponentFactory as ɵRender3ComponentFactory, RuntimeError as ɵRuntimeError, SIGNAL as ɵSIGNAL, TracingService as ɵTracingService, ViewRef$1 as ɵViewRef, ZONELESS_ENABLED as ɵZONELESS_ENABLED, annotateForHydration as ɵannotateForHydration, ɵassertType, compileNgModuleFactory as ɵcompileNgModuleFactory, createOrReusePlatformInjector as ɵcreateOrReusePlatformInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, disableProfiling as ɵdisableProfiling, enableProfiling as ɵenableProfiling, formatRuntimeError as ɵformatRuntimeError,
|
|
3003
|
+
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, debounced, destroyPlatform, effect, enableProdMode, getModuleFactory, getNgModuleById, getPlatform, inject, input, isDevMode, isSignal, makeEnvironmentProviders, mergeApplicationConfig, model, numberAttribute, output, platformCore, provideAppInitializer, provideCheckNoChangesConfig, provideEnvironmentInitializer, providePlatformInitializer, provideStabilityDebugging, provideZoneChangeDetection, reflectComponentType, resourceFromSnapshots, runInInjectionContext, signal, untracked, viewChild, viewChildren, AfterRenderManager as ɵAfterRenderManager, CLIENT_RENDER_MODE_FLAG as ɵCLIENT_RENDER_MODE_FLAG, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ChangeDetectionScheduler as ɵChangeDetectionScheduler, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, DEHYDRATED_BLOCK_REGISTRY as ɵDEHYDRATED_BLOCK_REGISTRY, ENABLE_ROOT_COMPONENT_BOOTSTRAP as ɵENABLE_ROOT_COMPONENT_BOOTSTRAP, EVENT_REPLAY_QUEUE as ɵEVENT_REPLAY_QUEUE, Framework as ɵFramework, IMAGE_CONFIG as ɵIMAGE_CONFIG, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, ɵINPUT_SIGNAL_BRAND_WRITE_TYPE, INTERNAL_APPLICATION_ERROR_HANDLER as ɵINTERNAL_APPLICATION_ERROR_HANDLER, IS_HYDRATION_DOM_REUSE_ENABLED as ɵIS_HYDRATION_DOM_REUSE_ENABLED, IS_INCREMENTAL_HYDRATION_ENABLED as ɵIS_INCREMENTAL_HYDRATION_ENABLED, JSACTION_BLOCK_ELEMENT_MAP as ɵJSACTION_BLOCK_ELEMENT_MAP, JSACTION_EVENT_CONTRACT as ɵJSACTION_EVENT_CONTRACT, 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 };
|
|
2952
3004
|
//# sourceMappingURL=core.mjs.map
|