@nativescript/angular 21.0.1-alpha.6 → 21.0.1-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nativescript-angular.mjs","sources":["../../../../packages/angular/src/lib/views/invisible-nodes.ts","../../../../packages/angular/src/lib/views/utils.ts","../../../../packages/angular/src/lib/tokens.ts","../../../../packages/angular/src/lib/property-filter.ts","../../../../packages/angular/src/lib/view-refs.ts","../../../../packages/angular/src/lib/app-host-view.ts","../../../../packages/angular/src/lib/hmr-compiled-components-core.ts","../../../../packages/angular/src/lib/hmr-environment.ts","../../../../packages/angular/src/lib/trace.ts","../../../../packages/angular/src/lib/hmr-class-registry.ts","../../../../packages/angular/src/lib/hmr-eager-services.ts","../../../../packages/angular/src/lib/loading.service.ts","../../../../packages/angular/src/lib/legacy/router/hmr-route-cache-core.ts","../../../../packages/angular/src/lib/legacy/frame.service.ts","../../../../packages/angular/src/lib/legacy/router/ns-location-utils.ts","../../../../packages/angular/src/lib/legacy/router/ns-location-strategy.ts","../../../../packages/angular/src/lib/legacy/router/page-router-outlet-utils.ts","../../../../packages/angular/src/lib/legacy/router/ns-route-reuse-strategy.ts","../../../../packages/angular/src/lib/root-transition-guard.ts","../../../../packages/angular/src/lib/application.ts","../../../../packages/angular/src/lib/platform-ref.ts","../../../../packages/angular/src/lib/nativescript-xhr-factory.ts","../../../../packages/angular/src/lib/element-registry/metas.ts","../../../../packages/angular/src/lib/element-registry/registry.ts","../../../../packages/angular/src/lib/element-registry/common-views.ts","../../../../packages/angular/src/lib/view-util.ts","../../../../packages/angular/src/lib/nativescript-renderer.ts","../../../../packages/angular/src/lib/cdk/portal/portal-errors.ts","../../../../packages/angular/src/lib/cdk/portal/common.ts","../../../../packages/angular/src/lib/cdk/portal/portal-directives.ts","../../../../packages/angular/src/lib/cdk/portal/nsdom-portal-outlet.ts","../../../../packages/angular/src/lib/cdk/detached-loader.ts","../../../../packages/angular/src/lib/cdk/frame-page/page.service.ts","../../../../packages/angular/src/lib/cdk/frame-page/frame-page.component.ts","../../../../packages/angular/src/lib/cdk/frame-page/frame.directive.ts","../../../../packages/angular/src/lib/cdk/frame-page/page.directive.ts","../../../../packages/angular/src/lib/cdk/frame-page/frame-page.module.ts","../../../../packages/angular/src/lib/utils/lang-facade.ts","../../../../packages/angular/src/lib/cdk/action-bar/index.ts","../../../../packages/angular/src/lib/utils/general.ts","../../../../packages/angular/src/lib/cdk/list-view/list-view.component.ts","../../../../packages/angular/src/lib/legacy/directives/dialogs.ts","../../../../packages/angular/src/lib/utils/ng-safe.ts","../../../../packages/angular/src/lib/cdk/tab-view/index.ts","../../../../packages/angular/src/lib/cdk/platform-filters/android-filter.component.ts","../../../../packages/angular/src/lib/cdk/platform-filters/ios-filter.component.ts","../../../../packages/angular/src/lib/cdk/platform-filters/apple-filter.component.ts","../../../../packages/angular/src/lib/cdk/platform-filters/vision-filter.component.ts","../../../../packages/angular/src/lib/nativescript-common.module.ts","../../../../packages/angular/src/lib/nativescript.ts","../../../../packages/angular/src/lib/platform-nativescript.ts","../../../../packages/angular/src/lib/rootcomposite.module.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-config.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-ref.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-hmr.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-hmr-animation.ts","../../../../packages/angular/src/lib/cdk/dialog/native-modal-ref.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-services.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-content-directives.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-module.ts","../../../../packages/angular/src/lib/file-system/ns-file-system.ts","../../../../packages/angular/src/lib/detached-loader-utils.ts","../../../../packages/angular/src/lib/hmr-cache-store.ts","../../../../packages/angular/src/lib/hmr-cache.service.ts","../../../../packages/angular/src/lib/forms/value-accessors/base-value-accessor.ts","../../../../packages/angular/src/lib/forms/value-accessors/text-value-accessor.ts","../../../../packages/angular/src/lib/forms/value-accessors/checked-value-accessor.ts","../../../../packages/angular/src/lib/forms/value-accessors/date-value-accessor.ts","../../../../packages/angular/src/lib/forms/value-accessors/time-value-accessor.ts","../../../../packages/angular/src/lib/forms/value-accessors/number-value-accessor.ts","../../../../packages/angular/src/lib/forms/value-accessors/selectedIndex-value-accessor.ts","../../../../packages/angular/src/lib/forms/forms.module.ts","../../../../packages/angular/src/lib/animations/utils.ts","../../../../packages/angular/src/lib/animations/animation-player.ts","../../../../packages/angular/src/lib/animations/animation-driver.ts","../../../../packages/angular/src/lib/animations/animations.module.ts","../../../../packages/angular/src/lib/http/http-utils.ts","../../../../packages/angular/src/lib/http/ns-http-backend.ts","../../../../packages/angular/src/lib/http/http-client.module.ts","../../../../packages/angular/src/lib/legacy/router/router-extensions.ts","../../../../packages/angular/src/lib/legacy/router/ns-router-link.ts","../../../../packages/angular/src/lib/legacy/router/private-imports/router-url-tree.ts","../../../../packages/angular/src/lib/legacy/router/ns-router-link-active.ts","../../../../packages/angular/src/lib/legacy/router/page-router-outlet.ts","../../../../packages/angular/src/lib/legacy/router/ns-platform-location.ts","../../../../packages/angular/src/lib/legacy/router/ns-empty-outlet.component.ts","../../../../packages/angular/src/lib/legacy/router/hmr-route-bootstrap-core.ts","../../../../packages/angular/src/lib/legacy/router/hmr-route-state-core.ts","../../../../packages/angular/src/lib/legacy/router/hmr-route-replay.ts","../../../../packages/angular/src/lib/legacy/router/hmr-route-state.ts","../../../../packages/angular/src/lib/legacy/router/router.module.ts","../../../../packages/angular/src/lib/nativescript-ng-zone.ts","../../../../packages/angular/src/index.ts","../../../../packages/angular/src/nativescript-angular.ts"],"sourcesContent":["import { View } from '@nativescript/core';\nimport { NgView } from './view-types';\n\nconst getClassName = (instance) => instance.constructor.name;\n\nexport abstract class InvisibleNode extends View implements NgView {\n meta: { skipAddToDom: boolean };\n nodeType: number;\n nodeName: string;\n // @ts-expect-error setter\n parentNode: NgView;\n nextSibling: NgView;\n previousSibling: NgView;\n firstChild: NgView;\n lastChild: NgView;\n ngCssClasses: Map<string, boolean>;\n\n constructor(protected name: string = '') {\n super();\n\n this.nodeType = 1;\n this.nodeName = getClassName(this);\n }\n\n toString() {\n return `${this.nodeName}(${this.id})-${this.name}`;\n }\n}\n\nexport class CommentNode extends InvisibleNode {\n protected static id = 0;\n\n constructor(value?: string) {\n super(value);\n\n this.meta = {\n skipAddToDom: true,\n };\n this.id = CommentNode.id.toString();\n CommentNode.id += 1;\n }\n}\n\nexport class TextNode extends InvisibleNode {\n public static textChangeEvent = 'textChange';\n protected static id = 0;\n protected _text = '';\n get text() {\n return this._text;\n }\n set text(t: string) {\n this._text = t;\n this.notify({ eventName: TextNode.textChangeEvent, object: this, value: t });\n }\n callbackMap = new Map<unknown, Array<(evt: any) => void>>();\n\n constructor(value?: string) {\n super(value);\n this._text = value;\n\n this.meta = {\n skipAddToDom: true,\n };\n this.id = TextNode.id.toString();\n TextNode.id += 1;\n }\n\n registerTextChange(callback: (text: string) => void, id: unknown) {\n const cb = (evt) => callback(evt.value);\n const cbArr = this.callbackMap.get(id) || [];\n cbArr.push(cb);\n this.callbackMap.set(id, cbArr);\n this.on('textChange', cb);\n }\n\n unregisterTextChange(id: unknown) {\n const cbArr = this.callbackMap.get(id) || [];\n cbArr.forEach((cb) => this.off('textChange', cb));\n this.callbackMap.delete(id);\n }\n}\n","import { ContentView, LayoutBase, ProxyViewContainer, View, ViewBase } from '@nativescript/core';\nimport { InvisibleNode } from './invisible-nodes';\nimport type { NgContentView, NgLayoutBase, NgView } from './view-types';\n\nexport function isDetachedElement(element: View | NgView): boolean {\n return element && (<NgView>element).meta && (<NgView>element).meta.skipAddToDom;\n}\n\nexport function isView(view: unknown): view is NgView {\n return view instanceof View;\n}\n\nexport function isInvisibleNode(view: unknown): view is InvisibleNode {\n return view instanceof InvisibleNode;\n}\n\nexport function isLayout(view: unknown): view is NgLayoutBase {\n return view instanceof LayoutBase;\n}\n\nexport function isContentView(view: unknown): view is NgContentView {\n return view instanceof ContentView;\n}\n\nexport function getFirstNativeLikeView(view: View, extractFromNSParent = false) {\n if (view instanceof ProxyViewContainer) {\n if (view.getChildrenCount() === 0) {\n return null;\n }\n return getFirstNativeLikeView(view.getChildAt(0));\n }\n\n if (extractFromNSParent) {\n const node = view.parentNode;\n detachViewFromParent(view);\n view.parentNode = node;\n }\n return view;\n}\n\nexport function detachViewFromParent(view: View) {\n const parent = <NgView>view?.parent;\n if (!parent) {\n return;\n }\n if (parent.meta && parent.meta.removeChild) {\n parent.meta.removeChild(parent, view);\n } else if (isLayout(parent)) {\n parent.removeChild(view);\n } else if (isContentView(parent) && parent.content === view) {\n parent.content = null;\n } else if (isView(parent)) {\n parent._removeView(view);\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { IDevice, Page, View } from '@nativescript/core';\n\nexport const APP_ROOT_VIEW = new InjectionToken<View>('NativeScriptAppRootView');\nexport const NATIVESCRIPT_ROOT_MODULE_ID = new InjectionToken<string | number>('NativeScriptRootModuleId');\n\nexport const START_PATH = new InjectionToken<Promise<string> | string>('NativeScriptStartPath');\nexport const ENABLE_REUSABE_VIEWS = new InjectionToken<boolean>('NativeScriptEnableReusableViews');\n\nexport type PageFactory = (options: PageFactoryOptions) => Page;\nexport interface PageFactoryOptions {\n isBootstrap?: boolean;\n isLivesync?: boolean;\n isModal?: boolean;\n isNavigation?: boolean;\n componentType?: any;\n}\n\nexport const DISABLE_ROOT_VIEW_HANDLING = new InjectionToken<boolean>('NativeScriptDisableRootViewHandling');\nexport const DEVICE = new InjectionToken<IDevice>('NativeScriptDevice');\nexport const PAGE_FACTORY = new InjectionToken<PageFactory>('NativeScriptPageFactory');\nexport const defaultPageFactory: PageFactory = function (_opts: PageFactoryOptions) {\n return new Page();\n};\n\nexport const PREVENT_CHANGE_EVENTS_DURING_CD = new InjectionToken<boolean>('NativeScriptPreventChangeEventsDuringCd');\nexport const PREVENT_SPECIFIC_EVENTS_DURING_CD = new InjectionToken<string[]>('NativeScriptPreventSpecificEventsDuringCd');\n","import { Inject, InjectionToken } from '@angular/core';\nimport { DEVICE } from './tokens';\nimport { Device, platformNames } from '@nativescript/core';\n\nexport interface NamespaceFilter {\n runsIn(namespace: string, next: (namespace: string) => boolean | undefined): boolean | undefined;\n}\n\nexport class PlatformNamespaceFilter implements NamespaceFilter {\n constructor(@Inject(DEVICE) private device: typeof Device) {}\n runsIn(namespace: string, next: (namespace: string) => boolean | undefined): boolean | undefined {\n if (namespace === 'android') {\n return this.device.os === platformNames.android;\n }\n if (namespace === 'ios') {\n return this.device.os === platformNames.ios;\n }\n return next(namespace);\n }\n}\n\nexport const NAMESPACE_FILTERS = new InjectionToken<NamespaceFilter[]>('NativeScriptNamespaceFilter');\n","import { ComponentRef, EmbeddedViewRef } from '@angular/core';\nimport { View } from '@nativescript/core';\nimport { detachViewFromParent, getFirstNativeLikeView, InvisibleNode } from './views';\n\nexport interface NgViewRef<T> {\n view: View;\n ref: EmbeddedViewRef<T> | ComponentRef<T>;\n firstNativeLikeView: View;\n}\n\nexport interface NgViewTemplate<T> {\n create(context?: T): View;\n update(view: View, context?: T): void;\n attach(view: View): void;\n detach(view: View): void;\n dispose(view: View): void;\n}\n\nexport class NgViewRef<T> implements NgViewRef<T> {\n /**\n * Component's view instance or first valid template view\n */\n view: View;\n ref: EmbeddedViewRef<T> | ComponentRef<T>;\n /**\n * First valid view that isn't strictly logical (ContentView, ProxyViewContainer, ...)\n * This view *very* likely has a nativeView associated to it.\n */\n firstNativeLikeView: View;\n\n constructor(ref: EmbeddedViewRef<T> | ComponentRef<T>) {\n this.ref = ref;\n this.view = ref instanceof ComponentRef ? ref.location.nativeElement : ref.rootNodes.find((v) => !(v instanceof InvisibleNode));\n this.firstNativeLikeView = getFirstNativeLikeView(this.view);\n }\n\n detachNativeLikeView() {\n detachViewFromParent(this.firstNativeLikeView);\n }\n}\n","import { ContentView, View, ProxyViewContainer, GridLayout, Color, Application } from '@nativescript/core';\n\nexport class AppHostView extends ContentView {\n private _ngAppRoot: View;\n private _content: View;\n private timeout: any = -1;\n\n constructor(backgroundColor: Color) {\n super();\n this.backgroundColor = backgroundColor;\n }\n\n get ngAppRoot(): View {\n return this._ngAppRoot;\n }\n\n set ngAppRoot(value: View) {\n this._ngAppRoot = value;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-ignore\n get content(): View {\n return this._content;\n }\n\n set content(value: View) {\n if (this._content) {\n this._content.parentNode = undefined;\n }\n\n this._content = value;\n\n if (value) {\n this._content.parentNode = this;\n }\n\n this.ngAppRoot = value;\n\n if (this._content instanceof ProxyViewContainer) {\n const grid = new GridLayout();\n grid.backgroundColor = this.backgroundColor;\n grid.addChild(this._content);\n this.ngAppRoot = grid;\n }\n if (this.ngAppRoot) {\n // maybe use this approach\n // this.scheduleRootChange();\n }\n }\n\n scheduleRootChange() {\n if (this.timeout === -1) {\n this.timeout = setTimeout(() => {\n //console.log(this.ngAppRoot);\n Application.resetRootView({\n create: () => this.content,\n });\n this.timeout = -1;\n }, 0);\n }\n }\n}\n\nexport class AppHostAsyncView extends GridLayout {\n constructor(backgroundColor: Color) {\n super();\n this.backgroundColor = backgroundColor;\n }\n\n get ngAppRoot(): View {\n return this;\n }\n\n set ngAppRoot(value: View) {\n // ignored\n }\n}\n","type AngularCoreWithCompiledComponentReset = {\n ɵresetCompiledComponents?: () => void;\n};\n\ntype AngularCoreHolder = {\n __NS_ANGULAR_CORE__?: AngularCoreWithCompiledComponentReset | null;\n};\n\nexport function setAngularCoreForHmr(\n core: AngularCoreWithCompiledComponentReset | null | undefined,\n globalObj: AngularCoreHolder = globalThis as AngularCoreHolder,\n): AngularCoreWithCompiledComponentReset | null | undefined {\n if (core) {\n globalObj.__NS_ANGULAR_CORE__ = core;\n }\n\n return getAngularCoreForHmrReset(core, globalObj);\n}\n\nexport function getAngularCoreForHmrReset(\n core: AngularCoreWithCompiledComponentReset | null | undefined,\n globalObj: AngularCoreHolder = globalThis as AngularCoreHolder,\n): AngularCoreWithCompiledComponentReset | null | undefined {\n return globalObj.__NS_ANGULAR_CORE__ || core;\n}\n\nexport function rememberAngularCoreForHmr(\n core: AngularCoreWithCompiledComponentReset | null | undefined,\n globalObj: AngularCoreHolder = globalThis as AngularCoreHolder,\n): AngularCoreWithCompiledComponentReset | null | undefined {\n if (!globalObj.__NS_ANGULAR_CORE__ && core) {\n globalObj.__NS_ANGULAR_CORE__ = core;\n }\n\n return getAngularCoreForHmrReset(core, globalObj);\n}\n\nexport function resetAngularHmrCompiledComponents(\n core: AngularCoreWithCompiledComponentReset | null | undefined,\n): boolean {\n const resetCompiledComponents = core?.ɵresetCompiledComponents;\n if (typeof resetCompiledComponents !== 'function') {\n return false;\n }\n\n try {\n resetCompiledComponents.call(core);\n return true;\n } catch {\n return false;\n }\n}","/**\n * Centralised dev-mode + HMR detection for `@nativescript/angular` helpers.\n *\n * The package ships HMR scaffolding (route tracker, route replay, modal\n * preservation, compiled-component reset) that subscribes to long-lived\n * router and bootstrap streams. None of that work belongs in a production\n * binary — it would attach observers that never fire and keep references\n * that confuse Angular's destroy logic.\n *\n * Every HMR helper consults {@link isAngularHmrEnabled} from its\n * constructor. The check is intentionally cheap (no network, no I/O) so it\n * is safe to call in dependency-injection factories and in fast paths.\n *\n * Detection cascade (returns the first match):\n * 1. **Production build short-circuit** — `ngDevMode === false` means\n * Angular built the app in production mode. We bail immediately.\n * 2. **NativeScript Vite dev signal** — see\n * {@link isNativeScriptViteHmrActive}. We accept either of the two\n * persistent globals the NS Vite root-placeholder installer manages\n * (`__NS_DEV_PLACEHOLDER_ROOT_EARLY__` during early boot,\n * `__NS_HMR_BOOT_COMPLETE__` after the real app root commits) so\n * services that are constructed *after* the placeholder has handed\n * off — e.g. `NativeDialog` instantiated lazily when the user opens\n * their first modal — still detect HMR correctly.\n * 3. **Webpack HMR signal** — `globalThis.__webpack_require__` is set\n * when the webpack runtime is loaded. Combined with the `ngDevMode`\n * short-circuit above, its presence means \"webpack dev\". The\n * production webpack runtime also sets the global, but `ngDevMode`\n * would already be `false`, so the production case never reaches\n * here.\n *\n * If none of these match, the caller should treat HMR as disabled and\n * skip subscribing to disposal/bootstrap streams.\n *\n * The webpack signal lives on `globalThis` rather than `import.meta` so\n * this file compiles cleanly under `--module commonjs` (the jest spec\n * compiler) and under `--module esnext` (the library build).\n */\n\ndeclare const ngDevMode: boolean | undefined;\n\nexport function isAngularHmrEnabled(): boolean {\n if (typeof ngDevMode !== 'undefined' && ngDevMode === false) {\n return false;\n }\n return isNativeScriptViteHmrActive() || isWebpackHmrActive();\n}\n\n/**\n * True when the NativeScript Vite dev HMR runtime is active. This is the\n * most reliable signal that the project's `nativescript.config.ts` set\n * `bundler: 'vite'` AND we are running the dev server.\n *\n * The NS Vite root-placeholder installer manages two persistent globals:\n * - `__NS_DEV_PLACEHOLDER_ROOT_EARLY__` is set the moment the placeholder\n * runs (very early, before the real app boots), then **deleted** by\n * `clearPlaceholderGlobals` once `tryFinalizeBootPlaceholder` succeeds.\n * - `__NS_HMR_BOOT_COMPLETE__` is set in the same finalize step and is\n * **never deleted** for the lifetime of the dev session.\n *\n * Callers run the gamut of timing — e.g. the route tracker is constructed\n * during bootstrap (early flag still set) but `NativeDialog` is typically\n * instantiated lazily when the user opens their first modal (early flag\n * already cleared, complete flag set). Checking either global covers both\n * windows. If we only checked the early flag, every late-instantiated\n * service would silently no-op and HMR features (modal preservation,\n * route replay) would appear broken in development.\n */\nexport function isNativeScriptViteHmrActive(): boolean {\n const g = globalThis as {\n __NS_DEV_PLACEHOLDER_ROOT_EARLY__?: unknown;\n __NS_HMR_BOOT_COMPLETE__?: unknown;\n };\n return !!(g.__NS_DEV_PLACEHOLDER_ROOT_EARLY__ || g.__NS_HMR_BOOT_COMPLETE__);\n}\n\n/**\n * True when the webpack runtime is loaded. The webpack runtime sets\n * `__webpack_require__` on `globalThis` whenever a webpack bundle is\n * executing — both in dev and prod. Callers gate on\n * {@link isAngularHmrEnabled} (not this directly) so the production\n * short-circuit fires first.\n */\nexport function isWebpackHmrActive(): boolean {\n return typeof (globalThis as { __webpack_require__?: unknown }).__webpack_require__ === 'function';\n}\n\n/**\n * True when Angular reports we are running with dev-mode flags. Useful\n * for code paths that want to opt out of cost in production but don't\n * care which bundler is running.\n */\nexport function isAngularDevMode(): boolean {\n if (typeof ngDevMode === 'undefined') {\n return true;\n }\n return ngDevMode !== false;\n}\n","import { Trace } from '@nativescript/core';\n\nexport class NativeScriptDebug {\n static readonly animationsTraceCategory = 'ns-animations';\n static readonly rendererTraceCategory = 'ns-renderer';\n static readonly viewUtilCategory = 'ns-view-util';\n static readonly routerTraceCategory = 'ns-router';\n static readonly routeReuseStrategyTraceCategory = 'ns-route-reuse-strategy';\n static readonly listViewTraceCategory = 'ns-list-view';\n static readonly bootstrapCategory = 'bootstrap';\n static readonly hmrTraceCategory = 'ns-ng-hmr';\n // TODO: migrate all usage to this - avoids extraneous method executions\n static readonly enabled = Trace.isEnabled();\n\n static isLogEnabled() {\n return Trace.isEnabled();\n }\n\n static animationsLog(message: string): void {\n Trace.write(message, NativeScriptDebug.animationsTraceCategory);\n }\n\n static rendererLog(msg): void {\n Trace.write(msg, NativeScriptDebug.rendererTraceCategory);\n }\n\n static rendererError(message: string): void {\n Trace.write(message, NativeScriptDebug.rendererTraceCategory, Trace.messageType.error);\n }\n\n static viewUtilLog(msg): void {\n Trace.write(msg, NativeScriptDebug.viewUtilCategory);\n }\n\n static routerLog(message: string): void {\n Trace.write(message, NativeScriptDebug.routerTraceCategory);\n }\n\n static routerError(message: string): void {\n Trace.write(message, NativeScriptDebug.routerTraceCategory, Trace.messageType.error);\n }\n\n static routeReuseStrategyLog(message: string): void {\n Trace.write(message, NativeScriptDebug.routeReuseStrategyTraceCategory);\n }\n\n static styleError(message: string): void {\n Trace.write(message, Trace.categories.Style, Trace.messageType.error);\n }\n\n static listViewLog(message: string): void {\n Trace.write(message, NativeScriptDebug.listViewTraceCategory);\n }\n\n static listViewError(message: string): void {\n Trace.write(message, NativeScriptDebug.listViewTraceCategory, Trace.messageType.error);\n }\n\n static bootstrapLog(message: string): void {\n Trace.write(message, NativeScriptDebug.bootstrapCategory);\n }\n\n static bootstrapLogError(message: string): void {\n Trace.write(message, NativeScriptDebug.bootstrapCategory, Trace.messageType.error);\n }\n\n static hmrLog(message: string): void {\n Trace.write(message, NativeScriptDebug.hmrTraceCategory);\n }\n\n static hmrLogError(message: string): void {\n Trace.write(message, NativeScriptDebug.hmrTraceCategory, Trace.messageType.error);\n }\n}\n","/**\n * Fresh-class registry for HMR.\n *\n * After an HMR reboot, every previously imported component module is\n * re-evaluated. Each `@Component()`-decorated class becomes a *new* class\n * object — it shares the source name (e.g. `ResourceModalComponent`) but\n * has a different identity from the class the host code captured before\n * the reboot.\n *\n * Helpers like `NativeDialog._restoreSingleDialog` need to re-open a\n * captured modal *with the new class so the visual update applies*.\n * Holding onto the pre-reboot class reference reopens the modal with\n * the old metadata, which manifests as \"the change appears the next\n * time I close and re-open the modal myself, but not when HMR auto-\n * reopens it.\"\n *\n * The mechanism is:\n *\n * 1. The Vite plugin `ns-component-hmr-register` (in\n * `@nativescript/vite/configuration/angular`) injects a\n * registration call at the end of every user `.ts` file that\n * defines an `@Component`-decorated class:\n *\n * if (typeof globalThis.__NS_HMR_REGISTER_COMPONENT__ === 'function') {\n * try { globalThis.__NS_HMR_REGISTER_COMPONENT__(\n * 'ResourceModalComponent', ResourceModalComponent, import.meta.url\n * ); } catch {}\n * }\n *\n * 2. This module installs `__NS_HMR_REGISTER_COMPONENT__` on\n * `globalThis` so module re-evaluations after an HMR reboot\n * replace the previously-registered class with the fresh one.\n *\n * 3. HMR helpers (modal restore, route replay) read the registry\n * via {@link getFreshComponentClass} to swap in the fresh class.\n *\n * This avoids patching `ɵɵdefineComponent` directly, which is exported\n * as an immutable ESM namespace binding from `@angular/core` — patch\n * attempts silently fail (the assignment is a no-op under strict\n * mode) so the registry never gets populated. With the self-\n * registration approach the binding stays untouched and we don't\n * depend on Angular's internal export shape.\n *\n * Production short-circuit: the registrar is only installed when\n * {@link isAngularHmrEnabled} reports dev + (vite | webpack). In a\n * production build the global hook is never assigned and the Vite\n * plugin only runs in `apply: 'serve'`, so the registration calls\n * never reach the runtime.\n */\n\nimport { isAngularDevMode, isAngularHmrEnabled } from './hmr-environment';\nimport { NativeScriptDebug } from './trace';\n\nconst REGISTRY_KEY = '__NS_ANGULAR_HMR_CLASS_REGISTRY__';\nconst REGISTRY_META_KEY = '__NS_ANGULAR_HMR_CLASS_META__';\nconst REGISTRAR_HOOK = '__NS_HMR_REGISTER_COMPONENT__';\nconst REGISTRAR_INSTALLED_FLAG = '__NS_ANGULAR_HMR_REGISTRAR_INSTALLED__';\n\n/**\n * Diagnostic: counters that survive across HMR cycles via globalThis.\n * Used to spot patterns like \"the same class registered N times in a\n * single cycle\" or \"a brand-new class object every cycle\".\n */\nconst DIAG_KEY = '__NS_HMR_DIAG__';\ninterface DiagSlot {\n [DIAG_KEY]?: {\n cycle: number;\n registerCalls: number;\n classIdentities: Map<string, Set<unknown>>;\n classRegisterCounts: Map<string, number>;\n /** A short id assigned the first time we see a given class object. */\n classIds: WeakMap<object, string>;\n classIdNext: number;\n };\n}\nfunction getDiag() {\n const slot = globalThis as unknown as DiagSlot;\n if (!slot[DIAG_KEY]) {\n slot[DIAG_KEY] = {\n cycle: 0,\n registerCalls: 0,\n classIdentities: new Map(),\n classRegisterCounts: new Map(),\n classIds: new WeakMap(),\n classIdNext: 1,\n };\n }\n return slot[DIAG_KEY]!;\n}\n/** Get/assign a short stable id for a class object. */\nfunction getClassId(diag: ReturnType<typeof getDiag>, cls: object): string {\n let id = diag.classIds.get(cls);\n if (!id) {\n id = `c${diag.classIdNext++}`;\n diag.classIds.set(cls, id);\n }\n return id;\n}\n/**\n * Class-registry HMR diagnostic.\n */\nfunction diagLog(message: string): void {\n if (!isAngularHmrEnabled()) return;\n if (!NativeScriptDebug.isLogEnabled()) return;\n NativeScriptDebug.hmrLog(`[class-registry] ${message}`);\n}\n/**\n * Log helper for \"must surface at module-load time\" messages — fires\n * for any dev-mode build (not gated on the HMR-globals check) so the\n * one-shot \"registrar installed\" line doesn't get suppressed by a\n * module-load ordering race. \n */\nfunction bootLog(message: string): void {\n if (!isAngularDevMode()) return;\n if (!NativeScriptDebug.isLogEnabled()) return;\n NativeScriptDebug.hmrLog(`[class-registry] ${message}`);\n}\n/**\n * Public so callers from application.ts can bump the cycle counter when\n * a new HMR reboot starts. Kept as a free function (not a class method)\n * to avoid forcing more imports on the application module.\n *\n * Self-heal: by the time we hit cycle bump, dev/HMR globals are\n * definitely set (`__NS_HMR_BOOT_COMPLETE__` was set before the first\n * HMR cycle ever runs). Some module-load orderings end up with\n * `installAngularHmrComponentRegistrar()` called before the early\n * placeholder global was set, so the registrar would have returned\n * early and never installed the hook. Re-attempting here closes that\n * window — `installAngularHmrComponentRegistrar()` is idempotent.\n */\nexport function _hmrDiagBumpCycle(): number {\n const diag = getDiag();\n diag.cycle += 1;\n diagLog(`---- cycle ${diag.cycle} start ----`);\n installAngularHmrComponentRegistrar();\n return diag.cycle;\n}\n/** Public for tests. */\nexport function _hmrDiagSnapshot(): { cycle: number; registerCalls: number; namesSeen: number } {\n const diag = getDiag();\n return {\n cycle: diag.cycle,\n registerCalls: diag.registerCalls,\n namesSeen: diag.classIdentities.size,\n };\n}\n\n/** Shape of the global registry. Exposed for tests; runtime callers use the helpers below. */\nexport type HmrClassRegistry = Map<string, unknown>;\n\n/** Optional metadata kept alongside each registered class — currently the source `import.meta.url`. */\nexport interface HmrClassMeta {\n /** `import.meta.url` of the module that registered the class, or empty string. */\n url: string;\n /** Cycle the registration most recently happened in. */\n cycle: number;\n}\nexport type HmrClassMetaRegistry = Map<string, HmrClassMeta>;\n\ninterface GlobalRegistrySlot {\n [REGISTRY_KEY]?: HmrClassRegistry;\n [REGISTRY_META_KEY]?: HmrClassMetaRegistry;\n [REGISTRAR_INSTALLED_FLAG]?: boolean;\n [REGISTRAR_HOOK]?: (name: string, cls: unknown, url?: string) => void;\n}\n\nfunction getRegistry(): HmrClassRegistry {\n const slot = globalThis as unknown as GlobalRegistrySlot;\n let registry = slot[REGISTRY_KEY];\n if (!registry) {\n registry = new Map<string, unknown>();\n slot[REGISTRY_KEY] = registry;\n }\n return registry;\n}\n\nfunction getMetaRegistry(): HmrClassMetaRegistry {\n const slot = globalThis as unknown as GlobalRegistrySlot;\n let registry = slot[REGISTRY_META_KEY];\n if (!registry) {\n registry = new Map<string, HmrClassMeta>();\n slot[REGISTRY_META_KEY] = registry;\n }\n return registry;\n}\n\n/**\n * Internal: write a class into the registry. Exposed for unit tests\n * (which can call this directly to simulate a Vite-injected\n * registration without spinning up the Vite plugin pipeline).\n *\n * Production callers should never need this — user code just calls\n * the global `__NS_HMR_REGISTER_COMPONENT__` hook installed by\n * {@link installAngularHmrComponentRegistrar}.\n */\nexport function _registerComponentForHmr(name: string, cls: unknown, url = ''): void {\n if (!name || typeof name !== 'string') return;\n if (cls === undefined || cls === null) return;\n\n const registry = getRegistry();\n const meta = getMetaRegistry();\n const previous = registry.get(name);\n registry.set(name, cls);\n meta.set(name, { url: url || '', cycle: getDiag().cycle });\n\n const d = getDiag();\n d.registerCalls += 1;\n if (typeof cls === 'object' || typeof cls === 'function') {\n const classId = getClassId(d, cls as object);\n let identitySet = d.classIdentities.get(name);\n if (!identitySet) {\n identitySet = new Set<unknown>();\n d.classIdentities.set(name, identitySet);\n }\n identitySet.add(cls);\n d.classRegisterCounts.set(name, (d.classRegisterCounts.get(name) ?? 0) + 1);\n\n // Only log a small set of \"interesting\" components to keep noise\n // manageable. Verbose mode is enabled by setting\n // globalThis.__NS_HMR_DIAG_VERBOSE = true (e.g. from the user\n // app's main.ts) when we want all names.\n const verbose = !!(globalThis as { __NS_HMR_DIAG_VERBOSE?: boolean }).__NS_HMR_DIAG_VERBOSE;\n const watchPattern = (globalThis as { __NS_HMR_DIAG_WATCH?: RegExp | string }).__NS_HMR_DIAG_WATCH;\n const matches = watchPattern instanceof RegExp ? watchPattern.test(name) : typeof watchPattern === 'string' ? name.includes(watchPattern) : /Modal|Dialog/.test(name);\n if (verbose || matches) {\n diagLog(\n `register name=${name} classId=${classId} sameAsPrev=${previous === cls} cycle=${d.cycle} totalIdentitiesForName=${identitySet.size} registerCountForName=${d.classRegisterCounts.get(name)} url=${url || '(none)'}`,\n );\n }\n }\n}\n\n/**\n * Install the cross-module `__NS_HMR_REGISTER_COMPONENT__` hook on\n * `globalThis`. The Vite plugin `ns-component-hmr-register` injects\n * a call to this hook at the end of every user `.ts` file that\n * defines an `@Component`-decorated class, so re-evaluations after\n * an HMR reboot keep the registry pointed at the live class.\n *\n * Idempotent: calling twice is a no-op (the second call sees the\n * installed flag and returns).\n *\n * The hook is installed unconditionally — it's a single function\n * reference on globalThis with negligible cost. Production builds\n * never reach this code path because the Vite plugin\n * `ns-component-hmr-register` runs only with `apply: 'serve'`, so\n * the hook is never *called* in production. We previously gated\n * this on `isAngularHmrEnabled()` but that check depends on\n * NativeScript Vite globals (`__NS_DEV_PLACEHOLDER_ROOT_EARLY__` /\n * `__NS_HMR_BOOT_COMPLETE__`) that are set imperatively from\n * `main-entry.ts`. Module-load ordering can put `application.ts`\n * evaluation *before* those globals are set in some startup paths,\n * causing the install to silently no-op while the Vite plugin\n * happily emits registration calls into user `.ts` files. The end\n * result was an empty registry and `getFreshComponentClass` always\n * reporting `reason=no-registry`. Removing the gate eliminates\n * that race entirely.\n */\nexport function installAngularHmrComponentRegistrar(): void {\n const slot = globalThis as unknown as GlobalRegistrySlot;\n if (slot[REGISTRAR_INSTALLED_FLAG]) {\n return;\n }\n\n // Define the hook BEFORE marking installed so concurrent module\n // initializers see the function as soon as the flag is observable.\n slot[REGISTRAR_HOOK] = (name: string, cls: unknown, url?: string) => {\n try {\n _registerComponentForHmr(name, cls, typeof url === 'string' ? url : '');\n } catch (err) {\n // Registration is best-effort — never break a user module load\n // because of a registration failure.\n diagLog(`registrar threw for ${name}: ${(err as Error)?.message ?? err}`);\n }\n };\n slot[REGISTRAR_INSTALLED_FLAG] = true;\n\n bootLog('installAngularHmrComponentRegistrar installed global hook __NS_HMR_REGISTER_COMPONENT__');\n}\n\n/**\n * Look up the freshest registered component class for a given name, or\n * `undefined` if no match. HMR helpers (e.g. dialog restore) call this\n * with the captured class's `.name` to find the live class after a\n * reboot. Returns `undefined` in production builds because the registrar\n * is never installed there.\n */\nexport function getFreshComponentClass<T = unknown>(name: string): T | undefined {\n if (!name) return undefined;\n const slot = globalThis as unknown as GlobalRegistrySlot;\n const registry = slot[REGISTRY_KEY];\n // Diagnostics: log every lookup with the resolved class id so the\n // restore path can be cross-referenced against register emissions.\n if (registry) {\n const value = registry.get(name) as T | undefined;\n const diag = getDiag();\n const classId = value && (typeof value === 'object' || typeof value === 'function') ? getClassId(diag, value as unknown as object) : '(none)';\n const knownNames = registry.size;\n diagLog(`getFreshComponentClass name=${name} found=${!!value} classId=${classId} registrySize=${knownNames}`);\n return value;\n }\n diagLog(`getFreshComponentClass name=${name} found=false reason=no-registry`);\n return undefined;\n}\n\n/**\n * Look up the source URL (`import.meta.url`) recorded for a registered\n * component. Used by HMR helpers that need to force a fresh import of\n * a lazily-loaded module (e.g. modals whose static import chain doesn't\n * walk the bootstrap path).\n *\n * Returns `undefined` if the name was never registered or if no URL was\n * provided at registration time.\n */\nexport function getRegisteredComponentUrl(name: string): string | undefined {\n if (!name) return undefined;\n const slot = globalThis as unknown as GlobalRegistrySlot;\n const meta = slot[REGISTRY_META_KEY];\n const entry = meta?.get(name);\n return entry?.url || undefined;\n}\n\n/**\n * Test/debug helper: clear all registered classes. Production callers\n * never need this; the registry stays empty without the registrar.\n */\nexport function clearAngularHmrClassRegistry(): void {\n const slot = globalThis as unknown as GlobalRegistrySlot;\n slot[REGISTRY_KEY] = undefined;\n slot[REGISTRY_META_KEY] = undefined;\n slot[REGISTRAR_INSTALLED_FLAG] = undefined;\n slot[REGISTRAR_HOOK] = undefined;\n // Also reset diag so test isolation isn't broken by counts leaking.\n const diagSlot = globalThis as unknown as DiagSlot;\n diagSlot[DIAG_KEY] = undefined;\n}\n","import type { Injector } from '@angular/core';\nimport { NativeScriptDebug } from './trace';\n\n/**\n * Registry for HMR-aware services that need to be eagerly instantiated\n * after each Angular bootstrap so they can attach long-lived subscriptions\n * (e.g. to `postAngularBootstrap$`) before the user's app code starts\n * interacting with the new module realm.\n *\n * The registry lives on `globalThis` so consumers in different module\n * realms — including pre-bundled vendor copies of this package — can\n * register the same callback set without depending on import order. The\n * registry is **idempotent**: registering the same function reference\n * twice is a no-op.\n *\n * Production usage is gated by callers (see `dialog-services.ts`'s\n * `isAngularHmrEnabled()` check) so registrations never accumulate in\n * shipping builds.\n *\n * Failure handling: `runHmrEagerInstantiators` swallows per-callback\n * exceptions intentionally. A buggy registrant must never abort\n * bootstrap. The handler can return diagnostics via the optional\n * `onError` parameter so the application module can route failures to\n * the bootstrap log channel instead of silently dropping them.\n */\nexport type HmrEagerInstantiator = (injector: Injector) => void;\n\nconst REGISTRY_KEY = '__NS_HMR_EAGER_SERVICES__';\nconst REGISTER_KEY = '__NS_REGISTER_HMR_EAGER_SERVICE__';\n\n/**\n * Diagnostic helper.\n */\nfunction eagerDiag(message: string): void {\n const g = globalThis as { __NS_DEV_PLACEHOLDER_ROOT_EARLY__?: unknown; __NS_HMR_BOOT_COMPLETE__?: unknown; ngDevMode?: boolean };\n const ngDev = (typeof g.ngDevMode === 'boolean') ? g.ngDevMode : true;\n const viteHmr = !!g.__NS_DEV_PLACEHOLDER_ROOT_EARLY__ || !!g.__NS_HMR_BOOT_COMPLETE__;\n if (!(ngDev && viteHmr)) return;\n if (!NativeScriptDebug.isLogEnabled()) return;\n NativeScriptDebug.hmrLog(`[eager] ${message}`);\n}\n\ninterface HmrEagerGlobals {\n [REGISTRY_KEY]?: HmrEagerInstantiator[];\n [REGISTER_KEY]?: (fn: HmrEagerInstantiator) => void;\n}\n\nfunction getStore(): HmrEagerGlobals {\n return globalThis as unknown as HmrEagerGlobals;\n}\n\n/**\n * Returns the live (mutable) array of registered eager instantiators.\n * Callers must not mutate it directly outside of the helpers in this\n * module — use {@link registerHmrEagerInstantiator} or\n * {@link clearHmrEagerInstantiators} instead.\n */\nexport function getRegisteredHmrEagerInstantiators(): HmrEagerInstantiator[] {\n const store = getStore();\n const list = store[REGISTRY_KEY];\n if (!Array.isArray(list)) {\n const fresh: HmrEagerInstantiator[] = [];\n store[REGISTRY_KEY] = fresh;\n return fresh;\n }\n return list;\n}\n\n/**\n * Idempotently register an instantiator callback. Returns `true` when the\n * callback was added, `false` when it was already present.\n */\nexport function registerHmrEagerInstantiator(fn: HmrEagerInstantiator): boolean {\n if (typeof fn !== 'function') {\n return false;\n }\n const list = getRegisteredHmrEagerInstantiators();\n if (list.includes(fn)) {\n eagerDiag(`registerHmrEagerInstantiator dedup (already present) listSize=${list.length}`);\n return false;\n }\n list.push(fn);\n eagerDiag(`registerHmrEagerInstantiator added newSize=${list.length} fnName=${fn.name || '(anon)'}`);\n return true;\n}\n\n/**\n * Clear all registered instantiators. Tests use this to reset state\n * between specs; production code should not call it.\n */\nexport function clearHmrEagerInstantiators(): void {\n const list = getRegisteredHmrEagerInstantiators();\n list.length = 0;\n}\n\n/**\n * Install the cross-module registration entry point on `globalThis` so\n * consumer modules (e.g. `dialog-services.ts`) can register without\n * statically importing this file. Idempotent across multiple calls so\n * application.ts can call it on every reboot without leaking state.\n */\nexport function installHmrEagerRegistrar(): void {\n const store = getStore();\n if (typeof store[REGISTER_KEY] === 'function') {\n return;\n }\n store[REGISTER_KEY] = (fn: HmrEagerInstantiator) => {\n registerHmrEagerInstantiator(fn);\n };\n}\n\n/**\n * Invoke every registered instantiator with the bootstrapped injector.\n * Per-callback exceptions are swallowed; pass `onError` to receive them\n * for logging.\n */\nexport function runHmrEagerInstantiators(\n injector: Injector | null | undefined,\n onError?: (err: unknown) => void,\n): void {\n if (!injector) {\n eagerDiag(`runHmrEagerInstantiators called without injector — no-op`);\n return;\n }\n const list = getRegisteredHmrEagerInstantiators();\n eagerDiag(`runHmrEagerInstantiators list.length=${list.length}`);\n if (list.length === 0) {\n return;\n }\n for (let i = 0; i < list.length; i++) {\n const fn = list[i];\n try {\n eagerDiag(`runHmrEagerInstantiators calling [${i}] ${fn.name || '(anon)'}`);\n fn(injector);\n } catch (err) {\n eagerDiag(`runHmrEagerInstantiators [${i}] threw: ${(err as Error)?.message ?? err}`);\n if (onError) {\n try {\n onError(err);\n } catch {\n // The error reporter must not itself break the loop.\n }\n }\n }\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\n@Injectable({ providedIn: 'root' })\nexport class NativeScriptLoadingService implements OnDestroy {\n private mainModuleReady$ = new BehaviorSubject(false);\n readyToDestroy$ = new BehaviorSubject(true);\n onMainModuleReady$ = this.mainModuleReady$.pipe(filter((ready) => ready));\n\n /**\n * delays destroying this module until `notifyReadyToDestroy()`.\n * remember to call `notifyReadyToDestroy()` when done!\n */\n waitUntilNotified() {\n this.readyToDestroy$.next(false);\n }\n\n /**\n * notifies this module is ready to be destroyed\n */\n notifyReadyToDestroy() {\n this.readyToDestroy$.next(true);\n }\n isMainModuleReady() {\n return this.mainModuleReady$.value;\n }\n ngOnDestroy() {\n this.readyToDestroy$.complete();\n this.mainModuleReady$.complete();\n }\n\n /**\n * This funcion is called by the bootstrap code when the app is ready\n * @internal\n */\n _notifyMainModuleReady() {\n this.mainModuleReady$.next(true);\n }\n}\n","type AngularHmrRouteLike = {\n children?: AngularHmrRouteLike[];\n _injector?: unknown;\n _loadedComponent?: unknown;\n _loadedInjector?: unknown;\n _loadedNgModuleFactory?: unknown;\n _loadedRoutes?: AngularHmrRouteLike[];\n};\n\nconst ROUTE_CACHE_KEYS = ['_loadedComponent', '_loadedInjector', '_loadedNgModuleFactory', '_loadedRoutes', '_injector'] as const;\n\nfunction destroyRouteCacheValue(value: unknown): void {\n if (!value || typeof value !== 'object') {\n return;\n }\n\n const destroy = (value as { destroy?: () => void }).destroy;\n if (typeof destroy === 'function') {\n try {\n destroy.call(value);\n } catch {}\n }\n}\n\nfunction clearRouteCacheField(route: Record<string, unknown>, key: (typeof ROUTE_CACHE_KEYS)[number]): boolean {\n if (!Object.prototype.hasOwnProperty.call(route, key) && route[key] === undefined) {\n return false;\n }\n\n if (key === '_injector' || key === '_loadedInjector' || key === '_loadedNgModuleFactory') {\n destroyRouteCacheValue(route[key]);\n }\n\n try {\n delete route[key];\n } catch {\n try {\n route[key] = undefined;\n } catch {}\n }\n\n return true;\n}\n\nexport function clearAngularHmrRouteConfigCaches(routes: AngularHmrRouteLike[] | undefined | null): number {\n const seen = new Set<AngularHmrRouteLike>();\n let cleared = 0;\n\n const visitRoute = (route: AngularHmrRouteLike | undefined | null): void => {\n if (!route || seen.has(route)) {\n return;\n }\n\n seen.add(route);\n\n const childRoutes = Array.isArray(route.children) ? route.children : [];\n const loadedRoutes = Array.isArray(route._loadedRoutes) ? route._loadedRoutes : [];\n\n for (const childRoute of childRoutes) {\n visitRoute(childRoute);\n }\n\n for (const loadedRoute of loadedRoutes) {\n visitRoute(loadedRoute);\n }\n\n for (const key of ROUTE_CACHE_KEYS) {\n if (clearRouteCacheField(route as Record<string, unknown>, key)) {\n cleared += 1;\n }\n }\n };\n\n for (const route of Array.isArray(routes) ? routes : []) {\n visitRoute(route);\n }\n\n return cleared;\n}","import { Injectable } from '@angular/core';\nimport { Frame } from '@nativescript/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FrameService {\n // TODO: Add any methods that are needed to handle frame/page navigation\n getFrame(): Frame {\n return Frame.topmost();\n }\n}\n","import { Frame, NavigationTransition } from '@nativescript/core';\nimport { DefaultUrlSerializer, UrlSegmentGroup, UrlTree, ActivatedRouteSnapshot, Params } from '@angular/router';\n\nexport interface LocationState {\n queryParams: Params;\n segmentGroup: UrlSegmentGroup;\n isRootSegmentGroup: boolean;\n isPageNavigation: boolean;\n frame?: Frame;\n}\n\nexport interface NavigationOptions {\n clearHistory?: boolean;\n animated?: boolean;\n transition?: NavigationTransition;\n replaceUrl?: boolean;\n}\n\nexport class Outlet {\n showingModal: boolean;\n modalNavigationDepth: number;\n parent: Outlet;\n _navigatingBackOutlets = new Set<string>();\n get isPageNavigationBack() {\n return this._navigatingBackOutlets.size > 0;\n }\n set isPageNavigationBack(isBack: boolean) {\n if (!isBack) {\n if (this._navigatingBackOutlets.size > 0) {\n this._navigatingBackOutlets.delete(this._navigatingBackOutlets.values().next().value);\n }\n } else {\n for (const key of this.outletKeys) {\n this._navigatingBackOutlets.add(key);\n }\n }\n }\n\n // More than one key available when using NSEmptyOutletComponent component\n // in module that lazy loads children (loadChildren) and has outlet name.\n outletKeys: Array<string>;\n\n // More than one frame available when using NSEmptyOutletComponent component\n // in module that lazy loads children (loadChildren) and has outlet name.\n frames: Array<Frame> = [];\n // The url path to the Outlet.\n // E.G: the path to Outlet3 that is nested Outlet1(home)->Outlet2(nested1)->Outlet3(nested2)\n // will be 'home/nested1'\n path: string;\n pathByOutlets: string;\n states: Array<LocationState> = [];\n isNSEmptyOutlet: boolean;\n\n // Used in reuse-strategy by its children to determine if they should be detached too.\n shouldDetach = true;\n constructor(outletKey: string, path: string, pathByOutlets: string, modalNavigationDepth?: number) {\n this.outletKeys = [outletKey];\n this.isPageNavigationBack = false;\n this.showingModal = false;\n this.modalNavigationDepth = modalNavigationDepth || 0;\n this.pathByOutlets = pathByOutlets;\n this.path = path;\n }\n\n setOutletKeyNavigatingBack(key: string) {\n const nests = key.split('/');\n this.outletKeys\n .filter((k) => k.split('/').length >= nests.length)\n .forEach((k) => {\n this._navigatingBackOutlets.add(k);\n });\n }\n\n containsFrame(frame: Frame): boolean {\n return this.frames.indexOf(frame) > -1;\n }\n\n peekState(): LocationState {\n if (this.states.length > 0) {\n return this.states[this.states.length - 1];\n }\n return null;\n }\n\n containsTopState(stateUrl: string): boolean {\n const lastState = this.peekState();\n return lastState && lastState.segmentGroup.toString() === stateUrl;\n }\n\n // Search for frame that can go back.\n // Nested 'primary' outlets could result in Outlet with multiple navigatable frames.\n getFrameToBack(): Frame {\n let frame = this.frames[this.frames.length - 1];\n\n if (!this.isNSEmptyOutlet) {\n for (let index = this.frames.length - 1; index >= 0; index--) {\n const currentFrame = this.frames[index];\n if (currentFrame.canGoBack()) {\n frame = currentFrame;\n break;\n }\n }\n }\n\n return frame;\n }\n}\n\nexport const defaultNavOptions: NavigationOptions = {\n clearHistory: false,\n animated: true,\n};\n","import { LocationChangeEvent, LocationStrategy } from '@angular/common';\nimport { Inject, Injectable, Optional, OnDestroy } from '@angular/core';\nimport { ActivatedRouteSnapshot, DefaultUrlSerializer, Params, UrlSegmentGroup, UrlTree } from '@angular/router';\nimport { Frame } from '@nativescript/core';\nimport { START_PATH } from '../../tokens';\nimport { NativeScriptDebug } from '../../trace';\nimport { FrameService } from '../frame.service';\nimport { defaultNavOptions, LocationState, NavigationOptions, Outlet } from './ns-location-utils';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NSLocationStrategy extends LocationStrategy implements OnDestroy {\n private outlets: Array<Outlet> = [];\n private currentOutlet: Outlet;\n\n private popStateCallbacks = new Array<(_: any) => any>();\n private currentUrlTree: UrlTree;\n\n public _modalNavigationDepth = 0;\n\n constructor(\n private frameService: FrameService,\n @Inject(START_PATH) @Optional() private startPath?: string,\n ) {\n super();\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.constructor()');\n }\n }\n\n getState(): unknown {\n return this.currentOutlet && this.currentOutlet.peekState();\n }\n\n resetForHmr() {\n const outletCount = this.outlets.length;\n const stateCount = this.outlets.reduce((total, outlet) => total + outlet.states.length, 0);\n const callbackCount = this.popStateCallbacks.length;\n const hadUrlTree = !!this.currentUrlTree;\n\n this.outlets = [];\n this.currentOutlet = null;\n this.currentUrlTree = null;\n this.popStateCallbacks = [];\n this._modalNavigationDepth = 0;\n\n return {\n outlets: outletCount,\n states: stateCount,\n callbacks: callbackCount,\n hadUrlTree,\n };\n }\n\n path(): string {\n if (!this.currentUrlTree) {\n return this.startPath || '/';\n }\n\n const state = this.currentOutlet && this.currentOutlet.peekState();\n if (!state) {\n return '/';\n }\n\n const tree = this.currentUrlTree;\n const changedOutlet = this.getSegmentGroupByOutlet(this.currentOutlet);\n\n // Handle case where the user declares a component at path \"/\".\n // The url serializer doesn't parse this url as having a primary outlet.\n if (state.isRootSegmentGroup) {\n tree.root = state.segmentGroup;\n } else if (changedOutlet) {\n this.updateSegmentGroup(tree.root, changedOutlet, state.segmentGroup);\n }\n\n const urlSerializer = new DefaultUrlSerializer();\n tree.queryParams = state.queryParams;\n const url = urlSerializer.serialize(tree);\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.path(): ' + url);\n }\n return url;\n }\n\n prepareExternalUrl(internal: string): string {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.prepareExternalUrl() internal: ' + internal);\n }\n return internal;\n }\n\n pushState(state: any, title: string, url: string, queryParams: string): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.pushState state: ' + `${state}, title: ${title}, url: ${url}, queryParams: ${queryParams}`);\n }\n this.pushStateInternal(state, title, url, queryParams);\n }\n\n pushStateInternal(state: any, title: string, url: string, queryParams: string, replace = false): void {\n const urlSerializer = new DefaultUrlSerializer();\n this.currentUrlTree = urlSerializer.parse(url);\n const urlTreeRoot = this.currentUrlTree.root;\n\n // Handle case where the user declares a component at path \"/\".\n // The url serializer doesn't parse this url as having a primary outlet.\n if (!Object.keys(urlTreeRoot.children).length) {\n const segmentGroup = this.currentUrlTree && this.currentUrlTree.root;\n const outletKey = this.getOutletKey(this.getSegmentGroupFullPath(segmentGroup), 'primary');\n const outlet = this.findOutlet(outletKey);\n\n if (outlet && this.updateStates(outlet, segmentGroup, this.currentUrlTree.queryParams, replace)) {\n this.currentOutlet = outlet; // If states updated\n } else if (!outlet) {\n // tslint:disable-next-line:max-line-length\n const rootOutlet = this.createOutlet('primary', null, segmentGroup, null, null, this.currentUrlTree.queryParams);\n this.currentOutlet = rootOutlet;\n }\n\n this.currentOutlet.peekState().isRootSegmentGroup = true;\n return;\n }\n\n const queue = [];\n let currentTree = <any>urlTreeRoot;\n\n while (currentTree) {\n Object.keys(currentTree.children).forEach((outletName) => {\n const currentSegmentGroup = currentTree.children[outletName];\n currentSegmentGroup.outlet = outletName;\n currentSegmentGroup.root = urlTreeRoot;\n\n const outletPath = this.getSegmentGroupFullPath(currentTree);\n const outletKey = this.getOutletKey(outletPath, outletName);\n let outlet = this.findOutlet(outletKey);\n\n const parentOutletName = currentTree.outlet || '';\n const parentOutletPath = this.getSegmentGroupFullPath(currentTree.parent);\n const parentOutletKey = this.getOutletKey(parentOutletPath, parentOutletName);\n const parentOutlet = this.findOutlet(parentOutletKey);\n\n const containsLastState = outlet && outlet.containsTopState(currentSegmentGroup.toString());\n if (!outlet) {\n // tslint:disable-next-line:max-line-length\n outlet = this.createOutlet(outletKey, outletPath, currentSegmentGroup, parentOutlet, this._modalNavigationDepth, this.currentUrlTree.queryParams);\n this.currentOutlet = outlet;\n } else if (this._modalNavigationDepth > 0 && outlet.showingModal && !containsLastState) {\n // Navigation inside modal view.\n this.upsertModalOutlet(outlet, currentSegmentGroup, this.currentUrlTree.queryParams, replace);\n } else {\n outlet.parent = parentOutlet;\n\n if (this.updateStates(outlet, currentSegmentGroup, this.currentUrlTree.queryParams, replace)) {\n this.currentOutlet = outlet; // If states updated\n }\n }\n\n queue.push(currentSegmentGroup);\n });\n\n currentTree = queue.shift();\n }\n }\n\n replaceState(state: any, title: string, url: string, queryParams: string): void {\n const states = this.currentOutlet && this.currentOutlet.states;\n\n if (states && states.length > 0) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.replaceState changing existing state: ' + `${state}, title: ${title}, url: ${url}, queryParams: ${queryParams}`);\n }\n this.pushStateInternal(state, title, url, queryParams, true);\n } else {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.replaceState pushing new state: ' + `${state}, title: ${title}, url: ${url}, queryParams: ${queryParams}`);\n }\n this.pushStateInternal(state, title, url, queryParams);\n }\n }\n\n forward(): void {\n throw new Error('NSLocationStrategy.forward() - not implemented');\n }\n\n back(outlet?: Outlet, frame?: Frame): void {\n this.currentOutlet = outlet || this.currentOutlet;\n\n if (this.currentOutlet.isPageNavigationBack) {\n const states = this.currentOutlet.states;\n // We are navigating to the previous page\n // clear the stack until we get to a page navigation state\n let state = states.pop();\n let count = 1;\n\n if (frame) {\n while (state.frame && state.frame !== frame) {\n state = states.pop();\n count++;\n }\n }\n\n while (!state.isPageNavigation) {\n state = states.pop();\n count++;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`NSLocationStrategy.back() while navigating back. States popped: ${count}`);\n }\n this.callPopState(state, true);\n } else {\n const state = this.currentOutlet.peekState();\n if (state && state.isPageNavigation) {\n // This was a page navigation - so navigate through frame.\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.back() while not navigating back but top' + ' state is page - will call frame.goBack()');\n }\n\n if (!outlet) {\n const topmostFrame = this.frameService.getFrame();\n this.currentOutlet = this.getOutletByFrame(topmostFrame) || this.currentOutlet;\n }\n\n const frameToBack: Frame = this.currentOutlet.getFrameToBack();\n if (frameToBack) {\n frameToBack.goBack();\n }\n } else {\n // Nested navigation - just pop the state\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.back() while not navigating back but top' + ' state is not page - just pop');\n }\n\n this.callPopState(this.currentOutlet.states.pop(), true);\n }\n }\n }\n\n canGoBack(outlet?: Outlet) {\n outlet = outlet || this.currentOutlet;\n return outlet.states.length > 1;\n }\n\n onPopState(fn: (_: any) => any): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.onPopState');\n }\n this.popStateCallbacks.push(fn);\n }\n\n getBaseHref(): string {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.getBaseHref()');\n }\n return '';\n }\n\n private callPopState(state: LocationState, pop: boolean = true, outlet?: Outlet) {\n outlet = outlet || this.currentOutlet;\n const urlSerializer = new DefaultUrlSerializer();\n const changedOutlet = this.getSegmentGroupByOutlet(outlet);\n\n if (state && changedOutlet) {\n this.updateSegmentGroup(this.currentUrlTree.root, changedOutlet, state.segmentGroup);\n } else if (changedOutlet) {\n // when closing modal view there are scenarios (e.g. root viewContainerRef) when we need\n // to clean up the named page router outlet to make sure we will open the modal properly again if needed.\n this.updateSegmentGroup(this.currentUrlTree.root, changedOutlet, null);\n }\n\n const url = urlSerializer.serialize(this.currentUrlTree);\n const change: LocationChangeEvent = { state, type: 'popstate' };\n for (const fn of this.popStateCallbacks) {\n fn(change);\n }\n }\n\n public toString() {\n let result = [];\n\n this.outlets.forEach((outlet) => {\n const outletStates = outlet.states;\n const outletLog = outletStates\n // tslint:disable-next-line:max-line-length\n .map((v, i) => `${outlet.outletKeys}.${i}.[${v.isPageNavigation ? 'PAGE' : 'INTERNAL'}].[${outlet.modalNavigationDepth ? 'MODAL' : 'BASE'}] \"${v.segmentGroup.toString()}\"`)\n .reverse();\n\n result = result.concat(outletLog);\n });\n\n return result.join('\\n');\n }\n\n // Methods for syncing with page navigation in PageRouterOutlet\n public _beginBackPageNavigation(frame: Frame, outletKey: string) {\n const outlet: Outlet = this.getOutletByFrame(frame);\n\n if (!outlet || outlet.isPageNavigationBack) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerError('Attempted to call startGoBack while going back.');\n }\n return;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.startGoBack()');\n }\n outlet.setOutletKeyNavigatingBack(outletKey);\n // outlet.isPageNavigationBack = true;\n // we find all the children and also set their isPageNavigationBack\n this.outlets\n .filter((o) => {\n let parent = o.parent;\n while (parent) {\n if (parent === outlet) {\n return true;\n }\n parent = parent.parent;\n }\n return false;\n })\n .forEach((o) => (o.isPageNavigationBack = true));\n\n this.currentOutlet = outlet;\n }\n\n public _finishBackPageNavigation(frame: Frame) {\n const outlet: Outlet = this.getOutletByFrame(frame);\n\n if (!outlet || !outlet.isPageNavigationBack) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerError('Attempted to call endGoBack while not going back.');\n }\n return;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.finishBackPageNavigation()');\n }\n outlet.isPageNavigationBack = false;\n }\n\n public _beginModalNavigation(frame: Frame): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy._beginModalNavigation()');\n }\n\n this.currentOutlet = this.getOutletByFrame(frame) || this.currentOutlet;\n\n // It is possible to have frame, but not corresponding Outlet, if\n // showing modal dialog on app.component.ts ngOnInit() e.g. In that case\n // the modal is treated as none modal navigation.\n if (this.currentOutlet) {\n this.currentOutlet.showingModal = true;\n this._modalNavigationDepth++;\n }\n }\n\n public _closeModalNavigation() {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.closeModalNavigation()');\n }\n\n const isShowingModal = this._modalNavigationDepth > 0;\n\n if (isShowingModal) {\n this._modalNavigationDepth--;\n }\n\n // currentOutlet should be the one that corresponds to the topmost frame\n const topmostOutlet = this.getOutletByFrame(this.frameService.getFrame());\n const outlet = this.findOutletByModal(this._modalNavigationDepth, isShowingModal) || topmostOutlet;\n\n if (outlet) {\n this.currentOutlet = outlet;\n this.currentOutlet.showingModal = false;\n this.callPopState(this.currentOutlet.peekState(), false);\n // this is needed because angular does a setTimeout on onPopState, so if we don't do this we might end up with inconsistent state\n return new Promise((resolve) => setTimeout(resolve, 0));\n }\n }\n\n public _beginPageNavigation(frame: Frame, options?: NavigationOptions): NavigationOptions {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy._beginPageNavigation()');\n }\n\n this.currentOutlet = this.getOutletByFrame(frame) || this.currentOutlet;\n const lastState = this.currentOutlet.peekState();\n\n if (lastState) {\n lastState.isPageNavigation = true;\n }\n\n const navOptions = options || defaultNavOptions;\n\n if (navOptions.clearHistory) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy._beginPageNavigation clearing states history');\n }\n this.currentOutlet.states = [lastState];\n }\n return navOptions;\n }\n\n public _getOutlets(): Array<Outlet> {\n return this.outlets;\n }\n\n updateOutletFrame(outlet: Outlet, frame: Frame, isEmptyOutletFrame: boolean) {\n const lastState = outlet.peekState();\n\n if (lastState && !lastState.frame && !isEmptyOutletFrame) {\n lastState.frame = frame;\n }\n\n if (!outlet.containsFrame(frame)) {\n outlet.frames.push(frame);\n }\n this.currentOutlet = outlet;\n }\n\n clearOutlet(frame: Frame) {\n this.outlets = this.outlets.filter((currentOutlet) => {\n let isEqualToCurrent;\n\n if (this.currentOutlet) {\n isEqualToCurrent = currentOutlet.pathByOutlets === this.currentOutlet.pathByOutlets;\n }\n\n // Remove outlet from the url tree.\n if (currentOutlet.containsFrame(frame) && !isEqualToCurrent) {\n this.callPopState(null, true, currentOutlet);\n }\n\n // Skip frames filtering since currentOutlet is <router-outlet> when no frames available.\n if (currentOutlet.frames.length && !currentOutlet.isNSEmptyOutlet) {\n currentOutlet.frames = currentOutlet.frames.filter((currentFrame) => currentFrame !== frame);\n return currentOutlet.frames.length;\n }\n\n return !currentOutlet.containsFrame(frame);\n });\n }\n\n getSegmentGroupFullPath(segmentGroup: UrlSegmentGroup): string {\n let fullPath = '';\n\n while (segmentGroup) {\n const url = segmentGroup.toString();\n\n if (fullPath) {\n fullPath = (url ? url + '/' : '') + fullPath;\n } else {\n fullPath = url;\n }\n\n segmentGroup = segmentGroup.parent;\n }\n\n return fullPath;\n }\n\n getRouteFullPath(currentRoute: any): string {\n const outletName = currentRoute.outlet;\n let fullPath;\n\n currentRoute = currentRoute.parent;\n while (currentRoute) {\n const urls = currentRoute.url.value || currentRoute.url;\n let url = urls;\n\n if (Array.isArray(urls)) {\n url = url.join('/');\n }\n\n fullPath = fullPath ? (url ? url + '/' : url) + fullPath : url;\n currentRoute = currentRoute.parent;\n }\n\n return fullPath ? fullPath + '-' + outletName : outletName;\n }\n\n getPathByOutlets(urlSegmentGroup: any): string {\n if (!urlSegmentGroup) {\n return '';\n }\n\n let pathToOutlet;\n let lastPath = urlSegmentGroup.outlet || 'primary';\n let parent = urlSegmentGroup.parent;\n\n while (parent && urlSegmentGroup.root !== parent) {\n if (parent && parent.outlet !== lastPath) {\n if (lastPath === 'primary') {\n lastPath = parent.outlet;\n } else {\n lastPath = parent.outlet;\n pathToOutlet = lastPath + '-' + (pathToOutlet || urlSegmentGroup.outlet);\n }\n }\n\n parent = parent.parent;\n }\n\n return pathToOutlet || lastPath;\n }\n\n findOutlet(outletKey: string, activatedRouteSnapshot?: ActivatedRouteSnapshot): Outlet {\n let outlet: Outlet = this.outlets.find((currentOutlet) => {\n const equalModalDepth = currentOutlet.modalNavigationDepth === this._modalNavigationDepth;\n return equalModalDepth && currentOutlet.outletKeys.indexOf(outletKey) > -1;\n });\n\n // No Outlet with the given outletKey could happen when using nested unnamed p-r-o\n // primary -> primary -> prymary\n if (!outlet && activatedRouteSnapshot) {\n const pathByOutlets = this.getPathByOutlets(activatedRouteSnapshot);\n outlet = this.outlets.find((currentOutlet) => {\n const equalModalDepth = currentOutlet.modalNavigationDepth === this._modalNavigationDepth;\n return equalModalDepth && currentOutlet.pathByOutlets === pathByOutlets;\n });\n }\n\n return outlet;\n }\n\n private findOutletByModal(modalNavigation: number, isShowingModal?: boolean): Outlet {\n return this.outlets.find((outlet) => {\n const equalModalDepth = outlet.modalNavigationDepth === modalNavigation;\n return isShowingModal ? equalModalDepth && outlet.showingModal : equalModalDepth;\n });\n }\n\n private getOutletByFrame(frame: Frame): Outlet {\n let outlet;\n\n for (let index = 0; index < this.outlets.length; index++) {\n const currentOutlet = this.outlets[index];\n\n if (currentOutlet.containsFrame(frame)) {\n outlet = currentOutlet;\n break;\n }\n }\n\n return outlet;\n }\n\n private updateStates(outlet: Outlet, currentSegmentGroup: UrlSegmentGroup, queryParams: Params, replace = false): boolean {\n const isNewPage = outlet.states.length === 0;\n const lastState = outlet.states[outlet.states.length - 1];\n const equalStateUrls = outlet.containsTopState(currentSegmentGroup.toString());\n\n const locationState: LocationState = {\n segmentGroup: currentSegmentGroup,\n isRootSegmentGroup: false,\n isPageNavigation: isNewPage,\n queryParams: { ...queryParams },\n };\n\n if (!lastState || !equalStateUrls) {\n if (replace) {\n outlet.states.pop();\n }\n outlet.states.push(locationState);\n\n // Update last state segmentGroup of parent Outlet.\n if (this._modalNavigationDepth === 0 && !outlet.showingModal) {\n this.updateParentsStates(outlet, currentSegmentGroup.parent);\n }\n\n return true;\n } else {\n if (lastState && equalStateUrls) {\n // update query params for last state\n lastState.queryParams = { ...queryParams };\n }\n }\n\n return false;\n }\n\n private updateParentsStates(outlet: Outlet, newSegmentGroup: UrlSegmentGroup) {\n let parentOutlet = outlet.parent;\n\n // Update parents lastState segmentGroups\n while (parentOutlet && newSegmentGroup) {\n const state = parentOutlet.peekState();\n\n if (state) {\n state.segmentGroup = newSegmentGroup;\n newSegmentGroup = newSegmentGroup.parent;\n parentOutlet = parentOutlet.parent;\n }\n }\n }\n\n // tslint:disable-next-line:max-line-length\n private createOutlet(outletKey: string, path: string, segmentGroup: any, parent: Outlet, modalNavigation?: number, queryParams: Params = {}): Outlet {\n const pathByOutlets = this.getPathByOutlets(segmentGroup);\n const newOutlet = new Outlet(outletKey, path, pathByOutlets, modalNavigation);\n\n const locationState: LocationState = {\n segmentGroup: segmentGroup,\n isRootSegmentGroup: false,\n isPageNavigation: true, // It is a new OutletNode.\n queryParams: { ...queryParams },\n };\n\n newOutlet.states = [locationState];\n newOutlet.parent = parent;\n this.outlets.push(newOutlet);\n\n // Update last state segmentGroup of parent Outlet.\n if (this._modalNavigationDepth === 0 && !newOutlet.showingModal) {\n this.updateParentsStates(newOutlet, segmentGroup.parent);\n }\n\n return newOutlet;\n }\n\n private getSegmentGroupByOutlet(outlet: Outlet): UrlSegmentGroup {\n const pathList = outlet.pathByOutlets.split('-');\n let segmentGroup = this.currentUrlTree.root;\n let pathToOutlet;\n\n for (let index = 0; index < pathList.length; index++) {\n const currentPath = pathList[index];\n const childrenCount = Object.keys(segmentGroup.children).length;\n\n if (childrenCount && segmentGroup.children[currentPath]) {\n const url = segmentGroup.toString();\n pathToOutlet = pathToOutlet ? pathToOutlet + '/' + url : url;\n segmentGroup = segmentGroup.children[currentPath];\n } else {\n // If no child outlet found with the given name - forget about all previously found outlets.\n // example: seaching for 'primary-second-primary' shouldn't return 'primary-second'\n // if no 'primary' child available on 'second'.\n segmentGroup = null;\n break;\n }\n }\n\n // Paths should also match since there could be another Outlet\n // with the same pathByOutlets but different url path.\n if (segmentGroup && outlet.path && pathToOutlet && outlet.path !== pathToOutlet) {\n segmentGroup = null;\n }\n\n return segmentGroup;\n }\n\n // Traversal and replacement of segmentGroup.\n private updateSegmentGroup(rootNode: any, oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup) {\n const queue = [];\n let currentTree = rootNode;\n\n while (currentTree) {\n Object.keys(currentTree.children).forEach((outletName) => {\n if (currentTree.children[outletName] === oldSegmentGroup) {\n if (newSegmentGroup) {\n currentTree.children[outletName] = newSegmentGroup;\n } else {\n delete currentTree.children[outletName];\n }\n }\n queue.push(currentTree.children[outletName]);\n });\n\n currentTree = queue.shift();\n }\n }\n\n private upsertModalOutlet(parentOutlet: Outlet, segmentedGroup: UrlSegmentGroup, queryParams: Params, replace = false) {\n let currentModalOutlet = this.findOutletByModal(this._modalNavigationDepth);\n\n // We want to treat every p-r-o as a standalone Outlet.\n if (!currentModalOutlet) {\n if (this._modalNavigationDepth > 1) {\n // The parent of the current Outlet should be the previous opened modal (if any).\n parentOutlet = this.findOutletByModal(this._modalNavigationDepth - 1);\n }\n\n // No currentModalOutlet available when opening 'primary' p-r-o.\n const outletName = 'primary';\n const outletPath = parentOutlet.peekState().segmentGroup.toString();\n const outletKey = this.getOutletKey(outletPath, outletName);\n // tslint:disable-next-line:max-line-length\n currentModalOutlet = this.createOutlet(outletKey, outletPath, segmentedGroup, parentOutlet, this._modalNavigationDepth, queryParams);\n this.currentOutlet = currentModalOutlet;\n } else if (this.updateStates(currentModalOutlet, segmentedGroup, queryParams, replace)) {\n this.currentOutlet = currentModalOutlet; // If states updated\n }\n }\n\n private getOutletKey(path: string, outletName: string): string {\n return path ? path + '-' + outletName : outletName;\n }\n\n ngOnDestroy() {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.ngOnDestroy()');\n }\n\n this.resetForHmr();\n }\n}\n","import { ComponentRef } from '@angular/core';\nimport { ActivatedRoute, ActivatedRouteSnapshot, ChildrenOutletContexts, PRIMARY_OUTLET } from '@angular/router';\n\n/**\n * There are cases where multiple activatedRoute nodes should be associated/handled by the same PageRouterOutlet.\n * We can gat additional ActivatedRoutes nodes when there is:\n * - Lazy loading - there is an additional ActivatedRoute node for the RouteConfig with the `loadChildren` setup\n * - Componentless routes - there is an additional ActivatedRoute node for the componentless RouteConfig\n *\n * Example:\n * R <-- root\n * |\n * feature (lazy module) <-- RouteConfig: { path: \"lazy\", loadChildren: \"./feature/feature.module#FeatureModule\" }\n * |\n * module (componentless route) <-- RouteConfig: { path: \"module\", children: [...] } // Note: No 'component'\n * |\n * home <-- RouteConfig: { path: \"module\", component: MyComponent } - this is what we get as activatedRoute param\n *\n * In these cases we will mark the top-most node (feature). NSRouteReuseStrategy will detach the tree there and\n * use this ActivateRoute as a kay for caching.\n */\nexport function findTopActivatedRouteNodeForOutlet(activatedRoute: ActivatedRouteSnapshot): ActivatedRouteSnapshot {\n // TODO: test this and figure it out if it's really no longer needed\n return activatedRoute;\n // let outletActivatedRoute = activatedRoute;\n\n // while (outletActivatedRoute.parent && outletActivatedRoute.parent.routeConfig && !outletActivatedRoute.parent.routeConfig.component) {\n // outletActivatedRoute = outletActivatedRoute.parent;\n // }\n\n // return outletActivatedRoute;\n}\n\nexport const pageRouterActivatedSymbol = Symbol('page-router-activated');\nexport const loaderRefSymbol = Symbol('loader-ref');\n\nexport function destroyComponentRef(componentRef: ComponentRef<any>) {\n if (componentRef) {\n const loaderRef = componentRef[loaderRefSymbol];\n if (loaderRef) {\n loaderRef.destroy();\n }\n componentRef.destroy();\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { RouteReuseStrategy, ActivatedRouteSnapshot, DetachedRouteHandle } from '@angular/router';\n\nimport { NativeScriptDebug } from '../../trace';\nimport { NSLocationStrategy } from './ns-location-strategy';\nimport { destroyComponentRef, findTopActivatedRouteNodeForOutlet, pageRouterActivatedSymbol } from './page-router-outlet-utils';\n\ninterface CacheItem {\n key: string;\n state: DetachedRouteHandle;\n isModal: boolean;\n markedForDeletion?: boolean;\n}\n\nconst getSnapshotKey = function (snapshot: ActivatedRouteSnapshot): string {\n return snapshot.pathFromRoot.join('->');\n};\n\n/**\n * Detached state cache\n */\nclass DetachedStateCache {\n private cache = new Array<CacheItem>();\n\n public get length(): number {\n return this.cache.length;\n }\n\n public push(cacheItem: CacheItem) {\n this.cache.push(cacheItem);\n }\n\n public pop(): CacheItem {\n return this.cache.pop();\n }\n\n public peek(): CacheItem {\n return this.cache[this.cache.length - 1];\n }\n\n public clear() {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`DetachedStateCache.clear() ${this.cache.length} items will be destroyed`);\n }\n\n while (this.cache.length > 0) {\n const state = <any>this.cache.pop().state;\n if (!state.componentRef) {\n throw new Error('No componentRef found in DetachedRouteHandle');\n }\n\n destroyComponentRef(state.componentRef);\n }\n }\n\n public markCurrentForClear() {\n for (const item of this.cache) {\n item.markedForDeletion = true;\n }\n }\n\n public clearMarked() {\n // try to preserve same order as .clear()\n for (let i = this.cache.length - 1; i >= 0; i--) {\n const cacheItem = this.cache[i];\n if (cacheItem.markedForDeletion) {\n const state = <any>cacheItem.state;\n if (!state.componentRef) {\n throw new Error('No componentRef found in DetachedRouteHandle');\n }\n\n destroyComponentRef(state.componentRef);\n this.cache.splice(i, 1);\n }\n }\n }\n\n public clearModalCache() {\n let removedItemsCount = 0;\n const hasModalPages = this.cache.some((cacheItem) => {\n return cacheItem.isModal;\n });\n\n if (hasModalPages) {\n let modalCacheCleared = false;\n\n while (!modalCacheCleared) {\n const cacheItem = this.peek();\n const state = <any>cacheItem.state;\n\n if (!state.componentRef) {\n throw new Error('No componentRef found in DetachedRouteHandle');\n }\n\n destroyComponentRef(state.componentRef);\n if (cacheItem.isModal) {\n modalCacheCleared = true;\n }\n\n this.pop();\n removedItemsCount++;\n }\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`DetachedStateCache.clearModalCache() ${removedItemsCount} items will be destroyed`);\n }\n }\n}\n\n/**\n * Detaches subtrees loaded inside PageRouterOutlet in forward navigation\n * and reattaches them on back.\n * Reuses routes as long as their route config is the same.\n */\n@Injectable()\nexport class NSRouteReuseStrategy implements RouteReuseStrategy, OnDestroy {\n private cacheByOutlet: { [key: string]: DetachedStateCache } = {};\n\n constructor(private location: NSLocationStrategy) {}\n\n shouldDetach(route: ActivatedRouteSnapshot): boolean {\n route = findTopActivatedRouteNodeForOutlet(route);\n\n const { outlet } = this.findValidOutletAndKey(route);\n const key = getSnapshotKey(route);\n\n let isPageActivated = false;\n let tmp = route;\n while (!(isPageActivated = tmp[pageRouterActivatedSymbol]) && tmp.parent) {\n tmp = tmp.parent;\n }\n const isBack = outlet ? outlet.isPageNavigationBack : false;\n let shouldDetach = outlet && !isBack && isPageActivated;\n\n if (outlet) {\n if (outlet.parent && !outlet.parent.shouldDetach) {\n shouldDetach = false;\n }\n\n outlet.shouldDetach = shouldDetach;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`shouldDetach isBack: ${isBack} key: ${key} result: ${shouldDetach}`);\n }\n\n return shouldDetach;\n }\n protected findValidOutletAndKey(targetRoute: ActivatedRouteSnapshot) {\n let route = targetRoute;\n const routeOutletKey = this.location.getRouteFullPath(route);\n let outletKey = routeOutletKey;\n let outlet = this.location.findOutlet(outletKey, route);\n while (!outlet) {\n if (!route.parent) {\n return { outlet: null, outletKey: routeOutletKey };\n }\n route = route.parent;\n outletKey = this.location.getRouteFullPath(route);\n outlet = this.location.findOutlet(outletKey, route);\n }\n\n if (outlet) {\n while (!outlet.outletKeys.includes(outletKey)) {\n if (!route.parent) {\n NativeScriptDebug.routeReuseStrategyLog(`Could not find valid outlet key for route: ${targetRoute}.`);\n return { outlet, outletKey: routeOutletKey };\n }\n route = route.parent;\n outletKey = this.location.getRouteFullPath(route);\n }\n }\n\n return { outlet, outletKey };\n }\n\n shouldAttach(route: ActivatedRouteSnapshot): boolean {\n route = findTopActivatedRouteNodeForOutlet(route);\n\n const { outlet, outletKey } = this.findValidOutletAndKey(route);\n const cache = this.cacheByOutlet[outletKey];\n if (!cache) {\n return false;\n }\n\n const key = getSnapshotKey(route);\n const isBack = outlet ? outlet.isPageNavigationBack : false;\n const shouldAttach = isBack && cache.peek()?.key === key;\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`shouldAttach isBack: ${isBack} key: ${key} result: ${shouldAttach}`);\n }\n\n if (outlet) {\n outlet.shouldDetach = true;\n }\n\n return shouldAttach;\n }\n\n store(route: ActivatedRouteSnapshot, state: DetachedRouteHandle): void {\n route = findTopActivatedRouteNodeForOutlet(route);\n\n const key = getSnapshotKey(route);\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`store key: ${key}, state: ${state}`);\n }\n\n const { outletKey } = this.findValidOutletAndKey(route);\n\n // tslint:disable-next-line:max-line-length\n const cache = (this.cacheByOutlet[outletKey] = this.cacheByOutlet[outletKey] || new DetachedStateCache());\n\n if (state) {\n let isModal = false;\n if (this.location._modalNavigationDepth > 0) {\n isModal = true;\n }\n\n cache.push({ key, state, isModal });\n } else {\n const topItem = cache.peek();\n if (topItem.key === key) {\n cache.pop();\n\n if (!cache.length) {\n delete this.cacheByOutlet[outletKey];\n }\n } else {\n throw new Error(\"Trying to pop from DetachedStateCache but keys don't match. \" + `expected: ${topItem.key} actual: ${key}`);\n }\n }\n }\n\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\n route = findTopActivatedRouteNodeForOutlet(route);\n\n const { outlet, outletKey } = this.findValidOutletAndKey(route);\n const cache = this.cacheByOutlet[outletKey];\n if (!cache) {\n return null;\n }\n\n const key = getSnapshotKey(route);\n const isBack = outlet ? outlet.isPageNavigationBack : false;\n const cachedItem = cache.peek();\n\n let state = null;\n if (isBack && cachedItem && cachedItem.key === key) {\n state = cachedItem.state;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`retrieved isBack: ${isBack} key: ${key} state: ${state}`);\n }\n\n return state;\n }\n\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n const shouldReuse = future.routeConfig === curr.routeConfig;\n\n if (shouldReuse && curr && curr[pageRouterActivatedSymbol]) {\n // When reusing route - copy the pageRouterActivated to the new snapshot\n // It's needed in shouldDetach to determine if the route should be detached.\n future[pageRouterActivatedSymbol] = curr[pageRouterActivatedSymbol];\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`shouldReuseRoute result: ${shouldReuse}`);\n }\n\n return shouldReuse;\n }\n\n clearCache(outletKey: string) {\n const cache = this.cacheByOutlet[outletKey];\n\n if (cache) {\n cache.clear();\n }\n }\n\n markCacheForClear(outletKey: string) {\n const cache = this.cacheByOutlet[outletKey];\n\n if (cache) {\n cache.markCurrentForClear();\n }\n }\n\n popCache(outletKey: string) {\n const cache = this.cacheByOutlet[outletKey];\n\n if (cache) {\n if (cache.peek()) {\n const state: any = cache.pop()?.state;\n if (state?.componentRef) {\n destroyComponentRef(state?.componentRef);\n }\n }\n }\n }\n\n markCacheForPop(outletKey: string) {\n const cache = this.cacheByOutlet[outletKey];\n\n if (cache) {\n const item = cache.peek();\n if (item) {\n item.markedForDeletion = true;\n }\n }\n }\n\n clearMarkedCache(outletKey: string) {\n const cache = this.cacheByOutlet[outletKey];\n\n if (cache) {\n cache.clearMarked();\n }\n }\n\n clearModalCache(outletKey: string) {\n const cache = this.cacheByOutlet[outletKey];\n\n if (cache) {\n cache.clearModalCache();\n }\n }\n\n clearAllCaches(): number {\n const outletKeys = Object.keys(this.cacheByOutlet);\n\n for (const outletKey of outletKeys) {\n this.cacheByOutlet[outletKey]?.clear();\n delete this.cacheByOutlet[outletKey];\n }\n\n return outletKeys.length;\n }\n\n ngOnDestroy(): void {\n this.clearAllCaches();\n }\n}\n","type RootTransitionGlobal = {\n __NS_DEV_ROOT_TRANSITION_IN_PROGRESS__?: boolean;\n __NS_DEV_ROOT_TRANSITION_REASON__?: string;\n};\n\ntype RootTransitionTimers = {\n setTimeout: typeof setTimeout;\n clearTimeout: typeof clearTimeout;\n};\n\ntype ResetRootViewLike = {\n resetRootView: (entry?: any) => unknown;\n};\n\nexport function createAngularRootTransitionGuard(\n globalObj: RootTransitionGlobal = globalThis as RootTransitionGlobal,\n timers: RootTransitionTimers = { setTimeout, clearTimeout },\n) {\n let clearTimer: ReturnType<typeof setTimeout> | null = null;\n\n const clear = () => {\n if (clearTimer) {\n timers.clearTimeout(clearTimer);\n clearTimer = null;\n }\n\n delete globalObj.__NS_DEV_ROOT_TRANSITION_IN_PROGRESS__;\n delete globalObj.__NS_DEV_ROOT_TRANSITION_REASON__;\n };\n\n const mark = (detail: string) => {\n clear();\n globalObj.__NS_DEV_ROOT_TRANSITION_IN_PROGRESS__ = true;\n globalObj.__NS_DEV_ROOT_TRANSITION_REASON__ = detail;\n };\n\n const scheduleClear = (delayMs = 250) => {\n if (clearTimer) {\n timers.clearTimeout(clearTimer);\n }\n\n clearTimer = timers.setTimeout(() => {\n clearTimer = null;\n delete globalObj.__NS_DEV_ROOT_TRANSITION_IN_PROGRESS__;\n delete globalObj.__NS_DEV_ROOT_TRANSITION_REASON__;\n }, delayMs);\n };\n\n const runApplicationResetRootView = (\n applicationLike: ResetRootViewLike,\n createRoot: () => unknown,\n detail: string,\n delayMs = 250,\n ) => {\n mark(detail);\n\n try {\n return applicationLike.resetRootView({ create: () => createRoot() });\n } finally {\n scheduleClear(delayMs);\n }\n };\n\n return {\n clear,\n mark,\n scheduleClear,\n runApplicationResetRootView,\n };\n}","import * as AngularCore from '@angular/core';\nimport { ApplicationRef, EnvironmentProviders, NgModuleRef, NgZone, PlatformRef, Provider } from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n Application,\n ApplicationEventData,\n Color,\n LaunchEventData,\n LayoutBase,\n profile,\n removeTaggedAdditionalCSS,\n TextView,\n Utils,\n View,\n} from '@nativescript/core';\nimport { Observable, ReplaySubject, Subject } from 'rxjs';\nimport { filter, map, take } from 'rxjs/operators';\nimport { AppHostView } from './app-host-view';\nimport {\n getAngularCoreForHmrReset,\n rememberAngularCoreForHmr,\n resetAngularHmrCompiledComponents,\n setAngularCoreForHmr,\n} from './hmr-compiled-components-core';\nimport { _hmrDiagBumpCycle, installAngularHmrComponentRegistrar } from './hmr-class-registry';\nimport { installHmrEagerRegistrar, runHmrEagerInstantiators } from './hmr-eager-services';\nimport { NativeScriptLoadingService } from './loading.service';\nimport { clearAngularHmrRouteConfigCaches } from './legacy/router/hmr-route-cache-core';\nimport { NSLocationStrategy } from './legacy/router/ns-location-strategy';\nimport { NSRouteReuseStrategy } from './legacy/router/ns-route-reuse-strategy';\nimport { createAngularRootTransitionGuard } from './root-transition-guard';\nimport { APP_ROOT_VIEW, DISABLE_ROOT_VIEW_HANDLING, NATIVESCRIPT_ROOT_MODULE_ID } from './tokens';\nimport { NativeScriptDebug } from './trace';\n\n// Store the original @angular/core module for HMR\n// This is crucial because HMR imports a fresh @angular/core with empty LView tracking\n// We need to use the original one that has the registered LViews\nrememberAngularCoreForHmr(AngularCore as any, globalThis as any);\n\n// Install the cross-module HMR component registrar. The Vite plugin\n// `ns-component-hmr-register` injects a call to the global hook\n// `__NS_HMR_REGISTER_COMPONENT__` at the end of every user `.ts` file\n// that declares an `@Component`-decorated class. After an HMR reboot,\n// each re-evaluated module pushes its fresh class into the registry,\n// and HMR helpers (modal restore, route replay) read the registry via\n// `getFreshComponentClass` to re-attach to the *live* class instead of\n// a captured stale reference. Production short-circuits inside the\n// helper (the hook is never assigned).\n//\n// We install the registrar before any other module initialization can\n// reference the hook so a user module loaded synchronously alongside\n// `@nativescript/angular` always finds the function present.\ninstallAngularHmrComponentRegistrar();\n\n// Install the cross-module registration entry point used by HMR-aware\n// services (e.g. `NativeDialog`) to ask for eager construction after\n// every bootstrap. Idempotent: re-evaluations after HMR are no-ops.\ninstallHmrEagerRegistrar();\n\nconst angularHmrGlobal = globalThis as any;\nangularHmrGlobal.__NS_REMEMBER_ANGULAR_CORE__ = (core: any) => {\n setAngularCoreForHmr(core, angularHmrGlobal);\n};\n\nexport interface AppLaunchView extends LayoutBase {\n // called when the animation is to begin\n startAnimation?: () => void;\n // called when bootstrap is complete and cleanup can begin\n // should resolve when animation is completely finished\n cleanup?: () => Promise<any>;\n\n // do you want to handle setting this as a rootview manually?\n __disable_root_view_handling?: boolean;\n}\n\nexport function disableRootViewHanding(view: AppLaunchView) {\n view.__disable_root_view_handling = true;\n}\n\nexport type NgModuleReason = 'hotreload' | 'applaunch' | 'appexit';\n\nexport type NgModuleEvent =\n | {\n moduleType: 'main' | 'loading' | string;\n reference: NgModuleRef<unknown> | ApplicationRef;\n reason: NgModuleReason | string;\n }\n | {\n moduleType: 'platform';\n reference: PlatformRef;\n reason: NgModuleReason | string;\n };\n\nexport const preAngularDisposal$ = new Subject<NgModuleEvent>();\n/**\n * Stream that emits when an Angular module finishes bootstrapping. Modeled\n * as a `ReplaySubject(1)` so consumers (e.g. `NativeDialog`) instantiated\n * lazily — *after* the bootstrap event has already fired — still receive\n * the latest event and can react. Without buffering, a service that the\n * user app injects on first need (after bootstrap) would silently miss the\n * `hotreload` notification and skip HMR-only work like restoring captured\n * modal state. The buffer size of 1 means each new HMR cycle replaces the\n * cached event so cycle N's late subscribers don't see cycle N-1's event.\n */\nexport const postAngularBootstrap$ = new ReplaySubject<NgModuleEvent>(1);\n\n/**\n * @deprecated\n */\nexport const onBeforeLivesync: Observable<NgModuleRef<any>> = preAngularDisposal$.pipe(\n filter((v) => v.moduleType === 'main' && v.reason === 'hotreload'),\n map((v) => v.reference as NgModuleRef<any>),\n);\n/**\n * @deprecated\n */\nexport const onAfterLivesync: Observable<{\n moduleRef?: NgModuleRef<any>;\n error?: Error;\n}> = postAngularBootstrap$.pipe(\n filter((v) => v.moduleType === 'main'),\n map((v) => ({ moduleRef: v.reference as NgModuleRef<any> })),\n);\nexport interface AppRunOptions<T, K> {\n /**\n * Runs when the app is launched or during HMR.\n * May not run immediately if the app was started in background (e.g. push notification)\n * @param reason reason for bootstrap. @see {NgModuleReason}\n * @returns Promise to the bootstrapped NgModuleRef\n */\n appModuleBootstrap: (reason: NgModuleReason) => Promise<NgModuleRef<T> | ApplicationRef>;\n /**\n * Loads a custom NgModule for the loading screen.\n * This loads only if appModuleBootstrap doesn't resolve synchronously (e.g. async APP_INITIALIZER).\n * @param reason reason for bootstrap. @see {NgModuleReason}\n * @returns Promise to the bootstrapped NgModuleRef. Must resolve immediately (no async initialization)\n */\n loadingModule?: (reason: NgModuleReason) => Promise<NgModuleRef<K> | ApplicationRef>;\n /**\n * Simpler than loadingModule, this will show a view while the app is bootstrapping asynchronously.\n * @param reason reason for bootstrap. @see {NgModuleReason}\n * @returns View that will be shown while app boots\n */\n launchView?: (reason: NgModuleReason) => AppLaunchView;\n /**\n * Wether we are running in an embedded context (e.g. embedding NativeScript in an existing app)\n */\n embedded?: boolean;\n}\n\nif (import.meta['webpackHot']) {\n import.meta['webpackHot'].decline();\n global.__onLiveSyncCore = () => {\n Application.getRootView()?._onCssStateChange();\n // all other changes are applied by runNativeScriptAngularApp\n };\n}\n\nfunction emitModuleBootstrapEvent<T>(\n ref: NgModuleRef<T> | ApplicationRef,\n name: 'main' | 'loading',\n reason: NgModuleReason,\n) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`emitModuleBootstrapEvent name=${name} reason=${reason}`);\n }\n // Instantiate registered HMR-aware services *before* emitting so they\n // attach their subscriptions in the same JS task and are guaranteed to\n // observe the event being emitted. `postAngularBootstrap$` is also a\n // `ReplaySubject(1)`, so a service injected later still receives the\n // buffered event — the eager pass is the fast path that lets the\n // restore work begin in the same task as bootstrap completion.\n if (name === 'main') {\n runHmrEagerInstantiators(\n (ref as ApplicationRef | NgModuleRef<T>).injector,\n (err) => NativeScriptDebug.bootstrapLogError(`HMR eager instantiator threw: ${(err as Error)?.message ?? err}`),\n );\n }\n postAngularBootstrap$.next({\n moduleType: name,\n reference: ref,\n reason,\n });\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`postAngularBootstrap$.next() emitted name=${name} reason=${reason}`);\n }\n}\n\nfunction destroyRef<T>(ref: NgModuleRef<T> | ApplicationRef, name: 'main' | 'loading', reason: NgModuleReason): void;\nfunction destroyRef(ref: PlatformRef, reason: NgModuleReason): void;\nfunction destroyRef<T>(ref: PlatformRef | ApplicationRef | NgModuleRef<T>, name?: string, reason?: string): void {\n if (ref) {\n const refKind = ref instanceof PlatformRef ? 'PlatformRef' : ref instanceof NgModuleRef ? 'NgModuleRef' : ref instanceof ApplicationRef ? 'ApplicationRef' : '(unknown)';\n const traceEnabled = NativeScriptDebug.isLogEnabled();\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`destroyRef kind=${refKind} name=${name ?? '(none)'} reason=${reason ?? '(none)'}`);\n }\n if (ref instanceof PlatformRef) {\n preAngularDisposal$.next({\n moduleType: 'platform',\n reference: ref,\n reason: name,\n });\n }\n if (ref instanceof NgModuleRef || ref instanceof ApplicationRef) {\n preAngularDisposal$.next({\n moduleType: name,\n reference: ref,\n reason,\n });\n }\n ref.destroy();\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`destroyRef DONE kind=${refKind} name=${name ?? '(none)'}`);\n }\n }\n}\n\nfunction runZoneSyncTask(fn: () => void) {\n if (typeof Zone === 'undefined') {\n return;\n }\n const zone = Zone.current;\n const task = zone.scheduleEventTask(\n 'sync_function',\n fn,\n {},\n () => {\n //\n },\n () => {\n //\n },\n );\n try {\n // console.log(task.state);\n task.invoke();\n // zone.runTask(task);\n // console.log(task.state);\n } finally {\n zone.cancelTask(task);\n }\n}\n\nfunction ZoneCanWorkSync() {\n let canRunSync = false;\n runZoneSyncTask(() => {\n Promise.resolve().then(() => (canRunSync = true));\n });\n return canRunSync;\n}\n\n/**\n * Tests if global.__drainMicrotaskQueue can be used to drain microtasks\n * Because of Zone.js, even though the native queue might be drained, zone microtasks might not be\n * @param makeTestDrain should it drain the current microtask queue to ensure the queue can be drained\n * @returns if global.__drainMicrotaskQueue can be called\n */\nfunction nativeQueueCanBeDrained(makeTestDrain: boolean) {\n if (typeof (global as any).__drainMicrotaskQueue !== 'function') {\n return false;\n }\n if (!makeTestDrain) {\n return true;\n }\n let canRunSync = false;\n Promise.resolve().then(() => (canRunSync = true));\n (global as any).__drainMicrotaskQueue();\n return canRunSync;\n}\n\n/**\n * Runs a function in the most synchronous way possible\n * @param fn function to run\n * @param done function to chain after done\n */\nfunction runSynchronously(fn: () => void, done?: () => void): void {\n if (typeof Zone !== 'undefined' && ZoneCanWorkSync()) {\n runZoneSyncTask(fn);\n done?.();\n return;\n }\n if (nativeQueueCanBeDrained(true)) {\n fn();\n (global as any).__drainMicrotaskQueue();\n done?.();\n return;\n }\n fn();\n if (done) {\n Utils.queueMacrotask(done);\n }\n}\n\nexport interface ApplicationConfig {\n /**\n * List of providers that should be available to the root component and all its children.\n */\n providers: Array<Provider | EnvironmentProviders>;\n}\n\nexport function runNativeScriptAngularApp<T, K>(options: AppRunOptions<T, K>) {\n const hmrGlobal = globalThis as any;\n\n if (hmrGlobal.__NS_ANGULAR_HMR_REGISTER_ONLY__ && typeof hmrGlobal.__NS_UPDATE_ANGULAR_APP_OPTIONS__ === 'function') {\n hmrGlobal.__NS_UPDATE_ANGULAR_APP_OPTIONS__(options);\n return;\n }\n\n let currentOptions = options;\n let mainModuleRef: NgModuleRef<T> | ApplicationRef = null;\n let loadingModuleRef: NgModuleRef<K> | ApplicationRef;\n let platformRef: PlatformRef = null;\n let bootstrapId = -1;\n\n hmrGlobal.__NS_UPDATE_ANGULAR_APP_OPTIONS__ = (nextOptions: AppRunOptions<T, K>) => {\n currentOptions = nextOptions;\n };\n\n const clearAngularHmrRouteCaches = () => {\n try {\n const injector = (mainModuleRef as any)?.injector;\n const reuseStrategy = injector?.get?.(NSRouteReuseStrategy, null);\n const locationStrategy = injector?.get?.(NSLocationStrategy, null);\n const router = injector?.get?.(Router, null);\n const clearedDetached = reuseStrategy?.clearAllCaches?.() ?? 0;\n const clearedLocation = locationStrategy?.resetForHmr?.() ?? null;\n const cleared = clearAngularHmrRouteConfigCaches(router?.config);\n\n if (\n clearedDetached > 0 ||\n cleared > 0 ||\n (clearedLocation && (clearedLocation.outlets > 0 || clearedLocation.states > 0 || clearedLocation.callbacks > 0 || clearedLocation.hadUrlTree))\n ) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`cleared Angular route caches before reboot: detachedViews=${clearedDetached} routeFields=${cleared} locationState=${JSON.stringify(clearedLocation)}`);\n }\n }\n } catch {}\n };\n const updatePlatformRef = (moduleRef: NgModuleRef<T | K> | ApplicationRef, reason: NgModuleReason) => {\n const newPlatformRef = moduleRef.injector.get(PlatformRef);\n if (newPlatformRef === platformRef) {\n return;\n }\n destroyRef(platformRef, reason);\n platformRef = newPlatformRef;\n platformRef.onDestroy(() => (platformRef = platformRef === newPlatformRef ? null : platformRef));\n };\n let launchEventDone = true;\n let targetRootView: View = null;\n const rootTransitionGuard = createAngularRootTransitionGuard(globalThis as any);\n const refreshRootViewCss = (expectedRoot?: View) => {\n setTimeout(() => {\n const currentRoot = Application.getRootView();\n if (!currentRoot || (expectedRoot && currentRoot !== expectedRoot)) {\n return;\n }\n\n try {\n (currentRoot as any)._onCssStateChange?.();\n } catch {}\n }, 0);\n };\n const setRootView = (ref: NgModuleRef<T | K> | ApplicationRef | View) => {\n const traceEnabled = NativeScriptDebug.isLogEnabled();\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`setRootView called bootstrapId=${bootstrapId} refType=${ref?.constructor?.name}`);\n }\n if (bootstrapId === -1) {\n // edge case: a stale ref racing with a teardown\n if (traceEnabled) {\n NativeScriptDebug.hmrLog('setRootView: bootstrapId is -1, returning early');\n }\n return;\n }\n if (ref instanceof NgModuleRef || ref instanceof ApplicationRef) {\n if (ref.injector.get(DISABLE_ROOT_VIEW_HANDLING, false)) {\n if (traceEnabled) {\n NativeScriptDebug.hmrLog('setRootView: DISABLE_ROOT_VIEW_HANDLING is true, returning');\n }\n return;\n }\n } else {\n if (ref['__disable_root_view_handling']) {\n if (traceEnabled) {\n NativeScriptDebug.hmrLog('setRootView: __disable_root_view_handling is true, returning');\n }\n return;\n }\n }\n Application.getRootView()?._closeAllModalViewsInternal(); // cleanup old rootview\n NativeScriptDebug.bootstrapLog(`Setting RootView ${launchEventDone ? 'outside of' : 'during'} launch event`);\n // TODO: check for leaks when root view isn't properly destroyed\n if (ref instanceof View) {\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`setRootView: ref is View, launchEventDone=${launchEventDone}`);\n NativeScriptDebug.bootstrapLog(`Setting RootView to ${ref}`);\n }\n if (currentOptions.embedded) {\n Application.run({ create: () => ref });\n } else if (launchEventDone) {\n rootTransitionGuard.runApplicationResetRootView(Application, () => ref, ref?.constructor?.name || 'View');\n refreshRootViewCss(ref);\n } else {\n targetRootView = ref;\n }\n return;\n }\n const view = ref.injector.get(APP_ROOT_VIEW) as AppHostView | View;\n const newRoot = view instanceof AppHostView ? view.content : view;\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`setRootView: view=${view?.constructor?.name} newRoot=${newRoot?.constructor?.name} launchEventDone=${launchEventDone} embedded=${!!currentOptions.embedded}`);\n NativeScriptDebug.bootstrapLog(`Setting RootView to ${newRoot}`);\n }\n if (currentOptions.embedded) {\n if (traceEnabled) {\n NativeScriptDebug.hmrLog('setRootView: calling Application.run (embedded)');\n }\n Application.run({ create: () => newRoot });\n } else if (launchEventDone) {\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(\n `setRootView: calling Application.resetRootView newRoot type=${newRoot?.constructor?.name} hasNativeView=${!!newRoot?.nativeView} parent=${newRoot?.parent?.constructor?.name} childCount=${(newRoot as any)?.getChildrenCount?.() ?? 'N/A'}`,\n );\n }\n rootTransitionGuard.runApplicationResetRootView(Application, () => newRoot, newRoot?.constructor?.name || 'View');\n refreshRootViewCss(newRoot);\n if (traceEnabled) {\n NativeScriptDebug.hmrLog('setRootView: Application.resetRootView returned');\n setTimeout(() => {\n const currentRoot = Application.getRootView();\n NativeScriptDebug.hmrLog(\n `setRootView: post-reset getRootView type=${currentRoot?.constructor?.name} hasNativeView=${!!currentRoot?.nativeView} childCount=${(currentRoot as any)?.getChildrenCount?.() ?? 'N/A'}`,\n );\n }, 100);\n }\n } else {\n if (traceEnabled) {\n NativeScriptDebug.hmrLog('setRootView: setting targetRootView (launch in progress)');\n }\n targetRootView = newRoot;\n }\n };\n const showErrorUI = (error: Error) => {\n const message = error.message + '\\n\\n' + error.stack;\n const errorTextBox = new TextView();\n errorTextBox.text = message;\n errorTextBox.color = new Color('red');\n setRootView(errorTextBox);\n };\n const bootstrapRoot = (reason: NgModuleReason) => {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`bootstrapRoot called reason=${reason}`);\n }\n try {\n if (reason === 'hotreload') {\n resetAngularHmrCompiledComponents(getAngularCoreForHmrReset(AngularCore as any, globalThis as any));\n }\n\n bootstrapId = Date.now();\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`bootstrapRoot: new bootstrapId=${bootstrapId}`);\n }\n const currentBootstrapId = bootstrapId;\n let bootstrapped = false;\n let onMainBootstrap = () => {\n setRootView(mainModuleRef);\n };\n runSynchronously(\n () =>\n currentOptions.appModuleBootstrap(reason).then(\n (ref) => {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(\n `appModuleBootstrap resolved ref=${ref?.constructor?.name} currentBootstrapId=${currentBootstrapId} bootstrapId=${bootstrapId}`,\n );\n }\n if (currentBootstrapId !== bootstrapId) {\n // The pending bootstrap resolved AFTER another reboot bumped\n // bootstrapId. This typically happens when a developer ships\n // an async APP_INITIALIZER and the user exits/re-enters the\n // app while it's still resolving. Drop this ref.\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog('bootstrap ID mismatch, destroying ref');\n }\n ref.destroy();\n return;\n }\n\n // When Zone.js is active and we're outside the Angular zone (which\n // happens in HMR mode — the Promise .then() runs in the root zone),\n // wrap the completion handler inside NgZone.run() so that:\n // 1. resetRootView + component initialization happens inside the Angular zone\n // 2. ngrx effects, store dispatches, and signal-triggered actions run inside NgZone\n // 3. strictActionWithinNgZone checks pass for initial actions\n // In zoneless apps (no Zone.js), skip the wrapping entirely.\n const useZoneWrap = typeof Zone !== 'undefined' && !NgZone.isInAngularZone();\n const runInZone = (fn: () => void) => {\n if (useZoneWrap) {\n ref.injector.get(NgZone).run(fn);\n } else {\n fn();\n }\n };\n runInZone(() => {\n mainModuleRef = ref;\n\n // Expose ApplicationRef for HMR to trigger change detection.\n // Check by duck-typing because `instanceof` can fail across\n // module realms during HMR — we may be holding a fresh\n // ApplicationRef class while `ref` was constructed by an\n // earlier (now-evicted) realm copy.\n const refAny = ref as any;\n const isAppRef = refAny && typeof refAny.tick === 'function' && Array.isArray(refAny.components);\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(\n `ref type check isAppRef=${isAppRef} hasTick=${typeof refAny?.tick === 'function'} hasComponents=${Array.isArray(refAny?.components)}`,\n );\n }\n\n if (isAppRef) {\n global['__NS_ANGULAR_APP_REF__'] = ref;\n global['__NS_HMR_BOOT_COMPLETE__'] = true;\n\n if (!global['__NS_ANGULAR_COMPONENTS__']) {\n global['__NS_ANGULAR_COMPONENTS__'] = {};\n }\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`ApplicationRef components count=${refAny.components?.length ?? 0}`);\n }\n if (refAny.components && refAny.components.length > 0) {\n const componentRef = refAny.components[0];\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(\n `componentRef=${componentRef?.constructor?.name} componentType=${componentRef?.componentType?.name}`,\n );\n }\n\n // Angular 17+ standalone: the component class is on\n // `componentRef.componentType`. Older Angular keeps it on\n // `componentRef.instance.constructor`.\n let componentType = componentRef?.componentType;\n if (!componentType && componentRef?.instance) {\n componentType = componentRef.instance.constructor;\n }\n\n if (componentType && componentType.name) {\n global['__NS_ANGULAR_COMPONENTS__'][componentType.name] = componentType;\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`registered component for HMR: ${componentType.name}`);\n }\n } else if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog('could not resolve componentType name');\n }\n } else if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog('no components in ApplicationRef');\n }\n } else {\n const appRef = ref.injector.get(ApplicationRef, null);\n if (appRef) {\n global['__NS_ANGULAR_APP_REF__'] = appRef;\n // Mark boot complete for the HMR system\n global['__NS_HMR_BOOT_COMPLETE__'] = true;\n }\n }\n\n (isAppRef ? refAny.components[0] : ref).onDestroy(\n () => (mainModuleRef = mainModuleRef === ref ? null : mainModuleRef),\n );\n updatePlatformRef(ref, reason);\n const styleTag = ref.injector.get(NATIVESCRIPT_ROOT_MODULE_ID);\n (isAppRef ? refAny.components[0] : ref).onDestroy(() => {\n removeTaggedAdditionalCSS(styleTag);\n });\n bootstrapped = true;\n onMainBootstrap();\n emitModuleBootstrapEvent(ref, 'main', reason);\n // bootstrapped component: (ref as any)._bootstrapComponents[0];\n });\n },\n (err) => {\n bootstrapped = true;\n NativeScriptDebug.bootstrapLogError(`Error bootstrapping app module:\\n${err.message}\\n\\n${err.stack}`);\n showErrorUI(err);\n throw err;\n },\n ),\n () => {\n if (currentBootstrapId !== bootstrapId) {\n return;\n }\n if (!bootstrapped) {\n if (currentOptions.loadingModule) {\n runSynchronously(() =>\n currentOptions.loadingModule(reason).then(\n (loadingRef) => {\n if (currentBootstrapId !== bootstrapId) {\n // this module is old and not needed anymore\n // this may happen when developer uses async app initializer and the user exits the app before this bootstraps\n loadingRef.destroy();\n return;\n }\n loadingModuleRef = loadingRef;\n (loadingModuleRef instanceof ApplicationRef\n ? loadingModuleRef.components[0]\n : loadingModuleRef\n ).onDestroy(() => (loadingModuleRef = loadingModuleRef === loadingRef ? null : loadingModuleRef));\n updatePlatformRef(loadingRef, reason);\n const styleTag = loadingModuleRef.injector.get(NATIVESCRIPT_ROOT_MODULE_ID);\n (loadingModuleRef instanceof ApplicationRef\n ? loadingModuleRef.components[0]\n : loadingModuleRef\n ).onDestroy(() => {\n removeTaggedAdditionalCSS(styleTag);\n });\n setRootView(loadingRef);\n onMainBootstrap = () => {\n // delay showing the new rootview to avoid flashes\n Utils.queueMacrotask(() => {\n const loadingService = loadingModuleRef.injector.get(NativeScriptLoadingService);\n loadingModuleRef.injector.get(NgZone).run(() => {\n loadingService._notifyMainModuleReady();\n });\n loadingService.readyToDestroy$\n .pipe(\n filter((ready) => ready),\n take(1),\n )\n .subscribe(() => {\n destroyRef(loadingModuleRef, 'loading', reason);\n loadingModuleRef = null;\n setRootView(mainModuleRef);\n });\n });\n };\n emitModuleBootstrapEvent(loadingModuleRef, 'loading', reason);\n },\n (err) => {\n NativeScriptDebug.bootstrapLogError(\n `Error bootstrapping loading module:\\n${err.message}\\n\\n${err.stack}`,\n );\n showErrorUI(err);\n throw err;\n },\n ),\n );\n } else if (currentOptions.launchView) {\n let launchView = currentOptions.launchView(reason);\n setRootView(launchView);\n if (launchView.startAnimation) {\n setTimeout(() => {\n // ensure launch animation is executed after launchView added to view stack\n launchView.startAnimation();\n });\n }\n onMainBootstrap = () => {\n // delay showing the new rootview to avoid flashes\n Utils.queueMacrotask(() => {\n if (launchView.cleanup) {\n launchView\n .cleanup()\n .catch()\n .then(() => {\n launchView = null;\n setRootView(mainModuleRef);\n });\n } else {\n launchView = null;\n setRootView(mainModuleRef);\n }\n });\n };\n } else {\n console.warn(\n 'App is bootstrapping asynchronously (likely APP_INITIALIZER) but did not provide a launchView or LoadingModule.',\n );\n }\n }\n },\n );\n } catch (err) {\n NativeScriptDebug.bootstrapLogError(`Error in Bootstrap Function:\\n${err.message}\\n\\n${err.stack}`);\n }\n };\n const disposePlatform = (reason: NgModuleReason) => {\n destroyRef(platformRef, reason);\n platformRef = null;\n };\n const disposeLastModules = (reason: NgModuleReason) => {\n if (reason === 'hotreload') {\n clearAngularHmrRouteCaches();\n }\n\n // reset bootstrap ID to make sure any modules bootstrapped after this are discarded\n bootstrapId = -1;\n destroyRef(loadingModuleRef, 'loading', reason);\n loadingModuleRef = null;\n destroyRef(mainModuleRef, 'main', reason);\n mainModuleRef = null;\n };\n const launchCallback = profile('@nativescript/angular/platform-common.launchCallback', (args: LaunchEventData) => {\n launchEventDone = false;\n bootstrapRoot('applaunch');\n launchEventDone = true;\n args.root = targetRootView || null;\n });\n const exitCallback = profile('@nativescript/angular/platform-common.exitCallback', (args: ApplicationEventData) => {\n disposeLastModules('appexit');\n });\n\n let oldAddEventListener;\n if (typeof Zone !== 'undefined' && global.NativeScriptGlobals?.events?.[Zone.__symbol__('addEventListener')]) {\n oldAddEventListener = global.NativeScriptGlobals.events.addEventListener;\n global.NativeScriptGlobals.events.addEventListener =\n global.NativeScriptGlobals.events[Zone.__symbol__('addEventListener')];\n }\n if (!currentOptions.embedded) {\n Application.on(Application.launchEvent, launchCallback);\n }\n Application.on(Application.exitEvent, exitCallback);\n if (oldAddEventListener) {\n global.NativeScriptGlobals.events.addEventListener = oldAddEventListener;\n }\n\n // Detect HMR environment (webpack or Vite)\n const isWebpackHot = !!import.meta['webpackHot'];\n // import.meta.hot is available when code goes through Vite's transform pipeline.\n // When @nativescript/angular is pre-bundled in the vendor (esbuild), import.meta.hot\n // won't exist. Fall back to the global placeholder flag that the NativeScript Vite\n // HMR runtime sets during dev boot.\n const isViteHot = !!import.meta['hot'] || !!(globalThis as any).__NS_DEV_PLACEHOLDER_ROOT_EARLY__;\n const isHotReloadEnabled = isWebpackHot || isViteHot;\n\n // Always expose HMR globals for both webpack and Vite HMR support\n // These allow the HMR runtime to properly dispose and re-bootstrap Angular\n global['__dispose_app_ng_platform__'] = () => {\n disposePlatform('hotreload');\n };\n global['__dispose_app_ng_modules__'] = () => {\n disposeLastModules('hotreload');\n };\n global['__bootstrap_app_ng_modules__'] = () => {\n bootstrapRoot('hotreload');\n };\n global['__cleanup_ng_hot__'] = () => {\n Application.off(Application.launchEvent, launchCallback);\n Application.off(Application.exitEvent, exitCallback);\n disposeLastModules('hotreload');\n disposePlatform('hotreload');\n };\n global['__reboot_ng_modules__'] = (shouldDisposePlatform: boolean = false) => {\n // Bump the global HMR cycle counter so subsequent diagnostic log\n // lines (class registry, dialog services) can be cross-referenced\n // to a specific reboot. Counter is always incremented; the trace\n // category gates whether we surface it in the console.\n const cycleNum = _hmrDiagBumpCycle();\n const traceEnabled = NativeScriptDebug.isLogEnabled();\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(\n `__reboot_ng_modules__ called cycle=${cycleNum} shouldDisposePlatform=${shouldDisposePlatform} bootstrapId=${bootstrapId} hasMainModuleRef=${!!mainModuleRef}`,\n );\n }\n try {\n global['__NS_CAPTURE_ANGULAR_HMR_ROUTE__']?.();\n } catch {}\n disposeLastModules('hotreload');\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`after disposeLastModules cycle=${cycleNum} bootstrapId=${bootstrapId}`);\n }\n if (shouldDisposePlatform) {\n disposePlatform('hotreload');\n }\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`calling bootstrapRoot cycle=${cycleNum}`);\n }\n bootstrapRoot('hotreload');\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`bootstrapRoot returned cycle=${cycleNum} bootstrapId=${bootstrapId}`);\n }\n };\n\n if (isWebpackHot) {\n // Webpack-specific HMR handling\n import.meta['webpackHot'].decline();\n\n if (!Application.hasLaunched()) {\n Application.run();\n return;\n }\n bootstrapRoot('hotreload');\n return;\n }\n\n if (isViteHot) {\n // Vite-specific HMR handling\n // Vite HMR is handled by @nativescript/vite's HMR runtime\n // which will call __reboot_ng_modules__ when needed\n\n if (!Application.hasLaunched()) {\n Application.run();\n return;\n }\n bootstrapRoot('hotreload');\n return;\n }\n\n if (currentOptions.embedded) {\n bootstrapRoot('applaunch');\n } else {\n Application.run();\n }\n}\n","import { CompilerOptions, Injector, NgModuleRef, NgZone, PlatformRef, Type } from '@angular/core';\nimport { ɵNgModuleFactory as NgModuleFactory } from '@angular/core';\nimport { AppLaunchView, AppRunOptions, runNativeScriptAngularApp } from './application';\n\n/**\n * Provides additional options to the bootstraping process.\n *\n *\n */\nexport interface BootstrapOptions {\n /**\n * Optionally specify which `NgZone` should be used.\n *\n * - Provide your own `NgZone` instance.\n * - `zone.js` - Use default `NgZone` which requires `Zone.js`.\n * - `noop` - Use `NoopNgZone` which does nothing.\n */\n ngZone?: NgZone | 'zone.js' | 'noop';\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can colesce such kind of events to only trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling a animation frame. So in the case above,\n * the change detection will only be triggered once.\n */\n ngZoneEventCoalescing?: boolean;\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n *\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n ngZoneRunCoalescing?: boolean;\n}\n\nexport class NativeScriptPlatformRefProxy extends PlatformRef {\n options: AppRunOptions<any, any>;\n constructor(private platform: PlatformRef, private launchView?: AppLaunchView) {\n super();\n }\n\n bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>): Promise<NgModuleRef<M>> {\n this.options = {\n appModuleBootstrap: () => this.platform.bootstrapModuleFactory(moduleFactory),\n launchView: () => this.launchView,\n };\n\n runNativeScriptAngularApp(this.options);\n\n return null;\n }\n bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>> {\n this.options = {\n appModuleBootstrap: () => this.platform.bootstrapModule(moduleType, compilerOptions),\n };\n\n runNativeScriptAngularApp(this.options);\n\n return null;\n }\n\n onDestroy(callback: () => void): void {\n this.platform.onDestroy(callback);\n }\n\n get injector(): Injector {\n return this.platform.injector;\n }\n\n destroy(): void {\n this.platform.destroy();\n }\n\n get destroyed(): boolean {\n return this.platform.destroyed;\n }\n}\n","import { XhrFactory } from '@angular/common';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class NativescriptXhrFactory extends XhrFactory {\n build() {\n return new XMLHttpRequest();\n }\n}\n","import { FormattedString, Frame, Page, Span, TextBase } from '@nativescript/core';\nimport { isInvisibleNode } from '../views/utils';\nimport { NgView, ViewClassMeta } from '../views/view-types';\n\nexport const frameMeta: ViewClassMeta = {\n insertChild: (parent: Frame, child: NgView) => {\n // Page cannot be added to Frame with _addChildFromBuilder (thwos \"use defaultPage\" error)\n if (isInvisibleNode(child)) {\n return;\n } else if (child instanceof Page) {\n parent.navigate({ create: () => child });\n } else {\n throw new Error('Only a Page can be a child of Frame');\n }\n },\n};\n\nexport const formattedStringMeta: ViewClassMeta = {\n insertChild(parent: FormattedString, child: Span, next: Span) {\n const index = parent.spans.indexOf(next);\n if (index > -1) {\n parent.spans.splice(index, 0, child);\n } else {\n parent.spans.push(child);\n }\n },\n removeChild(parent: FormattedString, child: Span) {\n const index = parent.spans.indexOf(child);\n if (index > -1) {\n parent.spans.splice(index, 1);\n }\n },\n};\n\nexport const textBaseMeta: ViewClassMeta = {\n insertChild(parent: TextBase, child, next) {\n if (child instanceof FormattedString) {\n parent.formattedText = child;\n } else if (child instanceof Span) {\n parent.formattedText ??= new FormattedString();\n formattedStringMeta.insertChild(parent.formattedText, child, next);\n }\n },\n removeChild(parent: TextBase, child: NgView) {\n if (!parent.formattedText) return;\n if (child instanceof FormattedString) {\n if (parent.formattedText === child) {\n parent.formattedText = null;\n }\n } else if (child instanceof Span) {\n formattedStringMeta.removeChild(parent.formattedText, child);\n }\n },\n};\n","import { LayoutBase, View } from '@nativescript/core';\nimport { InvisibleNode } from '../views/invisible-nodes';\nimport { ViewClassMeta } from '../views/view-types';\n\nexport type ViewResolver = () => any;\n\n// Use a global elementMap so the vendor bundle and HTTP-loaded module instances\n// share the same element registry during Vite HMR (where two copies of\n// @nativescript/angular can coexist in separate module realms).\nexport const elementMap: Map<string, { resolver: ViewResolver; meta?: ViewClassMeta }> =\n (globalThis as any).__NS_NG_ELEMENT_MAP__ || ((globalThis as any).__NS_NG_ELEMENT_MAP__ = new Map());\nconst camelCaseSplit = /([a-z0-9])([A-Z])/g;\nconst defaultViewMeta: ViewClassMeta = { skipAddToDom: false };\n\nexport function registerElement(elementName: string, resolver: ViewResolver, meta?: ViewClassMeta): void {\n const entry = { resolver, meta };\n elementMap.set(elementName, entry);\n elementMap.set(elementName.toLowerCase(), entry);\n elementMap.set(elementName.replace(camelCaseSplit, '$1-$2').toLowerCase(), entry);\n}\n\nexport function getViewClass(elementName: string): any {\n const entry = elementMap.get(elementName) || elementMap.get(elementName.toLowerCase());\n if (!entry) {\n throw new TypeError(`No known component for element ${elementName}.`);\n }\n\n try {\n return entry.resolver();\n } catch (e) {\n throw new TypeError(`Could not load view for: ${elementName}.${e}`);\n }\n}\n\nexport function getViewMeta(nodeName: string): ViewClassMeta {\n const entry = elementMap.get(nodeName) || elementMap.get(nodeName.toLowerCase());\n return (entry && entry.meta) || defaultViewMeta;\n}\n\nexport function isKnownView(elementName: string): boolean {\n return elementMap.has(elementName) || elementMap.has(elementName.toLowerCase());\n}\n\nexport function extractSingleViewRecursive(nodes: Array<any>, nestLevel: number): View {\n const actualNodes = nodes.filter((node) => !(node instanceof InvisibleNode));\n\n if (actualNodes.length === 0) {\n throw new Error(`No suitable views found in list template! ` + `Nesting level: ${nestLevel}`);\n } else if (actualNodes.length > 1) {\n throw new Error(`More than one view found in list template!` + `Nesting level: ${nestLevel}`);\n }\n\n const rootLayout = actualNodes[0];\n if (!rootLayout) {\n return extractSingleViewRecursive(rootLayout.children, nestLevel + 1);\n }\n\n const parentLayout = rootLayout.parent;\n if (parentLayout instanceof LayoutBase) {\n const node = rootLayout.parentNode;\n parentLayout.removeChild(rootLayout);\n rootLayout.parentNode = node;\n }\n\n return rootLayout;\n}\n\n/**\n * @deprecated getSingleViewRecursive is deprecated, use extractSingleViewRecursive\n */\nexport function getSingleViewRecursive(nodes: Array<any>, nestLevel: number): View {\n return extractSingleViewRecursive(nodes, nestLevel);\n}\n","import {\n AbsoluteLayout,\n ActivityIndicator,\n Button,\n ContentView,\n DatePicker,\n DockLayout,\n FlexboxLayout,\n FormattedString,\n Frame,\n GridLayout,\n HtmlView,\n Image,\n Label,\n ListPicker,\n ListView,\n Page,\n Placeholder,\n Progress,\n ProxyViewContainer,\n Repeater,\n RootLayout,\n ScrollView,\n SearchBar,\n SegmentedBar,\n SegmentedBarItem,\n Slider,\n Span,\n SplitView,\n StackLayout,\n Switch,\n TabView,\n TextField,\n TextView,\n TimePicker,\n WebView,\n WrapLayout,\n} from '@nativescript/core';\nimport { formattedStringMeta, frameMeta, textBaseMeta } from './metas';\nimport { registerElement } from './registry';\n\n// Register default NativeScript components\n// Note: ActionBar related components are registerd together with action-bar directives.\nexport function registerNativeScriptViewComponents() {\n // No guard needed — registerElement calls Map.set which is idempotent.\n // The old `elementMap.size > 0` guard could falsely skip registration\n // in Vite HMR mode when elements were registered by a prior boot phase.\n registerElement('AbsoluteLayout', () => AbsoluteLayout);\n registerElement('ActivityIndicator', () => ActivityIndicator);\n registerElement('Button', () => Button, textBaseMeta);\n registerElement('ContentView', () => ContentView);\n registerElement('DatePicker', () => DatePicker);\n registerElement('DockLayout', () => DockLayout);\n registerElement('Frame', () => Frame, frameMeta);\n registerElement('GridLayout', () => GridLayout);\n registerElement('HtmlView', () => HtmlView);\n registerElement('Image', () => Image);\n // Parse5 changes <Image> tags to <img>. WTF!\n registerElement('img', () => Image);\n registerElement('Label', () => Label, textBaseMeta);\n registerElement('ListPicker', () => ListPicker);\n registerElement('ListView', () => ListView);\n registerElement('Page', () => Page);\n registerElement('Placeholder', () => Placeholder);\n registerElement('Progress', () => Progress);\n registerElement('ProxyViewContainer', () => ProxyViewContainer);\n registerElement('Repeater', () => Repeater);\n registerElement('RootLayout', () => RootLayout);\n registerElement('ScrollView', () => ScrollView);\n registerElement('SearchBar', () => SearchBar);\n registerElement('SegmentedBar', () => SegmentedBar);\n registerElement('SegmentedBarItem', () => SegmentedBarItem);\n registerElement('Slider', () => Slider);\n registerElement('SplitView', () => SplitView);\n registerElement('StackLayout', () => StackLayout);\n registerElement('FlexboxLayout', () => FlexboxLayout);\n registerElement('Switch', () => Switch);\n registerElement('TabView', () => TabView);\n registerElement('TextField', () => TextField, textBaseMeta);\n registerElement('TextView', () => TextView, textBaseMeta);\n registerElement('TimePicker', () => TimePicker);\n registerElement('WebView', () => WebView);\n registerElement('WrapLayout', () => WrapLayout);\n registerElement('FormattedString', () => FormattedString, formattedStringMeta);\n registerElement('Span', () => Span);\n}\n","import { unsetValue, View } from '@nativescript/core';\nimport { getViewClass, getViewMeta, isKnownView } from './element-registry';\nimport { NamespaceFilter } from './property-filter';\nimport {\n CommentNode,\n isContentView,\n isDetachedElement,\n isInvisibleNode,\n isLayout,\n isView,\n NgView,\n TextNode,\n} from './views';\n\nimport { NativeScriptDebug } from './trace';\nimport { NgLayoutBase } from './views/view-types';\n\n// Note: this utility exists from deep core import however results in\n// Module not found: Error: Can't resolve '@nativescript/core/ui/core/properties'\nfunction isCssVariable(property: string) {\n return /^--[^,\\s]+?$/.test(property);\n}\n\nconst ELEMENT_NODE_TYPE = 1;\nconst XML_ATTRIBUTES = Object.freeze(['style', 'rows', 'columns', 'fontAttributes']);\nconst whiteSpaceSplitter = /\\s+/;\n\nexport type BeforeAttachAction = (view: View) => void;\n\nfunction printNgTree(view: NgView) {\n let parent = view;\n while (parent.parent && (parent.parent as NgView).firstChild) {\n parent = parent.parent as NgView;\n }\n printChildrenRecurse(parent);\n}\nfunction printChildrenRecurse(parent: NgView) {\n const children = parent.firstChild ? [parent.firstChild, ...getChildrenSiblings(parent.firstChild).nextSiblings] : [];\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`parent: ${parent}, firstChild: ${parent.firstChild}, lastChild: ${parent.lastChild} children: ${children}`);\n if (parent.firstChild) {\n NativeScriptDebug.viewUtilLog(`----- start ${parent}`);\n }\n }\n children.forEach((c) => printChildrenRecurse(c));\n if (parent.firstChild && NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`----- end ${parent}`);\n }\n}\n\nfunction getChildrenSiblings(view: NgView) {\n const nextSiblings = [];\n const previousSiblings = [];\n let sibling = view.nextSibling;\n while (sibling) {\n nextSiblings.push(sibling);\n sibling = sibling.nextSibling;\n }\n sibling = view.previousSibling;\n while (sibling) {\n previousSiblings.push(sibling);\n sibling = sibling.previousSibling;\n }\n return {\n previousSiblings,\n nextSiblings,\n };\n}\n\nfunction printSiblingsTree(view: NgView) {\n if (!NativeScriptDebug.isLogEnabled()) return;\n const { previousSiblings, nextSiblings } = getChildrenSiblings(view);\n NativeScriptDebug.viewUtilLog(`${view} previousSiblings: ${previousSiblings} nextSiblings: ${nextSiblings}`);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nconst propertyMaps: Map<Function, Map<string, string>> = new Map<Function, Map<string, string>>();\n\nexport class ViewUtil {\n constructor(\n private namespaceFilters?: NamespaceFilter[],\n private reuseViews?: boolean,\n ) {}\n /**\n * Inserts a child into a parrent, preferably before next.\n * @param parent parent view\n * @param child child view to be added\n * @param previous previous element. If present, insert after this.\n * @param next next element. If present, insert before this (previous is ignored).\n */\n private insertChild(parent: View, child: View, previous?: NgView, next?: NgView) {\n if (!parent) {\n return;\n }\n\n const extendedParent = this.ensureNgViewExtensions(parent);\n const extendedChild = this.ensureNgViewExtensions(child);\n\n // this should never enter, as angular is supposed to remove the child from the previous parent before calling this\n // but when angular animations are enabled, the removal might be delayed, so we need to ensure this view is not anywhere\n // this seems to only happens to CommentNodes\n if (extendedChild.parentNode) {\n this.removeChild(extendedChild.parentNode, extendedChild);\n }\n // if there's a next child, previous is the previousSibling of it\n if (next) {\n previous = next.previousSibling;\n } else if (previous) {\n // if there's a previous, next is the nextSibling of it\n next = previous.nextSibling;\n } else {\n // no previous or next, append to the parent\n previous = extendedParent.lastChild; // this can still be undefined if the parent has no children!\n }\n this.insertInList(extendedParent, extendedChild, previous, next);\n\n if (isDetachedElement(child) || isInvisibleNode(child)) {\n extendedChild.parentNode = extendedParent;\n }\n\n if (!isDetachedElement(child)) {\n const nextVisual = this.findNextVisual(next);\n this.addToVisualTree(extendedParent, extendedChild, nextVisual);\n } else if (isInvisibleNode(extendedChild)) {\n const nextVisual = this.findNextVisual(next);\n this.addInvisibleNode(extendedParent, extendedChild, nextVisual);\n }\n // printNgTree(extendedChild);\n }\n\n public insertBefore(parent: View, child: View, refChild?: View | NgView) {\n const extendedRef = refChild ? this.ensureNgViewExtensions(refChild) : undefined;\n this.insertChild(parent, child, undefined, extendedRef);\n }\n public insertAfter(parent: View, child: View, refChild?: View | NgView) {\n const extendedRef = refChild ? this.ensureNgViewExtensions(refChild) : undefined;\n this.insertChild(parent, child, extendedRef);\n }\n\n public appendChild(parent: View, child: View) {\n this.insertChild(parent, child);\n }\n\n /**\n * Inserts a view into the parent/sibling linked list\n * !WARNING: this method makes no checks to validate the integrity of previous/next children\n * @param parent parent view\n * @param child child view\n * @param previous previous element. null/undefined for first element\n * @param next next element. null/undefined for last element\n */\n private insertInList(parent: NgView, child: NgView, previous: NgView, next: NgView): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(\n `ViewUtil.insertInList parent: ${parent}, view: ${child}, ` + `previous: ${previous}, next: ${next}`,\n );\n }\n\n if (previous) {\n previous.nextSibling = child;\n child.previousSibling = previous;\n } else {\n parent.firstChild = child;\n }\n\n if (next) {\n child.nextSibling = next;\n next.previousSibling = child;\n } else {\n parent.lastChild = child;\n }\n }\n\n private addToVisualTree(parent: NgView, child: NgView, next: NgView): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`ViewUtil.addToVisualTree parent: ${parent}, view: ${child}, next: ${next}`);\n }\n\n if (parent.meta && parent.meta.insertChild) {\n parent.meta.insertChild(parent, child, next);\n } else if (isLayout(parent)) {\n this.insertToLayout(parent, child, next);\n } else if (isContentView(parent)) {\n parent.content = child;\n } else if (parent && (<any>parent)._addChildFromBuilder) {\n (<any>parent)._addChildFromBuilder(child.nodeName, child);\n }\n }\n\n private addInvisibleNode(parent: NgView, child: NgView, next: NgView): void {\n if (parent.meta?.insertInvisibleNode) {\n parent.meta.insertInvisibleNode(parent, child, next);\n } else {\n if (child instanceof TextNode) {\n (parent as any).text = child.text;\n child.registerTextChange((t) => ((parent as any).text = t), parent);\n }\n }\n }\n\n private insertToLayout(parent: NgLayoutBase, child: NgView, next: NgView): void {\n if (child.parent === parent) {\n this.removeLayoutChild(parent, child);\n }\n\n const nextVisual = this.findNextVisual(next);\n if (nextVisual) {\n const index = parent.getChildIndex(nextVisual);\n parent.insertChild(child, index);\n } else {\n parent.addChild(child);\n }\n // parent.eachChild((c) => {console.log(c); return true});\n }\n\n private findNextVisual(view: NgView): NgView {\n let next = view;\n while (next && isDetachedElement(next)) {\n next = next.nextSibling;\n }\n\n return next;\n }\n\n public removeChild(parent: View, child: View) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`ViewUtil.removeChild parent: ${parent} child: ${child}`);\n }\n\n if (!parent) {\n return;\n }\n\n const extendedParent = this.ensureNgViewExtensions(parent);\n const extendedChild = this.ensureNgViewExtensions(child);\n extendedChild.parentNode = null;\n\n this.removeFromList(extendedParent, extendedChild);\n if (!isDetachedElement(extendedChild)) {\n this.removeFromVisualTree(extendedParent, extendedChild);\n } else if (isInvisibleNode(extendedChild)) {\n this.removeInvisibleNode(extendedParent, extendedChild);\n }\n }\n\n private removeFromList(parent: NgView, child: NgView) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`ViewUtil.removeFromList parent: ${parent} child: ${child}`);\n }\n\n // only child. null everything\n if (parent.firstChild === child && parent.lastChild === child) {\n parent.firstChild = null;\n parent.lastChild = null;\n child.nextSibling = null;\n child.previousSibling = null;\n return;\n }\n\n const previous = child.previousSibling;\n const next = child.nextSibling;\n // is first child, make the next sibling the first child (can be null)\n if (parent.firstChild === child) {\n parent.firstChild = next;\n }\n\n // is last child, make the previous sibling the last child (can be null)\n if (parent.lastChild === child) {\n parent.lastChild = previous;\n }\n\n // we have a previous sibling, make it point to the next sibling\n if (previous) {\n previous.nextSibling = next;\n }\n\n // we have a next sibling, make it point to the previous\n if (next) {\n next.previousSibling = previous;\n }\n\n // finally, null the siblings\n child.nextSibling = null;\n child.previousSibling = null;\n }\n\n // NOTE: This one is O(n) - use carefully\n private findPreviousElement(parent: NgView, child: NgView): NgView {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`ViewUtil.findPreviousElement parent: ${parent} child: ${child}`);\n }\n\n let previousVisual;\n if (isLayout(parent)) {\n previousVisual = this.getPreviousVisualElement(parent, child);\n }\n\n let previous = previousVisual || parent.firstChild;\n\n // since detached elements are not added to the visual tree,\n // we need to find the actual previous sibling of the view,\n // which may as well be an invisible node\n while (previous && previous !== child && previous.nextSibling !== child) {\n previous = previous.nextSibling;\n }\n\n return previous;\n }\n\n private getPreviousVisualElement(parent: NgLayoutBase, child: NgView): NgView {\n const elementIndex = parent.getChildIndex(child);\n\n if (elementIndex > 0) {\n return parent.getChildAt(elementIndex - 1) as NgView;\n }\n }\n\n // NOTE: This one is O(n) - use carefully\n public getChildIndex(parent: any, child: NgView) {\n if (isLayout(parent)) {\n return parent.getChildIndex(child);\n } else if (isContentView(parent)) {\n return child === parent.content ? 0 : -1;\n }\n }\n\n private removeFromVisualTree(parent: NgView, child: NgView) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`ViewUtil.removeFromVisualTree parent: ${parent} child: ${child}`);\n }\n\n if (parent.meta && parent.meta.removeChild) {\n parent.meta.removeChild(parent, child);\n } else if (isLayout(parent)) {\n this.removeLayoutChild(parent, child);\n } else if (isContentView(parent) && parent.content === child) {\n parent.content = null;\n } else if (isView(parent)) {\n parent._removeView(child);\n }\n }\n\n private removeInvisibleNode(parent: NgView, child: NgView) {\n if (parent.meta?.removeInvisibleNode) {\n parent.meta.removeInvisibleNode(parent, child);\n } else {\n if (child instanceof TextNode) {\n child.unregisterTextChange(parent);\n }\n }\n }\n\n private removeLayoutChild(parent: NgLayoutBase, child: NgView): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`ViewUtil.removeLayoutChild parent: ${parent} child: ${child}`);\n }\n\n const index = parent.getChildIndex(child);\n\n if (index !== -1) {\n parent.removeChild(child);\n }\n }\n\n public createComment(value: string): CommentNode {\n return new CommentNode(value);\n }\n\n public createText(value: string): TextNode {\n return new TextNode(value);\n }\n\n public createView(name: string): NgView {\n const originalName = name;\n if (!isKnownView(name)) {\n name = 'ProxyViewContainer';\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`Creating view: ${originalName} ${name}`);\n }\n\n const viewClass = getViewClass(name);\n const view = <NgView>new viewClass();\n const ngView = this.setNgViewExtensions(view, name);\n ngView.reusable = !!this.reuseViews;\n\n return ngView;\n }\n\n private ensureNgViewExtensions(view: View): NgView {\n if (Object.hasOwnProperty.call(view, 'meta')) {\n return view as NgView;\n } else {\n const name = view.cssType || view.typeName;\n const ngView = this.setNgViewExtensions(view, name);\n\n return ngView;\n }\n }\n\n private setNgViewExtensions(view: View, name: string): NgView {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`Make into a NgView view: ${view} name: \"${name}\"`);\n }\n\n const ngView = view as NgView;\n ngView.nodeName = name;\n ngView.meta = getViewMeta(name);\n\n // we're setting the node type of the view\n // to 'element' because of checks done in the\n // dom animation engine\n ngView.nodeType = ELEMENT_NODE_TYPE;\n\n return ngView;\n }\n\n public setProperty(view: NgView, attributeName: string, value: any, namespace?: string): void {\n if (!view || (namespace && !this.runsIn(namespace))) {\n return;\n }\n\n if (attributeName.indexOf('.') !== -1) {\n // Handle nested properties\n const properties = attributeName.split('.');\n attributeName = properties[properties.length - 1];\n\n let propMap = this.getProperties(view);\n let i = 0;\n while (i < properties.length - 1 && typeof view !== 'undefined') {\n let prop = properties[i];\n if (propMap.has(prop)) {\n prop = propMap.get(prop);\n }\n\n view = view[prop];\n propMap = this.getProperties(view);\n i++;\n }\n }\n\n if (typeof view !== 'undefined') {\n this.setPropertyInternal(view, attributeName, value);\n }\n }\n\n private runsIn(platform: string): boolean {\n let runs = true;\n const last = () => true;\n if (this.namespaceFilters) {\n let chain = (p: string) => true;\n for (let i = this.namespaceFilters.length - 1; i >= 0; i--) {\n const currentChain = chain;\n chain = (p) => this.namespaceFilters[i].runsIn(p, currentChain);\n }\n runs = chain(platform);\n runs = runs !== false ? true : false; // undefined means true\n // this.namespaceFilters.some((filter) => {\n // \tconst runsInFilter = filter.runsIn(platform);\n // \tif (runsInFilter !== undefined) {\n // \t\truns = runsInFilter;\n // \t\treturn true;\n // \t}\n // });\n }\n return runs;\n }\n\n private setPropertyInternal(view: NgView, attributeName: string, value: any): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`Setting attribute: ${attributeName}=${value} to ${view}`);\n }\n\n if (attributeName === 'class') {\n this.setClasses(view, value);\n return;\n }\n\n if (XML_ATTRIBUTES.indexOf(attributeName) !== -1) {\n view[attributeName] = value;\n return;\n }\n\n const propMap = this.getProperties(view);\n const propertyName = propMap.get(attributeName);\n\n // Ensure the children of a collection currently have no parent set.\n if (Array.isArray(value)) {\n this.removeParentReferencesFromItems(value);\n }\n\n if (propertyName) {\n // We have a lower-upper case mapped property.\n view[propertyName] = value;\n return;\n }\n\n // Unknown attribute value -- just set it to our object as is.\n view[attributeName] = value;\n }\n\n private removeParentReferencesFromItems(items: any[]): void {\n for (const item of items) {\n if (item.parent && item.parentNode) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`Unassigning parent ${item.parentNode} on value: ${item}`);\n }\n item.parent = undefined;\n item.parentNode = undefined;\n }\n }\n }\n\n private getProperties(instance: any): Map<string, string> {\n const type = instance && instance.constructor;\n if (!type) {\n return new Map<string, string>();\n }\n\n if (!propertyMaps.has(type)) {\n const propMap = new Map<string, string>();\n for (const propName in instance) {\n // tslint:disable:forin\n propMap.set(propName.toLowerCase(), propName);\n }\n propertyMaps.set(type, propMap);\n }\n\n return propertyMaps.get(type);\n }\n\n private cssClasses(view: NgView) {\n if (!view.ngCssClasses) {\n view.ngCssClasses = new Map<string, boolean>();\n }\n return view.ngCssClasses;\n }\n\n public addClass(view: View | NgView, className: string): void {\n const extendedView = this.ensureNgViewExtensions(view);\n this.cssClasses(extendedView).set(className, true);\n this.syncClasses(extendedView);\n }\n\n public removeClass(view: View, className: string): void {\n const extendedView = this.ensureNgViewExtensions(view);\n this.cssClasses(extendedView).delete(className);\n this.syncClasses(extendedView);\n }\n\n private setClasses(view: NgView, classesValue: string): void {\n const classes = classesValue.split(whiteSpaceSplitter);\n this.cssClasses(view).clear();\n classes.forEach((className) => this.cssClasses(view).set(className, true));\n this.syncClasses(view);\n }\n\n private syncClasses(view: NgView): void {\n const classValue = (<any>Array).from(this.cssClasses(view).keys()).join(' ');\n view.className = classValue;\n }\n\n public setStyle(view: View, styleName: string, value: any) {\n if (isCssVariable(styleName)) {\n view.style.setUnscopedCssVariable(styleName, value);\n view._onCssStateChange();\n } else {\n view.style[styleName] = value;\n }\n }\n\n public removeStyle(view: View, styleName: string) {\n if (isCssVariable(styleName)) {\n // TODO: expose this on core\n (view.style as any).unscopedCssVariables.delete(styleName);\n view._onCssStateChange();\n } else {\n view.style[styleName] = unsetValue;\n }\n }\n}\n","import { Inject, Injectable, Injector, NgZone, Optional, Renderer2, RendererFactory2, RendererStyleFlags2, RendererType2, ViewEncapsulation, inject, runInInjectionContext } from '@angular/core';\nimport { addTaggedAdditionalCSS, Application, ContentView, Device, getViewById, Observable, profile, Utils, View } from '@nativescript/core';\nimport { getViewClass, isKnownView } from './element-registry';\nimport { getFirstNativeLikeView, NgView, TextNode } from './views';\n\nimport { NamespaceFilter, NAMESPACE_FILTERS } from './property-filter';\nimport { APP_ROOT_VIEW, ENABLE_REUSABE_VIEWS, NATIVESCRIPT_ROOT_MODULE_ID, PREVENT_SPECIFIC_EVENTS_DURING_CD } from './tokens';\nimport { NativeScriptDebug } from './trace';\nimport { ViewUtil } from './view-util';\n\nconst addStyleToCss = profile('\"renderer\".addStyleToCss', function addStyleToCss(style: string, tag?: string | number): void {\n if (tag) {\n addTaggedAdditionalCSS(style, tag);\n } else {\n Application.addCss(style);\n }\n});\n\nfunction runInRootZone<T>(fn: () => T): T {\n if (typeof Zone === 'undefined') {\n return fn();\n }\n return Zone.root.run(fn);\n}\n\nfunction inRootZone() {\n return function (target: unknown, key: string | symbol, descriptor: PropertyDescriptor) {\n const childFunction = descriptor.value;\n descriptor.value = function (...args: unknown[]) {\n const fn = childFunction.bind(this);\n return runInRootZone(() => fn(...args));\n };\n return descriptor;\n };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NativeScriptRendererHelperService {\n private _executingDomChanges = 0;\n get executingDomChanges() {\n return this._executingDomChanges;\n }\n get isExecutingDomChanges() {\n return this._executingDomChanges > 0;\n }\n beginDomChanges() {\n this._executingDomChanges++;\n }\n endDomChanges() {\n this._executingDomChanges--;\n }\n executeDomChange<T>(fn: () => T): T {\n try {\n this.beginDomChanges();\n return fn();\n } finally {\n this.endDomChanges();\n }\n }\n}\n\nfunction modifiesDom() {\n return function (\n target: {\n _rendererHelper: NativeScriptRendererHelperService;\n },\n key: string | symbol,\n descriptor: PropertyDescriptor,\n ) {\n const childFunction = descriptor.value;\n descriptor.value = function (...args: unknown[]) {\n const fn = childFunction.bind(this);\n return this._rendererHelper.executeDomChange(() => fn(...args));\n };\n return descriptor;\n };\n}\n\nexport class NativeScriptRendererFactory implements RendererFactory2 {\n private componentRenderers = new Map<string, Renderer2>();\n private defaultRenderer: Renderer2;\n // backwards compatibility with RadListView\n private rootView = inject(APP_ROOT_VIEW);\n private namespaceFilters = inject(NAMESPACE_FILTERS);\n private rootModuleID = inject(NATIVESCRIPT_ROOT_MODULE_ID);\n private reuseViews = inject(ENABLE_REUSABE_VIEWS, {\n optional: true,\n });\n private injector = inject(Injector);\n private viewUtil = new ViewUtil(this.namespaceFilters, this.reuseViews);\n\n constructor() {\n if (typeof this.reuseViews !== 'boolean') {\n this.reuseViews = false; // default to false\n }\n this.defaultRenderer = new NativeScriptRenderer(this.rootView);\n }\n createRenderer(hostElement: any, type: RendererType2): Renderer2 {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRendererFactory.createRenderer ${hostElement}. type.id: ${type.id} type.encapsulation: ${type.encapsulation}`);\n }\n if (!hostElement || !type) {\n return this.defaultRenderer;\n }\n\n let renderer = this.componentRenderers.get(type.id);\n /**\n *! WARNING\n *! We're reusing the renderer for the components\n *! this might cause unexpected behavior as the \"rootView\" is an arbitrary hostElement\n *! also, the renderer has it's .destroy() called!\n *! might be useful to create a BaseEmulatedRender and a ProxyEmulatedRender\n *! every component type gets a BaseEmulatedRender (singleton) which is passed to ProxyEmulatedRender\n *! ProxyEmulatedRenderer registers with BaseEmulatedRender so we can clean up things like CSS when it's not needed\n *! this might be useful if we find a way to HMR component styling without a full rebootstrap\n */\n if (renderer) {\n if (renderer instanceof EmulatedRenderer) {\n renderer.applyToHost(hostElement);\n }\n\n return renderer;\n }\n\n if (type.encapsulation === ViewEncapsulation.None) {\n type.styles.map((s) => s.toString()).forEach((v) => addStyleToCss(v, this.rootModuleID));\n renderer = this.defaultRenderer;\n } else {\n runInInjectionContext(this.injector, () => {\n renderer = new EmulatedRenderer(type, hostElement);\n });\n (<EmulatedRenderer>renderer).applyToHost(hostElement);\n }\n\n this.componentRenderers.set(type.id, renderer);\n return renderer;\n }\n // begin?(): void {\n // throw new Error(\"Method not implemented.\");\n // }\n // end?(): void {\n // throw new Error(\"Method not implemented.\");\n // }\n whenRenderingDone(): Promise<any> {\n if (!this.rootView) {\n return Promise.resolve();\n }\n return new Promise<void>((resolve) => {\n let interval: any = 0;\n function scheduleResolve() {\n // iOS really hates synchronous things...\n // Utils.queueMacrotask(resolve);\n setTimeout(resolve, 15);\n }\n function fireWhenLoaded() {\n const view = rootFactory();\n if (view.isLoaded) {\n scheduleResolve();\n } else {\n view.once('loaded', scheduleResolve);\n }\n }\n const rootFactory = () => (this.rootView instanceof ContentView ? this.rootView.content : this.rootView);\n if (!rootFactory()) {\n interval = setInterval(() => {\n if (rootFactory()) {\n clearInterval(interval);\n fireWhenLoaded();\n }\n }, 10);\n } else {\n fireWhenLoaded();\n }\n });\n // throw new Error(\"Method not implemented.\");\n }\n}\n\nclass NativeScriptRenderer implements Renderer2 {\n private namespaceFilters = inject(NAMESPACE_FILTERS);\n private reuseViews = inject(ENABLE_REUSABE_VIEWS, {\n optional: true,\n });\n private viewUtil = new ViewUtil(this.namespaceFilters, this.reuseViews);\n _rendererHelper = inject(NativeScriptRendererHelperService);\n private specificPreventedEvents = new Set(\n inject(PREVENT_SPECIFIC_EVENTS_DURING_CD, {\n optional: true,\n }) ?? [],\n );\n private preventChangeEvents =\n inject(PREVENT_SPECIFIC_EVENTS_DURING_CD, {\n optional: true,\n }) ?? false;\n\n constructor(private rootView: View) {}\n get data(): { [key: string]: any } {\n throw new Error('Method not implemented.');\n }\n destroy(): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog('NativeScriptRenderer.destroy');\n }\n }\n @inRootZone()\n @modifiesDom()\n createElement(name: string, namespace?: string) {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.createElement: ${name}`);\n }\n let oldName;\n if (!isKnownView(name)) {\n oldName = name;\n name = 'ProxyViewContainer';\n }\n const view = this.viewUtil.createView(name);\n if (oldName) {\n (view as any).customCSSName = oldName;\n }\n return view;\n }\n @inRootZone()\n @modifiesDom()\n createComment(value: string) {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.createComment ${value}`);\n }\n return this.viewUtil.createComment(value);\n }\n @inRootZone()\n @modifiesDom()\n createText(value: string) {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.createText ${value}`);\n }\n return this.viewUtil.createText(value);\n }\n destroyNode: (node: any) => void = (node: View) =>\n runInRootZone(() => {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.destroyNode node: ${node}`);\n }\n if (node?.destroyNode) {\n node?.destroyNode();\n }\n });\n @inRootZone()\n @modifiesDom()\n appendChild(parent: View, newChild: View): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.appendChild child: ${newChild} parent: ${parent}`);\n }\n this.viewUtil.appendChild(parent, newChild);\n }\n @inRootZone()\n @modifiesDom()\n insertBefore(parent: any, newChild: any, refChild: any): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.insertBefore child: ${newChild} ` + `parent: ${parent} refChild: ${refChild}`);\n }\n this.viewUtil.insertBefore(parent, newChild, refChild);\n }\n @inRootZone()\n @modifiesDom()\n removeChild(parent: any, oldChild: any, isHostElement?: boolean): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.removeChild child: ${oldChild} parent: ${parent} oldChild.parentNode: ${oldChild?.parentNode}`);\n }\n this.viewUtil.removeChild(parent ?? oldChild.parentNode, oldChild);\n }\n selectRootElement(selectorOrNode: any, preserveContent?: boolean) {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.selectRootElement: ${selectorOrNode}`);\n }\n if (selectorOrNode instanceof View) {\n return selectorOrNode;\n }\n if (selectorOrNode && selectorOrNode[0] === '#') {\n const result = getViewById(this.rootView, selectorOrNode.slice(1));\n return (result || this.rootView) as View;\n }\n if (typeof selectorOrNode === 'string') {\n const view = this.viewUtil.createView(selectorOrNode);\n if (getFirstNativeLikeView(view) === view) {\n // view is nativelike!\n this.appendChild(this.rootView, view);\n return view;\n }\n }\n return this.rootView;\n }\n parentNode(node: NgView) {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.parentNode for node: ${node} is ${node.parentNode}`);\n }\n return node.parentNode;\n }\n nextSibling(node: NgView) {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.nextSibling of ${node} is ${node.nextSibling}`);\n }\n return node.nextSibling;\n }\n @inRootZone()\n @modifiesDom()\n setAttribute(el: any, name: string, value: string, namespace?: string): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.setAttribute ${namespace ? namespace + ':' : ''}${el}.${name} = ${value}`);\n }\n this.viewUtil.setProperty(el, name, value, namespace);\n }\n removeAttribute(el: any, name: string, namespace?: string): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.removeAttribute ${namespace ? namespace + ':' : ''}${el}.${name}`);\n }\n }\n @inRootZone()\n @modifiesDom()\n addClass(el: any, name: string): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.addClass ${name}`);\n }\n this.viewUtil.addClass(el, name);\n }\n @inRootZone()\n @modifiesDom()\n removeClass(el: any, name: string): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.removeClass ${name}`);\n }\n this.viewUtil.removeClass(el, name);\n }\n @inRootZone()\n @modifiesDom()\n setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.setStyle: ${el}, ${style} = ${value}`);\n }\n this.viewUtil.setStyle(el, style, value);\n }\n @inRootZone()\n @modifiesDom()\n removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog('NativeScriptRenderer.removeStyle: ${styleName}');\n }\n this.viewUtil.removeStyle(el, style);\n }\n @inRootZone()\n @modifiesDom()\n setProperty(el: any, name: string, value: any): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.setProperty ${el}.${name} = ${value}`);\n }\n this.viewUtil.setProperty(el, name, value);\n }\n @inRootZone()\n @modifiesDom()\n setValue(node: any, value: string): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.setValue renderNode: ${node}, value: ${value}`);\n }\n if (node instanceof TextNode) {\n node.text = value;\n }\n // throw new Error(\"Method not implemented.\");\n }\n listen(target: View, eventName: string, callback: (event: any) => boolean | void): () => void {\n // throw new Error(\"Method not implemented.\");\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.listen: ${eventName}`);\n }\n let modifiedCallback = callback;\n if ((this.preventChangeEvents && eventName.endsWith('Change')) || this.specificPreventedEvents.has(eventName)) {\n modifiedCallback = (...args) => {\n if (this._rendererHelper.isExecutingDomChanges) {\n return;\n }\n return callback(...args);\n };\n }\n target.on(eventName, modifiedCallback);\n if (eventName === View.loadedEvent && target.isLoaded) {\n // we must create a new obervable here to ensure that the event goes through whatever zone patches are applied\n const obs = new Observable();\n obs.once(eventName, modifiedCallback);\n obs.notify({\n eventName,\n object: target,\n });\n }\n return () => target.off(eventName, modifiedCallback);\n }\n}\n\n// CONTENT_ATTR not exported from nativescript-renderer - we need it for styles application.\nconst COMPONENT_REGEX = /%COMP%/g;\nconst ATTR_SANITIZER = /-/g;\nexport const COMPONENT_VARIABLE = '%COMP%';\nexport const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nexport const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\n\nconst replaceNgAttribute = function (input: string, componentId: string): string {\n return input.replace(COMPONENT_REGEX, componentId);\n};\n\nconst addScopedStyleToCss = profile(`\"renderer\".addScopedStyleToCss`, function addScopedStyleToCss(style: string, tag?: number | string): void {\n if (tag) {\n addTaggedAdditionalCSS(style, tag);\n } else {\n Application.addCss(style);\n }\n});\n\n@Injectable()\nexport class EmulatedRenderer extends NativeScriptRenderer {\n private contentAttr: string;\n private hostAttr: string;\n private rootModuleId = inject(NATIVESCRIPT_ROOT_MODULE_ID);\n\n constructor(component: RendererType2, rootView: View) {\n super(rootView);\n\n const componentId = component.id.replace(ATTR_SANITIZER, '_');\n this.contentAttr = replaceNgAttribute(CONTENT_ATTR, componentId);\n this.hostAttr = replaceNgAttribute(HOST_ATTR, componentId);\n this.addStyles(component.styles, componentId);\n }\n\n applyToHost(view: NgView) {\n super.setAttribute(view, this.hostAttr, '');\n }\n\n appendChild(parent: any, newChild: NgView): void {\n super.appendChild(parent, newChild);\n }\n\n createElement(parent: any, name: string): NgView {\n const view = super.createElement(parent, name);\n\n // Set an attribute to the view to scope component-specific css.\n // The property name is pre-generated by Angular.\n super.setAttribute(view, this.contentAttr, '');\n\n return view;\n }\n\n @profile\n @inRootZone()\n @modifiesDom()\n private addStyles(styles: (string | any[])[], componentId: string) {\n styles\n .map((s) => s.toString())\n .map((s) => replaceNgAttribute(s, componentId))\n .forEach((s) => addScopedStyleToCss(s, this.rootModuleId));\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nexport function throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nexport function throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nexport function throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nexport function throwUnknownPortalTypeError() {\n throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' + 'a ComponentPortal or a TemplatePortal.');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nexport function throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nexport function throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { TemplateRef, ViewContainerRef, ElementRef, ComponentRef, EmbeddedViewRef, Injector, ComponentFactoryResolver } from '@angular/core';\nimport { View } from '@nativescript/core';\nimport { throwNullPortalOutletError, throwPortalAlreadyAttachedError, throwNoPortalAttachedError, throwNullPortalError, throwPortalOutletAlreadyDisposedError, throwUnknownPortalTypeError } from './portal-errors';\nimport type { ComponentType } from '../../utils/general';\n\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nexport abstract class Portal<T> {\n private _attachedHost: PortalOutlet | null;\n\n /** Attach this portal to a host. */\n attach(host: PortalOutlet): T {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n }\n\n this._attachedHost = host;\n return <T>host.attach(this);\n }\n\n /** Detach this portal from its host */\n detach(): void {\n const host = this._attachedHost;\n\n if (host != null) {\n this._attachedHost = null;\n host.detach();\n } else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwNoPortalAttachedError();\n }\n }\n\n /** Whether this portal is attached to a host. */\n get isAttached(): boolean {\n return this._attachedHost != null;\n }\n\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host: PortalOutlet | null) {\n this._attachedHost = host;\n }\n}\n\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nexport class ComponentPortal<T> extends Portal<ComponentRef<T>> {\n /** The type of the component that will be instantiated for attachment. */\n component: ComponentType<T>;\n\n /**\n * [Optional] Where the attached component should live in Angular's *logical* component tree.\n * This is different from where the component *renders*, which is determined by the PortalOutlet.\n * The origin is necessary when the host is outside of the Angular application context.\n */\n viewContainerRef?: ViewContainerRef | null;\n\n /** [Optional] Injector used for the instantiation of the component. */\n injector?: Injector | null;\n\n /**\n * Alternate `ComponentFactoryResolver` to use when resolving the associated component.\n * Defaults to using the resolver from the outlet that the portal is attached to.\n */\n componentFactoryResolver?: ComponentFactoryResolver | null;\n\n constructor(component: ComponentType<T>, viewContainerRef?: ViewContainerRef | null, injector?: Injector | null, componentFactoryResolver?: ComponentFactoryResolver | null) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.componentFactoryResolver = componentFactoryResolver;\n }\n}\n\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nexport class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {\n /** The embedded template that will be used to instantiate an embedded View in the host. */\n templateRef: TemplateRef<C>;\n\n /** Reference to the ViewContainer into which the template will be stamped out. */\n viewContainerRef: ViewContainerRef;\n\n /** Contextual data to be passed in to the embedded view. */\n context: C | undefined;\n\n constructor(template: TemplateRef<C>, viewContainerRef: ViewContainerRef, context?: C) {\n super();\n this.templateRef = template;\n this.viewContainerRef = viewContainerRef;\n this.context = context;\n }\n\n get origin(): ElementRef {\n return this.templateRef.elementRef;\n }\n\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n attach(host: PortalOutlet, context: C | undefined = this.context): EmbeddedViewRef<C> {\n this.context = context;\n return super.attach(host);\n }\n\n detach(): void {\n this.context = undefined;\n return super.detach();\n }\n}\n\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nexport class DomPortal<T = View> extends Portal<T> {\n /** DOM node hosting the portal's content. */\n readonly element: T;\n\n constructor(element: T | ElementRef<T>) {\n super();\n this.element = element instanceof ElementRef ? element.nativeElement : element;\n }\n}\n\n/** A `PortalOutlet` is an space that can contain a single `Portal`. */\nexport interface PortalOutlet {\n /** Attaches a portal to this outlet. */\n attach(portal: Portal<any>): any;\n\n /** Detaches the currently attached portal from this outlet. */\n detach(): any;\n\n /** Performs cleanup before the outlet is destroyed. */\n dispose(): void;\n\n /** Whether there is currently a portal attached to this outlet. */\n hasAttached(): boolean;\n}\n\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nexport abstract class BasePortalOutlet implements PortalOutlet {\n /** The portal currently attached to the host. */\n protected _attachedPortal: Portal<any> | null;\n\n /** A function that will permanently dispose this host. */\n private _disposeFn: (() => void) | null;\n\n /** Whether this host has already been permanently disposed. */\n private _isDisposed = false;\n\n /** Whether this host has an attached portal. */\n hasAttached(): boolean {\n return !!this._attachedPortal;\n }\n\n attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;\n attach(portal: any): any;\n\n /** Attaches a portal. */\n attach(portal: Portal<any>): any {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!portal) {\n throwNullPortalError();\n }\n\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n }\n\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n } else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n } else if (this.attachDomPortal && portal instanceof DomPortal) {\n this._attachedPortal = portal;\n return this.attachDomPortal(portal);\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwUnknownPortalTypeError();\n }\n }\n\n abstract attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n\n abstract attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;\n\n // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n // eslint-disable-next-line @typescript-eslint/member-ordering\n readonly attachDomPortal: null | ((portal: DomPortal) => any) = null;\n\n /** Detaches a previously attached portal. */\n detach(): void {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n\n this._invokeDisposeFn();\n }\n\n /** Permanently dispose of this portal host. */\n dispose(): void {\n if (this.hasAttached()) {\n this.detach();\n }\n\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n\n /** @docs-private */\n setDisposeFn(fn: () => void) {\n this._disposeFn = fn;\n }\n\n private _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { ComponentRef, Directive, EmbeddedViewRef, EventEmitter, NgModule, OnDestroy, OnInit, Output, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { View } from '@nativescript/core';\nimport { CommentNode } from '../../views/invisible-nodes';\nimport { BasePortalOutlet, ComponentPortal, DomPortal, Portal, TemplatePortal } from './common';\n\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\n@Directive({\n selector: '[cdkPortal]',\n exportAs: 'cdkPortal',\n standalone: true,\n})\nexport class CdkPortal extends TemplatePortal {\n constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n}\n\n/**\n * Possible attached references to the CdkPortalOutlet.\n */\nexport type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;\n\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\n@Directive({\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n standalone: true,\n // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property\n inputs: ['portal: cdkPortalOutlet'],\n})\nexport class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestroy {\n /** Whether the portal component is initialized. */\n private _isInitialized = false;\n\n /** Reference to the currently-attached component/view ref. */\n private _attachedRef: CdkPortalOutletAttachedRef;\n\n constructor(\n private _viewContainerRef: ViewContainerRef,\n private renderer: Renderer2,\n ) {\n super();\n }\n\n /** Portal associated with the Portal outlet. */\n get portal(): Portal<any> | null {\n return this._attachedPortal;\n }\n\n set portal(portal: Portal<any> | null) {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n\n if (this.hasAttached()) {\n super.detach();\n }\n\n if (portal) {\n super.attach(portal);\n }\n\n this._attachedPortal = portal;\n }\n\n /** Emits when a portal is attached to the outlet. */\n @Output() attached: EventEmitter<CdkPortalOutletAttachedRef> = new EventEmitter<CdkPortalOutletAttachedRef>();\n\n /** Component or view reference that is attached to the portal. */\n get attachedRef(): CdkPortalOutletAttachedRef {\n return this._attachedRef;\n }\n\n ngOnInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n super.dispose();\n this._attachedPortal = null;\n this._attachedRef = null;\n }\n\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n portal.setAttachedHost(this);\n\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef = portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;\n\n // const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n // const componentFactory = resolver.resolveComponentFactory<T>(portal.component);\n const ref = viewContainerRef.createComponent(portal.component);\n // const ref = viewContainerRef.createComponent<T>(portal.component, viewContainerRef.length, portal.injector || viewContainerRef.injector);\n\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this.renderer.appendChild(this._getRootNode(), (ref.hostView as EmbeddedViewRef<any>).rootNodes[0]);\n }\n\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n\n return ref;\n }\n\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);\n super.setDisposeFn(() => this._viewContainerRef.clear());\n\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n\n return viewRef;\n }\n\n /**\n * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n attachDomPortal = (portal: DomPortal) => {\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode: CommentNode = this.renderer.createComment('dom-portal');\n\n portal.setAttachedHost(this);\n this.renderer.insertBefore(element.parentNode, anchorNode, element);\n this.renderer.appendChild(this._getRootNode(), element);\n\n super.setDisposeFn(() => {\n if (anchorNode.parentNode) {\n this.renderer.insertBefore(anchorNode.parentNode, element, anchorNode);\n this.renderer.removeChild(anchorNode.parentNode, anchorNode);\n // anchorNode.parentNode!.replaceChild(element, anchorNode);\n }\n });\n };\n\n /** Gets the root node of the portal outlet. */\n private _getRootNode(): View {\n const nativeElement: View = this._viewContainerRef.element.nativeElement;\n\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return (!(nativeElement instanceof CommentNode) ? nativeElement : nativeElement.parentNode!) as View;\n }\n\n // eslint-disable-next-line @typescript-eslint/member-ordering\n static ngAcceptInputType_portal: Portal<any> | null | undefined | '';\n}\n\n@NgModule({\n imports: [CdkPortal, CdkPortalOutlet],\n exports: [CdkPortal, CdkPortalOutlet],\n})\nexport class PortalModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, ApplicationRef, Injector, Renderer2, Optional } from '@angular/core';\nimport { View } from '@nativescript/core';\nimport { CommentNode } from '../../views/invisible-nodes';\nimport { ViewUtil } from '../../view-util';\nimport { BasePortalOutlet, ComponentPortal, TemplatePortal, DomPortal } from './common';\n\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nexport class NativeScriptDomPortalOutlet extends BasePortalOutlet {\n private _viewUtil: ViewUtil;\n constructor(\n /** Element into which the content is projected. */\n public outletElement: View,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _appRef: ApplicationRef,\n private _defaultInjector: Injector,\n @Optional() viewUtil?: ViewUtil,\n ) {\n super();\n this._viewUtil = viewUtil || this._defaultInjector.get(ViewUtil);\n }\n\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n let componentRef: ComponentRef<T>;\n\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.injector);\n\n this.setDisposeFn(() => componentRef.destroy());\n } else {\n componentRef = componentFactory.create(portal.injector || this._defaultInjector);\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n this._appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n const rootNode = this._getComponentRootNode(componentRef);\n if (rootNode.parent) {\n this._viewUtil.removeChild(rootNode.parent as View, rootNode);\n }\n this._viewUtil.appendChild(this.outletElement, this._getComponentRootNode(componentRef));\n\n return componentRef;\n }\n\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n const viewContainer = portal.viewContainerRef;\n const viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context);\n\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach((rootNode) => {\n if (rootNode.parent) {\n this._viewUtil.removeChild(rootNode.parent as View, rootNode);\n }\n this._viewUtil.appendChild(this.outletElement, rootNode);\n });\n\n // Note that we want to detect changes after the nodes have been moved so that\n // any directives inside the portal that are looking at the DOM inside a lifecycle\n // hook won't be invoked too early.\n viewRef.detectChanges();\n\n this.setDisposeFn(() => {\n const index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n });\n\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n\n /**\n * Attaches a DOM portal by transferring its content into the outlet.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n attachDomPortal = (portal: DomPortal) => {\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode: CommentNode = this._viewUtil.createComment('dom-portal');\n\n this._viewUtil.insertBefore(element.parentNode as View, anchorNode, element);\n this._viewUtil.appendChild(this.outletElement, element);\n\n super.setDisposeFn(() => {\n // We can't use `replaceWith` here because IE doesn't support it.\n if (anchorNode.parentNode) {\n this._viewUtil.insertBefore(anchorNode.parentNode, element, anchorNode);\n this._viewUtil.removeChild(anchorNode.parentNode, anchorNode);\n //anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n\n /**\n * Clears out a portal from the DOM.\n */\n dispose(): void {\n super.dispose();\n if (this.outletElement.parentNode != null) {\n this._viewUtil.removeChild(this.outletElement.parentNode as View, this.outletElement);\n }\n }\n\n /** Gets the root HTMLElement for an instantiated component. */\n private _getComponentRootNode(componentRef: ComponentRef<any>): View {\n return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as View;\n }\n}\n","import { ApplicationRef, ChangeDetectorRef, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, inject, Injector, NO_ERRORS_SCHEMA, OnDestroy, TemplateRef, Type, ViewChild, ViewContainerRef } from '@angular/core';\nimport { ProxyViewContainer, Trace } from '@nativescript/core';\nimport { registerElement } from '../element-registry';\nimport type { ComponentType } from '../utils/general';\nimport { ComponentPortal, TemplatePortal } from './portal';\n\nregisterElement('DetachedContainer', () => ProxyViewContainer, {\n skipAddToDom: true,\n});\n\n/**\n * Wrapper component used for loading components when navigating\n * It uses DetachedContainer as selector so that it is containerRef is not attached to\n * the visual tree.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'DetachedContainer',\n template: `<Placeholder #loader></Placeholder>\n <ng-container #vc></ng-container>\n <ng-content></ng-content>`,\n standalone: true,\n schemas: [NO_ERRORS_SCHEMA],\n})\n// eslint-disable-next-line @angular-eslint/component-class-suffix\nexport class DetachedLoader implements OnDestroy {\n @ViewChild('vc', { read: ViewContainerRef, static: true }) vc: ViewContainerRef;\n private disposeFunctions: Array<() => void> = [];\n // tslint:disable-line:component-class-suffix\n resolver = inject(ComponentFactoryResolver);\n changeDetector = inject(ChangeDetectorRef);\n containerRef = inject(ViewContainerRef);\n appRef = inject(ApplicationRef);\n\n public createComponentPortal<T>(componentType: ComponentType<T>, customInjector?: Injector) {\n return new ComponentPortal(componentType, this.vc, customInjector || this.vc.injector);\n }\n\n public createTemplatePortal<T>(templateRef: TemplateRef<T>, context?: T) {\n return new TemplatePortal(templateRef, this.vc, context);\n }\n\n private loadInAppRef(componentType: Type<any>): ComponentRef<any> {\n const factory = this.resolver.resolveComponentFactory(componentType);\n const componentRef = factory.create(this.containerRef.injector);\n this.appRef.attachView(componentRef.hostView);\n\n this.disposeFunctions.push(() => {\n this.appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n\n // Component is created, built may not be checked if we are loading\n // inside component with OnPush CD strategy. Mark us for check to be sure CD will reach us.\n // We are inside a promise here so no need for setTimeout - CD should trigger\n // after the promise.\n Trace.write('DetachedLoader.loadInLocation component loaded -> markForCheck', 'detached-loader');\n\n return componentRef;\n }\n\n private loadInLocation(componentType: Type<any>): ComponentRef<any> {\n return this.vc.createComponent(componentType);\n }\n\n public ngOnDestroy() {\n this.disposeFunctions.forEach((fn) => fn());\n }\n\n public detectChanges() {\n this.changeDetector.markForCheck();\n }\n\n /**\n * @deprecated use Portals\n */\n public loadComponent(componentType: Type<any>): Promise<ComponentRef<any>> {\n Trace.write('DetachedLoader.loadComponent', 'detached-loader');\n return Promise.resolve(this.loadInAppRef(componentType));\n }\n\n /**\n * @deprecated use Portals\n */\n public loadComponentSync(componentType: Type<any>): ComponentRef<any> {\n Trace.write('DetachedLoader.loadComponentSync', 'detached-loader');\n return this.loadInAppRef(componentType);\n }\n\n /**\n * @deprecated use Portals\n */\n public loadComponentInLocation(componentType: Type<any>): ComponentRef<any> {\n Trace.write('DetachedLoader.loadComponentInLocation', 'detached-loader');\n return this.loadInLocation(componentType);\n }\n\n /**\n * @deprecated use Portals\n */\n public loadWithFactory<T>(factory: ComponentFactory<T>): ComponentRef<T> {\n const componentRef = factory.create(this.containerRef.injector);\n this.appRef.attachView(componentRef.hostView);\n\n this.disposeFunctions.push(() => {\n this.appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n return componentRef;\n }\n\n /**\n * @deprecated use Portals\n */\n public loadWithFactoryInLocation<T>(factory: ComponentFactory<T>): ComponentRef<T> {\n return this.vc.createComponent(factory);\n }\n}\n","import { ElementRef, Inject, Injectable, OnDestroy, Optional } from '@angular/core';\nimport { NavigatedData, Page, View, ViewBase } from '@nativescript/core';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\n@Injectable()\nexport class PageService implements OnDestroy {\n page: Page;\n private _inPage$: BehaviorSubject<boolean>;\n private _pageEvents$ = new Subject<NavigatedData>();\n\n get inPage(): boolean {\n return this._inPage$.value;\n }\n get inPage$(): Observable<boolean> {\n return this._inPage$.pipe(distinctUntilChanged());\n }\n get pageEvents$(): Observable<NavigatedData> {\n return this._pageEvents$.asObservable();\n }\n constructor(@Optional() page?: Page, @Optional() elRef?: ElementRef<ViewBase>, @Optional() view?: ViewBase) {\n if (page) {\n this.page = page;\n } else {\n view = view || elRef.nativeElement;\n while (view) {\n if (view instanceof Page) {\n this.page = view;\n break;\n }\n view = view.parent;\n }\n }\n this._inPage$ = new BehaviorSubject<boolean>(!!this.page?.isLoaded);\n if (this.page) {\n this.page.on('navigatedFrom', this.pageEvent, this);\n this.page.on('navigatedTo', this.pageEvent, this);\n this.page.on('navigatingFrom', this.pageEvent, this);\n this.page.on('navigatingTo', this.pageEvent, this);\n }\n }\n\n ngOnDestroy() {\n if (this.page) {\n this.page.off('navigatedFrom', this.pageEvent, this);\n this.page.off('navigatedTo', this.pageEvent, this);\n this.page.off('navigatingFrom', this.pageEvent, this);\n this.page.off('navigatingTo', this.pageEvent, this);\n }\n this._inPage$.complete();\n this._pageEvents$.complete();\n }\n\n private pageEvent(evt: NavigatedData) {\n this._pageEvents$.next(evt);\n switch (evt.eventName) {\n case 'navigatedTo':\n this._inPage$.next(true);\n break;\n case 'navigatedFrom':\n this._inPage$.next(false);\n break;\n default:\n }\n }\n}\n","import { AfterViewInit, Component, ElementRef, Input, OnChanges, Renderer2, SimpleChanges, ViewChild } from '@angular/core';\nimport { Frame, Page, View } from '@nativescript/core';\nimport { frameMeta, registerElement } from '../../element-registry';\nimport { PageService } from './page.service';\n\nexport function customFrameComponentFactory(v: FramePageComponent) {\n return v.element.nativeElement;\n}\n\nexport function customPageFactoryFromFrame(v: FramePageComponent) {\n return v.page;\n}\n\nregisterElement('FramePage', () => Frame, {\n insertChild: (parent: Frame, child: View) => {\n if (child instanceof Page) {\n frameMeta.insertChild(parent, child);\n return;\n }\n parent['__ng_page__'].content = child;\n },\n});\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'FramePage',\n template: `<ng-content></ng-content>`,\n standalone: true,\n providers: [\n {\n provide: Frame,\n useFactory: customFrameComponentFactory,\n deps: [FramePageComponent],\n },\n {\n provide: Page,\n useFactory: customPageFactoryFromFrame,\n deps: [FramePageComponent],\n },\n PageService,\n ],\n})\nexport class FramePageComponent implements AfterViewInit, OnChanges {\n page: Page;\n\n @Input() actionBarHidden = false;\n\n constructor(public element: ElementRef<Frame>, renderer: Renderer2) {\n this.page = renderer.createElement('Page') as Page;\n element.nativeElement['__ng_page__'] = this.page;\n renderer.appendChild(element.nativeElement, this.page);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.actionBarHidden && changes.actionBarHidden.previousValue !== changes.actionBarHidden.currentValue) {\n if (this.page) {\n this.page.actionBarHidden = !!this.actionBarHidden;\n }\n }\n }\n ngAfterViewInit(): void {\n if (this.page) {\n this.page.actionBarHidden = !!this.actionBarHidden;\n }\n }\n}\n","import { Directive, ElementRef } from '@angular/core';\nimport { Frame } from '@nativescript/core';\n\nexport function customFrameDirectiveFactory(v: FrameDirective) {\n return v.element.nativeElement;\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'Frame',\n standalone: true,\n providers: [\n {\n provide: Frame,\n useFactory: customFrameDirectiveFactory,\n deps: [FrameDirective],\n },\n ],\n})\nexport class FrameDirective {\n constructor(public element: ElementRef<Frame>) {}\n}\n","import { Directive, ElementRef } from '@angular/core';\nimport { Page } from '@nativescript/core';\nimport { PageService } from './page.service';\n\nexport function customPageFactory(v: PageDirective) {\n return v.element.nativeElement;\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'Page',\n standalone: true,\n providers: [\n {\n provide: Page,\n useFactory: customPageFactory,\n deps: [PageDirective],\n },\n PageService,\n ],\n})\nexport class PageDirective {\n constructor(public element: ElementRef<Page>) {}\n}\n","import { NgModule } from '@angular/core';\nimport { FramePageComponent } from './frame-page.component';\nimport { FrameDirective } from './frame.directive';\nimport { PageDirective } from './page.directive';\n\n@NgModule({\n imports: [FrameDirective, PageDirective, FramePageComponent],\n exports: [FrameDirective, PageDirective, FramePageComponent],\n})\nexport class FramePageModule {}\n","export function isPresent(obj: any): boolean {\n return obj !== undefined && obj !== null;\n}\n\nexport function isBlank(obj: any): boolean {\n return obj === undefined || obj === null;\n}\n","import { Directive, Component, ElementRef, OnDestroy, inject } from '@angular/core';\nimport { ActionBar, ActionItem, ActionItems, NavigationButton, Page } from '@nativescript/core';\n\nimport { isBlank } from '../../utils/lang-facade';\nimport { NgView, ViewClassMeta, ViewExtensions } from '../../views/view-types';\nimport { isInvisibleNode, isView } from '../../views/utils';\nimport { registerElement } from '../../element-registry';\n\nexport function isActionItem(view: any): view is ActionItem {\n return view instanceof ActionItem;\n}\n\nexport function isNavigationButton(view: any): view is NavigationButton {\n return view instanceof NavigationButton;\n}\n\ntype NgActionBar = ActionBar & ViewExtensions;\n\nexport const actionBarMeta: ViewClassMeta = {\n skipAddToDom: true,\n insertChild: (parent: NgActionBar, child: NgView, next: any) => {\n if (isInvisibleNode(child)) {\n return;\n } else if (isNavigationButton(child)) {\n parent.navigationButton = child;\n child.parentNode = parent;\n } else if (isActionItem(child)) {\n addActionItem(parent, child, next);\n child.parentNode = parent;\n } else if (isView(child)) {\n parent.titleView = child;\n }\n },\n removeChild: (parent: NgActionBar, child: NgView) => {\n if (isInvisibleNode(child)) {\n return;\n } else if (isNavigationButton(child)) {\n if (parent.navigationButton === child) {\n parent.navigationButton = null;\n }\n\n child.parentNode = null;\n } else if (isActionItem(child)) {\n parent.actionItems.removeItem(child);\n child.parentNode = null;\n } else if (isView(child) && parent.titleView && parent.titleView === child) {\n parent.titleView = null;\n }\n },\n};\n\nregisterElement('ActionBar', () => ActionBar, actionBarMeta);\nregisterElement('ActionItem', () => <any>ActionItem);\nregisterElement('NavigationButton', () => <any>NavigationButton);\n\nconst addActionItem = (bar: NgActionBar, item: ActionItem, next: ActionItem) => {\n if (next) {\n insertActionItemBefore(bar, item, next);\n } else {\n appendActionItem(bar, item);\n }\n};\n\nconst insertActionItemBefore = (bar: NgActionBar, item: ActionItem, next: ActionItem) => {\n const actionItems: ActionItems = bar.actionItems;\n const actionItemsCollection: ActionItem[] = actionItems.getItems();\n\n const indexToInsert = actionItemsCollection.indexOf(next);\n actionItemsCollection.splice(indexToInsert, 0, item);\n\n (<any>actionItems).setItems(actionItemsCollection);\n};\n\nconst appendActionItem = (bar: NgActionBar, item: ActionItem) => {\n bar.actionItems.addItem(item);\n};\n\n@Component({\n selector: 'ActionBar',\n template: '<ng-content></ng-content>',\n standalone: true,\n})\nexport class ActionBarComponent {\n element = inject(ElementRef);\n page = inject(Page, { optional: true });\n constructor() {\n if (!this.page) {\n throw new Error('No Page found in ActionBarComponent.\\n' + 'Only a Page can contain an ActionBar, so please ensure ActionBar is only used inside a Component that is routed via page-router-outlet or is contained in a Page.\\n' + 'Example for root action bars in AppComponent: <Frame><Page><ActionBar>....</ActionBar></Page></Frame>');\n }\n\n if (isBlank(this.page.actionBarHidden)) {\n this.page.actionBarHidden = false;\n }\n this.page.actionBar = this.element.nativeElement;\n this.page.actionBar.update();\n }\n}\n\n@Component({\n selector: 'ActionBarExtension',\n template: '',\n standalone: true,\n})\nexport class ActionBarScope {\n page = inject(Page, { optional: true });\n constructor() {\n if (!this.page) {\n throw new Error('Inside ActionBarExtension but no ActionBar found to extend.');\n }\n }\n\n public onNavButtonInit(navBtn: NavigationButtonDirective) {\n this.page.actionBar.navigationButton = navBtn.element.nativeElement;\n }\n\n public onNavButtonDestroy(navBtn: NavigationButtonDirective) {\n const nav = <NavigationButton>navBtn.element.nativeElement;\n if (nav && this.page.actionBar.navigationButton === nav) {\n this.page.actionBar.navigationButton = null;\n }\n }\n\n public onActionInit(item: ActionItemDirective) {\n this.page.actionBar.actionItems.addItem(item.element.nativeElement);\n }\n\n public onActionDestroy(item: ActionItemDirective) {\n if (item.element.nativeElement.actionBar) {\n this.page.actionBar.actionItems.removeItem(item.element.nativeElement);\n }\n }\n}\n\n@Directive({\n selector: 'ActionItem',\n standalone: true,\n})\nexport class ActionItemDirective implements OnDestroy {\n element = inject(ElementRef);\n ownerScope = inject(ActionBarScope, { optional: true });\n constructor() {\n if (this.ownerScope) {\n this.ownerScope.onActionInit(this);\n }\n }\n\n ngOnDestroy() {\n if (this.ownerScope) {\n this.ownerScope.onActionDestroy(this);\n }\n }\n}\n\n@Directive({\n selector: 'NavigationButton',\n standalone: true,\n})\nexport class NavigationButtonDirective implements OnDestroy {\n element = inject(ElementRef);\n ownerScope = inject(ActionBarScope, { optional: true });\n constructor() {\n if (this.ownerScope) {\n this.ownerScope.onNavButtonInit(this);\n }\n }\n\n ngOnDestroy() {\n if (this.ownerScope) {\n this.ownerScope.onNavButtonDestroy(this);\n }\n }\n}\n","/**\n * Utility method to ensure a NgModule is only imported once in a codebase, otherwise will throw to help prevent accidental double importing\n * @param parentModule Parent module name\n * @param moduleName The module name\n */\nexport function throwIfAlreadyLoaded(parentModule: any, moduleName: string) {\n if (parentModule) {\n throw new Error(`${moduleName} has already been loaded. Import ${moduleName} in the AppModule only.`);\n }\n}\n\n/**\n * Utility method which will only fire the callback once ever\n * @param fn callback to call only once\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nexport function once(fn: Function) {\n let wasCalled = false;\n\n return function wrapper() {\n if (wasCalled) {\n return;\n }\n\n wasCalled = true;\n // eslint-disable-next-line prefer-spread, prefer-rest-params\n fn.apply(null, arguments);\n };\n}\n\n/** Interface that can be used to generically type a class. */\nexport interface ComponentType<T> {\n new (...args: any[]): T;\n}\n\nexport function isListLikeIterable(obj: any): boolean {\n if (!isJsObject(obj)) return false;\n return (\n Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n Symbol.iterator in obj)\n ); // JS Iterable have a Symbol.iterator prop\n}\n\nexport function isJsObject(o: any): boolean {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n Directive,\n DoCheck,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n forwardRef,\n Host,\n HostListener,\n inject,\n Inject,\n InjectionToken,\n Input,\n IterableDiffer,\n IterableDiffers,\n NgZone,\n OnDestroy,\n Output,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n CoreTypes,\n ItemEventData,\n KeyedTemplate,\n LayoutBase,\n ListView,\n ObservableArray,\n profile,\n SearchEventData,\n View,\n} from '@nativescript/core';\nimport type { Template as NsTemplate } from '@nativescript/core';\n\nimport { extractSingleViewRecursive } from '../../element-registry/registry';\nimport { NativeScriptDebug } from '../../trace';\nimport { isListLikeIterable } from '../../utils/general';\nimport { NgViewTemplate } from '../../view-refs';\nimport { DetachedLoader } from '../detached-loader';\n\nconst NG_VIEW = '_ngViewRef';\n\nexport interface TemplatedItemsHost<T = any> {\n registerTemplate(key: string, template: TemplateRef<T>);\n}\n\nexport const TEMPLATED_ITEMS_COMPONENT = new InjectionToken<TemplatedItemsHost>('TemplatedItemsComponent');\n\nexport class ItemContext<T> {\n constructor(\n public $implicit?: T,\n public item?: T,\n public index?: number,\n public even?: boolean,\n public odd?: boolean,\n ) {}\n}\n\nexport class NsTemplatedItem<T> implements NgViewTemplate<{ index: number; data: T }> {\n constructor(\n private template: TemplateRef<ItemContext<T>>,\n public location: ViewContainerRef,\n private onCreate?: (view: View) => void,\n ) {}\n create(context?: { index: number; data: T }): View {\n const viewRef = this.location.createEmbeddedView(\n this.template,\n context ? this.setupItemContext(context) : new ItemContext(),\n );\n viewRef.detach(); // create detached, just beware this doesn't always work and the view might run the first CD anyway.\n const resultView = getItemViewRoot(viewRef);\n resultView[NG_VIEW] = viewRef;\n if (this.onCreate) {\n this.onCreate(resultView);\n }\n return resultView;\n }\n update(view: View, context?: { index: number; data: T }): void {\n const viewRef = this.getEmbeddedViewRef(view);\n this.setupItemContext(context, viewRef);\n viewRef?.detectChanges();\n }\n attach(view: View): void {\n const viewRef = this.getEmbeddedViewRef(view);\n viewRef?.reattach();\n viewRef?.detectChanges();\n }\n detach(view: View): void {\n const viewRef = this.getEmbeddedViewRef(view);\n viewRef?.detach();\n }\n dispose(view: View): void {\n const viewRef = this.getEmbeddedViewRef(view);\n viewRef?.destroy();\n }\n\n getEmbeddedViewRef(view: View): EmbeddedViewRef<ItemContext<T>> | undefined {\n let viewRef = view[NG_VIEW];\n\n // Getting angular view from original element (in cases when ProxyViewContainer\n // is used NativeScript internally wraps it in a StackLayout)\n if (!viewRef && view instanceof LayoutBase && view.getChildrenCount() > 0) {\n viewRef = view.getChildAt(0)[NG_VIEW];\n }\n return viewRef;\n }\n\n isValid(view: View) {\n return !!this.getEmbeddedViewRef(view);\n }\n\n private setupItemContext(\n { index, data }: { index: number; data: T },\n oldView?: EmbeddedViewRef<ItemContext<T>>,\n ): ItemContext<T> {\n const context: ItemContext<T> = oldView ? oldView.context : new ItemContext<T>();\n context.$implicit = data;\n context.item = data;\n context.index = index;\n context.even = index % 2 === 0;\n context.odd = !context.even;\n return context;\n }\n}\n\nexport interface SetupItemViewArgs<T> {\n view: EmbeddedViewRef<ItemContext<T>>;\n nativeElement: View;\n data: T;\n index: number;\n context: ItemContext<T>;\n}\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ListView',\n template: `<DetachedContainer>\n <ng-container #loader></ng-container>\n </DetachedContainer>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [DetachedLoader],\n providers: [{ provide: TEMPLATED_ITEMS_COMPONENT, useExisting: forwardRef(() => ListViewComponent) }],\n})\nexport class ListViewComponent<T = any> implements DoCheck, OnDestroy, AfterContentInit, TemplatedItemsHost {\n public get nativeElement(): ListView {\n return this.templatedItemsView;\n }\n\n private readonly _iterableDiffers: IterableDiffers = inject(IterableDiffers);\n private readonly _changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n private readonly _elementRef: ElementRef = inject(ElementRef);\n\n // I believe this only exists so this can be inherited and people can override it.\n protected templatedItemsView: ListView = this._elementRef.nativeElement;\n protected _items: T[] | ObservableArray<T>;\n protected _differ: IterableDiffer<T>;\n protected _templateMap: Map<string, NsTemplatedItem<T>>;\n protected _viewToTemplate: WeakMap<View, string> = new WeakMap<View, string>();\n\n @ViewChild('loader', { read: ViewContainerRef, static: true }) loader: ViewContainerRef;\n\n @Output() public setupItemView = new EventEmitter<SetupItemViewArgs<T>>();\n\n @ContentChild(TemplateRef, { read: TemplateRef, static: false }) itemTemplateQuery: TemplateRef<ItemContext<T>>;\n\n // Sticky header template driven by Angular. Users can provide either:\n // 1) A string/Template bound to the ListView `[stickyHeaderTemplate]` input\n // (mirrors the XML attribute usage), or\n // 2) An Angular `<ng-template #nsStickyHeaderTemplate>` whose root becomes\n // the header view when using the external renderer.\n @ContentChild('nsStickyHeaderTemplate', { read: TemplateRef, static: false })\n stickyHeaderTemplateRef: TemplateRef<ItemContext<any>>;\n\n fallbackItemTemplate: TemplateRef<ItemContext<T>>;\n\n /**\n * Sticky header template as supported by core ListView (string or NsTemplate).\n * This allows direct string templates just like XML usage:\n * `<ListView stickyHeaderTemplate=\"<GridLayout>...</GridLayout>\">`.\n */\n @Input()\n get stickyHeaderTemplate(): string | NsTemplate {\n return this.templatedItemsView?.stickyHeaderTemplate as any;\n }\n set stickyHeaderTemplate(value: string | NsTemplate) {\n if (this.templatedItemsView) {\n // If Angular template reference is also provided, that takes precedence\n // and will be wired in ngAfterContentInit via stickyHeaderTemplateRef.\n this.templatedItemsView.stickyHeaderTemplate = value as any;\n }\n }\n\n @Input()\n get stickyHeader(): boolean {\n return this.templatedItemsView?.stickyHeader;\n }\n set stickyHeader(value: boolean) {\n if (this.templatedItemsView) {\n this.templatedItemsView.stickyHeader = value;\n }\n }\n\n @Input()\n get stickyHeaderHeight(): CoreTypes.LengthType {\n return this.templatedItemsView?.stickyHeaderHeight;\n }\n set stickyHeaderHeight(value: number) {\n if (this.templatedItemsView) {\n this.templatedItemsView.stickyHeaderHeight = value;\n }\n }\n\n @Input()\n get stickyHeaderTopPadding(): any {\n return this.templatedItemsView?.stickyHeaderTopPadding as any;\n }\n set stickyHeaderTopPadding(value: any) {\n if (this.templatedItemsView) {\n this.templatedItemsView.stickyHeaderTopPadding = value;\n }\n }\n\n @Input()\n get sectioned(): boolean {\n return this.templatedItemsView?.sectioned;\n }\n set sectioned(value: boolean) {\n if (this.templatedItemsView) {\n this.templatedItemsView.sectioned = value;\n }\n }\n\n @Input()\n get showSearch(): boolean {\n return this.templatedItemsView?.showSearch;\n }\n set showSearch(value: boolean) {\n if (this.templatedItemsView) {\n this.templatedItemsView.showSearch = value;\n }\n }\n\n @Input()\n get searchAutoHide(): boolean {\n return this.templatedItemsView?.searchAutoHide;\n }\n set searchAutoHide(value: boolean) {\n if (this.templatedItemsView) {\n this.templatedItemsView.searchAutoHide = value;\n }\n }\n\n @Input()\n get items() {\n return this._items;\n }\n\n set items(value: T[] | ObservableArray<T>) {\n this._items = value;\n let needDiffer = true;\n if (value instanceof ObservableArray) {\n needDiffer = false;\n }\n if (needDiffer && !this._differ && isListLikeIterable(value)) {\n this._differ = this._iterableDiffers.find(this._items).create((_index, item) => {\n return item;\n });\n }\n\n this.templatedItemsView.items = this._items;\n }\n\n /**\n * @deprecated\n */\n constructor(_elementRef: ElementRef);\n /**\n * @deprecated\n */\n constructor(_elementRef: ElementRef, _iterableDiffers: IterableDiffers, _changeDetectorRef: ChangeDetectorRef);\n /**\n * @deprecated\n */\n constructor(_elementRef: ElementRef, _iterableDiffers: IterableDiffers, _ngZone: NgZone);\n constructor();\n // this elementRef is only here for backwards compatibility reasons\n constructor(_elementRef?: ElementRef) {\n if (_elementRef) {\n this.templatedItemsView = _elementRef.nativeElement;\n }\n }\n\n ngAfterContentInit() {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewLog('TemplatedItemsView.ngAfterContentInit()');\n }\n\n this.setItemTemplates();\n\n // If an Angular sticky header template is provided, convert it into a\n // core `Template` function. Core will call this to create header views\n // and then assign bindingContext for each section.\n if (this.stickyHeaderTemplateRef && this.templatedItemsView) {\n const angularHeaderTemplate: NsTemplate = () => {\n const viewRef = this.loader.createEmbeddedView(this.stickyHeaderTemplateRef as TemplateRef<ItemContext<any>>);\n const root = getItemViewRoot(viewRef as EmbeddedViewRef<unknown>);\n (root as any)[NG_VIEW] = viewRef;\n return root;\n };\n\n this.templatedItemsView.stickyHeaderTemplate = angularHeaderTemplate;\n }\n }\n\n ngOnDestroy() {\n this.templatedItemsView = null;\n\n if (this._templateMap) {\n this._templateMap.clear();\n }\n }\n\n private setItemTemplates() {\n // The itemTemplateQuery may be changed after list items are added that contain <template> inside,\n // so cache and use only the original template to avoid errors.\n this.fallbackItemTemplate = this.itemTemplateQuery;\n if (this.fallbackItemTemplate && !this._templateMap?.has('default')) {\n // apparently you can create a Core ListView without a template...\n // we also add a fallback default for when the user sets multiple templates but no templateSelector\n this.registerTemplate('default', this.fallbackItemTemplate);\n }\n\n if (this._templateMap) {\n // sometimes templates are registered before loader is ready, so we update here\n this._templateMap.forEach((t) => (t.location = this.loader));\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewLog('Setting templates');\n }\n\n const templates: KeyedTemplate[] = [];\n this._templateMap.forEach((value, key) => {\n templates.push({\n createView: () => null, // we'll handle creation later, otherwise core will create an invalid template\n key,\n });\n });\n this.templatedItemsView.itemTemplates = templates;\n }\n }\n\n public registerTemplate(key: string, template: TemplateRef<ItemContext<T>>) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewLog(`registerTemplate for key: ${key}, ${this.loader}`);\n }\n\n if (!this._templateMap) {\n this._templateMap = new Map<string, NsTemplatedItem<T>>();\n }\n\n this._templateMap.set(key, new NsTemplatedItem<T>(template, this.loader, (v) => this._viewToTemplate.set(v, key)));\n }\n\n @HostListener('itemLoading', ['$event'])\n @profile\n public onItemLoading(args: ItemEventData) {\n if (!this._templateMap) {\n return;\n }\n const index = args.index;\n const lview: ListView = args.object as ListView;\n const items = lview.items as any;\n\n const isSectioned = lview.sectioned;\n let currentItem: any;\n let absoluteIndex = index;\n\n if (isSectioned) {\n const sectionIndex = this.resolveSectionIndex(args, args.view as View);\n const rowIndex = this.resolveRowIndex(args, args.view as View);\n\n if (sectionIndex === undefined || rowIndex === undefined) {\n return;\n }\n\n currentItem = this.getSectionItem(lview, sectionIndex, rowIndex);\n if (currentItem === undefined || currentItem === null) {\n return;\n }\n\n absoluteIndex = this.computeAbsoluteIndex(lview, sectionIndex, rowIndex);\n } else {\n currentItem = this.getFlatItem(items, index);\n if (currentItem === undefined || currentItem === null) {\n return;\n }\n }\n\n let template: NsTemplatedItem<T>;\n\n if (args.view) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewLog(`onItemLoading: ${index} - Reusing existing view`);\n }\n\n let templateKey = this._viewToTemplate.get(args.view as View);\n if (!templateKey && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {\n templateKey = this._viewToTemplate.get(args.view.getChildAt(0));\n }\n if (!templateKey) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewError(`ViewReference not found for item ${index}. View recycling is not working`);\n }\n return;\n }\n template = this._templateMap.get(templateKey);\n template.update(args.view as View, { index: absoluteIndex, data: currentItem });\n } else {\n const templateKey =\n typeof lview.itemTemplateSelector === 'function'\n ? (lview.itemTemplateSelector as any)(currentItem, absoluteIndex, items)\n : 'default';\n template = this._templateMap.get(templateKey);\n if (!template) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewError(`Template for key '${templateKey}' not found.`);\n }\n return;\n }\n args.view = template.create({ index: absoluteIndex, data: currentItem });\n }\n\n const viewRef = template.getEmbeddedViewRef(args.view as View);\n if (viewRef) {\n this.setupViewRef(viewRef, currentItem, absoluteIndex, args.view as View);\n template.attach(args.view as View);\n }\n\n this._changeDetectorRef.detectChanges();\n }\n\n private resolveSectionIndex(args: ItemEventData, nativeView?: View): number | undefined {\n const eventSection = Number.isInteger((args as any).section) ? (args as any).section : undefined;\n if (eventSection !== undefined) {\n return eventSection;\n }\n const viewSection =\n nativeView && Number.isInteger((nativeView as any)._listViewSectionIndex)\n ? (nativeView as any)._listViewSectionIndex\n : undefined;\n if (viewSection !== undefined) {\n return viewSection;\n }\n return undefined;\n }\n\n private resolveRowIndex(args: ItemEventData, nativeView?: View): number | undefined {\n if (Number.isInteger(args.index)) {\n return args.index;\n }\n const viewRow =\n nativeView && Number.isInteger((nativeView as any)._listViewItemIndex)\n ? (nativeView as any)._listViewItemIndex\n : undefined;\n return viewRow;\n }\n\n private getSectionItem(listView: ListView, sectionIndex: number, rowIndex: number): any {\n if (sectionIndex < 0 || rowIndex < 0) {\n return undefined;\n }\n const sectionItems = (listView as any)._getItemsInSection?.(sectionIndex);\n if (!sectionItems) {\n return undefined;\n }\n if (typeof sectionItems.getItem === 'function') {\n return sectionItems.getItem(rowIndex);\n }\n return sectionItems[rowIndex];\n }\n\n private computeAbsoluteIndex(listView: ListView, sectionIndex: number, rowIndex: number): number {\n let absoluteIndex = rowIndex;\n for (let i = 0; i < sectionIndex; i++) {\n const sectionItems = (listView as any)._getItemsInSection?.(i);\n absoluteIndex += this.getCollectionLength(sectionItems);\n }\n return absoluteIndex;\n }\n\n private getCollectionLength(collection: any): number {\n if (!collection) {\n return 0;\n }\n if (typeof collection.length === 'number') {\n return collection.length;\n }\n if (typeof collection.getCount === 'function') {\n return collection.getCount();\n }\n return 0;\n }\n\n private getFlatItem(items: any, index: number): any {\n if (!items) {\n return undefined;\n }\n if (typeof items.getItem === 'function') {\n return items.getItem(index);\n }\n return Array.isArray(items) ? items[index] : undefined;\n }\n\n public setupViewRef(viewRef: EmbeddedViewRef<ItemContext<T>>, data: T, index: number, nativeElement: View): void {\n const context = viewRef.context;\n this.setupItemView.next({ view: viewRef, nativeElement, data: data, index: index, context: context });\n }\n\n ngDoCheck() {\n if (this._differ) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewLog('ngDoCheck() - execute differ');\n }\n\n const changes = this._differ.diff(this._items as T[]);\n if (changes) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewLog('ngDoCheck() - refresh');\n }\n\n this.templatedItemsView.refresh();\n }\n }\n }\n}\n\nexport type RootLocator = (nodes: Array<unknown>, nestLevel: number) => View;\n\nexport function getItemViewRoot(\n viewRef: EmbeddedViewRef<unknown>,\n rootLocator: RootLocator = extractSingleViewRecursive,\n): View {\n const rootView = rootLocator(viewRef.rootNodes, 0);\n return rootView;\n}\n\n// eslint-disable-next-line @angular-eslint/directive-selector\n@Directive({\n selector: '[nsTemplateKey],[nsTemplateKeys]',\n standalone: true,\n})\nexport class TemplateKeyDirective<T> {\n constructor(\n private templateRef: TemplateRef<T>,\n @Host() @Inject(TEMPLATED_ITEMS_COMPONENT) private comp: TemplatedItemsHost<T>,\n ) {}\n\n @Input()\n set nsTemplateKey(value: string) {\n if (this.comp && this.templateRef) {\n this.comp.registerTemplate(value, this.templateRef);\n }\n }\n @Input()\n set nsTemplateKeys(values: string[]) {\n // single template with multiple keys\n if (this.comp && this.templateRef && values) {\n values.forEach((value) => this.comp.registerTemplate(value, this.templateRef));\n }\n }\n}\n","import { ApplicationRef, ComponentFactoryResolver, ComponentRef, Injectable, Injector, NgModuleRef, NgZone, Type, ViewContainerRef } from '@angular/core';\nimport { Application, ContentView, Frame, ShowModalOptions, View, ViewBase } from '@nativescript/core';\nimport { Subject } from 'rxjs';\nimport { AppHostAsyncView, AppHostView } from '../../app-host-view';\nimport { DetachedLoader } from '../../cdk/detached-loader';\nimport { ComponentPortal } from '../../cdk/portal/common';\nimport { NativeScriptDomPortalOutlet } from '../../cdk/portal/nsdom-portal-outlet';\nimport { once } from '../../utils/general';\nimport { NgViewRef } from '../../view-refs';\nimport { NSLocationStrategy } from '../router/ns-location-strategy';\n\nexport type BaseShowModalOptions = Pick<ShowModalOptions, Exclude<keyof ShowModalOptions, 'closeCallback' | 'context'>>;\n\nexport interface ModalDialogOptions extends BaseShowModalOptions {\n context?: any;\n viewContainerRef?: ViewContainerRef;\n moduleRef?: NgModuleRef<any>;\n target?: View;\n /**\n * Use context data as component instance properties\n */\n useContextAsComponentProps?: boolean;\n}\n\nexport interface ShowDialogOptions extends ModalDialogOptions {\n containerRef?: ViewContainerRef;\n /**\n * which container to attach the change detection\n * if not specified, attaches to the ApplicationRef (recommended)\n */\n attachToContainerRef?: ViewContainerRef;\n injector: Injector;\n context: any;\n doneCallback;\n pageFactory?: any;\n parentView: ViewBase;\n resolver: ComponentFactoryResolver;\n type: Type<any>;\n}\n\nexport class ModalDialogParams {\n constructor(public context: any = {}, public closeCallback: (...args) => any) {}\n}\n\n@Injectable()\nexport class ModalDialogService {\n /**\n * Any opened ModalDialogParams in order of when they were opened (Most recent on top).\n * This can be used when you need access to ModalDialogParams outside of the component which had them injected.\n * Each is popped off as modals are closed.\n */\n openedModalParams: Array<ModalDialogParams>;\n _closed$: Subject<ModalDialogParams>;\n\n constructor(private location: NSLocationStrategy, private zone: NgZone, private appRef: ApplicationRef, private defaultInjector: Injector) {}\n\n /**\n * Emits anytime a modal is closed with the ModalDialogParams which were injected into the component which is now closing.\n * For example, can be used to wire up Rx flows outside the scope of just the component being handled.\n */\n get closed$() {\n if (!this._closed$) {\n this._closed$ = new Subject();\n }\n return this._closed$;\n }\n\n public showModal(type: Type<any>, options: ModalDialogOptions = {}): Promise<any> {\n // if (!options.viewContainerRef) {\n // throw new Error('No viewContainerRef: ' + 'Make sure you pass viewContainerRef in ModalDialogOptions.');\n // }\n\n let parentView = options.viewContainerRef?.element.nativeElement || Application.getRootView();\n if (options.target) {\n parentView = options.target;\n }\n\n if ((parentView instanceof AppHostView || parentView instanceof AppHostAsyncView) && parentView.ngAppRoot) {\n parentView = parentView.ngAppRoot;\n }\n\n // _ngDialogRoot is the first child of the previously detached proxy.\n // It should have 'viewController' (iOS) or '_dialogFragment' (Android) available for\n // presenting future modal views.\n if (parentView._ngDialogRoot) {\n parentView = parentView._ngDialogRoot;\n }\n\n // resolve from particular module (moduleRef)\n // or from same module as parentView (viewContainerRef)\n const componentInjector = options.moduleRef?.injector || options.viewContainerRef?.injector || this.defaultInjector;\n const resolver = componentInjector.get(ComponentFactoryResolver);\n\n let frame = parentView;\n if (!(parentView instanceof Frame)) {\n frame = (parentView.page && parentView.page.frame) || Frame.topmost();\n }\n\n this.location?._beginModalNavigation(frame);\n\n return new Promise((resolve, reject) => {\n setTimeout(() => {\n try {\n this._showDialog({\n ...options,\n containerRef: options.viewContainerRef,\n injector: componentInjector,\n context: options.context,\n doneCallback: resolve,\n parentView,\n resolver,\n type,\n });\n } catch (err) {\n reject(err);\n }\n }, 10);\n });\n }\n\n private _showDialog(options: ShowDialogOptions): void {\n let componentViewRef: NgViewRef<unknown>;\n let detachedLoaderRef: ComponentRef<DetachedLoader>;\n let portalOutlet: NativeScriptDomPortalOutlet;\n\n const closeCallback = once(async (...args) => {\n options.doneCallback.apply(undefined, args);\n if (componentViewRef) {\n componentViewRef.firstNativeLikeView.closeModal();\n const params = this.openedModalParams.pop();\n if (this._closed$) {\n this._closed$.next(params);\n }\n await this.location._closeModalNavigation();\n if (detachedLoaderRef || portalOutlet) {\n this.zone.run(() => {\n portalOutlet?.dispose();\n detachedLoaderRef?.instance.detectChanges();\n detachedLoaderRef?.destroy();\n });\n }\n }\n });\n\n const modalParams = new ModalDialogParams(options.context, closeCallback);\n if (!this.openedModalParams) {\n this.openedModalParams = [];\n }\n this.openedModalParams.push(modalParams);\n\n const childInjector = Injector.create({\n providers: [{ provide: ModalDialogParams, useValue: modalParams }],\n parent: options.injector,\n });\n this.zone.run(() => {\n // if we ever support templates in the old API\n // if(options.templateRef) {\n // const detachedFactory = options.resolver.resolveComponentFactory(DetachedLoader);\n // if(options.attachToContainerRef) {\n // detachedLoaderRef = options.attachToContainerRef.createComponent(detachedFactory, 0, childInjector, null);\n // } else {\n // detachedLoaderRef = detachedFactory.create(childInjector); // this DetachedLoader is **completely** detached\n // this.appRef.attachView(detachedLoaderRef.hostView); // we attach it to the applicationRef, so it becomes a \"root\" view in angular's hierarchy\n // }\n // detachedLoaderRef.changeDetectorRef.detectChanges(); // force a change detection\n // detachedLoaderRef.instance.createTemplatePortal(options.templateRef);\n // }\n const targetView = new ContentView();\n const portal = new ComponentPortal(options.type);\n portalOutlet = new NativeScriptDomPortalOutlet(targetView, options.resolver, this.appRef, childInjector);\n const componentRef = portalOutlet.attach(portal);\n componentRef.changeDetectorRef.detectChanges();\n componentViewRef = new NgViewRef(componentRef);\n if (options.useContextAsComponentProps && options.context) {\n for (const key in options.context) {\n (<ComponentRef<any>>componentViewRef.ref).instance[key] = options.context[key];\n }\n }\n if (componentViewRef !== componentRef.location.nativeElement) {\n componentRef.location.nativeElement._ngDialogRoot = componentViewRef.firstNativeLikeView;\n }\n // if we don't detach the view from its parent, ios gets mad\n componentViewRef.detachNativeLikeView();\n options.parentView.showModal(componentViewRef.firstNativeLikeView, { ...options, closeCallback });\n });\n }\n}\n","/**\n * This decorator delays a potentially unsafe event (like loaded/unloaded that will sometimes be called before ngOnInit) to be handled safely by ensuring it's called after a lifecycle hook.\n * @param runAfterEvent event/function call to wait until the event can be fired ('ngOnInit', 'ngAfterViewInit', ...)\n * @param options Optional event handling params\n * @returns decorator\n */\nexport function NativeScriptNgSafeEvent(\n runAfterEvent: string,\n options: {\n onlyLast?: boolean;\n onlyFirst?: boolean;\n alwaysRunBefore?: string;\n } = {},\n) {\n const event = runAfterEvent;\n return function (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) {\n type NgSafeType = {\n events: {\n [key: string]: {\n done: boolean;\n originalDelegate: (...args: unknown[]) => unknown;\n buffer: Array<{\n key: string;\n fn: (...args: unknown[]) => unknown;\n }>;\n };\n };\n runBefore: {\n [propertyKey: string]: (...args: unknown[]) => unknown;\n };\n };\n function getNgSafe(): NgSafeType {\n return target['__ng_safe__'];\n }\n if (!target['__ng_safe__']) {\n const defaultNgSafe: NgSafeType = {\n events: {},\n runBefore: {},\n };\n target['__ng_safe__'] = defaultNgSafe;\n }\n if (!getNgSafe().events[event]) {\n getNgSafe().events[event] = {\n done: false,\n buffer: [],\n originalDelegate: target[event],\n };\n target[event] = function (...args) {\n try {\n if (getNgSafe().events[event].originalDelegate) {\n return getNgSafe().events[event].originalDelegate.apply(this, args);\n }\n } finally {\n getNgSafe().events[event].done = true;\n getNgSafe().events[event].buffer.forEach((fn) => fn.fn());\n getNgSafe().events[event].buffer = [];\n }\n };\n }\n\n if (options.alwaysRunBefore) {\n getNgSafe().runBefore[propertyKey] = target[options.alwaysRunBefore];\n\n target[`${options.alwaysRunBefore}`] = function (...args) {\n getNgSafe()\n .events[event].buffer.filter((v) => v.key === propertyKey)\n .forEach((fn) => fn.fn());\n getNgSafe().events[event].buffer = getNgSafe().events[event].buffer.filter((v) => v.key !== propertyKey);\n if (getNgSafe().runBefore[propertyKey]) {\n return getNgSafe().runBefore[propertyKey].apply(this, args);\n }\n };\n }\n\n const oldFn = descriptor.value;\n descriptor.value = function (...args) {\n if (getNgSafe().events[event].done) {\n return oldFn.apply(this, args);\n }\n let shouldPush = true;\n if (options.onlyFirst || options.onlyLast) {\n for (let i = 0; i < getNgSafe().events[event].buffer.length; i++) {\n if (getNgSafe().events[event].buffer[i].key === propertyKey) {\n if (options.onlyFirst) {\n shouldPush = false;\n break;\n }\n if (options.onlyLast) {\n getNgSafe().events[event].buffer.splice(i, 1);\n break;\n }\n }\n }\n }\n if (shouldPush) {\n getNgSafe().events[event].buffer.push({\n key: propertyKey,\n fn: oldFn.bind(this, args),\n });\n }\n };\n };\n}\n","import { AfterViewInit, Directive, ElementRef, Input, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { TabView, TabViewItem } from '@nativescript/core';\n\nimport { InvisibleNode } from '../../views';\nimport { NativeScriptDebug } from '../../trace';\nimport { isBlank } from '../../utils';\n\ntype TextTransform = 'initial' | 'none' | 'capitalize' | 'uppercase' | 'lowercase';\nexport interface TabViewItemDef {\n title?: string;\n iconSource?: string;\n textTransform?: TextTransform;\n role?: string;\n}\n\n@Directive({\n selector: 'TabView', // eslint-disable-line @angular-eslint/directive-selector\n standalone: true,\n})\nexport class TabViewDirective implements AfterViewInit {\n public tabView: TabView;\n private _selectedIndex: number;\n private viewInitialized: boolean;\n\n @Input()\n get selectedIndex(): number {\n return this._selectedIndex;\n }\n\n set selectedIndex(value) {\n this._selectedIndex = value;\n if (this.viewInitialized) {\n this.tabView.selectedIndex = this._selectedIndex;\n }\n }\n\n constructor(element: ElementRef) {\n this.tabView = element.nativeElement;\n }\n\n ngAfterViewInit() {\n this.viewInitialized = true;\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.rendererLog('this._selectedIndex: ' + this._selectedIndex);\n }\n if (!isBlank(this._selectedIndex)) {\n this.tabView.selectedIndex = this._selectedIndex;\n }\n }\n}\n\n@Directive({\n selector: '[tabItem]', // eslint-disable-line @angular-eslint/directive-selector\n standalone: true,\n})\nexport class TabViewItemDirective implements OnInit {\n private item: TabViewItem;\n private _config: TabViewItemDef;\n\n constructor(private owner: TabViewDirective, private templateRef: TemplateRef<any>, private viewContainer: ViewContainerRef) {}\n\n @Input('tabItem')\n set config(config: TabViewItemDef) {\n if (!this._config || this._config.iconSource !== config.iconSource || this._config.title !== config.title || this._config.textTransform !== config.textTransform || this._config.role !== config.role) {\n this._config = config;\n this.applyConfig();\n }\n }\n\n get config(): TabViewItemDef {\n // tslint:disable-line:no-input-rename\n return this._config || {};\n }\n\n @Input()\n set title(title: string) {\n this.config = Object.assign(this.config, { title });\n }\n\n get title() {\n return this.config.title;\n }\n\n @Input()\n set iconSource(iconSource: string) {\n this.config = Object.assign(this.config, { iconSource });\n }\n\n get iconSource() {\n return this.config.iconSource;\n }\n\n @Input()\n set textTransform(textTransform: TextTransform) {\n this.config = Object.assign(this.config, { textTransform });\n }\n\n get textTransform() {\n return this.config.textTransform;\n }\n\n private ensureItem() {\n if (!this.item) {\n this.item = new TabViewItem();\n }\n }\n\n private applyConfig() {\n this.ensureItem();\n\n if (this.config.title) {\n this.item.title = this.config.title;\n }\n\n if (this.config.iconSource) {\n this.item.iconSource = this.config.iconSource;\n }\n\n // TabViewItem textTransform has a default value for Android that kick in\n // only if no value (even a null value) is set.\n if (this.config.textTransform) {\n this.item.textTransform = this.config.textTransform;\n }\n\n if (this.config.role) {\n this.item.role = this.config.role;\n }\n }\n\n ngOnInit() {\n this.applyConfig();\n\n const viewRef = this.viewContainer.createEmbeddedView(this.templateRef);\n // Filter out text nodes and comments\n const realViews = viewRef.rootNodes.filter((node) => !(node instanceof InvisibleNode));\n\n if (realViews.length > 0) {\n this.item.view = realViews[0];\n\n const newItems = (this.owner.tabView.items || []).concat([this.item]);\n this.owner.tabView.items = newItems;\n }\n }\n}\n","/* eslint-disable @angular-eslint/component-selector */\nimport { Component, Inject } from '@angular/core';\nimport { IDevice, platformNames } from '@nativescript/core';\nimport { DEVICE } from '../../tokens';\n\n@Component({\n selector: 'android',\n template: `@if (show) { \n <ng-content></ng-content>\n }`,\n standalone: true,\n})\nexport class AndroidFilterComponent {\n public show: boolean;\n\n constructor(@Inject(DEVICE) device: IDevice) {\n this.show = device.os === platformNames.android;\n }\n}\n","/* eslint-disable @angular-eslint/component-selector */\nimport { Component, Inject } from '@angular/core';\nimport { IDevice, platformNames } from '@nativescript/core';\nimport { DEVICE } from '../../tokens';\n\n@Component({\n selector: 'ios',\n template: `@if (show) { \n <ng-content></ng-content>\n }`,\n standalone: true,\n})\nexport class IOSFilterComponent {\n public show: boolean;\n constructor(@Inject(DEVICE) device: IDevice) {\n this.show = device.os === platformNames.ios;\n }\n}\n","/* eslint-disable @angular-eslint/component-selector */\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'apple',\n template: `@if (show) { \n <ng-content></ng-content>\n }`,\n standalone: true,\n})\nexport class AppleFilterComponent {\n public show = __APPLE__;\n}\n","/* eslint-disable @angular-eslint/component-selector */\nimport { Component, Inject } from '@angular/core';\nimport { platformNames, IDevice } from '@nativescript/core';\nimport { DEVICE } from '../../tokens';\n\n@Component({\n selector: 'visionos',\n template: `@if (show) { \n <ng-content></ng-content>\n }`,\n standalone: true,\n})\nexport class VisionOSFilterComponent {\n public show: boolean;\n\n constructor(@Inject(DEVICE) device: IDevice) {\n // Note: casting any to be backwards compatible\n // Available in 8.6+ only\n this.show = device.os === (platformNames as any).visionos;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NO_ERRORS_SCHEMA, NgModule } from '@angular/core';\nimport { FramePageModule } from './cdk/frame-page/frame-page.module';\nimport { ActionBarComponent, ActionBarScope, ActionItemDirective, NavigationButtonDirective } from './cdk/action-bar';\nimport { ListViewComponent, TemplateKeyDirective } from './cdk/list-view/list-view.component';\nimport { registerNativeScriptViewComponents } from './element-registry';\nimport { ModalDialogService } from './legacy/directives/dialogs';\nimport { TabViewDirective, TabViewItemDirective } from './cdk/tab-view';\nimport { AndroidFilterComponent } from './cdk/platform-filters/android-filter.component';\nimport { IOSFilterComponent } from './cdk/platform-filters/ios-filter.component';\nimport { AppleFilterComponent } from './cdk/platform-filters/apple-filter.component';\nimport { VisionOSFilterComponent } from './cdk/platform-filters/vision-filter.component';\n\nconst CDK_COMPONENTS = [ActionBarComponent, ActionBarScope, ActionItemDirective, NavigationButtonDirective, ListViewComponent, TemplateKeyDirective, TabViewDirective, TabViewItemDirective, AndroidFilterComponent, IOSFilterComponent, AppleFilterComponent, VisionOSFilterComponent];\n\nregisterNativeScriptViewComponents();\n\n@NgModule({\n imports: [CommonModule, FramePageModule, ...CDK_COMPONENTS],\n exports: [CommonModule, FramePageModule, ...CDK_COMPONENTS],\n providers: [ModalDialogService],\n schemas: [NO_ERRORS_SCHEMA],\n})\nexport class NativeScriptCommonModule {}\n","import { ViewportScroller, XhrFactory, ɵNullViewportScroller as NullViewportScroller } from '@angular/common';\nimport { ApplicationModule, ErrorHandler, Inject, NgModule, NO_ERRORS_SCHEMA, Optional, Provider, RendererFactory2, SkipSelf, StaticProvider, ɵINJECTOR_SCOPE as INJECTOR_SCOPE } from '@angular/core';\nimport { Color, Device, View } from '@nativescript/core';\nimport { AppHostView } from './app-host-view';\nimport { NativescriptXhrFactory } from './nativescript-xhr-factory';\nimport { NativeScriptRendererFactory } from './nativescript-renderer';\nimport { PlatformNamespaceFilter, NAMESPACE_FILTERS } from './property-filter';\nimport { APP_ROOT_VIEW, DEVICE, ENABLE_REUSABE_VIEWS, NATIVESCRIPT_ROOT_MODULE_ID } from './tokens';\nimport { ViewUtil } from './view-util';\nimport { DetachedLoader } from './cdk/detached-loader';\nimport { NativeScriptCommonModule } from './nativescript-common.module';\n\nexport function generateFallbackRootView(parentRootView?: View) {\n if (parentRootView) {\n return parentRootView;\n }\n return new AppHostView(new Color('white'));\n}\n\nexport function errorHandler() {\n return new ErrorHandler();\n}\nexport function generateRandomId() {\n return `${Date.now()}` + '_' + Math.random().toString(36).substr(2, 9);\n}\n\nexport const NATIVESCRIPT_MODULE_STATIC_PROVIDERS: StaticProvider[] = [\n { provide: APP_ROOT_VIEW, useFactory: generateFallbackRootView, deps: [[new Optional(), new SkipSelf(), APP_ROOT_VIEW]] },\n { provide: INJECTOR_SCOPE, useValue: 'root' },\n { provide: ErrorHandler, useFactory: errorHandler, deps: [] },\n { provide: ViewUtil, useClass: ViewUtil, deps: [NAMESPACE_FILTERS, [new Optional(), ENABLE_REUSABE_VIEWS]] },\n {\n provide: NativeScriptRendererFactory,\n useClass: NativeScriptRendererFactory,\n deps: [APP_ROOT_VIEW, NAMESPACE_FILTERS, NATIVESCRIPT_ROOT_MODULE_ID, [new Optional(), ENABLE_REUSABE_VIEWS]],\n },\n { provide: NATIVESCRIPT_ROOT_MODULE_ID, useFactory: generateRandomId },\n { provide: RendererFactory2, useExisting: NativeScriptRendererFactory },\n { provide: NAMESPACE_FILTERS, useClass: PlatformNamespaceFilter, deps: [DEVICE], multi: true },\n { provide: DEVICE, useValue: Device },\n { provide: XhrFactory, useClass: NativescriptXhrFactory, deps: [] },\n];\nexport const NATIVESCRIPT_MODULE_PROVIDERS: Provider[] = [{ provide: ViewportScroller, useClass: NullViewportScroller }];\n\n@NgModule({\n imports: [ApplicationModule, DetachedLoader, NativeScriptCommonModule],\n providers: [...NATIVESCRIPT_MODULE_STATIC_PROVIDERS, ...NATIVESCRIPT_MODULE_PROVIDERS],\n exports: [ApplicationModule, DetachedLoader, NativeScriptCommonModule],\n schemas: [NO_ERRORS_SCHEMA],\n})\nexport class NativeScriptModule {\n constructor(@Optional() @SkipSelf() @Inject(NativeScriptModule) parentModule: NativeScriptModule | null) {\n if (parentModule) {\n throw new Error(`NativeScriptModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.`);\n }\n }\n}\n","import {\n Type,\n Injector,\n CompilerOptions,\n PlatformRef,\n NgModuleFactory,\n NgModuleRef,\n EventEmitter,\n Sanitizer,\n InjectionToken,\n StaticProvider,\n createPlatformFactory,\n platformCore,\n PLATFORM_ID,\n ɵinternalCreateApplication,\n ApplicationConfig,\n} from '@angular/core';\nimport { DOCUMENT, LocationChangeListener, LocationStrategy, PlatformLocation } from '@angular/common';\nimport { NativeScriptPlatformRefProxy } from './platform-ref';\nimport { AppHostView } from './app-host-view';\nimport { Color, GridLayout } from '@nativescript/core';\nimport { defaultPageFactory, PAGE_FACTORY } from './tokens';\nimport { AppLaunchView } from './application';\nimport { NATIVESCRIPT_MODULE_PROVIDERS, NATIVESCRIPT_MODULE_STATIC_PROVIDERS } from './nativescript';\nimport { registerNativeScriptViewComponents } from './element-registry';\n\nexport const defaultPageFactoryProvider = { provide: PAGE_FACTORY, useValue: defaultPageFactory };\nexport class NativeScriptSanitizer extends Sanitizer {\n sanitize(_context: any, value: string): string {\n return value;\n }\n}\n// TODO: when angular finally exports their scheduler token for ivy CD, provide our own with queueMacroTask\n// export function schedulerFactory() {\n// return (fn: any) => {\n// console.log('SCHEDULER');\n// setTimeout(fn, 0);\n// };\n// }\n\nexport class NativeScriptDocument {\n // Required by the AnimationDriver\n public body: any = {\n isOverride: true,\n };\n\n createElement(tag: string) {\n throw new Error('NativeScriptDocument is not DOM Document. There is no createElement() method.');\n }\n}\n\nexport class DummyLocationStrategy extends LocationStrategy {\n path(includeHash?: boolean): string {\n throw new Error('Method not implemented.');\n }\n prepareExternalUrl(internal: string): string {\n throw new Error('Method not implemented.');\n }\n getState(): unknown {\n throw new Error('Method not implemented.');\n }\n pushState(state: any, title: string, url: string, queryParams: string): void {\n throw new Error('Method not implemented.');\n }\n replaceState(state: any, title: string, url: string, queryParams: string): void {\n throw new Error('Method not implemented.');\n }\n forward(): void {\n throw new Error('Method not implemented.');\n }\n back(): void {\n throw new Error('Method not implemented.');\n }\n onPopState(fn: LocationChangeListener): void {\n throw new Error('Method not implemented.');\n }\n getBaseHref(): string {\n throw new Error('Method not implemented.');\n }\n}\nexport class DummyPlatformLocation extends PlatformLocation {\n getBaseHrefFromDOM(): string {\n throw new Error('Method not implemented.');\n }\n getState(): unknown {\n throw new Error('Method not implemented.');\n }\n onPopState(fn: LocationChangeListener): VoidFunction {\n throw new Error('Method not implemented.');\n }\n onHashChange(fn: LocationChangeListener): VoidFunction {\n throw new Error('Method not implemented.');\n }\n get href(): string {\n throw new Error('Method not implemented.');\n }\n get protocol(): string {\n throw new Error('Method not implemented.');\n }\n get hostname(): string {\n throw new Error('Method not implemented.');\n }\n get port(): string {\n throw new Error('Method not implemented.');\n }\n get pathname(): string {\n throw new Error('Method not implemented.');\n }\n get search(): string {\n throw new Error('Method not implemented.');\n }\n get hash(): string {\n throw new Error('Method not implemented.');\n }\n replaceState(state: any, title: string, url: string): void {\n throw new Error('Method not implemented.');\n }\n pushState(state: any, title: string, url: string): void {\n throw new Error('Method not implemented.');\n }\n forward(): void {\n throw new Error('Method not implemented.');\n }\n back(): void {\n throw new Error('Method not implemented.');\n }\n}\n\nexport const COMMON_PROVIDERS: StaticProvider[] = [\n defaultPageFactoryProvider,\n { provide: Sanitizer, useClass: NativeScriptSanitizer, deps: [] },\n { provide: DOCUMENT, useClass: NativeScriptDocument, deps: [] },\n { provide: PLATFORM_ID, useValue: 'browser' },\n {\n provide: LocationStrategy,\n useClass: DummyLocationStrategy,\n deps: [],\n },\n { provide: PlatformLocation, useClass: DummyPlatformLocation, deps: [] },\n];\n\nexport const platformNativeScript = createPlatformFactory(platformCore, 'nativescriptDynamic', COMMON_PROVIDERS);\nfunction createProvidersConfig(options?: ApplicationConfig) {\n return {\n appProviders: [\n ...NATIVESCRIPT_MODULE_STATIC_PROVIDERS,\n ...NATIVESCRIPT_MODULE_PROVIDERS,\n ...(options?.providers ?? []),\n ],\n platformProviders: COMMON_PROVIDERS,\n };\n}\n\nexport function bootstrapApplication(rootComponent: Type<any>, options?: ApplicationConfig) {\n // Ensure NativeScript view components are registered in this module instance's\n // element registry. During Vite HMR, the vendor bundle and HTTP-loaded modules\n // may have separate module instances of @nativescript/angular, each with their\n // own elementMap. Without this call, the HTTP instance's elementMap would be\n // empty and the renderer would throw \"No known component for element ...\".\n registerNativeScriptViewComponents();\n return ɵinternalCreateApplication({\n rootComponent: rootComponent,\n ...createProvidersConfig(options),\n });\n}\n\nexport function createApplication(options?: ApplicationConfig) {\n registerNativeScriptViewComponents();\n return ɵinternalCreateApplication(createProvidersConfig(options));\n}\n\nexport interface HmrOptions {\n /**\n * A factory function that returns either Module type or NgModuleFactory type.\n * This needs to be a factory function as the types will change when modules are replaced.\n */\n moduleTypeFactory?: () => Type<any> | NgModuleFactory<any>;\n\n /**\n * A livesync callback that will be called instead of the original livesync.\n * It gives the HMR a hook to apply the module replacement.\n * @param bootstrapPlatform - A bootstrap callback to be called after HMR is done. It will bootstrap a new angular app within the exisiting platform, using the moduleTypeFactory to get the Module or NgModuleFactory to be used.\n */\n livesyncCallback: (bootstrapPlatform: () => void) => void;\n}\n\nexport interface AppOptions {\n cssFile?: string;\n startPageActionBarHidden?: boolean;\n hmrOptions?: HmrOptions;\n /**\n * Background color of the root view\n */\n backgroundColor?: string;\n /**\n * Use animated launch view (async by default)\n */\n launchView?: AppLaunchView;\n /**\n * When using Async APP_INITIALIZER, set this to `true`.\n * (Not needed when using launchView)\n */\n async?: boolean;\n}\n\n/**\n * @deprecated use runNativeScriptAngularApp instead\n */\nexport const platformNativeScriptDynamic = function (options?: AppOptions, extraProviders?: StaticProvider[]) {\n console.warn('platformNativeScriptDynamic is deprecated, use runNativeScriptAngularApp instead');\n options = options || {};\n extraProviders = extraProviders || [];\n\n const ngRootView = new AppHostView(new Color(options.backgroundColor || 'white'));\n let launchView = options.launchView;\n if (!launchView && options.async) {\n launchView = new GridLayout();\n launchView.backgroundColor = options.backgroundColor || 'white';\n }\n return new NativeScriptPlatformRefProxy(platformNativeScript([...extraProviders]), launchView);\n};\n","import { NgModule } from '@angular/core';\nimport { Application, ContentView, RootLayout, View } from '@nativescript/core';\nimport { APP_ROOT_VIEW, DISABLE_ROOT_VIEW_HANDLING } from './tokens';\n\nexport class RootViewProxy extends ContentView {\n constructor(private parentRootLayout: RootLayout) {\n super();\n }\n\n _addView(view: View, atIndex?: number) {\n super._addView(view, atIndex);\n if (this.parentRootLayout.getChildIndex(this) < 0) {\n this.parentRootLayout.insertChild(this, 0);\n }\n }\n\n _removeView(view: View) {\n super._removeView(view);\n this.parentRootLayout.removeChild(this);\n }\n}\n\n/**\n * This generates a RootLayout and returns a RootViewProxy.\n * Setting RootViewProxy.content will add the view to the bottom of the RootLayout\n * Setting RootViewProxy.content = null will remove the view from the RootLayout\n * @returns RootViewProxy that will insert content into the start of the RootLayout\n */\nexport function generateRootLayoutAndProxy() {\n let rootView = Application.getRootView();\n if (!rootView || !(rootView instanceof RootLayout)) {\n rootView = new RootLayout();\n Application.resetRootView({ create: () => rootView });\n }\n const viewProxy = new RootViewProxy(rootView as RootLayout);\n // (rootView as RootLayout).insertChild(viewProxy, 0);\n return viewProxy;\n}\n\n@NgModule({\n providers: [\n { provide: DISABLE_ROOT_VIEW_HANDLING, useValue: true },\n { provide: APP_ROOT_VIEW, useFactory: generateRootLayoutAndProxy },\n ],\n})\nexport class RootCompositeModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { ViewContainerRef, ComponentFactoryResolver } from '@angular/core';\nimport { ShowModalOptions, View } from '@nativescript/core';\n\nexport type NativeShowModalOptions = Partial<Omit<ShowModalOptions, 'cancelable' | 'closeCallback'>>;\n/**\n * Configuration for opening a modal dialog with the MatDialog service.\n */\nexport class NativeDialogConfig<D = any> {\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This affects what is available for injection and the change detection order for the\n * component instantiated inside of the dialog. This does not affect where the dialog\n * content will be rendered.\n */\n viewContainerRef?: ViewContainerRef;\n\n /** Where to render the actual dialog in. By default it renders using the native view of the ViewContainerRef */\n renderIn?: 'root' | 'viewContainerRef' | View = 'viewContainerRef';\n\n /** ID for the dialog. If omitted, a unique one will be generated. */\n id?: string;\n\n /** Whether the dialog has a backdrop. */\n hasBackdrop?: boolean = true;\n\n /** Whether the user can use escape or clicking on the backdrop to close the modal. */\n disableClose?: boolean = false;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /**\n * Whether the dialog should close when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n closeOnNavigation?: boolean = true;\n\n /** Alternate `ComponentFactoryResolver` to use when resolving the associated component. */\n componentFactoryResolver?: ComponentFactoryResolver;\n\n nativeOptions?: NativeShowModalOptions = {};\n\n /**\n * When true, this dialog will be re-opened automatically on Angular HMR\n * reboots so the user does not lose context every time a related file\n * changes. The new dialog reuses the same component class and `data` payload\n * (provided via `data`); other config such as `nativeOptions` is preserved\n * verbatim.\n *\n * The original `dialogRef.afterClosed()` subject is wired to the restored\n * dialog so consumers `await openModal(...)` resolve normally when the user\n * eventually closes the restored modal.\n *\n * Only opens via component class are restorable — `TemplateRef` openings\n * carry references that don't survive an HMR reboot and are silently\n * skipped. Has no effect outside of HMR.\n */\n preserveOnHmr?: boolean = false;\n\n // TODO(jelbourn): add configuration for lifecycle hooks, ARIA labelling.\n}\n","import { Observable, Subject } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\nimport { NativeModalRef } from './native-modal-ref';\n\n// Counter for unique dialog ids.\nlet uniqueId = 0;\n\n/** Possible states of the lifecycle of a dialog. */\nexport const enum NativeDialogState {\n OPEN,\n CLOSING,\n CLOSED,\n}\n\nexport class NativeDialogRef<T, R = any> {\n /** The instance of component opened into the dialog. */\n componentInstance: T;\n\n /** Whether the user is allowed to close the dialog. */\n disableClose: boolean | undefined; //= this._containerInstance._config.disableClose;\n\n /** Subject for notifying the user that the dialog has finished opening. */\n private readonly _afterOpened = new Subject<void>();\n\n /** Subject for notifying the user that the dialog has finished closing. */\n private readonly _afterClosed = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the dialog has started closing. */\n private readonly _beforeClosed = new Subject<R | undefined>();\n\n /** Result to be passed to afterClosed. */\n private _result: R | undefined;\n\n /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */\n private _closeFallbackTimeout: any;\n\n /** Current state of the dialog. */\n private _state = NativeDialogState.OPEN;\n\n constructor(private _nativeModalRef: NativeModalRef, readonly id: string = `native-dialog-${uniqueId++}`) {\n // Pass the id along to the container.\n _nativeModalRef._id = id;\n\n // Emit when opening animation completes\n _nativeModalRef.stateChanged\n .pipe(\n filter((event) => event.state === 'opened'),\n take(1)\n )\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n\n // Dispose overlay when closing animation is complete\n _nativeModalRef.stateChanged\n .pipe(\n filter((event) => event.state === 'closed'),\n take(1)\n )\n .subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n this._finishDialogClose();\n this._afterClosed.next(this._result);\n this._afterClosed.complete();\n });\n\n _nativeModalRef.onDismiss.subscribe(() => {\n this._beforeClosed.next(this._result);\n this._beforeClosed.complete();\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.componentInstance = null!;\n _nativeModalRef.dispose();\n });\n }\n\n /**\n * Close the dialog.\n * @param dialogResult Optional result to return to the dialog opener.\n */\n close(dialogResult?: R): void {\n this._result = dialogResult;\n\n // Transition the backdrop in parallel to the dialog.\n this._nativeModalRef.stateChanged\n .pipe(\n filter((event) => event.state === 'closing'),\n take(1)\n )\n .subscribe(() => {\n this._beforeClosed.next(dialogResult);\n this._beforeClosed.complete();\n this._nativeModalRef.dispose();\n // this._overlayRef.detachBackdrop();\n\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has the chance to fire.\n this._closeFallbackTimeout = setTimeout(\n () => {\n this._finishDialogClose();\n this._afterClosed.next(this._result);\n this._afterClosed.complete();\n },\n //event.totalTime + 100);\n 100\n );\n });\n\n this._state = NativeDialogState.CLOSING;\n this._nativeModalRef._startExitAnimation();\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished opening.\n */\n afterOpened(): Observable<void> {\n return this._afterOpened;\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished closing.\n */\n afterClosed(): Observable<R | undefined> {\n return this._afterClosed;\n }\n\n /**\n * Gets an observable that is notified when the dialog has started closing.\n */\n beforeClosed(): Observable<R | undefined> {\n return this._beforeClosed;\n }\n\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick(): Observable<MouseEvent> {\n throw new Error('Method not implemented');\n }\n\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes: string | string[]): this {\n // this._overlayRef.addPanelClass(classes);\n return this;\n }\n\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes: string | string[]): this {\n // this._overlayRef.removePanelClass(classes);\n return this;\n }\n\n /** Gets the current state of the dialog's lifecycle. */\n getState(): NativeDialogState {\n return this._state;\n }\n\n /**\n * Finishes the dialog close by updating the state of the dialog\n * and disposing the overlay.\n */\n private _finishDialogClose() {\n this._state = NativeDialogState.CLOSED;\n this._nativeModalRef.dispose();\n }\n}\n","import { Subject } from 'rxjs';\nimport { ComponentType } from '../../utils/general';\nimport { NativeDialogConfig } from './dialog-config';\nimport { NativeDialogRef } from './dialog-ref';\n\n/**\n * One captured dialog opening, kept around long enough to re-open with the\n * fresh component class after Angular reboots. We deliberately keep this as\n * `unknown`-shaped data (no rxjs `Subject` typing on the public stash) so the\n * boundary between old and new module realms stays narrow.\n */\nexport interface CapturedHmrDialog {\n /**\n * The component class as it was at capture time. After an HMR reboot\n * this reference is **stale** — the new module realm will export a\n * different class object even though the source class definition is\n * identical. We retain it as a fallback for production-like builds\n * (where no class registry is installed) and for the rare case where\n * a captured component was not loaded through the patched\n * `ɵɵdefineComponent` path.\n */\n componentClass: ComponentType<unknown>;\n /**\n * The captured class's source name (e.g. `ResourceModalComponent`).\n * The dialog restore step uses this name to look up the live class\n * from `hmr-class-registry`, falling back to `componentClass` if the\n * registry has no match.\n */\n componentName: string;\n config: NativeDialogConfig;\n /**\n * The original `_afterClosed` subject from the captured dialog ref. We pipe\n * the restored dialog's `afterClosed()` into this subject so consumers that\n * are awaiting the original `dialogRef.afterClosed()` resolve naturally.\n *\n * Stored as `unknown` because the rxjs class identity may be different\n * between captured-vs-restored realms; the dialog-services consumer\n * narrows it as needed.\n */\n graftAfterClosed: (value: unknown) => void;\n}\n\nconst STASH_KEY = '__NS_ANGULAR_HMR_PENDING_MODALS__';\n\nfunction getStashSlot(): { value: CapturedHmrDialog[] | undefined } {\n return globalThis as unknown as { value: CapturedHmrDialog[] | undefined };\n}\n\n/**\n * Pure helper: filter the open dialog list down to entries that opted in via\n * `preserveOnHmr` and that we actually know how to restore (component-class\n * openings, not template openings).\n */\nexport function selectPreservableDialogs(\n openDialogs: ReadonlyArray<HmrCandidateDialog>,\n): HmrCandidateDialog[] {\n return openDialogs.filter((dialog) => isPreservable(dialog));\n}\n\nexport interface HmrCandidateDialog {\n /** The dialog ref we'd graft `afterClosed` onto. */\n ref: NativeDialogRef<unknown>;\n /**\n * The component class used when the dialog was opened. May be `undefined`\n * for `TemplateRef`-based openings — such dialogs are not preservable.\n */\n componentClass?: ComponentType<unknown>;\n /** The original config so we can re-open with identical options. */\n config: NativeDialogConfig;\n}\n\nfunction isPreservable(dialog: HmrCandidateDialog): boolean {\n if (!dialog.config?.preserveOnHmr) {\n return false;\n }\n return typeof dialog.componentClass === 'function';\n}\n\n/**\n * Capture the open dialogs that opted into HMR preservation. Returns the\n * captured entries so callers can correlate counts in their logs.\n */\nexport function captureDialogsForHmr(openDialogs: ReadonlyArray<HmrCandidateDialog>): CapturedHmrDialog[] {\n const preservable = selectPreservableDialogs(openDialogs);\n if (preservable.length === 0) {\n clearPendingHmrDialogs();\n return [];\n }\n\n const captures: CapturedHmrDialog[] = preservable.map(({ ref, componentClass, config }) => {\n const subject = readAfterClosedSubject(ref);\n // Capture the source name now — the class reference itself becomes\n // stale after the reboot, but the name is stable across realms and\n // is what the post-reboot registry is keyed on.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const componentName = (componentClass! as unknown as { name?: string })?.name ?? '';\n return {\n // Asserted non-null in `isPreservable`.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n componentClass: componentClass!,\n componentName,\n config,\n graftAfterClosed: (value) => {\n if (!subject) {\n return;\n }\n try {\n if (!subject.closed) {\n subject.next(value as never);\n subject.complete();\n }\n } catch {\n // Swallow: the subject may have completed during dispose; nothing for us to do.\n }\n },\n };\n });\n\n (globalThis as unknown as Record<string, unknown>)[STASH_KEY] = captures;\n return captures;\n}\n\n/**\n * Drain the pending captures. The caller (the new `NativeDialog`) is expected\n * to re-open each entry and graft `afterClosed` back into the original\n * subject.\n */\nexport function consumePendingHmrDialogs(): CapturedHmrDialog[] {\n const slot = (globalThis as unknown as Record<string, unknown>)[STASH_KEY];\n if (!Array.isArray(slot)) {\n return [];\n }\n delete (globalThis as unknown as Record<string, unknown>)[STASH_KEY];\n return slot.filter((entry): entry is CapturedHmrDialog => !!entry && typeof (entry as CapturedHmrDialog).componentClass === 'function');\n}\n\n/**\n * Remove the pending captures without restoring. Useful when a reboot happens\n * for reasons other than module replacement (e.g. platform dispose) and we\n * don't want stale modal state to leak into the next bootstrap.\n */\nexport function clearPendingHmrDialogs(): void {\n delete (globalThis as unknown as Record<string, unknown>)[STASH_KEY];\n}\n\n/**\n * Test/debug helper: read the current stash without consuming it.\n */\nexport function peekPendingHmrDialogs(): CapturedHmrDialog[] {\n const slot = (globalThis as unknown as Record<string, unknown>)[STASH_KEY];\n return Array.isArray(slot) ? (slot as CapturedHmrDialog[]).slice() : [];\n}\n\n/**\n * Reach into the dialog ref's private `_afterClosed` subject. We touch the\n * private field intentionally — the ref class lives inside this package and\n * we want HMR restore to be a feature of the dialog system rather than a\n * reason to widen its public surface for everyone.\n */\nfunction readAfterClosedSubject(ref: NativeDialogRef<unknown>): Subject<unknown> | undefined {\n const candidate = (ref as unknown as { _afterClosed?: unknown })._afterClosed;\n if (!candidate || typeof candidate !== 'object') {\n return undefined;\n }\n if (typeof (candidate as Subject<unknown>).next !== 'function') {\n return undefined;\n }\n return candidate as Subject<unknown>;\n}\n\n/**\n * Used by the resume-side: if the stash references something that can no\n * longer be opened (e.g. the component class is dead post-reload), we still\n * need to release its consumers so awaited promises don't dangle forever.\n */\nexport function abortCapturedDialog(captured: CapturedHmrDialog): void {\n try {\n captured.graftAfterClosed(undefined);\n } catch {\n // Best-effort.\n }\n}\n","import { NativeDialogConfig } from './dialog-config';\nimport { HmrCandidateDialog } from './dialog-hmr';\n\n/**\n * Best-effort animation helpers used by the dialog HMR layer to make\n * the close + reopen round-trip feel like an in-place content refresh.\n *\n * They live in a tiny standalone module on purpose:\n *\n * - `dialog-services.ts` pulls in `@angular/core`, which Jest cannot\n * load in our spec runner without an extra ESM transform. By\n * keeping these helpers free of `@angular/core` we can unit-test\n * them in isolation (`dialog-hmr-animation.spec.ts`) while\n * `dialog-services.ts` re-exports them at the public API layer.\n * - The helpers are inherently best-effort: a missing\n * `_nativeModalRef`, a frozen `_modalAnimatedOptions` stack, or a\n * future `NativeDialogConfig` shape change must never break HMR\n * restore — we just fall back to the original animated behavior.\n */\n\n/**\n * Mutate the top of `parentView._modalAnimatedOptions` to `false` for\n * the given candidate so the imminent native close runs un-animated.\n *\n * iOS reads `_modalAnimatedOptions.slice(-1)[0]` when dismissing a\n * modal (see core `view-common.ts` / `view/index.ios.ts`). The\n * Angular dialog service only pushes one entry per open call, so the\n * top entry is the exact flag that controls the dismiss we're about\n * to trigger as part of the HMR root-view replacement.\n */\nexport function suppressNativeCloseAnimation(candidate: HmrCandidateDialog): void {\n if (!candidate.config?.preserveOnHmr) {\n return;\n }\n try {\n const modalRef = (candidate.ref as unknown as { _nativeModalRef?: { parentView?: unknown } })?._nativeModalRef;\n const parentView = modalRef?.parentView as { _modalAnimatedOptions?: boolean[] } | undefined;\n const stack = parentView?._modalAnimatedOptions;\n if (Array.isArray(stack) && stack.length > 0) {\n stack[stack.length - 1] = false;\n }\n } catch {\n // Swallow: a missing `_nativeModalRef` / `_modalAnimatedOptions`\n // is acceptable — we just lose the no-animation optimisation.\n }\n}\n\n/**\n * Build a `NativeDialogConfig` clone of `original` whose\n * `nativeOptions.animated` is forced to `false`. Used when re-opening\n * a captured modal so the open animation matches the suppressed\n * close — together they make the HMR round-trip feel like a content\n * refresh instead of a close/reopen.\n */\nexport function buildNonAnimatedRestoreConfig(original: NativeDialogConfig): NativeDialogConfig {\n // Clone via `Object.assign` so consumers holding the original\n // config (e.g. caching it for re-open) don't see mutations from\n // the HMR pathway.\n const cloned = Object.assign(new NativeDialogConfig(), original) as NativeDialogConfig;\n cloned.nativeOptions = { ...(original?.nativeOptions || {}), animated: false };\n return cloned;\n}\n","import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n createComponent,\n EmbeddedViewRef,\n Injector,\n Optional,\n ViewContainerRef,\n} from '@angular/core';\nimport { Application, ContentView, Frame, View } from '@nativescript/core';\nimport { fromEvent, Subject } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { AppHostAsyncView, AppHostView } from '../../app-host-view';\nimport { NSLocationStrategy } from '../../legacy/router/ns-location-strategy';\nimport { once } from '../../utils/general';\nimport { NgViewRef } from '../../view-refs';\nimport { DetachedLoader } from '../detached-loader';\nimport { ComponentPortal, TemplatePortal } from '../portal/common';\nimport { NativeScriptDomPortalOutlet } from '../portal/nsdom-portal-outlet';\nimport { NativeDialogConfig } from './dialog-config';\n\nexport class NativeModalRef {\n _id: string;\n stateChanged = new Subject<{ state: 'opened' | 'closed' | 'closing' }>();\n onDismiss = new Subject<void>();\n\n parentView: View;\n portalOutlet: NativeScriptDomPortalOutlet;\n detachedLoaderRef: ComponentRef<DetachedLoader>;\n modalViewRef: NgViewRef<any>;\n /**\n * The actual NativeScript view passed to `parentView.showModal(...)`.\n *\n * For component portals this is the stable `targetView` ContentView\n * wrapper that owns the Angular host PVC. For template portals it\n * remains `modalViewRef.firstNativeLikeView` (the historical\n * behavior). Keeping a direct reference avoids walking parent\n * chains when programmatically closing the modal.\n */\n modalView?: View;\n\n private _closeCallback: () => void;\n private _isDismissed = false;\n\n constructor(\n private _config: NativeDialogConfig,\n private _injector: Injector,\n @Optional() private location?: NSLocationStrategy,\n ) {\n const nativeElement =\n this._config.renderIn === 'root'\n ? Application.getRootView()\n : this._config.renderIn === 'viewContainerRef'\n ? this._config.viewContainerRef?.element.nativeElement\n : this._config.renderIn;\n let parentView = nativeElement || Application.getRootView();\n\n if ((parentView instanceof AppHostView || parentView instanceof AppHostAsyncView) && parentView.ngAppRoot) {\n parentView = parentView.ngAppRoot;\n }\n\n // _ngDialogRoot is the first child of the previously detached proxy.\n // It should have 'viewController' (iOS) or '_dialogFragment' (Android) available for\n // presenting future modal views.\n while (parentView._modal || parentView._ngDialogRoot) {\n parentView = parentView._modal || parentView._ngDialogRoot;\n }\n this.parentView = parentView;\n\n this._closeCallback = once(async () => {\n this.stateChanged.next({ state: 'closing' });\n if (!this._isDismissed) {\n // Prefer `modalView` (the actual presented view) over the\n // legacy `firstNativeLikeView`. Both paths ultimately reach\n // the same `_closeModalCallback` via parent walk, but going\n // through the presented view is one hop instead of three and\n // works even if the rendered first root has been replaced by\n // an HMR `ɵɵreplaceMetadata` cycle.\n const closeTarget = this.modalView ?? this.modalViewRef.firstNativeLikeView;\n closeTarget?.closeModal();\n }\n await this.location?._closeModalNavigation();\n // this.detachedLoaderRef?.destroy();\n if (this.modalViewRef?.firstNativeLikeView?.isLoaded) {\n fromEvent(this.modalViewRef.firstNativeLikeView, 'unloaded')\n .pipe(take(1))\n .subscribe(() => this.stateChanged.next({ state: 'closed' }));\n } else {\n this.stateChanged.next({ state: 'closed' });\n }\n });\n }\n\n _generateDetachedContainer(vcRef?: ViewContainerRef) {\n if (vcRef) {\n this.detachedLoaderRef = vcRef.createComponent(DetachedLoader);\n } else {\n this.detachedLoaderRef = createComponent(DetachedLoader, {\n environmentInjector: this._injector.get(ApplicationRef).injector,\n elementInjector: this._config.viewContainerRef?.injector || this._injector,\n });\n this._injector.get(ApplicationRef).attachView(this.detachedLoaderRef.hostView);\n }\n this.detachedLoaderRef.changeDetectorRef.detectChanges();\n }\n\n attachTemplatePortal<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T> {\n this.startModalNavigation();\n const vcRef = portal.viewContainerRef || this._config.viewContainerRef;\n this._generateDetachedContainer(vcRef);\n portal.viewContainerRef = this.detachedLoaderRef.instance.vc;\n const targetView = new ContentView();\n this.portalOutlet = new NativeScriptDomPortalOutlet(\n targetView,\n this._config.componentFactoryResolver || this._injector.get(ComponentFactoryResolver),\n this._injector.get(ApplicationRef),\n this._injector,\n );\n const templateRef = this.portalOutlet.attach(portal);\n this.modalViewRef = new NgViewRef(templateRef);\n this.modalViewRef.firstNativeLikeView['__ng_modal_id__'] = this._id;\n // if we don't detach the view from its parent, ios gets mad\n this.modalViewRef.detachNativeLikeView();\n\n const userOptions = this._config.nativeOptions || {};\n this.parentView.showModal(this.modalViewRef.firstNativeLikeView, {\n context: null,\n ...userOptions,\n closeCallback: async () => {\n await this.location?._closeModalNavigation();\n this.onDismiss.next();\n this.onDismiss.complete();\n },\n cancelable: !this._config.disableClose,\n });\n // if (this.modalView !== templateRef.rootNodes[0]) {\n // componentRef.location.nativeElement._ngDialogRoot = this.modalView;\n // }\n return templateRef;\n }\n\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this.startModalNavigation();\n\n // `targetView` is a stable ContentView wrapper we own. The Angular\n // component's host (a `ProxyViewContainer`) is attached as its\n // content via the portal outlet below. We present `targetView`\n // itself as the modal — *not* the first rendered template root —\n // so that component-level HMR (`ɵɵreplaceMetadata`) can re-render\n // into the PVC and the modal automatically displays the new\n // content via the wrapper. Presenting the rendered first root\n // directly worked for the initial open but left subsequent HMR\n // updates rendering into a detached PVC, producing a blank modal.\n const targetView = new ContentView();\n this.portalOutlet = new NativeScriptDomPortalOutlet(\n targetView,\n this._config.componentFactoryResolver || this._injector.get(ComponentFactoryResolver),\n this._injector.get(ApplicationRef),\n this._injector,\n );\n const componentRef = this.portalOutlet.attach(portal);\n componentRef.changeDetectorRef.detectChanges();\n this.modalViewRef = new NgViewRef(componentRef);\n this.modalView = targetView;\n if (this.modalViewRef.firstNativeLikeView !== this.modalViewRef.view) {\n (<any>this.modalViewRef.view)._ngDialogRoot = this.modalViewRef.firstNativeLikeView;\n }\n // Tag both the wrapper (the actual modal root) and the rendered\n // first root so `getClosestDialog`'s parent walk finds the modal\n // id regardless of whether it starts from a view inside the\n // template or from the wrapper.\n targetView['__ng_modal_id__'] = this._id;\n if (this.modalViewRef.firstNativeLikeView) {\n this.modalViewRef.firstNativeLikeView['__ng_modal_id__'] = this._id;\n }\n\n const userOptions = this._config.nativeOptions || {};\n this.parentView.showModal(targetView, {\n context: null,\n ...userOptions,\n closeCallback: async () => {\n this._isDismissed = true;\n this._closeCallback(); // close callback can only be called once, so we call it here to setup the exit events\n this.onDismiss.next();\n this.onDismiss.complete();\n },\n cancelable: !this._config.disableClose,\n });\n return componentRef;\n }\n\n _startExitAnimation() {\n this._closeCallback();\n }\n\n dispose() {\n this.portalOutlet.dispose();\n }\n private startModalNavigation() {\n const frame = this.parentView instanceof Frame ? this.parentView : this.parentView?.page?.frame || Frame.topmost();\n\n this.location?._beginModalNavigation(frame);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n inject,\n Injectable,\n InjectionToken,\n Injector,\n OnDestroy,\n StaticProvider,\n TemplateRef,\n Type,\n} from '@angular/core';\nimport { Application, View } from '@nativescript/core';\nimport { defer, Observable, Subject, Subscription } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { postAngularBootstrap$, preAngularDisposal$ } from '../../application';\nimport { isAngularHmrEnabled } from '../../hmr-environment';\nimport { getFreshComponentClass } from '../../hmr-class-registry';\nimport { registerHmrEagerInstantiator } from '../../hmr-eager-services';\nimport { NSLocationStrategy } from '../../legacy/router/ns-location-strategy';\nimport { NativeScriptDebug } from '../../trace';\nimport { ComponentType } from '../../utils/general';\nimport { ComponentPortal, TemplatePortal } from '../portal/common';\nimport { NativeDialogConfig } from './dialog-config';\nimport {\n abortCapturedDialog,\n captureDialogsForHmr,\n CapturedHmrDialog,\n clearPendingHmrDialogs,\n consumePendingHmrDialogs,\n HmrCandidateDialog,\n peekPendingHmrDialogs,\n} from './dialog-hmr';\nimport { buildNonAnimatedRestoreConfig, suppressNativeCloseAnimation } from './dialog-hmr-animation';\nimport { NativeDialogRef } from './dialog-ref';\nimport { NativeModalRef } from './native-modal-ref';\n\n/**\n * Dialog HMR lifecycle log.\n */\nfunction hmrDialogLog(message: string): void {\n if (!isAngularHmrEnabled()) {\n return;\n }\n if (!NativeScriptDebug.isLogEnabled()) {\n return;\n }\n NativeScriptDebug.hmrLog(`[dialog] ${message}`);\n}\n\n/**\n * Lower-level dialog HMR wiring trace (module-realm count, NativeDialog\n * instance count, registry hits/misses). Distinct from `hmrDialogLog`\n * for greppability — both fan into the same Trace category so a single\n * `Trace.setCategories(NativeScriptDebug.hmrTraceCategory)` toggle\n * surfaces them all.\n */\nfunction hmrDialogDiag(message: string): void {\n if (!isAngularHmrEnabled()) {\n return;\n }\n if (!NativeScriptDebug.isLogEnabled()) {\n return;\n }\n NativeScriptDebug.hmrLog(`[dialog-diag] ${message}`);\n}\n\n/**\n * Module-evaluation marker. Increments on every fresh evaluation of\n * `dialog-services.ts`. If we see this number rise on every HMR cycle,\n * the file is being re-evaluated (good). If it stays flat, the module\n * is being served from cache (bad — class identities won't change).\n */\nconst DIALOG_MODULE_DIAG_KEY = '__NS_HMR_DIAG_DIALOG_MODULE__';\ninterface DialogModuleDiag {\n evals: number;\n instances: number;\n lastEvalAt: number;\n}\nfunction getDialogModuleDiag(): DialogModuleDiag {\n const slot = globalThis as unknown as { [DIALOG_MODULE_DIAG_KEY]?: DialogModuleDiag };\n if (!slot[DIALOG_MODULE_DIAG_KEY]) {\n slot[DIALOG_MODULE_DIAG_KEY] = { evals: 0, instances: 0, lastEvalAt: 0 };\n }\n return slot[DIALOG_MODULE_DIAG_KEY]!;\n}\n{\n const md = getDialogModuleDiag();\n md.evals += 1;\n md.lastEvalAt = Date.now();\n hmrDialogDiag(`module-eval count=${md.evals} (file=dialog-services.ts) timestamp=${md.lastEvalAt}`);\n}\n\n/** Injection token that can be used to access the data that was passed in to a dialog. */\nexport const NATIVE_DIALOG_DATA = new InjectionToken<any>('NativeDialogData');\n\n/** Injection token that can be used to specify default dialog options. */\nexport const NATIVE_DIALOG_DEFAULT_OPTIONS = new InjectionToken<NativeDialogConfig>('native-dialog-default-options');\n\n/**\n * Base class for dialog services. The base dialog service allows\n * for arbitrary dialog refs and dialog container components.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class NativeDialog implements OnDestroy {\n /**\n * Diagnostic instance id. We tag each constructor with a number so\n * the logs make it obvious when a stale `NativeDialog` keeps\n * receiving events after a reboot (e.g. due to a leaked subscription\n * or a service from a previous realm being kept alive).\n */\n private readonly _diagInstanceId: number;\n private _openDialogsAtThisLevel: NativeDialogRef<any>[] = [];\n private readonly _afterAllClosedAtThisLevel = new Subject<void>();\n private readonly _afterOpenedAtThisLevel = new Subject<NativeDialogRef<any>>();\n /**\n * Maps each open dialog ref back to the `(componentClass, config)` pair it\n * was opened with so the HMR snapshot can replay the call later. Dialogs\n * opened with a `TemplateRef` are tracked with `componentClass: undefined`\n * — the HMR layer skips them automatically.\n */\n private readonly _openDialogMetadata = new WeakMap<NativeDialogRef<any>, { componentClass?: ComponentType<any>; config: NativeDialogConfig }>();\n private _hmrSubscriptions: Subscription[] = [];\n // TODO (jelbourn): tighten the typing right-hand side of this expression.\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n readonly afterAllClosed: Observable<void> = defer(() =>\n this.openDialogs.length\n ? this._getAfterAllClosed()\n : this._getAfterAllClosed().pipe(startWith<any, any>(undefined)),\n ) as Observable<any>;\n\n /** Keeps track of the currently-open dialogs. */\n get openDialogs(): NativeDialogRef<any>[] {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n\n /** Stream that emits when a dialog has been opened. */\n get afterOpened(): Subject<NativeDialogRef<any>> {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n\n _getAfterAllClosed(): Subject<void> {\n const parent = this._parentDialog;\n return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n }\n private _injector = inject(Injector);\n private _defaultOptions = inject(NATIVE_DIALOG_DEFAULT_OPTIONS, {\n optional: true,\n });\n private _parentDialog = inject(NativeDialog, { optional: true, skipSelf: true });\n private _dialogRefConstructor: Type<NativeDialogRef<any>> = NativeDialogRef;\n private _nativeModalType = NativeModalRef;\n private _dialogDataToken = NATIVE_DIALOG_DATA;\n private locationStrategy = inject(NSLocationStrategy);\n // Bumps a global counter so we can detect duplicate or leaked\n // `NativeDialog` instances across HMR cycles. Field initialiser\n // ordering: this MUST run before `_initHmrLifecycle()` below so the\n // log line in that helper can include the assigned id.\n private _diagInstanceIdAssign = ((): null => {\n const md = getDialogModuleDiag();\n md.instances += 1;\n (this as unknown as { _diagInstanceId: number })._diagInstanceId = md.instances;\n hmrDialogDiag(\n `NativeDialog ctor instanceId=${md.instances} hasParentDialog=${!!this._parentDialog} moduleEvalCount=${md.evals}`,\n );\n return null;\n })();\n // Initialise after every dependency above so the subscriptions can call\n // back into `this.open(...)` and `this.openDialogs` safely. The result is\n // unused — we just want a side-effect at construction time.\n private _hmrInitMarker = this._initHmrLifecycle();\n /**\n * Opens a modal dialog containing the given component.\n * @param component Type of the component to load into the dialog.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open<T, D = any, R = any>(component: ComponentType<T>, config?: NativeDialogConfig<D>): NativeDialogRef<T, R>;\n\n /**\n * Opens a modal dialog containing the given template.\n * @param template TemplateRef to instantiate as the dialog content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open<T, D = any, R = any>(template: TemplateRef<T>, config?: NativeDialogConfig<D>): NativeDialogRef<T, R>;\n\n open<T, D = any, R = any>(\n template: ComponentType<T> | TemplateRef<T>,\n config?: NativeDialogConfig<D>,\n ): NativeDialogRef<T, R>;\n\n open<T, D = any, R = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: NativeDialogConfig<D>,\n ): NativeDialogRef<T, R> {\n config = _applyConfigDefaults(config, this._defaultOptions || new NativeDialogConfig());\n\n if (config.id && this.getDialogById(config.id) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n const dialogRef = this._attachDialogContent<T, R>(componentOrTemplateRef, config);\n\n this.openDialogs.push(dialogRef);\n this._openDialogMetadata.set(dialogRef, {\n componentClass: componentOrTemplateRef instanceof TemplateRef ? undefined : (componentOrTemplateRef as ComponentType<T>),\n config,\n });\n dialogRef.afterClosed().subscribe(() => this._removeOpenDialog(dialogRef));\n this.afterOpened.next(dialogRef);\n\n // Notify the dialog container that the content has been attached.\n // dialogContainer._initializeWithAttachedContent();\n\n return dialogRef;\n }\n\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll(): void {\n this._closeDialogs(this.openDialogs);\n }\n\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id: string): NativeDialogRef<any> | undefined {\n return this.openDialogs.find((dialog) => dialog.id === id);\n }\n\n ngOnDestroy() {\n hmrDialogDiag(\n `NativeDialog ngOnDestroy instanceId=${this._diagInstanceId} openCount=${this._openDialogsAtThisLevel.length} subCount=${this._hmrSubscriptions.length}`,\n );\n // Only close the dialogs at this level on destroy\n // since the parent service may still be active.\n this._closeDialogs(this._openDialogsAtThisLevel);\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n for (const sub of this._hmrSubscriptions) {\n try {\n sub.unsubscribe();\n } catch {\n // Best-effort: tearing down the dialog service shouldn't prevent the\n // rest of the module disposal from completing.\n }\n }\n this._hmrSubscriptions = [];\n }\n\n /**\n * Tracks whether a restore has already been scheduled for this\n * `NativeDialog` instance's lifetime. We only need to restore once\n * per HMR cycle — the rxjs `ReplaySubject(1)` for\n * `postAngularBootstrap$` delivers both the *previous* cycle's\n * cached event (replay on subscribe) **and** the *current* cycle's\n * fresh event, and the constructor stash peek can independently\n * notice pending work. Without this guard each of those triggers\n * would queue its own `setTimeout` and the logs would show two or\n * three \"scheduling restore\" lines per save.\n *\n * The guard is per-instance and the stash itself is the source of\n * truth: `_restorePendingDialogs` calls `consumePendingHmrDialogs()`\n * which atomically clears the stash, so even if the guard somehow\n * fired twice, only the first call would do real work.\n */\n private _restoreScheduledForThisInstance = false;\n\n /**\n * Wires up HMR capture/restore. Only the root-level dialog manages the\n * stash so a stack of `NativeDialog` instances inside a child injector\n * doesn't fight for it.\n *\n * Production short-circuit: `isAngularHmrEnabled()` returns `false` in\n * release builds and when no NS Vite / webpack HMR runtime is present,\n * so the long-lived subscriptions below never attach in shipping apps.\n *\n * `postAngularBootstrap$` is a `ReplaySubject(1)` (see `application.ts`)\n * which means a `NativeDialog` instantiated *after* the bootstrap event\n * has already fired (typical when the user app injects `NativeDialog`\n * lazily via a service like `view.service.ts`) still receives the\n * buffered event and runs the restore path.\n */\n private _initHmrLifecycle(): null {\n if (this._parentDialog) {\n hmrDialogDiag(`_initHmrLifecycle skipped (has parent dialog) instanceId=${this._diagInstanceId}`);\n return null;\n }\n\n if (!isAngularHmrEnabled()) {\n return null;\n }\n\n hmrDialogDiag(\n `_initHmrLifecycle wiring up subscriptions instanceId=${this._diagInstanceId} moduleEvalCount=${getDialogModuleDiag().evals}`,\n );\n\n const dispose = preAngularDisposal$.subscribe((event) => {\n if (event.moduleType !== 'main' || event.reason !== 'hotreload') {\n return;\n }\n hmrDialogDiag(`preAngularDisposal$ fired (reason=${event.reason}) instanceId=${this._diagInstanceId}`);\n this._captureOpenDialogsForHmr();\n });\n\n const bootstrap = postAngularBootstrap$.subscribe((event) => {\n if (event.moduleType !== 'main' || event.reason !== 'hotreload') {\n return;\n }\n hmrDialogDiag(`postAngularBootstrap$ fired (reason=${event.reason}) instanceId=${this._diagInstanceId}`);\n this._maybeScheduleRestore(`postAngularBootstrap$ (reason=${event.reason})`);\n });\n\n this._hmrSubscriptions.push(dispose, bootstrap);\n\n // Belt-and-suspenders: even though `postAngularBootstrap$` replays\n // the last event for late subscribers, also peek the global stash\n // here. This catches the case where `NativeDialog` is instantiated\n // lazily — *after* `emitModuleBootstrapEvent` has fired and the\n // ReplaySubject's buffered event no longer matches the current\n // cycle. The `_maybeScheduleRestore` guard makes this a no-op when\n // the bootstrap subscriber already queued work.\n const pendingNow = peekPendingHmrDialogs();\n hmrDialogDiag(`_initHmrLifecycle stash peek pending=${pendingNow.length} instanceId=${this._diagInstanceId}`);\n if (pendingNow.length > 0) {\n this._maybeScheduleRestore(`stash peek on ctor: ${pendingNow.length} pending dialog(s)`);\n }\n return null;\n }\n\n /**\n * Schedule a restore exactly once per `NativeDialog` instance.\n *\n * The work is deferred to the next macrotask for two reasons:\n *\n * 1. `postAngularBootstrap$.next(...)` is fired from inside\n * `emitModuleBootstrapEvent`, which itself runs inside the\n * `bootstrapApplication` callback — so the call stack still\n * contains Angular's ApplicationRef bootstrap pipeline. Doing\n * `this.open(...)` synchronously re-entered Angular DI while a\n * `providedIn: 'root'` factory could still be on the resolution\n * stack, which surfaced as `NG0200: Circular dependency detected\n * for NativeDialog`. Yielding to a macrotask lets the bootstrap\n * stack fully unwind first.\n * 2. The eventual `parent.showModal(...)` cannot present onto a\n * view controller whose view is not yet in the iOS window\n * hierarchy (see `_scheduleRestoreOpenWhenReady` for the second\n * wait stage); a synchronous attempt would silently no-op\n * because iOS rejects the present without throwing.\n */\n private _maybeScheduleRestore(triggerDescription: string): void {\n if (this._restoreScheduledForThisInstance) {\n hmrDialogDiag(\n `_maybeScheduleRestore SKIP duplicate trigger=${triggerDescription} instanceId=${this._diagInstanceId}`,\n );\n return;\n }\n this._restoreScheduledForThisInstance = true;\n hmrDialogLog(`scheduling restore (trigger=${triggerDescription}) instanceId=${this._diagInstanceId}`);\n setTimeout(() => {\n void this._restorePendingDialogs();\n }, 0);\n }\n\n private _captureOpenDialogsForHmr(): void {\n const candidates: HmrCandidateDialog[] = this._openDialogsAtThisLevel.map((ref) => {\n const meta = this._openDialogMetadata.get(ref);\n return {\n ref,\n componentClass: meta?.componentClass,\n config: meta?.config ?? new NativeDialogConfig(),\n };\n });\n\n hmrDialogDiag(\n `_captureOpenDialogsForHmr instanceId=${this._diagInstanceId} candidates=${candidates.length} (${candidates.map((c) => `${(c.componentClass as { name?: string } | undefined)?.name ?? '(template)'}|preserveOnHmr=${!!c.config?.preserveOnHmr}`).join(', ')})`,\n );\n\n const captured = captureDialogsForHmr(candidates);\n\n if (captured.length > 0) {\n // Suppress the close animation that's about to fire as part of\n // `_closeAllModalViewsInternal()` during root-view replacement.\n // Without this the user sees a slide-down + slide-up flicker\n // wrapping every HMR reboot.\n for (const candidate of candidates) {\n suppressNativeCloseAnimation(candidate);\n }\n hmrDialogLog(`captured ${captured.length} dialog(s) for HMR restore [${captured.map((c) => c.componentName).join(', ')}]`);\n } else if (this._openDialogsAtThisLevel.length > 0) {\n hmrDialogLog(`skipped capture: ${this._openDialogsAtThisLevel.length} open dialog(s) but none preservable`);\n }\n\n if (captured.length > 0 && NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`captured ${captured.length} dialog(s) for HMR restore`);\n }\n }\n\n /**\n * Per-cycle guard to keep `_restorePendingDialogs` idempotent if more\n * than one subscriber fires for the same bootstrap event. The\n * regression we have seen (`postAngularBootstrap$ → restore` logged\n * twice in the same hot reload) was caused by the `NativeDialogModule`\n * also listing `NativeDialog` in its `providers` array. That has been\n * removed, but we keep this flag as a defensive net so a future stray\n * subscription does not consume the stash twice. The flag is reset\n * after the consume so subsequent HMR cycles can run their own\n * restore.\n */\n private _restoreInFlight = false;\n\n private async _restorePendingDialogs(): Promise<void> {\n if (this._restoreInFlight) {\n hmrDialogLog('skipping restore: already in flight');\n return;\n }\n const pending = consumePendingHmrDialogs();\n if (pending.length === 0) {\n return;\n }\n this._restoreInFlight = true;\n\n hmrDialogLog(`restoring ${pending.length} dialog(s) after reboot [${pending.map((c) => c.componentName).join(', ')}]`);\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`restoring ${pending.length} dialog(s) after HMR reboot`);\n }\n\n try {\n for (const captured of pending) {\n this._restoreSingleDialog(captured);\n }\n } finally {\n this._restoreInFlight = false;\n }\n }\n\n /**\n * Resolve the freshest known class object for the captured component\n * name and re-open the dialog through the normal `open` path, but\n * only once the new root view is actually attached to the iOS window\n * hierarchy.\n *\n * Why a class lookup at all: an HMR reboot calls\n * `ɵresetCompiledComponents()` which clears each component's `ɵcmp`\n * field but **leaves the class identity unchanged**. The patched\n * `ɵɵdefineComponent` then re-registers the same class object under\n * the same source name when Angular re-renders the component. A\n * fresh-class lookup therefore returns either the same object the\n * stash captured (most common) or, on the rare occasion that the\n * source file's `@Component` decorator was re-evaluated into a brand\n * new class object (e.g. the user added `@Component(...)` to a new\n * exported symbol), the live one. Either way, a single check is\n * enough — the previous retry schedule was a no-op in 100 % of\n * observed cycles because the captured class IS the live class.\n */\n private _restoreSingleDialog(captured: CapturedHmrDialog): void {\n const live = getFreshComponentClass<ComponentType<unknown>>(captured.componentName);\n const componentClass = live ?? captured.componentClass;\n const usingFresh = !!live && live !== captured.componentClass;\n // Detailed diagnostic to disambiguate the three reasons\n // `usingFreshClass=false` could log:\n // 1. liveDefined=false: the patched ɵɵdefineComponent never\n // registered a class for this name in the new realm. Most\n // likely cause: the component module was not re-evaluated\n // after the eviction (file not in `evictPaths`, or runtime\n // did not actually evict it).\n // 2. liveDefined=true but live === captured: the file WAS\n // re-evaluated, but the registry still hands back the same\n // class object. This shouldn't happen post-reboot for a\n // truly fresh realm; if it does, the captured snapshot was\n // taken from the same realm that's now serving the live\n // class — i.e. the disposal path is not actually disposing\n // the old realm before the new one boots.\n // 3. liveDefined=true and live !== captured: usingFresh path,\n // the registry IS doing its job. This is the success case.\n const liveDefined = !!live;\n const sameAsCapture = liveDefined && live === captured.componentClass;\n hmrDialogDiag(\n `_restoreSingleDialog name=${captured.componentName} liveDefined=${liveDefined} sameAsCapture=${sameAsCapture} usingFresh=${usingFresh} capturedFnName=${(captured.componentClass as unknown as { name?: string })?.name ?? '(none)'} liveFnName=${(live as unknown as { name?: string } | undefined)?.name ?? '(none)'}`,\n );\n this._scheduleRestoreOpenWhenReady(captured, componentClass, usingFresh);\n }\n\n /**\n * Maximum time we'll wait for the new root view to attach to the\n * iOS window before giving up and trying the open anyway. NS Vite's\n * worst observed reboot-to-rootview-loaded gap is ~250 ms; one\n * second leaves headroom for slower devices without leaving the\n * captured dialog stuck in the stash if something genuinely goes\n * wrong.\n */\n private static readonly _ROOT_VIEW_LOADED_TIMEOUT_MS = 1_000;\n\n /**\n * Defer the actual `this.open(...)` call until the new root view's\n * underlying iOS `UIViewController.view` is in the window hierarchy.\n *\n * iOS silently rejects `presentViewControllerAnimatedCompletion` if\n * the parent controller's view is not yet attached to a `UIWindow`\n * (see `view/index.ios.ts::_showNativeModalView`, which logs to\n * `Trace` and returns without throwing). In dev that would surface\n * as a vanished modal with no actionable error.\n *\n * NS marks a view as `isLoaded === true` from\n * `UILayoutViewController.viewWillAppear`, which fires once iOS has\n * decided to add the view to its window. Listening for the\n * `loadedEvent` (one-shot) plus an extra macrotask gives UIKit a\n * chance to finish window attachment before we present.\n */\n private _scheduleRestoreOpenWhenReady(\n captured: CapturedHmrDialog,\n componentClass: ComponentType<unknown>,\n usingFresh: boolean,\n ): void {\n const rootView = Application.getRootView();\n\n if (rootView && rootView.isLoaded) {\n // Even when isLoaded is already true we yield once: a previous\n // capture in the same hot reload cycle may have set isLoaded on\n // the *outgoing* root view and a new root view is about to take\n // over. A single setTimeout(0) gives `setWindowContent` a chance\n // to finish swapping `win.rootViewController` before we try to\n // present on top of it.\n setTimeout(() => this._performRestoreOpen(captured, componentClass, usingFresh), 0);\n return;\n }\n\n if (!rootView) {\n // No root view at all yet — extremely unusual at this point in\n // the bootstrap, but protect against it by polling. We use the\n // same timeout budget as the loaded path.\n this._pollForRootView(captured, componentClass, usingFresh, Date.now());\n return;\n }\n\n hmrDialogLog(`restore ${captured.componentName} waiting for root view loadedEvent`);\n\n let settled = false;\n const onLoaded = () => {\n if (settled) return;\n settled = true;\n try {\n rootView.off(View.loadedEvent, onLoaded);\n } catch {\n // off may throw on stale view bindings; the `settled` flag\n // already prevents a double-fire.\n }\n // Defer one tick after viewWillAppear so UIKit completes the\n // actual window attachment (`view.window` is set during the\n // view-controller transition that follows viewWillAppear).\n setTimeout(() => this._performRestoreOpen(captured, componentClass, usingFresh), 0);\n };\n\n try {\n rootView.once(View.loadedEvent, onLoaded);\n } catch {\n // If the event subscription fails (ancient core builds), fall\n // back to a tiny delay — better to attempt the open and have\n // iOS log a benign trace than to leak the dialog stash.\n setTimeout(() => onLoaded(), 50);\n }\n\n // Bound the wait so a never-loading root view can't permanently\n // pin the captured dialog in the stash.\n setTimeout(() => {\n if (settled) return;\n hmrDialogLog(`restore ${captured.componentName} root view never loaded within ${NativeDialog._ROOT_VIEW_LOADED_TIMEOUT_MS}ms; attempting open anyway`);\n onLoaded();\n }, NativeDialog._ROOT_VIEW_LOADED_TIMEOUT_MS);\n }\n\n private _pollForRootView(\n captured: CapturedHmrDialog,\n componentClass: ComponentType<unknown>,\n usingFresh: boolean,\n startedAt: number,\n ): void {\n const rootView = Application.getRootView();\n if (rootView) {\n this._scheduleRestoreOpenWhenReady(captured, componentClass, usingFresh);\n return;\n }\n if (Date.now() - startedAt > NativeDialog._ROOT_VIEW_LOADED_TIMEOUT_MS) {\n hmrDialogLog(`restore ${captured.componentName} aborted: no root view after ${NativeDialog._ROOT_VIEW_LOADED_TIMEOUT_MS}ms`);\n abortCapturedDialog(captured);\n return;\n }\n setTimeout(() => this._pollForRootView(captured, componentClass, usingFresh, startedAt), 16);\n }\n\n private _performRestoreOpen(\n captured: CapturedHmrDialog,\n componentClass: ComponentType<unknown>,\n usingFresh: boolean,\n ): void {\n hmrDialogLog(`restore ${captured.componentName} usingFreshClass=${usingFresh}`);\n if (NativeScriptDebug.isLogEnabled() && usingFresh) {\n NativeScriptDebug.hmrLog(`HMR modal restore using fresh class for ${captured.componentName}`);\n }\n\n // Force the restored modal to open without animation so the round-\n // trip looks like an instant content refresh rather than a full\n // close-and-reopen sequence.\n const restoreConfig = buildNonAnimatedRestoreConfig(captured.config);\n\n try {\n const newRef = this.open(componentClass, restoreConfig);\n hmrDialogLog(`restore ${captured.componentName} → opened newRef.id=${newRef?.id ?? 'n/a'}`);\n newRef.afterClosed().subscribe({\n next: (value) => captured.graftAfterClosed(value),\n complete: () => captured.graftAfterClosed(undefined),\n });\n } catch (err) {\n abortCapturedDialog(captured);\n const message = (err as Error)?.message ?? String(err);\n hmrDialogLog(`restore ${captured.componentName} FAILED: ${message}`);\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLogError(`HMR modal restore failed: ${message}`);\n }\n }\n }\n\n /**\n * Test/debug helper: discard any captured modals without restoring them.\n * Mostly useful when projects want to opt out of restoration without\n * recompiling. Public callers should prefer `preserveOnHmr: false` instead.\n */\n static _clearPendingHmrDialogs(): void {\n clearPendingHmrDialogs();\n }\n\n /**\n * Attaches the user-provided component to the already-created dialog container.\n * @param componentOrTemplateRef The type of component being loaded into the dialog,\n * or a TemplateRef to instantiate as the content.\n * @param dialogContainer Reference to the wrapping dialog container.\n * @param overlayRef Reference to the overlay in which the dialog resides.\n * @param config The dialog configuration.\n * @returns A promise resolving to the MatDialogRef that should be returned to the user.\n */\n private _attachDialogContent<T, R>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config: NativeDialogConfig,\n ): NativeDialogRef<T, R> {\n // Create a reference to the dialog we're creating in order to give the user a handle\n // to modify and close it.\n const nativeModalRef = new this._nativeModalType(config, this._injector, this.locationStrategy);\n const dialogRef = new this._dialogRefConstructor(nativeModalRef, config.id);\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n // const detachedFactory = options.resolver.resolveComponentFactory(DetachedLoader);\n // if(options.attachToContainerRef) {\n // detachedLoaderRef = options.attachToContainerRef.createComponent(detachedFactory, 0, childInjector, null);\n // } else {\n // detachedLoaderRef = detachedFactory.create(childInjector); // this DetachedLoader is **completely** detached\n // this.appRef.attachView(detachedLoaderRef.hostView); // we attach it to the applicationRef, so it becomes a \"root\" view in angular's hierarchy\n // }\n // detachedLoaderRef.changeDetectorRef.detectChanges(); // force a change detection\n // detachedLoaderRef.instance.createTemplatePortal(options.templateRef);\n nativeModalRef.attachTemplatePortal(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n new TemplatePortal<T>(componentOrTemplateRef, null!, <any>{ $implicit: config.data, dialogRef }),\n );\n } else {\n const injector = this._createInjector<T>(config, dialogRef);\n const contentRef = nativeModalRef.attachComponentPortal<T>(\n new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector),\n );\n dialogRef.componentInstance = contentRef.instance;\n }\n\n return dialogRef;\n }\n\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the dialog.\n * @param dialogRef Reference to the dialog.\n * @param dialogContainer Dialog container element that wraps all of the contents.\n * @returns The custom injector that can be used inside the dialog.\n */\n private _createInjector<T>(config: NativeDialogConfig, dialogRef: NativeDialogRef<T>): Injector {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n\n // The dialog container should be provided as the dialog container and the dialog's\n // content are created out of the same `ViewContainerRef` and as such, are siblings\n // for injector purposes. To allow the hierarchy that is expected, the dialog\n // container is explicitly provided in the injector.\n const providers: StaticProvider[] = [\n { provide: this._dialogDataToken, useValue: config.data },\n { provide: this._dialogRefConstructor, useValue: dialogRef },\n ];\n\n return Injector.create({ parent: userInjector || this._injector, providers });\n }\n\n /**\n * Removes a dialog from the array of open dialogs.\n * @param dialogRef Dialog to be removed.\n */\n private _removeOpenDialog(dialogRef: NativeDialogRef<any>) {\n const index = this.openDialogs.indexOf(dialogRef);\n\n if (index > -1) {\n this.openDialogs.splice(index, 1);\n this._openDialogMetadata.delete(dialogRef);\n\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this._getAfterAllClosed().next();\n }\n }\n }\n\n /** Closes all of the dialogs in an array. */\n private _closeDialogs(dialogs: NativeDialogRef<any>[]) {\n let i = dialogs.length;\n\n while (i--) {\n // The `_openDialogs` property isn't updated after close until the rxjs subscription\n // runs on the next microtask, in addition to modifying the array as we're going\n // through it. We loop through all of them and call close without assuming that\n // they'll be removed from the list instantaneously.\n dialogs[i].close();\n }\n }\n}\n\n/**\n * Applies default options to the dialog config.\n * @param config Config to be modified.\n * @param defaultOptions Default options provided.\n * @returns The new configuration object.\n */\nfunction _applyConfigDefaults(config?: NativeDialogConfig, defaultOptions?: NativeDialogConfig): NativeDialogConfig {\n return { ...defaultOptions, ...config };\n}\n\n/**\n * Register `NativeDialog` with the application's HMR eager-instantiate\n * registry so the post-bootstrap pipeline forces an `injector.get()` on\n * the service in the same JS task as the bootstrap event. Without this,\n * `NativeDialog` is only constructed when something in user-app code\n * injects it (typically a wrapper service that opens modals). When that\n * injection happens lazily — on first user-driven modal open — captured\n * dialogs from a prior HMR cycle wait until the user reopens *something*\n * before the new realm even sees the stash. Eager instantiation makes\n * the restore work happen as early as possible during a hot reload while\n * staying gated to dev mode + HMR-active environments.\n *\n * Registered after the class declaration so the closure references the\n * fully-defined class rather than tripping the temporal dead zone.\n *\n * Idempotent: the registry de-dupes function references, so multiple\n * evaluations of this module across HMR cycles never accumulate stale\n * registrations.\n */\nif (isAngularHmrEnabled()) {\n const added = registerHmrEagerInstantiator((injector: Injector) => {\n try {\n const inst = injector.get(NativeDialog, null);\n hmrDialogDiag(`eager-instantiator fired NativeDialog=${inst ? `instance#${(inst as unknown as { _diagInstanceId?: number })._diagInstanceId}` : 'null'}`);\n } catch (err) {\n hmrDialogDiag(`eager-instantiator threw: ${(err as Error)?.message ?? err}`);\n // Some user-app providers may not include `NativeDialog` (e.g. a\n // module that doesn't depend on the dialog feature). The registry\n // contract is \"best effort\": failing to find the token must be a\n // silent no-op so unrelated apps aren't penalized.\n }\n });\n hmrDialogDiag(`registerHmrEagerInstantiator added=${added} (false means already present in registry)`);\n}\n\nexport {\n /**\n * @deprecated Use `NativeDialog` instead.\n */\n NativeDialog as NativeDialogService,\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { Directive, ElementRef, HostListener, inject, Input, OnChanges, OnInit, Optional, SimpleChanges } from '@angular/core';\nimport { View, ViewBase } from '@nativescript/core';\nimport { NativeDialogRef } from './dialog-ref';\nimport { NativeDialog } from './dialog-services';\n\n/**\n * Button that will close the current dialog.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[native-dialog-close], [nativeDialogClose]',\n exportAs: 'nativeDialogClose',\n standalone: true,\n})\nexport class NativeDialogCloseDirective implements OnInit, OnChanges {\n /** Dialog close input. */\n @Input('native-dialog-close') dialogResult: any;\n\n @Input('nativeDialogClose') _matDialogClose: any;\n dialogRef = inject(NativeDialogRef<any>, { optional: true });\n _elementRef = inject(ElementRef<View>);\n _dialog = inject(NativeDialog);\n\n ngOnInit() {\n if (!this.dialogRef) {\n // When this directive is included in a dialog via TemplateRef (rather than being\n // in a Component), the DialogRef isn't available via injection because embedded\n // views cannot be given a custom injector. Instead, we look up the DialogRef by\n // ID. This must occur in `onInit`, as the ID binding for the dialog container won't\n // be resolved at constructor time.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const proxiedChange = changes['_matDialogClose'] || changes['_matDialogCloseResult'];\n\n if (proxiedChange) {\n this.dialogResult = proxiedChange.currentValue;\n }\n }\n\n @HostListener('tap')\n _onButtonClick() {\n // Determinate the focus origin using the click event, because using the FocusMonitor will\n // result in incorrect origins. Most of the time, close buttons will be auto focused in the\n // dialog, and therefore clicking the button won't result in a focus change. This means that\n // the FocusMonitor won't detect any origin change, and will always output `program`.\n this.dialogRef.close(this.dialogResult);\n }\n}\n\n/**\n * Finds the closest MatDialogRef to an element by looking at the DOM.\n * @param element Element relative to which to look for a dialog.\n * @param openDialogs References to the currently-open dialogs.\n */\nfunction getClosestDialog(element: ElementRef<View>, openDialogs: NativeDialogRef<any>[]) {\n let view: ViewBase | null = element.nativeElement.parent;\n\n while (view && !Object.hasOwnProperty.call(view, '__ng_modal_id__')) {\n view = view.parent;\n }\n\n return view ? openDialogs.find((dialog) => dialog.id === view['__ng_modal_id__']) : null;\n}\n","import { NgModule } from '@angular/core';\nimport { NativeDialogCloseDirective } from './dialog-content-directives';\n\n/**\n * Convenience module that re-exports the `NativeDialogCloseDirective` for\n * template-driven `[nativeDialogClose]` usage.\n *\n * **Important**: `NativeDialog` itself is **not** listed in this module's\n * `providers` array. The service is `@Injectable({ providedIn: 'root' })`,\n * which already registers a single root-level instance and is fully\n * tree-shakeable. Listing it here as well caused Angular to treat the\n * module-level provider and the `providedIn: 'root'` factory as\n * *separate* registrations once the module was pulled into a standalone\n * app via `importProvidersFrom(NativeDialogModule, ...)`. The duplicate\n * registration triggered:\n *\n * - Two `NativeDialog` instances in the same root environment injector,\n * each subscribing to `postAngularBootstrap$`, which produced\n * duplicate restore attempts during HMR.\n * - `NG0200: Circular dependency detected for NativeDialog` while a\n * captured modal was being re-opened during HMR restore, because the\n * second resolution started while the first was still in progress.\n *\n * Removing the redundant entry collapses both providers back into a\n * single root-level instance, which is what `providedIn: 'root'`\n * documents. App authors who explicitly wire `NativeDialog` themselves\n * (e.g. in a feature module's `providers`) keep working unchanged\n * because they're targeting the same class symbol.\n */\n@NgModule({\n imports: [NativeDialogCloseDirective],\n exports: [NativeDialogCloseDirective],\n})\nexport class NativeDialogModule {}\n","import { Injectable } from '@angular/core';\nimport { knownFolders, Folder, File } from '@nativescript/core';\n\n// Allows greater flexibility with `file-system` and Angular\n// Also provides a way for `file-system` to be mocked for testing\n\n@Injectable()\nexport class NSFileSystem {\n public currentApp(): Folder {\n return knownFolders.currentApp();\n }\n\n public fileFromPath(path: string): File {\n return File.fromPath(path);\n }\n\n public fileExists(path: string): boolean {\n return File.exists(path);\n }\n}\n","import { ApplicationRef, ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, Injector, TemplateRef, Type, ViewContainerRef } from '@angular/core';\nimport { ContentView } from '@nativescript/core';\nimport { DetachedLoader } from './cdk/detached-loader';\nimport { ComponentPortal, NativeScriptDomPortalOutlet, TemplatePortal } from './cdk/portal';\nimport { NgViewRef } from './view-refs';\n\n/**\n * creates a DetachedLoader either linked to the ViewContainerRef or the ApplicationRef if ViewContainerRef is not defined\n * @param resolver component factory resolver\n * @param injector default injector, unused if viewContainerRef is set\n * @param viewContainerRef where the view should live in the angular tree\n * @returns reference to the DetachedLoader\n */\nexport function generateDetachedLoader(resolver: ComponentFactoryResolver, injector: Injector, viewContainerRef?: ViewContainerRef) {\n injector = viewContainerRef?.injector || injector;\n const detachedFactory = resolver.resolveComponentFactory(DetachedLoader);\n const detachedLoaderRef = viewContainerRef?.createComponent(detachedFactory) || detachedFactory.create(injector);\n if (!viewContainerRef) {\n injector.get(ApplicationRef).attachView(detachedLoaderRef.hostView);\n }\n detachedLoaderRef.changeDetectorRef.detectChanges();\n return detachedLoaderRef;\n}\n\n/**\n * Generates a NgViewRef from a component or template. @see NgViewRef\n * Pass keepNativeViewAttached as `true` if you don't want the first native view to be detached from its parent.\n * For opening modals and others, the firstNativeLikeView should be detached.\n * @param typeOrTemplate ComponentType or TemplateRef that should be instanced\n * @param options options for creating the view\n * @returns NgViewRef\n */\nexport function generateNativeScriptView<T>(\n typeOrTemplate: Type<T> | TemplateRef<T>,\n options: {\n resolver?: ComponentFactoryResolver;\n viewContainerRef?: ViewContainerRef;\n injector: Injector;\n keepNativeViewAttached?: boolean;\n /**\n * reuse a detachedLoaderRef. This will override viewContainerRef\n */\n detachedLoaderRef?: ComponentRef<DetachedLoader>;\n }\n) {\n let detachedLoaderRef: ComponentRef<DetachedLoader> = options.detachedLoaderRef;\n const reusingDetachedLoader = !!detachedLoaderRef;\n if (reusingDetachedLoader) {\n options.viewContainerRef = detachedLoaderRef.instance.vc;\n }\n const injector = options.viewContainerRef?.injector || options.injector;\n const resolver = options.resolver || injector.get(ComponentFactoryResolver);\n if (!detachedLoaderRef && (options.viewContainerRef || typeOrTemplate instanceof TemplateRef)) {\n detachedLoaderRef = generateDetachedLoader(resolver, injector, options.viewContainerRef);\n }\n let portal: ComponentPortal<T> | TemplatePortal<T>;\n if (typeOrTemplate instanceof TemplateRef) {\n portal = new TemplatePortal(typeOrTemplate, detachedLoaderRef.instance.vc);\n } else {\n portal = new ComponentPortal(typeOrTemplate, detachedLoaderRef?.instance.vc);\n }\n const parentView = new ContentView();\n const portalOutlet = new NativeScriptDomPortalOutlet(parentView, resolver, injector.get(ApplicationRef), injector);\n const componentOrTemplateRef: ComponentRef<T> | EmbeddedViewRef<T> = portalOutlet.attach(portal);\n componentOrTemplateRef.onDestroy(() => {\n portalOutlet.dispose();\n });\n if (detachedLoaderRef && !reusingDetachedLoader) {\n componentOrTemplateRef.onDestroy(() => {\n detachedLoaderRef.destroy();\n });\n }\n const viewRef = new NgViewRef(componentOrTemplateRef);\n (viewRef as any).detachedLoaderRef = detachedLoaderRef;\n if (!options.keepNativeViewAttached) {\n viewRef.detachNativeLikeView();\n }\n return viewRef;\n}\n","/**\n * Framework-agnostic Hot-Module-Replacement state cache.\n *\n * The {@link HmrCacheStore} class is intentionally free of any Angular\n * imports so a future `@nativescript/solid` (or any other framework\n * binding) can lift this file as-is and wrap it with its own DI\n * primitive. The Angular DI wrapper lives in\n * `./hmr-cache.service.ts`.\n *\n * # What it does\n *\n * The NativeScript iOS runtime exposes a Vite-spec compliant\n * `import.meta.hot` on every imported module (see\n * `@nativescript/ios` →\n * `runtime/HMRSupport.{h,mm}::InitializeImportMetaHot`). The runtime\n * keeps a per-module persistent `data` object alive in C++ across V8\n * evaluation cycles and canonicalizes the module path so the same\n * bucket survives the URL variations Vite cycles through during a\n * save (HMR boot/live tags, versioned bridge paths, common script\n * extensions). When `@nativescript/vite`'s Angular HMR client calls\n * `globalThis.__nsRunHmrDispose()` before `__reboot_ng_modules__`,\n * every registered `dispose(cb)` fires and is handed the same `data`\n * object the next module evaluation will read from.\n *\n * `HmrCacheStore` rides on top of that primitive:\n *\n * 1. On construction, it copies any previously-stashed entries out\n * of `import.meta.hot.data['ns-hmr-cache']` (or whatever\n * `storageKey` the caller picked) into an in-memory `Map`.\n * 2. It registers a single `import.meta.hot.dispose` callback that\n * writes the in-memory `Map` back as a plain object before the\n * next reboot.\n * 3. Every `set` re-orders the key to the end of the `Map` (LRU);\n * when `size > maxEntries`, the oldest entry is evicted. This\n * stops a long dev session from accumulating unbounded state for\n * features the developer no longer touches.\n * 4. It subscribes to a custom HMR event (default\n * `'ns:cache-invalidate'`) so a Vite plugin or dev server can\n * push targeted cache evictions — e.g. \"the OData schema for\n * `/safety/forms` changed, drop anything that depends on it\".\n *\n * In production / `--no-hmr` builds `import.meta.hot` is `undefined`,\n * the store collapses to a pure in-memory cache that lives for the\n * lifetime of the process, and the public API is identical so callers\n * never need to special-case build modes.\n *\n * # Why a class and not a plain object\n *\n * Encapsulating the LRU bookkeeping behind named methods (`get`,\n * `set`, `invalidate`, `scope`) lets us evolve the eviction policy\n * (e.g. add TTLs, weighted entries, structured-clone enforcement)\n * without touching every call site. The framework wrappers expose\n * the same surface so app authors learn one API regardless of which\n * framework they use.\n */\n\nconst DEFAULT_MAX_ENTRIES = 256;\nconst DEFAULT_STORAGE_KEY = 'ns-hmr-cache';\nconst DEFAULT_INVALIDATE_EVENT = 'ns:cache-invalidate';\n\n/**\n * Minimal Vite-spec `import.meta.hot` shape — declared locally so the\n * package builds and types-checks without depending on `vite/client`\n * (which would be a phantom dep for webpack-only consumers and a\n * fragile assumption for contributors who don't have vite hoisted into\n * their `node_modules`). The full Vite spec is much larger; we only\n * type the methods we actually call.\n *\n * Compatible-by-construction with `vite/client`'s richer\n * `ViteHotContext` — apps that DO reference `vite/client` get the\n * superset and continue to work; we just don't require it.\n */\ninterface NsHotContext {\n readonly data: Record<string, unknown>;\n dispose: (cb: (data: Record<string, unknown>) => void) => void;\n on?: (event: string, cb: (payload: unknown) => void) => void;\n}\n\n/**\n * Read `import.meta.hot` defensively so the package compiles even\n * under TypeScript configs that don't extend an `ImportMeta` interface\n * with a `hot` field. The cast goes through `unknown` so the local\n * type is the only one in play; `vite/client`-aware apps still get\n * their own typing on `import.meta.hot` at every call site outside\n * this module.\n *\n * Webpack-CommonJS compatibility: every `import.meta` reference here\n * is a member expression (`import.meta['hot']`). Webpack statically\n * rewrites both dot- and bracket-style member access to `undefined`\n * in CommonJS output, so the emitted bundle never carries a literal\n * bare `import.meta` token. A bare `import.meta` would survive into\n * the bundle and crash V8 with \"Cannot use 'import.meta' outside a\n * module\" the moment the chunk is `require()`d. Vite leaves\n * `import.meta['hot']` intact and resolves it to the per-module hot\n * context, so the same code works in both pipelines.\n */\nfunction readImportMetaHot(): NsHotContext | undefined {\n try {\n return (import.meta as unknown as { hot?: NsHotContext })['hot'];\n } catch {\n return undefined;\n }\n}\n\nexport interface HmrCacheStoreOptions {\n /**\n * Maximum number of entries to keep before LRU-evicting the\n * oldest. Set to `0` (or any non-positive number) for unlimited.\n * Default: `256`.\n *\n * Sized for the empirical \"depth of features a developer touches in\n * one dev session\" — large enough that a working set of ~30 pages,\n * each with a handful of cached fields, never trips eviction during\n * normal hacking; small enough that a runaway producer (e.g. a\n * scroll-driven loop that mints new keys) gets capped instead of\n * leaking memory until the simulator OOMs.\n */\n maxEntries?: number;\n /**\n * Key under which the cache is stashed on `import.meta.hot.data`.\n * Apps that run multiple isolated cache stores (e.g. a feature-\n * isolation plugin) can pick distinct keys to keep their state\n * separate. Default: `'ns-hmr-cache'`.\n */\n storageKey?: string;\n /**\n * Custom HMR event name the store listens for. Payload schema:\n *\n * ```ts\n * { key?: string }\n * ```\n *\n * If `key` is provided, only that entry is dropped. If omitted, the\n * entire cache is cleared. A Vite plugin sends events via the dev\n * server's WebSocket (Vite spec\n * [`server.ws.send`](https://vite.dev/guide/api-plugin.html#server-ws-send-and-server-ws-on));\n * the runtime's `__NS_DISPATCH_HOT_EVENT__` then forwards them to\n * every `import.meta.hot.on` listener. Default:\n * `'ns:cache-invalidate'`.\n */\n invalidateEventName?: string;\n /**\n * Optional logger for diagnostic output. The store calls this with\n * a single string per significant event (rehydrate, dispose, LRU\n * evict, server-side invalidate). Default: no-op.\n */\n log?: (message: string) => void;\n}\n\n/**\n * A namespaced view of an {@link HmrCacheStore}. Keys are\n * automatically prefixed with `<scope>:`, so callers don't have to\n * negotiate global key names. Returned by {@link HmrCacheStore.scope}.\n */\nexport interface HmrCacheScope {\n readonly prefix: string;\n get<T>(key: string): T | undefined;\n set<T>(key: string, value: T): void;\n has(key: string): boolean;\n delete(key: string): void;\n /** Drop every entry whose key starts with this scope's prefix. */\n clear(): void;\n /** Number of entries owned by this scope. */\n size(): number;\n}\n\nexport class HmrCacheStore {\n private readonly _map: Map<string, unknown>;\n private readonly _maxEntries: number;\n private readonly _log: (message: string) => void;\n\n /**\n * @param initialEntries Entries to seed the store with (typically\n * the previous session's snapshot read from\n * `import.meta.hot.data`).\n * @param options See {@link HmrCacheStoreOptions}.\n */\n constructor(\n initialEntries: Iterable<[string, unknown]> = [],\n options: HmrCacheStoreOptions = {}\n ) {\n this._map = new Map(initialEntries);\n const requested = options.maxEntries;\n this._maxEntries =\n typeof requested === 'number' && requested > 0\n ? Math.floor(requested)\n : 0;\n this._log = options.log ?? (() => {});\n // Trim seed if it overshoots the configured ceiling — possible if\n // a previous session ran with a larger `maxEntries` than this one.\n this._enforceMaxEntries();\n }\n\n get<T>(key: string): T | undefined {\n if (!this._map.has(key)) {\n return undefined;\n }\n // LRU touch: re-insert so the entry moves to the end of the\n // insertion-order Map.\n const value = this._map.get(key);\n this._map.delete(key);\n this._map.set(key, value);\n return value as T;\n }\n\n set<T>(key: string, value: T): void {\n if (this._map.has(key)) {\n // Delete-then-set keeps insertion order monotonic.\n this._map.delete(key);\n }\n this._map.set(key, value);\n this._enforceMaxEntries();\n }\n\n has(key: string): boolean {\n return this._map.has(key);\n }\n\n delete(key: string): void {\n this._map.delete(key);\n }\n\n /**\n * Drop a specific entry, or every entry when `key` is omitted.\n * Equivalent to {@link delete} (with key) or {@link clear} (without)\n * — exposed as a single method so callers and event handlers can\n * forward an optional key without branching.\n */\n invalidate(key?: string): void {\n if (key === undefined || key === null) {\n this.clear();\n return;\n }\n this.delete(key);\n }\n\n /** Drop every cached entry. */\n clear(): void {\n this._map.clear();\n }\n\n /** Total number of cached entries across all scopes. */\n size(): number {\n return this._map.size;\n }\n\n /** Snapshot of every key currently in the cache. */\n keys(): string[] {\n return Array.from(this._map.keys());\n }\n\n /**\n * Returns a namespaced view of this store. All keys passed to the\n * returned object are auto-prefixed with `<prefix>:`. Useful so\n * each feature module can avoid stomping on neighbours' keys\n * without repeating the prefix at every call site.\n *\n * @example\n * ```ts\n * const cache = createDefaultHmrCacheStore();\n * const submissions = cache.scope('page-my-submissions');\n * submissions.set('items', [...]); // stored under 'page-my-submissions:items'\n * ```\n */\n scope(prefix: string): HmrCacheScope {\n if (!prefix) {\n throw new Error('[HmrCacheStore] scope() requires a non-empty prefix');\n }\n const fullPrefix = `${prefix}:`;\n const parent = this;\n return {\n prefix: fullPrefix,\n get<T>(key: string): T | undefined {\n return parent.get<T>(fullPrefix + key);\n },\n set<T>(key: string, value: T): void {\n parent.set<T>(fullPrefix + key, value);\n },\n has(key: string): boolean {\n return parent.has(fullPrefix + key);\n },\n delete(key: string): void {\n parent.delete(fullPrefix + key);\n },\n clear(): void {\n for (const k of parent.keys()) {\n if (k.startsWith(fullPrefix)) {\n parent.delete(k);\n }\n }\n },\n size(): number {\n let n = 0;\n for (const k of parent.keys()) {\n if (k.startsWith(fullPrefix)) {\n n++;\n }\n }\n return n;\n },\n };\n }\n\n /**\n * Serialize every entry into a plain object suitable for stashing\n * on `import.meta.hot.data`. Used by the dispose callback in\n * {@link createDefaultHmrCacheStore} and re-exported for callers\n * that want to integrate with another persistence layer (e.g. a\n * test harness that snapshots between cases).\n */\n toObject(): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [k, v] of this._map.entries()) {\n out[k] = v;\n }\n return out;\n }\n\n private _enforceMaxEntries(): void {\n if (this._maxEntries <= 0) {\n return;\n }\n while (this._map.size > this._maxEntries) {\n const oldestKey = this._map.keys().next().value;\n if (oldestKey === undefined) {\n return;\n }\n this._map.delete(oldestKey);\n this._log(\n `[HmrCacheStore] evicted oldest key=\"${oldestKey}\" (size now ${this._map.size}/${this._maxEntries})`\n );\n }\n }\n}\n\n/**\n * Build an {@link HmrCacheStore} bound to the current module's\n * `import.meta.hot` context — i.e. the store's data survives HMR\n * reboots and listens for the `'ns:cache-invalidate'` custom event.\n *\n * Caller responsibility: invoke this from the module that \"owns\" the\n * cache. `import.meta` is per-module, so the dispose callback will be\n * registered against whichever module physically calls this function.\n * In `@nativescript/angular` the canonical owner is\n * `hmr-cache.service.ts`; in `@nativescript/solid` it would be the\n * equivalent solid-side module.\n *\n * Returns a freshly-constructed store. Callers should treat it as a\n * singleton — calling this twice from the same module yields two\n * independent stores, which is almost never what you want.\n */\nexport function createDefaultHmrCacheStore(\n options: HmrCacheStoreOptions = {}\n): HmrCacheStore {\n const storageKey = options.storageKey ?? DEFAULT_STORAGE_KEY;\n const invalidateEventName =\n options.invalidateEventName ?? DEFAULT_INVALIDATE_EVENT;\n const maxEntries = options.maxEntries ?? DEFAULT_MAX_ENTRIES;\n const log = options.log ?? (() => {});\n\n const hot = readImportMetaHot();\n\n // Read previous session's snapshot (if any) and seed the store.\n const previousSnapshot = ((hot?.data as Record<string, unknown> | undefined)\n ?.[storageKey] ?? {}) as Record<string, unknown>;\n const previousEntries = Object.entries(previousSnapshot);\n\n const store = new HmrCacheStore(previousEntries, {\n maxEntries,\n storageKey,\n invalidateEventName,\n log,\n });\n\n if (hot) {\n if (previousEntries.length) {\n log(\n `[HmrCacheStore] rehydrated ${previousEntries.length} entr${\n previousEntries.length === 1 ? 'y' : 'ies'\n } from previous HMR session (storageKey=\"${storageKey}\")`\n );\n }\n // Stash the live store back on dispose so the next reboot finds\n // exactly what's in memory right now.\n hot.dispose((data) => {\n const snapshot = store.toObject();\n (data as Record<string, unknown>)[storageKey] = snapshot;\n log(\n `[HmrCacheStore] dispose stashed ${Object.keys(snapshot).length} entr${\n Object.keys(snapshot).length === 1 ? 'y' : 'ies'\n } (storageKey=\"${storageKey}\")`\n );\n });\n // Listen for server-side invalidation events. Vite plugins push\n // these via `server.ws.send({ type: 'custom', event: 'ns:cache-invalidate', data: { key? } })`.\n // The HMR client forwards them to `import.meta.hot.on`. If the\n // runtime doesn't expose `on` (older `@nativescript/ios`), this\n // is a clean no-op.\n if (typeof hot.on === 'function') {\n hot.on(invalidateEventName, (payload: { key?: string } | undefined) => {\n const targetKey = payload?.key;\n store.invalidate(targetKey);\n log(\n targetKey\n ? `[HmrCacheStore] server-side invalidate dropped key=\"${targetKey}\"`\n : `[HmrCacheStore] server-side invalidate cleared all entries`\n );\n });\n }\n }\n\n return store;\n}\n","import { Injectable } from '@angular/core';\nimport {\n createDefaultHmrCacheStore,\n HmrCacheScope,\n HmrCacheStore,\n HmrCacheStoreOptions,\n} from './hmr-cache-store';\nimport { isAngularHmrEnabled } from './hmr-environment';\nimport { NativeScriptDebug } from './trace';\n\n/**\n * Skip the API call your component already paid for last save.\n *\n * Inject {@link HmrCacheService} from any Angular component or service\n * to read and write a per-app key/value cache that **survives the\n * `__reboot_ng_modules__` cycle** triggered by every HMR file save.\n * Backed by `@nativescript/ios`'s native `import.meta.hot.data`\n * (`runtime/HMRSupport.{h,mm}`) and drained via\n * `@nativescript/vite`'s `globalThis.__nsRunHmrDispose()` hook before\n * Angular tears down its realm, so the same value the previous\n * component instance produced is handed straight to the freshly-\n * instantiated one — no network round-trip, no spinner flash.\n *\n * In production / `--no-hmr` builds `import.meta.hot` is `undefined`\n * and the cache collapses to a plain in-memory object that lives for\n * the lifetime of the process. The public API is identical, so callers\n * never need to special-case build modes.\n *\n * @example Skip the initial fetch on save\n * ```ts\n * import { HmrCacheService } from '@nativescript/angular';\n *\n * @Component({...})\n * export class MyComponent implements OnInit {\n * private hmrCache = inject(HmrCacheService);\n *\n * ngOnInit() {\n * const cached = this.hmrCache.get<MyResult>('my-feature:items');\n * if (cached) {\n * this.applyResult(cached);\n * return;\n * }\n * this.api.load().subscribe((result) => {\n * this.hmrCache.set('my-feature:items', result);\n * this.applyResult(result);\n * });\n * }\n * }\n * ```\n *\n * @example Namespaced via {@link scope}\n * ```ts\n * private cache = inject(HmrCacheService).scope('page-my-submissions');\n * // …\n * this.cache.set('items', items); // → 'page-my-submissions:items'\n * this.cache.get('items'); // ← 'page-my-submissions:items'\n * ```\n *\n * @example Server-side invalidation from a Vite plugin\n * ```ts\n * // vite.config.ts\n * export default defineConfig({\n * plugins: [\n * {\n * name: 'my-schema-watcher',\n * configureServer(server) {\n * server.watcher.on('change', (path) => {\n * if (path.endsWith('schema.json')) {\n * server.ws.send({\n * type: 'custom',\n * event: 'ns:cache-invalidate',\n * data: { key: 'my-feature:items' },\n * });\n * }\n * });\n * },\n * },\n * ],\n * });\n * ```\n *\n * Memory ceiling: the cache LRU-evicts at 256 entries by default. Pass\n * a custom ceiling via {@link configureHmrCache} if your app churns\n * through more keys than that in a typical dev session, or set `0` for\n * unlimited (unbounded growth — only safe for short-lived dev work).\n *\n * @see HmrCacheStore — the framework-agnostic engine. Stable enough to\n * lift into `@nativescript/solid` / other framework bindings without\n * modification.\n */\n@Injectable({ providedIn: 'root' })\nexport class HmrCacheService {\n private readonly _store = getOrCreateSharedStore();\n\n /**\n * `true` when `import.meta.hot` is wired (i.e. NativeScript Vite HMR\n * is active and `@nativescript/ios` is recent enough to expose\n * `import.meta.hot.data`). `false` in production / `--no-hmr` /\n * legacy webpack builds.\n *\n * Most callers should NOT branch on this — the public API works\n * identically in both cases. Use it only when you want to opt OUT\n * of caching in production (e.g. always fetch fresh data when not\n * developing).\n */\n readonly isHmr: boolean = isAngularHmrEnabled() && hasImportMetaHot();\n\n get<T>(key: string): T | undefined {\n return this._store.get<T>(key);\n }\n\n set<T>(key: string, value: T): void {\n this._store.set<T>(key, value);\n }\n\n has(key: string): boolean {\n return this._store.has(key);\n }\n\n delete(key: string): void {\n this._store.delete(key);\n }\n\n /**\n * Drop a single entry, or every entry when `key` is omitted. Same\n * shape as the `'ns:cache-invalidate'` HMR-event payload the store\n * listens for, so application code can call this directly to mirror\n * a server-side eviction.\n */\n invalidate(key?: string): void {\n this._store.invalidate(key);\n }\n\n /** Drop every cached entry. Equivalent to `invalidate()` with no key. */\n clear(): void {\n this._store.clear();\n }\n\n /** Total number of entries across every scope. */\n size(): number {\n return this._store.size();\n }\n\n /** Snapshot of every key currently cached. Useful for debug overlays. */\n keys(): string[] {\n return this._store.keys();\n }\n\n /**\n * Returns a namespaced view of the cache. All `get` / `set` /\n * `has` / `delete` calls on the returned object are auto-prefixed\n * with `<scopeName>:`. Recommended over global keys so feature\n * modules don't accidentally collide.\n *\n * @example\n * ```ts\n * private cache = inject(HmrCacheService).scope('page-my-submissions');\n * // …\n * this.cache.set('items', items); // → 'page-my-submissions:items'\n * ```\n */\n scope(scopeName: string): HmrCacheScope {\n return this._store.scope(scopeName);\n }\n}\n\n/**\n * Override the default cache configuration. Must be called BEFORE the\n * first injection of {@link HmrCacheService} (i.e. before Angular\n * bootstrap, or as the very first statement in `main.ts`); otherwise\n * the call is a no-op because the singleton store has already been\n * built with the previous (or default) options.\n *\n * Typical use case: bumping `maxEntries` for a large multi-feature\n * monorepo dev session, or pointing a custom `invalidateEventName` at\n * a Vite plugin that prefixes its events with the project name.\n *\n * Returns `true` if the configuration was applied, `false` if the\n * store had already been instantiated by an earlier injection.\n */\nexport function configureHmrCache(options: HmrCacheStoreOptions): boolean {\n if (sharedStore !== null) {\n return false;\n }\n pendingOptions = options;\n return true;\n}\n\n/**\n * Read-only access to the underlying {@link HmrCacheStore}. Exposed\n * for advanced integrations that want to reuse the LRU + dispose +\n * server-side-invalidate plumbing without going through Angular's\n * dependency injection (e.g. a non-component utility that's loaded\n * before the Angular platform has bootstrapped). Application code\n * should prefer {@link HmrCacheService}.\n */\nexport function getHmrCacheStore(): HmrCacheStore {\n return getOrCreateSharedStore();\n}\n\nlet sharedStore: HmrCacheStore | null = null;\nlet pendingOptions: HmrCacheStoreOptions | null = null;\n\nfunction getOrCreateSharedStore(): HmrCacheStore {\n if (sharedStore !== null) {\n return sharedStore;\n }\n const options: HmrCacheStoreOptions = {\n log: (msg) => {\n // Keep cache diagnostics on the same channel as other HMR\n // helpers so devs can grep one trace category and see the full\n // picture during a save cycle. NativeScriptDebug.bootstrapLog\n // is the conventional sink for HMR-adjacent lifecycle logs.\n try {\n NativeScriptDebug.bootstrapLog(msg);\n } catch {\n // Defensive: never crash the cache if the trace channel is\n // unavailable (e.g. tests that import this file in isolation).\n }\n },\n ...pendingOptions,\n };\n sharedStore = createDefaultHmrCacheStore(options);\n pendingOptions = null;\n return sharedStore;\n}\n\nfunction hasImportMetaHot(): boolean {\n try {\n // Member-expression access only — webpack rewrites `import.meta['hot']`\n // to `undefined` in CommonJS bundles (so `!!undefined` → `false`),\n // while Vite leaves it as the per-module hot context. A bare\n // `typeof import.meta` would survive into the bundle and crash V8\n // with \"Cannot use 'import.meta' outside a module\" on `require()`.\n return !!(import.meta as unknown as { hot?: unknown })['hot'];\n } catch {\n return false;\n }\n}\n\n// Re-export the engine types so consumers don't have to dig into the\n// internal sub-path. Mirror this in the `public_api.ts` barrel.\nexport {\n createDefaultHmrCacheStore,\n HmrCacheScope,\n HmrCacheStore,\n HmrCacheStoreOptions,\n};\n","import { ControlValueAccessor } from '@angular/forms';\nimport { View, unsetValue } from '@nativescript/core';\n\nimport { isBlank } from '../../utils/lang-facade';\n\nexport class BaseValueAccessor<TView extends View> implements ControlValueAccessor {\n private pendingChangeNotification: any = 0;\n onChange: (change: any) => void = () => {\n //\n };\n onTouched = () => {\n //\n };\n\n constructor(public view: TView) {}\n\n registerOnChange(fn: (_: any) => void): void {\n this.onChange = (arg) => {\n if (this.pendingChangeNotification) {\n clearTimeout(this.pendingChangeNotification);\n }\n this.pendingChangeNotification = setTimeout(() => {\n this.pendingChangeNotification = 0;\n fn(arg);\n }, 20);\n };\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.view.isEnabled = !isDisabled;\n }\n\n writeValue(_: any) {\n //\n }\n\n protected normalizeValue(value: any): any {\n return isBlank(value) ? unsetValue : value;\n }\n}\n","import { Directive, ElementRef, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { View } from '@nativescript/core';\nimport { BaseValueAccessor } from './base-value-accessor';\n\nconst TEXT_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TextValueAccessor),\n multi: true,\n};\n\nexport type TextView = { text: string } & View;\n\n/**\n * The accessor for writing a text and listening to changes that is used by the\n * {@link NgModel} directives.\n *\n * ### Example\n * ```\n * <TextField [(ngModel)]=\"model.test\">\n * ```\n */\n@Directive({\n selector:\n 'TextField[ngModel],TextField[formControlName],TextField[formControl],' +\n 'textField[ngModel],textField[formControlName],textField[formControl],' +\n 'textfield[ngModel],textfield[formControlName],textfield[formControl],' +\n 'text-field[ngModel],text-field[formControlName],text-field[formControl],' +\n 'TextView[ngModel],TextView[formControlName],TextView[formControl],' +\n 'textView[ngModel],textView[formControlName],textView[formControl],' +\n 'textview[ngModel],textview[formControlName],textview[formControl],' +\n 'text-view[ngModel],text-view[formControlName],text-view[formControl],' +\n 'SearchBar[ngModel],SearchBar[formControlName],SearchBar[formControl],' +\n 'searchBar[ngModel],searchBar[formControlName],searchBar[formControl],' +\n 'searchbar[ngModel],searchbar[formControlName],searchbar[formControl],' +\n 'search-bar[ngModel], search-bar[formControlName],search-bar[formControl]',\n providers: [TEXT_VALUE_ACCESSOR],\n host: {\n '(blur)': 'onTouched()',\n '(textChange)': 'onChange($event.value)',\n },\n})\nexport class TextValueAccessor extends BaseValueAccessor<TextView> {\n // tslint:disable-line:directive-class-suffix\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n writeValue(value: any): void {\n const normalized = super.normalizeValue(value ? `${value}` : value);\n this.view.text = normalized;\n }\n}\n","import { Directive, ElementRef, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Switch } from '@nativescript/core';\nimport { BaseValueAccessor } from './base-value-accessor';\n\nconst CHECKED_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CheckedValueAccessor),\n multi: true,\n};\n\n/**\n * The accessor for setting a checked property and listening to changes that is used by the\n * {@link NgModel} directives.\n *\n * ### Example\n * ```\n * <Switch [(ngModel)]=\"model.test\">\n * ```\n */\n@Directive({\n selector: 'Switch[ngModel],Switch[formControlName],Switch[formControl],' + 'switch[ngModel],switch[formControlName],switch[formControl]',\n providers: [CHECKED_VALUE_ACCESSOR],\n host: {\n '(checkedChange)': 'onChange($event.value)',\n },\n})\nexport class CheckedValueAccessor extends BaseValueAccessor<Switch> {\n // tslint:disable-line:directive-class-suffix\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n writeValue(value: any): void {\n const normalized = super.normalizeValue(value);\n this.view.checked = normalized;\n }\n}\n","import { Directive, ElementRef, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DatePicker } from '@nativescript/core';\nimport { BaseValueAccessor } from './base-value-accessor';\n\nconst DATE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateValueAccessor),\n multi: true,\n};\n\n/**\n * The accessor for setting a date and listening to changes that is used by the\n * {@link NgModel} directives.\n *\n * ### Example\n * ```\n * <DatePicker [(ngModel)]=\"model.test\">\n * ```\n */\n@Directive({\n selector: 'DatePicker[ngModel],DatePicker[formControlName],DatePicker[formControl],' + 'datepicker[ngModel],datepicker[formControlName],datepicker[formControl],' + 'datePicker[ngModel],datePicker[formControlName],datePicker[formControl],' + 'date-picker[ngModel],date-picker[formControlName],date-picker[formControl]',\n providers: [DATE_VALUE_ACCESSOR],\n host: {\n '(dateChange)': 'onChange($event.value)',\n },\n})\nexport class DateValueAccessor extends BaseValueAccessor<DatePicker> {\n // tslint:disable-line:directive-class-suffix\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n writeValue(value: any): void {\n const normalized = super.normalizeValue(value);\n this.view.date = normalized;\n }\n}\n","import { Directive, ElementRef, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TimePicker } from '@nativescript/core';\nimport { BaseValueAccessor } from './base-value-accessor';\n\nconst TIME_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TimeValueAccessor),\n multi: true,\n};\n\n/**\n * The accessor for setting a time and listening to changes that is used by the\n * {@link NgModel} directives.\n *\n * ### Example\n * ```\n * <TimePicker [(ngModel)]=\"model.test\">\n * ```\n */\n@Directive({\n selector: 'TimePicker[ngModel],TimePicker[formControlName],TimePicker[formControl],' + 'timepicker[ngModel],timepicker[formControlName],timepicker[formControl],' + 'timePicker[ngModel],timePicker[formControlName],timePicker[formControl],' + 'time-picker[ngModel],time-picker[formControlName],time-picker[formControl]',\n providers: [TIME_VALUE_ACCESSOR],\n host: {\n '(timeChange)': 'onChange($event.value)',\n },\n})\nexport class TimeValueAccessor extends BaseValueAccessor<TimePicker> {\n // tslint:disable-line:directive-class-suffix\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n writeValue(value: any): void {\n const normalized = super.normalizeValue(value);\n this.view.time = normalized;\n }\n}\n","import { Directive, ElementRef, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Slider } from '@nativescript/core';\nimport { BaseValueAccessor } from './base-value-accessor';\n\nconst NUMBER_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumberValueAccessor),\n multi: true,\n};\n\n/**\n * The accessor for setting a value and listening to changes that is used by the\n * {@link NgModel}\n *\n * ### Example\n * ```\n * <Slider [(ngModel)]=\"model.test\">\n * ```\n */\n@Directive({\n selector: 'Slider[ngModel],Slider[formControlName],Slider[formControl],' + 'slider[ngModel],slider[formControlName],slider[formControl]',\n providers: [NUMBER_VALUE_ACCESSOR],\n host: {\n '(valueChange)': 'onChange($event.value)',\n },\n})\nexport class NumberValueAccessor extends BaseValueAccessor<Slider> {\n // tslint:disable-line:directive-class-suffix\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n writeValue(value: any): void {\n const normalized = super.normalizeValue(value);\n this.view.value = normalized;\n }\n}\n","import { Directive, ElementRef, forwardRef, AfterViewInit } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { View } from '@nativescript/core';\nimport { BaseValueAccessor } from './base-value-accessor';\n\nconst SELECTED_INDEX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectedIndexValueAccessor),\n multi: true,\n};\n\nexport type SelectableView = { selectedIndex: number } & View;\n\n/**\n * The accessor for setting a selectedIndex and listening to changes that is used by the\n * {@link NgModel} directives.\n *\n * ### Example\n * ```\n * <SegmentedBar [(ngModel)]=\"model.test\">\n * ```\n */\n@Directive({\n selector:\n 'SegmentedBar[ngModel],SegmentedBar[formControlName],SegmentedBar[formControl],' +\n 'segmentedBar[ngModel],segmentedBar[formControlName],segmentedBar[formControl],' +\n 'segmentedbar[ngModel],segmentedbar[formControlName],segmentedbar[formControl],' +\n 'segmented-bar[ngModel],segmented-bar[formControlName],segmented-bar[formControl],' +\n 'ListPicker[ngModel],ListPicker[formControlName],ListPicker[formControl],' +\n 'listPicker[ngModel],listPicker[formControlName],listPicker[formControl],' +\n 'listpicker[ngModel],listpicker[formControlName],listpicker[formControl],' +\n 'list-picker[ngModel],list-picker[formControlName],list-picker[formControl],' +\n 'TabView[ngModel],TabView[formControlName],TabView[formControl],' +\n 'tabView[ngModel],tabView[formControlName],tabView[formControl],' +\n 'tabview[ngModel],tabview[formControlName],tabview[formControl],' +\n 'tab-view[ngModel],tab-view[formControlName],tab-view[formControl]',\n providers: [SELECTED_INDEX_VALUE_ACCESSOR],\n host: {\n '(selectedIndexChange)': 'onChange($event.value)',\n },\n})\nexport class SelectedIndexValueAccessor extends BaseValueAccessor<SelectableView> implements AfterViewInit {\n // tslint:disable-line:max-line-length directive-class-suffix\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n private value: number;\n private viewInitialized: boolean;\n\n writeValue(value: any): void {\n const normalized = super.normalizeValue(value);\n this.value = normalized;\n\n if (this.viewInitialized) {\n this.view.selectedIndex = this.value;\n }\n }\n\n ngAfterViewInit() {\n this.viewInitialized = true;\n this.view.selectedIndex = this.value;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { TextValueAccessor, CheckedValueAccessor, DateValueAccessor, TimeValueAccessor, NumberValueAccessor, SelectedIndexValueAccessor } from './value-accessors';\n\nexport * from './value-accessors';\n\n@NgModule({\n providers: [],\n imports: [FormsModule, TextValueAccessor, CheckedValueAccessor, DateValueAccessor, TimeValueAccessor, SelectedIndexValueAccessor, NumberValueAccessor],\n exports: [FormsModule, TextValueAccessor, CheckedValueAccessor, DateValueAccessor, TimeValueAccessor, SelectedIndexValueAccessor, NumberValueAccessor],\n})\nexport class NativeScriptFormsModule {}\n","import { KeyframeAnimation, KeyframeAnimationInfo, KeyframeDeclaration, KeyframeInfo, parseKeyframeDeclarations, animationTimingFunctionConverter } from '@nativescript/core';\n\nexport type Keyframe = Map<string, string | number> & { offset: number };\n\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nexport function dashCaseToCamelCase(input: string): string {\n return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());\n}\n\nexport function createKeyframeAnimation(styles: Keyframe[], duration: number, delay: number, easing: string): KeyframeAnimation {\n const info = createKeyframeAnimationInfo(styles, duration, delay, easing);\n return KeyframeAnimation.keyframeAnimationFromInfo(info);\n}\n\nconst createKeyframeAnimationInfo = (styles: Keyframe[], duration: number, delay: number, easing: string): KeyframeAnimationInfo => ({\n isForwards: true,\n duration: duration || 0.01,\n delay,\n curve: getCurve(easing),\n keyframes: styles.map(parseAnimationKeyframe),\n});\n\nconst getCurve = (value: string) => animationTimingFunctionConverter(value);\n\nconst parseAnimationKeyframe = (styles: Keyframe): KeyframeInfo => ({\n duration: getKeyframeDuration(styles),\n declarations: getDeclarations(styles),\n});\n\nconst getKeyframeDuration = (styles: Keyframe): number => styles.offset;\n\nfunction getDeclarations(styles: Keyframe): KeyframeDeclaration[] {\n const keys = Array.from(styles.keys());\n const unparsedDeclarations: KeyframeDeclaration[] = keys.map((property) => ({ property, value: styles.get(property) }));\n\n return parseKeyframeDeclarations(unparsedDeclarations);\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-disable @typescript-eslint/no-unsafe-function-type */\nimport { AnimationPlayer } from '@angular/animations';\nimport { View, EventData, KeyframeAnimation } from '@nativescript/core';\n\nimport { Keyframe, createKeyframeAnimation } from './utils';\nimport { NgView } from '../views/view-types';\nimport { NativeScriptDebug } from '../trace';\n\nexport class NativeScriptAnimationPlayer implements AnimationPlayer {\n public parentPlayer: AnimationPlayer = null;\n\n private _startSubscriptions: Function[] = [];\n private _doneSubscriptions: Function[] = [];\n private _finished = false;\n private _started = false;\n private animation: KeyframeAnimation;\n\n constructor(\n private target: NgView,\n keyframes: Keyframe[],\n private duration: number,\n private delay: number,\n easing: string,\n ) {\n this.initKeyframeAnimation(keyframes, duration, delay, easing);\n }\n\n get totalTime(): number {\n return this.delay + this.duration;\n }\n\n init(): void {}\n\n hasStarted(): boolean {\n return this._started;\n }\n\n onStart(fn: Function): void {\n this._startSubscriptions.push(fn);\n }\n onDone(fn: Function): void {\n this._doneSubscriptions.push(fn);\n }\n onDestroy(fn: Function): void {\n this._doneSubscriptions.push(fn);\n }\n\n play(): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationPlayer.play`);\n }\n\n if (!this.animation) {\n return;\n }\n\n if (!this._started) {\n this._started = true;\n this._startSubscriptions.forEach((fn) => fn());\n this._startSubscriptions = [];\n }\n\n // When this issue https://github.com/NativeScript/NativeScript/issues/7984 is fixes in @nativescript/core\n // we can change this fix and apply the one that is recommended in that issue.\n if (this.target.isLoaded) {\n this.playAnimation();\n } else {\n this.target.on(View.loadedEvent, this.onTargetLoaded.bind(this));\n }\n }\n\n private onTargetLoaded(args: EventData) {\n this.target.off(View.loadedEvent, this.onTargetLoaded);\n this.playAnimation();\n }\n\n private playAnimation() {\n this.animation\n .play(this.target)\n .then(() => this.onFinish())\n .catch((_e) => {});\n }\n\n pause(): void {}\n\n finish(): void {\n this.onFinish();\n }\n\n reset(): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationPlayer.reset`);\n }\n\n if (this.animation && this.animation.isPlaying) {\n this.animation.cancel();\n }\n }\n\n restart(): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationPlayer.restart`);\n }\n\n this.reset();\n this.play();\n }\n\n destroy(): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationPlayer.destroy`);\n }\n this.onFinish();\n }\n\n setPosition(_p: any): void {\n throw new Error('AnimationPlayer.setPosition method is not supported!');\n }\n\n getPosition(): number {\n return 0;\n }\n\n private initKeyframeAnimation(keyframes: Keyframe[], duration: number, delay: number, easing: string) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationPlayer.initKeyframeAnimation`);\n }\n\n this.animation = createKeyframeAnimation(keyframes, duration, delay, easing);\n }\n\n private onFinish() {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationPlayer.onFinish`);\n }\n\n if (this._finished) {\n return;\n }\n\n this._finished = true;\n this._started = false;\n this._doneSubscriptions.forEach((fn) => fn());\n this._doneSubscriptions = [];\n }\n}\n","import { AnimationPlayer } from '@angular/animations';\nimport { AnimationDriver } from '@angular/animations/browser';\nimport { ProxyViewContainer, eachDescendant, CssAnimationProperty, CSSHelper } from '@nativescript/core';\n\nimport { NativeScriptAnimationPlayer } from './animation-player';\nimport { Keyframe, dashCaseToCamelCase } from './utils';\nimport { InvisibleNode } from '../views/invisible-nodes';\nimport { NgView } from '../views/view-types';\nimport { NativeScriptDebug } from '../trace';\n\ninterface ViewMatchResult {\n found: boolean;\n}\n\ninterface ViewMatchParams {\n originalView: NgView;\n}\n\ninterface QueryParams {\n selector: Selector;\n multi: boolean;\n}\n\ninterface QueryResult {\n matches: NgView[];\n}\n\nclass Selector {\n private nsSelectors: Array<any>;\n private classSelectors: string[];\n\n constructor(rawSelector: string) {\n this.parse(rawSelector);\n }\n\n match(element: NgView): boolean {\n return this.nsSelectorMatch(element) || this.classSelectorsMatch(element);\n }\n\n private parse(rawSelector: string) {\n const selectors = rawSelector.split(',').map((s) => s.trim());\n\n this.nsSelectors = selectors.map(CSSHelper.createSelector);\n this.classSelectors = selectors.filter((s) => s.startsWith('.')).map((s) => s.substring(1));\n }\n\n private nsSelectorMatch(element: NgView) {\n return this.nsSelectors.some((s) => s.match(element));\n }\n\n private classSelectorsMatch(element: NgView) {\n return this.classSelectors.some((s) => this.hasClass(element, s));\n }\n\n // we're using that instead of match for classes\n // that are dynamically added by the animation engine\n // such as .ng-trigger, that's added for every :enter view\n private hasClass(element: NgView, cls: string) {\n return element && element['$$classes'] && element['$$classes'][cls];\n }\n}\n\nexport class NativeScriptAnimationDriver implements AnimationDriver {\n private static validProperties = [...CssAnimationProperty._getPropertyNames(), 'transform'];\n\n getParentElement(element: NgView): NgView {\n return element?.parent as NgView;\n }\n\n validateStyleProperty(property: string): boolean {\n NativeScriptDebug.animationsLog(`CssAnimationProperty.validateStyleProperty: ${property}`);\n return NativeScriptAnimationDriver.validProperties.indexOf(property) !== -1;\n }\n\n matchesElement(element: NgView, rawSelector: string): boolean {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationDriver.matchesElement ` + `element: ${element}, selector: ${rawSelector}`);\n\n const selector = this.makeSelector(rawSelector);\n return selector.match(element);\n }\n\n containsElement(elm1: NgView, elm2: NgView): boolean {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationDriver.containsElement ` + `element1: ${elm1}, element2: ${elm2}`);\n\n // Checking if the parent is our fake body object\n if (elm1['isOverride']) {\n return true;\n }\n\n const params: ViewMatchParams = { originalView: elm2 };\n const result: ViewMatchResult = this.visitDescendants(elm1, viewMatches, params);\n\n return result.found;\n }\n\n query(element: NgView, rawSelector: string, multi: boolean): NgView[] {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationDriver.query ` + `element: ${element}, selector: ${rawSelector} ` + `multi: ${multi}`);\n\n const selector = this.makeSelector(rawSelector);\n const params: QueryParams = { selector, multi };\n const result: QueryResult = this.visitDescendants(element, queryDescendants, params);\n\n return result.matches || [];\n }\n\n computeStyle(element: NgView, prop: string): string {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationDriver.computeStyle ` + `element: ${element}, prop: ${prop}`);\n\n const camelCaseProp = dashCaseToCamelCase(prop);\n return element.style[camelCaseProp];\n }\n\n animate(element: NgView, keyframes: Keyframe[], duration: number, delay: number, easing: string): AnimationPlayer {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationDriver.animate ` + `element: ${element}, keyframes: ${keyframes} ` + `duration: ${duration}, delay: ${delay} ` + `easing: ${easing}`);\n\n return new NativeScriptAnimationPlayer(element, keyframes, duration, delay, easing);\n }\n\n private makeSelector(rawSelector: string): Selector {\n return new Selector(rawSelector);\n }\n\n private visitDescendants(element: NgView, cb: (child: NgView, result: any, params: any) => boolean, cbParams: any): any {\n const result = {};\n // fill the result obj with the result from the callback function\n eachDescendant(element, (child: NgView) => cb(child, result, cbParams));\n\n return result;\n }\n}\n\nfunction viewMatches(element: NgView, result: ViewMatchResult, params: ViewMatchParams): boolean {\n if (element === params.originalView) {\n result.found = true;\n }\n\n return !result.found;\n}\n\nfunction queryDescendants(element: NgView, result: QueryResult, params: QueryParams): boolean {\n if (!result.matches) {\n result.matches = [];\n }\n\n const { selector, multi } = params;\n\n // skip comment and text nodes\n // because they are not actual Views\n // and cannot be animated\n if (element instanceof InvisibleNode || !selector.match(element)) {\n return true;\n }\n\n if (element instanceof ProxyViewContainer) {\n element.eachChild((child: NgView) => {\n result.matches.push(child);\n return true;\n });\n } else {\n result.matches.push(element);\n }\n\n return multi;\n}\n","import { NgModule, Injectable, Inject, NgZone, RendererFactory2, Optional, SkipSelf, ɵChangeDetectionScheduler as ChangeDetectionScheduler, inject } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { AnimationBuilder, ɵBrowserAnimationBuilder as BrowserAnimationBuilder } from '@angular/animations';\n\nimport { AnimationDriver, ɵAnimationRendererFactory as AnimationRendererFactory, ɵAnimationStyleNormalizer as AnimationStyleNormalizer, ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer, ɵAnimationEngine as AnimationEngine } from '@angular/animations/browser';\n\n// import { NativeScriptModule } from \"../nativescript.module\";\nimport { NativeScriptRendererFactory } from '../nativescript-renderer';\nimport { NativeScriptAnimationDriver } from './animation-driver';\nimport { throwIfAlreadyLoaded } from '../utils/general';\nimport { NativeScriptCommonModule } from '../nativescript-common.module';\n\n@Injectable()\nexport class InjectableAnimationEngine extends AnimationEngine {\n // eslint-disable-next-line @angular-eslint/prefer-inject\n constructor(@Inject(DOCUMENT) doc: any, driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {\n super(doc, driver, normalizer);\n }\n}\n\nexport function instantiateSupportedAnimationDriver() {\n return new NativeScriptAnimationDriver();\n}\n\nexport function instantiateRendererFactory(renderer: NativeScriptRendererFactory, engine: AnimationEngine, zone: NgZone) {\n return new AnimationRendererFactory(renderer, engine, zone);\n}\n\nexport function instantiateDefaultStyleNormalizer() {\n return new WebAnimationsStyleNormalizer();\n}\n\n@NgModule({\n imports: [NativeScriptCommonModule],\n providers: [\n {\n provide: AnimationDriver,\n useFactory: instantiateSupportedAnimationDriver,\n },\n { provide: AnimationBuilder, useClass: BrowserAnimationBuilder },\n {\n provide: AnimationStyleNormalizer,\n useFactory: instantiateDefaultStyleNormalizer,\n },\n { provide: AnimationEngine, useClass: InjectableAnimationEngine },\n {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n deps: [NativeScriptRendererFactory, AnimationEngine, NgZone],\n },\n ],\n})\nexport class NativeScriptAnimationsModule {\n // eslint-disable-next-line @angular-eslint/prefer-inject\n constructor(@Optional() @SkipSelf() parentModule: NativeScriptAnimationsModule) {\n // Prevents NativeScriptAnimationsModule from getting imported multiple times\n throwIfAlreadyLoaded(parentModule, 'NativeScriptAnimationsModule');\n }\n}\n","import { path } from '@nativescript/core';\nimport { Observable, Observer } from 'rxjs';\nimport { NSFileSystem } from '../file-system/ns-file-system';\n\nexport type httpResponseFactory<T> = (url: string, body: any, status: number) => T;\nexport type httpErrorFactory = (url: string, body: any, status: number) => any;\n\nexport function isLocalRequest(url: string): boolean {\n return url.indexOf('~') === 0 || url.indexOf('/') === 0;\n}\n\nexport function getAbsolutePath(url: string, nsFileSystem: NSFileSystem): string {\n url = url.replace('~', '').replace('/', '');\n url = path.join(nsFileSystem.currentApp().path, url);\n return url;\n}\n\nexport function processLocalFileRequest<T>(url: string, nsFileSystem: NSFileSystem, successResponse: httpResponseFactory<T>, errorResponse: httpErrorFactory): Observable<T> {\n url = getAbsolutePath(url, nsFileSystem);\n\n // request from local app resources\n return new Observable((observer: Observer<T>) => {\n if (nsFileSystem.fileExists(url)) {\n const localFile = nsFileSystem.fileFromPath(url);\n localFile.readText().then(\n (data) => {\n try {\n const json = JSON.parse(data);\n observer.next(successResponse(url, json, 200));\n observer.complete();\n } catch (error) {\n // Even though the response status was 2xx, this is still an error.\n // The parse error contains the text of the body that failed to parse.\n const errorResult = { error, text: data };\n observer.error(errorResponse(url, errorResult, 200));\n }\n },\n (err: unknown) => {\n observer.error(errorResponse(url, err, 400));\n }\n );\n } else {\n observer.error(errorResponse(url, 'Not Found', 404));\n }\n });\n}\n","import { Injectable } from '@angular/core';\nimport { HttpRequest, HttpEvent, HttpResponse, HttpErrorResponse, HttpXhrBackend } from '@angular/common/http';\nimport { XhrFactory } from '@angular/common';\nimport { Observable } from 'rxjs';\n\nimport { NSFileSystem } from '../file-system/ns-file-system';\nimport { isLocalRequest, processLocalFileRequest } from './http-utils';\n\n@Injectable()\nexport class NsHttpBackEnd extends HttpXhrBackend {\n constructor(xhrFactory: XhrFactory, private nsFileSystem: NSFileSystem) {\n super(xhrFactory);\n }\n\n handle(req: HttpRequest<any>): Observable<HttpEvent<any>> {\n let result: Observable<HttpEvent<any>>;\n\n if (isLocalRequest(req.url)) {\n result = this.handleLocalFileRequest(req.url);\n } else {\n result = super.handle(req);\n }\n\n return result;\n }\n\n private handleLocalFileRequest(url: string): Observable<HttpEvent<any>> {\n return processLocalFileRequest(url, this.nsFileSystem, createSuccessResponse, createErrorResponse);\n }\n}\n\nfunction createSuccessResponse(url: string, body: any, status: number): HttpEvent<any> {\n return new HttpResponse({\n url,\n body,\n status,\n statusText: 'OK',\n });\n}\n\nfunction createErrorResponse(url: string, body: any, status: number): HttpErrorResponse {\n return new HttpErrorResponse({\n url,\n error: body,\n status,\n statusText: 'ERROR',\n });\n}\n","import {\n HttpBackend,\n HttpFeature,\n HttpFeatureKind,\n provideHttpClient,\n withInterceptorsFromDi,\n} from '@angular/common/http';\nimport { makeEnvironmentProviders, NgModule } from '@angular/core';\n\nimport { NSFileSystem } from '../file-system/ns-file-system';\nimport { NsHttpBackEnd } from './ns-http-backend';\n\nexport function provideNativeScriptHttpClient(...features: HttpFeature<HttpFeatureKind>[]) {\n return makeEnvironmentProviders([\n provideHttpClient(...features),\n NSFileSystem,\n NsHttpBackEnd,\n { provide: HttpBackend, useExisting: NsHttpBackEnd },\n ]);\n}\n@NgModule({\n providers: [provideNativeScriptHttpClient(withInterceptorsFromDi())],\n})\nexport class NativeScriptHttpClientModule {}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRoute, NavigationBehaviorOptions, NavigationExtras, Router, UrlTree } from '@angular/router';\nimport { NativeScriptDebug } from '../../trace';\nimport { FrameService } from '../frame.service';\nimport { NSLocationStrategy } from './ns-location-strategy';\nimport { NavigationOptions, Outlet } from './ns-location-utils';\nimport { findTopActivatedRouteNodeForOutlet } from './page-router-outlet-utils';\n\nexport type ExtendedNavigationExtras = NavigationExtras & NavigationOptions;\nexport type ExtendedNavigationBehaviorOptions = NavigationBehaviorOptions & NavigationOptions;\n\nexport interface BackNavigationOptions {\n outlets?: Array<string>;\n relativeTo?: ActivatedRoute | null;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RouterExtensions {\n constructor(public router: Router, public locationStrategy: NSLocationStrategy, public frameService: FrameService) {}\n\n public navigate(commands: any[], extras?: ExtendedNavigationExtras): Promise<boolean> {\n return this.router.navigate(commands, extras);\n }\n\n public navigateByUrl(url: string | UrlTree, options?: ExtendedNavigationBehaviorOptions): Promise<boolean> {\n return this.router.navigateByUrl(url, options);\n }\n\n public back(backNavigationOptions?: BackNavigationOptions) {\n if (backNavigationOptions) {\n this.backOutlets(backNavigationOptions);\n } else {\n this.locationStrategy.back();\n }\n }\n\n public canGoBack(backNavigationOptions?: BackNavigationOptions) {\n let canGoBack = true;\n if (backNavigationOptions) {\n const { outletsToBack, outlets } = this.findOutletsToBack(backNavigationOptions);\n\n if (outletsToBack.length !== outlets.length) {\n NativeScriptDebug.routerError('No outlet found relative to activated route');\n } else {\n outletsToBack.forEach((outletToBack) => {\n if (!this.locationStrategy.canGoBack(outletToBack)) {\n canGoBack = false;\n }\n });\n }\n } else {\n canGoBack = this.locationStrategy.canGoBack();\n }\n\n return canGoBack;\n }\n\n public backToPreviousPage() {\n this.frameService.getFrame().goBack();\n }\n\n public canGoBackToPreviousPage(): boolean {\n return this.frameService.getFrame().canGoBack();\n }\n\n private backOutlets(options: BackNavigationOptions) {\n const { outletsToBack, outlets } = this.findOutletsToBack(options);\n\n if (outletsToBack.length !== outlets.length) {\n NativeScriptDebug.routerError('No outlet found relative to activated route');\n } else {\n outletsToBack.forEach((outletToBack) => {\n if (outletToBack.isPageNavigationBack) {\n NativeScriptDebug.routerError('Attempted to call startGoBack while going back:');\n } else {\n this.locationStrategy.back(outletToBack);\n }\n });\n }\n }\n\n // tslint:disable-next-line:max-line-length\n private findOutletsToBack(options?: BackNavigationOptions): { outletsToBack: Array<Outlet>; outlets: Array<string> } {\n const rootRoute: ActivatedRoute = this.router.routerState.root;\n let outlets = options.outlets;\n let relativeRoute = options.relativeTo || rootRoute;\n\n const relativeRouteOutlet = this.findOutletByRoute(relativeRoute);\n const isNSEmptyOutlet = relativeRouteOutlet && relativeRouteOutlet.isNSEmptyOutlet;\n\n // Lazy named outlet has added 'primary' inner NSEmptyOutlet child.\n // Take parent route when `relativeTo` option points to the outer named outlet.\n if (isNSEmptyOutlet && relativeRoute.outlet !== 'primary') {\n relativeRoute = relativeRoute.parent || relativeRoute;\n }\n\n outlets = outlets || [relativeRoute.outlet];\n\n const outletsToBack = this.findOutletsRecursive([...outlets], relativeRoute);\n\n return { outletsToBack: outletsToBack, outlets: outlets };\n }\n\n // warning, outlets is mutable!\n private findOutletsRecursive(outlets: string[], route?: ActivatedRoute) {\n if (!route || outlets.length === 0) {\n return [];\n }\n const outletsToBack = [];\n if (outlets.some((currentOutlet) => currentOutlet === route.outlet)) {\n const outlet = this.findOutletByRoute(route);\n if (outlet) {\n outlets.splice(outlets.indexOf(route.outlet), 1);\n outletsToBack.push(outlet);\n }\n }\n if (!route.children) {\n return outletsToBack;\n }\n for (let index = 0; index < route.children.length; index++) {\n if (outlets.length === 0) {\n break;\n }\n const currentRoute = route.children[index];\n outletsToBack.push(...this.findOutletsRecursive(outlets, currentRoute));\n }\n return outletsToBack;\n }\n\n private findOutletByRoute(currentRoute: ActivatedRoute): Outlet {\n const currentRouteSnapshop = findTopActivatedRouteNodeForOutlet(currentRoute.snapshot);\n const outletKey = this.locationStrategy.getRouteFullPath(currentRouteSnapshop);\n const outlet = this.locationStrategy.findOutlet(outletKey, currentRouteSnapshop);\n\n return outlet;\n }\n}\n","import { Directive, Input, ElementRef, NgZone, AfterViewInit } from '@angular/core';\nimport { NavigationExtras } from '@angular/router';\nimport { ActivatedRoute, Router, UrlTree } from '@angular/router';\nimport { NavigationTransition } from '@nativescript/core';\nimport { NativeScriptDebug } from '../../trace';\nimport { RouterExtensions } from './router-extensions';\nimport { NavigationOptions } from './ns-location-utils';\n\n// Copied from \"@angular/router/src/config\"\nexport type QueryParamsHandling = 'merge' | 'preserve' | '';\n\n/**\n * The nsRouterLink directive lets you link to specific parts of your app.\n *\n * Consider the following route configuration:\n * ```\n * [{ path: \"/user\", component: UserCmp }]\n * ```\n *\n * When linking to this `User` route, you can write:\n *\n * ```\n * <a [nsRouterLink]=\"[\"/user\"]\">link to user component</a>\n * ```\n *\n * NSRouterLink expects the value to be an array of path segments, followed by the params\n * for that level of routing. For instance `[\"/team\", {teamId: 1}, \"user\", {userId: 2}]`\n * means that we want to generate a link to `/team;teamId=1/user;userId=2`.\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * If the segment begins with `/`, the router will look up the route from the root of the app.\n * If the segment begins with `./`, or doesn\"t begin with a slash, the router will\n * instead look in the current component\"s children for the route.\n * And if the segment begins with `../`, the router will go up one level.\n */\n@Directive({ \n selector: '[nsRouterLink]', \n standalone: true,\n})\nexport class NSRouterLink implements AfterViewInit {\n // tslint:disable-line:directive-class-suffix\n @Input() target: string;\n @Input() queryParams: { [k: string]: any };\n @Input() fragment: string;\n\n @Input() queryParamsHandling: QueryParamsHandling;\n @Input() preserveQueryParams: boolean;\n @Input() preserveFragment: boolean;\n @Input() skipLocationChange: boolean;\n @Input() replaceUrl: boolean;\n\n @Input() clearHistory: boolean;\n @Input() pageTransition: boolean | string | NavigationTransition = true;\n @Input() pageTransitionDuration;\n\n private commands: any[] = [];\n\n constructor(private ngZone: NgZone, private router: Router, private navigator: RouterExtensions, private route: ActivatedRoute, private el: ElementRef) {}\n\n ngAfterViewInit() {\n this.el.nativeElement.on('tap', () => {\n this.ngZone.run(() => {\n this.onTap();\n });\n });\n }\n\n @Input('nsRouterLink')\n set params(data: any[] | string) {\n if (Array.isArray(data)) {\n this.commands = data;\n } else {\n this.commands = [data];\n }\n }\n\n onTap() {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`nsRouterLink.tapped: ${this.commands} ` + `clear: ${this.clearHistory} ` + `transition: ${JSON.stringify(this.pageTransition)} ` + `duration: ${this.pageTransitionDuration}`);\n }\n\n const extras = this.getExtras();\n // this.navigator.navigateByUrl(this.urlTree, extras);\n this.navigator.navigate(this.commands, {\n ...extras,\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n\n private getExtras(): NavigationExtras & NavigationOptions {\n const transition = this.getTransition();\n return {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n\n clearHistory: this.convertClearHistory(this.clearHistory),\n animated: transition.animated,\n transition: transition.transition,\n };\n }\n\n get urlTree(): UrlTree {\n const urlTree = this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`nsRouterLink urlTree created: ${urlTree}`);\n }\n\n return urlTree;\n }\n\n private convertClearHistory(value: boolean | string): boolean {\n return value === true || value === 'true';\n }\n\n private getTransition(): { animated: boolean; transition?: NavigationTransition } {\n let transition: NavigationTransition;\n let animated: boolean;\n\n if (typeof this.pageTransition === 'boolean') {\n animated = this.pageTransition;\n } else if (typeof this.pageTransition === 'string') {\n if (this.pageTransition === 'none' || this.pageTransition === 'false') {\n animated = false;\n } else {\n animated = true;\n transition = {\n name: <string>this.pageTransition,\n };\n }\n } else {\n animated = true;\n transition = <NavigationTransition>this.pageTransition;\n }\n\n const duration = +this.pageTransitionDuration;\n if (!isNaN(duration)) {\n transition = transition || {};\n transition.duration = duration;\n }\n\n return { animated, transition };\n }\n}\n\nfunction attrBoolValue(s: any): boolean {\n return s === '' || !!s;\n}\n","/* tslint:disable:forin */\n// Copied unexported functions from @angular/router/src/url_tree\nimport { UrlTree, UrlSegment, PRIMARY_OUTLET } from '@angular/router';\n// UrlSegmentGroup not exported, just use any.\ntype UrlSegmentGroup = any;\n\nexport function containsTree(container: UrlTree, containee: UrlTree, exact: boolean): boolean {\n if (exact) {\n return equalSegmentGroups(container.root, containee.root);\n } else {\n return containsSegmentGroup(container.root, containee.root);\n }\n}\n\nfunction equalSegmentGroups(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n if (!equalPath(container.segments, containee.segments)) {\n return false;\n }\n if (container.numberOfChildren !== containee.numberOfChildren) {\n return false;\n }\n for (const c in containee.children) {\n if (!container.children[c]) {\n return false;\n }\n if (!equalSegmentGroups(container.children[c], containee.children[c])) {\n return false;\n }\n }\n return true;\n}\n\nfunction containsSegmentGroup(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n return containsSegmentGroupHelper(container, containee, containee.segments);\n}\n\nfunction containsSegmentGroupHelper(container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[]): boolean {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths)) {\n return false;\n }\n if (containee.hasChildren()) {\n return false;\n }\n return true;\n } else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths)) {\n return false;\n }\n for (const c in containee.children) {\n if (!container.children[c]) {\n return false;\n }\n if (!containsSegmentGroup(container.children[c], containee.children[c])) {\n return false;\n }\n }\n return true;\n } else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current)) {\n return false;\n }\n if (!container.children[PRIMARY_OUTLET]) {\n return false;\n }\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n }\n}\n\nexport function equalPath(a: UrlSegment[], b: UrlSegment[]): boolean {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; ++i) {\n if (a[i].path !== b[i].path) {\n return false;\n }\n }\n return true;\n}\n","import { AfterContentInit, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, QueryList, Renderer2 } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { NavigationEnd, Router, UrlTree } from '@angular/router';\nimport { containsTree } from './private-imports/router-url-tree';\n\nimport { NSRouterLink } from './ns-router-link';\n\n/**\n * The NSRouterLinkActive directive lets you add a CSS class to an element when the link\"s route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * <a [nsRouterLink]=\"/user/bob\" [nsRouterLinkActive]=\"active-link\">Bob</a>\n * ```\n *\n * When the url is either \"/user\" or \"/user/bob\", the active-link class will\n * be added to the component. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\n *\n * ```\n * <a [nsRouterLink]=\"/user/bob\" [nsRouterLinkActive]=\"class1 class2\">Bob</a>\n * <a [nsRouterLink]=\"/user/bob\" [nsRouterLinkActive]=\"[\"class1\", \"class2\"]\">Bob</a>\n * ```\n *\n * You can configure NSRouterLinkActive by passing `exact: true`. This will add the\n * classes only when the url matches the link exactly.\n *\n * ```\n * <a [nsRouterLink]=\"/user/bob\" [nsRouterLinkActive]=\"active-link\"\n * [nsRouterLinkActiveOptions]=\"{exact: true}\">Bob</a>\n * ```\n *\n * Finally, you can apply the NSRouterLinkActive directive to an ancestor of a RouterLink.\n *\n * ```\n * <div [nsRouterLinkActive]=\"active-link\" [nsRouterLinkActiveOptions]=\"{exact: true}\">\n * <a [nsRouterLink]=\"/user/jim\">Jim</a>\n * <a [nsRouterLink]=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * This will set the active-link class on the div tag if the url is either \"/user/jim\" or\n * \"/user/bob\".\n *\n * @stable\n */\n@Directive({\n selector: '[nsRouterLinkActive]',\n exportAs: 'routerLinkActive',\n standalone: true,\n})\nexport class NSRouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n // tslint:disable-line:max-line-length directive-class-suffix\n @ContentChildren(NSRouterLink) links: QueryList<NSRouterLink>;\n\n private classes: string[] = [];\n private subscription: Subscription;\n private active = false;\n\n @Input() nsRouterLinkActiveOptions: { exact: boolean } = { exact: false };\n\n constructor(private router: Router, private element: ElementRef, private renderer: Renderer2) {\n this.subscription = router.events.subscribe((s) => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n\n get isActive(): boolean {\n return this.active;\n }\n\n ngAfterContentInit(): void {\n this.links.changes.subscribe(() => this.update());\n this.update();\n }\n\n @Input()\n set nsRouterLinkActive(data: string[] | string) {\n if (Array.isArray(data)) {\n this.classes = <any>data;\n } else {\n this.classes = data.split(' ');\n }\n }\n\n ngOnChanges() {\n this.update();\n }\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n private update(): void {\n if (!this.links) {\n return;\n }\n const hasActiveLinks = this.hasActiveLinks();\n // react only when status has changed to prevent unnecessary dom updates\n if (this.active !== hasActiveLinks) {\n const currentUrlTree = this.router.parseUrl(this.router.url);\n const isActiveLinks = this.reduceList(currentUrlTree, this.links);\n this.classes.forEach((c) => {\n if (isActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n } else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n }\n Promise.resolve(hasActiveLinks).then((active) => (this.active = active));\n }\n\n private reduceList(currentUrlTree: UrlTree, q: QueryList<any>): boolean {\n return q.reduce((res: boolean, link: NSRouterLink) => {\n return res || containsTree(currentUrlTree, link.urlTree, this.nsRouterLinkActiveOptions.exact);\n }, false);\n }\n\n private isLinkActive(router: Router): (link: NSRouterLink) => boolean {\n return (link: NSRouterLink) => router.isActive(link.urlTree, this.nsRouterLinkActiveOptions.exact);\n }\n\n private hasActiveLinks(): boolean {\n return this.links.some(this.isLinkActive(this.router));\n }\n}\n","import {\n ChangeDetectorRef,\n ComponentFactory,\n ComponentFactoryResolver,\n ComponentRef,\n createComponent,\n Directive,\n ElementRef,\n EnvironmentInjector,\n EventEmitter,\n HostAttributeToken,\n inject,\n InjectionToken,\n InjectOptions,\n Injector,\n NgZone,\n OnDestroy,\n Output,\n Type,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n ActivatedRoute,\n ActivatedRouteSnapshot,\n ChildrenOutletContexts,\n Data,\n PRIMARY_OUTLET,\n Router,\n RouterOutletContract,\n} from '@angular/router';\n\nimport { Frame, NavigatedData, NavigationEntry, Page, profile } from '@nativescript/core';\n\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DetachedLoader } from '../../cdk/detached-loader';\nimport { PageService } from '../../cdk/frame-page/page.service';\nimport { registerElement } from '../../element-registry';\nimport { PAGE_FACTORY, PageFactory } from '../../tokens';\nimport { NativeScriptDebug } from '../../trace';\nimport { ViewUtil } from '../../view-util';\nimport { NSLocationStrategy } from './ns-location-strategy';\nimport { defaultNavOptions, Outlet } from './ns-location-utils';\nimport { NSRouteReuseStrategy } from './ns-route-reuse-strategy';\nimport {\n destroyComponentRef,\n findTopActivatedRouteNodeForOutlet,\n loaderRefSymbol,\n pageRouterActivatedSymbol,\n} from './page-router-outlet-utils';\nimport { ExtendedNavigationExtras } from './router-extensions';\n\nfunction zoneWrap<T extends (...args: unknown[]) => unknown>(fn: T): T {\n return typeof Zone === 'undefined' ? fn : Zone.current.wrap(fn, 'angular');\n}\n\nexport class PageRoute {\n activatedRoute: BehaviorSubject<ActivatedRoute>;\n\n constructor(startRoute: ActivatedRoute) {\n this.activatedRoute = new BehaviorSubject(startRoute);\n }\n}\n\nfunction isComponentFactoryResolver(item: any): item is ComponentFactoryResolver {\n return !!item.resolveComponentFactory;\n}\n\nfunction callableOnce<T>(fn: (...args: T[]) => void) {\n let called = false;\n return (...args: T[]) => {\n if (called) {\n return;\n }\n called = true;\n return fn(...args);\n };\n}\n\nexport class DestructibleInjector implements Injector {\n private refs = new Set<any>();\n constructor(\n private destructibleProviders: ProviderSet,\n private parent: Injector,\n ) {}\n get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectOptions): T {\n const ref = this.parent.get(token, notFoundValue, flags);\n\n // if we're skipping ourselves then it's not our responsibility to destroy\n if (!flags?.skipSelf && this.destructibleProviders.has(token)) {\n this.refs.add(ref);\n }\n\n return ref;\n }\n destroy() {\n this.refs.forEach((ref) => {\n if (ref.ngOnDestroy instanceof Function) {\n ref.ngOnDestroy();\n }\n });\n this.refs.clear();\n }\n}\n\ntype ProviderSet = Set<Type<any> | InjectionToken<any>>;\n\nconst routeToString = function (activatedRoute: ActivatedRoute | ActivatedRouteSnapshot): string {\n return activatedRoute.pathFromRoot.join('->');\n};\n\nregisterElement('page-router-outlet', () => Frame);\n// eslint-disable-next-line @angular-eslint/directive-selector\n@Directive({\n selector: 'page-router-outlet',\n standalone: true,\n}) // tslint:disable-line:directive-selector\nexport class PageRouterOutlet implements OnDestroy, RouterOutletContract {\n private parentContexts = inject(ChildrenOutletContexts);\n private location = inject(ViewContainerRef);\n private locationStrategy = inject(NSLocationStrategy);\n private resolver = inject(ComponentFactoryResolver);\n private changeDetector = inject(ChangeDetectorRef);\n private pageFactory = inject<PageFactory>(PAGE_FACTORY);\n private routeReuseStrategy = inject(NSRouteReuseStrategy);\n private ngZone = inject(NgZone);\n private router = inject(Router);\n private environmentInjector = inject(EnvironmentInjector);\n\n // tslint:disable-line:directive-class-suffix\n private activated: ComponentRef<any> | null = null;\n private _activatedRoute: ActivatedRoute | null = null;\n private detachedLoaderFactory: ComponentFactory<DetachedLoader>;\n\n private outlet: Outlet;\n private name: string;\n private isEmptyOutlet: boolean;\n private viewUtil: ViewUtil;\n private frame: Frame;\n // this function is used to clear the outlet cache (clear history)\n // usually it's cleared in `navigatedTo`, but on quick navigation, the event will be fired after angular already added more things to the cache\n // so now we call this if the component is detached or deactivated (meaning it's mid-navigation, before cache manipulation)\n private postNavFunction: () => void;\n\n attachEvents: EventEmitter<unknown> = new EventEmitter();\n detachEvents: EventEmitter<unknown> = new EventEmitter();\n\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('activate') activateEvents = new EventEmitter<any>(); // tslint:disable-line:no-output-rename\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('deactivate') deactivateEvents = new EventEmitter<any>(); // tslint:disable-line:no-output-rename\n\n get isActivated(): boolean {\n return !!this.activated;\n }\n\n get component(): unknown {\n if (!this.activated) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('Outlet is not activated');\n }\n return;\n }\n\n return this.activated.instance;\n }\n get activatedRoute(): ActivatedRoute {\n if (!this.activated) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('Outlet is not activated');\n }\n return;\n }\n\n return this._activatedRoute;\n }\n\n get activatedRouteData(): Data {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n\n constructor() {\n const parentContexts = this.parentContexts;\n const name = inject(new HostAttributeToken('name'), { optional: true });\n const actionBarVisibility = inject(new HostAttributeToken('actionBarVisibility'), { optional: true });\n const isEmptyOutlet = !!inject(new HostAttributeToken('isEmptyOutlet'), { optional: true });\n const resolver = this.resolver;\n const elRef = inject(ElementRef);\n const viewUtil = inject(ViewUtil);\n\n this.isEmptyOutlet = isEmptyOutlet;\n this.frame = elRef.nativeElement;\n this.setActionBarVisibility(actionBarVisibility);\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`PageRouterOutlet.constructor frame: ${this.frame}`);\n }\n\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, <any>this);\n\n this.viewUtil = viewUtil;\n this.detachedLoaderFactory = resolver.resolveComponentFactory(DetachedLoader);\n }\n\n setActionBarVisibility(actionBarVisibility: string): void {\n switch (actionBarVisibility) {\n case 'always':\n case 'never':\n this.frame.actionBarVisibility = actionBarVisibility;\n return;\n\n default:\n this.frame.actionBarVisibility = 'auto';\n }\n }\n\n ngOnDestroy(): void {\n // In the event that the `parentContexts` has changed the outlet\n // via the creation of another outlet, the `onChildOutletDestroyed`\n // will be skipped\n if (this.parentContexts.getContext(this.name)?.outlet === <any>this) {\n // Clear accumulated modal view page cache when page-router-outlet\n // destroyed on modal view closing\n this.parentContexts.onChildOutletDestroyed(this.name);\n }\n\n if (this.outlet) {\n this.outlet.outletKeys.forEach((key) => {\n this.routeReuseStrategy.clearModalCache(key);\n });\n this.locationStrategy.clearOutlet(this.frame);\n } else {\n NativeScriptDebug.routerLog('PageRouterOutlet.ngOnDestroy: no outlet available for page-router-outlet');\n }\n\n if (this.isActivated) {\n const c = this.activated.instance;\n this.activated.hostView.detach();\n destroyComponentRef(this.activated);\n\n this.deactivateEvents.emit(c);\n this.activated = null;\n }\n }\n\n deactivate(): void {\n if (!this.outlet || !this.outlet.isPageNavigationBack) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(\n 'Currently not in page back navigation - component should be detached instead of deactivated.',\n );\n }\n return;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('PageRouterOutlet.deactivate() while going back - should destroy');\n }\n\n if (!this.isActivated) {\n return;\n }\n this.postNavFunction?.();\n\n const c = this.activated.instance;\n destroyComponentRef(this.activated);\n\n this.activated = null;\n this._activatedRoute = null;\n\n this.deactivateEvents.emit(c);\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach(): ComponentRef<any> {\n if (!this.isActivated) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('Outlet is not activated');\n }\n return;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`PageRouterOutlet.detach() - ${routeToString(this._activatedRoute)}`);\n }\n\n this.postNavFunction?.();\n\n // Detach from ChangeDetection\n this.activated.hostView.detach();\n\n const component = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n this.detachEvents.emit(component.instance);\n return component;\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`PageRouterOutlet.attach() - ${routeToString(activatedRoute)}`);\n }\n\n this.activated = ref;\n\n // reattach to ChangeDetection\n this.activated.hostView.markForCheck();\n this.activated.hostView.reattach();\n this._activatedRoute = activatedRoute;\n this.markActivatedRoute(activatedRoute);\n\n // we have a child with the same name, so we don't finish the back nav\n if (this.isFinalPageRouterOutlet()) {\n this.locationStrategy._finishBackPageNavigation(this.frame);\n }\n this.attachEvents.emit(ref.instance);\n }\n\n private isFinalPageRouterOutlet() {\n let children = this.parentContexts.getContext(this.name)?.children;\n while (children) {\n const childContext = children.getContext(this.name);\n if (!childContext || !childContext.outlet) {\n return true;\n }\n if (childContext.outlet instanceof PageRouterOutlet) {\n return false;\n }\n children = childContext.children;\n }\n return true;\n }\n\n /**\n * Called by the Router to instantiate a new component during the commit phase of a navigation.\n * This method in turn is responsible for calling the `routerOnActivate` hook of its child.\n */\n @profile\n activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | EnvironmentInjector | null): void {\n this.outlet = this.outlet || this.getOutlet(activatedRoute.snapshot);\n if (!this.outlet) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerError('No outlet found relative to activated route');\n }\n return;\n }\n\n this.outlet.isNSEmptyOutlet = this.isEmptyOutlet;\n this.locationStrategy.updateOutletFrame(this.outlet, this.frame, this.isEmptyOutlet);\n\n if (this.outlet && this.outlet.isPageNavigationBack) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(\n 'Currently in page back navigation - component should be reattached instead of activated.',\n );\n }\n if (this.isFinalPageRouterOutlet()) {\n this.locationStrategy._finishBackPageNavigation(this.frame);\n }\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`PageRouterOutlet.activateWith() - ${routeToString(activatedRoute)}`);\n }\n\n this._activatedRoute = activatedRoute;\n\n this.markActivatedRoute(activatedRoute);\n\n this.activateOnGoForward(activatedRoute, resolver || this.environmentInjector);\n this.activateEvents.emit(this.activated.instance);\n }\n\n private activateOnGoForward(\n activatedRoute: ActivatedRoute,\n resolverOrInjector: ComponentFactoryResolver | EnvironmentInjector,\n ): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(\n 'PageRouterOutlet.activate() forward navigation - ' + 'create detached loader in the loader container',\n );\n }\n\n const component = this.getComponentType(activatedRoute);\n const page = this.pageFactory({\n isNavigation: true,\n componentType: component,\n });\n const location = this.location;\n\n const destructibles = new Set([PageService]);\n const parentInjector = Injector.create({\n providers: [\n { provide: Page, useValue: page },\n { provide: Frame, useValue: this.frame },\n { provide: PageRoute, useValue: new PageRoute(activatedRoute) },\n { provide: ActivatedRoute, useValue: activatedRoute },\n { provide: ChildrenOutletContexts, useValue: this.parentContexts.getOrCreateContext(this.name).children },\n { provide: PageService, useClass: PageService },\n ],\n parent: location.injector,\n });\n\n const injector = new DestructibleInjector(destructibles, parentInjector);\n let loaderRef: ComponentRef<DetachedLoader>;\n if (isComponentFactoryResolver(resolverOrInjector)) {\n loaderRef = createComponent(DetachedLoader, {\n environmentInjector: this.environmentInjector,\n elementInjector: injector,\n });\n } else {\n const environmentInjector = resolverOrInjector;\n loaderRef = location.createComponent(DetachedLoader, { index: location.length, injector, environmentInjector });\n }\n loaderRef.onDestroy(() => injector.destroy());\n this.changeDetector.markForCheck();\n\n this.activated = loaderRef.instance.loadComponentInLocation(component);\n this.activated.changeDetectorRef.detectChanges();\n this.loadComponentInPage(page, this.activated, { activatedRoute });\n\n this.activated[loaderRefSymbol] = loaderRef;\n }\n\n @profile\n private loadComponentInPage(page: Page, componentRef: ComponentRef<any>, navigationContext): void {\n // Component loaded. Find its root native view.\n const componentView = componentRef.location.nativeElement;\n // Remove it from original native parent.\n this.viewUtil.removeChild(componentView.parent, componentView);\n // Add it to the new page\n this.viewUtil.appendChild(page, componentView);\n\n let topActivatedRoute = findTopActivatedRouteNodeForOutlet(this._activatedRoute.snapshot);\n let outletKey = this.locationStrategy.getRouteFullPath(topActivatedRoute);\n const thisRouteKey = outletKey;\n while (!this.locationStrategy.findOutlet(outletKey)) {\n topActivatedRoute = topActivatedRoute.parent;\n if (!topActivatedRoute) {\n NativeScriptDebug.routerError('Could not find outlet for route: ' + thisRouteKey);\n break;\n }\n outletKey = this.locationStrategy.getRouteFullPath(topActivatedRoute);\n }\n const navigatedFromCallback = zoneWrap((args: NavigatedData) => {\n if (args.isBackNavigation) {\n this.locationStrategy._beginBackPageNavigation(this.frame, outletKey);\n this.locationStrategy.back(null, this.frame);\n }\n });\n // TODO: experiment with using NgZone instead of global above\n // const navigatedFromCallback = (args: NavigatedData) => {\n // \tif (args.isBackNavigation) {\n // this.ngZone.run(() => {\n // this.locationStrategy._beginBackPageNavigation(this.frame);\n // this.locationStrategy.back(null, this.frame);\n // });\n // \t}\n // };\n\n page.on(Page.navigatedFromEvent, navigatedFromCallback);\n componentRef.onDestroy(() => {\n if (page) {\n page.off(Page.navigatedFromEvent, navigatedFromCallback);\n page = null;\n }\n });\n\n const navOptions = {\n ...defaultNavOptions,\n ...(this.router.getCurrentNavigation().extras || {}),\n } as ExtendedNavigationExtras;\n this.locationStrategy._beginPageNavigation(this.frame, navOptions);\n const isReplace = navOptions.replaceUrl && !navOptions.clearHistory;\n\n const currentRoute = this.activatedRoute;\n // Clear refCache if navigation with clearHistory\n if (navOptions.clearHistory) {\n this.outlet.outletKeys.forEach((key) => this.routeReuseStrategy.markCacheForClear(key));\n const wipeCache = callableOnce(() => {\n if (this.postNavFunction === wipeCache) {\n this.postNavFunction = null;\n }\n if (this.outlet && this.activatedRoute === currentRoute) {\n // potential alternative fix (only fix children of the current outlet)\n // const nests = outletKey.split('/');\n // this.outlet.outletKeys.filter((k) => k.split('/').length >= nests.length).forEach((key) => this.routeReuseStrategy.clearCache(key));\n this.outlet.outletKeys.forEach((key) => this.routeReuseStrategy.clearMarkedCache(key));\n }\n });\n this.postNavFunction = wipeCache;\n const clearCallback = () =>\n setTimeout(() => {\n wipeCache();\n });\n\n page.once(Page.navigatedToEvent, clearCallback);\n } else if (navOptions.replaceUrl) {\n this.outlet.outletKeys.forEach((key) => this.routeReuseStrategy.markCacheForPop(key));\n const popCache = callableOnce(() => {\n if (this.postNavFunction === popCache) {\n this.postNavFunction = null;\n }\n if (this.outlet && this.activatedRoute === currentRoute) {\n // potential alternative fix (only fix children of the current outlet)\n // const nests = outletKey.split('/');\n // this.outlet.outletKeys.filter((k) => k.split('/').length >= nests.length).forEach((key) => this.routeReuseStrategy.popCache(key));\n this.outlet.outletKeys.forEach((key) => this.routeReuseStrategy.clearMarkedCache(key));\n }\n });\n this.postNavFunction = popCache;\n const clearCallback = () =>\n setTimeout(() => {\n popCache();\n });\n\n page.once(Page.navigatedToEvent, clearCallback);\n }\n\n const navigationEntry: NavigationEntry = {\n create() {\n return page;\n },\n context: navigationContext,\n clearHistory: navOptions.clearHistory,\n animated: navOptions.animated,\n transition: navOptions.transition,\n };\n\n if (isReplace && this.frame.currentPage) {\n this.frame.replacePage(navigationEntry);\n } else {\n this.frame.navigate(navigationEntry);\n }\n }\n\n // Find and mark the top activated route as an activated one.\n // In ns-location-strategy we are reusing components only if their corresponing routes\n // are marked as activated from this method.\n private markActivatedRoute(activatedRoute: ActivatedRoute) {\n const queue = [];\n queue.push(activatedRoute.snapshot);\n let currentRoute = queue.shift();\n\n while (currentRoute) {\n currentRoute.children.forEach((childRoute) => {\n queue.push(childRoute);\n });\n\n const topActivatedRoute = findTopActivatedRouteNodeForOutlet(currentRoute);\n const outletKey = this.locationStrategy.getRouteFullPath(topActivatedRoute);\n const outlet = this.locationStrategy.findOutlet(outletKey, topActivatedRoute);\n\n if (outlet && outlet.frames.length) {\n topActivatedRoute[pageRouterActivatedSymbol] = true;\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('Activated route marked as page: ' + routeToString(topActivatedRoute));\n }\n }\n\n currentRoute = queue.shift();\n }\n }\n\n private getComponentType(activatedRoute: ActivatedRoute): Type<any> {\n return activatedRoute.routeConfig.component || activatedRoute.component;\n }\n\n private getOutlet(activatedRouteSnapshot: ActivatedRouteSnapshot): Outlet {\n const topActivatedRoute = findTopActivatedRouteNodeForOutlet(activatedRouteSnapshot);\n const outletKey = this.locationStrategy.getRouteFullPath(topActivatedRoute);\n let outlet = this.locationStrategy.findOutlet(outletKey, topActivatedRoute);\n\n // Named lazy loaded outlet.\n if (!outlet && this.isEmptyOutlet) {\n const parentOutletKey = this.locationStrategy.getRouteFullPath(topActivatedRoute.parent);\n outlet = this.locationStrategy.findOutlet(parentOutletKey, topActivatedRoute.parent);\n\n if (outlet) {\n outlet.outletKeys.push(outletKey);\n }\n }\n\n return outlet;\n }\n}\n","import { NSLocationStrategy } from './ns-location-strategy';\nimport { PlatformLocation, LocationChangeListener } from '@angular/common';\nimport { Injectable } from '@angular/core';\nimport { NativeScriptDebug } from '../../trace';\n\n@Injectable()\nexport class NativescriptPlatformLocation extends PlatformLocation {\n readonly hostname: string;\n readonly href: string;\n readonly port: string;\n readonly protocol: string;\n\n constructor(private locationStrategy: NSLocationStrategy) {\n super();\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NativescriptPlatformLocation.constructor()');\n }\n }\n\n getState(): any {\n return undefined;\n }\n\n getBaseHrefFromDOM(): string {\n return '/';\n }\n\n onPopState(fn: LocationChangeListener): VoidFunction {\n this.locationStrategy.onPopState(fn);\n return () => {\n //\n };\n }\n\n onHashChange(_fn: LocationChangeListener): VoidFunction {\n return () => {\n //\n };\n }\n\n get search(): string {\n return '';\n }\n get hash(): string {\n return '';\n }\n get pathname(): string {\n return this.locationStrategy.path();\n }\n set pathname(_newPath: string) {\n throw new Error('NativescriptPlatformLocation set pathname - not implemented');\n }\n\n pushState(state: any, title: string, url: string): void {\n this.locationStrategy.pushState(state, title, url, null);\n }\n\n replaceState(state: any, title: string, url: string): void {\n this.locationStrategy.replaceState(state, title, url, null);\n }\n\n forward(): void {\n throw new Error('NativescriptPlatformLocation.forward() - not implemented');\n }\n\n back(): void {\n this.locationStrategy.back();\n }\n}\n","import { Component, ViewChild } from '@angular/core';\nimport { Page } from '@nativescript/core';\nimport { PageRouterOutlet } from './page-router-outlet';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'ns-empty-outlet',\n template: \"<page-router-outlet isEmptyOutlet='true'></page-router-outlet>\",\n imports: [PageRouterOutlet],\n})\nexport class NSEmptyOutletComponent {\n @ViewChild(PageRouterOutlet, { read: PageRouterOutlet, static: false }) pageRouterOutlet: PageRouterOutlet;\n constructor(private page: Page) {\n if (this.page) {\n this.page.actionBarHidden = true;\n\n this.page.on('loaded', () => {\n if (this.pageRouterOutlet && this.page.frame) {\n this.pageRouterOutlet.setActionBarVisibility(this.page.frame.actionBarVisibility);\n }\n });\n }\n }\n}\n","type AngularBootstrapRouteLike = {\n children?: AngularBootstrapRouteLike[];\n};\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n if (!value || typeof value !== 'object') {\n return false;\n }\n\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\nfunction shouldStripRouteKey(key: string): boolean {\n return key.startsWith('_') || key.startsWith('ɵ');\n}\n\nfunction cloneRouteValue(value: unknown): unknown {\n if (Array.isArray(value)) {\n return value.slice();\n }\n\n if (isPlainObject(value)) {\n return { ...value };\n }\n\n return value;\n}\n\nfunction cloneBootstrapRoute<T extends object>(route: T): T {\n const next: AngularBootstrapRouteLike = {};\n\n for (const [key, value] of Object.entries(route as Record<string, unknown>)) {\n if (shouldStripRouteKey(key)) {\n continue;\n }\n\n if (key === 'children' && Array.isArray(value)) {\n next.children = cloneRoutesForBootstrap(value);\n continue;\n }\n\n next[key] = cloneRouteValue(value);\n }\n\n return next as T;\n}\n\nexport function cloneRoutesForBootstrap<T extends object>(routes: T[] | undefined | null): T[] {\n if (!Array.isArray(routes)) {\n return [];\n }\n\n return routes.map((route) => cloneBootstrapRoute(route));\n}","type AngularHmrRouteState = {\n url: string;\n source: string;\n timestamp: number;\n};\n\nconst CURRENT_ROUTE_KEY = '__NS_ANGULAR_HMR_CURRENT_ROUTE__';\nconst PENDING_START_PATH_KEY = '__NS_ANGULAR_HMR_PENDING_START_PATH__';\nconst CAPTURE_ROUTE_KEY = '__NS_CAPTURE_ANGULAR_HMR_ROUTE__';\n// Stack of normalized URLs that mirrors Angular Router's back-stack while the\n// app is running, and is snapshotted into `PENDING_HISTORY_KEY` when an HMR\n// reboot is about to fire. After the new module bootstraps, the router replay\n// hook walks the stack to rebuild the back-stack so users keep their back\n// navigation across HMR cycles.\nconst HISTORY_KEY = '__NS_ANGULAR_HMR_ROUTE_HISTORY__';\nconst PENDING_HISTORY_KEY = '__NS_ANGULAR_HMR_PENDING_HISTORY__';\n// Window flag set while the new bootstrap is mid-replay of a captured route\n// stack. User-app code can consult this to skip default navigations that\n// would otherwise stomp the route the framework is restoring (e.g. a\n// bottom-nav component that defaults to its first tab on init when no\n// signal-backed selection exists).\nconst RESTORING_KEY = '__NS_ANGULAR_HMR_RESTORING_ROUTE__';\nconst RESTORING_TARGET_KEY = '__NS_ANGULAR_HMR_RESTORING_ROUTE_TARGET__';\n\nfunction getGlobalState(): any {\n return globalThis as any;\n}\n\nfunction readHistoryArray(key: string): string[] {\n const g = getGlobalState();\n const raw = g[key];\n return Array.isArray(raw) ? (raw.filter((entry) => typeof entry === 'string') as string[]) : [];\n}\n\nfunction writeHistoryArray(key: string, history: string[]): void {\n const g = getGlobalState();\n if (history.length > 0) {\n g[key] = history.slice();\n } else {\n delete g[key];\n }\n}\n\nexport function normalizeAngularHmrRouteUrl(value: unknown): string | null {\n if (typeof value !== 'string') {\n return null;\n }\n\n const trimmed = value.trim();\n if (!trimmed) {\n return null;\n }\n\n if (trimmed.startsWith('/')) {\n return trimmed;\n }\n\n if (trimmed.startsWith('?') || trimmed.startsWith('#')) {\n return `/${trimmed}`;\n }\n\n return `/${trimmed.replace(/^\\/+/, '')}`;\n}\n\nexport function writeAngularHmrRouteState(\n value: unknown,\n options: {\n pending?: boolean;\n source: string;\n },\n): string | null {\n const url = normalizeAngularHmrRouteUrl(value);\n if (!url) {\n return null;\n }\n\n const state: AngularHmrRouteState = {\n url,\n source: options.source,\n timestamp: Date.now(),\n };\n\n const g = getGlobalState();\n g[CURRENT_ROUTE_KEY] = state;\n if (options.pending) {\n g[PENDING_START_PATH_KEY] = state;\n }\n\n return url;\n}\n\nexport function captureAngularHmrPendingStartPath(value: unknown, source = 'hmr-reboot'): string | null {\n return writeAngularHmrRouteState(value, { pending: true, source });\n}\n\nexport function readAngularHmrPendingStartPath(): string {\n // When a back-stack snapshot exists we boot to the bottom of the stack and\n // let `replayAngularHmrPendingForwardNavigations` walk the rest. Otherwise\n // fall back to the legacy single-URL slot so projects without history\n // tracking still land on the page they were viewing.\n const pendingHistory = readHistoryArray(PENDING_HISTORY_KEY);\n if (pendingHistory.length > 0) {\n // Open the restoring-route window so user-app default navigations\n // can step out of the framework's way until replay completes. The\n // forward-navigation walk in `NativeScriptAngularHmrRouteReplay`\n // closes the window after the final URL lands or fails. We pass\n // the deepest captured URL so consumers can compare against the\n // active router URL if they want fine-grained suppression.\n beginAngularHmrRouteRestore(pendingHistory[pendingHistory.length - 1]);\n return pendingHistory[0];\n }\n\n const g = getGlobalState();\n const fallback = normalizeAngularHmrRouteUrl(g[PENDING_START_PATH_KEY]?.url ?? g[PENDING_START_PATH_KEY]) || '';\n if (fallback) {\n // Single-URL fallback path: user-app code should still suppress\n // default navigations briefly — the new bootstrap is about to\n // navigate to `fallback`, so a default tab init that fires first\n // would still stomp it.\n beginAngularHmrRouteRestore(fallback);\n }\n return fallback;\n}\n\nexport function invokeAngularHmrRouteCapture(): string | null {\n const g = getGlobalState();\n const capture = g[CAPTURE_ROUTE_KEY];\n if (typeof capture === 'function') {\n try {\n return capture();\n } catch {\n // Fall back to the last known router url when the active capture hook fails.\n }\n }\n\n return captureAngularHmrPendingStartPath(g[CURRENT_ROUTE_KEY]?.url ?? g[CURRENT_ROUTE_KEY], 'hmr-fallback');\n}\n\nexport function installAngularHmrRouteCaptureHook(capture: () => string | null): () => void {\n const g = getGlobalState();\n g[CAPTURE_ROUTE_KEY] = capture;\n\n return () => {\n if (g[CAPTURE_ROUTE_KEY] === capture) {\n delete g[CAPTURE_ROUTE_KEY];\n }\n };\n}\n\n// ---- back-stack history primitives ------------------------------------------\n\n/**\n * Push a URL onto the live back-stack mirror. The mirror is collapsed when the\n * incoming URL equals the top — Angular fires multiple `NavigationEnd` events\n * for the same URL during certain `replaceUrl` scenarios and we don't want to\n * inflate the stack.\n */\nexport function pushAngularHmrRouteHistoryEntry(value: unknown): string | null {\n const url = normalizeAngularHmrRouteUrl(value);\n if (!url) {\n return null;\n }\n\n const history = readHistoryArray(HISTORY_KEY);\n if (history.length > 0 && history[history.length - 1] === url) {\n return url;\n }\n\n history.push(url);\n writeHistoryArray(HISTORY_KEY, history);\n return url;\n}\n\n/**\n * Pop the top of the live back-stack mirror. Used when Angular reports a\n * `popstate`-triggered navigation so the mirror tracks back navigations.\n */\nexport function popAngularHmrRouteHistoryEntry(): string | null {\n const history = readHistoryArray(HISTORY_KEY);\n if (history.length === 0) {\n return null;\n }\n const popped = history.pop() ?? null;\n writeHistoryArray(HISTORY_KEY, history);\n return popped;\n}\n\n/**\n * Replace the top of the live back-stack mirror. Used when Angular reports a\n * `NavigationEnd` with `replaceUrl=true`, e.g. canonical-redirect cycles.\n */\nexport function replaceAngularHmrRouteHistoryTop(value: unknown): string | null {\n const url = normalizeAngularHmrRouteUrl(value);\n if (!url) {\n return null;\n }\n\n const history = readHistoryArray(HISTORY_KEY);\n if (history.length === 0) {\n history.push(url);\n } else {\n history[history.length - 1] = url;\n }\n writeHistoryArray(HISTORY_KEY, history);\n return url;\n}\n\n/**\n * Read a defensive copy of the live back-stack mirror.\n */\nexport function readAngularHmrRouteHistory(): string[] {\n return readHistoryArray(HISTORY_KEY);\n}\n\n/**\n * Reset the live back-stack mirror. Used by tests and on bootstrap when the\n * router cannot replay the captured stack so we don't carry stale entries\n * forward.\n */\nexport function clearAngularHmrRouteHistory(): void {\n const g = getGlobalState();\n delete g[HISTORY_KEY];\n}\n\n/**\n * Replace the entire live back-stack mirror with a single URL. Mirrors\n * NativeScript's `clearHistory: true` navigation option, which collapses\n * the native page stack down to the destination — without this, the HMR\n * snapshot would still carry every URL the user passed through before\n * the reset (e.g. login screens that auth-gates now hide), and the next\n * reboot would walk through every one of them as a forward navigation.\n *\n * An empty / unparseable `value` clears the mirror entirely.\n */\nexport function resetAngularHmrRouteHistoryToUrl(value: unknown): string | null {\n const url = normalizeAngularHmrRouteUrl(value);\n if (!url) {\n writeHistoryArray(HISTORY_KEY, []);\n return null;\n }\n\n writeHistoryArray(HISTORY_KEY, [url]);\n return url;\n}\n\n/**\n * Snapshot the live back-stack mirror under the pending-history slot so the\n * next bootstrap can read it. Called from the HMR capture hook.\n *\n * The live mirror is cleared after the copy so the freshly bootstrapped app\n * starts from an empty back-stack. The replay walks the captured snapshot\n * via `NativeScriptAngularHmrRouteReplay` which fires `NavigationEnd` for\n * every URL it touches; the new tracker subscribes to those events and\n * naturally rebuilds the live mirror to match the snapshot. Without this\n * reset the live mirror would accumulate every URL the replay re-pushes\n * across HMR cycles, growing without bound and turning subsequent snapshots\n * into runaway forward-navigation walks (each replayed forward nav from\n * `/profile` back into `/talk` creates a fresh `TalkComponent` because\n * forward navigation never reuses the cache, so the leak shows up as\n * duplicated `Norrix is not enabled` / `BottomNavComponent Router Event:`\n * lines that double on every save).\n *\n * Returns the snapshot for diagnostics. Defensive: an empty live mirror\n * leaves the pending slot untouched so a single-page snapshot still works.\n */\nexport function snapshotAngularHmrRouteHistory(): string[] {\n const live = readHistoryArray(HISTORY_KEY);\n if (live.length === 0) {\n return [];\n }\n writeHistoryArray(PENDING_HISTORY_KEY, live);\n // Clear the live mirror so the next bootstrap starts from a clean slate.\n // The replay will repopulate it via the new tracker's NavigationEnd\n // subscription as it walks the captured stack.\n writeHistoryArray(HISTORY_KEY, []);\n return live.slice();\n}\n\n/**\n * Read the snapshotted back-stack pending replay on the new bootstrap.\n */\nexport function readAngularHmrPendingRouteHistory(): string[] {\n return readHistoryArray(PENDING_HISTORY_KEY);\n}\n\n/**\n * Read URLs to navigate forward through after the initial navigation finishes.\n * The first entry of the stack is the `START_PATH` consumed by the router; the\n * rest are forward navigations to push onto the new back-stack.\n */\nexport function readAngularHmrPendingForwardNavigations(): string[] {\n const pending = readHistoryArray(PENDING_HISTORY_KEY);\n if (pending.length <= 1) {\n return [];\n }\n return pending.slice(1);\n}\n\n/**\n * Clear the pending snapshot. The router replay calls this once it finishes\n * walking the stack so subsequent reboots start fresh.\n */\nexport function clearAngularHmrPendingRouteHistory(): void {\n const g = getGlobalState();\n delete g[PENDING_HISTORY_KEY];\n}\n\n// ---- restoring-route window flag --------------------------------------------\n\n/**\n * True while the Angular HMR layer is restoring a captured route stack\n * onto the freshly-bootstrapped router. The window opens just before\n * `START_PATH` resolves to a deep URL and closes once the router has\n * walked the entire forward navigation list (or aborted it).\n *\n * User-app code that runs default navigations on component init (e.g. a\n * bottom-nav defaulting to its first tab) can consult this flag to skip\n * its default navigation so the framework's restored route survives:\n *\n * ```ts\n * if (isAngularHmrRestoringRoute()) {\n * return; // framework is restoring a deeper route — leave it alone.\n * }\n * defaultTabNavigation();\n * ```\n *\n * Returns `false` outside of HMR or after the replay window has closed.\n * Production builds always see `false` because the framework never\n * opens the window there.\n */\nexport function isAngularHmrRestoringRoute(): boolean {\n const g = getGlobalState();\n return g[RESTORING_KEY] === true;\n}\n\n/**\n * The target route the framework is currently restoring, or `null` when\n * no replay is in progress. Useful when the consumer wants to compare\n * against the current router URL.\n */\nexport function getAngularHmrRestoringRoute(): string | null {\n const g = getGlobalState();\n const value = g[RESTORING_TARGET_KEY];\n return typeof value === 'string' && value ? value : null;\n}\n\n/**\n * Open the restoring-route window. Called by the framework when an HMR\n * bootstrap is about to navigate to a captured deep route — never call\n * this from user code.\n *\n * `targetUrl` is what the framework intends to land on; the value can\n * be read back via {@link getAngularHmrRestoringRoute}.\n */\nexport function beginAngularHmrRouteRestore(targetUrl: string | null): void {\n const g = getGlobalState();\n g[RESTORING_KEY] = true;\n if (targetUrl) {\n g[RESTORING_TARGET_KEY] = targetUrl;\n } else {\n delete g[RESTORING_TARGET_KEY];\n }\n}\n\n/**\n * Close the restoring-route window. Called by the framework when the\n * replay finishes (NavigationEnd reached, replay aborted, or no\n * pending stack existed in the first place).\n */\nexport function endAngularHmrRouteRestore(): void {\n const g = getGlobalState();\n delete g[RESTORING_KEY];\n delete g[RESTORING_TARGET_KEY];\n}","import { Injectable, OnDestroy } from '@angular/core';\nimport { NavigationCancel, NavigationEnd, NavigationError, Router } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\n\nimport { isAngularHmrEnabled } from '../../hmr-environment';\nimport { NativeScriptDebug } from '../../trace';\nimport {\n clearAngularHmrPendingRouteHistory,\n endAngularHmrRouteRestore,\n isAngularHmrRestoringRoute,\n readAngularHmrPendingForwardNavigations,\n} from './hmr-route-state-core';\n\n/**\n * Grace period to keep `isAngularHmrRestoringRoute()` returning `true`\n * after `replayForwardNavigations()` finishes its last `navigateByUrl`.\n *\n * Why a grace period exists: NativeScript native views (TabView, BottomNavigation,\n * Frame, etc.) fire their `loaded` events asynchronously after the JS-side\n * `NavigationEnd`. User-app code wired to those events typically guards a\n * default navigation (e.g. \"select first tab\") with `isAngularHmrRestoringRoute()`.\n * If we close the window the instant the JS replay finishes, the loaded\n * event arrives a few hundred milliseconds later, the guard reports false,\n * and the default navigation stomps the freshly-restored route.\n *\n * 1000ms covers all the cases observed on iOS device + simulator without\n * leaving the window open long enough to interfere with genuine user\n * navigation. The fallback timeout (`fallback-timeout`) below is a safety\n * net for scenarios where this scheduled close never fires.\n */\nconst REPLAY_COMPLETED_GRACE_MS = 1000;\n\n/**\n * Replays the back-stack snapshot captured by `NativeScriptAngularHmrRouteTracker`\n * during HMR. The router's initial navigation already lands on the bottom of\n * the stack (`stack[0]`); this service walks `stack[1..n]` so the user keeps\n * back navigation across HMR cycles.\n *\n * The replay is single-shot per bootstrap. Any failure (cancelled navigation,\n * unrouteable URL) aborts the rest of the replay so we don't fight the router\n * — the user keeps whichever subset of the stack we successfully re-pushed.\n */\n@Injectable()\nexport class NativeScriptAngularHmrRouteReplay implements OnDestroy {\n private subscription?: Subscription;\n private windowFallbackTimeout?: ReturnType<typeof setTimeout>;\n private pendingCloseTimeout?: ReturnType<typeof setTimeout>;\n\n constructor(private readonly router: Router) {\n if (!isAngularHmrEnabled()) {\n return;\n }\n\n const forwardNavigations = readAngularHmrPendingForwardNavigations();\n\n // The restoring window is opened by `readAngularHmrPendingStartPath()`\n // when `START_PATH` resolves to a deep route. If that path resolved\n // to nothing AND we have no forward navigations, there is nothing\n // to suppress and we must close the window if it was somehow left\n // open. Otherwise we keep it open until replay finishes.\n const restoringWindowOpen = isAngularHmrRestoringRoute();\n\n if (forwardNavigations.length === 0) {\n // Nothing to replay; clear the pending slot so a future navigation that\n // ends in the bootstrap window doesn't carry the snapshot forward.\n clearAngularHmrPendingRouteHistory();\n\n if (restoringWindowOpen) {\n // Single-URL restore (no back-stack to walk): keep the window\n // open until the initial navigation completes so user-app\n // default navigations don't fire before the framework's\n // restored URL settles. We then schedule the close with the\n // same grace period as the multi-URL replay path so async\n // native `loaded` handlers still see the flag.\n this.subscription = this.router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError),\n take(1),\n )\n .subscribe(() => this.scheduleRestoringWindowClose('initial-navigation-settled'));\n // Belt-and-braces: bootstrap can race with router init in\n // unusual cases. Close the window after a short timeout so we\n // never leave it stuck open and silently breaking default\n // navigations forever.\n this.windowFallbackTimeout = setTimeout(() => this.closeRestoringWindow('fallback-timeout'), 5000);\n }\n\n return;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`HMR back-stack replay queued: ${forwardNavigations.length} forward navigation(s)`);\n }\n\n this.subscription = this.router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError),\n take(1),\n )\n .subscribe((event) => {\n if (event instanceof NavigationEnd) {\n void this.replayForwardNavigations(forwardNavigations);\n } else {\n // Initial navigation never landed; replay would compound the problem.\n clearAngularHmrPendingRouteHistory();\n this.closeRestoringWindow('initial-navigation-failed');\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog('HMR back-stack replay skipped: initial navigation did not complete');\n }\n }\n });\n\n // Same belt-and-braces fallback as the single-URL path above.\n this.windowFallbackTimeout = setTimeout(() => this.closeRestoringWindow('fallback-timeout'), 10000);\n }\n\n ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n if (this.windowFallbackTimeout !== undefined) {\n clearTimeout(this.windowFallbackTimeout);\n this.windowFallbackTimeout = undefined;\n }\n if (this.pendingCloseTimeout !== undefined) {\n clearTimeout(this.pendingCloseTimeout);\n this.pendingCloseTimeout = undefined;\n }\n // Defensive: never leave the restoring window open across module\n // destruction. A subsequent reboot would otherwise see it set and\n // suppress the next default navigation indefinitely.\n this.closeRestoringWindow('replay-service-destroyed');\n }\n\n private closeRestoringWindow(reason: string): void {\n if (this.pendingCloseTimeout !== undefined) {\n clearTimeout(this.pendingCloseTimeout);\n this.pendingCloseTimeout = undefined;\n }\n if (!isAngularHmrRestoringRoute()) {\n return;\n }\n endAngularHmrRouteRestore();\n if (this.windowFallbackTimeout !== undefined) {\n clearTimeout(this.windowFallbackTimeout);\n this.windowFallbackTimeout = undefined;\n }\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`HMR restoring-route window closed (${reason})`);\n }\n }\n\n /**\n * Schedule the restoring window to close after a small grace period\n * so that asynchronous user-app handlers (e.g. NativeScript native\n * `loaded` events on TabView / BottomNavigation / Frame) still observe\n * `isAngularHmrRestoringRoute() === true` and skip default navigations\n * that would otherwise stomp the freshly-restored route.\n *\n * The grace period is bounded by the existing `fallback-timeout` so\n * we never leave the flag set indefinitely even if `setTimeout` is\n * blocked by a misbehaving consumer.\n */\n private scheduleRestoringWindowClose(reason: string): void {\n if (!isAngularHmrRestoringRoute()) {\n return;\n }\n if (this.pendingCloseTimeout !== undefined) {\n clearTimeout(this.pendingCloseTimeout);\n }\n this.pendingCloseTimeout = setTimeout(() => {\n this.pendingCloseTimeout = undefined;\n this.closeRestoringWindow(reason);\n }, REPLAY_COMPLETED_GRACE_MS);\n }\n\n private async replayForwardNavigations(urls: string[]): Promise<void> {\n let aborted = false;\n try {\n for (const url of urls) {\n const succeeded = await this.router.navigateByUrl(url).catch(() => false);\n if (!succeeded) {\n aborted = true;\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`HMR back-stack replay aborted at ${url}`);\n }\n return;\n }\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`HMR back-stack replay navigated to ${url}`);\n }\n }\n } finally {\n clearAngularHmrPendingRouteHistory();\n this.scheduleRestoringWindowClose(aborted ? 'replay-aborted' : 'replay-completed');\n }\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { NavigationEnd, NavigationStart, Router } from '@angular/router';\nimport { Subscription } from 'rxjs';\n\nimport { isAngularHmrEnabled } from '../../hmr-environment';\nimport {\n installAngularHmrRouteCaptureHook,\n popAngularHmrRouteHistoryEntry,\n pushAngularHmrRouteHistoryEntry,\n readAngularHmrPendingStartPath,\n replaceAngularHmrRouteHistoryTop,\n resetAngularHmrRouteHistoryToUrl,\n snapshotAngularHmrRouteHistory,\n writeAngularHmrRouteState,\n} from './hmr-route-state-core';\n\nexport {\n beginAngularHmrRouteRestore,\n captureAngularHmrPendingStartPath,\n clearAngularHmrPendingRouteHistory,\n clearAngularHmrRouteHistory,\n endAngularHmrRouteRestore,\n getAngularHmrRestoringRoute,\n invokeAngularHmrRouteCapture,\n isAngularHmrRestoringRoute,\n normalizeAngularHmrRouteUrl,\n popAngularHmrRouteHistoryEntry,\n pushAngularHmrRouteHistoryEntry,\n readAngularHmrPendingForwardNavigations,\n readAngularHmrPendingRouteHistory,\n readAngularHmrRouteHistory,\n replaceAngularHmrRouteHistoryTop,\n resetAngularHmrRouteHistoryToUrl,\n snapshotAngularHmrRouteHistory,\n} from './hmr-route-state-core';\nexport { readAngularHmrPendingStartPath } from './hmr-route-state-core';\n\n/**\n * Read NativeScript's `clearHistory: true` navigation extra off the active\n * Angular navigation. Defensive against test mocks and bare `Router`-like\n * shapes that don't expose `getCurrentNavigation` (e.g. earlier Angular\n * versions and the unit-test mocks in `hmr-route-state-tracker.spec.ts`).\n *\n * `clearHistory` is the NativeScript-only signal that\n * `NSLocationStrategy._beginPageNavigation` uses to collapse the native page\n * stack down to the destination. We mirror that on the HMR side so a\n * subsequent reboot doesn't replay URLs the user can no longer reach (the\n * canonical example: `/`, `/signup-landing`, `/login` after the auth flow\n * navigated to `/talk/(todayTab:today)` with `clearHistory: true`).\n */\nfunction readClearHistoryFromRouter(router: Router): boolean {\n const getCurrentNavigation = (router as { getCurrentNavigation?: () => unknown }).getCurrentNavigation;\n if (typeof getCurrentNavigation !== 'function') {\n return false;\n }\n\n let navigation: unknown;\n try {\n navigation = getCurrentNavigation.call(router);\n } catch {\n return false;\n }\n\n const extras = (navigation as { extras?: { clearHistory?: unknown } } | null | undefined)?.extras;\n return !!extras?.clearHistory;\n}\n\n@Injectable()\nexport class NativeScriptAngularHmrRouteTracker implements OnDestroy {\n private subscription?: Subscription;\n private disposeCaptureHook?: () => void;\n // Tracks whether the current `NavigationStart..NavigationEnd` pair was kicked\n // off by a popstate (frame.goBack / NSLocationStrategy.back) so that on\n // `NavigationEnd` we can pop our mirror instead of pushing a duplicate entry.\n private currentNavigationIsPopstate = false;\n private currentNavigationReplaceUrl = false;\n // Tracks whether the active navigation was started with NativeScript's\n // `clearHistory: true` extra (read off `router.getCurrentNavigation()` at\n // `NavigationStart`). When set, the matching `NavigationEnd` collapses the\n // mirror down to just the destination URL — see\n // `resetAngularHmrRouteHistoryToUrl` for the rationale.\n private currentNavigationClearsHistory = false;\n\n constructor(private readonly router: Router) {\n if (!isAngularHmrEnabled()) {\n return;\n }\n\n this.disposeCaptureHook = this.installCaptureHook();\n this.captureCurrentRoute('bootstrap');\n this.subscription = this.router.events.subscribe((event) => {\n if (event instanceof NavigationStart) {\n this.currentNavigationIsPopstate = event.navigationTrigger === 'popstate';\n this.currentNavigationReplaceUrl = !!event.restoredState;\n this.currentNavigationClearsHistory = readClearHistoryFromRouter(this.router);\n return;\n }\n\n if (event instanceof NavigationEnd) {\n const url = event.urlAfterRedirects || event.url;\n writeAngularHmrRouteState(url, {\n source: 'navigation-end',\n });\n\n if (this.currentNavigationClearsHistory) {\n // NativeScript collapsed the native page stack to this single\n // destination. Mirror that on the HMR side so a future reboot\n // replays only what the user can still navigate back through —\n // not every URL they passed through before the reset.\n resetAngularHmrRouteHistoryToUrl(url);\n } else if (this.currentNavigationIsPopstate) {\n // The user (or NSLocationStrategy.back()) walked the back-stack down\n // by one page; mirror that by dropping the top of our snapshot so a\n // subsequent HMR reboot doesn't carry the popped page back into view.\n popAngularHmrRouteHistoryEntry();\n } else if (this.currentNavigationReplaceUrl) {\n replaceAngularHmrRouteHistoryTop(url);\n } else {\n pushAngularHmrRouteHistoryEntry(url);\n }\n\n this.currentNavigationIsPopstate = false;\n this.currentNavigationReplaceUrl = false;\n this.currentNavigationClearsHistory = false;\n }\n });\n }\n\n ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n this.disposeCaptureHook?.();\n }\n\n private captureCurrentRoute(source: string): string | null {\n if (source === 'hmr-reboot') {\n // Snapshot the live mirror first so the bootstrap can replay forward\n // navigations to rebuild the back-stack. The pending single-URL slot\n // remains useful as a fallback when the snapshot turns out to be empty\n // (e.g. bootstrap-time HMR before the first NavigationEnd).\n snapshotAngularHmrRouteHistory();\n } else if (source === 'bootstrap') {\n // Seed the live mirror with the current URL so the very first HMR\n // before any user navigation still has a stack of size one to snapshot.\n //\n // Skip empty / root URLs: at ENVIRONMENT_INITIALIZER time the router\n // has not run its initial navigation yet so `router.url` is \"/\" (or\n // an empty string). Pushing that here would seed the mirror with a\n // noise entry that becomes the bottom of the next snapshot, which in\n // turn becomes the next bootstrap's `START_PATH`. The router then\n // boots to \"/\" → redirects to the real default route → fires an\n // extra `NavigationEnd` that re-enters the replay path. The first\n // genuine `NavigationEnd` arrives a moment later through the event\n // subscription below and seeds the mirror with the real URL, so\n // dropping the seed here is safe.\n const seedUrl = this.router.url;\n if (seedUrl && seedUrl !== '/') {\n pushAngularHmrRouteHistoryEntry(seedUrl);\n }\n }\n\n return writeAngularHmrRouteState(this.router.url, {\n pending: source === 'hmr-reboot',\n source,\n });\n }\n\n private installCaptureHook(): () => void {\n return installAngularHmrRouteCaptureHook(() => this.captureCurrentRoute('hmr-reboot'));\n }\n}","import {\n APP_BOOTSTRAP_LISTENER,\n ENVIRONMENT_INITIALIZER,\n NgModule,\n ModuleWithProviders,\n NO_ERRORS_SCHEMA,\n Optional,\n SkipSelf,\n inject,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport {\n RouterModule,\n Routes,\n ExtraOptions,\n RouteReuseStrategy,\n RouterFeatures,\n ActivatedRoute,\n Router,\n ROUTES,\n provideRouter,\n} from '@angular/router';\nimport { LocationStrategy, PlatformLocation } from '@angular/common';\nimport { NSRouterLink } from './ns-router-link';\nimport { NSRouterLinkActive } from './ns-router-link-active';\nimport { PageRouterOutlet } from './page-router-outlet';\nimport { NSLocationStrategy } from './ns-location-strategy';\nimport { NativescriptPlatformLocation } from './ns-platform-location';\nimport { NSRouteReuseStrategy } from './ns-route-reuse-strategy';\nimport { RouterExtensions } from './router-extensions';\nimport { FrameService } from '../frame.service';\nimport { NSEmptyOutletComponent } from './ns-empty-outlet.component';\nimport { NativeScriptCommonModule } from '../../nativescript-common.module';\nimport { START_PATH } from '../../tokens';\nimport { cloneRoutesForBootstrap } from './hmr-route-bootstrap-core';\nimport { NativeScriptAngularHmrRouteReplay } from './hmr-route-replay';\nimport { NativeScriptAngularHmrRouteTracker, readAngularHmrPendingStartPath } from './hmr-route-state';\n\nexport { PageRoute } from './page-router-outlet';\nexport { RouterExtensions } from './router-extensions';\nexport { Outlet, NavigationOptions, LocationState, defaultNavOptions } from './ns-location-utils';\nexport { NSRouterLink } from './ns-router-link';\nexport { NSRouterLinkActive } from './ns-router-link-active';\nexport { PageRouterOutlet } from './page-router-outlet';\nexport { NSLocationStrategy } from './ns-location-strategy';\nexport { NSEmptyOutletComponent } from './ns-empty-outlet.component';\n\nexport function provideLocationStrategy(\n locationStrategy: NSLocationStrategy,\n frameService: FrameService,\n startPath: string,\n): NSLocationStrategy {\n return locationStrategy ? locationStrategy : new NSLocationStrategy(frameService, startPath);\n}\n\nconst ROUTER_COMPONENTS = [NSRouterLink, NSRouterLinkActive, PageRouterOutlet, NSEmptyOutletComponent];\n\n@NgModule({\n imports: [RouterModule, NativeScriptCommonModule, ...ROUTER_COMPONENTS],\n exports: [RouterModule, ...ROUTER_COMPONENTS],\n schemas: [NO_ERRORS_SCHEMA],\n})\nexport class NativeScriptRouterModule {\n static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<NativeScriptRouterModule> {\n return {\n ngModule: NativeScriptRouterModule,\n providers: [\n ...RouterModule.forRoot(cloneRoutesForBootstrap(routes), config).providers,\n {\n provide: START_PATH,\n useFactory: readAngularHmrPendingStartPath,\n },\n {\n provide: NSLocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [[NSLocationStrategy, new Optional(), new SkipSelf()], FrameService, [new Optional(), START_PATH]],\n },\n { provide: LocationStrategy, useExisting: NSLocationStrategy },\n NativescriptPlatformLocation,\n { provide: PlatformLocation, useExisting: NativescriptPlatformLocation },\n RouterExtensions,\n NSRouteReuseStrategy,\n { provide: RouteReuseStrategy, useExisting: NSRouteReuseStrategy },\n NativeScriptAngularHmrRouteTracker,\n NativeScriptAngularHmrRouteReplay,\n {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n deps: [NativeScriptAngularHmrRouteTracker, NativeScriptAngularHmrRouteReplay],\n useFactory: () => () => undefined,\n },\n ],\n };\n }\n\n static forChild(routes: Routes): ModuleWithProviders<NativeScriptRouterModule> {\n return { ngModule: NativeScriptRouterModule, providers: RouterModule.forChild(cloneRoutesForBootstrap(routes)).providers };\n }\n}\nexport function rootRoute(router: Router): ActivatedRoute {\n return router.routerState.root;\n}\n\nexport function provideNativeScriptRouter(routes: Routes, ...features: RouterFeatures[]) {\n return makeEnvironmentProviders([\n provideRouter(cloneRoutesForBootstrap(routes), ...features),\n {\n provide: START_PATH,\n useFactory: readAngularHmrPendingStartPath,\n },\n {\n provide: NSLocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [[NSLocationStrategy, new Optional(), new SkipSelf()], FrameService, [new Optional(), START_PATH]],\n },\n { provide: LocationStrategy, useExisting: NSLocationStrategy },\n NativescriptPlatformLocation,\n { provide: PlatformLocation, useExisting: NativescriptPlatformLocation },\n RouterExtensions,\n NSRouteReuseStrategy,\n { provide: RouteReuseStrategy, useExisting: NSRouteReuseStrategy },\n NativeScriptAngularHmrRouteTracker,\n NativeScriptAngularHmrRouteReplay,\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useValue: () => {\n inject(NativeScriptAngularHmrRouteTracker);\n inject(NativeScriptAngularHmrRouteReplay);\n },\n },\n // {provide: APP_BOOTSTRAP_LISTENER, multi: true, useFactory: getBootstrapListener},\n ]);\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-function-type */\n/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/triple-slash-reference */\n/// <reference path=\"../../../../node_modules/zone.js/zone.d.ts\" />\n/// <reference path=\"../../../../node_modules/@nativescript/core/global-types.d.ts\" />\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { EventEmitter, isDevMode, NgZone, NgZoneOptions, ɵinternalProvideZoneChangeDetection } from '@angular/core';\nimport { Utils } from '@nativescript/core';\n\nlet currentRafId = 1;\nfunction noop() {}\n\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class NativeScriptNgZone implements NgZone {\n readonly hasPendingMacrotasks: boolean = false;\n readonly hasPendingMicrotasks: boolean = false;\n\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n readonly isStable: boolean = true;\n\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n readonly onUnstable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when there is no more microtasks enqueued in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n readonly onStable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies that an error has been delivered.\n */\n readonly onError: EventEmitter<any> = new EventEmitter(false);\n\n constructor({\n enableLongStackTrace = isDevMode(),\n shouldCoalesceEventChangeDetection = true,\n shouldCoalesceRunChangeDetection = true,\n } = {}) {\n if (typeof Zone == 'undefined') {\n throw new Error(`In this configuration Angular requires Zone.js`);\n }\n\n Zone.assertZonePatched();\n const self = this as any as NgZonePrivate;\n self._nesting = 0;\n\n self._outer = self._inner = Zone.current;\n\n if ((Zone as any)['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new ((Zone as any)['TaskTrackingZoneSpec'] as any)());\n }\n\n if (enableLongStackTrace && (Zone as any)['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork((Zone as any)['longStackTraceZoneSpec']);\n }\n // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be\n // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.\n self.shouldCoalesceEventChangeDetection = !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n self.lastRequestAnimationFrameId = -1;\n self.nativeRequestAnimationFrame = function (cb) {\n const nativeDispatchToMainThread = Utils[Zone.__symbol__('dispatchToMainThread')] || Utils.dispatchToMainThread;\n nativeDispatchToMainThread(cb);\n return currentRafId++;\n };\n forkInnerZoneWithAngularBehavior(self);\n }\n\n static isInAngularZone(): boolean {\n return Zone.current.get('isAngularZone') === true;\n }\n\n static assertInAngularZone(): void {\n if (!NgZone.isInAngularZone()) {\n throw new Error('Expected to be in Angular Zone, but it is not!');\n }\n }\n\n static assertNotInAngularZone(): void {\n if (NgZone.isInAngularZone()) {\n throw new Error('Expected to not be in Angular Zone, but it is!');\n }\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.run(fn, applyThis, applyArgs);\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T {\n const zone = (this as any as NgZonePrivate)._inner;\n const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs);\n } finally {\n zone.cancelTask(task);\n }\n }\n\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.runGuarded(fn, applyThis, applyArgs);\n }\n\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return (this as any as NgZonePrivate)._outer.run(fn);\n }\n}\n\nconst EMPTY_PAYLOAD = {};\n\ninterface NgZonePrivate extends NgZone {\n _outer: Zone;\n _inner: Zone;\n _nesting: number;\n _hasPendingMicrotasks: boolean;\n\n hasPendingMacrotasks: boolean;\n hasPendingMicrotasks: boolean;\n lastRequestAnimationFrameId: number;\n /**\n * A flag to indicate if NgZone is currently inside\n * checkStable and to prevent re-entry. The flag is\n * needed because it is possible to invoke the change\n * detection from within change detection leading to\n * incorrect behavior.\n *\n * For detail, please refer here,\n * https://github.com/angular/angular/pull/40540\n */\n isCheckStableRunning: boolean;\n isStable: boolean;\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can coalesce such kind of events to trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling it in an animation frame. So in the case above,\n * the change detection will only be trigged once.\n */\n shouldCoalesceEventChangeDetection: boolean;\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n *\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loops trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n shouldCoalesceRunChangeDetection: boolean;\n\n nativeRequestAnimationFrame: (callback: FrameRequestCallback) => number;\n\n // Cache a \"fake\" top eventTask so you don't need to schedule a new task every\n // time you run a `checkStable`.\n fakeTopEventTask: Task;\n}\n\nfunction checkStable(zone: NgZonePrivate) {\n // TODO: @JiaLiPassion, should check zone.isCheckStableRunning to prevent\n // re-entry. The case is:\n //\n // @Component({...})\n // export class AppComponent {\n // constructor(private ngZone: NgZone) {\n // this.ngZone.onStable.subscribe(() => {\n // this.ngZone.run(() => console.log('stable'););\n // });\n // }\n //\n // The onStable subscriber run another function inside ngZone\n // which causes `checkStable()` re-entry.\n // But this fix causes some issues in g3, so this fix will be\n // launched in another PR.\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n } finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(() => zone.onStable.emit(null));\n } finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\n\nfunction delayChangeDetectionForEvents(zone: NgZonePrivate) {\n /**\n * We also need to check _nesting here\n * Consider the following case with shouldCoalesceRunChangeDetection = true\n *\n * ngZone.run(() => {});\n * ngZone.run(() => {});\n *\n * We want the two `ngZone.run()` only trigger one change detection\n * when shouldCoalesceRunChangeDetection is true.\n * And because in this case, change detection run in async way(requestAnimationFrame),\n * so we also need to check the _nesting here to prevent multiple\n * change detections.\n */\n if (zone.isCheckStableRunning || zone.lastRequestAnimationFrameId !== -1) {\n return;\n }\n zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(global, () => {\n // This is a work around for https://github.com/angular/angular/issues/36839.\n // The core issue is that when event coalescing is enabled it is possible for microtasks\n // to get flushed too early (As is the case with `Promise.then`) between the\n // coalescing eventTasks.\n //\n // To workaround this we schedule a \"fake\" eventTask before we process the\n // coalescing eventTasks. The benefit of this is that the \"fake\" container eventTask\n // will prevent the microtasks queue from getting drained in between the coalescing\n // eventTask execution.\n if (!zone.fakeTopEventTask) {\n zone.fakeTopEventTask = Zone.root.scheduleEventTask(\n 'fakeTopEventTask',\n () => {\n zone.lastRequestAnimationFrameId = -1;\n updateMicroTaskStatus(zone);\n zone.isCheckStableRunning = true;\n checkStable(zone);\n zone.isCheckStableRunning = false;\n },\n undefined,\n () => {},\n () => {},\n );\n }\n zone.fakeTopEventTask.invoke();\n });\n updateMicroTaskStatus(zone);\n}\n\nfunction forkInnerZoneWithAngularBehavior(zone: NgZonePrivate) {\n const delayChangeDetectionForEventsDelegate = () => {\n delayChangeDetectionForEvents(zone);\n };\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: <any>{ isAngularZone: true },\n onInvokeTask: (\n delegate: ZoneDelegate,\n current: Zone,\n target: Zone,\n task: Task,\n applyThis: any,\n applyArgs: any,\n ): any => {\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n } finally {\n if (\n (zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') ||\n zone.shouldCoalesceRunChangeDetection ||\n !Utils.isMainThread()\n ) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n\n onInvoke: (\n delegate: ZoneDelegate,\n current: Zone,\n target: Zone,\n callback: Function,\n applyThis: any,\n applyArgs?: any[],\n source?: string,\n ): any => {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n } finally {\n if (zone.shouldCoalesceRunChangeDetection || !Utils.isMainThread()) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n\n onHasTask: (delegate: ZoneDelegate, current: Zone, target: Zone, hasTaskState: HasTaskState) => {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone._hasPendingMicrotasks = hasTaskState.microTask;\n updateMicroTaskStatus(zone);\n checkStable(zone);\n } else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n\n onHandleError: (delegate: ZoneDelegate, current: Zone, target: Zone, error: any): boolean => {\n delegate.handleError(target, error);\n zone.runOutsideAngular(() => zone.onError.emit(error));\n return false;\n },\n });\n}\n\nfunction updateMicroTaskStatus(zone: NgZonePrivate) {\n if (zone._hasPendingMicrotasks || zone.lastRequestAnimationFrameId !== -1) {\n zone.hasPendingMicrotasks = true;\n } else {\n zone.hasPendingMicrotasks = false;\n }\n}\n\nfunction onEnter(zone: NgZonePrivate) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\n\nfunction onLeave(zone: NgZonePrivate) {\n zone._nesting--;\n checkStable(zone);\n}\n\nfunction getNgZoneOptions(options?: NgZoneOptions) {\n return {\n enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,\n shouldCoalesceEventChangeDetection: options?.eventCoalescing ?? true,\n shouldCoalesceRunChangeDetection: options?.runCoalescing ?? true,\n };\n}\n\nexport function provideNativeScriptNgZone(options?: NgZoneOptions) {\n const scheduleInRootZone = (options as any)?.scheduleInRootZone;\n return ɵinternalProvideZoneChangeDetection({\n ngZoneFactory: () => new NativeScriptNgZone(getNgZoneOptions(options)),\n scheduleInRootZone,\n });\n}\n","// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path=\"../references.d.ts\" />\nexport * from './lib/public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["REGISTRY_KEY","i1.NSLocationStrategy","AngularCore","INJECTOR_SCOPE","NullViewportScroller","ɵinternalCreateApplication","AnimationEngine","i1","AnimationRendererFactory","WebAnimationsStyleNormalizer","BrowserAnimationBuilder","AnimationStyleNormalizer","Observable","i2.NSFileSystem","i2.NSLocationStrategy","i3.FrameService","i2.RouterExtensions","ɵinternalProvideZoneChangeDetection"],"mappings":";;;;;;;;;;;;;;;;;AAGA,MAAM,YAAY,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC,WAAW,CAAC,IAAI;AAEtD,MAAgB,aAAc,SAAQ,IAAI,CAAA;AAY9C,IAAA,WAAA,CAAsB,OAAe,EAAE,EAAA;AACrC,QAAA,KAAK,EAAE;QADa,IAAA,CAAA,IAAI,GAAJ,IAAI;AAGxB,QAAA,IAAI,CAAC,QAAQ,GAAG,CAAC;AACjB,QAAA,IAAI,CAAC,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC;IACpC;IAEA,QAAQ,GAAA;AACN,QAAA,OAAO,CAAA,EAAG,IAAI,CAAC,QAAQ,CAAA,CAAA,EAAI,IAAI,CAAC,EAAE,CAAA,EAAA,EAAK,IAAI,CAAC,IAAI,EAAE;IACpD;AACD;AAEK,MAAO,WAAY,SAAQ,aAAa,CAAA;aAC3B,IAAA,CAAA,EAAE,GAAG,CAAC,CAAC;AAExB,IAAA,WAAA,CAAY,KAAc,EAAA;QACxB,KAAK,CAAC,KAAK,CAAC;QAEZ,IAAI,CAAC,IAAI,GAAG;AACV,YAAA,YAAY,EAAE,IAAI;SACnB;QACD,IAAI,CAAC,EAAE,GAAG,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE;AACnC,QAAA,WAAW,CAAC,EAAE,IAAI,CAAC;IACrB;;AAGI,MAAO,QAAS,SAAQ,aAAa,CAAA;aAC3B,IAAA,CAAA,eAAe,GAAG,YAAH,CAAgB;aAC5B,IAAA,CAAA,EAAE,GAAG,CAAH,CAAK;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,IAAI;KACjE;AACH;AAEM,SAAU,yBAAyB,CAAC,OAAuB,EAAA;AAC/D,IAAA,MAAM,kBAAkB,GAAI,OAAe,EAAE,kBAAkB;AAC/D,IAAA,OAAOU,mCAAmC,CAAC;QACzC,aAAa,EAAE,MAAM,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACtE,kBAAkB;AACnB,KAAA,CAAC;AACJ;;ACnfA;AACA;;ACDA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"nativescript-angular.mjs","sources":["../../../../packages/angular/src/lib/views/invisible-nodes.ts","../../../../packages/angular/src/lib/views/utils.ts","../../../../packages/angular/src/lib/tokens.ts","../../../../packages/angular/src/lib/property-filter.ts","../../../../packages/angular/src/lib/view-refs.ts","../../../../packages/angular/src/lib/app-host-view.ts","../../../../packages/angular/src/lib/hmr-compiled-components-core.ts","../../../../packages/angular/src/lib/hmr-environment.ts","../../../../packages/angular/src/lib/trace.ts","../../../../packages/angular/src/lib/hmr-class-registry.ts","../../../../packages/angular/src/lib/hmr-eager-services.ts","../../../../packages/angular/src/lib/loading.service.ts","../../../../packages/angular/src/lib/legacy/router/hmr-route-cache-core.ts","../../../../packages/angular/src/lib/legacy/frame.service.ts","../../../../packages/angular/src/lib/legacy/router/ns-location-utils.ts","../../../../packages/angular/src/lib/legacy/router/ns-location-strategy.ts","../../../../packages/angular/src/lib/legacy/router/page-router-outlet-utils.ts","../../../../packages/angular/src/lib/legacy/router/ns-route-reuse-strategy.ts","../../../../packages/angular/src/lib/root-transition-guard.ts","../../../../packages/angular/src/lib/application.ts","../../../../packages/angular/src/lib/platform-ref.ts","../../../../packages/angular/src/lib/nativescript-xhr-factory.ts","../../../../packages/angular/src/lib/element-registry/metas.ts","../../../../packages/angular/src/lib/element-registry/registry.ts","../../../../packages/angular/src/lib/element-registry/common-views.ts","../../../../packages/angular/src/lib/view-util.ts","../../../../packages/angular/src/lib/nativescript-renderer.ts","../../../../packages/angular/src/lib/cdk/portal/portal-errors.ts","../../../../packages/angular/src/lib/cdk/portal/common.ts","../../../../packages/angular/src/lib/cdk/portal/portal-directives.ts","../../../../packages/angular/src/lib/cdk/portal/nsdom-portal-outlet.ts","../../../../packages/angular/src/lib/cdk/detached-loader.ts","../../../../packages/angular/src/lib/cdk/frame-page/page.service.ts","../../../../packages/angular/src/lib/cdk/frame-page/frame-page.component.ts","../../../../packages/angular/src/lib/cdk/frame-page/frame.directive.ts","../../../../packages/angular/src/lib/cdk/frame-page/page.directive.ts","../../../../packages/angular/src/lib/cdk/frame-page/frame-page.module.ts","../../../../packages/angular/src/lib/utils/lang-facade.ts","../../../../packages/angular/src/lib/cdk/action-bar/index.ts","../../../../packages/angular/src/lib/utils/general.ts","../../../../packages/angular/src/lib/cdk/list-view/list-view.component.ts","../../../../packages/angular/src/lib/legacy/directives/dialogs.ts","../../../../packages/angular/src/lib/utils/ng-safe.ts","../../../../packages/angular/src/lib/cdk/tab-view/index.ts","../../../../packages/angular/src/lib/cdk/platform-filters/android-filter.component.ts","../../../../packages/angular/src/lib/cdk/platform-filters/ios-filter.component.ts","../../../../packages/angular/src/lib/cdk/platform-filters/apple-filter.component.ts","../../../../packages/angular/src/lib/cdk/platform-filters/vision-filter.component.ts","../../../../packages/angular/src/lib/nativescript-common.module.ts","../../../../packages/angular/src/lib/nativescript.ts","../../../../packages/angular/src/lib/platform-nativescript.ts","../../../../packages/angular/src/lib/rootcomposite.module.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-config.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-ref.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-hmr.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-hmr-animation.ts","../../../../packages/angular/src/lib/cdk/dialog/modal-host-props.ts","../../../../packages/angular/src/lib/cdk/dialog/native-modal-ref.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-services.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-content-directives.ts","../../../../packages/angular/src/lib/cdk/dialog/dialog-module.ts","../../../../packages/angular/src/lib/file-system/ns-file-system.ts","../../../../packages/angular/src/lib/detached-loader-utils.ts","../../../../packages/angular/src/lib/hmr-cache-store.ts","../../../../packages/angular/src/lib/hmr-cache.service.ts","../../../../packages/angular/src/lib/forms/value-accessors/base-value-accessor.ts","../../../../packages/angular/src/lib/forms/value-accessors/text-value-accessor.ts","../../../../packages/angular/src/lib/forms/value-accessors/checked-value-accessor.ts","../../../../packages/angular/src/lib/forms/value-accessors/date-value-accessor.ts","../../../../packages/angular/src/lib/forms/value-accessors/time-value-accessor.ts","../../../../packages/angular/src/lib/forms/value-accessors/number-value-accessor.ts","../../../../packages/angular/src/lib/forms/value-accessors/selectedIndex-value-accessor.ts","../../../../packages/angular/src/lib/forms/forms.module.ts","../../../../packages/angular/src/lib/animations/utils.ts","../../../../packages/angular/src/lib/animations/animation-player.ts","../../../../packages/angular/src/lib/animations/animation-driver.ts","../../../../packages/angular/src/lib/animations/animations.module.ts","../../../../packages/angular/src/lib/http/http-utils.ts","../../../../packages/angular/src/lib/http/ns-http-backend.ts","../../../../packages/angular/src/lib/http/http-client.module.ts","../../../../packages/angular/src/lib/legacy/router/router-extensions.ts","../../../../packages/angular/src/lib/legacy/router/ns-router-link.ts","../../../../packages/angular/src/lib/legacy/router/private-imports/router-url-tree.ts","../../../../packages/angular/src/lib/legacy/router/ns-router-link-active.ts","../../../../packages/angular/src/lib/legacy/router/page-router-outlet.ts","../../../../packages/angular/src/lib/legacy/router/ns-platform-location.ts","../../../../packages/angular/src/lib/legacy/router/ns-empty-outlet.component.ts","../../../../packages/angular/src/lib/legacy/router/hmr-route-bootstrap-core.ts","../../../../packages/angular/src/lib/legacy/router/hmr-route-state-core.ts","../../../../packages/angular/src/lib/legacy/router/hmr-route-replay.ts","../../../../packages/angular/src/lib/legacy/router/hmr-route-state.ts","../../../../packages/angular/src/lib/legacy/router/router.module.ts","../../../../packages/angular/src/lib/nativescript-ng-zone.ts","../../../../packages/angular/src/index.ts","../../../../packages/angular/src/nativescript-angular.ts"],"sourcesContent":["import { View } from '@nativescript/core';\nimport { NgView } from './view-types';\n\nconst getClassName = (instance) => instance.constructor.name;\n\nexport abstract class InvisibleNode extends View implements NgView {\n meta: { skipAddToDom: boolean };\n nodeType: number;\n nodeName: string;\n // @ts-expect-error setter\n parentNode: NgView;\n nextSibling: NgView;\n previousSibling: NgView;\n firstChild: NgView;\n lastChild: NgView;\n ngCssClasses: Map<string, boolean>;\n\n constructor(protected name: string = '') {\n super();\n\n this.nodeType = 1;\n this.nodeName = getClassName(this);\n }\n\n toString() {\n return `${this.nodeName}(${this.id})-${this.name}`;\n }\n}\n\nexport class CommentNode extends InvisibleNode {\n protected static id = 0;\n\n constructor(value?: string) {\n super(value);\n\n this.meta = {\n skipAddToDom: true,\n };\n this.id = CommentNode.id.toString();\n CommentNode.id += 1;\n }\n}\n\nexport class TextNode extends InvisibleNode {\n public static textChangeEvent = 'textChange';\n protected static id = 0;\n protected _text = '';\n get text() {\n return this._text;\n }\n set text(t: string) {\n this._text = t;\n this.notify({ eventName: TextNode.textChangeEvent, object: this, value: t });\n }\n callbackMap = new Map<unknown, Array<(evt: any) => void>>();\n\n constructor(value?: string) {\n super(value);\n this._text = value;\n\n this.meta = {\n skipAddToDom: true,\n };\n this.id = TextNode.id.toString();\n TextNode.id += 1;\n }\n\n registerTextChange(callback: (text: string) => void, id: unknown) {\n const cb = (evt) => callback(evt.value);\n const cbArr = this.callbackMap.get(id) || [];\n cbArr.push(cb);\n this.callbackMap.set(id, cbArr);\n this.on('textChange', cb);\n }\n\n unregisterTextChange(id: unknown) {\n const cbArr = this.callbackMap.get(id) || [];\n cbArr.forEach((cb) => this.off('textChange', cb));\n this.callbackMap.delete(id);\n }\n}\n","import { ContentView, LayoutBase, ProxyViewContainer, View, ViewBase } from '@nativescript/core';\nimport { InvisibleNode } from './invisible-nodes';\nimport type { NgContentView, NgLayoutBase, NgView } from './view-types';\n\nexport function isDetachedElement(element: View | NgView): boolean {\n return element && (<NgView>element).meta && (<NgView>element).meta.skipAddToDom;\n}\n\nexport function isView(view: unknown): view is NgView {\n return view instanceof View;\n}\n\nexport function isInvisibleNode(view: unknown): view is InvisibleNode {\n return view instanceof InvisibleNode;\n}\n\nexport function isLayout(view: unknown): view is NgLayoutBase {\n return view instanceof LayoutBase;\n}\n\nexport function isContentView(view: unknown): view is NgContentView {\n return view instanceof ContentView;\n}\n\nexport function getFirstNativeLikeView(view: View, extractFromNSParent = false) {\n if (view instanceof ProxyViewContainer) {\n if (view.getChildrenCount() === 0) {\n return null;\n }\n return getFirstNativeLikeView(view.getChildAt(0));\n }\n\n if (extractFromNSParent) {\n const node = view.parentNode;\n detachViewFromParent(view);\n view.parentNode = node;\n }\n return view;\n}\n\nexport function detachViewFromParent(view: View) {\n const parent = <NgView>view?.parent;\n if (!parent) {\n return;\n }\n if (parent.meta && parent.meta.removeChild) {\n parent.meta.removeChild(parent, view);\n } else if (isLayout(parent)) {\n parent.removeChild(view);\n } else if (isContentView(parent) && parent.content === view) {\n parent.content = null;\n } else if (isView(parent)) {\n parent._removeView(view);\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { IDevice, Page, View } from '@nativescript/core';\n\nexport const APP_ROOT_VIEW = new InjectionToken<View>('NativeScriptAppRootView');\nexport const NATIVESCRIPT_ROOT_MODULE_ID = new InjectionToken<string | number>('NativeScriptRootModuleId');\n\nexport const START_PATH = new InjectionToken<Promise<string> | string>('NativeScriptStartPath');\nexport const ENABLE_REUSABE_VIEWS = new InjectionToken<boolean>('NativeScriptEnableReusableViews');\n\nexport type PageFactory = (options: PageFactoryOptions) => Page;\nexport interface PageFactoryOptions {\n isBootstrap?: boolean;\n isLivesync?: boolean;\n isModal?: boolean;\n isNavigation?: boolean;\n componentType?: any;\n}\n\nexport const DISABLE_ROOT_VIEW_HANDLING = new InjectionToken<boolean>('NativeScriptDisableRootViewHandling');\nexport const DEVICE = new InjectionToken<IDevice>('NativeScriptDevice');\nexport const PAGE_FACTORY = new InjectionToken<PageFactory>('NativeScriptPageFactory');\nexport const defaultPageFactory: PageFactory = function (_opts: PageFactoryOptions) {\n return new Page();\n};\n\nexport const PREVENT_CHANGE_EVENTS_DURING_CD = new InjectionToken<boolean>('NativeScriptPreventChangeEventsDuringCd');\nexport const PREVENT_SPECIFIC_EVENTS_DURING_CD = new InjectionToken<string[]>('NativeScriptPreventSpecificEventsDuringCd');\n","import { Inject, InjectionToken } from '@angular/core';\nimport { DEVICE } from './tokens';\nimport { Device, platformNames } from '@nativescript/core';\n\nexport interface NamespaceFilter {\n runsIn(namespace: string, next: (namespace: string) => boolean | undefined): boolean | undefined;\n}\n\nexport class PlatformNamespaceFilter implements NamespaceFilter {\n constructor(@Inject(DEVICE) private device: typeof Device) {}\n runsIn(namespace: string, next: (namespace: string) => boolean | undefined): boolean | undefined {\n if (namespace === 'android') {\n return this.device.os === platformNames.android;\n }\n if (namespace === 'ios') {\n return this.device.os === platformNames.ios;\n }\n return next(namespace);\n }\n}\n\nexport const NAMESPACE_FILTERS = new InjectionToken<NamespaceFilter[]>('NativeScriptNamespaceFilter');\n","import { ComponentRef, EmbeddedViewRef } from '@angular/core';\nimport { View } from '@nativescript/core';\nimport { detachViewFromParent, getFirstNativeLikeView, InvisibleNode } from './views';\n\nexport interface NgViewRef<T> {\n view: View;\n ref: EmbeddedViewRef<T> | ComponentRef<T>;\n firstNativeLikeView: View;\n}\n\nexport interface NgViewTemplate<T> {\n create(context?: T): View;\n update(view: View, context?: T): void;\n attach(view: View): void;\n detach(view: View): void;\n dispose(view: View): void;\n}\n\nexport class NgViewRef<T> implements NgViewRef<T> {\n /**\n * Component's view instance or first valid template view\n */\n view: View;\n ref: EmbeddedViewRef<T> | ComponentRef<T>;\n /**\n * First valid view that isn't strictly logical (ContentView, ProxyViewContainer, ...)\n * This view *very* likely has a nativeView associated to it.\n */\n firstNativeLikeView: View;\n\n constructor(ref: EmbeddedViewRef<T> | ComponentRef<T>) {\n this.ref = ref;\n this.view = ref instanceof ComponentRef ? ref.location.nativeElement : ref.rootNodes.find((v) => !(v instanceof InvisibleNode));\n this.firstNativeLikeView = getFirstNativeLikeView(this.view);\n }\n\n detachNativeLikeView() {\n detachViewFromParent(this.firstNativeLikeView);\n }\n}\n","import { ContentView, View, ProxyViewContainer, GridLayout, Color, Application } from '@nativescript/core';\n\nexport class AppHostView extends ContentView {\n private _ngAppRoot: View;\n private _content: View;\n private timeout: any = -1;\n\n constructor(backgroundColor: Color) {\n super();\n this.backgroundColor = backgroundColor;\n }\n\n get ngAppRoot(): View {\n return this._ngAppRoot;\n }\n\n set ngAppRoot(value: View) {\n this._ngAppRoot = value;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-ignore\n get content(): View {\n return this._content;\n }\n\n set content(value: View) {\n if (this._content) {\n this._content.parentNode = undefined;\n }\n\n this._content = value;\n\n if (value) {\n this._content.parentNode = this;\n }\n\n this.ngAppRoot = value;\n\n if (this._content instanceof ProxyViewContainer) {\n const grid = new GridLayout();\n grid.backgroundColor = this.backgroundColor;\n grid.addChild(this._content);\n this.ngAppRoot = grid;\n }\n if (this.ngAppRoot) {\n // maybe use this approach\n // this.scheduleRootChange();\n }\n }\n\n scheduleRootChange() {\n if (this.timeout === -1) {\n this.timeout = setTimeout(() => {\n //console.log(this.ngAppRoot);\n Application.resetRootView({\n create: () => this.content,\n });\n this.timeout = -1;\n }, 0);\n }\n }\n}\n\nexport class AppHostAsyncView extends GridLayout {\n constructor(backgroundColor: Color) {\n super();\n this.backgroundColor = backgroundColor;\n }\n\n get ngAppRoot(): View {\n return this;\n }\n\n set ngAppRoot(value: View) {\n // ignored\n }\n}\n","type AngularCoreWithCompiledComponentReset = {\n ɵresetCompiledComponents?: () => void;\n};\n\ntype AngularCoreHolder = {\n __NS_ANGULAR_CORE__?: AngularCoreWithCompiledComponentReset | null;\n};\n\nexport function setAngularCoreForHmr(\n core: AngularCoreWithCompiledComponentReset | null | undefined,\n globalObj: AngularCoreHolder = globalThis as AngularCoreHolder,\n): AngularCoreWithCompiledComponentReset | null | undefined {\n if (core) {\n globalObj.__NS_ANGULAR_CORE__ = core;\n }\n\n return getAngularCoreForHmrReset(core, globalObj);\n}\n\nexport function getAngularCoreForHmrReset(\n core: AngularCoreWithCompiledComponentReset | null | undefined,\n globalObj: AngularCoreHolder = globalThis as AngularCoreHolder,\n): AngularCoreWithCompiledComponentReset | null | undefined {\n return globalObj.__NS_ANGULAR_CORE__ || core;\n}\n\nexport function rememberAngularCoreForHmr(\n core: AngularCoreWithCompiledComponentReset | null | undefined,\n globalObj: AngularCoreHolder = globalThis as AngularCoreHolder,\n): AngularCoreWithCompiledComponentReset | null | undefined {\n if (!globalObj.__NS_ANGULAR_CORE__ && core) {\n globalObj.__NS_ANGULAR_CORE__ = core;\n }\n\n return getAngularCoreForHmrReset(core, globalObj);\n}\n\nexport function resetAngularHmrCompiledComponents(\n core: AngularCoreWithCompiledComponentReset | null | undefined,\n): boolean {\n const resetCompiledComponents = core?.ɵresetCompiledComponents;\n if (typeof resetCompiledComponents !== 'function') {\n return false;\n }\n\n try {\n resetCompiledComponents.call(core);\n return true;\n } catch {\n return false;\n }\n}","/**\n * Centralised dev-mode + HMR detection for `@nativescript/angular` helpers.\n *\n * The package ships HMR scaffolding (route tracker, route replay, modal\n * preservation, compiled-component reset) that subscribes to long-lived\n * router and bootstrap streams. None of that work belongs in a production\n * binary — it would attach observers that never fire and keep references\n * that confuse Angular's destroy logic.\n *\n * Every HMR helper consults {@link isAngularHmrEnabled} from its\n * constructor. The check is intentionally cheap (no network, no I/O) so it\n * is safe to call in dependency-injection factories and in fast paths.\n *\n * Detection cascade (returns the first match):\n * 1. **Production build short-circuit** — `ngDevMode === false` means\n * Angular built the app in production mode. We bail immediately.\n * 2. **NativeScript Vite dev signal** — see\n * {@link isNativeScriptViteHmrActive}. We accept either of the two\n * persistent globals the NS Vite root-placeholder installer manages\n * (`__NS_DEV_PLACEHOLDER_ROOT_EARLY__` during early boot,\n * `__NS_HMR_BOOT_COMPLETE__` after the real app root commits) so\n * services that are constructed *after* the placeholder has handed\n * off — e.g. `NativeDialog` instantiated lazily when the user opens\n * their first modal — still detect HMR correctly.\n * 3. **Webpack HMR signal** — `globalThis.__webpack_require__` is set\n * when the webpack runtime is loaded. Combined with the `ngDevMode`\n * short-circuit above, its presence means \"webpack dev\". The\n * production webpack runtime also sets the global, but `ngDevMode`\n * would already be `false`, so the production case never reaches\n * here.\n *\n * If none of these match, the caller should treat HMR as disabled and\n * skip subscribing to disposal/bootstrap streams.\n *\n * The webpack signal lives on `globalThis` rather than `import.meta` so\n * this file compiles cleanly under `--module commonjs` (the jest spec\n * compiler) and under `--module esnext` (the library build).\n */\n\ndeclare const ngDevMode: boolean | undefined;\n\nexport function isAngularHmrEnabled(): boolean {\n if (typeof ngDevMode !== 'undefined' && ngDevMode === false) {\n return false;\n }\n return isNativeScriptViteHmrActive() || isWebpackHmrActive();\n}\n\n/**\n * True when the NativeScript Vite dev HMR runtime is active. This is the\n * most reliable signal that the project's `nativescript.config.ts` set\n * `bundler: 'vite'` AND we are running the dev server.\n *\n * The NS Vite root-placeholder installer manages two persistent globals:\n * - `__NS_DEV_PLACEHOLDER_ROOT_EARLY__` is set the moment the placeholder\n * runs (very early, before the real app boots), then **deleted** by\n * `clearPlaceholderGlobals` once `tryFinalizeBootPlaceholder` succeeds.\n * - `__NS_HMR_BOOT_COMPLETE__` is set in the same finalize step and is\n * **never deleted** for the lifetime of the dev session.\n *\n * Callers run the gamut of timing — e.g. the route tracker is constructed\n * during bootstrap (early flag still set) but `NativeDialog` is typically\n * instantiated lazily when the user opens their first modal (early flag\n * already cleared, complete flag set). Checking either global covers both\n * windows. If we only checked the early flag, every late-instantiated\n * service would silently no-op and HMR features (modal preservation,\n * route replay) would appear broken in development.\n */\nexport function isNativeScriptViteHmrActive(): boolean {\n const g = globalThis as {\n __NS_DEV_PLACEHOLDER_ROOT_EARLY__?: unknown;\n __NS_HMR_BOOT_COMPLETE__?: unknown;\n };\n return !!(g.__NS_DEV_PLACEHOLDER_ROOT_EARLY__ || g.__NS_HMR_BOOT_COMPLETE__);\n}\n\n/**\n * True when the webpack runtime is loaded. The webpack runtime sets\n * `__webpack_require__` on `globalThis` whenever a webpack bundle is\n * executing — both in dev and prod. Callers gate on\n * {@link isAngularHmrEnabled} (not this directly) so the production\n * short-circuit fires first.\n */\nexport function isWebpackHmrActive(): boolean {\n return typeof (globalThis as { __webpack_require__?: unknown }).__webpack_require__ === 'function';\n}\n\n/**\n * True when Angular reports we are running with dev-mode flags. Useful\n * for code paths that want to opt out of cost in production but don't\n * care which bundler is running.\n */\nexport function isAngularDevMode(): boolean {\n if (typeof ngDevMode === 'undefined') {\n return true;\n }\n return ngDevMode !== false;\n}\n","import { Trace } from '@nativescript/core';\n\nexport class NativeScriptDebug {\n static readonly animationsTraceCategory = 'ns-animations';\n static readonly rendererTraceCategory = 'ns-renderer';\n static readonly viewUtilCategory = 'ns-view-util';\n static readonly routerTraceCategory = 'ns-router';\n static readonly routeReuseStrategyTraceCategory = 'ns-route-reuse-strategy';\n static readonly listViewTraceCategory = 'ns-list-view';\n static readonly bootstrapCategory = 'bootstrap';\n static readonly hmrTraceCategory = 'ns-ng-hmr';\n // TODO: migrate all usage to this - avoids extraneous method executions\n static readonly enabled = Trace.isEnabled();\n\n static isLogEnabled() {\n return Trace.isEnabled();\n }\n\n static animationsLog(message: string): void {\n Trace.write(message, NativeScriptDebug.animationsTraceCategory);\n }\n\n static rendererLog(msg): void {\n Trace.write(msg, NativeScriptDebug.rendererTraceCategory);\n }\n\n static rendererError(message: string): void {\n Trace.write(message, NativeScriptDebug.rendererTraceCategory, Trace.messageType.error);\n }\n\n static viewUtilLog(msg): void {\n Trace.write(msg, NativeScriptDebug.viewUtilCategory);\n }\n\n static routerLog(message: string): void {\n Trace.write(message, NativeScriptDebug.routerTraceCategory);\n }\n\n static routerError(message: string): void {\n Trace.write(message, NativeScriptDebug.routerTraceCategory, Trace.messageType.error);\n }\n\n static routeReuseStrategyLog(message: string): void {\n Trace.write(message, NativeScriptDebug.routeReuseStrategyTraceCategory);\n }\n\n static styleError(message: string): void {\n Trace.write(message, Trace.categories.Style, Trace.messageType.error);\n }\n\n static listViewLog(message: string): void {\n Trace.write(message, NativeScriptDebug.listViewTraceCategory);\n }\n\n static listViewError(message: string): void {\n Trace.write(message, NativeScriptDebug.listViewTraceCategory, Trace.messageType.error);\n }\n\n static bootstrapLog(message: string): void {\n Trace.write(message, NativeScriptDebug.bootstrapCategory);\n }\n\n static bootstrapLogError(message: string): void {\n Trace.write(message, NativeScriptDebug.bootstrapCategory, Trace.messageType.error);\n }\n\n static hmrLog(message: string): void {\n Trace.write(message, NativeScriptDebug.hmrTraceCategory);\n }\n\n static hmrLogError(message: string): void {\n Trace.write(message, NativeScriptDebug.hmrTraceCategory, Trace.messageType.error);\n }\n}\n","/**\n * Fresh-class registry for HMR.\n *\n * After an HMR reboot, every previously imported component module is\n * re-evaluated. Each `@Component()`-decorated class becomes a *new* class\n * object — it shares the source name (e.g. `ResourceModalComponent`) but\n * has a different identity from the class the host code captured before\n * the reboot.\n *\n * Helpers like `NativeDialog._restoreSingleDialog` need to re-open a\n * captured modal *with the new class so the visual update applies*.\n * Holding onto the pre-reboot class reference reopens the modal with\n * the old metadata, which manifests as \"the change appears the next\n * time I close and re-open the modal myself, but not when HMR auto-\n * reopens it.\"\n *\n * The mechanism is:\n *\n * 1. The Vite plugin `ns-component-hmr-register` (in\n * `@nativescript/vite/configuration/angular`) injects a\n * registration call at the end of every user `.ts` file that\n * defines an `@Component`-decorated class:\n *\n * if (typeof globalThis.__NS_HMR_REGISTER_COMPONENT__ === 'function') {\n * try { globalThis.__NS_HMR_REGISTER_COMPONENT__(\n * 'ResourceModalComponent', ResourceModalComponent, import.meta.url\n * ); } catch {}\n * }\n *\n * 2. This module installs `__NS_HMR_REGISTER_COMPONENT__` on\n * `globalThis` so module re-evaluations after an HMR reboot\n * replace the previously-registered class with the fresh one.\n *\n * 3. HMR helpers (modal restore, route replay) read the registry\n * via {@link getFreshComponentClass} to swap in the fresh class.\n *\n * This avoids patching `ɵɵdefineComponent` directly, which is exported\n * as an immutable ESM namespace binding from `@angular/core` — patch\n * attempts silently fail (the assignment is a no-op under strict\n * mode) so the registry never gets populated. With the self-\n * registration approach the binding stays untouched and we don't\n * depend on Angular's internal export shape.\n *\n * Production short-circuit: the registrar is only installed when\n * {@link isAngularHmrEnabled} reports dev + (vite | webpack). In a\n * production build the global hook is never assigned and the Vite\n * plugin only runs in `apply: 'serve'`, so the registration calls\n * never reach the runtime.\n */\n\nimport { isAngularDevMode, isAngularHmrEnabled } from './hmr-environment';\nimport { NativeScriptDebug } from './trace';\n\nconst REGISTRY_KEY = '__NS_ANGULAR_HMR_CLASS_REGISTRY__';\nconst REGISTRY_META_KEY = '__NS_ANGULAR_HMR_CLASS_META__';\nconst REGISTRAR_HOOK = '__NS_HMR_REGISTER_COMPONENT__';\nconst REGISTRAR_INSTALLED_FLAG = '__NS_ANGULAR_HMR_REGISTRAR_INSTALLED__';\n\n/**\n * Diagnostic: counters that survive across HMR cycles via globalThis.\n * Used to spot patterns like \"the same class registered N times in a\n * single cycle\" or \"a brand-new class object every cycle\".\n */\nconst DIAG_KEY = '__NS_HMR_DIAG__';\ninterface DiagSlot {\n [DIAG_KEY]?: {\n cycle: number;\n registerCalls: number;\n classIdentities: Map<string, Set<unknown>>;\n classRegisterCounts: Map<string, number>;\n /** A short id assigned the first time we see a given class object. */\n classIds: WeakMap<object, string>;\n classIdNext: number;\n };\n}\nfunction getDiag() {\n const slot = globalThis as unknown as DiagSlot;\n if (!slot[DIAG_KEY]) {\n slot[DIAG_KEY] = {\n cycle: 0,\n registerCalls: 0,\n classIdentities: new Map(),\n classRegisterCounts: new Map(),\n classIds: new WeakMap(),\n classIdNext: 1,\n };\n }\n return slot[DIAG_KEY]!;\n}\n/** Get/assign a short stable id for a class object. */\nfunction getClassId(diag: ReturnType<typeof getDiag>, cls: object): string {\n let id = diag.classIds.get(cls);\n if (!id) {\n id = `c${diag.classIdNext++}`;\n diag.classIds.set(cls, id);\n }\n return id;\n}\n/**\n * Class-registry HMR diagnostic.\n */\nfunction diagLog(message: string): void {\n if (!isAngularHmrEnabled()) return;\n if (!NativeScriptDebug.isLogEnabled()) return;\n NativeScriptDebug.hmrLog(`[class-registry] ${message}`);\n}\n/**\n * Log helper for \"must surface at module-load time\" messages — fires\n * for any dev-mode build (not gated on the HMR-globals check) so the\n * one-shot \"registrar installed\" line doesn't get suppressed by a\n * module-load ordering race. \n */\nfunction bootLog(message: string): void {\n if (!isAngularDevMode()) return;\n if (!NativeScriptDebug.isLogEnabled()) return;\n NativeScriptDebug.hmrLog(`[class-registry] ${message}`);\n}\n/**\n * Public so callers from application.ts can bump the cycle counter when\n * a new HMR reboot starts. Kept as a free function (not a class method)\n * to avoid forcing more imports on the application module.\n *\n * Self-heal: by the time we hit cycle bump, dev/HMR globals are\n * definitely set (`__NS_HMR_BOOT_COMPLETE__` was set before the first\n * HMR cycle ever runs). Some module-load orderings end up with\n * `installAngularHmrComponentRegistrar()` called before the early\n * placeholder global was set, so the registrar would have returned\n * early and never installed the hook. Re-attempting here closes that\n * window — `installAngularHmrComponentRegistrar()` is idempotent.\n */\nexport function _hmrDiagBumpCycle(): number {\n const diag = getDiag();\n diag.cycle += 1;\n diagLog(`---- cycle ${diag.cycle} start ----`);\n installAngularHmrComponentRegistrar();\n return diag.cycle;\n}\n/** Public for tests. */\nexport function _hmrDiagSnapshot(): { cycle: number; registerCalls: number; namesSeen: number } {\n const diag = getDiag();\n return {\n cycle: diag.cycle,\n registerCalls: diag.registerCalls,\n namesSeen: diag.classIdentities.size,\n };\n}\n\n/** Shape of the global registry. Exposed for tests; runtime callers use the helpers below. */\nexport type HmrClassRegistry = Map<string, unknown>;\n\n/** Optional metadata kept alongside each registered class — currently the source `import.meta.url`. */\nexport interface HmrClassMeta {\n /** `import.meta.url` of the module that registered the class, or empty string. */\n url: string;\n /** Cycle the registration most recently happened in. */\n cycle: number;\n}\nexport type HmrClassMetaRegistry = Map<string, HmrClassMeta>;\n\ninterface GlobalRegistrySlot {\n [REGISTRY_KEY]?: HmrClassRegistry;\n [REGISTRY_META_KEY]?: HmrClassMetaRegistry;\n [REGISTRAR_INSTALLED_FLAG]?: boolean;\n [REGISTRAR_HOOK]?: (name: string, cls: unknown, url?: string) => void;\n}\n\nfunction getRegistry(): HmrClassRegistry {\n const slot = globalThis as unknown as GlobalRegistrySlot;\n let registry = slot[REGISTRY_KEY];\n if (!registry) {\n registry = new Map<string, unknown>();\n slot[REGISTRY_KEY] = registry;\n }\n return registry;\n}\n\nfunction getMetaRegistry(): HmrClassMetaRegistry {\n const slot = globalThis as unknown as GlobalRegistrySlot;\n let registry = slot[REGISTRY_META_KEY];\n if (!registry) {\n registry = new Map<string, HmrClassMeta>();\n slot[REGISTRY_META_KEY] = registry;\n }\n return registry;\n}\n\n/**\n * Internal: write a class into the registry. Exposed for unit tests\n * (which can call this directly to simulate a Vite-injected\n * registration without spinning up the Vite plugin pipeline).\n *\n * Production callers should never need this — user code just calls\n * the global `__NS_HMR_REGISTER_COMPONENT__` hook installed by\n * {@link installAngularHmrComponentRegistrar}.\n */\nexport function _registerComponentForHmr(name: string, cls: unknown, url = ''): void {\n if (!name || typeof name !== 'string') return;\n if (cls === undefined || cls === null) return;\n\n const registry = getRegistry();\n const meta = getMetaRegistry();\n const previous = registry.get(name);\n registry.set(name, cls);\n meta.set(name, { url: url || '', cycle: getDiag().cycle });\n\n const d = getDiag();\n d.registerCalls += 1;\n if (typeof cls === 'object' || typeof cls === 'function') {\n const classId = getClassId(d, cls as object);\n let identitySet = d.classIdentities.get(name);\n if (!identitySet) {\n identitySet = new Set<unknown>();\n d.classIdentities.set(name, identitySet);\n }\n identitySet.add(cls);\n d.classRegisterCounts.set(name, (d.classRegisterCounts.get(name) ?? 0) + 1);\n\n // Only log a small set of \"interesting\" components to keep noise\n // manageable. Verbose mode is enabled by setting\n // globalThis.__NS_HMR_DIAG_VERBOSE = true (e.g. from the user\n // app's main.ts) when we want all names.\n const verbose = !!(globalThis as { __NS_HMR_DIAG_VERBOSE?: boolean }).__NS_HMR_DIAG_VERBOSE;\n const watchPattern = (globalThis as { __NS_HMR_DIAG_WATCH?: RegExp | string }).__NS_HMR_DIAG_WATCH;\n const matches = watchPattern instanceof RegExp ? watchPattern.test(name) : typeof watchPattern === 'string' ? name.includes(watchPattern) : /Modal|Dialog/.test(name);\n if (verbose || matches) {\n diagLog(\n `register name=${name} classId=${classId} sameAsPrev=${previous === cls} cycle=${d.cycle} totalIdentitiesForName=${identitySet.size} registerCountForName=${d.classRegisterCounts.get(name)} url=${url || '(none)'}`,\n );\n }\n }\n}\n\n/**\n * Install the cross-module `__NS_HMR_REGISTER_COMPONENT__` hook on\n * `globalThis`. The Vite plugin `ns-component-hmr-register` injects\n * a call to this hook at the end of every user `.ts` file that\n * defines an `@Component`-decorated class, so re-evaluations after\n * an HMR reboot keep the registry pointed at the live class.\n *\n * Idempotent: calling twice is a no-op (the second call sees the\n * installed flag and returns).\n *\n * The hook is installed unconditionally — it's a single function\n * reference on globalThis with negligible cost. Production builds\n * never reach this code path because the Vite plugin\n * `ns-component-hmr-register` runs only with `apply: 'serve'`, so\n * the hook is never *called* in production. We previously gated\n * this on `isAngularHmrEnabled()` but that check depends on\n * NativeScript Vite globals (`__NS_DEV_PLACEHOLDER_ROOT_EARLY__` /\n * `__NS_HMR_BOOT_COMPLETE__`) that are set imperatively from\n * `main-entry.ts`. Module-load ordering can put `application.ts`\n * evaluation *before* those globals are set in some startup paths,\n * causing the install to silently no-op while the Vite plugin\n * happily emits registration calls into user `.ts` files. The end\n * result was an empty registry and `getFreshComponentClass` always\n * reporting `reason=no-registry`. Removing the gate eliminates\n * that race entirely.\n */\nexport function installAngularHmrComponentRegistrar(): void {\n const slot = globalThis as unknown as GlobalRegistrySlot;\n if (slot[REGISTRAR_INSTALLED_FLAG]) {\n return;\n }\n\n // Define the hook BEFORE marking installed so concurrent module\n // initializers see the function as soon as the flag is observable.\n slot[REGISTRAR_HOOK] = (name: string, cls: unknown, url?: string) => {\n try {\n _registerComponentForHmr(name, cls, typeof url === 'string' ? url : '');\n } catch (err) {\n // Registration is best-effort — never break a user module load\n // because of a registration failure.\n diagLog(`registrar threw for ${name}: ${(err as Error)?.message ?? err}`);\n }\n };\n slot[REGISTRAR_INSTALLED_FLAG] = true;\n\n bootLog('installAngularHmrComponentRegistrar installed global hook __NS_HMR_REGISTER_COMPONENT__');\n}\n\n/**\n * Look up the freshest registered component class for a given name, or\n * `undefined` if no match. HMR helpers (e.g. dialog restore) call this\n * with the captured class's `.name` to find the live class after a\n * reboot. Returns `undefined` in production builds because the registrar\n * is never installed there.\n */\nexport function getFreshComponentClass<T = unknown>(name: string): T | undefined {\n if (!name) return undefined;\n const slot = globalThis as unknown as GlobalRegistrySlot;\n const registry = slot[REGISTRY_KEY];\n // Diagnostics: log every lookup with the resolved class id so the\n // restore path can be cross-referenced against register emissions.\n if (registry) {\n const value = registry.get(name) as T | undefined;\n const diag = getDiag();\n const classId = value && (typeof value === 'object' || typeof value === 'function') ? getClassId(diag, value as unknown as object) : '(none)';\n const knownNames = registry.size;\n diagLog(`getFreshComponentClass name=${name} found=${!!value} classId=${classId} registrySize=${knownNames}`);\n return value;\n }\n diagLog(`getFreshComponentClass name=${name} found=false reason=no-registry`);\n return undefined;\n}\n\n/**\n * Look up the source URL (`import.meta.url`) recorded for a registered\n * component. Used by HMR helpers that need to force a fresh import of\n * a lazily-loaded module (e.g. modals whose static import chain doesn't\n * walk the bootstrap path).\n *\n * Returns `undefined` if the name was never registered or if no URL was\n * provided at registration time.\n */\nexport function getRegisteredComponentUrl(name: string): string | undefined {\n if (!name) return undefined;\n const slot = globalThis as unknown as GlobalRegistrySlot;\n const meta = slot[REGISTRY_META_KEY];\n const entry = meta?.get(name);\n return entry?.url || undefined;\n}\n\n/**\n * Test/debug helper: clear all registered classes. Production callers\n * never need this; the registry stays empty without the registrar.\n */\nexport function clearAngularHmrClassRegistry(): void {\n const slot = globalThis as unknown as GlobalRegistrySlot;\n slot[REGISTRY_KEY] = undefined;\n slot[REGISTRY_META_KEY] = undefined;\n slot[REGISTRAR_INSTALLED_FLAG] = undefined;\n slot[REGISTRAR_HOOK] = undefined;\n // Also reset diag so test isolation isn't broken by counts leaking.\n const diagSlot = globalThis as unknown as DiagSlot;\n diagSlot[DIAG_KEY] = undefined;\n}\n","import type { Injector } from '@angular/core';\nimport { NativeScriptDebug } from './trace';\n\n/**\n * Registry for HMR-aware services that need to be eagerly instantiated\n * after each Angular bootstrap so they can attach long-lived subscriptions\n * (e.g. to `postAngularBootstrap$`) before the user's app code starts\n * interacting with the new module realm.\n *\n * The registry lives on `globalThis` so consumers in different module\n * realms — including pre-bundled vendor copies of this package — can\n * register the same callback set without depending on import order. The\n * registry is **idempotent**: registering the same function reference\n * twice is a no-op.\n *\n * Production usage is gated by callers (see `dialog-services.ts`'s\n * `isAngularHmrEnabled()` check) so registrations never accumulate in\n * shipping builds.\n *\n * Failure handling: `runHmrEagerInstantiators` swallows per-callback\n * exceptions intentionally. A buggy registrant must never abort\n * bootstrap. The handler can return diagnostics via the optional\n * `onError` parameter so the application module can route failures to\n * the bootstrap log channel instead of silently dropping them.\n */\nexport type HmrEagerInstantiator = (injector: Injector) => void;\n\nconst REGISTRY_KEY = '__NS_HMR_EAGER_SERVICES__';\nconst REGISTER_KEY = '__NS_REGISTER_HMR_EAGER_SERVICE__';\n\n/**\n * Diagnostic helper.\n */\nfunction eagerDiag(message: string): void {\n const g = globalThis as { __NS_DEV_PLACEHOLDER_ROOT_EARLY__?: unknown; __NS_HMR_BOOT_COMPLETE__?: unknown; ngDevMode?: boolean };\n const ngDev = (typeof g.ngDevMode === 'boolean') ? g.ngDevMode : true;\n const viteHmr = !!g.__NS_DEV_PLACEHOLDER_ROOT_EARLY__ || !!g.__NS_HMR_BOOT_COMPLETE__;\n if (!(ngDev && viteHmr)) return;\n if (!NativeScriptDebug.isLogEnabled()) return;\n NativeScriptDebug.hmrLog(`[eager] ${message}`);\n}\n\ninterface HmrEagerGlobals {\n [REGISTRY_KEY]?: HmrEagerInstantiator[];\n [REGISTER_KEY]?: (fn: HmrEagerInstantiator) => void;\n}\n\nfunction getStore(): HmrEagerGlobals {\n return globalThis as unknown as HmrEagerGlobals;\n}\n\n/**\n * Returns the live (mutable) array of registered eager instantiators.\n * Callers must not mutate it directly outside of the helpers in this\n * module — use {@link registerHmrEagerInstantiator} or\n * {@link clearHmrEagerInstantiators} instead.\n */\nexport function getRegisteredHmrEagerInstantiators(): HmrEagerInstantiator[] {\n const store = getStore();\n const list = store[REGISTRY_KEY];\n if (!Array.isArray(list)) {\n const fresh: HmrEagerInstantiator[] = [];\n store[REGISTRY_KEY] = fresh;\n return fresh;\n }\n return list;\n}\n\n/**\n * Idempotently register an instantiator callback. Returns `true` when the\n * callback was added, `false` when it was already present.\n */\nexport function registerHmrEagerInstantiator(fn: HmrEagerInstantiator): boolean {\n if (typeof fn !== 'function') {\n return false;\n }\n const list = getRegisteredHmrEagerInstantiators();\n if (list.includes(fn)) {\n eagerDiag(`registerHmrEagerInstantiator dedup (already present) listSize=${list.length}`);\n return false;\n }\n list.push(fn);\n eagerDiag(`registerHmrEagerInstantiator added newSize=${list.length} fnName=${fn.name || '(anon)'}`);\n return true;\n}\n\n/**\n * Clear all registered instantiators. Tests use this to reset state\n * between specs; production code should not call it.\n */\nexport function clearHmrEagerInstantiators(): void {\n const list = getRegisteredHmrEagerInstantiators();\n list.length = 0;\n}\n\n/**\n * Install the cross-module registration entry point on `globalThis` so\n * consumer modules (e.g. `dialog-services.ts`) can register without\n * statically importing this file. Idempotent across multiple calls so\n * application.ts can call it on every reboot without leaking state.\n */\nexport function installHmrEagerRegistrar(): void {\n const store = getStore();\n if (typeof store[REGISTER_KEY] === 'function') {\n return;\n }\n store[REGISTER_KEY] = (fn: HmrEagerInstantiator) => {\n registerHmrEagerInstantiator(fn);\n };\n}\n\n/**\n * Invoke every registered instantiator with the bootstrapped injector.\n * Per-callback exceptions are swallowed; pass `onError` to receive them\n * for logging.\n */\nexport function runHmrEagerInstantiators(\n injector: Injector | null | undefined,\n onError?: (err: unknown) => void,\n): void {\n if (!injector) {\n eagerDiag(`runHmrEagerInstantiators called without injector — no-op`);\n return;\n }\n const list = getRegisteredHmrEagerInstantiators();\n eagerDiag(`runHmrEagerInstantiators list.length=${list.length}`);\n if (list.length === 0) {\n return;\n }\n for (let i = 0; i < list.length; i++) {\n const fn = list[i];\n try {\n eagerDiag(`runHmrEagerInstantiators calling [${i}] ${fn.name || '(anon)'}`);\n fn(injector);\n } catch (err) {\n eagerDiag(`runHmrEagerInstantiators [${i}] threw: ${(err as Error)?.message ?? err}`);\n if (onError) {\n try {\n onError(err);\n } catch {\n // The error reporter must not itself break the loop.\n }\n }\n }\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\n@Injectable({ providedIn: 'root' })\nexport class NativeScriptLoadingService implements OnDestroy {\n private mainModuleReady$ = new BehaviorSubject(false);\n readyToDestroy$ = new BehaviorSubject(true);\n onMainModuleReady$ = this.mainModuleReady$.pipe(filter((ready) => ready));\n\n /**\n * delays destroying this module until `notifyReadyToDestroy()`.\n * remember to call `notifyReadyToDestroy()` when done!\n */\n waitUntilNotified() {\n this.readyToDestroy$.next(false);\n }\n\n /**\n * notifies this module is ready to be destroyed\n */\n notifyReadyToDestroy() {\n this.readyToDestroy$.next(true);\n }\n isMainModuleReady() {\n return this.mainModuleReady$.value;\n }\n ngOnDestroy() {\n this.readyToDestroy$.complete();\n this.mainModuleReady$.complete();\n }\n\n /**\n * This funcion is called by the bootstrap code when the app is ready\n * @internal\n */\n _notifyMainModuleReady() {\n this.mainModuleReady$.next(true);\n }\n}\n","type AngularHmrRouteLike = {\n children?: AngularHmrRouteLike[];\n _injector?: unknown;\n _loadedComponent?: unknown;\n _loadedInjector?: unknown;\n _loadedNgModuleFactory?: unknown;\n _loadedRoutes?: AngularHmrRouteLike[];\n};\n\nconst ROUTE_CACHE_KEYS = ['_loadedComponent', '_loadedInjector', '_loadedNgModuleFactory', '_loadedRoutes', '_injector'] as const;\n\nfunction destroyRouteCacheValue(value: unknown): void {\n if (!value || typeof value !== 'object') {\n return;\n }\n\n const destroy = (value as { destroy?: () => void }).destroy;\n if (typeof destroy === 'function') {\n try {\n destroy.call(value);\n } catch {}\n }\n}\n\nfunction clearRouteCacheField(route: Record<string, unknown>, key: (typeof ROUTE_CACHE_KEYS)[number]): boolean {\n if (!Object.prototype.hasOwnProperty.call(route, key) && route[key] === undefined) {\n return false;\n }\n\n if (key === '_injector' || key === '_loadedInjector' || key === '_loadedNgModuleFactory') {\n destroyRouteCacheValue(route[key]);\n }\n\n try {\n delete route[key];\n } catch {\n try {\n route[key] = undefined;\n } catch {}\n }\n\n return true;\n}\n\nexport function clearAngularHmrRouteConfigCaches(routes: AngularHmrRouteLike[] | undefined | null): number {\n const seen = new Set<AngularHmrRouteLike>();\n let cleared = 0;\n\n const visitRoute = (route: AngularHmrRouteLike | undefined | null): void => {\n if (!route || seen.has(route)) {\n return;\n }\n\n seen.add(route);\n\n const childRoutes = Array.isArray(route.children) ? route.children : [];\n const loadedRoutes = Array.isArray(route._loadedRoutes) ? route._loadedRoutes : [];\n\n for (const childRoute of childRoutes) {\n visitRoute(childRoute);\n }\n\n for (const loadedRoute of loadedRoutes) {\n visitRoute(loadedRoute);\n }\n\n for (const key of ROUTE_CACHE_KEYS) {\n if (clearRouteCacheField(route as Record<string, unknown>, key)) {\n cleared += 1;\n }\n }\n };\n\n for (const route of Array.isArray(routes) ? routes : []) {\n visitRoute(route);\n }\n\n return cleared;\n}","import { Injectable } from '@angular/core';\nimport { Frame } from '@nativescript/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FrameService {\n // TODO: Add any methods that are needed to handle frame/page navigation\n getFrame(): Frame {\n return Frame.topmost();\n }\n}\n","import { Frame, NavigationTransition } from '@nativescript/core';\nimport { DefaultUrlSerializer, UrlSegmentGroup, UrlTree, ActivatedRouteSnapshot, Params } from '@angular/router';\n\nexport interface LocationState {\n queryParams: Params;\n segmentGroup: UrlSegmentGroup;\n isRootSegmentGroup: boolean;\n isPageNavigation: boolean;\n frame?: Frame;\n}\n\nexport interface NavigationOptions {\n clearHistory?: boolean;\n animated?: boolean;\n transition?: NavigationTransition;\n replaceUrl?: boolean;\n}\n\nexport class Outlet {\n showingModal: boolean;\n modalNavigationDepth: number;\n parent: Outlet;\n _navigatingBackOutlets = new Set<string>();\n get isPageNavigationBack() {\n return this._navigatingBackOutlets.size > 0;\n }\n set isPageNavigationBack(isBack: boolean) {\n if (!isBack) {\n if (this._navigatingBackOutlets.size > 0) {\n this._navigatingBackOutlets.delete(this._navigatingBackOutlets.values().next().value);\n }\n } else {\n for (const key of this.outletKeys) {\n this._navigatingBackOutlets.add(key);\n }\n }\n }\n\n // More than one key available when using NSEmptyOutletComponent component\n // in module that lazy loads children (loadChildren) and has outlet name.\n outletKeys: Array<string>;\n\n // More than one frame available when using NSEmptyOutletComponent component\n // in module that lazy loads children (loadChildren) and has outlet name.\n frames: Array<Frame> = [];\n // The url path to the Outlet.\n // E.G: the path to Outlet3 that is nested Outlet1(home)->Outlet2(nested1)->Outlet3(nested2)\n // will be 'home/nested1'\n path: string;\n pathByOutlets: string;\n states: Array<LocationState> = [];\n isNSEmptyOutlet: boolean;\n\n // Used in reuse-strategy by its children to determine if they should be detached too.\n shouldDetach = true;\n constructor(outletKey: string, path: string, pathByOutlets: string, modalNavigationDepth?: number) {\n this.outletKeys = [outletKey];\n this.isPageNavigationBack = false;\n this.showingModal = false;\n this.modalNavigationDepth = modalNavigationDepth || 0;\n this.pathByOutlets = pathByOutlets;\n this.path = path;\n }\n\n setOutletKeyNavigatingBack(key: string) {\n const nests = key.split('/');\n this.outletKeys\n .filter((k) => k.split('/').length >= nests.length)\n .forEach((k) => {\n this._navigatingBackOutlets.add(k);\n });\n }\n\n containsFrame(frame: Frame): boolean {\n return this.frames.indexOf(frame) > -1;\n }\n\n peekState(): LocationState {\n if (this.states.length > 0) {\n return this.states[this.states.length - 1];\n }\n return null;\n }\n\n containsTopState(stateUrl: string): boolean {\n const lastState = this.peekState();\n return lastState && lastState.segmentGroup.toString() === stateUrl;\n }\n\n // Search for frame that can go back.\n // Nested 'primary' outlets could result in Outlet with multiple navigatable frames.\n getFrameToBack(): Frame {\n let frame = this.frames[this.frames.length - 1];\n\n if (!this.isNSEmptyOutlet) {\n for (let index = this.frames.length - 1; index >= 0; index--) {\n const currentFrame = this.frames[index];\n if (currentFrame.canGoBack()) {\n frame = currentFrame;\n break;\n }\n }\n }\n\n return frame;\n }\n}\n\nexport const defaultNavOptions: NavigationOptions = {\n clearHistory: false,\n animated: true,\n};\n","import { LocationChangeEvent, LocationStrategy } from '@angular/common';\nimport { Inject, Injectable, Optional, OnDestroy } from '@angular/core';\nimport { ActivatedRouteSnapshot, DefaultUrlSerializer, Params, UrlSegmentGroup, UrlTree } from '@angular/router';\nimport { Frame } from '@nativescript/core';\nimport { START_PATH } from '../../tokens';\nimport { NativeScriptDebug } from '../../trace';\nimport { FrameService } from '../frame.service';\nimport { defaultNavOptions, LocationState, NavigationOptions, Outlet } from './ns-location-utils';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NSLocationStrategy extends LocationStrategy implements OnDestroy {\n private outlets: Array<Outlet> = [];\n private currentOutlet: Outlet;\n\n private popStateCallbacks = new Array<(_: any) => any>();\n private currentUrlTree: UrlTree;\n\n public _modalNavigationDepth = 0;\n\n constructor(\n private frameService: FrameService,\n @Inject(START_PATH) @Optional() private startPath?: string,\n ) {\n super();\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.constructor()');\n }\n }\n\n getState(): unknown {\n return this.currentOutlet && this.currentOutlet.peekState();\n }\n\n resetForHmr() {\n const outletCount = this.outlets.length;\n const stateCount = this.outlets.reduce((total, outlet) => total + outlet.states.length, 0);\n const callbackCount = this.popStateCallbacks.length;\n const hadUrlTree = !!this.currentUrlTree;\n\n this.outlets = [];\n this.currentOutlet = null;\n this.currentUrlTree = null;\n this.popStateCallbacks = [];\n this._modalNavigationDepth = 0;\n\n return {\n outlets: outletCount,\n states: stateCount,\n callbacks: callbackCount,\n hadUrlTree,\n };\n }\n\n path(): string {\n if (!this.currentUrlTree) {\n return this.startPath || '/';\n }\n\n const state = this.currentOutlet && this.currentOutlet.peekState();\n if (!state) {\n return '/';\n }\n\n const tree = this.currentUrlTree;\n const changedOutlet = this.getSegmentGroupByOutlet(this.currentOutlet);\n\n // Handle case where the user declares a component at path \"/\".\n // The url serializer doesn't parse this url as having a primary outlet.\n if (state.isRootSegmentGroup) {\n tree.root = state.segmentGroup;\n } else if (changedOutlet) {\n this.updateSegmentGroup(tree.root, changedOutlet, state.segmentGroup);\n }\n\n const urlSerializer = new DefaultUrlSerializer();\n tree.queryParams = state.queryParams;\n const url = urlSerializer.serialize(tree);\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.path(): ' + url);\n }\n return url;\n }\n\n prepareExternalUrl(internal: string): string {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.prepareExternalUrl() internal: ' + internal);\n }\n return internal;\n }\n\n pushState(state: any, title: string, url: string, queryParams: string): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.pushState state: ' + `${state}, title: ${title}, url: ${url}, queryParams: ${queryParams}`);\n }\n this.pushStateInternal(state, title, url, queryParams);\n }\n\n pushStateInternal(state: any, title: string, url: string, queryParams: string, replace = false): void {\n const urlSerializer = new DefaultUrlSerializer();\n this.currentUrlTree = urlSerializer.parse(url);\n const urlTreeRoot = this.currentUrlTree.root;\n\n // Handle case where the user declares a component at path \"/\".\n // The url serializer doesn't parse this url as having a primary outlet.\n if (!Object.keys(urlTreeRoot.children).length) {\n const segmentGroup = this.currentUrlTree && this.currentUrlTree.root;\n const outletKey = this.getOutletKey(this.getSegmentGroupFullPath(segmentGroup), 'primary');\n const outlet = this.findOutlet(outletKey);\n\n if (outlet && this.updateStates(outlet, segmentGroup, this.currentUrlTree.queryParams, replace)) {\n this.currentOutlet = outlet; // If states updated\n } else if (!outlet) {\n // tslint:disable-next-line:max-line-length\n const rootOutlet = this.createOutlet('primary', null, segmentGroup, null, null, this.currentUrlTree.queryParams);\n this.currentOutlet = rootOutlet;\n }\n\n this.currentOutlet.peekState().isRootSegmentGroup = true;\n return;\n }\n\n const queue = [];\n let currentTree = <any>urlTreeRoot;\n\n while (currentTree) {\n Object.keys(currentTree.children).forEach((outletName) => {\n const currentSegmentGroup = currentTree.children[outletName];\n currentSegmentGroup.outlet = outletName;\n currentSegmentGroup.root = urlTreeRoot;\n\n const outletPath = this.getSegmentGroupFullPath(currentTree);\n const outletKey = this.getOutletKey(outletPath, outletName);\n let outlet = this.findOutlet(outletKey);\n\n const parentOutletName = currentTree.outlet || '';\n const parentOutletPath = this.getSegmentGroupFullPath(currentTree.parent);\n const parentOutletKey = this.getOutletKey(parentOutletPath, parentOutletName);\n const parentOutlet = this.findOutlet(parentOutletKey);\n\n const containsLastState = outlet && outlet.containsTopState(currentSegmentGroup.toString());\n if (!outlet) {\n // tslint:disable-next-line:max-line-length\n outlet = this.createOutlet(outletKey, outletPath, currentSegmentGroup, parentOutlet, this._modalNavigationDepth, this.currentUrlTree.queryParams);\n this.currentOutlet = outlet;\n } else if (this._modalNavigationDepth > 0 && outlet.showingModal && !containsLastState) {\n // Navigation inside modal view.\n this.upsertModalOutlet(outlet, currentSegmentGroup, this.currentUrlTree.queryParams, replace);\n } else {\n outlet.parent = parentOutlet;\n\n if (this.updateStates(outlet, currentSegmentGroup, this.currentUrlTree.queryParams, replace)) {\n this.currentOutlet = outlet; // If states updated\n }\n }\n\n queue.push(currentSegmentGroup);\n });\n\n currentTree = queue.shift();\n }\n }\n\n replaceState(state: any, title: string, url: string, queryParams: string): void {\n const states = this.currentOutlet && this.currentOutlet.states;\n\n if (states && states.length > 0) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.replaceState changing existing state: ' + `${state}, title: ${title}, url: ${url}, queryParams: ${queryParams}`);\n }\n this.pushStateInternal(state, title, url, queryParams, true);\n } else {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.replaceState pushing new state: ' + `${state}, title: ${title}, url: ${url}, queryParams: ${queryParams}`);\n }\n this.pushStateInternal(state, title, url, queryParams);\n }\n }\n\n forward(): void {\n throw new Error('NSLocationStrategy.forward() - not implemented');\n }\n\n back(outlet?: Outlet, frame?: Frame): void {\n this.currentOutlet = outlet || this.currentOutlet;\n\n if (this.currentOutlet.isPageNavigationBack) {\n const states = this.currentOutlet.states;\n // We are navigating to the previous page\n // clear the stack until we get to a page navigation state\n let state = states.pop();\n let count = 1;\n\n if (frame) {\n while (state.frame && state.frame !== frame) {\n state = states.pop();\n count++;\n }\n }\n\n while (!state.isPageNavigation) {\n state = states.pop();\n count++;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`NSLocationStrategy.back() while navigating back. States popped: ${count}`);\n }\n this.callPopState(state, true);\n } else {\n const state = this.currentOutlet.peekState();\n if (state && state.isPageNavigation) {\n // This was a page navigation - so navigate through frame.\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.back() while not navigating back but top' + ' state is page - will call frame.goBack()');\n }\n\n if (!outlet) {\n const topmostFrame = this.frameService.getFrame();\n this.currentOutlet = this.getOutletByFrame(topmostFrame) || this.currentOutlet;\n }\n\n const frameToBack: Frame = this.currentOutlet.getFrameToBack();\n if (frameToBack) {\n frameToBack.goBack();\n }\n } else {\n // Nested navigation - just pop the state\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.back() while not navigating back but top' + ' state is not page - just pop');\n }\n\n this.callPopState(this.currentOutlet.states.pop(), true);\n }\n }\n }\n\n canGoBack(outlet?: Outlet) {\n outlet = outlet || this.currentOutlet;\n return outlet.states.length > 1;\n }\n\n onPopState(fn: (_: any) => any): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.onPopState');\n }\n this.popStateCallbacks.push(fn);\n }\n\n getBaseHref(): string {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.getBaseHref()');\n }\n return '';\n }\n\n private callPopState(state: LocationState, pop: boolean = true, outlet?: Outlet) {\n outlet = outlet || this.currentOutlet;\n const urlSerializer = new DefaultUrlSerializer();\n const changedOutlet = this.getSegmentGroupByOutlet(outlet);\n\n if (state && changedOutlet) {\n this.updateSegmentGroup(this.currentUrlTree.root, changedOutlet, state.segmentGroup);\n } else if (changedOutlet) {\n // when closing modal view there are scenarios (e.g. root viewContainerRef) when we need\n // to clean up the named page router outlet to make sure we will open the modal properly again if needed.\n this.updateSegmentGroup(this.currentUrlTree.root, changedOutlet, null);\n }\n\n const url = urlSerializer.serialize(this.currentUrlTree);\n const change: LocationChangeEvent = { state, type: 'popstate' };\n for (const fn of this.popStateCallbacks) {\n fn(change);\n }\n }\n\n public toString() {\n let result = [];\n\n this.outlets.forEach((outlet) => {\n const outletStates = outlet.states;\n const outletLog = outletStates\n // tslint:disable-next-line:max-line-length\n .map((v, i) => `${outlet.outletKeys}.${i}.[${v.isPageNavigation ? 'PAGE' : 'INTERNAL'}].[${outlet.modalNavigationDepth ? 'MODAL' : 'BASE'}] \"${v.segmentGroup.toString()}\"`)\n .reverse();\n\n result = result.concat(outletLog);\n });\n\n return result.join('\\n');\n }\n\n // Methods for syncing with page navigation in PageRouterOutlet\n public _beginBackPageNavigation(frame: Frame, outletKey: string) {\n const outlet: Outlet = this.getOutletByFrame(frame);\n\n if (!outlet || outlet.isPageNavigationBack) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerError('Attempted to call startGoBack while going back.');\n }\n return;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.startGoBack()');\n }\n outlet.setOutletKeyNavigatingBack(outletKey);\n // outlet.isPageNavigationBack = true;\n // we find all the children and also set their isPageNavigationBack\n this.outlets\n .filter((o) => {\n let parent = o.parent;\n while (parent) {\n if (parent === outlet) {\n return true;\n }\n parent = parent.parent;\n }\n return false;\n })\n .forEach((o) => (o.isPageNavigationBack = true));\n\n this.currentOutlet = outlet;\n }\n\n public _finishBackPageNavigation(frame: Frame) {\n const outlet: Outlet = this.getOutletByFrame(frame);\n\n if (!outlet || !outlet.isPageNavigationBack) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerError('Attempted to call endGoBack while not going back.');\n }\n return;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.finishBackPageNavigation()');\n }\n outlet.isPageNavigationBack = false;\n }\n\n public _beginModalNavigation(frame: Frame): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy._beginModalNavigation()');\n }\n\n this.currentOutlet = this.getOutletByFrame(frame) || this.currentOutlet;\n\n // It is possible to have frame, but not corresponding Outlet, if\n // showing modal dialog on app.component.ts ngOnInit() e.g. In that case\n // the modal is treated as none modal navigation.\n if (this.currentOutlet) {\n this.currentOutlet.showingModal = true;\n this._modalNavigationDepth++;\n }\n }\n\n public _closeModalNavigation() {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.closeModalNavigation()');\n }\n\n const isShowingModal = this._modalNavigationDepth > 0;\n\n if (isShowingModal) {\n this._modalNavigationDepth--;\n }\n\n // currentOutlet should be the one that corresponds to the topmost frame\n const topmostOutlet = this.getOutletByFrame(this.frameService.getFrame());\n const outlet = this.findOutletByModal(this._modalNavigationDepth, isShowingModal) || topmostOutlet;\n\n if (outlet) {\n this.currentOutlet = outlet;\n this.currentOutlet.showingModal = false;\n this.callPopState(this.currentOutlet.peekState(), false);\n // this is needed because angular does a setTimeout on onPopState, so if we don't do this we might end up with inconsistent state\n return new Promise((resolve) => setTimeout(resolve, 0));\n }\n }\n\n public _beginPageNavigation(frame: Frame, options?: NavigationOptions): NavigationOptions {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy._beginPageNavigation()');\n }\n\n this.currentOutlet = this.getOutletByFrame(frame) || this.currentOutlet;\n const lastState = this.currentOutlet.peekState();\n\n if (lastState) {\n lastState.isPageNavigation = true;\n }\n\n const navOptions = options || defaultNavOptions;\n\n if (navOptions.clearHistory) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy._beginPageNavigation clearing states history');\n }\n this.currentOutlet.states = [lastState];\n }\n return navOptions;\n }\n\n public _getOutlets(): Array<Outlet> {\n return this.outlets;\n }\n\n updateOutletFrame(outlet: Outlet, frame: Frame, isEmptyOutletFrame: boolean) {\n const lastState = outlet.peekState();\n\n if (lastState && !lastState.frame && !isEmptyOutletFrame) {\n lastState.frame = frame;\n }\n\n if (!outlet.containsFrame(frame)) {\n outlet.frames.push(frame);\n }\n this.currentOutlet = outlet;\n }\n\n clearOutlet(frame: Frame) {\n this.outlets = this.outlets.filter((currentOutlet) => {\n let isEqualToCurrent;\n\n if (this.currentOutlet) {\n isEqualToCurrent = currentOutlet.pathByOutlets === this.currentOutlet.pathByOutlets;\n }\n\n // Remove outlet from the url tree.\n if (currentOutlet.containsFrame(frame) && !isEqualToCurrent) {\n this.callPopState(null, true, currentOutlet);\n }\n\n // Skip frames filtering since currentOutlet is <router-outlet> when no frames available.\n if (currentOutlet.frames.length && !currentOutlet.isNSEmptyOutlet) {\n currentOutlet.frames = currentOutlet.frames.filter((currentFrame) => currentFrame !== frame);\n return currentOutlet.frames.length;\n }\n\n return !currentOutlet.containsFrame(frame);\n });\n }\n\n getSegmentGroupFullPath(segmentGroup: UrlSegmentGroup): string {\n let fullPath = '';\n\n while (segmentGroup) {\n const url = segmentGroup.toString();\n\n if (fullPath) {\n fullPath = (url ? url + '/' : '') + fullPath;\n } else {\n fullPath = url;\n }\n\n segmentGroup = segmentGroup.parent;\n }\n\n return fullPath;\n }\n\n getRouteFullPath(currentRoute: any): string {\n const outletName = currentRoute.outlet;\n let fullPath;\n\n currentRoute = currentRoute.parent;\n while (currentRoute) {\n const urls = currentRoute.url.value || currentRoute.url;\n let url = urls;\n\n if (Array.isArray(urls)) {\n url = url.join('/');\n }\n\n fullPath = fullPath ? (url ? url + '/' : url) + fullPath : url;\n currentRoute = currentRoute.parent;\n }\n\n return fullPath ? fullPath + '-' + outletName : outletName;\n }\n\n getPathByOutlets(urlSegmentGroup: any): string {\n if (!urlSegmentGroup) {\n return '';\n }\n\n let pathToOutlet;\n let lastPath = urlSegmentGroup.outlet || 'primary';\n let parent = urlSegmentGroup.parent;\n\n while (parent && urlSegmentGroup.root !== parent) {\n if (parent && parent.outlet !== lastPath) {\n if (lastPath === 'primary') {\n lastPath = parent.outlet;\n } else {\n lastPath = parent.outlet;\n pathToOutlet = lastPath + '-' + (pathToOutlet || urlSegmentGroup.outlet);\n }\n }\n\n parent = parent.parent;\n }\n\n return pathToOutlet || lastPath;\n }\n\n findOutlet(outletKey: string, activatedRouteSnapshot?: ActivatedRouteSnapshot): Outlet {\n let outlet: Outlet = this.outlets.find((currentOutlet) => {\n const equalModalDepth = currentOutlet.modalNavigationDepth === this._modalNavigationDepth;\n return equalModalDepth && currentOutlet.outletKeys.indexOf(outletKey) > -1;\n });\n\n // No Outlet with the given outletKey could happen when using nested unnamed p-r-o\n // primary -> primary -> prymary\n if (!outlet && activatedRouteSnapshot) {\n const pathByOutlets = this.getPathByOutlets(activatedRouteSnapshot);\n outlet = this.outlets.find((currentOutlet) => {\n const equalModalDepth = currentOutlet.modalNavigationDepth === this._modalNavigationDepth;\n return equalModalDepth && currentOutlet.pathByOutlets === pathByOutlets;\n });\n }\n\n return outlet;\n }\n\n private findOutletByModal(modalNavigation: number, isShowingModal?: boolean): Outlet {\n return this.outlets.find((outlet) => {\n const equalModalDepth = outlet.modalNavigationDepth === modalNavigation;\n return isShowingModal ? equalModalDepth && outlet.showingModal : equalModalDepth;\n });\n }\n\n private getOutletByFrame(frame: Frame): Outlet {\n let outlet;\n\n for (let index = 0; index < this.outlets.length; index++) {\n const currentOutlet = this.outlets[index];\n\n if (currentOutlet.containsFrame(frame)) {\n outlet = currentOutlet;\n break;\n }\n }\n\n return outlet;\n }\n\n private updateStates(outlet: Outlet, currentSegmentGroup: UrlSegmentGroup, queryParams: Params, replace = false): boolean {\n const isNewPage = outlet.states.length === 0;\n const lastState = outlet.states[outlet.states.length - 1];\n const equalStateUrls = outlet.containsTopState(currentSegmentGroup.toString());\n\n const locationState: LocationState = {\n segmentGroup: currentSegmentGroup,\n isRootSegmentGroup: false,\n isPageNavigation: isNewPage,\n queryParams: { ...queryParams },\n };\n\n if (!lastState || !equalStateUrls) {\n if (replace) {\n outlet.states.pop();\n }\n outlet.states.push(locationState);\n\n // Update last state segmentGroup of parent Outlet.\n if (this._modalNavigationDepth === 0 && !outlet.showingModal) {\n this.updateParentsStates(outlet, currentSegmentGroup.parent);\n }\n\n return true;\n } else {\n if (lastState && equalStateUrls) {\n // update query params for last state\n lastState.queryParams = { ...queryParams };\n }\n }\n\n return false;\n }\n\n private updateParentsStates(outlet: Outlet, newSegmentGroup: UrlSegmentGroup) {\n let parentOutlet = outlet.parent;\n\n // Update parents lastState segmentGroups\n while (parentOutlet && newSegmentGroup) {\n const state = parentOutlet.peekState();\n\n if (state) {\n state.segmentGroup = newSegmentGroup;\n newSegmentGroup = newSegmentGroup.parent;\n parentOutlet = parentOutlet.parent;\n }\n }\n }\n\n // tslint:disable-next-line:max-line-length\n private createOutlet(outletKey: string, path: string, segmentGroup: any, parent: Outlet, modalNavigation?: number, queryParams: Params = {}): Outlet {\n const pathByOutlets = this.getPathByOutlets(segmentGroup);\n const newOutlet = new Outlet(outletKey, path, pathByOutlets, modalNavigation);\n\n const locationState: LocationState = {\n segmentGroup: segmentGroup,\n isRootSegmentGroup: false,\n isPageNavigation: true, // It is a new OutletNode.\n queryParams: { ...queryParams },\n };\n\n newOutlet.states = [locationState];\n newOutlet.parent = parent;\n this.outlets.push(newOutlet);\n\n // Update last state segmentGroup of parent Outlet.\n if (this._modalNavigationDepth === 0 && !newOutlet.showingModal) {\n this.updateParentsStates(newOutlet, segmentGroup.parent);\n }\n\n return newOutlet;\n }\n\n private getSegmentGroupByOutlet(outlet: Outlet): UrlSegmentGroup {\n const pathList = outlet.pathByOutlets.split('-');\n let segmentGroup = this.currentUrlTree.root;\n let pathToOutlet;\n\n for (let index = 0; index < pathList.length; index++) {\n const currentPath = pathList[index];\n const childrenCount = Object.keys(segmentGroup.children).length;\n\n if (childrenCount && segmentGroup.children[currentPath]) {\n const url = segmentGroup.toString();\n pathToOutlet = pathToOutlet ? pathToOutlet + '/' + url : url;\n segmentGroup = segmentGroup.children[currentPath];\n } else {\n // If no child outlet found with the given name - forget about all previously found outlets.\n // example: seaching for 'primary-second-primary' shouldn't return 'primary-second'\n // if no 'primary' child available on 'second'.\n segmentGroup = null;\n break;\n }\n }\n\n // Paths should also match since there could be another Outlet\n // with the same pathByOutlets but different url path.\n if (segmentGroup && outlet.path && pathToOutlet && outlet.path !== pathToOutlet) {\n segmentGroup = null;\n }\n\n return segmentGroup;\n }\n\n // Traversal and replacement of segmentGroup.\n private updateSegmentGroup(rootNode: any, oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup) {\n const queue = [];\n let currentTree = rootNode;\n\n while (currentTree) {\n Object.keys(currentTree.children).forEach((outletName) => {\n if (currentTree.children[outletName] === oldSegmentGroup) {\n if (newSegmentGroup) {\n currentTree.children[outletName] = newSegmentGroup;\n } else {\n delete currentTree.children[outletName];\n }\n }\n queue.push(currentTree.children[outletName]);\n });\n\n currentTree = queue.shift();\n }\n }\n\n private upsertModalOutlet(parentOutlet: Outlet, segmentedGroup: UrlSegmentGroup, queryParams: Params, replace = false) {\n let currentModalOutlet = this.findOutletByModal(this._modalNavigationDepth);\n\n // We want to treat every p-r-o as a standalone Outlet.\n if (!currentModalOutlet) {\n if (this._modalNavigationDepth > 1) {\n // The parent of the current Outlet should be the previous opened modal (if any).\n parentOutlet = this.findOutletByModal(this._modalNavigationDepth - 1);\n }\n\n // No currentModalOutlet available when opening 'primary' p-r-o.\n const outletName = 'primary';\n const outletPath = parentOutlet.peekState().segmentGroup.toString();\n const outletKey = this.getOutletKey(outletPath, outletName);\n // tslint:disable-next-line:max-line-length\n currentModalOutlet = this.createOutlet(outletKey, outletPath, segmentedGroup, parentOutlet, this._modalNavigationDepth, queryParams);\n this.currentOutlet = currentModalOutlet;\n } else if (this.updateStates(currentModalOutlet, segmentedGroup, queryParams, replace)) {\n this.currentOutlet = currentModalOutlet; // If states updated\n }\n }\n\n private getOutletKey(path: string, outletName: string): string {\n return path ? path + '-' + outletName : outletName;\n }\n\n ngOnDestroy() {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NSLocationStrategy.ngOnDestroy()');\n }\n\n this.resetForHmr();\n }\n}\n","import { ComponentRef } from '@angular/core';\nimport { ActivatedRoute, ActivatedRouteSnapshot, ChildrenOutletContexts, PRIMARY_OUTLET } from '@angular/router';\n\n/**\n * There are cases where multiple activatedRoute nodes should be associated/handled by the same PageRouterOutlet.\n * We can gat additional ActivatedRoutes nodes when there is:\n * - Lazy loading - there is an additional ActivatedRoute node for the RouteConfig with the `loadChildren` setup\n * - Componentless routes - there is an additional ActivatedRoute node for the componentless RouteConfig\n *\n * Example:\n * R <-- root\n * |\n * feature (lazy module) <-- RouteConfig: { path: \"lazy\", loadChildren: \"./feature/feature.module#FeatureModule\" }\n * |\n * module (componentless route) <-- RouteConfig: { path: \"module\", children: [...] } // Note: No 'component'\n * |\n * home <-- RouteConfig: { path: \"module\", component: MyComponent } - this is what we get as activatedRoute param\n *\n * In these cases we will mark the top-most node (feature). NSRouteReuseStrategy will detach the tree there and\n * use this ActivateRoute as a kay for caching.\n */\nexport function findTopActivatedRouteNodeForOutlet(activatedRoute: ActivatedRouteSnapshot): ActivatedRouteSnapshot {\n // TODO: test this and figure it out if it's really no longer needed\n return activatedRoute;\n // let outletActivatedRoute = activatedRoute;\n\n // while (outletActivatedRoute.parent && outletActivatedRoute.parent.routeConfig && !outletActivatedRoute.parent.routeConfig.component) {\n // outletActivatedRoute = outletActivatedRoute.parent;\n // }\n\n // return outletActivatedRoute;\n}\n\nexport const pageRouterActivatedSymbol = Symbol('page-router-activated');\nexport const loaderRefSymbol = Symbol('loader-ref');\n\nexport function destroyComponentRef(componentRef: ComponentRef<any>) {\n if (componentRef) {\n const loaderRef = componentRef[loaderRefSymbol];\n if (loaderRef) {\n loaderRef.destroy();\n }\n componentRef.destroy();\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { RouteReuseStrategy, ActivatedRouteSnapshot, DetachedRouteHandle } from '@angular/router';\n\nimport { NativeScriptDebug } from '../../trace';\nimport { NSLocationStrategy } from './ns-location-strategy';\nimport { destroyComponentRef, findTopActivatedRouteNodeForOutlet, pageRouterActivatedSymbol } from './page-router-outlet-utils';\n\ninterface CacheItem {\n key: string;\n state: DetachedRouteHandle;\n isModal: boolean;\n markedForDeletion?: boolean;\n}\n\nconst getSnapshotKey = function (snapshot: ActivatedRouteSnapshot): string {\n return snapshot.pathFromRoot.join('->');\n};\n\n/**\n * Detached state cache\n */\nclass DetachedStateCache {\n private cache = new Array<CacheItem>();\n\n public get length(): number {\n return this.cache.length;\n }\n\n public push(cacheItem: CacheItem) {\n this.cache.push(cacheItem);\n }\n\n public pop(): CacheItem {\n return this.cache.pop();\n }\n\n public peek(): CacheItem {\n return this.cache[this.cache.length - 1];\n }\n\n public clear() {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`DetachedStateCache.clear() ${this.cache.length} items will be destroyed`);\n }\n\n while (this.cache.length > 0) {\n const state = <any>this.cache.pop().state;\n if (!state.componentRef) {\n throw new Error('No componentRef found in DetachedRouteHandle');\n }\n\n destroyComponentRef(state.componentRef);\n }\n }\n\n public markCurrentForClear() {\n for (const item of this.cache) {\n item.markedForDeletion = true;\n }\n }\n\n public clearMarked() {\n // try to preserve same order as .clear()\n for (let i = this.cache.length - 1; i >= 0; i--) {\n const cacheItem = this.cache[i];\n if (cacheItem.markedForDeletion) {\n const state = <any>cacheItem.state;\n if (!state.componentRef) {\n throw new Error('No componentRef found in DetachedRouteHandle');\n }\n\n destroyComponentRef(state.componentRef);\n this.cache.splice(i, 1);\n }\n }\n }\n\n public clearModalCache() {\n let removedItemsCount = 0;\n const hasModalPages = this.cache.some((cacheItem) => {\n return cacheItem.isModal;\n });\n\n if (hasModalPages) {\n let modalCacheCleared = false;\n\n while (!modalCacheCleared) {\n const cacheItem = this.peek();\n const state = <any>cacheItem.state;\n\n if (!state.componentRef) {\n throw new Error('No componentRef found in DetachedRouteHandle');\n }\n\n destroyComponentRef(state.componentRef);\n if (cacheItem.isModal) {\n modalCacheCleared = true;\n }\n\n this.pop();\n removedItemsCount++;\n }\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`DetachedStateCache.clearModalCache() ${removedItemsCount} items will be destroyed`);\n }\n }\n}\n\n/**\n * Detaches subtrees loaded inside PageRouterOutlet in forward navigation\n * and reattaches them on back.\n * Reuses routes as long as their route config is the same.\n */\n@Injectable()\nexport class NSRouteReuseStrategy implements RouteReuseStrategy, OnDestroy {\n private cacheByOutlet: { [key: string]: DetachedStateCache } = {};\n\n constructor(private location: NSLocationStrategy) {}\n\n shouldDetach(route: ActivatedRouteSnapshot): boolean {\n route = findTopActivatedRouteNodeForOutlet(route);\n\n const { outlet } = this.findValidOutletAndKey(route);\n const key = getSnapshotKey(route);\n\n let isPageActivated = false;\n let tmp = route;\n while (!(isPageActivated = tmp[pageRouterActivatedSymbol]) && tmp.parent) {\n tmp = tmp.parent;\n }\n const isBack = outlet ? outlet.isPageNavigationBack : false;\n let shouldDetach = outlet && !isBack && isPageActivated;\n\n if (outlet) {\n if (outlet.parent && !outlet.parent.shouldDetach) {\n shouldDetach = false;\n }\n\n outlet.shouldDetach = shouldDetach;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`shouldDetach isBack: ${isBack} key: ${key} result: ${shouldDetach}`);\n }\n\n return shouldDetach;\n }\n protected findValidOutletAndKey(targetRoute: ActivatedRouteSnapshot) {\n let route = targetRoute;\n const routeOutletKey = this.location.getRouteFullPath(route);\n let outletKey = routeOutletKey;\n let outlet = this.location.findOutlet(outletKey, route);\n while (!outlet) {\n if (!route.parent) {\n return { outlet: null, outletKey: routeOutletKey };\n }\n route = route.parent;\n outletKey = this.location.getRouteFullPath(route);\n outlet = this.location.findOutlet(outletKey, route);\n }\n\n if (outlet) {\n while (!outlet.outletKeys.includes(outletKey)) {\n if (!route.parent) {\n NativeScriptDebug.routeReuseStrategyLog(`Could not find valid outlet key for route: ${targetRoute}.`);\n return { outlet, outletKey: routeOutletKey };\n }\n route = route.parent;\n outletKey = this.location.getRouteFullPath(route);\n }\n }\n\n return { outlet, outletKey };\n }\n\n shouldAttach(route: ActivatedRouteSnapshot): boolean {\n route = findTopActivatedRouteNodeForOutlet(route);\n\n const { outlet, outletKey } = this.findValidOutletAndKey(route);\n const cache = this.cacheByOutlet[outletKey];\n if (!cache) {\n return false;\n }\n\n const key = getSnapshotKey(route);\n const isBack = outlet ? outlet.isPageNavigationBack : false;\n const shouldAttach = isBack && cache.peek()?.key === key;\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`shouldAttach isBack: ${isBack} key: ${key} result: ${shouldAttach}`);\n }\n\n if (outlet) {\n outlet.shouldDetach = true;\n }\n\n return shouldAttach;\n }\n\n store(route: ActivatedRouteSnapshot, state: DetachedRouteHandle): void {\n route = findTopActivatedRouteNodeForOutlet(route);\n\n const key = getSnapshotKey(route);\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`store key: ${key}, state: ${state}`);\n }\n\n const { outletKey } = this.findValidOutletAndKey(route);\n\n // tslint:disable-next-line:max-line-length\n const cache = (this.cacheByOutlet[outletKey] = this.cacheByOutlet[outletKey] || new DetachedStateCache());\n\n if (state) {\n let isModal = false;\n if (this.location._modalNavigationDepth > 0) {\n isModal = true;\n }\n\n cache.push({ key, state, isModal });\n } else {\n const topItem = cache.peek();\n if (topItem.key === key) {\n cache.pop();\n\n if (!cache.length) {\n delete this.cacheByOutlet[outletKey];\n }\n } else {\n throw new Error(\"Trying to pop from DetachedStateCache but keys don't match. \" + `expected: ${topItem.key} actual: ${key}`);\n }\n }\n }\n\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\n route = findTopActivatedRouteNodeForOutlet(route);\n\n const { outlet, outletKey } = this.findValidOutletAndKey(route);\n const cache = this.cacheByOutlet[outletKey];\n if (!cache) {\n return null;\n }\n\n const key = getSnapshotKey(route);\n const isBack = outlet ? outlet.isPageNavigationBack : false;\n const cachedItem = cache.peek();\n\n let state = null;\n if (isBack && cachedItem && cachedItem.key === key) {\n state = cachedItem.state;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`retrieved isBack: ${isBack} key: ${key} state: ${state}`);\n }\n\n return state;\n }\n\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n const shouldReuse = future.routeConfig === curr.routeConfig;\n\n if (shouldReuse && curr && curr[pageRouterActivatedSymbol]) {\n // When reusing route - copy the pageRouterActivated to the new snapshot\n // It's needed in shouldDetach to determine if the route should be detached.\n future[pageRouterActivatedSymbol] = curr[pageRouterActivatedSymbol];\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routeReuseStrategyLog(`shouldReuseRoute result: ${shouldReuse}`);\n }\n\n return shouldReuse;\n }\n\n clearCache(outletKey: string) {\n const cache = this.cacheByOutlet[outletKey];\n\n if (cache) {\n cache.clear();\n }\n }\n\n markCacheForClear(outletKey: string) {\n const cache = this.cacheByOutlet[outletKey];\n\n if (cache) {\n cache.markCurrentForClear();\n }\n }\n\n popCache(outletKey: string) {\n const cache = this.cacheByOutlet[outletKey];\n\n if (cache) {\n if (cache.peek()) {\n const state: any = cache.pop()?.state;\n if (state?.componentRef) {\n destroyComponentRef(state?.componentRef);\n }\n }\n }\n }\n\n markCacheForPop(outletKey: string) {\n const cache = this.cacheByOutlet[outletKey];\n\n if (cache) {\n const item = cache.peek();\n if (item) {\n item.markedForDeletion = true;\n }\n }\n }\n\n clearMarkedCache(outletKey: string) {\n const cache = this.cacheByOutlet[outletKey];\n\n if (cache) {\n cache.clearMarked();\n }\n }\n\n clearModalCache(outletKey: string) {\n const cache = this.cacheByOutlet[outletKey];\n\n if (cache) {\n cache.clearModalCache();\n }\n }\n\n clearAllCaches(): number {\n const outletKeys = Object.keys(this.cacheByOutlet);\n\n for (const outletKey of outletKeys) {\n this.cacheByOutlet[outletKey]?.clear();\n delete this.cacheByOutlet[outletKey];\n }\n\n return outletKeys.length;\n }\n\n ngOnDestroy(): void {\n this.clearAllCaches();\n }\n}\n","type RootTransitionGlobal = {\n __NS_DEV_ROOT_TRANSITION_IN_PROGRESS__?: boolean;\n __NS_DEV_ROOT_TRANSITION_REASON__?: string;\n};\n\ntype RootTransitionTimers = {\n setTimeout: typeof setTimeout;\n clearTimeout: typeof clearTimeout;\n};\n\ntype ResetRootViewLike = {\n resetRootView: (entry?: any) => unknown;\n};\n\nexport function createAngularRootTransitionGuard(\n globalObj: RootTransitionGlobal = globalThis as RootTransitionGlobal,\n timers: RootTransitionTimers = { setTimeout, clearTimeout },\n) {\n let clearTimer: ReturnType<typeof setTimeout> | null = null;\n\n const clear = () => {\n if (clearTimer) {\n timers.clearTimeout(clearTimer);\n clearTimer = null;\n }\n\n delete globalObj.__NS_DEV_ROOT_TRANSITION_IN_PROGRESS__;\n delete globalObj.__NS_DEV_ROOT_TRANSITION_REASON__;\n };\n\n const mark = (detail: string) => {\n clear();\n globalObj.__NS_DEV_ROOT_TRANSITION_IN_PROGRESS__ = true;\n globalObj.__NS_DEV_ROOT_TRANSITION_REASON__ = detail;\n };\n\n const scheduleClear = (delayMs = 250) => {\n if (clearTimer) {\n timers.clearTimeout(clearTimer);\n }\n\n clearTimer = timers.setTimeout(() => {\n clearTimer = null;\n delete globalObj.__NS_DEV_ROOT_TRANSITION_IN_PROGRESS__;\n delete globalObj.__NS_DEV_ROOT_TRANSITION_REASON__;\n }, delayMs);\n };\n\n const runApplicationResetRootView = (\n applicationLike: ResetRootViewLike,\n createRoot: () => unknown,\n detail: string,\n delayMs = 250,\n ) => {\n mark(detail);\n\n try {\n return applicationLike.resetRootView({ create: () => createRoot() });\n } finally {\n scheduleClear(delayMs);\n }\n };\n\n return {\n clear,\n mark,\n scheduleClear,\n runApplicationResetRootView,\n };\n}","import * as AngularCore from '@angular/core';\nimport { ApplicationRef, EnvironmentProviders, NgModuleRef, NgZone, PlatformRef, Provider } from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n Application,\n ApplicationEventData,\n Color,\n LaunchEventData,\n LayoutBase,\n profile,\n removeTaggedAdditionalCSS,\n TextView,\n Utils,\n View,\n} from '@nativescript/core';\nimport { Observable, ReplaySubject, Subject } from 'rxjs';\nimport { filter, map, take } from 'rxjs/operators';\nimport { AppHostView } from './app-host-view';\nimport {\n getAngularCoreForHmrReset,\n rememberAngularCoreForHmr,\n resetAngularHmrCompiledComponents,\n setAngularCoreForHmr,\n} from './hmr-compiled-components-core';\nimport { _hmrDiagBumpCycle, installAngularHmrComponentRegistrar } from './hmr-class-registry';\nimport { installHmrEagerRegistrar, runHmrEagerInstantiators } from './hmr-eager-services';\nimport { NativeScriptLoadingService } from './loading.service';\nimport { clearAngularHmrRouteConfigCaches } from './legacy/router/hmr-route-cache-core';\nimport { NSLocationStrategy } from './legacy/router/ns-location-strategy';\nimport { NSRouteReuseStrategy } from './legacy/router/ns-route-reuse-strategy';\nimport { createAngularRootTransitionGuard } from './root-transition-guard';\nimport { APP_ROOT_VIEW, DISABLE_ROOT_VIEW_HANDLING, NATIVESCRIPT_ROOT_MODULE_ID } from './tokens';\nimport { NativeScriptDebug } from './trace';\n\n// Store the original @angular/core module for HMR\n// This is crucial because HMR imports a fresh @angular/core with empty LView tracking\n// We need to use the original one that has the registered LViews\nrememberAngularCoreForHmr(AngularCore as any, globalThis as any);\n\n// Install the cross-module HMR component registrar. The Vite plugin\n// `ns-component-hmr-register` injects a call to the global hook\n// `__NS_HMR_REGISTER_COMPONENT__` at the end of every user `.ts` file\n// that declares an `@Component`-decorated class. After an HMR reboot,\n// each re-evaluated module pushes its fresh class into the registry,\n// and HMR helpers (modal restore, route replay) read the registry via\n// `getFreshComponentClass` to re-attach to the *live* class instead of\n// a captured stale reference. Production short-circuits inside the\n// helper (the hook is never assigned).\n//\n// We install the registrar before any other module initialization can\n// reference the hook so a user module loaded synchronously alongside\n// `@nativescript/angular` always finds the function present.\ninstallAngularHmrComponentRegistrar();\n\n// Install the cross-module registration entry point used by HMR-aware\n// services (e.g. `NativeDialog`) to ask for eager construction after\n// every bootstrap. Idempotent: re-evaluations after HMR are no-ops.\ninstallHmrEagerRegistrar();\n\nconst angularHmrGlobal = globalThis as any;\nangularHmrGlobal.__NS_REMEMBER_ANGULAR_CORE__ = (core: any) => {\n setAngularCoreForHmr(core, angularHmrGlobal);\n};\n\nexport interface AppLaunchView extends LayoutBase {\n // called when the animation is to begin\n startAnimation?: () => void;\n // called when bootstrap is complete and cleanup can begin\n // should resolve when animation is completely finished\n cleanup?: () => Promise<any>;\n\n // do you want to handle setting this as a rootview manually?\n __disable_root_view_handling?: boolean;\n}\n\nexport function disableRootViewHanding(view: AppLaunchView) {\n view.__disable_root_view_handling = true;\n}\n\nexport type NgModuleReason = 'hotreload' | 'applaunch' | 'appexit';\n\nexport type NgModuleEvent =\n | {\n moduleType: 'main' | 'loading' | string;\n reference: NgModuleRef<unknown> | ApplicationRef;\n reason: NgModuleReason | string;\n }\n | {\n moduleType: 'platform';\n reference: PlatformRef;\n reason: NgModuleReason | string;\n };\n\nexport const preAngularDisposal$ = new Subject<NgModuleEvent>();\n/**\n * Stream that emits when an Angular module finishes bootstrapping. Modeled\n * as a `ReplaySubject(1)` so consumers (e.g. `NativeDialog`) instantiated\n * lazily — *after* the bootstrap event has already fired — still receive\n * the latest event and can react. Without buffering, a service that the\n * user app injects on first need (after bootstrap) would silently miss the\n * `hotreload` notification and skip HMR-only work like restoring captured\n * modal state. The buffer size of 1 means each new HMR cycle replaces the\n * cached event so cycle N's late subscribers don't see cycle N-1's event.\n */\nexport const postAngularBootstrap$ = new ReplaySubject<NgModuleEvent>(1);\n\n/**\n * @deprecated\n */\nexport const onBeforeLivesync: Observable<NgModuleRef<any>> = preAngularDisposal$.pipe(\n filter((v) => v.moduleType === 'main' && v.reason === 'hotreload'),\n map((v) => v.reference as NgModuleRef<any>),\n);\n/**\n * @deprecated\n */\nexport const onAfterLivesync: Observable<{\n moduleRef?: NgModuleRef<any>;\n error?: Error;\n}> = postAngularBootstrap$.pipe(\n filter((v) => v.moduleType === 'main'),\n map((v) => ({ moduleRef: v.reference as NgModuleRef<any> })),\n);\nexport interface AppRunOptions<T, K> {\n /**\n * Runs when the app is launched or during HMR.\n * May not run immediately if the app was started in background (e.g. push notification)\n * @param reason reason for bootstrap. @see {NgModuleReason}\n * @returns Promise to the bootstrapped NgModuleRef\n */\n appModuleBootstrap: (reason: NgModuleReason) => Promise<NgModuleRef<T> | ApplicationRef>;\n /**\n * Loads a custom NgModule for the loading screen.\n * This loads only if appModuleBootstrap doesn't resolve synchronously (e.g. async APP_INITIALIZER).\n * @param reason reason for bootstrap. @see {NgModuleReason}\n * @returns Promise to the bootstrapped NgModuleRef. Must resolve immediately (no async initialization)\n */\n loadingModule?: (reason: NgModuleReason) => Promise<NgModuleRef<K> | ApplicationRef>;\n /**\n * Simpler than loadingModule, this will show a view while the app is bootstrapping asynchronously.\n * @param reason reason for bootstrap. @see {NgModuleReason}\n * @returns View that will be shown while app boots\n */\n launchView?: (reason: NgModuleReason) => AppLaunchView;\n /**\n * Wether we are running in an embedded context (e.g. embedding NativeScript in an existing app)\n */\n embedded?: boolean;\n}\n\nif (import.meta['webpackHot']) {\n import.meta['webpackHot'].decline();\n global.__onLiveSyncCore = () => {\n Application.getRootView()?._onCssStateChange();\n // all other changes are applied by runNativeScriptAngularApp\n };\n}\n\nfunction emitModuleBootstrapEvent<T>(\n ref: NgModuleRef<T> | ApplicationRef,\n name: 'main' | 'loading',\n reason: NgModuleReason,\n) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`emitModuleBootstrapEvent name=${name} reason=${reason}`);\n }\n // Instantiate registered HMR-aware services *before* emitting so they\n // attach their subscriptions in the same JS task and are guaranteed to\n // observe the event being emitted. `postAngularBootstrap$` is also a\n // `ReplaySubject(1)`, so a service injected later still receives the\n // buffered event — the eager pass is the fast path that lets the\n // restore work begin in the same task as bootstrap completion.\n if (name === 'main') {\n runHmrEagerInstantiators(\n (ref as ApplicationRef | NgModuleRef<T>).injector,\n (err) => NativeScriptDebug.bootstrapLogError(`HMR eager instantiator threw: ${(err as Error)?.message ?? err}`),\n );\n }\n postAngularBootstrap$.next({\n moduleType: name,\n reference: ref,\n reason,\n });\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`postAngularBootstrap$.next() emitted name=${name} reason=${reason}`);\n }\n}\n\nfunction destroyRef<T>(ref: NgModuleRef<T> | ApplicationRef, name: 'main' | 'loading', reason: NgModuleReason): void;\nfunction destroyRef(ref: PlatformRef, reason: NgModuleReason): void;\nfunction destroyRef<T>(ref: PlatformRef | ApplicationRef | NgModuleRef<T>, name?: string, reason?: string): void {\n if (ref) {\n const refKind = ref instanceof PlatformRef ? 'PlatformRef' : ref instanceof NgModuleRef ? 'NgModuleRef' : ref instanceof ApplicationRef ? 'ApplicationRef' : '(unknown)';\n const traceEnabled = NativeScriptDebug.isLogEnabled();\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`destroyRef kind=${refKind} name=${name ?? '(none)'} reason=${reason ?? '(none)'}`);\n }\n if (ref instanceof PlatformRef) {\n preAngularDisposal$.next({\n moduleType: 'platform',\n reference: ref,\n reason: name,\n });\n }\n if (ref instanceof NgModuleRef || ref instanceof ApplicationRef) {\n preAngularDisposal$.next({\n moduleType: name,\n reference: ref,\n reason,\n });\n }\n ref.destroy();\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`destroyRef DONE kind=${refKind} name=${name ?? '(none)'}`);\n }\n }\n}\n\nfunction runZoneSyncTask(fn: () => void) {\n if (typeof Zone === 'undefined') {\n return;\n }\n const zone = Zone.current;\n const task = zone.scheduleEventTask(\n 'sync_function',\n fn,\n {},\n () => {\n //\n },\n () => {\n //\n },\n );\n try {\n // console.log(task.state);\n task.invoke();\n // zone.runTask(task);\n // console.log(task.state);\n } finally {\n zone.cancelTask(task);\n }\n}\n\nfunction ZoneCanWorkSync() {\n let canRunSync = false;\n runZoneSyncTask(() => {\n Promise.resolve().then(() => (canRunSync = true));\n });\n return canRunSync;\n}\n\n/**\n * Tests if global.__drainMicrotaskQueue can be used to drain microtasks\n * Because of Zone.js, even though the native queue might be drained, zone microtasks might not be\n * @param makeTestDrain should it drain the current microtask queue to ensure the queue can be drained\n * @returns if global.__drainMicrotaskQueue can be called\n */\nfunction nativeQueueCanBeDrained(makeTestDrain: boolean) {\n if (typeof (global as any).__drainMicrotaskQueue !== 'function') {\n return false;\n }\n if (!makeTestDrain) {\n return true;\n }\n let canRunSync = false;\n Promise.resolve().then(() => (canRunSync = true));\n (global as any).__drainMicrotaskQueue();\n return canRunSync;\n}\n\n/**\n * Runs a function in the most synchronous way possible\n * @param fn function to run\n * @param done function to chain after done\n */\nfunction runSynchronously(fn: () => void, done?: () => void): void {\n if (typeof Zone !== 'undefined' && ZoneCanWorkSync()) {\n runZoneSyncTask(fn);\n done?.();\n return;\n }\n if (nativeQueueCanBeDrained(true)) {\n fn();\n (global as any).__drainMicrotaskQueue();\n done?.();\n return;\n }\n fn();\n if (done) {\n Utils.queueMacrotask(done);\n }\n}\n\nexport interface ApplicationConfig {\n /**\n * List of providers that should be available to the root component and all its children.\n */\n providers: Array<Provider | EnvironmentProviders>;\n}\n\nexport function runNativeScriptAngularApp<T, K>(options: AppRunOptions<T, K>) {\n const hmrGlobal = globalThis as any;\n\n if (hmrGlobal.__NS_ANGULAR_HMR_REGISTER_ONLY__ && typeof hmrGlobal.__NS_UPDATE_ANGULAR_APP_OPTIONS__ === 'function') {\n hmrGlobal.__NS_UPDATE_ANGULAR_APP_OPTIONS__(options);\n return;\n }\n\n let currentOptions = options;\n let mainModuleRef: NgModuleRef<T> | ApplicationRef = null;\n let loadingModuleRef: NgModuleRef<K> | ApplicationRef;\n let platformRef: PlatformRef = null;\n let bootstrapId = -1;\n\n hmrGlobal.__NS_UPDATE_ANGULAR_APP_OPTIONS__ = (nextOptions: AppRunOptions<T, K>) => {\n currentOptions = nextOptions;\n };\n\n const clearAngularHmrRouteCaches = () => {\n try {\n const injector = (mainModuleRef as any)?.injector;\n const reuseStrategy = injector?.get?.(NSRouteReuseStrategy, null);\n const locationStrategy = injector?.get?.(NSLocationStrategy, null);\n const router = injector?.get?.(Router, null);\n const clearedDetached = reuseStrategy?.clearAllCaches?.() ?? 0;\n const clearedLocation = locationStrategy?.resetForHmr?.() ?? null;\n const cleared = clearAngularHmrRouteConfigCaches(router?.config);\n\n if (\n clearedDetached > 0 ||\n cleared > 0 ||\n (clearedLocation && (clearedLocation.outlets > 0 || clearedLocation.states > 0 || clearedLocation.callbacks > 0 || clearedLocation.hadUrlTree))\n ) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`cleared Angular route caches before reboot: detachedViews=${clearedDetached} routeFields=${cleared} locationState=${JSON.stringify(clearedLocation)}`);\n }\n }\n } catch {}\n };\n const updatePlatformRef = (moduleRef: NgModuleRef<T | K> | ApplicationRef, reason: NgModuleReason) => {\n const newPlatformRef = moduleRef.injector.get(PlatformRef);\n if (newPlatformRef === platformRef) {\n return;\n }\n destroyRef(platformRef, reason);\n platformRef = newPlatformRef;\n platformRef.onDestroy(() => (platformRef = platformRef === newPlatformRef ? null : platformRef));\n };\n let launchEventDone = true;\n let targetRootView: View = null;\n const rootTransitionGuard = createAngularRootTransitionGuard(globalThis as any);\n const refreshRootViewCss = (expectedRoot?: View) => {\n setTimeout(() => {\n const currentRoot = Application.getRootView();\n if (!currentRoot || (expectedRoot && currentRoot !== expectedRoot)) {\n return;\n }\n\n try {\n (currentRoot as any)._onCssStateChange?.();\n } catch {}\n }, 0);\n };\n const setRootView = (ref: NgModuleRef<T | K> | ApplicationRef | View) => {\n const traceEnabled = NativeScriptDebug.isLogEnabled();\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`setRootView called bootstrapId=${bootstrapId} refType=${ref?.constructor?.name}`);\n }\n if (bootstrapId === -1) {\n // edge case: a stale ref racing with a teardown\n if (traceEnabled) {\n NativeScriptDebug.hmrLog('setRootView: bootstrapId is -1, returning early');\n }\n return;\n }\n if (ref instanceof NgModuleRef || ref instanceof ApplicationRef) {\n if (ref.injector.get(DISABLE_ROOT_VIEW_HANDLING, false)) {\n if (traceEnabled) {\n NativeScriptDebug.hmrLog('setRootView: DISABLE_ROOT_VIEW_HANDLING is true, returning');\n }\n return;\n }\n } else {\n if (ref['__disable_root_view_handling']) {\n if (traceEnabled) {\n NativeScriptDebug.hmrLog('setRootView: __disable_root_view_handling is true, returning');\n }\n return;\n }\n }\n Application.getRootView()?._closeAllModalViewsInternal(); // cleanup old rootview\n NativeScriptDebug.bootstrapLog(`Setting RootView ${launchEventDone ? 'outside of' : 'during'} launch event`);\n // TODO: check for leaks when root view isn't properly destroyed\n if (ref instanceof View) {\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`setRootView: ref is View, launchEventDone=${launchEventDone}`);\n NativeScriptDebug.bootstrapLog(`Setting RootView to ${ref}`);\n }\n if (currentOptions.embedded) {\n Application.run({ create: () => ref });\n } else if (launchEventDone) {\n rootTransitionGuard.runApplicationResetRootView(Application, () => ref, ref?.constructor?.name || 'View');\n refreshRootViewCss(ref);\n } else {\n targetRootView = ref;\n }\n return;\n }\n const view = ref.injector.get(APP_ROOT_VIEW) as AppHostView | View;\n const newRoot = view instanceof AppHostView ? view.content : view;\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`setRootView: view=${view?.constructor?.name} newRoot=${newRoot?.constructor?.name} launchEventDone=${launchEventDone} embedded=${!!currentOptions.embedded}`);\n NativeScriptDebug.bootstrapLog(`Setting RootView to ${newRoot}`);\n }\n if (currentOptions.embedded) {\n if (traceEnabled) {\n NativeScriptDebug.hmrLog('setRootView: calling Application.run (embedded)');\n }\n Application.run({ create: () => newRoot });\n } else if (launchEventDone) {\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(\n `setRootView: calling Application.resetRootView newRoot type=${newRoot?.constructor?.name} hasNativeView=${!!newRoot?.nativeView} parent=${newRoot?.parent?.constructor?.name} childCount=${(newRoot as any)?.getChildrenCount?.() ?? 'N/A'}`,\n );\n }\n rootTransitionGuard.runApplicationResetRootView(Application, () => newRoot, newRoot?.constructor?.name || 'View');\n refreshRootViewCss(newRoot);\n if (traceEnabled) {\n NativeScriptDebug.hmrLog('setRootView: Application.resetRootView returned');\n setTimeout(() => {\n const currentRoot = Application.getRootView();\n NativeScriptDebug.hmrLog(\n `setRootView: post-reset getRootView type=${currentRoot?.constructor?.name} hasNativeView=${!!currentRoot?.nativeView} childCount=${(currentRoot as any)?.getChildrenCount?.() ?? 'N/A'}`,\n );\n }, 100);\n }\n } else {\n if (traceEnabled) {\n NativeScriptDebug.hmrLog('setRootView: setting targetRootView (launch in progress)');\n }\n targetRootView = newRoot;\n }\n };\n const showErrorUI = (error: Error) => {\n const message = error.message + '\\n\\n' + error.stack;\n const errorTextBox = new TextView();\n errorTextBox.text = message;\n errorTextBox.color = new Color('red');\n setRootView(errorTextBox);\n };\n const bootstrapRoot = (reason: NgModuleReason) => {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`bootstrapRoot called reason=${reason}`);\n }\n try {\n if (reason === 'hotreload') {\n resetAngularHmrCompiledComponents(getAngularCoreForHmrReset(AngularCore as any, globalThis as any));\n }\n\n bootstrapId = Date.now();\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`bootstrapRoot: new bootstrapId=${bootstrapId}`);\n }\n const currentBootstrapId = bootstrapId;\n let bootstrapped = false;\n let onMainBootstrap = () => {\n setRootView(mainModuleRef);\n };\n runSynchronously(\n () =>\n currentOptions.appModuleBootstrap(reason).then(\n (ref) => {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(\n `appModuleBootstrap resolved ref=${ref?.constructor?.name} currentBootstrapId=${currentBootstrapId} bootstrapId=${bootstrapId}`,\n );\n }\n if (currentBootstrapId !== bootstrapId) {\n // The pending bootstrap resolved AFTER another reboot bumped\n // bootstrapId. This typically happens when a developer ships\n // an async APP_INITIALIZER and the user exits/re-enters the\n // app while it's still resolving. Drop this ref.\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog('bootstrap ID mismatch, destroying ref');\n }\n ref.destroy();\n return;\n }\n\n // When Zone.js is active and we're outside the Angular zone (which\n // happens in HMR mode — the Promise .then() runs in the root zone),\n // wrap the completion handler inside NgZone.run() so that:\n // 1. resetRootView + component initialization happens inside the Angular zone\n // 2. ngrx effects, store dispatches, and signal-triggered actions run inside NgZone\n // 3. strictActionWithinNgZone checks pass for initial actions\n // In zoneless apps (no Zone.js), skip the wrapping entirely.\n const useZoneWrap = typeof Zone !== 'undefined' && !NgZone.isInAngularZone();\n const runInZone = (fn: () => void) => {\n if (useZoneWrap) {\n ref.injector.get(NgZone).run(fn);\n } else {\n fn();\n }\n };\n runInZone(() => {\n mainModuleRef = ref;\n\n // Expose ApplicationRef for HMR to trigger change detection.\n // Check by duck-typing because `instanceof` can fail across\n // module realms during HMR — we may be holding a fresh\n // ApplicationRef class while `ref` was constructed by an\n // earlier (now-evicted) realm copy.\n const refAny = ref as any;\n const isAppRef = refAny && typeof refAny.tick === 'function' && Array.isArray(refAny.components);\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(\n `ref type check isAppRef=${isAppRef} hasTick=${typeof refAny?.tick === 'function'} hasComponents=${Array.isArray(refAny?.components)}`,\n );\n }\n\n if (isAppRef) {\n global['__NS_ANGULAR_APP_REF__'] = ref;\n global['__NS_HMR_BOOT_COMPLETE__'] = true;\n\n if (!global['__NS_ANGULAR_COMPONENTS__']) {\n global['__NS_ANGULAR_COMPONENTS__'] = {};\n }\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`ApplicationRef components count=${refAny.components?.length ?? 0}`);\n }\n if (refAny.components && refAny.components.length > 0) {\n const componentRef = refAny.components[0];\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(\n `componentRef=${componentRef?.constructor?.name} componentType=${componentRef?.componentType?.name}`,\n );\n }\n\n // Angular 17+ standalone: the component class is on\n // `componentRef.componentType`. Older Angular keeps it on\n // `componentRef.instance.constructor`.\n let componentType = componentRef?.componentType;\n if (!componentType && componentRef?.instance) {\n componentType = componentRef.instance.constructor;\n }\n\n if (componentType && componentType.name) {\n global['__NS_ANGULAR_COMPONENTS__'][componentType.name] = componentType;\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`registered component for HMR: ${componentType.name}`);\n }\n } else if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog('could not resolve componentType name');\n }\n } else if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog('no components in ApplicationRef');\n }\n } else {\n const appRef = ref.injector.get(ApplicationRef, null);\n if (appRef) {\n global['__NS_ANGULAR_APP_REF__'] = appRef;\n // Mark boot complete for the HMR system\n global['__NS_HMR_BOOT_COMPLETE__'] = true;\n }\n }\n\n (isAppRef ? refAny.components[0] : ref).onDestroy(\n () => (mainModuleRef = mainModuleRef === ref ? null : mainModuleRef),\n );\n updatePlatformRef(ref, reason);\n const styleTag = ref.injector.get(NATIVESCRIPT_ROOT_MODULE_ID);\n (isAppRef ? refAny.components[0] : ref).onDestroy(() => {\n removeTaggedAdditionalCSS(styleTag);\n });\n bootstrapped = true;\n onMainBootstrap();\n emitModuleBootstrapEvent(ref, 'main', reason);\n // bootstrapped component: (ref as any)._bootstrapComponents[0];\n });\n },\n (err) => {\n bootstrapped = true;\n NativeScriptDebug.bootstrapLogError(`Error bootstrapping app module:\\n${err.message}\\n\\n${err.stack}`);\n showErrorUI(err);\n throw err;\n },\n ),\n () => {\n if (currentBootstrapId !== bootstrapId) {\n return;\n }\n if (!bootstrapped) {\n if (currentOptions.loadingModule) {\n runSynchronously(() =>\n currentOptions.loadingModule(reason).then(\n (loadingRef) => {\n if (currentBootstrapId !== bootstrapId) {\n // this module is old and not needed anymore\n // this may happen when developer uses async app initializer and the user exits the app before this bootstraps\n loadingRef.destroy();\n return;\n }\n loadingModuleRef = loadingRef;\n (loadingModuleRef instanceof ApplicationRef\n ? loadingModuleRef.components[0]\n : loadingModuleRef\n ).onDestroy(() => (loadingModuleRef = loadingModuleRef === loadingRef ? null : loadingModuleRef));\n updatePlatformRef(loadingRef, reason);\n const styleTag = loadingModuleRef.injector.get(NATIVESCRIPT_ROOT_MODULE_ID);\n (loadingModuleRef instanceof ApplicationRef\n ? loadingModuleRef.components[0]\n : loadingModuleRef\n ).onDestroy(() => {\n removeTaggedAdditionalCSS(styleTag);\n });\n setRootView(loadingRef);\n onMainBootstrap = () => {\n // delay showing the new rootview to avoid flashes\n Utils.queueMacrotask(() => {\n const loadingService = loadingModuleRef.injector.get(NativeScriptLoadingService);\n loadingModuleRef.injector.get(NgZone).run(() => {\n loadingService._notifyMainModuleReady();\n });\n loadingService.readyToDestroy$\n .pipe(\n filter((ready) => ready),\n take(1),\n )\n .subscribe(() => {\n destroyRef(loadingModuleRef, 'loading', reason);\n loadingModuleRef = null;\n setRootView(mainModuleRef);\n });\n });\n };\n emitModuleBootstrapEvent(loadingModuleRef, 'loading', reason);\n },\n (err) => {\n NativeScriptDebug.bootstrapLogError(\n `Error bootstrapping loading module:\\n${err.message}\\n\\n${err.stack}`,\n );\n showErrorUI(err);\n throw err;\n },\n ),\n );\n } else if (currentOptions.launchView) {\n let launchView = currentOptions.launchView(reason);\n setRootView(launchView);\n if (launchView.startAnimation) {\n setTimeout(() => {\n // ensure launch animation is executed after launchView added to view stack\n launchView.startAnimation();\n });\n }\n onMainBootstrap = () => {\n // delay showing the new rootview to avoid flashes\n Utils.queueMacrotask(() => {\n if (launchView.cleanup) {\n launchView\n .cleanup()\n .catch()\n .then(() => {\n launchView = null;\n setRootView(mainModuleRef);\n });\n } else {\n launchView = null;\n setRootView(mainModuleRef);\n }\n });\n };\n } else {\n console.warn(\n 'App is bootstrapping asynchronously (likely APP_INITIALIZER) but did not provide a launchView or LoadingModule.',\n );\n }\n }\n },\n );\n } catch (err) {\n NativeScriptDebug.bootstrapLogError(`Error in Bootstrap Function:\\n${err.message}\\n\\n${err.stack}`);\n }\n };\n const disposePlatform = (reason: NgModuleReason) => {\n destroyRef(platformRef, reason);\n platformRef = null;\n };\n const disposeLastModules = (reason: NgModuleReason) => {\n if (reason === 'hotreload') {\n clearAngularHmrRouteCaches();\n }\n\n // reset bootstrap ID to make sure any modules bootstrapped after this are discarded\n bootstrapId = -1;\n destroyRef(loadingModuleRef, 'loading', reason);\n loadingModuleRef = null;\n destroyRef(mainModuleRef, 'main', reason);\n mainModuleRef = null;\n };\n const launchCallback = profile('@nativescript/angular/platform-common.launchCallback', (args: LaunchEventData) => {\n launchEventDone = false;\n bootstrapRoot('applaunch');\n launchEventDone = true;\n args.root = targetRootView || null;\n });\n const exitCallback = profile('@nativescript/angular/platform-common.exitCallback', (args: ApplicationEventData) => {\n disposeLastModules('appexit');\n });\n\n let oldAddEventListener;\n if (typeof Zone !== 'undefined' && global.NativeScriptGlobals?.events?.[Zone.__symbol__('addEventListener')]) {\n oldAddEventListener = global.NativeScriptGlobals.events.addEventListener;\n global.NativeScriptGlobals.events.addEventListener =\n global.NativeScriptGlobals.events[Zone.__symbol__('addEventListener')];\n }\n if (!currentOptions.embedded) {\n Application.on(Application.launchEvent, launchCallback);\n }\n Application.on(Application.exitEvent, exitCallback);\n if (oldAddEventListener) {\n global.NativeScriptGlobals.events.addEventListener = oldAddEventListener;\n }\n\n // Detect HMR environment (webpack or Vite)\n const isWebpackHot = !!import.meta['webpackHot'];\n // import.meta.hot is available when code goes through Vite's transform pipeline.\n // When @nativescript/angular is pre-bundled in the vendor (esbuild), import.meta.hot\n // won't exist. Fall back to the global placeholder flag that the NativeScript Vite\n // HMR runtime sets during dev boot.\n const isViteHot = !!import.meta['hot'] || !!(globalThis as any).__NS_DEV_PLACEHOLDER_ROOT_EARLY__;\n const isHotReloadEnabled = isWebpackHot || isViteHot;\n\n // Always expose HMR globals for both webpack and Vite HMR support\n // These allow the HMR runtime to properly dispose and re-bootstrap Angular\n global['__dispose_app_ng_platform__'] = () => {\n disposePlatform('hotreload');\n };\n global['__dispose_app_ng_modules__'] = () => {\n disposeLastModules('hotreload');\n };\n global['__bootstrap_app_ng_modules__'] = () => {\n bootstrapRoot('hotreload');\n };\n global['__cleanup_ng_hot__'] = () => {\n Application.off(Application.launchEvent, launchCallback);\n Application.off(Application.exitEvent, exitCallback);\n disposeLastModules('hotreload');\n disposePlatform('hotreload');\n };\n global['__reboot_ng_modules__'] = (shouldDisposePlatform: boolean = false) => {\n // Bump the global HMR cycle counter so subsequent diagnostic log\n // lines (class registry, dialog services) can be cross-referenced\n // to a specific reboot. Counter is always incremented; the trace\n // category gates whether we surface it in the console.\n const cycleNum = _hmrDiagBumpCycle();\n const traceEnabled = NativeScriptDebug.isLogEnabled();\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(\n `__reboot_ng_modules__ called cycle=${cycleNum} shouldDisposePlatform=${shouldDisposePlatform} bootstrapId=${bootstrapId} hasMainModuleRef=${!!mainModuleRef}`,\n );\n }\n try {\n global['__NS_CAPTURE_ANGULAR_HMR_ROUTE__']?.();\n } catch {}\n disposeLastModules('hotreload');\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`after disposeLastModules cycle=${cycleNum} bootstrapId=${bootstrapId}`);\n }\n if (shouldDisposePlatform) {\n disposePlatform('hotreload');\n }\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`calling bootstrapRoot cycle=${cycleNum}`);\n }\n bootstrapRoot('hotreload');\n if (traceEnabled) {\n NativeScriptDebug.hmrLog(`bootstrapRoot returned cycle=${cycleNum} bootstrapId=${bootstrapId}`);\n }\n };\n\n if (isWebpackHot) {\n // Webpack-specific HMR handling\n import.meta['webpackHot'].decline();\n\n if (!Application.hasLaunched()) {\n Application.run();\n return;\n }\n bootstrapRoot('hotreload');\n return;\n }\n\n if (isViteHot) {\n // Vite-specific HMR handling\n // Vite HMR is handled by @nativescript/vite's HMR runtime\n // which will call __reboot_ng_modules__ when needed\n\n if (!Application.hasLaunched()) {\n Application.run();\n return;\n }\n bootstrapRoot('hotreload');\n return;\n }\n\n if (currentOptions.embedded) {\n bootstrapRoot('applaunch');\n } else {\n Application.run();\n }\n}\n","import { CompilerOptions, Injector, NgModuleRef, NgZone, PlatformRef, Type } from '@angular/core';\nimport { ɵNgModuleFactory as NgModuleFactory } from '@angular/core';\nimport { AppLaunchView, AppRunOptions, runNativeScriptAngularApp } from './application';\n\n/**\n * Provides additional options to the bootstraping process.\n *\n *\n */\nexport interface BootstrapOptions {\n /**\n * Optionally specify which `NgZone` should be used.\n *\n * - Provide your own `NgZone` instance.\n * - `zone.js` - Use default `NgZone` which requires `Zone.js`.\n * - `noop` - Use `NoopNgZone` which does nothing.\n */\n ngZone?: NgZone | 'zone.js' | 'noop';\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can colesce such kind of events to only trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling a animation frame. So in the case above,\n * the change detection will only be triggered once.\n */\n ngZoneEventCoalescing?: boolean;\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n *\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n ngZoneRunCoalescing?: boolean;\n}\n\nexport class NativeScriptPlatformRefProxy extends PlatformRef {\n options: AppRunOptions<any, any>;\n constructor(private platform: PlatformRef, private launchView?: AppLaunchView) {\n super();\n }\n\n bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>): Promise<NgModuleRef<M>> {\n this.options = {\n appModuleBootstrap: () => this.platform.bootstrapModuleFactory(moduleFactory),\n launchView: () => this.launchView,\n };\n\n runNativeScriptAngularApp(this.options);\n\n return null;\n }\n bootstrapModule<M>(moduleType: Type<M>, compilerOptions?: (CompilerOptions & BootstrapOptions) | Array<CompilerOptions & BootstrapOptions>): Promise<NgModuleRef<M>> {\n this.options = {\n appModuleBootstrap: () => this.platform.bootstrapModule(moduleType, compilerOptions),\n };\n\n runNativeScriptAngularApp(this.options);\n\n return null;\n }\n\n onDestroy(callback: () => void): void {\n this.platform.onDestroy(callback);\n }\n\n get injector(): Injector {\n return this.platform.injector;\n }\n\n destroy(): void {\n this.platform.destroy();\n }\n\n get destroyed(): boolean {\n return this.platform.destroyed;\n }\n}\n","import { XhrFactory } from '@angular/common';\nimport { Injectable } from '@angular/core';\n\n@Injectable()\nexport class NativescriptXhrFactory extends XhrFactory {\n build() {\n return new XMLHttpRequest();\n }\n}\n","import { FormattedString, Frame, Page, Span, TextBase } from '@nativescript/core';\nimport { isInvisibleNode } from '../views/utils';\nimport { NgView, ViewClassMeta } from '../views/view-types';\n\nexport const frameMeta: ViewClassMeta = {\n insertChild: (parent: Frame, child: NgView) => {\n // Page cannot be added to Frame with _addChildFromBuilder (thwos \"use defaultPage\" error)\n if (isInvisibleNode(child)) {\n return;\n } else if (child instanceof Page) {\n parent.navigate({ create: () => child });\n } else {\n throw new Error('Only a Page can be a child of Frame');\n }\n },\n};\n\nexport const formattedStringMeta: ViewClassMeta = {\n insertChild(parent: FormattedString, child: Span, next: Span) {\n const index = parent.spans.indexOf(next);\n if (index > -1) {\n parent.spans.splice(index, 0, child);\n } else {\n parent.spans.push(child);\n }\n },\n removeChild(parent: FormattedString, child: Span) {\n const index = parent.spans.indexOf(child);\n if (index > -1) {\n parent.spans.splice(index, 1);\n }\n },\n};\n\nexport const textBaseMeta: ViewClassMeta = {\n insertChild(parent: TextBase, child, next) {\n if (child instanceof FormattedString) {\n parent.formattedText = child;\n } else if (child instanceof Span) {\n parent.formattedText ??= new FormattedString();\n formattedStringMeta.insertChild(parent.formattedText, child, next);\n }\n },\n removeChild(parent: TextBase, child: NgView) {\n if (!parent.formattedText) return;\n if (child instanceof FormattedString) {\n if (parent.formattedText === child) {\n parent.formattedText = null;\n }\n } else if (child instanceof Span) {\n formattedStringMeta.removeChild(parent.formattedText, child);\n }\n },\n};\n","import { LayoutBase, View } from '@nativescript/core';\nimport { InvisibleNode } from '../views/invisible-nodes';\nimport { ViewClassMeta } from '../views/view-types';\n\nexport type ViewResolver = () => any;\n\n// Use a global elementMap so the vendor bundle and HTTP-loaded module instances\n// share the same element registry during Vite HMR (where two copies of\n// @nativescript/angular can coexist in separate module realms).\nexport const elementMap: Map<string, { resolver: ViewResolver; meta?: ViewClassMeta }> =\n (globalThis as any).__NS_NG_ELEMENT_MAP__ || ((globalThis as any).__NS_NG_ELEMENT_MAP__ = new Map());\nconst camelCaseSplit = /([a-z0-9])([A-Z])/g;\nconst defaultViewMeta: ViewClassMeta = { skipAddToDom: false };\n\nexport function registerElement(elementName: string, resolver: ViewResolver, meta?: ViewClassMeta): void {\n const entry = { resolver, meta };\n elementMap.set(elementName, entry);\n elementMap.set(elementName.toLowerCase(), entry);\n elementMap.set(elementName.replace(camelCaseSplit, '$1-$2').toLowerCase(), entry);\n}\n\nexport function getViewClass(elementName: string): any {\n const entry = elementMap.get(elementName) || elementMap.get(elementName.toLowerCase());\n if (!entry) {\n throw new TypeError(`No known component for element ${elementName}.`);\n }\n\n try {\n return entry.resolver();\n } catch (e) {\n throw new TypeError(`Could not load view for: ${elementName}.${e}`);\n }\n}\n\nexport function getViewMeta(nodeName: string): ViewClassMeta {\n const entry = elementMap.get(nodeName) || elementMap.get(nodeName.toLowerCase());\n return (entry && entry.meta) || defaultViewMeta;\n}\n\nexport function isKnownView(elementName: string): boolean {\n return elementMap.has(elementName) || elementMap.has(elementName.toLowerCase());\n}\n\nexport function extractSingleViewRecursive(nodes: Array<any>, nestLevel: number): View {\n const actualNodes = nodes.filter((node) => !(node instanceof InvisibleNode));\n\n if (actualNodes.length === 0) {\n throw new Error(`No suitable views found in list template! ` + `Nesting level: ${nestLevel}`);\n } else if (actualNodes.length > 1) {\n throw new Error(`More than one view found in list template!` + `Nesting level: ${nestLevel}`);\n }\n\n const rootLayout = actualNodes[0];\n if (!rootLayout) {\n return extractSingleViewRecursive(rootLayout.children, nestLevel + 1);\n }\n\n const parentLayout = rootLayout.parent;\n if (parentLayout instanceof LayoutBase) {\n const node = rootLayout.parentNode;\n parentLayout.removeChild(rootLayout);\n rootLayout.parentNode = node;\n }\n\n return rootLayout;\n}\n\n/**\n * @deprecated getSingleViewRecursive is deprecated, use extractSingleViewRecursive\n */\nexport function getSingleViewRecursive(nodes: Array<any>, nestLevel: number): View {\n return extractSingleViewRecursive(nodes, nestLevel);\n}\n","import {\n AbsoluteLayout,\n ActivityIndicator,\n Button,\n ContentView,\n DatePicker,\n DockLayout,\n FlexboxLayout,\n FormattedString,\n Frame,\n GridLayout,\n HtmlView,\n Image,\n Label,\n ListPicker,\n ListView,\n Page,\n Placeholder,\n Progress,\n ProxyViewContainer,\n Repeater,\n RootLayout,\n ScrollView,\n SearchBar,\n SegmentedBar,\n SegmentedBarItem,\n Slider,\n Span,\n SplitView,\n StackLayout,\n Switch,\n TabView,\n TextField,\n TextView,\n TimePicker,\n WebView,\n WrapLayout,\n} from '@nativescript/core';\nimport { formattedStringMeta, frameMeta, textBaseMeta } from './metas';\nimport { registerElement } from './registry';\n\n// Register default NativeScript components\n// Note: ActionBar related components are registerd together with action-bar directives.\nexport function registerNativeScriptViewComponents() {\n // No guard needed — registerElement calls Map.set which is idempotent.\n // The old `elementMap.size > 0` guard could falsely skip registration\n // in Vite HMR mode when elements were registered by a prior boot phase.\n registerElement('AbsoluteLayout', () => AbsoluteLayout);\n registerElement('ActivityIndicator', () => ActivityIndicator);\n registerElement('Button', () => Button, textBaseMeta);\n registerElement('ContentView', () => ContentView);\n registerElement('DatePicker', () => DatePicker);\n registerElement('DockLayout', () => DockLayout);\n registerElement('Frame', () => Frame, frameMeta);\n registerElement('GridLayout', () => GridLayout);\n registerElement('HtmlView', () => HtmlView);\n registerElement('Image', () => Image);\n // Parse5 changes <Image> tags to <img>. WTF!\n registerElement('img', () => Image);\n registerElement('Label', () => Label, textBaseMeta);\n registerElement('ListPicker', () => ListPicker);\n registerElement('ListView', () => ListView);\n registerElement('Page', () => Page);\n registerElement('Placeholder', () => Placeholder);\n registerElement('Progress', () => Progress);\n registerElement('ProxyViewContainer', () => ProxyViewContainer);\n registerElement('Repeater', () => Repeater);\n registerElement('RootLayout', () => RootLayout);\n registerElement('ScrollView', () => ScrollView);\n registerElement('SearchBar', () => SearchBar);\n registerElement('SegmentedBar', () => SegmentedBar);\n registerElement('SegmentedBarItem', () => SegmentedBarItem);\n registerElement('Slider', () => Slider);\n registerElement('SplitView', () => SplitView);\n registerElement('StackLayout', () => StackLayout);\n registerElement('FlexboxLayout', () => FlexboxLayout);\n registerElement('Switch', () => Switch);\n registerElement('TabView', () => TabView);\n registerElement('TextField', () => TextField, textBaseMeta);\n registerElement('TextView', () => TextView, textBaseMeta);\n registerElement('TimePicker', () => TimePicker);\n registerElement('WebView', () => WebView);\n registerElement('WrapLayout', () => WrapLayout);\n registerElement('FormattedString', () => FormattedString, formattedStringMeta);\n registerElement('Span', () => Span);\n}\n","import { unsetValue, View } from '@nativescript/core';\nimport { getViewClass, getViewMeta, isKnownView } from './element-registry';\nimport { NamespaceFilter } from './property-filter';\nimport {\n CommentNode,\n isContentView,\n isDetachedElement,\n isInvisibleNode,\n isLayout,\n isView,\n NgView,\n TextNode,\n} from './views';\n\nimport { NativeScriptDebug } from './trace';\nimport { NgLayoutBase } from './views/view-types';\n\n// Note: this utility exists from deep core import however results in\n// Module not found: Error: Can't resolve '@nativescript/core/ui/core/properties'\nfunction isCssVariable(property: string) {\n return /^--[^,\\s]+?$/.test(property);\n}\n\nconst ELEMENT_NODE_TYPE = 1;\nconst XML_ATTRIBUTES = Object.freeze(['style', 'rows', 'columns', 'fontAttributes']);\nconst whiteSpaceSplitter = /\\s+/;\n\nexport type BeforeAttachAction = (view: View) => void;\n\nfunction printNgTree(view: NgView) {\n let parent = view;\n while (parent.parent && (parent.parent as NgView).firstChild) {\n parent = parent.parent as NgView;\n }\n printChildrenRecurse(parent);\n}\nfunction printChildrenRecurse(parent: NgView) {\n const children = parent.firstChild ? [parent.firstChild, ...getChildrenSiblings(parent.firstChild).nextSiblings] : [];\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`parent: ${parent}, firstChild: ${parent.firstChild}, lastChild: ${parent.lastChild} children: ${children}`);\n if (parent.firstChild) {\n NativeScriptDebug.viewUtilLog(`----- start ${parent}`);\n }\n }\n children.forEach((c) => printChildrenRecurse(c));\n if (parent.firstChild && NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`----- end ${parent}`);\n }\n}\n\nfunction getChildrenSiblings(view: NgView) {\n const nextSiblings = [];\n const previousSiblings = [];\n let sibling = view.nextSibling;\n while (sibling) {\n nextSiblings.push(sibling);\n sibling = sibling.nextSibling;\n }\n sibling = view.previousSibling;\n while (sibling) {\n previousSiblings.push(sibling);\n sibling = sibling.previousSibling;\n }\n return {\n previousSiblings,\n nextSiblings,\n };\n}\n\nfunction printSiblingsTree(view: NgView) {\n if (!NativeScriptDebug.isLogEnabled()) return;\n const { previousSiblings, nextSiblings } = getChildrenSiblings(view);\n NativeScriptDebug.viewUtilLog(`${view} previousSiblings: ${previousSiblings} nextSiblings: ${nextSiblings}`);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nconst propertyMaps: Map<Function, Map<string, string>> = new Map<Function, Map<string, string>>();\n\nexport class ViewUtil {\n constructor(\n private namespaceFilters?: NamespaceFilter[],\n private reuseViews?: boolean,\n ) {}\n /**\n * Inserts a child into a parrent, preferably before next.\n * @param parent parent view\n * @param child child view to be added\n * @param previous previous element. If present, insert after this.\n * @param next next element. If present, insert before this (previous is ignored).\n */\n private insertChild(parent: View, child: View, previous?: NgView, next?: NgView) {\n if (!parent) {\n return;\n }\n\n const extendedParent = this.ensureNgViewExtensions(parent);\n const extendedChild = this.ensureNgViewExtensions(child);\n\n // this should never enter, as angular is supposed to remove the child from the previous parent before calling this\n // but when angular animations are enabled, the removal might be delayed, so we need to ensure this view is not anywhere\n // this seems to only happens to CommentNodes\n if (extendedChild.parentNode) {\n this.removeChild(extendedChild.parentNode, extendedChild);\n }\n // if there's a next child, previous is the previousSibling of it\n if (next) {\n previous = next.previousSibling;\n } else if (previous) {\n // if there's a previous, next is the nextSibling of it\n next = previous.nextSibling;\n } else {\n // no previous or next, append to the parent\n previous = extendedParent.lastChild; // this can still be undefined if the parent has no children!\n }\n this.insertInList(extendedParent, extendedChild, previous, next);\n\n if (isDetachedElement(child) || isInvisibleNode(child)) {\n extendedChild.parentNode = extendedParent;\n }\n\n if (!isDetachedElement(child)) {\n const nextVisual = this.findNextVisual(next);\n this.addToVisualTree(extendedParent, extendedChild, nextVisual);\n } else if (isInvisibleNode(extendedChild)) {\n const nextVisual = this.findNextVisual(next);\n this.addInvisibleNode(extendedParent, extendedChild, nextVisual);\n }\n // printNgTree(extendedChild);\n }\n\n public insertBefore(parent: View, child: View, refChild?: View | NgView) {\n const extendedRef = refChild ? this.ensureNgViewExtensions(refChild) : undefined;\n this.insertChild(parent, child, undefined, extendedRef);\n }\n public insertAfter(parent: View, child: View, refChild?: View | NgView) {\n const extendedRef = refChild ? this.ensureNgViewExtensions(refChild) : undefined;\n this.insertChild(parent, child, extendedRef);\n }\n\n public appendChild(parent: View, child: View) {\n this.insertChild(parent, child);\n }\n\n /**\n * Inserts a view into the parent/sibling linked list\n * !WARNING: this method makes no checks to validate the integrity of previous/next children\n * @param parent parent view\n * @param child child view\n * @param previous previous element. null/undefined for first element\n * @param next next element. null/undefined for last element\n */\n private insertInList(parent: NgView, child: NgView, previous: NgView, next: NgView): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(\n `ViewUtil.insertInList parent: ${parent}, view: ${child}, ` + `previous: ${previous}, next: ${next}`,\n );\n }\n\n if (previous) {\n previous.nextSibling = child;\n child.previousSibling = previous;\n } else {\n parent.firstChild = child;\n }\n\n if (next) {\n child.nextSibling = next;\n next.previousSibling = child;\n } else {\n parent.lastChild = child;\n }\n }\n\n private addToVisualTree(parent: NgView, child: NgView, next: NgView): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`ViewUtil.addToVisualTree parent: ${parent}, view: ${child}, next: ${next}`);\n }\n\n if (parent.meta && parent.meta.insertChild) {\n parent.meta.insertChild(parent, child, next);\n } else if (isLayout(parent)) {\n this.insertToLayout(parent, child, next);\n } else if (isContentView(parent)) {\n parent.content = child;\n } else if (parent && (<any>parent)._addChildFromBuilder) {\n (<any>parent)._addChildFromBuilder(child.nodeName, child);\n }\n }\n\n private addInvisibleNode(parent: NgView, child: NgView, next: NgView): void {\n if (parent.meta?.insertInvisibleNode) {\n parent.meta.insertInvisibleNode(parent, child, next);\n } else {\n if (child instanceof TextNode) {\n (parent as any).text = child.text;\n child.registerTextChange((t) => ((parent as any).text = t), parent);\n }\n }\n }\n\n private insertToLayout(parent: NgLayoutBase, child: NgView, next: NgView): void {\n if (child.parent === parent) {\n this.removeLayoutChild(parent, child);\n }\n\n const nextVisual = this.findNextVisual(next);\n if (nextVisual) {\n const index = parent.getChildIndex(nextVisual);\n parent.insertChild(child, index);\n } else {\n parent.addChild(child);\n }\n // parent.eachChild((c) => {console.log(c); return true});\n }\n\n private findNextVisual(view: NgView): NgView {\n let next = view;\n while (next && isDetachedElement(next)) {\n next = next.nextSibling;\n }\n\n return next;\n }\n\n public removeChild(parent: View, child: View) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`ViewUtil.removeChild parent: ${parent} child: ${child}`);\n }\n\n if (!parent) {\n return;\n }\n\n const extendedParent = this.ensureNgViewExtensions(parent);\n const extendedChild = this.ensureNgViewExtensions(child);\n extendedChild.parentNode = null;\n\n this.removeFromList(extendedParent, extendedChild);\n if (!isDetachedElement(extendedChild)) {\n this.removeFromVisualTree(extendedParent, extendedChild);\n } else if (isInvisibleNode(extendedChild)) {\n this.removeInvisibleNode(extendedParent, extendedChild);\n }\n }\n\n private removeFromList(parent: NgView, child: NgView) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`ViewUtil.removeFromList parent: ${parent} child: ${child}`);\n }\n\n // only child. null everything\n if (parent.firstChild === child && parent.lastChild === child) {\n parent.firstChild = null;\n parent.lastChild = null;\n child.nextSibling = null;\n child.previousSibling = null;\n return;\n }\n\n const previous = child.previousSibling;\n const next = child.nextSibling;\n // is first child, make the next sibling the first child (can be null)\n if (parent.firstChild === child) {\n parent.firstChild = next;\n }\n\n // is last child, make the previous sibling the last child (can be null)\n if (parent.lastChild === child) {\n parent.lastChild = previous;\n }\n\n // we have a previous sibling, make it point to the next sibling\n if (previous) {\n previous.nextSibling = next;\n }\n\n // we have a next sibling, make it point to the previous\n if (next) {\n next.previousSibling = previous;\n }\n\n // finally, null the siblings\n child.nextSibling = null;\n child.previousSibling = null;\n }\n\n // NOTE: This one is O(n) - use carefully\n private findPreviousElement(parent: NgView, child: NgView): NgView {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`ViewUtil.findPreviousElement parent: ${parent} child: ${child}`);\n }\n\n let previousVisual;\n if (isLayout(parent)) {\n previousVisual = this.getPreviousVisualElement(parent, child);\n }\n\n let previous = previousVisual || parent.firstChild;\n\n // since detached elements are not added to the visual tree,\n // we need to find the actual previous sibling of the view,\n // which may as well be an invisible node\n while (previous && previous !== child && previous.nextSibling !== child) {\n previous = previous.nextSibling;\n }\n\n return previous;\n }\n\n private getPreviousVisualElement(parent: NgLayoutBase, child: NgView): NgView {\n const elementIndex = parent.getChildIndex(child);\n\n if (elementIndex > 0) {\n return parent.getChildAt(elementIndex - 1) as NgView;\n }\n }\n\n // NOTE: This one is O(n) - use carefully\n public getChildIndex(parent: any, child: NgView) {\n if (isLayout(parent)) {\n return parent.getChildIndex(child);\n } else if (isContentView(parent)) {\n return child === parent.content ? 0 : -1;\n }\n }\n\n private removeFromVisualTree(parent: NgView, child: NgView) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`ViewUtil.removeFromVisualTree parent: ${parent} child: ${child}`);\n }\n\n if (parent.meta && parent.meta.removeChild) {\n parent.meta.removeChild(parent, child);\n } else if (isLayout(parent)) {\n this.removeLayoutChild(parent, child);\n } else if (isContentView(parent) && parent.content === child) {\n parent.content = null;\n } else if (isView(parent)) {\n parent._removeView(child);\n }\n }\n\n private removeInvisibleNode(parent: NgView, child: NgView) {\n if (parent.meta?.removeInvisibleNode) {\n parent.meta.removeInvisibleNode(parent, child);\n } else {\n if (child instanceof TextNode) {\n child.unregisterTextChange(parent);\n }\n }\n }\n\n private removeLayoutChild(parent: NgLayoutBase, child: NgView): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`ViewUtil.removeLayoutChild parent: ${parent} child: ${child}`);\n }\n\n const index = parent.getChildIndex(child);\n\n if (index !== -1) {\n parent.removeChild(child);\n }\n }\n\n public createComment(value: string): CommentNode {\n return new CommentNode(value);\n }\n\n public createText(value: string): TextNode {\n return new TextNode(value);\n }\n\n public createView(name: string): NgView {\n const originalName = name;\n if (!isKnownView(name)) {\n name = 'ProxyViewContainer';\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`Creating view: ${originalName} ${name}`);\n }\n\n const viewClass = getViewClass(name);\n const view = <NgView>new viewClass();\n const ngView = this.setNgViewExtensions(view, name);\n ngView.reusable = !!this.reuseViews;\n\n return ngView;\n }\n\n private ensureNgViewExtensions(view: View): NgView {\n if (Object.hasOwnProperty.call(view, 'meta')) {\n return view as NgView;\n } else {\n const name = view.cssType || view.typeName;\n const ngView = this.setNgViewExtensions(view, name);\n\n return ngView;\n }\n }\n\n private setNgViewExtensions(view: View, name: string): NgView {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`Make into a NgView view: ${view} name: \"${name}\"`);\n }\n\n const ngView = view as NgView;\n ngView.nodeName = name;\n ngView.meta = getViewMeta(name);\n\n // we're setting the node type of the view\n // to 'element' because of checks done in the\n // dom animation engine\n ngView.nodeType = ELEMENT_NODE_TYPE;\n\n return ngView;\n }\n\n public setProperty(view: NgView, attributeName: string, value: any, namespace?: string): void {\n if (!view || (namespace && !this.runsIn(namespace))) {\n return;\n }\n\n if (attributeName.indexOf('.') !== -1) {\n // Handle nested properties\n const properties = attributeName.split('.');\n attributeName = properties[properties.length - 1];\n\n let propMap = this.getProperties(view);\n let i = 0;\n while (i < properties.length - 1 && typeof view !== 'undefined') {\n let prop = properties[i];\n if (propMap.has(prop)) {\n prop = propMap.get(prop);\n }\n\n view = view[prop];\n propMap = this.getProperties(view);\n i++;\n }\n }\n\n if (typeof view !== 'undefined') {\n this.setPropertyInternal(view, attributeName, value);\n }\n }\n\n private runsIn(platform: string): boolean {\n let runs = true;\n const last = () => true;\n if (this.namespaceFilters) {\n let chain = (p: string) => true;\n for (let i = this.namespaceFilters.length - 1; i >= 0; i--) {\n const currentChain = chain;\n chain = (p) => this.namespaceFilters[i].runsIn(p, currentChain);\n }\n runs = chain(platform);\n runs = runs !== false ? true : false; // undefined means true\n // this.namespaceFilters.some((filter) => {\n // \tconst runsInFilter = filter.runsIn(platform);\n // \tif (runsInFilter !== undefined) {\n // \t\truns = runsInFilter;\n // \t\treturn true;\n // \t}\n // });\n }\n return runs;\n }\n\n private setPropertyInternal(view: NgView, attributeName: string, value: any): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`Setting attribute: ${attributeName}=${value} to ${view}`);\n }\n\n if (attributeName === 'class') {\n this.setClasses(view, value);\n return;\n }\n\n if (XML_ATTRIBUTES.indexOf(attributeName) !== -1) {\n view[attributeName] = value;\n return;\n }\n\n const propMap = this.getProperties(view);\n const propertyName = propMap.get(attributeName);\n\n // Ensure the children of a collection currently have no parent set.\n if (Array.isArray(value)) {\n this.removeParentReferencesFromItems(value);\n }\n\n if (propertyName) {\n // We have a lower-upper case mapped property.\n view[propertyName] = value;\n return;\n }\n\n // Unknown attribute value -- just set it to our object as is.\n view[attributeName] = value;\n }\n\n private removeParentReferencesFromItems(items: any[]): void {\n for (const item of items) {\n if (item.parent && item.parentNode) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.viewUtilLog(`Unassigning parent ${item.parentNode} on value: ${item}`);\n }\n item.parent = undefined;\n item.parentNode = undefined;\n }\n }\n }\n\n private getProperties(instance: any): Map<string, string> {\n const type = instance && instance.constructor;\n if (!type) {\n return new Map<string, string>();\n }\n\n if (!propertyMaps.has(type)) {\n const propMap = new Map<string, string>();\n for (const propName in instance) {\n // tslint:disable:forin\n propMap.set(propName.toLowerCase(), propName);\n }\n propertyMaps.set(type, propMap);\n }\n\n return propertyMaps.get(type);\n }\n\n private cssClasses(view: NgView) {\n if (!view.ngCssClasses) {\n view.ngCssClasses = new Map<string, boolean>();\n }\n return view.ngCssClasses;\n }\n\n public addClass(view: View | NgView, className: string): void {\n const extendedView = this.ensureNgViewExtensions(view);\n this.cssClasses(extendedView).set(className, true);\n this.syncClasses(extendedView);\n }\n\n public removeClass(view: View, className: string): void {\n const extendedView = this.ensureNgViewExtensions(view);\n this.cssClasses(extendedView).delete(className);\n this.syncClasses(extendedView);\n }\n\n private setClasses(view: NgView, classesValue: string): void {\n const classes = classesValue.split(whiteSpaceSplitter);\n this.cssClasses(view).clear();\n classes.forEach((className) => this.cssClasses(view).set(className, true));\n this.syncClasses(view);\n }\n\n private syncClasses(view: NgView): void {\n const classValue = (<any>Array).from(this.cssClasses(view).keys()).join(' ');\n view.className = classValue;\n }\n\n public setStyle(view: View, styleName: string, value: any) {\n if (isCssVariable(styleName)) {\n view.style.setUnscopedCssVariable(styleName, value);\n view._onCssStateChange();\n } else {\n view.style[styleName] = value;\n }\n }\n\n public removeStyle(view: View, styleName: string) {\n if (isCssVariable(styleName)) {\n // TODO: expose this on core\n (view.style as any).unscopedCssVariables.delete(styleName);\n view._onCssStateChange();\n } else {\n view.style[styleName] = unsetValue;\n }\n }\n}\n","import { Inject, Injectable, Injector, NgZone, Optional, Renderer2, RendererFactory2, RendererStyleFlags2, RendererType2, ViewEncapsulation, inject, runInInjectionContext } from '@angular/core';\nimport { addTaggedAdditionalCSS, Application, ContentView, Device, getViewById, Observable, profile, Utils, View } from '@nativescript/core';\nimport { getViewClass, isKnownView } from './element-registry';\nimport { getFirstNativeLikeView, NgView, TextNode } from './views';\n\nimport { NamespaceFilter, NAMESPACE_FILTERS } from './property-filter';\nimport { APP_ROOT_VIEW, ENABLE_REUSABE_VIEWS, NATIVESCRIPT_ROOT_MODULE_ID, PREVENT_SPECIFIC_EVENTS_DURING_CD } from './tokens';\nimport { NativeScriptDebug } from './trace';\nimport { ViewUtil } from './view-util';\n\nconst addStyleToCss = profile('\"renderer\".addStyleToCss', function addStyleToCss(style: string, tag?: string | number): void {\n if (tag) {\n addTaggedAdditionalCSS(style, tag);\n } else {\n Application.addCss(style);\n }\n});\n\nfunction runInRootZone<T>(fn: () => T): T {\n if (typeof Zone === 'undefined') {\n return fn();\n }\n return Zone.root.run(fn);\n}\n\nfunction inRootZone() {\n return function (target: unknown, key: string | symbol, descriptor: PropertyDescriptor) {\n const childFunction = descriptor.value;\n descriptor.value = function (...args: unknown[]) {\n const fn = childFunction.bind(this);\n return runInRootZone(() => fn(...args));\n };\n return descriptor;\n };\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NativeScriptRendererHelperService {\n private _executingDomChanges = 0;\n get executingDomChanges() {\n return this._executingDomChanges;\n }\n get isExecutingDomChanges() {\n return this._executingDomChanges > 0;\n }\n beginDomChanges() {\n this._executingDomChanges++;\n }\n endDomChanges() {\n this._executingDomChanges--;\n }\n executeDomChange<T>(fn: () => T): T {\n try {\n this.beginDomChanges();\n return fn();\n } finally {\n this.endDomChanges();\n }\n }\n}\n\nfunction modifiesDom() {\n return function (\n target: {\n _rendererHelper: NativeScriptRendererHelperService;\n },\n key: string | symbol,\n descriptor: PropertyDescriptor,\n ) {\n const childFunction = descriptor.value;\n descriptor.value = function (...args: unknown[]) {\n const fn = childFunction.bind(this);\n return this._rendererHelper.executeDomChange(() => fn(...args));\n };\n return descriptor;\n };\n}\n\nexport class NativeScriptRendererFactory implements RendererFactory2 {\n private componentRenderers = new Map<string, Renderer2>();\n private defaultRenderer: Renderer2;\n // backwards compatibility with RadListView\n private rootView = inject(APP_ROOT_VIEW);\n private namespaceFilters = inject(NAMESPACE_FILTERS);\n private rootModuleID = inject(NATIVESCRIPT_ROOT_MODULE_ID);\n private reuseViews = inject(ENABLE_REUSABE_VIEWS, {\n optional: true,\n });\n private injector = inject(Injector);\n private viewUtil = new ViewUtil(this.namespaceFilters, this.reuseViews);\n\n constructor() {\n if (typeof this.reuseViews !== 'boolean') {\n this.reuseViews = false; // default to false\n }\n this.defaultRenderer = new NativeScriptRenderer(this.rootView);\n }\n createRenderer(hostElement: any, type: RendererType2): Renderer2 {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRendererFactory.createRenderer ${hostElement}. type.id: ${type.id} type.encapsulation: ${type.encapsulation}`);\n }\n if (!hostElement || !type) {\n return this.defaultRenderer;\n }\n\n let renderer = this.componentRenderers.get(type.id);\n /**\n *! WARNING\n *! We're reusing the renderer for the components\n *! this might cause unexpected behavior as the \"rootView\" is an arbitrary hostElement\n *! also, the renderer has it's .destroy() called!\n *! might be useful to create a BaseEmulatedRender and a ProxyEmulatedRender\n *! every component type gets a BaseEmulatedRender (singleton) which is passed to ProxyEmulatedRender\n *! ProxyEmulatedRenderer registers with BaseEmulatedRender so we can clean up things like CSS when it's not needed\n *! this might be useful if we find a way to HMR component styling without a full rebootstrap\n */\n if (renderer) {\n if (renderer instanceof EmulatedRenderer) {\n renderer.applyToHost(hostElement);\n }\n\n return renderer;\n }\n\n if (type.encapsulation === ViewEncapsulation.None) {\n type.styles.map((s) => s.toString()).forEach((v) => addStyleToCss(v, this.rootModuleID));\n renderer = this.defaultRenderer;\n } else {\n runInInjectionContext(this.injector, () => {\n renderer = new EmulatedRenderer(type, hostElement);\n });\n (<EmulatedRenderer>renderer).applyToHost(hostElement);\n }\n\n this.componentRenderers.set(type.id, renderer);\n return renderer;\n }\n // begin?(): void {\n // throw new Error(\"Method not implemented.\");\n // }\n // end?(): void {\n // throw new Error(\"Method not implemented.\");\n // }\n whenRenderingDone(): Promise<any> {\n if (!this.rootView) {\n return Promise.resolve();\n }\n return new Promise<void>((resolve) => {\n let interval: any = 0;\n function scheduleResolve() {\n // iOS really hates synchronous things...\n // Utils.queueMacrotask(resolve);\n setTimeout(resolve, 15);\n }\n function fireWhenLoaded() {\n const view = rootFactory();\n if (view.isLoaded) {\n scheduleResolve();\n } else {\n view.once('loaded', scheduleResolve);\n }\n }\n const rootFactory = () => (this.rootView instanceof ContentView ? this.rootView.content : this.rootView);\n if (!rootFactory()) {\n interval = setInterval(() => {\n if (rootFactory()) {\n clearInterval(interval);\n fireWhenLoaded();\n }\n }, 10);\n } else {\n fireWhenLoaded();\n }\n });\n // throw new Error(\"Method not implemented.\");\n }\n}\n\nclass NativeScriptRenderer implements Renderer2 {\n private namespaceFilters = inject(NAMESPACE_FILTERS);\n private reuseViews = inject(ENABLE_REUSABE_VIEWS, {\n optional: true,\n });\n private viewUtil = new ViewUtil(this.namespaceFilters, this.reuseViews);\n _rendererHelper = inject(NativeScriptRendererHelperService);\n private specificPreventedEvents = new Set(\n inject(PREVENT_SPECIFIC_EVENTS_DURING_CD, {\n optional: true,\n }) ?? [],\n );\n private preventChangeEvents =\n inject(PREVENT_SPECIFIC_EVENTS_DURING_CD, {\n optional: true,\n }) ?? false;\n\n constructor(private rootView: View) {}\n get data(): { [key: string]: any } {\n throw new Error('Method not implemented.');\n }\n destroy(): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog('NativeScriptRenderer.destroy');\n }\n }\n @inRootZone()\n @modifiesDom()\n createElement(name: string, namespace?: string) {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.createElement: ${name}`);\n }\n let oldName;\n if (!isKnownView(name)) {\n oldName = name;\n name = 'ProxyViewContainer';\n }\n const view = this.viewUtil.createView(name);\n if (oldName) {\n (view as any).customCSSName = oldName;\n }\n return view;\n }\n @inRootZone()\n @modifiesDom()\n createComment(value: string) {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.createComment ${value}`);\n }\n return this.viewUtil.createComment(value);\n }\n @inRootZone()\n @modifiesDom()\n createText(value: string) {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.createText ${value}`);\n }\n return this.viewUtil.createText(value);\n }\n destroyNode: (node: any) => void = (node: View) =>\n runInRootZone(() => {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.destroyNode node: ${node}`);\n }\n if (node?.destroyNode) {\n node?.destroyNode();\n }\n });\n @inRootZone()\n @modifiesDom()\n appendChild(parent: View, newChild: View): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.appendChild child: ${newChild} parent: ${parent}`);\n }\n this.viewUtil.appendChild(parent, newChild);\n }\n @inRootZone()\n @modifiesDom()\n insertBefore(parent: any, newChild: any, refChild: any): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.insertBefore child: ${newChild} ` + `parent: ${parent} refChild: ${refChild}`);\n }\n this.viewUtil.insertBefore(parent, newChild, refChild);\n }\n @inRootZone()\n @modifiesDom()\n removeChild(parent: any, oldChild: any, isHostElement?: boolean): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.removeChild child: ${oldChild} parent: ${parent} oldChild.parentNode: ${oldChild?.parentNode}`);\n }\n this.viewUtil.removeChild(parent ?? oldChild.parentNode, oldChild);\n }\n selectRootElement(selectorOrNode: any, preserveContent?: boolean) {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.selectRootElement: ${selectorOrNode}`);\n }\n if (selectorOrNode instanceof View) {\n return selectorOrNode;\n }\n if (selectorOrNode && selectorOrNode[0] === '#') {\n const result = getViewById(this.rootView, selectorOrNode.slice(1));\n return (result || this.rootView) as View;\n }\n if (typeof selectorOrNode === 'string') {\n const view = this.viewUtil.createView(selectorOrNode);\n if (getFirstNativeLikeView(view) === view) {\n // view is nativelike!\n this.appendChild(this.rootView, view);\n return view;\n }\n }\n return this.rootView;\n }\n parentNode(node: NgView) {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.parentNode for node: ${node} is ${node.parentNode}`);\n }\n return node.parentNode;\n }\n nextSibling(node: NgView) {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.nextSibling of ${node} is ${node.nextSibling}`);\n }\n return node.nextSibling;\n }\n @inRootZone()\n @modifiesDom()\n setAttribute(el: any, name: string, value: string, namespace?: string): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.setAttribute ${namespace ? namespace + ':' : ''}${el}.${name} = ${value}`);\n }\n this.viewUtil.setProperty(el, name, value, namespace);\n }\n removeAttribute(el: any, name: string, namespace?: string): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.removeAttribute ${namespace ? namespace + ':' : ''}${el}.${name}`);\n }\n }\n @inRootZone()\n @modifiesDom()\n addClass(el: any, name: string): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.addClass ${name}`);\n }\n this.viewUtil.addClass(el, name);\n }\n @inRootZone()\n @modifiesDom()\n removeClass(el: any, name: string): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.removeClass ${name}`);\n }\n this.viewUtil.removeClass(el, name);\n }\n @inRootZone()\n @modifiesDom()\n setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.setStyle: ${el}, ${style} = ${value}`);\n }\n this.viewUtil.setStyle(el, style, value);\n }\n @inRootZone()\n @modifiesDom()\n removeStyle(el: any, style: string, flags?: RendererStyleFlags2): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog('NativeScriptRenderer.removeStyle: ${styleName}');\n }\n this.viewUtil.removeStyle(el, style);\n }\n @inRootZone()\n @modifiesDom()\n setProperty(el: any, name: string, value: any): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.setProperty ${el}.${name} = ${value}`);\n }\n this.viewUtil.setProperty(el, name, value);\n }\n @inRootZone()\n @modifiesDom()\n setValue(node: any, value: string): void {\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.setValue renderNode: ${node}, value: ${value}`);\n }\n if (node instanceof TextNode) {\n node.text = value;\n }\n // throw new Error(\"Method not implemented.\");\n }\n listen(target: View, eventName: string, callback: (event: any) => boolean | void): () => void {\n // throw new Error(\"Method not implemented.\");\n if (NativeScriptDebug.enabled) {\n NativeScriptDebug.rendererLog(`NativeScriptRenderer.listen: ${eventName}`);\n }\n let modifiedCallback = callback;\n if ((this.preventChangeEvents && eventName.endsWith('Change')) || this.specificPreventedEvents.has(eventName)) {\n modifiedCallback = (...args) => {\n if (this._rendererHelper.isExecutingDomChanges) {\n return;\n }\n return callback(...args);\n };\n }\n target.on(eventName, modifiedCallback);\n if (eventName === View.loadedEvent && target.isLoaded) {\n // we must create a new obervable here to ensure that the event goes through whatever zone patches are applied\n const obs = new Observable();\n obs.once(eventName, modifiedCallback);\n obs.notify({\n eventName,\n object: target,\n });\n }\n return () => target.off(eventName, modifiedCallback);\n }\n}\n\n// CONTENT_ATTR not exported from nativescript-renderer - we need it for styles application.\nconst COMPONENT_REGEX = /%COMP%/g;\nconst ATTR_SANITIZER = /-/g;\nexport const COMPONENT_VARIABLE = '%COMP%';\nexport const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nexport const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\n\nconst replaceNgAttribute = function (input: string, componentId: string): string {\n return input.replace(COMPONENT_REGEX, componentId);\n};\n\nconst addScopedStyleToCss = profile(`\"renderer\".addScopedStyleToCss`, function addScopedStyleToCss(style: string, tag?: number | string): void {\n if (tag) {\n addTaggedAdditionalCSS(style, tag);\n } else {\n Application.addCss(style);\n }\n});\n\n@Injectable()\nexport class EmulatedRenderer extends NativeScriptRenderer {\n private contentAttr: string;\n private hostAttr: string;\n private rootModuleId = inject(NATIVESCRIPT_ROOT_MODULE_ID);\n\n constructor(component: RendererType2, rootView: View) {\n super(rootView);\n\n const componentId = component.id.replace(ATTR_SANITIZER, '_');\n this.contentAttr = replaceNgAttribute(CONTENT_ATTR, componentId);\n this.hostAttr = replaceNgAttribute(HOST_ATTR, componentId);\n this.addStyles(component.styles, componentId);\n }\n\n applyToHost(view: NgView) {\n super.setAttribute(view, this.hostAttr, '');\n }\n\n appendChild(parent: any, newChild: NgView): void {\n super.appendChild(parent, newChild);\n }\n\n createElement(parent: any, name: string): NgView {\n const view = super.createElement(parent, name);\n\n // Set an attribute to the view to scope component-specific css.\n // The property name is pre-generated by Angular.\n super.setAttribute(view, this.contentAttr, '');\n\n return view;\n }\n\n @profile\n @inRootZone()\n @modifiesDom()\n private addStyles(styles: (string | any[])[], componentId: string) {\n styles\n .map((s) => s.toString())\n .map((s) => replaceNgAttribute(s, componentId))\n .forEach((s) => addScopedStyleToCss(s, this.rootModuleId));\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Throws an exception when attempting to attach a null portal to a host.\n * @docs-private\n */\nexport function throwNullPortalError() {\n throw Error('Must provide a portal to attach');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a host that is already attached.\n * @docs-private\n */\nexport function throwPortalAlreadyAttachedError() {\n throw Error('Host already has a portal attached');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to an already-disposed host.\n * @docs-private\n */\nexport function throwPortalOutletAlreadyDisposedError() {\n throw Error('This PortalOutlet has already been disposed');\n}\n\n/**\n * Throws an exception when attempting to attach an unknown portal type.\n * @docs-private\n */\nexport function throwUnknownPortalTypeError() {\n throw Error('Attempting to attach an unknown Portal type. BasePortalOutlet accepts either ' + 'a ComponentPortal or a TemplatePortal.');\n}\n\n/**\n * Throws an exception when attempting to attach a portal to a null host.\n * @docs-private\n */\nexport function throwNullPortalOutletError() {\n throw Error('Attempting to attach a portal to a null PortalOutlet');\n}\n\n/**\n * Throws an exception when attempting to detach a portal that is not attached.\n * @docs-private\n */\nexport function throwNoPortalAttachedError() {\n throw Error('Attempting to detach a portal that is not attached to a host');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { TemplateRef, ViewContainerRef, ElementRef, ComponentRef, EmbeddedViewRef, Injector, ComponentFactoryResolver } from '@angular/core';\nimport { View } from '@nativescript/core';\nimport { throwNullPortalOutletError, throwPortalAlreadyAttachedError, throwNoPortalAttachedError, throwNullPortalError, throwPortalOutletAlreadyDisposedError, throwUnknownPortalTypeError } from './portal-errors';\nimport type { ComponentType } from '../../utils/general';\n\n/**\n * A `Portal` is something that you want to render somewhere else.\n * It can be attach to / detached from a `PortalOutlet`.\n */\nexport abstract class Portal<T> {\n private _attachedHost: PortalOutlet | null;\n\n /** Attach this portal to a host. */\n attach(host: PortalOutlet): T {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (host == null) {\n throwNullPortalOutletError();\n }\n\n if (host.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n }\n\n this._attachedHost = host;\n return <T>host.attach(this);\n }\n\n /** Detach this portal from its host */\n detach(): void {\n const host = this._attachedHost;\n\n if (host != null) {\n this._attachedHost = null;\n host.detach();\n } else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwNoPortalAttachedError();\n }\n }\n\n /** Whether this portal is attached to a host. */\n get isAttached(): boolean {\n return this._attachedHost != null;\n }\n\n /**\n * Sets the PortalOutlet reference without performing `attach()`. This is used directly by\n * the PortalOutlet when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host: PortalOutlet | null) {\n this._attachedHost = host;\n }\n}\n\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nexport class ComponentPortal<T> extends Portal<ComponentRef<T>> {\n /** The type of the component that will be instantiated for attachment. */\n component: ComponentType<T>;\n\n /**\n * [Optional] Where the attached component should live in Angular's *logical* component tree.\n * This is different from where the component *renders*, which is determined by the PortalOutlet.\n * The origin is necessary when the host is outside of the Angular application context.\n */\n viewContainerRef?: ViewContainerRef | null;\n\n /** [Optional] Injector used for the instantiation of the component. */\n injector?: Injector | null;\n\n /**\n * Alternate `ComponentFactoryResolver` to use when resolving the associated component.\n * Defaults to using the resolver from the outlet that the portal is attached to.\n */\n componentFactoryResolver?: ComponentFactoryResolver | null;\n\n constructor(component: ComponentType<T>, viewContainerRef?: ViewContainerRef | null, injector?: Injector | null, componentFactoryResolver?: ComponentFactoryResolver | null) {\n super();\n this.component = component;\n this.viewContainerRef = viewContainerRef;\n this.injector = injector;\n this.componentFactoryResolver = componentFactoryResolver;\n }\n}\n\n/**\n * A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).\n */\nexport class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {\n /** The embedded template that will be used to instantiate an embedded View in the host. */\n templateRef: TemplateRef<C>;\n\n /** Reference to the ViewContainer into which the template will be stamped out. */\n viewContainerRef: ViewContainerRef;\n\n /** Contextual data to be passed in to the embedded view. */\n context: C | undefined;\n\n constructor(template: TemplateRef<C>, viewContainerRef: ViewContainerRef, context?: C) {\n super();\n this.templateRef = template;\n this.viewContainerRef = viewContainerRef;\n this.context = context;\n }\n\n get origin(): ElementRef {\n return this.templateRef.elementRef;\n }\n\n /**\n * Attach the portal to the provided `PortalOutlet`.\n * When a context is provided it will override the `context` property of the `TemplatePortal`\n * instance.\n */\n attach(host: PortalOutlet, context: C | undefined = this.context): EmbeddedViewRef<C> {\n this.context = context;\n return super.attach(host);\n }\n\n detach(): void {\n this.context = undefined;\n return super.detach();\n }\n}\n\n/**\n * A `DomPortal` is a portal whose DOM element will be taken from its current position\n * in the DOM and moved into a portal outlet, when it is attached. On detach, the content\n * will be restored to its original position.\n */\nexport class DomPortal<T = View> extends Portal<T> {\n /** DOM node hosting the portal's content. */\n readonly element: T;\n\n constructor(element: T | ElementRef<T>) {\n super();\n this.element = element instanceof ElementRef ? element.nativeElement : element;\n }\n}\n\n/** A `PortalOutlet` is an space that can contain a single `Portal`. */\nexport interface PortalOutlet {\n /** Attaches a portal to this outlet. */\n attach(portal: Portal<any>): any;\n\n /** Detaches the currently attached portal from this outlet. */\n detach(): any;\n\n /** Performs cleanup before the outlet is destroyed. */\n dispose(): void;\n\n /** Whether there is currently a portal attached to this outlet. */\n hasAttached(): boolean;\n}\n\n/**\n * Partial implementation of PortalOutlet that handles attaching\n * ComponentPortal and TemplatePortal.\n */\nexport abstract class BasePortalOutlet implements PortalOutlet {\n /** The portal currently attached to the host. */\n protected _attachedPortal: Portal<any> | null;\n\n /** A function that will permanently dispose this host. */\n private _disposeFn: (() => void) | null;\n\n /** Whether this host has already been permanently disposed. */\n private _isDisposed = false;\n\n /** Whether this host has an attached portal. */\n hasAttached(): boolean {\n return !!this._attachedPortal;\n }\n\n attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;\n attach(portal: any): any;\n\n /** Attaches a portal. */\n attach(portal: Portal<any>): any {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!portal) {\n throwNullPortalError();\n }\n\n if (this.hasAttached()) {\n throwPortalAlreadyAttachedError();\n }\n\n if (this._isDisposed) {\n throwPortalOutletAlreadyDisposedError();\n }\n }\n\n if (portal instanceof ComponentPortal) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal);\n } else if (portal instanceof TemplatePortal) {\n this._attachedPortal = portal;\n return this.attachTemplatePortal(portal);\n // @breaking-change 10.0.0 remove null check for `this.attachDomPortal`.\n } else if (this.attachDomPortal && portal instanceof DomPortal) {\n this._attachedPortal = portal;\n return this.attachDomPortal(portal);\n }\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n throwUnknownPortalTypeError();\n }\n }\n\n abstract attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;\n\n abstract attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;\n\n // @breaking-change 10.0.0 `attachDomPortal` to become a required abstract method.\n // eslint-disable-next-line @typescript-eslint/member-ordering\n readonly attachDomPortal: null | ((portal: DomPortal) => any) = null;\n\n /** Detaches a previously attached portal. */\n detach(): void {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost(null);\n this._attachedPortal = null;\n }\n\n this._invokeDisposeFn();\n }\n\n /** Permanently dispose of this portal host. */\n dispose(): void {\n if (this.hasAttached()) {\n this.detach();\n }\n\n this._invokeDisposeFn();\n this._isDisposed = true;\n }\n\n /** @docs-private */\n setDisposeFn(fn: () => void) {\n this._disposeFn = fn;\n }\n\n private _invokeDisposeFn() {\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = null;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { ComponentRef, Directive, EmbeddedViewRef, EventEmitter, NgModule, OnDestroy, OnInit, Output, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { View } from '@nativescript/core';\nimport { CommentNode } from '../../views/invisible-nodes';\nimport { BasePortalOutlet, ComponentPortal, DomPortal, Portal, TemplatePortal } from './common';\n\n/**\n * Directive version of a `TemplatePortal`. Because the directive *is* a TemplatePortal,\n * the directive instance itself can be attached to a host, enabling declarative use of portals.\n */\n@Directive({\n selector: '[cdkPortal]',\n exportAs: 'cdkPortal',\n standalone: true,\n})\nexport class CdkPortal extends TemplatePortal {\n constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef) {\n super(templateRef, viewContainerRef);\n }\n}\n\n/**\n * Possible attached references to the CdkPortalOutlet.\n */\nexport type CdkPortalOutletAttachedRef = ComponentRef<any> | EmbeddedViewRef<any> | null;\n\n/**\n * Directive version of a PortalOutlet. Because the directive *is* a PortalOutlet, portals can be\n * directly attached to it, enabling declarative use.\n *\n * Usage:\n * `<ng-template [cdkPortalOutlet]=\"greeting\"></ng-template>`\n */\n@Directive({\n selector: '[cdkPortalOutlet]',\n exportAs: 'cdkPortalOutlet',\n standalone: true,\n // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property\n inputs: ['portal: cdkPortalOutlet'],\n})\nexport class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestroy {\n /** Whether the portal component is initialized. */\n private _isInitialized = false;\n\n /** Reference to the currently-attached component/view ref. */\n private _attachedRef: CdkPortalOutletAttachedRef;\n\n constructor(\n private _viewContainerRef: ViewContainerRef,\n private renderer: Renderer2,\n ) {\n super();\n }\n\n /** Portal associated with the Portal outlet. */\n get portal(): Portal<any> | null {\n return this._attachedPortal;\n }\n\n set portal(portal: Portal<any> | null) {\n // Ignore the cases where the `portal` is set to a falsy value before the lifecycle hooks have\n // run. This handles the cases where the user might do something like `<div cdkPortalOutlet>`\n // and attach a portal programmatically in the parent component. When Angular does the first CD\n // round, it will fire the setter with empty string, causing the user's content to be cleared.\n if (this.hasAttached() && !portal && !this._isInitialized) {\n return;\n }\n\n if (this.hasAttached()) {\n super.detach();\n }\n\n if (portal) {\n super.attach(portal);\n }\n\n this._attachedPortal = portal;\n }\n\n /** Emits when a portal is attached to the outlet. */\n @Output() attached: EventEmitter<CdkPortalOutletAttachedRef> = new EventEmitter<CdkPortalOutletAttachedRef>();\n\n /** Component or view reference that is attached to the portal. */\n get attachedRef(): CdkPortalOutletAttachedRef {\n return this._attachedRef;\n }\n\n ngOnInit() {\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n super.dispose();\n this._attachedPortal = null;\n this._attachedRef = null;\n }\n\n /**\n * Attach the given ComponentPortal to this PortalOutlet using the ComponentFactoryResolver.\n *\n * @param portal Portal to be attached to the portal outlet.\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n portal.setAttachedHost(this);\n\n // If the portal specifies an origin, use that as the logical location of the component\n // in the application tree. Otherwise use the location of this PortalOutlet.\n const viewContainerRef = portal.viewContainerRef != null ? portal.viewContainerRef : this._viewContainerRef;\n\n // const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n // const componentFactory = resolver.resolveComponentFactory<T>(portal.component);\n const ref = viewContainerRef.createComponent(portal.component);\n // const ref = viewContainerRef.createComponent<T>(portal.component, viewContainerRef.length, portal.injector || viewContainerRef.injector);\n\n // If we're using a view container that's different from the injected one (e.g. when the portal\n // specifies its own) we need to move the component into the outlet, otherwise it'll be rendered\n // inside of the alternate view container.\n if (viewContainerRef !== this._viewContainerRef) {\n this.renderer.appendChild(this._getRootNode(), (ref.hostView as EmbeddedViewRef<any>).rootNodes[0]);\n }\n\n super.setDisposeFn(() => ref.destroy());\n this._attachedPortal = portal;\n this._attachedRef = ref;\n this.attached.emit(ref);\n\n return ref;\n }\n\n /**\n * Attach the given TemplatePortal to this PortalHost as an embedded View.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n portal.setAttachedHost(this);\n const viewRef = this._viewContainerRef.createEmbeddedView(portal.templateRef, portal.context);\n super.setDisposeFn(() => this._viewContainerRef.clear());\n\n this._attachedPortal = portal;\n this._attachedRef = viewRef;\n this.attached.emit(viewRef);\n\n return viewRef;\n }\n\n /**\n * Attaches the given DomPortal to this PortalHost by moving all of the portal content into it.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n attachDomPortal = (portal: DomPortal) => {\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode: CommentNode = this.renderer.createComment('dom-portal');\n\n portal.setAttachedHost(this);\n this.renderer.insertBefore(element.parentNode, anchorNode, element);\n this.renderer.appendChild(this._getRootNode(), element);\n\n super.setDisposeFn(() => {\n if (anchorNode.parentNode) {\n this.renderer.insertBefore(anchorNode.parentNode, element, anchorNode);\n this.renderer.removeChild(anchorNode.parentNode, anchorNode);\n // anchorNode.parentNode!.replaceChild(element, anchorNode);\n }\n });\n };\n\n /** Gets the root node of the portal outlet. */\n private _getRootNode(): View {\n const nativeElement: View = this._viewContainerRef.element.nativeElement;\n\n // The directive could be set on a template which will result in a comment\n // node being the root. Use the comment's parent node if that is the case.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return (!(nativeElement instanceof CommentNode) ? nativeElement : nativeElement.parentNode!) as View;\n }\n\n // eslint-disable-next-line @typescript-eslint/member-ordering\n static ngAcceptInputType_portal: Portal<any> | null | undefined | '';\n}\n\n@NgModule({\n imports: [CdkPortal, CdkPortalOutlet],\n exports: [CdkPortal, CdkPortalOutlet],\n})\nexport class PortalModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, ApplicationRef, Injector, Renderer2, Optional } from '@angular/core';\nimport { View } from '@nativescript/core';\nimport { CommentNode } from '../../views/invisible-nodes';\nimport { ViewUtil } from '../../view-util';\nimport { BasePortalOutlet, ComponentPortal, TemplatePortal, DomPortal } from './common';\n\n/**\n * A PortalOutlet for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n */\nexport class NativeScriptDomPortalOutlet extends BasePortalOutlet {\n private _viewUtil: ViewUtil;\n constructor(\n /** Element into which the content is projected. */\n public outletElement: View,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _appRef: ApplicationRef,\n private _defaultInjector: Injector,\n @Optional() viewUtil?: ViewUtil,\n ) {\n super();\n this._viewUtil = viewUtil || this._defaultInjector.get(ViewUtil);\n }\n\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n * @returns Reference to the created component.\n */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n const resolver = portal.componentFactoryResolver || this._componentFactoryResolver;\n const componentFactory = resolver.resolveComponentFactory(portal.component);\n let componentRef: ComponentRef<T>;\n\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the view to the application.\n if (portal.viewContainerRef) {\n componentRef = portal.viewContainerRef.createComponent(componentFactory, portal.viewContainerRef.length, portal.injector || portal.viewContainerRef.injector);\n\n this.setDisposeFn(() => componentRef.destroy());\n } else {\n componentRef = componentFactory.create(portal.injector || this._defaultInjector);\n this._appRef.attachView(componentRef.hostView);\n this.setDisposeFn(() => {\n this._appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n }\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n const rootNode = this._getComponentRootNode(componentRef);\n if (rootNode.parent) {\n this._viewUtil.removeChild(rootNode.parent as View, rootNode);\n }\n this._viewUtil.appendChild(this.outletElement, this._getComponentRootNode(componentRef));\n\n return componentRef;\n }\n\n /**\n * Attaches a template portal to the DOM as an embedded view.\n * @param portal Portal to be attached.\n * @returns Reference to the created embedded view.\n */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n const viewContainer = portal.viewContainerRef;\n const viewRef = viewContainer.createEmbeddedView(portal.templateRef, portal.context);\n\n // The method `createEmbeddedView` will add the view as a child of the viewContainer.\n // But for the DomPortalOutlet the view can be added everywhere in the DOM\n // (e.g Overlay Container) To move the view to the specified host element. We just\n // re-append the existing root nodes.\n viewRef.rootNodes.forEach((rootNode) => {\n if (rootNode.parent) {\n this._viewUtil.removeChild(rootNode.parent as View, rootNode);\n }\n this._viewUtil.appendChild(this.outletElement, rootNode);\n });\n\n // Note that we want to detect changes after the nodes have been moved so that\n // any directives inside the portal that are looking at the DOM inside a lifecycle\n // hook won't be invoked too early.\n viewRef.detectChanges();\n\n this.setDisposeFn(() => {\n const index = viewContainer.indexOf(viewRef);\n if (index !== -1) {\n viewContainer.remove(index);\n }\n });\n\n // TODO(jelbourn): Return locals from view.\n return viewRef;\n }\n\n /**\n * Attaches a DOM portal by transferring its content into the outlet.\n * @param portal Portal to be attached.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n attachDomPortal = (portal: DomPortal) => {\n const element = portal.element;\n if (!element.parentNode && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('DOM portal content must be attached to a parent node.');\n }\n\n // Anchor used to save the element's previous position so\n // that we can restore it when the portal is detached.\n const anchorNode: CommentNode = this._viewUtil.createComment('dom-portal');\n\n this._viewUtil.insertBefore(element.parentNode as View, anchorNode, element);\n this._viewUtil.appendChild(this.outletElement, element);\n\n super.setDisposeFn(() => {\n // We can't use `replaceWith` here because IE doesn't support it.\n if (anchorNode.parentNode) {\n this._viewUtil.insertBefore(anchorNode.parentNode, element, anchorNode);\n this._viewUtil.removeChild(anchorNode.parentNode, anchorNode);\n //anchorNode.parentNode.replaceChild(element, anchorNode);\n }\n });\n };\n\n /**\n * Clears out a portal from the DOM.\n */\n dispose(): void {\n super.dispose();\n if (this.outletElement.parentNode != null) {\n this._viewUtil.removeChild(this.outletElement.parentNode as View, this.outletElement);\n }\n }\n\n /** Gets the root HTMLElement for an instantiated component. */\n private _getComponentRootNode(componentRef: ComponentRef<any>): View {\n return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as View;\n }\n}\n","import { ApplicationRef, ChangeDetectorRef, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, inject, Injector, NO_ERRORS_SCHEMA, OnDestroy, TemplateRef, Type, ViewChild, ViewContainerRef } from '@angular/core';\nimport { ProxyViewContainer, Trace } from '@nativescript/core';\nimport { registerElement } from '../element-registry';\nimport type { ComponentType } from '../utils/general';\nimport { ComponentPortal, TemplatePortal } from './portal';\n\nregisterElement('DetachedContainer', () => ProxyViewContainer, {\n skipAddToDom: true,\n});\n\n/**\n * Wrapper component used for loading components when navigating\n * It uses DetachedContainer as selector so that it is containerRef is not attached to\n * the visual tree.\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'DetachedContainer',\n template: `<Placeholder #loader></Placeholder>\n <ng-container #vc></ng-container>\n <ng-content></ng-content>`,\n standalone: true,\n schemas: [NO_ERRORS_SCHEMA],\n})\n// eslint-disable-next-line @angular-eslint/component-class-suffix\nexport class DetachedLoader implements OnDestroy {\n @ViewChild('vc', { read: ViewContainerRef, static: true }) vc: ViewContainerRef;\n private disposeFunctions: Array<() => void> = [];\n // tslint:disable-line:component-class-suffix\n resolver = inject(ComponentFactoryResolver);\n changeDetector = inject(ChangeDetectorRef);\n containerRef = inject(ViewContainerRef);\n appRef = inject(ApplicationRef);\n\n public createComponentPortal<T>(componentType: ComponentType<T>, customInjector?: Injector) {\n return new ComponentPortal(componentType, this.vc, customInjector || this.vc.injector);\n }\n\n public createTemplatePortal<T>(templateRef: TemplateRef<T>, context?: T) {\n return new TemplatePortal(templateRef, this.vc, context);\n }\n\n private loadInAppRef(componentType: Type<any>): ComponentRef<any> {\n const factory = this.resolver.resolveComponentFactory(componentType);\n const componentRef = factory.create(this.containerRef.injector);\n this.appRef.attachView(componentRef.hostView);\n\n this.disposeFunctions.push(() => {\n this.appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n\n // Component is created, built may not be checked if we are loading\n // inside component with OnPush CD strategy. Mark us for check to be sure CD will reach us.\n // We are inside a promise here so no need for setTimeout - CD should trigger\n // after the promise.\n Trace.write('DetachedLoader.loadInLocation component loaded -> markForCheck', 'detached-loader');\n\n return componentRef;\n }\n\n private loadInLocation(componentType: Type<any>): ComponentRef<any> {\n return this.vc.createComponent(componentType);\n }\n\n public ngOnDestroy() {\n this.disposeFunctions.forEach((fn) => fn());\n }\n\n public detectChanges() {\n this.changeDetector.markForCheck();\n }\n\n /**\n * @deprecated use Portals\n */\n public loadComponent(componentType: Type<any>): Promise<ComponentRef<any>> {\n Trace.write('DetachedLoader.loadComponent', 'detached-loader');\n return Promise.resolve(this.loadInAppRef(componentType));\n }\n\n /**\n * @deprecated use Portals\n */\n public loadComponentSync(componentType: Type<any>): ComponentRef<any> {\n Trace.write('DetachedLoader.loadComponentSync', 'detached-loader');\n return this.loadInAppRef(componentType);\n }\n\n /**\n * @deprecated use Portals\n */\n public loadComponentInLocation(componentType: Type<any>): ComponentRef<any> {\n Trace.write('DetachedLoader.loadComponentInLocation', 'detached-loader');\n return this.loadInLocation(componentType);\n }\n\n /**\n * @deprecated use Portals\n */\n public loadWithFactory<T>(factory: ComponentFactory<T>): ComponentRef<T> {\n const componentRef = factory.create(this.containerRef.injector);\n this.appRef.attachView(componentRef.hostView);\n\n this.disposeFunctions.push(() => {\n this.appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n return componentRef;\n }\n\n /**\n * @deprecated use Portals\n */\n public loadWithFactoryInLocation<T>(factory: ComponentFactory<T>): ComponentRef<T> {\n return this.vc.createComponent(factory);\n }\n}\n","import { ElementRef, Inject, Injectable, OnDestroy, Optional } from '@angular/core';\nimport { NavigatedData, Page, View, ViewBase } from '@nativescript/core';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\nimport { distinctUntilChanged } from 'rxjs/operators';\n\n@Injectable()\nexport class PageService implements OnDestroy {\n page: Page;\n private _inPage$: BehaviorSubject<boolean>;\n private _pageEvents$ = new Subject<NavigatedData>();\n\n get inPage(): boolean {\n return this._inPage$.value;\n }\n get inPage$(): Observable<boolean> {\n return this._inPage$.pipe(distinctUntilChanged());\n }\n get pageEvents$(): Observable<NavigatedData> {\n return this._pageEvents$.asObservable();\n }\n constructor(@Optional() page?: Page, @Optional() elRef?: ElementRef<ViewBase>, @Optional() view?: ViewBase) {\n if (page) {\n this.page = page;\n } else {\n view = view || elRef.nativeElement;\n while (view) {\n if (view instanceof Page) {\n this.page = view;\n break;\n }\n view = view.parent;\n }\n }\n this._inPage$ = new BehaviorSubject<boolean>(!!this.page?.isLoaded);\n if (this.page) {\n this.page.on('navigatedFrom', this.pageEvent, this);\n this.page.on('navigatedTo', this.pageEvent, this);\n this.page.on('navigatingFrom', this.pageEvent, this);\n this.page.on('navigatingTo', this.pageEvent, this);\n }\n }\n\n ngOnDestroy() {\n if (this.page) {\n this.page.off('navigatedFrom', this.pageEvent, this);\n this.page.off('navigatedTo', this.pageEvent, this);\n this.page.off('navigatingFrom', this.pageEvent, this);\n this.page.off('navigatingTo', this.pageEvent, this);\n }\n this._inPage$.complete();\n this._pageEvents$.complete();\n }\n\n private pageEvent(evt: NavigatedData) {\n this._pageEvents$.next(evt);\n switch (evt.eventName) {\n case 'navigatedTo':\n this._inPage$.next(true);\n break;\n case 'navigatedFrom':\n this._inPage$.next(false);\n break;\n default:\n }\n }\n}\n","import { AfterViewInit, Component, ElementRef, Input, OnChanges, Renderer2, SimpleChanges, ViewChild } from '@angular/core';\nimport { Frame, Page, View } from '@nativescript/core';\nimport { frameMeta, registerElement } from '../../element-registry';\nimport { PageService } from './page.service';\n\nexport function customFrameComponentFactory(v: FramePageComponent) {\n return v.element.nativeElement;\n}\n\nexport function customPageFactoryFromFrame(v: FramePageComponent) {\n return v.page;\n}\n\nregisterElement('FramePage', () => Frame, {\n insertChild: (parent: Frame, child: View) => {\n if (child instanceof Page) {\n frameMeta.insertChild(parent, child);\n return;\n }\n parent['__ng_page__'].content = child;\n },\n});\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'FramePage',\n template: `<ng-content></ng-content>`,\n standalone: true,\n providers: [\n {\n provide: Frame,\n useFactory: customFrameComponentFactory,\n deps: [FramePageComponent],\n },\n {\n provide: Page,\n useFactory: customPageFactoryFromFrame,\n deps: [FramePageComponent],\n },\n PageService,\n ],\n})\nexport class FramePageComponent implements AfterViewInit, OnChanges {\n page: Page;\n\n @Input() actionBarHidden = false;\n\n constructor(public element: ElementRef<Frame>, renderer: Renderer2) {\n this.page = renderer.createElement('Page') as Page;\n element.nativeElement['__ng_page__'] = this.page;\n renderer.appendChild(element.nativeElement, this.page);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.actionBarHidden && changes.actionBarHidden.previousValue !== changes.actionBarHidden.currentValue) {\n if (this.page) {\n this.page.actionBarHidden = !!this.actionBarHidden;\n }\n }\n }\n ngAfterViewInit(): void {\n if (this.page) {\n this.page.actionBarHidden = !!this.actionBarHidden;\n }\n }\n}\n","import { Directive, ElementRef } from '@angular/core';\nimport { Frame } from '@nativescript/core';\n\nexport function customFrameDirectiveFactory(v: FrameDirective) {\n return v.element.nativeElement;\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'Frame',\n standalone: true,\n providers: [\n {\n provide: Frame,\n useFactory: customFrameDirectiveFactory,\n deps: [FrameDirective],\n },\n ],\n})\nexport class FrameDirective {\n constructor(public element: ElementRef<Frame>) {}\n}\n","import { Directive, ElementRef } from '@angular/core';\nimport { Page } from '@nativescript/core';\nimport { PageService } from './page.service';\n\nexport function customPageFactory(v: PageDirective) {\n return v.element.nativeElement;\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'Page',\n standalone: true,\n providers: [\n {\n provide: Page,\n useFactory: customPageFactory,\n deps: [PageDirective],\n },\n PageService,\n ],\n})\nexport class PageDirective {\n constructor(public element: ElementRef<Page>) {}\n}\n","import { NgModule } from '@angular/core';\nimport { FramePageComponent } from './frame-page.component';\nimport { FrameDirective } from './frame.directive';\nimport { PageDirective } from './page.directive';\n\n@NgModule({\n imports: [FrameDirective, PageDirective, FramePageComponent],\n exports: [FrameDirective, PageDirective, FramePageComponent],\n})\nexport class FramePageModule {}\n","export function isPresent(obj: any): boolean {\n return obj !== undefined && obj !== null;\n}\n\nexport function isBlank(obj: any): boolean {\n return obj === undefined || obj === null;\n}\n","import { Directive, Component, ElementRef, OnDestroy, inject } from '@angular/core';\nimport { ActionBar, ActionItem, ActionItems, NavigationButton, Page } from '@nativescript/core';\n\nimport { isBlank } from '../../utils/lang-facade';\nimport { NgView, ViewClassMeta, ViewExtensions } from '../../views/view-types';\nimport { isInvisibleNode, isView } from '../../views/utils';\nimport { registerElement } from '../../element-registry';\n\nexport function isActionItem(view: any): view is ActionItem {\n return view instanceof ActionItem;\n}\n\nexport function isNavigationButton(view: any): view is NavigationButton {\n return view instanceof NavigationButton;\n}\n\ntype NgActionBar = ActionBar & ViewExtensions;\n\nexport const actionBarMeta: ViewClassMeta = {\n skipAddToDom: true,\n insertChild: (parent: NgActionBar, child: NgView, next: any) => {\n if (isInvisibleNode(child)) {\n return;\n } else if (isNavigationButton(child)) {\n parent.navigationButton = child;\n child.parentNode = parent;\n } else if (isActionItem(child)) {\n addActionItem(parent, child, next);\n child.parentNode = parent;\n } else if (isView(child)) {\n parent.titleView = child;\n }\n },\n removeChild: (parent: NgActionBar, child: NgView) => {\n if (isInvisibleNode(child)) {\n return;\n } else if (isNavigationButton(child)) {\n if (parent.navigationButton === child) {\n parent.navigationButton = null;\n }\n\n child.parentNode = null;\n } else if (isActionItem(child)) {\n parent.actionItems.removeItem(child);\n child.parentNode = null;\n } else if (isView(child) && parent.titleView && parent.titleView === child) {\n parent.titleView = null;\n }\n },\n};\n\nregisterElement('ActionBar', () => ActionBar, actionBarMeta);\nregisterElement('ActionItem', () => <any>ActionItem);\nregisterElement('NavigationButton', () => <any>NavigationButton);\n\nconst addActionItem = (bar: NgActionBar, item: ActionItem, next: ActionItem) => {\n if (next) {\n insertActionItemBefore(bar, item, next);\n } else {\n appendActionItem(bar, item);\n }\n};\n\nconst insertActionItemBefore = (bar: NgActionBar, item: ActionItem, next: ActionItem) => {\n const actionItems: ActionItems = bar.actionItems;\n const actionItemsCollection: ActionItem[] = actionItems.getItems();\n\n const indexToInsert = actionItemsCollection.indexOf(next);\n actionItemsCollection.splice(indexToInsert, 0, item);\n\n (<any>actionItems).setItems(actionItemsCollection);\n};\n\nconst appendActionItem = (bar: NgActionBar, item: ActionItem) => {\n bar.actionItems.addItem(item);\n};\n\n@Component({\n selector: 'ActionBar',\n template: '<ng-content></ng-content>',\n standalone: true,\n})\nexport class ActionBarComponent {\n element = inject(ElementRef);\n page = inject(Page, { optional: true });\n constructor() {\n if (!this.page) {\n throw new Error('No Page found in ActionBarComponent.\\n' + 'Only a Page can contain an ActionBar, so please ensure ActionBar is only used inside a Component that is routed via page-router-outlet or is contained in a Page.\\n' + 'Example for root action bars in AppComponent: <Frame><Page><ActionBar>....</ActionBar></Page></Frame>');\n }\n\n if (isBlank(this.page.actionBarHidden)) {\n this.page.actionBarHidden = false;\n }\n this.page.actionBar = this.element.nativeElement;\n this.page.actionBar.update();\n }\n}\n\n@Component({\n selector: 'ActionBarExtension',\n template: '',\n standalone: true,\n})\nexport class ActionBarScope {\n page = inject(Page, { optional: true });\n constructor() {\n if (!this.page) {\n throw new Error('Inside ActionBarExtension but no ActionBar found to extend.');\n }\n }\n\n public onNavButtonInit(navBtn: NavigationButtonDirective) {\n this.page.actionBar.navigationButton = navBtn.element.nativeElement;\n }\n\n public onNavButtonDestroy(navBtn: NavigationButtonDirective) {\n const nav = <NavigationButton>navBtn.element.nativeElement;\n if (nav && this.page.actionBar.navigationButton === nav) {\n this.page.actionBar.navigationButton = null;\n }\n }\n\n public onActionInit(item: ActionItemDirective) {\n this.page.actionBar.actionItems.addItem(item.element.nativeElement);\n }\n\n public onActionDestroy(item: ActionItemDirective) {\n if (item.element.nativeElement.actionBar) {\n this.page.actionBar.actionItems.removeItem(item.element.nativeElement);\n }\n }\n}\n\n@Directive({\n selector: 'ActionItem',\n standalone: true,\n})\nexport class ActionItemDirective implements OnDestroy {\n element = inject(ElementRef);\n ownerScope = inject(ActionBarScope, { optional: true });\n constructor() {\n if (this.ownerScope) {\n this.ownerScope.onActionInit(this);\n }\n }\n\n ngOnDestroy() {\n if (this.ownerScope) {\n this.ownerScope.onActionDestroy(this);\n }\n }\n}\n\n@Directive({\n selector: 'NavigationButton',\n standalone: true,\n})\nexport class NavigationButtonDirective implements OnDestroy {\n element = inject(ElementRef);\n ownerScope = inject(ActionBarScope, { optional: true });\n constructor() {\n if (this.ownerScope) {\n this.ownerScope.onNavButtonInit(this);\n }\n }\n\n ngOnDestroy() {\n if (this.ownerScope) {\n this.ownerScope.onNavButtonDestroy(this);\n }\n }\n}\n","/**\n * Utility method to ensure a NgModule is only imported once in a codebase, otherwise will throw to help prevent accidental double importing\n * @param parentModule Parent module name\n * @param moduleName The module name\n */\nexport function throwIfAlreadyLoaded(parentModule: any, moduleName: string) {\n if (parentModule) {\n throw new Error(`${moduleName} has already been loaded. Import ${moduleName} in the AppModule only.`);\n }\n}\n\n/**\n * Utility method which will only fire the callback once ever\n * @param fn callback to call only once\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nexport function once(fn: Function) {\n let wasCalled = false;\n\n return function wrapper() {\n if (wasCalled) {\n return;\n }\n\n wasCalled = true;\n // eslint-disable-next-line prefer-spread, prefer-rest-params\n fn.apply(null, arguments);\n };\n}\n\n/** Interface that can be used to generically type a class. */\nexport interface ComponentType<T> {\n new (...args: any[]): T;\n}\n\nexport function isListLikeIterable(obj: any): boolean {\n if (!isJsObject(obj)) return false;\n return (\n Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n Symbol.iterator in obj)\n ); // JS Iterable have a Symbol.iterator prop\n}\n\nexport function isJsObject(o: any): boolean {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n Directive,\n DoCheck,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n forwardRef,\n Host,\n HostListener,\n inject,\n Inject,\n InjectionToken,\n Input,\n IterableDiffer,\n IterableDiffers,\n NgZone,\n OnDestroy,\n Output,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n CoreTypes,\n ItemEventData,\n KeyedTemplate,\n LayoutBase,\n ListView,\n ObservableArray,\n profile,\n SearchEventData,\n View,\n} from '@nativescript/core';\nimport type { Template as NsTemplate } from '@nativescript/core';\n\nimport { extractSingleViewRecursive } from '../../element-registry/registry';\nimport { NativeScriptDebug } from '../../trace';\nimport { isListLikeIterable } from '../../utils/general';\nimport { NgViewTemplate } from '../../view-refs';\nimport { DetachedLoader } from '../detached-loader';\n\nconst NG_VIEW = '_ngViewRef';\n\nexport interface TemplatedItemsHost<T = any> {\n registerTemplate(key: string, template: TemplateRef<T>);\n}\n\nexport const TEMPLATED_ITEMS_COMPONENT = new InjectionToken<TemplatedItemsHost>('TemplatedItemsComponent');\n\nexport class ItemContext<T> {\n constructor(\n public $implicit?: T,\n public item?: T,\n public index?: number,\n public even?: boolean,\n public odd?: boolean,\n ) {}\n}\n\nexport class NsTemplatedItem<T> implements NgViewTemplate<{ index: number; data: T }> {\n constructor(\n private template: TemplateRef<ItemContext<T>>,\n public location: ViewContainerRef,\n private onCreate?: (view: View) => void,\n ) {}\n create(context?: { index: number; data: T }): View {\n const viewRef = this.location.createEmbeddedView(\n this.template,\n context ? this.setupItemContext(context) : new ItemContext(),\n );\n viewRef.detach(); // create detached, just beware this doesn't always work and the view might run the first CD anyway.\n const resultView = getItemViewRoot(viewRef);\n resultView[NG_VIEW] = viewRef;\n if (this.onCreate) {\n this.onCreate(resultView);\n }\n return resultView;\n }\n update(view: View, context?: { index: number; data: T }): void {\n const viewRef = this.getEmbeddedViewRef(view);\n this.setupItemContext(context, viewRef);\n viewRef?.detectChanges();\n }\n attach(view: View): void {\n const viewRef = this.getEmbeddedViewRef(view);\n viewRef?.reattach();\n viewRef?.detectChanges();\n }\n detach(view: View): void {\n const viewRef = this.getEmbeddedViewRef(view);\n viewRef?.detach();\n }\n dispose(view: View): void {\n const viewRef = this.getEmbeddedViewRef(view);\n viewRef?.destroy();\n }\n\n getEmbeddedViewRef(view: View): EmbeddedViewRef<ItemContext<T>> | undefined {\n let viewRef = view[NG_VIEW];\n\n // Getting angular view from original element (in cases when ProxyViewContainer\n // is used NativeScript internally wraps it in a StackLayout)\n if (!viewRef && view instanceof LayoutBase && view.getChildrenCount() > 0) {\n viewRef = view.getChildAt(0)[NG_VIEW];\n }\n return viewRef;\n }\n\n isValid(view: View) {\n return !!this.getEmbeddedViewRef(view);\n }\n\n private setupItemContext(\n { index, data }: { index: number; data: T },\n oldView?: EmbeddedViewRef<ItemContext<T>>,\n ): ItemContext<T> {\n const context: ItemContext<T> = oldView ? oldView.context : new ItemContext<T>();\n context.$implicit = data;\n context.item = data;\n context.index = index;\n context.even = index % 2 === 0;\n context.odd = !context.even;\n return context;\n }\n}\n\nexport interface SetupItemViewArgs<T> {\n view: EmbeddedViewRef<ItemContext<T>>;\n nativeElement: View;\n data: T;\n index: number;\n context: ItemContext<T>;\n}\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ListView',\n template: `<DetachedContainer>\n <ng-container #loader></ng-container>\n </DetachedContainer>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [DetachedLoader],\n providers: [{ provide: TEMPLATED_ITEMS_COMPONENT, useExisting: forwardRef(() => ListViewComponent) }],\n})\nexport class ListViewComponent<T = any> implements DoCheck, OnDestroy, AfterContentInit, TemplatedItemsHost {\n public get nativeElement(): ListView {\n return this.templatedItemsView;\n }\n\n private readonly _iterableDiffers: IterableDiffers = inject(IterableDiffers);\n private readonly _changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n private readonly _elementRef: ElementRef = inject(ElementRef);\n\n // I believe this only exists so this can be inherited and people can override it.\n protected templatedItemsView: ListView = this._elementRef.nativeElement;\n protected _items: T[] | ObservableArray<T>;\n protected _differ: IterableDiffer<T>;\n protected _templateMap: Map<string, NsTemplatedItem<T>>;\n protected _viewToTemplate: WeakMap<View, string> = new WeakMap<View, string>();\n\n @ViewChild('loader', { read: ViewContainerRef, static: true }) loader: ViewContainerRef;\n\n @Output() public setupItemView = new EventEmitter<SetupItemViewArgs<T>>();\n\n @ContentChild(TemplateRef, { read: TemplateRef, static: false }) itemTemplateQuery: TemplateRef<ItemContext<T>>;\n\n // Sticky header template driven by Angular. Users can provide either:\n // 1) A string/Template bound to the ListView `[stickyHeaderTemplate]` input\n // (mirrors the XML attribute usage), or\n // 2) An Angular `<ng-template #nsStickyHeaderTemplate>` whose root becomes\n // the header view when using the external renderer.\n @ContentChild('nsStickyHeaderTemplate', { read: TemplateRef, static: false })\n stickyHeaderTemplateRef: TemplateRef<ItemContext<any>>;\n\n fallbackItemTemplate: TemplateRef<ItemContext<T>>;\n\n /**\n * Sticky header template as supported by core ListView (string or NsTemplate).\n * This allows direct string templates just like XML usage:\n * `<ListView stickyHeaderTemplate=\"<GridLayout>...</GridLayout>\">`.\n */\n @Input()\n get stickyHeaderTemplate(): string | NsTemplate {\n return this.templatedItemsView?.stickyHeaderTemplate as any;\n }\n set stickyHeaderTemplate(value: string | NsTemplate) {\n if (this.templatedItemsView) {\n // If Angular template reference is also provided, that takes precedence\n // and will be wired in ngAfterContentInit via stickyHeaderTemplateRef.\n this.templatedItemsView.stickyHeaderTemplate = value as any;\n }\n }\n\n @Input()\n get stickyHeader(): boolean {\n return this.templatedItemsView?.stickyHeader;\n }\n set stickyHeader(value: boolean) {\n if (this.templatedItemsView) {\n this.templatedItemsView.stickyHeader = value;\n }\n }\n\n @Input()\n get stickyHeaderHeight(): CoreTypes.LengthType {\n return this.templatedItemsView?.stickyHeaderHeight;\n }\n set stickyHeaderHeight(value: number) {\n if (this.templatedItemsView) {\n this.templatedItemsView.stickyHeaderHeight = value;\n }\n }\n\n @Input()\n get stickyHeaderTopPadding(): any {\n return this.templatedItemsView?.stickyHeaderTopPadding as any;\n }\n set stickyHeaderTopPadding(value: any) {\n if (this.templatedItemsView) {\n this.templatedItemsView.stickyHeaderTopPadding = value;\n }\n }\n\n @Input()\n get sectioned(): boolean {\n return this.templatedItemsView?.sectioned;\n }\n set sectioned(value: boolean) {\n if (this.templatedItemsView) {\n this.templatedItemsView.sectioned = value;\n }\n }\n\n @Input()\n get showSearch(): boolean {\n return this.templatedItemsView?.showSearch;\n }\n set showSearch(value: boolean) {\n if (this.templatedItemsView) {\n this.templatedItemsView.showSearch = value;\n }\n }\n\n @Input()\n get searchAutoHide(): boolean {\n return this.templatedItemsView?.searchAutoHide;\n }\n set searchAutoHide(value: boolean) {\n if (this.templatedItemsView) {\n this.templatedItemsView.searchAutoHide = value;\n }\n }\n\n @Input()\n get items() {\n return this._items;\n }\n\n set items(value: T[] | ObservableArray<T>) {\n this._items = value;\n let needDiffer = true;\n if (value instanceof ObservableArray) {\n needDiffer = false;\n }\n if (needDiffer && !this._differ && isListLikeIterable(value)) {\n this._differ = this._iterableDiffers.find(this._items).create((_index, item) => {\n return item;\n });\n }\n\n this.templatedItemsView.items = this._items;\n }\n\n /**\n * @deprecated\n */\n constructor(_elementRef: ElementRef);\n /**\n * @deprecated\n */\n constructor(_elementRef: ElementRef, _iterableDiffers: IterableDiffers, _changeDetectorRef: ChangeDetectorRef);\n /**\n * @deprecated\n */\n constructor(_elementRef: ElementRef, _iterableDiffers: IterableDiffers, _ngZone: NgZone);\n constructor();\n // this elementRef is only here for backwards compatibility reasons\n constructor(_elementRef?: ElementRef) {\n if (_elementRef) {\n this.templatedItemsView = _elementRef.nativeElement;\n }\n }\n\n ngAfterContentInit() {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewLog('TemplatedItemsView.ngAfterContentInit()');\n }\n\n this.setItemTemplates();\n\n // If an Angular sticky header template is provided, convert it into a\n // core `Template` function. Core will call this to create header views\n // and then assign bindingContext for each section.\n if (this.stickyHeaderTemplateRef && this.templatedItemsView) {\n const angularHeaderTemplate: NsTemplate = () => {\n const viewRef = this.loader.createEmbeddedView(this.stickyHeaderTemplateRef as TemplateRef<ItemContext<any>>);\n const root = getItemViewRoot(viewRef as EmbeddedViewRef<unknown>);\n (root as any)[NG_VIEW] = viewRef;\n return root;\n };\n\n this.templatedItemsView.stickyHeaderTemplate = angularHeaderTemplate;\n }\n }\n\n ngOnDestroy() {\n this.templatedItemsView = null;\n\n if (this._templateMap) {\n this._templateMap.clear();\n }\n }\n\n private setItemTemplates() {\n // The itemTemplateQuery may be changed after list items are added that contain <template> inside,\n // so cache and use only the original template to avoid errors.\n this.fallbackItemTemplate = this.itemTemplateQuery;\n if (this.fallbackItemTemplate && !this._templateMap?.has('default')) {\n // apparently you can create a Core ListView without a template...\n // we also add a fallback default for when the user sets multiple templates but no templateSelector\n this.registerTemplate('default', this.fallbackItemTemplate);\n }\n\n if (this._templateMap) {\n // sometimes templates are registered before loader is ready, so we update here\n this._templateMap.forEach((t) => (t.location = this.loader));\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewLog('Setting templates');\n }\n\n const templates: KeyedTemplate[] = [];\n this._templateMap.forEach((value, key) => {\n templates.push({\n createView: () => null, // we'll handle creation later, otherwise core will create an invalid template\n key,\n });\n });\n this.templatedItemsView.itemTemplates = templates;\n }\n }\n\n public registerTemplate(key: string, template: TemplateRef<ItemContext<T>>) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewLog(`registerTemplate for key: ${key}, ${this.loader}`);\n }\n\n if (!this._templateMap) {\n this._templateMap = new Map<string, NsTemplatedItem<T>>();\n }\n\n this._templateMap.set(key, new NsTemplatedItem<T>(template, this.loader, (v) => this._viewToTemplate.set(v, key)));\n }\n\n @HostListener('itemLoading', ['$event'])\n @profile\n public onItemLoading(args: ItemEventData) {\n if (!this._templateMap) {\n return;\n }\n const index = args.index;\n const lview: ListView = args.object as ListView;\n const items = lview.items as any;\n\n const isSectioned = lview.sectioned;\n let currentItem: any;\n let absoluteIndex = index;\n\n if (isSectioned) {\n const sectionIndex = this.resolveSectionIndex(args, args.view as View);\n const rowIndex = this.resolveRowIndex(args, args.view as View);\n\n if (sectionIndex === undefined || rowIndex === undefined) {\n return;\n }\n\n currentItem = this.getSectionItem(lview, sectionIndex, rowIndex);\n if (currentItem === undefined || currentItem === null) {\n return;\n }\n\n absoluteIndex = this.computeAbsoluteIndex(lview, sectionIndex, rowIndex);\n } else {\n currentItem = this.getFlatItem(items, index);\n if (currentItem === undefined || currentItem === null) {\n return;\n }\n }\n\n let template: NsTemplatedItem<T>;\n\n if (args.view) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewLog(`onItemLoading: ${index} - Reusing existing view`);\n }\n\n let templateKey = this._viewToTemplate.get(args.view as View);\n if (!templateKey && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {\n templateKey = this._viewToTemplate.get(args.view.getChildAt(0));\n }\n if (!templateKey) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewError(`ViewReference not found for item ${index}. View recycling is not working`);\n }\n return;\n }\n template = this._templateMap.get(templateKey);\n template.update(args.view as View, { index: absoluteIndex, data: currentItem });\n } else {\n const templateKey =\n typeof lview.itemTemplateSelector === 'function'\n ? (lview.itemTemplateSelector as any)(currentItem, absoluteIndex, items)\n : 'default';\n template = this._templateMap.get(templateKey);\n if (!template) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewError(`Template for key '${templateKey}' not found.`);\n }\n return;\n }\n args.view = template.create({ index: absoluteIndex, data: currentItem });\n }\n\n const viewRef = template.getEmbeddedViewRef(args.view as View);\n if (viewRef) {\n this.setupViewRef(viewRef, currentItem, absoluteIndex, args.view as View);\n template.attach(args.view as View);\n }\n\n this._changeDetectorRef.detectChanges();\n }\n\n private resolveSectionIndex(args: ItemEventData, nativeView?: View): number | undefined {\n const eventSection = Number.isInteger((args as any).section) ? (args as any).section : undefined;\n if (eventSection !== undefined) {\n return eventSection;\n }\n const viewSection =\n nativeView && Number.isInteger((nativeView as any)._listViewSectionIndex)\n ? (nativeView as any)._listViewSectionIndex\n : undefined;\n if (viewSection !== undefined) {\n return viewSection;\n }\n return undefined;\n }\n\n private resolveRowIndex(args: ItemEventData, nativeView?: View): number | undefined {\n if (Number.isInteger(args.index)) {\n return args.index;\n }\n const viewRow =\n nativeView && Number.isInteger((nativeView as any)._listViewItemIndex)\n ? (nativeView as any)._listViewItemIndex\n : undefined;\n return viewRow;\n }\n\n private getSectionItem(listView: ListView, sectionIndex: number, rowIndex: number): any {\n if (sectionIndex < 0 || rowIndex < 0) {\n return undefined;\n }\n const sectionItems = (listView as any)._getItemsInSection?.(sectionIndex);\n if (!sectionItems) {\n return undefined;\n }\n if (typeof sectionItems.getItem === 'function') {\n return sectionItems.getItem(rowIndex);\n }\n return sectionItems[rowIndex];\n }\n\n private computeAbsoluteIndex(listView: ListView, sectionIndex: number, rowIndex: number): number {\n let absoluteIndex = rowIndex;\n for (let i = 0; i < sectionIndex; i++) {\n const sectionItems = (listView as any)._getItemsInSection?.(i);\n absoluteIndex += this.getCollectionLength(sectionItems);\n }\n return absoluteIndex;\n }\n\n private getCollectionLength(collection: any): number {\n if (!collection) {\n return 0;\n }\n if (typeof collection.length === 'number') {\n return collection.length;\n }\n if (typeof collection.getCount === 'function') {\n return collection.getCount();\n }\n return 0;\n }\n\n private getFlatItem(items: any, index: number): any {\n if (!items) {\n return undefined;\n }\n if (typeof items.getItem === 'function') {\n return items.getItem(index);\n }\n return Array.isArray(items) ? items[index] : undefined;\n }\n\n public setupViewRef(viewRef: EmbeddedViewRef<ItemContext<T>>, data: T, index: number, nativeElement: View): void {\n const context = viewRef.context;\n this.setupItemView.next({ view: viewRef, nativeElement, data: data, index: index, context: context });\n }\n\n ngDoCheck() {\n if (this._differ) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewLog('ngDoCheck() - execute differ');\n }\n\n const changes = this._differ.diff(this._items as T[]);\n if (changes) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.listViewLog('ngDoCheck() - refresh');\n }\n\n this.templatedItemsView.refresh();\n }\n }\n }\n}\n\nexport type RootLocator = (nodes: Array<unknown>, nestLevel: number) => View;\n\nexport function getItemViewRoot(\n viewRef: EmbeddedViewRef<unknown>,\n rootLocator: RootLocator = extractSingleViewRecursive,\n): View {\n const rootView = rootLocator(viewRef.rootNodes, 0);\n return rootView;\n}\n\n// eslint-disable-next-line @angular-eslint/directive-selector\n@Directive({\n selector: '[nsTemplateKey],[nsTemplateKeys]',\n standalone: true,\n})\nexport class TemplateKeyDirective<T> {\n constructor(\n private templateRef: TemplateRef<T>,\n @Host() @Inject(TEMPLATED_ITEMS_COMPONENT) private comp: TemplatedItemsHost<T>,\n ) {}\n\n @Input()\n set nsTemplateKey(value: string) {\n if (this.comp && this.templateRef) {\n this.comp.registerTemplate(value, this.templateRef);\n }\n }\n @Input()\n set nsTemplateKeys(values: string[]) {\n // single template with multiple keys\n if (this.comp && this.templateRef && values) {\n values.forEach((value) => this.comp.registerTemplate(value, this.templateRef));\n }\n }\n}\n","import { ApplicationRef, ComponentFactoryResolver, ComponentRef, Injectable, Injector, NgModuleRef, NgZone, Type, ViewContainerRef } from '@angular/core';\nimport { Application, ContentView, Frame, ShowModalOptions, View, ViewBase } from '@nativescript/core';\nimport { Subject } from 'rxjs';\nimport { AppHostAsyncView, AppHostView } from '../../app-host-view';\nimport { DetachedLoader } from '../../cdk/detached-loader';\nimport { ComponentPortal } from '../../cdk/portal/common';\nimport { NativeScriptDomPortalOutlet } from '../../cdk/portal/nsdom-portal-outlet';\nimport { once } from '../../utils/general';\nimport { NgViewRef } from '../../view-refs';\nimport { NSLocationStrategy } from '../router/ns-location-strategy';\n\nexport type BaseShowModalOptions = Pick<ShowModalOptions, Exclude<keyof ShowModalOptions, 'closeCallback' | 'context'>>;\n\nexport interface ModalDialogOptions extends BaseShowModalOptions {\n context?: any;\n viewContainerRef?: ViewContainerRef;\n moduleRef?: NgModuleRef<any>;\n target?: View;\n /**\n * Use context data as component instance properties\n */\n useContextAsComponentProps?: boolean;\n}\n\nexport interface ShowDialogOptions extends ModalDialogOptions {\n containerRef?: ViewContainerRef;\n /**\n * which container to attach the change detection\n * if not specified, attaches to the ApplicationRef (recommended)\n */\n attachToContainerRef?: ViewContainerRef;\n injector: Injector;\n context: any;\n doneCallback;\n pageFactory?: any;\n parentView: ViewBase;\n resolver: ComponentFactoryResolver;\n type: Type<any>;\n}\n\nexport class ModalDialogParams {\n constructor(public context: any = {}, public closeCallback: (...args) => any) {}\n}\n\n@Injectable()\nexport class ModalDialogService {\n /**\n * Any opened ModalDialogParams in order of when they were opened (Most recent on top).\n * This can be used when you need access to ModalDialogParams outside of the component which had them injected.\n * Each is popped off as modals are closed.\n */\n openedModalParams: Array<ModalDialogParams>;\n _closed$: Subject<ModalDialogParams>;\n\n constructor(private location: NSLocationStrategy, private zone: NgZone, private appRef: ApplicationRef, private defaultInjector: Injector) {}\n\n /**\n * Emits anytime a modal is closed with the ModalDialogParams which were injected into the component which is now closing.\n * For example, can be used to wire up Rx flows outside the scope of just the component being handled.\n */\n get closed$() {\n if (!this._closed$) {\n this._closed$ = new Subject();\n }\n return this._closed$;\n }\n\n public showModal(type: Type<any>, options: ModalDialogOptions = {}): Promise<any> {\n // if (!options.viewContainerRef) {\n // throw new Error('No viewContainerRef: ' + 'Make sure you pass viewContainerRef in ModalDialogOptions.');\n // }\n\n let parentView = options.viewContainerRef?.element.nativeElement || Application.getRootView();\n if (options.target) {\n parentView = options.target;\n }\n\n if ((parentView instanceof AppHostView || parentView instanceof AppHostAsyncView) && parentView.ngAppRoot) {\n parentView = parentView.ngAppRoot;\n }\n\n // _ngDialogRoot is the first child of the previously detached proxy.\n // It should have 'viewController' (iOS) or '_dialogFragment' (Android) available for\n // presenting future modal views.\n if (parentView._ngDialogRoot) {\n parentView = parentView._ngDialogRoot;\n }\n\n // resolve from particular module (moduleRef)\n // or from same module as parentView (viewContainerRef)\n const componentInjector = options.moduleRef?.injector || options.viewContainerRef?.injector || this.defaultInjector;\n const resolver = componentInjector.get(ComponentFactoryResolver);\n\n let frame = parentView;\n if (!(parentView instanceof Frame)) {\n frame = (parentView.page && parentView.page.frame) || Frame.topmost();\n }\n\n this.location?._beginModalNavigation(frame);\n\n return new Promise((resolve, reject) => {\n setTimeout(() => {\n try {\n this._showDialog({\n ...options,\n containerRef: options.viewContainerRef,\n injector: componentInjector,\n context: options.context,\n doneCallback: resolve,\n parentView,\n resolver,\n type,\n });\n } catch (err) {\n reject(err);\n }\n }, 10);\n });\n }\n\n private _showDialog(options: ShowDialogOptions): void {\n let componentViewRef: NgViewRef<unknown>;\n let detachedLoaderRef: ComponentRef<DetachedLoader>;\n let portalOutlet: NativeScriptDomPortalOutlet;\n\n const closeCallback = once(async (...args) => {\n options.doneCallback.apply(undefined, args);\n if (componentViewRef) {\n componentViewRef.firstNativeLikeView.closeModal();\n const params = this.openedModalParams.pop();\n if (this._closed$) {\n this._closed$.next(params);\n }\n await this.location._closeModalNavigation();\n if (detachedLoaderRef || portalOutlet) {\n this.zone.run(() => {\n portalOutlet?.dispose();\n detachedLoaderRef?.instance.detectChanges();\n detachedLoaderRef?.destroy();\n });\n }\n }\n });\n\n const modalParams = new ModalDialogParams(options.context, closeCallback);\n if (!this.openedModalParams) {\n this.openedModalParams = [];\n }\n this.openedModalParams.push(modalParams);\n\n const childInjector = Injector.create({\n providers: [{ provide: ModalDialogParams, useValue: modalParams }],\n parent: options.injector,\n });\n this.zone.run(() => {\n // if we ever support templates in the old API\n // if(options.templateRef) {\n // const detachedFactory = options.resolver.resolveComponentFactory(DetachedLoader);\n // if(options.attachToContainerRef) {\n // detachedLoaderRef = options.attachToContainerRef.createComponent(detachedFactory, 0, childInjector, null);\n // } else {\n // detachedLoaderRef = detachedFactory.create(childInjector); // this DetachedLoader is **completely** detached\n // this.appRef.attachView(detachedLoaderRef.hostView); // we attach it to the applicationRef, so it becomes a \"root\" view in angular's hierarchy\n // }\n // detachedLoaderRef.changeDetectorRef.detectChanges(); // force a change detection\n // detachedLoaderRef.instance.createTemplatePortal(options.templateRef);\n // }\n const targetView = new ContentView();\n const portal = new ComponentPortal(options.type);\n portalOutlet = new NativeScriptDomPortalOutlet(targetView, options.resolver, this.appRef, childInjector);\n const componentRef = portalOutlet.attach(portal);\n componentRef.changeDetectorRef.detectChanges();\n componentViewRef = new NgViewRef(componentRef);\n if (options.useContextAsComponentProps && options.context) {\n for (const key in options.context) {\n (<ComponentRef<any>>componentViewRef.ref).instance[key] = options.context[key];\n }\n }\n if (componentViewRef !== componentRef.location.nativeElement) {\n componentRef.location.nativeElement._ngDialogRoot = componentViewRef.firstNativeLikeView;\n }\n // if we don't detach the view from its parent, ios gets mad\n componentViewRef.detachNativeLikeView();\n options.parentView.showModal(componentViewRef.firstNativeLikeView, { ...options, closeCallback });\n });\n }\n}\n","/**\n * This decorator delays a potentially unsafe event (like loaded/unloaded that will sometimes be called before ngOnInit) to be handled safely by ensuring it's called after a lifecycle hook.\n * @param runAfterEvent event/function call to wait until the event can be fired ('ngOnInit', 'ngAfterViewInit', ...)\n * @param options Optional event handling params\n * @returns decorator\n */\nexport function NativeScriptNgSafeEvent(\n runAfterEvent: string,\n options: {\n onlyLast?: boolean;\n onlyFirst?: boolean;\n alwaysRunBefore?: string;\n } = {},\n) {\n const event = runAfterEvent;\n return function (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) {\n type NgSafeType = {\n events: {\n [key: string]: {\n done: boolean;\n originalDelegate: (...args: unknown[]) => unknown;\n buffer: Array<{\n key: string;\n fn: (...args: unknown[]) => unknown;\n }>;\n };\n };\n runBefore: {\n [propertyKey: string]: (...args: unknown[]) => unknown;\n };\n };\n function getNgSafe(): NgSafeType {\n return target['__ng_safe__'];\n }\n if (!target['__ng_safe__']) {\n const defaultNgSafe: NgSafeType = {\n events: {},\n runBefore: {},\n };\n target['__ng_safe__'] = defaultNgSafe;\n }\n if (!getNgSafe().events[event]) {\n getNgSafe().events[event] = {\n done: false,\n buffer: [],\n originalDelegate: target[event],\n };\n target[event] = function (...args) {\n try {\n if (getNgSafe().events[event].originalDelegate) {\n return getNgSafe().events[event].originalDelegate.apply(this, args);\n }\n } finally {\n getNgSafe().events[event].done = true;\n getNgSafe().events[event].buffer.forEach((fn) => fn.fn());\n getNgSafe().events[event].buffer = [];\n }\n };\n }\n\n if (options.alwaysRunBefore) {\n getNgSafe().runBefore[propertyKey] = target[options.alwaysRunBefore];\n\n target[`${options.alwaysRunBefore}`] = function (...args) {\n getNgSafe()\n .events[event].buffer.filter((v) => v.key === propertyKey)\n .forEach((fn) => fn.fn());\n getNgSafe().events[event].buffer = getNgSafe().events[event].buffer.filter((v) => v.key !== propertyKey);\n if (getNgSafe().runBefore[propertyKey]) {\n return getNgSafe().runBefore[propertyKey].apply(this, args);\n }\n };\n }\n\n const oldFn = descriptor.value;\n descriptor.value = function (...args) {\n if (getNgSafe().events[event].done) {\n return oldFn.apply(this, args);\n }\n let shouldPush = true;\n if (options.onlyFirst || options.onlyLast) {\n for (let i = 0; i < getNgSafe().events[event].buffer.length; i++) {\n if (getNgSafe().events[event].buffer[i].key === propertyKey) {\n if (options.onlyFirst) {\n shouldPush = false;\n break;\n }\n if (options.onlyLast) {\n getNgSafe().events[event].buffer.splice(i, 1);\n break;\n }\n }\n }\n }\n if (shouldPush) {\n getNgSafe().events[event].buffer.push({\n key: propertyKey,\n fn: oldFn.bind(this, args),\n });\n }\n };\n };\n}\n","import { AfterViewInit, Directive, ElementRef, Input, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { TabView, TabViewItem } from '@nativescript/core';\n\nimport { InvisibleNode } from '../../views';\nimport { NativeScriptDebug } from '../../trace';\nimport { isBlank } from '../../utils';\n\ntype TextTransform = 'initial' | 'none' | 'capitalize' | 'uppercase' | 'lowercase';\nexport interface TabViewItemDef {\n title?: string;\n iconSource?: string;\n textTransform?: TextTransform;\n role?: string;\n}\n\n@Directive({\n selector: 'TabView', // eslint-disable-line @angular-eslint/directive-selector\n standalone: true,\n})\nexport class TabViewDirective implements AfterViewInit {\n public tabView: TabView;\n private _selectedIndex: number;\n private viewInitialized: boolean;\n\n @Input()\n get selectedIndex(): number {\n return this._selectedIndex;\n }\n\n set selectedIndex(value) {\n this._selectedIndex = value;\n if (this.viewInitialized) {\n this.tabView.selectedIndex = this._selectedIndex;\n }\n }\n\n constructor(element: ElementRef) {\n this.tabView = element.nativeElement;\n }\n\n ngAfterViewInit() {\n this.viewInitialized = true;\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.rendererLog('this._selectedIndex: ' + this._selectedIndex);\n }\n if (!isBlank(this._selectedIndex)) {\n this.tabView.selectedIndex = this._selectedIndex;\n }\n }\n}\n\n@Directive({\n selector: '[tabItem]', // eslint-disable-line @angular-eslint/directive-selector\n standalone: true,\n})\nexport class TabViewItemDirective implements OnInit {\n private item: TabViewItem;\n private _config: TabViewItemDef;\n\n constructor(private owner: TabViewDirective, private templateRef: TemplateRef<any>, private viewContainer: ViewContainerRef) {}\n\n @Input('tabItem')\n set config(config: TabViewItemDef) {\n if (!this._config || this._config.iconSource !== config.iconSource || this._config.title !== config.title || this._config.textTransform !== config.textTransform || this._config.role !== config.role) {\n this._config = config;\n this.applyConfig();\n }\n }\n\n get config(): TabViewItemDef {\n // tslint:disable-line:no-input-rename\n return this._config || {};\n }\n\n @Input()\n set title(title: string) {\n this.config = Object.assign(this.config, { title });\n }\n\n get title() {\n return this.config.title;\n }\n\n @Input()\n set iconSource(iconSource: string) {\n this.config = Object.assign(this.config, { iconSource });\n }\n\n get iconSource() {\n return this.config.iconSource;\n }\n\n @Input()\n set textTransform(textTransform: TextTransform) {\n this.config = Object.assign(this.config, { textTransform });\n }\n\n get textTransform() {\n return this.config.textTransform;\n }\n\n private ensureItem() {\n if (!this.item) {\n this.item = new TabViewItem();\n }\n }\n\n private applyConfig() {\n this.ensureItem();\n\n if (this.config.title) {\n this.item.title = this.config.title;\n }\n\n if (this.config.iconSource) {\n this.item.iconSource = this.config.iconSource;\n }\n\n // TabViewItem textTransform has a default value for Android that kick in\n // only if no value (even a null value) is set.\n if (this.config.textTransform) {\n this.item.textTransform = this.config.textTransform;\n }\n\n if (this.config.role) {\n this.item.role = this.config.role;\n }\n }\n\n ngOnInit() {\n this.applyConfig();\n\n const viewRef = this.viewContainer.createEmbeddedView(this.templateRef);\n // Filter out text nodes and comments\n const realViews = viewRef.rootNodes.filter((node) => !(node instanceof InvisibleNode));\n\n if (realViews.length > 0) {\n this.item.view = realViews[0];\n\n const newItems = (this.owner.tabView.items || []).concat([this.item]);\n this.owner.tabView.items = newItems;\n }\n }\n}\n","/* eslint-disable @angular-eslint/component-selector */\nimport { Component, Inject } from '@angular/core';\nimport { IDevice, platformNames } from '@nativescript/core';\nimport { DEVICE } from '../../tokens';\n\n@Component({\n selector: 'android',\n template: `@if (show) { \n <ng-content></ng-content>\n }`,\n standalone: true,\n})\nexport class AndroidFilterComponent {\n public show: boolean;\n\n constructor(@Inject(DEVICE) device: IDevice) {\n this.show = device.os === platformNames.android;\n }\n}\n","/* eslint-disable @angular-eslint/component-selector */\nimport { Component, Inject } from '@angular/core';\nimport { IDevice, platformNames } from '@nativescript/core';\nimport { DEVICE } from '../../tokens';\n\n@Component({\n selector: 'ios',\n template: `@if (show) { \n <ng-content></ng-content>\n }`,\n standalone: true,\n})\nexport class IOSFilterComponent {\n public show: boolean;\n constructor(@Inject(DEVICE) device: IDevice) {\n this.show = device.os === platformNames.ios;\n }\n}\n","/* eslint-disable @angular-eslint/component-selector */\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'apple',\n template: `@if (show) { \n <ng-content></ng-content>\n }`,\n standalone: true,\n})\nexport class AppleFilterComponent {\n public show = __APPLE__;\n}\n","/* eslint-disable @angular-eslint/component-selector */\nimport { Component, Inject } from '@angular/core';\nimport { platformNames, IDevice } from '@nativescript/core';\nimport { DEVICE } from '../../tokens';\n\n@Component({\n selector: 'visionos',\n template: `@if (show) { \n <ng-content></ng-content>\n }`,\n standalone: true,\n})\nexport class VisionOSFilterComponent {\n public show: boolean;\n\n constructor(@Inject(DEVICE) device: IDevice) {\n // Note: casting any to be backwards compatible\n // Available in 8.6+ only\n this.show = device.os === (platformNames as any).visionos;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NO_ERRORS_SCHEMA, NgModule } from '@angular/core';\nimport { FramePageModule } from './cdk/frame-page/frame-page.module';\nimport { ActionBarComponent, ActionBarScope, ActionItemDirective, NavigationButtonDirective } from './cdk/action-bar';\nimport { ListViewComponent, TemplateKeyDirective } from './cdk/list-view/list-view.component';\nimport { registerNativeScriptViewComponents } from './element-registry';\nimport { ModalDialogService } from './legacy/directives/dialogs';\nimport { TabViewDirective, TabViewItemDirective } from './cdk/tab-view';\nimport { AndroidFilterComponent } from './cdk/platform-filters/android-filter.component';\nimport { IOSFilterComponent } from './cdk/platform-filters/ios-filter.component';\nimport { AppleFilterComponent } from './cdk/platform-filters/apple-filter.component';\nimport { VisionOSFilterComponent } from './cdk/platform-filters/vision-filter.component';\n\nconst CDK_COMPONENTS = [ActionBarComponent, ActionBarScope, ActionItemDirective, NavigationButtonDirective, ListViewComponent, TemplateKeyDirective, TabViewDirective, TabViewItemDirective, AndroidFilterComponent, IOSFilterComponent, AppleFilterComponent, VisionOSFilterComponent];\n\nregisterNativeScriptViewComponents();\n\n@NgModule({\n imports: [CommonModule, FramePageModule, ...CDK_COMPONENTS],\n exports: [CommonModule, FramePageModule, ...CDK_COMPONENTS],\n providers: [ModalDialogService],\n schemas: [NO_ERRORS_SCHEMA],\n})\nexport class NativeScriptCommonModule {}\n","import { ViewportScroller, XhrFactory, ɵNullViewportScroller as NullViewportScroller } from '@angular/common';\nimport { ApplicationModule, ErrorHandler, Inject, NgModule, NO_ERRORS_SCHEMA, Optional, Provider, RendererFactory2, SkipSelf, StaticProvider, ɵINJECTOR_SCOPE as INJECTOR_SCOPE } from '@angular/core';\nimport { Color, Device, View } from '@nativescript/core';\nimport { AppHostView } from './app-host-view';\nimport { NativescriptXhrFactory } from './nativescript-xhr-factory';\nimport { NativeScriptRendererFactory } from './nativescript-renderer';\nimport { PlatformNamespaceFilter, NAMESPACE_FILTERS } from './property-filter';\nimport { APP_ROOT_VIEW, DEVICE, ENABLE_REUSABE_VIEWS, NATIVESCRIPT_ROOT_MODULE_ID } from './tokens';\nimport { ViewUtil } from './view-util';\nimport { DetachedLoader } from './cdk/detached-loader';\nimport { NativeScriptCommonModule } from './nativescript-common.module';\n\nexport function generateFallbackRootView(parentRootView?: View) {\n if (parentRootView) {\n return parentRootView;\n }\n return new AppHostView(new Color('white'));\n}\n\nexport function errorHandler() {\n return new ErrorHandler();\n}\nexport function generateRandomId() {\n return `${Date.now()}` + '_' + Math.random().toString(36).substr(2, 9);\n}\n\nexport const NATIVESCRIPT_MODULE_STATIC_PROVIDERS: StaticProvider[] = [\n { provide: APP_ROOT_VIEW, useFactory: generateFallbackRootView, deps: [[new Optional(), new SkipSelf(), APP_ROOT_VIEW]] },\n { provide: INJECTOR_SCOPE, useValue: 'root' },\n { provide: ErrorHandler, useFactory: errorHandler, deps: [] },\n { provide: ViewUtil, useClass: ViewUtil, deps: [NAMESPACE_FILTERS, [new Optional(), ENABLE_REUSABE_VIEWS]] },\n {\n provide: NativeScriptRendererFactory,\n useClass: NativeScriptRendererFactory,\n deps: [APP_ROOT_VIEW, NAMESPACE_FILTERS, NATIVESCRIPT_ROOT_MODULE_ID, [new Optional(), ENABLE_REUSABE_VIEWS]],\n },\n { provide: NATIVESCRIPT_ROOT_MODULE_ID, useFactory: generateRandomId },\n { provide: RendererFactory2, useExisting: NativeScriptRendererFactory },\n { provide: NAMESPACE_FILTERS, useClass: PlatformNamespaceFilter, deps: [DEVICE], multi: true },\n { provide: DEVICE, useValue: Device },\n { provide: XhrFactory, useClass: NativescriptXhrFactory, deps: [] },\n];\nexport const NATIVESCRIPT_MODULE_PROVIDERS: Provider[] = [{ provide: ViewportScroller, useClass: NullViewportScroller }];\n\n@NgModule({\n imports: [ApplicationModule, DetachedLoader, NativeScriptCommonModule],\n providers: [...NATIVESCRIPT_MODULE_STATIC_PROVIDERS, ...NATIVESCRIPT_MODULE_PROVIDERS],\n exports: [ApplicationModule, DetachedLoader, NativeScriptCommonModule],\n schemas: [NO_ERRORS_SCHEMA],\n})\nexport class NativeScriptModule {\n constructor(@Optional() @SkipSelf() @Inject(NativeScriptModule) parentModule: NativeScriptModule | null) {\n if (parentModule) {\n throw new Error(`NativeScriptModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.`);\n }\n }\n}\n","import {\n Type,\n Injector,\n CompilerOptions,\n PlatformRef,\n NgModuleFactory,\n NgModuleRef,\n EventEmitter,\n Sanitizer,\n InjectionToken,\n StaticProvider,\n createPlatformFactory,\n platformCore,\n PLATFORM_ID,\n ɵinternalCreateApplication,\n ApplicationConfig,\n} from '@angular/core';\nimport { DOCUMENT, LocationChangeListener, LocationStrategy, PlatformLocation } from '@angular/common';\nimport { NativeScriptPlatformRefProxy } from './platform-ref';\nimport { AppHostView } from './app-host-view';\nimport { Color, GridLayout } from '@nativescript/core';\nimport { defaultPageFactory, PAGE_FACTORY } from './tokens';\nimport { AppLaunchView } from './application';\nimport { NATIVESCRIPT_MODULE_PROVIDERS, NATIVESCRIPT_MODULE_STATIC_PROVIDERS } from './nativescript';\nimport { registerNativeScriptViewComponents } from './element-registry';\n\nexport const defaultPageFactoryProvider = { provide: PAGE_FACTORY, useValue: defaultPageFactory };\nexport class NativeScriptSanitizer extends Sanitizer {\n sanitize(_context: any, value: string): string {\n return value;\n }\n}\n// TODO: when angular finally exports their scheduler token for ivy CD, provide our own with queueMacroTask\n// export function schedulerFactory() {\n// return (fn: any) => {\n// console.log('SCHEDULER');\n// setTimeout(fn, 0);\n// };\n// }\n\nexport class NativeScriptDocument {\n // Required by the AnimationDriver\n public body: any = {\n isOverride: true,\n };\n\n createElement(tag: string) {\n throw new Error('NativeScriptDocument is not DOM Document. There is no createElement() method.');\n }\n}\n\nexport class DummyLocationStrategy extends LocationStrategy {\n path(includeHash?: boolean): string {\n throw new Error('Method not implemented.');\n }\n prepareExternalUrl(internal: string): string {\n throw new Error('Method not implemented.');\n }\n getState(): unknown {\n throw new Error('Method not implemented.');\n }\n pushState(state: any, title: string, url: string, queryParams: string): void {\n throw new Error('Method not implemented.');\n }\n replaceState(state: any, title: string, url: string, queryParams: string): void {\n throw new Error('Method not implemented.');\n }\n forward(): void {\n throw new Error('Method not implemented.');\n }\n back(): void {\n throw new Error('Method not implemented.');\n }\n onPopState(fn: LocationChangeListener): void {\n throw new Error('Method not implemented.');\n }\n getBaseHref(): string {\n throw new Error('Method not implemented.');\n }\n}\nexport class DummyPlatformLocation extends PlatformLocation {\n getBaseHrefFromDOM(): string {\n throw new Error('Method not implemented.');\n }\n getState(): unknown {\n throw new Error('Method not implemented.');\n }\n onPopState(fn: LocationChangeListener): VoidFunction {\n throw new Error('Method not implemented.');\n }\n onHashChange(fn: LocationChangeListener): VoidFunction {\n throw new Error('Method not implemented.');\n }\n get href(): string {\n throw new Error('Method not implemented.');\n }\n get protocol(): string {\n throw new Error('Method not implemented.');\n }\n get hostname(): string {\n throw new Error('Method not implemented.');\n }\n get port(): string {\n throw new Error('Method not implemented.');\n }\n get pathname(): string {\n throw new Error('Method not implemented.');\n }\n get search(): string {\n throw new Error('Method not implemented.');\n }\n get hash(): string {\n throw new Error('Method not implemented.');\n }\n replaceState(state: any, title: string, url: string): void {\n throw new Error('Method not implemented.');\n }\n pushState(state: any, title: string, url: string): void {\n throw new Error('Method not implemented.');\n }\n forward(): void {\n throw new Error('Method not implemented.');\n }\n back(): void {\n throw new Error('Method not implemented.');\n }\n}\n\nexport const COMMON_PROVIDERS: StaticProvider[] = [\n defaultPageFactoryProvider,\n { provide: Sanitizer, useClass: NativeScriptSanitizer, deps: [] },\n { provide: DOCUMENT, useClass: NativeScriptDocument, deps: [] },\n { provide: PLATFORM_ID, useValue: 'browser' },\n {\n provide: LocationStrategy,\n useClass: DummyLocationStrategy,\n deps: [],\n },\n { provide: PlatformLocation, useClass: DummyPlatformLocation, deps: [] },\n];\n\nexport const platformNativeScript = createPlatformFactory(platformCore, 'nativescriptDynamic', COMMON_PROVIDERS);\nfunction createProvidersConfig(options?: ApplicationConfig) {\n return {\n appProviders: [\n ...NATIVESCRIPT_MODULE_STATIC_PROVIDERS,\n ...NATIVESCRIPT_MODULE_PROVIDERS,\n ...(options?.providers ?? []),\n ],\n platformProviders: COMMON_PROVIDERS,\n };\n}\n\nexport function bootstrapApplication(rootComponent: Type<any>, options?: ApplicationConfig) {\n // Ensure NativeScript view components are registered in this module instance's\n // element registry. During Vite HMR, the vendor bundle and HTTP-loaded modules\n // may have separate module instances of @nativescript/angular, each with their\n // own elementMap. Without this call, the HTTP instance's elementMap would be\n // empty and the renderer would throw \"No known component for element ...\".\n registerNativeScriptViewComponents();\n return ɵinternalCreateApplication({\n rootComponent: rootComponent,\n ...createProvidersConfig(options),\n });\n}\n\nexport function createApplication(options?: ApplicationConfig) {\n registerNativeScriptViewComponents();\n return ɵinternalCreateApplication(createProvidersConfig(options));\n}\n\nexport interface HmrOptions {\n /**\n * A factory function that returns either Module type or NgModuleFactory type.\n * This needs to be a factory function as the types will change when modules are replaced.\n */\n moduleTypeFactory?: () => Type<any> | NgModuleFactory<any>;\n\n /**\n * A livesync callback that will be called instead of the original livesync.\n * It gives the HMR a hook to apply the module replacement.\n * @param bootstrapPlatform - A bootstrap callback to be called after HMR is done. It will bootstrap a new angular app within the exisiting platform, using the moduleTypeFactory to get the Module or NgModuleFactory to be used.\n */\n livesyncCallback: (bootstrapPlatform: () => void) => void;\n}\n\nexport interface AppOptions {\n cssFile?: string;\n startPageActionBarHidden?: boolean;\n hmrOptions?: HmrOptions;\n /**\n * Background color of the root view\n */\n backgroundColor?: string;\n /**\n * Use animated launch view (async by default)\n */\n launchView?: AppLaunchView;\n /**\n * When using Async APP_INITIALIZER, set this to `true`.\n * (Not needed when using launchView)\n */\n async?: boolean;\n}\n\n/**\n * @deprecated use runNativeScriptAngularApp instead\n */\nexport const platformNativeScriptDynamic = function (options?: AppOptions, extraProviders?: StaticProvider[]) {\n console.warn('platformNativeScriptDynamic is deprecated, use runNativeScriptAngularApp instead');\n options = options || {};\n extraProviders = extraProviders || [];\n\n const ngRootView = new AppHostView(new Color(options.backgroundColor || 'white'));\n let launchView = options.launchView;\n if (!launchView && options.async) {\n launchView = new GridLayout();\n launchView.backgroundColor = options.backgroundColor || 'white';\n }\n return new NativeScriptPlatformRefProxy(platformNativeScript([...extraProviders]), launchView);\n};\n","import { NgModule } from '@angular/core';\nimport { Application, ContentView, RootLayout, View } from '@nativescript/core';\nimport { APP_ROOT_VIEW, DISABLE_ROOT_VIEW_HANDLING } from './tokens';\n\nexport class RootViewProxy extends ContentView {\n constructor(private parentRootLayout: RootLayout) {\n super();\n }\n\n _addView(view: View, atIndex?: number) {\n super._addView(view, atIndex);\n if (this.parentRootLayout.getChildIndex(this) < 0) {\n this.parentRootLayout.insertChild(this, 0);\n }\n }\n\n _removeView(view: View) {\n super._removeView(view);\n this.parentRootLayout.removeChild(this);\n }\n}\n\n/**\n * This generates a RootLayout and returns a RootViewProxy.\n * Setting RootViewProxy.content will add the view to the bottom of the RootLayout\n * Setting RootViewProxy.content = null will remove the view from the RootLayout\n * @returns RootViewProxy that will insert content into the start of the RootLayout\n */\nexport function generateRootLayoutAndProxy() {\n let rootView = Application.getRootView();\n if (!rootView || !(rootView instanceof RootLayout)) {\n rootView = new RootLayout();\n Application.resetRootView({ create: () => rootView });\n }\n const viewProxy = new RootViewProxy(rootView as RootLayout);\n // (rootView as RootLayout).insertChild(viewProxy, 0);\n return viewProxy;\n}\n\n@NgModule({\n providers: [\n { provide: DISABLE_ROOT_VIEW_HANDLING, useValue: true },\n { provide: APP_ROOT_VIEW, useFactory: generateRootLayoutAndProxy },\n ],\n})\nexport class RootCompositeModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { ViewContainerRef, ComponentFactoryResolver } from '@angular/core';\nimport { ShowModalOptions, View } from '@nativescript/core';\n\nexport type NativeShowModalOptions = Partial<Omit<ShowModalOptions, 'cancelable' | 'closeCallback'>>;\n/**\n * Configuration for opening a modal dialog with the MatDialog service.\n */\nexport class NativeDialogConfig<D = any> {\n /**\n * Where the attached component should live in Angular's *logical* component tree.\n * This affects what is available for injection and the change detection order for the\n * component instantiated inside of the dialog. This does not affect where the dialog\n * content will be rendered.\n */\n viewContainerRef?: ViewContainerRef;\n\n /** Where to render the actual dialog in. By default it renders using the native view of the ViewContainerRef */\n renderIn?: 'root' | 'viewContainerRef' | View = 'viewContainerRef';\n\n /** ID for the dialog. If omitted, a unique one will be generated. */\n id?: string;\n\n /** Whether the dialog has a backdrop. */\n hasBackdrop?: boolean = true;\n\n /** Whether the user can use escape or clicking on the backdrop to close the modal. */\n disableClose?: boolean = false;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /**\n * Whether the dialog should close when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n closeOnNavigation?: boolean = true;\n\n /** Alternate `ComponentFactoryResolver` to use when resolving the associated component. */\n componentFactoryResolver?: ComponentFactoryResolver;\n\n nativeOptions?: NativeShowModalOptions = {};\n\n /**\n * When true, this dialog will be re-opened automatically on Angular HMR\n * reboots so the user does not lose context every time a related file\n * changes. The new dialog reuses the same component class and `data` payload\n * (provided via `data`); other config such as `nativeOptions` is preserved\n * verbatim.\n *\n * The original `dialogRef.afterClosed()` subject is wired to the restored\n * dialog so consumers `await openModal(...)` resolve normally when the user\n * eventually closes the restored modal.\n *\n * Only opens via component class are restorable — `TemplateRef` openings\n * carry references that don't survive an HMR reboot and are silently\n * skipped. Has no effect outside of HMR.\n */\n preserveOnHmr?: boolean = false;\n\n // TODO(jelbourn): add configuration for lifecycle hooks, ARIA labelling.\n}\n","import { Observable, Subject } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\nimport { NativeModalRef } from './native-modal-ref';\n\n// Counter for unique dialog ids.\nlet uniqueId = 0;\n\n/** Possible states of the lifecycle of a dialog. */\nexport const enum NativeDialogState {\n OPEN,\n CLOSING,\n CLOSED,\n}\n\nexport class NativeDialogRef<T, R = any> {\n /** The instance of component opened into the dialog. */\n componentInstance: T;\n\n /** Whether the user is allowed to close the dialog. */\n disableClose: boolean | undefined; //= this._containerInstance._config.disableClose;\n\n /** Subject for notifying the user that the dialog has finished opening. */\n private readonly _afterOpened = new Subject<void>();\n\n /** Subject for notifying the user that the dialog has finished closing. */\n private readonly _afterClosed = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the dialog has started closing. */\n private readonly _beforeClosed = new Subject<R | undefined>();\n\n /** Result to be passed to afterClosed. */\n private _result: R | undefined;\n\n /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */\n private _closeFallbackTimeout: any;\n\n /** Current state of the dialog. */\n private _state = NativeDialogState.OPEN;\n\n constructor(private _nativeModalRef: NativeModalRef, readonly id: string = `native-dialog-${uniqueId++}`) {\n // Pass the id along to the container.\n _nativeModalRef._id = id;\n\n // Emit when opening animation completes\n _nativeModalRef.stateChanged\n .pipe(\n filter((event) => event.state === 'opened'),\n take(1)\n )\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n\n // Dispose overlay when closing animation is complete\n _nativeModalRef.stateChanged\n .pipe(\n filter((event) => event.state === 'closed'),\n take(1)\n )\n .subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n this._finishDialogClose();\n this._afterClosed.next(this._result);\n this._afterClosed.complete();\n });\n\n _nativeModalRef.onDismiss.subscribe(() => {\n this._beforeClosed.next(this._result);\n this._beforeClosed.complete();\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.componentInstance = null!;\n _nativeModalRef.dispose();\n });\n }\n\n /**\n * Close the dialog.\n * @param dialogResult Optional result to return to the dialog opener.\n */\n close(dialogResult?: R): void {\n this._result = dialogResult;\n\n // Transition the backdrop in parallel to the dialog.\n this._nativeModalRef.stateChanged\n .pipe(\n filter((event) => event.state === 'closing'),\n take(1)\n )\n .subscribe(() => {\n this._beforeClosed.next(dialogResult);\n this._beforeClosed.complete();\n this._nativeModalRef.dispose();\n // this._overlayRef.detachBackdrop();\n\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has the chance to fire.\n this._closeFallbackTimeout = setTimeout(\n () => {\n this._finishDialogClose();\n this._afterClosed.next(this._result);\n this._afterClosed.complete();\n },\n //event.totalTime + 100);\n 100\n );\n });\n\n this._state = NativeDialogState.CLOSING;\n this._nativeModalRef._startExitAnimation();\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished opening.\n */\n afterOpened(): Observable<void> {\n return this._afterOpened;\n }\n\n /**\n * Gets an observable that is notified when the dialog is finished closing.\n */\n afterClosed(): Observable<R | undefined> {\n return this._afterClosed;\n }\n\n /**\n * Gets an observable that is notified when the dialog has started closing.\n */\n beforeClosed(): Observable<R | undefined> {\n return this._beforeClosed;\n }\n\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick(): Observable<MouseEvent> {\n throw new Error('Method not implemented');\n }\n\n /** Add a CSS class or an array of classes to the overlay pane. */\n addPanelClass(classes: string | string[]): this {\n // this._overlayRef.addPanelClass(classes);\n return this;\n }\n\n /** Remove a CSS class or an array of classes from the overlay pane. */\n removePanelClass(classes: string | string[]): this {\n // this._overlayRef.removePanelClass(classes);\n return this;\n }\n\n /** Gets the current state of the dialog's lifecycle. */\n getState(): NativeDialogState {\n return this._state;\n }\n\n /**\n * Finishes the dialog close by updating the state of the dialog\n * and disposing the overlay.\n */\n private _finishDialogClose() {\n this._state = NativeDialogState.CLOSED;\n this._nativeModalRef.dispose();\n }\n}\n","import { Subject } from 'rxjs';\nimport { ComponentType } from '../../utils/general';\nimport { NativeDialogConfig } from './dialog-config';\nimport { NativeDialogRef } from './dialog-ref';\n\n/**\n * One captured dialog opening, kept around long enough to re-open with the\n * fresh component class after Angular reboots. We deliberately keep this as\n * `unknown`-shaped data (no rxjs `Subject` typing on the public stash) so the\n * boundary between old and new module realms stays narrow.\n */\nexport interface CapturedHmrDialog {\n /**\n * The component class as it was at capture time. After an HMR reboot\n * this reference is **stale** — the new module realm will export a\n * different class object even though the source class definition is\n * identical. We retain it as a fallback for production-like builds\n * (where no class registry is installed) and for the rare case where\n * a captured component was not loaded through the patched\n * `ɵɵdefineComponent` path.\n */\n componentClass: ComponentType<unknown>;\n /**\n * The captured class's source name (e.g. `ResourceModalComponent`).\n * The dialog restore step uses this name to look up the live class\n * from `hmr-class-registry`, falling back to `componentClass` if the\n * registry has no match.\n */\n componentName: string;\n config: NativeDialogConfig;\n /**\n * The original `_afterClosed` subject from the captured dialog ref. We pipe\n * the restored dialog's `afterClosed()` into this subject so consumers that\n * are awaiting the original `dialogRef.afterClosed()` resolve naturally.\n *\n * Stored as `unknown` because the rxjs class identity may be different\n * between captured-vs-restored realms; the dialog-services consumer\n * narrows it as needed.\n */\n graftAfterClosed: (value: unknown) => void;\n}\n\nconst STASH_KEY = '__NS_ANGULAR_HMR_PENDING_MODALS__';\n\nfunction getStashSlot(): { value: CapturedHmrDialog[] | undefined } {\n return globalThis as unknown as { value: CapturedHmrDialog[] | undefined };\n}\n\n/**\n * Pure helper: filter the open dialog list down to entries that opted in via\n * `preserveOnHmr` and that we actually know how to restore (component-class\n * openings, not template openings).\n */\nexport function selectPreservableDialogs(\n openDialogs: ReadonlyArray<HmrCandidateDialog>,\n): HmrCandidateDialog[] {\n return openDialogs.filter((dialog) => isPreservable(dialog));\n}\n\nexport interface HmrCandidateDialog {\n /** The dialog ref we'd graft `afterClosed` onto. */\n ref: NativeDialogRef<unknown>;\n /**\n * The component class used when the dialog was opened. May be `undefined`\n * for `TemplateRef`-based openings — such dialogs are not preservable.\n */\n componentClass?: ComponentType<unknown>;\n /** The original config so we can re-open with identical options. */\n config: NativeDialogConfig;\n}\n\nfunction isPreservable(dialog: HmrCandidateDialog): boolean {\n if (!dialog.config?.preserveOnHmr) {\n return false;\n }\n return typeof dialog.componentClass === 'function';\n}\n\n/**\n * Capture the open dialogs that opted into HMR preservation. Returns the\n * captured entries so callers can correlate counts in their logs.\n */\nexport function captureDialogsForHmr(openDialogs: ReadonlyArray<HmrCandidateDialog>): CapturedHmrDialog[] {\n const preservable = selectPreservableDialogs(openDialogs);\n if (preservable.length === 0) {\n clearPendingHmrDialogs();\n return [];\n }\n\n const captures: CapturedHmrDialog[] = preservable.map(({ ref, componentClass, config }) => {\n const subject = readAfterClosedSubject(ref);\n // Capture the source name now — the class reference itself becomes\n // stale after the reboot, but the name is stable across realms and\n // is what the post-reboot registry is keyed on.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const componentName = (componentClass! as unknown as { name?: string })?.name ?? '';\n return {\n // Asserted non-null in `isPreservable`.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n componentClass: componentClass!,\n componentName,\n config,\n graftAfterClosed: (value) => {\n if (!subject) {\n return;\n }\n try {\n if (!subject.closed) {\n subject.next(value as never);\n subject.complete();\n }\n } catch {\n // Swallow: the subject may have completed during dispose; nothing for us to do.\n }\n },\n };\n });\n\n (globalThis as unknown as Record<string, unknown>)[STASH_KEY] = captures;\n return captures;\n}\n\n/**\n * Drain the pending captures. The caller (the new `NativeDialog`) is expected\n * to re-open each entry and graft `afterClosed` back into the original\n * subject.\n */\nexport function consumePendingHmrDialogs(): CapturedHmrDialog[] {\n const slot = (globalThis as unknown as Record<string, unknown>)[STASH_KEY];\n if (!Array.isArray(slot)) {\n return [];\n }\n delete (globalThis as unknown as Record<string, unknown>)[STASH_KEY];\n return slot.filter((entry): entry is CapturedHmrDialog => !!entry && typeof (entry as CapturedHmrDialog).componentClass === 'function');\n}\n\n/**\n * Remove the pending captures without restoring. Useful when a reboot happens\n * for reasons other than module replacement (e.g. platform dispose) and we\n * don't want stale modal state to leak into the next bootstrap.\n */\nexport function clearPendingHmrDialogs(): void {\n delete (globalThis as unknown as Record<string, unknown>)[STASH_KEY];\n}\n\n/**\n * Test/debug helper: read the current stash without consuming it.\n */\nexport function peekPendingHmrDialogs(): CapturedHmrDialog[] {\n const slot = (globalThis as unknown as Record<string, unknown>)[STASH_KEY];\n return Array.isArray(slot) ? (slot as CapturedHmrDialog[]).slice() : [];\n}\n\n/**\n * Reach into the dialog ref's private `_afterClosed` subject. We touch the\n * private field intentionally — the ref class lives inside this package and\n * we want HMR restore to be a feature of the dialog system rather than a\n * reason to widen its public surface for everyone.\n */\nfunction readAfterClosedSubject(ref: NativeDialogRef<unknown>): Subject<unknown> | undefined {\n const candidate = (ref as unknown as { _afterClosed?: unknown })._afterClosed;\n if (!candidate || typeof candidate !== 'object') {\n return undefined;\n }\n if (typeof (candidate as Subject<unknown>).next !== 'function') {\n return undefined;\n }\n return candidate as Subject<unknown>;\n}\n\n/**\n * Used by the resume-side: if the stash references something that can no\n * longer be opened (e.g. the component class is dead post-reload), we still\n * need to release its consumers so awaited promises don't dangle forever.\n */\nexport function abortCapturedDialog(captured: CapturedHmrDialog): void {\n try {\n captured.graftAfterClosed(undefined);\n } catch {\n // Best-effort.\n }\n}\n","import { NativeDialogConfig } from './dialog-config';\nimport { HmrCandidateDialog } from './dialog-hmr';\n\n/**\n * Best-effort animation helpers used by the dialog HMR layer to make\n * the close + reopen round-trip feel like an in-place content refresh.\n *\n * They live in a tiny standalone module on purpose:\n *\n * - `dialog-services.ts` pulls in `@angular/core`, which Jest cannot\n * load in our spec runner without an extra ESM transform. By\n * keeping these helpers free of `@angular/core` we can unit-test\n * them in isolation (`dialog-hmr-animation.spec.ts`) while\n * `dialog-services.ts` re-exports them at the public API layer.\n * - The helpers are inherently best-effort: a missing\n * `_nativeModalRef`, a frozen `_modalAnimatedOptions` stack, or a\n * future `NativeDialogConfig` shape change must never break HMR\n * restore — we just fall back to the original animated behavior.\n */\n\n/**\n * Mutate the top of `parentView._modalAnimatedOptions` to `false` for\n * the given candidate so the imminent native close runs un-animated.\n *\n * iOS reads `_modalAnimatedOptions.slice(-1)[0]` when dismissing a\n * modal (see core `view-common.ts` / `view/index.ios.ts`). The\n * Angular dialog service only pushes one entry per open call, so the\n * top entry is the exact flag that controls the dismiss we're about\n * to trigger as part of the HMR root-view replacement.\n */\nexport function suppressNativeCloseAnimation(candidate: HmrCandidateDialog): void {\n if (!candidate.config?.preserveOnHmr) {\n return;\n }\n try {\n const modalRef = (candidate.ref as unknown as { _nativeModalRef?: { parentView?: unknown } })?._nativeModalRef;\n const parentView = modalRef?.parentView as { _modalAnimatedOptions?: boolean[] } | undefined;\n const stack = parentView?._modalAnimatedOptions;\n if (Array.isArray(stack) && stack.length > 0) {\n stack[stack.length - 1] = false;\n }\n } catch {\n // Swallow: a missing `_nativeModalRef` / `_modalAnimatedOptions`\n // is acceptable — we just lose the no-animation optimisation.\n }\n}\n\n/**\n * Build a `NativeDialogConfig` clone of `original` whose\n * `nativeOptions.animated` is forced to `false`. Used when re-opening\n * a captured modal so the open animation matches the suppressed\n * close — together they make the HMR round-trip feel like a content\n * refresh instead of a close/reopen.\n */\nexport function buildNonAnimatedRestoreConfig(original: NativeDialogConfig): NativeDialogConfig {\n // Clone via `Object.assign` so consumers holding the original\n // config (e.g. caching it for re-open) don't see mutations from\n // the HMR pathway.\n const cloned = Object.assign(new NativeDialogConfig(), original) as NativeDialogConfig;\n cloned.nativeOptions = { ...(original?.nativeOptions || {}), animated: false };\n return cloned;\n}\n","/**\n * Pure helpers that mirror NativeScript's modal-host properties\n * (`_dialogFragment` on Android, `viewController` on iOS) from the\n * ContentView wrapper that `attachComponentPortal` presents as the\n * modal down onto every native-like descendant.\n *\n * Why? `parentView.showModal(targetView, ...)` stamps those props on\n * `targetView` itself — but user template code reads them off the\n * rendered template root that lives *inside* the wrapper (e.g.\n * `onLoaded($event)` → `args.object._dialogFragment.getDialog()`).\n * Without mirroring, every fresh modal open + every HMR\n * `ɵɵreplaceMetadata` re-render hands the user `undefined`, which is\n * how we hit:\n *\n * Cannot read properties of undefined (reading 'getDialog')\n * at CheckinComponent.onLoaded\n *\n * The helpers live in a standalone module on purpose, mirroring\n * `dialog-hmr-animation.ts`: they don't pull `@angular/core` or\n * `@nativescript/core`, so they're trivially unit-testable in the\n * Jest Node runner without an ESM transform or a NativeScript\n * runtime stub.\n */\n\n/**\n * Structural shape of a NativeScript View used by these helpers.\n * Real `View` instances from `@nativescript/core` satisfy this\n * trivially; tests pass plain objects with the same shape.\n *\n * Only the two host props we mirror and the `eachChildView` walk\n * matter here — keeping the shape tight makes the helpers easy to\n * reason about and prevents leaking unrelated `View` semantics.\n */\nexport interface ModalHostView {\n _dialogFragment?: unknown;\n viewController?: unknown;\n eachChildView?: (callback: (child: ModalHostView) => boolean) => void;\n}\n\n/**\n * Structural shape required to wrap a NativeScript View's `_addView`.\n * `ProxyViewContainer` (the host of an Angular component) satisfies\n * this via `ViewBase._addView`.\n */\nexport interface AddViewHost extends ModalHostView {\n _addView?: (view: ModalHostView, atIndex?: number) => void;\n}\n\n/**\n * Marker property used to make {@link installPvcModalHostPropPropagation}\n * idempotent. Exported only so the spec can assert install\n * idempotency without re-declaring the constant.\n */\nexport const PVC_ADD_VIEW_WRAPPED_MARKER = '__ng_modal_propagate_addview__';\n\n/**\n * Mirror `wrapper`'s modal-host props onto every descendant of\n * `root` via NativeScript's logical `eachChildView` walk.\n *\n * - The wrapper itself is **never** written to. NS core owns that\n * assignment and we must not shadow the canonical reference.\n * - Writes are idempotent: a descendant that already holds the same\n * reference is skipped, so repeat calls (HMR re-renders, multiple\n * PVC adds in one render pass) stay cheap.\n * - No-op when the modal isn't shown yet, has already closed, or\n * when either input is missing. NS clears both props to null on\n * close, so propagating after that point would only persist stale\n * references on the descendants.\n */\nexport function propagateModalHostPropsToDescendants(wrapper: ModalHostView | undefined | null, root: ModalHostView | undefined | null): void {\n if (!wrapper || !root) {\n return;\n }\n const dialogFragment = wrapper._dialogFragment;\n const viewController = wrapper.viewController;\n if (dialogFragment == null && viewController == null) {\n return;\n }\n\n const visit = (view: ModalHostView | undefined): void => {\n if (!view) {\n return;\n }\n if (view !== wrapper) {\n if (dialogFragment !== undefined && view._dialogFragment !== dialogFragment) {\n view._dialogFragment = dialogFragment;\n }\n if (viewController !== undefined && view.viewController !== viewController) {\n view.viewController = viewController;\n }\n }\n view.eachChildView?.((child) => {\n visit(child);\n return true;\n });\n };\n visit(root);\n}\n\n/**\n * Idempotently wrap `host._addView` so every child added after\n * install — typically the new template root produced by Angular's\n * `ɵɵreplaceMetadata` HMR cycle — has `wrapper`'s modal-host props\n * mirrored onto it (and its current subtree) **before** NS attaches\n * the view.\n *\n * Why \"before\"? `_addView` on a loaded parent synchronously calls\n * `child.callLoaded()` deep inside, which fires the `loaded` event\n * chain on the new template root. User code (e.g.\n * `onLoaded($event)` → `args.object._dialogFragment.getDialog()`)\n * runs from inside that synchronous call. The props **must** be\n * present on the child by the time `_addView` runs — pre-hook\n * position is the only place that guarantees this without\n * monkey-patching NS internals.\n *\n * The wrap reads `wrapper._dialogFragment` / `wrapper.viewController`\n * lazily (per call) via {@link propagateModalHostPropsToDescendants},\n * so a wrap installed while the modal is open keeps doing the right\n * thing if HMR re-render happens later, and gracefully no-ops after\n * the modal closes (both props become null on the wrapper).\n *\n * No-op when `host` lacks `_addView` (e.g. a non-View element) or\n * when the wrap is already installed (`PVC_ADD_VIEW_WRAPPED_MARKER`\n * sentinel). The wrap is intentionally NOT removable — the host\n * lives only as long as the modal, so the wrap is GC'd with it.\n */\nexport function installPvcModalHostPropPropagation(host: AddViewHost | undefined | null, wrapper: ModalHostView | undefined | null): void {\n if (!host || !wrapper) {\n return;\n }\n const target = host as AddViewHost & Record<string, unknown>;\n if (target[PVC_ADD_VIEW_WRAPPED_MARKER] || typeof target._addView !== 'function') {\n return;\n }\n const origAddView = target._addView.bind(target);\n target._addView = (view: ModalHostView, atIndex?: number) => {\n propagateModalHostPropsToDescendants(wrapper, view);\n return origAddView(view, atIndex);\n };\n target[PVC_ADD_VIEW_WRAPPED_MARKER] = true;\n}\n","import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n createComponent,\n EmbeddedViewRef,\n Injector,\n Optional,\n ViewContainerRef,\n} from '@angular/core';\nimport { Application, ContentView, Frame, View } from '@nativescript/core';\nimport { fromEvent, Subject } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { AppHostAsyncView, AppHostView } from '../../app-host-view';\nimport { NSLocationStrategy } from '../../legacy/router/ns-location-strategy';\nimport { once } from '../../utils/general';\nimport { NgViewRef } from '../../view-refs';\nimport { DetachedLoader } from '../detached-loader';\nimport { ComponentPortal, TemplatePortal } from '../portal/common';\nimport { NativeScriptDomPortalOutlet } from '../portal/nsdom-portal-outlet';\nimport { NativeDialogConfig } from './dialog-config';\nimport { AddViewHost, installPvcModalHostPropPropagation, ModalHostView, propagateModalHostPropsToDescendants } from './modal-host-props';\n\nexport class NativeModalRef {\n _id: string;\n stateChanged = new Subject<{ state: 'opened' | 'closed' | 'closing' }>();\n onDismiss = new Subject<void>();\n\n parentView: View;\n portalOutlet: NativeScriptDomPortalOutlet;\n detachedLoaderRef: ComponentRef<DetachedLoader>;\n modalViewRef: NgViewRef<any>;\n /**\n * The actual NativeScript view passed to `parentView.showModal(...)`.\n *\n * For component portals this is the stable `targetView` ContentView\n * wrapper that owns the Angular host PVC. For template portals it\n * remains `modalViewRef.firstNativeLikeView` (the historical\n * behavior). Keeping a direct reference avoids walking parent\n * chains when programmatically closing the modal.\n */\n modalView?: View;\n\n private _closeCallback: () => void;\n private _isDismissed = false;\n\n constructor(\n private _config: NativeDialogConfig,\n private _injector: Injector,\n @Optional() private location?: NSLocationStrategy,\n ) {\n const nativeElement =\n this._config.renderIn === 'root'\n ? Application.getRootView()\n : this._config.renderIn === 'viewContainerRef'\n ? this._config.viewContainerRef?.element.nativeElement\n : this._config.renderIn;\n let parentView = nativeElement || Application.getRootView();\n\n if ((parentView instanceof AppHostView || parentView instanceof AppHostAsyncView) && parentView.ngAppRoot) {\n parentView = parentView.ngAppRoot;\n }\n\n // _ngDialogRoot is the first child of the previously detached proxy.\n // It should have 'viewController' (iOS) or '_dialogFragment' (Android) available for\n // presenting future modal views.\n while (parentView._modal || parentView._ngDialogRoot) {\n parentView = parentView._modal || parentView._ngDialogRoot;\n }\n this.parentView = parentView;\n\n this._closeCallback = once(async () => {\n this.stateChanged.next({ state: 'closing' });\n if (!this._isDismissed) {\n // Prefer `modalView` (the actual presented view) over the\n // legacy `firstNativeLikeView`. Both paths ultimately reach\n // the same `_closeModalCallback` via parent walk, but going\n // through the presented view is one hop instead of three and\n // works even if the rendered first root has been replaced by\n // an HMR `ɵɵreplaceMetadata` cycle.\n const closeTarget = this.modalView ?? this.modalViewRef.firstNativeLikeView;\n closeTarget?.closeModal();\n }\n await this.location?._closeModalNavigation();\n // this.detachedLoaderRef?.destroy();\n if (this.modalViewRef?.firstNativeLikeView?.isLoaded) {\n fromEvent(this.modalViewRef.firstNativeLikeView, 'unloaded')\n .pipe(take(1))\n .subscribe(() => this.stateChanged.next({ state: 'closed' }));\n } else {\n this.stateChanged.next({ state: 'closed' });\n }\n });\n }\n\n _generateDetachedContainer(vcRef?: ViewContainerRef) {\n if (vcRef) {\n this.detachedLoaderRef = vcRef.createComponent(DetachedLoader);\n } else {\n this.detachedLoaderRef = createComponent(DetachedLoader, {\n environmentInjector: this._injector.get(ApplicationRef).injector,\n elementInjector: this._config.viewContainerRef?.injector || this._injector,\n });\n this._injector.get(ApplicationRef).attachView(this.detachedLoaderRef.hostView);\n }\n this.detachedLoaderRef.changeDetectorRef.detectChanges();\n }\n\n attachTemplatePortal<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T> {\n this.startModalNavigation();\n const vcRef = portal.viewContainerRef || this._config.viewContainerRef;\n this._generateDetachedContainer(vcRef);\n portal.viewContainerRef = this.detachedLoaderRef.instance.vc;\n const targetView = new ContentView();\n this.portalOutlet = new NativeScriptDomPortalOutlet(\n targetView,\n this._config.componentFactoryResolver || this._injector.get(ComponentFactoryResolver),\n this._injector.get(ApplicationRef),\n this._injector,\n );\n const templateRef = this.portalOutlet.attach(portal);\n this.modalViewRef = new NgViewRef(templateRef);\n this.modalViewRef.firstNativeLikeView['__ng_modal_id__'] = this._id;\n // if we don't detach the view from its parent, ios gets mad\n this.modalViewRef.detachNativeLikeView();\n\n const userOptions = this._config.nativeOptions || {};\n this.parentView.showModal(this.modalViewRef.firstNativeLikeView, {\n context: null,\n ...userOptions,\n closeCallback: async () => {\n await this.location?._closeModalNavigation();\n this.onDismiss.next();\n this.onDismiss.complete();\n },\n cancelable: !this._config.disableClose,\n });\n // if (this.modalView !== templateRef.rootNodes[0]) {\n // componentRef.location.nativeElement._ngDialogRoot = this.modalView;\n // }\n return templateRef;\n }\n\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this.startModalNavigation();\n\n // `targetView` is a stable ContentView wrapper we own. The Angular\n // component's host (a `ProxyViewContainer`) is attached as its\n // content via the portal outlet below. We present `targetView`\n // itself as the modal — *not* the first rendered template root —\n // so that component-level HMR (`ɵɵreplaceMetadata`) can re-render\n // into the PVC and the modal automatically displays the new\n // content via the wrapper. Presenting the rendered first root\n // directly worked for the initial open but left subsequent HMR\n // updates rendering into a detached PVC, producing a blank modal.\n const targetView = new ContentView();\n this.portalOutlet = new NativeScriptDomPortalOutlet(\n targetView,\n this._config.componentFactoryResolver || this._injector.get(ComponentFactoryResolver),\n this._injector.get(ApplicationRef),\n this._injector,\n );\n const componentRef = this.portalOutlet.attach(portal);\n componentRef.changeDetectorRef.detectChanges();\n this.modalViewRef = new NgViewRef(componentRef);\n this.modalView = targetView;\n if (this.modalViewRef.firstNativeLikeView !== this.modalViewRef.view) {\n (<any>this.modalViewRef.view)._ngDialogRoot = this.modalViewRef.firstNativeLikeView;\n }\n // Tag both the wrapper (the actual modal root) and the rendered\n // first root so `getClosestDialog`'s parent walk finds the modal\n // id regardless of whether it starts from a view inside the\n // template or from the wrapper.\n targetView['__ng_modal_id__'] = this._id;\n if (this.modalViewRef.firstNativeLikeView) {\n this.modalViewRef.firstNativeLikeView['__ng_modal_id__'] = this._id;\n }\n\n const userOptions = this._config.nativeOptions || {};\n this.parentView.showModal(targetView, {\n context: null,\n ...userOptions,\n closeCallback: async () => {\n this._isDismissed = true;\n this._closeCallback(); // close callback can only be called once, so we call it here to setup the exit events\n this.onDismiss.next();\n this.onDismiss.complete();\n },\n cancelable: !this._config.disableClose,\n });\n\n // After `showModal`, NativeScript core has stamped\n // `_dialogFragment` (Android) / `viewController` (iOS) on\n // `targetView` itself — but user template code (`onLoaded($event)`\n // → `args.object._dialogFragment.getDialog()...`) reads those\n // props on the rendered template root, which is a *descendant*\n // of `targetView`, not `targetView` itself. Mirror them down so\n // the template root (and any nested loaded handler) sees the\n // real host objects instead of `undefined`, then install a\n // lazy wrap on the host PVC's `_addView` so future child\n // additions — typically the new template root produced by\n // Angular's `ɵɵreplaceMetadata` HMR cycle — get the same\n // props mirrored *before* NS attaches the view and fires\n // its `loaded` event chain. See `modal-host-props.ts` for the\n // full rationale.\n propagateModalHostPropsToDescendants(targetView as ModalHostView, targetView as ModalHostView);\n const hostView = componentRef.location?.nativeElement as View | undefined;\n if (hostView) {\n installPvcModalHostPropPropagation(hostView as unknown as AddViewHost, targetView as ModalHostView);\n }\n\n return componentRef;\n }\n\n _startExitAnimation() {\n this._closeCallback();\n }\n\n dispose() {\n this.portalOutlet.dispose();\n }\n\n private startModalNavigation() {\n const frame = this.parentView instanceof Frame ? this.parentView : this.parentView?.page?.frame || Frame.topmost();\n\n this.location?._beginModalNavigation(frame);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n inject,\n Injectable,\n InjectionToken,\n Injector,\n OnDestroy,\n StaticProvider,\n TemplateRef,\n Type,\n} from '@angular/core';\nimport { Application, View } from '@nativescript/core';\nimport { defer, Observable, Subject, Subscription } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { postAngularBootstrap$, preAngularDisposal$ } from '../../application';\nimport { isAngularHmrEnabled } from '../../hmr-environment';\nimport { getFreshComponentClass } from '../../hmr-class-registry';\nimport { registerHmrEagerInstantiator } from '../../hmr-eager-services';\nimport { NSLocationStrategy } from '../../legacy/router/ns-location-strategy';\nimport { NativeScriptDebug } from '../../trace';\nimport { ComponentType } from '../../utils/general';\nimport { ComponentPortal, TemplatePortal } from '../portal/common';\nimport { NativeDialogConfig } from './dialog-config';\nimport {\n abortCapturedDialog,\n captureDialogsForHmr,\n CapturedHmrDialog,\n clearPendingHmrDialogs,\n consumePendingHmrDialogs,\n HmrCandidateDialog,\n peekPendingHmrDialogs,\n} from './dialog-hmr';\nimport { buildNonAnimatedRestoreConfig, suppressNativeCloseAnimation } from './dialog-hmr-animation';\nimport { NativeDialogRef } from './dialog-ref';\nimport { NativeModalRef } from './native-modal-ref';\n\n/**\n * Dialog HMR lifecycle log.\n */\nfunction hmrDialogLog(message: string): void {\n if (!isAngularHmrEnabled()) {\n return;\n }\n if (!NativeScriptDebug.isLogEnabled()) {\n return;\n }\n NativeScriptDebug.hmrLog(`[dialog] ${message}`);\n}\n\n/**\n * Lower-level dialog HMR wiring trace (module-realm count, NativeDialog\n * instance count, registry hits/misses). Distinct from `hmrDialogLog`\n * for greppability — both fan into the same Trace category so a single\n * `Trace.setCategories(NativeScriptDebug.hmrTraceCategory)` toggle\n * surfaces them all.\n */\nfunction hmrDialogDiag(message: string): void {\n if (!isAngularHmrEnabled()) {\n return;\n }\n if (!NativeScriptDebug.isLogEnabled()) {\n return;\n }\n NativeScriptDebug.hmrLog(`[dialog-diag] ${message}`);\n}\n\n/**\n * Module-evaluation marker. Increments on every fresh evaluation of\n * `dialog-services.ts`. If we see this number rise on every HMR cycle,\n * the file is being re-evaluated (good). If it stays flat, the module\n * is being served from cache (bad — class identities won't change).\n */\nconst DIALOG_MODULE_DIAG_KEY = '__NS_HMR_DIAG_DIALOG_MODULE__';\ninterface DialogModuleDiag {\n evals: number;\n instances: number;\n lastEvalAt: number;\n}\nfunction getDialogModuleDiag(): DialogModuleDiag {\n const slot = globalThis as unknown as { [DIALOG_MODULE_DIAG_KEY]?: DialogModuleDiag };\n if (!slot[DIALOG_MODULE_DIAG_KEY]) {\n slot[DIALOG_MODULE_DIAG_KEY] = { evals: 0, instances: 0, lastEvalAt: 0 };\n }\n return slot[DIALOG_MODULE_DIAG_KEY]!;\n}\n{\n const md = getDialogModuleDiag();\n md.evals += 1;\n md.lastEvalAt = Date.now();\n hmrDialogDiag(`module-eval count=${md.evals} (file=dialog-services.ts) timestamp=${md.lastEvalAt}`);\n}\n\n/** Injection token that can be used to access the data that was passed in to a dialog. */\nexport const NATIVE_DIALOG_DATA = new InjectionToken<any>('NativeDialogData');\n\n/** Injection token that can be used to specify default dialog options. */\nexport const NATIVE_DIALOG_DEFAULT_OPTIONS = new InjectionToken<NativeDialogConfig>('native-dialog-default-options');\n\n/**\n * Base class for dialog services. The base dialog service allows\n * for arbitrary dialog refs and dialog container components.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class NativeDialog implements OnDestroy {\n /**\n * Diagnostic instance id. We tag each constructor with a number so\n * the logs make it obvious when a stale `NativeDialog` keeps\n * receiving events after a reboot (e.g. due to a leaked subscription\n * or a service from a previous realm being kept alive).\n */\n private readonly _diagInstanceId: number;\n private _openDialogsAtThisLevel: NativeDialogRef<any>[] = [];\n private readonly _afterAllClosedAtThisLevel = new Subject<void>();\n private readonly _afterOpenedAtThisLevel = new Subject<NativeDialogRef<any>>();\n /**\n * Maps each open dialog ref back to the `(componentClass, config)` pair it\n * was opened with so the HMR snapshot can replay the call later. Dialogs\n * opened with a `TemplateRef` are tracked with `componentClass: undefined`\n * — the HMR layer skips them automatically.\n */\n private readonly _openDialogMetadata = new WeakMap<NativeDialogRef<any>, { componentClass?: ComponentType<any>; config: NativeDialogConfig }>();\n private _hmrSubscriptions: Subscription[] = [];\n // TODO (jelbourn): tighten the typing right-hand side of this expression.\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n readonly afterAllClosed: Observable<void> = defer(() =>\n this.openDialogs.length\n ? this._getAfterAllClosed()\n : this._getAfterAllClosed().pipe(startWith<any, any>(undefined)),\n ) as Observable<any>;\n\n /** Keeps track of the currently-open dialogs. */\n get openDialogs(): NativeDialogRef<any>[] {\n return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;\n }\n\n /** Stream that emits when a dialog has been opened. */\n get afterOpened(): Subject<NativeDialogRef<any>> {\n return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;\n }\n\n _getAfterAllClosed(): Subject<void> {\n const parent = this._parentDialog;\n return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;\n }\n private _injector = inject(Injector);\n private _defaultOptions = inject(NATIVE_DIALOG_DEFAULT_OPTIONS, {\n optional: true,\n });\n private _parentDialog = inject(NativeDialog, { optional: true, skipSelf: true });\n private _dialogRefConstructor: Type<NativeDialogRef<any>> = NativeDialogRef;\n private _nativeModalType = NativeModalRef;\n private _dialogDataToken = NATIVE_DIALOG_DATA;\n private locationStrategy = inject(NSLocationStrategy);\n // Bumps a global counter so we can detect duplicate or leaked\n // `NativeDialog` instances across HMR cycles. Field initialiser\n // ordering: this MUST run before `_initHmrLifecycle()` below so the\n // log line in that helper can include the assigned id.\n private _diagInstanceIdAssign = ((): null => {\n const md = getDialogModuleDiag();\n md.instances += 1;\n (this as unknown as { _diagInstanceId: number })._diagInstanceId = md.instances;\n hmrDialogDiag(\n `NativeDialog ctor instanceId=${md.instances} hasParentDialog=${!!this._parentDialog} moduleEvalCount=${md.evals}`,\n );\n return null;\n })();\n // Initialise after every dependency above so the subscriptions can call\n // back into `this.open(...)` and `this.openDialogs` safely. The result is\n // unused — we just want a side-effect at construction time.\n private _hmrInitMarker = this._initHmrLifecycle();\n /**\n * Opens a modal dialog containing the given component.\n * @param component Type of the component to load into the dialog.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open<T, D = any, R = any>(component: ComponentType<T>, config?: NativeDialogConfig<D>): NativeDialogRef<T, R>;\n\n /**\n * Opens a modal dialog containing the given template.\n * @param template TemplateRef to instantiate as the dialog content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened dialog.\n */\n open<T, D = any, R = any>(template: TemplateRef<T>, config?: NativeDialogConfig<D>): NativeDialogRef<T, R>;\n\n open<T, D = any, R = any>(\n template: ComponentType<T> | TemplateRef<T>,\n config?: NativeDialogConfig<D>,\n ): NativeDialogRef<T, R>;\n\n open<T, D = any, R = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: NativeDialogConfig<D>,\n ): NativeDialogRef<T, R> {\n config = _applyConfigDefaults(config, this._defaultOptions || new NativeDialogConfig());\n\n if (config.id && this.getDialogById(config.id) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n const dialogRef = this._attachDialogContent<T, R>(componentOrTemplateRef, config);\n\n this.openDialogs.push(dialogRef);\n this._openDialogMetadata.set(dialogRef, {\n componentClass: componentOrTemplateRef instanceof TemplateRef ? undefined : (componentOrTemplateRef as ComponentType<T>),\n config,\n });\n dialogRef.afterClosed().subscribe(() => this._removeOpenDialog(dialogRef));\n this.afterOpened.next(dialogRef);\n\n // Notify the dialog container that the content has been attached.\n // dialogContainer._initializeWithAttachedContent();\n\n return dialogRef;\n }\n\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll(): void {\n this._closeDialogs(this.openDialogs);\n }\n\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id: string): NativeDialogRef<any> | undefined {\n return this.openDialogs.find((dialog) => dialog.id === id);\n }\n\n ngOnDestroy() {\n hmrDialogDiag(\n `NativeDialog ngOnDestroy instanceId=${this._diagInstanceId} openCount=${this._openDialogsAtThisLevel.length} subCount=${this._hmrSubscriptions.length}`,\n );\n // Only close the dialogs at this level on destroy\n // since the parent service may still be active.\n this._closeDialogs(this._openDialogsAtThisLevel);\n this._afterAllClosedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n for (const sub of this._hmrSubscriptions) {\n try {\n sub.unsubscribe();\n } catch {\n // Best-effort: tearing down the dialog service shouldn't prevent the\n // rest of the module disposal from completing.\n }\n }\n this._hmrSubscriptions = [];\n }\n\n /**\n * Tracks whether a restore has already been scheduled for this\n * `NativeDialog` instance's lifetime. We only need to restore once\n * per HMR cycle — the rxjs `ReplaySubject(1)` for\n * `postAngularBootstrap$` delivers both the *previous* cycle's\n * cached event (replay on subscribe) **and** the *current* cycle's\n * fresh event, and the constructor stash peek can independently\n * notice pending work. Without this guard each of those triggers\n * would queue its own `setTimeout` and the logs would show two or\n * three \"scheduling restore\" lines per save.\n *\n * The guard is per-instance and the stash itself is the source of\n * truth: `_restorePendingDialogs` calls `consumePendingHmrDialogs()`\n * which atomically clears the stash, so even if the guard somehow\n * fired twice, only the first call would do real work.\n */\n private _restoreScheduledForThisInstance = false;\n\n /**\n * Wires up HMR capture/restore. Only the root-level dialog manages the\n * stash so a stack of `NativeDialog` instances inside a child injector\n * doesn't fight for it.\n *\n * Production short-circuit: `isAngularHmrEnabled()` returns `false` in\n * release builds and when no NS Vite / webpack HMR runtime is present,\n * so the long-lived subscriptions below never attach in shipping apps.\n *\n * `postAngularBootstrap$` is a `ReplaySubject(1)` (see `application.ts`)\n * which means a `NativeDialog` instantiated *after* the bootstrap event\n * has already fired (typical when the user app injects `NativeDialog`\n * lazily via a service like `view.service.ts`) still receives the\n * buffered event and runs the restore path.\n */\n private _initHmrLifecycle(): null {\n if (this._parentDialog) {\n hmrDialogDiag(`_initHmrLifecycle skipped (has parent dialog) instanceId=${this._diagInstanceId}`);\n return null;\n }\n\n if (!isAngularHmrEnabled()) {\n return null;\n }\n\n hmrDialogDiag(\n `_initHmrLifecycle wiring up subscriptions instanceId=${this._diagInstanceId} moduleEvalCount=${getDialogModuleDiag().evals}`,\n );\n\n const dispose = preAngularDisposal$.subscribe((event) => {\n if (event.moduleType !== 'main' || event.reason !== 'hotreload') {\n return;\n }\n hmrDialogDiag(`preAngularDisposal$ fired (reason=${event.reason}) instanceId=${this._diagInstanceId}`);\n this._captureOpenDialogsForHmr();\n });\n\n const bootstrap = postAngularBootstrap$.subscribe((event) => {\n if (event.moduleType !== 'main' || event.reason !== 'hotreload') {\n return;\n }\n hmrDialogDiag(`postAngularBootstrap$ fired (reason=${event.reason}) instanceId=${this._diagInstanceId}`);\n this._maybeScheduleRestore(`postAngularBootstrap$ (reason=${event.reason})`);\n });\n\n this._hmrSubscriptions.push(dispose, bootstrap);\n\n // Belt-and-suspenders: even though `postAngularBootstrap$` replays\n // the last event for late subscribers, also peek the global stash\n // here. This catches the case where `NativeDialog` is instantiated\n // lazily — *after* `emitModuleBootstrapEvent` has fired and the\n // ReplaySubject's buffered event no longer matches the current\n // cycle. The `_maybeScheduleRestore` guard makes this a no-op when\n // the bootstrap subscriber already queued work.\n const pendingNow = peekPendingHmrDialogs();\n hmrDialogDiag(`_initHmrLifecycle stash peek pending=${pendingNow.length} instanceId=${this._diagInstanceId}`);\n if (pendingNow.length > 0) {\n this._maybeScheduleRestore(`stash peek on ctor: ${pendingNow.length} pending dialog(s)`);\n }\n return null;\n }\n\n /**\n * Schedule a restore exactly once per `NativeDialog` instance.\n *\n * The work is deferred to the next macrotask for two reasons:\n *\n * 1. `postAngularBootstrap$.next(...)` is fired from inside\n * `emitModuleBootstrapEvent`, which itself runs inside the\n * `bootstrapApplication` callback — so the call stack still\n * contains Angular's ApplicationRef bootstrap pipeline. Doing\n * `this.open(...)` synchronously re-entered Angular DI while a\n * `providedIn: 'root'` factory could still be on the resolution\n * stack, which surfaced as `NG0200: Circular dependency detected\n * for NativeDialog`. Yielding to a macrotask lets the bootstrap\n * stack fully unwind first.\n * 2. The eventual `parent.showModal(...)` cannot present onto a\n * view controller whose view is not yet in the iOS window\n * hierarchy (see `_scheduleRestoreOpenWhenReady` for the second\n * wait stage); a synchronous attempt would silently no-op\n * because iOS rejects the present without throwing.\n */\n private _maybeScheduleRestore(triggerDescription: string): void {\n if (this._restoreScheduledForThisInstance) {\n hmrDialogDiag(\n `_maybeScheduleRestore SKIP duplicate trigger=${triggerDescription} instanceId=${this._diagInstanceId}`,\n );\n return;\n }\n this._restoreScheduledForThisInstance = true;\n hmrDialogLog(`scheduling restore (trigger=${triggerDescription}) instanceId=${this._diagInstanceId}`);\n setTimeout(() => {\n void this._restorePendingDialogs();\n }, 0);\n }\n\n private _captureOpenDialogsForHmr(): void {\n const candidates: HmrCandidateDialog[] = this._openDialogsAtThisLevel.map((ref) => {\n const meta = this._openDialogMetadata.get(ref);\n return {\n ref,\n componentClass: meta?.componentClass,\n config: meta?.config ?? new NativeDialogConfig(),\n };\n });\n\n hmrDialogDiag(\n `_captureOpenDialogsForHmr instanceId=${this._diagInstanceId} candidates=${candidates.length} (${candidates.map((c) => `${(c.componentClass as { name?: string } | undefined)?.name ?? '(template)'}|preserveOnHmr=${!!c.config?.preserveOnHmr}`).join(', ')})`,\n );\n\n const captured = captureDialogsForHmr(candidates);\n\n if (captured.length > 0) {\n // Suppress the close animation that's about to fire as part of\n // `_closeAllModalViewsInternal()` during root-view replacement.\n // Without this the user sees a slide-down + slide-up flicker\n // wrapping every HMR reboot.\n for (const candidate of candidates) {\n suppressNativeCloseAnimation(candidate);\n }\n hmrDialogLog(`captured ${captured.length} dialog(s) for HMR restore [${captured.map((c) => c.componentName).join(', ')}]`);\n } else if (this._openDialogsAtThisLevel.length > 0) {\n hmrDialogLog(`skipped capture: ${this._openDialogsAtThisLevel.length} open dialog(s) but none preservable`);\n }\n\n if (captured.length > 0 && NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`captured ${captured.length} dialog(s) for HMR restore`);\n }\n }\n\n /**\n * Per-cycle guard to keep `_restorePendingDialogs` idempotent if more\n * than one subscriber fires for the same bootstrap event. The\n * regression we have seen (`postAngularBootstrap$ → restore` logged\n * twice in the same hot reload) was caused by the `NativeDialogModule`\n * also listing `NativeDialog` in its `providers` array. That has been\n * removed, but we keep this flag as a defensive net so a future stray\n * subscription does not consume the stash twice. The flag is reset\n * after the consume so subsequent HMR cycles can run their own\n * restore.\n */\n private _restoreInFlight = false;\n\n private async _restorePendingDialogs(): Promise<void> {\n if (this._restoreInFlight) {\n hmrDialogLog('skipping restore: already in flight');\n return;\n }\n const pending = consumePendingHmrDialogs();\n if (pending.length === 0) {\n return;\n }\n this._restoreInFlight = true;\n\n hmrDialogLog(`restoring ${pending.length} dialog(s) after reboot [${pending.map((c) => c.componentName).join(', ')}]`);\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`restoring ${pending.length} dialog(s) after HMR reboot`);\n }\n\n try {\n for (const captured of pending) {\n this._restoreSingleDialog(captured);\n }\n } finally {\n this._restoreInFlight = false;\n }\n }\n\n /**\n * Resolve the freshest known class object for the captured component\n * name and re-open the dialog through the normal `open` path, but\n * only once the new root view is actually attached to the iOS window\n * hierarchy.\n *\n * Why a class lookup at all: an HMR reboot calls\n * `ɵresetCompiledComponents()` which clears each component's `ɵcmp`\n * field but **leaves the class identity unchanged**. The patched\n * `ɵɵdefineComponent` then re-registers the same class object under\n * the same source name when Angular re-renders the component. A\n * fresh-class lookup therefore returns either the same object the\n * stash captured (most common) or, on the rare occasion that the\n * source file's `@Component` decorator was re-evaluated into a brand\n * new class object (e.g. the user added `@Component(...)` to a new\n * exported symbol), the live one. Either way, a single check is\n * enough — the previous retry schedule was a no-op in 100 % of\n * observed cycles because the captured class IS the live class.\n */\n private _restoreSingleDialog(captured: CapturedHmrDialog): void {\n const live = getFreshComponentClass<ComponentType<unknown>>(captured.componentName);\n const componentClass = live ?? captured.componentClass;\n const usingFresh = !!live && live !== captured.componentClass;\n // Detailed diagnostic to disambiguate the three reasons\n // `usingFreshClass=false` could log:\n // 1. liveDefined=false: the patched ɵɵdefineComponent never\n // registered a class for this name in the new realm. Most\n // likely cause: the component module was not re-evaluated\n // after the eviction (file not in `evictPaths`, or runtime\n // did not actually evict it).\n // 2. liveDefined=true but live === captured: the file WAS\n // re-evaluated, but the registry still hands back the same\n // class object. This shouldn't happen post-reboot for a\n // truly fresh realm; if it does, the captured snapshot was\n // taken from the same realm that's now serving the live\n // class — i.e. the disposal path is not actually disposing\n // the old realm before the new one boots.\n // 3. liveDefined=true and live !== captured: usingFresh path,\n // the registry IS doing its job. This is the success case.\n const liveDefined = !!live;\n const sameAsCapture = liveDefined && live === captured.componentClass;\n hmrDialogDiag(\n `_restoreSingleDialog name=${captured.componentName} liveDefined=${liveDefined} sameAsCapture=${sameAsCapture} usingFresh=${usingFresh} capturedFnName=${(captured.componentClass as unknown as { name?: string })?.name ?? '(none)'} liveFnName=${(live as unknown as { name?: string } | undefined)?.name ?? '(none)'}`,\n );\n this._scheduleRestoreOpenWhenReady(captured, componentClass, usingFresh);\n }\n\n /**\n * Maximum time we'll wait for the new root view to attach to the\n * iOS window before giving up and trying the open anyway. NS Vite's\n * worst observed reboot-to-rootview-loaded gap is ~250 ms; one\n * second leaves headroom for slower devices without leaving the\n * captured dialog stuck in the stash if something genuinely goes\n * wrong.\n */\n private static readonly _ROOT_VIEW_LOADED_TIMEOUT_MS = 1_000;\n\n /**\n * Defer the actual `this.open(...)` call until the new root view's\n * underlying iOS `UIViewController.view` is in the window hierarchy.\n *\n * iOS silently rejects `presentViewControllerAnimatedCompletion` if\n * the parent controller's view is not yet attached to a `UIWindow`\n * (see `view/index.ios.ts::_showNativeModalView`, which logs to\n * `Trace` and returns without throwing). In dev that would surface\n * as a vanished modal with no actionable error.\n *\n * NS marks a view as `isLoaded === true` from\n * `UILayoutViewController.viewWillAppear`, which fires once iOS has\n * decided to add the view to its window. Listening for the\n * `loadedEvent` (one-shot) plus an extra macrotask gives UIKit a\n * chance to finish window attachment before we present.\n */\n private _scheduleRestoreOpenWhenReady(\n captured: CapturedHmrDialog,\n componentClass: ComponentType<unknown>,\n usingFresh: boolean,\n ): void {\n const rootView = Application.getRootView();\n\n if (rootView && rootView.isLoaded) {\n // Even when isLoaded is already true we yield once: a previous\n // capture in the same hot reload cycle may have set isLoaded on\n // the *outgoing* root view and a new root view is about to take\n // over. A single setTimeout(0) gives `setWindowContent` a chance\n // to finish swapping `win.rootViewController` before we try to\n // present on top of it.\n setTimeout(() => this._performRestoreOpen(captured, componentClass, usingFresh), 0);\n return;\n }\n\n if (!rootView) {\n // No root view at all yet — extremely unusual at this point in\n // the bootstrap, but protect against it by polling. We use the\n // same timeout budget as the loaded path.\n this._pollForRootView(captured, componentClass, usingFresh, Date.now());\n return;\n }\n\n hmrDialogLog(`restore ${captured.componentName} waiting for root view loadedEvent`);\n\n let settled = false;\n const onLoaded = () => {\n if (settled) return;\n settled = true;\n try {\n rootView.off(View.loadedEvent, onLoaded);\n } catch {\n // off may throw on stale view bindings; the `settled` flag\n // already prevents a double-fire.\n }\n // Defer one tick after viewWillAppear so UIKit completes the\n // actual window attachment (`view.window` is set during the\n // view-controller transition that follows viewWillAppear).\n setTimeout(() => this._performRestoreOpen(captured, componentClass, usingFresh), 0);\n };\n\n try {\n rootView.once(View.loadedEvent, onLoaded);\n } catch {\n // If the event subscription fails (ancient core builds), fall\n // back to a tiny delay — better to attempt the open and have\n // iOS log a benign trace than to leak the dialog stash.\n setTimeout(() => onLoaded(), 50);\n }\n\n // Bound the wait so a never-loading root view can't permanently\n // pin the captured dialog in the stash.\n setTimeout(() => {\n if (settled) return;\n hmrDialogLog(`restore ${captured.componentName} root view never loaded within ${NativeDialog._ROOT_VIEW_LOADED_TIMEOUT_MS}ms; attempting open anyway`);\n onLoaded();\n }, NativeDialog._ROOT_VIEW_LOADED_TIMEOUT_MS);\n }\n\n private _pollForRootView(\n captured: CapturedHmrDialog,\n componentClass: ComponentType<unknown>,\n usingFresh: boolean,\n startedAt: number,\n ): void {\n const rootView = Application.getRootView();\n if (rootView) {\n this._scheduleRestoreOpenWhenReady(captured, componentClass, usingFresh);\n return;\n }\n if (Date.now() - startedAt > NativeDialog._ROOT_VIEW_LOADED_TIMEOUT_MS) {\n hmrDialogLog(`restore ${captured.componentName} aborted: no root view after ${NativeDialog._ROOT_VIEW_LOADED_TIMEOUT_MS}ms`);\n abortCapturedDialog(captured);\n return;\n }\n setTimeout(() => this._pollForRootView(captured, componentClass, usingFresh, startedAt), 16);\n }\n\n private _performRestoreOpen(\n captured: CapturedHmrDialog,\n componentClass: ComponentType<unknown>,\n usingFresh: boolean,\n ): void {\n hmrDialogLog(`restore ${captured.componentName} usingFreshClass=${usingFresh}`);\n if (NativeScriptDebug.isLogEnabled() && usingFresh) {\n NativeScriptDebug.hmrLog(`HMR modal restore using fresh class for ${captured.componentName}`);\n }\n\n // Force the restored modal to open without animation so the round-\n // trip looks like an instant content refresh rather than a full\n // close-and-reopen sequence.\n const restoreConfig = buildNonAnimatedRestoreConfig(captured.config);\n\n try {\n const newRef = this.open(componentClass, restoreConfig);\n hmrDialogLog(`restore ${captured.componentName} → opened newRef.id=${newRef?.id ?? 'n/a'}`);\n newRef.afterClosed().subscribe({\n next: (value) => captured.graftAfterClosed(value),\n complete: () => captured.graftAfterClosed(undefined),\n });\n } catch (err) {\n abortCapturedDialog(captured);\n const message = (err as Error)?.message ?? String(err);\n hmrDialogLog(`restore ${captured.componentName} FAILED: ${message}`);\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLogError(`HMR modal restore failed: ${message}`);\n }\n }\n }\n\n /**\n * Test/debug helper: discard any captured modals without restoring them.\n * Mostly useful when projects want to opt out of restoration without\n * recompiling. Public callers should prefer `preserveOnHmr: false` instead.\n */\n static _clearPendingHmrDialogs(): void {\n clearPendingHmrDialogs();\n }\n\n /**\n * Attaches the user-provided component to the already-created dialog container.\n * @param componentOrTemplateRef The type of component being loaded into the dialog,\n * or a TemplateRef to instantiate as the content.\n * @param dialogContainer Reference to the wrapping dialog container.\n * @param overlayRef Reference to the overlay in which the dialog resides.\n * @param config The dialog configuration.\n * @returns A promise resolving to the MatDialogRef that should be returned to the user.\n */\n private _attachDialogContent<T, R>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config: NativeDialogConfig,\n ): NativeDialogRef<T, R> {\n // Create a reference to the dialog we're creating in order to give the user a handle\n // to modify and close it.\n const nativeModalRef = new this._nativeModalType(config, this._injector, this.locationStrategy);\n const dialogRef = new this._dialogRefConstructor(nativeModalRef, config.id);\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n // const detachedFactory = options.resolver.resolveComponentFactory(DetachedLoader);\n // if(options.attachToContainerRef) {\n // detachedLoaderRef = options.attachToContainerRef.createComponent(detachedFactory, 0, childInjector, null);\n // } else {\n // detachedLoaderRef = detachedFactory.create(childInjector); // this DetachedLoader is **completely** detached\n // this.appRef.attachView(detachedLoaderRef.hostView); // we attach it to the applicationRef, so it becomes a \"root\" view in angular's hierarchy\n // }\n // detachedLoaderRef.changeDetectorRef.detectChanges(); // force a change detection\n // detachedLoaderRef.instance.createTemplatePortal(options.templateRef);\n nativeModalRef.attachTemplatePortal(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n new TemplatePortal<T>(componentOrTemplateRef, null!, <any>{ $implicit: config.data, dialogRef }),\n );\n } else {\n const injector = this._createInjector<T>(config, dialogRef);\n const contentRef = nativeModalRef.attachComponentPortal<T>(\n new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector),\n );\n dialogRef.componentInstance = contentRef.instance;\n }\n\n return dialogRef;\n }\n\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n * @param config Config object that is used to construct the dialog.\n * @param dialogRef Reference to the dialog.\n * @param dialogContainer Dialog container element that wraps all of the contents.\n * @returns The custom injector that can be used inside the dialog.\n */\n private _createInjector<T>(config: NativeDialogConfig, dialogRef: NativeDialogRef<T>): Injector {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n\n // The dialog container should be provided as the dialog container and the dialog's\n // content are created out of the same `ViewContainerRef` and as such, are siblings\n // for injector purposes. To allow the hierarchy that is expected, the dialog\n // container is explicitly provided in the injector.\n const providers: StaticProvider[] = [\n { provide: this._dialogDataToken, useValue: config.data },\n { provide: this._dialogRefConstructor, useValue: dialogRef },\n ];\n\n return Injector.create({ parent: userInjector || this._injector, providers });\n }\n\n /**\n * Removes a dialog from the array of open dialogs.\n * @param dialogRef Dialog to be removed.\n */\n private _removeOpenDialog(dialogRef: NativeDialogRef<any>) {\n const index = this.openDialogs.indexOf(dialogRef);\n\n if (index > -1) {\n this.openDialogs.splice(index, 1);\n this._openDialogMetadata.delete(dialogRef);\n\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this._getAfterAllClosed().next();\n }\n }\n }\n\n /** Closes all of the dialogs in an array. */\n private _closeDialogs(dialogs: NativeDialogRef<any>[]) {\n let i = dialogs.length;\n\n while (i--) {\n // The `_openDialogs` property isn't updated after close until the rxjs subscription\n // runs on the next microtask, in addition to modifying the array as we're going\n // through it. We loop through all of them and call close without assuming that\n // they'll be removed from the list instantaneously.\n dialogs[i].close();\n }\n }\n}\n\n/**\n * Applies default options to the dialog config.\n * @param config Config to be modified.\n * @param defaultOptions Default options provided.\n * @returns The new configuration object.\n */\nfunction _applyConfigDefaults(config?: NativeDialogConfig, defaultOptions?: NativeDialogConfig): NativeDialogConfig {\n return { ...defaultOptions, ...config };\n}\n\n/**\n * Register `NativeDialog` with the application's HMR eager-instantiate\n * registry so the post-bootstrap pipeline forces an `injector.get()` on\n * the service in the same JS task as the bootstrap event. Without this,\n * `NativeDialog` is only constructed when something in user-app code\n * injects it (typically a wrapper service that opens modals). When that\n * injection happens lazily — on first user-driven modal open — captured\n * dialogs from a prior HMR cycle wait until the user reopens *something*\n * before the new realm even sees the stash. Eager instantiation makes\n * the restore work happen as early as possible during a hot reload while\n * staying gated to dev mode + HMR-active environments.\n *\n * Registered after the class declaration so the closure references the\n * fully-defined class rather than tripping the temporal dead zone.\n *\n * Idempotent: the registry de-dupes function references, so multiple\n * evaluations of this module across HMR cycles never accumulate stale\n * registrations.\n */\nif (isAngularHmrEnabled()) {\n const added = registerHmrEagerInstantiator((injector: Injector) => {\n try {\n const inst = injector.get(NativeDialog, null);\n hmrDialogDiag(`eager-instantiator fired NativeDialog=${inst ? `instance#${(inst as unknown as { _diagInstanceId?: number })._diagInstanceId}` : 'null'}`);\n } catch (err) {\n hmrDialogDiag(`eager-instantiator threw: ${(err as Error)?.message ?? err}`);\n // Some user-app providers may not include `NativeDialog` (e.g. a\n // module that doesn't depend on the dialog feature). The registry\n // contract is \"best effort\": failing to find the token must be a\n // silent no-op so unrelated apps aren't penalized.\n }\n });\n hmrDialogDiag(`registerHmrEagerInstantiator added=${added} (false means already present in registry)`);\n}\n\nexport {\n /**\n * @deprecated Use `NativeDialog` instead.\n */\n NativeDialog as NativeDialogService,\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { Directive, ElementRef, HostListener, inject, Input, OnChanges, OnInit, Optional, SimpleChanges } from '@angular/core';\nimport { View, ViewBase } from '@nativescript/core';\nimport { NativeDialogRef } from './dialog-ref';\nimport { NativeDialog } from './dialog-services';\n\n/**\n * Button that will close the current dialog.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[native-dialog-close], [nativeDialogClose]',\n exportAs: 'nativeDialogClose',\n standalone: true,\n})\nexport class NativeDialogCloseDirective implements OnInit, OnChanges {\n /** Dialog close input. */\n @Input('native-dialog-close') dialogResult: any;\n\n @Input('nativeDialogClose') _matDialogClose: any;\n dialogRef = inject(NativeDialogRef<any>, { optional: true });\n _elementRef = inject(ElementRef<View>);\n _dialog = inject(NativeDialog);\n\n ngOnInit() {\n if (!this.dialogRef) {\n // When this directive is included in a dialog via TemplateRef (rather than being\n // in a Component), the DialogRef isn't available via injection because embedded\n // views cannot be given a custom injector. Instead, we look up the DialogRef by\n // ID. This must occur in `onInit`, as the ID binding for the dialog container won't\n // be resolved at constructor time.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs)!;\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n const proxiedChange = changes['_matDialogClose'] || changes['_matDialogCloseResult'];\n\n if (proxiedChange) {\n this.dialogResult = proxiedChange.currentValue;\n }\n }\n\n @HostListener('tap')\n _onButtonClick() {\n // Determinate the focus origin using the click event, because using the FocusMonitor will\n // result in incorrect origins. Most of the time, close buttons will be auto focused in the\n // dialog, and therefore clicking the button won't result in a focus change. This means that\n // the FocusMonitor won't detect any origin change, and will always output `program`.\n this.dialogRef.close(this.dialogResult);\n }\n}\n\n/**\n * Finds the closest MatDialogRef to an element by looking at the DOM.\n * @param element Element relative to which to look for a dialog.\n * @param openDialogs References to the currently-open dialogs.\n */\nfunction getClosestDialog(element: ElementRef<View>, openDialogs: NativeDialogRef<any>[]) {\n let view: ViewBase | null = element.nativeElement.parent;\n\n while (view && !Object.hasOwnProperty.call(view, '__ng_modal_id__')) {\n view = view.parent;\n }\n\n return view ? openDialogs.find((dialog) => dialog.id === view['__ng_modal_id__']) : null;\n}\n","import { NgModule } from '@angular/core';\nimport { NativeDialogCloseDirective } from './dialog-content-directives';\n\n/**\n * Convenience module that re-exports the `NativeDialogCloseDirective` for\n * template-driven `[nativeDialogClose]` usage.\n *\n * **Important**: `NativeDialog` itself is **not** listed in this module's\n * `providers` array. The service is `@Injectable({ providedIn: 'root' })`,\n * which already registers a single root-level instance and is fully\n * tree-shakeable. Listing it here as well caused Angular to treat the\n * module-level provider and the `providedIn: 'root'` factory as\n * *separate* registrations once the module was pulled into a standalone\n * app via `importProvidersFrom(NativeDialogModule, ...)`. The duplicate\n * registration triggered:\n *\n * - Two `NativeDialog` instances in the same root environment injector,\n * each subscribing to `postAngularBootstrap$`, which produced\n * duplicate restore attempts during HMR.\n * - `NG0200: Circular dependency detected for NativeDialog` while a\n * captured modal was being re-opened during HMR restore, because the\n * second resolution started while the first was still in progress.\n *\n * Removing the redundant entry collapses both providers back into a\n * single root-level instance, which is what `providedIn: 'root'`\n * documents. App authors who explicitly wire `NativeDialog` themselves\n * (e.g. in a feature module's `providers`) keep working unchanged\n * because they're targeting the same class symbol.\n */\n@NgModule({\n imports: [NativeDialogCloseDirective],\n exports: [NativeDialogCloseDirective],\n})\nexport class NativeDialogModule {}\n","import { Injectable } from '@angular/core';\nimport { knownFolders, Folder, File } from '@nativescript/core';\n\n// Allows greater flexibility with `file-system` and Angular\n// Also provides a way for `file-system` to be mocked for testing\n\n@Injectable()\nexport class NSFileSystem {\n public currentApp(): Folder {\n return knownFolders.currentApp();\n }\n\n public fileFromPath(path: string): File {\n return File.fromPath(path);\n }\n\n public fileExists(path: string): boolean {\n return File.exists(path);\n }\n}\n","import { ApplicationRef, ComponentFactoryResolver, ComponentRef, EmbeddedViewRef, Injector, TemplateRef, Type, ViewContainerRef } from '@angular/core';\nimport { ContentView } from '@nativescript/core';\nimport { DetachedLoader } from './cdk/detached-loader';\nimport { ComponentPortal, NativeScriptDomPortalOutlet, TemplatePortal } from './cdk/portal';\nimport { NgViewRef } from './view-refs';\n\n/**\n * creates a DetachedLoader either linked to the ViewContainerRef or the ApplicationRef if ViewContainerRef is not defined\n * @param resolver component factory resolver\n * @param injector default injector, unused if viewContainerRef is set\n * @param viewContainerRef where the view should live in the angular tree\n * @returns reference to the DetachedLoader\n */\nexport function generateDetachedLoader(resolver: ComponentFactoryResolver, injector: Injector, viewContainerRef?: ViewContainerRef) {\n injector = viewContainerRef?.injector || injector;\n const detachedFactory = resolver.resolveComponentFactory(DetachedLoader);\n const detachedLoaderRef = viewContainerRef?.createComponent(detachedFactory) || detachedFactory.create(injector);\n if (!viewContainerRef) {\n injector.get(ApplicationRef).attachView(detachedLoaderRef.hostView);\n }\n detachedLoaderRef.changeDetectorRef.detectChanges();\n return detachedLoaderRef;\n}\n\n/**\n * Generates a NgViewRef from a component or template. @see NgViewRef\n * Pass keepNativeViewAttached as `true` if you don't want the first native view to be detached from its parent.\n * For opening modals and others, the firstNativeLikeView should be detached.\n * @param typeOrTemplate ComponentType or TemplateRef that should be instanced\n * @param options options for creating the view\n * @returns NgViewRef\n */\nexport function generateNativeScriptView<T>(\n typeOrTemplate: Type<T> | TemplateRef<T>,\n options: {\n resolver?: ComponentFactoryResolver;\n viewContainerRef?: ViewContainerRef;\n injector: Injector;\n keepNativeViewAttached?: boolean;\n /**\n * reuse a detachedLoaderRef. This will override viewContainerRef\n */\n detachedLoaderRef?: ComponentRef<DetachedLoader>;\n }\n) {\n let detachedLoaderRef: ComponentRef<DetachedLoader> = options.detachedLoaderRef;\n const reusingDetachedLoader = !!detachedLoaderRef;\n if (reusingDetachedLoader) {\n options.viewContainerRef = detachedLoaderRef.instance.vc;\n }\n const injector = options.viewContainerRef?.injector || options.injector;\n const resolver = options.resolver || injector.get(ComponentFactoryResolver);\n if (!detachedLoaderRef && (options.viewContainerRef || typeOrTemplate instanceof TemplateRef)) {\n detachedLoaderRef = generateDetachedLoader(resolver, injector, options.viewContainerRef);\n }\n let portal: ComponentPortal<T> | TemplatePortal<T>;\n if (typeOrTemplate instanceof TemplateRef) {\n portal = new TemplatePortal(typeOrTemplate, detachedLoaderRef.instance.vc);\n } else {\n portal = new ComponentPortal(typeOrTemplate, detachedLoaderRef?.instance.vc);\n }\n const parentView = new ContentView();\n const portalOutlet = new NativeScriptDomPortalOutlet(parentView, resolver, injector.get(ApplicationRef), injector);\n const componentOrTemplateRef: ComponentRef<T> | EmbeddedViewRef<T> = portalOutlet.attach(portal);\n componentOrTemplateRef.onDestroy(() => {\n portalOutlet.dispose();\n });\n if (detachedLoaderRef && !reusingDetachedLoader) {\n componentOrTemplateRef.onDestroy(() => {\n detachedLoaderRef.destroy();\n });\n }\n const viewRef = new NgViewRef(componentOrTemplateRef);\n (viewRef as any).detachedLoaderRef = detachedLoaderRef;\n if (!options.keepNativeViewAttached) {\n viewRef.detachNativeLikeView();\n }\n return viewRef;\n}\n","/**\n * Framework-agnostic Hot-Module-Replacement state cache.\n *\n * The {@link HmrCacheStore} class is intentionally free of any Angular\n * imports so a future `@nativescript/solid` (or any other framework\n * binding) can lift this file as-is and wrap it with its own DI\n * primitive. The Angular DI wrapper lives in\n * `./hmr-cache.service.ts`.\n *\n * # What it does\n *\n * The NativeScript iOS runtime exposes a Vite-spec compliant\n * `import.meta.hot` on every imported module (see\n * `@nativescript/ios` →\n * `runtime/HMRSupport.{h,mm}::InitializeImportMetaHot`). The runtime\n * keeps a per-module persistent `data` object alive in C++ across V8\n * evaluation cycles and canonicalizes the module path so the same\n * bucket survives the URL variations Vite cycles through during a\n * save (HMR boot/live tags, versioned bridge paths, common script\n * extensions). When `@nativescript/vite`'s Angular HMR client calls\n * `globalThis.__nsRunHmrDispose()` before `__reboot_ng_modules__`,\n * every registered `dispose(cb)` fires and is handed the same `data`\n * object the next module evaluation will read from.\n *\n * `HmrCacheStore` rides on top of that primitive:\n *\n * 1. On construction, it copies any previously-stashed entries out\n * of `import.meta.hot.data['ns-hmr-cache']` (or whatever\n * `storageKey` the caller picked) into an in-memory `Map`.\n * 2. It registers a single `import.meta.hot.dispose` callback that\n * writes the in-memory `Map` back as a plain object before the\n * next reboot.\n * 3. Every `set` re-orders the key to the end of the `Map` (LRU);\n * when `size > maxEntries`, the oldest entry is evicted. This\n * stops a long dev session from accumulating unbounded state for\n * features the developer no longer touches.\n * 4. It subscribes to a custom HMR event (default\n * `'ns:cache-invalidate'`) so a Vite plugin or dev server can\n * push targeted cache evictions — e.g. \"the OData schema for\n * `/safety/forms` changed, drop anything that depends on it\".\n *\n * In production / `--no-hmr` builds `import.meta.hot` is `undefined`,\n * the store collapses to a pure in-memory cache that lives for the\n * lifetime of the process, and the public API is identical so callers\n * never need to special-case build modes.\n *\n * # Why a class and not a plain object\n *\n * Encapsulating the LRU bookkeeping behind named methods (`get`,\n * `set`, `invalidate`, `scope`) lets us evolve the eviction policy\n * (e.g. add TTLs, weighted entries, structured-clone enforcement)\n * without touching every call site. The framework wrappers expose\n * the same surface so app authors learn one API regardless of which\n * framework they use.\n */\n\nconst DEFAULT_MAX_ENTRIES = 256;\nconst DEFAULT_STORAGE_KEY = 'ns-hmr-cache';\nconst DEFAULT_INVALIDATE_EVENT = 'ns:cache-invalidate';\n\n/**\n * Minimal Vite-spec `import.meta.hot` shape — declared locally so the\n * package builds and types-checks without depending on `vite/client`\n * (which would be a phantom dep for webpack-only consumers and a\n * fragile assumption for contributors who don't have vite hoisted into\n * their `node_modules`). The full Vite spec is much larger; we only\n * type the methods we actually call.\n *\n * Compatible-by-construction with `vite/client`'s richer\n * `ViteHotContext` — apps that DO reference `vite/client` get the\n * superset and continue to work; we just don't require it.\n */\ninterface NsHotContext {\n readonly data: Record<string, unknown>;\n dispose: (cb: (data: Record<string, unknown>) => void) => void;\n on?: (event: string, cb: (payload: unknown) => void) => void;\n}\n\n/**\n * Read `import.meta.hot` defensively so the package compiles even\n * under TypeScript configs that don't extend an `ImportMeta` interface\n * with a `hot` field. The cast goes through `unknown` so the local\n * type is the only one in play; `vite/client`-aware apps still get\n * their own typing on `import.meta.hot` at every call site outside\n * this module.\n *\n * Webpack-CommonJS compatibility: every `import.meta` reference here\n * is a member expression (`import.meta['hot']`). Webpack statically\n * rewrites both dot- and bracket-style member access to `undefined`\n * in CommonJS output, so the emitted bundle never carries a literal\n * bare `import.meta` token. A bare `import.meta` would survive into\n * the bundle and crash V8 with \"Cannot use 'import.meta' outside a\n * module\" the moment the chunk is `require()`d. Vite leaves\n * `import.meta['hot']` intact and resolves it to the per-module hot\n * context, so the same code works in both pipelines.\n */\nfunction readImportMetaHot(): NsHotContext | undefined {\n try {\n return (import.meta as unknown as { hot?: NsHotContext })['hot'];\n } catch {\n return undefined;\n }\n}\n\nexport interface HmrCacheStoreOptions {\n /**\n * Maximum number of entries to keep before LRU-evicting the\n * oldest. Set to `0` (or any non-positive number) for unlimited.\n * Default: `256`.\n *\n * Sized for the empirical \"depth of features a developer touches in\n * one dev session\" — large enough that a working set of ~30 pages,\n * each with a handful of cached fields, never trips eviction during\n * normal hacking; small enough that a runaway producer (e.g. a\n * scroll-driven loop that mints new keys) gets capped instead of\n * leaking memory until the simulator OOMs.\n */\n maxEntries?: number;\n /**\n * Key under which the cache is stashed on `import.meta.hot.data`.\n * Apps that run multiple isolated cache stores (e.g. a feature-\n * isolation plugin) can pick distinct keys to keep their state\n * separate. Default: `'ns-hmr-cache'`.\n */\n storageKey?: string;\n /**\n * Custom HMR event name the store listens for. Payload schema:\n *\n * ```ts\n * { key?: string }\n * ```\n *\n * If `key` is provided, only that entry is dropped. If omitted, the\n * entire cache is cleared. A Vite plugin sends events via the dev\n * server's WebSocket (Vite spec\n * [`server.ws.send`](https://vite.dev/guide/api-plugin.html#server-ws-send-and-server-ws-on));\n * the runtime's `__NS_DISPATCH_HOT_EVENT__` then forwards them to\n * every `import.meta.hot.on` listener. Default:\n * `'ns:cache-invalidate'`.\n */\n invalidateEventName?: string;\n /**\n * Optional logger for diagnostic output. The store calls this with\n * a single string per significant event (rehydrate, dispose, LRU\n * evict, server-side invalidate). Default: no-op.\n */\n log?: (message: string) => void;\n}\n\n/**\n * A namespaced view of an {@link HmrCacheStore}. Keys are\n * automatically prefixed with `<scope>:`, so callers don't have to\n * negotiate global key names. Returned by {@link HmrCacheStore.scope}.\n */\nexport interface HmrCacheScope {\n readonly prefix: string;\n get<T>(key: string): T | undefined;\n set<T>(key: string, value: T): void;\n has(key: string): boolean;\n delete(key: string): void;\n /** Drop every entry whose key starts with this scope's prefix. */\n clear(): void;\n /** Number of entries owned by this scope. */\n size(): number;\n}\n\nexport class HmrCacheStore {\n private readonly _map: Map<string, unknown>;\n private readonly _maxEntries: number;\n private readonly _log: (message: string) => void;\n\n /**\n * @param initialEntries Entries to seed the store with (typically\n * the previous session's snapshot read from\n * `import.meta.hot.data`).\n * @param options See {@link HmrCacheStoreOptions}.\n */\n constructor(\n initialEntries: Iterable<[string, unknown]> = [],\n options: HmrCacheStoreOptions = {}\n ) {\n this._map = new Map(initialEntries);\n const requested = options.maxEntries;\n this._maxEntries =\n typeof requested === 'number' && requested > 0\n ? Math.floor(requested)\n : 0;\n this._log = options.log ?? (() => {});\n // Trim seed if it overshoots the configured ceiling — possible if\n // a previous session ran with a larger `maxEntries` than this one.\n this._enforceMaxEntries();\n }\n\n get<T>(key: string): T | undefined {\n if (!this._map.has(key)) {\n return undefined;\n }\n // LRU touch: re-insert so the entry moves to the end of the\n // insertion-order Map.\n const value = this._map.get(key);\n this._map.delete(key);\n this._map.set(key, value);\n return value as T;\n }\n\n set<T>(key: string, value: T): void {\n if (this._map.has(key)) {\n // Delete-then-set keeps insertion order monotonic.\n this._map.delete(key);\n }\n this._map.set(key, value);\n this._enforceMaxEntries();\n }\n\n has(key: string): boolean {\n return this._map.has(key);\n }\n\n delete(key: string): void {\n this._map.delete(key);\n }\n\n /**\n * Drop a specific entry, or every entry when `key` is omitted.\n * Equivalent to {@link delete} (with key) or {@link clear} (without)\n * — exposed as a single method so callers and event handlers can\n * forward an optional key without branching.\n */\n invalidate(key?: string): void {\n if (key === undefined || key === null) {\n this.clear();\n return;\n }\n this.delete(key);\n }\n\n /** Drop every cached entry. */\n clear(): void {\n this._map.clear();\n }\n\n /** Total number of cached entries across all scopes. */\n size(): number {\n return this._map.size;\n }\n\n /** Snapshot of every key currently in the cache. */\n keys(): string[] {\n return Array.from(this._map.keys());\n }\n\n /**\n * Returns a namespaced view of this store. All keys passed to the\n * returned object are auto-prefixed with `<prefix>:`. Useful so\n * each feature module can avoid stomping on neighbours' keys\n * without repeating the prefix at every call site.\n *\n * @example\n * ```ts\n * const cache = createDefaultHmrCacheStore();\n * const submissions = cache.scope('page-my-submissions');\n * submissions.set('items', [...]); // stored under 'page-my-submissions:items'\n * ```\n */\n scope(prefix: string): HmrCacheScope {\n if (!prefix) {\n throw new Error('[HmrCacheStore] scope() requires a non-empty prefix');\n }\n const fullPrefix = `${prefix}:`;\n const parent = this;\n return {\n prefix: fullPrefix,\n get<T>(key: string): T | undefined {\n return parent.get<T>(fullPrefix + key);\n },\n set<T>(key: string, value: T): void {\n parent.set<T>(fullPrefix + key, value);\n },\n has(key: string): boolean {\n return parent.has(fullPrefix + key);\n },\n delete(key: string): void {\n parent.delete(fullPrefix + key);\n },\n clear(): void {\n for (const k of parent.keys()) {\n if (k.startsWith(fullPrefix)) {\n parent.delete(k);\n }\n }\n },\n size(): number {\n let n = 0;\n for (const k of parent.keys()) {\n if (k.startsWith(fullPrefix)) {\n n++;\n }\n }\n return n;\n },\n };\n }\n\n /**\n * Serialize every entry into a plain object suitable for stashing\n * on `import.meta.hot.data`. Used by the dispose callback in\n * {@link createDefaultHmrCacheStore} and re-exported for callers\n * that want to integrate with another persistence layer (e.g. a\n * test harness that snapshots between cases).\n */\n toObject(): Record<string, unknown> {\n const out: Record<string, unknown> = {};\n for (const [k, v] of this._map.entries()) {\n out[k] = v;\n }\n return out;\n }\n\n private _enforceMaxEntries(): void {\n if (this._maxEntries <= 0) {\n return;\n }\n while (this._map.size > this._maxEntries) {\n const oldestKey = this._map.keys().next().value;\n if (oldestKey === undefined) {\n return;\n }\n this._map.delete(oldestKey);\n this._log(\n `[HmrCacheStore] evicted oldest key=\"${oldestKey}\" (size now ${this._map.size}/${this._maxEntries})`\n );\n }\n }\n}\n\n/**\n * Build an {@link HmrCacheStore} bound to the current module's\n * `import.meta.hot` context — i.e. the store's data survives HMR\n * reboots and listens for the `'ns:cache-invalidate'` custom event.\n *\n * Caller responsibility: invoke this from the module that \"owns\" the\n * cache. `import.meta` is per-module, so the dispose callback will be\n * registered against whichever module physically calls this function.\n * In `@nativescript/angular` the canonical owner is\n * `hmr-cache.service.ts`; in `@nativescript/solid` it would be the\n * equivalent solid-side module.\n *\n * Returns a freshly-constructed store. Callers should treat it as a\n * singleton — calling this twice from the same module yields two\n * independent stores, which is almost never what you want.\n */\nexport function createDefaultHmrCacheStore(\n options: HmrCacheStoreOptions = {}\n): HmrCacheStore {\n const storageKey = options.storageKey ?? DEFAULT_STORAGE_KEY;\n const invalidateEventName =\n options.invalidateEventName ?? DEFAULT_INVALIDATE_EVENT;\n const maxEntries = options.maxEntries ?? DEFAULT_MAX_ENTRIES;\n const log = options.log ?? (() => {});\n\n const hot = readImportMetaHot();\n\n // Read previous session's snapshot (if any) and seed the store.\n const previousSnapshot = ((hot?.data as Record<string, unknown> | undefined)\n ?.[storageKey] ?? {}) as Record<string, unknown>;\n const previousEntries = Object.entries(previousSnapshot);\n\n const store = new HmrCacheStore(previousEntries, {\n maxEntries,\n storageKey,\n invalidateEventName,\n log,\n });\n\n if (hot) {\n if (previousEntries.length) {\n log(\n `[HmrCacheStore] rehydrated ${previousEntries.length} entr${\n previousEntries.length === 1 ? 'y' : 'ies'\n } from previous HMR session (storageKey=\"${storageKey}\")`\n );\n }\n // Stash the live store back on dispose so the next reboot finds\n // exactly what's in memory right now.\n hot.dispose((data) => {\n const snapshot = store.toObject();\n (data as Record<string, unknown>)[storageKey] = snapshot;\n log(\n `[HmrCacheStore] dispose stashed ${Object.keys(snapshot).length} entr${\n Object.keys(snapshot).length === 1 ? 'y' : 'ies'\n } (storageKey=\"${storageKey}\")`\n );\n });\n // Listen for server-side invalidation events. Vite plugins push\n // these via `server.ws.send({ type: 'custom', event: 'ns:cache-invalidate', data: { key? } })`.\n // The HMR client forwards them to `import.meta.hot.on`. If the\n // runtime doesn't expose `on` (older `@nativescript/ios`), this\n // is a clean no-op.\n if (typeof hot.on === 'function') {\n hot.on(invalidateEventName, (payload: { key?: string } | undefined) => {\n const targetKey = payload?.key;\n store.invalidate(targetKey);\n log(\n targetKey\n ? `[HmrCacheStore] server-side invalidate dropped key=\"${targetKey}\"`\n : `[HmrCacheStore] server-side invalidate cleared all entries`\n );\n });\n }\n }\n\n return store;\n}\n","import { Injectable } from '@angular/core';\nimport {\n createDefaultHmrCacheStore,\n HmrCacheScope,\n HmrCacheStore,\n HmrCacheStoreOptions,\n} from './hmr-cache-store';\nimport { isAngularHmrEnabled } from './hmr-environment';\nimport { NativeScriptDebug } from './trace';\n\n/**\n * Skip the API call your component already paid for last save.\n *\n * Inject {@link HmrCacheService} from any Angular component or service\n * to read and write a per-app key/value cache that **survives the\n * `__reboot_ng_modules__` cycle** triggered by every HMR file save.\n * Backed by `@nativescript/ios`'s native `import.meta.hot.data`\n * (`runtime/HMRSupport.{h,mm}`) and drained via\n * `@nativescript/vite`'s `globalThis.__nsRunHmrDispose()` hook before\n * Angular tears down its realm, so the same value the previous\n * component instance produced is handed straight to the freshly-\n * instantiated one — no network round-trip, no spinner flash.\n *\n * In production / `--no-hmr` builds `import.meta.hot` is `undefined`\n * and the cache collapses to a plain in-memory object that lives for\n * the lifetime of the process. The public API is identical, so callers\n * never need to special-case build modes.\n *\n * @example Skip the initial fetch on save\n * ```ts\n * import { HmrCacheService } from '@nativescript/angular';\n *\n * @Component({...})\n * export class MyComponent implements OnInit {\n * private hmrCache = inject(HmrCacheService);\n *\n * ngOnInit() {\n * const cached = this.hmrCache.get<MyResult>('my-feature:items');\n * if (cached) {\n * this.applyResult(cached);\n * return;\n * }\n * this.api.load().subscribe((result) => {\n * this.hmrCache.set('my-feature:items', result);\n * this.applyResult(result);\n * });\n * }\n * }\n * ```\n *\n * @example Namespaced via {@link scope}\n * ```ts\n * private cache = inject(HmrCacheService).scope('page-my-submissions');\n * // …\n * this.cache.set('items', items); // → 'page-my-submissions:items'\n * this.cache.get('items'); // ← 'page-my-submissions:items'\n * ```\n *\n * @example Server-side invalidation from a Vite plugin\n * ```ts\n * // vite.config.ts\n * export default defineConfig({\n * plugins: [\n * {\n * name: 'my-schema-watcher',\n * configureServer(server) {\n * server.watcher.on('change', (path) => {\n * if (path.endsWith('schema.json')) {\n * server.ws.send({\n * type: 'custom',\n * event: 'ns:cache-invalidate',\n * data: { key: 'my-feature:items' },\n * });\n * }\n * });\n * },\n * },\n * ],\n * });\n * ```\n *\n * Memory ceiling: the cache LRU-evicts at 256 entries by default. Pass\n * a custom ceiling via {@link configureHmrCache} if your app churns\n * through more keys than that in a typical dev session, or set `0` for\n * unlimited (unbounded growth — only safe for short-lived dev work).\n *\n * @see HmrCacheStore — the framework-agnostic engine. Stable enough to\n * lift into `@nativescript/solid` / other framework bindings without\n * modification.\n */\n@Injectable({ providedIn: 'root' })\nexport class HmrCacheService {\n private readonly _store = getOrCreateSharedStore();\n\n /**\n * `true` when `import.meta.hot` is wired (i.e. NativeScript Vite HMR\n * is active and `@nativescript/ios` is recent enough to expose\n * `import.meta.hot.data`). `false` in production / `--no-hmr` /\n * legacy webpack builds.\n *\n * Most callers should NOT branch on this — the public API works\n * identically in both cases. Use it only when you want to opt OUT\n * of caching in production (e.g. always fetch fresh data when not\n * developing).\n */\n readonly isHmr: boolean = isAngularHmrEnabled() && hasImportMetaHot();\n\n get<T>(key: string): T | undefined {\n return this._store.get<T>(key);\n }\n\n set<T>(key: string, value: T): void {\n this._store.set<T>(key, value);\n }\n\n has(key: string): boolean {\n return this._store.has(key);\n }\n\n delete(key: string): void {\n this._store.delete(key);\n }\n\n /**\n * Drop a single entry, or every entry when `key` is omitted. Same\n * shape as the `'ns:cache-invalidate'` HMR-event payload the store\n * listens for, so application code can call this directly to mirror\n * a server-side eviction.\n */\n invalidate(key?: string): void {\n this._store.invalidate(key);\n }\n\n /** Drop every cached entry. Equivalent to `invalidate()` with no key. */\n clear(): void {\n this._store.clear();\n }\n\n /** Total number of entries across every scope. */\n size(): number {\n return this._store.size();\n }\n\n /** Snapshot of every key currently cached. Useful for debug overlays. */\n keys(): string[] {\n return this._store.keys();\n }\n\n /**\n * Returns a namespaced view of the cache. All `get` / `set` /\n * `has` / `delete` calls on the returned object are auto-prefixed\n * with `<scopeName>:`. Recommended over global keys so feature\n * modules don't accidentally collide.\n *\n * @example\n * ```ts\n * private cache = inject(HmrCacheService).scope('page-my-submissions');\n * // …\n * this.cache.set('items', items); // → 'page-my-submissions:items'\n * ```\n */\n scope(scopeName: string): HmrCacheScope {\n return this._store.scope(scopeName);\n }\n}\n\n/**\n * Override the default cache configuration. Must be called BEFORE the\n * first injection of {@link HmrCacheService} (i.e. before Angular\n * bootstrap, or as the very first statement in `main.ts`); otherwise\n * the call is a no-op because the singleton store has already been\n * built with the previous (or default) options.\n *\n * Typical use case: bumping `maxEntries` for a large multi-feature\n * monorepo dev session, or pointing a custom `invalidateEventName` at\n * a Vite plugin that prefixes its events with the project name.\n *\n * Returns `true` if the configuration was applied, `false` if the\n * store had already been instantiated by an earlier injection.\n */\nexport function configureHmrCache(options: HmrCacheStoreOptions): boolean {\n if (sharedStore !== null) {\n return false;\n }\n pendingOptions = options;\n return true;\n}\n\n/**\n * Read-only access to the underlying {@link HmrCacheStore}. Exposed\n * for advanced integrations that want to reuse the LRU + dispose +\n * server-side-invalidate plumbing without going through Angular's\n * dependency injection (e.g. a non-component utility that's loaded\n * before the Angular platform has bootstrapped). Application code\n * should prefer {@link HmrCacheService}.\n */\nexport function getHmrCacheStore(): HmrCacheStore {\n return getOrCreateSharedStore();\n}\n\nlet sharedStore: HmrCacheStore | null = null;\nlet pendingOptions: HmrCacheStoreOptions | null = null;\n\nfunction getOrCreateSharedStore(): HmrCacheStore {\n if (sharedStore !== null) {\n return sharedStore;\n }\n const options: HmrCacheStoreOptions = {\n log: (msg) => {\n // Keep cache diagnostics on the same channel as other HMR\n // helpers so devs can grep one trace category and see the full\n // picture during a save cycle. NativeScriptDebug.bootstrapLog\n // is the conventional sink for HMR-adjacent lifecycle logs.\n try {\n NativeScriptDebug.bootstrapLog(msg);\n } catch {\n // Defensive: never crash the cache if the trace channel is\n // unavailable (e.g. tests that import this file in isolation).\n }\n },\n ...pendingOptions,\n };\n sharedStore = createDefaultHmrCacheStore(options);\n pendingOptions = null;\n return sharedStore;\n}\n\nfunction hasImportMetaHot(): boolean {\n try {\n // Member-expression access only — webpack rewrites `import.meta['hot']`\n // to `undefined` in CommonJS bundles (so `!!undefined` → `false`),\n // while Vite leaves it as the per-module hot context. A bare\n // `typeof import.meta` would survive into the bundle and crash V8\n // with \"Cannot use 'import.meta' outside a module\" on `require()`.\n return !!(import.meta as unknown as { hot?: unknown })['hot'];\n } catch {\n return false;\n }\n}\n\n// Re-export the engine types so consumers don't have to dig into the\n// internal sub-path. Mirror this in the `public_api.ts` barrel.\nexport {\n createDefaultHmrCacheStore,\n HmrCacheScope,\n HmrCacheStore,\n HmrCacheStoreOptions,\n};\n","import { ControlValueAccessor } from '@angular/forms';\nimport { View, unsetValue } from '@nativescript/core';\n\nimport { isBlank } from '../../utils/lang-facade';\n\nexport class BaseValueAccessor<TView extends View> implements ControlValueAccessor {\n private pendingChangeNotification: any = 0;\n onChange: (change: any) => void = () => {\n //\n };\n onTouched = () => {\n //\n };\n\n constructor(public view: TView) {}\n\n registerOnChange(fn: (_: any) => void): void {\n this.onChange = (arg) => {\n if (this.pendingChangeNotification) {\n clearTimeout(this.pendingChangeNotification);\n }\n this.pendingChangeNotification = setTimeout(() => {\n this.pendingChangeNotification = 0;\n fn(arg);\n }, 20);\n };\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.view.isEnabled = !isDisabled;\n }\n\n writeValue(_: any) {\n //\n }\n\n protected normalizeValue(value: any): any {\n return isBlank(value) ? unsetValue : value;\n }\n}\n","import { Directive, ElementRef, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { View } from '@nativescript/core';\nimport { BaseValueAccessor } from './base-value-accessor';\n\nconst TEXT_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TextValueAccessor),\n multi: true,\n};\n\nexport type TextView = { text: string } & View;\n\n/**\n * The accessor for writing a text and listening to changes that is used by the\n * {@link NgModel} directives.\n *\n * ### Example\n * ```\n * <TextField [(ngModel)]=\"model.test\">\n * ```\n */\n@Directive({\n selector:\n 'TextField[ngModel],TextField[formControlName],TextField[formControl],' +\n 'textField[ngModel],textField[formControlName],textField[formControl],' +\n 'textfield[ngModel],textfield[formControlName],textfield[formControl],' +\n 'text-field[ngModel],text-field[formControlName],text-field[formControl],' +\n 'TextView[ngModel],TextView[formControlName],TextView[formControl],' +\n 'textView[ngModel],textView[formControlName],textView[formControl],' +\n 'textview[ngModel],textview[formControlName],textview[formControl],' +\n 'text-view[ngModel],text-view[formControlName],text-view[formControl],' +\n 'SearchBar[ngModel],SearchBar[formControlName],SearchBar[formControl],' +\n 'searchBar[ngModel],searchBar[formControlName],searchBar[formControl],' +\n 'searchbar[ngModel],searchbar[formControlName],searchbar[formControl],' +\n 'search-bar[ngModel], search-bar[formControlName],search-bar[formControl]',\n providers: [TEXT_VALUE_ACCESSOR],\n host: {\n '(blur)': 'onTouched()',\n '(textChange)': 'onChange($event.value)',\n },\n})\nexport class TextValueAccessor extends BaseValueAccessor<TextView> {\n // tslint:disable-line:directive-class-suffix\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n writeValue(value: any): void {\n const normalized = super.normalizeValue(value ? `${value}` : value);\n this.view.text = normalized;\n }\n}\n","import { Directive, ElementRef, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Switch } from '@nativescript/core';\nimport { BaseValueAccessor } from './base-value-accessor';\n\nconst CHECKED_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CheckedValueAccessor),\n multi: true,\n};\n\n/**\n * The accessor for setting a checked property and listening to changes that is used by the\n * {@link NgModel} directives.\n *\n * ### Example\n * ```\n * <Switch [(ngModel)]=\"model.test\">\n * ```\n */\n@Directive({\n selector: 'Switch[ngModel],Switch[formControlName],Switch[formControl],' + 'switch[ngModel],switch[formControlName],switch[formControl]',\n providers: [CHECKED_VALUE_ACCESSOR],\n host: {\n '(checkedChange)': 'onChange($event.value)',\n },\n})\nexport class CheckedValueAccessor extends BaseValueAccessor<Switch> {\n // tslint:disable-line:directive-class-suffix\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n writeValue(value: any): void {\n const normalized = super.normalizeValue(value);\n this.view.checked = normalized;\n }\n}\n","import { Directive, ElementRef, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { DatePicker } from '@nativescript/core';\nimport { BaseValueAccessor } from './base-value-accessor';\n\nconst DATE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DateValueAccessor),\n multi: true,\n};\n\n/**\n * The accessor for setting a date and listening to changes that is used by the\n * {@link NgModel} directives.\n *\n * ### Example\n * ```\n * <DatePicker [(ngModel)]=\"model.test\">\n * ```\n */\n@Directive({\n selector: 'DatePicker[ngModel],DatePicker[formControlName],DatePicker[formControl],' + 'datepicker[ngModel],datepicker[formControlName],datepicker[formControl],' + 'datePicker[ngModel],datePicker[formControlName],datePicker[formControl],' + 'date-picker[ngModel],date-picker[formControlName],date-picker[formControl]',\n providers: [DATE_VALUE_ACCESSOR],\n host: {\n '(dateChange)': 'onChange($event.value)',\n },\n})\nexport class DateValueAccessor extends BaseValueAccessor<DatePicker> {\n // tslint:disable-line:directive-class-suffix\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n writeValue(value: any): void {\n const normalized = super.normalizeValue(value);\n this.view.date = normalized;\n }\n}\n","import { Directive, ElementRef, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TimePicker } from '@nativescript/core';\nimport { BaseValueAccessor } from './base-value-accessor';\n\nconst TIME_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TimeValueAccessor),\n multi: true,\n};\n\n/**\n * The accessor for setting a time and listening to changes that is used by the\n * {@link NgModel} directives.\n *\n * ### Example\n * ```\n * <TimePicker [(ngModel)]=\"model.test\">\n * ```\n */\n@Directive({\n selector: 'TimePicker[ngModel],TimePicker[formControlName],TimePicker[formControl],' + 'timepicker[ngModel],timepicker[formControlName],timepicker[formControl],' + 'timePicker[ngModel],timePicker[formControlName],timePicker[formControl],' + 'time-picker[ngModel],time-picker[formControlName],time-picker[formControl]',\n providers: [TIME_VALUE_ACCESSOR],\n host: {\n '(timeChange)': 'onChange($event.value)',\n },\n})\nexport class TimeValueAccessor extends BaseValueAccessor<TimePicker> {\n // tslint:disable-line:directive-class-suffix\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n writeValue(value: any): void {\n const normalized = super.normalizeValue(value);\n this.view.time = normalized;\n }\n}\n","import { Directive, ElementRef, forwardRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Slider } from '@nativescript/core';\nimport { BaseValueAccessor } from './base-value-accessor';\n\nconst NUMBER_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NumberValueAccessor),\n multi: true,\n};\n\n/**\n * The accessor for setting a value and listening to changes that is used by the\n * {@link NgModel}\n *\n * ### Example\n * ```\n * <Slider [(ngModel)]=\"model.test\">\n * ```\n */\n@Directive({\n selector: 'Slider[ngModel],Slider[formControlName],Slider[formControl],' + 'slider[ngModel],slider[formControlName],slider[formControl]',\n providers: [NUMBER_VALUE_ACCESSOR],\n host: {\n '(valueChange)': 'onChange($event.value)',\n },\n})\nexport class NumberValueAccessor extends BaseValueAccessor<Slider> {\n // tslint:disable-line:directive-class-suffix\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n writeValue(value: any): void {\n const normalized = super.normalizeValue(value);\n this.view.value = normalized;\n }\n}\n","import { Directive, ElementRef, forwardRef, AfterViewInit } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { View } from '@nativescript/core';\nimport { BaseValueAccessor } from './base-value-accessor';\n\nconst SELECTED_INDEX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectedIndexValueAccessor),\n multi: true,\n};\n\nexport type SelectableView = { selectedIndex: number } & View;\n\n/**\n * The accessor for setting a selectedIndex and listening to changes that is used by the\n * {@link NgModel} directives.\n *\n * ### Example\n * ```\n * <SegmentedBar [(ngModel)]=\"model.test\">\n * ```\n */\n@Directive({\n selector:\n 'SegmentedBar[ngModel],SegmentedBar[formControlName],SegmentedBar[formControl],' +\n 'segmentedBar[ngModel],segmentedBar[formControlName],segmentedBar[formControl],' +\n 'segmentedbar[ngModel],segmentedbar[formControlName],segmentedbar[formControl],' +\n 'segmented-bar[ngModel],segmented-bar[formControlName],segmented-bar[formControl],' +\n 'ListPicker[ngModel],ListPicker[formControlName],ListPicker[formControl],' +\n 'listPicker[ngModel],listPicker[formControlName],listPicker[formControl],' +\n 'listpicker[ngModel],listpicker[formControlName],listpicker[formControl],' +\n 'list-picker[ngModel],list-picker[formControlName],list-picker[formControl],' +\n 'TabView[ngModel],TabView[formControlName],TabView[formControl],' +\n 'tabView[ngModel],tabView[formControlName],tabView[formControl],' +\n 'tabview[ngModel],tabview[formControlName],tabview[formControl],' +\n 'tab-view[ngModel],tab-view[formControlName],tab-view[formControl]',\n providers: [SELECTED_INDEX_VALUE_ACCESSOR],\n host: {\n '(selectedIndexChange)': 'onChange($event.value)',\n },\n})\nexport class SelectedIndexValueAccessor extends BaseValueAccessor<SelectableView> implements AfterViewInit {\n // tslint:disable-line:max-line-length directive-class-suffix\n constructor(elementRef: ElementRef) {\n super(elementRef.nativeElement);\n }\n\n private value: number;\n private viewInitialized: boolean;\n\n writeValue(value: any): void {\n const normalized = super.normalizeValue(value);\n this.value = normalized;\n\n if (this.viewInitialized) {\n this.view.selectedIndex = this.value;\n }\n }\n\n ngAfterViewInit() {\n this.viewInitialized = true;\n this.view.selectedIndex = this.value;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { TextValueAccessor, CheckedValueAccessor, DateValueAccessor, TimeValueAccessor, NumberValueAccessor, SelectedIndexValueAccessor } from './value-accessors';\n\nexport * from './value-accessors';\n\n@NgModule({\n providers: [],\n imports: [FormsModule, TextValueAccessor, CheckedValueAccessor, DateValueAccessor, TimeValueAccessor, SelectedIndexValueAccessor, NumberValueAccessor],\n exports: [FormsModule, TextValueAccessor, CheckedValueAccessor, DateValueAccessor, TimeValueAccessor, SelectedIndexValueAccessor, NumberValueAccessor],\n})\nexport class NativeScriptFormsModule {}\n","import { KeyframeAnimation, KeyframeAnimationInfo, KeyframeDeclaration, KeyframeInfo, parseKeyframeDeclarations, animationTimingFunctionConverter } from '@nativescript/core';\n\nexport type Keyframe = Map<string, string | number> & { offset: number };\n\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nexport function dashCaseToCamelCase(input: string): string {\n return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());\n}\n\nexport function createKeyframeAnimation(styles: Keyframe[], duration: number, delay: number, easing: string): KeyframeAnimation {\n const info = createKeyframeAnimationInfo(styles, duration, delay, easing);\n return KeyframeAnimation.keyframeAnimationFromInfo(info);\n}\n\nconst createKeyframeAnimationInfo = (styles: Keyframe[], duration: number, delay: number, easing: string): KeyframeAnimationInfo => ({\n isForwards: true,\n duration: duration || 0.01,\n delay,\n curve: getCurve(easing),\n keyframes: styles.map(parseAnimationKeyframe),\n});\n\nconst getCurve = (value: string) => animationTimingFunctionConverter(value);\n\nconst parseAnimationKeyframe = (styles: Keyframe): KeyframeInfo => ({\n duration: getKeyframeDuration(styles),\n declarations: getDeclarations(styles),\n});\n\nconst getKeyframeDuration = (styles: Keyframe): number => styles.offset;\n\nfunction getDeclarations(styles: Keyframe): KeyframeDeclaration[] {\n const keys = Array.from(styles.keys());\n const unparsedDeclarations: KeyframeDeclaration[] = keys.map((property) => ({ property, value: styles.get(property) }));\n\n return parseKeyframeDeclarations(unparsedDeclarations);\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-disable @typescript-eslint/no-unsafe-function-type */\nimport { AnimationPlayer } from '@angular/animations';\nimport { View, EventData, KeyframeAnimation } from '@nativescript/core';\n\nimport { Keyframe, createKeyframeAnimation } from './utils';\nimport { NgView } from '../views/view-types';\nimport { NativeScriptDebug } from '../trace';\n\nexport class NativeScriptAnimationPlayer implements AnimationPlayer {\n public parentPlayer: AnimationPlayer = null;\n\n private _startSubscriptions: Function[] = [];\n private _doneSubscriptions: Function[] = [];\n private _finished = false;\n private _started = false;\n private animation: KeyframeAnimation;\n\n constructor(\n private target: NgView,\n keyframes: Keyframe[],\n private duration: number,\n private delay: number,\n easing: string,\n ) {\n this.initKeyframeAnimation(keyframes, duration, delay, easing);\n }\n\n get totalTime(): number {\n return this.delay + this.duration;\n }\n\n init(): void {}\n\n hasStarted(): boolean {\n return this._started;\n }\n\n onStart(fn: Function): void {\n this._startSubscriptions.push(fn);\n }\n onDone(fn: Function): void {\n this._doneSubscriptions.push(fn);\n }\n onDestroy(fn: Function): void {\n this._doneSubscriptions.push(fn);\n }\n\n play(): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationPlayer.play`);\n }\n\n if (!this.animation) {\n return;\n }\n\n if (!this._started) {\n this._started = true;\n this._startSubscriptions.forEach((fn) => fn());\n this._startSubscriptions = [];\n }\n\n // When this issue https://github.com/NativeScript/NativeScript/issues/7984 is fixes in @nativescript/core\n // we can change this fix and apply the one that is recommended in that issue.\n if (this.target.isLoaded) {\n this.playAnimation();\n } else {\n this.target.on(View.loadedEvent, this.onTargetLoaded.bind(this));\n }\n }\n\n private onTargetLoaded(args: EventData) {\n this.target.off(View.loadedEvent, this.onTargetLoaded);\n this.playAnimation();\n }\n\n private playAnimation() {\n this.animation\n .play(this.target)\n .then(() => this.onFinish())\n .catch((_e) => {});\n }\n\n pause(): void {}\n\n finish(): void {\n this.onFinish();\n }\n\n reset(): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationPlayer.reset`);\n }\n\n if (this.animation && this.animation.isPlaying) {\n this.animation.cancel();\n }\n }\n\n restart(): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationPlayer.restart`);\n }\n\n this.reset();\n this.play();\n }\n\n destroy(): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationPlayer.destroy`);\n }\n this.onFinish();\n }\n\n setPosition(_p: any): void {\n throw new Error('AnimationPlayer.setPosition method is not supported!');\n }\n\n getPosition(): number {\n return 0;\n }\n\n private initKeyframeAnimation(keyframes: Keyframe[], duration: number, delay: number, easing: string) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationPlayer.initKeyframeAnimation`);\n }\n\n this.animation = createKeyframeAnimation(keyframes, duration, delay, easing);\n }\n\n private onFinish() {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationPlayer.onFinish`);\n }\n\n if (this._finished) {\n return;\n }\n\n this._finished = true;\n this._started = false;\n this._doneSubscriptions.forEach((fn) => fn());\n this._doneSubscriptions = [];\n }\n}\n","import { AnimationPlayer } from '@angular/animations';\nimport { AnimationDriver } from '@angular/animations/browser';\nimport { ProxyViewContainer, eachDescendant, CssAnimationProperty, CSSHelper } from '@nativescript/core';\n\nimport { NativeScriptAnimationPlayer } from './animation-player';\nimport { Keyframe, dashCaseToCamelCase } from './utils';\nimport { InvisibleNode } from '../views/invisible-nodes';\nimport { NgView } from '../views/view-types';\nimport { NativeScriptDebug } from '../trace';\n\ninterface ViewMatchResult {\n found: boolean;\n}\n\ninterface ViewMatchParams {\n originalView: NgView;\n}\n\ninterface QueryParams {\n selector: Selector;\n multi: boolean;\n}\n\ninterface QueryResult {\n matches: NgView[];\n}\n\nclass Selector {\n private nsSelectors: Array<any>;\n private classSelectors: string[];\n\n constructor(rawSelector: string) {\n this.parse(rawSelector);\n }\n\n match(element: NgView): boolean {\n return this.nsSelectorMatch(element) || this.classSelectorsMatch(element);\n }\n\n private parse(rawSelector: string) {\n const selectors = rawSelector.split(',').map((s) => s.trim());\n\n this.nsSelectors = selectors.map(CSSHelper.createSelector);\n this.classSelectors = selectors.filter((s) => s.startsWith('.')).map((s) => s.substring(1));\n }\n\n private nsSelectorMatch(element: NgView) {\n return this.nsSelectors.some((s) => s.match(element));\n }\n\n private classSelectorsMatch(element: NgView) {\n return this.classSelectors.some((s) => this.hasClass(element, s));\n }\n\n // we're using that instead of match for classes\n // that are dynamically added by the animation engine\n // such as .ng-trigger, that's added for every :enter view\n private hasClass(element: NgView, cls: string) {\n return element && element['$$classes'] && element['$$classes'][cls];\n }\n}\n\nexport class NativeScriptAnimationDriver implements AnimationDriver {\n private static validProperties = [...CssAnimationProperty._getPropertyNames(), 'transform'];\n\n getParentElement(element: NgView): NgView {\n return element?.parent as NgView;\n }\n\n validateStyleProperty(property: string): boolean {\n NativeScriptDebug.animationsLog(`CssAnimationProperty.validateStyleProperty: ${property}`);\n return NativeScriptAnimationDriver.validProperties.indexOf(property) !== -1;\n }\n\n matchesElement(element: NgView, rawSelector: string): boolean {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationDriver.matchesElement ` + `element: ${element}, selector: ${rawSelector}`);\n\n const selector = this.makeSelector(rawSelector);\n return selector.match(element);\n }\n\n containsElement(elm1: NgView, elm2: NgView): boolean {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationDriver.containsElement ` + `element1: ${elm1}, element2: ${elm2}`);\n\n // Checking if the parent is our fake body object\n if (elm1['isOverride']) {\n return true;\n }\n\n const params: ViewMatchParams = { originalView: elm2 };\n const result: ViewMatchResult = this.visitDescendants(elm1, viewMatches, params);\n\n return result.found;\n }\n\n query(element: NgView, rawSelector: string, multi: boolean): NgView[] {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationDriver.query ` + `element: ${element}, selector: ${rawSelector} ` + `multi: ${multi}`);\n\n const selector = this.makeSelector(rawSelector);\n const params: QueryParams = { selector, multi };\n const result: QueryResult = this.visitDescendants(element, queryDescendants, params);\n\n return result.matches || [];\n }\n\n computeStyle(element: NgView, prop: string): string {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationDriver.computeStyle ` + `element: ${element}, prop: ${prop}`);\n\n const camelCaseProp = dashCaseToCamelCase(prop);\n return element.style[camelCaseProp];\n }\n\n animate(element: NgView, keyframes: Keyframe[], duration: number, delay: number, easing: string): AnimationPlayer {\n NativeScriptDebug.animationsLog(`NativeScriptAnimationDriver.animate ` + `element: ${element}, keyframes: ${keyframes} ` + `duration: ${duration}, delay: ${delay} ` + `easing: ${easing}`);\n\n return new NativeScriptAnimationPlayer(element, keyframes, duration, delay, easing);\n }\n\n private makeSelector(rawSelector: string): Selector {\n return new Selector(rawSelector);\n }\n\n private visitDescendants(element: NgView, cb: (child: NgView, result: any, params: any) => boolean, cbParams: any): any {\n const result = {};\n // fill the result obj with the result from the callback function\n eachDescendant(element, (child: NgView) => cb(child, result, cbParams));\n\n return result;\n }\n}\n\nfunction viewMatches(element: NgView, result: ViewMatchResult, params: ViewMatchParams): boolean {\n if (element === params.originalView) {\n result.found = true;\n }\n\n return !result.found;\n}\n\nfunction queryDescendants(element: NgView, result: QueryResult, params: QueryParams): boolean {\n if (!result.matches) {\n result.matches = [];\n }\n\n const { selector, multi } = params;\n\n // skip comment and text nodes\n // because they are not actual Views\n // and cannot be animated\n if (element instanceof InvisibleNode || !selector.match(element)) {\n return true;\n }\n\n if (element instanceof ProxyViewContainer) {\n element.eachChild((child: NgView) => {\n result.matches.push(child);\n return true;\n });\n } else {\n result.matches.push(element);\n }\n\n return multi;\n}\n","import { NgModule, Injectable, Inject, NgZone, RendererFactory2, Optional, SkipSelf, ɵChangeDetectionScheduler as ChangeDetectionScheduler, inject } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { AnimationBuilder, ɵBrowserAnimationBuilder as BrowserAnimationBuilder } from '@angular/animations';\n\nimport { AnimationDriver, ɵAnimationRendererFactory as AnimationRendererFactory, ɵAnimationStyleNormalizer as AnimationStyleNormalizer, ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer, ɵAnimationEngine as AnimationEngine } from '@angular/animations/browser';\n\n// import { NativeScriptModule } from \"../nativescript.module\";\nimport { NativeScriptRendererFactory } from '../nativescript-renderer';\nimport { NativeScriptAnimationDriver } from './animation-driver';\nimport { throwIfAlreadyLoaded } from '../utils/general';\nimport { NativeScriptCommonModule } from '../nativescript-common.module';\n\n@Injectable()\nexport class InjectableAnimationEngine extends AnimationEngine {\n // eslint-disable-next-line @angular-eslint/prefer-inject\n constructor(@Inject(DOCUMENT) doc: any, driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {\n super(doc, driver, normalizer);\n }\n}\n\nexport function instantiateSupportedAnimationDriver() {\n return new NativeScriptAnimationDriver();\n}\n\nexport function instantiateRendererFactory(renderer: NativeScriptRendererFactory, engine: AnimationEngine, zone: NgZone) {\n return new AnimationRendererFactory(renderer, engine, zone);\n}\n\nexport function instantiateDefaultStyleNormalizer() {\n return new WebAnimationsStyleNormalizer();\n}\n\n@NgModule({\n imports: [NativeScriptCommonModule],\n providers: [\n {\n provide: AnimationDriver,\n useFactory: instantiateSupportedAnimationDriver,\n },\n { provide: AnimationBuilder, useClass: BrowserAnimationBuilder },\n {\n provide: AnimationStyleNormalizer,\n useFactory: instantiateDefaultStyleNormalizer,\n },\n { provide: AnimationEngine, useClass: InjectableAnimationEngine },\n {\n provide: RendererFactory2,\n useFactory: instantiateRendererFactory,\n deps: [NativeScriptRendererFactory, AnimationEngine, NgZone],\n },\n ],\n})\nexport class NativeScriptAnimationsModule {\n // eslint-disable-next-line @angular-eslint/prefer-inject\n constructor(@Optional() @SkipSelf() parentModule: NativeScriptAnimationsModule) {\n // Prevents NativeScriptAnimationsModule from getting imported multiple times\n throwIfAlreadyLoaded(parentModule, 'NativeScriptAnimationsModule');\n }\n}\n","import { path } from '@nativescript/core';\nimport { Observable, Observer } from 'rxjs';\nimport { NSFileSystem } from '../file-system/ns-file-system';\n\nexport type httpResponseFactory<T> = (url: string, body: any, status: number) => T;\nexport type httpErrorFactory = (url: string, body: any, status: number) => any;\n\nexport function isLocalRequest(url: string): boolean {\n return url.indexOf('~') === 0 || url.indexOf('/') === 0;\n}\n\nexport function getAbsolutePath(url: string, nsFileSystem: NSFileSystem): string {\n url = url.replace('~', '').replace('/', '');\n url = path.join(nsFileSystem.currentApp().path, url);\n return url;\n}\n\nexport function processLocalFileRequest<T>(url: string, nsFileSystem: NSFileSystem, successResponse: httpResponseFactory<T>, errorResponse: httpErrorFactory): Observable<T> {\n url = getAbsolutePath(url, nsFileSystem);\n\n // request from local app resources\n return new Observable((observer: Observer<T>) => {\n if (nsFileSystem.fileExists(url)) {\n const localFile = nsFileSystem.fileFromPath(url);\n localFile.readText().then(\n (data) => {\n try {\n const json = JSON.parse(data);\n observer.next(successResponse(url, json, 200));\n observer.complete();\n } catch (error) {\n // Even though the response status was 2xx, this is still an error.\n // The parse error contains the text of the body that failed to parse.\n const errorResult = { error, text: data };\n observer.error(errorResponse(url, errorResult, 200));\n }\n },\n (err: unknown) => {\n observer.error(errorResponse(url, err, 400));\n }\n );\n } else {\n observer.error(errorResponse(url, 'Not Found', 404));\n }\n });\n}\n","import { Injectable } from '@angular/core';\nimport { HttpRequest, HttpEvent, HttpResponse, HttpErrorResponse, HttpXhrBackend } from '@angular/common/http';\nimport { XhrFactory } from '@angular/common';\nimport { Observable } from 'rxjs';\n\nimport { NSFileSystem } from '../file-system/ns-file-system';\nimport { isLocalRequest, processLocalFileRequest } from './http-utils';\n\n@Injectable()\nexport class NsHttpBackEnd extends HttpXhrBackend {\n constructor(xhrFactory: XhrFactory, private nsFileSystem: NSFileSystem) {\n super(xhrFactory);\n }\n\n handle(req: HttpRequest<any>): Observable<HttpEvent<any>> {\n let result: Observable<HttpEvent<any>>;\n\n if (isLocalRequest(req.url)) {\n result = this.handleLocalFileRequest(req.url);\n } else {\n result = super.handle(req);\n }\n\n return result;\n }\n\n private handleLocalFileRequest(url: string): Observable<HttpEvent<any>> {\n return processLocalFileRequest(url, this.nsFileSystem, createSuccessResponse, createErrorResponse);\n }\n}\n\nfunction createSuccessResponse(url: string, body: any, status: number): HttpEvent<any> {\n return new HttpResponse({\n url,\n body,\n status,\n statusText: 'OK',\n });\n}\n\nfunction createErrorResponse(url: string, body: any, status: number): HttpErrorResponse {\n return new HttpErrorResponse({\n url,\n error: body,\n status,\n statusText: 'ERROR',\n });\n}\n","import {\n HttpBackend,\n HttpFeature,\n HttpFeatureKind,\n provideHttpClient,\n withInterceptorsFromDi,\n} from '@angular/common/http';\nimport { makeEnvironmentProviders, NgModule } from '@angular/core';\n\nimport { NSFileSystem } from '../file-system/ns-file-system';\nimport { NsHttpBackEnd } from './ns-http-backend';\n\nexport function provideNativeScriptHttpClient(...features: HttpFeature<HttpFeatureKind>[]) {\n return makeEnvironmentProviders([\n provideHttpClient(...features),\n NSFileSystem,\n NsHttpBackEnd,\n { provide: HttpBackend, useExisting: NsHttpBackEnd },\n ]);\n}\n@NgModule({\n providers: [provideNativeScriptHttpClient(withInterceptorsFromDi())],\n})\nexport class NativeScriptHttpClientModule {}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRoute, NavigationBehaviorOptions, NavigationExtras, Router, UrlTree } from '@angular/router';\nimport { NativeScriptDebug } from '../../trace';\nimport { FrameService } from '../frame.service';\nimport { NSLocationStrategy } from './ns-location-strategy';\nimport { NavigationOptions, Outlet } from './ns-location-utils';\nimport { findTopActivatedRouteNodeForOutlet } from './page-router-outlet-utils';\n\nexport type ExtendedNavigationExtras = NavigationExtras & NavigationOptions;\nexport type ExtendedNavigationBehaviorOptions = NavigationBehaviorOptions & NavigationOptions;\n\nexport interface BackNavigationOptions {\n outlets?: Array<string>;\n relativeTo?: ActivatedRoute | null;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RouterExtensions {\n constructor(public router: Router, public locationStrategy: NSLocationStrategy, public frameService: FrameService) {}\n\n public navigate(commands: any[], extras?: ExtendedNavigationExtras): Promise<boolean> {\n return this.router.navigate(commands, extras);\n }\n\n public navigateByUrl(url: string | UrlTree, options?: ExtendedNavigationBehaviorOptions): Promise<boolean> {\n return this.router.navigateByUrl(url, options);\n }\n\n public back(backNavigationOptions?: BackNavigationOptions) {\n if (backNavigationOptions) {\n this.backOutlets(backNavigationOptions);\n } else {\n this.locationStrategy.back();\n }\n }\n\n public canGoBack(backNavigationOptions?: BackNavigationOptions) {\n let canGoBack = true;\n if (backNavigationOptions) {\n const { outletsToBack, outlets } = this.findOutletsToBack(backNavigationOptions);\n\n if (outletsToBack.length !== outlets.length) {\n NativeScriptDebug.routerError('No outlet found relative to activated route');\n } else {\n outletsToBack.forEach((outletToBack) => {\n if (!this.locationStrategy.canGoBack(outletToBack)) {\n canGoBack = false;\n }\n });\n }\n } else {\n canGoBack = this.locationStrategy.canGoBack();\n }\n\n return canGoBack;\n }\n\n public backToPreviousPage() {\n this.frameService.getFrame().goBack();\n }\n\n public canGoBackToPreviousPage(): boolean {\n return this.frameService.getFrame().canGoBack();\n }\n\n private backOutlets(options: BackNavigationOptions) {\n const { outletsToBack, outlets } = this.findOutletsToBack(options);\n\n if (outletsToBack.length !== outlets.length) {\n NativeScriptDebug.routerError('No outlet found relative to activated route');\n } else {\n outletsToBack.forEach((outletToBack) => {\n if (outletToBack.isPageNavigationBack) {\n NativeScriptDebug.routerError('Attempted to call startGoBack while going back:');\n } else {\n this.locationStrategy.back(outletToBack);\n }\n });\n }\n }\n\n // tslint:disable-next-line:max-line-length\n private findOutletsToBack(options?: BackNavigationOptions): { outletsToBack: Array<Outlet>; outlets: Array<string> } {\n const rootRoute: ActivatedRoute = this.router.routerState.root;\n let outlets = options.outlets;\n let relativeRoute = options.relativeTo || rootRoute;\n\n const relativeRouteOutlet = this.findOutletByRoute(relativeRoute);\n const isNSEmptyOutlet = relativeRouteOutlet && relativeRouteOutlet.isNSEmptyOutlet;\n\n // Lazy named outlet has added 'primary' inner NSEmptyOutlet child.\n // Take parent route when `relativeTo` option points to the outer named outlet.\n if (isNSEmptyOutlet && relativeRoute.outlet !== 'primary') {\n relativeRoute = relativeRoute.parent || relativeRoute;\n }\n\n outlets = outlets || [relativeRoute.outlet];\n\n const outletsToBack = this.findOutletsRecursive([...outlets], relativeRoute);\n\n return { outletsToBack: outletsToBack, outlets: outlets };\n }\n\n // warning, outlets is mutable!\n private findOutletsRecursive(outlets: string[], route?: ActivatedRoute) {\n if (!route || outlets.length === 0) {\n return [];\n }\n const outletsToBack = [];\n if (outlets.some((currentOutlet) => currentOutlet === route.outlet)) {\n const outlet = this.findOutletByRoute(route);\n if (outlet) {\n outlets.splice(outlets.indexOf(route.outlet), 1);\n outletsToBack.push(outlet);\n }\n }\n if (!route.children) {\n return outletsToBack;\n }\n for (let index = 0; index < route.children.length; index++) {\n if (outlets.length === 0) {\n break;\n }\n const currentRoute = route.children[index];\n outletsToBack.push(...this.findOutletsRecursive(outlets, currentRoute));\n }\n return outletsToBack;\n }\n\n private findOutletByRoute(currentRoute: ActivatedRoute): Outlet {\n const currentRouteSnapshop = findTopActivatedRouteNodeForOutlet(currentRoute.snapshot);\n const outletKey = this.locationStrategy.getRouteFullPath(currentRouteSnapshop);\n const outlet = this.locationStrategy.findOutlet(outletKey, currentRouteSnapshop);\n\n return outlet;\n }\n}\n","import { Directive, Input, ElementRef, NgZone, AfterViewInit } from '@angular/core';\nimport { NavigationExtras } from '@angular/router';\nimport { ActivatedRoute, Router, UrlTree } from '@angular/router';\nimport { NavigationTransition } from '@nativescript/core';\nimport { NativeScriptDebug } from '../../trace';\nimport { RouterExtensions } from './router-extensions';\nimport { NavigationOptions } from './ns-location-utils';\n\n// Copied from \"@angular/router/src/config\"\nexport type QueryParamsHandling = 'merge' | 'preserve' | '';\n\n/**\n * The nsRouterLink directive lets you link to specific parts of your app.\n *\n * Consider the following route configuration:\n * ```\n * [{ path: \"/user\", component: UserCmp }]\n * ```\n *\n * When linking to this `User` route, you can write:\n *\n * ```\n * <a [nsRouterLink]=\"[\"/user\"]\">link to user component</a>\n * ```\n *\n * NSRouterLink expects the value to be an array of path segments, followed by the params\n * for that level of routing. For instance `[\"/team\", {teamId: 1}, \"user\", {userId: 2}]`\n * means that we want to generate a link to `/team;teamId=1/user;userId=2`.\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * If the segment begins with `/`, the router will look up the route from the root of the app.\n * If the segment begins with `./`, or doesn\"t begin with a slash, the router will\n * instead look in the current component\"s children for the route.\n * And if the segment begins with `../`, the router will go up one level.\n */\n@Directive({ \n selector: '[nsRouterLink]', \n standalone: true,\n})\nexport class NSRouterLink implements AfterViewInit {\n // tslint:disable-line:directive-class-suffix\n @Input() target: string;\n @Input() queryParams: { [k: string]: any };\n @Input() fragment: string;\n\n @Input() queryParamsHandling: QueryParamsHandling;\n @Input() preserveQueryParams: boolean;\n @Input() preserveFragment: boolean;\n @Input() skipLocationChange: boolean;\n @Input() replaceUrl: boolean;\n\n @Input() clearHistory: boolean;\n @Input() pageTransition: boolean | string | NavigationTransition = true;\n @Input() pageTransitionDuration;\n\n private commands: any[] = [];\n\n constructor(private ngZone: NgZone, private router: Router, private navigator: RouterExtensions, private route: ActivatedRoute, private el: ElementRef) {}\n\n ngAfterViewInit() {\n this.el.nativeElement.on('tap', () => {\n this.ngZone.run(() => {\n this.onTap();\n });\n });\n }\n\n @Input('nsRouterLink')\n set params(data: any[] | string) {\n if (Array.isArray(data)) {\n this.commands = data;\n } else {\n this.commands = [data];\n }\n }\n\n onTap() {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`nsRouterLink.tapped: ${this.commands} ` + `clear: ${this.clearHistory} ` + `transition: ${JSON.stringify(this.pageTransition)} ` + `duration: ${this.pageTransitionDuration}`);\n }\n\n const extras = this.getExtras();\n // this.navigator.navigateByUrl(this.urlTree, extras);\n this.navigator.navigate(this.commands, {\n ...extras,\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n }\n\n private getExtras(): NavigationExtras & NavigationOptions {\n const transition = this.getTransition();\n return {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n\n clearHistory: this.convertClearHistory(this.clearHistory),\n animated: transition.animated,\n transition: transition.transition,\n };\n }\n\n get urlTree(): UrlTree {\n const urlTree = this.router.createUrlTree(this.commands, {\n relativeTo: this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: attrBoolValue(this.preserveFragment),\n });\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`nsRouterLink urlTree created: ${urlTree}`);\n }\n\n return urlTree;\n }\n\n private convertClearHistory(value: boolean | string): boolean {\n return value === true || value === 'true';\n }\n\n private getTransition(): { animated: boolean; transition?: NavigationTransition } {\n let transition: NavigationTransition;\n let animated: boolean;\n\n if (typeof this.pageTransition === 'boolean') {\n animated = this.pageTransition;\n } else if (typeof this.pageTransition === 'string') {\n if (this.pageTransition === 'none' || this.pageTransition === 'false') {\n animated = false;\n } else {\n animated = true;\n transition = {\n name: <string>this.pageTransition,\n };\n }\n } else {\n animated = true;\n transition = <NavigationTransition>this.pageTransition;\n }\n\n const duration = +this.pageTransitionDuration;\n if (!isNaN(duration)) {\n transition = transition || {};\n transition.duration = duration;\n }\n\n return { animated, transition };\n }\n}\n\nfunction attrBoolValue(s: any): boolean {\n return s === '' || !!s;\n}\n","/* tslint:disable:forin */\n// Copied unexported functions from @angular/router/src/url_tree\nimport { UrlTree, UrlSegment, PRIMARY_OUTLET } from '@angular/router';\n// UrlSegmentGroup not exported, just use any.\ntype UrlSegmentGroup = any;\n\nexport function containsTree(container: UrlTree, containee: UrlTree, exact: boolean): boolean {\n if (exact) {\n return equalSegmentGroups(container.root, containee.root);\n } else {\n return containsSegmentGroup(container.root, containee.root);\n }\n}\n\nfunction equalSegmentGroups(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n if (!equalPath(container.segments, containee.segments)) {\n return false;\n }\n if (container.numberOfChildren !== containee.numberOfChildren) {\n return false;\n }\n for (const c in containee.children) {\n if (!container.children[c]) {\n return false;\n }\n if (!equalSegmentGroups(container.children[c], containee.children[c])) {\n return false;\n }\n }\n return true;\n}\n\nfunction containsSegmentGroup(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n return containsSegmentGroupHelper(container, containee, containee.segments);\n}\n\nfunction containsSegmentGroupHelper(container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[]): boolean {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths)) {\n return false;\n }\n if (containee.hasChildren()) {\n return false;\n }\n return true;\n } else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths)) {\n return false;\n }\n for (const c in containee.children) {\n if (!container.children[c]) {\n return false;\n }\n if (!containsSegmentGroup(container.children[c], containee.children[c])) {\n return false;\n }\n }\n return true;\n } else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current)) {\n return false;\n }\n if (!container.children[PRIMARY_OUTLET]) {\n return false;\n }\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n }\n}\n\nexport function equalPath(a: UrlSegment[], b: UrlSegment[]): boolean {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; ++i) {\n if (a[i].path !== b[i].path) {\n return false;\n }\n }\n return true;\n}\n","import { AfterContentInit, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, QueryList, Renderer2 } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { NavigationEnd, Router, UrlTree } from '@angular/router';\nimport { containsTree } from './private-imports/router-url-tree';\n\nimport { NSRouterLink } from './ns-router-link';\n\n/**\n * The NSRouterLinkActive directive lets you add a CSS class to an element when the link\"s route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * <a [nsRouterLink]=\"/user/bob\" [nsRouterLinkActive]=\"active-link\">Bob</a>\n * ```\n *\n * When the url is either \"/user\" or \"/user/bob\", the active-link class will\n * be added to the component. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\n *\n * ```\n * <a [nsRouterLink]=\"/user/bob\" [nsRouterLinkActive]=\"class1 class2\">Bob</a>\n * <a [nsRouterLink]=\"/user/bob\" [nsRouterLinkActive]=\"[\"class1\", \"class2\"]\">Bob</a>\n * ```\n *\n * You can configure NSRouterLinkActive by passing `exact: true`. This will add the\n * classes only when the url matches the link exactly.\n *\n * ```\n * <a [nsRouterLink]=\"/user/bob\" [nsRouterLinkActive]=\"active-link\"\n * [nsRouterLinkActiveOptions]=\"{exact: true}\">Bob</a>\n * ```\n *\n * Finally, you can apply the NSRouterLinkActive directive to an ancestor of a RouterLink.\n *\n * ```\n * <div [nsRouterLinkActive]=\"active-link\" [nsRouterLinkActiveOptions]=\"{exact: true}\">\n * <a [nsRouterLink]=\"/user/jim\">Jim</a>\n * <a [nsRouterLink]=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * This will set the active-link class on the div tag if the url is either \"/user/jim\" or\n * \"/user/bob\".\n *\n * @stable\n */\n@Directive({\n selector: '[nsRouterLinkActive]',\n exportAs: 'routerLinkActive',\n standalone: true,\n})\nexport class NSRouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n // tslint:disable-line:max-line-length directive-class-suffix\n @ContentChildren(NSRouterLink) links: QueryList<NSRouterLink>;\n\n private classes: string[] = [];\n private subscription: Subscription;\n private active = false;\n\n @Input() nsRouterLinkActiveOptions: { exact: boolean } = { exact: false };\n\n constructor(private router: Router, private element: ElementRef, private renderer: Renderer2) {\n this.subscription = router.events.subscribe((s) => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n\n get isActive(): boolean {\n return this.active;\n }\n\n ngAfterContentInit(): void {\n this.links.changes.subscribe(() => this.update());\n this.update();\n }\n\n @Input()\n set nsRouterLinkActive(data: string[] | string) {\n if (Array.isArray(data)) {\n this.classes = <any>data;\n } else {\n this.classes = data.split(' ');\n }\n }\n\n ngOnChanges() {\n this.update();\n }\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n private update(): void {\n if (!this.links) {\n return;\n }\n const hasActiveLinks = this.hasActiveLinks();\n // react only when status has changed to prevent unnecessary dom updates\n if (this.active !== hasActiveLinks) {\n const currentUrlTree = this.router.parseUrl(this.router.url);\n const isActiveLinks = this.reduceList(currentUrlTree, this.links);\n this.classes.forEach((c) => {\n if (isActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n } else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n }\n Promise.resolve(hasActiveLinks).then((active) => (this.active = active));\n }\n\n private reduceList(currentUrlTree: UrlTree, q: QueryList<any>): boolean {\n return q.reduce((res: boolean, link: NSRouterLink) => {\n return res || containsTree(currentUrlTree, link.urlTree, this.nsRouterLinkActiveOptions.exact);\n }, false);\n }\n\n private isLinkActive(router: Router): (link: NSRouterLink) => boolean {\n return (link: NSRouterLink) => router.isActive(link.urlTree, this.nsRouterLinkActiveOptions.exact);\n }\n\n private hasActiveLinks(): boolean {\n return this.links.some(this.isLinkActive(this.router));\n }\n}\n","import {\n ChangeDetectorRef,\n ComponentFactory,\n ComponentFactoryResolver,\n ComponentRef,\n createComponent,\n Directive,\n ElementRef,\n EnvironmentInjector,\n EventEmitter,\n HostAttributeToken,\n inject,\n InjectionToken,\n InjectOptions,\n Injector,\n NgZone,\n OnDestroy,\n Output,\n Type,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n ActivatedRoute,\n ActivatedRouteSnapshot,\n ChildrenOutletContexts,\n Data,\n PRIMARY_OUTLET,\n Router,\n RouterOutletContract,\n} from '@angular/router';\n\nimport { Frame, NavigatedData, NavigationEntry, Page, profile } from '@nativescript/core';\n\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DetachedLoader } from '../../cdk/detached-loader';\nimport { PageService } from '../../cdk/frame-page/page.service';\nimport { registerElement } from '../../element-registry';\nimport { PAGE_FACTORY, PageFactory } from '../../tokens';\nimport { NativeScriptDebug } from '../../trace';\nimport { ViewUtil } from '../../view-util';\nimport { NSLocationStrategy } from './ns-location-strategy';\nimport { defaultNavOptions, Outlet } from './ns-location-utils';\nimport { NSRouteReuseStrategy } from './ns-route-reuse-strategy';\nimport {\n destroyComponentRef,\n findTopActivatedRouteNodeForOutlet,\n loaderRefSymbol,\n pageRouterActivatedSymbol,\n} from './page-router-outlet-utils';\nimport { ExtendedNavigationExtras } from './router-extensions';\n\nfunction zoneWrap<T extends (...args: unknown[]) => unknown>(fn: T): T {\n return typeof Zone === 'undefined' ? fn : Zone.current.wrap(fn, 'angular');\n}\n\nexport class PageRoute {\n activatedRoute: BehaviorSubject<ActivatedRoute>;\n\n constructor(startRoute: ActivatedRoute) {\n this.activatedRoute = new BehaviorSubject(startRoute);\n }\n}\n\nfunction isComponentFactoryResolver(item: any): item is ComponentFactoryResolver {\n return !!item.resolveComponentFactory;\n}\n\nfunction callableOnce<T>(fn: (...args: T[]) => void) {\n let called = false;\n return (...args: T[]) => {\n if (called) {\n return;\n }\n called = true;\n return fn(...args);\n };\n}\n\nexport class DestructibleInjector implements Injector {\n private refs = new Set<any>();\n constructor(\n private destructibleProviders: ProviderSet,\n private parent: Injector,\n ) {}\n get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectOptions): T {\n const ref = this.parent.get(token, notFoundValue, flags);\n\n // if we're skipping ourselves then it's not our responsibility to destroy\n if (!flags?.skipSelf && this.destructibleProviders.has(token)) {\n this.refs.add(ref);\n }\n\n return ref;\n }\n destroy() {\n this.refs.forEach((ref) => {\n if (ref.ngOnDestroy instanceof Function) {\n ref.ngOnDestroy();\n }\n });\n this.refs.clear();\n }\n}\n\ntype ProviderSet = Set<Type<any> | InjectionToken<any>>;\n\nconst routeToString = function (activatedRoute: ActivatedRoute | ActivatedRouteSnapshot): string {\n return activatedRoute.pathFromRoot.join('->');\n};\n\nregisterElement('page-router-outlet', () => Frame);\n// eslint-disable-next-line @angular-eslint/directive-selector\n@Directive({\n selector: 'page-router-outlet',\n standalone: true,\n}) // tslint:disable-line:directive-selector\nexport class PageRouterOutlet implements OnDestroy, RouterOutletContract {\n private parentContexts = inject(ChildrenOutletContexts);\n private location = inject(ViewContainerRef);\n private locationStrategy = inject(NSLocationStrategy);\n private resolver = inject(ComponentFactoryResolver);\n private changeDetector = inject(ChangeDetectorRef);\n private pageFactory = inject<PageFactory>(PAGE_FACTORY);\n private routeReuseStrategy = inject(NSRouteReuseStrategy);\n private ngZone = inject(NgZone);\n private router = inject(Router);\n private environmentInjector = inject(EnvironmentInjector);\n\n // tslint:disable-line:directive-class-suffix\n private activated: ComponentRef<any> | null = null;\n private _activatedRoute: ActivatedRoute | null = null;\n private detachedLoaderFactory: ComponentFactory<DetachedLoader>;\n\n private outlet: Outlet;\n private name: string;\n private isEmptyOutlet: boolean;\n private viewUtil: ViewUtil;\n private frame: Frame;\n // this function is used to clear the outlet cache (clear history)\n // usually it's cleared in `navigatedTo`, but on quick navigation, the event will be fired after angular already added more things to the cache\n // so now we call this if the component is detached or deactivated (meaning it's mid-navigation, before cache manipulation)\n private postNavFunction: () => void;\n\n attachEvents: EventEmitter<unknown> = new EventEmitter();\n detachEvents: EventEmitter<unknown> = new EventEmitter();\n\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('activate') activateEvents = new EventEmitter<any>(); // tslint:disable-line:no-output-rename\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('deactivate') deactivateEvents = new EventEmitter<any>(); // tslint:disable-line:no-output-rename\n\n get isActivated(): boolean {\n return !!this.activated;\n }\n\n get component(): unknown {\n if (!this.activated) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('Outlet is not activated');\n }\n return;\n }\n\n return this.activated.instance;\n }\n get activatedRoute(): ActivatedRoute {\n if (!this.activated) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('Outlet is not activated');\n }\n return;\n }\n\n return this._activatedRoute;\n }\n\n get activatedRouteData(): Data {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n\n constructor() {\n const parentContexts = this.parentContexts;\n const name = inject(new HostAttributeToken('name'), { optional: true });\n const actionBarVisibility = inject(new HostAttributeToken('actionBarVisibility'), { optional: true });\n const isEmptyOutlet = !!inject(new HostAttributeToken('isEmptyOutlet'), { optional: true });\n const resolver = this.resolver;\n const elRef = inject(ElementRef);\n const viewUtil = inject(ViewUtil);\n\n this.isEmptyOutlet = isEmptyOutlet;\n this.frame = elRef.nativeElement;\n this.setActionBarVisibility(actionBarVisibility);\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`PageRouterOutlet.constructor frame: ${this.frame}`);\n }\n\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, <any>this);\n\n this.viewUtil = viewUtil;\n this.detachedLoaderFactory = resolver.resolveComponentFactory(DetachedLoader);\n }\n\n setActionBarVisibility(actionBarVisibility: string): void {\n switch (actionBarVisibility) {\n case 'always':\n case 'never':\n this.frame.actionBarVisibility = actionBarVisibility;\n return;\n\n default:\n this.frame.actionBarVisibility = 'auto';\n }\n }\n\n ngOnDestroy(): void {\n // In the event that the `parentContexts` has changed the outlet\n // via the creation of another outlet, the `onChildOutletDestroyed`\n // will be skipped\n if (this.parentContexts.getContext(this.name)?.outlet === <any>this) {\n // Clear accumulated modal view page cache when page-router-outlet\n // destroyed on modal view closing\n this.parentContexts.onChildOutletDestroyed(this.name);\n }\n\n if (this.outlet) {\n this.outlet.outletKeys.forEach((key) => {\n this.routeReuseStrategy.clearModalCache(key);\n });\n this.locationStrategy.clearOutlet(this.frame);\n } else {\n NativeScriptDebug.routerLog('PageRouterOutlet.ngOnDestroy: no outlet available for page-router-outlet');\n }\n\n if (this.isActivated) {\n const c = this.activated.instance;\n this.activated.hostView.detach();\n destroyComponentRef(this.activated);\n\n this.deactivateEvents.emit(c);\n this.activated = null;\n }\n }\n\n deactivate(): void {\n if (!this.outlet || !this.outlet.isPageNavigationBack) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(\n 'Currently not in page back navigation - component should be detached instead of deactivated.',\n );\n }\n return;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('PageRouterOutlet.deactivate() while going back - should destroy');\n }\n\n if (!this.isActivated) {\n return;\n }\n this.postNavFunction?.();\n\n const c = this.activated.instance;\n destroyComponentRef(this.activated);\n\n this.activated = null;\n this._activatedRoute = null;\n\n this.deactivateEvents.emit(c);\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach(): ComponentRef<any> {\n if (!this.isActivated) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('Outlet is not activated');\n }\n return;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`PageRouterOutlet.detach() - ${routeToString(this._activatedRoute)}`);\n }\n\n this.postNavFunction?.();\n\n // Detach from ChangeDetection\n this.activated.hostView.detach();\n\n const component = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n this.detachEvents.emit(component.instance);\n return component;\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`PageRouterOutlet.attach() - ${routeToString(activatedRoute)}`);\n }\n\n this.activated = ref;\n\n // reattach to ChangeDetection\n this.activated.hostView.markForCheck();\n this.activated.hostView.reattach();\n this._activatedRoute = activatedRoute;\n this.markActivatedRoute(activatedRoute);\n\n // we have a child with the same name, so we don't finish the back nav\n if (this.isFinalPageRouterOutlet()) {\n this.locationStrategy._finishBackPageNavigation(this.frame);\n }\n this.attachEvents.emit(ref.instance);\n }\n\n private isFinalPageRouterOutlet() {\n let children = this.parentContexts.getContext(this.name)?.children;\n while (children) {\n const childContext = children.getContext(this.name);\n if (!childContext || !childContext.outlet) {\n return true;\n }\n if (childContext.outlet instanceof PageRouterOutlet) {\n return false;\n }\n children = childContext.children;\n }\n return true;\n }\n\n /**\n * Called by the Router to instantiate a new component during the commit phase of a navigation.\n * This method in turn is responsible for calling the `routerOnActivate` hook of its child.\n */\n @profile\n activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver | EnvironmentInjector | null): void {\n this.outlet = this.outlet || this.getOutlet(activatedRoute.snapshot);\n if (!this.outlet) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerError('No outlet found relative to activated route');\n }\n return;\n }\n\n this.outlet.isNSEmptyOutlet = this.isEmptyOutlet;\n this.locationStrategy.updateOutletFrame(this.outlet, this.frame, this.isEmptyOutlet);\n\n if (this.outlet && this.outlet.isPageNavigationBack) {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(\n 'Currently in page back navigation - component should be reattached instead of activated.',\n );\n }\n if (this.isFinalPageRouterOutlet()) {\n this.locationStrategy._finishBackPageNavigation(this.frame);\n }\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(`PageRouterOutlet.activateWith() - ${routeToString(activatedRoute)}`);\n }\n\n this._activatedRoute = activatedRoute;\n\n this.markActivatedRoute(activatedRoute);\n\n this.activateOnGoForward(activatedRoute, resolver || this.environmentInjector);\n this.activateEvents.emit(this.activated.instance);\n }\n\n private activateOnGoForward(\n activatedRoute: ActivatedRoute,\n resolverOrInjector: ComponentFactoryResolver | EnvironmentInjector,\n ): void {\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog(\n 'PageRouterOutlet.activate() forward navigation - ' + 'create detached loader in the loader container',\n );\n }\n\n const component = this.getComponentType(activatedRoute);\n const page = this.pageFactory({\n isNavigation: true,\n componentType: component,\n });\n const location = this.location;\n\n const destructibles = new Set([PageService]);\n const parentInjector = Injector.create({\n providers: [\n { provide: Page, useValue: page },\n { provide: Frame, useValue: this.frame },\n { provide: PageRoute, useValue: new PageRoute(activatedRoute) },\n { provide: ActivatedRoute, useValue: activatedRoute },\n { provide: ChildrenOutletContexts, useValue: this.parentContexts.getOrCreateContext(this.name).children },\n { provide: PageService, useClass: PageService },\n ],\n parent: location.injector,\n });\n\n const injector = new DestructibleInjector(destructibles, parentInjector);\n let loaderRef: ComponentRef<DetachedLoader>;\n if (isComponentFactoryResolver(resolverOrInjector)) {\n loaderRef = createComponent(DetachedLoader, {\n environmentInjector: this.environmentInjector,\n elementInjector: injector,\n });\n } else {\n const environmentInjector = resolverOrInjector;\n loaderRef = location.createComponent(DetachedLoader, { index: location.length, injector, environmentInjector });\n }\n loaderRef.onDestroy(() => injector.destroy());\n this.changeDetector.markForCheck();\n\n this.activated = loaderRef.instance.loadComponentInLocation(component);\n this.activated.changeDetectorRef.detectChanges();\n this.loadComponentInPage(page, this.activated, { activatedRoute });\n\n this.activated[loaderRefSymbol] = loaderRef;\n }\n\n @profile\n private loadComponentInPage(page: Page, componentRef: ComponentRef<any>, navigationContext): void {\n // Component loaded. Find its root native view.\n const componentView = componentRef.location.nativeElement;\n // Remove it from original native parent.\n this.viewUtil.removeChild(componentView.parent, componentView);\n // Add it to the new page\n this.viewUtil.appendChild(page, componentView);\n\n let topActivatedRoute = findTopActivatedRouteNodeForOutlet(this._activatedRoute.snapshot);\n let outletKey = this.locationStrategy.getRouteFullPath(topActivatedRoute);\n const thisRouteKey = outletKey;\n while (!this.locationStrategy.findOutlet(outletKey)) {\n topActivatedRoute = topActivatedRoute.parent;\n if (!topActivatedRoute) {\n NativeScriptDebug.routerError('Could not find outlet for route: ' + thisRouteKey);\n break;\n }\n outletKey = this.locationStrategy.getRouteFullPath(topActivatedRoute);\n }\n const navigatedFromCallback = zoneWrap((args: NavigatedData) => {\n if (args.isBackNavigation) {\n this.locationStrategy._beginBackPageNavigation(this.frame, outletKey);\n this.locationStrategy.back(null, this.frame);\n }\n });\n // TODO: experiment with using NgZone instead of global above\n // const navigatedFromCallback = (args: NavigatedData) => {\n // \tif (args.isBackNavigation) {\n // this.ngZone.run(() => {\n // this.locationStrategy._beginBackPageNavigation(this.frame);\n // this.locationStrategy.back(null, this.frame);\n // });\n // \t}\n // };\n\n page.on(Page.navigatedFromEvent, navigatedFromCallback);\n componentRef.onDestroy(() => {\n if (page) {\n page.off(Page.navigatedFromEvent, navigatedFromCallback);\n page = null;\n }\n });\n\n const navOptions = {\n ...defaultNavOptions,\n ...(this.router.getCurrentNavigation().extras || {}),\n } as ExtendedNavigationExtras;\n this.locationStrategy._beginPageNavigation(this.frame, navOptions);\n const isReplace = navOptions.replaceUrl && !navOptions.clearHistory;\n\n const currentRoute = this.activatedRoute;\n // Clear refCache if navigation with clearHistory\n if (navOptions.clearHistory) {\n this.outlet.outletKeys.forEach((key) => this.routeReuseStrategy.markCacheForClear(key));\n const wipeCache = callableOnce(() => {\n if (this.postNavFunction === wipeCache) {\n this.postNavFunction = null;\n }\n if (this.outlet && this.activatedRoute === currentRoute) {\n // potential alternative fix (only fix children of the current outlet)\n // const nests = outletKey.split('/');\n // this.outlet.outletKeys.filter((k) => k.split('/').length >= nests.length).forEach((key) => this.routeReuseStrategy.clearCache(key));\n this.outlet.outletKeys.forEach((key) => this.routeReuseStrategy.clearMarkedCache(key));\n }\n });\n this.postNavFunction = wipeCache;\n const clearCallback = () =>\n setTimeout(() => {\n wipeCache();\n });\n\n page.once(Page.navigatedToEvent, clearCallback);\n } else if (navOptions.replaceUrl) {\n this.outlet.outletKeys.forEach((key) => this.routeReuseStrategy.markCacheForPop(key));\n const popCache = callableOnce(() => {\n if (this.postNavFunction === popCache) {\n this.postNavFunction = null;\n }\n if (this.outlet && this.activatedRoute === currentRoute) {\n // potential alternative fix (only fix children of the current outlet)\n // const nests = outletKey.split('/');\n // this.outlet.outletKeys.filter((k) => k.split('/').length >= nests.length).forEach((key) => this.routeReuseStrategy.popCache(key));\n this.outlet.outletKeys.forEach((key) => this.routeReuseStrategy.clearMarkedCache(key));\n }\n });\n this.postNavFunction = popCache;\n const clearCallback = () =>\n setTimeout(() => {\n popCache();\n });\n\n page.once(Page.navigatedToEvent, clearCallback);\n }\n\n const navigationEntry: NavigationEntry = {\n create() {\n return page;\n },\n context: navigationContext,\n clearHistory: navOptions.clearHistory,\n animated: navOptions.animated,\n transition: navOptions.transition,\n };\n\n if (isReplace && this.frame.currentPage) {\n this.frame.replacePage(navigationEntry);\n } else {\n this.frame.navigate(navigationEntry);\n }\n }\n\n // Find and mark the top activated route as an activated one.\n // In ns-location-strategy we are reusing components only if their corresponing routes\n // are marked as activated from this method.\n private markActivatedRoute(activatedRoute: ActivatedRoute) {\n const queue = [];\n queue.push(activatedRoute.snapshot);\n let currentRoute = queue.shift();\n\n while (currentRoute) {\n currentRoute.children.forEach((childRoute) => {\n queue.push(childRoute);\n });\n\n const topActivatedRoute = findTopActivatedRouteNodeForOutlet(currentRoute);\n const outletKey = this.locationStrategy.getRouteFullPath(topActivatedRoute);\n const outlet = this.locationStrategy.findOutlet(outletKey, topActivatedRoute);\n\n if (outlet && outlet.frames.length) {\n topActivatedRoute[pageRouterActivatedSymbol] = true;\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('Activated route marked as page: ' + routeToString(topActivatedRoute));\n }\n }\n\n currentRoute = queue.shift();\n }\n }\n\n private getComponentType(activatedRoute: ActivatedRoute): Type<any> {\n return activatedRoute.routeConfig.component || activatedRoute.component;\n }\n\n private getOutlet(activatedRouteSnapshot: ActivatedRouteSnapshot): Outlet {\n const topActivatedRoute = findTopActivatedRouteNodeForOutlet(activatedRouteSnapshot);\n const outletKey = this.locationStrategy.getRouteFullPath(topActivatedRoute);\n let outlet = this.locationStrategy.findOutlet(outletKey, topActivatedRoute);\n\n // Named lazy loaded outlet.\n if (!outlet && this.isEmptyOutlet) {\n const parentOutletKey = this.locationStrategy.getRouteFullPath(topActivatedRoute.parent);\n outlet = this.locationStrategy.findOutlet(parentOutletKey, topActivatedRoute.parent);\n\n if (outlet) {\n outlet.outletKeys.push(outletKey);\n }\n }\n\n return outlet;\n }\n}\n","import { NSLocationStrategy } from './ns-location-strategy';\nimport { PlatformLocation, LocationChangeListener } from '@angular/common';\nimport { Injectable } from '@angular/core';\nimport { NativeScriptDebug } from '../../trace';\n\n@Injectable()\nexport class NativescriptPlatformLocation extends PlatformLocation {\n readonly hostname: string;\n readonly href: string;\n readonly port: string;\n readonly protocol: string;\n\n constructor(private locationStrategy: NSLocationStrategy) {\n super();\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.routerLog('NativescriptPlatformLocation.constructor()');\n }\n }\n\n getState(): any {\n return undefined;\n }\n\n getBaseHrefFromDOM(): string {\n return '/';\n }\n\n onPopState(fn: LocationChangeListener): VoidFunction {\n this.locationStrategy.onPopState(fn);\n return () => {\n //\n };\n }\n\n onHashChange(_fn: LocationChangeListener): VoidFunction {\n return () => {\n //\n };\n }\n\n get search(): string {\n return '';\n }\n get hash(): string {\n return '';\n }\n get pathname(): string {\n return this.locationStrategy.path();\n }\n set pathname(_newPath: string) {\n throw new Error('NativescriptPlatformLocation set pathname - not implemented');\n }\n\n pushState(state: any, title: string, url: string): void {\n this.locationStrategy.pushState(state, title, url, null);\n }\n\n replaceState(state: any, title: string, url: string): void {\n this.locationStrategy.replaceState(state, title, url, null);\n }\n\n forward(): void {\n throw new Error('NativescriptPlatformLocation.forward() - not implemented');\n }\n\n back(): void {\n this.locationStrategy.back();\n }\n}\n","import { Component, ViewChild } from '@angular/core';\nimport { Page } from '@nativescript/core';\nimport { PageRouterOutlet } from './page-router-outlet';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'ns-empty-outlet',\n template: \"<page-router-outlet isEmptyOutlet='true'></page-router-outlet>\",\n imports: [PageRouterOutlet],\n})\nexport class NSEmptyOutletComponent {\n @ViewChild(PageRouterOutlet, { read: PageRouterOutlet, static: false }) pageRouterOutlet: PageRouterOutlet;\n constructor(private page: Page) {\n if (this.page) {\n this.page.actionBarHidden = true;\n\n this.page.on('loaded', () => {\n if (this.pageRouterOutlet && this.page.frame) {\n this.pageRouterOutlet.setActionBarVisibility(this.page.frame.actionBarVisibility);\n }\n });\n }\n }\n}\n","type AngularBootstrapRouteLike = {\n children?: AngularBootstrapRouteLike[];\n};\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n if (!value || typeof value !== 'object') {\n return false;\n }\n\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\nfunction shouldStripRouteKey(key: string): boolean {\n return key.startsWith('_') || key.startsWith('ɵ');\n}\n\nfunction cloneRouteValue(value: unknown): unknown {\n if (Array.isArray(value)) {\n return value.slice();\n }\n\n if (isPlainObject(value)) {\n return { ...value };\n }\n\n return value;\n}\n\nfunction cloneBootstrapRoute<T extends object>(route: T): T {\n const next: AngularBootstrapRouteLike = {};\n\n for (const [key, value] of Object.entries(route as Record<string, unknown>)) {\n if (shouldStripRouteKey(key)) {\n continue;\n }\n\n if (key === 'children' && Array.isArray(value)) {\n next.children = cloneRoutesForBootstrap(value);\n continue;\n }\n\n next[key] = cloneRouteValue(value);\n }\n\n return next as T;\n}\n\nexport function cloneRoutesForBootstrap<T extends object>(routes: T[] | undefined | null): T[] {\n if (!Array.isArray(routes)) {\n return [];\n }\n\n return routes.map((route) => cloneBootstrapRoute(route));\n}","type AngularHmrRouteState = {\n url: string;\n source: string;\n timestamp: number;\n};\n\nconst CURRENT_ROUTE_KEY = '__NS_ANGULAR_HMR_CURRENT_ROUTE__';\nconst PENDING_START_PATH_KEY = '__NS_ANGULAR_HMR_PENDING_START_PATH__';\nconst CAPTURE_ROUTE_KEY = '__NS_CAPTURE_ANGULAR_HMR_ROUTE__';\n// Stack of normalized URLs that mirrors Angular Router's back-stack while the\n// app is running, and is snapshotted into `PENDING_HISTORY_KEY` when an HMR\n// reboot is about to fire. After the new module bootstraps, the router replay\n// hook walks the stack to rebuild the back-stack so users keep their back\n// navigation across HMR cycles.\nconst HISTORY_KEY = '__NS_ANGULAR_HMR_ROUTE_HISTORY__';\nconst PENDING_HISTORY_KEY = '__NS_ANGULAR_HMR_PENDING_HISTORY__';\n// Window flag set while the new bootstrap is mid-replay of a captured route\n// stack. User-app code can consult this to skip default navigations that\n// would otherwise stomp the route the framework is restoring (e.g. a\n// bottom-nav component that defaults to its first tab on init when no\n// signal-backed selection exists).\nconst RESTORING_KEY = '__NS_ANGULAR_HMR_RESTORING_ROUTE__';\nconst RESTORING_TARGET_KEY = '__NS_ANGULAR_HMR_RESTORING_ROUTE_TARGET__';\n\nfunction getGlobalState(): any {\n return globalThis as any;\n}\n\nfunction readHistoryArray(key: string): string[] {\n const g = getGlobalState();\n const raw = g[key];\n return Array.isArray(raw) ? (raw.filter((entry) => typeof entry === 'string') as string[]) : [];\n}\n\nfunction writeHistoryArray(key: string, history: string[]): void {\n const g = getGlobalState();\n if (history.length > 0) {\n g[key] = history.slice();\n } else {\n delete g[key];\n }\n}\n\nexport function normalizeAngularHmrRouteUrl(value: unknown): string | null {\n if (typeof value !== 'string') {\n return null;\n }\n\n const trimmed = value.trim();\n if (!trimmed) {\n return null;\n }\n\n if (trimmed.startsWith('/')) {\n return trimmed;\n }\n\n if (trimmed.startsWith('?') || trimmed.startsWith('#')) {\n return `/${trimmed}`;\n }\n\n return `/${trimmed.replace(/^\\/+/, '')}`;\n}\n\nexport function writeAngularHmrRouteState(\n value: unknown,\n options: {\n pending?: boolean;\n source: string;\n },\n): string | null {\n const url = normalizeAngularHmrRouteUrl(value);\n if (!url) {\n return null;\n }\n\n const state: AngularHmrRouteState = {\n url,\n source: options.source,\n timestamp: Date.now(),\n };\n\n const g = getGlobalState();\n g[CURRENT_ROUTE_KEY] = state;\n if (options.pending) {\n g[PENDING_START_PATH_KEY] = state;\n }\n\n return url;\n}\n\nexport function captureAngularHmrPendingStartPath(value: unknown, source = 'hmr-reboot'): string | null {\n return writeAngularHmrRouteState(value, { pending: true, source });\n}\n\nexport function readAngularHmrPendingStartPath(): string {\n // When a back-stack snapshot exists we boot to the bottom of the stack and\n // let `replayAngularHmrPendingForwardNavigations` walk the rest. Otherwise\n // fall back to the legacy single-URL slot so projects without history\n // tracking still land on the page they were viewing.\n const pendingHistory = readHistoryArray(PENDING_HISTORY_KEY);\n if (pendingHistory.length > 0) {\n // Open the restoring-route window so user-app default navigations\n // can step out of the framework's way until replay completes. The\n // forward-navigation walk in `NativeScriptAngularHmrRouteReplay`\n // closes the window after the final URL lands or fails. We pass\n // the deepest captured URL so consumers can compare against the\n // active router URL if they want fine-grained suppression.\n beginAngularHmrRouteRestore(pendingHistory[pendingHistory.length - 1]);\n return pendingHistory[0];\n }\n\n const g = getGlobalState();\n const fallback = normalizeAngularHmrRouteUrl(g[PENDING_START_PATH_KEY]?.url ?? g[PENDING_START_PATH_KEY]) || '';\n if (fallback) {\n // Single-URL fallback path: user-app code should still suppress\n // default navigations briefly — the new bootstrap is about to\n // navigate to `fallback`, so a default tab init that fires first\n // would still stomp it.\n beginAngularHmrRouteRestore(fallback);\n }\n return fallback;\n}\n\nexport function invokeAngularHmrRouteCapture(): string | null {\n const g = getGlobalState();\n const capture = g[CAPTURE_ROUTE_KEY];\n if (typeof capture === 'function') {\n try {\n return capture();\n } catch {\n // Fall back to the last known router url when the active capture hook fails.\n }\n }\n\n return captureAngularHmrPendingStartPath(g[CURRENT_ROUTE_KEY]?.url ?? g[CURRENT_ROUTE_KEY], 'hmr-fallback');\n}\n\nexport function installAngularHmrRouteCaptureHook(capture: () => string | null): () => void {\n const g = getGlobalState();\n g[CAPTURE_ROUTE_KEY] = capture;\n\n return () => {\n if (g[CAPTURE_ROUTE_KEY] === capture) {\n delete g[CAPTURE_ROUTE_KEY];\n }\n };\n}\n\n// ---- back-stack history primitives ------------------------------------------\n\n/**\n * Push a URL onto the live back-stack mirror. The mirror is collapsed when the\n * incoming URL equals the top — Angular fires multiple `NavigationEnd` events\n * for the same URL during certain `replaceUrl` scenarios and we don't want to\n * inflate the stack.\n */\nexport function pushAngularHmrRouteHistoryEntry(value: unknown): string | null {\n const url = normalizeAngularHmrRouteUrl(value);\n if (!url) {\n return null;\n }\n\n const history = readHistoryArray(HISTORY_KEY);\n if (history.length > 0 && history[history.length - 1] === url) {\n return url;\n }\n\n history.push(url);\n writeHistoryArray(HISTORY_KEY, history);\n return url;\n}\n\n/**\n * Pop the top of the live back-stack mirror. Used when Angular reports a\n * `popstate`-triggered navigation so the mirror tracks back navigations.\n */\nexport function popAngularHmrRouteHistoryEntry(): string | null {\n const history = readHistoryArray(HISTORY_KEY);\n if (history.length === 0) {\n return null;\n }\n const popped = history.pop() ?? null;\n writeHistoryArray(HISTORY_KEY, history);\n return popped;\n}\n\n/**\n * Replace the top of the live back-stack mirror. Used when Angular reports a\n * `NavigationEnd` with `replaceUrl=true`, e.g. canonical-redirect cycles.\n */\nexport function replaceAngularHmrRouteHistoryTop(value: unknown): string | null {\n const url = normalizeAngularHmrRouteUrl(value);\n if (!url) {\n return null;\n }\n\n const history = readHistoryArray(HISTORY_KEY);\n if (history.length === 0) {\n history.push(url);\n } else {\n history[history.length - 1] = url;\n }\n writeHistoryArray(HISTORY_KEY, history);\n return url;\n}\n\n/**\n * Read a defensive copy of the live back-stack mirror.\n */\nexport function readAngularHmrRouteHistory(): string[] {\n return readHistoryArray(HISTORY_KEY);\n}\n\n/**\n * Reset the live back-stack mirror. Used by tests and on bootstrap when the\n * router cannot replay the captured stack so we don't carry stale entries\n * forward.\n */\nexport function clearAngularHmrRouteHistory(): void {\n const g = getGlobalState();\n delete g[HISTORY_KEY];\n}\n\n/**\n * Replace the entire live back-stack mirror with a single URL. Mirrors\n * NativeScript's `clearHistory: true` navigation option, which collapses\n * the native page stack down to the destination — without this, the HMR\n * snapshot would still carry every URL the user passed through before\n * the reset (e.g. login screens that auth-gates now hide), and the next\n * reboot would walk through every one of them as a forward navigation.\n *\n * An empty / unparseable `value` clears the mirror entirely.\n */\nexport function resetAngularHmrRouteHistoryToUrl(value: unknown): string | null {\n const url = normalizeAngularHmrRouteUrl(value);\n if (!url) {\n writeHistoryArray(HISTORY_KEY, []);\n return null;\n }\n\n writeHistoryArray(HISTORY_KEY, [url]);\n return url;\n}\n\n/**\n * Snapshot the live back-stack mirror under the pending-history slot so the\n * next bootstrap can read it. Called from the HMR capture hook.\n *\n * The live mirror is cleared after the copy so the freshly bootstrapped app\n * starts from an empty back-stack. The replay walks the captured snapshot\n * via `NativeScriptAngularHmrRouteReplay` which fires `NavigationEnd` for\n * every URL it touches; the new tracker subscribes to those events and\n * naturally rebuilds the live mirror to match the snapshot. Without this\n * reset the live mirror would accumulate every URL the replay re-pushes\n * across HMR cycles, growing without bound and turning subsequent snapshots\n * into runaway forward-navigation walks (each replayed forward nav from\n * `/profile` back into `/talk` creates a fresh `TalkComponent` because\n * forward navigation never reuses the cache, so the leak shows up as\n * duplicated `Norrix is not enabled` / `BottomNavComponent Router Event:`\n * lines that double on every save).\n *\n * Returns the snapshot for diagnostics. Defensive: an empty live mirror\n * leaves the pending slot untouched so a single-page snapshot still works.\n */\nexport function snapshotAngularHmrRouteHistory(): string[] {\n const live = readHistoryArray(HISTORY_KEY);\n if (live.length === 0) {\n return [];\n }\n writeHistoryArray(PENDING_HISTORY_KEY, live);\n // Clear the live mirror so the next bootstrap starts from a clean slate.\n // The replay will repopulate it via the new tracker's NavigationEnd\n // subscription as it walks the captured stack.\n writeHistoryArray(HISTORY_KEY, []);\n return live.slice();\n}\n\n/**\n * Read the snapshotted back-stack pending replay on the new bootstrap.\n */\nexport function readAngularHmrPendingRouteHistory(): string[] {\n return readHistoryArray(PENDING_HISTORY_KEY);\n}\n\n/**\n * Read URLs to navigate forward through after the initial navigation finishes.\n * The first entry of the stack is the `START_PATH` consumed by the router; the\n * rest are forward navigations to push onto the new back-stack.\n */\nexport function readAngularHmrPendingForwardNavigations(): string[] {\n const pending = readHistoryArray(PENDING_HISTORY_KEY);\n if (pending.length <= 1) {\n return [];\n }\n return pending.slice(1);\n}\n\n/**\n * Clear the pending snapshot. The router replay calls this once it finishes\n * walking the stack so subsequent reboots start fresh.\n */\nexport function clearAngularHmrPendingRouteHistory(): void {\n const g = getGlobalState();\n delete g[PENDING_HISTORY_KEY];\n}\n\n// ---- restoring-route window flag --------------------------------------------\n\n/**\n * True while the Angular HMR layer is restoring a captured route stack\n * onto the freshly-bootstrapped router. The window opens just before\n * `START_PATH` resolves to a deep URL and closes once the router has\n * walked the entire forward navigation list (or aborted it).\n *\n * User-app code that runs default navigations on component init (e.g. a\n * bottom-nav defaulting to its first tab) can consult this flag to skip\n * its default navigation so the framework's restored route survives:\n *\n * ```ts\n * if (isAngularHmrRestoringRoute()) {\n * return; // framework is restoring a deeper route — leave it alone.\n * }\n * defaultTabNavigation();\n * ```\n *\n * Returns `false` outside of HMR or after the replay window has closed.\n * Production builds always see `false` because the framework never\n * opens the window there.\n */\nexport function isAngularHmrRestoringRoute(): boolean {\n const g = getGlobalState();\n return g[RESTORING_KEY] === true;\n}\n\n/**\n * The target route the framework is currently restoring, or `null` when\n * no replay is in progress. Useful when the consumer wants to compare\n * against the current router URL.\n */\nexport function getAngularHmrRestoringRoute(): string | null {\n const g = getGlobalState();\n const value = g[RESTORING_TARGET_KEY];\n return typeof value === 'string' && value ? value : null;\n}\n\n/**\n * Open the restoring-route window. Called by the framework when an HMR\n * bootstrap is about to navigate to a captured deep route — never call\n * this from user code.\n *\n * `targetUrl` is what the framework intends to land on; the value can\n * be read back via {@link getAngularHmrRestoringRoute}.\n */\nexport function beginAngularHmrRouteRestore(targetUrl: string | null): void {\n const g = getGlobalState();\n g[RESTORING_KEY] = true;\n if (targetUrl) {\n g[RESTORING_TARGET_KEY] = targetUrl;\n } else {\n delete g[RESTORING_TARGET_KEY];\n }\n}\n\n/**\n * Close the restoring-route window. Called by the framework when the\n * replay finishes (NavigationEnd reached, replay aborted, or no\n * pending stack existed in the first place).\n */\nexport function endAngularHmrRouteRestore(): void {\n const g = getGlobalState();\n delete g[RESTORING_KEY];\n delete g[RESTORING_TARGET_KEY];\n}","import { Injectable, OnDestroy } from '@angular/core';\nimport { NavigationCancel, NavigationEnd, NavigationError, Router } from '@angular/router';\nimport { Subscription } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\n\nimport { isAngularHmrEnabled } from '../../hmr-environment';\nimport { NativeScriptDebug } from '../../trace';\nimport {\n clearAngularHmrPendingRouteHistory,\n endAngularHmrRouteRestore,\n isAngularHmrRestoringRoute,\n readAngularHmrPendingForwardNavigations,\n} from './hmr-route-state-core';\n\n/**\n * Grace period to keep `isAngularHmrRestoringRoute()` returning `true`\n * after `replayForwardNavigations()` finishes its last `navigateByUrl`.\n *\n * Why a grace period exists: NativeScript native views (TabView, BottomNavigation,\n * Frame, etc.) fire their `loaded` events asynchronously after the JS-side\n * `NavigationEnd`. User-app code wired to those events typically guards a\n * default navigation (e.g. \"select first tab\") with `isAngularHmrRestoringRoute()`.\n * If we close the window the instant the JS replay finishes, the loaded\n * event arrives a few hundred milliseconds later, the guard reports false,\n * and the default navigation stomps the freshly-restored route.\n *\n * 1000ms covers all the cases observed on iOS device + simulator without\n * leaving the window open long enough to interfere with genuine user\n * navigation. The fallback timeout (`fallback-timeout`) below is a safety\n * net for scenarios where this scheduled close never fires.\n */\nconst REPLAY_COMPLETED_GRACE_MS = 1000;\n\n/**\n * Replays the back-stack snapshot captured by `NativeScriptAngularHmrRouteTracker`\n * during HMR. The router's initial navigation already lands on the bottom of\n * the stack (`stack[0]`); this service walks `stack[1..n]` so the user keeps\n * back navigation across HMR cycles.\n *\n * The replay is single-shot per bootstrap. Any failure (cancelled navigation,\n * unrouteable URL) aborts the rest of the replay so we don't fight the router\n * — the user keeps whichever subset of the stack we successfully re-pushed.\n */\n@Injectable()\nexport class NativeScriptAngularHmrRouteReplay implements OnDestroy {\n private subscription?: Subscription;\n private windowFallbackTimeout?: ReturnType<typeof setTimeout>;\n private pendingCloseTimeout?: ReturnType<typeof setTimeout>;\n\n constructor(private readonly router: Router) {\n if (!isAngularHmrEnabled()) {\n return;\n }\n\n const forwardNavigations = readAngularHmrPendingForwardNavigations();\n\n // The restoring window is opened by `readAngularHmrPendingStartPath()`\n // when `START_PATH` resolves to a deep route. If that path resolved\n // to nothing AND we have no forward navigations, there is nothing\n // to suppress and we must close the window if it was somehow left\n // open. Otherwise we keep it open until replay finishes.\n const restoringWindowOpen = isAngularHmrRestoringRoute();\n\n if (forwardNavigations.length === 0) {\n // Nothing to replay; clear the pending slot so a future navigation that\n // ends in the bootstrap window doesn't carry the snapshot forward.\n clearAngularHmrPendingRouteHistory();\n\n if (restoringWindowOpen) {\n // Single-URL restore (no back-stack to walk): keep the window\n // open until the initial navigation completes so user-app\n // default navigations don't fire before the framework's\n // restored URL settles. We then schedule the close with the\n // same grace period as the multi-URL replay path so async\n // native `loaded` handlers still see the flag.\n this.subscription = this.router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError),\n take(1),\n )\n .subscribe(() => this.scheduleRestoringWindowClose('initial-navigation-settled'));\n // Belt-and-braces: bootstrap can race with router init in\n // unusual cases. Close the window after a short timeout so we\n // never leave it stuck open and silently breaking default\n // navigations forever.\n this.windowFallbackTimeout = setTimeout(() => this.closeRestoringWindow('fallback-timeout'), 5000);\n }\n\n return;\n }\n\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`HMR back-stack replay queued: ${forwardNavigations.length} forward navigation(s)`);\n }\n\n this.subscription = this.router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd || event instanceof NavigationCancel || event instanceof NavigationError),\n take(1),\n )\n .subscribe((event) => {\n if (event instanceof NavigationEnd) {\n void this.replayForwardNavigations(forwardNavigations);\n } else {\n // Initial navigation never landed; replay would compound the problem.\n clearAngularHmrPendingRouteHistory();\n this.closeRestoringWindow('initial-navigation-failed');\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog('HMR back-stack replay skipped: initial navigation did not complete');\n }\n }\n });\n\n // Same belt-and-braces fallback as the single-URL path above.\n this.windowFallbackTimeout = setTimeout(() => this.closeRestoringWindow('fallback-timeout'), 10000);\n }\n\n ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n if (this.windowFallbackTimeout !== undefined) {\n clearTimeout(this.windowFallbackTimeout);\n this.windowFallbackTimeout = undefined;\n }\n if (this.pendingCloseTimeout !== undefined) {\n clearTimeout(this.pendingCloseTimeout);\n this.pendingCloseTimeout = undefined;\n }\n // Defensive: never leave the restoring window open across module\n // destruction. A subsequent reboot would otherwise see it set and\n // suppress the next default navigation indefinitely.\n this.closeRestoringWindow('replay-service-destroyed');\n }\n\n private closeRestoringWindow(reason: string): void {\n if (this.pendingCloseTimeout !== undefined) {\n clearTimeout(this.pendingCloseTimeout);\n this.pendingCloseTimeout = undefined;\n }\n if (!isAngularHmrRestoringRoute()) {\n return;\n }\n endAngularHmrRouteRestore();\n if (this.windowFallbackTimeout !== undefined) {\n clearTimeout(this.windowFallbackTimeout);\n this.windowFallbackTimeout = undefined;\n }\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`HMR restoring-route window closed (${reason})`);\n }\n }\n\n /**\n * Schedule the restoring window to close after a small grace period\n * so that asynchronous user-app handlers (e.g. NativeScript native\n * `loaded` events on TabView / BottomNavigation / Frame) still observe\n * `isAngularHmrRestoringRoute() === true` and skip default navigations\n * that would otherwise stomp the freshly-restored route.\n *\n * The grace period is bounded by the existing `fallback-timeout` so\n * we never leave the flag set indefinitely even if `setTimeout` is\n * blocked by a misbehaving consumer.\n */\n private scheduleRestoringWindowClose(reason: string): void {\n if (!isAngularHmrRestoringRoute()) {\n return;\n }\n if (this.pendingCloseTimeout !== undefined) {\n clearTimeout(this.pendingCloseTimeout);\n }\n this.pendingCloseTimeout = setTimeout(() => {\n this.pendingCloseTimeout = undefined;\n this.closeRestoringWindow(reason);\n }, REPLAY_COMPLETED_GRACE_MS);\n }\n\n private async replayForwardNavigations(urls: string[]): Promise<void> {\n let aborted = false;\n try {\n for (const url of urls) {\n const succeeded = await this.router.navigateByUrl(url).catch(() => false);\n if (!succeeded) {\n aborted = true;\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`HMR back-stack replay aborted at ${url}`);\n }\n return;\n }\n if (NativeScriptDebug.isLogEnabled()) {\n NativeScriptDebug.hmrLog(`HMR back-stack replay navigated to ${url}`);\n }\n }\n } finally {\n clearAngularHmrPendingRouteHistory();\n this.scheduleRestoringWindowClose(aborted ? 'replay-aborted' : 'replay-completed');\n }\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport { NavigationEnd, NavigationStart, Router } from '@angular/router';\nimport { Subscription } from 'rxjs';\n\nimport { isAngularHmrEnabled } from '../../hmr-environment';\nimport {\n installAngularHmrRouteCaptureHook,\n popAngularHmrRouteHistoryEntry,\n pushAngularHmrRouteHistoryEntry,\n readAngularHmrPendingStartPath,\n replaceAngularHmrRouteHistoryTop,\n resetAngularHmrRouteHistoryToUrl,\n snapshotAngularHmrRouteHistory,\n writeAngularHmrRouteState,\n} from './hmr-route-state-core';\n\nexport {\n beginAngularHmrRouteRestore,\n captureAngularHmrPendingStartPath,\n clearAngularHmrPendingRouteHistory,\n clearAngularHmrRouteHistory,\n endAngularHmrRouteRestore,\n getAngularHmrRestoringRoute,\n invokeAngularHmrRouteCapture,\n isAngularHmrRestoringRoute,\n normalizeAngularHmrRouteUrl,\n popAngularHmrRouteHistoryEntry,\n pushAngularHmrRouteHistoryEntry,\n readAngularHmrPendingForwardNavigations,\n readAngularHmrPendingRouteHistory,\n readAngularHmrRouteHistory,\n replaceAngularHmrRouteHistoryTop,\n resetAngularHmrRouteHistoryToUrl,\n snapshotAngularHmrRouteHistory,\n} from './hmr-route-state-core';\nexport { readAngularHmrPendingStartPath } from './hmr-route-state-core';\n\n/**\n * Read NativeScript's `clearHistory: true` navigation extra off the active\n * Angular navigation. Defensive against test mocks and bare `Router`-like\n * shapes that don't expose `getCurrentNavigation` (e.g. earlier Angular\n * versions and the unit-test mocks in `hmr-route-state-tracker.spec.ts`).\n *\n * `clearHistory` is the NativeScript-only signal that\n * `NSLocationStrategy._beginPageNavigation` uses to collapse the native page\n * stack down to the destination. We mirror that on the HMR side so a\n * subsequent reboot doesn't replay URLs the user can no longer reach (the\n * canonical example: `/`, `/signup-landing`, `/login` after the auth flow\n * navigated to `/talk/(todayTab:today)` with `clearHistory: true`).\n */\nfunction readClearHistoryFromRouter(router: Router): boolean {\n const getCurrentNavigation = (router as { getCurrentNavigation?: () => unknown }).getCurrentNavigation;\n if (typeof getCurrentNavigation !== 'function') {\n return false;\n }\n\n let navigation: unknown;\n try {\n navigation = getCurrentNavigation.call(router);\n } catch {\n return false;\n }\n\n const extras = (navigation as { extras?: { clearHistory?: unknown } } | null | undefined)?.extras;\n return !!extras?.clearHistory;\n}\n\n@Injectable()\nexport class NativeScriptAngularHmrRouteTracker implements OnDestroy {\n private subscription?: Subscription;\n private disposeCaptureHook?: () => void;\n // Tracks whether the current `NavigationStart..NavigationEnd` pair was kicked\n // off by a popstate (frame.goBack / NSLocationStrategy.back) so that on\n // `NavigationEnd` we can pop our mirror instead of pushing a duplicate entry.\n private currentNavigationIsPopstate = false;\n private currentNavigationReplaceUrl = false;\n // Tracks whether the active navigation was started with NativeScript's\n // `clearHistory: true` extra (read off `router.getCurrentNavigation()` at\n // `NavigationStart`). When set, the matching `NavigationEnd` collapses the\n // mirror down to just the destination URL — see\n // `resetAngularHmrRouteHistoryToUrl` for the rationale.\n private currentNavigationClearsHistory = false;\n\n constructor(private readonly router: Router) {\n if (!isAngularHmrEnabled()) {\n return;\n }\n\n this.disposeCaptureHook = this.installCaptureHook();\n this.captureCurrentRoute('bootstrap');\n this.subscription = this.router.events.subscribe((event) => {\n if (event instanceof NavigationStart) {\n this.currentNavigationIsPopstate = event.navigationTrigger === 'popstate';\n this.currentNavigationReplaceUrl = !!event.restoredState;\n this.currentNavigationClearsHistory = readClearHistoryFromRouter(this.router);\n return;\n }\n\n if (event instanceof NavigationEnd) {\n const url = event.urlAfterRedirects || event.url;\n writeAngularHmrRouteState(url, {\n source: 'navigation-end',\n });\n\n if (this.currentNavigationClearsHistory) {\n // NativeScript collapsed the native page stack to this single\n // destination. Mirror that on the HMR side so a future reboot\n // replays only what the user can still navigate back through —\n // not every URL they passed through before the reset.\n resetAngularHmrRouteHistoryToUrl(url);\n } else if (this.currentNavigationIsPopstate) {\n // The user (or NSLocationStrategy.back()) walked the back-stack down\n // by one page; mirror that by dropping the top of our snapshot so a\n // subsequent HMR reboot doesn't carry the popped page back into view.\n popAngularHmrRouteHistoryEntry();\n } else if (this.currentNavigationReplaceUrl) {\n replaceAngularHmrRouteHistoryTop(url);\n } else {\n pushAngularHmrRouteHistoryEntry(url);\n }\n\n this.currentNavigationIsPopstate = false;\n this.currentNavigationReplaceUrl = false;\n this.currentNavigationClearsHistory = false;\n }\n });\n }\n\n ngOnDestroy(): void {\n this.subscription?.unsubscribe();\n this.disposeCaptureHook?.();\n }\n\n private captureCurrentRoute(source: string): string | null {\n if (source === 'hmr-reboot') {\n // Snapshot the live mirror first so the bootstrap can replay forward\n // navigations to rebuild the back-stack. The pending single-URL slot\n // remains useful as a fallback when the snapshot turns out to be empty\n // (e.g. bootstrap-time HMR before the first NavigationEnd).\n snapshotAngularHmrRouteHistory();\n } else if (source === 'bootstrap') {\n // Seed the live mirror with the current URL so the very first HMR\n // before any user navigation still has a stack of size one to snapshot.\n //\n // Skip empty / root URLs: at ENVIRONMENT_INITIALIZER time the router\n // has not run its initial navigation yet so `router.url` is \"/\" (or\n // an empty string). Pushing that here would seed the mirror with a\n // noise entry that becomes the bottom of the next snapshot, which in\n // turn becomes the next bootstrap's `START_PATH`. The router then\n // boots to \"/\" → redirects to the real default route → fires an\n // extra `NavigationEnd` that re-enters the replay path. The first\n // genuine `NavigationEnd` arrives a moment later through the event\n // subscription below and seeds the mirror with the real URL, so\n // dropping the seed here is safe.\n const seedUrl = this.router.url;\n if (seedUrl && seedUrl !== '/') {\n pushAngularHmrRouteHistoryEntry(seedUrl);\n }\n }\n\n return writeAngularHmrRouteState(this.router.url, {\n pending: source === 'hmr-reboot',\n source,\n });\n }\n\n private installCaptureHook(): () => void {\n return installAngularHmrRouteCaptureHook(() => this.captureCurrentRoute('hmr-reboot'));\n }\n}","import {\n APP_BOOTSTRAP_LISTENER,\n ENVIRONMENT_INITIALIZER,\n NgModule,\n ModuleWithProviders,\n NO_ERRORS_SCHEMA,\n Optional,\n SkipSelf,\n inject,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport {\n RouterModule,\n Routes,\n ExtraOptions,\n RouteReuseStrategy,\n RouterFeatures,\n ActivatedRoute,\n Router,\n ROUTES,\n provideRouter,\n} from '@angular/router';\nimport { LocationStrategy, PlatformLocation } from '@angular/common';\nimport { NSRouterLink } from './ns-router-link';\nimport { NSRouterLinkActive } from './ns-router-link-active';\nimport { PageRouterOutlet } from './page-router-outlet';\nimport { NSLocationStrategy } from './ns-location-strategy';\nimport { NativescriptPlatformLocation } from './ns-platform-location';\nimport { NSRouteReuseStrategy } from './ns-route-reuse-strategy';\nimport { RouterExtensions } from './router-extensions';\nimport { FrameService } from '../frame.service';\nimport { NSEmptyOutletComponent } from './ns-empty-outlet.component';\nimport { NativeScriptCommonModule } from '../../nativescript-common.module';\nimport { START_PATH } from '../../tokens';\nimport { cloneRoutesForBootstrap } from './hmr-route-bootstrap-core';\nimport { NativeScriptAngularHmrRouteReplay } from './hmr-route-replay';\nimport { NativeScriptAngularHmrRouteTracker, readAngularHmrPendingStartPath } from './hmr-route-state';\n\nexport { PageRoute } from './page-router-outlet';\nexport { RouterExtensions } from './router-extensions';\nexport { Outlet, NavigationOptions, LocationState, defaultNavOptions } from './ns-location-utils';\nexport { NSRouterLink } from './ns-router-link';\nexport { NSRouterLinkActive } from './ns-router-link-active';\nexport { PageRouterOutlet } from './page-router-outlet';\nexport { NSLocationStrategy } from './ns-location-strategy';\nexport { NSEmptyOutletComponent } from './ns-empty-outlet.component';\n\nexport function provideLocationStrategy(\n locationStrategy: NSLocationStrategy,\n frameService: FrameService,\n startPath: string,\n): NSLocationStrategy {\n return locationStrategy ? locationStrategy : new NSLocationStrategy(frameService, startPath);\n}\n\nconst ROUTER_COMPONENTS = [NSRouterLink, NSRouterLinkActive, PageRouterOutlet, NSEmptyOutletComponent];\n\n@NgModule({\n imports: [RouterModule, NativeScriptCommonModule, ...ROUTER_COMPONENTS],\n exports: [RouterModule, ...ROUTER_COMPONENTS],\n schemas: [NO_ERRORS_SCHEMA],\n})\nexport class NativeScriptRouterModule {\n static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<NativeScriptRouterModule> {\n return {\n ngModule: NativeScriptRouterModule,\n providers: [\n ...RouterModule.forRoot(cloneRoutesForBootstrap(routes), config).providers,\n {\n provide: START_PATH,\n useFactory: readAngularHmrPendingStartPath,\n },\n {\n provide: NSLocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [[NSLocationStrategy, new Optional(), new SkipSelf()], FrameService, [new Optional(), START_PATH]],\n },\n { provide: LocationStrategy, useExisting: NSLocationStrategy },\n NativescriptPlatformLocation,\n { provide: PlatformLocation, useExisting: NativescriptPlatformLocation },\n RouterExtensions,\n NSRouteReuseStrategy,\n { provide: RouteReuseStrategy, useExisting: NSRouteReuseStrategy },\n NativeScriptAngularHmrRouteTracker,\n NativeScriptAngularHmrRouteReplay,\n {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n deps: [NativeScriptAngularHmrRouteTracker, NativeScriptAngularHmrRouteReplay],\n useFactory: () => () => undefined,\n },\n ],\n };\n }\n\n static forChild(routes: Routes): ModuleWithProviders<NativeScriptRouterModule> {\n return { ngModule: NativeScriptRouterModule, providers: RouterModule.forChild(cloneRoutesForBootstrap(routes)).providers };\n }\n}\nexport function rootRoute(router: Router): ActivatedRoute {\n return router.routerState.root;\n}\n\nexport function provideNativeScriptRouter(routes: Routes, ...features: RouterFeatures[]) {\n return makeEnvironmentProviders([\n provideRouter(cloneRoutesForBootstrap(routes), ...features),\n {\n provide: START_PATH,\n useFactory: readAngularHmrPendingStartPath,\n },\n {\n provide: NSLocationStrategy,\n useFactory: provideLocationStrategy,\n deps: [[NSLocationStrategy, new Optional(), new SkipSelf()], FrameService, [new Optional(), START_PATH]],\n },\n { provide: LocationStrategy, useExisting: NSLocationStrategy },\n NativescriptPlatformLocation,\n { provide: PlatformLocation, useExisting: NativescriptPlatformLocation },\n RouterExtensions,\n NSRouteReuseStrategy,\n { provide: RouteReuseStrategy, useExisting: NSRouteReuseStrategy },\n NativeScriptAngularHmrRouteTracker,\n NativeScriptAngularHmrRouteReplay,\n {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useValue: () => {\n inject(NativeScriptAngularHmrRouteTracker);\n inject(NativeScriptAngularHmrRouteReplay);\n },\n },\n // {provide: APP_BOOTSTRAP_LISTENER, multi: true, useFactory: getBootstrapListener},\n ]);\n}\n","/* eslint-disable @typescript-eslint/no-unsafe-function-type */\n/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/triple-slash-reference */\n/// <reference path=\"../../../../node_modules/zone.js/zone.d.ts\" />\n/// <reference path=\"../../../../node_modules/@nativescript/core/global-types.d.ts\" />\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { EventEmitter, isDevMode, NgZone, NgZoneOptions, ɵinternalProvideZoneChangeDetection } from '@angular/core';\nimport { Utils } from '@nativescript/core';\n\nlet currentRafId = 1;\nfunction noop() {}\n\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @publicApi\n */\nexport class NativeScriptNgZone implements NgZone {\n readonly hasPendingMacrotasks: boolean = false;\n readonly hasPendingMicrotasks: boolean = false;\n\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n readonly isStable: boolean = true;\n\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n readonly onUnstable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when there is no more microtasks enqueued in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n readonly onMicrotaskEmpty: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n readonly onStable: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * Notifies that an error has been delivered.\n */\n readonly onError: EventEmitter<any> = new EventEmitter(false);\n\n constructor({\n enableLongStackTrace = isDevMode(),\n shouldCoalesceEventChangeDetection = true,\n shouldCoalesceRunChangeDetection = true,\n } = {}) {\n if (typeof Zone == 'undefined') {\n throw new Error(`In this configuration Angular requires Zone.js`);\n }\n\n Zone.assertZonePatched();\n const self = this as any as NgZonePrivate;\n self._nesting = 0;\n\n self._outer = self._inner = Zone.current;\n\n if ((Zone as any)['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new ((Zone as any)['TaskTrackingZoneSpec'] as any)());\n }\n\n if (enableLongStackTrace && (Zone as any)['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork((Zone as any)['longStackTraceZoneSpec']);\n }\n // if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be\n // coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.\n self.shouldCoalesceEventChangeDetection = !shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;\n self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;\n self.lastRequestAnimationFrameId = -1;\n self.nativeRequestAnimationFrame = function (cb) {\n const nativeDispatchToMainThread = Utils[Zone.__symbol__('dispatchToMainThread')] || Utils.dispatchToMainThread;\n nativeDispatchToMainThread(cb);\n return currentRafId++;\n };\n forkInnerZoneWithAngularBehavior(self);\n }\n\n static isInAngularZone(): boolean {\n return Zone.current.get('isAngularZone') === true;\n }\n\n static assertInAngularZone(): void {\n if (!NgZone.isInAngularZone()) {\n throw new Error('Expected to be in Angular Zone, but it is not!');\n }\n }\n\n static assertNotInAngularZone(): void {\n if (NgZone.isInAngularZone()) {\n throw new Error('Expected to not be in Angular Zone, but it is!');\n }\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n run<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.run(fn, applyThis, applyArgs);\n }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n runTask<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[], name?: string): T {\n const zone = (this as any as NgZonePrivate)._inner;\n const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\n try {\n return zone.runTask(task, applyThis, applyArgs);\n } finally {\n zone.cancelTask(task);\n }\n }\n\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n runGuarded<T>(fn: (...args: any[]) => T, applyThis?: any, applyArgs?: any[]): T {\n return (this as any as NgZonePrivate)._inner.runGuarded(fn, applyThis, applyArgs);\n }\n\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n runOutsideAngular<T>(fn: (...args: any[]) => T): T {\n return (this as any as NgZonePrivate)._outer.run(fn);\n }\n}\n\nconst EMPTY_PAYLOAD = {};\n\ninterface NgZonePrivate extends NgZone {\n _outer: Zone;\n _inner: Zone;\n _nesting: number;\n _hasPendingMicrotasks: boolean;\n\n hasPendingMacrotasks: boolean;\n hasPendingMicrotasks: boolean;\n lastRequestAnimationFrameId: number;\n /**\n * A flag to indicate if NgZone is currently inside\n * checkStable and to prevent re-entry. The flag is\n * needed because it is possible to invoke the change\n * detection from within change detection leading to\n * incorrect behavior.\n *\n * For detail, please refer here,\n * https://github.com/angular/angular/pull/40540\n */\n isCheckStableRunning: boolean;\n isStable: boolean;\n /**\n * Optionally specify coalescing event change detections or not.\n * Consider the following case.\n *\n * <div (click)=\"doSomething()\">\n * <button (click)=\"doSomethingElse()\"></button>\n * </div>\n *\n * When button is clicked, because of the event bubbling, both\n * event handlers will be called and 2 change detections will be\n * triggered. We can coalesce such kind of events to trigger\n * change detection only once.\n *\n * By default, this option will be false. So the events will not be\n * coalesced and the change detection will be triggered multiple times.\n * And if this option be set to true, the change detection will be\n * triggered async by scheduling it in an animation frame. So in the case above,\n * the change detection will only be trigged once.\n */\n shouldCoalesceEventChangeDetection: boolean;\n /**\n * Optionally specify if `NgZone#run()` method invocations should be coalesced\n * into a single change detection.\n *\n * Consider the following case.\n *\n * for (let i = 0; i < 10; i ++) {\n * ngZone.run(() => {\n * // do something\n * });\n * }\n *\n * This case triggers the change detection multiple times.\n * With ngZoneRunCoalescing options, all change detections in an event loops trigger only once.\n * In addition, the change detection executes in requestAnimation.\n *\n */\n shouldCoalesceRunChangeDetection: boolean;\n\n nativeRequestAnimationFrame: (callback: FrameRequestCallback) => number;\n\n // Cache a \"fake\" top eventTask so you don't need to schedule a new task every\n // time you run a `checkStable`.\n fakeTopEventTask: Task;\n}\n\nfunction checkStable(zone: NgZonePrivate) {\n // TODO: @JiaLiPassion, should check zone.isCheckStableRunning to prevent\n // re-entry. The case is:\n //\n // @Component({...})\n // export class AppComponent {\n // constructor(private ngZone: NgZone) {\n // this.ngZone.onStable.subscribe(() => {\n // this.ngZone.run(() => console.log('stable'););\n // });\n // }\n //\n // The onStable subscriber run another function inside ngZone\n // which causes `checkStable()` re-entry.\n // But this fix causes some issues in g3, so this fix will be\n // launched in another PR.\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n } finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(() => zone.onStable.emit(null));\n } finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\n\nfunction delayChangeDetectionForEvents(zone: NgZonePrivate) {\n /**\n * We also need to check _nesting here\n * Consider the following case with shouldCoalesceRunChangeDetection = true\n *\n * ngZone.run(() => {});\n * ngZone.run(() => {});\n *\n * We want the two `ngZone.run()` only trigger one change detection\n * when shouldCoalesceRunChangeDetection is true.\n * And because in this case, change detection run in async way(requestAnimationFrame),\n * so we also need to check the _nesting here to prevent multiple\n * change detections.\n */\n if (zone.isCheckStableRunning || zone.lastRequestAnimationFrameId !== -1) {\n return;\n }\n zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(global, () => {\n // This is a work around for https://github.com/angular/angular/issues/36839.\n // The core issue is that when event coalescing is enabled it is possible for microtasks\n // to get flushed too early (As is the case with `Promise.then`) between the\n // coalescing eventTasks.\n //\n // To workaround this we schedule a \"fake\" eventTask before we process the\n // coalescing eventTasks. The benefit of this is that the \"fake\" container eventTask\n // will prevent the microtasks queue from getting drained in between the coalescing\n // eventTask execution.\n if (!zone.fakeTopEventTask) {\n zone.fakeTopEventTask = Zone.root.scheduleEventTask(\n 'fakeTopEventTask',\n () => {\n zone.lastRequestAnimationFrameId = -1;\n updateMicroTaskStatus(zone);\n zone.isCheckStableRunning = true;\n checkStable(zone);\n zone.isCheckStableRunning = false;\n },\n undefined,\n () => {},\n () => {},\n );\n }\n zone.fakeTopEventTask.invoke();\n });\n updateMicroTaskStatus(zone);\n}\n\nfunction forkInnerZoneWithAngularBehavior(zone: NgZonePrivate) {\n const delayChangeDetectionForEventsDelegate = () => {\n delayChangeDetectionForEvents(zone);\n };\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: <any>{ isAngularZone: true },\n onInvokeTask: (\n delegate: ZoneDelegate,\n current: Zone,\n target: Zone,\n task: Task,\n applyThis: any,\n applyArgs: any,\n ): any => {\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n } finally {\n if (\n (zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') ||\n zone.shouldCoalesceRunChangeDetection ||\n !Utils.isMainThread()\n ) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n\n onInvoke: (\n delegate: ZoneDelegate,\n current: Zone,\n target: Zone,\n callback: Function,\n applyThis: any,\n applyArgs?: any[],\n source?: string,\n ): any => {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n } finally {\n if (zone.shouldCoalesceRunChangeDetection || !Utils.isMainThread()) {\n delayChangeDetectionForEventsDelegate();\n }\n onLeave(zone);\n }\n },\n\n onHasTask: (delegate: ZoneDelegate, current: Zone, target: Zone, hasTaskState: HasTaskState) => {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone._hasPendingMicrotasks = hasTaskState.microTask;\n updateMicroTaskStatus(zone);\n checkStable(zone);\n } else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n\n onHandleError: (delegate: ZoneDelegate, current: Zone, target: Zone, error: any): boolean => {\n delegate.handleError(target, error);\n zone.runOutsideAngular(() => zone.onError.emit(error));\n return false;\n },\n });\n}\n\nfunction updateMicroTaskStatus(zone: NgZonePrivate) {\n if (zone._hasPendingMicrotasks || zone.lastRequestAnimationFrameId !== -1) {\n zone.hasPendingMicrotasks = true;\n } else {\n zone.hasPendingMicrotasks = false;\n }\n}\n\nfunction onEnter(zone: NgZonePrivate) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n}\n\nfunction onLeave(zone: NgZonePrivate) {\n zone._nesting--;\n checkStable(zone);\n}\n\nfunction getNgZoneOptions(options?: NgZoneOptions) {\n return {\n enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,\n shouldCoalesceEventChangeDetection: options?.eventCoalescing ?? true,\n shouldCoalesceRunChangeDetection: options?.runCoalescing ?? true,\n };\n}\n\nexport function provideNativeScriptNgZone(options?: NgZoneOptions) {\n const scheduleInRootZone = (options as any)?.scheduleInRootZone;\n return ɵinternalProvideZoneChangeDetection({\n ngZoneFactory: () => new NativeScriptNgZone(getNgZoneOptions(options)),\n scheduleInRootZone,\n });\n}\n","// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path=\"../references.d.ts\" />\nexport * from './lib/public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["REGISTRY_KEY","i1.NSLocationStrategy","AngularCore","INJECTOR_SCOPE","NullViewportScroller","ɵinternalCreateApplication","AnimationEngine","i1","AnimationRendererFactory","WebAnimationsStyleNormalizer","BrowserAnimationBuilder","AnimationStyleNormalizer","Observable","i2.NSFileSystem","i2.NSLocationStrategy","i3.FrameService","i2.RouterExtensions","ɵinternalProvideZoneChangeDetection"],"mappings":";;;;;;;;;;;;;;;;;AAGA,MAAM,YAAY,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC,WAAW,CAAC,IAAI;AAEtD,MAAgB,aAAc,SAAQ,IAAI,CAAA;AAY9C,IAAA,WAAA,CAAsB,OAAe,EAAE,EAAA;AACrC,QAAA,KAAK,EAAE;QADa,IAAA,CAAA,IAAI,GAAJ,IAAI;AAGxB,QAAA,IAAI,CAAC,QAAQ,GAAG,CAAC;AACjB,QAAA,IAAI,CAAC,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC;IACpC;IAEA,QAAQ,GAAA;AACN,QAAA,OAAO,CAAA,EAAG,IAAI,CAAC,QAAQ,CAAA,CAAA,EAAI,IAAI,CAAC,EAAE,CAAA,EAAA,EAAK,IAAI,CAAC,IAAI,EAAE;IACpD;AACD;AAEK,MAAO,WAAY,SAAQ,aAAa,CAAA;aAC3B,IAAA,CAAA,EAAE,GAAG,CAAC,CAAC;AAExB,IAAA,WAAA,CAAY,KAAc,EAAA;QACxB,KAAK,CAAC,KAAK,CAAC;QAEZ,IAAI,CAAC,IAAI,GAAG;AACV,YAAA,YAAY,EAAE,IAAI;SACnB;QACD,IAAI,CAAC,EAAE,GAAG,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE;AACnC,QAAA,WAAW,CAAC,EAAE,IAAI,CAAC;IACrB;;AAGI,MAAO,QAAS,SAAQ,aAAa,CAAA;aAC3B,IAAA,CAAA,eAAe,GAAG,YAAH,CAAgB;aAC5B,IAAA,CAAA,EAAE,GAAG,CAAH,CAAK;AAExB,IAAA,IAAI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK;IACnB;IACA,IAAI,IAAI,CA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