{
  "version": 3,
  "sources": ["../script/shim.js", "../src/import/di/interface/provider.ts", "../src/import/errors.ts", "../src/import/util/property.ts", "../src/import/util/stringify.ts", "../src/import/di/forward_ref.ts", "../src/primitives/signals/src/graph.ts", "../src/primitives/signals/src/formatter.ts", "../src/primitives/signals/src/equality.ts", "../src/primitives/signals/src/computed.ts", "../src/primitives/signals/src/errors.ts", "../src/primitives/signals/src/signal.ts", "../src/primitives/signals/src/linked_signal.ts", "../src/primitives/signals/src/untracked.ts", "../src/primitives/signals/src/effect.ts", "../src/primitives/signals/index.ts", "../src/import/util/assert.ts", "../src/import/di/interface/defs.ts", "../src/import/di/injection_token.ts", "../src/import/render3/debug/injector_profiler.ts", "../src/import/render3/definition_factory.ts", "../src/import/render3/util/stringify_utils.ts", "../src/import/render3/errors_di.ts", "../src/import/render3/fields.ts", "../src/import/util/array_utils.ts", "../src/import/util/empty.ts", "../src/import/di/initializer_token.ts", "../src/import/di/interface/injector.ts", "../src/import/di/inject_switch.ts", "../src/primitives/di/src/injector.ts", "../src/primitives/di/src/not_found.ts", "../src/import/di/injector_compatibility.ts", "../src/import/di/injector_token.ts", "../src/import/di/internal_tokens.ts", "../src/import/di/null_injector.ts", "../src/import/di/provider_collection.ts", "../src/import/di/scope.ts", "../src/import/di/r3_injector.ts", "../src/import/util/closure.ts", "../src/import/util/decorators.ts", "../src/import/di/metadata.ts", "../src/import/di/create_injector.ts", "../src/import/di/injector.ts", "../src/import/render3/instructions/di.ts", "../src/import/render3/reactivity/api.ts", "../src/import/render3/reactivity/computed.ts", "../src/import/render3/reactivity/signal.ts", "../src/import/render3/reactivity/linked_signal.ts", "../src/import/render3/reactivity/untracked.ts", "../src/import/render3/reactivity/asserts.ts", "../src/import/di/contextual.ts", "../src/import/linker/destroy_ref.ts", "../src/import/util/noop.ts", "../src/import/change_detection/scheduling/zoneless_scheduling.ts", "../src/import/render3/reactivity/root_effect_scheduler.ts", "../src/import/render3/reactivity/effect.ts", "../src/import/util/callback_scheduler.ts", "../src/import/change_detection/scheduling/zoneless_scheduling_impl.ts", "../src/import/pending_tasks.ts", "../src/import/error_handler.ts", "../src/import/resource/resource.ts", "../src/import/index.ts"],
  "sourcesContent": ["const ngDevMode = typeof ngDevMode === 'undefined' ? true : ngDevMode;\nexport { ngDevMode };\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { Type } from '../../interface/type';\n\n/**\n * Configures the `Injector` to return a value for a token.\n * Base for `ValueProvider` decorator.\n *\n * @publicApi\n */\nexport interface ValueSansProvider {\n  /**\n   * The value to inject.\n   */\n  useValue: any;\n}\n\n/**\n * Configures the `Injector` to return a value for a token.\n * @see [Dependency Injection Guide](guide/di/dependency-injection)\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ValueProvider'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ValueProvider extends ValueSansProvider {\n  /**\n   * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n   */\n  provide: any;\n\n  /**\n   * When true, injector returns an array of instances. This is useful to allow multiple\n   * providers spread across many files to provide configuration information to a common token.\n   */\n  multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return an instance of `useClass` for a token.\n * Base for `StaticClassProvider` decorator.\n *\n * @publicApi\n */\nexport interface StaticClassSansProvider {\n  /**\n   * An optional class to instantiate for the `token`. By default, the `provide`\n   * class is instantiated.\n   */\n  useClass: Type<any>;\n\n  /**\n   * A list of `token`s to be resolved by the injector. The list of values is then\n   * used as arguments to the `useClass` constructor.\n   */\n  deps: any[];\n}\n\n/**\n * Configures the `Injector` to return an instance of `useClass` for a token.\n * @see [Dependency Injection Guide](guide/di/dependency-injection)\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}\n *\n * Note that following two providers are not equal:\n *\n * {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface StaticClassProvider extends StaticClassSansProvider {\n  /**\n   * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n   */\n  provide: any;\n\n  /**\n   * When true, injector returns an array of instances. This is useful to allow multiple\n   * providers spread across many files to provide configuration information to a common token.\n   */\n  multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return an instance of a token.\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection)\n *\n * @usageNotes\n *\n * ```ts\n * @Injectable(SomeModule, {deps: []})\n * class MyService {}\n * ```\n *\n * @publicApi\n */\nexport interface ConstructorSansProvider {\n  /**\n   * A list of `token`s to be resolved by the injector.\n   */\n  deps?: any[];\n}\n\n/**\n * Configures the `Injector` to return an instance of a token.\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection)\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ConstructorProvider extends ConstructorSansProvider {\n  /**\n   * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n   */\n  provide: Type<any>;\n\n  /**\n   * When true, injector returns an array of instances. This is useful to allow multiple\n   * providers spread across many files to provide configuration information to a common token.\n   */\n  multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return a value of another `useExisting` token.\n *\n * @see {@link ExistingProvider}\n * @see [Dependency Injection Guide](guide/di/dependency-injection)\n *\n * @publicApi\n */\nexport interface ExistingSansProvider {\n  /**\n   * Existing `token` to return. (Equivalent to `injector.get(useExisting)`)\n   */\n  useExisting: any;\n}\n\n/**\n * Configures the `Injector` to return a value of another `useExisting` token.\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection)\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='ExistingProvider'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ExistingProvider extends ExistingSansProvider {\n  /**\n   * An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.\n   */\n  provide: any;\n\n  /**\n   * When true, injector returns an array of instances. This is useful to allow multiple\n   * providers spread across many files to provide configuration information to a common token.\n   */\n  multi?: boolean;\n}\n\n/**\n * Configures the `Injector` to return a value by invoking a `useFactory` function.\n *\n * @see {@link FactoryProvider}\n * @see [Dependency Injection Guide](guide/di/dependency-injection)\n *\n * @publicApi\n */\nexport interface FactorySansProvider {\n  /**\n   * A function to invoke to create a value for this `token`. The function is invoked with\n   * resolved values of `token`s in the `deps` field.\n   */\n  useFactory: Function;\n\n  /**\n   * A list of `token`s to be resolved by the injector. The list of values is then\n   * used as arguments to the `useFactory` function.\n   */\n  deps?: any[];\n}\n\n/**\n * Configures the `Injector` to return a value by invoking a `useFactory` function.\n * @see [Dependency Injection Guide](guide/di/dependency-injection)\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='FactoryProvider'}\n *\n * Dependencies can also be marked as optional:\n *\n * {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface FactoryProvider extends FactorySansProvider {\n  /**\n   * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).\n   */\n  provide: any;\n\n  /**\n   * When true, injector returns an array of instances. This is useful to allow multiple\n   * providers spread across many files to provide configuration information to a common token.\n   */\n  multi?: boolean;\n}\n\n/**\n * Describes how an `Injector` should be configured as static (that is, without reflection).\n * A static provider provides tokens to an injector for various types of dependencies.\n *\n * @see {@link Injector.create()}\n * @see [Dependency Injection Guide](guide/di/dependency-injection-providers).\n *\n * @publicApi\n */\nexport type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];\n\n/**\n * Configures the `Injector` to return an instance of `Type` when `Type' is used as the token.\n *\n * Create an instance by invoking the `new` operator and supplying additional arguments.\n * This form is a short form of `TypeProvider`;\n *\n * For more details, see the [\"Dependency Injection Guide\"](guide/di/dependency-injection.\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='TypeProvider'}\n *\n * @publicApi\n */\nexport interface TypeProvider extends Type<any> {}\n\n/**\n * Configures the `Injector` to return a value by invoking a `useClass` function.\n * Base for `ClassProvider` decorator.\n *\n * @see [Dependency Injection Guide](guide/di/dependency-injection)\n *\n * @publicApi\n */\nexport interface ClassSansProvider {\n  /**\n   * Class to instantiate for the `token`.\n   */\n  useClass: Type<any>;\n}\n\n/**\n * Configures the `Injector` to return an instance of `useClass` for a token.\n * @see [Dependency Injection Guide](guide/di/dependency-injection)\n *\n * @usageNotes\n *\n * {@example core/di/ts/provider_spec.ts region='ClassProvider'}\n *\n * Note that following two providers are not equal:\n *\n * {@example core/di/ts/provider_spec.ts region='ClassProviderDifference'}\n *\n * ### Multi-value example\n *\n * {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}\n *\n * @publicApi\n */\nexport interface ClassProvider extends ClassSansProvider {\n  /**\n   * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).\n   */\n  provide: any;\n\n  /**\n   * When true, injector returns an array of instances. This is useful to allow multiple\n   * providers spread across many files to provide configuration information to a common token.\n   */\n  multi?: boolean;\n}\n\n/**\n * Describes how the `Injector` should be configured.\n * @see [Dependency Injection Guide](guide/di/dependency-injection)\n *\n * @see {@link StaticProvider}\n *\n * @publicApi\n */\nexport type Provider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | any[];\n\n/**\n * Encapsulated `Provider`s that are only accepted during creation of an `EnvironmentInjector` (e.g.\n * in an `NgModule`).\n *\n * Using this wrapper type prevents providers which are only designed to work in\n * application/environment injectors from being accidentally included in\n * `@Component.providers` and ending up in a component injector.\n *\n * This wrapper type prevents access to the `Provider`s inside.\n *\n * @see {@link makeEnvironmentProviders}\n * @see {@link importProvidersFrom}\n *\n * @publicApi\n */\nexport type EnvironmentProviders = {\n  ɵbrand: 'EnvironmentProviders';\n};\n\nexport interface InternalEnvironmentProviders extends EnvironmentProviders {\n  ɵproviders: (Provider | EnvironmentProviders)[];\n\n  /**\n   * If present, indicates that the `EnvironmentProviders` were derived from NgModule providers.\n   *\n   * This is used to produce clearer error messages.\n   */\n  ɵfromNgModule?: true;\n}\n\nexport function isEnvironmentProviders(value: Provider | EnvironmentProviders | InternalEnvironmentProviders): value is InternalEnvironmentProviders {\n  return value && !!(value as InternalEnvironmentProviders).ɵproviders;\n}\n\n/**\n * Describes a function that is used to process provider lists (such as provider\n * overrides).\n */\nexport type ProcessProvidersFunction = (providers: Provider[]) => Provider[];\n\n/**\n * A wrapper around an NgModule that associates it with providers\n * Usage without a generic type is deprecated.\n *\n * @publicApi\n */\nexport interface ModuleWithProviders<T> {\n  ngModule: Type<T>;\n  providers?: Array<Provider | EnvironmentProviders>;\n}\n\n/**\n * Providers that were imported from NgModules via the `importProvidersFrom` function.\n *\n * These providers are meant for use in an application injector (or other environment injectors) and\n * should not be used in component injectors.\n *\n * This type cannot be directly implemented. It's returned from the `importProvidersFrom` function\n * and serves to prevent the extracted NgModule providers from being used in the wrong contexts.\n *\n * @see {@link importProvidersFrom}\n *\n * @publicApi\n * @deprecated replaced by `EnvironmentProviders`\n */\nexport type ImportedNgModuleProviders = EnvironmentProviders;\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * The list of error codes used in runtime code of the `core` package.\n * Reserved error code range: 100-999.\n *\n * Note: the minus sign denotes the fact that a particular code has a detailed guide on\n * angular.io. This extra annotation is needed to avoid introducing a separate set to store\n * error codes which have guides, which might leak into runtime code.\n *\n * Full list of available error guides can be found at https://angular.dev/errors.\n *\n * Error code ranges per package:\n *  - core (this package): 100-999\n *  - forms: 1000-1999\n *  - common: 2000-2999\n *  - animations: 3000-3999\n *  - router: 4000-4999\n *  - platform-browser: 5000-5500\n */\nexport const enum RuntimeErrorCode {\n  // Change Detection Errors\n  EXPRESSION_CHANGED_AFTER_CHECKED = -100,\n  RECURSIVE_APPLICATION_REF_TICK = 101,\n  INFINITE_CHANGE_DETECTION = 103,\n\n  // Dependency Injection Errors\n  CYCLIC_DI_DEPENDENCY = -200,\n  PROVIDER_NOT_FOUND = -201,\n  INVALID_FACTORY_DEPENDENCY = 202,\n  MISSING_INJECTION_CONTEXT = -203,\n  INVALID_INJECTION_TOKEN = 204,\n  INJECTOR_ALREADY_DESTROYED = 205,\n  PROVIDER_IN_WRONG_CONTEXT = 207,\n  MISSING_INJECTION_TOKEN = 208,\n  INVALID_MULTI_PROVIDER = -209,\n  MISSING_DOCUMENT = 210,\n\n  // Template Errors\n  MULTIPLE_COMPONENTS_MATCH = -300,\n  EXPORT_NOT_FOUND = -301,\n  PIPE_NOT_FOUND = -302,\n  UNKNOWN_BINDING = 303,\n  UNKNOWN_ELEMENT = 304,\n  TEMPLATE_STRUCTURE_ERROR = 305,\n  INVALID_EVENT_BINDING = 306,\n  HOST_DIRECTIVE_UNRESOLVABLE = 307,\n  HOST_DIRECTIVE_NOT_STANDALONE = 308,\n  DUPLICATE_DIRECTIVE = 309,\n  HOST_DIRECTIVE_COMPONENT = 310,\n  HOST_DIRECTIVE_UNDEFINED_BINDING = 311,\n  HOST_DIRECTIVE_CONFLICTING_ALIAS = 312,\n  MULTIPLE_MATCHING_PIPES = 313,\n  UNINITIALIZED_LET_ACCESS = 314,\n  NO_BINDING_TARGET = 315,\n  INVALID_BINDING_TARGET = 316,\n  INVALID_SET_INPUT_CALL = 317,\n\n  // Bootstrap Errors\n  MULTIPLE_PLATFORMS = 400,\n  PLATFORM_NOT_FOUND = -401,\n  MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP = 402,\n  BOOTSTRAP_COMPONENTS_NOT_FOUND = -403,\n  PLATFORM_ALREADY_DESTROYED = 404,\n  ASYNC_INITIALIZERS_STILL_RUNNING = 405,\n  APPLICATION_REF_ALREADY_DESTROYED = 406,\n  RENDERER_NOT_FOUND = 407,\n  PROVIDED_BOTH_ZONE_AND_ZONELESS = 408,\n\n  // Hydration Errors\n  HYDRATION_NODE_MISMATCH = -500,\n  HYDRATION_MISSING_SIBLINGS = -501,\n  HYDRATION_MISSING_NODE = -502,\n  UNSUPPORTED_PROJECTION_DOM_NODES = -503,\n  INVALID_SKIP_HYDRATION_HOST = -504,\n  MISSING_HYDRATION_ANNOTATIONS = -505,\n  HYDRATION_STABLE_TIMEDOUT = -506,\n  MISSING_SSR_CONTENT_INTEGRITY_MARKER = -507,\n  MISCONFIGURED_INCREMENTAL_HYDRATION = 508,\n\n  // Signal Errors\n  SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT = 600,\n  REQUIRE_SYNC_WITHOUT_SYNC_EMIT = 601,\n  ASSERTION_NOT_INSIDE_REACTIVE_CONTEXT = -602,\n\n  // Animation Errors\n  ANIMATE_INVALID_VALUE = 650,\n  // Declarations Errors\n\n  // i18n Errors\n  INVALID_I18N_STRUCTURE = 700,\n  MISSING_LOCALE_DATA = 701,\n\n  // Defer errors (750-799 range)\n  DEFER_LOADING_FAILED = -750,\n  DEFER_IN_HMR_MODE = -751,\n\n  // standalone errors\n  IMPORT_PROVIDERS_FROM_STANDALONE = 800,\n\n  // JIT Compilation Errors\n  // Other\n  INVALID_DIFFER_INPUT = 900,\n  NO_SUPPORTING_DIFFER_FACTORY = 901,\n  VIEW_ALREADY_ATTACHED = 902,\n  INVALID_INHERITANCE = 903,\n  UNSAFE_VALUE_IN_RESOURCE_URL = 904,\n  UNSAFE_VALUE_IN_SCRIPT = 905,\n  MISSING_GENERATED_DEF = 906,\n  TYPE_IS_NOT_STANDALONE = 907,\n  MISSING_ZONEJS = 908,\n  UNEXPECTED_ZONE_STATE = 909,\n  UNSAFE_ATTRIBUTE_BINDING = -910,\n  /**\n   * @deprecated use `UNSAFE_ATTRIBUTE_BINDING` instead.\n   */\n  // tslint:disable-next-line:no-duplicate-enum-values\n  UNSAFE_IFRAME_ATTRS = -910,\n  VIEW_ALREADY_DESTROYED = 911,\n  COMPONENT_ID_COLLISION = -912,\n  IMAGE_PERFORMANCE_WARNING = -913,\n  UNEXPECTED_ZONEJS_PRESENT_IN_ZONELESS_MODE = 914,\n  MISSING_NG_MODULE_DEFINITION = 915,\n  MISSING_DIRECTIVE_DEFINITION = 916,\n  NO_COMPONENT_FACTORY_FOUND = 917,\n  EXTERNAL_RESOURCE_LOADING_FAILED = 918,\n\n  // Signal integration errors\n  REQUIRED_INPUT_NO_VALUE = -950,\n  REQUIRED_QUERY_NO_VALUE = -951,\n  REQUIRED_MODEL_NO_VALUE = 952,\n\n  // Output()\n  OUTPUT_REF_DESTROYED = 953,\n\n  // Repeater errors\n  LOOP_TRACK_DUPLICATE_KEYS = -955,\n  LOOP_TRACK_RECREATE = -956,\n\n  // Runtime dependency tracker errors\n  RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 980,\n  RUNTIME_DEPS_ORPHAN_COMPONENT = 981,\n\n  // resource() API errors\n  MUST_PROVIDE_STREAM_OPTION = 990,\n  RESOURCE_COMPLETED_BEFORE_PRODUCING_VALUE = 991,\n\n  // Upper bounds for core runtime errors is 999\n}\n\n/**\n * Class that represents a runtime error.\n * Formats and outputs the error message in a consistent way.\n *\n * Example:\n * ```ts\n *  throw new RuntimeError(\n *    RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n *    ngDevMode && 'Injector has already been destroyed.');\n * ```\n *\n * Note: the `message` argument contains a descriptive error message as a string in development\n * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the\n * `message` argument becomes `false`, thus we account for it in the typings and the runtime\n * logic.\n */\nexport class RuntimeError<T extends number = RuntimeErrorCode> extends Error {\n  constructor(\n    public code: T,\n    message: null | false | string,\n  ) {\n    super(formatRuntimeError<T>(code, message));\n  }\n}\n\nexport function formatRuntimeErrorCode<T extends number = RuntimeErrorCode>(code: T): string {\n  // Error code might be a negative number, which is a special marker that instructs the logic to\n  // generate a link to the error details page on angular.io.\n  // We also prepend `0` to non-compile-time errors.\n  return `NG0${Math.abs(code)}`;\n}\n\n/**\n * Called to format a runtime error.\n * See additional info on the `message` argument type in the `RuntimeError` class description.\n */\nexport function formatRuntimeError<T extends number = RuntimeErrorCode>(code: T, message: null | false | string): string {\n  const fullCode = formatRuntimeErrorCode(code);\n\n  let errorMessage = `${fullCode}${message ? ': ' + message : ''}`;\n\n  if (ngDevMode && code < 0) {\n    const addPeriodSeparator = !errorMessage.match(/[.,;!?\\n]$/);\n    const separator = addPeriodSeparator ? '.' : '';\n    errorMessage = `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;\n  }\n  return errorMessage;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport function getClosureSafeProperty<T>(objWithPropertyToExtract: T): string {\n  for (const key in objWithPropertyToExtract) {\n    if (objWithPropertyToExtract[key] === (getClosureSafeProperty as any)) {\n      return key;\n    }\n  }\n  // Cannot change it to `RuntimeError` because the `util` target cannot\n  // circularly depend on the `core` target.\n  throw Error(typeof ngDevMode !== 'undefined' && ngDevMode ? 'Could not find renamed property on target object.' : '');\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport function stringify(token: any): string {\n  if (typeof token === 'string') {\n    return token;\n  }\n\n  if (Array.isArray(token)) {\n    return `[${token.map(stringify).join(', ')}]`;\n  }\n\n  if (token == null) {\n    return '' + token;\n  }\n\n  const name = token.overriddenName || token.name;\n  if (name) {\n    return `${name}`;\n  }\n\n  const result = token.toString();\n\n  if (result == null) {\n    return '' + result;\n  }\n\n  const newLineIndex = result.indexOf('\\n');\n  return newLineIndex >= 0 ? result.slice(0, newLineIndex) : result;\n}\n\n/**\n * Ellipses the string in the middle when longer than the max length\n *\n * @param string\n * @param maxLength of the output string\n * @returns ellipsed string with ... in the middle\n */\nexport function truncateMiddle(str: string, maxLength = 100): string {\n  if (!str || maxLength < 1 || str.length <= maxLength) return str;\n  if (maxLength == 1) return str.substring(0, 1) + '...';\n\n  const halfLimit = Math.round(maxLength / 2);\n  return str.substring(0, halfLimit) + '...' + str.substring(str.length - halfLimit);\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { Type } from '../interface/type';\nimport { getClosureSafeProperty } from '../util/property';\nimport { stringify } from '../util/stringify';\n\n/**\n * An interface that a function passed into `forwardRef` has to implement.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}\n * @publicApi\n */\nexport interface ForwardRefFn {\n  (): any;\n}\n\nconst __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty });\n\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * `forwardRef` is also used to break circularities in standalone components imports.\n *\n * @usageNotes\n * ### Circular dependency example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n *\n * ### Circular standalone reference import example\n * ```angular-ts\n * @Component({\n *   imports: [ChildComponent],\n *   selector: 'app-parent',\n *   template: `<app-child [hideParent]=\"hideParent()\"></app-child>`,\n * })\n * export class ParentComponent {\n *    hideParent = input.required<boolean>();\n * }\n *\n *\n * @Component({\n *   imports: [forwardRef(() => ParentComponent)],\n *   selector: 'app-child',\n *   template: `\n *    @if(!hideParent() {\n *       <app-parent/>\n *    }\n *  `,\n * })\n * export class ChildComponent {\n *    hideParent = input.required<boolean>();\n * }\n * ```\n * @see [Resolve circular dependencies with a forward reference](guide/di/di-in-action#resolve-circular-dependencies-with-a-forward-reference)\n * @publicApi\n */\nexport function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {\n  (<any>forwardRefFn).__forward_ref__ = forwardRef;\n  (<any>forwardRefFn).toString = function () {\n    return stringify(this());\n  };\n  return <Type<any>>(<any>forwardRefFn);\n}\n\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see {@link forwardRef}\n * @publicApi\n */\nexport function resolveForwardRef<T>(type: T): T {\n  return isForwardRef(type) ? type() : type;\n}\n\n/** Checks whether a function is wrapped by a `forwardRef`. */\nexport function isForwardRef(fn: any): fn is () => any {\n  return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) && fn.__forward_ref__ === forwardRef;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\n/**\n * The currently active consumer `ReactiveNode`, if running code in a reactive context.\n *\n * Change this via `setActiveConsumer`.\n */\nlet activeConsumer: ReactiveNode | null = null;\nlet inNotificationPhase = false;\n\nexport type Version = number & { __brand: 'Version' };\n\n/**\n * Global epoch counter. Incremented whenever a source signal is set.\n */\nlet epoch: Version = 1 as Version;\n\nexport type ReactiveHookFn = (node: ReactiveNode) => void;\n\n/**\n * If set, called after a producer `ReactiveNode` is created.\n */\nlet postProducerCreatedFn: ReactiveHookFn | null = null;\n\n/**\n * Symbol used to tell `Signal`s apart from other functions.\n *\n * This can be used to auto-unwrap signals in various cases, or to auto-wrap non-signal values.\n */\nexport const SIGNAL: unique symbol = /* @__PURE__ */ Symbol('SIGNAL');\n\nexport function setActiveConsumer(consumer: ReactiveNode | null): ReactiveNode | null {\n  const prev = activeConsumer;\n  activeConsumer = consumer;\n  return prev;\n}\n\nexport function getActiveConsumer(): ReactiveNode | null {\n  return activeConsumer;\n}\n\nexport function isInNotificationPhase(): boolean {\n  return inNotificationPhase;\n}\n\nexport interface Reactive {\n  [SIGNAL]: ReactiveNode;\n}\n\nexport function isReactive(value: unknown): value is Reactive {\n  return (value as Partial<Reactive>)[SIGNAL] !== undefined;\n}\n\nexport const REACTIVE_NODE: ReactiveNode = {\n  version: 0 as Version,\n  lastCleanEpoch: 0 as Version,\n  dirty: false,\n  producers: undefined,\n  producersTail: undefined,\n  consumers: undefined,\n  consumersTail: undefined,\n  recomputing: false,\n  consumerAllowSignalWrites: false,\n  consumerIsAlwaysLive: false,\n  kind: 'unknown',\n  producerMustRecompute: () => false,\n  producerRecomputeValue: () => {},\n  consumerMarkedDirty: () => {},\n  consumerOnSignalRead: () => {},\n};\n\ninterface ReactiveLink {\n  producer: ReactiveNode;\n  consumer: ReactiveNode;\n  lastReadVersion: number;\n  prevConsumer: ReactiveLink | undefined;\n  nextConsumer: ReactiveLink | undefined;\n  nextProducer: ReactiveLink | undefined;\n}\n\n/**\n * A producer and/or consumer which participates in the reactive graph.\n *\n * Producer `ReactiveNode`s which are accessed when a consumer `ReactiveNode` is the\n * `activeConsumer` are tracked as dependencies of that consumer.\n *\n * Certain consumers are also tracked as \"live\" consumers and create edges in the other direction,\n * from producer to consumer. These edges are used to propagate change notifications when a\n * producer's value is updated.\n *\n * A `ReactiveNode` may be both a producer and consumer.\n */\nexport interface ReactiveNode {\n  /**\n   * Version of the value that this node produces.\n   *\n   * This is incremented whenever a new value is produced by this node which is not equal to the\n   * previous value (by whatever definition of equality is in use).\n   */\n  version: Version;\n\n  /**\n   * Epoch at which this node is verified to be clean.\n   *\n   * This allows skipping of some polling operations in the case where no signals have been set\n   * since this node was last read.\n   */\n  lastCleanEpoch: Version;\n\n  /**\n   * Whether this node (in its consumer capacity) is dirty.\n   *\n   * Only live consumers become dirty, when receiving a change notification from a dependency\n   * producer.\n   */\n  dirty: boolean;\n\n  /**\n   * Whether this node is currently rebuilding its producer list.\n   */\n  recomputing: boolean;\n\n  /**\n   * Producers which are dependencies of this consumer.\n   */\n  producers: ReactiveLink | undefined;\n\n  /**\n   * Points to the last linked list node in the `producers` linked list.\n   *\n   * When this node is recomputing, this is used to track the producers that we have accessed so far.\n   */\n  producersTail: ReactiveLink | undefined;\n\n  /**\n   * Linked list of consumers of this producer that are \"live\" (they require push notifications).\n   *\n   * The length of this list is effectively our reference count for this node.\n   */\n  consumers: ReactiveLink | undefined;\n  consumersTail: ReactiveLink | undefined;\n\n  /**\n   * Whether writes to signals are allowed when this consumer is the `activeConsumer`.\n   *\n   * This is used to enforce guardrails such as preventing writes to writable signals in the\n   * computation function of computed signals, which is supposed to be pure.\n   */\n  consumerAllowSignalWrites: boolean;\n\n  readonly consumerIsAlwaysLive: boolean;\n\n  /**\n   * Tracks whether producers need to recompute their value independently of the reactive graph (for\n   * example, if no initial value has been computed).\n   */\n  producerMustRecompute(node: unknown): boolean;\n  producerRecomputeValue(node: unknown): void;\n  consumerMarkedDirty(node: unknown): void;\n\n  /**\n   * Called when a signal is read within this consumer.\n   */\n  consumerOnSignalRead(node: unknown): void;\n\n  /**\n   * A debug name for the reactive node. Used in Angular DevTools to identify the node.\n   */\n  debugName?: string;\n\n  /**\n   * Kind of node. Example: 'signal', 'computed', 'input', 'effect'.\n   *\n   * ReactiveNode has this as 'unknown' by default, but derived node types should override this to\n   * make available the kind of signal that particular instance of a ReactiveNode represents.\n   *\n   * Used in Angular DevTools to identify the kind of signal.\n   */\n  kind: string;\n}\n\n/**\n * Called by implementations when a producer's signal is read.\n */\nexport function producerAccessed(node: ReactiveNode): void {\n  if (inNotificationPhase) {\n    throw new Error(typeof ngDevMode !== 'undefined' && ngDevMode ? `Assertion error: signal read during notification phase` : '');\n  }\n\n  if (activeConsumer === null) {\n    // Accessed outside of a reactive context, so nothing to record.\n    return;\n  }\n\n  activeConsumer.consumerOnSignalRead(node);\n\n  const prevProducerLink = activeConsumer.producersTail;\n\n  // If the last producer we accessed is the same as the current one, we can skip adding a new\n  // link\n  if (prevProducerLink !== undefined && prevProducerLink.producer === node) {\n    return;\n  }\n\n  let nextProducerLink: ReactiveLink | undefined = undefined;\n  const isRecomputing = activeConsumer.recomputing;\n  if (isRecomputing) {\n    // If we're incrementally rebuilding the producers list, we want to check if the next producer\n    // in the list is the same as the one we're trying to add.\n\n    // If the previous producer is defined, then the next producer is just the one that follows it.\n    // Otherwise, we should check the head of the producers list (the first node that we accessed the last time this consumer was run).\n    nextProducerLink = prevProducerLink !== undefined ? prevProducerLink.nextProducer : activeConsumer.producers;\n    if (nextProducerLink !== undefined && nextProducerLink.producer === node) {\n      // If the next producer is the same as the one we're trying to add, we can just update the\n      // last read version, update the tail of the producers list of this rerun, and return.\n      activeConsumer.producersTail = nextProducerLink;\n      nextProducerLink.lastReadVersion = node.version;\n      return;\n    }\n  }\n\n  const prevConsumerLink = node.consumersTail;\n\n  // If the producer we're accessing already has a link to this consumer, we can skip adding a new\n  // link. This can short circuit the creation of a new link in the case where the consumer reads alternating ReeactiveNodes\n  if (\n    prevConsumerLink !== undefined &&\n    prevConsumerLink.consumer === activeConsumer &&\n    // However, we have to make sure that the link we've discovered isn't from a node that is incrementally rebuilding its producer list\n    (!isRecomputing || isValidLink(prevConsumerLink, activeConsumer))\n  ) {\n    // If we found an existing link to the consumer we can just return.\n    return;\n  }\n\n  // If we got here, it means that we need to create a new link between the producer and the consumer.\n  const isLive = consumerIsLive(activeConsumer);\n  const newLink = {\n    producer: node,\n    consumer: activeConsumer,\n    // instead of eagerly destroying the previous link, we delay until we've finished recomputing\n    // the producers list, so that we can destroy all of the old links at once.\n    nextProducer: nextProducerLink,\n    prevConsumer: prevConsumerLink,\n    lastReadVersion: node.version,\n    nextConsumer: undefined,\n  };\n  activeConsumer.producersTail = newLink;\n  if (prevProducerLink !== undefined) {\n    prevProducerLink.nextProducer = newLink;\n  } else {\n    activeConsumer.producers = newLink;\n  }\n\n  if (isLive) {\n    producerAddLiveConsumer(node, newLink);\n  }\n}\n\n/**\n * Increment the global epoch counter.\n *\n * Called by source producers (that is, not computeds) whenever their values change.\n */\nexport function producerIncrementEpoch(): void {\n  epoch++;\n}\n\n/**\n * Ensure this producer's `version` is up-to-date.\n */\nexport function producerUpdateValueVersion(node: ReactiveNode): void {\n  if (consumerIsLive(node) && !node.dirty) {\n    // A live consumer will be marked dirty by producers, so a clean state means that its version\n    // is guaranteed to be up-to-date.\n    return;\n  }\n\n  if (!node.dirty && node.lastCleanEpoch === epoch) {\n    // Even non-live consumers can skip polling if they previously found themselves to be clean at\n    // the current epoch, since their dependencies could not possibly have changed (such a change\n    // would've increased the epoch).\n    return;\n  }\n\n  if (!node.producerMustRecompute(node) && !consumerPollProducersForChange(node)) {\n    // None of our producers report a change since the last time they were read, so no\n    // recomputation of our value is necessary, and we can consider ourselves clean.\n    producerMarkClean(node);\n    return;\n  }\n\n  node.producerRecomputeValue(node);\n\n  // After recomputing the value, we're no longer dirty.\n  producerMarkClean(node);\n}\n\n/**\n * Propagate a dirty notification to live consumers of this producer.\n */\nexport function producerNotifyConsumers(node: ReactiveNode): void {\n  if (node.consumers === undefined) {\n    return;\n  }\n\n  // Prevent signal reads when we're updating the graph\n  const prev = inNotificationPhase;\n  inNotificationPhase = true;\n  try {\n    for (let link: ReactiveLink | undefined = node.consumers; link !== undefined; link = link.nextConsumer) {\n      const consumer = link.consumer;\n      if (!consumer.dirty) {\n        consumerMarkDirty(consumer);\n      }\n    }\n  } finally {\n    inNotificationPhase = prev;\n  }\n}\n\n/**\n * Whether this `ReactiveNode` in its producer capacity is currently allowed to initiate updates,\n * based on the current consumer context.\n */\nexport function producerUpdatesAllowed(): boolean {\n  return activeConsumer?.consumerAllowSignalWrites !== false;\n}\n\nexport function consumerMarkDirty(node: ReactiveNode): void {\n  node.dirty = true;\n  producerNotifyConsumers(node);\n  node.consumerMarkedDirty?.(node);\n}\n\nexport function producerMarkClean(node: ReactiveNode): void {\n  node.dirty = false;\n  node.lastCleanEpoch = epoch;\n}\n\n/**\n * Prepare this consumer to run a computation in its reactive context and set\n * it as the active consumer.\n *\n * Must be called by subclasses which represent reactive computations, before those computations\n * begin.\n */\nexport function consumerBeforeComputation(node: ReactiveNode | null): ReactiveNode | null {\n  if (node) resetConsumerBeforeComputation(node);\n\n  return setActiveConsumer(node);\n}\n\n/**\n * Prepare this consumer to run a computation in its reactive context.\n *\n * We expose this mainly for code where we manually batch effects into a single\n * consumer. In those cases we may wish to \"reopen\" a consumer multiple times\n * in initial render before finalizing it. Most code should just call\n * `consumerBeforeComputation` instead of calling this directly.\n */\nexport function resetConsumerBeforeComputation(node: ReactiveNode): void {\n  node.producersTail = undefined;\n  node.recomputing = true;\n}\n\n/**\n * Finalize this consumer's state and set previous consumer as the active consumer after a\n * reactive computation has run.\n *\n * Must be called by subclasses which represent reactive computations, after those computations\n * have finished.\n */\nexport function consumerAfterComputation(node: ReactiveNode | null, prevConsumer: ReactiveNode | null): void {\n  setActiveConsumer(prevConsumer);\n\n  if (node) finalizeConsumerAfterComputation(node);\n}\n\n/**\n * Finalize this consumer's state after a reactive computation has run.\n *\n * We expose this mainly for code where we manually batch effects into a single\n * consumer. In those cases we may wish to \"reopen\" a consumer multiple times\n * in initial render before finalizing it. Most code should just call\n * `consumerAfterComputation` instead of calling this directly.\n */\nexport function finalizeConsumerAfterComputation(node: ReactiveNode): void {\n  node.recomputing = false;\n\n  // We've finished incrementally rebuilding the producers list, now if there are any producers\n  // that are after producersTail, they are stale and should be removed.\n  const producersTail = node.producersTail as ReactiveLink | undefined;\n  let toRemove = producersTail !== undefined ? producersTail.nextProducer : node.producers;\n  if (toRemove !== undefined) {\n    if (consumerIsLive(node)) {\n      // For each stale link, we first unlink it from the producers list of consumers\n      do {\n        toRemove = producerRemoveLiveConsumerLink(toRemove);\n      } while (toRemove !== undefined);\n    }\n\n    // Now, we can truncate the producers list to remove all stale links.\n    if (producersTail !== undefined) {\n      producersTail.nextProducer = undefined;\n    } else {\n      node.producers = undefined;\n    }\n  }\n}\n\n/**\n * Determine whether this consumer has any dependencies which have changed since the last time\n * they were read.\n */\nexport function consumerPollProducersForChange(node: ReactiveNode): boolean {\n  // Poll producers for change.\n  for (let link = node.producers; link !== undefined; link = link.nextProducer) {\n    const producer = link.producer;\n    const seenVersion = link.lastReadVersion;\n\n    // First check the versions. A mismatch means that the producer's value is known to have\n    // changed since the last time we read it.\n    if (seenVersion !== producer.version) {\n      return true;\n    }\n\n    // The producer's version is the same as the last time we read it, but it might itself be\n    // stale. Force the producer to recompute its version (calculating a new value if necessary).\n    producerUpdateValueVersion(producer);\n\n    // Now when we do this check, `producer.version` is guaranteed to be up to date, so if the\n    // versions still match then it has not changed since the last time we read it.\n    if (seenVersion !== producer.version) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\n/**\n * Disconnect this consumer from the graph.\n */\nexport function consumerDestroy(node: ReactiveNode): void {\n  if (consumerIsLive(node)) {\n    // Drop all connections from the graph to this node.\n    let link = node.producers;\n    while (link !== undefined) {\n      link = producerRemoveLiveConsumerLink(link);\n    }\n  }\n\n  // Truncate all the linked lists to drop all connection from this node to the graph.\n  node.producers = undefined;\n  node.producersTail = undefined;\n  node.consumers = undefined;\n  node.consumersTail = undefined;\n}\n\n/**\n * Add `consumer` as a live consumer of this node.\n *\n * Note that this operation is potentially transitive. If this node becomes live, then it becomes\n * a live consumer of all of its current producers.\n */\nfunction producerAddLiveConsumer(node: ReactiveNode, link: ReactiveLink): void {\n  const consumersTail = node.consumersTail;\n  const wasLive = consumerIsLive(node);\n  if (consumersTail !== undefined) {\n    link.nextConsumer = consumersTail.nextConsumer;\n    consumersTail.nextConsumer = link;\n  } else {\n    link.nextConsumer = undefined;\n    node.consumers = link;\n  }\n  link.prevConsumer = consumersTail;\n  node.consumersTail = link;\n  if (!wasLive) {\n    for (let link: ReactiveLink | undefined = node.producers; link !== undefined; link = link.nextProducer) {\n      producerAddLiveConsumer(link.producer, link);\n    }\n  }\n}\n\nfunction producerRemoveLiveConsumerLink(link: ReactiveLink): ReactiveLink | undefined {\n  const producer = link.producer;\n  const nextProducer = link.nextProducer;\n  const nextConsumer = link.nextConsumer;\n  const prevConsumer = link.prevConsumer;\n  link.nextConsumer = undefined;\n  link.prevConsumer = undefined;\n  if (nextConsumer !== undefined) {\n    nextConsumer.prevConsumer = prevConsumer;\n  } else {\n    producer.consumersTail = prevConsumer;\n  }\n  if (prevConsumer !== undefined) {\n    prevConsumer.nextConsumer = nextConsumer;\n  } else {\n    producer.consumers = nextConsumer;\n    if (!consumerIsLive(producer)) {\n      let producerLink = producer.producers;\n      while (producerLink !== undefined) {\n        producerLink = producerRemoveLiveConsumerLink(producerLink);\n      }\n    }\n  }\n  return nextProducer;\n}\n\nfunction consumerIsLive(node: ReactiveNode): boolean {\n  return node.consumerIsAlwaysLive || node.consumers !== undefined;\n}\n\nexport function runPostProducerCreatedFn(node: ReactiveNode): void {\n  postProducerCreatedFn?.(node);\n}\n\nexport function setPostProducerCreatedFn(fn: ReactiveHookFn | null): ReactiveHookFn | null {\n  const prev = postProducerCreatedFn;\n  postProducerCreatedFn = fn;\n  return prev;\n}\n\n// While a ReactiveNode is recomputing, it may not have destroyed previous links\n// This allows us to check if a given link will be destroyed by a reactivenode if it were to finish running immediately without accesing any more producers\nfunction isValidLink(checkLink: ReactiveLink, consumer: ReactiveNode): boolean {\n  const producersTail = consumer.producersTail;\n  if (producersTail !== undefined) {\n    let link = consumer.producers!;\n    do {\n      if (link === checkLink) {\n        return true;\n      }\n      if (link === producersTail) {\n        break;\n      }\n      link = link.nextProducer!;\n    } while (link !== undefined);\n  }\n  return false;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { SIGNAL } from './graph';\n\n// Only a subset of HTML tags are allowed in the custom formatter JsonML format.\n// See https://firefox-source-docs.mozilla.org/devtools-user/custom_formatters/index.html#html-template-format\ntype AllowedTags = 'span' | 'div' | 'ol' | 'ul' | 'li' | 'table' | 'tr' | 'td';\n\ntype JsonMLText = string;\ntype JsonMLAttrs = Record<string, string>;\ntype JsonMLElement = [tagName: AllowedTags, ...children: (JsonMLNode | JsonMLChild)[]] | [tagName: AllowedTags, attrs: JsonMLAttrs, ...children: (JsonMLNode | JsonMLChild)[]];\ntype JsonMLNode = JsonMLText | JsonMLElement;\ntype JsonMLChild = ['object', { object: unknown; config?: unknown }];\ntype JsonML = JsonMLNode;\n\ntype FormatterConfig = unknown & { ngSkipFormatting?: boolean };\n\ndeclare global {\n  // We need to use `var` here to be able to declare a global variable.\n  // `let` and `const` will be locally scoped to the file.\n  // tslint:disable-next-line:no-unused-variable\n  var devtoolsFormatters: any[];\n}\n\n/**\n * A custom formatter which renders signals in an easy-to-read format.\n *\n * @see https://firefox-source-docs.mozilla.org/devtools-user/custom_formatters/index.html\n */\n\nconst formatter = {\n  /**\n   *  If the function returns `null`, the formatter is not used for this reference\n   */\n  header: (sig: any, config: FormatterConfig): JsonML | null => {\n    if (!isSignal(sig) || config?.ngSkipFormatting) return null;\n\n    let value: unknown;\n    try {\n      value = sig();\n    } catch {\n      // In case the signl throws, we don't want to break the formatting.\n      return ['span', 'Signal(⚠️ Error)'];\n    }\n\n    const kind = 'computation' in (sig[SIGNAL] as any) ? 'Computed' : 'Signal';\n\n    const isPrimitive = value === null || (!Array.isArray(value) && typeof value !== 'object');\n\n    return [\n      'span',\n      {},\n      ['span', {}, `${kind}(`],\n      (() => {\n        if (isSignal(value)) {\n          // Recursively call formatter. Could return an `object` to call the formatter through DevTools,\n          // but then recursive signals will render multiple expando arrows which is an awkward UX.\n          return formatter.header(value, config)!;\n        } else if (isPrimitive && value !== undefined && typeof value !== 'function') {\n          // Use built-in rendering for primitives which applies standard syntax highlighting / theming.\n          // Can't do this for `undefined` however, as the browser thinks we forgot to provide an object.\n          // Also don't want to do this for functions which render nested expando arrows.\n          return ['object', { object: value }];\n        } else {\n          return prettifyPreview(value as Record<string | number | symbol, unknown>);\n        }\n      })(),\n      ['span', {}, `)`],\n    ];\n  },\n\n  hasBody: (sig: any, config: FormatterConfig) => {\n    if (!isSignal(sig)) return false;\n\n    try {\n      sig();\n    } catch {\n      return false;\n    }\n    return !config?.ngSkipFormatting;\n  },\n\n  body: (sig: any, config: any): JsonML => {\n    // We can use sys colors to fit the current DevTools theme.\n    // Those are unfortunately only available on Chromium-based browsers.\n    // On Firefow we fall back to the default color\n    const color = 'var(--sys-color-primary)';\n\n    return [\n      'div',\n      { style: `background: #FFFFFF10; padding-left: 4px; padding-top: 2px; padding-bottom: 2px;` },\n      ['div', { style: `color: ${color}` }, 'Signal value: '],\n      ['div', { style: `padding-left: .5rem;` }, ['object', { object: sig(), config }]],\n      ['div', { style: `color: ${color}` }, 'Signal function: '],\n      ['div', { style: `padding-left: .5rem;` }, ['object', { object: sig, config: { ...config, skipFormatting: true } }]],\n    ];\n  },\n};\n\nfunction prettifyPreview(value: Record<string | number | symbol, unknown> | Array<unknown> | undefined): string | JsonMLChild {\n  if (value === null) return 'null';\n  if (Array.isArray(value)) return `Array(${value.length})`;\n  if (value instanceof Element) return `<${value.tagName.toLowerCase()}>`;\n  if (value instanceof URL) return `URL`;\n\n  switch (typeof value) {\n    case 'undefined': {\n      return 'undefined';\n    }\n    case 'function': {\n      if ('prototype' in value) {\n        // This is what Chrome renders, can't use `object` though because it creates a nested expando arrow.\n        return 'class';\n      } else {\n        return '() => {…}';\n      }\n    }\n    case 'object': {\n      if (value.constructor.name === 'Object') {\n        return '{…}';\n      } else {\n        return `${value.constructor.name} {}`;\n      }\n    }\n    default: {\n      return ['object', { object: value, config: { skipFormatting: true } }];\n    }\n  }\n}\n\nfunction isSignal(value: any): boolean {\n  return value[SIGNAL] !== undefined;\n}\n\n/**\n * Installs the custom formatter into custom formatting on Signals in the devtools.\n *\n * Supported by both Chrome and Firefox.\n *\n * @see https://firefox-source-docs.mozilla.org/devtools-user/custom_formatters/index.html\n */\nexport function installDevToolsSignalFormatter() {\n  globalThis.devtoolsFormatters ??= [];\n  if (!globalThis.devtoolsFormatters.some((f: any) => f === formatter)) {\n    globalThis.devtoolsFormatters.push(formatter);\n  }\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * A comparison function which can determine if two values are equal.\n */\nexport type ValueEqualityFn<T> = (a: T, b: T) => boolean;\n\n/**\n * The default equality function used for `signal` and `computed`, which uses referential equality.\n */\nexport function defaultEquals<T>(a: T, b: T) {\n  return Object.is(a, b);\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { defaultEquals, ValueEqualityFn } from './equality';\nimport {\n  consumerAfterComputation,\n  consumerBeforeComputation,\n  producerAccessed,\n  producerUpdateValueVersion,\n  REACTIVE_NODE,\n  ReactiveNode,\n  setActiveConsumer,\n  SIGNAL,\n  runPostProducerCreatedFn,\n} from './graph';\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\n/**\n * A computation, which derives a value from a declarative reactive expression.\n *\n * `Computed`s are both producers and consumers of reactivity.\n */\nexport interface ComputedNode<T> extends ReactiveNode {\n  /**\n   * Current value of the computation, or one of the sentinel values above (`UNSET`, `COMPUTING`,\n   * `ERROR`).\n   */\n  value: T;\n\n  /**\n   * If `value` is `ERRORED`, the error caught from the last computation attempt which will\n   * be re-thrown.\n   */\n  error: unknown;\n\n  /**\n   * The computation function which will produce a new value.\n   */\n  computation: () => T;\n\n  equal: ValueEqualityFn<T>;\n}\n\nexport type ComputedGetter<T> = (() => T) & {\n  [SIGNAL]: ComputedNode<T>;\n};\n\n/**\n * Create a computed signal which derives a reactive value from an expression.\n */\nexport function createComputed<T>(computation: () => T, equal?: ValueEqualityFn<T>): ComputedGetter<T> {\n  const node: ComputedNode<T> = Object.create(COMPUTED_NODE);\n  node.computation = computation;\n\n  if (equal !== undefined) {\n    node.equal = equal;\n  }\n\n  const computed = () => {\n    // Check if the value needs updating before returning it.\n    producerUpdateValueVersion(node);\n\n    // Record that someone looked at this signal.\n    producerAccessed(node);\n\n    if (node.value === ERRORED) {\n      throw node.error;\n    }\n\n    return node.value;\n  };\n\n  (computed as ComputedGetter<T>)[SIGNAL] = node;\n  if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n    const debugName = node.debugName ? ' (' + node.debugName + ')' : '';\n    computed.toString = () => `[Computed${debugName}: ${node.value}]`;\n  }\n\n  runPostProducerCreatedFn(node);\n\n  return computed as unknown as ComputedGetter<T>;\n}\n\n/**\n * A dedicated symbol used before a computed value has been calculated for the first time.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nexport const UNSET: any = /* @__PURE__ */ Symbol('UNSET');\n\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * is in progress. Used to detect cycles in computation chains.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nexport const COMPUTING: any = /* @__PURE__ */ Symbol('COMPUTING');\n\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * failed. The thrown error is cached until the computation gets dirty again.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nexport const ERRORED: any = /* @__PURE__ */ Symbol('ERRORED');\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst COMPUTED_NODE = /* @__PURE__ */ (() => ({\n  ...REACTIVE_NODE,\n  value: UNSET,\n  dirty: true,\n  error: null,\n  equal: defaultEquals,\n  kind: 'computed',\n\n  producerMustRecompute(node: ComputedNode<unknown>): boolean {\n    // Force a recomputation if there's no current value, or if the current value is in the\n    // process of being calculated (which should throw an error).\n    return node.value === UNSET || node.value === COMPUTING;\n  },\n\n  producerRecomputeValue(node: ComputedNode<unknown>): void {\n    if (node.value === COMPUTING) {\n      // Our computation somehow led to a cyclic read of itself.\n      throw new Error(typeof ngDevMode !== 'undefined' && ngDevMode ? 'Detected cycle in computations.' : '');\n    }\n\n    const oldValue = node.value;\n    node.value = COMPUTING;\n\n    const prevConsumer = consumerBeforeComputation(node);\n    let newValue: unknown;\n    let wasEqual = false;\n    try {\n      newValue = node.computation();\n      // We want to mark this node as errored if calling `equal` throws; however, we don't want\n      // to track any reactive reads inside `equal`.\n      setActiveConsumer(null);\n      wasEqual = oldValue !== UNSET && oldValue !== ERRORED && newValue !== ERRORED && node.equal(oldValue, newValue);\n    } catch (err) {\n      newValue = ERRORED;\n      node.error = err;\n    } finally {\n      consumerAfterComputation(node, prevConsumer);\n    }\n\n    if (wasEqual) {\n      // No change to `valueVersion` - old and new values are\n      // semantically equivalent.\n      node.value = oldValue;\n      return;\n    }\n\n    node.value = newValue;\n    node.version++;\n  },\n}))();\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type { SignalNode } from './signal';\n\nfunction defaultThrowError(): never {\n  throw new Error();\n}\n\nlet throwInvalidWriteToSignalErrorFn: <T>(node: SignalNode<T>) => never = defaultThrowError;\n\nexport function throwInvalidWriteToSignalError<T>(node: SignalNode<T>) {\n  throwInvalidWriteToSignalErrorFn(node);\n}\n\nexport function setThrowInvalidWriteToSignalError(fn: <T>(node: SignalNode<T>) => never): void {\n  throwInvalidWriteToSignalErrorFn = fn;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { defaultEquals, ValueEqualityFn } from './equality';\nimport { throwInvalidWriteToSignalError } from './errors';\nimport { producerAccessed, producerIncrementEpoch, producerNotifyConsumers, producerUpdatesAllowed, REACTIVE_NODE, ReactiveNode, ReactiveHookFn, runPostProducerCreatedFn, SIGNAL } from './graph';\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\n/**\n * If set, called after `WritableSignal`s are updated.\n *\n * This hook can be used to achieve various effects, such as running effects synchronously as part\n * of setting a signal.\n */\nlet postSignalSetFn: ReactiveHookFn | null = null;\n\nexport interface SignalNode<T> extends ReactiveNode {\n  value: T;\n  equal: ValueEqualityFn<T>;\n}\n\nexport type SignalBaseGetter<T> = (() => T) & { readonly [SIGNAL]: unknown };\nexport type SignalSetter<T> = (newValue: T) => void;\nexport type SignalUpdater<T> = (updateFn: (value: T) => T) => void;\n\n// Note: Closure *requires* this to be an `interface` and not a type, which is why the\n// `SignalBaseGetter` type exists to provide the correct shape.\nexport interface SignalGetter<T> extends SignalBaseGetter<T> {\n  readonly [SIGNAL]: SignalNode<T>;\n}\n\n/**\n * Creates a `Signal` getter, setter, and updater function.\n */\nexport function createSignal<T>(initialValue: T, equal?: ValueEqualityFn<T>): [SignalGetter<T>, SignalSetter<T>, SignalUpdater<T>] {\n  const node: SignalNode<T> = Object.create(SIGNAL_NODE);\n  node.value = initialValue;\n  if (equal !== undefined) {\n    node.equal = equal;\n  }\n  const getter = (() => signalGetFn(node)) as SignalGetter<T>;\n  (getter as any)[SIGNAL] = node;\n  if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n    const debugName = node.debugName ? ' (' + node.debugName + ')' : '';\n    getter.toString = () => `[Signal${debugName}: ${node.value}]`;\n  }\n\n  runPostProducerCreatedFn(node);\n  const set = (newValue: T) => signalSetFn(node, newValue);\n  const update = (updateFn: (value: T) => T) => signalUpdateFn(node, updateFn);\n  return [getter, set, update];\n}\n\nexport function setPostSignalSetFn(fn: ReactiveHookFn | null): ReactiveHookFn | null {\n  const prev = postSignalSetFn;\n  postSignalSetFn = fn;\n  return prev;\n}\n\nexport function signalGetFn<T>(node: SignalNode<T>): T {\n  producerAccessed(node);\n  return node.value;\n}\n\nexport function signalSetFn<T>(node: SignalNode<T>, newValue: T) {\n  if (!producerUpdatesAllowed()) {\n    throwInvalidWriteToSignalError(node);\n  }\n\n  if (!node.equal(node.value, newValue)) {\n    node.value = newValue;\n    signalValueChanged(node);\n  }\n}\n\nexport function signalUpdateFn<T>(node: SignalNode<T>, updater: (value: T) => T): void {\n  if (!producerUpdatesAllowed()) {\n    throwInvalidWriteToSignalError(node);\n  }\n\n  signalSetFn(node, updater(node.value));\n}\n\nexport function runPostSignalSetFn<T>(node: SignalNode<T>): void {\n  postSignalSetFn?.(node);\n}\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nexport const SIGNAL_NODE: SignalNode<unknown> = /* @__PURE__ */ (() => ({\n  ...REACTIVE_NODE,\n  equal: defaultEquals,\n  value: undefined,\n  kind: 'signal',\n}))();\n\nfunction signalValueChanged<T>(node: SignalNode<T>): void {\n  node.version++;\n  producerIncrementEpoch();\n  producerNotifyConsumers(node);\n  postSignalSetFn?.(node);\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { COMPUTING, ERRORED, UNSET } from './computed';\nimport { defaultEquals, ValueEqualityFn } from './equality';\nimport {\n  consumerAfterComputation,\n  consumerBeforeComputation,\n  producerAccessed,\n  producerMarkClean,\n  producerUpdateValueVersion,\n  REACTIVE_NODE,\n  ReactiveNode,\n  runPostProducerCreatedFn,\n  SIGNAL,\n} from './graph';\nimport { signalSetFn, signalUpdateFn } from './signal';\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\nexport type ComputationFn<S, D> = (source: S, previous?: PreviousValue<S, D>) => D;\nexport type PreviousValue<S, D> = { source: S; value: D };\n\nexport interface LinkedSignalNode<S, D> extends ReactiveNode {\n  /**\n   * Value of the source signal that was used to derive the computed value.\n   */\n  sourceValue: S;\n\n  /**\n   * Current state value, or one of the sentinel values (`UNSET`, `COMPUTING`,\n   * `ERROR`).\n   */\n  value: D;\n\n  /**\n   * If `value` is `ERRORED`, the error caught from the last computation attempt which will\n   * be re-thrown.\n   */\n  error: unknown;\n\n  /**\n   * The source function represents reactive dependency based on which the linked state is reset.\n   */\n  source: () => S;\n\n  /**\n   * The computation function which will produce a new value based on the source and, optionally - previous values.\n   */\n  computation: ComputationFn<S, D>;\n\n  equal: ValueEqualityFn<D>;\n}\n\nexport type LinkedSignalGetter<S, D> = (() => D) & {\n  [SIGNAL]: LinkedSignalNode<S, D>;\n};\n\nexport function createLinkedSignal<S, D>(sourceFn: () => S, computationFn: ComputationFn<S, D>, equalityFn?: ValueEqualityFn<D>): LinkedSignalGetter<S, D> {\n  const node: LinkedSignalNode<S, D> = Object.create(LINKED_SIGNAL_NODE);\n\n  node.source = sourceFn;\n  node.computation = computationFn;\n  if (equalityFn != undefined) {\n    node.equal = equalityFn;\n  }\n\n  const linkedSignalGetter = () => {\n    // Check if the value needs updating before returning it.\n    producerUpdateValueVersion(node);\n\n    // Record that someone looked at this signal.\n    producerAccessed(node);\n\n    if (node.value === ERRORED) {\n      throw node.error;\n    }\n\n    return node.value;\n  };\n\n  const getter = linkedSignalGetter as LinkedSignalGetter<S, D>;\n  getter[SIGNAL] = node;\n  if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n    const debugName = node.debugName ? ' (' + node.debugName + ')' : '';\n    getter.toString = () => `[LinkedSignal${debugName}: ${node.value}]`;\n  }\n\n  runPostProducerCreatedFn(node);\n\n  return getter;\n}\n\nexport function linkedSignalSetFn<S, D>(node: LinkedSignalNode<S, D>, newValue: D) {\n  producerUpdateValueVersion(node);\n  signalSetFn(node, newValue);\n  producerMarkClean(node);\n}\n\nexport function linkedSignalUpdateFn<S, D>(node: LinkedSignalNode<S, D>, updater: (value: D) => D): void {\n  producerUpdateValueVersion(node);\n  signalUpdateFn(node, updater);\n  producerMarkClean(node);\n}\n\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `LINKED_SIGNAL_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nexport const LINKED_SIGNAL_NODE: object = /* @__PURE__ */ (() => ({\n  ...REACTIVE_NODE,\n  value: UNSET,\n  dirty: true,\n  error: null,\n  equal: defaultEquals,\n  kind: 'linkedSignal',\n\n  producerMustRecompute(node: LinkedSignalNode<unknown, unknown>): boolean {\n    // Force a recomputation if there's no current value, or if the current value is in the\n    // process of being calculated (which should throw an error).\n    return node.value === UNSET || node.value === COMPUTING;\n  },\n\n  producerRecomputeValue(node: LinkedSignalNode<unknown, unknown>): void {\n    if (node.value === COMPUTING) {\n      // Our computation somehow led to a cyclic read of itself.\n      throw new Error(typeof ngDevMode !== 'undefined' && ngDevMode ? 'Detected cycle in computations.' : '');\n    }\n\n    const oldValue = node.value;\n    node.value = COMPUTING;\n\n    const prevConsumer = consumerBeforeComputation(node);\n    let newValue: unknown;\n    try {\n      const newSourceValue = node.source();\n      const prev =\n        oldValue === UNSET || oldValue === ERRORED\n          ? undefined\n          : {\n              source: node.sourceValue,\n              value: oldValue,\n            };\n      newValue = node.computation(newSourceValue, prev);\n      node.sourceValue = newSourceValue;\n    } catch (err) {\n      newValue = ERRORED;\n      node.error = err;\n    } finally {\n      consumerAfterComputation(node, prevConsumer);\n    }\n\n    if (oldValue !== UNSET && newValue !== ERRORED && node.equal(oldValue, newValue)) {\n      // No change to `valueVersion` - old and new values are\n      // semantically equivalent.\n      node.value = oldValue;\n      return;\n    }\n\n    node.value = newValue;\n    node.version++;\n  },\n}))();\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { setActiveConsumer } from './graph';\n\n/**\n * Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function\n * can, optionally, return a value.\n */\nexport function untracked<T>(nonReactiveReadsFn: () => T): T {\n  const prevConsumer = setActiveConsumer(null);\n  // We are not trying to catch any particular errors here, just making sure that the consumers\n  // stack is restored in case of errors.\n  try {\n    return nonReactiveReadsFn();\n  } finally {\n    setActiveConsumer(prevConsumer);\n  }\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { consumerAfterComputation, consumerBeforeComputation, consumerPollProducersForChange, REACTIVE_NODE, ReactiveNode } from './graph';\n\n/**\n * An effect can, optionally, register a cleanup function. If registered, the cleanup is executed\n * before the next effect run. The cleanup function makes it possible to \"cancel\" any work that the\n * previous effect run might have started.\n */\nexport type EffectCleanupFn = () => void;\n\n/**\n * A callback passed to the effect function that makes it possible to register cleanup logic.\n */\nexport type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;\n\nexport interface BaseEffectNode extends ReactiveNode {\n  fn: () => void;\n  destroy(): void;\n  cleanup(): void;\n  run(): void;\n}\n\nexport const BASE_EFFECT_NODE: Omit<BaseEffectNode, 'fn' | 'destroy' | 'cleanup' | 'run'> = /* @__PURE__ */ (() => ({\n  ...REACTIVE_NODE,\n  consumerIsAlwaysLive: true,\n  consumerAllowSignalWrites: true,\n  dirty: true,\n  kind: 'effect',\n}))();\n\nexport function runEffect(node: BaseEffectNode) {\n  node.dirty = false;\n  if (node.version > 0 && !consumerPollProducersForChange(node)) {\n    return;\n  }\n  node.version++;\n  const prevNode = consumerBeforeComputation(node);\n  try {\n    node.cleanup();\n    node.fn();\n  } finally {\n    consumerAfterComputation(node, prevNode);\n  }\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { installDevToolsSignalFormatter } from './src/formatter';\n\nexport { ComputedNode, createComputed } from './src/computed';\nexport { ComputationFn, LinkedSignalNode, LinkedSignalGetter, PreviousValue, createLinkedSignal, linkedSignalSetFn, linkedSignalUpdateFn } from './src/linked_signal';\nexport { ValueEqualityFn, defaultEquals } from './src/equality';\nexport { setThrowInvalidWriteToSignalError } from './src/errors';\nexport {\n  REACTIVE_NODE,\n  Reactive,\n  ReactiveHookFn,\n  ReactiveNode,\n  SIGNAL,\n  consumerAfterComputation,\n  consumerBeforeComputation,\n  consumerDestroy,\n  consumerMarkDirty,\n  consumerPollProducersForChange,\n  finalizeConsumerAfterComputation,\n  getActiveConsumer,\n  isInNotificationPhase,\n  isReactive,\n  producerAccessed,\n  producerIncrementEpoch,\n  producerMarkClean,\n  producerNotifyConsumers,\n  producerUpdateValueVersion,\n  producerUpdatesAllowed,\n  resetConsumerBeforeComputation,\n  runPostProducerCreatedFn,\n  setActiveConsumer,\n  setPostProducerCreatedFn,\n  Version,\n} from './src/graph';\nexport { SIGNAL_NODE, SignalGetter, SignalNode, createSignal, runPostSignalSetFn, setPostSignalSetFn, signalGetFn, signalSetFn, signalUpdateFn } from './src/signal';\nexport { Watch, WatchCleanupFn, WatchCleanupRegisterFn, createWatch } from './src/watch';\nexport { setAlternateWeakRefImpl } from './src/weak_ref';\nexport { untracked } from './src/untracked';\nexport { runEffect, BASE_EFFECT_NODE, BaseEffectNode } from './src/effect';\nexport { installDevToolsSignalFormatter } from './src/formatter';\n\n// Required as the signals library is in a separate package, so we need to explicitly ensure the\n// global `ngDevMode` type is defined.\ndeclare const ngDevMode: boolean | undefined;\n\n// We're using a top-level access to enable signal formatting whenever the signals package is loaded.\nif (typeof ngDevMode !== 'undefined' && ngDevMode) {\n  // tslint:disable-next-line: no-toplevel-property-access\n  installDevToolsSignalFormatter();\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n// The functions in this file verify that the assumptions we are making\n// about state in an instruction are correct before implementing any logic.\n// They are meant only to be called in dev mode as sanity checks.\n\nimport { getActiveConsumer } from '../../primitives/signals';\n\nimport { stringify } from './stringify';\n\nexport function assertNumber(actual: any, msg: string): asserts actual is number {\n  if (!(typeof actual === 'number')) {\n    throwError(msg, typeof actual, 'number', '===');\n  }\n}\n\nexport function assertNumberInRange(actual: any, minInclusive: number, maxInclusive: number): asserts actual is number {\n  assertNumber(actual, 'Expected a number');\n  assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n  assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\n\nexport function assertString(actual: any, msg: string): asserts actual is string {\n  if (!(typeof actual === 'string')) {\n    throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n  }\n}\n\nexport function assertFunction(actual: any, msg: string): asserts actual is Function {\n  if (!(typeof actual === 'function')) {\n    throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n  }\n}\n\nexport function assertEqual<T>(actual: T, expected: T, msg: string) {\n  if (!(actual == expected)) {\n    throwError(msg, actual, expected, '==');\n  }\n}\n\nexport function assertNotEqual<T>(actual: T, expected: T, msg: string): asserts actual is T {\n  if (!(actual != expected)) {\n    throwError(msg, actual, expected, '!=');\n  }\n}\n\nexport function assertSame<T>(actual: T, expected: T, msg: string): asserts actual is T {\n  if (!(actual === expected)) {\n    throwError(msg, actual, expected, '===');\n  }\n}\n\nexport function assertNotSame<T>(actual: T, expected: T, msg: string) {\n  if (!(actual !== expected)) {\n    throwError(msg, actual, expected, '!==');\n  }\n}\n\nexport function assertLessThan<T>(actual: T, expected: T, msg: string): asserts actual is T {\n  if (!(actual < expected)) {\n    throwError(msg, actual, expected, '<');\n  }\n}\n\nexport function assertLessThanOrEqual<T>(actual: T, expected: T, msg: string): asserts actual is T {\n  if (!(actual <= expected)) {\n    throwError(msg, actual, expected, '<=');\n  }\n}\n\nexport function assertGreaterThan<T>(actual: T, expected: T, msg: string): asserts actual is T {\n  if (!(actual > expected)) {\n    throwError(msg, actual, expected, '>');\n  }\n}\n\nexport function assertGreaterThanOrEqual<T>(actual: T, expected: T, msg: string): asserts actual is T {\n  if (!(actual >= expected)) {\n    throwError(msg, actual, expected, '>=');\n  }\n}\n\nexport function assertNotDefined<T>(actual: T, msg: string) {\n  if (actual != null) {\n    throwError(msg, actual, null, '==');\n  }\n}\n\nexport function assertDefined<T>(actual: T | null | undefined, msg: string): asserts actual is T {\n  if (actual == null) {\n    throwError(msg, actual, null, '!=');\n  }\n}\n\nexport function throwError(msg: string): never;\nexport function throwError(msg: string, actual: any, expected: any, comparison: string): never;\nexport function throwError(msg: string, actual?: any, expected?: any, comparison?: string): never {\n  throw new Error(`ASSERTION ERROR: ${msg}` + (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\n\nexport function assertDomNode(node: any): asserts node is Node {\n  if (!(node instanceof Node)) {\n    throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n  }\n}\n\nexport function assertElement(node: any): asserts node is Element {\n  if (!(node instanceof Element)) {\n    throwError(`The provided value must be an element but got ${stringify(node)}`);\n  }\n}\n\nexport function assertIndexInRange(arr: any[], index: number) {\n  assertDefined(arr, 'Array must be defined.');\n  const maxLen = arr.length;\n  if (index < 0 || index >= maxLen) {\n    throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n  }\n}\n\nexport function assertOneOf(value: any, ...validValues: any[]) {\n  if (validValues.indexOf(value) !== -1) return true;\n  throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`);\n}\n\nexport function assertNotReactive(fn: string): void {\n  if (getActiveConsumer() !== null) {\n    throwError(`${fn}() should never be called in a reactive context.`);\n  }\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { Type } from '../../interface/type';\nimport { getClosureSafeProperty } from '../../util/property';\n\nimport { ClassProvider, ConstructorProvider, EnvironmentProviders, ExistingProvider, FactoryProvider, StaticClassProvider, ValueProvider } from './provider';\n\n/**\n * Information about how a type or `InjectionToken` interfaces with the DI system.\n *\n * At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly\n * requesting injection of other types if necessary.\n *\n * Optionally, a `providedIn` parameter specifies that the given type belongs to a particular\n * `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates\n * that the injectable does not belong to any scope.\n *\n * @codeGenApi\n * @publicApi The ViewEngine compiler emits code with this type for injectables. This code is\n *   deployed to npm, and should be treated as public api.\n\n */\nexport interface ɵɵInjectableDeclaration<T> {\n  /**\n   * Specifies that the given type belongs to a particular injector:\n   * - `InjectorType` such as `NgModule`,\n   * - `'root'` the root injector\n   * - `'any'` all injectors.\n   * - `null`, does not belong to any injector. Must be explicitly listed in the injector\n   *   `providers`.\n   */\n  providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | 'environment' | null;\n\n  /**\n   * The token to which this definition belongs.\n   *\n   * Note that this may not be the same as the type that the `factory` will create.\n   */\n  token: unknown;\n\n  /**\n   * Factory method to execute to create an instance of the injectable.\n   */\n  factory: (t?: Type<any>) => T;\n\n  /**\n   * In a case of no explicit injector, a location where the instance of the injectable is stored.\n   */\n  value: T | undefined;\n}\n\n/**\n * Information about the providers to be included in an `Injector` as well as how the given type\n * which carries the information should be created by the DI system.\n *\n * An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested\n * structure of providers with a defined priority (identically to how `NgModule`s also have\n * an import/dependency structure).\n *\n * NOTE: This is a private type and should not be exported\n *\n * @codeGenApi\n */\nexport interface ɵɵInjectorDef<T> {\n  // TODO(alxhub): Narrow down the type here once decorators properly change the return type of the\n  // class they are decorating (to add the ɵprov property for example).\n  providers: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | EnvironmentProviders | any[])[];\n\n  imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];\n}\n\n/**\n * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.\n *\n * `InjectableType`s contain their own Dependency Injection metadata and are usable in an\n * `InjectorDef`-based `StaticInjector`.\n *\n * @publicApi\n */\nexport interface InjectableType<T> extends Type<T> {\n  /**\n   * Opaque type whose structure is highly version dependent. Do not rely on any properties.\n   */\n  ɵprov: unknown;\n}\n\n/**\n * A type which has an `InjectorDef` static field.\n *\n * `InjectorTypes` can be used to configure a `StaticInjector`.\n *\n * This is an opaque type whose structure is highly version dependent. Do not rely on any\n * properties.\n *\n * @publicApi\n */\nexport interface InjectorType<T> extends Type<T> {\n  ɵfac?: unknown;\n}\n\n/**\n * Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` with an\n * associated array of providers.\n *\n * Objects of this type can be listed in the imports section of an `InjectorDef`.\n *\n * NOTE: This is a private type and should not be exported\n */\nexport interface InjectorTypeWithProviders<T> {\n  ngModule: InjectorType<T>;\n  providers?: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | EnvironmentProviders | any[])[];\n}\n\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n *   with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n *   provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n *   The factory can call [`inject`](api/core/inject) to access the `Injector` and request injection\n * of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nexport function ɵɵdefineInjectable<T>(opts: { token: unknown; providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment' | null; factory: () => T }): unknown {\n  return {\n    token: opts.token,\n    providedIn: (opts.providedIn as any) || null,\n    factory: opts.factory,\n    value: undefined,\n  } as ɵɵInjectableDeclaration<T>;\n}\n\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n *   either have a factory or point to a type which has a `ɵprov` static property (the\n *   type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n *   whose providers will also be added to the injector. Locally provided types will override\n *   providers from imports.\n *\n * @codeGenApi\n */\nexport function ɵɵdefineInjector(options: { providers?: any[]; imports?: any[] }): unknown {\n  return { providers: options.providers || [], imports: options.imports || [] };\n}\n\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nexport function getInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null {\n  return getOwnDefinition(type, NG_PROV_DEF) || { token: type, factory: () => new type(), ...type.injectOptions };\n}\n\nexport function isInjectable(type: any): boolean {\n  return getInjectableDef(type) !== null;\n}\n\n/**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\nfunction getOwnDefinition<T>(type: any, field: string): ɵɵInjectableDeclaration<T> | null {\n  // if the ɵprov prop exist but is undefined we still want to return null\n  return (type.hasOwnProperty(field) && type[field]) || null;\n}\n\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n *     scenario if we find the `ɵprov` on an ancestor only.\n */\nexport function getInheritedInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null {\n  // if the ɵprov prop exist but is undefined we still want to return null\n  const def = type?.[NG_PROV_DEF] ?? null;\n\n  if (def) {\n    ngDevMode &&\n      console.warn(\n        `DEPRECATED: DI is instantiating a token \"${type.name}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n          `This will become an error in a future version of Angular. Please add @Injectable() to the \"${type.name}\" class.`,\n      );\n    return def;\n  } else {\n    return null;\n  }\n}\n\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nexport function getInjectorDef<T>(type: any): ɵɵInjectorDef<T> | null {\n  return type && type.hasOwnProperty(NG_INJ_DEF) ? (type as any)[NG_INJ_DEF] : null;\n}\n\nexport const NG_PROV_DEF: string = getClosureSafeProperty({ ɵprov: getClosureSafeProperty });\nexport const NG_INJ_DEF: string = getClosureSafeProperty({ ɵinj: getClosureSafeProperty });\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { Type } from '../interface/type';\nimport { assertLessThan } from '../util/assert';\n\nimport { ɵɵdefineInjectable } from './interface/defs';\n\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides an additional level of type safety.\n *\n * <div class=\"docs-alert docs-alert-helpful\">\n *\n * **Important Note**: Ensure that you use the same instance of the `InjectionToken` in both the\n * provider and the injection call. Creating a new instance of `InjectionToken` in different places,\n * even with the same description, will be treated as different tokens by Angular's DI system,\n * leading to a `NullInjectorError`.\n *\n * </div>\n *\n * {@example injection-token/src/main.ts region='InjectionToken'}\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the [`inject`](api/core/inject) function.\n * As you can see in the Tree-shakable InjectionToken example below.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule` (note:\n * this option is now deprecated). As mentioned above, `'root'` is the default value for\n * `providedIn`.\n *\n * The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.\n *\n * @usageNotes\n * ### Basic Examples\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n *\n * @see [What is an InjectionToken?](guide/di/defining-dependency-providers#what-is-an-injectiontoken)\n *\n * @publicApi\n */\nexport class InjectionToken<T> {\n  /** @internal */\n  readonly ngMetadataName = 'InjectionToken';\n\n  readonly ɵprov: unknown;\n\n  /**\n   * @param _desc   Description for the token,\n   *                used only for debugging purposes,\n   *                it should but does not need to be unique\n   * @param options Options for the token's usage, as described above\n   */\n  constructor(\n    protected _desc: string,\n    options?: {\n      providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;\n      factory: () => T;\n    },\n  ) {\n    this.ɵprov = undefined;\n    if (typeof options === 'number') {\n      (typeof ngDevMode === 'undefined' || ngDevMode) && assertLessThan(options, 0, 'Only negative numbers are supported here');\n      // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n      // See `InjectorMarkers`\n    } else if (options !== undefined) {\n      this.ɵprov = ɵɵdefineInjectable({\n        token: this,\n        providedIn: options.providedIn || 'root',\n        factory: options.factory,\n      });\n    }\n  }\n\n  /**\n   * @internal\n   */\n  get multi(): InjectionToken<Array<T>> {\n    return this as InjectionToken<Array<T>>;\n  }\n\n  toString(): string {\n    return `InjectionToken ${this._desc}`;\n  }\n}\n\nexport interface InjectableDefToken<T> extends InjectionToken<T> {\n  ɵprov: unknown;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type { FactoryProvider, ProviderToken } from '../../di';\nimport { resolveForwardRef } from '../../di/forward_ref';\nimport { InjectionToken } from '../../di/injection_token';\nimport type { Injector } from '../../di/injector';\nimport { InternalInjectFlags } from '../../di/interface/injector';\nimport type { SingleProvider } from '../../di/provider_collection';\nimport { Type } from '../../interface/type';\nimport { throwError } from '../../util/assert';\nimport type { EffectRef } from '../reactivity/effect';\n\n/**\n * An enum describing the types of events that can be emitted from the injector profiler\n */\nexport const enum InjectorProfilerEventType {\n  /**\n   * Emits when a service is injected.\n   */\n  Inject,\n\n  /**\n   * Emits when an Angular class instance is created by an injector.\n   */\n  InstanceCreatedByInjector,\n\n  /**\n   * Emits when an injector configures a provider.\n   */\n  ProviderConfigured,\n\n  /**\n   * Emits when an effect is created.\n   */\n  EffectCreated,\n\n  /**\n   * Emits when an Angular DI system is about to create an instance corresponding to a given token.\n   */\n  InjectorToCreateInstanceEvent,\n}\n\n/**\n * An object that defines an injection context for the injector profiler.\n */\nexport interface InjectorProfilerContext {}\n\nexport interface InjectedServiceEvent {}\n\nexport interface InjectorToCreateInstanceEvent {}\n\nexport interface InjectorCreatedInstanceEvent {}\n\nexport interface ProviderConfiguredEvent {}\n\nexport interface EffectCreatedEvent {}\n\n/**\n * An object representing an event that is emitted through the injector profiler\n */\n\nexport type InjectorProfilerEvent = InjectedServiceEvent | InjectorToCreateInstanceEvent | InjectorCreatedInstanceEvent | ProviderConfiguredEvent | EffectCreatedEvent;\n\n/**\n * An object that contains information about a provider that has been configured\n *\n * TODO: rename to indicate that it is a debug structure eg. ProviderDebugInfo.\n */\nexport interface ProviderRecord {}\n\n/**\n * An object that contains information about a value that has been constructed within an injector\n */\nexport interface InjectorCreatedInstance {}\n\n/**\n * An object that contains information a service that has been injected within an\n * InjectorProfilerContext\n */\nexport interface InjectedService {\n  /**\n   * In NodeInjectors, the LView and TNode that serviced this injection.\n   */\n  injectedIn?: {};\n}\n\nexport interface InjectorProfiler {\n  (event: InjectorProfilerEvent): void;\n}\n\nlet _injectorProfilerContext: InjectorProfilerContext;\nexport function getInjectorProfilerContext() {\n  !ngDevMode && throwError('getInjectorProfilerContext should never be called in production mode');\n  return _injectorProfilerContext;\n}\n\nexport function setInjectorProfilerContext(context: InjectorProfilerContext) {\n  !ngDevMode && throwError('setInjectorProfilerContext should never be called in production mode');\n\n  const previous = _injectorProfilerContext;\n  _injectorProfilerContext = context;\n  return previous;\n}\n\nconst injectorProfilerCallbacks: InjectorProfiler[] = [];\n\nconst NOOP_PROFILER_REMOVAL = () => {};\n\nfunction removeProfiler(profiler: InjectorProfiler) {\n  const profilerIdx = injectorProfilerCallbacks.indexOf(profiler);\n  if (profilerIdx !== -1) {\n    injectorProfilerCallbacks.splice(profilerIdx, 1);\n  }\n}\n\n/**\n * Adds a callback function which will be invoked during certain DI events within the\n * runtime (for example: injecting services, creating injectable instances, configuring providers).\n * Multiple profiler callbacks can be set: in this case profiling events are\n * reported to every registered callback.\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n * @returns a cleanup function that, when invoked, removes a given profiler callback.\n */\nexport function setInjectorProfiler(injectorProfiler: InjectorProfiler | null): () => void {\n  !ngDevMode && throwError('setInjectorProfiler should never be called in production mode');\n\n  if (injectorProfiler !== null) {\n    if (!injectorProfilerCallbacks.includes(injectorProfiler)) {\n      injectorProfilerCallbacks.push(injectorProfiler);\n    }\n    return () => removeProfiler(injectorProfiler);\n  } else {\n    injectorProfilerCallbacks.length = 0;\n    return NOOP_PROFILER_REMOVAL;\n  }\n}\n\n/**\n * Injector profiler function which emits on DI events executed by the runtime.\n *\n * @param event InjectorProfilerEvent corresponding to the DI event being emitted\n */\nexport function injectorProfiler(event: InjectorProfilerEvent): void {\n  !ngDevMode && throwError('Injector profiler should never be called in production mode');\n\n  for (let i = 0; i < injectorProfilerCallbacks.length; i++) {\n    const injectorProfilerCallback = injectorProfilerCallbacks[i];\n    injectorProfilerCallback(event);\n  }\n}\n\n/**\n * Emits an InjectorProfilerEventType.ProviderConfigured to the injector profiler. The data in the\n * emitted event includes the raw provider, as well as the token that provider is providing.\n *\n * @param eventProvider A provider object\n */\nexport function emitProviderConfiguredEvent(eventProvider: SingleProvider, isViewProvider: boolean = false): void {\n  !ngDevMode && throwError('Injector profiler should never be called in production mode');\n\n  let token;\n  // if the provider is a TypeProvider (typeof provider is function) then the token is the\n  // provider itself\n  if (typeof eventProvider === 'function') {\n    token = eventProvider;\n  }\n  // if the provider is an injection token, then the token is the injection token.\n  else if (eventProvider instanceof InjectionToken) {\n    token = eventProvider;\n  }\n  // in all other cases we can access the token via the `provide` property of the provider\n  else {\n    token = resolveForwardRef(eventProvider.provide);\n  }\n\n  let provider = eventProvider;\n  // Injection tokens may define their own default provider which gets attached to the token itself\n  // as `ɵprov`. In this case, we want to emit the provider that is attached to the token, not the\n  // token itself.\n  if (eventProvider instanceof InjectionToken) {\n    provider = (eventProvider.ɵprov as FactoryProvider) || eventProvider;\n  }\n\n  injectorProfiler({\n    type: InjectorProfilerEventType.ProviderConfigured,\n    context: getInjectorProfilerContext(),\n    providerRecord: { token, provider, isViewProvider },\n  });\n}\n\n/**\n * Emits an event to the injector profiler when an instance corresponding to a given token is about to be created be an injector. Note that\n * the injector associated with this emission can be accessed by using getDebugInjectContext()\n *\n * @param instance an object created by an injector\n */\nexport function emitInjectorToCreateInstanceEvent(token: ProviderToken<unknown>): void {\n  !ngDevMode && throwError('Injector profiler should never be called in production mode');\n\n  injectorProfiler({\n    type: InjectorProfilerEventType.InjectorToCreateInstanceEvent,\n    context: getInjectorProfilerContext(),\n    token: token,\n  });\n}\n\n/**\n * Emits an event to the injector profiler with the instance that was created. Note that\n * the injector associated with this emission can be accessed by using getDebugInjectContext()\n *\n * @param instance an object created by an injector\n */\nexport function emitInstanceCreatedByInjectorEvent(instance: unknown): void {\n  !ngDevMode && throwError('Injector profiler should never be called in production mode');\n\n  injectorProfiler({\n    type: InjectorProfilerEventType.InstanceCreatedByInjector,\n    context: getInjectorProfilerContext(),\n    instance: { value: instance },\n  });\n}\n\n/**\n * @param token DI token associated with injected service\n * @param value the instance of the injected service (i.e the result of `inject(token)`)\n * @param flags the flags that the token was injected with\n */\nexport function emitInjectEvent(token: Type<unknown>, value: unknown, flags: InternalInjectFlags): void {\n  !ngDevMode && throwError('Injector profiler should never be called in production mode');\n\n  injectorProfiler({\n    type: InjectorProfilerEventType.Inject,\n    context: getInjectorProfilerContext(),\n    service: { token, value, flags },\n  });\n}\n\nexport function emitEffectCreatedEvent(effect: EffectRef): void {\n  !ngDevMode && throwError('Injector profiler should never be called in production mode');\n\n  injectorProfiler({\n    type: InjectorProfilerEventType.EffectCreated,\n    context: getInjectorProfilerContext(),\n    effect,\n  });\n}\n\nexport function runInInjectorProfilerContext(injector: Injector, token: Type<unknown>, callback: () => void): void {\n  !ngDevMode && throwError('runInInjectorProfilerContext should never be called in production mode');\n\n  const prevInjectContext = setInjectorProfilerContext({ injector, token });\n  try {\n    callback();\n  } finally {\n    setInjectorProfilerContext(prevInjectContext);\n  }\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { Type } from '../interface/type';\n\n/**\n * Definition of what a factory function should look like.\n */\nexport type FactoryFn<T> = {\n  /**\n   * Subclasses without an explicit constructor call through to the factory of their base\n   * definition, providing it with their own constructor to instantiate.\n   */\n  <U extends T>(t?: Type<U>): U;\n\n  /**\n   * If no constructor to instantiate is provided, an instance of type T itself is created.\n   */\n  (t?: undefined): T;\n};\n\nexport function getFactoryDef<T>(type: any, throwNotFound: true): FactoryFn<T>;\nexport function getFactoryDef<T>(type: any): FactoryFn<T> | null;\nexport function getFactoryDef<T>(type: any, throwNotFound?: boolean): FactoryFn<T> | null {\n  return () => new type();\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\nexport function renderStringify(value: any): string {\n  if (typeof value === 'string') return value;\n  if (value == null) return '';\n  // Use `String` so that it invokes the `toString` method of the value. Note that this\n  // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n  return String(value);\n}\n\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n *\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nexport function stringifyForError(value: any): string {\n  if (typeof value === 'function') return value.name || value.toString();\n  if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n    return value.type.name || value.type.toString();\n  }\n\n  return renderStringify(value);\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport type { ProviderToken } from '../di';\nimport { isEnvironmentProviders } from '../di/interface/provider';\nimport { formatRuntimeError, RuntimeError, RuntimeErrorCode } from '../errors';\nimport { Type } from '../interface/type';\nimport { assertDefined } from '../util/assert';\nimport { getClosureSafeProperty } from '../util/property';\nimport { stringify } from '../util/stringify';\n\nimport { stringifyForError } from './util/stringify_utils';\n\nconst NG_RUNTIME_ERROR_CODE = getClosureSafeProperty({ ngErrorCode: getClosureSafeProperty });\nconst NG_RUNTIME_ERROR_MESSAGE = getClosureSafeProperty({ ngErrorMessage: getClosureSafeProperty });\nconst NG_TOKEN_PATH = getClosureSafeProperty({ ngTokenPath: getClosureSafeProperty });\n\n/** Creates a circular dependency runtime error. */\nexport function cyclicDependencyError(token: string, path?: string[]): Error {\n  const message = ngDevMode ? `Circular dependency detected for \\`${token}\\`.` : '';\n  return createRuntimeError(message, RuntimeErrorCode.CYCLIC_DI_DEPENDENCY, path);\n}\n\n/** Creates a circular dependency runtime error including a dependency path in the error message. */\nexport function cyclicDependencyErrorWithDetails(token: string, path: string[]): Error {\n  return augmentRuntimeError(cyclicDependencyError(token, path), null);\n}\n\nexport function throwMixedMultiProviderError() {\n  throw new Error(`Cannot mix multi providers and regular providers`);\n}\n\nexport function throwInvalidProviderError(ngModuleType?: Type<unknown>, providers?: any[], provider?: any): never {\n  if (ngModuleType && providers) {\n    const providerDetail = providers.map((v) => (v == provider ? '?' + provider + '?' : '...'));\n    throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}' - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`);\n  } else if (isEnvironmentProviders(provider)) {\n    if (provider.ɵfromNgModule) {\n      throw new RuntimeError(\n        RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT,\n        `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`,\n      );\n    } else {\n      throw new RuntimeError(RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT, `Invalid providers present in a non-environment injector. 'EnvironmentProviders' can't be used for component providers.`);\n    }\n  } else {\n    throw new Error('Invalid provider');\n  }\n}\n\n/** Throws an error when a token is not found in DI. */\nexport function throwProviderNotFoundError(token: ProviderToken<unknown>, injectorName?: string): never {\n  const errorMessage = ngDevMode && `No provider for ${stringifyForError(token)} found${injectorName ? ` in ${injectorName}` : ''}`;\n  throw new RuntimeError(RuntimeErrorCode.PROVIDER_NOT_FOUND, errorMessage);\n}\n\n/**\n * Given an Error instance and the current token - update the monkey-patched\n * dependency path info to include that token.\n *\n * @param error Current instance of the Error class.\n * @param token Extra token that should be appended.\n */\nexport function prependTokenToDependencyPath(error: any, token: ProviderToken<unknown> | { multi: true; provide: ProviderToken<unknown> }): void {\n  error[NG_TOKEN_PATH] ??= [];\n  // Append current token to the current token path. Since the error\n  // is bubbling up, add the token in front of other tokens.\n  const currentPath = error[NG_TOKEN_PATH];\n  // Do not append the same token multiple times.\n  let pathStr: string;\n  if (typeof token === 'object' && 'multi' in token && token?.multi === true) {\n    assertDefined(token.provide, 'Token with multi: true should have a provide property');\n    pathStr = stringifyForError(token.provide);\n  } else {\n    pathStr = stringifyForError(token);\n  }\n\n  if (currentPath[0] !== pathStr) {\n    (error[NG_TOKEN_PATH] as string[]).unshift(pathStr);\n  }\n}\n\n/**\n * Modifies an Error instance with an updated error message\n * based on the accumulated dependency path.\n *\n * @param error Current instance of the Error class.\n * @param source Extra info about the injector which started\n *    the resolution process, which eventually failed.\n */\nexport function augmentRuntimeError(error: any, source: string | null): Error {\n  const tokenPath: string[] = error[NG_TOKEN_PATH];\n  const errorCode = error[NG_RUNTIME_ERROR_CODE];\n  const message = error[NG_RUNTIME_ERROR_MESSAGE] || error.message;\n  error.message = formatErrorMessage(message, errorCode, tokenPath, source);\n  return error;\n}\n\n/**\n * Creates an initial RuntimeError instance when a problem is detected.\n * Monkey-patches extra info in the RuntimeError instance, so that it can\n * be reused later, before throwing the final error.\n */\nexport function createRuntimeError(message: string, code: number, path?: string[]): Error {\n  // Cast to `any`, so that extra info can be monkey-patched onto this instance.\n  const error = new RuntimeError(code, message) as any;\n\n  // Monkey-patch a runtime error code and a path onto an Error instance.\n  error[NG_RUNTIME_ERROR_CODE] = code;\n  error[NG_RUNTIME_ERROR_MESSAGE] = message;\n  if (path) {\n    error[NG_TOKEN_PATH] = path;\n  }\n  return error;\n}\n\n/**\n * Reads monkey-patched error code from the given Error instance.\n */\nexport function getRuntimeErrorCode(error: any): number | undefined {\n  return error[NG_RUNTIME_ERROR_CODE];\n}\n\nfunction formatErrorMessage(text: string, code: number, path: string[] = [], source: string | null = null): string {\n  let pathDetails = '';\n  // If the path is empty or contains only one element (self) -\n  // do not append additional info the error message.\n  if (path && path.length > 1) {\n    pathDetails = ` Path: ${path.join(' -> ')}.`;\n  }\n  const sourceDetails = source ? ` Source: ${source}.` : '';\n  return formatRuntimeError(code, `${text}${sourceDetails}${pathDetails}`);\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { getClosureSafeProperty } from '../util/property';\nexport const NG_FACTORY_DEF: string = getClosureSafeProperty({ ɵfac: getClosureSafeProperty });\n\n/**\n * The `NG_ENV_ID` field on a DI token indicates special processing in the `EnvironmentInjector`:\n * getting such tokens from the `EnvironmentInjector` will bypass the standard DI resolution\n * strategy and instead will return implementation produced by the `NG_ENV_ID` factory function.\n *\n * This particular retrieval of DI tokens is mostly done to eliminate circular dependencies and\n * improve tree-shaking.\n */\nexport const NG_ENV_ID: string = getClosureSafeProperty({ __NG_ENV_ID__: getClosureSafeProperty });\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { assertEqual, assertLessThanOrEqual } from './assert';\n\n/**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n *     the array.\n */\nexport function arrayEquals<T>(a: T[], b: T[], identityAccessor?: (value: T) => unknown): boolean {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; i++) {\n    let valueA = a[i];\n    let valueB = b[i];\n    if (identityAccessor) {\n      valueA = identityAccessor(valueA) as any;\n      valueB = identityAccessor(valueB) as any;\n    }\n    if (valueB !== valueA) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Flattens an array.\n */\nexport function flatten(list: any[]): any[] {\n  return list.flat(Number.POSITIVE_INFINITY);\n}\n\nexport function deepForEach<T>(input: (T | any[])[], fn: (value: T) => void): void {\n  input.forEach((value) => (Array.isArray(value) ? deepForEach(value, fn) : fn(value)));\n}\n\nexport function addToArray(arr: any[], index: number, value: any): void {\n  // perf: array.push is faster than array.splice!\n  if (index >= arr.length) {\n    arr.push(value);\n  } else {\n    arr.splice(index, 0, value);\n  }\n}\n\nexport function removeFromArray(arr: any[], index: number): any {\n  // perf: array.pop is faster than array.splice!\n  if (index >= arr.length - 1) {\n    return arr.pop();\n  } else {\n    return arr.splice(index, 1)[0];\n  }\n}\n\nexport function newArray<T = any>(size: number): T[];\nexport function newArray<T>(size: number, value: T): T[];\nexport function newArray<T>(size: number, value?: T): T[] {\n  const list: T[] = [];\n  for (let i = 0; i < size; i++) {\n    list.push(value!);\n  }\n  return list;\n}\n\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nexport function arraySplice(array: any[], index: number, count: number): void {\n  const length = array.length - count;\n  while (index < length) {\n    array[index] = array[index + count];\n    index++;\n  }\n  while (count--) {\n    array.pop(); // shrink the array\n  }\n}\n\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nexport function arrayInsert(array: any[], index: number, value: any): void {\n  ngDevMode && assertLessThanOrEqual(index, array.length, \"Can't insert past array end.\");\n  let end = array.length;\n  while (end > index) {\n    const previousEnd = end - 1;\n    array[end] = array[previousEnd];\n    end = previousEnd;\n  }\n  array[index] = value;\n}\n\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nexport function arrayInsert2(array: any[], index: number, value1: any, value2: any): void {\n  ngDevMode && assertLessThanOrEqual(index, array.length, \"Can't insert past array end.\");\n  let end = array.length;\n  if (end == index) {\n    // inserting at the end.\n    array.push(value1, value2);\n  } else if (end === 1) {\n    // corner case when we have less items in array than we have items to insert.\n    array.push(value2, array[0]);\n    array[0] = value1;\n  } else {\n    end--;\n    array.push(array[end - 1], array[end]);\n    while (end > index) {\n      const previousEnd = end - 2;\n      array[end] = array[previousEnd];\n      end--;\n    }\n    array[index] = value1;\n    array[index + 1] = value2;\n  }\n}\n\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n *   - positive index if value found.\n *   - negative index if value not found. (`~index` to get the value where it should have been\n *     located)\n */\nexport function arrayIndexOfSorted(array: string[], value: string): number {\n  return _arrayIndexOfSorted(array, value, 0);\n}\n\n/**\n * `KeyValueArray` is an array where even positions contain keys and odd positions contain values.\n *\n * `KeyValueArray` provides a very efficient way of iterating over its contents. For small\n * sets (~10) the cost of binary searching an `KeyValueArray` has about the same performance\n * characteristics that of a `Map` with significantly better memory footprint.\n *\n * If used as a `Map` the keys are stored in alphabetical order so that they can be binary searched\n * for retrieval.\n *\n * See: `keyValueArraySet`, `keyValueArrayGet`, `keyValueArrayIndexOf`, `keyValueArrayDelete`.\n */\nexport interface KeyValueArray<VALUE> extends Array<VALUE | string> {\n  __brand__: 'array-map';\n}\n\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nexport function keyValueArraySet<V>(keyValueArray: KeyValueArray<V>, key: string, value: V): number {\n  let index = keyValueArrayIndexOf(keyValueArray, key);\n  if (index >= 0) {\n    // if we found it set it.\n    keyValueArray[index | 1] = value;\n  } else {\n    index = ~index;\n    arrayInsert2(keyValueArray, index, key, value);\n  }\n  return index;\n}\n\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nexport function keyValueArrayGet<V>(keyValueArray: KeyValueArray<V>, key: string): V | undefined {\n  const index = keyValueArrayIndexOf(keyValueArray, key);\n  if (index >= 0) {\n    // if we found it retrieve it.\n    return keyValueArray[index | 1] as V;\n  }\n  return undefined;\n}\n\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n *   - positive (even) index if key found.\n *   - negative index if key not found. (`~index` (even) to get the index where it should have\n *     been inserted.)\n */\nexport function keyValueArrayIndexOf<V>(keyValueArray: KeyValueArray<V>, key: string): number {\n  return _arrayIndexOfSorted(keyValueArray as string[], key, 1);\n}\n\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n *   - positive (even) index if key found and deleted.\n *   - negative index if key not found. (`~index` (even) to get the index where it should have\n *     been.)\n */\nexport function keyValueArrayDelete<V>(keyValueArray: KeyValueArray<V>, key: string): number {\n  const index = keyValueArrayIndexOf(keyValueArray, key);\n  if (index >= 0) {\n    // if we found it remove it.\n    arraySplice(keyValueArray, index, 2);\n  }\n  return index;\n}\n\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n *   - `0` means look at every location\n *   - `1` means only look at every other (even) location (the odd locations are to be ignored as\n *         they are values.)\n * @returns index of the value.\n *   - positive index if value found.\n *   - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array: string[], value: string, shift: number): number {\n  ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n  let start = 0;\n  let end = array.length >> shift;\n  while (end !== start) {\n    const middle = start + ((end - start) >> 1); // find the middle.\n    const current = array[middle << shift];\n    if (value === current) {\n      return middle << shift;\n    } else if (current > value) {\n      end = middle;\n    } else {\n      start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n    }\n  }\n  return ~(end << shift);\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\n\nexport const EMPTY_OBJ: never = {} as never;\nexport const EMPTY_ARRAY: any[] = [];\n\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && true) {\n  // These property accesses can be ignored because ngDevMode will be set to false\n  // when optimizing code and the whole if statement will be dropped.\n  // tslint:disable-next-line:no-toplevel-property-access\n  Object.freeze(EMPTY_OBJ);\n  // tslint:disable-next-line:no-toplevel-property-access\n  Object.freeze(EMPTY_ARRAY);\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { InjectionToken } from './injection_token';\n\n/**\n * A multi-provider token for initialization functions that will run upon construction of an\n * environment injector.\n *\n * @deprecated from v19.0.0, use provideEnvironmentInitializer instead\n *\n * @see {@link provideEnvironmentInitializer}\n *\n * Note: As opposed to the `APP_INITIALIZER` token, the `ENVIRONMENT_INITIALIZER` functions are not awaited,\n * hence they should not be `async`.\n *\n * @publicApi\n */\nexport const ENVIRONMENT_INITIALIZER = new InjectionToken<ReadonlyArray<() => void>>(ngDevMode ? 'ENVIRONMENT_INITIALIZER' : '');\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Special flag indicating that a decorator is of type `Inject`. It's used to make `Inject`\n * decorator tree-shakable (so we don't have to rely on the `instanceof` checks).\n * Note: this flag is not included into the `InjectFlags` since it's an internal-only API.\n */\nexport const enum DecoratorFlags {\n  Inject = -1,\n}\n\n/**\n * This enum is an exact copy of the `InjectFlags` enum above, but the difference is that this is a\n * const enum, so actual enum values would be inlined in generated code. The `InjectFlags` enum can\n * be turned into a const enum when ViewEngine is removed (see TODO at the `InjectFlags` enum\n * above). The benefit of inlining is that we can use these flags at the top level without affecting\n * tree-shaking (see \"no-toplevel-property-access\" tslint rule for more info).\n * Keep this enum in sync with `InjectFlags` enum above.\n */\nexport const enum InternalInjectFlags {\n  /** Check self and check parent injector if needed */\n  Default = 0b0000,\n\n  /**\n   * Specifies that an injector should retrieve a dependency from any injector until reaching the\n   * host element of the current component. (Only used with Element Injector)\n   */\n  Host = 0b0001,\n\n  /** Don't ascend to ancestors of the node requesting injection. */\n  Self = 0b0010,\n\n  /** Skip the node that is requesting injection. */\n  SkipSelf = 0b0100,\n\n  /** Inject `defaultValue` instead if token not found. */\n  Optional = 0b1000,\n\n  /**\n   * This token is being injected into a pipe.\n   *\n   * This flag is intentionally not in the public facing `InjectFlags` because it is only added by\n   * the compiler and is not a developer applicable flag.\n   */\n  ForPipe = 0b10000,\n}\n\n/**\n * Type of the options argument to [`inject`](api/core/inject).\n *\n * @publicApi\n */\nexport interface InjectOptions {\n  /**\n   * Use optional injection, and return `null` if the requested token is not found.\n   */\n  optional?: boolean;\n\n  /**\n   * Start injection at the parent of the current injector.\n   */\n  skipSelf?: boolean;\n\n  /**\n   * Only query the current injector for the token, and don't fall back to the parent injector if\n   * it's not found.\n   */\n  self?: boolean;\n\n  /**\n   * Stop injection at the host component's injector. Only relevant when injecting from an element\n   * injector, and a no-op for environment injectors.\n   */\n  host?: boolean;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { throwProviderNotFoundError } from '../render3/errors_di';\n\nimport { getInjectableDef, ɵɵInjectableDeclaration } from './interface/defs';\nimport { InternalInjectFlags } from './interface/injector';\nimport { ProviderToken } from './provider_token';\n\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n *  1. `Injector` should not depend on ivy logic.\n *  2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation: (<T>(token: ProviderToken<T>, flags?: InternalInjectFlags) => T | null) | undefined;\nexport function getInjectImplementation() {\n  return _injectImplementation;\n}\n\n/**\n * Sets the current inject implementation.\n */\nexport function setInjectImplementation(\n  impl: (<T>(token: ProviderToken<T>, flags?: InternalInjectFlags) => T | null) | undefined,\n): (<T>(token: ProviderToken<T>, flags?: InternalInjectFlags) => T | null) | undefined {\n  const previous = _injectImplementation;\n  _injectImplementation = impl;\n  return previous;\n}\n\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * injectable definition.\n */\nexport function injectRootLimpMode<T>(token: ProviderToken<T>, notFoundValue: T | undefined, flags: InternalInjectFlags): T | null {\n  const injectableDef: ɵɵInjectableDeclaration<T> | null = getInjectableDef(token);\n  if (injectableDef && injectableDef.providedIn == 'root') {\n    return injectableDef.value === undefined ? (injectableDef.value = injectableDef.factory()) : injectableDef.value;\n  }\n  if (flags & InternalInjectFlags.Optional) return null;\n  if (notFoundValue !== undefined) return notFoundValue;\n  throwProviderNotFoundError(token, 'Injector');\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { Constructor, InjectionToken } from './injection_token';\nimport { NotFound } from './not_found';\n\nexport interface Injector {\n  retrieve<T>(token: InjectionToken<T>, options?: unknown): T | NotFound;\n}\n\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector: Injector | undefined | null = undefined;\n\nexport function getCurrentInjector(): Injector | undefined | null {\n  return _currentInjector;\n}\n\nexport function setCurrentInjector(injector: Injector | null | undefined): Injector | undefined | null {\n  const former = _currentInjector;\n  _currentInjector = injector;\n  return former;\n}\n\nexport function inject<T>(token: InjectionToken<T> | Constructor<T>): T;\nexport function inject<T>(token: InjectionToken<T> | Constructor<T>, options?: unknown): T | NotFound {\n  const currentInjector = getCurrentInjector();\n  if (!currentInjector) {\n    throw new Error('Current injector is not set.');\n  }\n  if (!(token as InjectionToken<T>).ɵprov) {\n    throw new Error('Token is not an injectable');\n  }\n  return currentInjector.retrieve(token as InjectionToken<T>, options);\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Value returned if the key-value pair couldn't be found in the context\n * hierarchy.\n */\nexport const NOT_FOUND: unique symbol = Symbol('NotFound');\n\n/**\n * Error thrown when the key-value pair couldn't be found in the context\n * hierarchy. Context can be attached below.\n */\nexport class NotFoundError extends Error {\n  override readonly name: string = 'ɵNotFound';\n  constructor(message: string) {\n    super(message);\n  }\n}\n\n/**\n * Type guard for checking if an unknown value is a NotFound.\n */\nexport function isNotFound(e: unknown): e is NotFound {\n  return e === NOT_FOUND || (e as NotFoundError)?.name === 'ɵNotFound';\n}\n\n/**\n * Type union of NotFound and NotFoundError.\n */\nexport type NotFound = typeof NOT_FOUND | NotFoundError;\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { RuntimeError, RuntimeErrorCode } from '../errors';\nimport { Type } from '../interface/type';\nimport { emitInjectEvent } from '../render3/debug/injector_profiler';\nimport { stringify } from '../util/stringify';\n\nimport { resolveForwardRef } from './forward_ref';\nimport { getInjectImplementation, injectRootLimpMode } from './inject_switch';\nimport type { Injector } from './injector';\nimport { DecoratorFlags, InternalInjectFlags, InjectOptions } from './interface/injector';\nimport { ProviderToken } from './provider_token';\nimport { Injector as PrimitivesInjector, isNotFound, NotFound, InjectionToken as PrimitivesInjectionToken, getCurrentInjector } from '../../primitives/di';\n\nimport { InjectionToken } from './injection_token';\n\nconst _THROW_IF_NOT_FOUND = {};\nexport const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n\nexport { getCurrentInjector, setCurrentInjector } from '../../primitives/di';\n\n/*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\n\n/**\n * A wrapper around an `Injector` that implements the `PrimitivesInjector` interface.\n *\n * This is used to allow the `inject` function to be used with the new primitives-based DI system.\n */\nexport class RetrievingInjector implements PrimitivesInjector {\n  constructor(readonly injector: Injector) {}\n  retrieve<T>(token: PrimitivesInjectionToken<T>, options: unknown): T | NotFound {\n    const flags: InternalInjectFlags = convertToBitFlags(options as InjectOptions | undefined) || InternalInjectFlags.Default;\n    try {\n      return (this.injector as BackwardsCompatibleInjector).get(\n        token as unknown as InjectionToken<T>,\n        // When a dependency is requested with an optional flag, DI returns null as the default value.\n        (flags & InternalInjectFlags.Optional ? null : THROW_IF_NOT_FOUND) as T,\n        flags,\n      ) as T;\n    } catch (e: any) {\n      if (isNotFound(e)) {\n        return e;\n      }\n      throw e;\n    }\n  }\n}\n\nexport const NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nexport const SOURCE = '__source';\n\n/**\n * Temporary type to allow internal symbols to use inject flags. This should be\n * removed once we consolidate the flags and the object literal approach.\n */\nexport type BackwardsCompatibleInjector = Injector & {\n  get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InternalInjectFlags | InjectOptions): T;\n};\n\nexport function injectInjectorOnly<T>(token: ProviderToken<T>): T;\nexport function injectInjectorOnly<T>(token: ProviderToken<T>, flags?: InternalInjectFlags): T | null;\nexport function injectInjectorOnly<T>(token: ProviderToken<T>, flags = InternalInjectFlags.Default): T | null {\n  const currentInjector = getCurrentInjector();\n  if (currentInjector === undefined) {\n    throw new RuntimeError(\n      RuntimeErrorCode.MISSING_INJECTION_CONTEXT,\n      ngDevMode &&\n        `The \\`${stringify(token)}\\` token injection failed. \\`inject()\\` function must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \\`runInInjectionContext\\`.`,\n    );\n  } else if (currentInjector === null) {\n    return injectRootLimpMode(token, undefined, flags);\n  } else {\n    const options = convertToInjectOptions(flags);\n    // TODO: improve the typings here.\n    // `token` can be a multi: true provider definition, which is considered as a Token but not represented in the typings\n    const value = currentInjector.retrieve(token as PrimitivesInjectionToken<T>, options) as T;\n    ngDevMode && emitInjectEvent(token as Type<unknown>, value, flags);\n    if (isNotFound(value)) {\n      if (options.optional) {\n        return null;\n      }\n      throw value;\n    }\n    return value;\n  }\n}\n\n/**\n * Generated instruction: injects a token from the currently active injector.\n *\n * (Additional documentation moved to `inject`, as it is the public API, and an alias for this\n * instruction)\n *\n * @see inject\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nexport function ɵɵinject<T>(token: ProviderToken<T>): T;\nexport function ɵɵinject<T>(token: ProviderToken<T>, flags?: InternalInjectFlags): T | null;\n\nexport function ɵɵinject<T>(token: ProviderToken<T>, flags?: InternalInjectFlags): string | null;\nexport function ɵɵinject<T>(token: ProviderToken<T>, flags = InternalInjectFlags.Default): T | null {\n  return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token as Type<T>), flags);\n}\n\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nexport function ɵɵinvalidFactoryDep(index: number): void {\n  throw new RuntimeError(\n    RuntimeErrorCode.INVALID_FACTORY_DEPENDENCY,\n    ngDevMode &&\n      `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.`,\n  );\n}\n\n/**\n * @param token A token that represents a dependency that should be injected.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>): T;\n/**\n * @param token A token that represents a dependency that should be injected.\n * @param options Control how injection is executed. Options correspond to injection strategies\n *     that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and\n *     `@Optional`.\n * @returns the injected value if operation is successful.\n * @throws if called outside of a supported context, or if the token is not found.\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>, options: InjectOptions & { optional?: false }): T;\n/**\n * @param token A token that represents a dependency that should be injected.\n * @param options Control how injection is executed. Options correspond to injection strategies\n *     that can be specified with parameter decorators `@Host`, `@Self`, `@SkipSelf`, and\n *     `@Optional`.\n * @returns the injected value if operation is successful,  `null` if the token is not\n *     found and optional injection has been requested.\n * @throws if called outside of a supported context, or if the token is not found and optional\n *     injection was not requested.\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>, options: InjectOptions): T | null;\n/**\n * @param token A token that represents a static attribute on the host node that should be injected.\n * @returns Value of the attribute if it exists.\n * @throws If called outside of a supported context or the attribute does not exist.\n *\n * @publicApi\n */\n\n/**\n * @param token A token that represents a static attribute on the host node that should be injected.\n * @returns Value of the attribute if it exists, otherwise `null`.\n * @throws If called outside of a supported context.\n *\n * @publicApi\n */\n\n/**\n * @param token A token that represents a static attribute on the host node that should be injected.\n * @returns Value of the attribute if it exists.\n * @throws If called outside of a supported context or the attribute does not exist.\n *\n * @publicApi\n */\n\n/**\n * Injects a token from the currently active injector.\n * `inject` is only supported in an [injection context](guide/di/dependency-injection-context). It\n * can be used during:\n * - Construction (via the `constructor`) of a class being instantiated by the DI system, such\n * as an `@Injectable` or `@Component`.\n * - In the initializer for fields of such classes.\n * - In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`.\n * - In the `factory` function specified for an `InjectionToken`.\n * - In a stackframe of a function call in a DI context\n *\n * @param token A token that represents a dependency that should be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSelf`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @usageNotes\n * In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a\n * field initializer:\n *\n * ```ts\n * @Injectable({providedIn: 'root'})\n * export class Car {\n *   radio: Radio|undefined;\n *   // OK: field initializer\n *   spareTyre = inject(Tyre);\n *\n *   constructor() {\n *     // OK: constructor body\n *     this.radio = inject(Radio);\n *   }\n * }\n * ```\n *\n * It is also legal to call `inject` from a provider's factory:\n *\n * ```ts\n * providers: [\n *   {provide: Car, useFactory: () => {\n *     // OK: a class factory\n *     const engine = inject(Engine);\n *     return new Car(engine);\n *   }}\n * ]\n * ```\n *\n * Calls to the `inject()` function outside of the class creation context will result in error. Most\n * notably, calls to `inject()` are disallowed after a class instance was created, in methods\n * (including lifecycle hooks):\n *\n * ```ts\n * @Component({ ... })\n * export class CarComponent {\n *   ngOnInit() {\n *     // ERROR: too late, the component instance was already created\n *     const engine = inject(Engine);\n *     engine.start();\n *   }\n * }\n * ```\n *\n * @see [Injecting dependencies with inject()](guide/di#injecting-dependencies-with-inject)\n *\n * @publicApi\n */\nexport function inject<T>(token: ProviderToken<T>, options?: InjectOptions) {\n  // The `as any` here _shouldn't_ be necessary, but without it JSCompiler\n  // throws a disambiguation  error due to the multiple signatures.\n  return ɵɵinject(token as any, convertToBitFlags(options));\n}\n\n// Converts object-based DI flags (`InjectOptions`) to bit flags (`InjectFlags`).\nexport function convertToBitFlags(flags: InjectOptions | InternalInjectFlags | undefined): InternalInjectFlags | undefined {\n  if (typeof flags === 'undefined' || typeof flags === 'number') {\n    return flags;\n  }\n\n  // While TypeScript doesn't accept it without a cast, bitwise OR with false-y values in\n  // JavaScript is a no-op. We can use that for a very codesize-efficient conversion from\n  // `InjectOptions` to `InjectFlags`.\n  return (InternalInjectFlags.Default | // comment to force a line break in the formatter\n    ((flags.optional && InternalInjectFlags.Optional) as number) |\n    0 |\n    ((flags.self && InternalInjectFlags.Self) as number) |\n    ((flags.skipSelf && InternalInjectFlags.SkipSelf) as number)) as InternalInjectFlags;\n}\n\n// Converts bitflags to inject options\nfunction convertToInjectOptions(flags: InternalInjectFlags): InjectOptions {\n  return {\n    optional: !!(flags & InternalInjectFlags.Optional),\n    host: !!(flags & InternalInjectFlags.Host),\n    self: !!(flags & InternalInjectFlags.Self),\n    skipSelf: !!(flags & InternalInjectFlags.SkipSelf),\n  };\n}\n\nexport function injectArgs(types: (ProviderToken<any> | any[])[]): any[] {\n  const args: any[] = [];\n  for (let i = 0; i < types.length; i++) {\n    const arg = resolveForwardRef(types[i]);\n    if (Array.isArray(arg)) {\n      if (arg.length === 0) {\n        throw new RuntimeError(RuntimeErrorCode.INVALID_DIFFER_INPUT, ngDevMode && 'Arguments array must have arguments.');\n      }\n      let type: Type<any> | undefined = undefined;\n      let flags: InternalInjectFlags = InternalInjectFlags.Default;\n\n      for (let j = 0; j < arg.length; j++) {\n        const meta = arg[j];\n        const flag = getInjectFlag(meta);\n        if (typeof flag === 'number') {\n          // Special case when we handle @Inject decorator.\n          if (flag === DecoratorFlags.Inject) {\n            type = meta.token;\n          } else {\n            flags |= flag;\n          }\n        } else {\n          type = meta;\n        }\n      }\n\n      args.push(ɵɵinject(type!, flags));\n    } else {\n      args.push(ɵɵinject(arg));\n    }\n  }\n  return args;\n}\n\n/**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\nexport function attachInjectFlag(decorator: any, flag: InternalInjectFlags | DecoratorFlags): any {\n  decorator[DI_DECORATOR_FLAG] = flag;\n  decorator.prototype[DI_DECORATOR_FLAG] = flag;\n  return decorator;\n}\n\n/**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\nexport function getInjectFlag(token: any): number | undefined {\n  return token[DI_DECORATOR_FLAG];\n}\n\nexport function formatError(text: string, obj: any, injectorErrorName: string, source: string | null = null): string {\n  text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;\n  let context = stringify(obj);\n  if (Array.isArray(obj)) {\n    context = obj.map(stringify).join(' -> ');\n  } else if (typeof obj === 'object') {\n    const parts = <string[]>[];\n    for (const key in obj) {\n      if (obj.hasOwnProperty(key)) {\n        const value = obj[key];\n        parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n      }\n    }\n    context = `{${parts.join(', ')}}`;\n  }\n  return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\\n  ')}`;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { InjectionToken } from './injection_token';\nimport type { Injector } from './injector';\nimport { InjectorMarkers } from './injector_marker';\n\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nexport const INJECTOR = new InjectionToken<Injector>(\n  ngDevMode ? 'INJECTOR' : '',\n  // Disable tslint because this is const enum which gets inlined not top level prop access.\n  // tslint:disable-next-line: no-toplevel-property-access\n  InjectorMarkers.Injector as any, // Special value used by Ivy to identify `Injector`.\n);\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { Type } from '../interface/type';\n\nimport { InjectionToken } from './injection_token';\n\nexport const INJECTOR_DEF_TYPES = new InjectionToken<ReadonlyArray<Type<unknown>>>(ngDevMode ? 'INJECTOR_DEF_TYPES' : '');\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { RuntimeErrorCode } from '../errors';\nimport { createRuntimeError } from '../render3/errors_di';\nimport { stringify } from '../util/stringify';\n\nimport type { Injector } from './injector';\nimport { THROW_IF_NOT_FOUND } from './injector_compatibility';\n\nexport class NullInjector implements Injector {\n  get(token: any, notFoundValue: any = THROW_IF_NOT_FOUND): any {\n    if (notFoundValue === THROW_IF_NOT_FOUND) {\n      const message = ngDevMode ? `No provider found for \\`${stringify(token)}\\`.` : '';\n      const error = createRuntimeError(message, RuntimeErrorCode.PROVIDER_NOT_FOUND);\n\n      // Note: This is the name used by the primitives to identify a not found error.\n      error.name = 'ɵNotFound';\n\n      throw error;\n    }\n    return notFoundValue;\n  }\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { Type } from '../interface/type';\n\nimport { getClosureSafeProperty } from '../util/property';\n\nimport { ENVIRONMENT_INITIALIZER } from './initializer_token';\nimport { InjectorType } from './interface/defs';\nimport {\n  ClassProvider,\n  ConstructorProvider,\n  EnvironmentProviders,\n  ExistingProvider,\n  FactoryProvider,\n  ModuleWithProviders,\n  Provider,\n  StaticClassProvider,\n  TypeProvider,\n  ValueProvider,\n} from './interface/provider';\n\n/**\n * Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally\n * referenced in `@Component` in a component injector.\n *\n * @publicApi\n */\nexport function makeEnvironmentProviders(providers: (Provider | EnvironmentProviders)[]): EnvironmentProviders {\n  return {\n    ɵproviders: providers,\n  } as unknown as EnvironmentProviders;\n}\n\n/**\n * @description\n * This function is used to provide initialization functions that will be executed upon construction\n * of an environment injector.\n *\n * Note that the provided initializer is run in the injection context.\n *\n * Previously, this was achieved using the `ENVIRONMENT_INITIALIZER` token which is now deprecated.\n *\n * @see {@link ENVIRONMENT_INITIALIZER}\n *\n * @usageNotes\n * The following example illustrates how to configure an initialization function using\n * `provideEnvironmentInitializer()`\n * ```ts\n * createEnvironmentInjector(\n *   [\n *     provideEnvironmentInitializer(() => {\n *       console.log('environment initialized');\n *     }),\n *   ],\n *   parentInjector\n * );\n * ```\n *\n * @publicApi\n */\nexport function provideEnvironmentInitializer(initializerFn: () => void): EnvironmentProviders {\n  return makeEnvironmentProviders([\n    {\n      provide: ENVIRONMENT_INITIALIZER,\n      multi: true,\n      useValue: initializerFn,\n    },\n  ]);\n}\n\n/**\n * A source of providers for the `importProvidersFrom` function.\n *\n * @publicApi\n */\nexport type ImportProvidersSource = Type<unknown> | ModuleWithProviders<unknown> | Array<ImportProvidersSource>;\n\ntype WalkProviderTreeVisitor = (provider: SingleProvider, container: Type<unknown> | InjectorType<unknown>) => void;\n\n/**\n * Internal type for a single provider in a deep provider array.\n */\nexport type SingleProvider = TypeProvider | ValueProvider | ClassProvider | ConstructorProvider | ExistingProvider | FactoryProvider | StaticClassProvider;\n\nexport const USE_VALUE: string = getClosureSafeProperty<ValueProvider>({\n  provide: String,\n  useValue: getClosureSafeProperty,\n});\n\nexport function isValueProvider(value: SingleProvider): value is ValueProvider {\n  return value !== null && typeof value === 'object' && USE_VALUE in value;\n}\n\nexport function isExistingProvider(value: SingleProvider): value is ExistingProvider {\n  return !!(value && (value as ExistingProvider).useExisting);\n}\n\nexport function isFactoryProvider(value: SingleProvider): value is FactoryProvider {\n  return !!(value && (value as FactoryProvider).useFactory);\n}\n\nexport function isTypeProvider(value: SingleProvider): value is TypeProvider {\n  return typeof value === 'function';\n}\n\nexport function isClassProvider(value: SingleProvider): value is ClassProvider {\n  return !!(value as StaticClassProvider | ClassProvider).useClass;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { InjectionToken } from './injection_token';\n\nexport type InjectorScope = 'root' | 'platform' | 'environment';\n\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nexport const INJECTOR_SCOPE = new InjectionToken<InjectorScope | null>(ngDevMode ? 'Set Injector scope.' : '');\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { RuntimeError, RuntimeErrorCode } from '../errors';\nimport { OnDestroy } from '../interface/lifecycle_hooks';\nimport { Type } from '../interface/type';\nimport {\n  emitInjectorToCreateInstanceEvent,\n  emitInstanceCreatedByInjectorEvent,\n  emitProviderConfiguredEvent,\n  InjectorProfilerContext,\n  runInInjectorProfilerContext,\n  setInjectorProfilerContext,\n} from '../render3/debug/injector_profiler';\nimport { FactoryFn, getFactoryDef } from '../render3/definition_factory';\nimport { augmentRuntimeError, cyclicDependencyError, getRuntimeErrorCode, prependTokenToDependencyPath, throwInvalidProviderError, throwMixedMultiProviderError } from '../render3/errors_di';\nimport { NG_ENV_ID } from '../render3/fields';\nimport { newArray } from '../util/array_utils';\nimport { EMPTY_ARRAY } from '../util/empty';\nimport { stringify } from '../util/stringify';\n\nimport { resolveForwardRef } from './forward_ref';\nimport { ENVIRONMENT_INITIALIZER } from './initializer_token';\nimport { setInjectImplementation } from './inject_switch';\nimport { InjectionToken } from './injection_token';\nimport type { Injector } from './injector';\nimport { BackwardsCompatibleInjector, convertToBitFlags, injectArgs, setCurrentInjector, THROW_IF_NOT_FOUND, ɵɵinject } from './injector_compatibility';\nimport { INJECTOR } from './injector_token';\nimport { getInheritedInjectableDef, getInjectableDef, InjectorType, ɵɵInjectableDeclaration } from './interface/defs';\nimport { InternalInjectFlags, InjectOptions } from './interface/injector';\nimport { ClassProvider, ConstructorProvider, EnvironmentProviders, InternalEnvironmentProviders, isEnvironmentProviders, Provider, StaticClassProvider, TypeProvider } from './interface/provider';\nimport { INJECTOR_DEF_TYPES } from './internal_tokens';\nimport { NullInjector } from './null_injector';\nimport { isExistingProvider, isFactoryProvider, isTypeProvider, isValueProvider, SingleProvider } from './provider_collection';\nimport { ProviderToken } from './provider_token';\nimport { INJECTOR_SCOPE, InjectorScope } from './scope';\nimport { Injector as PrimitivesInjector, InjectionToken as PrimitivesInjectionToken, NotFound, isNotFound } from '@angular/core/primitives/di';\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR: Injector | undefined = undefined;\n\nexport function getNullInjector(): Injector {\n  if (NULL_INJECTOR === undefined) {\n    NULL_INJECTOR = new NullInjector();\n  }\n  return NULL_INJECTOR;\n}\n\n/**\n * An entry in the injector which tracks information about the given token, including a possible\n * current value.\n */\ninterface Record<T> {\n  factory: ((_: undefined, flags?: InternalInjectFlags) => T) | undefined;\n  value: T | {};\n  multi: any[] | undefined;\n}\n\n/**\n * An `Injector` that's part of the environment injector hierarchy, which exists outside of the\n * component tree.\n *\n * @see [Types of injector hierarchies](guide/di/hierarchical-dependency-injection#types-of-injector-hierarchies)\n *\n * @publicApi\n */\nexport abstract class EnvironmentInjector implements Injector {\n  /**\n   * Retrieves an instance from the injector based on the provided token.\n   * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n   * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n   */\n  abstract get<T>(\n    token: ProviderToken<T>,\n    notFoundValue: undefined,\n    options: InjectOptions & {\n      optional?: false;\n    },\n  ): T;\n  /**\n   * Retrieves an instance from the injector based on the provided token.\n   * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n   * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n   */\n  abstract get<T>(token: ProviderToken<T>, notFoundValue: null | undefined, options: InjectOptions): T | null;\n  /**\n   * Retrieves an instance from the injector based on the provided token.\n   * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n   * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n   */\n  abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;\n  /**\n   * @deprecated from v4.0.0 use ProviderToken<T>\n   * @suppress {duplicate}\n   */\n  abstract get<T>(token: string | ProviderToken<T>, notFoundValue?: any): any;\n\n  /**\n   * Runs the given function in the context of this `EnvironmentInjector`.\n   *\n   * Within the function's stack frame, [`inject`](api/core/inject) can be used to inject\n   * dependencies from this injector. Note that `inject` is only usable synchronously, and cannot be\n   * used in any asynchronous callbacks or after any `await` points.\n   *\n   * @param fn the closure to be run in the context of this injector\n   * @returns the return value of the function, if any\n   * @deprecated use the standalone function `runInInjectionContext` instead\n   */\n  abstract runInContext<ReturnT>(fn: () => ReturnT): ReturnT;\n\n  abstract destroy(): void;\n\n  /**\n   * Indicates whether the instance has already been destroyed.\n   */\n  abstract get destroyed(): boolean;\n\n  /**\n   * @internal\n   */\n  abstract onDestroy(callback: () => void): () => void;\n}\n\nexport class R3Injector extends EnvironmentInjector implements PrimitivesInjector {\n  /**\n   * Map of tokens to records which contain the instances of those tokens.\n   * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n   * to prevent further searches.\n   */\n  private records = new Map<ProviderToken<any>, Record<any> | null>();\n\n  /**\n   * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n   */\n  private _ngOnDestroyHooks = new Set<OnDestroy>();\n\n  private _onDestroyHooks: Array<() => void> = [];\n\n  /**\n   * Flag indicating that this injector was previously destroyed.\n   */\n  override get destroyed(): boolean {\n    return this._destroyed;\n  }\n  private _destroyed = false;\n\n  private injectorDefTypes: Set<Type<unknown>>;\n\n  constructor(\n    providers: Array<Provider | EnvironmentProviders>,\n    readonly parent: Injector,\n    readonly source: string | null,\n    readonly scopes: Set<InjectorScope>,\n  ) {\n    super();\n    // Start off by creating Records for every provider.\n    forEachSingleProvider(providers as Array<Provider | InternalEnvironmentProviders>, (provider) => this.processProvider(provider));\n\n    // Make sure the INJECTOR token provides this injector.\n    this.records.set(INJECTOR, makeRecord(undefined, this));\n\n    // And `EnvironmentInjector` if the current injector is supposed to be env-scoped.\n    if (scopes.has('environment')) {\n      this.records.set(EnvironmentInjector, makeRecord(undefined, this));\n    }\n\n    // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n    // any injectable scoped to APP_ROOT_SCOPE.\n    const record = this.records.get(INJECTOR_SCOPE) as Record<InjectorScope | null>;\n    if (record != null && typeof record.value === 'string') {\n      this.scopes.add(record.value as InjectorScope);\n    }\n\n    this.injectorDefTypes = new Set(this.get(INJECTOR_DEF_TYPES, EMPTY_ARRAY, { self: true }));\n  }\n\n  retrieve<T>(token: PrimitivesInjectionToken<T>, options?: unknown): T | NotFound {\n    const flags: InternalInjectFlags = convertToBitFlags(options as InjectOptions | undefined) || InternalInjectFlags.Default;\n    try {\n      return (this as BackwardsCompatibleInjector).get(\n        token as unknown as InjectionToken<T>,\n        // When a dependency is requested with an optional flag, DI returns null as the default value.\n        THROW_IF_NOT_FOUND as T,\n        flags,\n      );\n    } catch (e: any) {\n      if (isNotFound(e)) {\n        return e;\n      }\n      throw e;\n    }\n  }\n\n  /**\n   * Destroy the injector and release references to every instance or provider associated with it.\n   *\n   * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n   * hook was found.\n   */\n  override destroy(): void {\n    assertNotDestroyed(this);\n\n    // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n    this._destroyed = true;\n\n    try {\n      // Call all the lifecycle hooks.\n      for (const service of this._ngOnDestroyHooks) {\n        service.ngOnDestroy();\n      }\n      const onDestroyHooks = this._onDestroyHooks;\n      // Reset the _onDestroyHooks array before iterating over it to prevent hooks that unregister\n      // themselves from mutating the array during iteration.\n      this._onDestroyHooks = [];\n      for (const hook of onDestroyHooks) {\n        hook();\n      }\n    } finally {\n      // Release all references.\n      this.records.clear();\n      this._ngOnDestroyHooks.clear();\n      this.injectorDefTypes.clear();\n    }\n  }\n\n  override onDestroy(callback: () => void): () => void {\n    assertNotDestroyed(this);\n    this._onDestroyHooks.push(callback);\n    return () => this.removeOnDestroy(callback);\n  }\n\n  override runInContext<ReturnT>(fn: () => ReturnT): ReturnT {\n    assertNotDestroyed(this);\n\n    const previousInjector = setCurrentInjector(this);\n    const previousInjectImplementation = setInjectImplementation(undefined);\n\n    let prevInjectContext: InjectorProfilerContext | undefined;\n    if (ngDevMode) {\n      prevInjectContext = setInjectorProfilerContext({ injector: this, token: null });\n    }\n\n    try {\n      return fn();\n    } finally {\n      setCurrentInjector(previousInjector);\n      setInjectImplementation(previousInjectImplementation);\n      ngDevMode && setInjectorProfilerContext(prevInjectContext!);\n    }\n  }\n\n  override get<T>(token: ProviderToken<T>, notFoundValue: any = THROW_IF_NOT_FOUND, options?: InjectOptions): T {\n    assertNotDestroyed(this);\n\n    if (token.hasOwnProperty(NG_ENV_ID)) {\n      return (token as any)[NG_ENV_ID](this);\n    }\n\n    const flags = convertToBitFlags(options) as InternalInjectFlags;\n\n    // Set the injection context.\n    let prevInjectContext: InjectorProfilerContext;\n    if (ngDevMode) {\n      prevInjectContext = setInjectorProfilerContext({ injector: this, token: token as Type<T> });\n    }\n    const previousInjector = setCurrentInjector(this);\n    const previousInjectImplementation = setInjectImplementation(undefined);\n    try {\n      // Check for the SkipSelf flag.\n      if (!(flags & InternalInjectFlags.SkipSelf)) {\n        // SkipSelf isn't set, check if the record belongs to this injector.\n        let record: Record<T> | undefined | null = this.records.get(token);\n        if (record === undefined) {\n          // No record, but maybe the token is scoped to this injector. Look for an injectable\n          // def with a scope matching this injector.\n          const def = couldBeInjectableType(token) && getInjectableDef(token);\n          if (def && this.injectableDefInScope(def)) {\n            // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n            // all along.\n\n            if (ngDevMode) {\n              runInInjectorProfilerContext(this, token as Type<T>, () => {\n                emitProviderConfiguredEvent(token as TypeProvider);\n              });\n            }\n\n            record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n          } else {\n            record = null;\n          }\n          this.records.set(token, record);\n        }\n        // If a record was found, get the instance for it and return it.\n        if (record != null /* NOT null || undefined */) {\n          return this.hydrate(token, record, flags);\n        }\n      }\n\n      // Select the next injector based on the Self flag - if self is set, the next injector is\n      // the NullInjector, otherwise it's the parent.\n      const nextInjector = !(flags & InternalInjectFlags.Self) ? this.parent : getNullInjector();\n      // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n      // is undefined, the value is null, otherwise it's the notFoundValue.\n      notFoundValue = flags & InternalInjectFlags.Optional && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue;\n      return nextInjector.get(token, notFoundValue);\n    } catch (error: any) {\n      // If there was a cyclic dependency error or a token was not found,\n      // an error is thrown at the level where the problem was detected.\n      // The error propagates up the call stack and the code below appends\n      // the current token into the path. As a result, the full path is assembled\n      // at the very top of the call stack, so the final error message can be\n      // formatted to include that path.\n      const errorCode = getRuntimeErrorCode(error);\n      if (errorCode === RuntimeErrorCode.CYCLIC_DI_DEPENDENCY || errorCode === RuntimeErrorCode.PROVIDER_NOT_FOUND) {\n        // Note: we use `if (ngDevMode) { ... }` instead of an early return.\n        // ESBuild is conservative about removing dead code that follows `return;`\n        // inside a function body, so the block may remain in the bundle.\n        // Using a conditional ensures the dev-only logic is reliably tree-shaken\n        // in production builds.\n        if (ngDevMode) {\n          prependTokenToDependencyPath(error, token);\n\n          if (previousInjector) {\n            // We still have a parent injector, keep throwing\n            throw error;\n          } else {\n            // Format & throw the final error message when we don't have any previous injector\n            throw augmentRuntimeError(error, this.source);\n          }\n        } else {\n          throw new RuntimeError(errorCode, null);\n        }\n      } else {\n        throw error;\n      }\n    } finally {\n      // Lastly, restore the previous injection context.\n      setInjectImplementation(previousInjectImplementation);\n      setCurrentInjector(previousInjector);\n      ngDevMode && setInjectorProfilerContext(prevInjectContext!);\n    }\n  }\n\n  /** @internal */\n  resolveInjectorInitializers() {\n    const previousInjector = setCurrentInjector(this);\n    const previousInjectImplementation = setInjectImplementation(undefined);\n    let prevInjectContext: InjectorProfilerContext | undefined;\n    if (ngDevMode) {\n      prevInjectContext = setInjectorProfilerContext({ injector: this, token: null });\n    }\n\n    try {\n      const initializers = this.get(ENVIRONMENT_INITIALIZER, EMPTY_ARRAY, { self: true });\n      if (ngDevMode && !Array.isArray(initializers)) {\n        throw new RuntimeError(\n          RuntimeErrorCode.INVALID_MULTI_PROVIDER,\n          'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' +\n            `(expected an array, but got ${typeof initializers}). ` +\n            'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' +\n            '`multi: true` provider.',\n        );\n      }\n      for (const initializer of initializers) {\n        initializer();\n      }\n    } finally {\n      setCurrentInjector(previousInjector);\n      setInjectImplementation(previousInjectImplementation);\n      ngDevMode && setInjectorProfilerContext(prevInjectContext!);\n    }\n  }\n\n  override toString() {\n    const tokens: string[] = [];\n    const records = this.records;\n    for (const token of records.keys()) {\n      tokens.push(stringify(token));\n    }\n    return `R3Injector[${tokens.join(', ')}]`;\n  }\n\n  /**\n   * Process a `SingleProvider` and add it.\n   */\n  private processProvider(provider: SingleProvider): void {\n    // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n    // property.\n    provider = resolveForwardRef(provider);\n    let token: any = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n\n    // Construct a `Record` for the provider.\n    const record = providerToRecord(provider);\n    if (ngDevMode) {\n      runInInjectorProfilerContext(this, token, () => {\n        // Emit InjectorProfilerEventType.Create if provider is a value provider because\n        // these are the only providers that do not go through the value hydration logic\n        // where this event would normally be emitted from.\n        if (isValueProvider(provider)) {\n          emitInjectorToCreateInstanceEvent(token);\n          emitInstanceCreatedByInjectorEvent(provider.useValue);\n        }\n\n        emitProviderConfiguredEvent(provider);\n      });\n    }\n\n    if (!isTypeProvider(provider) && provider.multi === true) {\n      // If the provider indicates that it's a multi-provider, process it specially.\n      // First check whether it's been defined already.\n      let multiRecord = this.records.get(token);\n      if (multiRecord) {\n        // It has. Throw a nice error if\n        if (ngDevMode && multiRecord.multi === undefined) {\n          throwMixedMultiProviderError();\n        }\n      } else {\n        multiRecord = makeRecord(undefined, NOT_YET, true);\n        multiRecord.factory = () => injectArgs(multiRecord!.multi!);\n        this.records.set(token, multiRecord);\n      }\n      token = provider;\n      multiRecord.multi!.push(provider);\n    } else {\n      if (ngDevMode) {\n        const existing = this.records.get(token);\n        if (existing && existing.multi !== undefined) {\n          throwMixedMultiProviderError();\n        }\n      }\n    }\n    this.records.set(token, record);\n  }\n\n  private hydrate<T>(token: ProviderToken<T>, record: Record<T>, flags: InternalInjectFlags): T {\n    try {\n      if (record.value === CIRCULAR) {\n        throw cyclicDependencyError(stringify(token));\n      } else if (record.value === NOT_YET) {\n        record.value = CIRCULAR;\n\n        if (ngDevMode) {\n          runInInjectorProfilerContext(this, token as Type<T>, () => {\n            emitInjectorToCreateInstanceEvent(token);\n            record.value = record.factory!(undefined, flags);\n            emitInstanceCreatedByInjectorEvent(record.value);\n          });\n        } else {\n          record.value = record.factory!(undefined, flags);\n        }\n      }\n      if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n        this._ngOnDestroyHooks.add(record.value);\n      }\n      return record.value as T;\n    } finally {\n    }\n  }\n\n  private injectableDefInScope(def: ɵɵInjectableDeclaration<any>): boolean {\n    if (!def.providedIn) {\n      return false;\n    }\n    const providedIn = resolveForwardRef(def.providedIn);\n    if (typeof providedIn === 'string') {\n      return providedIn === 'any' || this.scopes.has(providedIn);\n    } else {\n      return this.injectorDefTypes.has(providedIn);\n    }\n  }\n\n  private removeOnDestroy(callback: () => void): void {\n    const destroyCBIdx = this._onDestroyHooks.indexOf(callback);\n    if (destroyCBIdx !== -1) {\n      this._onDestroyHooks.splice(destroyCBIdx, 1);\n    }\n  }\n}\n\nfunction injectableDefOrInjectorDefFactory(token: ProviderToken<any>): FactoryFn<any> {\n  // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n  const injectableDef = getInjectableDef(token);\n  const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n\n  if (factory !== null) {\n    return factory;\n  }\n\n  // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n  // If it's missing that, it's an error.\n  if (token instanceof InjectionToken) {\n    throw new RuntimeError(RuntimeErrorCode.INVALID_INJECTION_TOKEN, ngDevMode && `Token ${stringify(token)} is missing a ɵprov definition.`);\n  }\n\n  // Undecorated types can sometimes be created if they have no constructor arguments.\n  if (token instanceof Function) {\n    return getUndecoratedInjectableFactory(token);\n  }\n\n  // There was no way to resolve a factory for this token.\n  throw new RuntimeError(RuntimeErrorCode.INVALID_INJECTION_TOKEN, ngDevMode && 'unreachable');\n}\n\nfunction getUndecoratedInjectableFactory(token: Function) {\n  // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n  const paramLength = token.length;\n  if (paramLength > 0) {\n    throw new RuntimeError(RuntimeErrorCode.INVALID_INJECTION_TOKEN, ngDevMode && `Can't resolve all parameters for ${stringify(token)}: (${newArray(paramLength, '?').join(', ')}).`);\n  }\n\n  // The constructor function appears to have no parameters.\n  // This might be because it inherits from a super-class. In which case, use an injectable\n  // def from an ancestor if there is one.\n  // Otherwise this really is a simple class with no dependencies, so return a factory that\n  // just instantiates the zero-arg constructor.\n  const inheritedInjectableDef = getInheritedInjectableDef(token);\n  if (inheritedInjectableDef !== null) {\n    return () => inheritedInjectableDef.factory(token as Type<any>);\n  } else {\n    return () => new (token as Type<any>)();\n  }\n}\n\nfunction providerToRecord(provider: SingleProvider): Record<any> {\n  if (isValueProvider(provider)) {\n    return makeRecord(undefined, provider.useValue);\n  } else {\n    const factory: ((type?: Type<unknown>, flags?: InternalInjectFlags) => any) | undefined = providerToFactory(provider);\n    return makeRecord(factory, NOT_YET);\n  }\n}\n\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nexport function providerToFactory(provider: SingleProvider, ngModuleType?: InjectorType<any>, providers?: any[]): (type?: Type<unknown>, flags?: number) => any {\n  let factory: ((type?: Type<unknown>, flags?: InternalInjectFlags) => any) | undefined = undefined;\n  if (ngDevMode && isEnvironmentProviders(provider)) {\n    throwInvalidProviderError(undefined, providers, provider);\n  }\n\n  if (isTypeProvider(provider)) {\n    const unwrappedProvider = resolveForwardRef(provider);\n    return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n  } else {\n    if (isValueProvider(provider)) {\n      factory = () => resolveForwardRef(provider.useValue);\n    } else if (isFactoryProvider(provider)) {\n      factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n    } else if (isExistingProvider(provider)) {\n      factory = (_, flags) => ɵɵinject(resolveForwardRef(provider.useExisting), flags !== undefined && flags & InternalInjectFlags.Optional ? InternalInjectFlags.Optional : undefined);\n    } else {\n      const classRef = resolveForwardRef(provider && ((provider as StaticClassProvider | ClassProvider).useClass || provider.provide));\n      if (ngDevMode && !classRef) {\n        throwInvalidProviderError(ngModuleType, providers, provider);\n      }\n      if (hasDeps(provider)) {\n        factory = () => new classRef(...injectArgs(provider.deps));\n      } else {\n        return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n      }\n    }\n  }\n  return factory;\n}\n\nexport function assertNotDestroyed(injector: R3Injector): void {\n  if (injector.destroyed) {\n    throw new RuntimeError(RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED, ngDevMode && 'Injector has already been destroyed.');\n  }\n}\n\nfunction makeRecord<T>(factory: (() => T) | undefined, value: T | {}, multi: boolean = false): Record<T> {\n  return {\n    factory: factory,\n    value: value,\n    multi: multi ? [] : undefined,\n  };\n}\n\nfunction hasDeps(value: ClassProvider | ConstructorProvider | StaticClassProvider): value is ClassProvider & { deps: any[] } {\n  return !!(value as any).deps;\n}\n\nfunction hasOnDestroy(value: any): value is OnDestroy {\n  return value !== null && typeof value === 'object' && typeof (value as OnDestroy).ngOnDestroy === 'function';\n}\n\nfunction couldBeInjectableType(value: any): value is ProviderToken<any> {\n  return typeof value === 'function' || (typeof value === 'object' && value.ngMetadataName === 'InjectionToken');\n}\n\nfunction forEachSingleProvider(providers: Array<Provider | EnvironmentProviders>, fn: (provider: SingleProvider) => void): void {\n  for (const provider of providers) {\n    if (Array.isArray(provider)) {\n      forEachSingleProvider(provider, fn);\n    } else if (provider && isEnvironmentProviders(provider)) {\n      forEachSingleProvider(provider.ɵproviders, fn);\n    } else {\n      fn(provider as SingleProvider);\n    }\n  }\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nexport function noSideEffects<T>(fn: () => T): T {\n  return { toString: fn }.toString() as unknown as T;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { Type } from '../interface/type';\n\nimport { noSideEffects } from './closure';\n\n/**\n * An interface implemented by all Angular type decorators, which allows them to be used as\n * decorators as well as Angular syntax.\n *\n * ```ts\n * @ng.Component({...})\n * class MyClass {...}\n * ```\n *\n * @publicApi\n */\nexport interface TypeDecorator {\n  /**\n   * Invoke as decorator.\n   */\n  <T extends Type<any>>(type: T): T;\n\n  // Make TypeDecorator assignable to built-in ParameterDecorator type.\n  // ParameterDecorator is declared in lib.d.ts as a `declare type`\n  // so we cannot declare this interface as a subtype.\n  // see https://github.com/angular/angular/issues/3379#issuecomment-126169417\n  (target: object, propertyKey?: string | symbol, parameterIndex?: number): void;\n  // Standard (non-experimental) Decorator signature that avoids direct usage of\n  // any TS 5.0+ specific types.\n  (target: unknown, context: unknown): void;\n}\nexport const PARAMETERS = '__parameters__';\n\nfunction makeMetadataCtor(props?: (...args: any[]) => any): any {\n  return function ctor(this: any, ...args: any[]) {\n    if (props) {\n      const values = props(...args);\n      for (const propName in values) {\n        this[propName] = values[propName];\n      }\n    }\n  };\n}\n\nexport function makeParamDecorator(name: string, props?: (...args: any[]) => any, parentClass?: any): any {\n  return noSideEffects(() => {\n    const metaCtor = makeMetadataCtor(props);\n    function ParamDecoratorFactory(this: unknown | typeof ParamDecoratorFactory, ...args: any[]): any {\n      metaCtor.apply(this, args);\n      return this;\n    }\n    if (parentClass) {\n    }\n\n    return ParamDecoratorFactory;\n  });\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { makeParamDecorator } from '../util/decorators';\n\nimport { attachInjectFlag } from './injector_compatibility';\nimport { DecoratorFlags, InternalInjectFlags } from './interface/injector';\n\n/**\n * Type of the Inject decorator / constructor function.\n *\n * @publicApi\n */\nexport interface InjectDecorator {\n  /**\n   * Warning: String tokens are not recommended.\n   *\n   * Use an InjectionToken or a class as a token instead.\n   */\n  (token: string): any;\n  new (token: string): Inject;\n\n  /**\n   * Parameter decorator on a dependency parameter of a class constructor\n   * that specifies a custom provider of the dependency.\n   *\n   * @usageNotes\n   * The following example shows a class constructor that specifies a\n   * custom provider of a dependency using the parameter decorator.\n   *\n   * When `@Inject()` is not present, the injector uses the type annotation of the\n   * parameter as the provider.\n   *\n   * {@example core/di/ts/metadata_spec.ts region='InjectWithoutDecorator'}\n   *\n   * @see [Dependency Injection Guide](guide/di/dependency-injection)\n   *\n   */\n  (token: any): any;\n  new (token: any): Inject;\n}\n\n/**\n * Type of the Inject metadata.\n *\n * @publicApi\n */\nexport interface Inject {\n  /**\n   * A DI token that maps to the dependency to be injected.\n   */\n  token: any;\n}\n\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Inject: InjectDecorator = attachInjectFlag(\n  // Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n  makeParamDecorator('Inject', (token: any) => ({ token })),\n  // tslint:disable-next-line: no-toplevel-property-access\n  DecoratorFlags.Inject,\n);\n\n/**\n * Type of the Optional decorator / constructor function.\n *\n * @publicApi\n */\nexport interface OptionalDecorator {\n  /**\n   * Parameter decorator to be used on constructor parameters,\n   * which marks the parameter as being an optional dependency.\n   * The DI framework provides `null` if the dependency is not found.\n   *\n   * Can be used together with other parameter decorators\n   * that modify how dependency injection operates.\n   *\n   * @usageNotes\n   *\n   * The following code allows the possibility of a `null` result:\n   *\n   * {@example core/di/ts/metadata_spec.ts region='Optional'}\n   *\n   * @see [Dependency Injection Guide](guide/di/dependency-injection)\n   */\n  (): any;\n  new (): Optional;\n}\n\n/**\n * Type of the Optional metadata.\n *\n * @publicApi\n */\nexport interface Optional {}\n\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Optional: OptionalDecorator =\n  // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n  // tslint:disable-next-line: no-toplevel-property-access\n  attachInjectFlag(makeParamDecorator('Optional'), InternalInjectFlags.Optional);\n\n/**\n * Type of the Self decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SelfDecorator {\n  /**\n   * Parameter decorator to be used on constructor parameters,\n   * which tells the DI framework to start dependency resolution from the local injector.\n   *\n   * Resolution works upward through the injector hierarchy, so the children\n   * of this class must configure their own providers or be prepared for a `null` result.\n   *\n   * @usageNotes\n   *\n   * In the following example, the dependency can be resolved\n   * by the local injector when instantiating the class itself, but not\n   * when instantiating a child.\n   *\n   * {@example core/di/ts/metadata_spec.ts region='Self'}\n   *\n   * @see {@link SkipSelf}\n   * @see {@link Optional}\n   *\n   */\n  (): any;\n  new (): Self;\n}\n\n/**\n * Type of the Self metadata.\n *\n * @publicApi\n */\nexport interface Self {}\n\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const Self: SelfDecorator =\n  // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n  // tslint:disable-next-line: no-toplevel-property-access\n  attachInjectFlag(makeParamDecorator('Self'), InternalInjectFlags.Self);\n\n/**\n * Type of the `SkipSelf` decorator / constructor function.\n *\n * @publicApi\n */\nexport interface SkipSelfDecorator {\n  /**\n   * Parameter decorator to be used on constructor parameters,\n   * which tells the DI framework to start dependency resolution from the parent injector.\n   * Resolution works upward through the injector hierarchy, so the local injector\n   * is not checked for a provider.\n   *\n   * @usageNotes\n   *\n   * In the following example, the dependency can be resolved when\n   * instantiating a child, but not when instantiating the class itself.\n   *\n   * {@example core/di/ts/metadata_spec.ts region='SkipSelf'}\n   *\n   * @see [Dependency Injection guide](guide/di/di-in-action#skip).\n   * @see {@link Self}\n   * @see {@link Optional}\n   *\n   */\n  (): any;\n  new (): SkipSelf;\n}\n\n/**\n * Type of the `SkipSelf` metadata.\n *\n * @publicApi\n */\nexport interface SkipSelf {}\n\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nexport const SkipSelf: SkipSelfDecorator =\n  // Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n  // tslint:disable-next-line: no-toplevel-property-access\n  attachInjectFlag(makeParamDecorator('SkipSelf'), InternalInjectFlags.SkipSelf);\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { EMPTY_ARRAY } from '../util/empty';\nimport { stringify } from '../util/stringify';\n\nimport type { Injector } from './injector';\nimport type { Provider, StaticProvider } from './interface/provider';\nimport { getNullInjector, R3Injector } from './r3_injector';\nimport { InjectorScope } from './scope';\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n */\nexport function createInjector(defType: /* InjectorType<any> */ any, parent: Injector | null = null, additionalProviders: Array<Provider | StaticProvider> | null = null, name?: string): Injector {\n  const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n  injector.resolveInjectorInitializers();\n  return injector;\n}\n\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nexport function createInjectorWithoutInjectorInstances(\n  defType: /* InjectorType<any> */ any,\n  parent: Injector | null = null,\n  additionalProviders: Array<Provider | StaticProvider> | null = null,\n  name?: string,\n  scopes = new Set<InjectorScope>(),\n): R3Injector {\n  const providers = [additionalProviders || EMPTY_ARRAY];\n  name = name || (typeof defType === 'object' ? undefined : stringify(defType));\n\n  return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { createInjector } from './create_injector';\nimport { THROW_IF_NOT_FOUND, ɵɵinject } from './injector_compatibility';\nimport { InjectorMarkers } from './injector_marker';\nimport { INJECTOR } from './injector_token';\nimport { ɵɵdefineInjectable } from './interface/defs';\nimport { InjectOptions } from './interface/injector';\nimport { Provider, StaticProvider } from './interface/provider';\nimport { NullInjector } from './null_injector';\nimport { ProviderToken } from './provider_token';\n\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/di/dependency-injection-providers) that associate\n * dependencies of various types with [injection tokens](guide/di/dependency-injection-providers).\n *\n * @see [DI Providers](guide/di/dependency-injection-providers).\n * @see {@link StaticProvider}\n *\n * @usageNotes\n *\n *  The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @see [Types of injector hierarchies](guide/di/hierarchical-dependency-injection#types-of-injector-hierarchies)\n *\n * @publicApi\n */\nexport abstract class Injector {\n  static THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n  static NULL: Injector = /* @__PURE__ */ new NullInjector();\n\n  /**\n   * Retrieves an instance from the injector based on the provided token.\n   * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n   * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n   */\n  abstract get<T>(\n    token: ProviderToken<T>,\n    notFoundValue: undefined,\n    options: InjectOptions & {\n      optional?: false;\n    },\n  ): T;\n  /**\n   * Retrieves an instance from the injector based on the provided token.\n   * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n   * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n   */\n  abstract get<T>(token: ProviderToken<T>, notFoundValue: null | undefined, options: InjectOptions): T | null;\n  /**\n   * Retrieves an instance from the injector based on the provided token.\n   * @returns The instance from the injector if defined, otherwise the `notFoundValue`.\n   * @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.\n   */\n  abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;\n  /**\n   * @deprecated from v4.0.0 use ProviderToken<T>\n   * @suppress {duplicate}\n   */\n  abstract get<T>(token: string | ProviderToken<T>, notFoundValue?: any): any;\n\n  /**\n   * @deprecated from v5 use the new signature Injector.create(options)\n   */\n  static create(providers: StaticProvider[], parent?: Injector): Injector;\n\n  /**\n   * Creates a new injector instance that provides one or more dependencies,\n   * according to a given type or types of `StaticProvider`.\n   *\n   * @param options An object with the following properties:\n   * * `providers`: An array of providers of the [StaticProvider type](api/core/StaticProvider).\n   * * `parent`: (optional) A parent injector.\n   * * `name`: (optional) A developer-defined identifying name for the new injector.\n   *\n   * @returns The new injector instance.\n   *\n   */\n  static create(options: { providers: Array<Provider | StaticProvider>; parent?: Injector; name?: string }): DestroyableInjector;\n\n  static create(options: StaticProvider[] | { providers: Array<Provider | StaticProvider>; parent?: Injector; name?: string }, parent?: Injector): Injector {\n    if (Array.isArray(options)) {\n      return createInjector({ name: '' }, parent, options, '');\n    } else {\n      const name = options.name ?? '';\n      return createInjector({ name }, options.parent, options.providers, name);\n    }\n  }\n\n  /** @nocollapse */\n  static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n    token: Injector,\n    providedIn: 'any',\n    factory: () => ɵɵinject(INJECTOR),\n  });\n\n  /**\n   * @internal\n   * @nocollapse\n   */\n  static __NG_ELEMENT_ID__ = InjectorMarkers.Injector;\n}\n\n/**\n * An Injector that the owner can destroy and trigger the DestroyRef.destroy hooks.\n *\n * @publicApi\n */\nexport interface DestroyableInjector extends Injector {\n  destroy(): void;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nexport function ɵɵinvalidFactory(): never {\n  const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';\n  throw new Error(msg);\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { SIGNAL } from '../../../primitives/signals';\n\n/**\n * A reactive value which notifies consumers of any changes.\n *\n * Signals are functions which returns their current value. To access the current value of a signal,\n * call it.\n *\n * Ordinary values can be turned into `Signal`s with the `signal` function.\n *\n * @publicApi 17.0\n */\nexport type Signal<T> = (() => T) & {\n  [SIGNAL]: unknown;\n};\n\n/**\n * Checks if the given `value` is a reactive `Signal`.\n *\n * @publicApi 17.0\n */\nexport function isSignal(value: unknown): value is Signal<unknown> {\n  return typeof value === 'function' && (value as Signal<unknown>)[SIGNAL] !== undefined;\n}\n\n/**\n * A comparison function which can determine if two values are equal.\n *\n * @publicApi 17.0\n */\nexport type ValueEqualityFn<T> = (a: T, b: T) => boolean;\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { createComputed, SIGNAL } from '../../../primitives/signals';\n\nimport { Signal, ValueEqualityFn } from './api';\n\n/**\n * Options passed to the `computed` creation function.\n */\nexport interface CreateComputedOptions<T> {\n  /**\n   * A comparison function which defines equality for computed values.\n   */\n  equal?: ValueEqualityFn<T>;\n\n  /**\n   * A debug name for the computed signal. Used in Angular DevTools to identify the signal.\n   */\n  debugName?: string;\n}\n\n/**\n * Create a computed `Signal` which derives a reactive value from an expression.\n * @see [Computed signals](guide/signals#computed-signals)\n */\nexport function computed<T>(computation: () => T, options?: CreateComputedOptions<T>): Signal<T> {\n  const getter = createComputed(computation, options?.equal);\n\n  if (ngDevMode) {\n    getter.toString = () => `[Computed: ${getter()}]`;\n    getter[SIGNAL].debugName = options?.debugName;\n  }\n\n  return getter;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { createSignal, SIGNAL, SignalGetter, SignalNode } from '../../../primitives/signals';\n\nimport { isSignal, Signal, ValueEqualityFn } from './api';\n\n/** Symbol used distinguish `WritableSignal` from other non-writable signals and functions. */\nexport const ɵWRITABLE_SIGNAL: unique symbol = /* @__PURE__ */ Symbol('WRITABLE_SIGNAL');\n\n/**\n * A `Signal` with a value that can be mutated via a setter interface.\n *\n * @publicApi 17.0\n */\nexport interface WritableSignal<T> extends Signal<T> {\n  [ɵWRITABLE_SIGNAL]: T;\n\n  /**\n   * Directly set the signal to a new value, and notify any dependents.\n   */\n  set(value: T): void;\n\n  /**\n   * Update the value of the signal based on its current value, and\n   * notify any dependents.\n   */\n  update(updateFn: (value: T) => T): void;\n\n  /**\n   * Returns a readonly version of this signal. Readonly signals can be accessed to read their value\n   * but can't be changed using set or update methods. The readonly signals do _not_ have\n   * any built-in mechanism that would prevent deep-mutation of their value.\n   */\n  asReadonly(): Signal<T>;\n}\n\n/**\n * Utility function used during template type checking to extract the value from a `WritableSignal`.\n * @codeGenApi\n */\nexport function ɵunwrapWritableSignal<T>(value: T | { [ɵWRITABLE_SIGNAL]: T }): T {\n  // Note: the function uses `WRITABLE_SIGNAL` as a brand instead of `WritableSignal<T>`,\n  // because the latter incorrectly unwraps non-signal getter functions.\n  return null!;\n}\n\n/**\n * Options passed to the `signal` creation function.\n */\nexport interface CreateSignalOptions<T> {\n  /**\n   * A comparison function which defines equality for signal values.\n   */\n  equal?: ValueEqualityFn<T>;\n\n  /**\n   * A debug name for the signal. Used in Angular DevTools to identify the signal.\n   */\n  debugName?: string;\n}\n\n/**\n * Create a `Signal` that can be set or updated directly.\n * @see [Angular Signals](guide/signals)\n */\nexport function signal<T>(initialValue: T, options?: CreateSignalOptions<T>): WritableSignal<T> {\n  const [get, set, update] = createSignal(initialValue, options?.equal);\n\n  const signalFn = get as SignalGetter<T> & WritableSignal<T>;\n  const node = signalFn[SIGNAL];\n\n  signalFn.set = set;\n  signalFn.update = update;\n  signalFn.asReadonly = signalAsReadonlyFn.bind(signalFn as any) as () => Signal<T>;\n\n  if (ngDevMode) {\n    signalFn.toString = () => `[Signal: ${signalFn()}]`;\n    node.debugName = options?.debugName;\n  }\n\n  return signalFn as WritableSignal<T>;\n}\n\nexport function signalAsReadonlyFn<T>(this: SignalGetter<T>): Signal<T> {\n  const node = this[SIGNAL] as SignalNode<T> & { readonlyFn?: Signal<T> };\n  if (node.readonlyFn === undefined) {\n    const readonlyFn = () => this();\n    (readonlyFn as any)[SIGNAL] = node;\n    node.readonlyFn = readonlyFn as Signal<T>;\n  }\n  return node.readonlyFn;\n}\n\n/**\n * Checks if the given `value` is a writeable signal.\n */\nexport function isWritableSignal(value: unknown): value is WritableSignal<unknown> {\n  return isSignal(value) && typeof (value as any).set === 'function';\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { ComputationFn, createLinkedSignal, LinkedSignalGetter, LinkedSignalNode, linkedSignalSetFn, linkedSignalUpdateFn, SIGNAL } from '../../../primitives/signals';\nimport { Signal, ValueEqualityFn } from './api';\nimport { signalAsReadonlyFn, WritableSignal } from './signal';\n\nconst identityFn = <T>(v: T) => v;\n\n/**\n * Creates a writable signal whose value is initialized and reset by the linked, reactive computation.\n *\n * @publicApi 20.0\n */\nexport function linkedSignal<D>(computation: () => D, options?: { equal?: ValueEqualityFn<NoInfer<D>>; debugName?: string }): WritableSignal<D>;\n\n/**\n * Creates a writable signal whose value is initialized and reset by the linked, reactive computation.\n * This is an advanced API form where the computation has access to the previous value of the signal and the computation result.\n *\n * Note: The computation is reactive, meaning the linked signal will automatically update whenever any of the signals used within the computation change.\n *\n * @publicApi 20.0\n * @see [Dependent state with linkedSignal](guide/signals/linked-signal)\n */\nexport function linkedSignal<S, D>(options: {\n  source: () => S;\n  computation: (source: NoInfer<S>, previous?: { source: NoInfer<S>; value: NoInfer<D> }) => D;\n  equal?: ValueEqualityFn<NoInfer<D>>;\n  debugName?: string;\n}): WritableSignal<D>;\n\nexport function linkedSignal<S, D>(\n  optionsOrComputation:\n    | {\n        source: () => S;\n        computation: ComputationFn<S, D>;\n        equal?: ValueEqualityFn<D>;\n        debugName?: string;\n      }\n    | (() => D),\n  options?: { equal?: ValueEqualityFn<D>; debugName?: string },\n): WritableSignal<D> {\n  if (typeof optionsOrComputation === 'function') {\n    const getter = createLinkedSignal<D, D>(optionsOrComputation, identityFn<D>, options?.equal) as LinkedSignalGetter<D, D> & WritableSignal<D>;\n    return upgradeLinkedSignalGetter(getter, options?.debugName);\n  } else {\n    const getter = createLinkedSignal<S, D>(optionsOrComputation.source, optionsOrComputation.computation, optionsOrComputation.equal);\n    return upgradeLinkedSignalGetter(getter, optionsOrComputation.debugName);\n  }\n}\n\nfunction upgradeLinkedSignalGetter<S, D>(getter: LinkedSignalGetter<S, D>, debugName?: string): WritableSignal<D> {\n  if (ngDevMode) {\n    getter.toString = () => `[LinkedSignal: ${getter()}]`;\n    getter[SIGNAL].debugName = debugName;\n  }\n\n  const node = getter[SIGNAL] as LinkedSignalNode<S, D>;\n  const upgradedGetter = getter as LinkedSignalGetter<S, D> & WritableSignal<D>;\n\n  upgradedGetter.set = (newValue: D) => linkedSignalSetFn(node, newValue);\n  upgradedGetter.update = (updateFn: (value: D) => D) => linkedSignalUpdateFn(node, updateFn);\n  upgradedGetter.asReadonly = signalAsReadonlyFn.bind(getter as any) as () => Signal<D>;\n\n  return upgradedGetter;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { untracked as untrackedPrimitive } from '../../../primitives/signals';\n\n/**\n * Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function\n * can, optionally, return a value.\n * @see [Reading without tracking dependencies](guide/signals#reading-without-tracking-dependencies)\n */\nexport function untracked<T>(nonReactiveReadsFn: () => T): T {\n  return untrackedPrimitive(nonReactiveReadsFn);\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { getActiveConsumer } from '../../../primitives/signals';\n\nimport { RuntimeError, RuntimeErrorCode } from '../../errors';\n\n/**\n * Asserts that the current stack frame is not within a reactive context. Useful\n * to disallow certain code from running inside a reactive context (see {@link /api/core/rxjs-interop/toSignal toSignal})\n *\n * @param debugFn a reference to the function making the assertion (used for the error message).\n *\n * @publicApi\n */\nexport function assertNotInReactiveContext(debugFn: Function, extraContext?: string): void {\n  // Taking a `Function` instead of a string name here prevents the un-minified name of the function\n  // from being retained in the bundle regardless of minification.\n  if (getActiveConsumer() !== null) {\n    throw new RuntimeError(\n      RuntimeErrorCode.ASSERTION_NOT_INSIDE_REACTIVE_CONTEXT,\n      ngDevMode && `${debugFn.name}() cannot be called from within a reactive context.${extraContext ? ` ${extraContext}` : ''}`,\n    );\n  }\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { RuntimeError, RuntimeErrorCode } from '../errors';\nimport { InjectorProfilerContext, setInjectorProfilerContext } from '../render3/debug/injector_profiler';\n\nimport { getInjectImplementation, setInjectImplementation } from './inject_switch';\nimport type { Injector } from './injector';\nimport { getCurrentInjector, setCurrentInjector, RetrievingInjector } from './injector_compatibility';\nimport { assertNotDestroyed, R3Injector } from './r3_injector';\nimport { Injector as PrimitivesInjector } from '@angular/core/primitives/di';\n\n/**\n * Runs the given function in the [context](guide/di/dependency-injection-context) of the given\n * `Injector`.\n *\n * Within the function's stack frame, [`inject`](api/core/inject) can be used to inject dependencies\n * from the given `Injector`. Note that `inject` is only usable synchronously, and cannot be used in\n * any asynchronous callbacks or after any `await` points.\n *\n * @see [Run within an injection context](guide/di/dependency-injection-context#run-within-an-injection-context)\n *\n * @param injector the injector which will satisfy calls to [`inject`](api/core/inject) while `fn`\n *     is executing\n * @param fn the closure to be run in the context of `injector`\n * @returns the return value of the function, if any\n * @publicApi\n */\nexport function runInInjectionContext<ReturnT>(injector: Injector, fn: () => ReturnT): ReturnT {\n  let internalInjector: PrimitivesInjector;\n  if (injector instanceof R3Injector) {\n    assertNotDestroyed(injector);\n    internalInjector = injector;\n  } else {\n    internalInjector = new RetrievingInjector(injector);\n  }\n\n  let prevInjectorProfilerContext: InjectorProfilerContext;\n  if (ngDevMode) {\n    prevInjectorProfilerContext = setInjectorProfilerContext({ injector, token: null });\n  }\n  const prevInjector = setCurrentInjector(internalInjector);\n  const previousInjectImplementation = setInjectImplementation(undefined);\n  try {\n    return fn();\n  } finally {\n    setCurrentInjector(prevInjector);\n    ngDevMode && setInjectorProfilerContext(prevInjectorProfilerContext!);\n    setInjectImplementation(previousInjectImplementation);\n  }\n}\n\n/**\n * Whether the current stack frame is inside an injection context.\n */\nexport function isInInjectionContext(): boolean {\n  return getInjectImplementation() !== undefined || getCurrentInjector() != null;\n}\n/**\n * Asserts that the current stack frame is within an [injection\n * context](guide/di/dependency-injection-context) and has access to `inject`.\n *\n * @param debugFn a reference to the function making the assertion (used for the error message).\n *\n * @see [Asserts the context](guide/di/dependency-injection-context#asserts-the-context)\n *\n * @publicApi\n */\nexport function assertInInjectionContext(debugFn: Function): void {\n  // Taking a `Function` instead of a string name here prevents the unminified name of the function\n  // from being retained in the bundle regardless of minification.\n  if (!isInInjectionContext()) {\n    throw new RuntimeError(\n      RuntimeErrorCode.MISSING_INJECTION_CONTEXT,\n      ngDevMode && debugFn.name + '() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`',\n    );\n  }\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { EnvironmentInjector } from '../di';\n\n/**\n * `DestroyRef` lets you set callbacks to run for any cleanup or destruction behavior.\n * The scope of this destruction depends on where `DestroyRef` is injected. If `DestroyRef`\n * is injected in a component or directive, the callbacks run when that component or\n * directive is destroyed. Otherwise the callbacks run when a corresponding injector is destroyed.\n *\n * @see [Lifecycle DestroyRef](guide/components/lifecycle#destroyref)\n *\n * @publicApi\n */\nexport abstract class DestroyRef {\n  // Here the `DestroyRef` acts primarily as a DI token. There are (currently) types of objects that\n  // can be returned from the injector when asking for this token:\n  // - `NodeInjectorDestroyRef` when retrieved from a node injector;\n  // - `EnvironmentInjector` when retrieved from an environment injector\n\n  /**\n   * Registers a destroy callback in a given lifecycle scope.  Returns a cleanup function that can\n   * be invoked to unregister the callback.\n   *\n   * @usageNotes\n   * ### Example\n   * ```ts\n   * const destroyRef = inject(DestroyRef);\n   *\n   * // register a destroy callback\n   * const unregisterFn = destroyRef.onDestroy(() => doSomethingOnDestroy());\n   *\n   * // stop the destroy callback from executing if needed\n   * unregisterFn();\n   * ```\n   *\n   * @see [Lifecycle DestroyRef](guide/components/lifecycle#destroyref)\n   *\n   */\n  abstract onDestroy(callback: () => void): () => void;\n\n  /**\n   * Indicates whether the instance has already been destroyed.\n   *\n   * @see [Detecting instance destruction](guide/components/lifecycle#detecting-instance-destruction)\n   *\n   */\n  abstract get destroyed(): boolean;\n\n  /**\n   * @internal\n   * @nocollapse\n   */\n\n  /**\n   * @internal\n   * @nocollapse\n   */\n  static __NG_ENV_ID__: (injector: EnvironmentInjector) => DestroyRef = (injector) => injector;\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport function noop(...args: any[]): any {\n  // Do nothing.\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { InjectionToken } from '../../di/injection_token';\n\nexport const enum NotificationSource {\n  // Change detection needs to run in order to synchronize application state\n  // with the DOM when the following notifications are received:\n  // This operation indicates that a subtree needs to be traversed during change detection.\n  MarkAncestorsForTraversal,\n  // A component/directive gets a new input.\n  SetInput,\n  // Defer block state updates need change detection to fully render the state.\n  DeferBlockStateUpdate,\n  // Debugging tools updated state and have requested change detection.\n  DebugApplyChanges,\n  // ChangeDetectorRef.markForCheck indicates the component is dirty/needs to refresh.\n  MarkForCheck,\n\n  // Bound listener callbacks execute and can update state without causing other notifications from\n  // above.\n  Listener,\n\n  // Custom elements do sometimes require checking directly.\n  CustomElement,\n\n  // The following notifications do not require views to be refreshed\n  // but we should execute render hooks:\n  // Render hooks are guaranteed to execute with the schedulers timing.\n  RenderHook,\n  // Views might be created outside and manipulated in ways that\n  // we cannot be aware of. When a view is attached, Angular now \"knows\"\n  // about it and we now know that DOM might have changed (and we should\n  // run render hooks). If the attached view is dirty, the `MarkAncestorsForTraversal`\n  // notification should also be received.\n  ViewAttached,\n  // When DOM removal happens, render hooks may be interested in the new\n  // DOM state but we do not need to refresh any views unless. If change\n  // detection is required after DOM removal, another notification should\n  // be received (i.e. `markForCheck`).\n  ViewDetachedFromDOM,\n  // Applying animations might result in new DOM state and should rerun render hooks\n  AsyncAnimationsLoaded,\n  // The scheduler is notified when a pending task is removed via the public API.\n  // This allows us to make stability async, delayed until the next application tick.\n  PendingTaskRemoved,\n  // An `effect()` outside of the view tree became dirty and might need to run.\n  RootEffect,\n  // An `effect()` within the view tree became dirty.\n  ViewEffect,\n}\n\n/**\n * Injectable that is notified when an `LView` is made aware of changes to application state.\n */\nexport abstract class ChangeDetectionScheduler {\n  abstract notify(source: NotificationSource): void;\n  abstract runningTick: boolean;\n}\n\n/** Token used to indicate if zoneless was enabled via provideZonelessChangeDetection(). */\nexport const ZONELESS_ENABLED = new InjectionToken<boolean>(typeof ngDevMode === 'undefined' || ngDevMode ? 'Zoneless enabled' : '', { providedIn: 'root', factory: () => false });\n\n/** Token used to indicate `provideZonelessChangeDetection` was used. */\nexport const PROVIDED_ZONELESS = new InjectionToken<boolean>(typeof ngDevMode === 'undefined' || ngDevMode ? 'Zoneless provided' : '', { providedIn: 'root', factory: () => false });\n\nexport const ZONELESS_SCHEDULER_DISABLED = new InjectionToken<boolean>(typeof ngDevMode === 'undefined' || ngDevMode ? 'scheduler disabled' : '');\n\n// TODO(atscott): Remove in v19. Scheduler should be done with runOutsideAngular.\nexport const SCHEDULE_IN_ROOT_ZONE = new InjectionToken<boolean>(typeof ngDevMode === 'undefined' || ngDevMode ? 'run changes outside zone in root' : '');\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { ɵɵdefineInjectable } from '../../di/interface/defs';\n\n/**\n * Abstraction that encompasses any kind of effect that can be scheduled.\n */\nexport interface SchedulableEffect {\n  run(): void;\n  zone: {\n    run<T>(fn: () => T): T;\n  } | null;\n  dirty: boolean;\n}\n\n/**\n * A scheduler which manages the execution of effects.\n */\nexport abstract class EffectScheduler {\n  abstract add(e: SchedulableEffect): void;\n\n  /**\n   * Schedule the given effect to be executed at a later time.\n   *\n   * It is an error to attempt to execute any effects synchronously during a scheduling operation.\n   */\n  abstract schedule(e: SchedulableEffect): void;\n\n  /**\n   * Run any scheduled effects.\n   */\n  abstract flush(): void;\n\n  /** Remove a scheduled effect */\n  abstract remove(e: SchedulableEffect): void;\n\n  /** @nocollapse */\n  static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n    token: EffectScheduler,\n    providedIn: 'root',\n    factory: () => new ZoneAwareEffectScheduler(),\n  });\n}\n\n/**\n * A wrapper around `ZoneAwareQueueingScheduler` that schedules flushing via the microtask queue\n * when.\n */\nexport class ZoneAwareEffectScheduler implements EffectScheduler {\n  private dirtyEffectCount = 0;\n  private queues = new Map<Zone | null, Set<SchedulableEffect>>();\n\n  add(handle: SchedulableEffect): void {\n    this.enqueue(handle);\n    this.schedule(handle);\n  }\n\n  schedule(handle: SchedulableEffect): void {\n    if (!handle.dirty) {\n      return;\n    }\n    this.dirtyEffectCount++;\n  }\n\n  remove(handle: SchedulableEffect): void {\n    const zone = handle.zone as Zone | null;\n    const queue = this.queues.get(zone)!;\n    if (!queue.has(handle)) {\n      return;\n    }\n\n    queue.delete(handle);\n    if (handle.dirty) {\n      this.dirtyEffectCount--;\n    }\n  }\n\n  private enqueue(handle: SchedulableEffect): void {\n    const zone = handle.zone as Zone | null;\n    if (!this.queues.has(zone)) {\n      this.queues.set(zone, new Set());\n    }\n\n    const queue = this.queues.get(zone)!;\n    if (queue.has(handle)) {\n      return;\n    }\n    queue.add(handle);\n  }\n\n  /**\n   * Run all scheduled effects.\n   *\n   * Execution order of effects within the same zone is guaranteed to be FIFO, but there is no\n   * ordering guarantee between effects scheduled in different zones.\n   */\n  flush(): void {\n    while (this.dirtyEffectCount > 0) {\n      let ranOneEffect = false;\n      for (const [zone, queue] of this.queues) {\n        // `zone` here must be defined.\n        if (zone === null) {\n          ranOneEffect ||= this.flushQueue(queue);\n        } else {\n          ranOneEffect ||= zone.run(() => this.flushQueue(queue));\n        }\n      }\n\n      // Safeguard against infinite looping if somehow our dirty effect count gets out of sync with\n      // the dirty flag across all the effects.\n      if (!ranOneEffect) {\n        this.dirtyEffectCount = 0;\n      }\n    }\n  }\n\n  private flushQueue(queue: Set<SchedulableEffect>): boolean {\n    let ranOneEffect = false;\n    for (const handle of queue) {\n      if (!handle.dirty) {\n        continue;\n      }\n      this.dirtyEffectCount--;\n      ranOneEffect = true;\n\n      // TODO: what happens if this throws an error?\n      handle.run();\n    }\n    return ranOneEffect;\n  }\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { SIGNAL, consumerDestroy, isInNotificationPhase, setActiveConsumer, BaseEffectNode, BASE_EFFECT_NODE, runEffect } from '../../../primitives/signals';\nimport { inject } from '../../di/injector_compatibility';\nimport { Injector } from '../../di/injector';\nimport { assertNotInReactiveContext } from './asserts';\nimport { assertInInjectionContext } from '../../di/contextual';\nimport { DestroyRef } from '../../linker/destroy_ref';\nimport { noop } from '../../util/noop';\nimport { ChangeDetectionScheduler, NotificationSource } from '../../change_detection/scheduling/zoneless_scheduling';\nimport { EffectScheduler, SchedulableEffect } from './root_effect_scheduler';\n\nimport { emitEffectCreatedEvent, setInjectorProfilerContext } from '../debug/injector_profiler';\n\n/**\n * A global reactive effect, which can be manually destroyed.\n *\n * @publicApi 20.0\n */\nexport interface EffectRef {\n  /**\n   * Shut down the effect, removing it from any upcoming scheduled executions.\n   */\n  destroy(): void;\n}\n\nexport class EffectRefImpl implements EffectRef {\n  [SIGNAL]: EffectNode;\n\n  constructor(node: EffectNode) {\n    this[SIGNAL] = node;\n  }\n\n  destroy(): void {\n    this[SIGNAL].destroy();\n  }\n}\n\n/**\n * Options passed to the `effect` function.\n *\n * @publicApi 20.0\n */\nexport interface CreateEffectOptions {\n  /**\n   * The `Injector` in which to create the effect.\n   *\n   * If this is not provided, the current [injection context](guide/di/dependency-injection-context)\n   * will be used instead (via `inject`).\n   */\n  injector?: Injector;\n\n  /**\n   * Whether the `effect` should require manual cleanup.\n   *\n   * If this is `false` (the default) the effect will automatically register itself to be cleaned up\n   * with the current `DestroyRef`.\n   *\n   * If this is `true` and you want to use the effect outside an injection context, you still\n   * need to provide an `Injector` to the effect.\n   */\n  manualCleanup?: boolean;\n\n  /**\n   * @deprecated no longer required, signal writes are allowed by default.\n   */\n  allowSignalWrites?: boolean;\n\n  /**\n   * A debug name for the effect. Used in Angular DevTools to identify the effect.\n   */\n  debugName?: string;\n}\n\n/**\n * An effect can, optionally, register a cleanup function. If registered, the cleanup is executed\n * before the next effect run. The cleanup function makes it possible to \"cancel\" any work that the\n * previous effect run might have started.\n *\n * @see [Effect cleanup functions](guide/signals#effect-cleanup-functions)\n *\n * @publicApi 20.0\n */\nexport type EffectCleanupFn = () => void;\n\n/**\n * A callback passed to the effect function that makes it possible to register cleanup logic.\n *\n * @see [Effect cleanup functions](guide/signals#effect-cleanup-functions)\n *\n * @publicApi 20.0\n */\nexport type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;\n\n/**\n * Registers an \"effect\" that will be scheduled & executed whenever the signals that it reads\n * changes.\n *\n * Angular has two different kinds of effect: component effects and root effects. Component effects\n * are created when `effect()` is called from a component, directive, or within a service of a\n * component/directive. Root effects are created when `effect()` is called from outside the\n * component tree, such as in a root service.\n *\n * The two effect types differ in their timing. Component effects run as a component lifecycle\n * event during Angular's synchronization (change detection) process, and can safely read input\n * signals or create/destroy views that depend on component state. Root effects run as microtasks\n * and have no connection to the component tree or change detection.\n *\n * `effect()` must be run in injection context, unless the `injector` option is manually specified.\n *\n * @see [Effects](guide/signals#effects)\n *\n * @publicApi 20.0\n */\nexport function effect(effectFn: (onCleanup: EffectCleanupRegisterFn) => void, options?: CreateEffectOptions): EffectRef {\n  ngDevMode && assertNotInReactiveContext(effect, 'Call `effect` outside of a reactive context. For example, schedule the ' + 'effect inside the component constructor.');\n\n  if (ngDevMode && !options?.injector) {\n    assertInInjectionContext(effect);\n  }\n\n  if (ngDevMode && options?.allowSignalWrites !== undefined) {\n    console.warn(`The 'allowSignalWrites' flag is deprecated and no longer impacts effect() (writes are always allowed)`);\n  }\n\n  const injector = options?.injector ?? inject(Injector);\n  const destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;\n\n  let node: EffectNode;\n\n  const notifier = injector.get(ChangeDetectionScheduler);\n  node = createRootEffect(effectFn, injector.get(EffectScheduler), notifier);\n  node.injector = injector;\n\n  if (destroyRef !== null) {\n    // If we need to register for cleanup, do that here.\n    node.onDestroyFn = destroyRef.onDestroy(() => node.destroy());\n  }\n\n  const effectRef = new EffectRefImpl(node);\n\n  if (ngDevMode) {\n    node.debugName = options?.debugName ?? '';\n    const prevInjectorProfilerContext = setInjectorProfilerContext({ injector, token: null });\n    try {\n      emitEffectCreatedEvent(effectRef);\n    } finally {\n      setInjectorProfilerContext(prevInjectorProfilerContext);\n    }\n  }\n\n  return effectRef;\n}\n\nexport interface EffectNode extends BaseEffectNode, SchedulableEffect {\n  cleanupFns: EffectCleanupFn[] | undefined;\n  injector: Injector;\n  notifier: ChangeDetectionScheduler;\n\n  onDestroyFn: () => void;\n}\n\nexport interface RootEffectNode extends EffectNode {\n  scheduler: EffectScheduler;\n}\n\nexport const EFFECT_NODE: Omit<EffectNode, 'fn' | 'destroy' | 'injector' | 'notifier'> = /* @__PURE__ */ (() => ({\n  ...BASE_EFFECT_NODE,\n  cleanupFns: undefined,\n  zone: null,\n  onDestroyFn: noop,\n  run(this: EffectNode): void {\n    if (ngDevMode && isInNotificationPhase()) {\n      throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);\n    }\n    // We clear `setIsRefreshingViews` so that `markForCheck()` within the body of an effect will\n    // cause CD to reach the component in question.\n\n    try {\n      runEffect(this);\n    } finally {\n    }\n  },\n\n  cleanup(this: EffectNode): void {\n    if (!this.cleanupFns?.length) {\n      return;\n    }\n    const prevConsumer = setActiveConsumer(null);\n    try {\n      // Attempt to run the cleanup functions. Regardless of failure or success, we consider\n      // cleanup \"completed\" and clear the list for the next run of the effect. Note that an error\n      // from the cleanup function will still crash the current run of the effect.\n      while (this.cleanupFns.length) {\n        this.cleanupFns.pop()!();\n      }\n    } finally {\n      this.cleanupFns = [];\n      setActiveConsumer(prevConsumer);\n    }\n  },\n}))();\n\nexport const ROOT_EFFECT_NODE: Omit<RootEffectNode, 'fn' | 'scheduler' | 'notifier' | 'injector'> = /* @__PURE__ */ (() => ({\n  ...EFFECT_NODE,\n  consumerMarkedDirty(this: RootEffectNode) {\n    this.scheduler.schedule(this);\n    this.notifier.notify(NotificationSource.RootEffect);\n  },\n  destroy(this: RootEffectNode) {\n    consumerDestroy(this);\n    this.onDestroyFn();\n    this.cleanup();\n    this.scheduler.remove(this);\n  },\n}))();\n\nexport function createRootEffect(fn: (onCleanup: EffectCleanupRegisterFn) => void, scheduler: EffectScheduler, notifier: ChangeDetectionScheduler): RootEffectNode {\n  const node = Object.create(ROOT_EFFECT_NODE) as RootEffectNode;\n  node.fn = createEffectFn(node, fn);\n  node.scheduler = scheduler;\n  node.notifier = notifier;\n  node.zone = typeof Zone !== 'undefined' ? Zone.current : null;\n  node.scheduler.add(node);\n  node.notifier.notify(NotificationSource.RootEffect);\n  return node;\n}\n\nfunction createEffectFn(node: EffectNode, fn: (onCleanup: EffectCleanupRegisterFn) => void) {\n  return () => {\n    fn((cleanupFn) => (node.cleanupFns ??= []).push(cleanupFn));\n  };\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { noop } from './noop';\n\n/**\n * Gets a scheduling function that runs the callback after the first of setTimeout and\n * requestAnimationFrame resolves.\n *\n * - `requestAnimationFrame` ensures that change detection runs ahead of a browser repaint.\n * This ensures that the create and update passes of a change detection always happen\n * in the same frame.\n * - When the browser is resource-starved, `rAF` can execute _before_ a `setTimeout` because\n * rendering is a very high priority process. This means that `setTimeout` cannot guarantee\n * same-frame create and update pass, when `setTimeout` is used to schedule the update phase.\n * - While `rAF` gives us the desirable same-frame updates, it has two limitations that\n * prevent it from being used alone. First, it does not run in background tabs, which would\n * prevent Angular from initializing an application when opened in a new tab (for example).\n * Second, repeated calls to requestAnimationFrame will execute at the refresh rate of the\n * hardware (~16ms for a 60Hz display). This would cause significant slowdown of tests that\n * are written with several updates and asserts in the form of \"update; await stable; assert;\".\n * - Both `setTimeout` and `rAF` are able to \"coalesce\" several events from a single user\n * interaction into a single change detection. Importantly, this reduces view tree traversals when\n * compared to an alternative timing mechanism like `queueMicrotask`, where change detection would\n * then be interleaves between each event.\n *\n * By running change detection after the first of `setTimeout` and `rAF` to execute, we get the\n * best of both worlds.\n *\n * @returns a function to cancel the scheduled callback\n */\nexport function scheduleCallbackWithRafRace(callback: Function): () => void {\n  let timeoutId: number;\n  let animationFrameId: number;\n  function cleanup() {\n    callback = noop;\n    try {\n      if (animationFrameId !== undefined && typeof cancelAnimationFrame === 'function') {\n        cancelAnimationFrame(animationFrameId);\n      }\n      if (timeoutId !== undefined) {\n        clearTimeout(timeoutId);\n      }\n    } catch {\n      // Clearing/canceling can fail in tests due to the timing of functions being patched and unpatched\n      // Just ignore the errors - we protect ourselves from this issue by also making the callback a no-op.\n    }\n  }\n  timeoutId = setTimeout(() => {\n    callback();\n    cleanup();\n  }) as unknown as number;\n  if (typeof requestAnimationFrame === 'function') {\n    animationFrameId = requestAnimationFrame(() => {\n      callback();\n      cleanup();\n    });\n  }\n\n  return () => cleanup();\n}\n\nexport function scheduleCallbackWithMicrotask(callback: Function): () => void {\n  queueMicrotask(() => callback());\n\n  return () => {\n    callback = noop;\n  };\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { inject } from '../../di/injector_compatibility';\nimport { scheduleCallbackWithMicrotask } from '../../util/callback_scheduler';\n\nimport { ChangeDetectionScheduler, NotificationSource } from './zoneless_scheduling';\nimport { EffectScheduler } from 'src/import/render3/reactivity/root_effect_scheduler';\n\nexport class ChangeDetectionSchedulerImpl implements ChangeDetectionScheduler {\n  runningTick = false;\n  #rootEffectScheduler = inject(EffectScheduler);\n  private cancelScheduledCallback: null | (() => void) = null;\n\n  notify(source: NotificationSource): void {\n    this.cancelScheduledCallback = scheduleCallbackWithMicrotask(() => {\n      this.runningTick = true;\n      this.#rootEffectScheduler.flush();\n      this.cleanup();\n    });\n  }\n  private cleanup() {\n    this.runningTick = false;\n    this.cancelScheduledCallback?.();\n    this.cancelScheduledCallback = null;\n  }\n  ngOnDestroy() {\n    this.cleanup();\n  }\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nimport { inject } from './di/injector_compatibility';\nimport { ɵɵdefineInjectable } from './di/interface/defs';\nimport { OnDestroy } from './interface/lifecycle_hooks';\nimport { ChangeDetectionScheduler, NotificationSource } from './change_detection/scheduling/zoneless_scheduling';\nimport { INTERNAL_APPLICATION_ERROR_HANDLER } from './error_handler';\n\n/**\n * Internal implementation of the pending tasks service.\n */\nexport class PendingTasksInternal implements OnDestroy {\n  private taskId = 0;\n  private pendingTasks = new Set<number>();\n  private destroyed = false;\n\n  private pendingTask = new BehaviorSubject<boolean>(false);\n\n  get hasPendingTasks(): boolean {\n    // Accessing the value of a closed `BehaviorSubject` throws an error.\n    return this.destroyed ? false : this.pendingTask.value;\n  }\n\n  /**\n   * In case the service is about to be destroyed, return a self-completing observable.\n   * Otherwise, return the observable that emits the current state of pending tasks.\n   */\n  get hasPendingTasksObservable(): Observable<boolean> {\n    if (this.destroyed) {\n      // Manually creating the observable pulls less symbols from RxJS than `of(false)`.\n      return new Observable<boolean>((subscriber) => {\n        subscriber.next(false);\n        subscriber.complete();\n      });\n    }\n\n    return this.pendingTask;\n  }\n\n  add(): number {\n    // Emitting a value to a closed subject throws an error.\n    if (!this.hasPendingTasks && !this.destroyed) {\n      this.pendingTask.next(true);\n    }\n    const taskId = this.taskId++;\n    this.pendingTasks.add(taskId);\n    return taskId;\n  }\n\n  has(taskId: number): boolean {\n    return this.pendingTasks.has(taskId);\n  }\n\n  remove(taskId: number): void {\n    this.pendingTasks.delete(taskId);\n    if (this.pendingTasks.size === 0 && this.hasPendingTasks) {\n      this.pendingTask.next(false);\n    }\n  }\n\n  ngOnDestroy(): void {\n    this.pendingTasks.clear();\n    if (this.hasPendingTasks) {\n      this.pendingTask.next(false);\n    }\n    // We call `unsubscribe()` to release observers, as users may forget to\n    // unsubscribe manually when subscribing to `isStable`. We do not call\n    // `complete()` because it is unsafe; if someone subscribes using the `first`\n    // operator and the observable completes before emitting a value,\n    // RxJS will throw an error.\n    this.destroyed = true;\n    this.pendingTask.unsubscribe();\n  }\n\n  /** @nocollapse */\n  static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n    token: PendingTasksInternal,\n    providedIn: 'root',\n    factory: () => new PendingTasksInternal(),\n  });\n}\n\n/**\n * Service that keeps track of pending tasks contributing to the stableness of Angular\n * application. While several existing Angular services (ex.: `HttpClient`) will internally manage\n * tasks influencing stability, this API gives control over stability to library and application\n * developers for specific cases not covered by Angular internals.\n *\n * The concept of stability comes into play in several important scenarios:\n * - SSR process needs to wait for the application stability before serializing and sending rendered\n * HTML;\n * - tests might want to delay assertions until the application becomes stable;\n *\n * @usageNotes\n * ```ts\n * const pendingTasks = inject(PendingTasks);\n * const taskCleanup = pendingTasks.add();\n * // do work that should block application's stability and then:\n * taskCleanup();\n * ```\n *\n *\n * @see [PendingTasks for Server Side Rendering (SSR)](guide/zoneless#pendingtasks-for-server-side-rendering-ssr)\n *\n * @publicApi 20.0\n */\nexport class PendingTasks {\n  private readonly internalPendingTasks = inject(PendingTasksInternal);\n  private readonly scheduler = inject(ChangeDetectionScheduler);\n  private readonly errorHandler = inject(INTERNAL_APPLICATION_ERROR_HANDLER);\n  /**\n   * Adds a new task that should block application's stability.\n   * @returns A cleanup function that removes a task when called.\n   */\n  add(): () => void {\n    const taskId = this.internalPendingTasks.add();\n    return () => {\n      if (!this.internalPendingTasks.has(taskId)) {\n        // This pending task has already been cleared.\n        return;\n      }\n      // Notifying the scheduler will hold application stability open until the next tick.\n      this.scheduler.notify(NotificationSource.PendingTaskRemoved);\n      this.internalPendingTasks.remove(taskId);\n    };\n  }\n\n  /**\n   * Runs an asynchronous function and blocks the application's stability until the function completes.\n   *\n   * ```ts\n   * pendingTasks.run(async () => {\n   *   const userData = await fetch('/api/user');\n   *   this.userData.set(userData);\n   * });\n   * ```\n   *\n   * @param fn The asynchronous function to execute\n   * @developerPreview 19.0\n   */\n  run(fn: () => Promise<unknown>): void {\n    const removeTask = this.add();\n    fn().catch(this.errorHandler).finally(removeTask);\n  }\n\n  /** @nocollapse */\n  static ɵprov = /** @pureOrBreakMyCode */ /* @__PURE__ */ ɵɵdefineInjectable({\n    token: PendingTasks,\n    providedIn: 'root',\n    factory: () => new PendingTasks(),\n  });\n}\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { InjectionToken } from './di/injection_token';\nimport { inject } from './di/injector_compatibility';\nimport { EnvironmentInjector } from './di/r3_injector';\n\n/**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```ts\n * class MyErrorHandler implements ErrorHandler {\n *   handleError(error) {\n *     // do something with the exception\n *   }\n * }\n *\n * // Provide in standalone apps\n * bootstrapApplication(AppComponent, {\n *   providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n *\n * // Provide in module-based apps\n * @NgModule({\n *   providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n *\n * @see [Unhandled errors in Angular](best-practices/error-handling)\n *\n */\nexport class ErrorHandler {\n  /**\n   * @internal\n   */\n  _console: Console = console;\n\n  handleError(error: any): void {\n    this._console.error('ERROR', error);\n  }\n}\n\n/**\n * `InjectionToken` used to configure how to call the `ErrorHandler`.\n */\nexport const INTERNAL_APPLICATION_ERROR_HANDLER = new InjectionToken<(e: any) => void>(typeof ngDevMode === 'undefined' || ngDevMode ? 'internal error handler' : '', {\n  providedIn: 'root',\n  factory: () => {\n    // The user's error handler may depend on things that create a circular dependency\n    // so we inject it lazily.\n    const injector = inject(EnvironmentInjector);\n    let userErrorHandler: ErrorHandler;\n    return (e: unknown) => {\n      if (injector.destroyed && !userErrorHandler) {\n        setTimeout(() => {\n          throw e;\n        });\n      } else {\n        userErrorHandler ??= injector.get(ErrorHandler);\n        userErrorHandler.handleError(e);\n      }\n    };\n  },\n});\n", "/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport { untracked } from '../render3/reactivity/untracked';\nimport { computed } from '../render3/reactivity/computed';\nimport { signal, signalAsReadonlyFn, WritableSignal } from '../render3/reactivity/signal';\nimport { Signal, ValueEqualityFn } from '../render3/reactivity/api';\nimport { effect, EffectRef } from '../render3/reactivity/effect';\nimport { ResourceOptions, ResourceStatus, WritableResource, Resource, ResourceRef, ResourceStreamingLoader, StreamingResourceOptions, ResourceStreamItem, ResourceLoaderParams } from './api';\n\nimport { Injector } from '../di/injector';\nimport { assertInInjectionContext } from '../di/contextual';\nimport { inject } from '../di/injector_compatibility';\nimport { PendingTasks } from '../pending_tasks';\nimport { linkedSignal } from '../render3/reactivity/linked_signal';\nimport { DestroyRef } from '../linker/destroy_ref';\n\n/**\n * Constructs a `Resource` that projects a reactive request to an asynchronous operation defined by\n * a loader function, which exposes the result of the loading operation via signals.\n *\n * Note that `resource` is intended for _read_ operations, not operations which perform mutations.\n * `resource` will cancel in-progress loads via the `AbortSignal` when destroyed or when a new\n * request object becomes available, which could prematurely abort mutations.\n *\n * @see [Async reactivity with resources](guide/signals/resource)\n *\n * @experimental 19.0\n */\nexport function resource<T, R>(options: ResourceOptions<T, R> & { defaultValue: NoInfer<T> }): ResourceRef<T>;\n\n/**\n * Constructs a `Resource` that projects a reactive request to an asynchronous operation defined by\n * a loader function, which exposes the result of the loading operation via signals.\n *\n * Note that `resource` is intended for _read_ operations, not operations which perform mutations.\n * `resource` will cancel in-progress loads via the `AbortSignal` when destroyed or when a new\n * request object becomes available, which could prematurely abort mutations.\n *\n * @experimental 19.0\n * @see [Async reactivity with resources](guide/signals/resource)\n */\nexport function resource<T, R>(options: ResourceOptions<T, R>): ResourceRef<T | undefined>;\nexport function resource<T, R>(options: ResourceOptions<T, R>): ResourceRef<T | undefined> {\n  if (ngDevMode && !options?.injector) {\n    assertInInjectionContext(resource);\n  }\n\n  const oldNameForParams = (options as ResourceOptions<T, R> & { request: ResourceOptions<T, R>['params'] }).request;\n  const params = (options.params ?? oldNameForParams ?? (() => null)) as () => R;\n  return new ResourceImpl<T | undefined, R>(params, getLoader(options), options.defaultValue, options.equal ? wrapEqualityFn(options.equal) : undefined, options.injector ?? inject(Injector));\n}\n\ntype ResourceInternalStatus = 'idle' | 'loading' | 'resolved' | 'local';\n\n/**\n * Internal state of a resource.\n */\ninterface ResourceProtoState<T> {\n  extRequest: WrappedRequest;\n\n  // For simplicity, status is internally tracked as a subset of the public status enum.\n  // Reloading and Error statuses are projected from Loading and Resolved based on other state.\n  status: ResourceInternalStatus;\n}\n\ninterface ResourceState<T> extends ResourceProtoState<T> {\n  previousStatus: ResourceStatus;\n  stream: Signal<ResourceStreamItem<T>> | undefined;\n}\n\ntype WrappedRequest = { request: unknown; reload: number };\n\n/**\n * Base class which implements `.value` as a `WritableSignal` by delegating `.set` and `.update`.\n */\nabstract class BaseWritableResource<T> implements WritableResource<T> {\n  readonly value: WritableSignal<T>;\n  abstract readonly status: Signal<ResourceStatus>;\n  abstract readonly error: Signal<Error | undefined>;\n\n  abstract reload(): boolean;\n\n  constructor(value: Signal<T>) {\n    this.value = value as WritableSignal<T>;\n    this.value.set = this.set.bind(this);\n    this.value.update = this.update.bind(this);\n    this.value.asReadonly = signalAsReadonlyFn;\n  }\n\n  abstract set(value: T): void;\n\n  private readonly isError = computed(() => this.status() === 'error');\n\n  update(updateFn: (value: T) => T): void {\n    this.set(updateFn(untracked(this.value)));\n  }\n\n  readonly isLoading = computed(() => this.status() === 'loading' || this.status() === 'reloading');\n\n  // Use a computed here to avoid triggering reactive consumers if the value changes while staying\n  // either defined or undefined.\n  private readonly isValueDefined = computed(() => {\n    // Check if it's in an error state first to prevent the error from bubbling up.\n    if (this.isError()) {\n      return false;\n    }\n\n    return this.value() !== undefined;\n  });\n\n  hasValue(): this is ResourceRef<Exclude<T, undefined>> {\n    return this.isValueDefined();\n  }\n\n  asReadonly(): Resource<T> {\n    return this;\n  }\n}\n\n/**\n * Implementation for `resource()` which uses a `linkedSignal` to manage the resource's state.\n */\nexport class ResourceImpl<T, R> extends BaseWritableResource<T> implements ResourceRef<T> {\n  private readonly pendingTasks: PendingTasks;\n\n  /**\n   * The current state of the resource. Status, value, and error are derived from this.\n   */\n  private readonly state: WritableSignal<ResourceState<T>>;\n\n  /**\n   * Combines the current request with a reload counter which allows the resource to be reloaded on\n   * imperative command.\n   */\n  protected readonly extRequest: WritableSignal<WrappedRequest>;\n  private readonly effectRef: EffectRef;\n\n  private pendingController: AbortController | undefined;\n  private resolvePendingTask: (() => void) | undefined = undefined;\n  private destroyed = false;\n  private unregisterOnDestroy: () => void;\n\n  constructor(\n    request: () => R,\n    private readonly loaderFn: ResourceStreamingLoader<T, R>,\n    defaultValue: T,\n    private readonly equal: ValueEqualityFn<T> | undefined,\n    injector: Injector,\n  ) {\n    super(\n      // Feed a computed signal for the value to `BaseWritableResource`, which will upgrade it to a\n      // `WritableSignal` that delegates to `ResourceImpl.set`.\n      computed(\n        () => {\n          const streamValue = this.state().stream?.();\n\n          if (!streamValue) {\n            return defaultValue;\n          }\n\n          // Prevents `hasValue()` from throwing an error when a reload happened in the error state\n          if (this.state().status === 'loading' && this.error()) {\n            return defaultValue;\n          }\n\n          if (!isResolved(streamValue)) {\n            throw new ResourceValueError(this.error()!);\n          }\n\n          return streamValue.value;\n        },\n        { equal },\n      ),\n    );\n\n    // Extend `request()` to include a writable reload signal.\n    this.extRequest = linkedSignal({\n      source: request,\n      computation: (request) => ({ request, reload: 0 }),\n    });\n\n    // The main resource state is managed in a `linkedSignal`, which allows the resource to change\n    // state instantaneously when the request signal changes.\n    this.state = linkedSignal<WrappedRequest, ResourceState<T>>({\n      // Whenever the request changes,\n      source: this.extRequest,\n      // Compute the state of the resource given a change in status.\n      computation: (extRequest, previous) => {\n        const status = extRequest.request === undefined ? 'idle' : 'loading';\n        if (!previous) {\n          return {\n            extRequest,\n            status,\n            previousStatus: 'idle',\n            stream: undefined,\n          };\n        } else {\n          return {\n            extRequest,\n            status,\n            previousStatus: projectStatusOfState(previous.value),\n            // If the request hasn't changed, keep the previous stream.\n            stream: previous.value.extRequest.request === extRequest.request ? previous.value.stream : undefined,\n          };\n        }\n      },\n    });\n\n    this.effectRef = effect(this.loadEffect.bind(this), {\n      injector,\n      manualCleanup: true,\n    });\n\n    this.pendingTasks = injector.get(PendingTasks);\n\n    // Cancel any pending request when the resource itself is destroyed.\n    this.unregisterOnDestroy = injector.get(DestroyRef).onDestroy(() => this.destroy());\n  }\n\n  override readonly status = computed(() => projectStatusOfState(this.state()));\n\n  override readonly error = computed(() => {\n    const stream = this.state().stream?.();\n    return stream && !isResolved(stream) ? stream.error : undefined;\n  });\n\n  /**\n   * Called either directly via `WritableResource.set` or via `.value.set()`.\n   */\n  override set(value: T): void {\n    if (this.destroyed) {\n      return;\n    }\n\n    const error = untracked(this.error);\n    const state = untracked(this.state);\n\n    if (!error) {\n      const current = untracked(this.value);\n      if (state.status === 'local' && (this.equal ? this.equal(current, value) : current === value)) {\n        return;\n      }\n    }\n\n    // Enter Local state with the user-defined value.\n    this.state.set({\n      extRequest: state.extRequest,\n      status: 'local',\n      previousStatus: 'local',\n      stream: signal({ value }),\n    });\n\n    // We're departing from whatever state the resource was in previously, so cancel any in-progress\n    // loading operations.\n    this.abortInProgressLoad();\n  }\n\n  override reload(): boolean {\n    // We don't want to restart in-progress loads.\n    const { status } = untracked(this.state);\n    if (status === 'idle' || status === 'loading') {\n      return false;\n    }\n\n    // Increment the request reload to trigger the `state` linked signal to switch us to `Reload`\n    this.extRequest.update(({ request, reload }) => ({ request, reload: reload + 1 }));\n    return true;\n  }\n\n  destroy(): void {\n    this.destroyed = true;\n    this.unregisterOnDestroy();\n    this.effectRef.destroy();\n    this.abortInProgressLoad();\n\n    // Destroyed resources enter Idle state.\n    this.state.set({\n      extRequest: { request: undefined, reload: 0 },\n      status: 'idle',\n      previousStatus: 'idle',\n      stream: undefined,\n    });\n  }\n\n  private async loadEffect(): Promise<void> {\n    const extRequest = this.extRequest();\n\n    // Capture the previous status before any state transitions. Note that this is `untracked` since\n    // we do not want the effect to depend on the state of the resource, only on the request.\n    const { status: currentStatus, previousStatus } = untracked(this.state);\n\n    if (extRequest.request === undefined) {\n      // Nothing to load (and we should already be in a non-loading state).\n      return;\n    } else if (currentStatus !== 'loading') {\n      // We're not in a loading or reloading state, so this loading request is stale.\n      return;\n    }\n\n    // Cancel any previous loading attempts.\n    this.abortInProgressLoad();\n\n    // Capturing _this_ load's pending task in a local variable is important here. We may attempt to\n    // resolve it twice:\n    //\n    //  1. when the loading function promise resolves/rejects\n    //  2. when cancelling the loading operation\n    //\n    // After the loading operation is cancelled, `this.resolvePendingTask` no longer represents this\n    // particular task, but this `await` may eventually resolve/reject. Thus, when we cancel in\n    // response to (1) below, we need to cancel the locally saved task.\n    let resolvePendingTask: (() => void) | undefined = (this.resolvePendingTask = this.pendingTasks.add());\n\n    const { signal: abortSignal } = (this.pendingController = new AbortController());\n\n    try {\n      // The actual loading is run through `untracked` - only the request side of `resource` is\n      // reactive. This avoids any confusion with signals tracking or not tracking depending on\n      // which side of the `await` they are.\n      const stream = await untracked(() =>\n        this.loaderFn({\n          params: extRequest.request as Exclude<R, undefined>,\n          // TODO(alxhub): cleanup after g3 removal of `request` alias.\n          request: extRequest.request as Exclude<R, undefined>,\n          abortSignal,\n          previous: {\n            status: previousStatus,\n          },\n        } as ResourceLoaderParams<R>),\n      );\n\n      // If this request has been aborted, or the current request no longer\n      // matches this load, then we should ignore this resolution.\n      if (abortSignal.aborted || untracked(this.extRequest) !== extRequest) {\n        return;\n      }\n\n      this.state.set({\n        extRequest,\n        status: 'resolved',\n        previousStatus: 'resolved',\n        stream,\n      });\n    } catch (err) {\n      if (abortSignal.aborted || untracked(this.extRequest) !== extRequest) {\n        return;\n      }\n\n      this.state.set({\n        extRequest,\n        status: 'resolved',\n        previousStatus: 'error',\n        stream: signal({ error: encapsulateResourceError(err) }),\n      });\n    } finally {\n      // Resolve the pending task now that the resource has a value.\n      resolvePendingTask?.();\n      resolvePendingTask = undefined;\n    }\n  }\n\n  private abortInProgressLoad(): void {\n    untracked(() => this.pendingController?.abort());\n    this.pendingController = undefined;\n\n    // Once the load is aborted, we no longer want to block stability on its resolution.\n    this.resolvePendingTask?.();\n    this.resolvePendingTask = undefined;\n  }\n}\n\n/**\n * Wraps an equality function to handle either value being `undefined`.\n */\nfunction wrapEqualityFn<T>(equal: ValueEqualityFn<T>): ValueEqualityFn<T | undefined> {\n  return (a, b) => (a === undefined || b === undefined ? a === b : equal(a, b));\n}\n\nfunction getLoader<T, R>(options: ResourceOptions<T, R>): ResourceStreamingLoader<T, R> {\n  if (isStreamingResourceOptions(options)) {\n    return options.stream;\n  }\n\n  return async (params) => {\n    try {\n      return signal({ value: await options.loader(params) });\n    } catch (err) {\n      return signal({ error: encapsulateResourceError(err) });\n    }\n  };\n}\n\nfunction isStreamingResourceOptions<T, R>(options: ResourceOptions<T, R>): options is StreamingResourceOptions<T, R> {\n  return !!(options as StreamingResourceOptions<T, R>).stream;\n}\n\n/**\n * Project from a state with `ResourceInternalStatus` to the user-facing `ResourceStatus`\n */\nfunction projectStatusOfState(state: ResourceState<unknown>): ResourceStatus {\n  switch (state.status) {\n    case 'loading':\n      return state.extRequest.reload === 0 ? 'loading' : 'reloading';\n    case 'resolved':\n      return isResolved(state.stream!()) ? 'resolved' : 'error';\n    default:\n      return state.status;\n  }\n}\n\nfunction isResolved<T>(state: ResourceStreamItem<T>): state is { value: T } {\n  return (state as { error: unknown }).error === undefined;\n}\n\nexport function encapsulateResourceError(error: unknown): Error {\n  if (error instanceof Error) {\n    return error;\n  }\n\n  return new ResourceWrappedError(error);\n}\n\nclass ResourceValueError extends Error {\n  constructor(error: Error) {\n    super(ngDevMode ? `Resource is currently in an error state (see Error.cause for details): ${error.message}` : error.message, { cause: error });\n  }\n}\n\nclass ResourceWrappedError extends Error {\n  constructor(error: unknown) {\n    super(ngDevMode ? `Resource returned an error that's not an Error instance: ${String(error)}. Check this error's .cause for the actual error.` : String(error), { cause: error });\n  }\n}\n", "import type { InjectableDecorator } from './di/injectable';\nimport { Injector } from './di/injector';\nimport { EnvironmentProviders, Provider } from './di/interface/provider';\nexport { EnvironmentProviders, Provider } from './di/interface/provider';\nimport { getNullInjector, R3Injector } from './di/r3_injector';\nimport { INJECTOR_SCOPE, InjectorScope } from './di/scope';\n\nexport * from './di/injectable';\nexport * from './di/metadata';\nexport * from './di/r3_injector';\nexport * from './di/interface/defs';\nexport * from './di/injector_compatibility';\nexport * from './di/injection_token';\nexport * from './di/null_injector';\nexport * from './di/injector';\nexport * from './di/interface/injector';\nexport * from './di/scope';\nexport * from './render3/instructions/di';\n\nexport * from './core_reactivity_export_internal';\nexport * from './change_detection/scheduling/zoneless_scheduling';\nexport * from './change_detection/scheduling/zoneless_scheduling_impl';\n\nexport * from './resource';\nexport * from './di/provider_token';\nexport * from './error_handler';\nexport * from './pending_tasks';\nexport * from './linker/destroy_ref';\nexport { StaticProvider } from './di/interface/provider';\nexport { EffectScheduler } from './render3/reactivity/root_effect_scheduler';\nexport function Injectable(args?: any) {\n  return (constructor: Function) => {};\n}\nexport class StaticInjectOptions {\n  static injectOptions: Parameters<InjectableDecorator>[0];\n}\nexport class RootStaticInjectOptions {\n  static injectOptions: Parameters<InjectableDecorator>[0] = {\n    providedIn: 'root',\n  };\n}\n\nexport function createInjector(options: { providers: Array<Provider | EnvironmentProviders>; parent: Injector; name?: string; scopes?: Set<InjectorScope> }) {\n  return new R3Injector(options.providers, options.parent ?? getNullInjector(), options.name ?? '', options.scopes ?? new Set([]));\n}\nexport function createRootInjector(options: { providers: Array<Provider | EnvironmentProviders>; name?: string; scopes?: Set<InjectorScope> }) {\n  return new R3Injector(\n    [\n      ...options.providers,\n      {\n        provide: INJECTOR_SCOPE,\n        useValue: 'root',\n      },\n    ],\n    getNullInjector(),\n    options.name ?? '',\n    options.scopes ?? new Set(['environment']),\n  );\n}\n"],
  "mappings": ";AAAA,IAAM,YAAY,OAAO,cAAc,cAAc,OAAO;;;ACyWrD,SAAS,uBAAuB,OAA8G;AACnJ,SAAO,SAAS,CAAC,CAAE,MAAuC;AAC5D;;;AC/LO,IAAM,eAAN,cAAgE,MAAM;AAAA,EAC3E,YACS,MACP,SACA;AACA,UAAM,mBAAsB,MAAM,OAAO,CAAC;AAHnC;AAAA,EAIT;AACF;AAEO,SAAS,uBAA4D,MAAiB;AAI3F,SAAO,MAAM,KAAK,IAAI,IAAI,CAAC;AAC7B;AAMO,SAAS,mBAAwD,MAAS,SAAwC;AACvH,QAAM,WAAW,uBAAuB,IAAI;AAE5C,MAAI,eAAe,GAAG,QAAQ,GAAG,UAAU,OAAO,UAAU,EAAE;AAE9D,MAAI,aAAa,OAAO,GAAG;AACzB,UAAM,qBAAqB,CAAC,aAAa,MAAM,YAAY;AAC3D,UAAM,YAAY,qBAAqB,MAAM;AAC7C,mBAAe,GAAG,YAAY,GAAG,SAAS,iBAAiB,gCAA2B,IAAI,QAAQ;AAAA,EACpG;AACA,SAAO;AACT;;;ACnMO,SAAS,uBAA0B,0BAAqC;AAC7E,aAAW,OAAO,0BAA0B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,QAAQ,QAAQ,IAAI,QAAQ,UAAU,oBAAI,IAAI,CAAC,CAAC,CAAC;AACjI;AACO,SAAS,mBAAmB,SAA4G;AAC7I,SAAO,IAAI;AAAA,IACT;AAAA,MACE,GAAG,QAAQ;AAAA,MACX;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,gBAAgB;AAAA,IAChB,QAAQ,QAAQ;AAAA,IAChB,QAAQ,UAAU,oBAAI,IAAI,CAAC,aAAa,CAAC;AAAA,EAC3C;AACF;",
  "names": ["link", "computed", "effect", "DecoratorFlags", "InternalInjectFlags", "inject", "isSignal", "untracked", "NotificationSource", "inject", "inject", "inject", "inject", "inject", "untracked", "request", "createInjector"]
}
