{"version":3,"file":"lithiumjs-angular.mjs","sources":["../../src/metadata/metadata.ts","../../src/metadata/component-state-metadata.ts","../../src/metadata/common-metadata.ts","../../src/metadata/emitter-metadata.ts","../../src/metadata/event-metadata.ts","../../src/async-state.ts","../../src/autopush.ts","../../src/component.ts","../../src/managed-observable.ts","../../src/lifecycle-event.ts","../../src/event-source.ts","../../src/component-state.ts","../../src/declare-state.ts","../../src/directive-state.ts","../../src/lang-utils.ts","../../src/lifecycle.ts","../../src/observable-util.ts","../../src/state-emitter.ts","../../src/lithiumjs-angular.ts"],"sourcesContent":["export namespace Metadata {\n\n    type MetadataKey = string | symbol | number;\n\n    const LI_METADATA_ROOT = Symbol('$LI_');\n\n    export function requireMetadata<T>(symbol: MetadataKey, target: any, defaultValue?: T): T {\n        if (!hasMetadata(symbol, target)) {\n            setMetadata(symbol, target, defaultValue);\n        }\n\n        return getOwnMetadata(symbol, target) || getMetadata(symbol, target);\n    }\n\n    export function requireOwnMetadata<T>(symbol: MetadataKey, target: any, defaultValue?: T): T {\n        if (!hasOwnMetadata(symbol, target)) {\n            setMetadata(symbol, target, defaultValue);\n        }\n\n        return getOwnMetadata(symbol, target);\n    }\n\n    export function getMetadataMap(target: any): Map<MetadataKey, any> {\n        return (getMetadataKeys(target) || [])\n            .reduce((map, key) => map.set(key, getMetadata(key, target)), new Map());\n    }\n\n    export function setMetadata(symbol: MetadataKey, target: any, value: any) {\n        Object.defineProperty(rootMetadata(target), symbol, {\n            writable: true,\n            enumerable: true,\n            value\n        });\n    }\n\n    export function hasMetadata(symbol: MetadataKey, target: any): boolean {\n        return !!getMetadata(symbol, target); // TODO\n    }\n\n    export function hasOwnMetadata(symbol: MetadataKey, target: any): boolean {\n        return !!getOwnMetadata(symbol, target);\n    }\n\n    export function getMetadata(symbol: MetadataKey, target: any): any {\n        const metadata = getOwnMetadata(symbol, target);\n\n        if (!metadata && target.prototype) {\n            return getMetadata(symbol, target.prototype);\n        }\n        \n        return metadata;\n    }\n\n    export function getOwnMetadata(symbol: MetadataKey | number, target: any): any {\n        const descriptor = Object.getOwnPropertyDescriptor(rootMetadata(target), symbol);\n        return descriptor ? descriptor.value : undefined;\n    }\n\n    export function getMetadataKeys(target: any): MetadataKey[] {\n        return Object.keys(rootMetadata(target));\n    }\n\n    function ensureRootMetadataExists(target: any) {\n        if (!Object.getOwnPropertyDescriptor(target, LI_METADATA_ROOT)) {\n            Object.defineProperty(target, LI_METADATA_ROOT, {\n                enumerable: false,\n                writable: true,\n                value: Object.create({})\n            })\n        }\n    }\n\n    function rootMetadata(target: any): any {\n        ensureRootMetadataExists(target);\n\n        return Object.getOwnPropertyDescriptor(target, LI_METADATA_ROOT)!.value;\n    }\n}\n\n// Workaround for angular-cli 5.0.0 metadata gen bug\nexport interface Metadata {}","import type { StringKey } from \"../lang-utils\";\nimport { Metadata } from \"./metadata\";\n\nexport type AsyncSourceKey<T, K extends StringKey<T> = StringKey<T>> = `${K}$`;\n\nexport type ValidAsyncSourceKey<T, K extends StringKey<T> = StringKey<T>> = AsyncSourceKey<T, K> & StringKey<T>;\nexport namespace ComponentStateMetadata {\n    export interface ManagedProperty<T, K extends StringKey<T> = StringKey<T>> {\n        key: K;\n        publicKey?: StringKey<T>;\n        asyncSource?: ValidAsyncSourceKey<T>;\n    }\n\n    export type ManagedPropertyList<T> = ManagedProperty<T>[];\n\n    export const MANAGED_PROPERTY_LIST_KEY = \"MANAGED_PROPERTY_LIST_KEY\";\n\n    const ManagedPropertyListSymbol = Symbol(\"ManagedPropertyList\");\n\n    export function GetOwnManagedPropertyList<T>(target: Object): ManagedPropertyList<T> {\n        return Metadata.requireOwnMetadata<ManagedPropertyList<T>>(ManagedPropertyListSymbol, target, []);\n    }\n\n    export function GetInheritedManagedPropertyList<T>(target: Object): ManagedPropertyList<T> {\n        const targetMetadata = GetOwnManagedPropertyList<T>(target).slice(0);\n        const targetPrototype = Object.getPrototypeOf(target);\n\n        if (targetPrototype) {\n            targetMetadata.push(...GetInheritedManagedPropertyList(targetPrototype));\n        }\n\n        return targetMetadata;\n    }\n\n    export function SetManagedPropertyList<T>(target: Object, list: ManagedPropertyList<T>) {\n        Metadata.setMetadata(ManagedPropertyListSymbol, target, list);\n    }\n\n    export function AddManagedProperty<T>(target: Object, property: ManagedProperty<T>) {\n        SetManagedPropertyList<T>(target, GetOwnManagedPropertyList<T>(target).concat([property]));\n    }\n}\n\nexport function asyncStateKey<ComponentT, K extends StringKey<ComponentT> = StringKey<ComponentT>>(\n    key: K\n): AsyncSourceKey<ComponentT, K> {\n    return `${key}$` as any;\n}\n","import { Metadata } from \"./metadata\";\n\nexport namespace CommonMetadata {\n\n    export const MANAGED_ONDESTROY_KEY = \"__LI__MANAGED__ONDESTROY__\";\n    export const MANAGED_INSTANCE_DESTROYED_KEY = \"__LI__MANAGED__INSTANCE__DESTROYED__\";\n\n    export function instanceIsDestroyed(componentInstance: any): boolean {\n        return !!Metadata.getOwnMetadata(CommonMetadata.MANAGED_INSTANCE_DESTROYED_KEY, componentInstance);\n    }\n}","import { Subject, Observable } from \"rxjs\";\nimport { Metadata } from \"./metadata\";\n\n/** @deprecated */\nexport type EmitterType = string;\n\n/** @deprecated */\nexport namespace EmitterMetadata {\n\n    export const BOOTSTRAPPED_KEY = \"$$STATEEMITTER_BOOTSTRAPPED\";\n\n    export type ProxyMode = keyof {\n        None: any,\n        From: any,\n        Alias: any,\n        Merge: any\n    };\n\n    export namespace ProxyMode {\n\n        export const None: ProxyMode = \"None\";\n        export const From: ProxyMode = \"From\";\n        export const Alias: ProxyMode = \"Alias\";\n        export const Merge: ProxyMode = \"Merge\";\n    }\n\n    export interface SubjectInfo extends SubjectInfo.CoreDetails {\n        propertyKey: string | symbol;\n        observable: Subject<any> | Observable<any>;\n    }\n\n    export namespace SubjectInfo {\n\n        export interface CoreDetails {\n            initial?: () => any;\n            initialValue?: any;\n            readOnly?: boolean;\n            writeOnly?: boolean;\n            proxyMode?: ProxyMode;\n            proxyPath?: string;\n            proxyMergeUpdates?: boolean;\n            unmanaged?: boolean;\n        }\n\n        export interface WithDynamicAlias extends SubjectInfo {\n            observable: Observable<any>;\n        }\n\n        export interface WithStaticAlias extends SubjectInfo {\n            observable: Subject<any>;\n        }\n\n        export function IsDynamicAlias(subjectInfo: SubjectInfo): subjectInfo is SubjectInfo.WithDynamicAlias {\n            return !IsStaticAlias(subjectInfo);\n        }\n\n        export function IsStaticAlias(subjectInfo: SubjectInfo): subjectInfo is SubjectInfo.WithStaticAlias {\n            return (subjectInfo.observable instanceof Subject);\n        }\n\n        export function IsSelfProxy(subjectInfo: SubjectInfo): boolean {\n            return subjectInfo.proxyPath === subjectInfo.propertyKey;\n        }\n    }\n\n    export type MetadataMap = Map<EmitterType, SubjectInfo>;\n\n    export const EmitterMapSymbol = Symbol(\"EmitterMapSymbol\");\n\n    /** @description Gets the metadata map object for the given target class (or its inheritted classes). */\n    export function GetMetadataMap(target: Object): MetadataMap {\n        return Metadata.requireMetadata<MetadataMap>(EmitterMapSymbol, target, new Map());\n    }\n\n    /** @description Gets the metadata map object for the given target class. */\n    export function GetOwnMetadataMap(target: Object): MetadataMap {\n        return Metadata.requireOwnMetadata<MetadataMap>(EmitterMapSymbol, target, new Map());\n    }\n\n    export function HasOwnMetadataMap(target: Object): boolean {\n        return Metadata.hasOwnMetadata(EmitterMapSymbol, target);\n    }\n\n    export function SetMetadataMap(target: Object, map: MetadataMap) {\n        Metadata.setMetadata(EmitterMapSymbol, target, map);\n    }\n\n    /** @description Copy all metadata from the source map to the target map.\n     * \n     *  Note: This mutates the target map.\n     **/\n    export function CopyMetadata(target: MetadataMap, source: MetadataMap, overwrite?: boolean): MetadataMap {\n        // Iterate over all source metadata properties...\n        source.forEach((subjectInfo, eventType) => {\n            // And add them to this class' metadata map if not already defined\n            if (overwrite || !target.has(eventType)) {\n                target.set(eventType, Object.assign({}, subjectInfo));\n            }\n        });\n\n        return target;\n    }\n\n    /** @description Merge own and inheritted metadata into a single map.\n     * \n     *  Note: This mutates the object's metadata.\n     **/\n    export function CopyInherittedMetadata(object: any): MetadataMap {\n        if (object) {\n            let metadataMap: MetadataMap = GetMetadataMap(object);\n            let inherittedMap: MetadataMap = CopyInherittedMetadata(Object.getPrototypeOf(object));\n\n            return CopyMetadata(metadataMap, inherittedMap);\n        }\n\n        return new Map();\n    }\n}","import { Subject } from \"rxjs\";\nimport type { ImmutableMap } from \"../lang-utils\";\nimport { Metadata } from \"./metadata\";\n\nexport type EventType = string;\n\nexport namespace EventMetadata {\n\n    export const SUBJECT_TABLE_MERGED_KEY = \"$$EVENTSOURCE_SUBJECT_TABLE_MERGED\";\n    export const BOOTSTRAPPED_KEY = \"$$EVENTSOURCE_BOOTSTRAPPED\";\n    export const LIFECYCLE_REGISTRATION_KEY = \"$$EVENTSOURCE_LIFECYCLE_REGISTRATION\";\n\n    export interface ConfigOptions {\n        eventType: EventType;\n        skipMethodCheck?: boolean;\n        unmanaged?: boolean;\n    }\n\n    export interface SubjectInfo extends ConfigOptions {\n        subject: Subject<any>;\n    }\n\n    export type PropertySubjectMap = Map<string | symbol, SubjectInfo>;\n    export type EventSubjectTable = Map<EventType, PropertySubjectMap>;\n    export type InstanceBootstrapMap = Map<EventType, boolean>;\n    export type LifecycleRegistrationMap = Map<EventType, boolean>;\n    export type LifecycleCallbackMap = Map<EventType, Array<(...args: any[]) => void>>;\n\n    const EventSubjectTableSymbol = Symbol(\"EventSubjectTableSymbol\");\n    const InstanceBootstrapMapSymbol = Symbol(\"InstanceBootstrapMapSymbol\");\n    const LifecycleRegistrationMapSymbol = Symbol(\"LifecycleRegistrationMapSymbol\");\n    const LifecycleCallbackMapSymbol = Symbol(\"LifecycleCallbackMapSymbol\");\n\n    /** @description Gets the metadata map object for the given target class (or its inheritted classes). */\n    export function GetEventSubjectTable(target: Object): EventSubjectTable {\n        return Metadata.requireMetadata<EventSubjectTable>(EventSubjectTableSymbol, target, new Map());\n    }\n\n    /** @description Gets the metadata map object for the given target class. */\n    export function GetOwnEventSubjectTable(target: Object): EventSubjectTable {\n        return Metadata.requireOwnMetadata<EventSubjectTable>(EventSubjectTableSymbol, target, new Map());\n    }\n\n    export function GetInstanceBootstrapMap(target: Object): InstanceBootstrapMap {\n        return Metadata.requireMetadata<InstanceBootstrapMap>(InstanceBootstrapMapSymbol, target, new Map());\n    }\n\n    export function GetOwnLifecycleRegistrationMap(target: Object): LifecycleRegistrationMap {\n        return Metadata.requireOwnMetadata<LifecycleRegistrationMap>(LifecycleRegistrationMapSymbol, target, new Map());\n    }\n\n    /** @description Gets own and inherited lifecycle registration data merged into a single Map. */\n    export function GetLifecycleRegistrationMap(target: Object): ImmutableMap<LifecycleRegistrationMap> {\n        const metadata: LifecycleRegistrationMap = new Map();\n        const ownMetadata = GetOwnLifecycleRegistrationMap(target);\n\n        ownMetadata.forEach((v, k) => metadata.set(k, v));\n\n        const targetPrototype = Object.getPrototypeOf(target);\n\n        if (targetPrototype) {\n            const inherittedMetadata = GetLifecycleRegistrationMap(targetPrototype);\n\n            inherittedMetadata.forEach((v, k) => metadata.set(k, v ?? metadata.get(k)));\n        }\n\n        return metadata;\n    }\n\n    export function GetOwnLifecycleCallbackMap(target: Object): LifecycleCallbackMap {\n        return Metadata.requireOwnMetadata<LifecycleCallbackMap>(LifecycleCallbackMapSymbol, target, new Map());\n    }\n\n    /** @description Gets own and inherited lifecycle callback data merged into a single Map. */\n    export function GetLifecycleCallbackMap(target: Object): ImmutableMap<LifecycleCallbackMap> {\n        const metadata: LifecycleCallbackMap = new Map();\n        const ownMetadata = GetOwnLifecycleCallbackMap(target);\n\n        ownMetadata.forEach((v, k) => {\n            if (!metadata.has(k)) {\n                metadata.set(k, []);\n            }\n\n            metadata.get(k)!.push(...v);\n        });\n\n        const targetPrototype = Object.getPrototypeOf(target);\n\n        if (targetPrototype) {\n            const inherittedMetadata = GetLifecycleCallbackMap(targetPrototype);\n\n            inherittedMetadata.forEach((v, k) => {\n                if (!metadata.has(k)) {\n                    metadata.set(k, []);\n                }\n\n                metadata.get(k)!.push(...v);\n            });\n        }\n\n        return metadata;\n    }\n\n    /** \n     *  @description\n     *  Gets the property subject map for the given event type from the metadata map for the given target class (or its inheritted classes).\n     */\n    export function GetPropertySubjectMap(type: EventType, target: Object): PropertySubjectMap {\n        let table = GetEventSubjectTable(target);\n        let subjectMap = table.get(type);\n\n        if (!subjectMap) {\n            subjectMap = new Map();\n            table.set(type, subjectMap);\n        }\n\n        return subjectMap;\n    }\n\n    /** \n     *  @description\n     *  Gets the property subject map for the given event type from the metadata map for the given target class.\n     */\n    export function GetOwnPropertySubjectMap(type: EventType, target: Object): PropertySubjectMap {\n        let table = GetOwnEventSubjectTable(target);\n        let subjectMap = table.get(type);\n\n        if (!subjectMap) {\n            subjectMap = new Map();\n            table.set(type, subjectMap);\n        }\n\n        return subjectMap;\n    }\n\n    export function GetLifecycleCallbackList(target: Object, type: EventType): ReadonlyArray<(...args: any[]) => void> {\n        const map = GetLifecycleCallbackMap(target);\n\n        return map.get(type) ?? [];\n    }\n\n    export function HasOwnEventSubjectTable(target: Object): boolean {\n        return Metadata.hasOwnMetadata(EventSubjectTableSymbol, target);\n    }\n\n    export function SetEventSubjectTable(target: Object, map: EventSubjectTable) {\n        Metadata.setMetadata(EventSubjectTableSymbol, target, map);\n    }\n\n    export function AddLifecycleCallback(target: Object, type: EventType, callback: (...args: any[]) => void) {\n        const map = GetOwnLifecycleCallbackMap(target);\n\n        if (!map.has(type)) {\n            map.set(type, []);\n        }\n\n        const callbacks = map.get(type)!;\n        callbacks.push(callback);\n        Metadata.setMetadata(LifecycleCallbackMapSymbol, target, map);\n    }\n\n    export function RemoveLifecycleCallback(target: Object, type: EventType, callback: (...args: any[]) => void) {\n        const map = GetOwnLifecycleCallbackMap(target);\n\n        if (!map.has(type)) {\n            return;\n        }\n\n        const callbacks = map.get(type)!;\n        map.set(type, callbacks.filter(curCallback => curCallback !== callback));\n        Metadata.setMetadata(LifecycleCallbackMapSymbol, target, map);\n    }\n\n    /** \n     *  @description Copy all metadata from the source map to the target map.\n     * \n     *  Note: This mutates the target map.\n     **/\n    export function CopySubjectTable(target: EventSubjectTable, source: EventSubjectTable, overwrite?: boolean): EventSubjectTable {\n        // Iterate over all source metadata properties...\n        source.forEach((propertySubjectMap, eventType) => propertySubjectMap.forEach((value, propertyKey) => {\n            let targetPropertySubjectMap: PropertySubjectMap;\n\n            // Get the property subject map (or create it if it doesn't exist for this eventType)\n            if (target.has(eventType)) {\n                targetPropertySubjectMap = target.get(eventType)!;\n            }\n            else {\n                targetPropertySubjectMap = new Map();\n                target.set(eventType, targetPropertySubjectMap);\n            }\n\n            // And add them to this class' metadata map if not already defined\n            if (overwrite || !targetPropertySubjectMap.has(propertyKey)) {\n                targetPropertySubjectMap.set(propertyKey, Object.assign({}, value));\n            }\n        }));\n\n        return target;\n    }\n\n    /** \n     *  @description Merge own and inheritted metadata into a single map.\n     * \n     *  Note: This mutates the object's metadata.\n     **/\n    export function CopyInherittedSubjectTable(object: any): EventSubjectTable {\n        if (object) {\n            let subjectTable = GetEventSubjectTable(object);\n            let inherittedTable = CopyInherittedSubjectTable(Object.getPrototypeOf(object));\n\n            // Merge own and inheritted metadata into a single map (note: this mutates object's metadata)\n            return CopySubjectTable(subjectTable, inherittedTable);\n        }\n\n        return new Map();\n    }\n}","import type { Observable } from \"rxjs\";\nimport type { Constructable, StringKey } from \"./lang-utils\";\nimport type { AsyncSourceKey, ValidAsyncSourceKey } from \"./metadata\";\nimport { ComponentStateMetadata, asyncStateKey } from \"./metadata\"\n\ntype ValidateAsyncSource<\n    T,\n    K extends StringKey<T>,\n    Source extends string | undefined = AsyncSourceKey<T, K>\n> = Source extends StringKey<T>\n    ? (T[Source] extends Observable<T[K]> ? T[Source] : never)\n    : never;\n\n/** @PropertyDecoratorFactory */\nexport function AsyncState<Source extends string | undefined = undefined>(asyncSource?: Source) {\n\n    /** @PropertyDecorator */\n    return function<ComponentT extends Constructable<any, any>, K extends StringKey<ComponentT>>(\n        target: Source extends undefined ? ComponentT : (ValidateAsyncSource<ComponentT, K, Source> extends never ? never : ComponentT),\n        key: Source extends undefined ? (ValidateAsyncSource<ComponentT, K> extends never ? never : K) : K\n    ) {\n        const asyncKey = (asyncSource ?? asyncStateKey<ComponentT, K>(key)) as ValidAsyncSourceKey<ComponentT>;\n\n        ComponentStateMetadata.AddManagedProperty<ComponentT>(target.constructor, { key, asyncSource: asyncKey });\n    }\n}\n","import { ChangeDetectorRef } from \"@angular/core\";\nimport { Metadata } from \"./metadata\";\n\nexport namespace AutoPush {\n\n    const CHANGE_DETECTOR_DATA = Symbol(\"cdRefData\");\n\n    type ChangeDetectorLike = Pick<ChangeDetectorRef, \"detectChanges\" | \"markForCheck\">;\n\n    interface Metadata {\n        changeDetector: ChangeDetectorProxy;\n        options: Options;\n    }\n\n    export interface ChangeDetectorProxy {\n        doCheck(): void;\n    }\n\n    export namespace ChangeDetectorProxy {\n\n        export function fromRef(ref: ChangeDetectorLike, options: CdRefOptions): ChangeDetectorProxy {\n            return {\n                doCheck() {\n                    if (options.forceDetectChanges) {\n                        ref.detectChanges();\n                    } else {\n                        ref.markForCheck();\n                    }\n                }\n            };\n        }\n    }\n\n    export interface Options {}\n\n    export interface CdRefOptions extends Options {\n        forceDetectChanges?: boolean;\n    }\n\n    export function changeDetector(component: any): ChangeDetectorProxy | undefined {\n        const metadata = changeDetectorMetadata(component);\n        return metadata ? metadata.changeDetector : undefined;\n    }\n\n    export function enable(component: any, changeDetector: ChangeDetectorLike, options?: CdRefOptions): void;\n    export function enable(component: any, changeDetector: ChangeDetectorProxy, options?: Options): void;\n\n    export function enable(component: any, changeDetector: ChangeDetectorLike | ChangeDetectorProxy, options: Options = {}) {\n        Metadata.setMetadata(CHANGE_DETECTOR_DATA, component, {\n            options,\n            changeDetector: isProxy(changeDetector) ? changeDetector : ChangeDetectorProxy.fromRef(changeDetector, options)\n        });\n    }\n\n    export function notifyChanges(component: any) {\n        // Check to see if AutoPush is enabled on this component\n        const cdData = changeDetectorMetadata(component);\n\n        if (cdData) {\n            // Notify change detector that there were changes to a component value\n            cdData.changeDetector.doCheck();\n        }\n    }\n\n    export function isChangeDetectorLike(object: any): object is ChangeDetectorLike {\n        return object && typeof object.detectChanges === \"function\";\n    }\n\n    function changeDetectorMetadata(component: any): Metadata {\n        return Metadata.getMetadata(CHANGE_DETECTOR_DATA, component);\n    }\n\n    function isProxy(input: any): input is ChangeDetectorProxy {\n        return input && typeof input.doCheck === \"function\";\n    }\n}","// Enable dynamic templating for Ivy-compiled components:\n/** @deprecated */\nexport function TemplateDynamic(): new(...args: any[]) => { [K in keyof any]: any[K]; } {\n    return class TemplateDynamic{};\n}\n\n/** @deprecated */\nexport abstract class LiComponent extends TemplateDynamic() {}\n","import { Subscription, Observable, Subject, BehaviorSubject, Subscriber, TeardownLogic, EMPTY, ReplaySubject, SchedulerLike } from \"rxjs\";\nimport { CommonMetadata, Metadata } from \"./metadata\";\n\nexport type Constructor<T> = new (...args: any[]) => T;\nexport type GenericConstructor<BaseT> = new<T extends BaseT> (...args: any[]) => T;\nexport type BaseObservable = Observable<unknown>;\n\n// TODO fix generics when TypeScript mixin issue is fixed: https://github.com/Microsoft/TypeScript/issues/24122\nexport function ManagedObservableWrapper/*<T, BaseObservable extends Observable<T>>*/($class: Constructor<BaseObservable>): GenericConstructor<BaseObservable> {\n\n    class _Managed extends $class {\n\n        protected subscriptions?: Subscription = new Subscription();\n\n        constructor(private componentInstance: any, ...args: any[]) {\n            super(...args);\n\n            // Automatically handle unsubscribing on component's ngOnDestroy event\n            this.subscriptions!.add(componentInstance[CommonMetadata.MANAGED_ONDESTROY_KEY].subscribe(() => {\n                // Mark the component instance as destroyed\n                Metadata.setMetadata(CommonMetadata.MANAGED_INSTANCE_DESTROYED_KEY, this.componentInstance, true);\n\n                this.subscriptions?.unsubscribe();\n                this.subscriptions = undefined;\n                this.componentInstance = undefined;\n\n                if (this instanceof Subject) {\n                    this.complete();\n                }\n            }));\n        }\n\n        public subscribe(...args: any[]): Subscription {\n            if (this.componentInstance && !CommonMetadata.instanceIsDestroyed(this.componentInstance)) {\n                const subscription = super.subscribe(...args);\n\n                // Manage new subscription\n                this.subscriptions!.add(subscription);\n                return subscription;\n            } else {\n                return EMPTY.subscribe();\n            }\n        }\n    };\n\n    return _Managed as GenericConstructor<BaseObservable>;\n}\n\nexport class ManagedObservable<T> extends ManagedObservableWrapper(Observable)<Observable<T>> {\n\n    constructor(componentInstance: any, subscribe?: (this: Observable<T>, subscriber: Subscriber<T>) => TeardownLogic) {\n        super(componentInstance, subscribe);\n    }\n}\n\nexport class ManagedSubject<T> extends ManagedObservableWrapper(Subject)<Subject<T>> {\n\n    constructor(componentInstance: any) {\n        super(componentInstance);\n    }\n}\n\nexport class ManagedBehaviorSubject<T> extends ManagedObservableWrapper(BehaviorSubject)<BehaviorSubject<T>> {\n\n    constructor(componentInstance: any, initialValue: T) {\n        super(componentInstance, initialValue);\n    }\n}\n\nexport class ManagedReplaySubject<T> extends ManagedObservableWrapper(ReplaySubject)<ReplaySubject<T>> {\n\n    constructor(componentInstance: any, bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike) {\n        super(componentInstance, bufferSize, windowTime, scheduler);\n    }\n}\n","export enum AngularLifecycleType {\n    OnChanges = \"ngOnChanges\",\n    OnInit = \"ngOnInit\",\n    OnDestroy = \"ngOnDestroy\",\n    DoCheck = \"ngDoCheck\",\n    AfterContentInit = \"ngAfterContentInit\",\n    AfterContentChecked = \"ngAfterContentChecked\",\n    AfterViewInit = \"ngAfterViewInit\",\n    AfterViewChecked = \"ngAfterViewChecked\"\n};\n\nexport namespace AngularLifecycleType {\n\n    export const values: AngularLifecycleType[] = [\n        AngularLifecycleType.OnChanges,\n        AngularLifecycleType.OnInit,\n        AngularLifecycleType.OnDestroy,\n        AngularLifecycleType.DoCheck,\n        AngularLifecycleType.AfterContentInit,\n        AngularLifecycleType.AfterContentChecked,\n        AngularLifecycleType.AfterViewInit,\n        AngularLifecycleType.AfterViewChecked\n    ];\n}","\nimport { Type } from \"@angular/core\";\nimport { Observable, Subject } from \"rxjs\";\nimport { EventMetadata, EventType, Metadata, CommonMetadata } from \"./metadata\";\nimport { ManagedSubject } from \"./managed-observable\";\nimport { AngularLifecycleType } from \"./lifecycle-event\";\n\nexport function EventSource(): PropertyDecorator;\nexport function EventSource(...methodDecorators: MethodDecorator[]): PropertyDecorator;\nexport function EventSource(options: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator;\n\n/** @PropertyDecoratorFactory */\nexport function EventSource(...args: any[]): PropertyDecorator {\n    let paramsArg: EventSource.DecoratorOptions | MethodDecorator | undefined;\n\n    if (args.length > 0) {\n        paramsArg = args[0];\n    }\n\n    if (!paramsArg || paramsArg instanceof Function) {\n        return EventSource.WithParams(undefined, ...args);\n    }\n    else {\n        return EventSource.WithParams(paramsArg, ...args.slice(1));\n    }\n}\n\nexport namespace EventSource {\n\n    export type DecoratorOptions = Partial<EventMetadata.ConfigOptions>;\n\n    /** @PropertyDecoratorFactory */\n    export function WithParams(options?: DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator {\n        options ??= {};\n\n        /** @PropertyDecorator */\n        return function(target: any, propertyKey: string | symbol) {\n            if (propertyKey !== CommonMetadata.MANAGED_ONDESTROY_KEY && !options!.unmanaged) {\n                // Ensure that we create a ngOnDestroy EventSource on the target for managing subscriptions\n                WithParams({ eventType: AngularLifecycleType.OnDestroy })(target, CommonMetadata.MANAGED_ONDESTROY_KEY);\n            }\n            \n            // If an eventType wasn't specified...\n            if (!options!.eventType) {\n                // Try to deduce the eventType from the propertyKey\n                if (typeof propertyKey === \"string\" && propertyKey.endsWith(\"$\")) {\n                    options!.eventType = propertyKey.substring(0, propertyKey.length - 1);\n                }\n                else {\n                    throw new Error(`@EventSource error: eventType could not be deduced from propertyKey \"${propertyKey as any}\" (only keys ending with '$' can be auto-deduced).`);\n                }\n            }\n\n            // Create the event source metadata for the decorated property\n            createMetadata(options as EventMetadata.SubjectInfo, target, propertyKey);\n\n            // Apply any method decorators to the facade function\n            methodDecorators.forEach(methodDecorator => methodDecorator(target, options!.eventType!, Object.getOwnPropertyDescriptor(target, options!.eventType!)!));\n        };\n    }\n\n    function bootstrapInstance(this: any, eventType: EventType, isLifecycleEvent?: boolean) {\n        const targetInstance: any = this;\n        \n        if (!isLifecycleEvent) {\n            // Assign the facade function for the given event type to the target instance\n            Facade.CreateAndAssign(eventType, targetInstance);\n        }\n\n        function classSubjectTableMerged(merged?: boolean): boolean | undefined {\n            if (merged === undefined) {\n                return !!Metadata.getMetadata(EventMetadata.SUBJECT_TABLE_MERGED_KEY, targetInstance);\n            } else {\n                Metadata.setMetadata(EventMetadata.SUBJECT_TABLE_MERGED_KEY, targetInstance, merged);\n            }\n            return undefined;\n        }\n\n        const subjectTable = EventMetadata.GetOwnEventSubjectTable(targetInstance);\n\n        if (!classSubjectTableMerged()) {\n            // Copy all event metadata from the class constructor to the target instance\n            EventMetadata.CopySubjectTable(subjectTable, EventMetadata.CopyInherittedSubjectTable(targetInstance.constructor), true);\n            classSubjectTableMerged(true);\n        }\n\n        const propertySubjectMap = subjectTable.get(eventType);\n\n        // Iterate over each of the target properties for each proxied event type used in this class\n        propertySubjectMap?.forEach((subjectInfo, propertyKey) => {\n            // If the event proxy subject hasn't been created for this property yet...\n            if (!subjectInfo.subject) {\n                // Create a new Subject\n                if (subjectInfo.unmanaged || propertyKey === CommonMetadata.MANAGED_ONDESTROY_KEY) {\n                    subjectInfo.subject = new Subject<any>();\n                } else {\n                    subjectInfo.subject = new ManagedSubject<any>(targetInstance);\n                }\n            }\n\n            // Set the property key to a function that will invoke the facade method when called\n            // (This is needed to allow EventSources to work with Angular event decorators like @HostListener)\n            // Compose the function with the observable\n            // TODO - Figure out a better way to do this with Ivy\n            let propertyValue: Observable<any> & Function = Object.setPrototypeOf(Facade.Create(eventType), subjectInfo.subject);\n\n            Object.defineProperty(targetInstance, propertyKey, {\n                get: () => propertyValue\n            });\n        });\n\n        EventMetadata.GetInstanceBootstrapMap(targetInstance).set(eventType, true);\n    }\n\n    namespace Facade {\n\n        /** @description\n         *  Creates an event facade function (the function that is invoked during an event) for the given event type.\n         */\n        export function Create(eventType: EventType): ((...value: any[]) => void) & { eventType: EventType } {\n            return Object.assign(function (this: any, ...values: any[]) {\n                // Get the list of subjects to notify for this `eventType`\n                const subjectInfoList = Array.from(EventMetadata.GetPropertySubjectMap(eventType, this).values());\n                // Use the first value from this event if only a single value was given, otherwise emit all given values as an array to the Subject\n                const valueToEmit = (values.length > 1) ? values : (values.length > 0) ? values[0] : undefined;\n\n                // Iterate in reverse order for ngOnDestroy eventTypes.\n                // This ensures that all user-defined OnDestroy EventSources are fired before final cleanup of subscriptions.\n                if (eventType === \"ngOnDestroy\") {\n                    subjectInfoList.reverse();\n                }\n                \n                // Emit the given event value to each interested subject\n                subjectInfoList\n                    .filter(subjectInfo => !!subjectInfo.subject)\n                    .forEach(subjectInfo => subjectInfo.subject.next(valueToEmit));\n            }, { eventType });\n        }\n\n        export function CreateAndAssign(eventType: EventType, instance: any): void {\n            // Assign the facade function for the given event type to the appropriate target class method\n            // This function gets called from the view template and triggers the associated Subject\n            Object.defineProperty(instance, eventType, {\n                enumerable: true,\n                value: Create(eventType)\n            });\n        }\n    }\n\n    function createMetadata(options: EventMetadata.SubjectInfo, target: any, propertyKey: string | symbol) {\n        const ContainsCustomMethod = ($class = target): boolean => {\n            const methodDescriptor = Object.getOwnPropertyDescriptor($class, options.eventType);\n            const method = methodDescriptor ? (methodDescriptor.value || methodDescriptor.get) : undefined; \n            const isCustomMethod = method && method.eventType !== options.eventType;\n            return isCustomMethod || (!method && target.prototype && ContainsCustomMethod(target.prototype));\n        };\n\n        // Determine if this EventSource is handling an Angular lifecycle event\n        const isLifecycleEvent = AngularLifecycleType.values.includes(options.eventType as AngularLifecycleType);\n\n        if (!options.skipMethodCheck && ContainsCustomMethod()) {\n            // Make sure the target class doesn't have a custom method already defined for this event type\n            throw new Error(`@EventSource metadata creation failed. Class already has a custom ${options.eventType} method.`);\n        }\n\n        // Add ths EventSource definition to the class' metadata\n        EventMetadata.GetOwnPropertySubjectMap(options.eventType, target.constructor).set(propertyKey, options);\n\n        if (isLifecycleEvent) {\n            registerLifecycleEventFacade(target.constructor, options.eventType);\n        }\n\n        // Initialize the propertyKey on the target to a self-bootstrapper that will initialize an instance's EventSource when called\n        Object.defineProperty(target, propertyKey, {\n            configurable: true,\n            get: function () {\n                // Ensure we only bootstrap once for this `eventType` if the intializer is re-invoked (Ivy)\n                if (!isBootstrapped.call(this, options.eventType)) {\n                    // Boostrap the event source for this instance\n                    bootstrapInstance.bind(this)(options.eventType, isLifecycleEvent);\n                }\n                \n                // Return the Observable for the event\n                return this[propertyKey];\n            }\n        });\n\n        // Only initialize a bootstrapper function for the eventType if this isn't a lifecycle event (otherwise Ivy will handle it)\n        if (!isLifecycleEvent) {\n            // Set the eventType on the target to a self-bootstrapper function that will initialize an instance's EventSource when called\n            Object.defineProperty(target, options.eventType, {\n                configurable: true,\n                writable: true,\n                value: Object.assign(function (this: any, ...args: any[]) {\n                    // Ensure we only bootstrap once for this `eventType` if the intializer is re-invoked (Ivy)\n                    if (!isBootstrapped.call(this, options.eventType)) {\n                        // Boostrap the event source for this instance\n                        bootstrapInstance.bind(this)(options.eventType);\n                    }\n\n                    // Invoke the facade function for the event\n                    return this[options.eventType].call(this, ...args);\n                }, { eventType: options.eventType })\n            });\n        }\n    }\n\n    function registerLifecycleEventFacade(targetClass: Type<any>, eventType: EventType) {\n        const registrationMap = EventMetadata.GetLifecycleRegistrationMap(targetClass);\n        \n        // Register the facade function for this component lifecycle target if we haven't already\n        if (!registrationMap.get(eventType)) {\n            const ownRegistrationMap = EventMetadata.GetOwnLifecycleRegistrationMap(targetClass);\n\n            registerLifecycleEvent(targetClass, eventType, Facade.Create(eventType));\n            ownRegistrationMap.set(eventType, true);\n        }\n    }\n\n    /**\n     * @description Registers a lifecycle event handler for use with `registerPreOrderHooks`/`registerPostOrderHooks`\n     */\n    export function registerLifecycleEvent(targetClass: Type<any>, eventType: EventType, hookFn: (...args: any[]) => void) {\n        EventMetadata.AddLifecycleCallback(targetClass, eventType, hookFn);\n\n        // Ensure a valid prototype exists for this component\n        if (!targetClass.prototype) {\n            targetClass.prototype = Object.create({});\n        }\n\n        // Get the name of the hook for this lifecycle event\n        const hookName = eventType as AngularLifecycleType;\n        // Store a reference to the original hook function\n        const prevLifecycleHook = targetClass.prototype[hookName];\n\n        // Replace the default lifecycle hook with a modified one that ensures the given hook fns are invoked\n        if (!prevLifecycleHook?.eventType) {\n            targetClass.prototype[hookName] = Object.assign(function (this: any, ...args: any[]) {\n                // Call the previous hook function on the component instance if there is one\n                if (prevLifecycleHook) {\n                    prevLifecycleHook.call(this, ...args);\n                }\n\n                // Invoke all of the hook functions associated with this lifeycle event for the current component instance\n                const hookFns = EventMetadata.GetLifecycleCallbackList(this.constructor, eventType);\n                hookFns.forEach(hookFn => hookFn.call(this, ...args));\n            }, { eventType });\n        }\n    }\n\n    export function unregisterLifecycleEvent(targetClass: Type<any>, eventType: EventType, hookFn: (...args: any[]) => void) {\n        EventMetadata.RemoveLifecycleCallback(targetClass, eventType, hookFn);\n    }\n\n    function isBootstrapped(this: any, eventType: EventType): boolean {\n        const map = EventMetadata.GetInstanceBootstrapMap(this);\n        return map.has(eventType) ? map.get(eventType)! : false;\n    }\n}","import type { Constructable, IfEquals, IfReadonly, StringKey } from \"./lang-utils\";\nimport { AsyncSourceKey, EmitterMetadata } from \"./metadata\";\nimport { EventEmitter, FactoryProvider, Injector, resolveForwardRef, Type } from \"@angular/core\";\nimport { combineLatest, forkJoin, from, merge, Observable, of, ReplaySubject, Subject, Subscription, throwError } from \"rxjs\";\nimport { distinctUntilChanged, filter, map, mergeMap, skip, switchMap, takeUntil, tap } from \"rxjs/operators\";\nimport { AutoPush } from \"./autopush\";\nimport { ManagedBehaviorSubject, ManagedObservable } from \"./managed-observable\";\nimport { EventSource } from \"./event-source\";\nimport { AngularLifecycleType } from \"./lifecycle-event\";\nimport { ComponentStateMetadata, CommonMetadata, asyncStateKey } from \"./metadata\";\n\nconst COMPONENT_STATE_IDENTITY = Symbol(\"COMPONENT_STATE_IDENTITY\");\n\nexport type ComponentState<ComponentT> = ComponentState.Of<ComponentT>;\n\ntype ComponentClassProvider<ComponentT> = Type<ComponentT> | Type<unknown>;\n\nexport type ManagedComponent = Constructable<any, any> & { [CommonMetadata.MANAGED_ONDESTROY_KEY]: Observable<void> };\n\nexport class ComponentStateRef<ComponentT> extends Promise<ComponentState<ComponentT>> {\n\n    public componentInstance!: ComponentT & ManagedComponent;\n\n    /**\n     * @description Resolves the `ComponentState` instance for this reference.\n     * @returns An `Observable` that emits the `ComponentState` instance for this reference.\n     */\n    public state(): Observable<ComponentState<ComponentT>> {\n        return from(this);\n    }\n\n    /**\n     * @description Returns an `Observable` that represents the current value of the given state property and emits whenever the value of the given state\n     * property is changed.\n     * @param stateProp - The state property to observe.\n     * @returns An `Observable` that emits the value of the given state property and re-emits when the value is changed.\n     */\n    public get<K extends StringKey<ComponentT>>(\n        stateProp: ComponentState.ReadableKey<ComponentT, K>\n    ): Observable<ComponentT[K]> {\n        const stateKey = ComponentState.stateKey<ComponentT, K>(stateProp);\n        const resolvedSource$ = this.resolvedState?.[stateKey];\n\n        if (resolvedSource$) {\n            return resolvedSource$ as unknown as Observable<ComponentT[K]>;\n        } else {\n            return this.state().pipe(\n                mergeMap((state: ComponentState<ComponentT>) => {\n                    if (!state[stateKey]) {\n                        return throwError(\n`[ComponentStateRef] Failed to get state for component property \"${stateProp}\". Ensure that this property is explicitly initialized (or declare it with @DeclareState()).`\n                        );\n                    }\n    \n                    return state[stateKey] as unknown as Observable<ComponentT[K]>;\n                })\n            );\n        }\n    }\n\n    /**\n     * @description Returns an array of `Observable`s that represents the current value for each given state property. Each `Observable` emits whenever a\n     * value of the corresponding given state property is changed.\n     * @param stateProps - The state properties to observe.\n     * @returns An array of `Observable`s that represents the current value for each given state property and re-emits when the corresponding value is\n     * changed.\n     */\n    public getAll<\n        K extends Array<ComponentState.ReadableKey<ComponentT, StringKey<ComponentT>>>\n    >(...stateProps: K): ComponentState.StateSelector<ComponentT, K> {\n        return stateProps.map(stateProp => this.get(stateProp)) as ComponentState.StateSelector<ComponentT, K>;\n    }\n\n    /**\n     * @description Returns an `EventEmitter` that emits whenever the value of the given state property is changed.\n     * @param stateProp - The state property to observe.\n     * @returns An `EventEmitter` instance that emits whenever the value of the given state property is changed.\n     */\n     public emitter<K extends StringKey<ComponentT>>(\n        stateProp: ComponentState.ReadableKey<ComponentT, K>\n    ): EventEmitter<ComponentT[K]> {\n        const emitter$ = new EventEmitter<ComponentT[K]>();\n\n        this.get<K>(stateProp)\n            .pipe(skip(1))\n            .subscribe({\n                next: value => emitter$.emit(value),\n                error: err => emitter$.error(err)\n            });\n        return emitter$;\n    }\n\n    /**\n     * @description Updates the value of the given state property with the given value. Equivalent to assigning to the component state property directly.\n     * @param stateProp - The state property to update. This property must not be readonly.\n     * @param value - The new value to update to.\n     * @returns An `Observable` that emits and completes when the value has been updated.\n     */\n    public set<K extends StringKey<ComponentT>, V extends ComponentT[K]>(\n        stateProp: ComponentState.WritableKey<ComponentT, K>,\n        value: V\n    ): Observable<void> {\n        const stateKey = ComponentState.stateKey<ComponentT, K>(stateProp);\n        const result$ = new ReplaySubject<void>(1);\n        const resolvedSource$ = this.resolvedState?.[stateKey] as unknown as Subject<V>;\n\n        if (resolvedSource$) {\n            resolvedSource$.next(value);\n            result$.next();\n            result$.complete();\n        } else {\n            this.state().pipe(\n                map((state) => {\n                    const stateSubject$ = state[ComponentState.stateKey<ComponentT, K>(stateProp)] as any as Subject<V>;\n    \n                    if (!stateSubject$) {\n                        throw new Error(\n`[ComponentStateRef] Failed to set state for component property \"${stateProp}\". Ensure that this property is explicitly initialized (or declare it with @DeclareState()).`\n                        );\n                    }\n\n                    return stateSubject$;\n                })\n            ).subscribe((stateSubject$) => {\n                stateSubject$.next(value);\n                result$.next();\n                result$.complete();\n            }, (e) => {\n                result$.error(e);\n                result$.complete();\n            }, () => result$.complete());\n        }\n\n        return result$;\n    }\n\n    /**\n     * @description Subscribes the given state property to the given source `Observable`. If `managed` is set to true, the lifetime of the subscription will\n     * be managed and cleaned up when the component is destroyed.\n     * @param stateProp - The state property to receive source updates. This property must not be readonly.\n     * @param source$ - The source `Observable` to subscribe to.\n     * @param managed - Whether or not the subscription lifetime should be managed. Defaults to `true`.\n     * @returns A `Subscription` representing the subscription to the source.\n     */\n    public subscribeTo<K extends StringKey<ComponentT>, V extends ComponentT[K]>(\n        stateProp: ComponentState.WritableKey<ComponentT, K>,\n        source$: Observable<V>,\n        managed: boolean = true\n    ): Subscription {\n        let managedSource$: Observable<V>;\n        if (managed) {\n            managedSource$ = this.state().pipe(\n                mergeMap(() => _createManagedSource<ManagedComponent, V, Observable<V>>(source$, this.componentInstance))\n            );\n        } else {\n            managedSource$ = source$;\n        }\n\n        return managedSource$.pipe(\n            tap(sourceValue => this.set<K, V>(stateProp, sourceValue))\n        ).subscribe();\n    }\n\n    /**\n     * @description Synchronizes the values of the given state properties such that any changes from one state property will be propagated to the\n     * other state property. The initial value of the first given state property is used.\n     * @param statePropA - The first state property to synchronize. This property must not be readonly.\n     * @param statePropB - The second state property to synchronize. This property must not be readonly.\n     */\n    public sync<\n        K1 extends StringKey<ComponentT>,\n        K2 extends StringKey<ComponentT>,\n        V extends IfEquals<ComponentT[K1], ComponentT[K2]> extends true ? ComponentT[K1] & ComponentT[K2] : never\n    >(\n        statePropA: V extends never ? never : ComponentState.WritableKey<ComponentT, K1>,\n        statePropB: V extends never ? never : ComponentState.WritableKey<ComponentT, K2>\n    ): void {\n        let syncing = false;\n        \n        merge(this.get(statePropB), this.get(statePropA)).pipe(\n            skip(1),\n            distinctUntilChanged(),\n            filter(() => !syncing),\n            tap(() => syncing = true),\n            mergeMap((value) => combineLatest([\n                this.set<K1, V>(statePropA, value as V),\n                this.set<K2, V>(statePropB, value as V)\n            ])),\n            tap(() => syncing = false)\n        ).subscribe();\n    }\n\n    /**\n     * @description Synchronizes the values of the given state property and source `Subject` such that any changes from the state property will be\n     * propagated to the source `Subject` and vice versa. The initial value of the source `Subject` is used.\n     * @param stateProp - The state property to synchronize. This property must not be readonly.\n     * @param source$ - The source `Subject` to synchronize with.\n     */\n    public syncWith<K extends StringKey<ComponentT>>(\n        stateProp: ComponentState.WritableKey<ComponentT, K>,\n        source$: Subject<ComponentT[K]>\n    ): void;\n\n    /**\n     * @description Synchronizes the state of `stateProp` and `sourceProp`, a property from another `ComponentStateRef`, such that any changes from \n     * `stateProp` will be propagated to `sourceProp` and vice versa. The initial state value of `sourceProp` is used.\n     * @param stateProp - The state property to synchronize. This property must not be readonly.\n     * @param sourceState - The source `ComponentStateRef` instance.\n     * @param sourceProp - The source state property from `sourceState` to synchronize with. This property must not be readonly.\n     */\n    public syncWith<\n        ComponentT2,\n        K1 extends StringKey<ComponentT>,\n        K2 extends StringKey<ComponentT2>,\n        V extends IfEquals<ComponentT[K1], ComponentT2[K2]> extends true ? ComponentT[K1] & ComponentT2[K2] : never\n    >(\n        stateProp: V extends never ? never : ComponentState.WritableKey<ComponentT, K1>,\n        sourceState: ComponentStateRef<ComponentT2>,\n        sourceProp: V extends never ? never : ComponentState.WritableKey<ComponentT2, K2>\n    ): void;\n    \n    public syncWith<\n        ComponentT2,\n        K1 extends StringKey<ComponentT>,\n        K2 extends StringKey<ComponentT2>,\n    >(\n        stateProp: ComponentState.WritableKey<ComponentT, K1>,\n        source: Subject<ComponentT[K1]> | ComponentStateRef<ComponentT2>,\n        sourceProp?: ComponentState.WritableKey<ComponentT2, K2>\n    ): void {\n        let syncing = false;\n        \n        this.state().pipe(\n            switchMap(() => merge(\n                this.get(stateProp).pipe(skip(1)),\n                source instanceof Subject\n                    ? _createManagedSource(source, this.componentInstance)\n                    : source.get(sourceProp!)\n            )),\n            distinctUntilChanged(),\n            filter(() => !syncing),\n            tap(() => syncing = true),\n            mergeMap((value) => {\n                return forkJoin([\n                    source instanceof Subject\n                        ? of(source!.next(value as ComponentT[K1]))\n                        : source.set<K2, ComponentT2[K2]>(sourceProp!, value as ComponentT2[K2]),\n                    this.set(stateProp, value as ComponentT[K1])\n                ]);\n            }),\n            tap(() => syncing = false)\n        ).subscribe();\n    }\n\n    private get resolvedState(): ComponentState<ComponentT> | undefined {\n        return (this.componentInstance as any)?.[COMPONENT_STATE_IDENTITY];\n    }\n}\n\nexport namespace ComponentState {\n\n    export interface CreateOptions {\n        lazy?: boolean;\n    }\n\n    export type ReactiveStateKey<ComponentT, K extends keyof ComponentT = keyof ComponentT> =\n        K extends string ? AsyncSourceKey<ComponentT, K> : never;\n\n    type QualifiedStateKey<ComponentT, K extends keyof ComponentT = keyof ComponentT> =\n        K extends `${infer _K}$` ? never : K;\n\n    export type StateKey<ComponentT> = keyof {\n        [K in keyof ComponentT as QualifiedStateKey<ComponentT, K>]: never\n    };\n\n    export type Of<ComponentT> = {\n        readonly [K in keyof ComponentT as ReactiveStateKey<ComponentT, QualifiedStateKey<ComponentT, K>>]-?:\n            IfReadonly<ComponentT, K> extends true ? Observable<ComponentT[K]> : Subject<ComponentT[K]>;\n    };\n\n    export type ReadableKey<ComponentT, K extends keyof ComponentT = keyof ComponentT> =\n        K extends StateKey<ComponentT> ? K : never;\n\n    export type WritableKey<ComponentT, K extends keyof ComponentT = keyof ComponentT> =\n        IfReadonly<ComponentT, K> extends true ? never : ReadableKey<ComponentT, K>;\n\n    export type StateSelector<ComponentT, K extends Array<ReadableKey<ComponentT>>> = \n        { [I in keyof K]: K[I] extends ReadableKey<ComponentT> ? Observable<ComponentT[K[I]]> : never };\n\n    type StateRecord<ComponentT, K extends keyof ComponentT = keyof ComponentT> = Record<ReactiveStateKey<ComponentT, K>, Observable<ComponentT[K]>>;\n\n    export function create<ComponentT>(\n        $class: ComponentClassProvider<ComponentT>,\n        options?: CreateOptions\n    ): FactoryProvider {\n        return createComponentState<ComponentT>($class, options);\n    }\n\n    export function createFactory<ComponentT>(\n        $class: ComponentClassProvider<ComponentT>,\n        options?: CreateOptions\n    ): (injector: Injector) => ComponentStateRef<ComponentT> {\n        options ??= {\n            lazy: isForwardRef($class)\n        };\n\n        if (!options!.lazy) {\n            if (isForwardRef($class)) {\n                throw new Error(\"[ComponentState] A component state created with forwardRef must be created with the `lazy` flag.\");\n            }\n\n            const resolvedClass = resolveClass<ComponentT>($class);\n\n            // Generate initial component state on ngOnInit\n            updateStateOnEvent(resolvedClass, AngularLifecycleType.OnInit);\n\n            // Update the component state on afterViewInit and afterContentInit to capture dynamically initialized properties\n            updateStateOnEvent(resolvedClass, AngularLifecycleType.AfterContentInit);\n            updateStateOnEvent(resolvedClass, AngularLifecycleType.AfterViewInit);\n        }\n        \n        return function (injector: Injector): ComponentStateRef<ComponentT> {\n            const stateRef = new ComponentStateRef<ComponentT>((resolve) => {\n                const resolvedClass = resolveClass<ComponentT>($class);\n                const delayedInitializer = setTimeout(() => {\n                    // If the stateRef has not been initialized by the end of the current execution frame (e.g. the service was \n                    // injected after component's lifecycle events were invoked), we need to resolve it now.\n\n                    const instance: any = injector.get(resolvedClass);\n                    stateRef.componentInstance = instance;\n\n                    updateState(_requireComponentState(instance), instance);\n\n                    // Resolve the component state\n                    resolve(instance[COMPONENT_STATE_IDENTITY]);\n                });\n\n                if (options!.lazy) {                \n                    // Generate initial component state on ngOnInit\n                    updateStateOnEvent(resolvedClass, AngularLifecycleType.OnInit, injector, (instance) => {\n                        clearTimeout(delayedInitializer);\n\n                        stateRef.componentInstance = instance;\n                    });\n\n                    // Update the component state on afterViewInit and afterContentInit to capture dynamically initialized properties\n                    updateStateOnEvent(resolvedClass, AngularLifecycleType.AfterContentInit, injector);\n                    updateStateOnEvent(resolvedClass, AngularLifecycleType.AfterViewInit, injector, (instance) => {\n                        clearTimeout(delayedInitializer);\n\n                        // Resolve the component state\n                        resolve(instance[COMPONENT_STATE_IDENTITY]);\n                    });\n                } else {\n                    updateOnEvent(resolvedClass, AngularLifecycleType.OnInit, (instance: any) => {\n                        clearTimeout(delayedInitializer);\n\n                        stateRef.componentInstance = instance;\n                    }, injector);\n\n                    updateOnEvent(resolvedClass, AngularLifecycleType.AfterViewInit, (instance: any) => {\n                        clearTimeout(delayedInitializer);\n\n                        // Resolve the component state\n                        resolve(instance[COMPONENT_STATE_IDENTITY]);\n                    }, injector);\n                }\n            });\n\n            return stateRef;\n        }\n    }\n\n    export function tokenFor(provider: FactoryProvider): any {\n        return stateTokenFor(provider);\n    }\n\n    export function stateKey<ComponentT, K extends StringKey<ComponentT> = StringKey<ComponentT>>(\n        key: K\n    ): ReactiveStateKey<ComponentT, K> & keyof Of<ComponentT> {\n        return asyncStateKey<ComponentT, K>(key) as any;\n    }\n\n    function updateStateOnEvent<ComponentT>(\n        $class: Type<ComponentT>,\n        event: AngularLifecycleType,\n        injector?: Injector,\n        onComplete?: (instance: any) => void\n    ): void {\n        updateOnEvent($class, event, (instance: any) => {\n            updateState(_requireComponentState(instance), instance);\n\n            if (onComplete) {\n                onComplete(instance);\n            }\n        }, injector);\n    }\n\n    function updateOnEvent<ComponentT>(\n        $class: Type<ComponentT>,\n        event: AngularLifecycleType,\n        onUpdate: (instance: any) => void,\n        injector?: Injector\n    ): void {\n        onEvent($class, event, function onEventFn(this: ThisType<any>) {\n            const instance: any = injector ? injector.get($class, null, { self: true }) : this;\n\n            if (instance === this) {\n                onUpdate(instance);\n\n                // Only de-register instance-specific event handlers\n                if (injector) {\n                    offEvent($class, event, onEventFn);\n                }\n            }\n        });\n    }\n\n    function onEvent<ComponentT>(\n        $class: Type<ComponentT>,\n        event: AngularLifecycleType,\n        callback: () => void\n    ): void {\n        // Ensure that we create a OnDestroy EventSource on the target for managing subscriptions\n        EventSource({ eventType: AngularLifecycleType.OnDestroy })($class.prototype, CommonMetadata.MANAGED_ONDESTROY_KEY);\n\n        // Register a lifecycle event listener for the given event\n        EventSource.registerLifecycleEvent($class, event, callback);\n    }\n\n    function offEvent<ComponentT>(\n        $class: Type<ComponentT>,\n        event: AngularLifecycleType,\n        callback: () => void\n    ): void {\n        EventSource.unregisterLifecycleEvent($class, event, callback);\n    }\n\n    function updateState<ComponentT extends ManagedComponent>(\n        componentState: Partial<StateRecord<ComponentT>>,\n        instance: ComponentT\n    ): Partial<StateRecord<ComponentT>> {\n        const instanceProps = getAllAccessibleKeys<ComponentT>(instance);\n\n        // Create a managed reactive state wrapper for each component property\n        instanceProps.forEach((prop) => {\n            // Only update an entry if it hasn't yet been defined\n            if (!componentState[ComponentState.stateKey<ComponentT>(prop.key)]) {\n                updateStateForProperty(\n                    componentState,\n                    instance,\n                    prop\n                );\n            }\n        });\n\n        return componentState;\n    }\n\n    function updateStateForProperty<ComponentT extends ManagedComponent, K extends StringKey<ComponentT>>(\n        componentState: Partial<StateRecord<ComponentT>>,\n        instance: ComponentT,\n        prop: ComponentStateMetadata.ManagedProperty<ComponentT, K>\n    ): Partial<StateRecord<ComponentT>> {\n        const propDescriptor = Object.getOwnPropertyDescriptor(instance, prop.key);\n        const stateSubjectProp = stateKey<ComponentT, K>(prop.key);\n\n        if (typeof prop.key === \"string\" && !prop.key.endsWith(\"$\") && !EmitterMetadata.GetMetadataMap(instance).get(prop.key)) {\n\n            if (!propDescriptor || propDescriptor.configurable) {\n                let lastValue: ComponentT[K] = instance[prop.key];\n                const propSubject$ = new ManagedBehaviorSubject<ComponentT[K]>(instance, lastValue);\n\n                function manageProperty<_K extends StringKey<ComponentT>>(\n                    instance: ComponentT,\n                    property: _K,\n                    enumerable: boolean\n                ): void {\n                    const stateProp = stateKey<ComponentT, _K>(property);\n                    componentState[stateProp] = propSubject$;\n\n                    // Override the instance property with a getter/setter that synchronizes with `propSubject$`\n                    Object.defineProperty(instance, property, {\n                        configurable: true,\n                        enumerable: enumerable,\n                        get: () => lastValue,\n                        set: isReadonlyProperty(instance, property) ? undefined : (newValue: ComponentT[K]): void => propSubject$.next(newValue)\n                    });\n                }\n\n                // Monitor the property subject for value changes\n                propSubject$.pipe(skip(1)).subscribe(value => {\n                    // Update the cached value\n                    lastValue = value;\n\n                    // Notify the component of changes if AutoPush is enabled\n                    AutoPush.notifyChanges(instance);\n                });\n\n                if (prop.asyncSource) {\n                    const reactiveSource$ = instance[prop.asyncSource];\n\n                    // If the property has a valid async source, create a managed subscription to it\n                    if (reactiveSource$ && reactiveSource$ instanceof Observable) {\n                        _createManagedSource(reactiveSource$, instance)\n                            .subscribe((value: any) => propSubject$.next(value));\n                    }\n                }\n\n                // Set up the property wrapper that exposes the backing subject\n                try {\n                    manageProperty(instance, prop.key, !propDescriptor || !!propDescriptor.enumerable);\n\n                    // If a separate publicKey was defined, also map it to the backing subject\n                    if (prop.publicKey && prop.publicKey !== prop.key) {\n                        manageProperty(instance, prop.publicKey, true);\n                    }\n                } catch (e) {\n                    console.error(`Failed to create state Subject for property ${instance.constructor.name}.${prop.key}`, e);\n                }\n            } else {\n                if (!propDescriptor.configurable && !isReadonlyProperty(instance, prop.key)) {\n                    console.warn(`[ComponentState] Property \"${instance.constructor.name}.${prop.key}\" is not configurable and will be treated as readonly.`);\n                }\n\n                // Property is readonly, so just use an Observable that emits the underlying state on subscription\n                componentState[stateSubjectProp] = new ManagedObservable(instance, observer => {\n                    observer.next(propDescriptor.get ? propDescriptor.get() : propDescriptor.value);\n                });\n            }\n        }\n\n        return componentState;\n    }\n\n    function isReadonlyProperty<T, K extends keyof T>(instance: T, key: K): boolean {\n        const publicPropDescriptor = Object.getOwnPropertyDescriptor(instance, key);\n        return !!publicPropDescriptor && !publicPropDescriptor.writable && !publicPropDescriptor.set;\n    }\n\n    function isForwardRef($class: Type<any>): boolean {\n        return !$class.name;\n    }\n\n    function resolveClass<ComponentT>($class: Type<any>): Type<ComponentT> {\n        return resolveForwardRef<Type<ComponentT>>($class);\n    }\n\n    function getAllAccessibleKeys<T extends Record<string, any> & ManagedComponent>(instance: T): ComponentStateMetadata.ManagedPropertyList<T> {\n        // Ensure managed keys are processed first\n        return getManagedKeys(instance).concat(getPublicKeys(instance));\n    }\n\n    function getPublicKeys<T>(instance: T): ComponentStateMetadata.ManagedPropertyList<T> {\n        return (Object.keys(instance as object) as Array<StringKey<T>>).map(key => ({ key }));\n    }\n\n    function getManagedKeys<T extends ManagedComponent>(instance: T): ComponentStateMetadata.ManagedPropertyList<T> {\n        return ComponentStateMetadata.GetInheritedManagedPropertyList<T>(instance.constructor);\n    }\n}\n\nexport function createComponentState<ComponentT>(\n    $class: ComponentClassProvider<ComponentT>,\n    options?: ComponentState.CreateOptions\n): FactoryProvider {\n    return {\n        provide: ComponentStateRef,\n        useFactory: ComponentState.createFactory<ComponentT>($class, options),\n        deps: [Injector]\n    };\n}\n\nexport function stateTokenFor(provider: FactoryProvider): any {\n    return provider.provide;\n}\n\nexport function _requireComponentState<T extends { [COMPONENT_STATE_IDENTITY]?: Partial<ComponentState<T>> } & Record<any, any>>(\n    instance: T,\n    initValue: Partial<ComponentState<T>> = {}\n): Partial<ComponentState<T>> {\n    instance[COMPONENT_STATE_IDENTITY] ??= initValue;\n    return instance[COMPONENT_STATE_IDENTITY]!;\n}\n\nfunction _createManagedSource<\n    ComponentT extends ManagedComponent,\n    T,\n    S$ extends Observable<T>\n>(source$: S$, instance: ComponentT): Observable<T> {\n    return source$.pipe(\n        takeUntil(instance[CommonMetadata.MANAGED_ONDESTROY_KEY])\n    );\n}\n","import type { Constructable, IfEquals, Publicize, StringKey } from \"./lang-utils\";\nimport { ComponentStateMetadata } from \"./metadata\";\n\n/** @description Ensures that `T[Name]` is the same type as `T[K]`.\n * `K` is not required to be a strict `keyof T` since it may be a private field.\n */\ntype ValidateName<\n   T extends Record<string, any>,\n   K extends string, Name extends string | undefined\n> = Name extends keyof T\n      ? (IfEquals<T[Name], Publicize<T, K>[K]> extends true ? Name : never)\n      : never\n\n/** @PropertyDecoratorFactory\n * @description Explicitly declares the decorated property as a stateful property to be tracked by `ComponentStateRef`.\n * @param publicName (Optional) The public property that this state should be exposed through.\n*/\nexport function DeclareState<Name extends string | undefined = undefined>(publicName?: Name) {\n\n   /** @PropertyDecorator */\n   return function<ComponentT extends Constructable<any, any>, K extends string>(\n      target: Name extends undefined ? ComponentT : (ValidateName<ComponentT, K, Name> extends never ? never : ComponentT),\n      propKey: K\n   ) {\n      const key = propKey as any;\n      const publicKey: StringKey<ComponentT> = publicName as ValidateName<ComponentT, K, Name>;\n\n      ComponentStateMetadata.AddManagedProperty(target.constructor, { key, publicKey });\n   }\n}\n","import { FactoryProvider, InjectionToken, Injector, Type } from \"@angular/core\";\nimport { ComponentState, ComponentStateRef, stateTokenFor } from \"./component-state\";\n\nexport type DirectiveState<DirectiveT> = ComponentState<DirectiveT>;\nexport type DirectiveStateRef<DirectiveT> = ComponentStateRef<DirectiveT>;\n\nexport const DirectiveStateRef = ComponentStateRef;\n\nexport namespace DirectiveState {\n\n    export type CreateOptions = ComponentState.CreateOptions;\n\n    export function create<DirectiveT>(\n        $class: Type<any>,\n        options?: CreateOptions\n    ): FactoryProvider {\n        return createDirectiveState<DirectiveT>($class, options);\n    }\n\n    export function tokenFor(provider: FactoryProvider): any {\n        return stateTokenFor(provider);\n    }\n}\n\nexport function createDirectiveState<DirectiveT>(\n    $class: Type<any>,\n    options?: DirectiveState.CreateOptions\n): FactoryProvider {\n    return {\n        // If $class is a declaration and not a forwardRef, provide service as DirectiveStateRef (structural directives)\n        // If $class is a forwardRef, provide service as a unique token (attribute directives)\n        provide: $class.name ? DirectiveStateRef : new InjectionToken<DirectiveT>($class.name),\n        useFactory: ComponentState.createFactory<DirectiveT>($class, options),\n        deps: [Injector]\n    };\n}\n","export type StringKey<T> = (keyof T & string);\n\nexport type IfEquals<X, Y> =\n    (<T>() => T extends X ? 1 : 2) extends\n    (<T>() => T extends Y ? 1 : 2) ? true : false;\n\nexport type IfReadonly<T, K extends keyof T> =\n    IfEquals<{ [P in K]: T[P] }, { readonly [P in K]: T[P] }>;\n\nexport type Publicize<T extends Record<string, any>, K extends string> =\n    Omit<T, K> & Record<K, T[K]>;\n\nexport type Constructable<T, Ctor = (...args: any[]) => T> = { constructor: Ctor };\n\nexport type ImmutableMap<M extends Map<unknown, unknown>> = Omit<M, \"set\" | \"clear\" | \"delete\">;\n\nexport namespace _LangUtils {\n\n    export function isNil(value: any): value is null | undefined {\n        return value === null || value === undefined;\n    }\n}","import { EventSource } from \"./event-source\";\nimport { AngularLifecycleType } from \"./lifecycle-event\";\n\nexport namespace AngularLifecycleDecorator {\n\n    export type Factory = (options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]) => PropertyDecorator;\n\n    /** @PropertyDecoratorMetaFactory */\n    export function Factory(eventType: AngularLifecycleType): Factory {\n        return function (options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator {\n            return EventSource(Object.assign({ eventType }, options), ...methodDecorators);\n        };\n    }\n}\n\nexport function OnChanges(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator;\n/** @PropertyDecoratorFactory */\nexport function OnChanges(...args: any[]): PropertyDecorator {\n    return AngularLifecycleDecorator.Factory(AngularLifecycleType.OnChanges)(...args);\n};\n\nexport function OnInit(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator;\n/** @PropertyDecoratorFactory */\nexport function OnInit(...args: any[]): PropertyDecorator {\n    return AngularLifecycleDecorator.Factory(AngularLifecycleType.OnInit)(...args);\n};\n\nexport function OnDestroy(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator;\n/** @PropertyDecoratorFactory */\nexport function OnDestroy(...args: any[]): PropertyDecorator {\n    return AngularLifecycleDecorator.Factory(AngularLifecycleType.OnDestroy)(...args);\n};\n\nexport function DoCheck(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator;\n/** @PropertyDecoratorFactory */\nexport function DoCheck(...args: any[]): PropertyDecorator {\n    return AngularLifecycleDecorator.Factory(AngularLifecycleType.DoCheck)(...args);\n};\n\nexport function AfterContentInit(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator;\n/** @PropertyDecoratorFactory */\nexport function AfterContentInit(...args: any[]): PropertyDecorator {\n    return AngularLifecycleDecorator.Factory(AngularLifecycleType.AfterContentInit)(...args);\n};\n\nexport function AfterContentChecked(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator;\n/** @PropertyDecoratorFactory */\nexport function AfterContentChecked(...args: any[]): PropertyDecorator {\n    return AngularLifecycleDecorator.Factory(AngularLifecycleType.AfterContentChecked)(...args);\n};\n\nexport function AfterViewInit(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator;\n/** @PropertyDecoratorFactory */\nexport function AfterViewInit(...args: any[]): PropertyDecorator {\n    return AngularLifecycleDecorator.Factory(AngularLifecycleType.AfterViewInit)(...args);\n};\n\nexport function AfterViewChecked(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator;\n/** @PropertyDecoratorFactory */\nexport function AfterViewChecked(...args: any[]): PropertyDecorator {\n    return AngularLifecycleDecorator.Factory(AngularLifecycleType.AfterViewChecked)(...args);\n};","import { Observable, Subject, of } from \"rxjs\";\nimport { take, flatMap } from \"rxjs/operators\";\n\nexport namespace ObservableUtil {\n\n    /** @description\n     *  Creates an observable from the given property.\n     */\n    export function CreateFromProperty<T>(property: T | Subject<T> | Observable<T>): Observable<T> {\n        if (property instanceof Subject) {\n            return property.asObservable();\n        }\n        else if (property instanceof Observable) {\n            return property;\n        }\n        else {\n            return of<T>(property);\n        }\n    }\n\n    /** \n     *  @param target The target object.\n     *  @param path The target property path.\n     *  @description Creates an observable chain from the given property path.\n     * \n     *  Note: Any property in the path that isn't an Observable or Subject will implicitly be converted to an Observable.\n     */\n    export function CreateFromPropertyPath(target: any, path: string): Observable<any> {\n        let lastPropertyKey: string = \"target\";\n\n        /** \n         * @param target The target object.\n         * @param propertyKeys The list of property keys in the path.\n         * @description\n         * Creates an observable chain from the property path and returns the value of the last property in the path.\n         **/\n        return (function resolveProperty(target: any, propertyKeys: string[], optional?: boolean): Observable<any> {\n            if (!target) {\n                // If this property is missing but is optional, just emit undefined\n                if (optional) {\n                    return of(undefined);\n                } else {\n                    // Otherwise, throw an error\n                    throw new Error(`@StateEmitter - Failed to deduce dynamic path \"${path}\": ${lastPropertyKey} is undefined or emitted undefined.`);\n                }\n            }\n\n            // Get the property key\n            let curPropertyKey = propertyKeys[0];\n            let curPropertyOptional = false;\n\n            // Mark the property as optional if it ends with a ? and adjust the property key\n            if (curPropertyKey.endsWith(\"?\")) {\n                curPropertyKey = curPropertyKey.substring(0, curPropertyKey.length - 1);\n                curPropertyOptional = true;\n            }\n\n            lastPropertyKey = curPropertyKey;\n            \n            // Create (or use) an observable from the property value\n            return CreateFromProperty(target[curPropertyKey]).pipe(\n                flatMap((target) => {\n                    // If it's the last property in the path...\n                    if (propertyKeys.length === 1) {\n                        // Return the value\n                        return of(target);\n                    }\n                    else {\n                        // Otherwise, return the next property in the path\n                        return resolveProperty(target, propertyKeys.slice(1), curPropertyOptional);\n                    }\n            }));\n        })(target, path.split(\".\"));\n    }\n\n    /**\n     * @param target The target object.\n     * @param path The target property path.\n     * @description Checks if the given property path is dynamic.\n     * A path is considered dynamic or non-static if:\n     * \n     * - It contains any Observables, or Subjects that are not the terminal property in the path.\n     * - It does not terminate with a Subject.\n     * - It contains optional fields (those that are conditionally evaluated via the `?.` operator).\n     */\n    export function IsDynamicPropertyPath(target: any, path: string): boolean {\n        // Get all property keys in the path\n        let propertyKeys = path.split(\".\");\n\n        return propertyKeys.some((propertyKey, index) => {\n\n            // If a property is optional, then the path is dynamic\n            if (propertyKey.endsWith(\"?\")) {\n                return true;\n            }\n\n            // Get the property value\n            target = target[propertyKey];\n\n            // If this is the last property in the path...\n            if (index === propertyKeys.length - 1) {\n                // The property must be a Subject to be emittable\n                return !(target instanceof Subject);\n            }\n            else {\n                // The property must not contain any Observables or non-terminal Subjects to be emittable\n                return target instanceof Observable || target instanceof Subject;\n            }\n        });\n    }\n\n    // NOTE: Static property paths will result in a Subject (two-way binding), while dynamic property paths will result in an Observable (one-way binding)\n    export function ResolvePropertyPath(target: any, path: string): Observable<any> {\n        // If the path is dynamic...\n        if (IsDynamicPropertyPath(target, path)) {\n            // Create an observable chain from the property path\n            return CreateFromPropertyPath(target, path);\n        }\n        else {\n            // Resolve the subject from the path\n            return ResolveStaticPropertyPath(target, path);\n        }\n    }\n\n    export function ResolveStaticPropertyPath<T>(target: any, path: string): Subject<T> {\n        // Statically access each property and get the terminating subject\n        return path.split(\".\").reduce((target, key) => target[key], target);\n    }\n\n    /**\n     * @param target The target object.\n     * @param path The target property path.\n     * @param value The new value of the property.\n     * @param mergeValue Whether or not the newly emitted value should be merged into the last emitted value.\n     * @description Traverses the property path for a Subject, and appropriately wraps and emits the given value from the Subject.\n     */\n    export function UpdateDynamicPropertyPathValue<T>(target: any, path: string, value: T, mergeValue?: boolean) {\n        // Get all property keys in the path\n        let propertyKeys = path.split(\".\");\n        let subject: Subject<any> | undefined;\n        let subjectIndex: number;\n\n        // Iterate over each property key to find a Subject\n        propertyKeys.every((propertyKey, index) => {\n\n            // Mark the property as optional if it ends with a ? and adjust the property key\n            if (propertyKey.endsWith(\"?\")) {\n                propertyKey = propertyKey.substring(0, propertyKey.length - 1);\n            }\n\n            const value = target[propertyKey];\n\n            if (!value) {\n                // Can't continue search, so end it\n                return false;\n            }\n\n            // If the current property is a Subject...\n            if (value instanceof Subject) {\n                // Record this subject\n                subject = target[propertyKey];\n                subjectIndex = index;\n\n                // Stop searching for a subject\n                return false;\n            }\n\n            // Move to the next property and keep looking\n            target = value;\n            return true;\n        });\n\n        // If there is no Subject in the path, throw an error\n        if (!subject) {\n            throw new Error(`Failed to update value for dynamic property ${path} - Path does not contain a Subject.`);\n        }\n\n        // Resolve the subject value\n        let updatedSubjectValue = propertyKeys\n            // Ignore all static property keys that come before the target subject\n            .slice(subjectIndex! + 1)\n            // Iterate over the property path in reverse and build up the subject value\n            .reduceRight<any>((value, propertyKey) => ({ [propertyKey]: value }), value);\n        \n        if (mergeValue) {\n            // Get the last value from the subject and emit the merged properties\n            subject.pipe(\n                take(1)\n            ).subscribe((lastValue: any) => subject!.next(Object.assign(lastValue, updatedSubjectValue)));\n        }\n        else {\n            // Emit the new value\n            subject.next(updatedSubjectValue);\n        }\n    }\n}\n\n// Workaround for angular-cli 5.0.0 metadata gen bug\nexport interface ObservableUtil {}","import { Observable, BehaviorSubject, Subscription } from \"rxjs\";\nimport { EmitterMetadata, EmitterType, Metadata, CommonMetadata } from \"./metadata\";\nimport { ObservableUtil } from \"./observable-util\";\nimport { take, tap, filter } from \"rxjs/operators\";\nimport { ManagedBehaviorSubject } from \"./managed-observable\";\nimport { EventSource } from \"./event-source\";\nimport { AutoPush } from \"./autopush\";\nimport { AngularLifecycleType } from \"./lifecycle-event\";\nimport { _LangUtils as LangUtils } from \"./lang-utils\";\n\n/** @deprecated */\nexport function StateEmitter(): PropertyDecorator;\n/** @deprecated */\nexport function StateEmitter(...propertyDecorators: PropertyDecorator[]): PropertyDecorator;\n/** @deprecated */\nexport function StateEmitter(params: StateEmitter.DecoratorParams, ...propertyDecorators: PropertyDecorator[]): PropertyDecorator;\n\n/** @deprecated */\n/** @PropertyDecoratorFactory */\nexport function StateEmitter(...args: any[]): PropertyDecorator {\n    let paramsArg: StateEmitter.DecoratorParams | PropertyDecorator | undefined;\n\n    if (args.length > 0) {\n        paramsArg = args[0];\n    }\n\n    if (!paramsArg || paramsArg instanceof Function) {\n        return StateEmitter.WithParams(undefined, ...args);\n    }\n    else {\n        return StateEmitter.WithParams(paramsArg, ...args.slice(1));\n    }\n}\n\n/** @deprecated */\nexport namespace StateEmitter {\n\n    export interface DecoratorParams extends EmitterMetadata.SubjectInfo.CoreDetails {\n        propertyName?: EmitterType;\n    }\n\n    export interface ProxyDecoratorParams {\n        path: string;\n        propertyName?: EmitterType;\n        mergeUpdates?: boolean;\n        readOnly?: boolean;\n        writeOnly?: boolean;\n        unmanaged?: boolean;\n    }\n\n    export interface SelfProxyDecoratorParams {\n        propertyName?: EmitterType;\n        readOnly?: boolean;\n        writeOnly?: boolean;\n        unmanaged?: boolean;\n    }\n\n    /** @PropertyDecoratorFactory */\n    export function WithParams(params?: StateEmitter.DecoratorParams, ...propertyDecorators: PropertyDecorator[]): PropertyDecorator {\n        params ??= {};\n\n        /** @PropertyDecorator */\n        return function (target: any, propertyKey: string | symbol) {\n            if (!params!.unmanaged) {\n                // Ensure that we create a OnDestroy EventSource on the target for managing subscriptions\n                EventSource({ eventType: AngularLifecycleType.OnDestroy })(target, CommonMetadata.MANAGED_ONDESTROY_KEY);\n            }\n\n            // If a propertyName wasn't specified...\n            if (!params!.propertyName) {\n                // Try to deduce the propertyName from the propertyKey\n                if (typeof propertyKey === \"string\" && propertyKey.endsWith(\"$\")) {\n                    params!.propertyName = propertyKey.substring(0, propertyKey.length - 1);\n                }\n                else {\n                    throw new Error(`@StateEmitter error: propertyName could not be deduced from propertyKey \"${propertyKey as any}\" (only keys ending with '$' can be auto-deduced).`);\n                }\n            }\n            \n            // If a proxy mode was set but an empty proxy path was set, default to a self proxy\n            if (params!.proxyMode && typeof params!.proxyPath === \"string\" && params!.proxyPath.length === 0) {\n                params!.proxyPath = propertyKey as string;\n            }\n\n            // Default merging of updated values in proxy aliases to true\n            if (LangUtils.isNil(params!.proxyMergeUpdates)) {\n                params!.proxyMergeUpdates = true;\n            }\n\n            // Apply any property decorators to the property\n            propertyDecorators.forEach(propertyDecorator => propertyDecorator(target, params!.propertyName!));\n\n            // Create the state emitter metadata for the decorated property\n            createMetadata(target, params!.propertyName, Object.assign({ propertyKey, observable: undefined! }, params));\n        };\n    }\n\n    //# Helper Decorators\n    /////////////////////////////\n    export function _ResolveProxyDecoratorParams(params: ProxyDecoratorParams | string): ProxyDecoratorParams {\n        return typeof params === \"string\" ? { path: params } : params;\n    }\n\n    /** @PropertyDecoratorFactory */\n    export function Alias(params: ProxyDecoratorParams | string, ...propertyDecorators: PropertyDecorator[]): PropertyDecorator {\n        let $params = _ResolveProxyDecoratorParams(params);\n\n        return StateEmitter.WithParams({\n            propertyName: $params.propertyName,\n            proxyMode: EmitterMetadata.ProxyMode.Alias,\n            proxyPath: $params.path,\n            proxyMergeUpdates: $params.mergeUpdates,\n            readOnly: $params.readOnly,\n            writeOnly: $params.writeOnly,\n            unmanaged: $params.unmanaged\n        }, ...propertyDecorators);\n    }\n\n    /** @PropertyDecoratorFactory */\n    export function From(params: ProxyDecoratorParams | string, ...propertyDecorators: PropertyDecorator[]): PropertyDecorator {\n        let $params = _ResolveProxyDecoratorParams(params);\n\n        return StateEmitter.WithParams({\n            propertyName: $params.propertyName,\n            proxyMode: EmitterMetadata.ProxyMode.From,\n            proxyPath: $params.path,\n            proxyMergeUpdates: $params.mergeUpdates,\n            readOnly: $params.readOnly,\n            writeOnly: $params.writeOnly,\n            unmanaged: $params.unmanaged\n        }, ...propertyDecorators);\n    }\n\n    /** @PropertyDecoratorFactory */\n    export function Merge(params: ProxyDecoratorParams | string, ...propertyDecorators: PropertyDecorator[]): PropertyDecorator {\n        let $params = _ResolveProxyDecoratorParams(params);\n\n        return StateEmitter.WithParams({\n            propertyName: $params.propertyName,\n            proxyMode: EmitterMetadata.ProxyMode.Merge,\n            proxyPath: $params.path,\n            proxyMergeUpdates: $params.mergeUpdates,\n            readOnly: $params.readOnly,\n            writeOnly: $params.writeOnly,\n            unmanaged: $params.unmanaged\n        }, ...propertyDecorators);\n    }\n\n    /** @PropertyDecoratorFactory */\n    export function AliasSelf(params?: SelfProxyDecoratorParams, ...propertyDecorators: PropertyDecorator[]): PropertyDecorator {\n        const $params = Object.assign(params || {}, { path: \"\" });\n\n        return StateEmitter.Alias($params, ...propertyDecorators);\n    }\n\n    /** @PropertyDecoratorFactory */\n    export function FromSelf(params?: SelfProxyDecoratorParams, ...propertyDecorators: PropertyDecorator[]): PropertyDecorator {\n        const $params = Object.assign(params || {}, { path: \"\" });\n\n        return StateEmitter.From($params, ...propertyDecorators);\n    }\n\n    /** @PropertyDecoratorFactory */\n    export function MergeSelf(params?: SelfProxyDecoratorParams, ...propertyDecorators: PropertyDecorator[]): PropertyDecorator {\n        const $params = Object.assign(params || {}, { path: \"\" });\n\n        return StateEmitter.Merge($params, ...propertyDecorators);\n    }\n\n    namespace Facade {\n\n        export function CreateSetter(type: EmitterType, getter: () => any): (value: any) => void {\n            let firstInvocation = true;\n\n            return function (this: any, value: any) {\n                let subjectInfo = EmitterMetadata.GetMetadataMap(this).get(type)!;\n\n                // Invoke the getter to make sure change detection has been started\n                if (firstInvocation && !subjectInfo.writeOnly) {\n                    firstInvocation = false;\n                    getter.call(this);\n                }\n\n                // If this is a static subject...\n                if (EmitterMetadata.SubjectInfo.IsStaticAlias(subjectInfo)) {\n                    // Notify the subject of the new value\n                    subjectInfo.observable.next(value);\n                }\n                else {\n                    try {\n                        // Update the dynamic proxy value\n                        ObservableUtil.UpdateDynamicPropertyPathValue(this, subjectInfo.proxyPath!, value, subjectInfo.proxyMergeUpdates);\n                    }\n                    catch (_e) {\n                        console.error(`Unable to set value for proxy StateEmitter \"${this.constructor.name}.${type}\" with dynamic property path \"${subjectInfo.proxyPath}\" - Path does not contain a Subject.`);\n                    }\n                }\n\n                // Let the getter caching mechanism detect changes for us\n            };\n        }\n\n        export function CreateGetter(type: EmitterType, initialValue?: any): () => any {\n            let lastValue: any = initialValue;\n            let subscription: Subscription;\n            let lastObservable: Observable<any>;\n\n            return function (this: any): any {\n                let subjectInfo = EmitterMetadata.GetMetadataMap(this).get(type)!;\n                let curObservable = subjectInfo.observable;\n\n                // If the resolved observable has changed since last time the getter was called (or this is the first getter call)...\n                if (lastObservable !== curObservable) {\n\n                    // Remove the previos subscription\n                    if (subscription) {\n                        subscription.unsubscribe();\n                    }\n\n                    // When a new value is emitted from the StateEmitter...\n                    subscription = curObservable.pipe(\n                        // Look for unique changes\n                        filter(value => value !== lastValue),\n                        // Update the cached value\n                        tap((value: any) => lastValue = value)\n                    ).subscribe(() => {\n                        // If the getter wasn't just called (in case of a Behavior/Replay subject)...\n                        if (lastObservable === curObservable && !CommonMetadata.instanceIsDestroyed(this)) {\n                            // Notify the component of changes if AutoPush is enabled\n                            AutoPush.notifyChanges(this);\n                        }\n                    });\n\n                    lastObservable = curObservable;\n                }\n\n                if (curObservable instanceof BehaviorSubject) {\n                    lastValue = curObservable.value;\n                }\n\n                // Return the last value that was emitted\n                return lastValue;\n            };\n        }\n    }\n\n    function bootstrapInstance(this: any, initialPropertyDescriptor: PropertyDescriptor | undefined, emitterType: EmitterType) {\n        const targetInstance: any = this;\n\n        function classMetadataMerged(merged?: boolean): boolean | undefined {\n            if (merged === undefined) {\n                return !!Metadata.getMetadata(EmitterMetadata.BOOTSTRAPPED_KEY, targetInstance);\n            } else {\n                Metadata.setMetadata(EmitterMetadata.BOOTSTRAPPED_KEY, targetInstance, merged);\n            }\n            return undefined;\n        }\n\n        function defineProxyObservableGetter(subjectInfo: EmitterMetadata.SubjectInfo, alwaysResolvePath?: boolean, onResolve?: (proxySubscribable: Observable<any>) => Observable<any> | void) {\n            let observable: Observable<any>;\n\n            // Create a getter that resolves the observable from the target proxy path\n            Object.defineProperty(subjectInfo, \"observable\", { get: (): Observable<any> => {\n                if (alwaysResolvePath || !observable) {\n                    // Get the proxy observable\n                    if (EmitterMetadata.SubjectInfo.IsSelfProxy(subjectInfo)) {\n                        observable = initialPropertyValue;\n                    } else {\n                        observable = ObservableUtil.ResolvePropertyPath(targetInstance, subjectInfo.proxyPath!);\n                    }\n\n                    if (onResolve) {\n                        observable = onResolve(observable) || observable;\n                    }\n                }\n\n                return observable;\n            }});\n        }\n\n        function makeEmitterSubject(): BehaviorSubject<any> {\n            return subjectInfo.unmanaged\n                ? new BehaviorSubject<any>(initialValue)\n                : new ManagedBehaviorSubject<any>(targetInstance, initialValue);\n        }\n\n        const metadataMap = EmitterMetadata.GetOwnMetadataMap(targetInstance);\n\n        if (!classMetadataMerged()) {\n            // Copy all emitter metadata from the class constructor to the target instance\n            EmitterMetadata.CopyMetadata(metadataMap, EmitterMetadata.CopyInherittedMetadata(targetInstance.constructor), true);\n            classMetadataMerged(true);\n        }\n\n        const subjectInfo = metadataMap.get(emitterType)!;\n        const initialValue = resolveInitialValue.call(targetInstance, subjectInfo);\n        // Get the initial value of the property being decorated\n        const initialPropertyValue: any = initialPropertyDescriptor ? (initialPropertyDescriptor.value || initialPropertyDescriptor.get?.()) : undefined;\n\n        // Check if there's a value set for the property and it's an Observable\n        if (initialPropertyValue && initialPropertyValue instanceof Observable) {\n            // Only allow no proxying or explicit self-proxying with initial values\n            // If no explictit self-proxy mode is set, default the StateEmitter to a self-proxying alias by default\n            if (!subjectInfo.proxyMode || subjectInfo.proxyMode === EmitterMetadata.ProxyMode.None) {\n                // Setup a self-proxying alias that will reference the initial value\n                subjectInfo.proxyMode = EmitterMetadata.ProxyMode.Alias;\n                subjectInfo.proxyPath = subjectInfo.propertyKey as string;\n            } else if (!EmitterMetadata.SubjectInfo.IsSelfProxy(subjectInfo)) {\n                throw new Error(`[${targetInstance.constructor.name}]: Unable to create a StateEmitter on property \"${subjectInfo.propertyKey as any}\": property cannot have a pre-defined observable when declaring a proxying StateEmitter.`);\n            }\n        } else if (EmitterMetadata.SubjectInfo.IsSelfProxy(subjectInfo)) {\n            throw new Error(`[${targetInstance.constructor.name}]: Unable to create a StateEmitter on property \"${subjectInfo.propertyKey as any}\": StateEmitter is self-proxying, but lacks a valid target.`);\n        } else if (initialPropertyValue) {\n            console.warn(`Warning: Definition of StateEmitter for ${targetInstance.constructor.name}.${subjectInfo.propertyKey as any} is overriding previous value for '${subjectInfo.propertyKey as any}'.`);\n        }\n        \n        // Check the proxy mode for targetInstance subject\n        switch (subjectInfo.proxyMode) {\n            // Aliased emitters simply pass directly through to their source value\n            case EmitterMetadata.ProxyMode.Alias: {\n                defineProxyObservableGetter(subjectInfo, true);\n                break;\n            }\n\n            // Merge proxies create a new subject that receives all emissions from the source\n            // From proxies create a new subject that takes only its initial value from the source\n            case EmitterMetadata.ProxyMode.Merge:\n            case EmitterMetadata.ProxyMode.From: {\n                // Create a new subject to proxy the source\n                const subject = makeEmitterSubject();\n\n                // Create a getter that returns the new subject\n                defineProxyObservableGetter(subjectInfo, false, (proxyObservable: Observable<any>) => {\n                    // Only take the first value if targetInstance is a From proxy\n                    if (subjectInfo.proxyMode === EmitterMetadata.ProxyMode.From) {\n                        proxyObservable = proxyObservable.pipe(take(1));\n                    }\n\n                    proxyObservable.subscribe((value: any) => subject.next(value));\n\n                    return subject;\n                });\n                break;\n            }\n\n            case EmitterMetadata.ProxyMode.None:\n            default: {\n                // Create a new BehaviorSubject with the default value\n                subjectInfo.observable = makeEmitterSubject();\n                break;\n            }\n        }\n\n        const facadeGetter = Facade.CreateGetter(emitterType, initialValue);\n        const facadeSetter = subjectInfo.readOnly ? undefined : Facade.CreateSetter(emitterType, facadeGetter);\n        // Assign the facade getter and setter to the target instance for targetInstance EmitterType\n        Object.defineProperty(targetInstance, emitterType, {\n            enumerable: true,\n            get: subjectInfo.writeOnly ? undefined : facadeGetter,\n            set: facadeSetter\n        });\n\n        // Define the StateEmitter reference\n        Object.defineProperty(targetInstance, subjectInfo.propertyKey, {\n            // Create a getter that lazily retreives the observable\n            get: () => {\n                // Invoke the getter to start change detection of the value if this is a write-only property\n                // Note: This is called each time in case a dynamic proxy path is changed\n                if (subjectInfo.writeOnly) {\n                    facadeGetter.call(targetInstance);\n                }\n\n                return subjectInfo.observable;\n            },\n            // Allow updates to the subject via the setter of the StateEmitter property itself\n            // (This is needed to allow StateEmitters to work with Angular property decorators like @ViewChild)\n            // TODO - Figure out a better way to do this with Ivy\n            set: facadeSetter\n        });\n    }\n\n    function createMetadata(target: any, type: EmitterType, metadata: EmitterMetadata.SubjectInfo) {\n        const initialPropertyDescriptor = Object.getOwnPropertyDescriptor(target, metadata.propertyKey);\n\n        if (target[type]) {\n            // Make sure the target class doesn't have a custom property already defined for this event type\n            throw new Error(`@StateEmitter metadata creation failed. Class already has a custom '${type}' property.`);\n        }\n\n        // Add the propertyKey to the class' metadata\n        EmitterMetadata.GetOwnMetadataMap(target.constructor).set(type, metadata);\n\n        // Initialize the target property to a self-bootstrapper that will initialize the instance's StateEmitter when called\n        Object.defineProperty(target, metadata.propertyKey, {\n            configurable: true,\n            get: function () {\n                bootstrapInstance.bind(this)(initialPropertyDescriptor, type);\n                return this[metadata.propertyKey];\n            },\n            // Allow updates to the subject via the setter of the StateEmitter property itself\n            // (This is needed to allow StateEmitters to work with Angular property decorators like @ViewChild)\n            // TODO - Figure out a better way to do this with Ivy\n            set: function(value: any) {\n                bootstrapInstance.bind(this)(initialPropertyDescriptor, type);\n                this[type] = value;\n            }\n        });\n\n        // Initialize the facade property to a self-bootstrapper that will initialize the instance's StateEmitter when called\n        Object.defineProperty(target, type, {\n            configurable: true,\n            get: function () {\n                bootstrapInstance.bind(this)(initialPropertyDescriptor, type);\n                return this[type];\n            },\n            set: function(value: any) {\n                bootstrapInstance.bind(this)(initialPropertyDescriptor, type);\n                this[type] = value;\n            }\n        });\n    }\n\n    function resolveInitialValue(this: any, subjectInfo: EmitterMetadata.SubjectInfo): any {\n        if (subjectInfo.initialValue !== undefined && !LangUtils.isNil(subjectInfo.initial)) {\n            throw new Error(\"[StateEmitter]: Both initialValue and initial cannot be defined on the same property.\");\n        } else if (subjectInfo.initial) {\n            return subjectInfo.initial.call(this);\n        } else {\n            return subjectInfo.initialValue;\n        }\n    }\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["LangUtils"],"mappings":";;;;AAAM,IAAW;AAAjB,CAAA,UAAiB,QAAQ,EAAA;AAIrB,IAAA,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;AAEvC,IAAA,SAAgB,eAAe,CAAI,MAAmB,EAAE,MAAW,EAAE,YAAgB,EAAA;QACjF,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;AAC9B,YAAA,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC;;AAG7C,QAAA,OAAO,cAAc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